PageSourceSearch

https://bigcase.ai/_next/static/chunks/5667-47e7ef51a47ec8f0.js

js bigcase.ai collected 2026-10-05 11:52:30 UTC 228,073 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5667],{38601:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(e){var t=e.files,n=i.useRef(),r=i.useContext(a.LocalizationContext).l10n,o=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,c=i.useRef([]),l=r&&r.attachment?r.attachment.clickToDownload:"Click to download",u=function(e){var t=n.current,r=[].slice.call(t.getElementsByClassName("rpv-attachment__item"));if(0!==r.length){r.forEach(function(e){return e.setAttribute("tabindex","-1")});var o=document.activeElement,a=r[Math.min(r.length-1,Math.max(0,e(r,o)))];a.setAttribute("tabindex","0"),a.focus()}};return a.useIsomorphicLayoutEffect(function(){var e=n.current;if(e){var t=[].slice.call(e.getElementsByClassName("rpv-attachment__item"));if(c.current=t,t.length>0){var r=t[0];r.focus(),r.setAttribute("tabindex","0")}}},[]),i.createElement("div",{"data-testid":"attachment__list",className:a.classNames({"rpv-attachment__list":!0,"rpv-attachment__list--rtl":o}),ref:n,tabIndex:-1,onKeyDown:function(e){switch(e.key){case"ArrowDown":e.preventDefault(),u(function(e,t){return e.indexOf(t)+1});break;case"ArrowUp":e.preventDefault(),u(function(e,t){return e.indexOf(t)-1});break;case"End":e.preventDefault(),u(function(e,t){return e.length-1});break;case"Home":e.preventDefault(),u(function(e,t){return 0})}}},t.map(function(e){return i.createElement("button",{className:"rpv-attachment__item",key:e.fileName,tabIndex:-1,title:l,type:"button",onClick:function(){var t,n,r,o,a,i;return t=e.fileName,r="string"==typeof(n=e.data)?"":URL.createObjectURL(new Blob([n],{type:""})),(o=document.createElement("a")).style.display="none",o.href=r||t,o.setAttribute("download",(i=t.split("/").pop())?i.split("#")[0].split("?")[0]:t),document.body.appendChild(o),o.click(),document.body.removeChild(o),void(r&&URL.revokeObjectURL(r))}},e.fileName)}))},l=function(e){var t=e.doc,n=i.useContext(a.LocalizationContext).l10n,r=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,o=n&&n.attachment?n.attachment.noAttachment:"There is no attachment",l=i.useState({files:[],isLoaded:!1}),u=l[0],s=l[1];return i.useEffect(function(){t.getAttachments().then(function(e){s({files:e?Object.keys(e).map(function(t){return{data:e[t].content,fileName:e[t].filename}}):[],isLoaded:!0})})},[t]),u.isLoaded?0===u.files.length?i.createElement("div",{"data-testid":"attachment__empty",className:a.classNames({"rpv-attachment__empty":!0,"rpv-attachment__empty--rtl":r})},o):i.createElement(c,{files:u.files}):i.createElement(a.Spinner,null)},u=function(e){var t=e.store,n=i.useState(t.get("doc")),r=n[0],o=n[1],c=function(e){o(e)};return i.useEffect(function(){return t.subscribe("doc",c),function(){t.unsubscribe("doc",c)}},[]),r?i.createElement(l,{doc:r}):i.createElement("div",{className:"rpv-attachment__loader"},i.createElement(a.Spinner,null))};t.attachmentPlugin=function(){var e=i.useMemo(function(){return a.createStore({})},[]);return{onDocumentLoad:function(t){e.update("doc",t.doc)},Attachments:function(){return i.createElement(u,{store:e})}}}},27504:function(e,t,n){"use strict";e.exports=n(38601)},38200:function(e,t,n){"use strict";var r,o,a,i,c=n(54141),l=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s=function(){return l.createElement(c.Icon,{size:16},l.createElement("path",{d:"M6.427,8.245A.5.5,0,0,1,6.862,7.5H17.138a.5.5,0,0,1,.435.749l-5.139,9a.5.5,0,0,1-.868,0Z"}))},d=function(){return l.createElement(c.Icon,{size:16},l.createElement("path",{d:"M9.248,17.572a.5.5,0,0,1-.748-.434V6.862a.5.5,0,0,1,.748-.434l8.992,5.138a.5.5,0,0,1,0,.868Z"}))},p=function(e){var t=e.bookmark,n=e.depth,r=e.doc,o=e.index,a=e.isBookmarkExpanded,i=e.numberOfSiblings,p=e.pathFromRoot,m=e.renderBookmarkItem,g=e.store,h=p?"".concat(p,".").concat(o):"".concat(o),v=l.useMemo(function(){return function(e){var t=e.count,n=e.items;if(t>=0)return!1;var r=n.length;if(0===r)return!1;for(var o=n.concat([]);o.length>0;){var a=o.shift(),i=a.items;a.count&&i&&a.count>0&&i.length>0&&(r+=i.length,o=o.concat(i))}return Math.abs(t)===r}(t)},[t]),b=g.get("bookmarkExpandedMap"),E=a?a({bookmark:t,doc:r,depth:n,index:o}
1):b.has(h)?b.get(h):!v,w=l.useState(E),S=w[0],_=w[1],k=t.items&&t.items.length>0,C=function(){var e=!S;g.updateCurrentValue("bookmarkExpandedMap",function(t){return t.set(h,e)}),_(e)},y=function(){var e=t.dest,n=g.get("jumpToDestination");c.getDestination(r,e).then(function(e){n&&n(u({label:t.title},e))})},P=function(){k&&t.dest&&y()},M=function(){!k&&t.dest&&y()},x=function(e,t){return l.createElement("div",{className:"rpv-bookmark__item",style:{paddingLeft:"".concat(1.25*n,"rem")},onClick:e},t)},R=function(e,t){return k?l.createElement("span",{className:"rpv-bookmark__toggle","data-testid":"bookmark__toggle-".concat(n,"-").concat(o),onClick:C},S?e:t):l.createElement("span",{className:"rpv-bookmark__toggle"})},T=function(e){return t.url?l.createElement("a",{className:"rpv-bookmark__title",href:t.url,rel:"noopener noreferrer nofollow",target:t.newWindow?"_blank":""},t.title):l.createElement("div",{className:"rpv-bookmark__title","aria-label":t.title,onClick:e},t.title)};return l.createElement("li",{"aria-expanded":S?"true":"false","aria-label":t.title,"aria-level":n+1,"aria-posinset":o+1,"aria-setsize":i,role:"treeitem",tabIndex:-1},m?m({bookmark:t,depth:n,hasSubItems:k,index:o,isExpanded:S,path:h,defaultRenderItem:x,defaultRenderTitle:T,defaultRenderToggle:R,onClickItem:M,onClickTitle:P,onToggleSubItems:C}):x(M,l.createElement(l.Fragment,null,R(l.createElement(s,null),l.createElement(d,null)),T(P))),k&&S&&l.createElement(f,{bookmarks:t.items,depth:n+1,doc:r,isBookmarkExpanded:a,isRoot:!1,pathFromRoot:h,renderBookmarkItem:m,store:g}))},f=function(e){var t=e.bookmarks,n=e.depth,r=void 0===n?0:n,o=e.doc,a=e.isBookmarkExpanded,i=e.isRoot,c=e.pathFromRoot,u=e.renderBookmarkItem,s=e.store;return l.createElement("ul",{className:"rpv-bookmark__list",role:i?"tree":"group",tabIndex:-1},t.map(function(e,n){return l.createElement(p,{bookmark:e,depth:r,doc:o,index:n,isBookmarkExpanded:a,key:n,numberOfSiblings:t.length,pathFromRoot:c,renderBookmarkItem:u,store:s})}))};(i=a||(a={}))[i.Collapse=0]="Collapse",i[i.Expand=1]="Expand";var m=function(e){var t=e.bookmarks,n=e.doc,r=e.isBookmarkExpanded,o=e.renderBookmarkItem,i=e.store,c=l.useRef(),u=function(e){var t=c.current;if(t&&e.target instanceof HTMLElement&&t.contains(e.target))switch(e.key){case"ArrowDown":e.preventDefault(),d(function(e,t){return e.indexOf(t)+1});break;case"ArrowLeft":e.preventDefault(),p(a.Collapse);break;case"ArrowRight":e.preventDefault(),p(a.Expand);break;case"ArrowUp":e.preventDefault,d(function(e,t){return e.indexOf(t)-1});break;case"End":e.preventDefault(),d(function(e,t){return e.length-1});break;case" ":case"Enter":case"Space":e.preventDefault(),s();break;case"Home":e.preventDefault(),d(function(e,t){return 0})}},s=function(){var e=document.activeElement.closest(".rpv-bookmark__item").querySelector(".rpv-bookmark__title");e&&e.click()},d=function(e){var t=c.current,n=[].slice.call(t.getElementsByClassName("rpv-bookmark__item"));if(0!==n.length){var r=document.activeElement,o=n[Math.min(n.length-1,Math.max(0,e(n,r)))];r.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()}},p=function(e){var t=c.current;if(0!==[].slice.call(t.getElementsByClassName("rpv-bookmark__item")).length){var n=document.activeElement.closest(".rpv-bookmark__item"),r=e===a.Collapse?"true":"false";if(n&&n.parentElement.getAttribute("aria-expanded")===r){var o=n.querySelector(".rpv-bookmark__toggle");o&&o.click()}}};return l.useEffect(function(){return document.addEventListener("keydown",u),function(){document.removeEventListener("keydown",u)}},[]),l.useEffect(function(){var e=c.current;if(e){var t=[].slice.call(e.getElementsByClassName("rpv-bookmark__item"));t.length>0&&(t[0].focus(),t[0].setAttribute("tabindex","0"))}},[]),l.createElement("div",{ref:c},l.createElement(f,{bookmarks:t,depth:0,doc:n,isBookmarkExpanded:r,isRoot:!0,pathFromRoot:"",renderBookmarkItem:o,store:i}))},g=function(e){var t=e.doc,n=e.isBookmarkExpanded,r=e.renderBookmarkItem,o=e.store,a=l.useContext(c.LocalizationContext).l10n,i=l.useContext(c.ThemeContext).direction===c.TextDirection.RightToLeft,u=l.useState({isLoaded:!1,items:[]}),s=u[0],d=u[1];return l.useEffect(function(){d({isLoaded:!1,items:[]}),t.getOutline().then(function(e){d({isLoaded:!0,items:e||[]})})},[t]),s.isLoaded?0===s.items.length?l.createElement("div",{"data-testid":"bookmark__empty",className:c.classNames({"rpv-bookmark__empty":!0,"rpv-bookmark__empty--rtl":i})},a&&a.bookmark?a.bookmark.noBookmark:"There is no bookmark"):l.createElement("div",{"data-testid":"bookmark__container",className:c.classNames({"rpv-bookmark__container":!0,"rpv-bookmark__container--rtl":i})},l.createElement(m,{bookmarks:s.items,doc:t,isBookmarkExpanded:n,renderBookmarkItem:r,store:o})):l.createElement("div",{className:"rpv-bookmark__loader"},l.createElement(c.Spinner,null))},h=function(e){var t=e.isBookmarkExpanded,n=e.renderBookmarkItem,r=e.store,o=l.useState(r.get("doc")),a=o[0],i=o[1],u=function(e){i(e)};return l.useEffect(function(){return r.subscribe("doc",u),function(){r.unsubscribe("doc",u)}},[]),a?l.createElement(g,{doc:a,isBookmarkExpanded:t,renderBookmarkItem:n,store:r}):l.createElement("div",{className:"rpv-bookmark__loader"},l.createElement(c.Spinner,null))};t.DownArrowIcon=s,t.RightArrowIcon=d,t.bookmarkPlugin=function(){var e=l.useMemo(function(){return c.createStore({bookmarkExpandedMap:new Map})},[]);return{install:function(t){e.update("jumpToDestination",t.jumpToDestination)},onDocumentLoad:function(t){e.update("doc",t.doc)},Bookmarks:function(t){return l.createElement(h,{isBookmarkExpanded:null==t?void 0:t.isBookmarkExpanded,renderBookmarkItem:null==t?void 0:t.renderBookmarkItem,store:e})}}}},42227:function(e,t,n){"use strict";e.exports=n(38200)}
1,89469:function(e,t,n){"use strict";var r=n(67294),o=n(99299);function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var i,c=a(r),l=a(o);t.AnnotationType=void 0,(i=t.AnnotationType||(t.AnnotationType={}))[i.Text=1]="Text",i[i.Link=2]="Link",i[i.FreeText=3]="FreeText",i[i.Line=4]="Line",i[i.Square=5]="Square",i[i.Circle=6]="Circle",i[i.Polygon=7]="Polygon",i[i.Polyline=8]="Polyline",i[i.Highlight=9]="Highlight",i[i.Underline=10]="Underline",i[i.Squiggly=11]="Squiggly",i[i.StrikeOut=12]="StrikeOut",i[i.Stamp=13]="Stamp",i[i.Caret=14]="Caret",i[i.Ink=15]="Ink",i[i.Popup=16]="Popup",i[i.FileAttachment=17]="FileAttachment";var u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var d,p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};t.TextDirection=void 0,(d=t.TextDirection||(t.TextDirection={})).RightToLeft="RTL",d.LeftToRight="LTR";var f,m,g=c.createContext({currentTheme:"light",direction:t.TextDirection.LeftToRight,setCurrentTheme:function(){}}),h=function(e){var t=[];return Object.keys(e).forEach(function(n){n&&e[n]&&t.push(n)}),t.join(" ")},v="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,b=function(e){var t=c.useRef(null),n=e.once,r=e.threshold,o=e.onVisibilityChanged;return v(function(){var e=t.current;if(e){var a=new IntersectionObserver(function(t){t.forEach(function(t){var r=t.isIntersecting;o({isVisible:r,ratio:t.intersectionRatio}),r&&n&&(a.unobserve(e),a.disconnect())})},{threshold:r||0});return a.observe(e),function(){a.unobserve(e),a.disconnect()}}},[]),t},E=function(e){var n=e.children,r=e.ignoreDirection,o=e.size,a=c.useContext(g).direction,i=!(void 0!==r&&r)&&a===t.TextDirection.RightToLeft,l="".concat((void 0===o?24:o)||24,"px");return c.createElement("svg",{"aria-hidden":"true",className:h({"rpv-core__icon":!0,"rpv-core__icon--rtl":i}),focusable:"false",height:l,viewBox:"0 0 24 24",width:l},n)},w=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M23.5,0.499l-16.5,23l-6.5-6.5"}))},S=function(e){var n=e.children,r=e.testId,o=e.onClick,a=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.createElement("button",p({className:h({"rpv-core__primary-button":!0,"rpv-core__primary-button--rtl":a}),type:"button",onClick:o},r?{"data-testid":r}:{}),n)},_=function(e){var t=e.size,n=void 0===t?"4rem":t,r=e.testId,o=c.useState(!1),a=o[0],i=o[1],l=b({onVisibilityChanged:function(e){i(e.isVisible)}});return c.createElement("div",p({},r?{"data-testid":r}:{},{className:h({"rpv-core__spinner":!0,"rpv-core__spinner--animating":a}),ref:l,style:{height:n,width:n}}))},k=function(e){var n=e.ariaLabel,r=e.autoFocus,o=void 0!==r&&r,a=e.placeholder,i=e.testId,l=e.type,u=e.value,s=e.onChange,d=e.onKeyDown,f=c.useContext(g).direction,m=c.useRef(),b={ref:m,"data-testid":"","aria-label":void 0===n?"":n,className:h({"rpv-core__textbox":!0,"rpv-core__textbox--rtl":f===t.TextDirection.RightToLeft}),placeholder:void 0===a?"":a,value:void 0===u?"":u,onChange:function(e){return s(e.target.value)},onKeyDown:void 0===d?function(){}:d};return i&&(b["data-testid"]=i),v(function(){if(o){var e=m.current;if(e){var t=window.scrollX,n=window.scrollY;e.focus(),window.scrollTo(t,n)}}},[]),"text"===(void 0===l?"text":l)?c.createElement("input",p({type:"text"},b)):c.createElement("input",p({type:"password"},b))};(m=f||(f={}))[m.ExitFullScreen=0]="ExitFullScreen",m[m.FullScreenChange=1]="FullScreenChange",m[m.FullScreenElement=2]="FullScreenElement",m[m.FullScreenEnabled=3]="FullScreenEnabled",m[m.RequestFullScreen=4]="RequestFullScreen";var C,y,P={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},M={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},x={ExitFullScreen:"msExitFullscreen",FullScreenChange:"msFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},R="undefined"!=typeof window,T=R&&(f.FullScreenEnabled in document&&P||M.FullScreenEnabled in document&&M||x.FullScreenEnabled in document&&x)||P,L=function(){return R&&T.FullScreenEnabled in document&&!0===document[T.FullScreenEnabled]},I=function(e){return R?e[T.ExitFullScreen]():Promise.resolve({})},O=function(){return R?document[T.FullScreenElement]:null},D=function(e,t){var n=c.useRef(),r=function(){n.current&&clearTimeout(n.current)};return c.useEffect(function(){return function(){return r()}},[]),c.useCallback(function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r(),n.current=setTimeout(function(){e.apply(void 0,o)},t)},[e,t])},F=function(){var e=c.useRef(!1);return c.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},N=function(e){var t=c.useRef(e);return c.useEffect(function(){t.current=e},[e]),t.current};(y=C||(C={})).NotRenderedYet="NotRenderedYet",y.Rendering="Rendering",y.Rendered="Rendered";var z,j=function(e){var t=e.doc,n=t.numPages,r=t.loadingTask.docId,o=c.useMemo(function(){return Array(n).fill(null).map(function(e,t){return{pageIndex:t,render
1Status:C.NotRenderedYet,visibility:-9999}})},[r]),a=c.useRef({currentRenderingPage:-1,startRange:0,endRange:n-1,visibilities:o}),i=function(e,t){a.current.visibilities[e].visibility=t};return{getHighestPriorityPage:function(){var e=a.current.visibilities.slice(a.current.startRange,a.current.endRange+1).filter(function(e){return e.visibility>-9999});if(!e.length)return -1;for(var t=e[0].pageIndex,r=e[e.length-1].pageIndex,o=e.length,i=0;i<o;i++){if(e[i].renderStatus===C.Rendering)return -1;if(e[i].renderStatus===C.NotRenderedYet)return e[i].pageIndex}return r+1<n&&a.current.visibilities[r+1].renderStatus!==C.Rendered?r+1:t-1>=0&&a.current.visibilities[t-1].renderStatus!==C.Rendered?t-1:-1},isInRange:function(e){return e>=a.current.startRange&&e<=a.current.endRange},markNotRendered:function(){for(var e=0;e<n;e++)a.current.visibilities[e].renderStatus=C.NotRenderedYet},markRendered:function(e){a.current.visibilities[e].renderStatus=C.Rendered},markRendering:function(e){-1!==a.current.currentRenderingPage&&a.current.currentRenderingPage!==e&&a.current.visibilities[a.current.currentRenderingPage].renderStatus===C.Rendering&&(a.current.visibilities[a.current.currentRenderingPage].renderStatus=C.NotRenderedYet),a.current.visibilities[e].renderStatus=C.Rendering,a.current.currentRenderingPage=e},setOutOfRange:function(e){i(e,-9999)},setRange:function(e,t){a.current.startRange=e,a.current.endRange=t;for(var r=0;r<n;r++)(r<e||r>t)&&(a.current.visibilities[r].visibility=-9999,a.current.visibilities[r].renderStatus=C.NotRenderedYet)},setVisibility:i}},V={core:{askingPassword:{requirePasswordToOpen:"This document requires a password to open",submit:"Submit"},wrongPassword:{tryAgain:"The password is wrong. Please try again"},pageLabel:"Page {{pageIndex}}"}},B=c.createContext({l10n:V,setL10n:function(){}}),A=0,H=function(){return A++},W=function(e,t,n){var r=function(e){var r=t.current;if(r){var o=e.target;if(o instanceof Element&&o.shadowRoot){var a=e.composedPath();a.length>0&&!r.contains(a[0])&&n()}else r.contains(o)||n()}};c.useEffect(function(){if(e){var t={capture:!0};return document.addEventListener("click",r,t),function(){document.removeEventListener("click",r,t)}}},[])},K=function(e){var t=function(t){"Escape"===t.key&&e()};c.useEffect(function(){return document.addEventListener("keyup",t),function(){document.removeEventListener("keyup",t)}},[])},Z=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.closeOnClickOutside,a=e.closeOnEscape,i=e.onToggle,l=c.useRef(),u=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.useEffect(function(){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}},[]),K(function(){l.current&&a&&i()}),W(o,l,i),v(function(){var e=l.current;if(e){var t=.75*document.body.clientHeight;e.getBoundingClientRect().height>=t&&(e.style.overflow="auto",e.style.maxHeight="".concat(t,"px"))}},[]),c.createElement("div",{"aria-modal":"true",className:h({"rpv-core__modal-body":!0,"rpv-core__modal-body--rtl":u}),id:"rpv-core__modal-body-".concat(n),ref:l,role:"dialog",tabIndex:-1},r)},U=function(e){var t=e.children;return c.createElement("div",{className:"rpv-core__modal-overlay"},t)};t.ToggleStatus=void 0,(z=t.ToggleStatus||(t.ToggleStatus={})).Close="Close",z.Open="Open",z.Toggle="Toggle";var q,G=function(e){var n=c.useState(e),r=n[0],o=n[1];return{opened:r,toggle:function(e){switch(e){case t.ToggleStatus.Close:o(!1);break;case t.ToggleStatus.Open:o(!0);break;case t.ToggleStatus.Toggle:default:o(function(e){return!e})}}}},J=function(e){var t=e.content,n=e.isOpened,r=e.target,o=G(void 0!==n&&n),a=o.opened,i=o.toggle;return c.createElement(c.Fragment,null,r&&r(i,a),a&&t(i))};t.Position=void 0,(q=t.Position||(t.Position={})).TopLeft="TOP_LEFT",q.TopCenter="TOP_CENTER",q.TopRight="TOP_RIGHT",q.RightTop="RIGHT_TOP",q.RightCenter="RIGHT_CENTER",q.RightBottom="RIGHT_BOTTOM",q.BottomLeft="BOTTOM_LEFT",q.BottomCenter="BOTTOM_CENTER",q.BottomRight="BOTTOM_RIGHT",q.LeftTop="LEFT_TOP",q.LeftCenter="LEFT_CENTER",q.LeftBottom="LEFT_BOTTOM";var Y,X,$,Q,ee,et,en,er,eo=function(e,n,r,o,a){v(function(){var i=n.current,c=e.current,l=r.current;if(c&&i&&l){var u=l.getBoundingClientRect(),s=function(e,n,r,o){var a=n.getBoundingClientRect(),i=e.getBoundingClientRect(),c=i.height,l=i.width,u=0,s=0;switch(r){case t.Position.TopLeft:u=a.top-c,s=a.left;break;case t.Position.TopCenter:u=a.top-c,s=a.left+a.width/2-l/2;break;case t.Position.TopRight:u=a.top-c,s=a.left+a.width-l;break;case t.Position.RightTop:u=a.top,s=a.left+a.width;break;case t.Position.RightCenter:u=a.top+a.height/2-c/2,s=a.left+a.width;break;case t.Position.RightBottom:u=a.top+a.height-c,s=a.left+a.width;break;case t.Position.BottomLeft:u=a.top+a.height,s=a.left;break;case t.Position.BottomCenter:u=a.top+a.height,s=a.left+a.width/2-l/2;break;case t.Position.BottomRight:u=a.top+a.height,s=a.left+a.width-l;break;case t.Position.LeftTop:u=a.top,s=a.left-l;break;case t.Position.LeftCenter:u=a.top+a.height/2-c/2,s=a.left-l;break;case t.Position.LeftBottom:u=a.top+a.height-c,s=a.left-l}return{left:s+(o.left||0),top:u+(o.top||0)}}(c,i,o,a),d=s.top,p=s.left;c.style.top="".concat(d-u.top,"px"),c.style.left="".concat(p-u.left,"px")}},[])},ea=function(e){var n,r=e.customClassName,o=e.position;return c.createElement("div",{className:h(((n={"rpv-core__arrow":!0,"rpv-core__arrow--tl":o===t.Position.TopLeft,"rpv-core__arrow--tc":o===t.Position.TopCenter,"rpv-core__arrow--tr":o===t.Position.TopRight,"rpv-core__arrow--rt":o===t.Position.RightTop,"rpv-core__arrow--rc":o===t.Position.RightCenter,"rpv-core__arrow--rb":o===t.Position.RightBottom,"rpv-core__arrow--bl":o===t.Position.BottomLeft,"rpv-core__arrow--bc":o===t.Position.BottomCenter,"rpv-core__arrow--br":o===t.Position.BottomRight,"rpv-core__arrow--lt":o===t.Position.LeftTop,"rpv-core__arrow--lc":o===t.Position.LeftCenter,"rpv-core__arrow--lb":o===t.Position.LeftBottom})["".concat(r)]=""!==r,n))})}
1,ei=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.closeOnClickOutside,a=e.offset,i=e.position,l=e.targetRef,u=e.onClose,s=c.useRef(),d=c.useRef(),p=c.useRef(),f=c.useContext(g).direction===t.TextDirection.RightToLeft;W(o,s,u),eo(s,l,p,i,a),v(function(){var e=d.current;if(e){var t=.75*document.body.clientHeight;e.getBoundingClientRect().height>=t&&(e.style.overflow="auto",e.style.maxHeight="".concat(t,"px"))}},[]);var m="rpv-core__popover-body-inner-".concat(n);return c.createElement(c.Fragment,null,c.createElement("div",{ref:p,style:{left:0,position:"absolute",top:0}}),c.createElement("div",{"aria-describedby":m,className:h({"rpv-core__popover-body":!0,"rpv-core__popover-body--rtl":f}),id:"rpv-core__popover-body-".concat(n),ref:s,role:"dialog",tabIndex:-1},c.createElement(ea,{customClassName:"rpv-core__popover-body-arrow",position:i}),c.createElement("div",{id:m,ref:d},r)))},ec=function(e){var t=e.closeOnEscape,n=e.onClose,r=c.useRef();return K(function(){r.current&&t&&n()}),c.createElement("div",{className:"rpv-core__popover-overlay",ref:r})},el=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.contentRef,a=e.offset,i=e.position,l=e.targetRef,u=c.useRef(),s=c.useContext(g).direction===t.TextDirection.RightToLeft;return eo(o,l,u,i,a),c.createElement(c.Fragment,null,c.createElement("div",{ref:u,style:{left:0,position:"absolute",top:0}}),c.createElement("div",{className:h({"rpv-core__tooltip-body":!0,"rpv-core__tooltip-body--rtl":s}),id:"rpv-core__tooltip-body-".concat(n),ref:o,role:"tooltip"},c.createElement(ea,{customClassName:"rpv-core__tooltip-body-arrow",position:i}),c.createElement("div",{className:"rpv-core__tooltip-body-content"},r)))};t.FullScreenMode=void 0,(Y=t.FullScreenMode||(t.FullScreenMode={})).Normal="Normal",Y.Entering="Entering",Y.Entered="Entered",Y.EnteredCompletely="EnteredCompletely",Y.Exitting="Exitting",Y.Exited="Exited",t.LayerRenderStatus=void 0,(X=t.LayerRenderStatus||(t.LayerRenderStatus={}))[X.PreRender=0]="PreRender",X[X.DidRender=1]="DidRender",t.PageMode=void 0,($=t.PageMode||(t.PageMode={})).Attachments="UseAttachments",$.Bookmarks="UseOutlines",$.ContentGroup="UseOC",$.Default="UserNone",$.FullScreen="FullScreen",$.Thumbnails="UseThumbs",t.PasswordStatus=void 0,(Q=t.PasswordStatus||(t.PasswordStatus={})).RequiredPassword="RequiredPassword",Q.WrongPassword="WrongPassword",t.RotateDirection=void 0,(ee=t.RotateDirection||(t.RotateDirection={})).Backward="Backward",ee.Forward="Forward",t.ScrollMode=void 0,(et=t.ScrollMode||(t.ScrollMode={})).Page="Page",et.Horizontal="Horizontal",et.Vertical="Vertical",et.Wrapped="Wrapped",t.SpecialZoomLevel=void 0,(en=t.SpecialZoomLevel||(t.SpecialZoomLevel={})).ActualSize="ActualSize",en.PageFit="PageFit",en.PageWidth="PageWidth",t.ViewMode=void 0,(er=t.ViewMode||(t.ViewMode={})).DualPage="DualPage",er.DualPageWithCover="DualPageWithCover",er.SinglePage="SinglePage";var eu,es,ed=function(e,t){return e.reduce(function(e,n,r){return r%t?e[e.length-1].push(n):e.push([n]),e},[])},ep=function(e,n){switch(n[1].name){case"XYZ":return{bottomOffset:function(e,t){return null===n[3]?t:n[3]},leftOffset:function(e,t){return null===n[2]?0:n[2]},pageIndex:e,scaleTo:n[4]};case"Fit":case"FitB":return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:t.SpecialZoomLevel.PageFit};case"FitH":case"FitBH":return{bottomOffset:n[2],leftOffset:0,pageIndex:e,scaleTo:t.SpecialZoomLevel.PageWidth};default:return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:1}}},ef=new Map,em=new Map,eg=function(e,t){return"".concat(e.loadingTask.docId,"___").concat(t.num,"R").concat(0===t.gen?"":t.gen)},eh=function(e,t,n){ef.set(eg(e,t),n)},ev=function(e,t){if(!e)return Promise.reject("The document is not loaded yet");var n="".concat(e.loadingTask.docId,"___").concat(t),r=em.get(n);return r?Promise.resolve(r):new Promise(function(r,o){e.getPage(t+1).then(function(o){em.set(n,o),o.ref&&eh(e,o.ref,t),r(o)})})},eb=function(e,t){return new Promise(function(n){new Promise(function(n){"string"==typeof t?e.getDestination(t).then(function(e){n(e)}):n(t)}).then(function(r){if("object"==typeof r[0]&&null!==r[0]){var o,a,i,c=r[0],l=(i=eg(e,c),ef.has(i)?ef.get(i):null);null===l?e.getPageIndex(c).then(function(r){eh(e,c,r),eb(e,t).then(function(e){return n(e)})}):n(ep(l,r))}else{var u=ep(r[0],r);n(u)}})})};(es=eu||(eu={}))[es.Solid=1]="Solid",es[es.Dashed=2]="Dashed",es[es.Beveled=3]="Beveled",es[es.Inset=4]="Inset",es[es.Underline=5]="Underline";var eE,ew,eS=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),e_=function(e,t,n,r){var o=parseInt(e,10);return o>=t&&o<=n?o:r},ek=function(e){return e.contentsObj?e.contentsObj.str:e.contents||""},eC=function(e){return e.titleObj?e.titleObj.str:e.title||""},ey=function(e){var n=e.annotation,r=c.useContext(g).direction,o=eC(n),a=ek(n),i=r===t.TextDirection.RightToLeft,l=c.useRef(),u="";if(n.modificationDate){var s=function(e){var t=eS.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=e_(t[2],1,12,1)-1,o=e_(t[3],1,31,1),a=e_(t[4],0,23,0),i=e_(t[5],0,59,0),c=e_(t[6],0,59,0),l=t[7]||"Z",u=e_(t[8],0,23,0),s=e_(t[9],0,59,0);switch(l){case"-":a+=u,i+=s;break;case"+":a-=u,i-=s}return new Date(Date.UTC(n,r,o,a,i,c))}(n.modificationDate);u=s?"".concat(s.toLocaleDateString(),", ").concat(s.toLocaleTimeString()):""}return c.useLayoutEffect(function(){if(l.current){var e=document.querySelector('[data-annotation-id="'.concat(n.id,'"]'));if(e){var t=e;return t.style.zIndex+=1,function(){t.style.zIndex="".concat(parseInt(t.style.zIndex,10)-1)}}}},[]),c.createElement("div",{ref:l,className:h({"rpv-core__annotation-popup-wrapper":!0,"rpv-core__annotation-popup-wrapper--rtl":i}
1),style:{top:n.annotationType===t.AnnotationType.Popup?"":"100%"}},o&&c.createElement(c.Fragment,null,c.createElement("div",{className:h({"rpv-core__annotation-popup-title":!0,"rpv-core__annotation-popup-title--ltr":!i,"rpv-core__annotation-popup-title--rtl":i})},o),c.createElement("div",{className:"rpv-core__annotation-popup-date"},u)),a&&c.createElement("div",{className:"rpv-core__annotation-popup-content"},a.split("\n").map(function(e,t){return c.createElement(c.Fragment,{key:t},e,c.createElement("br",null))})))};(ew=eE||(eE={})).Click="Click",ew.Hover="Hover";var eP,eM,ex=function(e){var n,r,o,a,i,l,u,s=e.annotation,d=e.children,p=e.ignoreBorder,f=e.hasPopup,m=e.isRenderable,g=e.page,h=e.viewport,v=s.rect,b=(r=(n=G(!1)).opened,o=n.toggle,i=(a=c.useState(eE.Hover))[0],l=a[1],{opened:r,closeOnHover:function(){i===eE.Hover&&o(t.ToggleStatus.Close)},openOnHover:function(){i===eE.Hover&&o(t.ToggleStatus.Open)},toggleOnClick:function(){switch(i){case eE.Click:r&&l(eE.Hover),o(t.ToggleStatus.Toggle);break;case eE.Hover:l(eE.Click),o(t.ToggleStatus.Open)}}}),E=b.closeOnHover,w=b.opened,S=b.openOnHover,_=b.toggleOnClick,k=[Math.min((u=[v[0],g.view[3]+g.view[1]-v[1],v[2],g.view[3]+g.view[1]-v[3]])[0],u[2]),Math.min(u[1],u[3]),Math.max(u[0],u[2]),Math.max(u[1],u[3])],C=v[2]-v[0],y=v[3]-v[1],P={borderColor:"",borderRadius:"",borderStyle:"",borderWidth:""};if(!p&&s.borderStyle.width>0){switch(s.borderStyle.style){case eu.Dashed:P.borderStyle="dashed";break;case eu.Solid:P.borderStyle="solid";break;case eu.Underline:P=Object.assign({borderBottomStyle:"solid"},P);case eu.Beveled:case eu.Inset:}var M=s.borderStyle.width;P.borderWidth="".concat(M,"px"),s.borderStyle.style!==eu.Underline&&(C-=2*M,y-=2*M);var x=s.borderStyle,R=x.horizontalCornerRadius,T=x.verticalCornerRadius;(R>0||T>0)&&(P.borderRadius="".concat(R,"px / ").concat(T,"px")),s.color?P.borderColor="rgb(".concat(0|s.color[0],", ").concat(0|s.color[1],", ").concat(0|s.color[2],")"):P.borderWidth="0"}return c.createElement(c.Fragment,null,m&&d({popup:{opened:w,closeOnHover:E,openOnHover:S,toggleOnClick:_}
1,slot:{attrs:{style:Object.assign({height:"".concat(y,"px"),left:"".concat(k[0],"px"),top:"".concat(k[1],"px"),transform:"matrix(".concat(h.transform.join(","),")"),transformOrigin:"-".concat(k[0],"px -").concat(k[1],"px"),width:"".concat(C,"px")},P)},children:c.createElement(c.Fragment,null,f&&w&&c.createElement(ey,{annotation:s}))}}))},eR=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--caret","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eT=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--circle","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},c.createElement("circle",{cy:d/2,fill:"none",rx:s/2-f/2,ry:d/2-f/2,stroke:"transparent",strokeWidth:f||1})),e.slot.children)})},eL=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=eC(t),a=ek(t),i=!(!1!==t.hasPopup||!o&&!a),l=function(){var e,n,r,o,a,i,c=t.file;c&&(e=c.filename,r="string"==typeof(n=c.content)?"":URL.createObjectURL(new Blob([n],{type:""})),(o=document.createElement("a")).style.display="none",o.href=r||e,o.setAttribute("download",(i=e.split("/").pop())?i.split("#")[0].split("?")[0]:e),document.body.appendChild(o),o.click(),document.body.removeChild(o),r&&URL.revokeObjectURL(r))};return c.createElement(ex,{annotation:t,hasPopup:i,ignoreBorder:!0,isRenderable:!0,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--file-attachment","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onDoubleClick:l,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eI=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--free-text","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eO=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=eC(t),a=ek(t),i=!t.parentType||-1!==["Circle","Ink","Line","Polygon","PolyLine","Square"].indexOf(t.parentType);return v(function(){if(t.parentId){var e=document.querySelector('[data-annotation-id="'.concat(t.parentId,'"]')),n=document.querySelector('[data-annotation-id="'.concat(t.id,'"]'));if(e&&n){var r=parseFloat(e.style.left),o=parseFloat(e.style.top)+parseFloat(e.style.height);n.style.left="".concat(r,"px"),n.style.top="".concat(o,"px"),n.style.transformOrigin="-".concat(r,"px -").concat(o,"px")}}},[]),c.createElement(ex,{annotation:t,hasPopup:i,ignoreBorder:!1,isRenderable:!(!o&&!a),page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--popup","data-annotation-id":t.id}),c.createElement(ey,{annotation:t}))})},eD=function(e){var n=e.annotation,r=e.childAnnotation,o=e.page,a=e.viewport,i=!1===n.hasPopup,l=eC(n),u=ek(n),s=!!(n.hasPopup||l||u);if(n.quadPoints&&n.quadPoints.length>0){var d=n.quadPoints.map(function(e){return Object.assign({},n,{rect:[e[2].x,e[2].y,e[1].x,e[1].y],quadPoints:[]})});return c.createElement(c.Fragment,null,d.map(function(e,t){return c.createElement(eD,{key:t,annotation:e,childAnnotation:r,page:o,viewport:
1a})}))}return c.createElement(ex,{annotation:n,hasPopup:i,ignoreBorder:!0,isRenderable:s,page:o,viewport:a},function(e){return c.createElement(c.Fragment,null,c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--highlight","data-annotation-id":n.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children),r&&r.annotationType===t.AnnotationType.Popup&&e.popup.opened&&c.createElement(eO,{annotation:r,page:o,viewport:a}))})},eF=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--ink","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.inkLists&&t.inkLists.length&&c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},t.inkLists.map(function(e,t){return c.createElement("polyline",{key:t,fill:"none",stroke:"transparent",strokeWidth:f||1,points:e.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})})),e.slot.children)})},eN=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--line","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},c.createElement("line",{stroke:"transparent",strokeWidth:f||1,x1:u[2]-t.lineCoordinates[0],x2:u[2]-t.lineCoordinates[2],y1:u[3]-t.lineCoordinates[1],y2:u[3]-t.lineCoordinates[3]})),e.slot.children)})},ez=/^([^\w]*)(javascript|data|vbscript)/im,ej=/&#(\w+)(^\w|;)?/g,eV=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,eB=/^([^:]+):/gm,eA=function(e,t){void 0===t&&(t="about:blank");var n=(e||"").replace(ej,function(e,t){return String.fromCharCode(t)}).replace(eV,"").trim();if(!n)return t;var r=n[0];if("."===r||"/"===r)return n;var o=n.match(eB);if(!o)return n;var a=o[0];return ez.test(a)?t:n},eH=function(e){var t,n=e.annotation,r=e.annotationContainerRef,o=e.doc,a=e.outlines,i=e.page,l=e.pageIndex,u=e.scale,s=e.viewport,d=e.onExecuteNamedAction,f=e.onJumpFromLinkAnnotation,m=e.onJumpToDest,g=c.useRef(),h=a&&a.length&&n.dest&&"string"==typeof n.dest?null===(t=a.find(function(e){return e.dest===n.dest}))||void 0===t?void 0:t.title:"",v=!!(n.url||n.dest||n.action||n.unsafeUrl),b={};if(n.url||n.unsafeUrl){var E=eA(n.url||n.unsafeUrl,"");E?b={"data-target":"external",href:E,rel:"noopener noreferrer nofollow",target:n.newWindow?"_blank":"",title:E}:v=!1}else b={href:"","data-annotation-link":n.id,onClick:function(e){e.preventDefault(),n.action?d(n.action):eb(o,n.dest).then(function(e){var t=g.current,n=r.current;if(t&&n){var o=t.getBoundingClientRect();n.style.setProperty("height","100%"),n.style.setProperty("width","100%");var a=n.getBoundingClientRect();n.style.removeProperty("height"),n.style.removeProperty("width");var i=(o.left-a.left)/u;f({bottomOffset:(a.bottom-o.bottom+o.height)/u,label:h,leftOffset:i,pageIndex:l})}m(e)})}};return h&&(b=Object.assign({},b,{title:h,"aria-label":h})),c.createElement(ex,{annotation:n,hasPopup:!1,ignoreBorder:!1,isRenderable:v,page:i,viewport:s},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--link","data-annotation-id":n.id,"data-testid":"core__annotation--link-".concat(n.id)}),c.createElement("a",p({ref:g},b)))})},eW=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polygon","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},c.createElement("polygon",{fill:"none",stroke:"transparent",strokeWidth:f||1,points:t.vertices.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})),e.slot.children)})},eK=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polyline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},c.createElement("polyline",{fill:"none",stroke:"transparent",strokeWidth:f||1,points:t.vertices.map(function(e){return"".concat(e.x-u[0],",").concat(u[3]-e.y)}).join(" ")})),e.slot.children)})},eZ=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--square","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),c.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},c.createElement("rect",{height:d-f,fill:"none",stroke:"transparent",strokeWidth:f||1,x:f/2,y:f/2,width:s-f})),e.slot.children)})},eU=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--squiggly","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eq=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--stamp","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eG=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--strike-out","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},eJ=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M.5,16.5a1,1,0,0,0,1,1h2v4l4-4h15a1,1,0,0,0,1-1V3.5a1,1,0,0,0-1-1H1.5a1,1,0,0,0-1,1Z"}),c.createElement("path",{d:"M7.25,9.75A.25.25,0,1,1,7,10a.25.25,0,0,1,.25-.25"}),c.createElement("path",{d:"M12,9.75a.25.25,0,1,1-.25.25A.25.25,0,0,1,12,9.75"}),c.createElement("path",{d:"M16.75,9.75a.25.25,0,1,1-.25.25.25.25,0,0,1,.25-.25"}))},eY=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M0.500 12.001 A11.500 11.500 0 1 0 23.500 12.001 A11.500 11.500 0 1 0 0.500 12.001 Z"}),c.createElement("path",{d:"M6.000 12.001 A6.000 6.000 0 1 0 18.000 12.001 A6.000 6.000 0 1 0 6.000 12.001 Z"}),c.createElement("path",{d:"M21.423 5.406L17.415 9.414"}),c.createElement("path",{d:"M14.587 6.585L18.607 2.565"}),c.createElement("path",{d:"M5.405 21.424L9.413 17.416"}),c.createElement("path",{d:"M6.585 14.588L2.577 18.596"}),c.createElement("path",{d:"M18.602 21.419L14.595 17.412"}),c.createElement("path",{d:"M17.419 14.58L21.428 18.589"}),c.createElement("path",{d:"M2.582 5.399L6.588 9.406"}),c.createElement("path",{d:"M9.421 6.581L5.412 2.572"}))},eX=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M4.000 18.500 A1.500 1.500 0 1 0 7.000 18.500 A1.500 1.500 0 1 0 4.000 18.500 Z"}),c.createElement("path",{d:"M20.5.5l-9.782,9.783a7,7,0,1,0,3,3L17,10h1.5V8.5L19,8h1.5V6.5L21,6h1.5V4.5l1-1V.5Z"}))},e$=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M2.000 2.500 L22.000 2.500 L22.000 23.500 L2.000 23.500 Z"}),c.createElement("path",{d:"M6 4.5L6 0.5"}),c.createElement("path",{d:"M18 4.5L18 0.5"}),c.createElement("path",{d:"M10 4.5L10 0.5"}),c.createElement("path",{d:"M14 4.5L14 0.5"}))},eQ=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M17.5 0.498L17.5 23.498"}),c.createElement("path",{d:"M10.5 0.498L10.5 23.498"}),c.createElement("path",{d:"M23.5.5H6.5a6,6,0,0,0,0,12h4"}))},e0=function(){return c.createElement(E,{size:16},c.createElement("path",{d:"M2.5 22.995L12 6.005 21.5 22.995 2.5 22.995z"}))},e1=function(e){var n=e.annotation,r=e.childAnnotation,o=e.page,a=e.viewport,i=!1===n.hasPopup,l=eC(n),u=ek(n),s=!!(n.hasPopup||l||u),d=n.name?n.name.toLowerCase():"";return c.createElement(ex,{annotation:n,hasPopup:i,ignoreBorder:!1,isRenderable:s,page:o,viewport:
1a},function(e){return c.createElement(c.Fragment,null,c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--text","data-annotation-id":n.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),d&&c.createElement("div",{className:"rpv-core__annotation-text-icon"},"check"===d&&c.createElement(w,null),"comment"===d&&c.createElement(eJ,null),"help"===d&&c.createElement(eY,null),"insert"===d&&c.createElement(e0,null),"key"===d&&c.createElement(eX,null),"note"===d&&c.createElement(e$,null),("newparagraph"===d||"paragraph"===d)&&c.createElement(eQ,null)),e.slot.children),r&&r.annotationType===t.AnnotationType.Popup&&e.popup.opened&&c.createElement(eO,{annotation:r,page:o,viewport:a}))})},e5=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),l=!!(t.hasPopup||a||i);return c.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},function(e){return c.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--underline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},e2=function(e){var n=e.annotations,r=e.doc,o=e.outlines,a=e.page,i=e.pageIndex,l=e.plugins,u=e.rotation,s=e.scale,d=e.onExecuteNamedAction,p=e.onJumpFromLinkAnnotation,f=e.onJumpToDest,m=c.useRef(),g=a.getViewport({rotation:u,scale:s}).clone({dontFlip:!0}),h=n.filter(function(e){return!e.parentId});return v(function(){var e=m.current;e&&l.forEach(function(t){t.onAnnotationLayerRender&&t.onAnnotationLayerRender({annotations:h,container:e,pageIndex:i,rotation:u,scale:s})})},[]),c.createElement("div",{ref:m,className:"rpv-core__annotation-layer","data-testid":"core__annotation-layer-".concat(i)},h.map(function(e){var l=n.find(function(t){return t.parentId===e.id});switch(e.annotationType){case t.AnnotationType.Caret:return c.createElement(eR,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Circle:return c.createElement(eT,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.FileAttachment:return c.createElement(eL,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.FreeText:return c.createElement(eI,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Highlight:return c.createElement(eD,{key:e.id,annotation:e,childAnnotation:l,page:a,viewport:g});case t.AnnotationType.Ink:return c.createElement(eF,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Line:return c.createElement(eN,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Link:return c.createElement(eH,{key:e.id,annotation:e,annotationContainerRef:m,doc:r,outlines:o,page:a,pageIndex:i,scale:s,viewport:g,onExecuteNamedAction:d,onJumpFromLinkAnnotation:p,onJumpToDest:f});case t.AnnotationType.Polygon:return c.createElement(eW,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Polyline:return c.createElement(eK,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Popup:return c.createElement(eO,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Square:return c.createElement(eZ,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Squiggly:return c.createElement(eU,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Stamp:return c.createElement(eq,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.StrikeOut:return c.createElement(eG,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Text:return c.createElement(e1,{key:e.id,annotation:e,childAnnotation:l,page:a,viewport:g});case t.AnnotationType.Underline:return c.createElement(e5,{key:e.id,annotation:e,page:a,viewport:g});default:return c.createElement(c.Fragment,{key:e.id})}}))},e4=function(e){var t=e.page,n=e.renderAnnotations,r=F(),o=c.useState({loading:!0,annotations:[]}),a=o[0],i=o[1];return c.useEffect(function(){t.getAnnotations({intent:"display"}).then(function(e){r.current&&i({loading:!1,annotations:e})})},[]),a.loading?c.createElement(c.Fragment,null):n(a.annotations)},e9=function(e){var t=e.doc,n=e.outlines,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,l=e.scale,u=e.onExecuteNamedAction,s=e.onJumpFromLinkAnnotation,d=e.onJumpToDest;return c.createElement(e4,{page:r,renderAnnotations:function(e){return c.createElement(e2,{annotations:e,doc:t,outlines:n,page:r,pageIndex:o,plugins:a,rotation:i,scale:l,onExecuteNamedAction:u,onJumpFromLinkAnnotation:s,onJumpToDest:d})}})},e3=function(e,t){var n=e%t;return 0===n?e:Math.floor(e-n)},e8=function(e){var n=e.canvasLayerRef,r=e.height,o=e.page,a=e.pageIndex,i=e.plugins,l=e.rotation,u=e.scale,s=e.width,d=e.onRenderCanvasCompleted,p=c.useRef();return v(function(){var e=p.current;e&&e.cancel();var r=n.current;
1r.removeAttribute("data-testid"),i.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:r,pageIndex:a,rotation:l,scale:u,status:t.LayerRenderStatus.PreRender})});var c=o.getViewport({rotation:l,scale:u}),s=window.devicePixelRatio||1,f=Math.sqrt(16777216/(c.width*c.height)),m=s>f;m?r.style.transform="scale(1, 1)":r.style.removeProperty("transform");var g=Math.min(f,s),h=function(e,t){if(Math.floor(e)===e)return[e,1];var n,r,o=1/e;if(o>t)return[1,t];if(Math.floor(o)===o)return[1,o];for(var a=e>1?o:e,i=0,c=1,l=1,u=1;;){var s=i+l,d=c+u;if(d>t)break;a<=s/d?(l=(n=[s,d])[0],u=n[1]):(i=(r=[s,d])[0],c=r[1])}return a<(i/c+l/u)/2?a===e?[i,c]:[c,i]:a===e?[l,u]:[u,l]}(g,8),v=h[0],b=h[1];r.width=e3(c.width*g,v),r.height=e3(c.height*g,v),r.style.width="".concat(e3(c.width,b),"px"),r.style.height="".concat(e3(c.height,b),"px"),r.hidden=!0;var E=r.getContext("2d",{alpha:!1});return p.current=o.render({canvasContext:E,transform:m||1!==s?[g,0,0,g,0,0]:null,viewport:c}),p.current.promise.then(function(){r.hidden=!1,r.setAttribute("data-testid","core__canvas-layer-".concat(a)),i.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:r,pageIndex:a,rotation:l,scale:u,status:t.LayerRenderStatus.DidRender})}),d()},function(){d()}),function(){r&&(r.width=0,r.height=0)}},[]),c.createElement("div",{className:"rpv-core__canvas-layer",style:{height:"".concat(r,"px"),width:"".concat(s,"px")}},c.createElement("canvas",{ref:n}))},e7=function(e){var t=e.height,n=e.page,r=e.rotation,o=e.scale,a=e.width,i=c.useRef();return v(function(){var e=i.current,c=n.getViewport({rotation:r,scale:o});n.getOperatorList().then(function(r){var o;(o=i.current)&&(o.innerHTML=""),new l.SVGGraphics(n.commonObjs,n.objs).getSVG(r,c).then(function(n){n.style.height="".concat(t,"px"),n.style.width="".concat(a,"px"),e.appendChild(n)})})},[]),c.createElement("div",{className:"rpv-core__svg-layer",ref:i})},e6=function(e){var n=e.containerRef,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,u=e.scale,s=e.onRenderTextCompleted,d=c.useRef(),p=function(){var e=n.current;e&&([].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).forEach(function(t){return e.removeChild(t)}),[].slice.call(e.querySelectorAll('br[role="presentation"]')).forEach(function(t){return e.removeChild(t)}))};return v(function(){var e=d.current;e&&e.cancel();var c=n.current;if(c){c.removeAttribute("data-testid");var f=r.getViewport({rotation:i,scale:u});return a.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:c,pageIndex:o,scale:u,status:t.LayerRenderStatus.PreRender})}),r.getTextContent().then(function(e){p(),d.current=l.renderTextLayer({container:c,textContent:e,textContentSource:e,viewport:f}),d.current.promise.then(function(){c.setAttribute("data-testid","core__text-layer-".concat(o)),[].slice.call(c.children).forEach(function(e){e.classList.contains("rpv-core__text-layer-text--not")||e.classList.add("rpv-core__text-layer-text")}),a.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:c,pageIndex:o,scale:u,status:t.LayerRenderStatus.DidRender})}),s()},function(){c.removeAttribute("data-testid"),s()})}),function(){var e;p(),null===(e=d.current)||void 0===e||e.cancel()}}},[]),c.createElement("div",{className:"rpv-core__text-layer",ref:n})},te=function(e){var n=e.doc,r=e.measureRef,o=e.outlines,a=e.pageIndex,i=e.pageRotation,l=e.pageSize,u=e.plugins,s=e.renderPage,d=e.renderQueueKey,p=e.rotation,f=e.scale,m=e.shouldRender,g=e.viewMode,v=e.onExecuteNamedAction,b=e.onJumpFromLinkAnnotation,E=e.onJumpToDest,w=e.onRenderCompleted,S=e.onRotatePage,k=F(),C=c.useState(null),y=C[0],P=C[1],M=c.useState(!1),x=M[0],R=M[1],T=c.useState(!1),L=T[0],I=T[1],O=c.useRef(),D=c.useRef(),N=Math.abs(p+i)%180==0,z=l.pageWidth*f,j=l.pageHeight*f,V=N?z:j,B=N?j:z,A=(l.rotation+p+i)%360,H=c.useRef(0);return c.useEffect(function(){P(null),R(!1),I(!1)},[i,p,f]),c.useEffect(function(){m&&k.current&&!y&&ev(n,a).then(function(e){k.current&&(H.current=d,P(e))})},[m,y]),c.useEffect(function(){x&&L&&(d!==H.current?(P(null),R(!1),I(!1)):w(a))},[x,L]),c.createElement("div",{className:h({"rpv-core__page-layer":!0,"rpv-core__page-layer--dual":g===t.ViewMode.DualPage,"rpv-core__page-layer--dual-cover":g===t.ViewMode.DualPageWithCover,"rpv-core__page-layer--single":g===t.ViewMode.SinglePage}
1),"data-testid":"core__page-layer-".concat(a),ref:r,style:{height:"".concat(B,"px"),width:"".concat(V,"px")}},y?c.createElement(c.Fragment,null,(s||function(e){return c.createElement(c.Fragment,null,e.canvasLayer.children,e.textLayer.children,e.annotationLayer.children)})({annotationLayer:{attrs:{},children:c.createElement(e9,{doc:n,outlines:o,page:y,pageIndex:a,plugins:u,rotation:A,scale:f,onExecuteNamedAction:v,onJumpFromLinkAnnotation:b,onJumpToDest:E})},canvasLayer:{attrs:{},children:c.createElement(e8,{canvasLayerRef:O,height:B,page:y,pageIndex:a,plugins:u,rotation:A,scale:f,width:V,onRenderCanvasCompleted:function(){k.current&&R(!0)}})},canvasLayerRendered:x,doc:n,height:B,pageIndex:a,rotation:A,scale:f,svgLayer:{attrs:{},children:c.createElement(e7,{height:B,page:y,rotation:A,scale:f,width:V})},textLayer:{attrs:{},children:c.createElement(e6,{containerRef:D,page:y,pageIndex:a,plugins:u,rotation:A,scale:f,onRenderTextCompleted:function(){k.current&&I(!0)}})},textLayerRendered:L,width:V,markRendered:w,onRotatePage:function(e){return S(a,e)}}),u.map(function(e,t){return e.renderPageLayer?c.createElement(c.Fragment,{key:t},e.renderPageLayer({canvasLayerRef:O,canvasLayerRendered:x,doc:n,height:B,pageIndex:a,rotation:A,scale:f,textLayerRef:D,textLayerRendered:L,width:V})):c.createElement(c.Fragment,{key:t})})):c.createElement(_,{testId:"core__page-layer-loading-".concat(a)}))},tt=function(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e};(eM=eP||(eP={})).Horizontal="Horizontal",eM.Vertical="Vertical",eM.Both="Both";var tn=function(e){return 1-Math.pow(1-e,4)},tr={left:0,top:0},to={capture:!1,passive:!0},ta=function(e){var t=e.elementRef,n=e.enableSmoothScroll,r=e.isRtl,o=e.scrollDirection,a=e.onSmoothScroll,i=c.useState(tr),l=i[0],u=i[1],s=c.useState(t.current),d=s[0],p=s[1],f=r?-1:1,m=c.useRef(o);m.current=o;var g=c.useRef(tr),h=c.useRef(!0),b=c.useCallback(function(){h.current=!0,n&&u(g.current),a(!1)},[]),E=c.useCallback(function(){if(d){switch(m.current){case eP.Horizontal:g.current={left:f*d.scrollLeft,top:0};break;case eP.Both:g.current={left:f*d.scrollLeft,top:d.scrollTop};break;case eP.Vertical:default:g.current={left:0,top:d.scrollTop}}n&&!h.current||u(g.current)}},[d]);v(function(){p(t.current)}),v(function(){if(d)return d.addEventListener("scroll",E,to),function(){d.removeEventListener("scroll",E,to)}},[d]);var w=c.useCallback(function(e,n){var r=t.current;if(!r)return Promise.resolve();var o={left:0,top:0};switch(m.current){case eP.Horizontal:o.left=f*e.left;break;case eP.Both:o.left=f*e.left,o.top=e.top;break;case eP.Vertical:default:o.top=e.top}return n?(h.current=!1,a(!0),new Promise(function(e,t){!function(e,t,n,r,o,a){void 0===o&&(o=function(e){return e}),void 0===a&&(a=function(){});var i=0,c=0,l=!1;switch(t){case eP.Horizontal:c=e.scrollLeft,i=0;case eP.Both:c=e.scrollLeft,i=e.scrollTop;break;case eP.Vertical:default:c=0,i=e.scrollTop}var u=function(){l||(l=!0,e.scrollLeft=n.left,e.scrollTop=n.top,a())};if(1e-4>=Math.abs(i-n.top)&&t===eP.Vertical)u();else if(1e-4>=Math.abs(c-n.left)&&t===eP.Horizontal)u();else{var s,d=-1,p=c-n.left,f=i-n.top,m=function(a){-1===d&&(d=a);var g=a-d,h=o(Math.min(g/r,1)),v={left:c-p*h,top:i-f*h};switch(t){case eP.Horizontal:e.scrollLeft=v.left;break;case eP.Both:e.scrollLeft=v.left,e.scrollTop=v.top;break;case eP.Vertical:default:e.scrollTop=v.top}1e-4>=Math.abs(v.top-n.top)&&1e-4>=Math.abs(v.left-n.left)&&!l&&(window.cancelAnimationFrame(s),u()),g<r?s=window.requestAnimationFrame(m):window.cancelAnimationFrame(s)};s=window.requestAnimationFrame(m)}}(r,m.current,o,400,tn,function(){b(),e()})})):new Promise(function(e,t){switch(m.current){case eP.Horizontal:r.scrollLeft=o.left;break;case eP.Both:r.scrollLeft=o.left,r.scrollTop=o.top;break;case eP.Vertical:default:r.scrollTop=o.top}e()})},[t]);return{scrollOffset:l,scrollTo:w}},ti=function(e,t,n){return Math.max(e,Math.min(n,t))},tc=function(e,n){if(n!==t.ViewMode.DualPageWithCover)return 0;if(!function(e){var t=e.length;if(1===t)return!1;for(var n=1;n<t;n++)if(e[n].height!==e[0].height||e[n].width!==e[0].width)return!0;return!1}(e))return 2*e[0].width;var r=[e[0].width].concat(ed(e.slice(1),2).map(function(e){return 2===e.length?e[0].width+e[1].width:e[0].width}));return Math.max.apply(Math,r)},tl={left:0,top:0},tu={left:0,top:0},ts={left:0,top:0},td={left:0,top:0},tp={height:0,width:0},tf={left:0,top:0},tm="data-virtual-index",tg=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],th=function(e){var n=e.enableSmoothScroll,r=e.isRtl,o=e.numberOfItems,a=e.parentRef,i=e.setRenderRange,l=e.sizes,u=e.scrollMode,s=e.viewM
1ode,d=c.useState(!1),f=d[0],m=d[1],g=c.useCallback(function(e){return m(e)},[]),h=c.useRef(u);h.current=u;var b,E,w,S,_,k,C,y,P,M=c.useRef(s);M.current=s;var x=u===t.ScrollMode.Wrapped||s===t.ViewMode.DualPageWithCover||s===t.ViewMode.DualPage?eP.Both:u===t.ScrollMode.Horizontal?eP.Horizontal:eP.Vertical,R=ta({elementRef:a,enableSmoothScroll:n,isRtl:r,scrollDirection:x,onSmoothScroll:g}),T=R.scrollOffset,L=R.scrollTo,I=(E=(b={elementRef:a}).elementRef,S=(w=c.useState(E.current))[0],_=w[1],k=c.useRef(!1),y=(C=c.useReducer(tt,{height:0,width:0}))[0],P=C[1],v(function(){E.current!==S&&_(E.current)}),v(function(){if(S&&!k.current){k.current=!0;var e,t=S.getBoundingClientRect();P({rect:{height:t.height,width:t.width}})}},[S]),c.useEffect(function(){if(S){var e=new ResizeObserver(function(e,t){e.forEach(function(e){if(e.target===S){var t,n=e.contentRect;P({rect:{height:n.height,width:n.width}})}})});return e.observe(S),function(){e.unobserve(S)}}},[S]),y),O=c.useRef({scrollOffset:tf,measurements:[]});O.current.scrollOffset=T;var D=c.useMemo(function(){return Array(o).fill(-1)},[]),F=c.useState(D),N=F[0],z=F[1],j=c.useMemo(function(){return new IntersectionObserver(function(e){e.forEach(function(e){var t=e.isIntersecting?e.intersectionRatio:-1,n=e.target.getAttribute(tm);if(n){var r=parseInt(n,10);0<=r&&r<o&&z(function(e){return e[r]=t,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0)})}})},{threshold:tg})},[]),V=c.useMemo(function(){return u===t.ScrollMode.Page&&s===t.ViewMode.SinglePage?function(e,t,n){for(var r=[],o=0;o<e;o++){var a={height:Math.max(t.height,n[o].height),width:Math.max(t.width,n[o].width)},i=0===o?td:r[o-1].end,c={left:i.left+a.width,top:i.top+a.height};r[o]={index:o,start:i,size:a,end:c,visibility:-1}}return r}(o,I,l):s===t.ViewMode.DualPageWithCover?function(e,n,r,o){for(var a=[],i=0,c=0,l=ts,u=0;u<e;u++){var s=0===u?{height:o===t.ScrollMode.Page?Math.max(n.height,r[u].height):r[u].height,width:o===t.ScrollMode.Page?Math.max(n.width,r[u].width):r[u].width}:{height:o===t.ScrollMode.Page?Math.max(n.height,r[u].height):r[u].height,width:Math.max(n.width/2,r[u].width)};o===t.ScrollMode.Page?l=0===u?ts:{left:u%2==0?s.width:0,top:Math.floor((u-1)/2)*s.height+a[0].end.top}:0===u?(l=ts,i=r[0].height,c=0):u%2==1?(l={left:0,top:i+=c},c=u===e-1?r[u].height:Math.max(r[u].height,r[u+1].height)):l={left:a[u-1].end.left,top:i};var d={left:l.left+s.width,top:l.top+s.height};a[u]={index:u,start:l,size:s,end:d,visibility:-1}}return a}(o,I,l,u):s===t.ViewMode.DualPage?function(e,n,r,o){for(var a=[],i=0,c=0,l=tu,u=0;u<e;u++){var s={height:o===t.ScrollMode.Page?Math.max(n.height,r[u].height):r[u].height,width:Math.max(n.width/2,r[u].width)};o===t.ScrollMode.Page?l={left:u%2==0?0:s.width,top:Math.floor(u/2)*s.height}:u%2==0?(l={left:0,top:i+=c},c=u===e-1?r[u].height:Math.max(r[u].height,r[u+1].height)):l={left:a[u-1].end.left,top:i};var d={left:l.left+s.width,top:l.top+s.height};a[u]={index:u,start:l,size:s,end:d,visibility:-1}}return a}(o,I,l,u):function(e,n,r,o){for(var a=[],i=0,c={left:0,top:0},l=0,u=tl,s=0;s<e;s++){var d=r[s];if(0===s)i=d.width,c={left:0,top:0},l=d.height;else switch(o){case t.ScrollMode.Wrapped:(i+=d.width)<n.width?(u={left:a[s-1].end.left,top:c.top},l=Math.max(l,d.height)):(i=d.width,c={left:(u={left:c.left,top:c.top+l}).left,top:u.top},l=d.height);break;case t.ScrollMode.Horizontal:case t.ScrollMode.Vertical:default:u=a[s-1].end}var p={left:u.left+d.width,top:u.top+d.height};a[s]={index:s,start:u,size:d,end:p,visibility:-1}}return a}(o,I,l,u)},[u,l,s,I]),B=V[o-1]?{height:V[o-1].end.top,width:V[o-1].end.left}:tp;O.current.measurements=V;var A=c.useMemo(function(){var e=function(e,t,n,r){var o=0;switch(e){case eP.Horizontal:o=r.left;break;case eP.Vertical:default:o=r.top}var a=t.length-1,i=function(e,t,n,r){for(;e<=t;){var o=(e+t)/2|0,a=r(o);if(a<n)e=o+1;else{if(!(a>n))return o;t=o-1}}return e>0?e-1:0}(0,a,o,function(n){switch(e){case eP.Horizontal:return t[n].start.left;case eP.Both:case eP.Vertical:default:return t[n].start.top}});if(e===eP.Both)for(var c=t[i].start.top;i-1>=0&&t[i-1].start.top===c&&t[i-1].start.left>=r.left;)i--;for(var l=i;l<=a;
1){var u={top:t[l].start.top-r.top,left:t[l].start.left-r.left},s={height:n.height-u.top,width:n.width-u.left};if(e===eP.Horizontal&&s.width<0||e===eP.Vertical&&s.height<0||e===eP.Both&&(s.width<0||s.height<0))break;l++}return{start:i,end:l}}(x,V,I,T),n=e.start,r=e.end,a=N.slice(ti(0,o,n),ti(0,o,r)),c=n+a.reduce(function(e,t,n,r){return t>r[e]?n:e},0),l=c=ti(0,o-1,c),u=i({endPage:r,numPages:o,startPage:n}),d=u.startPage,p=u.endPage;switch(d=Math.max(d,0),p=Math.min(p,o-1),s){case t.ViewMode.DualPageWithCover:c>0&&(l=c%2==1?c:c-1),d=0===d?0:d%2==1?d:d-1,o-(p=p%2==1?p-1:p)<=2&&(p=o-1);break;case t.ViewMode.DualPage:l=c%2==0?c:c-1,d=d%2==0?d:d-1,p=p%2==1?p:p-1;break;case t.ViewMode.SinglePage:default:l=c}return{startPage:d,endPage:p,maxVisbilityIndex:l}},[V,I,T,s,N]),H=A.startPage,W=A.endPage,K=A.maxVisbilityIndex,Z=c.useMemo(function(){for(var e=[],t=function(t){var n=p(p({},V[t]),{visibility:void 0!==N[t]?N[t]:-1,measureRef:function(e){e&&(e.setAttribute(tm,"".concat(t)),j.observe(e))}});e.push(n)},n=H;n<=W;n++)t(n);return e},[H,W,N,V]),U=c.useCallback(function(e,r){var a=O.current.measurements[ti(0,o-1,e)],i=h.current===t.ScrollMode.Page?tf:r;return a?L({left:i.left+a.start.left,top:i.top+a.start.top},n):Promise.resolve()},[L,n]),q=c.useCallback(function(e,n){var r=O.current.measurements,o=r[e].start,a=r.find(function(e){return e.start.top-o.top>1e-12});if(!a)return Promise.resolve();var i=a.index;switch(M.current){case t.ViewMode.DualPage:i=i%2==0?i:i+1;break;case t.ViewMode.DualPageWithCover:i=i%2==1?i:i+1}return U(i,n)},[]),G=c.useCallback(function(e,n){for(var r=O.current.measurements,a=r[e].start,i=e,c=!1,l=o-1;l>=0;l--)if(a.top-r[l].start.top>1e-12){c=!0,i=r[l].index;break}if(!c)return Promise.resolve();switch(M.current){case t.ViewMode.DualPage:i=i%2==0?i:i-1;break;case t.ViewMode.DualPageWithCover:i=i%2==0?i-1:i}return i===e&&(i=e-1),U(i,n)},[]),J=c.useCallback(function(e,n){if(M.current===t.ViewMode.DualPageWithCover||M.current===t.ViewMode.DualPage)return q(e,n);switch(h.current){case t.ScrollMode.Wrapped:return q(e,n);case t.ScrollMode.Horizontal:case t.ScrollMode.Vertical:default:return U(e+1,n)}},[]),Y=c.useCallback(function(e,n){if(M.current===t.ViewMode.DualPageWithCover||M.current===t.ViewMode.DualPage)return G(e,n);switch(h.current){case t.ScrollMode.Wrapped:return G(e,n);case t.ScrollMode.Horizontal:case t.ScrollMode.Vertical:default:return U(e-1,n)}},[]),X=c.useCallback(function(){return function(e,n){switch(n){case t.ScrollMode.Horizontal:return{position:"relative",height:"100%",width:"".concat(e.width,"px")};case t.ScrollMode.Vertical:default:return{position:"relative",height:"".concat(e.height,"px"),width:"100%"}}}(B,h.current)},[B]),$=c.useCallback(function(e){var n,r,o;return(o=h.current)!==t.ScrollMode.Page?{}:{height:"".concat(I.height,"px"),width:"100%",position:"absolute",top:0,transform:"translateY(".concat(e.start.top,"px)")}},[I]),Q=c.useCallback(function(e){return function(e,n,r,o,a){var i,c,l,u,s,d,p,f=n?"right":"left",m=r.length,g=e.start.left*(n?-1:1),h=e.size,v=h.height,b=h.width;if(o===t.ViewMode.DualPageWithCover){var E=a===t.ScrollMode.Page?0:e.start.top;return 0===e.index||m%2==0&&e.index===m-1?((i={height:"".concat(v,"px"),minWidth:"".concat(tc(r,o),"px"),width:"100%"})[f]=0,i.position="absolute",i.top=0,i.transform="translate(".concat(g,"px, ").concat(E,"px)"),i):((c={height:"".concat(v,"px"),width:"".concat(b,"px")})[f]=0,c.position="absolute",c.top=0,c.transform="translate(".concat(g,"px, ").concat(E,"px)"),c)}if(o===t.ViewMode.DualPage)return(l={height:"".concat(v,"px"),width:"".concat(b,"px")})[f]=0,l.position="absolute",l.top=0,l.transform="translate(".concat(g,"px, ").concat(a===t.ScrollMode.Page?0:e.start.top,"px)"),l;switch(a){case t.ScrollMode.Horizontal:return(u={height:"100%",width:"".concat(b,"px")})[f]=0,u.position="absolute",u.top=0,u.transform="translateX(".concat(g,"px)"),u;case t.ScrollMode.Page:return(s={height:"".concat(v,"px"),width:"".concat(b,"px")})[f]=0,s.position="absolute",s.top=0,s;case t.ScrollMode.Wrapped:return(d={height:"".concat(v,"px"),width:"".concat(b,"px")})[f]=0,d.position="absolute",d.top=0,d.transform="translate(".concat(g,"px, ").concat(e.start.top,"px)"),d;case t.ScrollMode.Vertical:default:return(p={height:"".concat(v,"px"),width:"100%"})[f]=0,p.position="absolute",p.top=0,p.transform="translateY(".concat(e.start.top,"px)"),p}}(e,r,l,M.current,h.current)},[r,l]),ee=c.useCallback(function(e,n){var r=O.current,a=r.measurements,i=r.scrollOffset,c=a[ti(0,o-1,n)];return c?L(h.current===t.ScrollMode.Page?{left:c.start.left,top:c.start.top}:{left:i.left*e,top:i.top*e},!1):Promise.resolve()},[]);return c.useEffect(function(){return function(){j.disconnect()}},[]),{boundingClientRect:I,isSmoothScrolling:f,startPage:H,endPage:W,maxVisbilityIndex:K,virtualItems:Z,getContainerStyles:X,getItemContainerStyles:$,getItemStyles:Q,scrollToItem:U,scrollToNextItem:J,scrollToPreviousItem:Y,zoom:ee}},tv=function(e,n,r,o,a,i){var c=r;switch(!0){case a===t.ViewMode.DualPageWithCover&&i>=3:case a===t.ViewMode.DualPage&&i>=3:c=2*r;break;default:c=r}switch(o){case t.SpecialZoomLevel.ActualSize:return 1;case t.SpecialZoomLevel.PageFit:return Math.min((e.clientWidth-17)/c,(e.clientHeight-16)/n);case t.SpecialZoomLevel.PageWidth:return(e.clientWidth-17)/c}},tb=function(e){var t,n,r=e.getCurrentPage,o=(n=c.useRef([]),c.useEffect(function(){return function(){n.current=[]}},[]),{push:function(e){var t=n.current;t.length+1>50&&t.shift(),t.push(e),n.current=t},map:function(e){return n.current.map(function(t){return e(t)})},pop:function(){var e=n.current;if(0===e.length)return null;var t=e.pop();return n.current=e,t}}),a=(t=c.useRef([]),c.useEffect(function(){return function(){t.current=[]}},[]),{dequeue:function(){var e=t.current;if(0===e.length)return null;var n=e.shift();return t.current=e,n||null},enqueue:function(e){var n=t.current;n.length+1>50&&n.pop(),t.current=[e].concat(n)},map:function(e){return t.current.map(function(t){return e(t)})}}),i=function(){var e=a.dequeue();return e&&o.push(e),e&&e.pageIndex===r()?i():e},l=function(){var e=o.pop();return e&&a.enqueue(e),e&&e.pageIndex===r()?l():e};return{getNextDestination:i,getPreviousDestination:l,markVisitedDestination:c.useCallback(function(e){o.push(e)},[])}},tE=function(e){var t=[];return e.map(function(e){var n,r;t=t.concat(e).concat((r=[],e.items&&e.items.length>0&&(r=r.concat(tE(e.items))),r))}),t},tw={capture:!1,passive:!0},tS={height:0,width:0},t_={height:0,width:0},tk=function(e){var n,r,o,a,i=e.getCurrentPage,l=e.getCurrentScrollMode,u=e.jumpToPage,s=e.targetRef,d=c.useState(t.FullScreenMode.Normal),p=d[0],f=d[1],m=(r=(n=c.useState(tS))[0],o=n[1],a=D(function(){o({height:window.innerHeight,width:window.innerWidth})}
1,100),v(function(){return window.addEventListener("resize",a,tw),function(){window.removeEventListener("resize",a,tw)}},[]),r),g=c.useState(t_),h=g[0],b=g[1],E=c.useRef(t_),w=c.useRef(i()),S=c.useRef(t_),_=c.useState(s.current),k=_[0],C=_[1],y=c.useRef();v(function(){s.current!==k&&C(s.current)},[]),v(function(){if(k){var e=new ResizeObserver(function(e){e.forEach(function(e){var t,n=e.target.getBoundingClientRect();b({height:n.height,width:n.width})})});return e.observe(k),function(){e.unobserve(k),e.disconnect()}}},[k]);var P=c.useCallback(function(e){var n=O();return n&&n!==e?(f(t.FullScreenMode.Normal),I(n)):Promise.resolve()},[]),M=c.useCallback(function(e){e&&L()&&(C(e),P(e).then(function(){var n;y.current=e,f(t.FullScreenMode.Entering),R&&e[T.RequestFullScreen]()}))},[]),x=c.useCallback(function(){O()&&(f(t.FullScreenMode.Exitting),I(document))},[]),F=c.useCallback(function(){k&&O()!==k&&f(t.FullScreenMode.Exitting)},[k]);return c.useEffect(function(){switch(p){case t.FullScreenMode.Entering:y.current&&(y.current.style.backgroundColor="var(--rpv-core__full-screen-target-background-color)"),w.current=i(),E.current={height:window.innerHeight,width:window.innerWidth};break;case t.FullScreenMode.Entered:l()===t.ScrollMode.Page?u(w.current).then(function(){f(t.FullScreenMode.EnteredCompletely)}):f(t.FullScreenMode.EnteredCompletely);break;case t.FullScreenMode.Exitting:y.current&&(y.current.style.backgroundColor="",y.current=null),w.current=i();break;case t.FullScreenMode.Exited:f(t.FullScreenMode.Normal),l()===t.ScrollMode.Page&&u(w.current)}},[p]),c.useEffect(function(){if(p!==t.FullScreenMode.Normal)return p===t.FullScreenMode.Entering&&m.height===h.height&&m.width===h.width&&m.height>0&&m.width>0&&(0===S.current.height||m.height==S.current.height)?(S.current={height:window.innerHeight,width:window.innerWidth},void f(t.FullScreenMode.Entered)):void(p===t.FullScreenMode.Exitting&&E.current.height===m.height&&E.current.width===m.width&&m.height>0&&m.width>0&&f(t.FullScreenMode.Exited))},[p,m,h]),c.useEffect(function(){return R&&document.addEventListener(T.FullScreenChange,F),function(){var e;R&&document.removeEventListener(T.FullScreenChange,F)}},[k]),{enterFullScreenMode:M,exitFullScreenMode:x,fullScreenMode:p}},tC={buildPageStyles:function(){return{}},transformSize:function(e){return e.size}},ty={left:0,top:0}
1,tP=function(e){var n,r,o,a,i,l=e.currentFile,u=e.defaultScale,s=e.doc,d=e.enableSmoothScroll,f=e.initialPage,m=e.initialRotation,b=e.initialScale,E=e.pageLayout,w=e.pageSizes,S=e.plugins,_=e.renderPage,k=e.scrollMode,C=e.setRenderRange,y=e.viewMode,P=e.viewerState,M=e.onDocumentLoad,x=e.onOpenFile,R=e.onPageChange,T=e.onRotate,L=e.onRotatePage,I=e.onZoom,O=s.numPages,z=s.loadingTask.docId,V=c.useContext(B).l10n,A=c.useContext(g),H=A.direction===t.TextDirection.RightToLeft,W=c.useRef(),K=c.useRef(),Z=c.useState(f),U=Z[0],q=Z[1],G=c.useRef(null),J=tb({getCurrentPage:function(){return ek.current.pageIndex}}),Y=c.useState(m),X=Y[0],$=Y[1],Q=N(X),ee=c.useState(!1),et=ee[0],en=ee[1],er=c.useState(new Map),eo=er[0],ea=er[1],ei=c.useState(k),ec=ei[0],el=ei[1],eu=N(ec),es=c.useState(y),ep=es[0],eg=es[1],eh=N(ep),eb=(r=F(),a=(o=c.useState([]))[0],i=o[1],c.useEffect(function(){s.getOutline().then(function(e){if(r.current&&null!==e){var t=tE(e);i(t)}})},[]),a),eE=c.useState(b),ew=eE[0],eS=eE[1],e_=N(ew),ek=c.useRef(P),eC=c.useRef("string"==typeof u?u:null),ey=c.useRef(-1),eP=c.useRef(-1),eM=c.useRef(f),ex=tk({getCurrentPage:function(){return ek.current.pageIndex},getCurrentScrollMode:function(){return ek.current.scrollMode},jumpToPage:function(e){return e$(e)}
1,targetRef:K}),eR=c.useState(-1),eT=eR[0],eL=eR[1],eI=c.useState(0),eO=eI[0],eD=eI[1],eF=j({doc:s});c.useEffect(function(){return function(){ef.clear(),em.clear()}},[z]);var eN,ez,ej,eV=c.useMemo(function(){return Object.assign({},tC,E)},[]),eB=c.useMemo(function(){return Array(O).fill(0).map(function(e,t){var n=[w[t].pageHeight,w[t].pageWidth],r=Math.abs(X)%180==0?{height:n[0],width:n[1]}:{height:n[1],width:n[0]},o={height:r.height*ew,width:r.width*ew};return eV.transformSize({numPages:O,pageIndex:t,size:o})})},[X,ew]),eA=th({enableSmoothScroll:d,isRtl:H,numberOfItems:O,parentRef:K,scrollMode:ec,setRenderRange:C,sizes:eB,viewMode:ep}),eH=D(function(){!eC.current||ek.current.fullScreenMode!==t.FullScreenMode.Normal||f>0&&eM.current===f||e9(eC.current)},200);ez=(eN={targetRef:K,onResize:eH}).targetRef,ej=eN.onResize,v(function(){var e=new ResizeObserver(function(e){e.forEach(function(e){ej(e.target)})}),t=ez.current;if(t)return e.observe(t),function(){e.unobserve(t)}},[]);var eW=function(e){var t=e;S.forEach(function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))}),ek.current=t},eK=function(){return K.current},eZ=function(){return ek.current},eU=c.useCallback(function(e){J.markVisitedDestination(e)},[]),eq=c.useCallback(function(e){var n=e.pageIndex,r=e.bottomOffset,o=e.leftOffset,a=e.scaleTo,i=K.current,c=ek.current;return i&&c?new Promise(function(e,l){ev(s,n).then(function(l){var u=l.getViewport({scale:1}),s=0,d=("function"==typeof r?r(u.width,u.height):r)||0,p=("function"==typeof o?o(u.width,u.height):o)||0,f=c.scale;switch(a){case t.SpecialZoomLevel.PageFit:s=0,p=0,e9(t.SpecialZoomLevel.PageFit);break;case t.SpecialZoomLevel.PageWidth:f=tv(i,w[n].pageHeight,w[n].pageWidth,t.SpecialZoomLevel.PageWidth,y,O),s=(u.height-d)*f,p*=f,e9(f);break;default:s=(u.height-d)*f,p*=f}switch(c.scrollMode){case t.ScrollMode.Horizontal:eA.scrollToItem(n,{left:p,top:0}).then(function(){e()});break;case t.ScrollMode.Vertical:default:eA.scrollToItem(n,{left:0,top:s}).then(function(){e()})}})}):Promise.resolve()},[]),eG=c.useCallback(function(e){return J.markVisitedDestination(e),eq(e)},[]),eJ=c.useCallback(function(){var e=J.getNextDestination();return e?eq(e):Promise.resolve()},[]),eY=c.useCallback(function(){var e=J.getPreviousDestination();return e?eq(e):Promise.resolve()},[]),eX=c.useCallback(function(){return eA.scrollToNextItem(ek.current.pageIndex,ty)},[]),e$=c.useCallback(function(e){return 0<=e&&e<O?eA.scrollToItem(e,ty):Promise.resolve()},[]),eQ=c.useCallback(function(){return eA.scrollToPreviousItem(ek.current.pageIndex,ty)},[]),e0=c.useCallback(function(e){var t,n;"pdf"===((n=(0,e.name).split(/\./).pop())?n.toLowerCase():"").toLowerCase()&&new Promise(function(t){var n=new FileReader;n.readAsArrayBuffer(e),n.onload=function(){var e=new Uint8Array(n.result);t(e)}}).then(function(t){x(e.name,t)})},[x]),e1=c.useCallback(function(e){var n=e===t.RotateDirection.Backward?-90:90,r=ek.current.rotation,o=360===r||-360===r?n:r+n;eF.markNotRendered(),$(o),eW(p(p({},ek.current),{rotation:o})),T({direction:e,doc:s,rotation:o})},[]),e5=c.useCallback(function(e,n){var r=n===t.RotateDirection.Backward?-90:90,o=ek.current.pagesRotation,a=(o.has(e)?o.get(e):m)+r,i=o.set(e,a);ea(i),en(function(e){return!e}),eW(p(p({},ek.current),{pagesRotation:i,rotatedPage:e})),L({direction:n,doc:s,pageIndex:e,rotation:a}),eF.markRendering(e),eL(e)},[]),e2=c.useCallback(function(e){eW(p(p({},ek.current),{scrollMode:e})),el(e)},[]),e4=c.useCallback(function(e){eW(p(p({},ek.current),{viewMode:e})),eg(e)},[]),e9=c.useCallback(function(e){var t=K.current,n=ek.current.pageIndex;if(!(n<0||n>=O)){var r=w[n].pageHeight,o=w[n].pageWidth,a=t?"string"==typeof e?tv(t,r,o,e,ek.current.viewMode,O):e:1;eC.current="string"==typeof e?e:null,a!==ek.current.scale&&(eD(function(e){return e+1}),eF.markNotRendered(),eS(a),I({doc:s,scale:a}),eW(p(p({},ek.current),{scale:a})))}},[]),e3=c.useCallback(function(e){ex.enterFullScreenMode(e)},[]),e8=c.useCallback(function(){ex.exitFullScreenMode()},[]);c.useEffect(function(){eW(p(p({},ek.current),{fullScreenMode:ex.fullScreenMode}))},[ex.fullScreenMode]),c.useEffect(function(){var e={enterFullScreenMode:e3,exitFullScreenMode:e8,getPagesContainer:eK,getViewerState:eZ,jumpToDestination:eG,jumpToNextDestination:eJ,jumpToPreviousDestination:eY,jumpToNextPage:eX,jumpToPreviousPage:eQ,jumpToPage:e$,openFile:e0,rotate:e1,rotatePage:e5,setViewerState:eW,switchScrollMode:e2,switchViewMode:e4,zoom:e9};
1return S.forEach(function(t){t.install&&t.install(e)}),function(){S.forEach(function(t){t.uninstall&&t.uninstall(e)})}},[z]),c.useEffect(function(){M({doc:s,file:l}),S.forEach(function(e){e.onDocumentLoad&&e.onDocumentLoad({doc:s,file:l})})},[z]);var e7,e6,tt,tn=eA.boundingClientRect;e7=function(){f&&e$(f)},e6=tn.height>0&&tn.width>0,tt=c.useRef(!1),v(function(){e6&&!tt.current&&(tt.current=!0,e7())},[e7,e6]),v(function(){var e=ek.current.pageIndex;e>-1&&eu!==ec&&eA.scrollToItem(e,ty).then(function(){ex.fullScreenMode===t.FullScreenMode.EnteredCompletely&&(d||eF.markNotRendered(),ey.current=-1)})},[ec]),v(function(){var e=ek.current.pageIndex;e>-1&&Q!==X&&eA.scrollToItem(e,ty)},[X]),v(function(){0!=e_&&e_!=ek.current.scale&&eA.zoom(ek.current.scale/e_,ek.current.pageIndex).then(function(){ex.fullScreenMode===t.FullScreenMode.EnteredCompletely&&(eP.current=-1)})},[ew]),v(function(){if(eh!==ek.current.viewMode){var e=eA.startPage,t=eA.endPage,n=eA.virtualItems;eF.markNotRendered(),eF.setRange(e,t);for(var r=function(e){var t=n.find(function(t){return t.index===e});t&&eF.setVisibility(e,t.visibility)},o=e;o<=t;o++)r(o);to()}},[ep]),v(function(){var e=ek.current.pageIndex;e>-1&&eh!==ep&&eA.scrollToItem(e,ty)},[ep]),v(function(){var e=ek.current.pageIndex;e>0&&e===f&&eM.current===f&&eC.current&&(eM.current=-1,e9(eC.current))},[U]),c.useEffect(function(){eA.isSmoothScrolling||null!==G.current&&G.current===U||(G.current=U,R({currentPage:U,doc:s}))},[U,eA.isSmoothScrolling]),c.useEffect(function(){ex.fullScreenMode===t.FullScreenMode.Entering&&ek.current.scrollMode===t.ScrollMode.Page&&(ey.current=ek.current.pageIndex),ex.fullScreenMode===t.FullScreenMode.EnteredCompletely&&ek.current.scrollMode===t.ScrollMode.Page&&d&&(ey.current=-1),ex.fullScreenMode===t.FullScreenMode.EnteredCompletely&&eC.current&&(eP.current=ek.current.pageIndex,e9(eC.current))},[ex.fullScreenMode]),c.useEffect(function(){if(ex.fullScreenMode!==t.FullScreenMode.Entering&&ex.fullScreenMode!==t.FullScreenMode.Exitting&&!eA.isSmoothScrolling){var e=eA.startPage,n=eA.endPage,r=eA.maxVisbilityIndex,o=eA.virtualItems,a=ex.fullScreenMode===t.FullScreenMode.Entered||ex.fullScreenMode===t.FullScreenMode.EnteredCompletely;if(!(a&&r!==ey.current&&ey.current>-1||a&&r!==eP.current&&eP.current>-1)){q(r),eW(p(p({},ek.current),{pageIndex:r})),eF.setRange(e,n);for(var i=function(e){var t=o.find(function(t){return t.index===e});t&&eF.setVisibility(e,t.visibility)},c=e;c<=n;c++)i(c);to()}}},[eA.startPage,eA.endPage,eA.isSmoothScrolling,eA.maxVisbilityIndex,ex.fullScreenMode,et,X,ew]);var tr=c.useCallback(function(e){eF.markRendered(e),to()},[eO]),to=function(){var e=eF.getHighestPriorityPage();e>-1&&eF.isInRange(e)&&(eF.markRendering(e),eL(e))},ta=function(e){var t=U-1,n=U+1;switch(e){case"FirstPage":e$(0);break;case"LastPage":e$(O-1);break;case"NextPage":n<O&&e$(n);break;case"PrevPage":t>=0&&e$(t)}},ti=c.useCallback(function(){var e=eA.virtualItems,n=[];switch(ep){case t.ViewMode.DualPage:n=ed(e,2);break;case t.ViewMode.DualPageWithCover:e.length&&(n=0===e[0].index?[[e[0]]].concat(ed(e.slice(1),2)):ed(e,2));break;case t.ViewMode.SinglePage:default:n=ed(e,1)}var r=V&&V.core?V.core.pageLabel:"Page {{pageIndex}}",o={attrs:{className:"rpv-core__inner-container","data-testid":"core__inner-container",ref:W,style:{height:"100%"}},children:c.createElement(c.Fragment,null),subSlot:{attrs:{"data-testid":"core__inner-pages",className:h({"rpv-core__inner-pages":!0,"rpv-core__inner-pages--horizontal":ec===t.ScrollMode.Horizontal,"rpv-core__inner-pages--rtl":H,"rpv-core__inner-pages--single":ec===t.ScrollMode.Page,"rpv-core__inner-pages--vertical":ec===t.ScrollMode.Vertical,"rpv-core__inner-pages--wrapped":ec===t.ScrollMode.Wrapped}),ref:K,style:{height:"100%",position:"relative"}},children:c.createElement("div",{"data-testid":"core__inner-current-page-".concat(U),style:Object.assign({"--scale-factor":ew},eA.getContainerStyles())},n.map(function(e){return c.createElement("div",{className:h({"rpv-core__inner-page-container":!0,"rpv-core__inner-page-container--single":ec===t.ScrollMode.Page}),style:eA.getItemContainerStyles(e[0]),key:"".concat(e[0].index,"-").concat(ep)},e.map(function(e){var n=ep===t.ViewMode.DualPageWithCover&&(0===e.index||O%2==0&&e.index===O-1);return c.createElement("div",{"aria-label":r.replace("{{pageIndex}}","".concat(e.index+1)),className:h({"rpv-core__inner-page":!0,"rpv-core__inner-page--dual-even":ep===t.ViewMode.DualPage&&e.index%2==0,"rpv-core__inner-page--dual-odd":ep===t.ViewMode.DualPage&&e.index%2==1,"rpv-core__inner-page--dual-cover":n,"rpv-core__inner-page--dual-cover-even":ep===t.ViewMode.DualPageWithCover&&!n&&e.index%2==0,"rpv-core__inner-page--dual-cover-odd":ep===t.ViewMode.DualPageWithCover&&!n&&e.index%2==1,"rpv-core__inner-page--single":ep===t.ViewMode.SinglePage&&ec===t.ScrollMode.Page}),role:"region",key:"".concat(e.index,"-").concat(ep),style:Object.assign({},eA.getItemStyles(e),eV.buildPageStyles({numPages:O,pageIndex:e.index,scrollMode:ec,viewMode:ep}))},c.createElement(te,{doc:s,measureRef:e.measureRef,outlines:eb,pageIndex:e.index,pageRotation:eo.has(e.index)?eo.get(e.index):0,pageSize:w[e.index],plugins:S,renderPage:_,renderQueueKey:eO,rotation:X,scale:ew,shouldRender:eT===e.index,viewMode:ep,onExecuteNamedAction:ta,onJumpFromLinkAnnotation:eU,onJumpToDest:eG,onRenderCompleted:tr,onRotatePage:e5}))}
1))}))}};return S.forEach(function(e){e.renderViewer&&(o=e.renderViewer({containerRef:W,doc:s,pagesContainerRef:K,pagesRotation:eo,pageSizes:w,rotation:X,slot:o,themeContext:A,jumpToPage:e$,openFile:e0,rotate:e1,rotatePage:e5,switchScrollMode:e2,switchViewMode:e4,zoom:e9}))}),o},[S,eA]),tc=c.useCallback(function(e){return c.createElement("div",p({},e.attrs,{style:e.attrs&&e.attrs.style?e.attrs.style:{}}),e.children,e.subSlot&&tc(e.subSlot))},[]);return tc(ti())},tM=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],tx=function(e){var n=e.defaultScale,r=e.doc,o=e.render,a=e.scrollMode,i=e.viewMode,l=c.useRef(),u=c.useState({pageSizes:[],scale:0}),s=u[0],d=u[1];return c.useLayoutEffect(function(){Promise.all(Array(r.numPages).fill(0).map(function(e,t){return new Promise(function(e,n){ev(r,t).then(function(t){var n=t.getViewport({scale:1});e({pageHeight:n.height,pageWidth:n.width,rotation:n.rotation})})})})).then(function(e){var o=l.current;if(o&&0!==e.length){var c=e[0].pageWidth,u=e[0].pageHeight,s=o.parentElement,p=(s.clientWidth-45)/c,f=(s.clientHeight-45)/u,m=p;switch(a){case t.ScrollMode.Horizontal:m=Math.min(p,f);break;case t.ScrollMode.Vertical:default:m=p}var g,h,v=n?"string"==typeof n?tv(s,u,c,n,i,r.numPages):n:(g=m,-1===(h=tM.findIndex(function(e){return e>=g}))||0===h?g:tM[h-1]);d({pageSizes:e,scale:v})}})},[r.loadingTask.docId]),0===s.pageSizes.length||0===s.scale?c.createElement("div",{className:"rpv-core__page-size-calculator","data-testid":"core__page-size-calculating",ref:l},c.createElement(_,null)):o(s.pageSizes,s.scale)},tR=function(){},tT=function(e){function t(t,n){var r=e.call(this)||this;return r.verifyPassword=t,r.passwordStatus=n,r}return s(t,e),t}(tR),tL=function(e){var n=e.passwordStatus,r=e.renderProtectedView,o=e.verifyPassword,a=e.onDocumentAskPassword,i=c.useContext(B).l10n,l=c.useState(""),u=l[0],s=l[1],d=c.useContext(g).direction===t.TextDirection.RightToLeft,p=function(){return o(u)};return c.useEffect(function(){a&&a({verifyPassword:o})},[]),r?r({passwordStatus:n,verifyPassword:o}):c.createElement("div",{className:"rpv-core__asking-password-wrapper"},c.createElement("div",{className:h({"rpv-core__asking-password":!0,"rpv-core__asking-password--rtl":d})},c.createElement("div",{className:"rpv-core__asking-password-message"},n===t.PasswordStatus.RequiredPassword&&i.core.askingPassword.requirePasswordToOpen,n===t.PasswordStatus.WrongPassword&&i.core.wrongPassword.tryAgain),c.createElement("div",{className:"rpv-core__asking-password-body"},c.createElement("div",{className:h({"rpv-core__asking-password-input":!0,"rpv-core__asking-password-input--ltr":!d,"rpv-core__asking-password-input--rtl":d})},c.createElement(k,{testId:"core__asking-password-input",type:"password",value:u,onChange:s,onKeyDown:function(e){"Enter"===e.key&&p()}})),c.createElement(S,{onClick:p},i.core.askingPassword.submit))))},tI=function(e){function t(t){var n=e.call(this)||this;return n.doc=t,n}return s(t,e),t}(tR),tO=function(e){function t(t){var n=e.call(this)||this;return n.error=t,n}return s(t,e),t}(tR),tD=function(e){function t(t){var n=e.call(this)||this;return n.percentages=t,n}return s(t,e),t}(tR),tF=function(e){var n=e.characterMap,r=e.file,o=e.httpHeaders,a=e.render,i=e.renderError,u=e.renderLoader,s=e.renderProtectedView,d=e.transformGetDocumentParams,p=e.withCredentials,f=e.onDocumentAskPassword,m=c.useContext(g).direction===t.TextDirection.RightToLeft,v=c.useState(new tD(0)),b=v[0],E=v[1],w=c.useRef(""),S=F();return c.useEffect(function(){w.current="",E(new tD(0));var e=new l.PDFWorker({name:"PDFWorker_".concat(Date.now())}),a=Object.assign({httpHeaders:o,withCredentials:p,worker:e},"string"==typeof r?{url:r}:{data:r},n?{cMapUrl:n.url,cMapPacked:n.isCompressed}:{}),i=d?d(a):a,c=l.getDocument(i);return c.onPassword=function(e,n){switch(n){case l.PasswordResponses.NEED_PASSWORD:S.current&&E(new tT(e,t.PasswordStatus.RequiredPassword));break;case l.PasswordResponses.INCORRECT_PASSWORD:S.current&&E(new tT(e,t.PasswordStatus.WrongPassword))}},c.onProgress=function(e){var t=e.total>0?Math.min(100,100*e.loaded/e.total):100;S.current&&""===w.current&&E(new tD(t))},c.promise.then(function(e){w.current=e.loadingTask.docId,S.current&&E(new tI(e))},function(t){return S.current&&!e.destroyed&&E(new tO({message:t.message||"Cannot load document",name:t.name}))}),function(){c.destroy(),e.destroy()}},[r]),b instanceof tT?c.createElement(tL,{passwordStatus:b.passwordStatus,renderProtectedView:s,verifyPassword:b.verifyPassword,onDocumentAskPassword:f}):b instanceof tI?a(b.doc):b instanceof tO?i?i(b.error):c.createElement("div",{className:h({"rpv-core__doc-error":!0,"rpv-core__doc-error--rtl":m})},c.createElement("div",{className:"rpv-core__doc-error-text"},b.error.message)):c.createElement("div",{"data-testid":"core__doc-loading",className:h({"rpv-core__doc-loading":!0,"rpv-core__doc-loading--rtl":m})},u?u(b.percentages):c.createElement(_,null))},tN=function(e,t){var n=c.useMemo(function(){return"auto"===e?"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
1k":"light":e},[]),r=c.useState(n),o=r[0],a=r[1],i=N(o);return c.useEffect(function(){if("auto"===e){var t=window.matchMedia("(prefers-color-scheme: dark)"),n=function(e){a(e.matches?"dark":"light")};return t.addEventListener("change",n),function(){return t.removeEventListener("change",n)}}},[]),c.useEffect(function(){o!==i&&t&&t(o)},[o]),c.useEffect(function(){e!==o&&a(e)},[e]),{currentTheme:o,setCurrentTheme:a}},tz=function(e){return{startPage:e.startPage-3,endPage:e.endPage+3}};t.Button=function(e){var n=e.children,r=e.testId,o=e.onClick,a=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.createElement("button",p({className:h({"rpv-core__button":!0,"rpv-core__button--rtl":a}),type:"button",onClick:o},r?{"data-testid":r}:{}),n)},t.Icon=E,t.LazyRender=function(e){var t=e.attrs,n=e.children,r=e.testId,o=c.useState(!1),a=o[0],i=o[1],l=r?p(p({},t),{"data-testid":r}):t,u=b({once:!0,onVisibilityChanged:function(e){e.isVisible&&i(!0)}});return c.createElement("div",p({ref:u},l),a&&n)},t.LocalizationContext=B,t.Menu=function(e){var n=e.children,r=c.useRef(),o=c.useRef([]),a=c.useContext(g).direction===t.TextDirection.RightToLeft,i=function(e){if(r.current)switch(e.key){case"Tab":e.preventDefault();break;case"ArrowDown":e.preventDefault(),l(function(e,t){return t+1});break;case"ArrowUp":e.preventDefault(),l(function(e,t){return t-1});break;case"End":e.preventDefault(),l(function(e,t){return e.length-1});break;case"Home":e.preventDefault(),l(function(e,t){return 0})}},l=function(e){if(r.current){var t=o.current,n=t.findIndex(function(e){return"0"===e.getAttribute("tabindex")}),a=Math.min(t.length-1,Math.max(0,e(t,n)));n>=0&&n<=t.length-1&&t[n].setAttribute("tabindex","-1"),t[a].setAttribute("tabindex","0"),t[a].focus()}};return v(function(){var e=r.current;if(e){var t,n,a=(n=[],e.querySelectorAll('.rpv-core__menu-item[role="menuitem"]').forEach(function(t){if(t instanceof HTMLElement){var r=t.parentElement;(r===e||"none"!==window.getComputedStyle(r).display)&&n.push(t)}}),n);o.current=a}},[]),v(function(){return document.addEventListener("keydown",i),function(){document.removeEventListener("keydown",i)}},[]),c.createElement("div",{ref:r,"aria-orientation":"vertical",className:h({"rpv-core__menu":!0,"rpv-core__menu--rtl":a}),role:"menu",tabIndex:0},n)},t.MenuDivider=function(){return c.createElement("div",{"aria-orientation":"horizontal",className:"rpv-core__menu-divider",role:"separator"})},t.MenuItem=function(e){var n=e.checked,r=e.children,o=e.icon,a=e.isDisabled,i=e.testId,l=e.onClick,u=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.createElement("button",p({className:h({"rpv-core__menu-item":!0,"rpv-core__menu-item--disabled":void 0!==a&&a,"rpv-core__menu-item--ltr":!u,"rpv-core__menu-item--rtl":u}),role:"menuitem",tabIndex:-1,type:"button",onClick:l},i?{"data-testid":i}:{}),c.createElement("div",{className:h({"rpv-core__menu-item-icon":!0,"rpv-core__menu-item-icon--ltr":!u,"rpv-core__menu-item-icon--rtl":u})},void 0===o?null:o),c.createElement("div",{className:h({"rpv-core__menu-item-label":!0,"rpv-core__menu-item-label--ltr":!u,"rpv-core__menu-item-label--rtl":u})},r),c.createElement("div",{className:h({"rpv-core__menu-item-check":!0,"rpv-core__menu-item-check--ltr":!u,"rpv-core__menu-item-check--rtl":u})},void 0!==n&&n&&c.createElement(w,null)))},t.MinimalButton=function(e){var n=e.ariaLabel,r=e.ariaKeyShortcuts,o=void 0===r?"":r,a=e.children,i=e.isDisabled,l=void 0!==i&&i,u=e.isSelected,s=e.testId,d=e.onClick,f=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.createElement("button",p({"aria-label":void 0===n?"":n},o&&{"aria-keyshortcuts":o},l&&{"aria-disabled":!0},{className:h({"rpv-core__minimal-button":!0,"rpv-core__minimal-button--disabled":l,"rpv-core__minimal-button--rtl":f,"rpv-core__minimal-button--selected":void 0!==u&&u}),type:"button",onClick:d},s?{"data-testid":s}:{}),a)},t.Modal=function(e){var t=e.ariaControlsSuffix,n=e.closeOnClickOutside,r=e.closeOnEscape,o=e.content,a=e.isOpened,i=e.target,l=t||"".concat(H());return c.createElement(J,{target:i?function(e,t){return c.createElement("div",{"aria-expanded":t?"true":"false","aria-haspopup":"dialog","aria-controls":"rpv-core__modal-body-".concat(l)},i(e,t))}:null,content:function(e){return c.createElement(U,null,c.createElement(Z,{ariaControl
1sSuffix:l,closeOnClickOutside:n,closeOnEscape:r,onToggle:e},o(e)))},isOpened:void 0!==a&&a})},t.Popover=function(e){var t=e.ariaHasPopup,n=e.ariaControlsSuffix,r=e.closeOnClickOutside,o=e.closeOnEscape,a=e.content,i=e.lockScroll,l=e.offset,u=e.position,s=e.target,d=G(!1),p=d.opened,f=d.toggle,m=c.useRef(),g=c.useMemo(function(){return n||"".concat(H())},[]);return c.createElement("div",{ref:m,"aria-expanded":p?"true":"false","aria-haspopup":void 0===t?"dialog":t,"aria-controls":"rpv-core__popver-body-".concat(g)},s(f,p),p&&c.createElement(c.Fragment,null,(void 0===i||i)&&c.createElement(ec,{closeOnEscape:o,onClose:f}),c.createElement(ei,{ariaControlsSuffix:g,closeOnClickOutside:r,offset:l,position:u,targetRef:m,onClose:f},a(f))))},t.PrimaryButton=S,t.ProgressBar=function(e){var n=e.progress,r=c.useContext(g).direction===t.TextDirection.RightToLeft;return c.createElement("div",{className:h({"rpv-core__progress-bar":!0,"rpv-core__progress-bar--rtl":r})},c.createElement("div",{className:"rpv-core__progress-bar-progress",style:{width:"".concat(n,"%")}},n,"%"))},t.Separator=function(){return c.createElement("div",{className:"rpv-core__separator"})},t.Spinner=_,t.Splitter=function(e){var n=e.constrain,r=c.useContext(g).direction===t.TextDirection.RightToLeft,o=c.useRef(),a=c.useRef(),i=c.useRef(),l=c.useRef(0),u=c.useRef(0),s=c.useRef(0),d=c.useRef(0),p={capture:!0},f=function(e){var t=o.current,c=a.current,u=i.current;if(t&&c&&u){var p=d.current,f=e.clientX-l.current,m=s.current+(r?-f:f),g=t.parentElement.getBoundingClientRect().width,h=100*m/g;if(t.classList.add("rpv-core__splitter--resizing"),n){var v=g-m-p;if(!n({firstHalfPercentage:h,firstHalfSize:m,secondHalfPercentage:100*v/g,secondHalfSize:v}))return}c.style.width="".concat(h,"%"),document.body.classList.add("rpv-core__splitter-body--resizing"),c.classList.add("rpv-core__splitter-sibling--resizing"),u.classList.add("rpv-core__splitter-sibling--resizing")}},m=function(e){var t=o.current,n=a.current,r=i.current;t&&n&&r&&(document.body.classList.remove("rpv-core__splitter-body--resizing"),t.classList.remove("rpv-core__splitter--resizing"),n.classList.remove("rpv-core__splitter-sibling--resizing"),r.classList.remove("rpv-core__splitter-sibling--resizing"),document.removeEventListener("mousemove",f,p),document.removeEventListener("mouseup",m,p))};return c.useEffect(function(){var e=o.current;e&&(d.current=e.getBoundingClientRect().width,a.current=e.previousElementSibling,i.current=e.nextElementSibling)},[]),c.createElement("div",{ref:o,className:"rpv-core__splitter",onMouseDown:function(e){var t=a.current;t&&(l.current=e.clientX,u.current=e.clientY,s.current=t.getBoundingClientRect().width,document.addEventListener("mousemove",f,p),document.addEventListener("mouseup",m,p))}})},t.TextBox=k,t.ThemeContext=g,t.Tooltip=function(e){var n=e.ariaControlsSuffix,r=e.content,o=e.offset,a=e.position,i=e.target,l=G(!1),u=l.opened,s=l.toggle,d=c.useRef(),p=c.useRef(),f=c.useMemo(function(){return n||"".concat(H())},[]);K(function(){d.current&&document.activeElement&&d.current.contains(document.activeElement)&&g()});var m=function(){s(t.ToggleStatus.Open)},g=function(){s(t.ToggleStatus.Close)};return c.createElement(c.Fragment,null,c.createElement("div",{ref:d,"aria-describedby":"rpv-core__tooltip-body-".concat(f),onBlur:function(e){e.relatedTarget instanceof HTMLElement&&e.currentTarget.parentElement&&e.currentTarget.parentElement.contains(e.relatedTarget)?p.current&&(p.current.style.display="none"):g()},onFocus:m,onMouseEnter:m,onMouseLeave:g},i),u&&c.createElement(el,{ariaControlsSuffix:f,contentRef:p,offset:o,position:a,targetRef:d},r()))},t.Viewer=function(e){var n=e.characterMap,r=e.defaultScale,o=e.enableSmoothScroll,a=void 0===o||o,i=e.fileUrl,l=e.httpHeaders,u=e.initialPage,s=void 0===u?0:u,d=e.pageLayout,p=e.initialRotation,f=void 0===p?0:p,m=e.localization,h=e.plugins,v=void 0===h?[]:h,E=e.renderError,w=e.renderLoader,S=e.renderPage,_=e.renderProtectedView,k=e.scrollMode,C=void 0===k?t.ScrollMode.Vertical:k,y=e.setRenderRange,P=void 0===y?tz:y,M=e.transformGetDocumentParams,x=e.theme,R=void 0===x?{direction:t.TextDirection.LeftToRight,theme:"light"}:x,T=e.viewMode,L=void 0===T?t.ViewMode.SinglePage:T,I=e.withCredentials,O=e.onDocumentAskPassword,D=e.onDocumentLoad,F=void 0===D?function(){}:D,z=e.onPageChange,j=void 0===z?function(){}:z,A=e.onRotate,H=void 0===A?function(){}:A,W=e.onRotatePage,K=void 0===W?function(){}:W,Z=e.onSwitchTheme,U=e.onZoom,q=void 0===U?function(){}:U,G=c.useState({data:i,name:"string"==typeof i?i:"",shouldLoad:!1}),J=G[0],Y=G[1],X=function(e,t){Y({data:t,name:e,shouldLoad:!0})},$=c.useState(!1),Q=$[0],ee=$[1],et=N(J);c.useEffect(function(){var e,t,n;e=et.data,n=typeof i,"string"==(t=typeof e)&&"string"===n&&e===i||"object"===t&&"object"===n&&e.length===i.length&&e.every(function(e,t){return e===i[t]})||Y({data:i,name:"string"==typeof i?i:"",shouldLoad:Q})},[i,Q]);var en=b({onVisibilityChanged:function(e){ee(e.isVisible),e.isVisible&&Y(function(e){return Object.assign({},e,{shouldLoad:!0})})}}),er="string"==typeof R?{direction:t.TextDirection.LeftToRight,theme:R}:R,eo=c.useState(m||V),ea=eo[0],ei=eo[1],ec=Object.assign({},{direction:er.direction},tN(er.theme||"light",void 0===Z?function(){}:Z));return c.useEffect(function(){m&&ei(m)},[m]),c.createElement(B.Provider,{value:{l10n:ea,setL10n:ei}},c.createElement(g.Provider,{value:ec},c.createElement("div",{ref:en,className:"rpv-core__viewer rpv-core__viewer--".concat(ec.currentTheme),"data-testid":"core__viewer",style:{height:"100%",width:"100%"}},J.shouldLoad&&c.createElement(tF,{characterMap:n,file:J.data,httpHeaders:void 0===l?{}:l,render:function(e){return c.createElement(tx,{defaultScale:r,doc:e,render:function(n,o){return c.createElement(tP,{currentFile:{data:J.data,name:J.name},defaultScale:r,doc:e,enableSmoothScroll:a,initialPage:s,initialRotation:f,initialScale:o,pageLayout:d,pageSizes:n,plugins:v,renderPage:S,scrollMode:C,setRenderRange:P,viewMode:L,viewerState:{file:J,fullScreenMode:t.FullScreenMode.Normal,pageIndex:-1,pageHeight:n[0].pageHeight,pageWidth:n[0].pageWidth,pagesRotation:new Map,rotation:f,scale:o,scrollMode:C,viewMode:L},onDocumentLoad:F,onOpenFile:X,onPageChange:j,onRotate:H,onRotatePage:K,onZoom:q})},scrollMode:C,viewMode:L})},renderError:E,renderLoader:w,renderProtectedView:_,transformGetDocumentParam
1s:M,withCredentials:void 0!==I&&I,onDocumentAskPassword:O}))))},t.Worker=function(e){var t=e.children,n=e.workerUrl;return l.GlobalWorkerOptions.workerSrc=n,c.createElement(c.Fragment,null,t)},t.chunk=ed,t.classNames=h,t.createStore=function(e){var t=e||{},n={},r=function(e,r){var o;t=p(p({},t),((o={})[e]=r,o)),(n[e]||[]).forEach(function(n){return n(t[e])})},o=function(e){return t[e]};return{subscribe:function(e,t){n[e]=(n[e]||[]).concat(t)},unsubscribe:function(e,t){n[e]=(n[e]||[]).filter(function(e){return e!==t})},update:function(e,t){r(e,t)},updateCurrentValue:function(e,t){var n=o(e);void 0!==n&&r(e,t(n))},get:function(e){return o(e)}}},t.getDestination=eb,t.getPage=ev,t.isFullScreenEnabled=L,t.isMac=function(){return"undefined"!=typeof window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)},t.useDebounceCallback=D,t.useIntersectionObserver=b,t.useIsMounted=F,t.useIsomorphicLayoutEffect=v,t.usePrevious=N,t.useRenderQueue=j},54141:function(e,t,n){"use strict";e.exports=n(89469)},72939:function(e,t,n){"use strict";var r,o,a=n(54141),i=n(67294),c=n(27504),l=n(42227),u=n(24416),s=n(85734),d=(o=Object.create(null),i&&Object.keys(i).forEac
1h(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return i[e]}})}}),o.default=i,Object.freeze(o)),p=function(){return d.createElement(a.Icon,{size:16},d.createElement("path",{d:"M11.5,1.5h11c0.552,0,1,0.448,1,1v20c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h3\n            M11.5,10.5c0,0.55-0.3,0.661-0.659,0.248L8,7.5l-2.844,3.246c-0.363,0.414-0.659,0.3-0.659-0.247v-9c0-0.552,0.448-1,1-1h5\n            c0.552,0,1,0.448,1,1L11.5,10.5z\n            M14.5,6.499h6\n            M14.5,10.499h6\n            M3.5,14.499h17\n            M3.5,18.499h16.497"}))},f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},m=function(){return d.createElement(a.Icon,{size:16},d.createElement("path",{d:"M7.618,15.345l8.666-8.666c0.78-0.812,2.071-0.838,2.883-0.058s0.838,2.071,0.058,2.883\n            c-0.019,0.02-0.038,0.039-0.058,0.058L7.461,21.305c-1.593,1.593-4.175,1.592-5.767,0s-1.592-4.175,0-5.767c0,0,0,0,0,0\n            L13.928,3.305c2.189-2.19,5.739-2.19,7.929-0.001s2.19,5.739,0,7.929l0,0L13.192,19.9"}))},g=function(){return d.createElement(a.Icon,{size:16},d.createElement("path",{d:"M10.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n            M23.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n            M10.5,22.5 c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z\n            M23.5,22.5c0,0.552-0.448,1-1,1 h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z"}))},h={left:8,top:0},v={left:-8,top:0},b=function(e){var t=e.attachmentTabContent,n=e.bookmarkTabContent,r=e.store,o=e.thumbnailTabContent,i=e.tabs,c=d.useRef(),l=d.useContext(a.LocalizationContext).l10n,u=d.useState(r.get("isCurrentTabOpened")||!1),s=u[0],f=u[1],b=d.useState(Math.max(r.get("currentTab")||0,0)),E=b[0],w=b[1],S=d.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,_=[{content:o,icon:d.createElement(g,null),title:l&&l.defaultLayout?l.defaultLayout.thumbnail:"Thumbnail"},{content:n,icon:d.createElement(p,null),title:l&&l.defaultLayout?l.defaultLayout.bookmark:"Bookmark"},{content:t,icon:d.createElement(m,null),title:l&&l.defaultLayout?l.defaultLayout.attachment:"Attachment"}],k=i?i(_):_,C=function(e){e>=0&&e<=k.length-1&&(r.update("isCurrentTabOpened",!0),w(e))},y=function(e){f(e)};return d.useEffect(function(){return r.subscribe("currentTab",C),r.subscribe("isCurrentTabOpened",y),function(){r.unsubscribe("currentTab",C),r.unsubscribe("isCurrentTabOpened",y)}},[]),0===k.length?d.createElement(d.Fragment,null):d.createElement(d.Fragment,null,d.createElement("div",{"data-testid":"default-layout__sidebar",className:a.classNames({"rpv-default-layout__sidebar":!0,"rpv-default-layout__sidebar--opened":s,"rpv-default-layout__sidebar--ltr":!S,"rpv-default-layout__sidebar--rtl":S}),ref:c},d.createElement("div",{className:"rpv-default-layout__sidebar-tabs"},d.createElement("div",{className:"rpv-default-layout__sidebar-headers",role:"tablist","aria-orientation":"vertical"},k.map(function(e,t){return d.createElement("div",{"aria-controls":"rpv-default-layout__sidebar-content","aria-selected":E===t,key:t,className:"rpv-default-layout__sidebar-header",id:"rpv-default-layout__sidebar-tab-".concat(t),role:"tab"},d.createElement(a.Tooltip,{ariaControlsSuffix:"default-layout-sidebar-tab-".concat(t),position:S?a.Position.LeftCenter:a.Position.RightCenter,target:d.createElement(a.MinimalButton,{ariaLabel:e.title,isSelected:E===t,onClick:function(){return function(e){if(E===e){r.update("isCurrentTabOpened",!r.get("isCurrentTabOpened"));var t=c.current;t&&t.style.width&&t.style.removeProperty("width")}else r.update("currentTab",e)}(t)}},e.icon),content:function(){return e.title},offset:S?v:h}))})),d.createElement("div",{"aria-labelledby":"rpv-default-layout__sidebar-tab-".concat(E),id:"rpv-default-layout__sidebar-content",className:a.classNames({"rpv-default-layout__sidebar-content":!0,"rpv-default-layout__sidebar-content--opened":s,"rpv-default-layout__sidebar-content--ltr":!S,"rpv-default-layout__sidebar-content--rtl":S}),role:"tabpanel",tabIndex:-1},k[E].content))),s&&d.createElement(a.Splitter,{constrain:function(e){return e.firstHalfPercentage>=20&&e.firstHalfPercentage<=80}}))};t.defaultLayoutPlugin=function(e){var t=d.useMemo(function(){return a.createStore({isCurrentTabOpened:!1,currentTab:0})},[]),n=c.attachmentPlugin(),r=l.bookmarkPlugin(),o=u.thumbnailPlugin(e?e.thumbnailPlugin:{}),i=s.toolbarPlugin(e?e.toolbarPlugin:{}),p=n.Attachments,m=r.Bookmarks,g=o.Thumbnails,h=i.Toolbar,v=e?e.sidebarTabs:function(e){return e},E=[n,r,o,i];return{attachmentPluginInstance:n,bookmarkPluginInstance:r,thumbnailPluginInstance:o,toolbarPluginInstance:i,activateTab:function(e){t.update("currentTab",e)},toggleTab:function(e){var n=t.get("currentTab");t.update("isCurrentTabOpened",!t.get("isCurrentTabOpened")),n!==e&&t.update("currentTab",e)}
1,install:function(e){E.forEach(function(t){t.install&&t.install(e)})},renderPageLayer:function(e){return d.createElement(d.Fragment,null,E.map(function(t,n){return t.renderPageLayer?d.createElement(d.Fragment,{key:n},t.renderPageLayer(e)):d.createElement(d.Fragment,{key:n},d.createElement(d.Fragment,null))}))},renderViewer:function(n){var r=n.slot;E.forEach(function(e){e.renderViewer&&(r=e.renderViewer(f(f({},n),{slot:r})))});var o=r.subSlot&&r.subSlot.attrs?{className:r.subSlot.attrs.className,"data-testid":r.subSlot.attrs["data-testid"],ref:r.subSlot.attrs.ref,style:r.subSlot.attrs.style}:{};return r.children=d.createElement("div",{className:"rpv-default-layout__container"},d.createElement("div",{"data-testid":"default-layout__main",className:a.classNames({"rpv-default-layout__main":!0,"rpv-default-layout__main--rtl":n.themeContext.direction===a.TextDirection.RightToLeft})},d.createElement(b,{attachmentTabContent:d.createElement(p,null),bookmarkTabContent:d.createElement(m,null),store:t,thumbnailTabContent:d.createElement(g,null),tabs:v}),d.createElement("div",{className:"rpv-default-layout__body","data-testid":"default-layout__body"},d.createElement("div",{className:"rpv-default-layout__toolbar"},e&&e.renderToolbar?e.renderToolbar(h):d.createElement(h,null)),d.createElement("div",f({},o),r.subSlot.children))),r.children),r.subSlot.attrs={},r.subSlot.children=d.createElement(d.Fragment,null),r},uninstall:function(e){E.forEach(function(t){t.uninstall&&t.uninstall(e)})},onDocumentLoad:function(n){E.forEach(function(e){e.onDocumentLoad&&e.onDocumentLoad(n)}),e&&e.setInitialTab&&e.setInitialTab(n.doc).then(function(e){t.update("currentTab",e),t.update("isCurrentTabOpened",!0)})},onAnnotationLayerRender:function(e){E.forEach(function(t){t.onAnnotationLayerRender&&t.onAnnotationLayerRender(e)})},onTextLayerRender:function(e){E.forEach(function(t){t.onTextLayerRender&&t.onTextLayerRender(e)})},onViewerStateChange:function(e){var t=e;return E.forEach(function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))}),t}}}},10492:function(e,t,n){"use strict";e.exports=n(72939)},17062:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M11.5 23.499L11.5 14.499"}),i.createElement("path",{d:"M7.5 18.499L11.5 14.499 15.5 18.499"}),i.createElement("path",{d:"M11.5 1.499L11.5 10.499"}),i.createElement("path",{d:"M7.5 6.499L11.5 10.499 15.5 6.499"}),i.createElement("path",{d:"M20.5 12.499L1.5 12.499"}))},l=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M0.5 12L23.5 12"}),i.createElement("path",{d:"M11.5 1L11.5 23"}),i.createElement("path",{d:"M8.5 4L11.5 1 14.5 4"}),i.createElement("path",{d:"M20.5 9L23.5 12 20.5 15"}),i.createElement("path",{d:"M3.5 15L0.5 12 3.5 9"}),i.createElement("path",{d:"M14.5 20L11.5 23 8.5 20"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s={left:0,top:8},d=function(e){var t=e.enableShortcuts,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.fullScreen?r.fullScreen.enterFullScreen:"Full screen",c=t?a.isMac()?"Meta+Ctrl+F":"F11":"";return i.createElement(a.Tooltip,{ariaControlsSuffix:"full-screen-enter",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaKeyShortcuts:c,ariaLabel:o,isDisabled:!a.isFullScreenEnabled(),testId:"full-screen__enter-button",onClick:n},i.createElement(l,null)),content:function(){return o},offset:s})},p={left:0,top:8},f=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.fullScreen?n.fullScreen.exitFullScreen:"Exit full screen";return i.createElement(a.Tooltip,{ariaControlsSuffix:"full-screen-exit",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaKeyShortcuts:"Esc",ariaLabel:r,testId:"full-screen__exit-button-with-tooltip",onClick:t},i.createElement(c,null)),content:function(){return r},offset:p})},m=function(e,t){var n=i.useState(t.get("fullScreenMode")),r=n[0],o=n[1],c=i.useCallback(function(e){o(e)},[]);return i.useEffect(function(){return t.subscribe("fullScreenMode",c),function(){t.unsubscribe("fullScreenMode",c)}},[]),{enterFullScreen:function(){var n=t.get("getPagesContainer");if(n){var r=e(n());t.get("enterFullScreenMode")(r)}},exitFullScreen:function(){t.get("exitFullScreenMode")()},isFullScreen:r===a.FullScreenMode.Entering||r===a.FullScreenMode.EnteredCompletely}},g=function(e){var t,n=e.children,r=e.enableShortcuts,o=m(e.getFullScreenTarget,e.store),a=o.enterFullScreen,c=o.exitFullScreen,l=o.isFullScreen;return(n||function(e){return l?i.createElement(f,{onClick:e.onClick}):i.createElement(d,{enableShortcuts:r,onClick:e.onClick})})({onClick:l?c:a})},h=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.fullScreen?n.fullScreen.enterFullScreen:"Full screen";return i.createElement(a.MenuItem,{icon:i.createElement(l,null),isDisabled:!a.isFullScreenEnabled(),testId:"full-screen__enter-menu",onClick:t},r)},v=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,o=n&&n.fullScreen?n.fullScreen.exitFullScreen:"Exit full screen";return i.createElement("div",{className:a.classNames({"rpv-full-screen__exit-button":!0,"rpv-full-screen__exit-button--ltr":!r,"rpv-full-screen__exit-button--rtl":r})},i.createElement(a.MinimalButton,{ariaLabel:o,testId:"full-screen__exit-button",onClick:t},i.createElement(c,null)))},b=function(e){var t,n=e.children,r=m(e.getFullScreenTarget,e.store),o=r.enterFullScreen,a=r.exitFullScreen,c=r.isFullScreen;return c&&(n||function(e){return i.createElement(v,{onClick:e.onClick})})({onClick:c?a:o})},E=function(e){var t=e.store,n=e.onEnterFullScreen,r=e.onExitFullScreen,o=i.useState(t.get("fullScreenMode")),c=o[0],l=o[1],u=i.useCallback(function(e){l(e)},[]);return i.useEffect(function(){switch(c){case a.FullScreenMode.EnteredCompletely:n(t.get("zoom"));break;case a.FullScreenMode.Exited:r(t.get("zoom"))}},[c]),i.useEffect(function(){return t.subscribe("fullScreenMode",u),function(){t.unsubscribe("fullScreenMode",u)}},[]),(c===a.FullScreenMode.Entering||c===a.FullScreenMode.Entered)&&i.createElement("div",{className:"rpv-full-screen__overlay"},i.createElement(a.Spinner,null))},w=function(e){var t,n=e.containerRef,r=m(e.getFullScreenTarget,e.store).enterFullScreen,o=function(e){if(!e.shiftKey&&!e.altKey&&
1(a.isMac()?e.metaKey&&e.ctrlKey&&"f"===e.key:"F11"===e.key)){var t=n.current;t&&document.activeElement&&t.contains(document.activeElement)&&(e.preventDefault(),r())}};return i.useEffect(function(){if(n.current)return document.addEventListener("keydown",o),function(){document.removeEventListener("keydown",o)}},[n.current]),i.createElement(i.Fragment,null)};t.ExitFullScreenIcon=c,t.FullScreenIcon=l,t.fullScreenPlugin=function(e){var t=(null==e?void 0:e.getFullScreenTarget)||function(e){return e},n=i.useMemo(function(){return Object.assign({},{enableShortcuts:!0,onEnterFullScreen:function(){},onExitFullScreen:function(){}},e)},[]),r=i.useMemo(function(){return a.createStore({enterFullScreenMode:function(){},exitFullScreenMode:function(){},fullScreenMode:a.FullScreenMode.Normal,zoom:function(){}})},[]),o=function(e){return i.createElement(g,u({},e,{enableShortcuts:n.enableShortcuts,getFullScreenTarget:t,store:r}))},c=function(){return i.createElement(b,{getFullScreenTarget:t,store:r},null==e?void 0:e.renderExitFullScreenButton)};return{install:function(e){r.update("enterFullScreenMode",e.enterFullScreenMode),r.update("exitFullScreenMode",e.exitFullScreenMode),r.update("getPagesContainer",e.getPagesContainer),r.update("zoom",e.zoom)},onViewerStateChange:function(e){return r.update("fullScreenMode",e.fullScreenMode),e},renderViewer:function(e){var o=e.slot;return o.subSlot&&(o.subSlot.children=i.createElement(i.Fragment,null,n.enableShortcuts&&i.createElement(w,{containerRef:e.containerRef,getFullScreenTarget:t,store:r}),i.createElement(E,{store:r,onEnterFullScreen:n.onEnterFullScreen,onExitFullScreen:n.onExitFullScreen}),i.createElement(c,null),o.subSlot.children)),o},EnterFullScreen:o,EnterFullScreenButton:function(){return i.createElement(o,null,function(e){return i.createElement(d,u({enableShortcuts:n.enableShortcuts},e))})},EnterFullScreenMenuItem:function(e){return i.createElement(o,null,function(t){return i.createElement(h,{onClick:function(){t.onClick(),e.onClick()}})})}}}},74948:function(e,t,n){"use strict";e.exports=n(17062)},76784:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M5.5,11.5c-.275,0-.341.159-.146.354l6.292,6.293a.5.5,0,0,0,.709,0l6.311-6.275c.2-.193.13-.353-.145-.355L15.5,11.5V1.5a1,1,0,0,0-1-1h-5a1,1,0,0,0-1,1V11a.5.5,0,0,1-.5.5Z"}),i.createElement("path",{d:"M23.5,18.5v4a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-4"}))},l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u={left:0,top:8},s=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.download?n.download.download:"Download";return i.createElement(a.Tooltip,{ariaControlsSuffix:"get-file",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:r,testId:"get-file__download-button",onClick:t},i.createElement(c,null)),content:function(){return r},offset:u})},d=function(e,t){var n=document.createElement("a");n.style.display="none",n.href=e,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)},p=function(e,t,n){var r=URL.createObjectURL(new Blob([e],{type:n}));d(r,t),r&&URL.revokeObjectURL(r)},f=function(e,t){e.getData().then(function(e){var n;/iphone|ipod|ipad/i.test(navigator.userAgent)&&!/CriOS/i.test(navigator.userAgent)?p(e,t,"application/octet-stream"):/iphone|ipod|ipad/i.test(navigator.userAgent)&&/CriOS/i.test(navigator.userAgent)?d("data:application/pdf;base64,".concat(btoa(Array(e.length).fill("").map(function(t,n){return String.fromCharCode(e[n])}).join(""))),t):p(e,t,"application/pdf")})},m=function(e){var t=e.children,n=e.fileNameGenerator,r=e.store,o=i.useState(r.get("file")),a=o[0],c=o[1],l=i.useState(r.get("doc")),u=l[0],d=l[1],p=function(e){d(e)},m=function(e){c(e)};return i.useEffect(function(){return r.subscribe("doc",p),r.subscribe("file",m),function(){r.subscribe("doc",p),r.unsubscribe("file",m)}},[]),(t||function(e){return i.createElement(s,{onClick:e.onClick})})({onClick:function(){u&&a&&f(u,n(a))}})},g=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.download?n.download.download:"Download";return i.createElement(a.MenuItem,{icon:i.createElement(c,null),testId:"get-file__download-menu",onClick:t},r)};t.DownloadIcon=c,t.getFilePlugin=function(e){var t=i.useMemo(function(){return a.createStore({})},[]),n=function(e){var t,n;return e.name?(n=(t=e.name).split("/").pop())?n.split("#")[0].split("?")[0]:t:"document.pdf"},r=function(r){return i.createElement(m,l({},r,{fileNameGenerator:e&&e.fileNameGenerator||n,store:t}))};return{onDocumentLoad:function(e){t.update("doc",e.doc),t.update("file",e.file)}
1,Download:r,DownloadButton:function(){return i.createElement(r,null,function(e){return i.createElement(s,l({},e))})},DownloadMenuItem:function(e){return i.createElement(r,null,function(t){return i.createElement(g,{onClick:function(){t.onClick(),e.onClick()}})})}}}},48448:function(e,t,n){"use strict";e.exports=n(76784)},6111:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M18.5,7.5c.275,0,.341-.159.146-.354L12.354.854a.5.5,0,0,0-.708,0L5.354,7.147c-.2.195-.129.354.146.354h3v10a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V7.5Z"}),i.createElement("path",{d:"M23.5,18.5v4a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-4"}))},l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e){var t=i.useRef(),n=function(){var n=t.current;n&&(n.click(),e.get("triggerOpenFile")&&e.update("triggerOpenFile",!1))},r=function(e){e&&n()};return i.useEffect(function(){return e.subscribe("triggerOpenFile",r),function(){e.unsubscribe("triggerOpenFile",r)}},[]),{inputRef:t,openFile:n}},s={left:0,top:8},d=function(e){var t=e.enableShortcuts,n=e.store,r=e.onClick,o=i.useContext(a.LocalizationContext).l10n,l=o&&o.open?o.open.openFile:"Open file",d=u(n),p=d.inputRef,f=d.openFile,m=t?a.isMac()?"Meta+O":"Ctrl+O":"";return i.createElement(a.Tooltip,{ariaControlsSuffix:"open",position:a.Position.BottomCenter,target:i.createElement("div",{className:"rpv-open__input-wrapper"},i.createElement("input",{accept:".pdf",ref:p,className:"rpv-open__input",multiple:!1,tabIndex:-1,title:"",type:"file",onChange:r}),i.createElement(a.MinimalButton,{ariaKeyShortcuts:m,ariaLabel:l,testId:"open__button",onClick:f},i.createElement(c,null))),content:function(){return l},offset:s})},p=function(e){var t=e.children,n=e.enableShortcuts,r=e.store;return(t||function(e){return i.createElement(d,{enableShortcuts:n,store:r,onClick:e.onClick})})({onClick:function(e){var t=e.target.files;if(t&&t.length){var n=r.get("openFile");n&&n(t[0])}}})},f=function(e){var t=e.store,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.open?r.open.openFile:"Open file",l=u(t),s=l.inputRef,d=l.openFile;return i.createElement(a.MenuItem,{icon:i.createElement(c,null),testId:"open__menu",onClick:d},i.createElement("div",{className:"rpv-open__input-wrapper"},i.createElement("input",{accept:".pdf",ref:s,className:"rpv-open__input",multiple:!1,tabIndex:-1,title:"",type:"file",onChange:n}),o))},m=function(e){var t=e.containerRef,n=e.store,r=function(e){if(!e.shiftKey&&!e.altKey&&"o"===e.key&&(a.isMac()?e.metaKey:e.ctrlKey)){var r=t.current;r&&document.activeElement&&r.contains(document.activeElement)&&(e.preventDefault(),n.update("triggerOpenFile",!0))}};return i.useEffect(function(){if(t.current)return document.addEventListener("keydown",r),function(){document.removeEventListener("keydown",r)}},[t.current]),i.createElement(i.Fragment,null)};t.OpenFileIcon=c,t.openPlugin=function(e){var t=i.useMemo(function(){return Object.assign({},{enableShortcuts:!0},e)},[]),n=i.useMemo(function(){return a.createStore({})},[]),r=function(e){return i.createElement(p,l({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{install:function(e){n.update("openFile",e.openFile)},renderViewer:function(e){var r=e.slot,o={children:i.createElement(i.Fragment,null,t.enableShortcuts&&i.createElement(m,{containerRef:e.containerRef,store:n}),r.children)};return l(l({},r),o)},Open:r,OpenButton:function(){return i.createElement(r,null)},OpenMenuItem:function(){return i.createElement(r,null,function(e){return i.createElement(f,{store:n,onClick:e.onClick})})}}}},50007:function(e,t,n){"use strict";e.exports=n(6111)},20229:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M2.32,2.966h19.452c0.552,0.001,1,0.449,0.999,1.001c0,0.182-0.05,0.36-0.144,0.516L12.9,20.552\n            c-0.286,0.472-0.901,0.624-1.373,0.338c-0.138-0.084-0.254-0.2-0.338-0.338L1.465,4.483C1.179,4.01,1.331,3.396,1.804,3.11\n            C1.96,3.016,2.138,2.966,2.32,2.966z"}))},l=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n            L23.541,5.627"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s=function(e){var t=i.useState(e.get("currentPage")||0),n=t[0],r=t[1],o=function(e){r(e)};return a.useIsomorphicLayoutEffect(function(){return e.subscribe("currentPage",o),function(){e.unsubscribe("currentPage",o)}},[]),{currentPage:n}},d=function(e){var t=i.useState(e.get("numberOfPages")||0),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect(function(){return e.subscribe("numberOfPages",o),function(){e.unsubscribe("numberOfPages",o)}},[]),{numberOfPages:n}},p=function(e){var t=e.store,n=i.useContext(a.LocalizationContext).l10n,r=i.useState("1"),o=r[0],c=r[1],l=s(t).currentPage,u=d(t).numberOfPages;i.useEffect(function(){return c("".concat(l+1))},[l]);var p=function(e){var n=t.get("jumpToPage");n&&n(e)},f=n&&n.pageNavigation?n.pageNavigation.enterPageNumber:"Enter a page number";return i.createElement("span",{className:"rpv-page-navigation__current-page-input"},i.createElement(a.TextBox,{ariaLabel:f,testId:"page-navigation__current-page-input",type:"text",value:o,onChange:c,onKeyDown:function(e){var t,n,r;switch(e.key){case"ArrowUp":(r=l-1)>=0&&(c("".concat(r+1)),p(r));break;case"ArrowDown":(n=l+1)<u&&(c("".concat(n+1)),p(n));break;case"Enter":t=parseInt(o,10),""===o||t<1||t>u?c("".concat(l+1)):p(t-1)}}}))},f=function(e){var t=e.children,n=e.doc,r=a.useIsMounted(),o=i.useState({loading:!0,labels:[]}),c=o[0],l=o[1];return i.useEffect(function(){n.getPageLabels().then(function(e){r.current&&l({loading:!1,labels:e||[]})})},[n.loadingTask.docId]),c.loading?i.createElement(i.Fragment,null):t(c.labels)},m=function(e){var t,n,r,o,a,c=e.children,l=e.store,u=(r=(n=i.useState(l.get("doc")))[0],o=n[1],a=function(e){o(e)},i.useEffect(function(){return l.subscribe("doc",a),function(){l.unsubscribe("doc",a)}},[]),r),p=s(l).currentPage,m=d(l).numberOfPages,g=c||function(e){return i.createElement(i.Fragment,null,e.currentPage+1)};return u?i.createElement(f,{doc:u},function(e){var t=e.length===m&&m>0?e[p]:"";return g({currentPage:p,numberOfPages:m,pageLabel:t})}):i.createElement(i.Fragment,null)},g=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M21.783,21.034H2.332c-0.552,0-1-0.448-1-1c0-0.182,0.05-0.361,0.144-0.517L11.2,3.448\n            c0.286-0.472,0.901-0.624,1.373-0.338c0.138,0.084,0.254,0.2,0.338,0.338l9.726,16.069c0.28
16,0.473,0.134,1.087-0.339,1.373\n            C22.143,20.984,21.965,21.034,21.783,21.034z"}))},h={left:0,top:8},v=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToFirstPage:"First page";return i.createElement(a.Tooltip,{ariaControlsSuffix:"page-navigation-first",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:o,isDisabled:t,testId:"page-navigation__first-button",onClick:n},i.createElement(g,null)),content:function(){return o},offset:h})},b=function(e){var t=e.children,n=e.store;return(t||function(e){return i.createElement(v,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:0===s(n).currentPage,onClick:function(){var e=n.get("jumpToPage");e&&e(0)}})},E=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToFirstPage:"First page";return i.createElement(a.MenuItem,{icon:i.createElement(g,null),isDisabled:t,testId:"page-navigation__first-menu",onClick:n},o)},w={left:0,top:8},S=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToLastPage:"Last page";return i.createElement(a.Tooltip,{ariaControlsSuffix:"page-navigation-last",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:o,isDisabled:t,testId:"page-navigation__last-button",onClick:n},i.createElement(c,null)),content:function(){return o},offset:w})},_=function(e){var t=e.children,n=e.store,r=s(n).currentPage,o=d(n).numberOfPages;return(t||function(e){return i.createElement(S,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r+1>=o,onClick:function(){var e=n.get("jumpToPage");e&&e(o-1)}})},k=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToLastPage:"Last page";return i.createElement(a.MenuItem,{icon:i.createElement(c,null),isDisabled:t,testId:"page-navigation__last-menu",onClick:n},o)},C={left:0,top:8},y=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToNextPage:"Next page";return i.createElement(a.Tooltip,{ariaControlsSuffix:"page-navigation-next",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:o,isDisabled:t,testId:"page-navigation__next-button",onClick:n},i.createElement(l,null)),content:function(){return o},offset:C})},P=function(e){var t=e.children,n=e.store;return(t||function(e){return i.createElement(y,{onClick:e.onClick,isDisabled:e.isDisabled})})({isDisabled:s(n).currentPage+1>=d(n).numberOfPages,onClick:function(){var e=n.get("jumpToNextPage");e&&e()}})},M=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToNextPage:"Next page";return i.createElement(a.MenuItem,{icon:i.createElement(l,null),isDisabled:t,testId:"page-navigation__next-menu",onClick:n},o)},x=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n            L0.535,18.373"}))},R={left:0,top:8},T=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToPreviousPage:"Previous page";return i.createElement(a.Tooltip,{ariaControlsSuffix:"page-navigation-previous",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:o,isDisabled:t,testId:"page-navigation__previous-button",onClick:n},i.createElement(x,null)),content:function(){return o},offset:R})},L=function(e){var t=e.store;return(e.children||function(e){return i.createElement(T,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:s(t).currentPage<=0,onClick:function(){var e=t.get("jumpToPreviousPage");e&&e()}})},I=function(e){var t=e.isDisabled,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.pageNavigation?r.pageNavigation.goToPreviousPage:"Previous page";return i.createElement(a.MenuItem,{icon:i.createElement(x,null),isDisabled:t,testId:"page-navigation__previous-menu",onClick:n},o)},O=function(e){var t=e.children,n=d(e.store).numberOfPages;return t?t({numberOfPages:n}):i.createElement(i.Fragment,null,n)},D=function(e){var t=e.containerRef,n=e.numPages,r=e.store,o=s(r).currentPage,c=i.useRef(o);c.current=o;var l=i.useRef(!1),u=function(){l.current=!0},d=function(){l.current=!1},p=function(e){var o=t.current,i=l.current||document.activeElement&&o.contains(document.activeElement);if(o&&i){var u,s,d,p,f,m,g=e.altKey&&"ArrowDown"===e.key||!e.shiftKey&&!e.altKey&&"PageDown"===e.key,h=e.altKey&&"ArrowUp"===e.key||!e.shiftKey&&!e.altKey&&"PageUp"===e.key;if(g)return e.preventDefault(),f=r.get("jumpToPage"),m=c.current+1,void(f&&m<n&&f(m));if(h)return e.preventDefault(),void(u=r.get("jumpToPage"),s=c.current-1,u&&s>=0&&u(s));if(a.isMac()?e.metaKey&&!e.ctrlKey:e.altKey)switch(e.key){case"ArrowLeft":e.preventDefault(),(d=r.get("jumpToPreviousDestination"))&&d();break;case"ArrowRight":e.preventDefault(),(p=r.get("jumpToNextDestination"))&&p()}}};return i.useEffect(function(){var e=t.current;if(e)return document.addEventListener("keydown",p),e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",d),function(){document.removeEventListener("keydown",p),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",d)}},[t.current]),i.createElement(i.Fragment,null)};t.DownArrowIcon=c,t.NextIcon=l,t.PreviousIcon=x,t.UpArrowIcon=g,t.pageNavigationPlugin=function(e){var t=i.useMemo(function(){return Object.assign({},{enableShortcuts:!0},e)}
1,[]),n=i.useMemo(function(){return a.createStore()},[]),r=function(e){return i.createElement(b,u({},e,{store:n}))},o=function(e){return i.createElement(_,u({},e,{store:n}))},c=function(e){return i.createElement(P,u({},e,{store:n}))},l=function(e){return i.createElement(L,u({},e,{store:n}))};return{install:function(e){n.update("jumpToDestination",e.jumpToDestination),n.update("jumpToNextDestination",e.jumpToNextDestination),n.update("jumpToNextPage",e.jumpToNextPage),n.update("jumpToPage",e.jumpToPage),n.update("jumpToPreviousDestination",e.jumpToPreviousDestination),n.update("jumpToPreviousPage",e.jumpToPreviousPage)},renderViewer:function(e){var r=e.slot;if(!t.enableShortcuts)return r;var o={children:i.createElement(i.Fragment,null,i.createElement(D,{containerRef:e.containerRef,numPages:e.doc.numPages,store:n}),r.children)};return u(u({},r),o)},onDocumentLoad:function(e){n.update("doc",e.doc),n.update("numberOfPages",e.doc.numPages)},onViewerStateChange:function(e){return n.update("currentPage",e.pageIndex),e},jumpToNextPage:function(){var e=n.get("jumpToNextPage");e&&e()},jumpToPage:function(e){var t=n.get("jumpToPage");t&&t(e)},jumpToPreviousPage:function(){var e=n.get("jumpToPreviousPage");e&&e()},CurrentPageInput:function(){return i.createElement(p,{store:n})},CurrentPageLabel:function(e){return i.createElement(m,u({},e,{store:n}))},GoToFirstPage:r,GoToFirstPageButton:function(){return i.createElement(r,null,function(e){return i.createElement(v,u({},e))})},GoToFirstPageMenuItem:function(e){return i.createElement(r,null,function(t){return i.createElement(E,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})})},GoToLastPage:o,GoToLastPageButton:function(){return i.createElement(o,null,function(e){return i.createElement(S,u({},e))})},GoToLastPageMenuItem:function(e){return i.createElement(o,null,function(t){return i.createElement(k,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})})},GoToNextPage:c,GoToNextPageButton:function(){return i.createElement(c,null,function(e){return i.createElement(y,u({},e))})},GoToNextPageMenuItem:function(e){return i.createElement(c,null,function(t){return i.createElement(M,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})})},GoToPreviousPage:l,GoToPreviousPageButton:function(){return i.createElement(l,null,function(e){return i.createElement(T,u({},e))})},GoToPreviousPageMenuItem:function(e){return i.createElement(l,null,function(t){return i.createElement(I,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})})},NumberOfPages:function(e){return i.createElement(O,u({},e,{store:n}))}}}},13572:function(e,t,n){"use strict";e.exports=n(20229)},17302:function(e,t,n){"use strict";var r,o,a,i,c=n(83454),l=n(54141),u=n(67294),s=n(73935),d=(o=Object.create(null),u&&Object.keys(u).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return u[e]}})}}),o.default=u,Object.freeze(o)),p=function(){return d.createElement(l.Icon,{size:16},d.createElement("path",{d:"M7.5,19.499h9 M7.5,16.499h9 M5.5,16.5h-3c-1.103-0.003-1.997-0.897-2-2v-6c0.003-1.103,0.897-1.997,2-2h19\n            c1.103,0.003,1.997,0.897,2,2v6c-0.003,1.103-0.897,1.997-2,2h-3\n            M5.5,4.5v-4h9.586c0.265,0,0.52,0.105,0.707,0.293l2.414,2.414\n            C18.395,3.394,18.5,3.649,18.5,3.914V4.5\n            M18.5,22.5c0,0.552-0.448,1-1,1h-11c-0.552,0-1-0.448-1-1v-9h13V22.5z\n            M3.5,8.499\n            c0.552,0,1,0.448,1,1s-0.448,1-1,1s-1-0.448-1-1S2.948,8.499,3.5,8.499z\n            M14.5,0.499v4h4"}))},f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},m={left:0,top:8},g=function(e){var t=e.enableShortcuts,n=e.onClick,r=d.useContext(l.LocalizationContext).l10n,o=r&&r.print?r.print.print:"Print",a=t?l.isMac()?"Meta+P":"Ctrl+P":"";return d.createElement(l.Tooltip,{ariaControlsSuffix:"print",position:l.Position.BottomCenter,target:d.createElement(l.MinimalButton,{ariaKeyShortcuts:a,ariaLabel:o,testId:"print__button",onClick:n},d.createElement(p,null)),content:function(){return o},offset:m})};(i=a||(a={})).CheckingPermission="CheckingPermission",i.Inactive="Inactive",i.Preparing="Preparing",i.Cancelled="Cancelled",i.Ready="Ready";var h=function(e){var t=e.children,n=e.enableShortcuts,r=e.store;return(t||g)({enableShortcuts:n,onClick:function(){r.update("printStatus",a.CheckingPermission)}})},v=function(e){var t=e.doc,n=e.store,r=d.useContext(l.LocalizationContext).l10n,o=d.useState(!0),i=o[0],c=o[1];return d.useEffect(function(){t.getPermissions().then(function(e){null===e||e.includes(4)||e.includes(2048)?n.update("printStatus",a.Preparing):c(!1)})},[]),i?d.createElement(d.Fragment,null):d.createElement(l.Modal,{ariaControl
1sSuffix:"print-permission",closeOnClickOutside:!1,closeOnEscape:!1,content:function(e){return d.createElement(d.Fragment,null,d.createElement("div",{className:"rpv-print__permission-body"},r&&r.print?r.print.disallowPrint:"The document does not allow to print"),d.createElement("div",{className:"rpv-print__permission-footer"},d.createElement(l.Button,{onClick:function(){e(),n.update("printStatus",a.Cancelled)}},r&&r.print?r.print.close:"Close")))},isOpened:!0})},b=function(e){var t=e.numLoadedPages,n=e.numPages,r=e.onCancel,o=d.useContext(l.LocalizationContext).l10n,a=d.useContext(l.ThemeContext).direction===l.TextDirection.RightToLeft;return d.createElement("div",{className:"rpv-print__progress"},d.createElement("div",{className:l.classNames({"rpv-print__progress-body":!0,"rpv-print__progress-body--rtl":a})},d.createElement("div",{className:"rpv-print__progress-message"},o&&o.print?o.print.preparingDocument:"Preparing document ..."),d.createElement("div",{className:"rpv-print__progress-bar"},d.createElement(l.ProgressBar,{progress:Math.floor(100*t/n)})),d.createElement(l.Button,{onClick:r},o&&o.print?o.print.cancel:"Cancel")))},E=function(e){var t=e.canvas,n=e.page,r=e.pageHeight,o=e.pageIndex,a=e.pageWidth,i=e.rotation,u=e.onLoad,s=l.useIsMounted(),p=d.useRef(),f=d.useState(""),m=f[0],g=f[1],h=d.useMemo(function(){return void 0!==c&&void 0!==c.env.JEST_WORKER_ID},[]);return d.useEffect(function(){var e=p.current;e&&e.cancel();var o=150/72;t.height=Math.floor(r*o),t.width=Math.floor(a*o);var c=t.getContext("2d");c.save(),c.fillStyle="rgb(255, 255, 255)",c.fillRect(0,0,t.width,t.height),c.restore();var l=n.getViewport({rotation:i,scale:1});p.current=n.render({canvasContext:c,intent:"print",transform:[o,0,0,o,0,0],viewport:l}),p.current.promise.then(function(){"toBlob"in t&&"createObjectURL"in URL?t.toBlob(function(e){s.current&&g(URL.createObjectURL(e)),h&&u()}):(s.current&&g(t.toDataURL()),h&&u())},function(){})},[]),m&&d.createElement("div",{className:"rpv-print__page"},d.createElement("img",{"data-testid":"print__thumbnail-".concat(o),src:m,onLoad:function(){h||u()}}))},w=function(e){var t=e.canvas,n=e.doc,r=e.pageIndex,o=e.pageRotation,a=e.pageSize,i=e.rotation,c=e.shouldRender,u=e.onLoad,s=l.useIsMounted(),p=d.useState(null),f=p[0],m=p[1],g=Math.abs(i+o)%180==0;d.useEffect(function(){c&&l.getPage(n,r).then(function(e){s.current&&m(e)})},[c]);var h=(a.rotation+i+o)%360;return f&&d.createElement(E,{canvas:t,page:f,pageHeight:g?a.pageHeight:a.pageWidth,pageIndex:r,pageWidth:g?a.pageWidth:a.pageHeight,rotation:h,onLoad:u})},S=function(e){var t=e.doc,n=e.numLoadedPages,r=e.pagesRotation,o=e.pageSizes,i=e.printPages,c=e.printStatus,l=e.rotation,u=e.onCancel,p=e.onLoad,f=d.useMemo(function(){return document.createElement("canvas")},[]),m=d.useMemo(function(){var e=document.querySelector(".rpv-print__zone");if(e)return e;var t=document.createElement("div");return t.classList.add("rpv-print__zone"),t.setAttribute("data-testid","print__zone"),document.body.appendChild(t),t},[]);d.useEffect(function(){c===a.Ready&&(document.documentElement.classList.add("rpv-print__html-printing"),document.body.classList.add("rpv-print__body-printing"),window.print());var e=function(){if(c===a.Ready){document.documentElement.classList.remove("rpv-print__html-printing"),document.body.classList.remove("rpv-print__body-printing");var t=document.querySelectorAll(".rpv-print__zone");t&&t.forEach(function(e){e.parentElement.removeChild(e)}),f.height=0,f.width=0,document.removeEventListener("mousemove",e),u()}};return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}},[c]);var g=o[0].pageHeight,h=o[0].pageWidth;return s.createPortal(d.createElement(d.Fragment,null,i.map(function(e,a){return d.createElement(w,{key:e,canvas:f,doc:t,pageIndex:e,pageRotation:r.has(e)?r.get(e):0,pageSize:o[e],rotation:l,shouldRender:a===n,onLoad:p})}),d.createElement("style",{dangerouslySetInnerHTML:{__html:"@page { size: ".concat(h,"pt ").concat(g,"pt }")}})),m)},_=function(e){var t=e.doc,n=e.pagesRotation,r=e.pageSizes,o=e.renderProgressBar,i=e.rotation,c=e.setPages,l=e.store,u=d.useState(a.Inactive),s=u[0],p=u[1],f=d.useState(0),m=f[0],g=f[1],h=d.useMemo(function(){var e=t.numPages;return c(t).filter(function(t){return t>=0&&t<e})},[t,c]),E=h.length,w=function(){g(0),p(a.Inactive)}
1,_=function(e){return p(e)};return d.useEffect(function(){return l.subscribe("printStatus",_),function(){l.unsubscribe("printStatus",_)}},[]),d.createElement(d.Fragment,null,s===a.CheckingPermission&&d.createElement(v,{doc:t,store:l}),s===a.Preparing&&(o?o(m,E,w):d.createElement(b,{numLoadedPages:m,numPages:E,onCancel:w})),(s===a.Preparing||s===a.Ready)&&m<=E&&d.createElement(S,{doc:t,numLoadedPages:m,pagesRotation:n,pageSizes:r,printPages:h,printStatus:s,rotation:i,onCancel:w,onLoad:function(){var e=m+1;e<=E&&(g(e),e===E&&p(a.Ready))}}))},k=function(e){var t=e.onClick,n=d.useContext(l.LocalizationContext).l10n,r=n&&n.print?n.print.print:"Print";return d.createElement(l.MenuItem,{icon:d.createElement(p,null),testId:"print__menu",onClick:t},r)},C=function(e){var t=e.containerRef,n=e.store,r=function(e){if(!e.shiftKey&&!e.altKey&&"p"===e.key&&(l.isMac()?e.metaKey:e.ctrlKey)){var r=t.current;r&&document.activeElement&&r.contains(document.activeElement)&&(e.preventDefault(),n.update("printStatus",a.Preparing))}};return d.useEffect(function(){if(t.current)return document.addEventListener("keydown",r),function(){document.removeEventListener("keydown",r)}},[t.current]),d.createElement(d.Fragment,null)};t.PrintIcon=p,t.getAllPagesNumbers=function(e){return Array(e.numPages).fill(0).map(function(e,t){return t})},t.getCustomPagesNumbers=function(e){return function(t){var n=[];return e.replace(/\s+/g,"").split(",").forEach(function(e){var t,r,o=e.split("-").map(function(e){return parseInt(e,10)}).filter(function(e){return Number.isInteger(e)});1===o.length?n.push(o[0]-1):2===o.length&&n.push.apply(n,(t=o[0]-1,Array(o[1]-1-t+1).fill(0).map(function(e,n){return t+n})))}),n.filter(function(e){return n.indexOf(e)===n.lastIndexOf(e)}).filter(function(e){return e>=0&&e<t.numPages})}},t.getEvenPagesNumbers=function(e){return Array(e.numPages).fill(0).map(function(e,t){return t}).filter(function(e){return(e+1)%2==0})},t.getOddPagesNumbers=function(e){return Array(e.numPages).fill(0).map(function(e,t){return t}).filter(function(e){return(e+1)%2==1})},t.printPlugin=function(e){var t=d.useMemo(function(){return Object.assign({},{enableShortcuts:!0,setPages:function(e){return Array(e.numPages).fill(0).map(function(e,t){return t})}},e)},[]),n=d.useMemo(function(){return l.createStore({printStatus:a.Inactive})},[]),r=function(e){return d.createElement(h,f({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{print:function(){n.update("printStatus",a.CheckingPermission)},renderViewer:function(r){var o=r.slot,a={children:d.createElement(d.Fragment,null,t.enableShortcuts&&d.createElement(C,{containerRef:r.containerRef,store:n}),d.createElement(_,{doc:r.doc,pagesRotation:r.pagesRotation,pageSizes:r.pageSizes,renderProgressBar:null==e?void 0:e.renderProgressBar,rotation:r.rotation,setPages:t.setPages,store:n}),o.children)};return f(f({},o),a)},Print:r,PrintButton:function(){return d.createElement(r,null,function(e){return d.createElement(g,f({},e))})},PrintMenuItem:function(e){return d.createElement(r,null,function(t){return d.createElement(k,{onClick:function(){t.onClick(),e.onClick()}})})},setPages:function(e){t.setPages=e}}}},91999:function(e,t,n){"use strict";e.exports=n(17302)},88700:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M12,1.001c6.075,0,11,4.925,11,11s-4.925,11-11,11s-11-4.925-11-11S5.925,1.001,12,1.001z\n            M14.5,17.005H13\n            c-0.552,0-1-0.448-1-1v-6.5c0-0.276-0.224-0.5-0.5-0.5H10\n            M11.745,6.504L11.745,6.504\n            M11.745,6.5c-0.138,0-0.25,0.112-0.25,0.25\n            S11.607,7,11.745,7s0.25-0.112,0.25-0.25S11.883,6.5,11.745,6.5"}))},l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e){var t=e.doc,n=e.render,r=i.useState(),o=r[0],c=r[1];return i.useEffect(function(){t.getMetadata().then(function(e){return Promise.resolve(e)}).then(function(e){return t.getDownloadInfo().then(function(t){return Promise.resolve({fileName:e.contentDispositionFilename||"",info:e.info,length:t.length})})}).then(function(e){c(e)})},[]),o?n(o):i.createElement("div",{className:"rpv-properties__loader"},i.createElement(a.Spinner,null))},s=function(e){var t=e.label,n=e.value,r=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft;return i.createElement("dl",{className:a.classNames({"rpv-properties__item":!0,"rpv-properties__item--rtl":r})},i.createElement("dt",{className:"rpv-properties__item-label"},t,":"),i.createElement("dd",{className:"rpv-properties__item-value"},n||"-"))},d=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),p=function(e,t,n,r){var o=parseInt(e,10);return o>=t&&o<=n?o:r},f=function(e){var t=e.doc,n=e.fileName,r=e.onToggle,o=i.useContext(a.LocalizationContext).l10n,c=function(e){var t=function(e){var t=d.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=p(t[2],1,12,1)-1,o=p(t[3],1,31,1),a=p(t[4],0,23,0),i=p(t[5],0,59,0),c=p(t[6],0,59,0),l=t[7]||"Z",u=p(t[8],0,23,0),s=p(t[9],0,59,0);switch(l){case"-":a+=u,i+=s;break;case"+":a-=u,i-=s}return new Date(Date.UTC(n,r,o,a,i,c))}(e);return t?"".concat(t.toLocaleDateString(),", ").concat(t.toLocaleTimeString()):""};return i.createElement("div",{className:"rpv-properties__modal"},i.createElement(u,{doc:t,render:function(e){var r,l,u;return i.createElement(i.Fragment,null,i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(s,{label:o&&o.properties?o.properties.fileName:"File name",value:e.fileName||((u=n.split("/").pop())?u.split("#")[0].split("?")[0]:n)}),i.createElement(s,{label:o&&o.properties?o.properties.fileSize:"File size",value:(l=Math.floor(Math.log(r=e.length)/Math.log(1024)),"".concat((r/Math.pow(1024,l)).toFixed(2)," ").concat(["B","kB","MB","GB","TB"][l]))})),i.createElement(a.Separator,null),i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(s,{label:o&&o.properties?o.properties.title:"Title",value:e.info.Title}),i.createElement(s,{label:o&&o.properties?o.properties.author:"Author",value:e.info.Author}),i.createElement(s,{label:o&&o.properties?o.properties.subject:"Subject",value:e.info.Subject}),i.createElement(s,{label:o&&o.properties?o.properties.keywords:"Keywords",value:e.info.Keywords}),i.createElement(s,{label:o&&o.properties?o.properties.creator:"Creator",value:e.info.Creator}),i.createElement(s,{label:o&&o.properties?o.properties.creationDate:"Creation date",value:c(e.info.CreationDate)}),i.createElement(s,{label:o&&o.properties?o.properties.modificationDate:"Modification date",value:c(e.info.ModDate)})),i.createElement(a.Separator,null),i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(s,{label:o&&o.properties?o.properties.pdfProducer:"PDF producer",value:e.info.Producer}),i.createElement(s,{label:o&&o.properties?o.properties.pdfVersion:"PDF version",value:e.info.PDFFormatVersion}),i.createElement(s,{label:o&&o.properties?o.properties.pageCount:"Page count",value:"".concat(t.numPages)})))}}),i.createElement("div",{className:"rpv-properties__modal-footer"},i.createElement(a.Button,{onClick:r},o&&o.properties?o.properties.close:"Close")))},m={left:0,top:8},g=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.properties?n.properties.showProperties:"Show properties";
1return i.createElement(a.Tooltip,{ariaControlsSuffix:"properties",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:r,testId:"properties__button",onClick:t},i.createElement(c,null)),content:function(){return r},offset:m})},h=function(e){var t,n,r,o,c,u=e.children,s=e.store,d=(r=(n=i.useState(s.get("doc")))[0],o=n[1],c=function(e){o(e)},i.useEffect(function(){return s.subscribe("doc",c),function(){s.unsubscribe("doc",c)}},[]),{currentDoc:r}).currentDoc,p=s.get("fileName")||"",m=u||function(e){return i.createElement(g,l({},e))};return d?i.createElement(a.Modal,{ariaControlsSuffix:"properties",target:function(e){return m({onClick:e})},content:function(e){return i.createElement(f,{doc:d,fileName:p,onToggle:e})},closeOnClickOutside:!0,closeOnEscape:!0}):i.createElement(i.Fragment,null)},v=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.properties?n.properties.showProperties:"Show properties";return i.createElement(a.MenuItem,{icon:i.createElement(c,null),testId:"properties__menu",onClick:t},r)};t.InfoIcon=c,t.propertiesPlugin=function(){var e=i.useMemo(function(){return a.createStore({fileName:""})},[]),t=function(t){return i.createElement(h,l({},t,{store:e}))};return{onDocumentLoad:function(t){e.update("doc",t.doc)},onViewerStateChange:function(t){return e.update("fileName",t.file.name),t},ShowProperties:t,ShowPropertiesButton:function(){return i.createElement(h,{store:e})},ShowPropertiesMenuItem:function(e){return i.createElement(t,null,function(e){return i.createElement(v,l({},e))})}}}},12434:function(e,t,n){"use strict";e.exports=n(88700)},61779:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n            M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n            M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n            M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n            M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n            M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n            M13.5,1.75L10,4.25l3.5,2.5"}))},l=function(){return i.createElement(a.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n            M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n            M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n            M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n            M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n            M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n            M10.5,1.75l3.5,2.5l-3.5,2.5"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s={left:0,top:8},d=function(e){var t=e.direction,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.rotate?r.rotate.rotateBackward:"Rotate counterclockwise",u=r&&r.rotate?r.rotate.rotateForward:"Rotate clockwise",d=t===a.RotateDirection.Backward?o:u,p=t===a.RotateDirection.Backward?i.createElement(c,null):i.createElement(l,null);return i.createElement(a.Tooltip,{ariaControlsSuffix:"rotate",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:d,testId:t===a.RotateDirection.Backward?"rotate__backward-button":"rotate__forward-button",onClick:n},p),content:function(){return d},offset:s})},p=function(e){var t=e.children,n=e.direction,r=e.store;return(t||function(e){return i.createElement(d,{direction:e.direction,onClick:e.onClick})})({direction:n,onClick:function(){var e=r.get("rotate");e&&e(n)}})},f=function(e){var t=e.direction,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.rotate?r.rotate.rotateBackward:"Rotate counterclockwise",u=r&&r.rotate?r.rotate.rotateForward:"Rotate clockwise",s=t===a.RotateDirection.Backward?o:u,d=t===a.RotateDirection.Backward?i.createElement(c,null):i.createElement(l,null);return i.createElement(a.MenuItem,{icon:d,testId:t===a.RotateDirection.Backward?"rotate__backward-menu":"rotate__forward-menu",onClick:n},s)},m=function(e){var t=e.children,n=e.store;return t({onRotatePage:function(e,t){var r=n.get("rotatePage");r&&r(e,t)}})};t.RotateBackwardIcon=c,t.RotateForwardIcon=l,t.rotatePlugin=function(){var e=i.useMemo(function(){return a.createStore(
1)},[]),t=function(t){return i.createElement(p,u({},t,{store:e}))};return{install:function(t){e.update("rotate",t.rotate),e.update("rotatePage",t.rotatePage)},Rotate:t,RotateBackwardButton:function(){return i.createElement(t,{direction:a.RotateDirection.Backward},function(e){return i.createElement(d,u({},e))})},RotateBackwardMenuItem:function(e){return i.createElement(t,{direction:a.RotateDirection.Backward},function(t){return i.createElement(f,{direction:t.direction,onClick:function(){t.onClick(),e.onClick()}})})},RotateForwardButton:function(){return i.createElement(t,{direction:a.RotateDirection.Forward},function(e){return i.createElement(d,u({},e))})},RotateForwardMenuItem:function(e){return i.createElement(t,{direction:a.RotateDirection.Forward},function(t){return i.createElement(f,{direction:t.direction,onClick:function(){t.onClick(),e.onClick()}})})},RotatePage:function(t){return i.createElement(m,u({},t,{store:e}))}}}},77719:function(e,t,n){"use strict";e.exports=n(61779)},84870:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("rect",{x:"0.5",y:"0.497",width:"22",height:"22",rx:"1",ry:"1"}),i.createElement("line",{x1:"0.5",y1:"6.497",x2:"22.5",y2:"6.497"}),i.createElement("line",{x1:"11.5",y1:"6.497",x2:"11.5",y2:"22.497"}))},l=function(){return i.createElement(a.Icon,{size:16},i.createElement("rect",{x:"0.5",y:"0.497",width:"22",height:"22",rx:"1",ry:"1"}),i.createElement("line",{x1:"11.5",y1:"0.497",x2:"11.5",y2:"22.497"}))},u=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M6.5,21.5c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z\n            M14.5,21.5c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z\n            M22.5,21.5 c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z"}))},s=function(){return i.createElement(a.Icon,{size:16},i.createElement("rect",{x:"0.5",y:"0.497",width:"22",height:"22",rx:"1",ry:"1"}))},d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e,t){e.get("switchScrollMode")(t);var n=e.get("viewMode");t!==a.ScrollMode.Horizontal&&t!==a.ScrollMode.Wrapped||n===a.ViewMode.SinglePage||e.get("switchViewMode")(a.ViewMode.SinglePage)},f=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M23.5,5.5c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V5.5z\n            M23.5,13.5c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V13.5z\n            M23.5,21.5 c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V21.5z"}))},m=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M10.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n            M23.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n            M10.5,22.5 c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z\n            M23.5,22.5c0,0.552-0.448,1-1,1 h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z"}))},g=function(e){var t=e.children,n=e.mode,r=e.onClick,o=i.useContext(a.LocalizationContext).l10n,c="",l=i.createElement(f,null);switch(n){case a.ScrollMode.Horizontal:c=o&&o.scrollMode?o.scrollMode.horizontalScrolling:"Horizontal scrolling",l=i.createElement(u,null);break;case a.ScrollMode.Page:c=o&&o.scrollMode?o.scrollMode.pageScrolling:"Page scrolling",l=i.createElement(s,null);break;case a.ScrollMode.Wrapped:c=o&&o.scrollMode?o.scrollMode.wrappedScrolling:"Wrapped scrolling",l=i.createElement(m,null);break;case a.ScrollMode.Vertical:default:c=o&&o.scrollMode?o.scrollMode.verticalScrolling:"Vertical scrolling",l=i.createElement(f,null)}return t({icon:l,label:c,onClick:r})},h={left:0,top:8},v=function(e){var t=e.isDisabled,n=e.isSelected,r=e.mode,o=e.onClick,c="";switch(r){case a.ScrollMode.Horizontal:c="scroll-mode__horizontal-button";break;case a.ScrollMode.Page:c="scroll-mode__page-button";break;case a.ScrollMode.Wrapped:c="scroll-mode__wrapped-button";break;case a.ScrollMode.Vertical:default:c="scroll-mode__vertical-button"}return i.createElement(g,{mode:r,onClick:o}
1,function(e){return i.createElement(a.Tooltip,{ariaControlsSuffix:"scroll-mode-switch",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:e.label,isDisabled:t,isSelected:n,testId:c,onClick:e.onClick},e.icon),content:function(){return e.label},offset:h})})},b=function(e){var t=i.useState(e.get("scrollMode")||a.ScrollMode.Vertical),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect(function(){return e.subscribe("scrollMode",o),function(){e.unsubscribe("scrollMode",o)}},[]),{scrollMode:n}},E=function(e){var t=i.useState(e.get("viewMode")||a.ViewMode.SinglePage),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect(function(){return e.subscribe("viewMode",o),function(){e.unsubscribe("viewMode",o)}},[]),{viewMode:n}},w=function(e){var t=e.children,n=e.mode,r=e.store,o=E(r).viewMode,c=b(r).scrollMode===n,l=(n===a.ScrollMode.Horizontal||n===a.ScrollMode.Wrapped)&&o!==a.ViewMode.SinglePage;return(t||function(e){return i.createElement(v,{isDisabled:l,isSelected:c,mode:e.mode,onClick:e.onClick})})({isDisabled:l,isSelected:c,mode:n,onClick:function(){p(r,n)}})},S=function(e){var t=e.isDisabled,n=e.isSelected,r=e.mode,o=e.onClick,c="";switch(r){case a.ScrollMode.Horizontal:c="scroll-mode__horizontal-menu";break;case a.ScrollMode.Page:c="scroll-mode__page-menu";break;case a.ScrollMode.Wrapped:c="scroll-mode__wrapped-menu";break;case a.ScrollMode.Vertical:default:c="scroll-mode__vertical-menu"}return i.createElement(g,{mode:r,onClick:o},function(e){return i.createElement(a.MenuItem,{checked:n,icon:e.icon,isDisabled:t,testId:c,onClick:e.onClick},e.label)})},_=function(e,t){e.get("switchViewMode")(t);var n=e.get("scrollMode");n!==a.ScrollMode.Horizontal&&n!==a.ScrollMode.Wrapped||t===a.ViewMode.SinglePage||e.get("switchScrollMode")(a.ScrollMode.Vertical)},k=function(e){var t=e.children,n=e.mode,r=e.onClick,o=i.useContext(a.LocalizationContext).l10n,u="",d=i.createElement(s,null);switch(n){case a.ViewMode.DualPage:u=o&&o.scrollMode?o.scrollMode.dualPage:"Dual page",d=i.createElement(l,null);break;case a.ViewMode.DualPageWithCover:u=o&&o.scrollMode?o.scrollMode.dualPageCover:"Dual page with cover",d=i.createElement(c,null);break;case a.ViewMode.SinglePage:default:u=o&&o.scrollMode?o.scrollMode.singlePage:"Single page",d=i.createElement(s,null)}return t({icon:d,label:u,onClick:r})},C={left:0,top:8},y=function(e){var t=e.isDisabled,n=e.isSelected,r=e.mode,o=e.onClick,c="";switch(r){case a.ViewMode.DualPage:c="view-mode__dual-button";break;case a.ViewMode.DualPageWithCover:c="view-mode__dual-cover-button";break;case a.ViewMode.SinglePage:default:c="view-mode__single-button"}return i.createElement(k,{mode:r,onClick:o},function(e){return i.createElement(a.Tooltip,{ariaControlsSuffix:"view-mode-switch",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:e.label,isDisabled:t,isSelected:n,testId:c,onClick:e.onClick},e.icon),content:function(){return e.label},offset:C})})},P=function(e){var t=e.children,n=e.mode,r=e.store,o=E(r).viewMode,c=b(r).scrollMode,l=o===n,u=(c===a.ScrollMode.Horizontal||c===a.ScrollMode.Wrapped)&&n!==a.ViewMode.SinglePage;return(t||function(e){return i.createElement(y,{isDisabled:u,isSelected:l,mode:e.mode,onClick:e.onClick})})({isDisabled:u,isSelected:l,mode:n,onClick:function(){_(r,n)}})},M=function(e){var t=e.isDisabled,n=e.isSelected,r=e.mode,o=e.onClick,c="";switch(r){case a.ViewMode.DualPage:c="view-mode__dual-menu";break;case a.ViewMode.DualPageWithCover:c="view-mode__dual-cover-menu";break;case a.ViewMode.SinglePage:default:c="view-mode__single-menu"}return i.createElement(k,{mode:r,onClick:o},function(e){return i.createElement(a.MenuItem,{checked:n,icon:e.icon,isDisabled:t,testId:c,onClick:e.onClick},e.label)})};t.DualPageCoverViewModeIcon=c,t.DualPageViewModeIcon=l,t.HorizontalScrollingIcon=u,t.PageScrollingIcon=s,t.VerticalScrollingIcon=f,t.WrappedScrollingIcon=m,t.scrollModePlugin=function(){var e=i.useMemo(function(){return a.createStore({scrollMode:a.ScrollMode.Vertical,viewMode:a.ViewMode.SinglePage,switchScrollMode:function(){},switchViewMode:function(){}})},[]),t=function(t){return i.createElement(w,d({},t,{store:e}))},n=function(t){return i.createElement(P,d({},t,{store:e}))};return{install:function(t){e.update("switchScrollMode",t.switchScrollMode),e.update("switchViewMode",t.switchViewMode)},onViewerStateChange:function(t){return e.update("scrollMode",t.scrollMode),e.update("viewMode",t.viewM
1ode),t},switchScrollMode:function(t){p(e,t)},switchViewMode:function(t){_(e,t)},SwitchScrollMode:t,SwitchScrollModeButton:function(e){return i.createElement(t,{mode:e.mode},function(e){return i.createElement(v,{isDisabled:e.isDisabled,isSelected:e.isSelected,mode:e.mode,onClick:function(){e.onClick()}})})},SwitchScrollModeMenuItem:function(e){return i.createElement(t,{mode:e.mode},function(t){return i.createElement(S,{isDisabled:t.isDisabled,isSelected:t.isSelected,mode:t.mode,onClick:function(){t.onClick(),e.onClick()}})})},SwitchViewMode:n,SwitchViewModeButton:function(e){return i.createElement(n,{mode:e.mode},function(e){return i.createElement(y,{isDisabled:e.isDisabled,isSelected:e.isSelected,mode:e.mode,onClick:function(){e.onClick()}})})},SwitchViewModeMenuItem:function(e){return i.createElement(n,{mode:e.mode},function(t){return i.createElement(M,{isDisabled:t.isDisabled,isSelected:t.isSelected,mode:t.mode,onClick:function(){t.onClick(),e.onClick()}})})}}}},64:function(e,t,n){"use strict";e.exports=n(84870)},67255:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n            L23.541,5.627"}))},l=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n            L0.535,18.373"}))},u=function(){return i.createElement(a.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.5c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.5,10.5,0.5z\n            M23.5,23.5\n            l-5.929-5.929"}))},s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d={keyword:"",regExp:RegExp(" "),wholeWords:!1},p=function(e){return{left:"".concat(e.left,"%"),top:"".concat(e.top,"%"),height:"".concat(e.height,"%"),width:"".concat(e.width,"%")}},f=function(e){var t=e.index,n=e.area,r=e.onHighlightKeyword,o=i.useRef();return a.useIsomorphicLayoutEffect(function(){var e=o.current;r&&e&&r({highlightEle:e,keyword:n.keyword})},[]),i.createElement("div",{className:"rpv-search__highlight","data-index":t,ref:o,style:p(n),title:n.keywordStr.trim()})},m=function(e){var t=e.parentNode;t&&t.removeChild(e)},g=function(e){var t=e.parentNode;if(t){var n,r,o,a=document.createRange();a.selectNodeContents(e),m(n=a.extractContents()),(o=e.parentNode)&&o.insertBefore(n,e),m(e),t.normalize()}},h=function(e,t){return e.top<t.top?-1:e.top>t.top?1:e.left<t.left?-1:e.left>t.left?1:0},v=function(e){var t=e.numPages,n=e.pageIndex,r=e.renderHighlights,o=e.store,c=e.onHighlightKeyword,l=i.useRef(),u=i.useCallback(function(e){return i.createElement(i.Fragment,null,e.highlightAreas.map(function(e,t){return i.createElement(f,{index:t,key:t,area:e,onHighlightKeyword:c})}))},[]),s=i.useState(o.get("matchPosition")),m=s[0],v=s[1],b=i.useState(o.get("keyword")||[d]),E=b[0],w=b[1],S=i.useState({pageIndex:n,scale:1,status:a.LayerRenderStatus.PreRender}),_=S[0],k=S[1],C=i.useRef(null),y=i.useRef([]),P=i.useState([]),M=P[0],x=P[1],R=function(){return!0},T=i.useCallback(function(){return o.get("targetPageFilter")||R},[o.get("targetPageFilter")]),L=function(e){var r=y.current;if(0===r.length)return[];var o=[],a=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")),i=r.map(function(e){return e.char}).join("");return E.forEach(function(c){var l=c.keyword;if(l.trim()){for(var u,s=-1===c.regExp.flags.indexOf("g")?RegExp(c.regExp,"".concat(c.regExp.flags,"g")):c.regExp,d=[];null!==(u=s.exec(i));)d.push({keyword:s,startIndex:u.index,endIndex:s.lastIndex});d.map(function(e){return{keyword:e.keyword,indexes:r.slice(e.startIndex,e.endIndex)}}
1).forEach(function(r){Object.values(r.indexes.reduce(function(e,t){return e[t.spanIndex]=(e[t.spanIndex]||[]).concat([t]),e},{})).forEach(function(i){if(1!==i.length||""!==i[0].char.trim()){var u=c.wholeWords?i.slice(1,-1):i,s=function(e,r,o,a,i){var c=document.createRange(),l=a.firstChild;if(!l||l.nodeType!==Node.TEXT_NODE)return null;var u=l.textContent.length,s=i[0].charIndexInSpan,d=1===i.length?s:i[i.length-1].charIndexInSpan;if(s>u||d+1>u)return null;c.setStart(l,s),c.setEnd(l,d+1);var p=document.createElement("span");c.surroundContents(p);var f=p.getBoundingClientRect(),m=o.getBoundingClientRect(),h=m.height,v=m.width,b=100*(f.left-m.left)/v,E=100*(f.top-m.top)/h,w=100*f.height/h,S=100*f.width/v;return g(p),{keyword:r,keywordStr:e,numPages:t,pageIndex:n,left:b,top:E,height:w,width:S,pageHeight:h,pageWidth:v}}(l,r.keyword,e,a[u[0].spanIndex],u);s&&o.push(s)}})})}}),o.sort(h)},I=function(e){e&&e.length>0&&w(e)},O=function(e){return v(e)},D=function(e){if(e.has(n)){var t=e.get(n);t&&k({ele:t.ele,pageIndex:n,scale:t.scale,status:t.status})}},F=function(){return 0===E.length||1===E.length&&""===E[0].keyword.trim()};return i.useEffect(function(){if(!F()&&_.status===a.LayerRenderStatus.DidRender&&!y.current.length){var e=_.ele,t=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).map(function(e){return e.textContent}).reduce(function(e,t,n){return e.concat(t.split("").map(function(e,t){return{char:e,charIndexInSpan:t,spanIndex:n}}))},[{char:"",charIndexInSpan:0,spanIndex:0}]).slice(1);y.current=t}},[E,_.status]),i.useEffect(function(){if(!F()&&_.ele&&_.status===a.LayerRenderStatus.DidRender&&T()({pageIndex:n,numPages:t})){var e=L(_.ele);x(e)}},[E,m,_.status,y.current]),i.useEffect(function(){F()&&_.ele&&_.status===a.LayerRenderStatus.DidRender&&x([])},[E,_.status]),i.useEffect(function(){if(0!==M.length){var e=l.current;if(m.pageIndex===n&&e&&_.status===a.LayerRenderStatus.DidRender){var t=e.querySelector('.rpv-search__highlight[data-index="'.concat(m.matchIndex,'"]'));if(t){var r=function(e,t){for(var n=e.offsetTop,r=e.offsetLeft,o=e.parentElement;o&&o!==t;)n+=o.offsetTop,r+=o.offsetLeft,o=o.parentElement;return{left:r,top:n}}(t,e),i=r.left,c=r.top,u=o.get("jumpToDestination");u&&(u({pageIndex:n,bottomOffset:(e.getBoundingClientRect().height-c)/_.scale,leftOffset:i/_.scale,scaleTo:_.scale}),C.current&&C.current.classList.remove("rpv-search__highlight--current"),C.current=t,t.classList.add("rpv-search__highlight--current"))}}}},[M,m]),i.useEffect(function(){return o.subscribe("keyword",I),o.subscribe("matchPosition",O),o.subscribe("renderStatus",D),function(){o.unsubscribe("keyword",I),o.unsubscribe("matchPosition",O),o.unsubscribe("renderStatus",D)}},[]),i.createElement("div",{className:"rpv-search__highlights","data-testid":"search__highlights-".concat(n),ref:l},(r||u)({getCssProperties:p,highlightAreas:M}))},b=function(e){var t=e.wholeWords?" ".concat(e.keyword," "):e.keyword,n=e.matchCase?"g":"gi";return{keyword:e.keyword,regExp:RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n),wholeWords:e.wholeWords||!1}},E=function(e,t,n){return e instanceof RegExp?{keyword:e.source,regExp:e,wholeWords:n||!1}:"string"==typeof e?""===e?d:b({keyword:e,matchCase:t||!1,wholeWords:n||!1}):(void 0!==t&&(e.matchCase=t),void 0!==n&&(e.wholeWords=n),b(e))},w=function(e){var t,n,r,o,c=e.get("initialKeyword"),l=i.useMemo(function(){if(c&&1===c.length){var e=E(c[0]);return{matchCase:-1===e.regExp.flags.indexOf("i"),wholeWords:e.wholeWords}}return{matchCase:!1,wholeWords:!1}},[]),u=(n=i.useRef(e.get("doc")),r=function(e){n.current=e},i.useEffect(function(){return e.subscribe("doc",r),function(){e.unsubscribe("doc",r)}},[]),n),s=i.useState(c),p=s[0],f=s[1],m=i.useState([]),g=m[0],h=m[1],v=i.useState(0),b=v[0],w=v[1],S=i.useState(l.matchCase),_=S[0],k=S[1],C=i.useRef([]),y=i.useState(l.wholeWords),P=y[0],M=y[1],x=function(){return!0},R=i.useCallback(function(){return e.get("targetPageFilter")||x},[e.get("targetPageFilter")]),T=function(e){var t=g.length;if(0===p.length||0===t)return null;var n=e===t+1?1:Math.max(1,Math.min(t,e));return w(n),I(g[n-1])},L=function(e){return f(""===e?[]:[e])},I=function(t){var n=e.get("jumpToPage");return n&&n(t.pageIndex),e.update("matchPosition",{matchIndex:t.matchIndex,pageIndex:t.pageIndex}),t},O=function(t,n,r){var o=u.current;if(!o)return Promise.resolve([]);var i=o.numPages,c=t.map(function(e){return E(e,n,r)});return e.update("keyword",c),w(0),h([]),new Promise(function(e,t){var n;(0===C.current.length?(n=u.current,n?Promise.all(Array(n.numPages).fill(0).map(function(e,t){return a.getPage(n,t).then(function(e){return e.getTextContent()}).then(function(e){return Promise.resolve({pageContent:e.items.map(function(e){return e.str||""}).join(""),pageIndex:t})})})).then(function(e){return e.sort(function(e,t){return e.pageIndex-t.pageIndex}),Promise.resolve(e.map(function(e){return e.pageContent}))}):Promise.resolve([])).then(function(e){return C.current=e,Promise.resolve(e)}):Promise.resolve(C.current)).then(function(t){var n=[];t.forEach(function(e,t){R()({pageIndex:t,numPages:i}
1)&&c.forEach(function(r){for(var o,a=0;null!==(o=r.regExp.exec(e));)n.push({keyword:r.regExp,matchIndex:a,pageIndex:t,pageText:e,startIndex:o.index,endIndex:r.regExp.lastIndex}),a++})}),h(n),n.length>0&&(w(1),I(n[0])),e(n)})})};return i.useEffect(function(){C.current=[]},[u.current]),{clearKeyword:function(){e.update("keyword",[d]),L(""),w(0),h([]),k(!1),M(!1)},changeMatchCase:function(e){k(e),p.length>0&&O(p,e,P)},changeWholeWords:function(e){M(e),p.length>0&&O(p,_,e)},currentMatch:b,jumpToMatch:T,jumpToNextMatch:function(){return T(b+1)},jumpToPreviousMatch:function(){return T(b-1)},keywords:p,matchCase:_,numberOfMatches:g.length,wholeWords:P,search:function(){return O(p,_,P)},searchFor:O,setKeywords:f,keyword:0===p.length?"":(o=p[0])instanceof RegExp?o.source:"string"==typeof o?o:o.keyword,setKeyword:L,setTargetPages:function(t){e.update("targetPageFilter",t)}}},S=function(e){var t=e.children,n=e.store,r=w(n),o=i.useState(!1),a=o[0],c=o[1],l=function(e){return c(!0)};return i.useEffect(function(){return n.subscribe("doc",l),function(){n.unsubscribe("doc",l)}},[]),t(s(s({},r),{isDocumentLoaded:a}))},_=function(e){var t=e.containerRef,n=e.store,r=i.useRef(!1),o=function(){r.current=!0},c=function(){r.current=!1},l=function(e){var o=t.current;o&&(e.shiftKey||e.altKey||"f"!==e.key||(a.isMac()?e.metaKey&&!e.ctrlKey:e.ctrlKey)&&(r.current||document.activeElement&&o.contains(document.activeElement))&&(e.preventDefault(),n.update("areShortcutsPressed",!0)))};return i.useEffect(function(){var e=t.current;if(e)return document.addEventListener("keydown",l),e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",c),function(){document.removeEventListener("keydown",l),e.removeEventListener("mouseenter",o),e.removeEventListener("mouseleave",c)}},[t.current]),i.createElement(i.Fragment,null)},k={left:0,top:8},C=function(e){var t=e.store,n=e.onToggle,r=i.useContext(a.LocalizationContext).l10n,o=i.useContext(a.ThemeContext).direction,u=i.useState(!1),s=u[0],d=u[1],p=i.useState(!1),f=p[0],m=p[1],g=o===a.TextDirection.RightToLeft,h=w(t),v=h.clearKeyword,b=h.changeMatchCase,E=h.changeWholeWords,S=h.currentMatch,_=h.jumpToNextMatch,C=h.jumpToPreviousMatch,y=h.keyword,P=h.matchCase,M=h.numberOfMatches,x=h.wholeWords,R=h.search,T=h.setKeyword,L=function(e){d(!0),R().then(function(t){d(!1),m(!0),e&&e()})};i.useEffect(function(){var e=t.get("initialKeyword");e&&1===e.length&&y&&L(function(){t.update("initialKeyword",[])})},[]);var I=r&&r.search?r.search.enterToSearch:"Enter to search",O=r&&r.search?r.search.previousMatch:"Previous match",D=r&&r.search?r.search.nextMatch:"Next match",F=r&&r.search?r.search.close:"Close";return i.createElement("div",{className:"rpv-search__popover"},i.createElement("div",{className:"rpv-search__popover-input-counter"},i.createElement(a.TextBox,{ariaLabel:I,autoFocus:!0,placeholder:I,type:"text",value:y,onChange:function(e){m(!1),T(e)},onKeyDown:function(e){"Enter"===e.key&&y&&(f?_():L())}}),i.createElement("div",{className:a.classNames({"rpv-search__popover-counter":!0,"rpv-search__popover-counter--ltr":!g,"rpv-search__popover-counter--rtl":g})},s&&i.createElement(a.Spinner,{testId:"search__popover-searching",size:"1rem"}),!s&&i.createElement("span",{"data-testid":"search__popover-num-matches"},S,"/",M))),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox","data-testid":"search__popover-match-case",checked:P,type:"checkbox",onChange:function(e){m(!1),b(e.target.checked)}})," ",r&&r.search?r.search.matchCase:"Match case"),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox",checked:x,"data-testid":"search__popover-whole-words",type:"checkbox",onChange:function(e){m(!1),E(e.target.checked)}})," ",r&&r.search?r.search.wholeWords:"Whole words"),i.createElement("div",{className:"rpv-search__popover-footer"},i.createElement("div",{className:"rpv-search__popover-footer-item"},i.createElement(a.Tooltip,{ariaControlsSuffix:"search-previous-match",position:g?a.Position.BottomRight:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:O,isDisabled:S<=1,onClick:C},i.createElement(l,null)),content:function(){return O},offset:k})),i.createElement("div",{className:"rpv-search__popover-footer-item"}
1,i.createElement(a.Tooltip,{ariaControlsSuffix:"search-next-match",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:D,isDisabled:S>M-1,onClick:_},i.createElement(c,null)),content:function(){return D},offset:k})),i.createElement("div",{className:a.classNames({"rpv-search__popover-footer-button":!0,"rpv-search__popover-footer-button--ltr":!g,"rpv-search__popover-footer-button--rtl":g})},i.createElement(a.Button,{onClick:function(){n(),v()}},F))))},y=function(e){var t=e.children,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.search?r.search.search:"Search";return t({icon:i.createElement(u,null),label:o,onClick:n})},P={left:0,top:8},M=function(e){var t=e.enableShortcuts,n=e.store,r=e.onClick,o=t?a.isMac()?"Meta+F":"Ctrl+F":"",c=function(e){e&&r()};return i.useEffect(function(){return n.subscribe("areShortcutsPressed",c),function(){n.unsubscribe("areShortcutsPressed",c)}},[]),i.createElement(y,{onClick:r},function(e){return i.createElement(a.Tooltip,{ariaControlsSuffix:"search-popover",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaKeyShortcuts:o,ariaLabel:e.label,testId:"search__popover-button",onClick:r},e.icon),content:function(){return e.label},offset:P})})},x={left:0,top:8},R=function(e){var t=e.children,n=e.enableShortcuts,r=e.store,o=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft?a.Position.BottomRight:a.Position.BottomLeft,c=t||function(e){return i.createElement(M,s({enableShortcuts:n,store:r},e))};return i.createElement(a.Popover,{ariaControlsSuffix:"search",lockScroll:!1,position:o,target:function(e){return c({onClick:e})},content:function(e){return i.createElement(C,{store:r,onToggle:e})},offset:x,closeOnClickOutside:!1,closeOnEscape:!0})},T=function(e){return Array.isArray(e)?e.map(function(e){return E(e)}):[E(e)]};t.NextIcon=c,t.PreviousIcon=l,t.SearchIcon=u,t.searchPlugin=function(e){var t=i.useMemo(function(){return Object.assign({},{enableShortcuts:!0,onHighlightKeyword:function(){}},e)},[]),n=i.useMemo(function(){return a.createStore({initialKeyword:e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],keyword:e&&e.keyword?T(e.keyword):[d],matchPosition:{matchIndex:-1,pageIndex:-1},renderStatus:new Map})},[]),r=w(n),o=r.clearKeyword,c=r.jumpToMatch,l=r.jumpToNextMatch,u=r.jumpToPreviousMatch,p=r.
1searchFor,f=r.setKeywords,m=r.setTargetPages,g=function(e){return i.createElement(R,s({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{install:function(t){var r=e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],o=e&&e.keyword?T(e.keyword):[d];n.update("initialKeyword",r),n.update("jumpToDestination",t.jumpToDestination),n.update("jumpToPage",t.jumpToPage),n.update("keyword",o)},renderPageLayer:function(r){return i.createElement(v,{key:r.pageIndex,numPages:r.doc.numPages,pageIndex:r.pageIndex,renderHighlights:null==e?void 0:e.renderHighlights,store:n,onHighlightKeyword:t.onHighlightKeyword})},renderViewer:function(e){var r=e.slot;return r.subSlot&&(r.subSlot.children=i.createElement(i.Fragment,null,t.enableShortcuts&&i.createElement(_,{containerRef:e.containerRef,store:n}),r.subSlot.children)),r},uninstall:function(e){var t=n.get("renderStatus");t&&t.clear()},onDocumentLoad:function(e){n.update("doc",e.doc)},onTextLayerRender:function(e){var t=n.get("renderStatus");t&&(t=t.set(e.pageIndex,e),n.update("renderStatus",t))},Search:function(e){return i.createElement(S,s({},e,{store:n}))},ShowSearchPopover:g,ShowSearchPopoverButton:function(){return i.createElement(g,null,function(e){return i.createElement(M,s({enableShortcuts:t.enableShortcuts,store:n},e))})},clearHighlights:function(){o()},highlight:function(e){var t=Array.isArray(e)?e:[e];return f(t),p(t)},jumpToMatch:c,jumpToNextMatch:l,jumpToPreviousMatch:u,setTargetPages:m}}},27973:function(e,t,n){"use strict";e.exports=n(67255)},51530:function(e,t,n){"use strict";var r,o,a,i=n(54141),c=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),l=function(){return c.createElement(i.Icon,{size:16},c.createElement("path",{d:"M11.5,5.5v-2C11.5,2.672,12.172,2,13,2s1.5,0.672,1.5,1.5v2 M14.5,11.5v-6C14.5,4.672,15.172,4,16,4\n            c0.828,0,1.5,0.672,1.5,1.5v3 M17.5,13V8.5C17.5,7.672,18.172,7,19,7s1.5,0.672,1.5,1.5v10c0,2.761-2.239,5-5,5h-3.335\n            c-1.712-0.001-3.305-0.876-4.223-2.321C6.22,18.467,4.083,14,4.083,14c-0.378-0.545-0.242-1.292,0.303-1.67\n            c0.446-0.309,1.044-0.281,1.458,0.07L8.5,15.5v-10C8.5,4.672,9.172,4,10,4s1.5,0.672,1.5,1.5v6"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};t.SelectionMode=void 0,(a=t.SelectionMode||(t.SelectionMode={})).Hand="Hand",a.Text="Text";var s=function(){return c.createElement(i.Icon,{size:16},c.createElement("path",{d:"M13.675,11.671l2.941-2.941c0.195-0.196,0.195-0.512-0.001-0.707C16.563,7.971,16.5,7.931,16.43,7.906\n            L4.168,3.527C3.908,3.434,3.622,3.57,3.529,3.83c-0.039,0.109-0.039,0.228,0,0.336l4.379,12.262\n            c0.093,0.26,0.379,0.396,0.639,0.303c0.07-0.025,0.133-0.065,0.185-0.117l2.943-2.943l6.146,6.146c0.195,0.195,0.512,0.195,0.707,0\n            l1.293-1.293c0.195-0.195,0.195-0.512,0-0.707L13.675,11.671z"}))},d=function(e){var n=e.children,r=e.mode,o=e.onClick,a=c.useContext(i.LocalizationContext).l10n,u="",d=c.createElement(s,null);switch(r){case t.SelectionMode.Hand:u=a&&a.selectionMode?a.selectionMode.handTool:"Hand tool",d=c.createElement(l,null);break;case t.SelectionMode.Text:default:u=a&&a.selectionMode?a.selectionMode.textSelectionTool:"Text selection tool",d=c.createElement(s,null)}return n({icon:d,label:u,onClick:o})},p={left:0,top:8},f=function(e){var n=e.isSelected,r=e.mode,o=e.onClick,a="";switch(r){case t.SelectionMode.Hand:a="selection-mode__hand-button";break;case t.SelectionMode.Text:default:a="selection-mode__text-button"}return c.createElement(d,{mode:r,onClick:o},function(e){return c.createElement(i.Tooltip,{ariaControlsSuffix:"selection-mode-switch",position:i.Position.BottomCenter,target:c.createElement(i.MinimalButton,{ariaLabel:e.label,isSelected:n,testId:a,onClick:e.onClick},e.icon),content:function(){return e.label},offset:p})})},m=function(e){var t=e.children,n=e.mode,r=e.store,o=n===r.get("selectionMode");return(t||function(e){return c.createElement(f,{isSelected:o,mode:e.mode,onClick:e.onClick})})({isSelected:o,mode:n,onClick:function(){return r.update("selectionMode",n)}})},g=function(e){var n=e.isSelected,r=e.mode,o=e.onClick,a="";switch(r){case t.SelectionMode.Hand:a="selection-mode__hand-menu";break;case t.SelectionMode.Text:default:a="selection-mode__text-menu"}return c.createElement(d,{mode:r,onClick:o},function(e){return c.createElement(i.MenuItem,{checked:n,icon:e.icon,testId:a,onClick:e.onClick},e.label)})},h=function(e){var n=e.store,r=c.useRef(null),o=c.useState(t.SelectionMode.Text),a=o[0],i=o[1],l=c.useRef({top:0,left:0,x:0,y:0}),u=function(e){var t=r.current;t&&(t.scrollTop=l.current.top-(e.clientY-l.current.y),t.scrollLeft=l.current.left-(e.clientX-l.current.x))},s=function(){var e=r.current;e&&(e.classList.add("rpv-selection-mode__grab"),e.classList.remove("rpv-selection-mode__grabbing"),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",s))},d=function(e){var n=r.current;n&&a!==t.SelectionMode.Text&&(n.classList.remove("rpv-selection-mode__grab"),n.classList.add("rpv-selection-mode__grabbing"),e.preventDefault(),e.stopPropagation(),l.current={left:n.scrollLeft,top:n.scrollTop,x:e.clientX,y:e.clientY},document.addEventListener("mousemove",u),document.addEventListener("mouseup",s))},p=function(e){r.current=e()},f=function(e){i(e)};return c.useEffect(function(){var e=r.current;if(e)return a===t.SelectionMode.Hand?e.classList.add("rpv-selection-mode__grab"):e.classList.remove("rpv-selection-mode__grab"),e.addEventListener("mousedown",d),function(){e.removeEventListener("mousedown",d)}},[a]),c.useEffect(function(){return n.subscribe("getPagesContainer",p),n.subscribe("selectionMode",f),function(){n.unsubscribe("getPagesContainer",p),n.unsubscribe("selectionMode",f)}},[]),c.createElement(c.Fragment,null)};t.HandToolIcon=l,t.TextSelectionIcon=s,t.selectionModePlugin=function(e){var n=c.useMemo(function(){return i.createStore(
1)},[]),r=function(e){return c.createElement(m,u({},e,{store:n}))};return{install:function(r){n.update("selectionMode",e&&e.selectionMode?e.selectionMode:t.SelectionMode.Text),n.update("getPagesContainer",r.getPagesContainer)},renderViewer:function(e){var t=e.slot;return t.subSlot&&t.subSlot.children&&(t.subSlot.children=c.createElement(c.Fragment,null,c.createElement(h,{store:n}),t.subSlot.children)),t},SwitchSelectionMode:r,SwitchSelectionModeButton:function(e){return c.createElement(r,{mode:e.mode},function(e){return c.createElement(f,{isSelected:e.isSelected,mode:e.mode,onClick:function(){e.onClick()}})})},SwitchSelectionModeMenuItem:function(e){return c.createElement(r,{mode:e.mode},function(t){return c.createElement(g,{isSelected:t.isSelected,mode:t.mode,onClick:function(){t.onClick(),e.onClick()}})})}}}},53403:function(e,t,n){"use strict";e.exports=n(51530)},98835:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M19.5,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.106l-2.4-2.4a1,1,0,0,0-1.414,0l-2.4,2.4H5.5a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.894l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4H18.5a1,1,0,0,0,1-1Z"}),i.createElement("path",{d:"M10,6.349a6,6,0,0,1,0,11.3,6,6,0,1,0,0-11.3Z"}))},l=function(){return i.createElement(a.Icon,{size:16},i.createElement("path",{d:"M19.491,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.1L12.7,2.1a1,1,0,0,0-1.414,0l-2.4,2.4H5.491a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.885l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4h3.394a1,1,0,0,0,1-1Z"}),i.createElement("path",{d:"M11.491,6c4,0,6,2.686,6,6s-2,6-6,6Z"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s={left:0,top:8},d=function(e){var t=e.onClick,n=i.useContext(a.ThemeContext),r=i.useContext(a.LocalizationContext).l10n,o="dark"===n.currentTheme,u=r&&r.theme?o?r.theme.switchLightTheme:r.theme.switchDarkTheme:o?"Switch to the light theme":"Switch to the dark theme";return i.createElement(a.Tooltip,{ariaControlsSuffix:"theme-switch",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaLabel:u,testId:"theme__switch-button",onClick:t},o?i.createElement(l,null):i.createElement(c,null)),content:function(){return u},offset:s})},p=function(e){var t=e.children,n=i.useContext(a.ThemeContext);return(t||function(e){return i.createElement(d,{onClick:e.onClick})})({onClick:function(){return n.setCurrentTheme("dark"===n.currentTheme?"light":"dark")}})},f=function(e){var t=e.onClick,n=i.useContext(a.ThemeContext),r=i.useContext(a.LocalizationContext).l10n,o="dark"===n.currentTheme,u=r&&r.theme?o?r.theme.switchLightTheme:r.theme.switchDarkTheme:o?"Switch to the light theme":"Switch to the dark theme";return i.createElement(a.MenuItem,{icon:o?i.createElement(l,null):i.createElement(c,null),testId:"theme__switch-menu",onClick:t},u)};t.DarkIcon=c,t.LightIcon=l,t.themePlugin=function(){var e=function(e){return i.createElement(p,u({},e))};return{SwitchTheme:e,SwitchThemeButton:function(){return i.createElement(e,null,function(e){return i.createElement(d,u({},e))})},SwitchThemeMenuItem:function(t){return i.createElement(e,null,function(e){return i.createElement(f,{onClick:function(){e.onClick(),t.onClick()}})})}}}},3591:function(e,t,n){"use strict";e.exports=n(98835)},68786:function(e,t,n){"use strict";var r,o,a,i=n(54141),c=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o));t.ThumbnailDirection=void 0,(a=t.ThumbnailDirection||(t.ThumbnailDirection={})).Horizontal="Horizontal",a.Vertical="Vertical";var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e){var t=e.doc,n=e.getPageIndex,r=e.renderSpinner,o=e.store,a=e.width,l=t.numPages,u=Math.max(0,Math.min(n?n({numPages:l}):0,l-1)),s=o.get("pagesRotation")||new Map,d=s.has(u)?s.get(u):0,p=c.useState(""),f=p[0],m=p[1],g=i.useIsMounted(),h=c.useRef(),v=c.useState(o.get("rotation")||0),b=v[0],E=v[1],w=c.useState(d),S=w[0],_=w[1],k=c.useState(!1),C=k[0],y=k[1],P=function(e){var t=e.has(u)?e.get(u):0;_(t)},M=function(e){E(e)},x=i.useIntersectionObserver({onVisibilityChanged:function(e){y(e.isVisible)}});return c.useEffect(function(){if(C){var e=x.current;e&&(m(""),i.getPage(t,u).then(function(t){var n=t.getViewport({scale:1}),r=(n.rotation+b+S)%360,o=Math.abs(b+S)%180==0,i=o?n.width:n.height,c=o?n.height:n.width,l=document.createElement("canvas"),u=l.getContext("2d",{alpha:!1}),s=e.clientWidth,d=e.clientHeight,p=a?a/i:Math.min(s/i,d/c);l.height=p*c,l.width=p*i,l.style.opacity="0";var f=t.getViewport({rotation:r,scale:p});h.current=t.render({canvasContext:u,viewport:f}),h.current.promise.then(function(){g.current&&m(l.toDataURL()),l.width=0,l.height=0},function(){})}))}},[S,C]),c.useEffect(function(){return o.subscribe("pagesRotation",P),o.subscribe("rotation",M),function(){o.unsubscribe("pagesRotation",P),o.unsubscribe("rotation",M)}},[]),c.useEffect(function(){return function(){var e;null===(e=h.current)||void 0===e||e.cancel()}},[]),c.createElement("div",{ref:x,className:"rpv-thumbnail__cover-inner","data-testid":"thumbnail__cover-inner"},f?c.createElement("img",{className:"rpv-thumbnail__cover-image","data-testid":"thumbnail__cover-image",src:f}):c.createElement("div",{className:"rpv-thumbnail__cover-loader","data-testid":"thumbnail__cover-loader"},r?r():c.createElement(i.Spinner,null)))},s=function(e){var t=e.getPageIndex,n=e.renderSpinner,r=e.store,o=e.width,a=c.useState(r.get("doc")),l=a[0],s=a[1],d=function(e){s(e)};return c.useEffect(function(){return r.subscribe("doc",d),function(){r.unsubscribe("doc",d)}},[]),c.createElement("div",{className:"rpv-thumbnail__cover"}
1,l?c.createElement(u,{doc:l,getPageIndex:t,renderSpinner:n,store:r,width:o}):c.createElement("div",{className:"rpv-thumbnail__cover-loader"},n?n():c.createElement(i.Spinner,null)))},d=function(){return c.createElement(i.Spinner,null)},p=c.createContext({renderSpinner:d}),f=function(e){var t=e.children,n=e.doc,r=i.useIsMounted(),o=c.useState({loading:!0,labels:[]}),a=o[0],l=o[1];return c.useEffect(function(){n.getPageLabels().then(function(e){r.current&&l({loading:!1,labels:e||[]})})},[n.loadingTask.docId]),a.loading?c.createElement(c.Fragment,null):t(a.labels)},m=function(e){var t=e.page,n=e.pageHeight,r=e.pageIndex,o=e.pageWidth,a=e.rotation,l=e.thumbnailHeight,u=e.thumbnailWidth,s=e.onRenderCompleted,d=c.useContext(i.LocalizationContext).l10n,f=c.useRef(),m=c.useState(""),g=m[0],h=m[1],v=d&&d.thumbnail?d.thumbnail.thumbnailLabel:"Thumbnail of page {{pageIndex}}";return c.useEffect(function(){var e=f.current;e&&e.cancel();var i=document.createElement("canvas"),c=i.getContext("2d",{alpha:!1}),l=u/(o/n);i.height=l,i.width=u,i.style.height="".concat(l,"px"),i.style.width="".concat(u,"px");var d=t.getViewport({rotation:a,scale:u/o});return f.current=t.render({canvasContext:c,viewport:d}),f.current.promise.then(function(){h(i.toDataURL()),s(r)},function(){s(r)}),function(){var e;null===(e=f.current)||void 0===e||e.cancel()}},[a]),g?c.createElement("img",{"aria-label":v.replace("{{pageIndex}}","".concat(r+1)),src:g,height:"".concat(l,"px"),width:"".concat(u,"px")}):c.useContext(p).renderSpinner()},g=function(e){var t=e.doc,n=e.pageHeight,r=e.pageIndex,o=e.pageRotation,a=e.pageWidth,l=e.rotation,u=e.shouldRender,s=e.thumbnailWidth,d=e.onRenderCompleted,f=e.onVisibilityChanged,g=i.useIsMounted(),h=c.useState({height:n,page:null,viewportRotation:0,width:a}),v=h[0],b=h[1],E=v.page,w=v.height,S=v.width,_=S/w,k=Math.abs(l+o)%180==0,C=k?s:s/_,y=k?s/_:s;c.useEffect(function(){u&&i.getPage(t,r).then(function(e){var t=e.getViewport({scale:1});g.current&&b({height:t.height,page:e,viewportRotation:t.rotation,width:t.width})})},[u]);var P=(v.viewportRotation+l+o)%360,M=i.useIntersectionObserver({onVisibilityChanged:function(e){f(r,e)}});return c.createElement("div",{className:"rpv-thumbnail__container","data-testid":"thumbnail__container-".concat(r),ref:M,style:{height:"".concat(y,"px"),width:"".concat(C,"px")}},E?c.createElement(m,{page:E,pageHeight:k?w:S,pageIndex:r,pageWidth:k?S:w,rotation:P,thumbnailHeight:y,thumbnailWidth:C,onRenderCompleted:d}):c.useContext(p).renderSpinner())},h=function(e){var n=e.currentPage,r=e.doc,o=e.labels,a=e.pagesRotation,l=e.pageHeight,u=e.pageWidth,s=e.renderCurrentPageLabel,d=e.renderThumbnailItem,p=e.rotatedPage,f=e.rotation,m=e.thumbnailDirection,h=e.thumbnailWidth,v=e.viewMode,b=e.onJumpToPage,E=e.onRotatePage,w=r.numPages,S=r.loadingTask.docId,_=c.useRef(null),k=c.useRef([]),C=c.useState(n),y=C[0],P=C[1],M=c.useContext(i.ThemeContext).direction===i.TextDirection.RightToLeft,x=c.useState(-1),R=x[0],T=x[1],L=i.useIsMounted(),I=i.usePrevious(v),O=c.useRef(!1),D=i.useRenderQueue({doc:r}),F=c.useMemo(function(){return Array(w).fill(0).map(function(e,t){return t})},[S]),N=c.useMemo(function(){switch(v){case i.ViewMode.DualPage:return i.chunk(F,2);case i.ViewMode.DualPageWithCover:return[[F[0]]].concat(i.chunk(F.slice(1),2));case i.ViewMode.SinglePage:default:return i.chunk(F,1)}},[S,v]),z=function(){if(_.current){var e=k.current,t=y+1;t<e.length&&(y>=0&&e[y].setAttribute("tabindex","-1"),P(t))}},j=function(){if(_.current){var e=k.current,t=y-1;t>=0&&(y>=0&&e[y].setAttribute("tabindex","-1"),P(t))}},V=function(){y>=0&&y<w&&b(y)};i.useIsomorphicLayoutEffect(function(){var e=_.current;e&&(k.current=Array.from(e.querySelectorAll(".rpv-thumbnail__item")))},[v]),c.useEffect(function(){var e=k.current;if(!(0===e.length||y<0||y>e.length)){var t=e[y];t.setAttribute("tabindex","0"),t.focus()}},[y]),i.useIsomorphicLayoutEffect(function(){var e=_.current,r=k.current;if(!(!e||0===r.length||n<0||n>r.length)){var o,a,i,c,l,u,s,d,p,f,g=r[n].closest(".rpv-thumbnail__items");g&&(m===t.ThumbnailDirection.Vertical?(a=e,i=g.getBoundingClientRect().top-a.getBoundingClientRect().top,c=g.clientHeight,l=a.clientHeight,i<0?a.scrollTop+=i:i+c<=l||(a.scrollTop+=i+c-l)):(s=e,d=g.getBoundingClientRect().left-s.getBoundingClientRect().left,p=g.clientWidth,f=s.clientWidth,d<0?s.scrollLeft+=d:d+p<=f||(s.scrollLeft+=d+p-f)))}},[n,m]);var B=c.useCallback(function(e){L.current&&(D.markRendered(e),O.current=!1,H())},[S]),A=c.useCallback(function(e,t){t.isVisible?D.setVisibility(e,t.ratio):D.setOutOfRange(e),H()},[S]),H=c.useCallback(function(){if(!O.current){var e=D.getHighestPriorityPage();e>-1&&(D.markRendering(e),O.current=!0,T(e))}},[S]);return c.useEffect(function(){p>=0&&(D.markRendering(p),O.current=!0,T(p))},[S,p]),i.useIsomorphicLayoutEffect(function(){I!==v&&(D.markNotRendered(),H())},[v]),c.createElement("div",{ref:_,"data-testid":"thumbnail__list",className:i.classNames({"rpv-thumbnail__list":!0,"rpv-thumbnail__list--horizontal":m===t.ThumbnailDirection.Horizontal,"rpv-thumbnail__list--rtl":M,"rpv-thumbnail__list--vertical":m===t.ThumbnailDirection.Vertical}),onKeyDown:function(e){switch(e.key){case"ArrowDown":z();break;case"ArrowUp":j();break;case"Enter":V()}}},N.map(function(e,t){var p=!1;switch(v){case i.ViewMode.DualPage:p=n===2*t||n===2*t+1;break;case i.ViewMode.DualPageWithCover:p=0===n&&0===t||t>0&&n===2*t-1||t>0&&n===2*t;break;case i.ViewMode.SinglePage:default:p=n===t}return c.createElement("div",{className:i.classNames({"rpv-thumbnail__items":!0,"rpv-thumbnail__items--dual":v===i.ViewMode.DualPage,"rpv-thumbnail__items--dual-cover":v===i.ViewMode.DualPageWithCover,"rpv-thumbnail__items--single":v===i.ViewMode.SinglePage,"rpv-thumbnail__items--selected":p}),key:"".concat(t,"___").concat(v)},e.map(function(e){var t,p,m,S,_,k,C;return p=v===i.ViewMode.DualPageWithCover&&(0===e||w%2==0&&e===w-1),m="".concat(r.loadingTask.docId,"___").concat(e),S=o.length===w?o[e]:"".concat(e+1),_=s?s({currentPage:n,pageIndex:e,numPages:w,pageLabel:S}):S,k=a.has(e)?a.get(e):0,C=c.createElement(g,{doc:r,pageHeight:l,pageIndex:e,pageRotation:k,pageWidth:u,rotation:f,shouldRender:R===e,thumbnailWidth:h,onRenderCompleted:B,onVisibilityChanged:A}),d?d({currentPage:n,key:m,numPages:w,pageIndex:e,renderPageLabel:c.createElement(c.Fragment,null,_),renderPageThumbnail:C,onJumpToPage:function(){return b(e)},onRotatePage:function(t){return E(e,t)}}):c.createElement("div",{key:m},c.createElement("div",{className:i.classNames({"rpv-thumbnail__item":!0,"rpv-thumbnail__item--dual-even":v===i.ViewMode.DualPage&&e%2==0,"rpv-thumbnail__item--dual-odd":v===i.ViewMode.DualPage&&e%2==1,"rpv-thumbnail__item--dual-cover":p,"rpv-thumbnail__item--dual-cover-even":v===i.ViewMode.DualPageWithCover&&!p&&e%2==0,"rpv-thumbnail__item--dual-cover-odd":v===i.ViewMode.DualPageWithCover&&!p&&e%2==1,"rpv-thumbnail__item--single":v===i.ViewMode.SinglePage,"rpv-thumbnail__item--selected":n===e}),role:"button",tabIndex:n===e?0:-1,onClick:function(){return b(e)}},C),c.createElement("div",{"data-testid":"thumbnail__label-".concat(e),className:"rpv-thumbnail__label"},_))}))}))},v=function(e){var t=e.renderCurrentPageLabel,n=e.renderThumbnailItem,r=e.store,o=e.thumbnailDirection,a=e.thumbnailWidth,l=c.useState(r.get("doc")),u=l[0],s=l[1],d=c.useState(r.get("currentPage")||0),m=d[0],g=d[1],v=c.useState(r.get("pageHeight")||0),b=v[0],E=v[1],w=c.useState(r.get("pageWidth")||0),S=w[0],_=w[1],k=c.useState(r.get("rotation")||0),C=k[0],y=k[1],P=c.useState(r.get("pagesRotation")||new Map),M=P[0],x=P[1],R=c.useState(r.get("rotatedPage")||-1),T=R[0],L=R[1],I=c.useState(r.get("viewMode")),O=I[0],D=I[1],F=function(e){g(e)},N=function(e){s(e)},z=function(e){E(e)},j=function(e){_(e)},V=function(e){y(e)},B=function(e){x(e)},A=function(e){L(e)},H=function(e){D(e)},W=function(e){var t=r.get("jumpToPage");t&&t(e)},K=function(e,t){r.get("rotatePage")(e,t)};return c.useEffect(function(){return r.subscribe("doc",N),r.subscribe("pageHeight",z),r.subscribe("pageWidth",j),r.subscribe("rotatedPage",A),r.subscribe("rotation",V),r.subscribe("pagesRotation",B),r.subscribe("viewMode",H),function(){r.unsubscribe("doc",N),r.unsubscribe("pageHeight",z),r.unsubscribe("pageWidth",j),r.unsubscribe("rotatedPage",A),r.unsubscribe("rotation",V),r.unsubscribe("pagesRotation",B),r.unsubscribe("viewMode",H)}},[]),i.useIsomorphicLayoutEffect(function(){return r.subscribe("currentPage",F),function(){r.unsubscribe("currentPage",F)}},[]),u?c.createElement(i.LazyRender,{testId:"thumbnail__list-container",attrs:{className:"rpv-thumbnail__list-container"}},c.createElement(f,{doc:u},function(e){return c.createElement(h,{currentPage:m,doc:u,labels:e,pagesRotation:M,pageHeight:b,pageWidth:S,renderCurrentPageLabel:t,renderThumbnailItem:n,rotatedPage:T,rotation:C,thumbnailDirection:o,thumbnailWidth:a,viewMode:O,onJumpToPage:W,onRotatePage:K})})):c.createElement("div",{"data-testid":"thumbnail-list__loader",className:"rpv-thumbnail__loader"},c.useContext(p).renderSpinner())};t.thumbnailPlugin=function(e){var n=c.useMemo(function(){return i.createStore({rotatePage:function(){},viewMode:i.ViewMode.SinglePage})},[]),r=c.useState(""),o=r[0],a=r[1];return{install:function(e){n.update("jumpToPage",e.jumpToPage),n.update("rotatePage",e.rotatePage)},onDocumentLoad:function(e){a(e.doc.loadingTask.docId),n.update("doc",e.doc)},onViewerStateChange:function(e){return n.update("currentPage",e.pageIndex),n.update("pagesRotation",e.pagesR
1otation),n.update("pageHeight",e.pageHeight),n.update("pageWidth",e.pageWidth),n.update("rotation",e.rotation),n.update("rotatedPage",e.rotatedPage),n.update("viewMode",e.viewMode),e},Cover:function(t){return c.createElement(s,l({},t,{renderSpinner:null==e?void 0:e.renderSpinner,store:n}))},Thumbnails:c.useCallback(function(r){return c.createElement(p.Provider,{value:{renderSpinner:(null==e?void 0:e.renderSpinner)||d}},c.createElement(v,{renderCurrentPageLabel:null==e?void 0:e.renderCurrentPageLabel,renderThumbnailItem:null==r?void 0:r.renderThumbnailItem,store:n,thumbnailDirection:(null==r?void 0:r.thumbnailDirection)||t.ThumbnailDirection.Vertical,thumbnailWidth:(null==e?void 0:e.thumbnailWidth)||100}))},[o])}}},24416:function(e,t,n){"use strict";e.exports=n(68786)},93945:function(e,t,n){"use strict";var r,o,a=n(54141),i=n(53403),c=n(67294),l=n(74948),u=n(48448),s=n(50007),d=n(13572),p=n(91999),f=n(12434),m=n(77719),g=n(64),h=n(27973),v=n(3591),b=n(60440),E=(o=Object.create(null),c&&Object.keys(c).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(c,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return c[e]}})}}),o.default=c,Object.freeze(o)),w=function(){return E.createElement(a.Icon,{size:16},E.createElement("path",{d:"M12,0.5c1.381,0,2.5,1.119,2.5,2.5S13.381,5.5,12,5.5S9.5,4.381,9.5,3S10.619,0.5,12,0.5z\n            M12,9.5\n            c1.381,0,2.5,1.119,2.5,2.5s-1.119,2.5-2.5,2.5S9.5,13.381,9.5,12S10.619,9.5,12,9.5z\n            M12,18.5c1.381,0,2.5,1.119,2.5,2.5\n            s-1.119,2.5-2.5,2.5S9.5,22.381,9.5,21S10.619,18.5,12,18.5z"}))},S={left:0,top:8},_=function(e){var t=e.toolbarSlot,n=E.useContext(a.LocalizationContext).l10n,r=E.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft?a.Position.BottomLeft:a.Position.BottomRight,o=t.DownloadMenuItem,c=t.EnterFullScreenMenuItem,l=t.GoToFirstPageMenuItem,u=t.GoToLastPageMenuItem,s=t.GoToNextPageMenuItem,d=t.GoToPreviousPageMenuItem,p=t.OpenMenuItem,f=t.PrintMenuItem,m=t.RotateBackwardMenuItem,g=t.RotateForwardMenuItem,h=t.ShowPropertiesMenuItem,v=t.SwitchScrollModeMenuItem,b=t.SwitchSelectionModeMenuItem,_=t.SwitchViewModeMenuItem,k=t.SwitchThemeMenuItem;return E.createElement(a.Popover,{ariaControlsSuffix:"toolbar-more-actions",ariaHasPopup:"menu",position:r,target:function(e,t){var o=n&&n.toolbar?n.toolbar.moreActions:"More actions";return E.createElement(a.Tooltip,{ariaControlsSuffix:"toolbar-more-actions",position:r,target:E.createElement(a.MinimalButton,{ariaLabel:o,isSelected:t,testId:"toolbar__more-actions-popover-target",onClick:e},E.createElement(w,null)),content:function(){return o},offset:S})},content:function(e){return E.createElement(a.Menu,null,E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(k,{onClick:e})),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(c,{onClick:e})),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(p,null)),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(f,{onClick:e})),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(o,{onClick:e})),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(a.MenuDivider,null)),E.createElement(l,{onClick:e}),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(d,{onClick:e})),E.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},E.createElement(s,{onClick:e})),E.createElement(u,{onClick:e}),E.createElement(a.MenuDivider,null),E.createElement(g,{onClick:e}),E.createElement(m,{onClick:e}),E.createElement(a.MenuDivider,null),E.createElement(b,{mode:i.SelectionMode.Text,onClick:e}),E.createElement(b,{mode:i.SelectionMode.Hand,onClick:e}),E.createElement(a.MenuDivider,null),E.createElement(v,{mode:a.ScrollMode.Page,onClick:e}),E.createElement(v,{mode:a.ScrollMode.Vertical,onClick:e}),E.createElement(v,{mode:a.ScrollMode.Horizontal,onClick:e}),E.createElement(v,{mode:a.ScrollMode.Wrapped,onClick:e}),E.createElement(a.MenuDivider,null),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement(_,{mode:a.ViewMode.SinglePage,onClick:e})),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement(_,{mode:a.ViewMode.DualPage,onClick:e})),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement(_,{mode:a.ViewMode.DualPageWithCover,onClick:e})),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement(a.MenuDivider,null)),E.createElement(h,{onClick:e}))},offset:S,closeOnClickOutside:!0,closeOnEscape:!0})},k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},C=function(e){return function(t){var n=E.useMemo(function(){return e(t)},[]),r=E.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,o=n.CurrentPageInput,i=n.Download,c=n.EnterFullScreen,l=n.GoToNextPage,u=n.GoToPreviousPage,s=n.NumberOfPages,d=n.Open,p=n.Print,f=n.ShowSearchPopover,m=n.SwitchTheme,g=n.Zoom,h=n.ZoomIn,v=n.ZoomOut;return E.createElement("div",{"data-testid":"toolbar",className:a.classNames({"rpv-toolbar":!0,"rpv-toolbar--rtl":r}),role:"toolbar","aria-orientation":"horizontal"},E.createElement("div",{className:"rpv-toolbar__left"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(f,null)),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(u,null))),E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(o,null),E.createElement("span",{className:"rpv-toolbar__label"},E.createElement(s,null))),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(l,null)))),E.createElement("div",{className:"rpv-toolbar__center"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(v,null)),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(g,null))),E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(h,null))),E.createElement("div",{className:"rpv-toolbar__right"},E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(m,null))),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(c,null))),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(d,null))),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(i,null))),E.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(p,null))),E.createElement("div",{className:"rpv-toolbar__item"},E.createElement(_,{toolbarSlot:n}))))}},y=function(e){var t=e.NumberOfPages;return Object.assign({},e,{NumberOfPages:function(){return E.createElement(E.Fragment,null,"/ ",E.createElement(t,null))}})},P=function(e){return C(y)(e)},M=function(e){var t;return(e.children||P)(e.slot)};
1t.MoreActionsPopover=_,t.MoreIcon=w,t.toolbarPlugin=function(e){var t=l.fullScreenPlugin(e?e.fullScreenPlugin:{}),n=u.getFilePlugin(e?e.getFilePlugin:{}),r=s.openPlugin(e?e.openPlugin:{}),o=d.pageNavigationPlugin(e?e.pageNavigationPlugin:{}),a=p.printPlugin(e?e.printPlugin:{}),c=f.propertiesPlugin(),w=m.rotatePlugin(),S=g.scrollModePlugin(),_=h.searchPlugin(e?e.searchPlugin:{}),y=i.selectionModePlugin(e?e.selectionModePlugin:{}),P=v.themePlugin(),x=b.zoomPlugin(e?e.zoomPlugin:{}),R=[t,n,r,o,a,c,w,S,_,y,P,x],T=E.useCallback(function(e){var i=t.EnterFullScreen,l=t.EnterFullScreenMenuItem,u=n.Download,s=n.DownloadMenuItem,d=r.Open,p=r.OpenMenuItem,f=o.CurrentPageInput,m=o.CurrentPageLabel,g=o.GoToFirstPage,h=o.GoToFirstPageMenuItem,v=o.GoToLastPage,b=o.GoToLastPageMenuItem,C=o.GoToNextPage,R=o.GoToNextPageMenuItem,T=o.GoToPreviousPage,L=o.GoToPreviousPageMenuItem,I=o.NumberOfPages,O=a.Print,D=a.PrintMenuItem,F=c.ShowProperties,N=c.ShowPropertiesMenuItem,z=w.Rotate,j=w.RotateBackwardMenuItem,V=w.RotateForwardMenuItem,B=S.SwitchScrollMode,A=S.SwitchScrollModeMenuItem,H=S.SwitchViewMode,W=S.SwitchViewModeMenuItem,K=_.Search,Z=_.ShowSearchPopover,U=y.SwitchSelectionMode,q=y.SwitchSelectionModeMenuItem,G=P.SwitchTheme,J=P.SwitchThemeMenuItem,Y=x.CurrentScale,X=x.Zoom,$=x.ZoomIn,Q=x.ZoomInMenuItem,ee=x.ZoomOut,et=x.ZoomOutMenuItem;return E.createElement(M,k({},e,{slot:{CurrentPageInput:f,CurrentPageLabel:m,CurrentScale:Y,Download:u,DownloadMenuItem:s,EnterFullScreen:i,EnterFullScreenMenuItem:l,GoToFirstPage:g,GoToFirstPageMenuItem:h,GoToLastPage:v,GoToLastPageMenuItem:b,GoToNextPage:C,GoToNextPageMenuItem:R,GoToPreviousPage:T,GoToPreviousPageMenuItem:L,NumberOfPages:I,Open:d,OpenMenuItem:p,Print:O,PrintMenuItem:D,Rotate:z,RotateBackwardMenuItem:j,RotateForwardMenuItem:V,Search:K,ShowProperties:F,ShowPropertiesMenuItem:N,ShowSearchPopover:Z,SwitchScrollMode:B,SwitchScrollModeMenuItem:A,SwitchSelectionMode:U,SwitchSelectionModeMenuItem:q,SwitchViewMode:H,SwitchViewModeMenuItem:W,SwitchTheme:G,SwitchThemeMenuItem:J,Zoom:X,ZoomIn:$,ZoomInMenuItem:Q,ZoomOut:ee,ZoomOutMenuItem:et}}))},[]);return{fullScreenPluginInstance:t,getFilePluginInstance:n,openPluginInstance:r,pageNavigationPluginInstance:o,printPluginInstance:a,propertiesPluginInstance:c,rotatePluginInstance:w,scrollModePluginInstance:S,searchPluginInstance:_,selectionModePluginInstance:y,themePluginInstance:P,zoomPluginInstance:x,install:function(e){R.forEach(function(t){t.install&&t.install(e)})},renderPageLayer:function(e){return E.createElement(E.Fragment,null,R.map(function(t,n){return t.renderPageLayer?E.createElement(E.Fragment,{key:n},t.renderPageLayer(e)):E.createElement(E.Fragment,{key:n})}))},renderViewer:function(e){var t=e.slot;return R.forEach(function(n){n.renderViewer&&(t=n.renderViewer(k(k({},e),{slot:t})))}),t},uninstall:function(e){R.forEach(function(t){t.uninstall&&t.uninstall(e)})},onDocumentLoad:function(e){R.forEach(function(t){t.onDocumentLoad&&t.onDocumentLoad(e)})},onAnnotationLayerRender:function(e){R.forEach(function(t){t.onAnnotationLayerRender&&t.onAnnotationLayerRender(e)})},onTextLayerRender:function(e){R.forEach(function(t){t.onTextLayerRender&&t.onTextLayerRender(e)})},onViewerStateChange:function(e){var t=e;return R.forEach(function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))}),t},renderDefaultToolbar:C,Toolbar:T}}},85734:function(e,t,n){"use strict";e.exports=n(93945)},61211:function(e,t,n){"use strict";var r,o,a=n(54141),i=(r=n(67294),o=Object.create(null),r&&Object.keys(r).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}}),o.default=r,Object.freeze(o)),c=function(){return i.createElement(a.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n            M23.5,23.499\n            l-5.929-5.929\n            M5.5,10.499h10\n            M10.5,5.499v10"}))},l=function(){return i.createElement(a.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n            M23.5,23.499\n            l-5.929-5.929\n            M5.5,10.499h10"}))},u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s=function(e){var t=i.useState(e.get("scale")||0),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect(function(){return e.subscribe("scale",o),function(){e.unsubscribe("scale",o)}},[]),{scale:n}},d=function(e){var t;return(e.children||function(e){return i.createElement(i.Fragment,null,"".concat(Math.round(100*e.scale),"%"))})({scale:s(e.store).scale})},p={passive:!1},f=null,m=function(e){var t=e.pagesContainerRef,n=e.store,r=a.useDebounceCallback(function(e){var t=n.get("zoom");t&&t(e)},40),o=function(e){if(e.ctrlKey){e.preventDefault();var t=e.target.getBoundingClientRect(),o=1-e.deltaY/100,a=e.clientX-t.left,i=e.clientY-t.top,c=n.get("scale"),l=(f||(f=document.createElementNS("http://www.w3.org/2000/svg","svg"))).createSVGMatrix().translate(a,i).scale(o).translate(-a,-i).scale(c);r(l.a)}};return a.useIsomorphicLayoutEffect(function(){var e=t.current;if(e)return e.addEventListener("wheel",o,p),function(){e.removeEventListener("wheel",o)}},[]),i.createElement(i.Fragment,null)},g=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],h=function(e){return g.find(function(t){return t>e})||e},v=function(e){var t=g.findIndex(function(t){return t>=e});return -1===t||0===t?e:g[t-1]},b=function(e){var t=e.containerRef,n=e.store,r=function(e){if(!e.shiftKey&&!e.altKey&&
1(a.isMac()?e.metaKey:e.ctrlKey)){var r=t.current;if(r&&document.activeElement&&r.contains(document.activeElement)){var o=n.get("zoom");if(o){var i=n.get("scale")||1,c=1;switch(e.key){case"-":c=v(i);break;case"=":c=h(i);break;case"0":c=1;break;default:c=i}c!==i&&(e.preventDefault(),o(c))}}}};return i.useEffect(function(){if(t.current)return document.addEventListener("keydown",r),function(){document.removeEventListener("keydown",r)}},[t.current]),i.createElement(i.Fragment,null)},E=[.5,.75,1,1.25,1.5,2,3,4],w={left:0,top:8},S=function(e){var t=e.levels,n=void 0===t?E:t,r=e.scale,o=e.onZoom,c=i.useContext(a.LocalizationContext).l10n,l=i.useContext(a.ThemeContext).direction===a.TextDirection.RightToLeft,u=c&&c.zoom?c.zoom.zoomDocument:"Zoom document";return i.createElement(a.Popover,{ariaControlsSuffix:"zoom",ariaHasPopup:"menu",position:a.Position.BottomCenter,target:function(e){return i.createElement(a.MinimalButton,{ariaLabel:u,testId:"zoom__popover-target",onClick:function(){e()}},i.createElement("span",{className:"rpv-zoom__popover-target"},i.createElement("span",{"data-testid":"zoom__popover-target-scale",className:a.classNames({"rpv-zoom__popover-target-scale":!0,"rpv-zoom__popover-target-scale--ltr":!l,"rpv-zoom__popover-target-scale--rtl":l})},Math.round(100*r),"%"),i.createElement("span",{className:"rpv-zoom__popover-target-arrow"})))},content:function(e){return i.createElement(a.Menu,null,Object.keys(a.SpecialZoomLevel).map(function(t){return i.createElement(a.MenuItem,{key:t,onClick:function(){e(),o(t)}},function(e){switch(e){case a.SpecialZoomLevel.ActualSize:return c&&c.zoom?c.zoom.actualSize:"Actual size";case a.SpecialZoomLevel.PageFit:return c&&c.zoom?c.zoom.pageFit:"Page fit";case a.SpecialZoomLevel.PageWidth:return c&&c.zoom?c.zoom.pageWidth:"Page width"}}(t))}),i.createElement(a.MenuDivider,null),n.map(function(t){return i.createElement(a.MenuItem,{key:t,onClick:function(){e(),o(t)}},"".concat(Math.round(100*t),"%"))}))},offset:w,closeOnClickOutside:!0,closeOnEscape:!0})},_=function(e){var t=e.children,n=e.levels,r=e.store;return(t||function(e){return i.createElement(S,{levels:n,scale:e.scale,onZoom:e.onZoom})})({scale:s(r).scale,onZoom:function(e){var t=r.get("zoom");t&&t(e)}})},k={left:0,top:8},C=function(e){var t=e.enableShortcuts,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.zoom?r.zoom.zoomIn:"Zoom in",l=t?a.isMac()?"Meta+=":"Ctrl+=":"";return i.createElement(a.Tooltip,{ariaControlsSuffix:"zoom-in",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaKeyShortcuts:l,ariaLabel:o,testId:"zoom__in-button",onClick:n},i.createElement(c,null)),content:function(){return o},offset:k})},y=function(e){var t=e.children,n=e.enableShortcuts,r=e.store,o=s(r).scale;return(t||C)({enableShortcuts:n,onClick:function(){var e=r.get("zoom");e&&e(h(o))}})},P=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.zoom?n.zoom.zoomIn:"Zoom in";return i.createElement(a.MenuItem,{icon:i.createElement(c,null),testId:"zoom__in-menu",onClick:t},r)},M={left:0,top:8},x=function(e){var t=e.enableShortcuts,n=e.onClick,r=i.useContext(a.LocalizationContext).l10n,o=r&&r.zoom?r.zoom.zoomOut:"Zoom out",c=t?a.isMac()?"Meta+-":"Ctrl+-":"";return i.createElement(a.Tooltip,{ariaControlsSuffix:"zoom-out",position:a.Position.BottomCenter,target:i.createElement(a.MinimalButton,{ariaKeyShortcuts:c,ariaLabel:o,testId:"zoom__out-button",onClick:n},i.createElement(l,null)),content:function(){return o},offset:M})},R=function(e){var t=e.children,n=e.enableShortcuts,r=e.store,o=s(r).scale;return(t||x)({enableShortcuts:n,onClick:function(){var e=r.get("zoom");e&&e(v(o))}})},T=function(e){var t=e.onClick,n=i.useContext(a.LocalizationContext).l10n,r=n&&n.zoom?n.zoom.zoomOut:"Zoom out";return i.createElement(a.MenuItem,{icon:i.createElement(l,null),testId:"zoom__out-menu",onClick:t},r)};t.ZoomInIcon=c,t.ZoomOutIcon=l,t.zoomPlugin=function(e){var t=i.useMemo(function(){return Object.assign({},{enableShortcuts:!0},e)},[]),n=i.useMemo(function(){return a.createStore({})},[]),r=function(e){return i.createElement(y,u({enableShortcuts:t.enableShortcuts},e,{store:n}))},o=function(e){return i.createElement(R,u({enableShortcuts:t.enableShortcuts},e,{store:n}))},c=function(e){return i.createElement(_,u({},e,{store:n}))};return{renderViewer:function(e){var r=e.slot;if(!t.enableShortcuts)return r;var o={children:i.createElement(i.Fragment,null,i.createElement(b,{containerRef:e.containerRef,store:n}),i.createElement(m,{pagesContainerRef:e.pagesContainerRef,store:n}),r.children)};return u(u({},r),o)},install:function(e){n.update("zoom",e.zoom)},onViewerStateChange:function(e){return n.update("scale",e.scale),e},zoomTo:function(e){var t=n.get("zoom");t&&t(e)},CurrentScale:function(e){return i.createElement(d,u({},e,{store:n}))}
1,ZoomIn:r,ZoomInButton:function(){return i.createElement(r,null,function(e){return i.createElement(C,u({},e))})},ZoomInMenuItem:function(e){return i.createElement(r,null,function(t){return i.createElement(P,{onClick:function(){t.onClick(),e.onClick()}})})},ZoomOut:o,ZoomOutButton:function(){return i.createElement(o,null,function(e){return i.createElement(x,u({},e))})},ZoomOutMenuItem:function(e){return i.createElement(o,null,function(t){return i.createElement(T,{onClick:function(){t.onClick(),e.onClick()}})})},Zoom:c,ZoomPopover:function(e){return i.createElement(c,null,function(t){return i.createElement(S,u({levels:null==e?void 0:e.levels},t))})}}}},60440:function(e,t,n){"use strict";e.exports=n(61211)},18177:function(){},8725:function(){},87461:function(){},11987:function(e,t,n){!function(){var t={477:function(e){"use strict";e.exports=n(97334)}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}},i=!0;try{t[e](a,a.exports,o),i=!1}finally{i&&delete r[e]}return a.exports}o.ab="//";var a={};!function(){var e,t=a,n=(e=o(477))&&"object"==typeof e&&"default"in e?e.default:e,r=/https?|ftp|gopher|file/;function i(e){"string"==typeof e&&(e=b(e));var t,o,a,i,c,l,u,s,d,p,f,m=(i=(t=e).auth,c=t.hostname,l=t.protocol||"",u=t.pathname||"",s=t.hash||"",d=t.query||"",p=!1,i=i?encodeURIComponent(i).replace(/%3A/i,":")+"@":"",t.host?p=i+t.host:c&&(p=i+(~c.indexOf(":")?"["+c+"]":c),t.port&&(p+=":"+t.port)),d&&"object"==typeof d&&(d=n.encode(d)),f=t.search||d&&"?"+d||"",l&&":"!==l.substr(-1)&&(l+=":"),t.slashes||(!l||r.test(l))&&!1!==p?(p="//"+(p||""),u&&"/"!==u[0]&&(u="/"+u)):p||(p=""),s&&"#"!==s[0]&&(s="#"+s),f&&"?"!==f[0]&&(f="?"+f),{protocol:l,host:p,pathname:u=u.replace(/[?#]/g,encodeURIComponent),search:f=f.replace("#","%23"),hash:s});return""+m.protocol+m.host+m.pathname+m.search+m.hash}var c="http://",l=c+"w.w",u=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,s=/https?|ftp|gopher|file/;function d(e,t){var n="string"==typeof e?b(e):e;e="object"==typeof e?i(e):e;var r=b(t),o="";n.protocol&&!n.slashes&&(o=n.protocol,e=e.replace(n.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&r.protocol&&(o="",r.slashes||(o=r.protocol,t=t.replace(r.protocol,"")));var a=e.match(u);a&&!r.protocol&&(e=e.substr((o=a[1]+(a[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var d=new URL(e,l+"/"),p=new URL(t,d).toString().replace(l,""),f=r.protocol||n.protocol;return f+=n.slashes||r.slashes?"//":"",!o&&f?p=p.replace(c,f):o&&(p=p.replace(c,"")),s.test(p)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==p.slice(-1)||(p=p.slice(0,-1)),o&&(p=o+("/"===p[0]?p.substr(1):p)),p}function p(){}p.prototype.parse=b,p.prototype.format=i,p.prototype.resolve=d,p.prototype.resolveObject=d;var f=/^https?|ftp|gopher|file/,m=/^(.*?)([#?].*)/,g=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,h=/^([a-z0-9.+-]*:)?\/\/\/*/i,v=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function b(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=!1),e&&"object"==typeof e&&e instanceof p)return e;var o=(e=e.trim()).match(m);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),v.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(g),c=h.test(e),u="";a&&(f.test(a[1])||(u=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(c=!1,f.test(a[1])?(u=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(u=a[1],e="/"+a[3]));var s,d=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=d&&d[1],E=new p,w="",S="";try{s=new URL(e)}catch(k){w=k,u||r||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(S="/",e=e.substr(1));try{s=new URL(e,l)}catch(_){return E.protocol=u,E.href=u,E}}E.slashes=c&&!S,E.host="w.w"===s.host?"":s.host,E.hostname="w.w"===s.hostname?"":s.hostname.replace(/(\[|\])/g,""),E.protocol=w?u||null:s.protocol,E.search=s.search.replace(/\\/g,"%5C"),E.hash=s.hash.replace(/\\/g,"%5C");var C,y=e.split("#");!E.search&&~y[0].indexOf("?")&&(E.search="?"),E.hash||""!==y[1]||(E.hash="#"),E.query=t?n.decode(s.search.substr(1)):E.search.substr(1),E.pathname=S+(a?(C=s.pathname).replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(n){return t}}):s.pathname),"about:"===E.protocol&&"blank"===E.pathname&&(E.protocol="",E.pathname=""),w&&"/"!==e[0]&&(E.pathname=E.pathname.substr(1)),u&&!f.test(u)&&"/"!==e.slice(-1)&&"/"===E.pathname&&(E.pathname=""),E.path=E.pathname+E.search,E.auth=[s.username,s.password].map(decodeURIComponent).filter(
1Boolean).join(":"),E.port=s.port,b&&!E.host.endsWith(b)&&(E.host+=b,E.port=b.slice(1)),E.href=S?""+E.pathname+E.search+E.hash:i(E);var P=/^(file)/.test(E.href)?["host","hostname"]:[];return Object.keys(E).forEach(function(e){~P.indexOf(e)||(E[e]=E[e]||null)}),E}t.parse=b,t.format=i,t.resolve=d,t.resolveObject=function(e,t){return b(d(e,t))},t.Url=p}(),e.exports=a}()},97334:function(e){!function(){"use strict";var t={815:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,o,a){r=r||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var c=/\+/g;e=e.split(r);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var s=0;s<u;++s){var d,p,f,m,g=e[s].replace(c,"%20"),h=g.indexOf(o);h>=0?(d=g.substr(0,h),p=g.substr(h+1)):(d=g,p=""),f=decodeURIComponent(d),m=decodeURIComponent(p),t(i,f)?n(i[f])?i[f].push(m):i[f]=[i[f],m]:i[f]=m}return i};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,a,i,c){return(a=a||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e)?r(o(e),function(o){var c=encodeURIComponent(t(o))+i;return n(e[o])?r(e[o],function(e){return c+encodeURIComponent(t(e))}).join(a):c+encodeURIComponent(t(e[o]))}).join(a):c?encodeURIComponent(t(c))+i+encodeURIComponent(t(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}},i=!0;try{t[e](a,a.exports,r),i=!1}finally{i&&delete n[e]}return a.exports}r.ab="//";var o,a={};(o=a).decode=o.parse=r(815),o.encode=o.stringify=r(577),e.exports=a}()},18352:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return o}})},25e3:function(e){"use strict";e.exports=JSON.parse('{"attachment":{"clickToDownload":"다운로드하려면 클릭하기","noAttachment":"첨부 파일이 없습니다"},"bookmark":{"noBookmark":"책갈피가 없습니다"},"core":{"askingPassword":{"requirePasswordToOpen":"이 문서를 열려면 암호가 필요합니다","submit":"제출"},"wrongPassword":{"submit":"제출","tryAgain":"암호가 잘못되었습니다. 다시 시도하십시오"},"pageLabel":"페이지 {{pageIndex}}"},"defaultLayout":{"attachment":"첨부","bookmark":"책갈피","thumbnail":"썸네일"},"download":{"download":"다운로드"},"drop":{"dragDropFile":"PDF 파일을 여기로 드래그하세요"},"fullScreen":{"enterFullScreen":"전체 화면","exitFullScreen":"전체 화면 종료"},"localeSwitcher":{"switchLocale":"로케일 변경"},"open":{"openFile":"파일 열기"},"pageNavigation":{"enterPageNumber":"페이지 번호를 입력하십시오","goToFirstPage":"첫 페이지","goToLastPage":"마지막 페이지","goToNextPage":"다음 페이지","goToPreviousPage":"이전 페이지"},"print":{"cancel":"취소","preparingDocument":"문서 준비 중...","print":"인쇄"},"properties":{"author":"저자","close":"닫기","creationDate":"만든 날짜","creator":"제작자","fileName":"파일 이름","fileSize":"파일 크기","keywords":"키워드","modificationDate":"수정 날짜","pageCount":"페이지 수","pdfProducer":"PDF 작성하기","pdfVersion":"PDF 버전","showProperties":"상세정보 보기","subject":"주제","title":"제목"},"rotate":{"rotateBackward":"반시계 방향으로 회전","rotateForward":"시계 방향으로 회전"},"scrollMode":{"horizontalScrolling":"수평 스크롤링","verticalScrolling":"수직 스크롤링","wrappedScrolling":"자동줄바꿈 스크롤링"}
1,"search":{"close":"닫기","enterToSearch":"검색하려면 입력하세요","matchCase":"대/소문자 구분","nextMatch":"다음 찾기","previousMatch":"이전 찾기","search":"검색","wholeWords":"단어 단위로"},"selectionMode":{"handTool":"손 도구","textSelectionTool":"선택 도구"},"theme":{"switchDarkTheme":"어두운 테마로 전환","switchLightTheme":"밝은 테마로 전환"},"thumbnail":{"thumbnailLabel":"페이지의 썸네일 {{pageIndex}}"},"toolbar":{"moreActions":"추가 작업"},"zoom":{"actualSize":"실제 크기","pageFit":"페이지에 맞춤","pageWidth":"너비에 맞춤","zoomDocument":"문서 확대/축소","zoomIn":"확대","zoomOut":"축소"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.