1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b649d0dc-cd6b-4c94-ad32-5bfc53b6e26e",e._sentryDebugIdIdentifier="sentry-dbid-b649d0dc-cd6b-4c94-ad32-5bfc53b6e26e")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5466],{26944:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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;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",(a=t.split("/").pop())?a.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})}}}},49790:function(e,t,n){"use strict";e.exports=n(26944)},38562:function(e,t,n){"use strict";var r,o,a,i,c=n(93214),l=(o=n(2265),a=Object.create(null),o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}}),a.default=o,Object.freeze(a)),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"}))},f=function(e){var t=e.bookmark,n=e.depth,r=e.doc,o=e.index,a=e.isBookmarkExpanded,i=e.numberOfSiblings,f=e.pathFromRoot,m=e.renderBookmarkItem,g=e.store,h=f?"".concat(f,".").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),_=w[0],S=w[1],k=t.items&&t.items.length>0,C=function(){var e=!_;g.updateCurrentValue("bookmarkExpandedMap",function(t){return t.set(h,e)}),S(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},_?e:t):l.createElement("span",{className:"rpv-bookmark__toggle"})},L=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":_?"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:_,path:h,defaultRenderItem:x,defaultRenderTitle:L,defaultRenderToggle:R,onClickItem:M,onClickTitle:P,onToggleSubItems:C}):x(M,l.createElement(l.Fragment,null,R(l.createElement(s,null),l.createElement(d,null)),L(P))),k&&_&&l.createElement(p,{bookmarks:t.items,depth:n+1,doc:r,isBookmarkExpanded:a,isRoot:!1,pathFromRoot:h,renderBookmarkItem:m,store:g}))},p=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(f,{bookmark:e,depth:r,doc:o,index:n,isBookmarkExpanded:a,key:n,numberOfSiblings:t.length,pathFromRoot:c,renderBookmarkItem:u,store:s})}))};(r=i||(i={}))[r.Collapse=0]="Collapse",r[r.Expand=1]="Expand";var m=function(e){var t=e.bookmarks,n=e.doc,r=e.isBookmarkExpanded,o=e.renderBookmarkItem,a=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(),f(i.Collapse);break;case"ArrowRight":e.preventDefault(),f(i.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()}},f=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===i.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(p,{bookmarks:t,depth:0,doc:n,isBookmarkExpanded:r,isRoot:!0,pathFromRoot:"",renderBookmarkItem:o,store:a}))},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})}}}},70450:function(e,t,n){"use strict";e.exports=n(38562)},11058:function(e,t,n){"use strict";var r,o=n(2265),a=n(43194);function i(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 c,l=i(o),u=i(a);t.AnnotationType=void 0,(c=t.AnnotationType||(t.AnnotationType={}))[c.Text=1]="Text",c[c.Link=2]="Link",c[c.FreeText=3]="FreeText",c[c.Line=4]="Line",c[c.Square=5]="Square",c[c.Circle=6]="Circle",c[c.Polygon=7]="Polygon",c[c.Polyline=8]="Polyline",c[c.Highlight=9]="Highlight",c[c.Underline=10]="Underline",c[c.Squiggly=11]="Squiggly",c[c.StrikeOut=12]="StrikeOut",c[c.Stamp=13]="Stamp",c[c.Caret=14]="Caret",c[c.Ink=15]="Ink",c[c.Popup=16]="Popup",c[c.FileAttachment=17]="FileAttachment";
1var s=function(e,t){return(s=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 d(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}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var f,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,(f=t.TextDirection||(t.TextDirection={})).RightToLeft="RTL",f.LeftToRight="LTR";var m,g=l.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?l.useLayoutEffect:l.useEffect,b=function(e){var t=l.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=l.useContext(g).direction,i=!(void 0!==r&&r)&&a===t.TextDirection.RightToLeft,c="".concat((void 0===o?24:o)||24,"px");return l.createElement("svg",{"aria-hidden":"true",className:h({"rpv-core__icon":!0,"rpv-core__icon--rtl":i}),focusable:"false",height:c,viewBox:"0 0 24 24",width:c},n)},w=function(){return l.createElement(E,{size:16},l.createElement("path",{d:"M23.5,0.499l-16.5,23l-6.5-6.5"}))},_=function(e){var n=e.children,r=e.testId,o=e.onClick,a=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.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)},S=function(e){var t=e.size,n=void 0===t?"4rem":t,r=e.testId,o=l.useState(!1),a=o[0],i=o[1],c=b({onVisibilityChanged:function(e){i(e.isVisible)}});return l.createElement("div",p({},r?{"data-testid":r}:{},{className:h({"rpv-core__spinner":!0,"rpv-core__spinner--animating":a}),ref:c,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,c=e.type,u=e.value,s=e.onChange,d=e.onKeyDown,f=l.useContext(g).direction,m=l.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===c?"text":c)?l.createElement("input",p({type:"text"},b)):l.createElement("input",p({type:"password"},b))};(C=m||(m={}))[C.ExitFullScreen=0]="ExitFullScreen",C[C.FullScreenChange=1]="FullScreenChange",C[C.FullScreenElement=2]="FullScreenElement",C[C.FullScreenEnabled=3]="FullScreenEnabled",C[C.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,L=R&&(m.FullScreenEnabled in document&&P||M.FullScreenEnabled in document&&M||x.FullScreenEnabled in document&&x)||P,T=function(){return R&&L.FullScreenEnabled in document&&!0===document[L.FullScreenEnabled]},I=function(e){return R?e[L.ExitFullScreen]():Promise.resolve({})},O=function(){return R?document[L.FullScreenElement]:null},D=function(e,t){var n=l.useRef(),r=function(){n.current&&clearTimeout(n.current)};return l.useEffect(function(){return function(){return r()}},[]),l.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=l.useRef(!1);return l.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},N=function(e){var t=l.useRef(e);return l.useEffect(function(){t.current=e},[e]),t.current};(z=y||(y={})).NotRenderedYet="NotRenderedYet",z.Rendering="Rendering",z.Rendered="Rendered";var z,j,V=function(e){var t=e.doc,n=t.numPages,r=t.loadingTask.docId,o=l.useMemo(function(){return Array(n).fill(null).map(function(e,t){return{pageIndex:t,render
1Status:y.NotRenderedYet,visibility:-9999}})},[r]),a=l.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===y.Rendering)return -1;if(e[i].renderStatus===y.NotRenderedYet)return e[i].pageIndex}return r+1<n&&a.current.visibilities[r+1].renderStatus!==y.Rendered?r+1:t-1>=0&&a.current.visibilities[t-1].renderStatus!==y.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=y.NotRenderedYet},markRendered:function(e){a.current.visibilities[e].renderStatus=y.Rendered},markRendering:function(e){-1!==a.current.currentRenderingPage&&a.current.currentRenderingPage!==e&&a.current.visibilities[a.current.currentRenderingPage].renderStatus===y.Rendering&&(a.current.visibilities[a.current.currentRenderingPage].renderStatus=y.NotRenderedYet),a.current.visibilities[e].renderStatus=y.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=y.NotRenderedYet)},setVisibility:i}},B={core:{askingPassword:{requirePasswordToOpen:"This document requires a password to open",submit:"Submit"},wrongPassword:{tryAgain:"The password is wrong. Please try again"},pageLabel:"Page {{pageIndex}}"}},A=l.createContext({l10n:B,setL10n:function(){}}),H=0,W=function(){return H++},K=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()}};l.useEffect(function(){if(e){var t={capture:!0};return document.addEventListener("click",r,t),function(){document.removeEventListener("click",r,t)}}},[])},Z=function(e){var t=function(t){"Escape"===t.key&&e()};l.useEffect(function(){return document.addEventListener("keyup",t),function(){document.removeEventListener("keyup",t)}},[])},U=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.closeOnClickOutside,a=e.closeOnEscape,i=e.onToggle,c=l.useRef(),u=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.useEffect(function(){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}},[]),Z(function(){c.current&&a&&i()}),K(o,c,i),v(function(){var e=c.current;if(e){var t=.75*document.body.clientHeight;e.getBoundingClientRect().height>=t&&(e.style.overflow="auto",e.style.maxHeight="".concat(t,"px"))}},[]),l.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:c,role:"dialog",tabIndex:-1},r)},q=function(e){var t=e.children;return l.createElement("div",{className:"rpv-core__modal-overlay"},t)};t.ToggleStatus=void 0,(j=t.ToggleStatus||(t.ToggleStatus={})).Close="Close",j.Open="Open",j.Toggle="Toggle";var G,J=function(e){var n=l.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})}}}},Y=function(e){var t=e.content,n=e.isOpened,r=e.target,o=J(void 0!==n&&n),a=o.opened,i=o.toggle;return l.createElement(l.Fragment,null,r&&r(i,a),a&&t(i))};t.Position=void 0,(G=t.Position||(t.Position={})).TopLeft="TOP_LEFT",G.TopCenter="TOP_CENTER",G.TopRight="TOP_RIGHT",G.RightTop="RIGHT_TOP",G.RightCenter="RIGHT_CENTER",G.RightBottom="RIGHT_BOTTOM",G.BottomLeft="BOTTOM_LEFT",G.BottomCenter="BOTTOM_CENTER",G.BottomRight="BOTTOM_RIGHT",G.LeftTop="LEFT_TOP",G.LeftCenter="LEFT_CENTER",G.LeftBottom="LEFT_BOTTOM";var X,$,Q,ee,et,en,er,eo,ea=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,f=s.left;c.style.top="".concat(d-u.top,"px"),c.style.left="".concat(f-u.left,"px")}},[])},ei=function(e){var n,r=e.customClassName,o=e.position;return l.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,ec=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.closeOnClickOutside,a=e.offset,i=e.position,c=e.targetRef,u=e.onClose,s=l.useRef(),d=l.useRef(),f=l.useRef(),p=l.useContext(g).direction===t.TextDirection.RightToLeft;K(o,s,u),ea(s,c,f,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 l.createElement(l.Fragment,null,l.createElement("div",{ref:f,style:{left:0,position:"absolute",top:0}}),l.createElement("div",{"aria-describedby":m,className:h({"rpv-core__popover-body":!0,"rpv-core__popover-body--rtl":p}),id:"rpv-core__popover-body-".concat(n),ref:s,role:"dialog",tabIndex:-1},l.createElement(ei,{customClassName:"rpv-core__popover-body-arrow",position:i}),l.createElement("div",{id:m,ref:d},r)))},el=function(e){var t=e.closeOnEscape,n=e.onClose,r=l.useRef();return Z(function(){r.current&&t&&n()}),l.createElement("div",{className:"rpv-core__popover-overlay",ref:r})},eu=function(e){var n=e.ariaControlsSuffix,r=e.children,o=e.contentRef,a=e.offset,i=e.position,c=e.targetRef,u=l.useRef(),s=l.useContext(g).direction===t.TextDirection.RightToLeft;return ea(o,c,u,i,a),l.createElement(l.Fragment,null,l.createElement("div",{ref:u,style:{left:0,position:"absolute",top:0}}),l.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"},l.createElement(ei,{customClassName:"rpv-core__tooltip-body-arrow",position:i}),l.createElement("div",{className:"rpv-core__tooltip-body-content"},r)))};t.FullScreenMode=void 0,(X=t.FullScreenMode||(t.FullScreenMode={})).Normal="Normal",X.Entering="Entering",X.Entered="Entered",X.EnteredCompletely="EnteredCompletely",X.Exitting="Exitting",X.Exited="Exited",t.LayerRenderStatus=void 0,($=t.LayerRenderStatus||(t.LayerRenderStatus={}))[$.PreRender=0]="PreRender",$[$.DidRender=1]="DidRender",t.PageMode=void 0,(Q=t.PageMode||(t.PageMode={})).Attachments="UseAttachments",Q.Bookmarks="UseOutlines",Q.ContentGroup="UseOC",Q.Default="UserNone",Q.FullScreen="FullScreen",Q.Thumbnails="UseThumbs",t.PasswordStatus=void 0,(ee=t.PasswordStatus||(t.PasswordStatus={})).RequiredPassword="RequiredPassword",ee.WrongPassword="WrongPassword",t.RotateDirection=void 0,(et=t.RotateDirection||(t.RotateDirection={})).Backward="Backward",et.Forward="Forward",t.ScrollMode=void 0,(en=t.ScrollMode||(t.ScrollMode={})).Page="Page",en.Horizontal="Horizontal",en.Vertical="Vertical",en.Wrapped="Wrapped",t.SpecialZoomLevel=void 0,(er=t.SpecialZoomLevel||(t.SpecialZoomLevel={})).ActualSize="ActualSize",er.PageFit="PageFit",er.PageWidth="PageWidth",t.ViewMode=void 0,(eo=t.ViewMode||(t.ViewMode={})).DualPage="DualPage",eo.DualPageWithCover="DualPageWithCover",eo.SinglePage="SinglePage";var 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},[])},ef=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}}},ep=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){ep.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=r[0],i=(o=eg(e,a),ep.has(o)?ep.get(o):null);null===i?e.getPageIndex(a).then(function(r){eh(e,a,r),eb(e,t).then(function(e){return n(e)})}):n(ef(i,r))}else n(ef(r[0],r))})})};(eE=es||(es={}))[eE.Solid=1]="Solid",eE[eE.Dashed=2]="Dashed",eE[eE.Beveled=3]="Beveled",eE[eE.Inset=4]="Inset",eE[eE.Underline=5]="Underline";var eE,ew,e_=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),eS=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=l.useContext(g).direction,o=eC(n),a=ek(n),i=r===t.TextDirection.RightToLeft,c=l.useRef(),u="";if(n.modificationDate){var s=function(e){var t=e_.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=eS(t[2],1,12,1)-1,o=eS(t[3],1,31,1),a=eS(t[4],0,23,0),i=eS(t[5],0,59,0),c=eS(t[6],0,59,0),l=t[7]||"Z",u=eS(t[8],0,23,0),s=eS(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 l.useLayoutEffect(function(){if(c.current){var e=document.querySelector('[data-annotation-id="'.concat(n.id,'"]'));if(e)return e.style.zIndex+=1,function(){e.style.zIndex="".concat(parseInt(e.style.zIndex,10)-1)}}},[]),l.createElement("div",{ref:c,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&&l.createElement(l.Fragment,null,l.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),l.createElement("div",{className:"rpv-core__annotation-popup-date"},u)),a&&l.createElement("div",{className:"rpv-core__annotation-popup-content"},a.split("\n").map(function(e,t){return l.createElement(l.Fragment,{key:t},e,l.createElement("br",null))})))};(eP=ew||(ew={})).Click="Click",eP.Hover="Hover";var eP,eM,ex=function(e){var n,r,o,a,i,c,u,s=e.annotation,d=e.children,f=e.ignoreBorder,p=e.hasPopup,m=e.isRenderable,g=e.page,h=e.viewport,v=s.rect,b=(r=(n=J(!1)).opened,o=n.toggle,i=(a=l.useState(ew.Hover))[0],c=a[1],{opened:r,closeOnHover:function(){i===ew.Hover&&o(t.ToggleStatus.Close)},openOnHover:function(){i===ew.Hover&&o(t.ToggleStatus.Open)},toggleOnClick:function(){switch(i){case ew.Click:r&&c(ew.Hover),o(t.ToggleStatus.Toggle);break;case ew.Hover:c(ew.Click),o(t.ToggleStatus.Open)}}}),E=b.closeOnHover,w=b.opened,_=b.openOnHover,S=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(!f&&s.borderStyle.width>0){switch(s.borderStyle.style){case es.Dashed:P.borderStyle="dashed";break;case es.Solid:P.borderStyle="solid";break;case es.Underline:P=Object.assign({borderBottomStyle:"solid"},P);case es.Beveled:case es.Inset:}var M=s.borderStyle.width;P.borderWidth="".concat(M,"px"),s.borderStyle.style!==es.Underline&&(C-=2*M,y-=2*M);var x=s.borderStyle,R=x.horizontalCornerRadius,L=x.verticalCornerRadius;(R>0||L>0)&&(P.borderRadius="".concat(R,"px / ").concat(L,"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 l.createElement(l.Fragment,null,m&&d({popup:{opened:w,closeOnHover:E,openOnHover:_,toggleOnClick:S}
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:l.createElement(l.Fragment,null,p&&w&&l.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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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)})},eL=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=!1===t.hasPopup,a=eC(t),i=ek(t),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.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)})},eT=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=eC(t),a=ek(t),i=!(!1!==t.hasPopup||!o&&!a),c=function(){var e,n,r,o,a,i=t.file;i&&(n=i.filename,o="string"==typeof(r=i.content)?"":URL.createObjectURL(new Blob([r],{type:""})),(a=document.createElement("a")).style.display="none",a.href=o||n,a.setAttribute("download",(e=n.split("/").pop())?e.split("#")[0].split("?")[0]:n),document.body.appendChild(a),a.click(),document.body.removeChild(a),o&&URL.revokeObjectURL(o))};return l.createElement(ex,{annotation:t,hasPopup:i,ignoreBorder:!0,isRenderable:!0,page:n,viewport:r},function(e){return l.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:c,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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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")}}},[]),l.createElement(ex,{annotation:t,hasPopup:i,ignoreBorder:!1,isRenderable:!(!o&&!a),page:n,viewport:r},function(e){return l.createElement("div",p({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--popup","data-annotation-id":t.id}),l.createElement(ey,{annotation:t}))})},eD=function(e){var n=e.annotation,r=e.childAnnotation,o=e.page,a=e.viewport,i=!1===n.hasPopup,c=eC(n),u=ek(n),s=!!(n.hasPopup||c||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 l.createElement(l.Fragment,null,d.map(function(e,t){return l.createElement(eD,{key:t,annotation:e,childAnnotation:r,page:o,viewport:
1a})}))}return l.createElement(ex,{annotation:n,hasPopup:i,ignoreBorder:!0,isRenderable:s,page:o,viewport:a},function(e){return l.createElement(l.Fragment,null,l.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&&l.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),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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&&l.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 l.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),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.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,c=e.pageIndex,u=e.scale,s=e.viewport,d=e.onExecuteNamedAction,f=e.onJumpFromLinkAnnotation,m=e.onJumpToDest,g=l.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:c})}m(e)})}};return h&&(b=Object.assign({},b,{title:h,"aria-label":h})),l.createElement(ex,{annotation:n,hasPopup:!1,ignoreBorder:!1,isRenderable:v,page:i,viewport:s},function(e){return l.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)}),l.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),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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&&l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.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),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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&&l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.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),c=!!(t.hasPopup||a||i),u=t.rect,s=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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}),l.createElement("svg",{height:"".concat(d,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(s," ").concat(d),width:"".concat(s,"px")},l.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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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 l.createElement(E,{size:16},l.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"}),l.createElement("path",{d:"M7.25,9.75A.25.25,0,1,1,7,10a.25.25,0,0,1,.25-.25"}),l.createElement("path",{d:"M12,9.75a.25.25,0,1,1-.25.25A.25.25,0,0,1,12,9.75"}),l.createElement("path",{d:"M16.75,9.75a.25.25,0,1,1-.25.25.25.25,0,0,1,.25-.25"}))},eY=function(){return l.createElement(E,{size:16},l.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"}),l.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"}),l.createElement("path",{d:"M21.423 5.406L17.415 9.414"}),l.createElement("path",{d:"M14.587 6.585L18.607 2.565"}),l.createElement("path",{d:"M5.405 21.424L9.413 17.416"}),l.createElement("path",{d:"M6.585 14.588L2.577 18.596"}),l.createElement("path",{d:"M18.602 21.419L14.595 17.412"}),l.createElement("path",{d:"M17.419 14.58L21.428 18.589"}),l.createElement("path",{d:"M2.582 5.399L6.588 9.406"}),l.createElement("path",{d:"M9.421 6.581L5.412 2.572"}))},eX=function(){return l.createElement(E,{size:16},l.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"}),l.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 l.createElement(E,{size:16},l.createElement("path",{d:"M2.000 2.500 L22.000 2.500 L22.000 23.500 L2.000 23.500 Z"}),l.createElement("path",{d:"M6 4.5L6 0.5"}),l.createElement("path",{d:"M18 4.5L18 0.5"}),l.createElement("path",{d:"M10 4.5L10 0.5"}),l.createElement("path",{d:"M14 4.5L14 0.5"}))},eQ=function(){return l.createElement(E,{size:16},l.createElement("path",{d:"M17.5 0.498L17.5 23.498"}),l.createElement("path",{d:"M10.5 0.498L10.5 23.498"}),l.createElement("path",{d:"M23.5.5H6.5a6,6,0,0,0,0,12h4"}))},e0=function(){return l.createElement(E,{size:16},l.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,c=eC(n),u=ek(n),s=!!(n.hasPopup||c||u),d=n.name?n.name.toLowerCase():"";return l.createElement(ex,{annotation:n,hasPopup:i,ignoreBorder:!1,isRenderable:s,page:o,viewport:
1a},function(e){return l.createElement(l.Fragment,null,l.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&&l.createElement("div",{className:"rpv-core__annotation-text-icon"},"check"===d&&l.createElement(w,null),"comment"===d&&l.createElement(eJ,null),"help"===d&&l.createElement(eY,null),"insert"===d&&l.createElement(e0,null),"key"===d&&l.createElement(eX,null),"note"===d&&l.createElement(e$,null),("newparagraph"===d||"paragraph"===d)&&l.createElement(eQ,null)),e.slot.children),r&&r.annotationType===t.AnnotationType.Popup&&e.popup.opened&&l.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),c=!!(t.hasPopup||a||i);return l.createElement(ex,{annotation:t,hasPopup:o,ignoreBorder:!0,isRenderable:c,page:n,viewport:r},function(e){return l.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,c=e.plugins,u=e.rotation,s=e.scale,d=e.onExecuteNamedAction,f=e.onJumpFromLinkAnnotation,p=e.onJumpToDest,m=l.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&&c.forEach(function(t){t.onAnnotationLayerRender&&t.onAnnotationLayerRender({annotations:h,container:e,pageIndex:i,rotation:u,scale:s})})},[]),l.createElement("div",{ref:m,className:"rpv-core__annotation-layer","data-testid":"core__annotation-layer-".concat(i)},h.map(function(e){var c=n.find(function(t){return t.parentId===e.id});switch(e.annotationType){case t.AnnotationType.Caret:return l.createElement(eR,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Circle:return l.createElement(eL,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.FileAttachment:return l.createElement(eT,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.FreeText:return l.createElement(eI,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Highlight:return l.createElement(eD,{key:e.id,annotation:e,childAnnotation:c,page:a,viewport:g});case t.AnnotationType.Ink:return l.createElement(eF,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Line:return l.createElement(eN,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Link:return l.createElement(eH,{key:e.id,annotation:e,annotationContainerRef:m,doc:r,outlines:o,page:a,pageIndex:i,scale:s,viewport:g,onExecuteNamedAction:d,onJumpFromLinkAnnotation:f,onJumpToDest:p});case t.AnnotationType.Polygon:return l.createElement(eW,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Polyline:return l.createElement(eK,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Popup:return l.createElement(eO,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Square:return l.createElement(eZ,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Squiggly:return l.createElement(eU,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Stamp:return l.createElement(eq,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.StrikeOut:return l.createElement(eG,{key:e.id,annotation:e,page:a,viewport:g});case t.AnnotationType.Text:return l.createElement(e1,{key:e.id,annotation:e,childAnnotation:c,page:a,viewport:g});case t.AnnotationType.Underline:return l.createElement(e5,{key:e.id,annotation:e,page:a,viewport:g});default:return l.createElement(l.Fragment,{key:e.id})}}))},e4=function(e){var t=e.page,n=e.renderAnnotations,r=F(),o=l.useState({loading:!0,annotations:[]}),a=o[0],i=o[1];return l.useEffect(function(){t.getAnnotations({intent:"display"}).then(function(e){r.current&&i({loading:!1,annotations:e})})},[]),a.loading?l.createElement(l.Fragment,null):n(a.annotations)},e3=function(e){var t=e.doc,n=e.outlines,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,c=e.scale,u=e.onExecuteNamedAction,s=e.onJumpFromLinkAnnotation,d=e.onJumpToDest;return l.createElement(e4,{page:r,renderAnnotations:function(e){return l.createElement(e2,{annotations:e,doc:t,outlines:n,page:r,pageIndex:o,plugins:a,rotation:i,scale:c,onExecuteNamedAction:u,onJumpFromLinkAnnotation:s,onJumpToDest:d})}})},e9=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,c=e.rotation,u=e.scale,s=e.width,d=e.onRenderCanvasCompleted,f=l.useRef();return v(function(){var e=f.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:c,scale:u,status:t.LayerRenderStatus.PreRender})});var l=o.getViewport({rotation:c,scale:u}),s=window.devicePixelRatio||1,p=Math.sqrt(16777216/(l.width*l.height)),m=s>p;m?r.style.transform="scale(1, 1)":r.style.removeProperty("transform");var g=Math.min(p,s),h=function(e,t){if(Math.floor(e)===e)return[e,1];var n,r,o=1/e;if(o>8)return[1,8];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>8)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=e9(l.width*g,v),r.height=e9(l.height*g,v),r.style.width="".concat(e9(l.width,b),"px"),r.style.height="".concat(e9(l.height,b),"px"),r.hidden=!0;var E=r.getContext("2d",{alpha:!1}),w=m||1!==s?[g,0,0,g,0,0]:null;return f.current=o.render({canvasContext:E,transform:w,viewport:l}),f.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:c,scale:u,status:t.LayerRenderStatus.DidRender})}),d()},function(){d()}),function(){r&&(r.width=0,r.height=0)}},[]),l.createElement("div",{className:"rpv-core__canvas-layer",style:{height:"".concat(r,"px"),width:"".concat(s,"px")}},l.createElement("canvas",{ref:n}))},e6=function(e){var t=e.height,n=e.page,r=e.rotation,o=e.scale,a=e.width,i=l.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 u.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)})})},[]),l.createElement("div",{className:"rpv-core__svg-layer",ref:i})},e7=function(e){var n=e.containerRef,r=e.page,o=e.pageIndex,a=e.plugins,i=e.rotation,c=e.scale,s=e.onRenderTextCompleted,d=l.useRef(),f=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 l=n.current;if(l){l.removeAttribute("data-testid");var p=r.getViewport({rotation:i,scale:c});return a.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:l,pageIndex:o,scale:c,status:t.LayerRenderStatus.PreRender})}),r.getTextContent().then(function(e){f(),d.current=u.renderTextLayer({container:l,textContent:e,textContentSource:e,viewport:p}),d.current.promise.then(function(){l.setAttribute("data-testid","core__text-layer-".concat(o)),[].slice.call(l.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:l,pageIndex:o,scale:c,status:t.LayerRenderStatus.DidRender})}),s()},function(){l.removeAttribute("data-testid"),s()})}),function(){var e;f(),null===(e=d.current)||void 0===e||e.cancel()}}},[]),l.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,c=e.pageSize,u=e.plugins,s=e.renderPage,d=e.renderQueueKey,f=e.rotation,p=e.scale,m=e.shouldRender,g=e.viewMode,v=e.onExecuteNamedAction,b=e.onJumpFromLinkAnnotation,E=e.onJumpToDest,w=e.onRenderCompleted,_=e.onRotatePage,k=F(),C=l.useState(null),y=C[0],P=C[1],M=l.useState(!1),x=M[0],R=M[1],L=l.useState(!1),T=L[0],I=L[1],O=l.useRef(),D=l.useRef(),N=Math.abs(f+i)%180==0,z=c.pageWidth*p,j=c.pageHeight*p,V=N?z:j,B=N?j:z,A=(c.rotation+f+i)%360,H=l.useRef(0);return l.useEffect(function(){P(null),R(!1),I(!1)},[i,f,p]),l.useEffect(function(){m&&k.current&&!y&&ev(n,a).then(function(e){k.current&&(H.current=d,P(e))})},[m,y]),l.useEffect(function(){x&&T&&(d!==H.current?(P(null),R(!1),I(!1)):w(a))},[x,T]),l.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?l.createElement(l.Fragment,null,(s||function(e){return l.createElement(l.Fragment,null,e.canvasLayer.children,e.textLayer.children,e.annotationLayer.children)})({annotationLayer:{attrs:{},children:l.createElement(e3,{doc:n,outlines:o,page:y,pageIndex:a,plugins:u,rotation:A,scale:p,onExecuteNamedAction:v,onJumpFromLinkAnnotation:b,onJumpToDest:E})},canvasLayer:{attrs:{},children:l.createElement(e8,{canvasLayerRef:O,height:B,page:y,pageIndex:a,plugins:u,rotation:A,scale:p,width:V,onRenderCanvasCompleted:function(){k.current&&R(!0)}})},canvasLayerRendered:x,doc:n,height:B,pageIndex:a,rotation:A,scale:p,svgLayer:{attrs:{},children:l.createElement(e6,{height:B,page:y,rotation:A,scale:p,width:V})},textLayer:{attrs:{},children:l.createElement(e7,{containerRef:D,page:y,pageIndex:a,plugins:u,rotation:A,scale:p,onRenderTextCompleted:function(){k.current&&I(!0)}})},textLayerRendered:T,width:V,markRendered:w,onRotatePage:function(e){return _(a,e)}}),u.map(function(e,t){return e.renderPageLayer?l.createElement(l.Fragment,{key:t},e.renderPageLayer({canvasLayerRef:O,canvasLayerRendered:x,doc:n,height:B,pageIndex:a,rotation:A,scale:p,textLayerRef:D,textLayerRendered:T,width:V})):l.createElement(l.Fragment,{key:t})})):l.createElement(S,{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};(r=eM||(eM={})).Horizontal="Horizontal",r.Vertical="Vertical",r.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=l.useState(tr),c=i[0],u=i[1],s=l.useState(t.current),d=s[0],f=s[1],p=r?-1:1,m=l.useRef(o);m.current=o;var g=l.useRef(tr),h=l.useRef(!0),b=l.useCallback(function(){h.current=!0,n&&u(g.current),a(!1)},[]),E=l.useCallback(function(){if(d){switch(m.current){case eM.Horizontal:g.current={left:p*d.scrollLeft,top:0};break;case eM.Both:g.current={left:p*d.scrollLeft,top:d.scrollTop};break;case eM.Vertical:default:g.current={left:0,top:d.scrollTop}}n&&!h.current||u(g.current)}},[d]);return v(function(){f(t.current)}),v(function(){if(d)return d.addEventListener("scroll",E,to),function(){d.removeEventListener("scroll",E,to)}},[d]),{scrollOffset:c,scrollTo:l.useCallback(function(e,n){var r=t.current;if(!r)return Promise.resolve();var o={left:0,top:0};switch(m.current){case eM.Horizontal:o.left=p*e.left;break;case eM.Both:o.left=p*e.left,o.top=e.top;break;case eM.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 eM.Horizontal:c=e.scrollLeft,i=0;case eM.Both:c=e.scrollLeft,i=e.scrollTop;break;case eM.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===eM.Vertical)u();else if(1e-4>=Math.abs(c-n.left)&&t===eM.Horizontal)u();else{var s,d=-1,f=c-n.left,p=i-n.top,m=function(r){-1===d&&(d=r);var a=r-d,g=o(Math.min(a/400,1)),h={left:c-f*g,top:i-p*g};switch(t){case eM.Horizontal:e.scrollLeft=h.left;break;case eM.Both:e.scrollLeft=h.left,e.scrollTop=h.top;break;case eM.Vertical:default:e.scrollTop=h.top}1e-4>=Math.abs(h.top-n.top)&&1e-4>=Math.abs(h.left-n.left)&&!l&&(window.cancelAnimationFrame(s),u()),a<400?s=window.requestAnimationFrame(m):window.cancelAnimationFrame(s)};s=window.requestAnimationFrame(m)}}(r,m.current,o,0,tn,function(){b(),e()})})):new Promise(function(e,t){switch(m.current){case eM.Horizontal:r.scrollLeft=o.left;break;case eM.Both:r.scrollLeft=o.left,r.scrollTop=o.top;break;case eM.Vertical:default:r.scrollTop=o.top}e()})},[t])}},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=ed(e.slice(1),2).map(function(e){return 2===e.length?e[0].width+e[1].width:e[0].width}),o=[e[0].width].concat(r);return Math.max.apply(Math,o)},tl={left:0,top:0},tu={left:0,top:0},ts={left:0,top:0},td={left:0,top:0},tf={height:0,width:0},tp={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,r,o,a,i,c,u,s=e.enableSmoothScroll,d=e.isRtl,f=e.numberOfItems,m=e.parentRef,g=e.setRenderRange,h=e.sizes,b=e.scrollMode,E=e.viewM
1ode,w=l.useState(!1),_=w[0],S=w[1],k=l.useCallback(function(e){return S(e)},[]),C=l.useRef(b);C.current=b;var y=l.useRef(E);y.current=E;var P=b===t.ScrollMode.Wrapped||E===t.ViewMode.DualPageWithCover||E===t.ViewMode.DualPage?eM.Both:b===t.ScrollMode.Horizontal?eM.Horizontal:eM.Vertical,M=ta({elementRef:m,enableSmoothScroll:s,isRtl:d,scrollDirection:P,onSmoothScroll:k}),x=M.scrollOffset,R=M.scrollTo,L=(r=(n=l.useState(m.current))[0],o=n[1],a=l.useRef(!1),c=(i=l.useReducer(tt,{height:0,width:0}))[0],u=i[1],v(function(){m.current!==r&&o(m.current)}),v(function(){if(r&&!a.current){a.current=!0;var e=r.getBoundingClientRect();u({rect:{height:e.height,width:e.width}})}},[r]),l.useEffect(function(){if(r){var e=new ResizeObserver(function(e,t){e.forEach(function(e){if(e.target===r){var t=e.contentRect;u({rect:{height:t.height,width:t.width}})}})});return e.observe(r),function(){e.unobserve(r)}}},[r]),c),T=l.useRef({scrollOffset:tp,measurements:[]});T.current.scrollOffset=x;var I=l.useMemo(function(){return Array(f).fill(-1)},[]),O=l.useState(I),D=O[0],F=O[1],N=l.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<f&&F(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})},[]),z=l.useMemo(function(){return b===t.ScrollMode.Page&&E===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}(f,L,h):E===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}(f,L,h,b):E===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}(f,L,h,b):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 f={left:u.left+d.width,top:u.top+d.height};a[s]={index:s,start:u,size:d,end:f,visibility:-1}}return a}(f,L,h,b)},[b,h,E,L]),j=z[f-1]?{height:z[f-1].end.top,width:z[f-1].end.left}:tf;T.current.measurements=z;var V=l.useMemo(function(){var e=function(e,t,n,r){var o=0;switch(e){case eM.Horizontal:o=r.left;break;case eM.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 eM.Horizontal:return t[n].start.left;case eM.Both:case eM.Vertical:default:return t[n].start.top}});if(e===eM.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===eM.Horizontal&&s.width<0||e===eM.Vertical&&s.height<0||e===eM.Both&&(s.width<0||s.height<0))break;l++}return{start:i,end:l}}(P,z,L,x),n=e.start,r=e.end,o=D.slice(ti(0,f,n),ti(0,f,r)),a=n+o.reduce(function(e,t,n,r){return t>r[e]?n:e},0),i=a=ti(0,f-1,a),c=g({endPage:r,numPages:f,startPage:n}),l=c.startPage,u=c.endPage;switch(l=Math.max(l,0),u=Math.min(u,f-1),E){case t.ViewMode.DualPageWithCover:a>0&&(i=a%2==1?a:a-1),l=0===l?0:l%2==1?l:l-1,f-(u=u%2==1?u-1:u)<=2&&(u=f-1);break;case t.ViewMode.DualPage:i=a%2==0?a:a-1,l=l%2==0?l:l-1,u=u%2==1?u:u-1;break;case t.ViewMode.SinglePage:default:i=a}return{startPage:l,endPage:u,maxVisbilityIndex:i}},[z,L,x,E,D]),B=V.startPage,A=V.endPage,H=V.maxVisbilityIndex,W=l.useMemo(function(){for(var e=[],t=function(t){var n=z[t],r=p(p({},n),{visibility:void 0!==D[t]?D[t]:-1,measureRef:function(e){e&&(e.setAttribute(tm,"".concat(t)),N.observe(e))}});e.push(r)},n=B;n<=A;n++)t(n);return e},[B,A,D,z]),K=l.useCallback(function(e,n){var r=T.current.measurements[ti(0,f-1,e)],o=C.current===t.ScrollMode.Page?tp:n;return r?R({left:o.left+r.start.left,top:o.top+r.start.top},s):Promise.resolve()},[R,s]),Z=l.useCallback(function(e,n){var r=T.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(y.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 K(i,n)},[]),U=l.useCallback(function(e,n){for(var r=T.current.measurements,o=r[e].start,a=e,i=!1,c=f-1;c>=0;c--)if(o.top-r[c].start.top>1e-12){i=!0,a=r[c].index;break}if(!i)return Promise.resolve();switch(y.current){case t.ViewMode.DualPage:a=a%2==0?a:a-1;break;case t.ViewMode.DualPageWithCover:a=a%2==0?a-1:a}return a===e&&(a=e-1),K(a,n)},[]),q=l.useCallback(function(e,n){if(y.current===t.ViewMode.DualPageWithCover||y.current===t.ViewMode.DualPage)return Z(e,n);switch(C.current){case t.ScrollMode.Wrapped:return Z(e,n);case t.ScrollMode.Horizontal:case t.ScrollMode.Vertical:default:return K(e+1,n)}},[]),G=l.useCallback(function(e,n){if(y.current===t.ViewMode.DualPageWithCover||y.current===t.ViewMode.DualPage)return U(e,n);switch(C.current){case t.ScrollMode.Wrapped:return U(e,n);case t.ScrollMode.Horizontal:case t.ScrollMode.Vertical:default:return K(e-1,n)}},[]),J=l.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%"}}}(j,C.current)},[j]),Y=l.useCallback(function(e){return C.current!==t.ScrollMode.Page?{}:{height:"".concat(L.height,"px"),width:"100%",position:"absolute",top:0,transform:"translateY(".concat(e.start.top,"px)")}},[L]),X=l.useCallback(function(e){return function(e,n,r,o,a){var i,c,l,u,s,d,f,p=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%"})[p]=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")})[p]=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")})[p]=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")})[p]=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")})[p]=0,s.position="absolute",s.top=0,s;case t.ScrollMode.Wrapped:return(d={height:"".concat(v,"px"),width:"".concat(b,"px")})[p]=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(f={height:"".concat(v,"px"),width:"100%"})[p]=0,f.position="absolute",f.top=0,f.transform="translateY(".concat(e.start.top,"px)"),f}}(e,d,h,y.current,C.current)},[d,h]),$=l.useCallback(function(e,n){var r=T.current,o=r.measurements,a=r.scrollOffset,i=o[ti(0,f-1,n)];return i?R(C.current===t.ScrollMode.Page?{left:i.start.left,top:i.start.top}:{left:a.left*e,top:a.top*e},!1):Promise.resolve()},[]);return l.useEffect(function(){return function(){N.disconnect()}},[]),{boundingClientRect:L,isSmoothScrolling:_,startPage:B,endPage:A,maxVisbilityIndex:H,virtualItems:W,getContainerStyles:J,getItemContainerStyles:Y,getItemStyles:X,scrollToItem:K,scrollToNextItem:q,scrollToPreviousItem:G,zoom:$}},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=l.useRef([]),l.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=l.useRef([]),l.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},c=function(){var e=o.pop();return e&&a.enqueue(e),e&&e.pageIndex===r()?c():e};return{getNextDestination:i,getPreviousDestination:c,markVisitedDestination:l.useCallback(function(e){o.push(e)},[])}},tE=function(e){var t=[];return e.map(function(e){var n;t=t.concat(e).concat((n=[],e.items&&e.items.length>0&&(n=n.concat(tE(e.items))),n))}),t},tw={capture:!1,passive:!0},t_={height:0,width:0},tS={height:0,width:0},tk=function(e){var n,r,o,a,i=e.getCurrentPage,c=e.getCurrentScrollMode,u=e.jumpToPage,s=e.targetRef,d=l.useState(t.FullScreenMode.Normal),f=d[0],p=d[1],m=(r=(n=l.useState(t_))[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=l.useState(tS),h=g[0],b=g[1],E=l.useRef(tS),w=l.useRef(i()),_=l.useRef(tS),S=l.useState(s.current),k=S[0],C=S[1],y=l.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=e.target.getBoundingClientRect();b({height:t.height,width:t.width})})});return e.observe(k),function(){e.unobserve(k),e.disconnect()}}},[k]);var P=l.useCallback(function(e){var n=O();return n&&n!==e?(p(t.FullScreenMode.Normal),I(n)):Promise.resolve()},[]),M=l.useCallback(function(e){e&&T()&&(C(e),P(e).then(function(){y.current=e,p(t.FullScreenMode.Entering),R&&e[L.RequestFullScreen]()}))},[]),x=l.useCallback(function(){O()&&(p(t.FullScreenMode.Exitting),I(document))},[]),F=l.useCallback(function(){k&&O()!==k&&p(t.FullScreenMode.Exitting)},[k]);return l.useEffect(function(){switch(f){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:c()===t.ScrollMode.Page?u(w.current).then(function(){p(t.FullScreenMode.EnteredCompletely)}):p(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:p(t.FullScreenMode.Normal),c()===t.ScrollMode.Page&&u(w.current)}},[f]),l.useEffect(function(){if(f!==t.FullScreenMode.Normal)return f===t.FullScreenMode.Entering&&m.height===h.height&&m.width===h.width&&m.height>0&&m.width>0&&(0===_.current.height||m.height==_.current.height)?(_.current={height:window.innerHeight,width:window.innerWidth},void p(t.FullScreenMode.Entered)):void(f===t.FullScreenMode.Exitting&&E.current.height===m.height&&E.current.width===m.width&&m.height>0&&m.width>0&&p(t.FullScreenMode.Exited))},[f,m,h]),l.useEffect(function(){return R&&document.addEventListener(L.FullScreenChange,F),function(){R&&document.removeEventListener(L.FullScreenChange,F)}},[k]),{enterFullScreenMode:M,exitFullScreenMode:x,fullScreenMode:f}},tC={buildPageStyles:function(){return{}},transformSize:function(e){return e.size}},ty={left:0,top:0}
1,tP=function(e){var n=e.currentFile,r=e.defaultScale,o=e.doc,a=e.enableSmoothScroll,i=e.initialPage,c=e.initialRotation,u=e.initialScale,s=e.pageLayout,d=e.pageSizes,f=e.plugins,m=e.renderPage,b=e.scrollMode,E=e.setRenderRange,w=e.viewMode,_=e.viewerState,S=e.onDocumentLoad,k=e.onOpenFile,C=e.onPageChange,y=e.onRotate,P=e.onRotatePage,M=e.onZoom,x=o.numPages,R=o.loadingTask.docId,L=l.useContext(A).l10n,T=l.useContext(g),I=T.direction===t.TextDirection.RightToLeft,O=l.useRef(),z=l.useRef(),j=l.useState(i),B=j[0],H=j[1],W=l.useRef(null),K=tb({getCurrentPage:function(){return eb.current.pageIndex}}),Z=l.useState(c),U=Z[0],q=Z[1],G=N(U),J=l.useState(!1),Y=J[0],X=J[1],$=l.useState(new Map),Q=$[0],ee=$[1],et=l.useState(b),en=et[0],er=et[1],eo=N(en),ea=l.useState(w),ei=ea[0],ec=ea[1],el=N(ei),eu=(eQ=F(),e1=(e0=l.useState([]))[0],e5=e0[1],l.useEffect(function(){o.getOutline().then(function(e){eQ.current&&null!==e&&e5(tE(e))})},[]),e1),es=l.useState(u),ef=es[0],eg=es[1],eh=N(ef),eb=l.useRef(_),eE=l.useRef("string"==typeof r?r:null),ew=l.useRef(-1),e_=l.useRef(-1),eS=l.useRef(i),ek=tk({getCurrentPage:function(){return eb.current.pageIndex},getCurrentScrollMode:function(){return eb.current.scrollMode},jumpToPage:function(e){return eW(e)}
1,targetRef:z}),eC=l.useState(-1),ey=eC[0],eP=eC[1],eM=l.useState(0),ex=eM[0],eR=eM[1],eL=V({doc:o});l.useEffect(function(){return function(){ep.clear(),em.clear()}},[R]);var eT=l.useMemo(function(){return Object.assign({},tC,s)},[]),eI=l.useMemo(function(){return Array(x).fill(0).map(function(e,t){var n=[d[t].pageHeight,d[t].pageWidth],r=Math.abs(U)%180==0?{height:n[0],width:n[1]}:{height:n[1],width:n[0]},o={height:r.height*ef,width:r.width*ef};return eT.transformSize({numPages:x,pageIndex:t,size:o})})},[U,ef]),eO=th({enableSmoothScroll:a,isRtl:I,numberOfItems:x,parentRef:z,scrollMode:en,setRenderRange:E,sizes:eI,viewMode:ei});e4=(e2={targetRef:z,onResize:D(function(){!eE.current||eb.current.fullScreenMode!==t.FullScreenMode.Normal||i>0&&eS.current===i||eY(eE.current)},200)}).targetRef,e3=e2.onResize,v(function(){var e=new ResizeObserver(function(e){e.forEach(function(e){e3(e.target)})}),t=e4.current;if(t)return e.observe(t),function(){e.unobserve(t)}},[]);var eD=function(e){var t=e;f.forEach(function(e){e.onViewerStateChange&&(t=e.onViewerStateChange(t))}),eb.current=t},eF=function(){return z.current},eN=function(){return eb.current},ez=l.useCallback(function(e){K.markVisitedDestination(e)},[]),ej=l.useCallback(function(e){var n=e.pageIndex,r=e.bottomOffset,a=e.leftOffset,i=e.scaleTo,c=z.current,l=eb.current;return c&&l?new Promise(function(e,u){ev(o,n).then(function(o){var u=o.getViewport({scale:1}),s=0,f=("function"==typeof r?r(u.width,u.height):r)||0,p=("function"==typeof a?a(u.width,u.height):a)||0,m=l.scale;switch(i){case t.SpecialZoomLevel.PageFit:s=0,p=0,eY(t.SpecialZoomLevel.PageFit);break;case t.SpecialZoomLevel.PageWidth:m=tv(c,d[n].pageHeight,d[n].pageWidth,t.SpecialZoomLevel.PageWidth,w,x),s=(u.height-f)*m,p*=m,eY(m);break;default:s=(u.height-f)*m,p*=m}switch(l.scrollMode){case t.ScrollMode.Horizontal:eO.scrollToItem(n,{left:p,top:0}).then(function(){e()});break;case t.ScrollMode.Vertical:default:eO.scrollToItem(n,{left:0,top:s}).then(function(){e()})}})}):Promise.resolve()},[]),eV=l.useCallback(function(e){return K.markVisitedDestination(e),ej(e)},[]),eB=l.useCallback(function(){var e=K.getNextDestination();return e?ej(e):Promise.resolve()},[]),eA=l.useCallback(function(){var e=K.getPreviousDestination();return e?ej(e):Promise.resolve()},[]),eH=l.useCallback(function(){return eO.scrollToNextItem(eb.current.pageIndex,ty)},[]),eW=l.useCallback(function(e){return 0<=e&&e<x?eO.scrollToItem(e,ty):Promise.resolve()},[]),eK=l.useCallback(function(){return eO.scrollToPreviousItem(eb.current.pageIndex,ty)},[]),eZ=l.useCallback(function(e){var t;"pdf"===((t=e.name.split(/\./).pop())?t.toLowerCase():"").toLowerCase()&&new Promise(function(t){var n=new FileReader;n.readAsArrayBuffer(e),n.onload=function(){t(new Uint8Array(n.result))}}).then(function(t){k(e.name,t)})},[k]),eU=l.useCallback(function(e){var n=e===t.RotateDirection.Backward?-90:90,r=eb.current.rotation,a=360===r||-360===r?n:r+n;eL.markNotRendered(),q(a),eD(p(p({},eb.current),{rotation:a})),y({direction:e,doc:o,rotation:a})},[]),eq=l.useCallback(function(e,n){var r=n===t.RotateDirection.Backward?-90:90,a=eb.current.pagesRotation,i=(a.has(e)?a.get(e):c)+r,l=a.set(e,i);ee(l),X(function(e){return!e}),eD(p(p({},eb.current),{pagesRotation:l,rotatedPage:e})),P({direction:n,doc:o,pageIndex:e,rotation:i}),eL.markRendering(e),eP(e)},[]),eG=l.useCallback(function(e){eD(p(p({},eb.current),{scrollMode:e})),er(e)},[]),eJ=l.useCallback(function(e){eD(p(p({},eb.current),{viewMode:e})),ec(e)},[]),eY=l.useCallback(function(e){var t=z.current,n=eb.current.pageIndex;if(!(n<0||n>=x)){var r=d[n].pageHeight,a=d[n].pageWidth,i=t?"string"==typeof e?tv(t,r,a,e,eb.current.viewMode,x):e:1;eE.current="string"==typeof e?e:null,i!==eb.current.scale&&(eR(function(e){return e+1}),eL.markNotRendered(),eg(i),M({doc:o,scale:i}),eD(p(p({},eb.current),{scale:i})))}},[]),eX=l.useCallback(function(e){ek.enterFullScreenMode(e)},[]),e$=l.useCallback(function(){ek.exitFullScreenMode()},[]);l.useEffect(function(){eD(p(p({},eb.current),{fullScreenMode:ek.fullScreenMode}))},[ek.fullScreenMode]),l.useEffect(function(){var e={enterFullScreenMode:eX,exitFullScreenMode:e$,getPagesContainer:eF,getViewerState:eN,jumpToDestination:eV,jumpToNextDestination:eB,jumpToPreviousDestination:eA,jumpToNextPage:eH,jumpToPreviousPage:eK,jumpToPage:eW,openFile:eZ,rotate:eU,rotatePage:eq,setViewerState:eD,switchScrollMode:eG,switchViewMode:eJ,zoom:eY};return f.forEach(function(t){t.install&&t.install(e)}),function(){f.forEach(function(t){t.uninstall&&t.uninstall(e)})}},[R]),l.useEffect(function(){S({doc:o,file:n}),f.forEach(function(e){e.onDocumentLoad&&e.onDocumentLoad({doc:o,file:n})})},[R]);var eQ,e0,e1,e5,e2,e4,e3,e9,e8,e6,e7=eO.boundingClientRect;e9=function(){i&&eW(i)},e8=e7.height>0&&e7.width>0,e6=l.useRef(!1),v(function(){e8&&!e6.current&&(e6.current=!0,e9())},[e9,e8]),v(function(){var e=eb.current.pageIndex;e>-1&&eo!==en&&eO.scrollToItem(e,ty).then(function(){ek.fullScreenMode===t.FullScreenMode.EnteredCompletely&&(a||eL.markNotRendered(),ew.current=-1)})},[en]),v(function(){var e=eb.current.pageIndex;e>-1&&G!==U&&eO.scrollToItem(e,ty)},[U]),v(function(){0!=eh&&eh!=eb.current.scale&&eO.zoom(eb.current.scale/eh,eb.current.pageIndex).then(function(){ek.fullScreenMode===t.FullScreenMode.EnteredCompletely&&(e_.current=-1)})},[ef]),v(function(){if(el!==eb.current.viewMode){var e=eO.startPage,t=eO.endPage,n=eO.virtualItems;eL.markNotRendered(),eL.setRange(e,t);for(var r=function(e){var t=n.find(function(t){return t.index===e});t&&eL.setVisibility(e,t.visibility)},o=e;o<=t;o++)r(o);tn()}},[ei]),v(function(){var e=eb.current.pageIndex;e>-1&&el!==ei&&eO.scrollToItem(e,ty)},[ei]),v(function(){var e=eb.current.pageIndex;e>0&&e===i&&eS.current===i&&eE.current&&(eS.current=-1,eY(eE.current))},[B]),l.useEffect(function(){eO.isSmoothScrolling||null!==W.current&&W.current===B||(W.current=B,C({currentPage:B,doc:o}))},[B,eO.isSmoothScrolling]),l.useEffect(function(){ek.fullScreenMode===t.FullScreenMode.Entering&&eb.current.scrollMode===t.ScrollMode.Page&&(ew.current=eb.current.pageIndex),ek.fullScreenMode===t.FullScreenMode.EnteredCompletely&&eb.current.scrollMode===t.ScrollMode.Page&&a&&(ew.current=-1),ek.fullScreenMode===t.FullScreenMode.EnteredCompletely&&eE.current&&(e_.current=eb.current.pageIndex,eY(eE.current))},[ek.fullScreenMode]),l.useEffect(function(){if(ek.fullScreenMode!==t.FullScreenMode.Entering&&ek.fullScreenMode!==t.FullScreenMode.Exitting&&!eO.isSmoothScrolling){var e=eO.startPage,n=eO.endPage,r=eO.maxVisbilityIndex,o=eO.virtualItems,a=ek.fullScreenMode===t.FullScreenMode.Entered||ek.fullScreenMode===t.FullScreenMode.EnteredCompletely;if(!(a&&r!==ew.current&&ew.current>-1||a&&r!==e_.current&&e_.current>-1)){H(r),eD(p(p({},eb.current),{pageIndex:r})),eL.setRange(e,n);for(var i=function(e){var t=o.find(function(t){return t.index===e});t&&eL.setVisibility(e,t.visibility)},c=e;c<=n;c++)i(c);tn()}}},[eO.startPage,eO.endPage,eO.isSmoothScrolling,eO.maxVisbilityIndex,ek.fullScreenMode,Y,U,ef]);var tt=l.useCallback(function(e){eL.markRendered(e),tn()},[ex]),tn=function(){var e=eL.getHighestPriorityPage();e>-1&&eL.isInRange(e)&&(eL.markRendering(e),eP(e))},tr=function(e){var t=B-1,n=B+1;switch(e){case"FirstPage":eW(0);break;case"LastPage":eW(x-1);break;case"NextPage":n<x&&eW(n);break;case"PrevPage":t>=0&&eW(t)}},to=l.useCallback(function(){var e=eO.virtualItems,n=[];
1switch(ei){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=L&&L.core?L.core.pageLabel:"Page {{pageIndex}}",a={attrs:{className:"rpv-core__inner-container","data-testid":"core__inner-container",ref:O,style:{height:"100%"}},children:l.createElement(l.Fragment,null),subSlot:{attrs:{"data-testid":"core__inner-pages",className:h({"rpv-core__inner-pages":!0,"rpv-core__inner-pages--horizontal":en===t.ScrollMode.Horizontal,"rpv-core__inner-pages--rtl":I,"rpv-core__inner-pages--single":en===t.ScrollMode.Page,"rpv-core__inner-pages--vertical":en===t.ScrollMode.Vertical,"rpv-core__inner-pages--wrapped":en===t.ScrollMode.Wrapped}),ref:z,style:{height:"100%",position:"relative"}},children:l.createElement("div",{"data-testid":"core__inner-current-page-".concat(B),style:Object.assign({"--scale-factor":ef},eO.getContainerStyles())},n.map(function(e){return l.createElement("div",{className:h({"rpv-core__inner-page-container":!0,"rpv-core__inner-page-container--single":en===t.ScrollMode.Page}),style:eO.getItemContainerStyles(e[0]),key:"".concat(e[0].index,"-").concat(ei)},e.map(function(e){var n=ei===t.ViewMode.DualPageWithCover&&(0===e.index||x%2==0&&e.index===x-1);return l.createElement("div",{"aria-label":r.replace("{{pageIndex}}","".concat(e.index+1)),className:h({"rpv-core__inner-page":!0,"rpv-core__inner-page--dual-even":ei===t.ViewMode.DualPage&&e.index%2==0,"rpv-core__inner-page--dual-odd":ei===t.ViewMode.DualPage&&e.index%2==1,"rpv-core__inner-page--dual-cover":n,"rpv-core__inner-page--dual-cover-even":ei===t.ViewMode.DualPageWithCover&&!n&&e.index%2==0,"rpv-core__inner-page--dual-cover-odd":ei===t.ViewMode.DualPageWithCover&&!n&&e.index%2==1,"rpv-core__inner-page--single":ei===t.ViewMode.SinglePage&&en===t.ScrollMode.Page}),role:"region",key:"".concat(e.index,"-").concat(ei),style:Object.assign({},eO.getItemStyles(e),eT.buildPageStyles({numPages:x,pageIndex:e.index,scrollMode:en,viewMode:ei}))},l.createElement(te,{doc:o,measureRef:e.measureRef,outlines:eu,pageIndex:e.index,pageRotation:Q.has(e.index)?Q.get(e.index):0,pageSize:d[e.index],plugins:f,renderPage:m,renderQueueKey:ex,rotation:U,scale:ef,shouldRender:ey===e.index,viewMode:ei,onExecuteNamedAction:tr,onJumpFromLinkAnnotation:ez,onJumpToDest:eV,onRenderCompleted:tt,onRotatePage:eq}))}))}))}};return f.forEach(function(e){e.renderViewer&&(a=e.renderViewer({containerRef:O,doc:o,pagesContainerRef:z,pagesRotation:Q,pageSizes:d,rotation:U,slot:a,themeContext:T,jumpToPage:eW,openFile:eZ,rotate:eU,rotatePage:eq,switchScrollMode:eG,switchViewMode:eJ,zoom:eY}))}),a},[f,eO]),ta=l.useCallback(function(e){return l.createElement("div",p({},e.attrs,{style:e.attrs&&e.attrs.style?e.attrs.style:{}}),e.children,e.subSlot&&ta(e.subSlot))},[]);return ta(to())},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,c=l.useRef(),u=l.useState({pageSizes:[],scale:0}),s=u[0],d=u[1];return l.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=c.current;if(o&&0!==e.length){var l,u,s=e[0].pageWidth,f=e[0].pageHeight,p=o.parentElement,m=(p.clientWidth-45)/s,g=(p.clientHeight-45)/f,h=m;switch(a){case t.ScrollMode.Horizontal:h=Math.min(m,g);break;case t.ScrollMode.Vertical:default:h=m}d({pageSizes:e,scale:n?"string"==typeof n?tv(p,f,s,n,i,r.numPages):n:(l=h,-1===(u=tM.findIndex(function(e){return e>=l}
1))||0===u?l:tM[u-1])})}})},[r.loadingTask.docId]),0===s.pageSizes.length||0===s.scale?l.createElement("div",{className:"rpv-core__page-size-calculator","data-testid":"core__page-size-calculating",ref:c},l.createElement(S,null)):o(s.pageSizes,s.scale)},tR=function(){},tL=function(e){function t(t,n){var r=e.call(this)||this;return r.verifyPassword=t,r.passwordStatus=n,r}return d(t,e),t}(tR),tT=function(e){var n=e.passwordStatus,r=e.renderProtectedView,o=e.verifyPassword,a=e.onDocumentAskPassword,i=l.useContext(A).l10n,c=l.useState(""),u=c[0],s=c[1],d=l.useContext(g).direction===t.TextDirection.RightToLeft,f=function(){return o(u)};return l.useEffect(function(){a&&a({verifyPassword:o})},[]),r?r({passwordStatus:n,verifyPassword:o}):l.createElement("div",{className:"rpv-core__asking-password-wrapper"},l.createElement("div",{className:h({"rpv-core__asking-password":!0,"rpv-core__asking-password--rtl":d})},l.createElement("div",{className:"rpv-core__asking-password-message"},n===t.PasswordStatus.RequiredPassword&&i.core.askingPassword.requirePasswordToOpen,n===t.PasswordStatus.WrongPassword&&i.core.wrongPassword.tryAgain),l.createElement("div",{className:"rpv-core__asking-password-body"},l.createElement("div",{className:h({"rpv-core__asking-password-input":!0,"rpv-core__asking-password-input--ltr":!d,"rpv-core__asking-password-input--rtl":d})},l.createElement(k,{testId:"core__asking-password-input",type:"password",value:u,onChange:s,onKeyDown:function(e){"Enter"===e.key&&f()}})),l.createElement(_,{onClick:f},i.core.askingPassword.submit))))},tI=function(e){function t(t){var n=e.call(this)||this;return n.doc=t,n}return d(t,e),t}(tR),tO=function(e){function t(t){var n=e.call(this)||this;return n.error=t,n}return d(t,e),t}(tR),tD=function(e){function t(t){var n=e.call(this)||this;return n.percentages=t,n}return d(t,e),t}(tR),tF=function(e){var n=e.characterMap,r=e.file,o=e.httpHeaders,a=e.render,i=e.renderError,c=e.renderLoader,s=e.renderProtectedView,d=e.transformGetDocumentParams,f=e.withCredentials,p=e.onDocumentAskPassword,m=l.useContext(g).direction===t.TextDirection.RightToLeft,v=l.useState(new tD(0)),b=v[0],E=v[1],w=l.useRef(""),_=F();return l.useEffect(function(){w.current="",E(new tD(0));var e=new u.PDFWorker({name:"PDFWorker_".concat(Date.now())}),a=Object.assign({httpHeaders:o,withCredentials:f,worker:e},"string"==typeof r?{url:r}:{data:r},n?{cMapUrl:n.url,cMapPacked:n.isCompressed}:{}),i=d?d(a):a,c=u.getDocument(i);return c.onPassword=function(e,n){switch(n){case u.PasswordResponses.NEED_PASSWORD:_.current&&E(new tL(e,t.PasswordStatus.RequiredPassword));break;case u.PasswordResponses.INCORRECT_PASSWORD:_.current&&E(new tL(e,t.PasswordStatus.WrongPassword))}},c.onProgress=function(e){var t=e.total>0?Math.min(100,100*e.loaded/e.total):100;_.current&&""===w.current&&E(new tD(t))},c.promise.then(function(e){w.current=e.loadingTask.docId,_.current&&E(new tI(e))},function(t){return _.current&&!e.destroyed&&E(new tO({message:t.message||"Cannot load document",name:t.name}))}),function(){c.destroy(),e.destroy()}},[r]),b instanceof tL?l.createElement(tT,{passwordStatus:b.passwordStatus,renderProtectedView:s,verifyPassword:b.verifyPassword,onDocumentAskPassword:p}):b instanceof tI?a(b.doc):b instanceof tO?i?i(b.error):l.createElement("div",{className:h({"rpv-core__doc-error":!0,"rpv-core__doc-error--rtl":m})},l.createElement("div",{className:"rpv-core__doc-error-text"},b.error.message)):l.createElement("div",{"data-testid":"core__doc-loading",className:h({"rpv-core__doc-loading":!0,"rpv-core__doc-loading--rtl":m})},c?c(b.percentages):l.createElement(S,null))},tN=function(e,t){var n=l.useMemo(function(){return"auto"===e?"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e},[]),r=l.useState(n),o=r[0],a=r[1],i=N(o);return l.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)}}},[]),l.useEffect(function(){o!==i&&t&&t(o)},[o]),l.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=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.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=l.useState(!1),a=o[0],i=o[1],c=r?p(p({},t),{"data-testid":r}):t,u=b({once:!0,onVisibilityChanged:function(e){e.isVisible&&i(!0)}});return l.createElement("div",p({ref:u},c),a&&n)},t.LocalizationContext=A,t.Menu=function(e){var n=e.children,r=l.useRef(),o=l.useRef([]),a=l.useContext(g).direction===t.TextDirection.RightToLeft,i=function(e){if(r.current)switch(e.key){case"Tab":e.preventDefault();break;case"ArrowDown":e.preventDefault(),c(function(e,t){return t+1});break;case"ArrowUp":e.preventDefault(),c(function(e,t){return t-1});break;case"End":e.preventDefault(),c(function(e,t){return e.length-1});break;case"Home":e.preventDefault(),c(function(e,t){return 0})}},c=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=(t=[],e.querySelectorAll('.rpv-core__menu-item[role="menuitem"]').forEach(function(n){if(n instanceof HTMLElement){var r=n.parentElement;(r===e||"none"!==window.getComputedStyle(r).display)&&t.push(n)}}),t);o.current=n}},[]),v(function(){return document.addEventListener("keydown",i),function(){document.removeEventListener("keydown",i)}},[]),l.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 l.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,c=e.onClick,u=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.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:c},i?{"data-testid":i}:{}),l.createElement("div",{className:h({"rpv-core__menu-item-icon":!0,"rpv-core__menu-item-icon--ltr":!u,"rpv-core__menu-item-icon--rtl":u})}
1,void 0===o?null:o),l.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),l.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&&l.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,c=void 0!==i&&i,u=e.isSelected,s=e.testId,d=e.onClick,f=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.createElement("button",p({"aria-label":void 0===n?"":n},o&&{"aria-keyshortcuts":o},c&&{"aria-disabled":!0},{className:h({"rpv-core__minimal-button":!0,"rpv-core__minimal-button--disabled":c,"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,c=t||"".concat(W());return l.createElement(Y,{target:i?function(e,t){return l.createElement("div",{"aria-expanded":t?"true":"false","aria-haspopup":"dialog","aria-controls":"rpv-core__modal-body-".concat(c)},i(e,t))}:null,content:function(e){return l.createElement(q,null,l.createElement(U,{ariaControlsSuffix:c,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,c=e.offset,u=e.position,s=e.target,d=J(!1),f=d.opened,p=d.toggle,m=l.useRef(),g=l.useMemo(function(){return n||"".concat(W())},[]);return l.createElement("div",{ref:m,"aria-expanded":f?"true":"false","aria-haspopup":void 0===t?"dialog":t,"aria-controls":"rpv-core__popver-body-".concat(g)},s(p,f),f&&l.createElement(l.Fragment,null,(void 0===i||i)&&l.createElement(el,{closeOnEscape:o,onClose:p}),l.createElement(ec,{ariaControlsSuffix:g,closeOnClickOutside:r,offset:c,position:u,targetRef:m,onClose:p},a(p))))},t.PrimaryButton=_,t.ProgressBar=function(e){var n=e.progress,r=l.useContext(g).direction===t.TextDirection.RightToLeft;return l.createElement("div",{className:h({"rpv-core__progress-bar":!0,"rpv-core__progress-bar--rtl":r})},l.createElement("div",{className:"rpv-core__progress-bar-progress",style:{width:"".concat(n,"%")}},n,"%"))},t.Separator=function(){return l.createElement("div",{className:"rpv-core__separator"})},t.Spinner=S,t.Splitter=function(e){var n=e.constrain,r=l.useContext(g).direction===t.TextDirection.RightToLeft,o=l.useRef(),a=l.useRef(),i=l.useRef(),c=l.useRef(0),u=l.useRef(0),s=l.useRef(0),d=l.useRef(0),f={capture:!0},p=function(e){var t=o.current,l=a.current,u=i.current;if(t&&l&&u){var f=d.current,p=e.clientX-c.current,m=s.current+(r?-p:p),g=t.parentElement.getBoundingClientRect().width,h=100*m/g;if(t.classList.add("rpv-core__splitter--resizing"),n){var v=g-m-f;if(!n({firstHalfPercentage:h,firstHalfSize:m,secondHalfPercentage:100*v/g,secondHalfSize:v}))return}l.style.width="".concat(h,"%"),document.body.classList.add("rpv-core__splitter-body--resizing"),l.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",p,f),document.removeEventListener("mouseup",m,f))};return l.useEffect(function(){var e=o.current;e&&(d.current=e.getBoundingClientRect().width,a.current=e.previousElementSibling,i.current=e.nextElementSibling)},[]),l.createElement("div",{ref:o,className:"rpv-core__splitter",onMouseDown:function(e){var t=a.current;t&&(c.current=e.clientX,u.current=e.clientY,s.current=t.getBoundingClientRect().width,document.addEventListener("mousemove",p,f),document.addEventListener("mouseup",m,f))}})},t.TextBox=k,t.ThemeContext=g,t.Tooltip=function(e){var n=e.ariaControl
1sSuffix,r=e.content,o=e.offset,a=e.position,i=e.target,c=J(!1),u=c.opened,s=c.toggle,d=l.useRef(),f=l.useRef(),p=l.useMemo(function(){return n||"".concat(W())},[]);Z(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 l.createElement(l.Fragment,null,l.createElement("div",{ref:d,"aria-describedby":"rpv-core__tooltip-body-".concat(p),onBlur:function(e){e.relatedTarget instanceof HTMLElement&&e.currentTarget.parentElement&&e.currentTarget.parentElement.contains(e.relatedTarget)?f.current&&(f.current.style.display="none"):g()},onFocus:m,onMouseEnter:m,onMouseLeave:g},i),u&&l.createElement(eu,{ariaControlsSuffix:p,contentRef:f,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,c=e.httpHeaders,u=e.initialPage,s=void 0===u?0:u,d=e.pageLayout,f=e.initialRotation,p=void 0===f?0:f,m=e.localization,h=e.plugins,v=void 0===h?[]:h,E=e.renderError,w=e.renderLoader,_=e.renderPage,S=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,L=e.viewMode,T=void 0===L?t.ViewMode.SinglePage:L,I=e.withCredentials,O=e.onDocumentAskPassword,D=e.onDocumentLoad,F=void 0===D?function(){}:D,z=e.onPageChange,j=void 0===z?function(){}:z,V=e.onRotate,H=void 0===V?function(){}:V,W=e.onRotatePage,K=void 0===W?function(){}:W,Z=e.onSwitchTheme,U=e.onZoom,q=void 0===U?function(){}:U,G=l.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})},$=l.useState(!1),Q=$[0],ee=$[1],et=N(J);l.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=l.useState(m||B),ea=eo[0],ei=eo[1],ec=Object.assign({},{direction:er.direction},tN(er.theme||"light",void 0===Z?function(){}:Z));return l.useEffect(function(){m&&ei(m)},[m]),l.createElement(A.Provider,{value:{l10n:ea,setL10n:ei}},l.createElement(g.Provider,{value:ec},l.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&&l.createElement(tF,{characterMap:n,file:J.data,httpHeaders:void 0===c?{}:c,render:function(e){return l.createElement(tx,{defaultScale:r,doc:e,render:function(n,o){return l.createElement(tP,{currentFile:{data:J.data,name:J.name},defaultScale:r,doc:e,enableSmoothScroll:a,initialPage:s,initialRotation:p,initialScale:o,pageLayout:d,pageSizes:n,plugins:v,renderPage:_,scrollMode:C,setRenderRange:P,viewMode:T,viewerState:{file:J,fullScreenMode:t.FullScreenMode.Normal,pageIndex:-1,pageHeight:n[0].pageHeight,pageWidth:n[0].pageWidth,pagesRotation:new Map,rotation:p,scale:o,scrollMode:C,viewMode:T},onDocumentLoad:F,onOpenFile:X,onPageChange:j,onRotate:H,onRotatePage:K,onZoom:q})},scrollMode:C,viewMode:T})},renderError:E,renderLoader:w,renderProtectedView:S,transformGetDocumentParams:M,withCredentials:void 0!==I&&I,onDocumentAskPassword:O}))))},t.Worker=function(e){var t=e.children,n=e.workerUrl;return u.GlobalWorkerOptions.workerSrc=n,l.createElement(l.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=T,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=V},93214:function(e,t,n){"use strict";e.exports=n(11058)},13647:function(e,t,n){"use strict";var r,o=n(93214),a=n(2265),i=n(49790),c=n(70450),l=n(14741),u=n(67635),s=(r=Object.create(null),a&&Object.keys(a).forEac
1h(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return a[e]}})}}),r.default=a,Object.freeze(r)),d=function(){return s.createElement(o.Icon,{size:16},s.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)},p=function(){return s.createElement(o.Icon,{size:16},s.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"}))},m=function(){return s.createElement(o.Icon,{size:16},s.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={left:8,top:0},h={left:-8,top:0},v=function(e){var t=e.attachmentTabContent,n=e.bookmarkTabContent,r=e.store,a=e.thumbnailTabContent,i=e.tabs,c=s.useRef(),l=s.useContext(o.LocalizationContext).l10n,u=s.useState(r.get("isCurrentTabOpened")||!1),f=u[0],v=u[1],b=s.useState(Math.max(r.get("currentTab")||0,0)),E=b[0],w=b[1],_=s.useContext(o.ThemeContext).direction===o.TextDirection.RightToLeft,S=[{content:a,icon:s.createElement(m,null),title:l&&l.defaultLayout?l.defaultLayout.thumbnail:"Thumbnail"},{content:n,icon:s.createElement(d,null),title:l&&l.defaultLayout?l.defaultLayout.bookmark:"Bookmark"},{content:t,icon:s.createElement(p,null),title:l&&l.defaultLayout?l.defaultLayout.attachment:"Attachment"}],k=i?i(S):S,C=function(e){e>=0&&e<=k.length-1&&(r.update("isCurrentTabOpened",!0),w(e))},y=function(e){v(e)};return s.useEffect(function(){return r.subscribe("currentTab",C),r.subscribe("isCurrentTabOpened",y),function(){r.unsubscribe("currentTab",C),r.unsubscribe("isCurrentTabOpened",y)}},[]),0===k.length?s.createElement(s.Fragment,null):s.createElement(s.Fragment,null,s.createElement("div",{"data-testid":"default-layout__sidebar",className:o.classNames({"rpv-default-layout__sidebar":!0,"rpv-default-layout__sidebar--opened":f,"rpv-default-layout__sidebar--ltr":!_,"rpv-default-layout__sidebar--rtl":_}),ref:c},s.createElement("div",{className:"rpv-default-layout__sidebar-tabs"},s.createElement("div",{className:"rpv-default-layout__sidebar-headers",role:"tablist","aria-orientation":"vertical"},k.map(function(e,t){return s.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"},s.createElement(o.Tooltip,{ariaControlsSuffix:"default-layout-sidebar-tab-".concat(t),position:_?o.Position.LeftCenter:o.Position.RightCenter,target:s.createElement(o.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:_?h:g}))})),s.createElement("div",{"aria-labelledby":"rpv-default-layout__sidebar-tab-".concat(E),id:"rpv-default-layout__sidebar-content",className:o.classNames({"rpv-default-layout__sidebar-content":!0,"rpv-default-layout__sidebar-content--opened":f,"rpv-default-layout__sidebar-content--ltr":!_,"rpv-default-layout__sidebar-content--rtl":_}),role:"tabpanel",tabIndex:-1},k[E].content))),f&&s.createElement(o.Splitter,{constrain:function(e){return e.firstHalfPercentage>=20&&e.firstHalfPercentage<=80}}))};t.defaultLayoutPlugin=function(e){var t=s.useMemo(function(){return o.createStore({isCurrentTabOpened:!1,currentTab:0})},[]),n=i.attachmentPlugin(),r=c.bookmarkPlugin(),a=l.thumbnailPlugin(e?e.thumbnailPlugin:{}),d=u.toolbarPlugin(e?e.toolbarPlugin:{}),p=n.Attachments,m=r.Bookmarks,g=a.Thumbnails,h=d.Toolbar,b=e?e.sidebarTabs:function(e){return e},E=[n,r,a,d];return{attachmentPluginInstance:n,bookmarkPluginInstance:r,thumbnailPluginInstance:a,toolbarPluginInstance:d,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 s.createElement(s.Fragment,null,E.map(function(t,n){return t.renderPageLayer?s.createElement(s.Fragment,{key:n},t.renderPageLayer(e)):s.createElement(s.Fragment,{key:n},s.createElement(s.Fragment,null))}))},renderViewer:function(n){var r=n.slot;E.forEach(function(e){e.renderViewer&&(r=e.renderViewer(f(f({},n),{slot:r})))});var a=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=s.createElement("div",{className:"rpv-default-layout__container"},s.createElement("div",{"data-testid":"default-layout__main",className:o.classNames({"rpv-default-layout__main":!0,"rpv-default-layout__main--rtl":n.themeContext.direction===o.TextDirection.RightToLeft})},s.createElement(v,{attachmentTabContent:s.createElement(p,null),bookmarkTabContent:s.createElement(m,null),store:t,thumbnailTabContent:s.createElement(g,null),tabs:b}),s.createElement("div",{className:"rpv-default-layout__body","data-testid":"default-layout__body"},s.createElement("div",{className:"rpv-default-layout__toolbar"},e&&e.renderToolbar?e.renderToolbar(h):s.createElement(h,null)),s.createElement("div",f({},a),r.subSlot.children))),r.children),r.subSlot.attrs={},r.subSlot.children=s.createElement(s.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}}}},36933:function(e,t,n){"use strict";e.exports=n(13647)},9088:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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})},f={left:0,top:8},p=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:f})},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=e.children,n=e.enableShortcuts,r=m(e.getFullScreenTarget,e.store),o=r.enterFullScreen,a=r.exitFullScreen,c=r.isFullScreen;return(t||function(e){return c?i.createElement(p,{onClick:e.onClick}):i.createElement(d,{enableShortcuts:n,onClick:e.onClick})})({onClick:c?a:o})},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=e.children,n=m(e.getFullScreenTarget,e.store),r=n.enterFullScreen,o=n.exitFullScreen,a=n.isFullScreen;return a&&(t||function(e){return i.createElement(v,{onClick:e.onClick})})({onClick:a?o:r})},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=e.containerRef,n=m(e.getFullScreenTarget,e.store).enterFullScreen,r=function(e){if(!e.shiftKey&&!e.altKey&&
1(a.isMac()?e.metaKey&&e.ctrlKey&&"f"===e.key:"F11"===e.key)){var r=t.current;r&&document.activeElement&&r.contains(document.activeElement)&&(e.preventDefault(),n())}};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.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()}})})}}}},45093:function(e,t,n){"use strict";e.exports=n(9088)},13857:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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)},f=function(e,t,n){var r=URL.createObjectURL(new Blob([e],{type:n}));d(r,t),r&&URL.revokeObjectURL(r)},p=function(e,t){e.getData().then(function(e){/iphone|ipod|ipad/i.test(navigator.userAgent)&&!/CriOS/i.test(navigator.userAgent)?f(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):f(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],f=function(e){d(e)},m=function(e){c(e)};return i.useEffect(function(){return r.subscribe("doc",f),r.subscribe("file",m),function(){r.subscribe("doc",f),r.unsubscribe("file",m)}},[]),(t||function(e){return i.createElement(s,{onClick:e.onClick})})({onClick:function(){u&&a&&p(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()}})})}}}},9154:function(e,t,n){"use strict";e.exports=n(13857)},44424:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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),f=d.inputRef,p=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:f,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:p},i.createElement(c,null))),content:function(){return l},offset:s})},f=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])}}})},p=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(f,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(p,{store:n,onClick:e.onClick})})}}}},76963:function(e,t,n){"use strict";e.exports=n(44424)},54753:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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}},f=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 f=function(e){var n=t.get("jumpToPage");n&&n(e)},p=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:p,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)),f(r));break;case"ArrowDown":(n=l+1)<u&&(c("".concat(n+1)),f(n));break;case"Enter":t=parseInt(o,10),""===o||t<1||t>u?c("".concat(l+1)):f(t-1)}}}))},p=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=e.children,c=e.store,l=(n=(t=i.useState(c.get("doc")))[0],r=t[1],o=function(e){r(e)},i.useEffect(function(){return c.subscribe("doc",o),function(){c.unsubscribe("doc",o)}},[]),n),u=s(c).currentPage,f=d(c).numberOfPages,m=a||function(e){return i.createElement(i.Fragment,null,e.currentPage+1)};return l?i.createElement(p,{doc:l},function(e){var t=e.length===f&&f>0?e[u]:"";return m({currentPage:u,numberOfPages:f,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},_=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})},S=function(e){var t=e.children,n=e.store,r=s(n).currentPage,o=d(n).numberOfPages;return(t||function(e){return i.createElement(_,{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},L=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})},T=function(e){var t=e.store;return(e.children||function(e){return i.createElement(L,{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},f=function(e){var o=t.current,i=l.current||document.activeElement&&o.contains(document.activeElement);if(o&&i){var u,s,d,f,p,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(),p=r.get("jumpToPage"),m=c.current+1,void(p&&m<n&&p(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(),(f=r.get("jumpToNextDestination"))&&f()}}};return i.useEffect(function(){var e=t.current;if(e)return document.addEventListener("keydown",f),e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",d),function(){document.removeEventListener("keydown",f),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(S,u({},e,{store:n}))},c=function(e){return i.createElement(P,u({},e,{store:n}))},l=function(e){return i.createElement(T,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(f,{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(_,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(L,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}))}}}},74402:function(e,t,n){"use strict";e.exports=n(54753)},60613:function(e,t,n){"use strict";var r,o,a,i=n(25566),c=n(93214),l=n(2265),u=n(54887),s=(o=Object.create(null),l&&Object.keys(l).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(l,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return l[e]}})}}),o.default=l,Object.freeze(o)),d=function(){return s.createElement(c.Icon,{size:16},s.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)},p={left:0,top:8},m=function(e){var t=e.enableShortcuts,n=e.onClick,r=s.useContext(c.LocalizationContext).l10n,o=r&&r.print?r.print.print:"Print",a=t?c.isMac()?"Meta+P":"Ctrl+P":"";return s.createElement(c.Tooltip,{ariaControlsSuffix:"print",position:c.Position.BottomCenter,target:s.createElement(c.MinimalButton,{ariaKeyShortcuts:a,ariaLabel:o,testId:"print__button",onClick:n},s.createElement(d,null)),content:function(){return o},offset:p})};(r=a||(a={})).CheckingPermission="CheckingPermission",r.Inactive="Inactive",r.Preparing="Preparing",r.Cancelled="Cancelled",r.Ready="Ready";var g=function(e){var t=e.children,n=e.enableShortcuts,r=e.store;return(t||m)({enableShortcuts:n,onClick:function(){r.update("printStatus",a.CheckingPermission)}})},h=function(e){var t=e.doc,n=e.store,r=s.useContext(c.LocalizationContext).l10n,o=s.useState(!0),i=o[0],l=o[1];return s.useEffect(function(){t.getPermissions().then(function(e){null===e||e.includes(4)||e.includes(2048)?n.update("printStatus",a.Preparing):l(!1)})},[]),i?s.createElement(s.Fragment,null):s.createElement(c.Modal,{ariaControl
1sSuffix:"print-permission",closeOnClickOutside:!1,closeOnEscape:!1,content:function(e){return s.createElement(s.Fragment,null,s.createElement("div",{className:"rpv-print__permission-body"},r&&r.print?r.print.disallowPrint:"The document does not allow to print"),s.createElement("div",{className:"rpv-print__permission-footer"},s.createElement(c.Button,{onClick:function(){e(),n.update("printStatus",a.Cancelled)}},r&&r.print?r.print.close:"Close")))},isOpened:!0})},v=function(e){var t=e.numLoadedPages,n=e.numPages,r=e.onCancel,o=s.useContext(c.LocalizationContext).l10n,a=s.useContext(c.ThemeContext).direction===c.TextDirection.RightToLeft;return s.createElement("div",{className:"rpv-print__progress"},s.createElement("div",{className:c.classNames({"rpv-print__progress-body":!0,"rpv-print__progress-body--rtl":a})},s.createElement("div",{className:"rpv-print__progress-message"},o&&o.print?o.print.preparingDocument:"Preparing document ..."),s.createElement("div",{className:"rpv-print__progress-bar"},s.createElement(c.ProgressBar,{progress:Math.floor(100*t/n)})),s.createElement(c.Button,{onClick:r},o&&o.print?o.print.cancel:"Cancel")))},b=function(e){var t=e.canvas,n=e.page,r=e.pageHeight,o=e.pageIndex,a=e.pageWidth,l=e.rotation,u=e.onLoad,d=c.useIsMounted(),f=s.useRef(),p=s.useState(""),m=p[0],g=p[1],h=s.useMemo(function(){return void 0!==i&&void 0!==i.env.JEST_WORKER_ID},[]);return s.useEffect(function(){var e=f.current;e&&e.cancel();var o=150/72;t.height=Math.floor(r*o),t.width=Math.floor(a*o);var i=t.getContext("2d");i.save(),i.fillStyle="rgb(255, 255, 255)",i.fillRect(0,0,t.width,t.height),i.restore();var c=n.getViewport({rotation:l,scale:1});f.current=n.render({canvasContext:i,intent:"print",transform:[o,0,0,o,0,0],viewport:c}),f.current.promise.then(function(){"toBlob"in t&&"createObjectURL"in URL?t.toBlob(function(e){d.current&&g(URL.createObjectURL(e)),h&&u()}):(d.current&&g(t.toDataURL()),h&&u())},function(){})},[]),m&&s.createElement("div",{className:"rpv-print__page"},s.createElement("img",{"data-testid":"print__thumbnail-".concat(o),src:m,onLoad:function(){h||u()}}))},E=function(e){var t=e.canvas,n=e.doc,r=e.pageIndex,o=e.pageRotation,a=e.pageSize,i=e.rotation,l=e.shouldRender,u=e.onLoad,d=c.useIsMounted(),f=s.useState(null),p=f[0],m=f[1],g=Math.abs(i+o)%180==0;s.useEffect(function(){l&&c.getPage(n,r).then(function(e){d.current&&m(e)})},[l]);var h=(a.rotation+i+o)%360;return p&&s.createElement(b,{canvas:t,page:p,pageHeight:g?a.pageHeight:a.pageWidth,pageIndex:r,pageWidth:g?a.pageWidth:a.pageHeight,rotation:h,onLoad:u})},w=function(e){var t=e.doc,n=e.numLoadedPages,r=e.pagesRotation,o=e.pageSizes,i=e.printPages,c=e.printStatus,l=e.rotation,d=e.onCancel,f=e.onLoad,p=s.useMemo(function(){return document.createElement("canvas")},[]),m=s.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},[]);s.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)}),p.height=0,p.width=0,document.removeEventListener("mousemove",e),d()}};return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}},[c]);var g=o[0].pageHeight,h=o[0].pageWidth;return u.createPortal(s.createElement(s.Fragment,null,i.map(function(e,a){return s.createElement(E,{key:e,canvas:p,doc:t,pageIndex:e,pageRotation:r.has(e)?r.get(e):0,pageSize:o[e],rotation:l,shouldRender:a===n,onLoad:f})}),s.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=s.useState(a.Inactive),d=u[0],f=u[1],p=s.useState(0),m=p[0],g=p[1],b=s.useMemo(function(){var e=t.numPages;return c(t).filter(function(t){return t>=0&&t<e})},[t,c]),E=b.length,_=function(){g(0),f(a.Inactive)}
1,S=function(e){return f(e)};return s.useEffect(function(){return l.subscribe("printStatus",S),function(){l.unsubscribe("printStatus",S)}},[]),s.createElement(s.Fragment,null,d===a.CheckingPermission&&s.createElement(h,{doc:t,store:l}),d===a.Preparing&&(o?o(m,E,_):s.createElement(v,{numLoadedPages:m,numPages:E,onCancel:_})),(d===a.Preparing||d===a.Ready)&&m<=E&&s.createElement(w,{doc:t,numLoadedPages:m,pagesRotation:n,pageSizes:r,printPages:b,printStatus:d,rotation:i,onCancel:_,onLoad:function(){var e=m+1;e<=E&&(g(e),e===E&&f(a.Ready))}}))},S=function(e){var t=e.onClick,n=s.useContext(c.LocalizationContext).l10n,r=n&&n.print?n.print.print:"Print";return s.createElement(c.MenuItem,{icon:s.createElement(d,null),testId:"print__menu",onClick:t},r)},k=function(e){var t=e.containerRef,n=e.store,r=function(e){if(!e.shiftKey&&!e.altKey&&"p"===e.key&&(c.isMac()?e.metaKey:e.ctrlKey)){var r=t.current;r&&document.activeElement&&r.contains(document.activeElement)&&(e.preventDefault(),n.update("printStatus",a.Preparing))}};return s.useEffect(function(){if(t.current)return document.addEventListener("keydown",r),function(){document.removeEventListener("keydown",r)}},[t.current]),s.createElement(s.Fragment,null)};t.PrintIcon=d,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=e.split("-").map(function(e){return parseInt(e,10)}).filter(function(e){return Number.isInteger(e)});1===r.length?n.push(r[0]-1):2===r.length&&n.push.apply(n,(t=r[0]-1,Array(r[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=s.useMemo(function(){return Object.assign({},{enableShortcuts:!0,setPages:function(e){return Array(e.numPages).fill(0).map(function(e,t){return t})}},e)},[]),n=s.useMemo(function(){return c.createStore({printStatus:a.Inactive})},[]),r=function(e){return s.createElement(g,f({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{print:function(){n.update("printStatus",a.CheckingPermission)},renderViewer:function(r){var o=r.slot,a={children:s.createElement(s.Fragment,null,t.enableShortcuts&&s.createElement(k,{containerRef:r.containerRef,store:n}),s.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 s.createElement(r,null,function(e){return s.createElement(m,f({},e))})},PrintMenuItem:function(e){return s.createElement(r,null,function(t){return s.createElement(S,{onClick:function(){t.onClick(),e.onClick()}})})},setPages:function(e){t.setPages=e}}}},84526:function(e,t,n){"use strict";e.exports=n(60613)},53836:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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})?'?"),f=function(e,t,n,r){var o=parseInt(e,10);return o>=t&&o<=n?o:r},p=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=f(t[2],1,12,1)-1,o=f(t[3],1,31,1),a=f(t[4],0,23,0),i=f(t[5],0,59,0),c=f(t[6],0,59,0),l=t[7]||"Z",u=f(t[8],0,23,0),s=f(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=e.children,u=e.store,s=(n=(t=i.useState(u.get("doc")))[0],r=t[1],o=function(e){r(e)},i.useEffect(function(){return u.subscribe("doc",o),function(){u.unsubscribe("doc",o)}},[]),{currentDoc:n}).currentDoc,d=u.get("fileName")||"",f=c||function(e){return i.createElement(g,l({},e))};return s?i.createElement(a.Modal,{ariaControlsSuffix:"properties",target:function(e){return f({onClick:e})},content:function(e){return i.createElement(p,{doc:s,fileName:d,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))})}}}},13335:function(e,t,n){"use strict";e.exports=n(53836)},90221:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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,f=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},f),content:function(){return d},offset:s})},f=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)}})},p=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(f,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(p,{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(p,{direction:t.direction,onClick:function(){t.onClick(),e.onClick()}})})},RotatePage:function(t){return i.createElement(m,u({},t,{store:e}))}}}},78283:function(e,t,n){"use strict";e.exports=n(90221)},55405:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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)},f=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)},p=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(p,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(p,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(){f(r,n)}})},_=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)})},S=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(){S(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=p,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){f(e,t)},switchViewMode:function(t){S(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(_,{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()}})})}}}},65098:function(e,t,n){"use strict";e.exports=n(55405)},89446:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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},f=function(e){return{left:"".concat(e.left,"%"),top:"".concat(e.top,"%"),height:"".concat(e.height,"%"),width:"".concat(e.width,"%")}},p=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:f(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=document.createRange();o.selectNodeContents(e),m(n=o.extractContents()),(r=e.parentNode)&&r.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(p,{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],_=i.useState({pageIndex:n,scale:1,status:a.LayerRenderStatus.PreRender}),S=_[0],k=_[1],C=i.useRef(null),y=i.useRef([]),P=i.useState([]),M=P[0],x=P[1],R=function(){return!0},L=i.useCallback(function(){return o.get("targetPageFilter")||R},[o.get("targetPageFilter")]),T=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")?new 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 f=document.createElement("span");c.surroundContents(f);var p=f.getBoundingClientRect(),m=o.getBoundingClientRect(),h=m.height,v=m.width,b=100*(p.left-m.left)/v,E=100*(p.top-m.top)/h,w=100*p.height/h,_=100*p.width/v;return g(f),{keyword:r,keywordStr:e,numPages:t,pageIndex:n,left:b,top:E,height:w,width:_,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()&&S.status===a.LayerRenderStatus.DidRender&&!y.current.length){var e=S.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,S.status]),i.useEffect(function(){!F()&&S.ele&&S.status===a.LayerRenderStatus.DidRender&&L()({pageIndex:n,numPages:t})&&x(T(S.ele))},[E,m,S.status,y.current]),i.useEffect(function(){F()&&S.ele&&S.status===a.LayerRenderStatus.DidRender&&x([])},[E,S.status]),i.useEffect(function(){if(0!==M.length){var e=l.current;if(m.pageIndex===n&&e&&S.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)/S.scale,leftOffset:i/S.scale,scaleTo:S.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:f,highlightAreas:M}))},b=function(e){var t=e.wholeWords?" ".concat(e.keyword," "):e.keyword,n=e.matchCase?"g":"gi";return{keyword:e.keyword,regExp:new 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=e.get("initialKeyword"),c=i.useMemo(function(){if(o&&1===o.length){var e=E(o[0]);return{matchCase:-1===e.regExp.flags.indexOf("i"),wholeWords:e.wholeWords}}return{matchCase:!1,wholeWords:!1}},[]),l=(t=i.useRef(e.get("doc")),n=function(e){t.current=e},i.useEffect(function(){return e.subscribe("doc",n),function(){e.unsubscribe("doc",n)}},[]),t),u=i.useState(o),s=u[0],f=u[1],p=i.useState([]),m=p[0],g=p[1],h=i.useState(0),v=h[0],b=h[1],w=i.useState(c.matchCase),_=w[0],S=w[1],k=i.useRef([]),C=i.useState(c.wholeWords),y=C[0],P=C[1],M=function(){return!0},x=i.useCallback(function(){return e.get("targetPageFilter")||M},[e.get("targetPageFilter")]),R=function(e){var t=m.length;if(0===s.length||0===t)return null;var n=e===t+1?1:Math.max(1,Math.min(t,e));return b(n),T(m[n-1])},L=function(e){return f(""===e?[]:[e])},T=function(t){var n=e.get("jumpToPage");return n&&n(t.pageIndex),e.update("matchPosition",{matchIndex:t.matchIndex,pageIndex:t.pageIndex}),t},I=function(t,n,r){var o=l.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),b(0),g([]),new Promise(function(e,t){var n;(0===k.current.length?((n=l.current)?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 k.current=e,Promise.resolve(e)}):Promise.resolve(k.current)).then(function(t){var n=[];t.forEach(function(e,t){x()({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++})}),g(n),n.length>0&&(b(1),T(n[0])),e(n)})})};return i.useEffect(function(){k.current=[]},[l.current]),{clearKeyword:function(){e.update("keyword",[d]),L(""),b(0),g([]),S(!1),P(!1)},changeMatchCase:function(e){S(e),s.length>0&&I(s,e,y)},changeWholeWords:function(e){P(e),s.length>0&&I(s,_,e)},currentMatch:v,jumpToMatch:R,jumpToNextMatch:function(){return R(v+1)},jumpToPreviousMatch:function(){return R(v-1)},keywords:s,matchCase:_,numberOfMatches:m.length,wholeWords:y,search:function(){return I(s,_,y)},searchFor:I,setKeywords:f,keyword:0===s.length?"":(r=s[0])instanceof RegExp?r.source:"string"==typeof r?r:r.keyword,setKeyword:L,setTargetPages:function(t){e.update("targetPageFilter",t)}}},_=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}))},S=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],f=i.useState(!1),p=f[0],m=f[1],g=o===a.TextDirection.RightToLeft,h=w(t),v=h.clearKeyword,b=h.changeMatchCase,E=h.changeWholeWords,_=h.currentMatch,S=h.jumpToNextMatch,C=h.jumpToPreviousMatch,y=h.keyword,P=h.matchCase,M=h.numberOfMatches,x=h.wholeWords,R=h.search,L=h.setKeyword,T=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&&T(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),L(e)},onKeyDown:function(e){"Enter"===e.key&&y&&(p?S():T())}}),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"},_,"/",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:_<=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:_>M-1,onClick:S},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})},L=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?L(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,f=r.searchFor,p=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?L(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(S,{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({},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 p(t),f(t)},jumpToMatch:c,jumpToNextMatch:l,jumpToPreviousMatch:u,setTargetPages:m}}},27422:function(e,t,n){"use strict";e.exports=n(89446)},17196:function(e,t,n){"use strict";var r,o,a,i=n(93214),c=(r=n(2265),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,
111.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})},f={left:0,top:8},p=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:f})})},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(p,{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))},f=function(e){r.current=e()},p=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",f),n.subscribe("selectionMode",p),function(){n.unsubscribe("getPagesContainer",f),n.unsubscribe("selectionMode",p)}},[]),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(p,{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()}})})}}}},65453:function(e,t,n){"use strict";e.exports=n(17196)},93457:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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})},f=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")}})},p=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(f,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(p,{onClick:function(){e.onClick(),t.onClick()}})})}}}},11040:function(e,t,n){"use strict";e.exports=n(93457)},99299:function(e,t,n){"use strict";var r,o,a,i=n(93214),c=(r=n(2265),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,f=c.useState(""),p=f[0],m=f[1],g=i.useIsMounted(),h=c.useRef(),v=c.useState(o.get("rotation")||0),b=v[0],E=v[1],w=c.useState(d),_=w[0],S=w[1],k=c.useState(!1),C=k[0],y=k[1],P=function(e){
1S(e.has(u)?e.get(u):0)},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+_)%360,o=Math.abs(b+_)%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,f=a?a/i:Math.min(s/i,d/c),p=f*i,v=f*c;l.height=v,l.width=p,l.style.opacity="0";var E=t.getViewport({rotation:r,scale:f});h.current=t.render({canvasContext:u,viewport:E}),h.current.promise.then(function(){g.current&&m(l.toDataURL()),l.width=0,l.height=0},function(){})}))}},[_,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"},p?c.createElement("img",{className:"rpv-thumbnail__cover-image","data-testid":"thumbnail__cover-image",src:p}):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"},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)},f=c.createContext({renderSpinner:d}),p=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,p=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=p.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 p.current=t.render({canvasContext:c,viewport:d}),p.current.promise.then(function(){h(i.toDataURL()),s(r)},function(){s(r)}),function(){var e;null===(e=p.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(f).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,p=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,_=v.width,S=_/w,k=Math.abs(l+o)%180==0,C=k?s:s/S,y=k?s/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){p(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:_,pageIndex:r,pageWidth:k?_:w,rotation:P,thumbnailHeight:y,thumbnailWidth:C,onRenderCompleted:d}):c.useContext(f).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,f=e.rotatedPage,p=e.rotation,m=e.thumbnailDirection,h=e.thumbnailWidth,v=e.viewMode,b=e.onJumpToPage,E=e.onRotatePage,w=r.numPages,_=r.loadingTask.docId,S=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],L=x[1],T=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})},[_]),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)}},[_,v]),z=function(){if(S.current){var e=k.current,t=y+1;t<e.length&&(y>=0&&e[y].setAttribute("tabindex","-1"),P(t))}},j=function(){if(S.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=S.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];
1t.setAttribute("tabindex","0"),t.focus()}},[y]),i.useIsomorphicLayoutEffect(function(){var e=S.current,r=k.current;if(!(!e||0===r.length||n<0||n>r.length)){var o,a,i,c,l,u,s=r[n].closest(".rpv-thumbnail__items");s&&(m===t.ThumbnailDirection.Vertical?(o=s.getBoundingClientRect().top-e.getBoundingClientRect().top,a=s.clientHeight,i=e.clientHeight,o<0?e.scrollTop+=o:o+a<=i||(e.scrollTop+=o+a-i)):(c=s.getBoundingClientRect().left-e.getBoundingClientRect().left,l=s.clientWidth,u=e.clientWidth,c<0?e.scrollLeft+=c:c+l<=u||(e.scrollLeft+=c+l-u)))}},[n,m]);var B=c.useCallback(function(e){T.current&&(D.markRendered(e),O.current=!1,H())},[_]),A=c.useCallback(function(e,t){t.isVisible?D.setVisibility(e,t.ratio):D.setOutOfRange(e),H()},[_]),H=c.useCallback(function(){if(!O.current){var e=D.getHighestPriorityPage();e>-1&&(D.markRendering(e),O.current=!0,L(e))}},[_]);return c.useEffect(function(){f>=0&&(D.markRendering(f),O.current=!0,L(f))},[_,f]),i.useIsomorphicLayoutEffect(function(){I!==v&&(D.markNotRendered(),H())},[v]),c.createElement("div",{ref:S,"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 f=!1;switch(v){case i.ViewMode.DualPage:f=n===2*t||n===2*t+1;break;case i.ViewMode.DualPageWithCover:f=0===n&&0===t||t>0&&n===2*t-1||t>0&&n===2*t;break;case i.ViewMode.SinglePage:default:f=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":f}),key:"".concat(t,"___").concat(v)},e.map(function(e){var t,f,m,_,S,k;return t=v===i.ViewMode.DualPageWithCover&&(0===e||w%2==0&&e===w-1),f="".concat(r.loadingTask.docId,"___").concat(e),m=o.length===w?o[e]:"".concat(e+1),_=s?s({currentPage:n,pageIndex:e,numPages:w,pageLabel:m}):m,S=a.has(e)?a.get(e):0,k=c.createElement(g,{doc:r,pageHeight:l,pageIndex:e,pageRotation:S,pageWidth:u,rotation:p,shouldRender:R===e,thumbnailWidth:h,onRenderCompleted:B,onVisibilityChanged:A}),d?d({currentPage:n,key:f,numPages:w,pageIndex:e,renderPageLabel:c.createElement(c.Fragment,null,_),renderPageThumbnail:k,onJumpToPage:function(){return b(e)},onRotatePage:function(t){return E(e,t)}}):c.createElement("div",{key:f},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":t,"rpv-thumbnail__item--dual-cover-even":v===i.ViewMode.DualPageWithCover&&!t&&e%2==0,"rpv-thumbnail__item--dual-cover-odd":v===i.ViewMode.DualPageWithCover&&!t&&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)}},k),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),_=w[0],S=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),L=R[0],T=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){S(e)},V=function(e){y(e)},B=function(e){x(e)},A=function(e){T(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(p,{doc:u},function(e){return c.createElement(h,{currentPage:m,doc:u,labels:e,pagesRotation:M,pageHeight:b,pageWidth:_,renderCurrentPageLabel:t,renderThumbnailItem:n,rotatedPage:L,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(f).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(f.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])}}},14741:function(e,t,n){"use strict";e.exports=n(99299)},85601:function(e,t,n){"use strict";var r,o=n(93214),a=n(65453),i=n(2265),c=n(45093),l=n(9154),u=n(76963),s=n(74402),d=n(84526),f=n(13335),p=n(78283),m=n(65098),g=n(27422),h=n(11040),v=n(56936),b=(r=Object.create(null),i&&Object.keys(i).forEach(function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:function(){return i[e]}})}}),r.default=i,Object.freeze(r)),E=function(){return b.createElement(o.Icon,{size:16},b.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"}))},w={left:0,top:8},_=function(e){var t=e.toolbarSlot,n=b.useContext(o.LocalizationContext).l10n,r=b.useContext(o.ThemeContext).direction===o.TextDirection.RightToLeft?o.Position.BottomLeft:o.Position.BottomRight,i=t.DownloadMenuItem,c=t.EnterFullScreenMenuItem,l=t.GoToFirstPageMenuItem,u=t.GoToLastPageMenuItem,s=t.GoToNextPageMenuItem,d=t.GoToPreviousPageMenuItem,f=t.OpenMenuItem,p=t.PrintMenuItem,m=t.RotateBackwardMenuItem,g=t.RotateForwardMenuItem,h=t.ShowPropertiesMenuItem,v=t.SwitchScrollModeMenuItem,_=t.SwitchSelectionModeMenuItem,S=t.SwitchViewModeMenuItem,k=t.SwitchThemeMenuItem;return b.createElement(o.Popover,{ariaControlsSuffix:"toolbar-more-actions",ariaHasPopup:"menu",position:r,target:function(e,t){var a=n&&n.toolbar?n.toolbar.moreActions:"More actions";return b.createElement(o.Tooltip,{ariaControlsSuffix:"toolbar-more-actions",position:r,target:b.createElement(o.MinimalButton,{ariaLabel:a,isSelected:t,testId:"toolbar__more-actions-popover-target",onClick:e},b.createElement(E,null)),content:function(){return a},offset:w})},content:function(e){return b.createElement(o.Menu,null,b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(k,{onClick:e})),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(c,{onClick:e})),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(f,null)),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(p,{onClick:e})),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(i,{onClick:e})),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(o.MenuDivider,null)),b.createElement(l,{onClick:e}),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(d,{onClick:e})),b.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},b.createElement(s,{onClick:e})),b.createElement(u,{onClick:e}),b.createElement(o.MenuDivider,null),b.createElement(g,{onClick:e}),b.createElement(m,{onClick:e}),b.createElement(o.MenuDivider,null),b.createElement(_,{mode:a.SelectionMode.Text,onClick:e}),b.createElement(_,{mode:a.SelectionMode.Hand,onClick:e}),b.createElement(o.MenuDivider,null),b.createElement(v,{mode:o.ScrollMode.Page,onClick:e}),b.createElement(v,{mode:o.ScrollMode.Vertical,onClick:e}),b.createElement(v,{mode:o.ScrollMode.Horizontal,onClick:e}),b.createElement(v,{mode:o.ScrollMode.Wrapped,onClick:e}),b.createElement(o.MenuDivider,null),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement(S,{mode:o.ViewMode.SinglePage,onClick:e})),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement(S,{mode:o.ViewMode.DualPage,onClick:e})),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement(S,{mode:o.ViewMode.DualPageWithCover,onClick:e})),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement(o.MenuDivider,null)),b.createElement(h,{onClick:e}))},offset:w,closeOnClickOutside:!0,closeOnEscape:!0})},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)},k=function(e){return function(t){var n=b.useMemo(function(){return e(t)},[]),r=b.useContext(o.ThemeContext).direction===o.TextDirection.RightToLeft,a=n.CurrentPageInput,i=n.Download,c=n.EnterFullScreen,l=n.GoToNextPage,u=n.GoToPreviousPage,s=n.NumberOfPages,d=n.Open,f=n.Print,p=n.ShowSearchPopover,m=n.SwitchTheme,g=n.Zoom,h=n.ZoomIn,v=n.ZoomOut;return b.createElement("div",{"data-testid":"toolbar",className:o.classNames({"rpv-toolbar":!0,"rpv-toolbar--rtl":r}),role:"toolbar","aria-orientation":"horizontal"},b.createElement("div",{className:"rpv-toolbar__left"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(p,null)),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(u,null))),b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(a,null),b.createElement("span",{className:"rpv-toolbar__label"},b.createElement(s,null))),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(l,null)))),b.createElement("div",{className:"rpv-toolbar__center"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(v,null)),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(g,null))),b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(h,null))),b.createElement("div",{className:"rpv-toolbar__right"},b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(m,null))),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(c,null))),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(d,null))),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(i,null))),b.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-medium"},b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(f,null))),b.createElement("div",{className:"rpv-toolbar__item"},b.createElement(_,{toolbarSlot:n}))))}},C=function(e){var t=e.NumberOfPages;return Object.assign({},e,{NumberOfPages:function(){return b.createElement(b.Fragment,null,"/ ",b.createElement(t,null))}})},y=function(e){return(e.children||function(e){return k(C)(e)})(e.slot)};
1t.MoreActionsPopover=_,t.MoreIcon=E,t.toolbarPlugin=function(e){var t=c.fullScreenPlugin(e?e.fullScreenPlugin:{}),n=l.getFilePlugin(e?e.getFilePlugin:{}),r=u.openPlugin(e?e.openPlugin:{}),o=s.pageNavigationPlugin(e?e.pageNavigationPlugin:{}),i=d.printPlugin(e?e.printPlugin:{}),E=f.propertiesPlugin(),w=p.rotatePlugin(),_=m.scrollModePlugin(),C=g.searchPlugin(e?e.searchPlugin:{}),P=a.selectionModePlugin(e?e.selectionModePlugin:{}),M=h.themePlugin(),x=v.zoomPlugin(e?e.zoomPlugin:{}),R=[t,n,r,o,i,E,w,_,C,P,M,x],L=b.useCallback(function(e){var a=t.EnterFullScreen,c=t.EnterFullScreenMenuItem,l=n.Download,u=n.DownloadMenuItem,s=r.Open,d=r.OpenMenuItem,f=o.CurrentPageInput,p=o.CurrentPageLabel,m=o.GoToFirstPage,g=o.GoToFirstPageMenuItem,h=o.GoToLastPage,v=o.GoToLastPageMenuItem,k=o.GoToNextPage,R=o.GoToNextPageMenuItem,L=o.GoToPreviousPage,T=o.GoToPreviousPageMenuItem,I=o.NumberOfPages,O=i.Print,D=i.PrintMenuItem,F=E.ShowProperties,N=E.ShowPropertiesMenuItem,z=w.Rotate,j=w.RotateBackwardMenuItem,V=w.RotateForwardMenuItem,B=_.SwitchScrollMode,A=_.SwitchScrollModeMenuItem,H=_.SwitchViewMode,W=_.SwitchViewModeMenuItem,K=C.Search,Z=C.ShowSearchPopover,U=P.SwitchSelectionMode,q=P.SwitchSelectionModeMenuItem,G=M.SwitchTheme,J=M.SwitchThemeMenuItem,Y=x.CurrentScale,X=x.Zoom,$=x.ZoomIn,Q=x.ZoomInMenuItem,ee=x.ZoomOut,et=x.ZoomOutMenuItem;return b.createElement(y,S({},e,{slot:{CurrentPageInput:f,CurrentPageLabel:p,CurrentScale:Y,Download:l,DownloadMenuItem:u,EnterFullScreen:a,EnterFullScreenMenuItem:c,GoToFirstPage:m,GoToFirstPageMenuItem:g,GoToLastPage:h,GoToLastPageMenuItem:v,GoToNextPage:k,GoToNextPageMenuItem:R,GoToPreviousPage:L,GoToPreviousPageMenuItem:T,NumberOfPages:I,Open:s,OpenMenuItem:d,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:i,propertiesPluginInstance:E,rotatePluginInstance:w,scrollModePluginInstance:_,searchPluginInstance:C,selectionModePluginInstance:P,themePluginInstance:M,zoomPluginInstance:x,install:function(e){R.forEach(function(t){t.install&&t.install(e)})},renderPageLayer:function(e){return b.createElement(b.Fragment,null,R.map(function(t,n){return t.renderPageLayer?b.createElement(b.Fragment,{key:n},t.renderPageLayer(e)):b.createElement(b.Fragment,{key:n})}))},renderViewer:function(e){var t=e.slot;return R.forEach(function(n){n.renderViewer&&(t=n.renderViewer(S(S({},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:k,Toolbar:L}}},67635:function(e,t,n){"use strict";e.exports=n(85601)},30023:function(e,t,n){"use strict";var r,o,a=n(93214),i=(r=n(2265),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){return(e.children||function(e){return i.createElement(i.Fragment,null,"".concat(Math.round(100*e.scale),"%"))})({scale:s(e.store).scale})},f={passive:!1},p=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");r((p||(p=document.createElementNS("http://www.w3.org/2000/svg","svg"))).createSVGMatrix().translate(a,i).scale(o).translate(-a,-i).scale(c).a)}};return a.useIsomorphicLayoutEffect(function(){var e=t.current;if(e)return e.addEventListener("wheel",o,f),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},_=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})},S=function(e){var t=e.children,n=e.levels,r=e.store;return(t||function(e){return i.createElement(_,{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))}})},L=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(S,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(L,{onClick:function(){t.onClick(),e.onClick()}})})},Zoom:c,ZoomPopover:function(e){return i.createElement(c,null,function(t){return i.createElement(_,u({levels:null==e?void 0:e.levels},t))})}}}},56936:function(e,t,n){"use strict";e.exports=n(30023)},93813:function(e,t,n){!function(){var t={452:function(e){"use strict";e.exports=n(85605)}},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=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function r(e){"string"==typeof e&&(e=v(e));var r,o,a,i,c,l,u,s,d,f=(o=(r=e).auth,a=r.hostname,i=r.protocol||"",c=r.pathname||"",l=r.hash||"",u=r.query||"",s=!1,o=o?encodeURIComponent(o).replace(/%3A/i,":")+"@":"",r.host?s=o+r.host:a&&(s=o+(~a.indexOf(":")?"["+a+"]":a),r.port&&(s+=":"+r.port)),u&&"object"==typeof u&&(u=t.encode(u)),d=r.search||u&&"?"+u||"",i&&":"!==i.substr(-1)&&(i+=":"),r.slashes||(!i||n.test(i))&&!1!==s?(s="//"+(s||""),c&&"/"!==c[0]&&(c="/"+c)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),{protocol:i,host:s,pathname:c=c.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:l});return""+f.protocol+f.host+f.pathname+f.search+f.hash}var i="http://",c=i+"w.w",l=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,u=/https?|ftp|gopher|file/;function s(e,t){var n="string"==typeof e?v(e):e;e="object"==typeof e?r(e):e;var o=v(t),a="";n.protocol&&!n.slashes&&(a=n.protocol,e=e.replace(n.protocol,""),a+="/"===t[0]||"/"===e[0]?"/":""),a&&o.protocol&&(a="",o.slashes||(a=o.protocol,t=t.replace(o.protocol,"")));var s=e.match(l);s&&!o.protocol&&(e=e.substr((a=s[1]+(s[2]||"")).length),/^\/\/[^/]/.test(t)&&(a=a.slice(0,-1)));var d=new URL(e,c+"/"),f=new URL(t,d).toString().replace(c,""),p=o.protocol||n.protocol;return p+=n.slashes||o.slashes?"//":"",!a&&p?f=f.replace(i,p):a&&(f=f.replace(i,"")),u.test(f)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==f.slice(-1)||(f=f.slice(0,-1)),a&&(f=a+("/"===f[0]?f.substr(1):f)),f}function d(){}d.prototype.parse=v,d.prototype.format=r,d.prototype.resolve=s,d.prototype.resolveObject=s;var f=/^https?|ftp|gopher|file/,p=/^(.*?)([#?].*)/,m=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,g=/^([a-z0-9.+-]*:)?\/\/\/*/i,h=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function v(e,n,o){if(void 0===n&&(n=!1),void 0===o&&(o=!1),e&&"object"==typeof e&&e instanceof d)return e;var a=(e=e.trim()).match(p);e=a?a[1].replace(/\\/g,"/")+a[2]:e.replace(/\\/g,"/"),h.test(e)&&"/"!==e.slice(-1)&&(e+="/");var i=!/(^javascript)/.test(e)&&e.match(m),l=g.test(e),u="";i&&(f.test(i[1])||(u=i[1].toLowerCase(),e=""+i[2]+i[3]),i[2]||(l=!1,f.test(i[1])?(u=i[1],e=""+i[3]):e="//"+i[3]),3!==i[2].length&&1!==i[2].length||(u=i[1],e="/"+i[3]));var s,v=(a?a[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=v&&v[1],E=new d,w="",_="";try{s=new URL(e)}catch(t){w=t,u||o||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(_="/",e=e.substr(1));try{s=new URL(e,c)}catch(e){return E.protocol=u,E.href=u,E}}E.slashes=l&&!_,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 S=e.split("#");!E.search&&~S[0].indexOf("?")&&(E.search="?"),E.hash||""!==S[1]||(E.hash="#"),E.query=n?t.decode(s.search.substr(1)):E.search.substr(1),E.pathname=_+(i?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(e){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=_?""+E.pathname+E.search+E.hash:r(E);var k=/^(file)/.test(E.href)?["host","hostname"]:[];return Object.keys(E).forEach(function(e){~k.indexOf(e)||(E[e]=E[e]||null)}),E}a.parse=v,a.format=r,a.resolve=s,a.resolveObject=function(e,t){return v(s(e,t))},a.Url=d})(),e.exports=a}()},85605:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,n,r,o){n=n||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var i=/\+/g;e=e.split(n);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var u=0;u<l;++u){var s,d,f,p,m=e[u].replace(i,"%20"),g=m.indexOf(r);(g>=0?(s=m.substr(0,g),d=m.substr(g+1)):(s=m,d=""),f=decodeURIComponent(s),p=decodeURIComponent(d),Object.prototype.hasOwnProperty.call(a,f))?t(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a};var t=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={};o.decode=o.parse=r(815),o.encode=o.stringify=r(577),e.exports=o}()},13856:function(){},14923:function(){}}]);
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.