/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2022 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */(()=>{"use strict";var e,t,i,n,a,s=[,(e,t)=>{function i(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function n(e,t){t=s(e,t,"get");return t.get?t.get.call(e):t.value}function a(e,t,i){t=s(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.animationStarted=t.VERTICAL_PADDING=t.UNKNOWN_SCALE=t.TextLayerMode=t.SpreadMode=t.SidebarView=t.ScrollMode=t.SCROLLBAR_PADDING=t.RenderingStates=t.RendererType=t.ProgressBar=t.PresentationModeState=t.OutputScale=t.MIN_SCALE=t.MAX_SCALE=t.MAX_AUTO_SCALE=t.DEFAULT_SCALE_VALUE=t.DEFAULT_SCALE_DELTA=t.DEFAULT_SCALE=t.AutoPrintRegExp=void 0,t.apiPageLayoutToViewerModes=function(e){let t=o.VERTICAL,i=l.NONE;switch(e){case"SinglePage":t=o.PAGE;break;case"OneColumn":break;case"TwoPageLeft":t=o.PAGE;case"TwoColumnLeft":i=l.ODD;break;case"TwoPageRight":t=o.PAGE;case"TwoColumnRight":i=l.EVEN}return{scrollMode:t,spreadMode:i}},t.apiPageModeToSidebarView=function(e){switch(e){case"UseNone":return r.NONE;case"UseThumbs":return r.THUMBS;case"UseOutlines":return r.OUTLINE;case"UseAttachments":return r.ATTACHMENTS;case"UseOC":return r.LAYERS}return r.NONE},t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];var t=1/e;{if(8<t)return[1,8];if(Math.floor(t)===t)return[1,t]}var i=1<e?t:e;let n=0,a=1,s=1,r=1;for(;;){var o=n+s,l=a+r;if(8<l)break;i<=o/l?(s=o,r=l):(n=o,a=l)}let h;h=i-n/a<s/r-i?i===e?[n,a]:[a,n]:i===e?[s,r]:[r,s];return h},t.backtrackBeforeAllVisibleElements=S,t.binarySearchFirstItem=E,t.docStyle=void 0,t.getActiveOrFocusedElement=function(){let e=document,t=e.activeElement||e.querySelector(":focus");for(;null!=(i=t)&&i.shadowRoot;){var i;e=t.shadowRoot,t=e.activeElement||e.querySelector(":focus")}return t},t.getPageSizeInches=function(e){var{view:e,userUnit:t,rotate:i}=e;var[e,n,a,s]=e,i=i%180!=0,a=(a-e)/72*t,e=(s-n)/72*t;return{width:i?e:a,height:i?a:e}},t.getVisibleElements=function(e){let{scrollEl:t,views:i,sortByVisibility:n=!1,horizontal:a=!1,rtl:s=!1}=e;const r=t.scrollTop,o=r+t.clientHeight,l=t.scrollLeft,h=l+t.clientWidth;var d=[],c=new Set,u=i.length;let p=E(i,a?function(e){var t=(e=e.div).offsetLeft+e.clientLeft,e=t+e.clientWidth;return s?t<h:e>l}:function(e){return(e=e.div).offsetTop+e.clientTop+e.clientHeight>r});0<p&&p<u&&!a&&(p=S(p,i,r));let g=a?h:-1;for(let e=p;e<u;e++){var f=i[e],m=f.div,v=m.offsetLeft+m.clientLeft,w=m.offsetTop+m.clientTop,_=m.clientWidth,m=m.clientHeight,b=v+_,y=w+m;if(-1===g)o<=y&&(g=y);else if((a?v:w)>g)break;y<=r||o<=w||b<=l||v>=h||(y=Math.max(0,r-w)+Math.max(0,y-o),b=Math.max(0,l-v)+Math.max(0,b-h),d.push({id:f.id,x:v,y:w,view:f,percent:(m-y)/m*(v=(_-b)/_)*100|0,widthPercent:100*v|0}),c.add(f.id))}var e=d[0],P=d.at(-1);n&&d.sort(function(e,t){var i=e.percent-t.percent;return.001<Math.abs(i)?-i:e.id-t.id});return{first:e,last:P,views:d,ids:c}},t.isPortraitOrientation=function(e){return e.width<=e.height},t.isValidRotation=function(e){return Number.isInteger(e)&&e%90==0},t.isValidScrollMode=function(e){return Number.isInteger(e)&&Object.values(o).includes(e)&&e!==o.UNKNOWN},t.isValidSpreadMode=function(e){return Number.isInteger(e)&&Object.values(l).includes(e)&&e!==l.UNKNOWN},t.noContextMenuHandler=function(e){e.preventDefault()},t.normalizeWheelEventDelta=function(e){let t=c(e);0===e.deltaMode?t/=900:1===e.deltaMode&&(t/=30);return t},t.normalizeWheelEventDirection=c,t.parseQueryString=function(e){var t=new Map;for(var[i,n]of new URLSearchParams(e))t.set(i.toLowerCase(),n);return t},t.removeNullCharacters=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)return console.error("The argument must be a string."),e;t&&(e=e.replace(d," "));return e.replace(h,"")},t.roundToDivide=function(e,t){var i=e%t;return 0==i?e:Math.round(e-i+t)},t.scrollIntoView=function(i,n){let a=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=i.offsetParent;if(s){let e=i.offsetTop+i.clientTop,t=i.offsetLeft+i.clientLeft;for(;s.clientHeight===s.scrollHeight&&s.clientWidth===s.scrollWidth||a&&(s.classList.contains("markedContent")||"hidden"===getComputedStyle(s).overflow);)if(e+=s.offsetTop,t+=s.offsetLeft,!(s=s.offsetParent))return;n&&(void 0!==n.top&&(e+=n.top),void 0!==n.left)&&(t+=n.left,s.scrollLeft=t),s.scrollTop=e}else console.error("offsetParent is not set -- cannot scroll")},t.watchScroll=function(i,n){function e(e){s=s||window.requestAnimationFrame(function(){s=null;var e=i.scrollLeft,t=a.lastX,t=(e!==t&&(a.right=t<e),a.lastX=e,i.scrollTop),e=a.lastY;t!==e&&(a.down=e<t),a.lastY=t,n(a)})}const a={right:!0,down:!0,lastX:i.scrollLeft,lastY:i.scrollTop,_eventHandler:e};let s=null;return i.addEventListener("scroll",e,!0),a};t.DEFAULT_SCALE_VALUE="auto",t.DEFAULT_SCALE=1,t.DEFAULT_SCALE_DELTA=1.1,t.MIN_SCALE=.1,t.MAX_SCALE=10,t.UNKNOWN_SCALE=0,t.MAX_AUTO_SCALE=1.25,t.SCROLLBAR_PADDING=40,t.VERTICAL_PADDING=5,t.RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};const r={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};t.SidebarView=r;t.RendererType={CANVAS:"canvas",SVG:"svg"};t.TextLayerMode={DISABLE:0,ENABLE:1};const o={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},l=(t.ScrollMode=o,{UNKNOWN:-1,NONE:0,ODD:1,EVEN:2});t.SpreadMode=l;t.AutoPrintRegExp=/\bprint\s*\(/;t.OutputScale=class{constructor(){var e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return 1!==this.sx||1!==this.sy}};const h=/\x00/g,d=/[\x01-\x1F]/g;function E(e,t){let i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=e.length-1;if(n<0||!t(e[n]))return e.length;if(!t(e[i]))for(;i<n;){var a=i+n>>1;t(e[a])?n=a:i=1+a}return i}function S(n,a,e){if(!(n<2)){let t=a[n].div,i=t.offsetTop+t.clientTop;i>=e&&(t=a[n-1].div,i=t.offsetTop+t.clientTop);for(let e=n-2;0<=e&&!((t=a[e].div).offsetTop+t.clientTop+t.clientHeight<=i);--e)n=e}return n}function c(e){let t=Math.hypot(e.deltaX,e.deltaY);e=Math.atan2(e.deltaY,e.deltaX);return t=-.25*Math.PI<e&&e<.75*Math.PI?-t:t}var u=new Promise(function(e){window.requestAnimationFrame(e)});t.animationStarted=u;const p=document.documentElement.style;t.docStyle=p;var g=new WeakMap,f=new WeakMap,m=new WeakMap;t.ProgressBar=class{constructor(e){i(this,g,{writable:!0,value:null}),i(this,f,{writable:!0,value:0}),i(this,m,{writable:!0,value:!0});e=document.getElementById(e);a(this,g,e.classList)}get percent(){return n(this,f)}set percent(e){var t,i;a(this,f,(t=0,i=100,Math.min(Math.max(e,t),i))),isNaN(e)?n(this,g).add("indeterminate"):(n(this,g).remove("indeterminate"),p.setProperty("--progressBar-percent",n(this,f)+"%"))}setWidth(e){e&&0<(e=e.parentNode.offsetWidth-e.offsetWidth)&&p.setProperty("--progressBar-end-offset",e+"px")}hide(){n(this,m)&&(a(this,m,!1),n(this,g).add("hidden"))}show(){n(this,m)||(a(this,m,!0),n(this,g).remove("hidden"))}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.compatibilityParams=t.OptionKind=t.AppOptions=void 0;const r=Object.create(null);t.compatibilityParams=r;{var i=navigator.userAgent||"",n=navigator.platform||"",a=navigator.maxTouchPoints||1;const s=/Android/.test(i),d=/\b(iPad|iPhone|iPod)(?=;)/.test(i)||"MacIntel"===n&&1<a;(d||s)&&(r.maxCanvasPixels=5242880)}const o={VIEWER:2,API:4,WORKER:8,PREFERENCE:128},l={annotationEditorMode:{value:0,kind:(t.OptionKind=o).VIEWER+o.PREFERENCE},annotationMode:{value:2,kind:o.VIEWER+o.PREFERENCE},cursorToolOnLoad:{value:0,kind:o.VIEWER+o.PREFERENCE},defaultZoomValue:{value:"",kind:o.VIEWER+o.PREFERENCE},disableHistory:{value:!1,kind:o.VIEWER},disablePageLabels:{value:!1,kind:o.VIEWER+o.PREFERENCE},enablePermissions:{value:!1,kind:o.VIEWER+o.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:o.VIEWER+o.PREFERENCE},enableScripting:{value:!0,kind:o.VIEWER+o.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:o.VIEWER},externalLinkTarget:{value:0,kind:o.VIEWER+o.PREFERENCE},historyUpdateUrl:{value:!1,kind:o.VIEWER+o.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:o.VIEWER+o.PREFERENCE},imageResourcesPath:{value:"./images/",kind:o.VIEWER},maxCanvasPixels:{value:16777216,kind:o.VIEWER},forcePageColors:{value:!1,kind:o.VIEWER+o.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:o.VIEWER+o.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:o.VIEWER+o.PREFERENCE},pdfBugEnabled:{value:!1,kind:o.VIEWER+o.PREFERENCE},printResolution:{value:150,kind:o.VIEWER},sidebarViewOnLoad:{value:-1,kind:o.VIEWER+o.PREFERENCE},scrollModeOnLoad:{value:-1,kind:o.VIEWER+o.PREFERENCE},spreadModeOnLoad:{value:-1,kind:o.VIEWER+o.PREFERENCE},textLayerMode:{value:1,kind:o.VIEWER+o.PREFERENCE},useOnlyCssZoom:{value:!1,kind:o.VIEWER+o.PREFERENCE},viewerCssTheme:{value:0,kind:o.VIEWER+o.PREFERENCE},viewOnLoad:{value:0,kind:o.VIEWER+o.PREFERENCE},cMapPacked:{value:!0,kind:o.API},cMapUrl:{value:"../web/cmaps/",kind:o.API},disableAutoFetch:{value:!1,kind:o.API+o.PREFERENCE},disableFontFace:{value:!1,kind:o.API+o.PREFERENCE},disableRange:{value:!1,kind:o.API+o.PREFERENCE},disableStream:{value:!1,kind:o.API+o.PREFERENCE},docBaseUrl:{value:"",kind:o.API},enableXfa:{value:!0,kind:o.API+o.PREFERENCE},fontExtraProperties:{value:!1,kind:o.API},isEvalSupported:{value:!0,kind:o.API},isOffscreenCanvasSupported:{value:!0,kind:o.API},maxImageSize:{value:-1,kind:o.API},pdfBug:{value:!1,kind:o.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:o.API},verbosity:{value:1,kind:o.API},workerPort:{value:null,kind:o.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:o.WORKER}},h=(l.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:o.VIEWER},l.disablePreferences={value:!1,kind:o.VIEWER},l.locale={value:navigator.language||"en-US",kind:o.VIEWER},l.renderer={value:"canvas",kind:o.VIEWER+o.PREFERENCE},l.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:o.VIEWER},Object.create(null));t.AppOptions=class{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(e){var t=h[e];return void 0!==t?t:void 0!==(t=l[e])?r[e]??t.value:void 0}static getAll(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=Object.create(null);for(const s in l){var i=l[s];if(e){if(0==(e&i.kind))continue;if(e===o.PREFERENCE){var n=i.value,a=typeof n;if("boolean"==a||"string"==a||"number"==a&&Number.isInteger(n)){t[s]=n;continue}throw new Error("Invalid type for preference: "+s)}}a=h[s];t[s]=void 0!==a?a:r[s]??i.value}return t}static set(e,t){h[e]=t}static setAll(e){for(const t in e)h[t]=e[t]}static remove(e){delete h[e]}static _hasUserOptions(){return 0<Object.keys(h).length}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=t.LinkTarget=void 0;var o=i(1);function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,i){if(e!==t)throw new TypeError("Private static access of wrong provenance");return i}function s(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function n(e,t){t=function(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}(e,t,"get");return t.get?t.get.call(e):t.value}const r={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function a(e,t){var{url:t,target:i,rel:n,enabled:a=!0}=1<arguments.length&&void 0!==t?t:{};if(!t||"string"!=typeof t)throw new Error('A valid "url" parameter must provided.');t=(0,o.removeNullCharacters)(t);a?e.href=e.title=t:(e.href="",e.title="Disabled: "+t,e.onclick=()=>!1);let s="";switch(i){case r.NONE:break;case r.SELF:s="_self";break;case r.BLANK:s="_blank";break;case r.PARENT:s="_parent";break;case r.TOP:s="_top"}e.target=s,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"}t.LinkTarget=r;var d=new WeakMap,c=new WeakSet;function u(t){let i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=2<arguments.length?arguments[2]:void 0;const a=n[0];let e;if("object"==typeof a&&null!==a){if(!(e=this._cachedPageNumber(a)))return void this.pdfDocument.getPageIndex(a).then(e=>{this.cachePageRef(e+1,a),s(this,c,u).call(this,t,i,n)}).catch(()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${a}" is not `+`a valid page reference, for dest="${t}".`)})}else{if(!Number.isInteger(a))return void console.error(`PDFLinkService.#goToDestinationHelper: "${a}" is not `+`a valid destination reference, for dest="${t}".`);e=a+1}!e||e<1||e>this.pagesCount?console.error(`PDFLinkService.#goToDestinationHelper: "${e}" is not `+`a valid page number, for dest="${t}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:i,explicitDest:n,pageNumber:e})),this.pdfViewer.scrollPageIntoView({pageNumber:e,destArray:n,ignoreDestinationZoom:this._ignoreDestinationZoom}))}function p(t){if(!Array.isArray(t))return!1;var i=t.length;if(i<2)return!1;var e=t[0];if(!("object"==typeof e&&Number.isInteger(e.num)&&Number.isInteger(e.gen)||Number.isInteger(e)&&0<=e))return!1;e=t[1];if("object"!=typeof e||"string"!=typeof e.name)return!1;let n=!0;switch(e.name){case"XYZ":if(5!==i)return!1;break;case"Fit":case"FitB":return 2===i;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==i)return!1;break;case"FitR":if(6!==i)return!1;n=!1;break;default:return!1}for(let e=2;e<i;e++){var a=t[e];if(!("number"==typeof a||n&&null===a))return!1}return!0}t.PDFLinkService=class g{constructor(){var e,t,i,{eventBus:n,externalLinkTarget:a=null,externalLinkRel:s=null,ignoreDestinationZoom:r=!1}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l(t=this,e=c),e.add(t),e=this,t=d,i={writable:!0,value:new Map},l(e,t),t.set(e,i),this.eventBus=n,this.externalLinkTarget=a,this.externalLinkRel=s,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=r,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(e){this.baseUrl=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,this.pdfDocument=e,n(this,d).clear()}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}async goToDestination(i){if(this.pdfDocument){let e,t;t="string"==typeof i?(e=i,await this.pdfDocument.getDestination(i)):(e=null,await i),Array.isArray(t)?s(this,c,u).call(this,i,e,t):console.error(`PDFLinkService.goToDestination: "${t}" is not `+`a valid destination array, for dest="${i}".`)}}goToPage(e){var t;this.pdfDocument&&(t="string"==typeof e&&this.pdfViewer.pageLabelToPageNumber(e)||0|e,Number.isInteger(t)&&0<t&&t<=this.pagesCount?(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(t)),this.pdfViewer.scrollPageIntoView({pageNumber:t})):console.error(`PDFLinkService.goToPage: "${e}" is not a valid page.`))}addLinkAttributes(e,t){a(e,{url:t,target:2<arguments.length&&void 0!==arguments[2]&&arguments[2]?r.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(e){if("string"==typeof e){if(0<e.length)return this.getAnchorUrl("#"+escape(e))}else if(Array.isArray(e)&&0<(e=JSON.stringify(e)).length)return this.getAnchorUrl("#"+escape(e));return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(i){if(this.pdfDocument){let e,t;if(i.includes("=")){var n,a,s,r=(0,o.parseQueryString)(i);r.has("search")&&this.eventBus.dispatch("findfromurlhash",{source:this,query:r.get("search").replace(/"/g,""),phraseSearch:"true"===r.get("phrase")}),r.has("page")&&(e=0|r.get("page")||1),r.has("zoom")&&(a=(n=r.get("zoom").split(","))[0],s=parseFloat(a),a.includes("Fit")?"Fit"===a||"FitB"===a?t=[null,{name:a}]:"FitH"===a||"FitBH"===a||"FitV"===a||"FitBV"===a?t=[null,{name:a},1<n.length?0|n[1]:null]:"FitR"===a?5!==n.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):t=[null,{name:a},0|n[1],0|n[2],0|n[3],0|n[4]]:console.error(`PDFLinkService.setHash: "${a}" is not a valid zoom value.`):t=[null,{name:"XYZ"},1<n.length?0|n[1]:null,2<n.length?0|n[2]:null,s?s/100:a]),t?this.pdfViewer.scrollPageIntoView({pageNumber:e||this.page,destArray:t,allowNegativeOffset:!0}):e&&(this.page=e),r.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:r.get("pagemode")}),r.has("nameddest")&&this.goToDestination(r.get("nameddest"))}else{t=unescape(i);try{t=JSON.parse(t),Array.isArray(t)||(t=t.toString())}catch(e){}"string"==typeof t||h(g,g,p).call(g,t)?this.goToDestination(t):console.error(`PDFLinkService.setHash: "${unescape(i)}" is not a valid destination.`)}}}executeNamedAction(e){var t;switch(e){case"GoBack":null!=(t=this.pdfHistory)&&t.back();break;case"GoForward":null!=(t=this.pdfHistory)&&t.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}async executeSetOCGState(t){var e=this.pdfDocument,i=await this.pdfViewer.optionalContentConfigPromise;if(e===this.pdfDocument){let e;for(const a of t.state){switch(a){case"ON":case"OFF":case"Toggle":e=a;continue}switch(e){case"ON":i.setVisibility(a,!0);break;case"OFF":i.setVisibility(a,!1);break;case"Toggle":var n=i.getGroup(a);n&&i.setVisibility(a,!n.visible)}}this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i)}}cachePageRef(e,t){t&&(t=0===t.gen?t.num+"R":t.num+"R"+t.gen,n(this,d).set(t,e))}_cachedPageNumber(e){return e&&(e=0===e.gen?e.num+"R":e.num+"R"+e.gen,n(this,d).get(e))||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}isPageCached(e){return this.pdfViewer.isPageCached(e)}};t.SimpleLinkService=class{constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}async goToDestination(e){}goToPage(e){}addLinkAttributes(e,t){a(e,{url:t,enabled:this.externalLinkEnabled})}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}executeSetOCGState(e){}cachePageRef(e,t){}isPageVisible(e){return!0}isPageCached(e){return!0}}},(O,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFViewerApplication=e.PDFPrintServiceFactory=e.DefaultExternalServices=void 0;var g=t(1),u=t(5),f=t(2),p=t(6),m=t(7),v=t(3),V=t(9),F=t(10),R=t(12),W=t(13),U=t(15),H=t(16),z=t(17),j=t(19),G=t(20),K=t(21),$=t(22),X=t(23),Z=t(24),Q=t(25),q=t(26),Y=t(27),J=t(29),ee=t(39),te=t(40),ie=t(41);const ne=1e3,w={UNKNOWN:-1,PREVIOUS:0,INITIAL:1},l={AUTOMATIC:0,LIGHT:1,DARK:2},ae=["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","2.0","2.1","2.2","2.3"],se=["acrobat distiller","acrobat pdfwriter","adobe livecycle","adobe pdf library","adobe photoshop","ghostscript","tcpdf","cairo","dvipdfm","dvips","pdftex","pdfkit","itext","prince","quarkxpress","mac os x","microsoft","openoffice","oracle","luradocument","pdf-xchange","antenna house","aspose.cells","fpdf"];class i{constructor(){throw new Error("Cannot initialize DefaultExternalServices.")}static updateFindControlState(e){}static updateFindMatchesCount(e){}static initPassiveLoading(e){}static reportTelemetry(e){}static createDownloadManager(e){throw new Error("Not implemented: createDownloadManager")}static createPreferences(){throw new Error("Not implemented: createPreferences")}static createL10n(e){throw new Error("Not implemented: createL10n")}static createScripting(e){throw new Error("Not implemented: createScripting")}static get supportsIntegratedFind(){return(0,u.shadow)(this,"supportsIntegratedFind",!1)}static get supportsDocumentFonts(){return(0,u.shadow)(this,"supportsDocumentFonts",!0)}static get supportedMouseWheelZoomModifierKeys(){return(0,u.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}static get isInAutomation(){return(0,u.shadow)(this,"isInAutomation",!1)}static updateEditorStates(e){throw new Error("Not implemented: updateEditorStates")}}e.DefaultExternalServices=i;const d={initialBookmark:document.location.hash.substring(1),_initializedCapability:(0,u.createPromiseCapability)(),appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfSidebarResizer:null,pdfOutlineViewer:null,pdfAttachmentViewer:null,pdfLayerViewer:null,pdfCursorTools:null,pdfScriptingManager:null,store:null,downloadManager:null,overlayManager:null,preferences:null,toolbar:null,secondaryToolbar:null,eventBus:null,l10n:null,annotationEditorParams:null,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:i,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_docStats:null,_wheelUnusedTicks:0,_PDFBug:null,_hasAnnotationEditors:!1,_title:document.title,_printAnnotationStoragePromise:null,async initialize(e){this.preferences=this.externalServices.createPreferences(),this.appConfig=e,await this._readPreferences(),await this._parseHashParameters(),this._forceCssTheme(),await this._initializeL10n(),this.isViewerEmbedded&&f.AppOptions.get("externalLinkTarget")===v.LinkTarget.NONE&&f.AppOptions.set("externalLinkTarget",v.LinkTarget.TOP),await this._initializeViewerComponents(),this.bindEvents(),this.bindWindowEvents();e=e.appContainer||document.documentElement;this.l10n.translate(e).then(()=>{this.eventBus.dispatch("localized",{source:this})}),this._initializedCapability.resolve()},async _readPreferences(){if(!f.AppOptions.get("disablePreferences")){f.AppOptions._hasUserOptions()&&console.warn('_readPreferences: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');try{f.AppOptions.setAll(await this.preferences.getAll())}catch(e){console.error(`_readPreferences: "${null==e?void 0:e.message}".`)}}},async _parseHashParameters(){if(f.AppOptions.get("pdfBugEnabled")){var e=document.location.hash.substring(1);if(e){var{mainContainer:t,viewerContainer:i}=this.appConfig,n=(0,g.parseQueryString)(e);if("true"===n.get("disableworker"))try{u.GlobalWorkerOptions.workerSrc||(u.GlobalWorkerOptions.workerSrc=f.AppOptions.get("workerSrc")),await(0,u.loadScript)(u.PDFWorker.workerSrc)}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}if(n.has("disablerange")&&f.AppOptions.set("disableRange","true"===n.get("disablerange")),n.has("disablestream")&&f.AppOptions.set("disableStream","true"===n.get("disablestream")),n.has("disableautofetch")&&f.AppOptions.set("disableAutoFetch","true"===n.get("disableautofetch")),n.has("disablefontface")&&f.AppOptions.set("disableFontFace","true"===n.get("disablefontface")),n.has("disablehistory")&&f.AppOptions.set("disableHistory","true"===n.get("disablehistory")),n.has("verbosity")&&f.AppOptions.set("verbosity",0|n.get("verbosity")),n.has("textlayer"))switch(n.get("textlayer")){case"off":f.AppOptions.set("textLayerMode",g.TextLayerMode.DISABLE);break;case"visible":case"shadow":case"hover":i.classList.add("textLayer-"+n.get("textlayer"));try{await a(this),this._PDFBug.loadCSS()}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}}if(n.has("pdfbug")){f.AppOptions.set("pdfBug",!0),f.AppOptions.set("fontExtraProperties",!0);e=n.get("pdfbug").split(",");try{await a(this),this._PDFBug.init({OPS:u.OPS},t,e)}catch(e){console.error(`_parseHashParameters: "${e.message}".`)}}n.has("locale")&&f.AppOptions.set("locale",n.get("locale"))}}},async _initializeL10n(){this.l10n=this.externalServices.createL10n({locale:f.AppOptions.get("locale")});var e=await this.l10n.getDirection();document.getElementsByTagName("html")[0].dir=e},_forceCssTheme(){var i=f.AppOptions.get("viewerCssTheme");if(i!==l.AUTOMATIC&&Object.values(l).includes(i))try{var n=document.styleSheets[0],a=(null==n?void 0:n.cssRules)||[];for(let e=0,t=a.length;e<t;e++){var s,r,o=a[e];if(o instanceof CSSMediaRule&&"(prefers-color-scheme: dark)"===(null==(s=o.media)?void 0:s[0]))return i===l.LIGHT?void n.deleteRule(e):void(null!=(r=/^@media \(prefers-color-scheme: dark\) {\n\s*([\w\s-.,:;/\\{}()]+)\n}$/.exec(o.cssText))&&r[1]&&(n.deleteRule(e),n.insertRule(r[1],e)))}}catch(e){console.error(`_forceCssTheme: "${null==e?void 0:e.message}".`)}},async _initializeViewerComponents(){var{appConfig:e,externalServices:t}=this,i=new(t.isInAutomation?p.AutomationEventBus:p.EventBus),n=(this.eventBus=i,this.overlayManager=new F.OverlayManager,new X.PDFRenderingQueue),a=(n.onIdle=this._cleanup.bind(this),this.pdfRenderingQueue=n,new v.PDFLinkService({eventBus:i,externalLinkTarget:f.AppOptions.get("externalLinkTarget"),externalLinkRel:f.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:f.AppOptions.get("ignoreDestinationZoom")})),s=(this.pdfLinkService=a,t.createDownloadManager()),r=(this.downloadManager=s,new z.PDFFindController({linkService:a,eventBus:i})),t=(this.findController=r,new Z.PDFScriptingManager({eventBus:i,sandboxBundleSrc:f.AppOptions.get("sandboxBundleSrc"),scriptingFactory:t,docPropertiesLookup:this._scriptingDocProperties.bind(this)})),o=(this.pdfScriptingManager=t,e.mainContainer),l=e.viewerContainer,h=f.AppOptions.get("annotationEditorMode"),d=f.AppOptions.get("forcePageColors")||window.matchMedia("(forced-colors: active)").matches?{background:f.AppOptions.get("pageColorsBackground"),foreground:f.AppOptions.get("pageColorsForeground")}:null;if(this.pdfViewer=new J.PDFViewer({container:o,viewer:l,eventBus:i,renderingQueue:n,linkService:a,downloadManager:s,findController:r,scriptingManager:f.AppOptions.get("enableScripting")&&t,renderer:f.AppOptions.get("renderer"),l10n:this.l10n,textLayerMode:f.AppOptions.get("textLayerMode"),annotationMode:f.AppOptions.get("annotationMode"),annotationEditorMode:h,imageResourcesPath:f.AppOptions.get("imageResourcesPath"),enablePrintAutoRotate:f.AppOptions.get("enablePrintAutoRotate"),useOnlyCssZoom:f.AppOptions.get("useOnlyCssZoom"),maxCanvasPixels:f.AppOptions.get("maxCanvasPixels"),enablePermissions:f.AppOptions.get("enablePermissions"),pageColors:d}),n.setViewer(this.pdfViewer),a.setViewer(this.pdfViewer),t.setViewer(this.pdfViewer),this.pdfThumbnailViewer=new Y.PDFThumbnailViewer({container:e.sidebar.thumbnailView,eventBus:i,renderingQueue:n,linkService:a,l10n:this.l10n,pageColors:d}),n.setThumbnailViewer(this.pdfThumbnailViewer),this.isViewerEmbedded||f.AppOptions.get("disableHistory")||(this.pdfHistory=new j.PDFHistory({linkService:a,eventBus:i}),a.setHistory(this.pdfHistory)),this.supportsIntegratedFind||(this.findBar=new H.PDFFindBar(e.findBar,i,this.l10n)),h!==u.AnnotationEditorType.DISABLE)this.annotationEditorParams=new V.AnnotationEditorParams(e.annotationEditorParams,i);else for(const c of[document.getElementById("editorModeButtons"),document.getElementById("editorModeSeparator")])c.hidden=!0;this.pdfDocumentProperties=new U.PDFDocumentProperties(e.documentProperties,this.overlayManager,i,this.l10n,()=>this._docFilename),this.pdfCursorTools=new m.PDFCursorTools({container:o,eventBus:i,cursorToolOnLoad:f.AppOptions.get("cursorToolOnLoad")}),this.toolbar=new te.Toolbar(e.toolbar,i,this.l10n),this.secondaryToolbar=new ee.SecondaryToolbar(e.secondaryToolbar,i,this.externalServices),this.supportsFullscreen&&(this.pdfPresentationMode=new $.PDFPresentationMode({container:o,pdfViewer:this.pdfViewer,eventBus:i})),this.passwordPrompt=new R.PasswordPrompt(e.passwordOverlay,this.overlayManager,this.l10n,this.isViewerEmbedded),this.pdfOutlineViewer=new K.PDFOutlineViewer({container:e.sidebar.outlineView,eventBus:i,linkService:a,downloadManager:s}),this.pdfAttachmentViewer=new W.PDFAttachmentViewer({container:e.sidebar.attachmentsView,eventBus:i,downloadManager:s}),this.pdfLayerViewer=new G.PDFLayerViewer({container:e.sidebar.layersView,eventBus:i,l10n:this.l10n}),this.pdfSidebar=new Q.PDFSidebar({elements:e.sidebar,pdfViewer:this.pdfViewer,pdfThumbnailViewer:this.pdfThumbnailViewer,eventBus:i,l10n:this.l10n}),this.pdfSidebar.onToggled=this.forceRendering.bind(this),this.pdfSidebarResizer=new q.PDFSidebarResizer(e.sidebarResizer,i,this.l10n)},run(e){this.initialize(e).then(le)},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale(e)},zoomOut(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale(e)},zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=g.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(e){this.pdfViewer.currentPageNumber=e},get supportsPrinting(){return B.instance.supportsPrinting},get supportsFullscreen(){return(0,u.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},get loadingBar(){var e=new g.ProgressBar("loadingBar");return(0,u.shadow)(this,"loadingBar",e)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading(){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;this.url=t,this.baseUrl=t.split("#")[0],e&&(this._downloadUrl=e===t?this.baseUrl:e.split("#")[0]);let i=(0,u.getPdfFilenameFromUrl)(t,"");if(!i)try{i=decodeURIComponent((0,u.getFilenameFromUrl)(t))||t}catch(e){i=t}this.setTitle(i)},setTitle(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._title;this._title=t,this.isViewerEmbedded||(e=this._hasAnnotationEditors&&!this.pdfRenderingQueue.printing,document.title=(e?"* ":"")+t)},get _docFilename(){return this._contentDispositionFilename||(0,u.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark(){this.appConfig.secondaryToolbar.viewBookmarkButton.hidden=!0},async close(){var e;if(this._unblockDocumentLoadEvent(),this._hideViewBookmark(),this.pdfLoadingTask){if(0<(null==(t=this.pdfDocument)?void 0:t.annotationStorage.size)&&this._annotationStorageModified)try{await this.save()}catch(e){}var t=[];t.push(this.pdfLoadingTask.destroy()),this.pdfLoadingTask=null,this.pdfDocument&&(this.pdfDocument=null,this.pdfThumbnailViewer.setDocument(null),this.pdfViewer.setDocument(null),this.pdfLinkService.setDocument(null),this.pdfDocumentProperties.setDocument(null)),this.pdfLinkService.externalLinkEnabled=!0,this.store=null,this.isInitialViewSet=!1,this.downloadComplete=!1,this.url="",this.baseUrl="",this._downloadUrl="",this.documentInfo=null,this.metadata=null,this._contentDispositionFilename=null,this._contentLength=null,this._saveInProgress=!1,this._docStats=null,this._hasAnnotationEditors=!1,t.push(this.pdfScriptingManager.destroyPromise),this.setTitle(),this.pdfSidebar.reset(),this.pdfOutlineViewer.reset(),this.pdfAttachmentViewer.reset(),this.pdfLayerViewer.reset(),null!=(e=this.pdfHistory)&&e.reset(),null!=(e=this.findBar)&&e.reset(),this.toolbar.reset(),this.secondaryToolbar.reset(),null!=(e=this._PDFBug)&&e.cleanup(),await Promise.all(t)}},async open(e,t){this.pdfLoadingTask&&await this.close();var i=f.AppOptions.getAll(f.OptionKind.WORKER);for(const o in i)u.GlobalWorkerOptions[o]=i[o];var n=Object.create(null),a=("string"==typeof e?(this.setTitleUsingUrl(e,e),n.url=e):e&&"byteLength"in e?n.data=e:e.url&&e.originalUrl&&(this.setTitleUsingUrl(e.originalUrl,e.url),n.url=e.url),f.AppOptions.getAll(f.OptionKind.API));for(const l in a){var s=a[l];l,n[l]=s}if(t)for(const h in t)n[h]=t[h];const r=(0,u.getDocument)(n);return(this.pdfLoadingTask=r).onPassword=(e,t)=>{this.pdfLinkService.externalLinkEnabled=!1,this.passwordPrompt.setUpdateCallback(e,t),this.passwordPrompt.open()},r.onProgress=e=>{var{loaded:e,total:t}=e;this.progress(e/t)},r.onUnsupportedFeature=this.fallback.bind(this),r.promise.then(e=>{this.load(e)},t=>{if(r===this.pdfLoadingTask){let e="loading_error";return t instanceof u.InvalidPDFException?e="invalid_file_error":t instanceof u.MissingPDFException?e="missing_file_error":t instanceof u.UnexpectedResponseException&&(e="unexpected_response_error"),this.l10n.get(e).then(e=>{throw this._documentError(e,{message:null==t?void 0:t.message}),t})}})},_ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},async download(){var t=this._downloadUrl,i=this._docFilename;try{this._ensureDownloadComplete();var e=await this.pdfDocument.getData(),n=new Blob([e],{type:"application/pdf"});await this.downloadManager.download(n,t,i)}catch(e){await this.downloadManager.downloadUrl(t,i)}},async save(){if(!this._saveInProgress){this._saveInProgress=!0,await this.pdfScriptingManager.dispatchWillSave();var e=this._downloadUrl,t=this._docFilename;try{this._ensureDownloadComplete();var i=await this.pdfDocument.saveDocument(),n=new Blob([i],{type:"application/pdf"});await this.downloadManager.download(n,e,t)}catch(e){console.error("Error when saving the document: "+e.message),await this.download()}finally{await this.pdfScriptingManager.dispatchDidSave(),this._saveInProgress=!1}this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"save"}})}},downloadOrSave(){var e;0<(null==(e=this.pdfDocument)?void 0:e.annotationStorage.size)?this.save():this.download()},fallback(e){this.externalServices.reportTelemetry({type:"unsupportedFeature",featureId:e})},_documentError(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;this._unblockDocumentLoadEvent(),this._otherError(e,t),this.eventBus.dispatch("documenterror",{source:this,message:e,reason:(null==t?void 0:t.message)??null})},_otherError(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=[`PDF.js v${u.version||"?"} (build: ${u.build||"?"})`];t&&(i.push("Message: "+t.message),t.stack?i.push("Stack: "+t.stack):(t.filename&&i.push("File: "+t.filename),t.lineNumber&&i.push("Line: "+t.lineNumber))),console.error(e+`

`+i.join("\n")),this.fallback()},progress(e){var t;this.downloadComplete||(e=Math.round(100*e))<=this.loadingBar.percent||(this.loadingBar.percent=e,((null==(t=this.pdfDocument)?void 0:t.loadingParams.disableAutoFetch)??f.AppOptions.get("disableAutoFetch"))&&!isNaN(e)&&(this.disableAutoFetchLoadingBarTimeout&&(clearTimeout(this.disableAutoFetchLoadingBarTimeout),this.disableAutoFetchLoadingBarTimeout=null),this.loadingBar.show(),this.disableAutoFetchLoadingBarTimeout=setTimeout(()=>{this.loadingBar.hide(),this.disableAutoFetchLoadingBarTimeout=null},5e3)))},load(c){(this.pdfDocument=c).getDownloadInfo().then(e=>{e=e.length;this._contentLength=e,this.downloadComplete=!0,this.loadingBar.hide(),a.then(()=>{this.eventBus.dispatch("documentloaded",{source:this})})});const t=c.getPageLayout().catch(function(){}),i=c.getPageMode().catch(function(){}),n=c.getOpenAction().catch(function(){});this.toolbar.setPagesCount(c.numPages,!1),this.secondaryToolbar.setPagesCount(c.numPages),this.pdfLinkService.setDocument(c,null),this.pdfDocumentProperties.setDocument(c);const u=this.pdfViewer,{firstPagePromise:a,onePageRendered:e,pagesPromise:p}=(u.setDocument(c),u),s=(this.pdfThumbnailViewer.setDocument(c),(this.store=new ie.ViewHistory(c.fingerprints[0])).getMultiple({page:null,zoom:g.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:g.SidebarView.UNKNOWN,scrollMode:g.ScrollMode.UNKNOWN,spreadMode:g.SpreadMode.UNKNOWN}).catch(()=>Object.create(null)));a.then(e=>{this.loadingBar.setWidth(this.appConfig.viewerContainer),this._initializeAnnotationStorageCallbacks(c),Promise.all([g.animationStarted,s,t,i,n]).then(async e=>{var[,e,t,i,n]=e,a=f.AppOptions.get("viewOnLoad"),n=(this._initializePdfHistory({fingerprint:c.fingerprints[0],viewOnLoad:a,initialDest:null==n?void 0:n.dest}),this.initialBookmark),s=f.AppOptions.get("defaultZoomValue");let r=s?"zoom="+s:null,o=null,l=f.AppOptions.get("sidebarViewOnLoad"),h=f.AppOptions.get("scrollModeOnLoad"),d=f.AppOptions.get("spreadModeOnLoad");e.page&&a!==w.INITIAL&&(r=`page=${e.page}&zoom=${s||e.zoom},`+e.scrollLeft+","+e.scrollTop,o=parseInt(e.rotation,10),l===g.SidebarView.UNKNOWN&&(l=0|e.sidebarView),h===g.ScrollMode.UNKNOWN&&(h=0|e.scrollMode),d===g.SpreadMode.UNKNOWN)&&(d=0|e.spreadMode),i&&l===g.SidebarView.UNKNOWN&&(l=(0,g.apiPageModeToSidebarView)(i)),t&&h===g.ScrollMode.UNKNOWN&&d===g.SpreadMode.UNKNOWN&&(a=(0,g.apiPageLayoutToViewerModes)(t),d=a.spreadMode),this.setInitialView(r,{rotation:o,sidebarView:l,scrollMode:h,spreadMode:d}),this.eventBus.dispatch("documentinit",{source:this}),this.isViewerEmbedded||u.focus(),await Promise.race([p,new Promise(e=>{setTimeout(e,1e4)})]),!n&&!r||u.hasEqualPageSizes||(this.initialBookmark=n,u.currentScaleValue=u.currentScaleValue,this.setInitialView(r))}).catch(()=>{this.setInitialView()}).then(function(){u.update()})}),p.then(()=>{this._unblockDocumentLoadEvent(),this._initializeAutoPrint(c,n)},t=>{this.l10n.get("loading_error").then(e=>{this._documentError(e,{message:null==t?void 0:t.message})})}),e.then(e=>{this.externalServices.reportTelemetry({type:"pageInfo",timestamp:e.timestamp}),c.getOutline().then(e=>{c===this.pdfDocument&&this.pdfOutlineViewer.render({outline:e,pdfDocument:c})}),c.getAttachments().then(e=>{c===this.pdfDocument&&this.pdfAttachmentViewer.render({attachments:e})}),u.optionalContentConfigPromise.then(e=>{c===this.pdfDocument&&this.pdfLayerViewer.render({optionalContentConfig:e,pdfDocument:c})})}),this._initializePageLabels(c),this._initializeMetadata(c)},async _scriptingDocProperties(e){return(this.documentInfo||(await new Promise(e=>{this.eventBus._on("metadataloaded",e,{once:!0})}),e===this.pdfDocument))&&(this._contentLength||(await new Promise(e=>{this.eventBus._on("documentloaded",e,{once:!0})}),e===this.pdfDocument))?{...this.documentInfo,baseURL:this.baseUrl,filesize:this._contentLength,filename:this._docFilename,metadata:null==(e=this.metadata)?void 0:e.getRaw(),authors:null==(e=this.metadata)?void 0:e.get("dc:creator"),numPages:this.pagesCount,URL:this.url}:null},async _initializeAutoPrint(e,t){var[t,i]=await Promise.all([t,this.pdfViewer.enableScripting?null:e.getJavaScript()]);if(e===this.pdfDocument){let e=!1;if("Print"===(null==t?void 0:t.action)&&(e=!0),i&&(i.some(e=>!!e&&(console.warn("Warning: JavaScript support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.javaScript),!0)),!e))for(const n of i)if(n&&g.AutoPrintRegExp.test(n)){e=!0;break}e&&this.triggerPrinting()}},async _initializeMetadata(a){var{info:s,metadata:r,contentDispositionFilename:o,contentLength:l}=await a.getMetadata();if(a===this.pdfDocument){this.documentInfo=s,this.metadata=r,this._contentDispositionFilename??(this._contentDispositionFilename=o),this._contentLength??(this._contentLength=l),console.log(`PDF ${a.fingerprints[0]} [${s.PDFFormatVersion} `+`${(s.Producer||"-").trim()} / ${(s.Creator||"-").trim()}] `+`(PDF.js: ${u.version||"?"} [${u.build||"?"}])`);let e=s.Title;o=null==r?void 0:r.get("dc:title");(e=!o||"Untitled"===o||/[\uFFF0-\uFFFF]/g.test(o)?e:o)?this.setTitle(e+" - "+(this._contentDispositionFilename||this._title)):this._contentDispositionFilename&&this.setTitle(this._contentDispositionFilename),!s.IsXFAPresent||s.IsAcroFormPresent||a.isPureXfa?!s.IsAcroFormPresent&&!s.IsXFAPresent||this.pdfViewer.renderForms||(console.warn("Warning: Interactive form support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.forms)):(a.loadingParams.enableXfa?console.warn("Warning: XFA Foreground documents are not supported"):console.warn("Warning: XFA support is not enabled"),this.fallback(u.UNSUPPORTED_FEATURES.forms)),s.IsSignaturesPresent&&(console.warn("Warning: Digital signatures validation is not supported"),this.fallback(u.UNSUPPORTED_FEATURES.signatures));let t="other",i=(ae.includes(s.PDFFormatVersion)&&(t="v"+s.PDFFormatVersion.replace(".","_")),"other");if(s.Producer){const h=s.Producer.toLowerCase();se.some(function(e){return!!h.includes(e)&&(i=e.replace(/[ .-]/g,"_"),!0)})}let n=null;s.IsXFAPresent?n="xfa":s.IsAcroFormPresent&&(n="acroform"),this.externalServices.reportTelemetry({type:"documentInfo",version:t,generator:i,formType:n}),this.eventBus.dispatch("metadataloaded",{source:this})}},async _initializePageLabels(e){var n=await e.getPageLabels();if(e===this.pdfDocument&&n&&!f.AppOptions.get("disablePageLabels")){var a,s,r=n.length;let t=0,i=0;for(let e=0;e<r;e++){var o=n[e];if(o===(e+1).toString())t++;else{if(""!==o)break;i++}}t>=r||i>=r||({pdfViewer:e,pdfThumbnailViewer:a,toolbar:s}=this,e.setPageLabels(n),a.setPageLabels(n),s.setPagesCount(r,!0),s.setPageNumber(e.currentPageNumber,e.currentPageLabel))}},_initializePdfHistory(e){var{fingerprint:e,viewOnLoad:t,initialDest:i=null}=e;this.pdfHistory&&(this.pdfHistory.initialize({fingerprint:e,resetHistory:t===w.INITIAL,updateUrl:f.AppOptions.get("historyUpdateUrl")}),this.pdfHistory.initialBookmark&&(this.initialBookmark=this.pdfHistory.initialBookmark,this.initialRotation=this.pdfHistory.initialRotation),i)&&!this.initialBookmark&&t===w.UNKNOWN&&(this.initialBookmark=JSON.stringify(i),this.pdfHistory.push({explicitDest:i,pageNumber:null}))},_initializeAnnotationStorageCallbacks(e){e===this.pdfDocument&&(e=e["annotationStorage"],e.onSetModified=()=>{window.addEventListener("beforeunload",De),this._annotationStorageModified=!0},e.onResetModified=()=>{window.removeEventListener("beforeunload",De),delete this._annotationStorageModified},e.onAnnotationEditor=e=>{this._hasAnnotationEditors=!!e,this.setTitle(),e&&this.externalServices.reportTelemetry({type:"editing",data:{type:e}})})},setInitialView(e){var{rotation:t,sidebarView:i,scrollMode:n,spreadMode:a}=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=e=>{(0,g.isValidRotation)(e)&&(this.pdfViewer.pagesRotation=e)};this.isInitialViewSet=!0,this.pdfSidebar.setInitialView(i),i=n,n=a,(0,g.isValidScrollMode)(i)&&(this.pdfViewer.scrollMode=i),(0,g.isValidSpreadMode)(n)&&(this.pdfViewer.spreadMode=n),this.initialBookmark?(s(this.initialRotation),delete this.initialRotation,this.pdfLinkService.setHash(this.initialBookmark),this.initialBookmark=null):e&&(s(t),this.pdfLinkService.setHash(e)),this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel),this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber),this.pdfViewer.currentScaleValue||(this.pdfViewer.currentScaleValue=g.DEFAULT_SCALE_VALUE)},_cleanup(){this.pdfDocument&&(this.pdfViewer.cleanup(),this.pdfThumbnailViewer.cleanup(),this.pdfDocument.cleanup(this.pdfViewer.renderer===g.RendererType.SVG))},forceRendering(){this.pdfRenderingQueue.printing=!!this.printService,this.pdfRenderingQueue.isThumbnailViewEnabled=this.pdfSidebar.visibleView===g.SidebarView.THUMBS,this.pdfRenderingQueue.renderHighestPriority()},beforePrint(){var e,t,i,n;this._printAnnotationStoragePromise=this.pdfScriptingManager.dispatchWillPrint().catch(()=>{}).then(()=>{var e;return null==(e=this.pdfDocument)?void 0:e.annotationStorage.print}),this.printService||(this.supportsPrinting?this.pdfViewer.pageViewsReady?(n=this.pdfViewer.getPagesOverview(),e=this.appConfig.printContainer,t=f.AppOptions.get("printResolution"),i=this.pdfViewer.optionalContentConfigPromise,n=B.instance.createPrintService(this.pdfDocument,n,e,t,i,this._printAnnotationStoragePromise,this.l10n),this.printService=n,this.forceRendering(),this.setTitle(),n.layout(),this.externalServices.reportTelemetry({type:"print"}),this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"print"}})):this.l10n.get("printing_not_ready").then(e=>{window.alert(e)}):this.l10n.get("printing_not_supported").then(e=>{this._otherError(e)}))},afterPrint(){var e;this._printAnnotationStoragePromise&&(this._printAnnotationStoragePromise.then(()=>{this.pdfScriptingManager.dispatchDidPrint()}),this._printAnnotationStoragePromise=null),this.printService&&(this.printService.destroy(),(this.printService=null)!=(e=this.pdfDocument))&&e.annotationStorage.resetModified(),this.forceRendering(),this.setTitle()},rotatePages(e){this.pdfViewer.pagesRotation+=e},requestPresentationMode(){var e;null!=(e=this.pdfPresentationMode)&&e.request()},triggerPrinting(){this.supportsPrinting&&window.print()},bindEvents(){var{eventBus:e,_boundEvents:t}=this;t.beforePrint=this.beforePrint.bind(this),t.afterPrint=this.afterPrint.bind(this),e._on("resize",y),e._on("hashchange",P),e._on("beforeprint",t.beforePrint),e._on("afterprint",t.afterPrint),e._on("pagerendered",n),e._on("updateviewarea",c),e._on("pagechanging",Le),e._on("scalechanging",Ee),e._on("rotationchanging",Se),e._on("sidebarviewchanged",h),e._on("pagemode",s),e._on("namedaction",r),e._on("presentationmodechanged",o),e._on("presentationmode",L),e._on("switchannotationeditormode",he),e._on("switchannotationeditorparams",de),e._on("print",C),e._on("download",T),e._on("firstpage",M),e._on("lastpage",I),e._on("nextpage",A),e._on("previouspage",k),e._on("zoomin",D),e._on("zoomout",N),e._on("zoomreset",ce),e._on("pagenumberchanged",ue),e._on("scalechanged",pe),e._on("rotatecw",ge),e._on("rotateccw",fe),e._on("optionalcontentconfig",me),e._on("switchscrollmode",ve),e._on("scrollmodechanged",_),e._on("switchspreadmode",we),e._on("spreadmodechanged",b),e._on("documentproperties",_e),e._on("findfromurlhash",be),e._on("updatefindmatchescount",ye),e._on("updatefindcontrolstate",Pe),f.AppOptions.get("pdfBug")&&(t.reportPageStatsPDFBug=oe,e._on("pagerendered",t.reportPageStatsPDFBug),e._on("pagechanging",t.reportPageStatsPDFBug)),e._on("fileinputchange",E),e._on("openfile",S)},bindWindowEvents(){const{eventBus:t,_boundEvents:n}=this;!function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;t&&d.pdfViewer.refresh();const i=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`);i.addEventListener("change",e,{once:!0}),n.removeWindowResolutionChange||(n.removeWindowResolutionChange=function(){i.removeEventListener("change",e),n.removeWindowResolutionChange=null})}(),n.windowResize=()=>{t.dispatch("resize",{source:window})},n.windowHashChange=()=>{t.dispatch("hashchange",{source:window,hash:document.location.hash.substring(1)})},n.windowBeforePrint=()=>{t.dispatch("beforeprint",{source:window})},n.windowAfterPrint=()=>{t.dispatch("afterprint",{source:window})},n.windowUpdateFromSandbox=e=>{t.dispatch("updatefromsandbox",{source:window,detail:e.detail})},window.addEventListener("visibilitychange",Ce),window.addEventListener("wheel",Me,{passive:!1}),window.addEventListener("touchstart",Ie,{passive:!1}),window.addEventListener("click",Ae),window.addEventListener("keydown",ke),window.addEventListener("resize",n.windowResize),window.addEventListener("hashchange",n.windowHashChange),window.addEventListener("beforeprint",n.windowBeforePrint),window.addEventListener("afterprint",n.windowAfterPrint),window.addEventListener("updatefromsandbox",n.windowUpdateFromSandbox)},unbindEvents(){var{eventBus:e,_boundEvents:t}=this;e._off("resize",y),e._off("hashchange",P),e._off("beforeprint",t.beforePrint),e._off("afterprint",t.afterPrint),e._off("pagerendered",n),e._off("updateviewarea",c),e._off("pagechanging",Le),e._off("scalechanging",Ee),e._off("rotationchanging",Se),e._off("sidebarviewchanged",h),e._off("pagemode",s),e._off("namedaction",r),e._off("presentationmodechanged",o),e._off("presentationmode",L),e._off("print",C),e._off("download",T),e._off("firstpage",M),e._off("lastpage",I),e._off("nextpage",A),e._off("previouspage",k),e._off("zoomin",D),e._off("zoomout",N),e._off("zoomreset",ce),e._off("pagenumberchanged",ue),e._off("scalechanged",pe),e._off("rotatecw",ge),e._off("rotateccw",fe),e._off("optionalcontentconfig",me),e._off("switchscrollmode",ve),e._off("scrollmodechanged",_),e._off("switchspreadmode",we),e._off("spreadmodechanged",b),e._off("documentproperties",_e),e._off("findfromurlhash",be),e._off("updatefindmatchescount",ye),e._off("updatefindcontrolstate",Pe),t.reportPageStatsPDFBug&&(e._off("pagerendered",t.reportPageStatsPDFBug),e._off("pagechanging",t.reportPageStatsPDFBug),t.reportPageStatsPDFBug=null),e._off("fileinputchange",E),e._off("openfile",S),t.beforePrint=null,t.afterPrint=null},unbindWindowEvents(){var e,t=this["_boundEvents"];window.removeEventListener("visibilitychange",Ce),window.removeEventListener("wheel",Me,{passive:!1}),window.removeEventListener("touchstart",Ie,{passive:!1}),window.removeEventListener("click",Ae),window.removeEventListener("keydown",ke),window.removeEventListener("resize",t.windowResize),window.removeEventListener("hashchange",t.windowHashChange),window.removeEventListener("beforeprint",t.windowBeforePrint),window.removeEventListener("afterprint",t.windowAfterPrint),window.removeEventListener("updatefromsandbox",t.windowUpdateFromSandbox),null!=(e=t.removeWindowResolutionChange)&&e.call(t),t.windowResize=null,t.windowHashChange=null,t.windowBeforePrint=null,t.windowAfterPrint=null,t.windowUpdateFromSandbox=null},accumulateWheelTicks(e){(0<this._wheelUnusedTicks&&e<0||this._wheelUnusedTicks<0&&0<e)&&(this._wheelUnusedTicks=0),this._wheelUnusedTicks+=e;e=Math.sign(this._wheelUnusedTicks)*Math.floor(Math.abs(this._wheelUnusedTicks));return this._wheelUnusedTicks-=e,e},_unblockDocumentLoadEvent(){var e,t;null!=(e=(t=document).blockUnblockOnload)&&e.call(t,!1),this._unblockDocumentLoadEvent=()=>{}},_reportDocumentStatsTelemetry(){var e=this.pdfDocument["stats"];e!==this._docStats&&(this._docStats=e,this.externalServices.reportTelemetry({type:"documentStats",stats:e}))},get scriptingReady(){return this.pdfScriptingManager.ready}};e.PDFViewerApplication=d;{const Ne=["null","http://mozilla.github.io","https://mozilla.github.io"];var re=function(e){if(e)try{var t=new URL(window.location.href).origin||"null";if(!Ne.includes(t))if(new URL(e,window.location.href).origin!==t)throw new Error("file origin does not match viewer's")}catch(t){throw d.l10n.get("loading_error").then(e=>{d._documentError(e,{message:null==t?void 0:t.message})}),t}}}async function a(e){var t=e.appConfig["debuggerScriptPath"],t=(await import(t))["PDFBug"];e._PDFBug=t}function oe(e){var t,e=e["pageNumber"];null!=(t=globalThis.Stats)&&t.enabled&&(t=d.pdfViewer.getPageView(e-1),globalThis.Stats.add(e,null==t||null==(e=t.pdfPage)?void 0:e.stats))}function le(){const{appConfig:e,eventBus:i}=d;var t=document.location.search.substring(1),t=(0,g.parseQueryString)(t).get("file")??f.AppOptions.get("defaultUrl"),n=(re(t),e.openFileInput);n.value=null,n.addEventListener("change",function(e){var t=e.target["files"];t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.target})}),e.mainContainer.addEventListener("dragover",function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy"===e.dataTransfer.effectAllowed?"copy":"move"}),e.mainContainer.addEventListener("drop",function(e){e.preventDefault();var t=e.dataTransfer["files"];t&&0!==t.length&&i.dispatch("fileinputchange",{source:this,fileInput:e.dataTransfer})}),d.supportsDocumentFonts||(f.AppOptions.set("disableFontFace",!0),d.l10n.get("web_fonts_disabled").then(e=>{console.warn(e)})),d.supportsPrinting||(e.toolbar.print.classList.add("hidden"),e.secondaryToolbar.printButton.classList.add("hidden")),d.supportsFullscreen||e.secondaryToolbar.presentationModeButton.classList.add("hidden"),d.supportsIntegratedFind&&e.toolbar.viewFind.classList.add("hidden"),e.mainContainer.addEventListener("transitionend",function(e){e.target===this&&i.dispatch("resize",{source:this})},!0);try{t?d.open(t):d._hideViewBookmark()}catch(t){d.l10n.get("loading_error").then(e=>{d._documentError(e,t)})}}function n(e){let{pageNumber:t,error:i}=e;var n;t===d.page&&d.toolbar.updateLoadingIndicatorState(!1),d.pdfSidebar.visibleView===g.SidebarView.THUMBS&&(e=d.pdfViewer.getPageView(t-1),n=d.pdfThumbnailViewer.getThumbnail(t-1),e)&&n&&n.setImage(e),i&&d.l10n.get("rendering_error").then(e=>{d._otherError(e,i)}),d._reportDocumentStatsTelemetry()}function s(e){var t=e["mode"];let i;switch(t){case"thumbs":i=g.SidebarView.THUMBS;break;case"bookmarks":case"outline":i=g.SidebarView.OUTLINE;break;case"attachments":i=g.SidebarView.ATTACHMENTS;break;case"layers":i=g.SidebarView.LAYERS;break;case"none":i=g.SidebarView.NONE;break;default:return void console.error('Invalid "pagemode" hash parameter: '+t)}d.pdfSidebar.switchView(i,!0)}function r(e){switch(e.action){case"GoToPage":d.appConfig.toolbar.pageNumber.select();break;case"Find":d.supportsIntegratedFind||d.findBar.toggle();break;case"Print":d.triggerPrinting();break;case"SaveAs":d.downloadOrSave()}}function o(e){d.pdfViewer.presentationModeState=e.state}function h(e){var t,e=e["view"];d.pdfRenderingQueue.isThumbnailViewEnabled=e===g.SidebarView.THUMBS,d.isInitialViewSet&&null!=(t=d.store)&&t.set("sidebarView",e).catch(()=>{})}function c(e){var e=e["location"],t=(d.isInitialViewSet&&null!=(t=d.store)&&t.setMultiple({page:e.pageNumber,zoom:e.scale,scrollLeft:e.left,scrollTop:e.top,rotation:e.rotation}).catch(()=>{}),d.pdfLinkService.getAnchorUrl(e.pdfOpenParams)),e=(d.appConfig.secondaryToolbar.viewBookmarkButton.href=t,d.pdfViewer.getPageView(d.page-1)),t=(null==e?void 0:e.renderingState)!==g.RenderingStates.FINISHED;d.toolbar.updateLoadingIndicatorState(t)}function _(e){var t;d.isInitialViewSet&&!d.pdfViewer.isInPresentationMode&&null!=(t=d.store)&&t.set("scrollMode",e.mode).catch(()=>{})}function b(e){var t;d.isInitialViewSet&&!d.pdfViewer.isInPresentationMode&&null!=(t=d.store)&&t.set("spreadMode",e.mode).catch(()=>{})}function y(){var{pdfDocument:e,pdfViewer:t,pdfRenderingQueue:i}=d;i.printing&&window.matchMedia("print").matches||(t.updateContainerHeightCss(),e&&("auto"!==(i=t.currentScaleValue)&&"page-fit"!==i&&"page-width"!==i||(t.currentScaleValue=i),t.update()))}function P(e){var t,e=e.hash;e&&(d.isInitialViewSet?null!=(t=d.pdfHistory)&&t.popStateInProgress||d.pdfLinkService.setHash(e):d.initialBookmark=e)}var E=function(t){if(null==(i=d.pdfViewer)||!i.isInPresentationMode){var i=t.fileInput.files[0];let e=URL.createObjectURL(i);i.name&&(e={url:e,originalUrl:i.name}),d.open(e)}},S=function(e){d.appConfig.openFileInput.click()};function L(){d.requestPresentationMode()}function he(e){d.pdfViewer.annotationEditorMode=e.mode}function de(e){d.pdfViewer.annotationEditorParams=e}function C(){d.triggerPrinting()}function T(){d.downloadOrSave()}function M(){d.pdfDocument&&(d.page=1)}function I(){d.pdfDocument&&(d.page=d.pagesCount)}function A(){d.pdfViewer.nextPage()}function k(){d.pdfViewer.previousPage()}function D(){d.zoomIn()}function N(){d.zoomOut()}function ce(){d.zoomReset()}function ue(e){var t=d.pdfViewer;""!==e.value&&d.pdfLinkService.goToPage(e.value),e.value!==t.currentPageNumber.toString()&&e.value!==t.currentPageLabel&&d.toolbar.setPageNumber(t.currentPageNumber,t.currentPageLabel)}function pe(e){d.pdfViewer.currentScaleValue=e.value}function ge(){d.rotatePages(90)}function fe(){d.rotatePages(-90)}function me(e){d.pdfViewer.optionalContentConfigPromise=e.promise}function ve(e){d.pdfViewer.scrollMode=e.mode}function we(e){d.pdfViewer.spreadMode=e.mode}function _e(){d.pdfDocumentProperties.open()}function be(e){d.eventBus.dispatch("find",{source:e.source,type:"",query:e.query,phraseSearch:e.phraseSearch,caseSensitive:!1,entireWord:!1,highlightAll:!0,findPrevious:!1,matchDiacritics:!0})}function ye(e){e=e.matchesCount;d.supportsIntegratedFind?d.externalServices.updateFindMatchesCount(e):d.findBar.updateResultsCount(e)}function Pe(e){var{state:e,previous:t,matchesCount:i,rawQuery:n}=e;d.supportsIntegratedFind?d.externalServices.updateFindControlState({result:e,findPrevious:t,matchesCount:i,rawQuery:n}):d.findBar.updateUIState(e,t,i)}function Ee(e){d.toolbar.setPageScale(e.presetValue,e.scale),d.pdfViewer.update()}function Se(e){d.pdfThumbnailViewer.pagesRotation=e.pagesRotation,d.forceRendering(),d.pdfViewer.currentPageNumber=e.pageNumber}function Le(e){var{pageNumber:e,pageLabel:t}=e;d.toolbar.setPageNumber(e,t),d.secondaryToolbar.setPageNumber(e),d.pdfSidebar.visibleView===g.SidebarView.THUMBS&&d.pdfThumbnailViewer.scrollThumbnailIntoView(e)}function Ce(e){"visible"===document.visibilityState&&Te()}let x=null;function Te(){x&&clearTimeout(x),x=setTimeout(function(){x=null},ne)}function Me(t){var{pdfViewer:i,supportedMouseWheelZoomModifierKeys:n}=d;if(!i.isInPresentationMode)if(t.ctrlKey&&n.ctrlKey||t.metaKey&&n.metaKey){if(t.preventDefault(),!x&&"hidden"!==document.visibilityState){var n=t.deltaMode,a=(0,g.normalizeWheelEventDirection)(t),s=i.currentScale;let e=0;(e=n===WheelEvent.DOM_DELTA_LINE||n===WheelEvent.DOM_DELTA_PAGE?1<=Math.abs(a)?Math.sign(a):d.accumulateWheelTicks(a):d.accumulateWheelTicks(a/30))<0?d.zoomOut(-e):0<e&&d.zoomIn(e);n=i.currentScale;s!==n&&(a=n/s-1,n=i.container.getBoundingClientRect(),s=t.clientX-n.left,t=t.clientY-n.top,i.container.scrollLeft+=s*a,i.container.scrollTop+=t*a)}}else Te()}function Ie(e){1<e.touches.length&&e.preventDefault()}function Ae(e){var t;d.secondaryToolbar.isOpen&&(t=d.appConfig,d.pdfViewer.containsElement(e.target)||t.toolbar.container.contains(e.target)&&e.target!==t.secondaryToolbar.toggleButton)&&d.secondaryToolbar.close()}function ke(a){if(!d.overlayManager.active){var{eventBus:e,pdfViewer:s}=d,r=s.isInPresentationMode;let i=!1,n=!1;var t,o=(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0);if(1==o||8==o||5==o||12==o)switch(a.keyCode){case 70:d.supportsIntegratedFind||a.shiftKey||(d.findBar.open(),i=!0);break;case 71:d.supportsIntegratedFind||(t=d.findController["state"],t&&(t=Object.assign(Object.create(null),t,{source:window,type:"again",findPrevious:5==o||12==o}),e.dispatch("find",t)),i=!0);break;case 61:case 107:case 187:case 171:r||d.zoomIn(),i=!0;break;case 173:case 109:case 189:r||d.zoomOut(),i=!0;break;case 48:case 96:r||(setTimeout(function(){d.zoomReset()}),i=!1);break;case 38:(r||1<d.page)&&(d.page=1,i=!0,n=!0);break;case 40:(r||d.page<d.pagesCount)&&(d.page=d.pagesCount,i=!0,n=!0)}if(1==o||8==o)switch(a.keyCode){case 83:e.dispatch("download",{source:window}),i=!0;break;case 79:e.dispatch("openfile",{source:window}),i=!0}if(3==o||10==o)switch(a.keyCode){case 80:d.requestPresentationMode(),i=!0,d.externalServices.reportTelemetry({type:"buttons",data:{id:"presentationModeKeyboard"}});break;case 71:d.appConfig.toolbar.pageNumber.select(),i=!0}if(i)n&&!r&&s.focus(),a.preventDefault();else{var l=(0,g.getActiveOrFocusedElement)(),h=null==l?void 0:l.tagName.toUpperCase();if(!("INPUT"===h||"TEXTAREA"===h||"SELECT"===h||null!=l&&l.isContentEditable)||27===a.keyCode){if(0==o){let e=0,t=!1;switch(a.keyCode){case 38:case 33:s.isVerticalScrollbarEnabled&&(t=!0),e=-1;break;case 8:r||(t=!0),e=-1;break;case 37:s.isHorizontalScrollbarEnabled&&(t=!0);case 75:case 80:e=-1;break;case 27:d.secondaryToolbar.isOpen&&(d.secondaryToolbar.close(),i=!0),!d.supportsIntegratedFind&&d.findBar.opened&&(d.findBar.close(),i=!0);break;case 40:case 34:s.isVerticalScrollbarEnabled&&(t=!0),e=1;break;case 13:case 32:r||(t=!0),e=1;break;case 39:s.isHorizontalScrollbarEnabled&&(t=!0);case 74:case 78:e=1;break;case 36:(r||1<d.page)&&(d.page=1,i=!0,n=!0);break;case 35:(r||d.page<d.pagesCount)&&(d.page=d.pagesCount,i=!0,n=!0);break;case 83:d.pdfCursorTools.switchTool(m.CursorTool.SELECT);break;case 72:d.pdfCursorTools.switchTool(m.CursorTool.HAND);break;case 82:d.rotatePages(90);break;case 115:d.pdfSidebar.toggle()}0===e||t&&"page-fit"!==s.currentScaleValue||(0<e?s.nextPage():s.previousPage(),i=!0)}if(4==o)switch(a.keyCode){case 13:case 32:!r&&"page-fit"!==s.currentScaleValue||(s.previousPage(),i=!0);break;case 82:d.rotatePages(-90)}i||r||(33<=a.keyCode&&a.keyCode<=40||32===a.keyCode&&"BUTTON"!==h)&&(n=!0),n&&!s.containsElement(l)&&s.focus(),i&&a.preventDefault()}}}}function De(e){return e.preventDefault(),e.returnValue="",!1}const B={instance:{supportsPrinting:!1,createPrintService(){throw new Error("Not implemented: createPrintService")}}};e.PDFPrintServiceFactory=B},e=>{let t;t="undefined"!=typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:require("../build/pdf.js"),e.exports=t},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WaitOnType=t.EventBus=t.AutomationEventBus=void 0,t.waitOnEventOrTimeout=function(e){let{target:r,name:o,delay:l=0}=e;return new Promise(function(t,e){if("object"!=typeof r||!o||"string"!=typeof o||!(Number.isInteger(l)&&0<=l))throw new Error("waitOnEventOrTimeout - invalid parameters.");function i(e){r instanceof d?r._off(o,n):r.removeEventListener(o,n),s&&clearTimeout(s),t(e)}const n=i.bind(null,h.EVENT);r instanceof d?r._on(o,n):r.addEventListener(o,n);var a=i.bind(null,h.TIMEOUT);const s=setTimeout(a,l)})};const h={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=h;class d{constructor(){this._listeners=Object.create(null)}on(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;this._on(e,t,{external:!0,once:null==i?void 0:i.once})}off(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;this._off(e,t,{external:!0,once:null==i?void 0:i.once})}dispatch(t,i){var n=this._listeners[t];if(n&&0!==n.length){let e;for(var{listener:a,external:s,once:r}of n.slice(0))r&&this._off(t,a),s?(e=e||[]).push(a):a(i);if(e){for(const o of e)o(i);e=null}}}_on(e,t){var i,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;((i=this._listeners)[e]||(i[e]=[])).push({listener:t,external:!0===(null==n?void 0:n.external),once:!0===(null==n?void 0:n.once)})}_off(e,i){var n=this._listeners[e];if(n)for(let e=0,t=n.length;e<t;e++)if(n[e].listener===i)return void n.splice(e,1)}}class i extends(t.EventBus=d){dispatch(e,t){throw new Error("Not implemented: AutomationEventBus.dispatch")}}t.AutomationEventBus=i},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFCursorTools=t.CursorTool=void 0;var s=i(5),a=i(8),r=i(1);function o(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function l(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const h={SELECT:0,HAND:1,ZOOM:2};t.CursorTool=h;var d=new WeakSet,c=new WeakSet;function n(){this.eventBus.dispatch("cursortoolchanged",{source:this,tool:this.active})}function u(){this.eventBus._on("switchcursortool",e=>{this.switchTool(e.tool)});let t=s.AnnotationEditorType.NONE,i=r.PresentationModeState.NORMAL;const n=()=>{var e=this.active;this.switchTool(h.SELECT),this.previouslyActive??(this.previouslyActive=e)},a=()=>{var e=this.previouslyActive;null!==e&&t===s.AnnotationEditorType.NONE&&i===r.PresentationModeState.NORMAL&&(this.previouslyActive=null,this.switchTool(e))};this.eventBus._on("secondarytoolbarreset",e=>{null!==this.previouslyActive&&(t=s.AnnotationEditorType.NONE,i=r.PresentationModeState.NORMAL,a())}),this.eventBus._on("annotationeditormodechanged",e=>{e=e.mode;((t=e)===s.AnnotationEditorType.NONE?a:n)()}),this.eventBus._on("presentationmodechanged",e=>{e=e.state;(i=e)===r.PresentationModeState.NORMAL?a():e===r.PresentationModeState.FULLSCREEN&&n()})}t.PDFCursorTools=class{constructor(e){let{container:t,eventBus:i,cursorToolOnLoad:n=h.SELECT}=e;o(this,c),o(this,d),this.container=t,this.eventBus=i,this.active=h.SELECT,this.previouslyActive=null,this.handTool=new a.GrabToPan({element:this.container}),l(this,c,u).call(this),Promise.resolve().then(()=>{this.switchTool(n)})}get activeTool(){return this.active}switchTool(e){if(null===this.previouslyActive&&e!==this.active){var t=()=>{switch(this.active){case h.SELECT:break;case h.HAND:this.handTool.deactivate();break;case h.ZOOM:}};switch(e){case h.SELECT:t();break;case h.HAND:t(),this.handTool.activate();break;default:h.ZOOM;return void console.error(`switchTool: "${e}" is an unsupported value.`)}this.active=e,l(this,d,n).call(this)}}}},(e,t)=>{function i(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function n(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.GrabToPan=void 0;const a="grab-to-pan-grab";var s=new WeakSet,r=new WeakSet,o=new WeakSet;function l(e){if(0===e.button&&!this.ignoreTarget(e.target)){if(e.originalTarget)try{e.originalTarget.tagName}catch(e){return}this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=e.clientX,this.clientYStart=e.clientY,this.document.addEventListener("mousemove",this._onMouseMove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),e.preventDefault(),e.stopPropagation();var t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}}function h(e){var t;this.element.removeEventListener("scroll",this._endPan,!0),1&e.buttons?(t=e.clientX-this.clientXStart,e=e.clientY-this.clientYStart,e=this.scrollTopStart-e,t=this.scrollLeftStart-t,this.element.scrollTo?this.element.scrollTo({top:e,left:t,behavior:"instant"}):(this.element.scrollTop=e,this.element.scrollLeft=t),this.overlay.parentNode||document.body.append(this.overlay)):this._endPan()}function d(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onMouseMove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.remove()}t.GrabToPan=class{constructor(e){i(this,o),i(this,r),i(this,s),this.element=e.element,this.document=e.element.ownerDocument,"function"==typeof e.ignoreTarget&&(this.ignoreTarget=e.ignoreTarget),this.onActiveChanged=e.onActiveChanged,this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.toggle=this.toggle.bind(this),this._onMouseDown=n(this,s,l).bind(this),this._onMouseMove=n(this,r,h).bind(this),this._endPan=n(this,o,d).bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}activate(){var e;this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onMouseDown,!0),this.element.classList.add(a),null!=(e=this.onActiveChanged)&&e.call(this,!0))}deactivate(){var e;this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onMouseDown,!0),this._endPan(),this.element.classList.remove(a),null!=(e=this.onActiveChanged))&&e.call(this,!1)}toggle(){this.active?this.deactivate():this.activate()}ignoreTarget(e){return e.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorParams=void 0;var l=i(5);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}var a=new WeakSet;function s(e){let{editorFreeTextFontSize:n,editorFreeTextColor:a,editorInkColor:s,editorInkThickness:r,editorInkOpacity:o}=e;n.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.FREETEXT_SIZE,value:n.valueAsNumber})}),a.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.FREETEXT_COLOR,value:a.value})}),s.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_COLOR,value:s.value})}),r.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_THICKNESS,value:r.valueAsNumber})}),o.addEventListener("input",e=>{this.eventBus.dispatch("switchannotationeditorparams",{source:this,type:l.AnnotationEditorParamsType.INK_OPACITY,value:o.valueAsNumber})}),this.eventBus._on("annotationeditorparamschanged",e=>{for(var[t,i]of e.details)switch(t){case l.AnnotationEditorParamsType.FREETEXT_SIZE:n.value=i;break;case l.AnnotationEditorParamsType.FREETEXT_COLOR:a.value=i;break;case l.AnnotationEditorParamsType.INK_COLOR:s.value=i;break;case l.AnnotationEditorParamsType.INK_THICKNESS:r.value=i;break;case l.AnnotationEditorParamsType.INK_OPACITY:o.value=i}})}t.AnnotationEditorParams=class{constructor(e,t){n(this,a),this.eventBus=t,function(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}(this,a,s).call(this,e)}}},(e,t,i)=>{function n(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function a(e,t,i){t=r(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t){t=r(e,t,"get");return t.get?t.get.call(e):t.value}function r(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayManager=void 0;var o=new WeakMap,l=new WeakMap;t.OverlayManager=class{constructor(){n(this,o,{writable:!0,value:new WeakMap}),n(this,l,{writable:!0,value:null})}get active(){return s(this,l)}async register(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if("object"!=typeof e)throw new Error("Not enough parameters.");if(s(this,o).has(e))throw new Error("The overlay is already registered.");s(this,o).set(e,{canForceClose:t}),e.showModal||(i(11).registerDialog(e),this._dialogPolyfillCSS)||(this._dialogPolyfillCSS=!0,(t=document.createElement("style")).textContent="dialog {\n  position: absolute;\n  left: 0; right: 0;\n  width: -moz-fit-content;\n  width: -webkit-fit-content;\n  width: fit-content;\n  height: -moz-fit-content;\n  height: -webkit-fit-content;\n  height: fit-content;\n  margin: auto;\n  border: solid;\n  padding: 1em;\n  background: white;\n  color: black;\n  display: block;\n}\n\ndialog:not([open]) {\n  display: none;\n}\n\ndialog + .backdrop {\n  position: fixed;\n  top: 0; right: 0; bottom: 0; left: 0;\n  background: rgba(0,0,0,0.1);\n}\n\n._dialog_overlay {\n  position: fixed;\n  top: 0; right: 0; bottom: 0; left: 0;\n}\n\ndialog.fixed {\n  position: fixed;\n  top: 50%;\n  transform: translate(0, -50%);\n}",document.head.prepend(t)),e.addEventListener("cancel",e=>{a(this,l,null)})}async unregister(e){if(!s(this,o).has(e))throw new Error("The overlay does not exist.");if(s(this,l)===e)throw new Error("The overlay cannot be removed while it is active.");s(this,o).delete(e)}async open(e){if(!s(this,o).has(e))throw new Error("The overlay does not exist.");if(s(this,l)){if(s(this,l)===e)throw new Error("The overlay is already active.");if(!s(this,o).get(e).canForceClose)throw new Error("Another overlay is currently active.");await this.close()}a(this,l,e),e.showModal()}async close(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:s(this,l);if(!s(this,o).has(e))throw new Error("The overlay does not exist.");if(!s(this,l))throw new Error("The overlay is currently not active.");if(s(this,l)!==e)throw new Error("Another overlay is currently active.");e.close(),a(this,l,null)}}},e=>{e.exports=function(){"use strict";var n=window.CustomEvent;if(!n||typeof n==="object"){n=function e(t,i){i=i||{};var n=document.createEvent("CustomEvent");n.initCustomEvent(t,!!i.bubbles,!!i.cancelable,i.detail||null);return n};n.prototype=window.Event.prototype}function a(e,t){var i="on"+t.type.toLowerCase();if(typeof e[i]==="function")e[i](t);return e.dispatchEvent(t)}function e(e){while(e&&e!==document.body){var i=window.getComputedStyle(e);var t=function(e,t){return!(i[e]===undefined||i[e]===t)};if(i.opacity<1||t("zIndex","auto")||t("transform","none")||t("mixBlendMode","normal")||t("filter","none")||t("perspective","none")||i["isolation"]==="isolate"||i.position==="fixed"||i.webkitOverflowScrolling==="touch")return true;e=e.parentElement}return false}function r(e){while(e){if(e.localName==="dialog")return e;if(e.parentElement)e=e.parentElement;else if(e.parentNode)e=e.parentNode.host;else e=null}return null}function s(e){while(e&&e.shadowRoot&&e.shadowRoot.activeElement)e=e.shadowRoot.activeElement;if(e&&e.blur&&e!==document.body)e.blur()}function h(e,t){for(var i=0;i<e.length;++i)if(e[i]===t)return true;return false}function o(e){if(!e||!e.hasAttribute("method"))return false;return e.getAttribute("method").toLowerCase()==="dialog"}function l(e){var t=["button","input","keygen","select","textarea"];var i=t.map(function(e){return e+":not([disabled])"});i.push('[tabindex]:not([disabled]):not([tabindex=""])');var n=e.querySelector(i.join(", "));if(!n&&"attachShadow"in Element.prototype){var a=e.querySelectorAll("*");for(var s=0;s<a.length;s++)if(a[s].tagName&&a[s].shadowRoot){n=l(a[s].shadowRoot);if(n)break}}return n}function t(e){return e.isConnected||document.body.contains(e)}function d(e){if(e.submitter)return e.submitter;var t=e.target;if(!(t instanceof HTMLFormElement))return null;var i=u.formSubmitter;if(!i){var n=e.target;var a="getRootNode"in n&&n.getRootNode()||document;i=a.activeElement}if(!i||i.form!==t)return null;return i}function c(e){if(e.defaultPrevented)return;var t=e.target;var i=u.imagemapUseValue;var n=d(e);if(i===null&&n)i=n.value;var a=r(t);if(!a)return;var s=n&&n.getAttribute("formmethod")||t.getAttribute("method");if(s!=="dialog")return;e.preventDefault();if(i!=null)a.close(i);else a.close()}function i(i){this.dialog_=i;this.replacedStyleTop_=false;this.openAsModal_=false;if(!i.hasAttribute("role"))i.setAttribute("role","dialog");i.show=this.show.bind(this);i.showModal=this.showModal.bind(this);i.close=this.close.bind(this);i.addEventListener("submit",c,false);if(!("returnValue"in i))i.returnValue="";if("MutationObserver"in window){var e=new MutationObserver(this.maybeHideModal.bind(this));e.observe(i,{attributes:true,attributeFilter:["open"]})}else{var n=false;var a=function(){n?this.downgradeModal():this.maybeHideModal();n=false}.bind(this);var s;var t=function(e){if(e.target!==i)return;var t="DOMNodeRemoved";n|=e.type.substr(0,t.length)===t;window.clearTimeout(s);s=window.setTimeout(a,0)};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(e){i.addEventListener(e,t)})}Object.defineProperty(i,"open",{set:this.setOpen.bind(this),get:i.hasAttribute.bind(i,"open")});this.backdrop_=document.createElement("div");this.backdrop_.className="backdrop";this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this));this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this));this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}i.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){if(this.dialog_.hasAttribute("open")&&t(this.dialog_))return;this.downgradeModal()},downgradeModal:function(){if(!this.openAsModal_)return;this.openAsModal_=false;this.dialog_.style.zIndex="";if(this.replacedStyleTop_){this.dialog_.style.top="";this.replacedStyleTop_=false}this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_);u.dm.removeDialog(this)},setOpen:function(e){if(e)this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open","");else{this.dialog_.removeAttribute("open");this.maybeHideModal()}},backdropMouseEvent_:function(e){if(!this.dialog_.hasAttribute("tabindex")){var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild);t.tabIndex=-1;t.focus();this.dialog_.removeChild(t)}else this.dialog_.focus();var i=document.createEvent("MouseEvents");i.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget);this.dialog_.dispatchEvent(i);e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector("[autofocus]:not([disabled])");if(!e&&this.dialog_.tabIndex>=0)e=this.dialog_;if(!e)e=l(this.dialog_);s(document.activeElement);e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=e;this.backdrop_.style.zIndex=t},show:function(){if(!this.dialog_.open){this.setOpen(true);this.focus_()}},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!t(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!u.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");if(e(this.dialog_.parentElement))console.warn("A dialog is being shown inside a stacking context. "+"This may cause it to be unusable. For more information, see this link: "+"https://github.com/GoogleChrome/dialog-polyfill/#stacking-context");this.setOpen(true);this.openAsModal_=true;if(u.needsCentering(this.dialog_)){u.reposition(this.dialog_);this.replacedStyleTop_=true}else this.replacedStyleTop_=false;this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling);this.focus_()},close:function(e){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(false);if(e!==undefined)this.dialog_.returnValue=e;var t=new n("close",{bubbles:false,cancelable:false});a(this.dialog_,t)}};var u={reposition:function(e){var t=document.body.scrollTop||document.documentElement.scrollTop;var i=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,i)+"px"},isInlinePositionSetByStylesheet:function(e){for(var t=0;t<document.styleSheets.length;++t){var i=document.styleSheets[t];var n=null;try{n=i.cssRules}catch(e){}if(!n)continue;for(var a=0;a<n.length;++a){var s=n[a];var r=null;try{r=document.querySelectorAll(s.selectorText)}catch(e){}if(!r||!h(r,e))continue;var o=s.style.getPropertyValue("top");var l=s.style.getPropertyValue("bottom");if(o&&o!=="auto"||l&&l!=="auto")return true}}return false},needsCentering:function(e){var t=window.getComputedStyle(e);if(t.position!=="absolute")return false;if(e.style.top!=="auto"&&e.style.top!==""||e.style.bottom!=="auto"&&e.style.bottom!=="")return false;return!u.isInlinePositionSetByStylesheet(e)},forceRegisterDialog:function(e){if(window.HTMLDialogElement||e.showModal)console.warn("This browser already supports <dialog>, the polyfill "+"may not work correctly",e);if(e.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new i(e)},registerDialog:function(e){if(!e.showModal)u.forceRegisterDialog(e)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div");this.overlay.className="_dialog_overlay";this.overlay.addEventListener("click",function(e){this.forwardTab_=undefined;e.stopPropagation();t([])}.bind(this));this.handleKey_=this.handleKey_.bind(this);this.handleFocus_=this.handleFocus_.bind(this);this.zIndexLow_=1e5;this.zIndexHigh_=1e5+150;this.forwardTab_=undefined;if("MutationObserver"in window)this.mo_=new MutationObserver(function(e){var n=[];e.forEach(function(e){for(var t=0,i;i=e.removedNodes[t];++t){if(!(i instanceof Element))continue;else if(i.localName==="dialog")n.push(i);n=n.concat(i.querySelectorAll("dialog"))}});n.length&&t(n)})}};if(u.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,true);document.addEventListener("keydown",this.handleKey_);this.mo_&&this.mo_.observe(document,{childList:true,subtree:true})},u.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,true);document.removeEventListener("keydown",this.handleKey_);this.mo_&&this.mo_.disconnect()},u.DialogManager.prototype.updateStacking=function(){var e=this.zIndexHigh_;for(var t=0,i;i=this.pendingDialogStack[t];++t){i.updateZIndex(--e,--e);if(t===0)this.overlay.style.zIndex=--e}var n=this.pendingDialogStack[0];if(n){var a=n.dialog.parentNode||document.body;a.appendChild(this.overlay)}else if(this.overlay.parentNode)this.overlay.parentNode.removeChild(this.overlay)},u.DialogManager.prototype.containedByTopDialog_=function(e){while(e=r(e)){for(var t=0,i;i=this.pendingDialogStack[t];++t)if(i.dialog===e)return t===0;e=e.parentElement}return false},u.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(this.containedByTopDialog_(t))return;if(document.activeElement===document.documentElement)return;e.preventDefault();e.stopPropagation();s(t);if(this.forwardTab_===undefined)return;var i=this.pendingDialogStack[0];var n=i.dialog;var a=n.compareDocumentPosition(t);if(a&Node.DOCUMENT_POSITION_PRECEDING)if(this.forwardTab_)i.focus_();else if(t!==document.documentElement)document.documentElement.focus();return false},u.DialogManager.prototype.handleKey_=function(e){this.forwardTab_=undefined;if(e.keyCode===27){e.preventDefault();e.stopPropagation();var t=new n("cancel",{bubbles:false,cancelable:true});var i=this.pendingDialogStack[0];if(i&&a(i.dialog,t))i.dialog.close()}else if(e.keyCode===9)this.forwardTab_=!e.shiftKey},u.DialogManager.prototype.checkDOM_=function(t){var e=this.pendingDialogStack.slice();e.forEach(function(e){if(t.indexOf(e.dialog)!==-1)e.downgradeModal();else e.maybeHideModal()})},u.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;if(this.pendingDialogStack.length>=t)return false;if(this.pendingDialogStack.unshift(e)===1)this.blockDocument();this.updateStacking();return true},u.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);if(t===-1)return;this.pendingDialogStack.splice(t,1);if(this.pendingDialogStack.length===0)this.unblockDocument();this.updateStacking()},u.dm=new u.DialogManager,u.formSubmitter=null,u.imagemapUseValue=null,window.HTMLDialogElement===undefined){var p=document.createElement("form");p.setAttribute("method","dialog");if(p.method!=="dialog"){var g=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(g){var f=g.get;g.get=function(){if(o(this))return"dialog";return f.call(this)};var m=g.set;g.set=function(e){if(typeof e==="string"&&e.toLowerCase()==="dialog")return this.setAttribute("method",e);return m.call(this,e)};Object.defineProperty(HTMLFormElement.prototype,"method",g)}}document.addEventListener("click",function(e){u.formSubmitter=null;u.imagemapUseValue=null;if(e.defaultPrevented)return;var t=e.target;if("composedPath"in e){var i=e.composedPath();t=i.shift()||t}if(!t||!o(t.form))return;var n=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!n){if(!(t.localName==="input"&&t.type==="image"))return;u.imagemapUseValue=e.offsetX+","+e.offsetY}var a=r(t);if(!a)return;u.formSubmitter=t},false);document.addEventListener("submit",function(e){var t=e.target;var i=r(t);if(i)return;var n=d(e);var a=n&&n.getAttribute("formmethod")||t.getAttribute("method");if(a==="dialog")e.preventDefault()});var v=HTMLFormElement.prototype.submit;var w=function(){if(!o(this))return v.call(this);var e=r(this);e&&e.close()};HTMLFormElement.prototype.submit=w}return u}()},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordPrompt=void 0;var n=i(5);function a(e,t){r(e,t),t.add(e)}function s(e,t,i){r(e,t),t.set(e,i)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,i){t=h(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function l(e,t){t=h(e,t,"get");return t.get?t.get.call(e):t.value}function h(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var c=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakSet,f=new WeakSet,m=new WeakSet;function v(){var e=this.input.value;0<(null==e?void 0:e.length)&&d(this,m,_).call(this,e)}function w(){d(this,m,_).call(this,new Error("PasswordPrompt cancelled.")),l(this,c).resolve()}function _(e){l(this,u)&&(this.close(),this.input.value="",l(this,u).call(this,e),o(this,u,null))}t.PasswordPrompt=class{constructor(e,t,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];a(this,m),a(this,f),a(this,g),s(this,c,{writable:!0,value:null}),s(this,u,{writable:!0,value:null}),s(this,p,{writable:!0,value:null}),this.dialog=e.dialog,this.label=e.label,this.input=e.input,this.submitButton=e.submitButton,this.cancelButton=e.cancelButton,this.overlayManager=t,this.l10n=i,this._isViewerEmbedded=n,this.submitButton.addEventListener("click",d(this,g,v).bind(this)),this.cancelButton.addEventListener("click",this.close.bind(this)),this.input.addEventListener("keydown",e=>{13===e.keyCode&&d(this,g,v).call(this)}),this.overlayManager.register(this.dialog,!0),this.dialog.addEventListener("close",d(this,f,w).bind(this))}async open(){l(this,c)&&await l(this,c).promise,o(this,c,(0,n.createPromiseCapability)());try{await this.overlayManager.open(this.dialog)}catch(e){throw o(this,c,null),e}var e=l(this,p)===n.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!e||this.input.focus(),this.label.textContent=await this.l10n.get("password_"+(e?"invalid":"label"))}async close(){this.overlayManager.active===this.dialog&&this.overlayManager.close(this.dialog)}async setUpdateCallback(e,t){l(this,c)&&await l(this,c).promise,o(this,u,e),o(this,p,t)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFAttachmentViewer=void 0;var h=i(5),n=i(14),a=i(6);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}var r=new WeakSet;class o extends n.BaseTreeViewer{constructor(e){super(e),s(this,r),this.downloadManager=e.downloadManager,this.eventBus._on("fileattachmentannotation",function(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}(this,r,l).bind(this))}reset(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];super.reset(),this._attachments=null,e||(this._renderedCapability=(0,h.createPromiseCapability)()),this._pendingDispatchEvent=!1}async _dispatchEvent(e){this._renderedCapability.resolve(),(0!==e||this._pendingDispatchEvent||(this._pendingDispatchEvent=!0,await(0,a.waitOnEventOrTimeout)({target:this.eventBus,name:"annotationlayerrendered",delay:1e3}),this._pendingDispatchEvent))&&(this._pendingDispatchEvent=!1,this.eventBus.dispatch("attachmentsloaded",{source:this,attachmentsCount:e}))}_bindLink(e,t){let{content:i,filename:n}=t;e.onclick=()=>(this.downloadManager.openOrDownloadData(e,i,n),!1)}render(t){var{attachments:i,keepRenderedCapability:t=!1}=t;if(this._attachments&&this.reset(t),this._attachments=i||null,i){var t=Object.keys(i).sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),n=document.createDocumentFragment();let e=0;for(const l of t){var a=i[l],s=a.content,a=(0,h.getFilenameFromUrl)(a.filename),r=document.createElement("div"),o=(r.className="treeItem",document.createElement("a"));this._bindLink(o,{content:s,filename:a}),o.textContent=this._normalizeTextContent(a),r.append(o),n.append(r),e++}this._finishRendering(n,e)}else this._dispatchEvent(0)}}function l(e){let{filename:i,content:n}=e;const a=this._renderedCapability.promise;a.then(()=>{if(a===this._renderedCapability.promise){var e=this._attachments||Object.create(null);for(const t in e)if(i===t)return;e[i]={filename:i,content:n},this.render({attachments:e,keepRenderedCapability:!0})}})}t.PDFAttachmentViewer=o},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTreeViewer=void 0;var n=i(1);const a="selected";t.BaseTreeViewer=class s{constructor(e){if(this.constructor===s)throw new Error("Cannot initialize BaseTreeViewer.");this.container=e.container,this.eventBus=e.eventBus,this.reset()}reset(){this._pdfDocument=null,this._lastToggleIsShow=!0,this._currentTreeItem=null,this.container.textContent="",this.container.classList.remove("treeWithDeepNesting")}_dispatchEvent(e){throw new Error("Not implemented: _dispatchEvent")}_bindLink(e,t){throw new Error("Not implemented: _bindLink")}_normalizeTextContent(e){return(0,n.removeNullCharacters)(e,!0)||"–"}_addToggleButton(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];const i=document.createElement("div");i.className="treeItemToggler",e&&i.classList.add("treeItemsHidden"),i.onclick=e=>{e.stopPropagation(),i.classList.toggle("treeItemsHidden"),e.shiftKey&&(e=!i.classList.contains("treeItemsHidden"),this._toggleTreeItem(t,e))},t.prepend(i)}_toggleTreeItem(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this._lastToggleIsShow=t;for(const i of e.querySelectorAll(".treeItemToggler"))i.classList.toggle("treeItemsHidden",!t)}_toggleAllTreeItems(){this._toggleTreeItem(this.container,!this._lastToggleIsShow)}_finishRendering(e,t){2<arguments.length&&void 0!==arguments[2]&&arguments[2]&&(this.container.classList.add("treeWithDeepNesting"),this._lastToggleIsShow=!e.querySelector(".treeItemsHidden")),this.container.append(e),this._dispatchEvent(t)}render(e){throw new Error("Not implemented: render")}_updateCurrentTreeItem(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;this._currentTreeItem&&(this._currentTreeItem.classList.remove(a),this._currentTreeItem=null),e&&(e.classList.add(a),this._currentTreeItem=e)}_scrollToCurrentTreeItem(t){if(t){let e=t.parentNode;for(;e&&e!==this.container;){var i;e.classList.contains("treeItem")&&null!=(i=e.firstElementChild)&&i.classList.remove("treeItemsHidden"),e=e.parentNode}this._updateCurrentTreeItem(t),this.container.scrollTo(t.offsetLeft,t.offsetTop+-100)}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocumentProperties=void 0;var n=i(5),d=i(1);function c(e,t){u(e,t),t.add(e)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function g(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function f(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const m=["en-us","en-lr","my"],l={"8.5x11":"Letter","8.5x14":"Legal"},h={"297x420":"A3","210x297":"A4"};function v(e,t,i){return i[(t?e.width:e.height)+"x"+(t?e.height:e.width)]}var w=new WeakMap,_=new WeakSet,b=new WeakSet,y=new WeakSet,P=new WeakSet,E=new WeakSet,S=new WeakSet;function L(){this.pdfDocument=null,p(this,w,null),this._dataAvailableCapability=(0,n.createPromiseCapability)(),this._currentPageNumber=1,this._pagesRotation=0}function C(){if(0<arguments.length&&void 0!==arguments[0]&&arguments[0]||!g(this,w))for(const t in this.fields)this.fields[t].textContent="-";else if(this.overlayManager.active===this.dialog)for(const i in this.fields){var e=g(this,w)[i];this.fields[i].textContent=e||0===e?e:"-"}}async function T(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=e/1024,i=t/1024;if(t)return this.l10n.get("document_properties_"+(1<=i?"mb":"kb"),{size_mb:1<=i&&(+i.toPrecision(3)).toLocaleString(),size_kb:i<1&&(+t.toPrecision(3)).toLocaleString(),size_b:e.toLocaleString()})}async function M(n,a){if(n){a%180!=0&&(n={width:n.height,height:n.width});a=(0,d.isPortraitOrientation)(n);let e={width:Math.round(100*n.width)/100,height:Math.round(100*n.height)/100},t={width:Math.round(25.4*n.width*10)/10,height:Math.round(25.4*n.height*10)/10},i=v(e,a,l)||v(t,a,h);i||Number.isInteger(t.width)&&Number.isInteger(t.height)||(n={width:25.4*n.width,height:25.4*n.height},s={width:Math.round(t.width),height:Math.round(t.height)},Math.abs(n.width-s.width)<.1&&Math.abs(n.height-s.height)<.1&&(i=v(s,a,h))&&(e={width:Math.round(s.width/25.4*100)/100,height:Math.round(s.height/25.4*100)/100},t=s));var[{width:n,height:s},a,r,o]=await Promise.all([this._isNonMetricLocale?e:t,this.l10n.get("document_properties_page_size_unit_"+(this._isNonMetricLocale?"inches":"millimeters")),i&&this.l10n.get("document_properties_page_size_name_"+i.toLowerCase()),this.l10n.get("document_properties_page_size_orientation_"+(a?"portrait":"landscape"))]);return this.l10n.get(`document_properties_page_size_dimension_${r?"name_":""}string`,{width:n.toLocaleString(),height:s.toLocaleString(),unit:a,name:r,orientation:o})}}async function I(e){e=n.PDFDateString.toDateObject(e);if(e)return this.l10n.get("document_properties_date_string",{date:e.toLocaleDateString(),time:e.toLocaleTimeString()})}function A(e){return this.l10n.get("document_properties_linearized_"+(e?"yes":"no"))}t.PDFDocumentProperties=class{constructor(e,t,i,n,a){var s,r,o,{dialog:e,fields:l,closeButton:h}=e;c(this,S),c(this,E),c(this,P),c(this,y),c(this,b),c(this,_),o={writable:!0,value:null},u(s=this,r=w),r.set(s,o),this.dialog=e,this.fields=l,this.overlayManager=t,this.l10n=n,this._fileNameLookup=a,f(this,_,L).call(this),h.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),i._on("pagechanging",e=>{this._currentPageNumber=e.pageNumber}),i._on("rotationchanging",e=>{this._pagesRotation=e.pagesRotation}),this._isNonMetricLocale=!0,n.getLanguage().then(e=>{this._isNonMetricLocale=m.includes(e)})}async open(){await Promise.all([this.overlayManager.open(this.dialog),this._dataAvailableCapability.promise]);var e,t,i,n,a,s,r,o,l=this._currentPageNumber;const h=this._pagesRotation;g(this,w)&&l===g(this,w)._currentPageNumber&&h===g(this,w)._pagesRotation?f(this,b,C).call(this):({info:e,contentLength:t}=await this.pdfDocument.getMetadata(),[r,o,i,n,a,s]=await Promise.all([this._fileNameLookup(),f(this,y,T).call(this,t),f(this,E,I).call(this,e.CreationDate),f(this,E,I).call(this,e.ModDate),this.pdfDocument.getPage(l).then(e=>f(this,P,M).call(this,(0,d.getPageSizeInches)(e),h)),f(this,S,A).call(this,e.IsLinearized)]),p(this,w,Object.freeze({fileName:r,fileSize:o,title:e.Title,author:e.Author,subject:e.Subject,keywords:e.Keywords,creationDate:i,modificationDate:n,creator:e.Creator,producer:e.Producer,version:e.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:a,linearized:s,_currentPageNumber:l,_pagesRotation:h})),f(this,b,C).call(this),r=(await this.pdfDocument.getDownloadInfo()).length,t!==r&&((o=Object.assign(Object.create(null),g(this,w))).fileSize=await f(this,y,T).call(this,r),p(this,w,Object.freeze(o)),f(this,b,C).call(this)))}async close(){this.overlayManager.close(this.dialog)}setDocument(e){this.pdfDocument&&(f(this,_,L).call(this),f(this,b,C).call(this,!0)),e&&(this.pdfDocument=e,this._dataAvailableCapability.resolve())}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindBar=void 0;var s=i(17);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function r(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var o=new WeakSet;function l(){var e;this.opened&&(this.bar.classList.remove("wrapContainers"),e=this.bar.clientHeight,this.bar.firstElementChild.clientHeight<e)&&this.bar.classList.add("wrapContainers")}t.PDFFindBar=class{constructor(e,t,i){n(this,o),this.opened=!1,this.bar=e.bar,this.toggleButton=e.toggleButton,this.findField=e.findField,this.highlightAll=e.highlightAllCheckbox,this.caseSensitive=e.caseSensitiveCheckbox,this.matchDiacritics=e.matchDiacriticsCheckbox,this.entireWord=e.entireWordCheckbox,this.findMsg=e.findMsg,this.findResultsCount=e.findResultsCount,this.findPreviousButton=e.findPreviousButton,this.findNextButton=e.findNextButton,this.eventBus=t,this.l10n=i,this.toggleButton.addEventListener("click",()=>{this.toggle()}),this.findField.addEventListener("input",()=>{this.dispatchEvent("")}),this.bar.addEventListener("keydown",e=>{switch(e.keyCode){case 13:e.target===this.findField&&this.dispatchEvent("again",e.shiftKey);break;case 27:this.close()}}),this.findPreviousButton.addEventListener("click",()=>{this.dispatchEvent("again",!0)}),this.findNextButton.addEventListener("click",()=>{this.dispatchEvent("again",!1)}),this.highlightAll.addEventListener("click",()=>{this.dispatchEvent("highlightallchange")}),this.caseSensitive.addEventListener("click",()=>{this.dispatchEvent("casesensitivitychange")}),this.entireWord.addEventListener("click",()=>{this.dispatchEvent("entirewordchange")}),this.matchDiacritics.addEventListener("click",()=>{this.dispatchEvent("diacriticmatchingchange")}),this.eventBus._on("resize",r(this,o,l).bind(this))}reset(){this.updateUIState()}dispatchEvent(e){this.eventBus.dispatch("find",{source:this,type:e,query:this.findField.value,phraseSearch:!0,caseSensitive:this.caseSensitive.checked,entireWord:this.entireWord.checked,highlightAll:this.highlightAll.checked,findPrevious:1<arguments.length&&void 0!==arguments[1]&&arguments[1],matchDiacritics:this.matchDiacritics.checked})}updateUIState(e,t,i){let n=Promise.resolve(""),a="";switch(e){case s.FindState.FOUND:break;case s.FindState.PENDING:a="pending";break;case s.FindState.NOT_FOUND:n=this.l10n.get("find_not_found"),a="notFound";break;case s.FindState.WRAPPED:n=this.l10n.get("find_reached_"+(t?"top":"bottom"))}this.findField.setAttribute("data-status",a),this.findField.setAttribute("aria-invalid",e===s.FindState.NOT_FOUND),n.then(e=>{this.findMsg.textContent=e,r(this,o,l).call(this)}),this.updateResultsCount(i)}updateResultsCount(){var{current:e=0,total:t=0}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};let i=Promise.resolve("");(i=0<t?1e3<t?this.l10n.get("find_match_count_limit",{limit:1e3}):this.l10n.get("find_match_count",{current:e,total:t}):i).then(e=>{this.findResultsCount.textContent=e,r(this,o,l).call(this)})}open(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.bar.classList.remove("hidden")),this.findField.select(),this.findField.focus(),r(this,o,l).call(this)}close(){this.opened&&(this.opened=!1,this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"),this.bar.classList.add("hidden"),this.eventBus.dispatch("findbarclose",{source:this}))}toggle(){this.opened?this.close():this.open()}}},(n,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFindController=e.FindState=void 0;var h=t(1),i=t(5),r=t(18);function s(e,t){o(e,t),t.add(e)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){t=function(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}(e,t,"get");return t.get?t.get.call(e):t.value}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const a={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3},b=(e.FindState=a,{"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"}),c=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),V=[...c.values()].map(e=>String.fromCharCode(e)).join(""),F=/\p{M}+/gu,R=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,W=/([^\p{M}])\p{M}*$/u,U=/^\p{M}*([^\p{M}])/u,H=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,y=new Map,z="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]";let P=null,E=null;function u(e){const c=[];let i;for(;null!==(i=H.exec(e));){let t=i["index"];for(const s of i[0]){let e=y.get(s);e||(e=s.normalize("NFD").length,y.set(s,e)),c.push([e,t++])}}let t;var n;t=0===c.length&&P?P:0<c.length&&E?E:(n=`([${Object.keys(b).join("")}])|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(\\p{Ideographic}\\n)|(\\n)`,0===c.length?P=new RegExp(n+"|(\\u0000)","gum"):E=new RegExp(n+`|(${z})`,"gum"));const u=[];for(;null!==(i=F.exec(e));)u.push([i[0].length,i.index]);let a=e.normalize("NFD");const p=[[0,0]];let g=0,f=0,m=0,v=0,w=0,_=!1;return a=a.replace(t,(e,i,n,t,a,s,r,o)=>{if(o-=v,i){var i=b[e],l=i.length;for(let e=1;e<l;e++)p.push([o-m+e,m-e]);return m-=l-1,i}if(n){var h,e=n.endsWith("\n"),i=e?n.length-2:n.length;_=!0;let t=i;o+w===(null==(h=u[g])?void 0:h[1])&&(t-=u[g][0],++g);for(let e=1;e<=t;e++)p.push([o-1-m+e,m-e]);return m-=t,v+=t,e?(o+=i-1,p.push([o-m+1,1+m]),m+=1,v+=1,w+=1,n.slice(0,i)):n}if(t)return p.push([o-m+1,1+m]),m+=1,v+=1,w+=1,t.charAt(0);if(a)return p.push([o-m+1,m]),v+=1,w+=1,a.charAt(0);if(s)return p.push([o-m+1,m-1]),--m,v+=1,w+=1," ";if(o+w===(null==(h=c[f])?void 0:h[1])){var d=c[f][0]-1;++f;for(let e=1;e<=d;e++)p.push([o-(m-e),m-e]);m-=d,v+=d}return r}),p.push([a.length,m]),[a,p,_]}var p=new WeakSet,g=new WeakSet,f=new WeakMap,m=new WeakSet,v=new WeakSet,w=new WeakSet,_=new WeakSet,j=new WeakSet,G=new WeakSet,S=new WeakSet,L=new WeakSet,C=new WeakSet,K=new WeakSet,T=new WeakSet,M=new WeakSet,I=new WeakSet,$=new WeakSet,A=new WeakSet,X=new WeakSet,k=new WeakSet;function Z(e){if(e){const i=this._pdfDocument,n=e["type"];null!==this._state&&!d(this,m,Y).call(this,e)||(this._dirtyMatch=!0),this._state=e,"highlightallchange"!==n&&d(this,k,O).call(this,a.PENDING),this._firstPageCapability.promise.then(()=>{var e,t;!this._pdfDocument||i&&this._pdfDocument!==i||(d(this,G,ne).call(this),e=!this._highlightMatches,t=!!this._findTimeout,this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),n?this._dirtyMatch?d(this,C,x).call(this):"again"===n?(d(this,C,x).call(this),e&&this._state.highlightAll&&d(this,L,N).call(this)):("highlightallchange"===n?(t?d(this,C,x).call(this):this._highlightMatches=!0,d(this,L,N)):d(this,C,x)).call(this):this._findTimeout=setTimeout(()=>{d(this,C,x).call(this),this._findTimeout=null},250))})}}function Q(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,i.createPromiseCapability)()}function q(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,[this._normalizedQuery]=u(this._state.query)),this._normalizedQuery}function Y(e){if(e.query===this._state.query)switch(e.type){case"again":var t=this._selected.pageIdx+1,i=this._linkService;return 1<=t&&t<=i.pagesCount&&t!==i.page&&!i.isPageVisible(t)?!0:!1;case"highlightallchange":return!1}return!0}function J(e,t,i){let n=e.slice(0,t).match(W);if(n){var a=e.charCodeAt(t),s=n[1].charCodeAt(0);if((0,r.getCharacterType)(a)===(0,r.getCharacterType)(s))return!1}if(n=e.slice(t+i).match(U)){a=e.charCodeAt(t+i-1),s=n[1].charCodeAt(0);if((0,r.getCharacterType)(a)===(0,r.getCharacterType)(s))return!1}return!0}function ee(e,t,i,n){for(var a,s,r=[],o=[],l=this._pageDiffs[i];null!==(a=e.exec(n));)t&&!d(this,v,J).call(this,n,a.index,a[0].length)||([a,s]=function(e,t,i){if(!e)return[t,i];const n=t,a=t+i;let s=(0,h.binarySearchFirstItem)(e,e=>e[0]>=n),r=(e[s][0]>n&&--s,(0,h.binarySearchFirstItem)(e,e=>e[0]>=a,s));return e[r][0]>a&&--r,[n+e[s][1],i+e[r][1]-e[s][1]]}(l,a.index,a[0].length),s&&(r.push(a),o.push(s)));this._pageMatches[i]=r,this._pageMatchesLength[i]=o}function te(e,r){const o=this._state["matchDiacritics"];let l=!1;return(e=e.replace(R,(e,t,i,n,a,s)=>t?`[ ]*\\${t}[ ]*`:i?`[ ]*${i}[ ]*`:n?"[ ]+":o?a||s:a?c.has(a.charCodeAt(0))?a:"":r?(l=!0,s+"\\p{M}*"):s)).endsWith("[ ]*")&&(e=e.slice(0,e.length-"[ ]*".length)),o&&r&&(l=!0,e=`${e}(?=[${V}]|[^\\p{M}]|$)`),[l,e]}function ie(e){let t=l(this,f);if(0!==t.length){var{caseSensitive:n,entireWord:a,phraseSearch:s}=this._state,r=this._pageContents[e];const o=this._hasDiacritics[e];let i=!1;s?[i,t]=d(this,_,te).call(this,t,o):(s=t.match(/\S+/g))&&(t=s.sort().reverse().map(e=>{var[e,t]=d(this,_,te).call(this,e,o);return i=i||e,`(${t})`}).join("|"));s="g"+(i?"u":"")+(n?"":"i"),n=(t=new RegExp(t,s),d(this,w,ee).call(this,t,a,e,r),this._state.highlightAll&&d(this,S,D).call(this,e),this._resumePageIdx===e&&(this._resumePageIdx=null,d(this,T,se).call(this)),this._pageMatches[e].length);0<n&&(this._matchesCountTotal+=n,d(this,X,he).call(this))}}function ne(){if(!(0<this._extractTextPromises.length)){let t=Promise.resolve();for(let n=0,e=this._linkService.pagesCount;n<e;n++){const a=(0,i.createPromiseCapability)();this._extractTextPromises[n]=a.promise,t=t.then(()=>this._pdfDocument.getPage(n+1).then(e=>e.getTextContent()).then(e=>{var t=[];for(const i of e.items)t.push(i.str),i.hasEOL&&t.push("\n");[this._pageContents[n],this._pageDiffs[n],this._hasDiacritics[n]]=u(t.join("")),a.resolve()},e=>{console.error("Unable to get text content for page "+(n+1),e),this._pageContents[n]="",this._pageDiffs[n]=null,this._hasDiacritics[n]=!1,a.resolve()}))}}}function D(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}function N(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}function x(){var e=this._state.findPrevious,t=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,d(this,L,N).call(this);for(let e=0;e<i;e++)this._pendingFindMatches.has(e)||(this._pendingFindMatches.add(e),this._extractTextPromises[e].then(()=>{this._pendingFindMatches.delete(e),d(this,j,ie).call(this,e)}))}if(""===l(this,f))d(this,k,O).call(this,a.FOUND);else if(!this._resumePageIdx){t=this._offset;if(this._pagesToSearch=i,null!==t.matchIdx){var n=this._pageMatches[t.pageIdx].length;if(!e&&t.matchIdx+1<n||e&&0<t.matchIdx)return t.matchIdx=e?t.matchIdx-1:t.matchIdx+1,void d(this,I,B).call(this,!0);d(this,M,re).call(this,e)}d(this,T,se).call(this)}}function ae(e){var t=this._offset,e=e.length,i=this._state.findPrevious;return e?(t.matchIdx=i?e-1:0,d(this,I,B).call(this,!0),!0):(d(this,M,re).call(this,i),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(d(this,I,B).call(this,!1),!0))}function se(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let e=null;do{var t=this._offset.pageIdx;if(!(e=this._pageMatches[t])){this._resumePageIdx=t;break}}while(!d(this,K,ae).call(this,e))}function re(e){var t=this._offset,i=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=i||t.pageIdx<0)&&(t.pageIdx=e?i-1:0,t.wrapped=!0)}function B(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];let t=a.NOT_FOUND;var i=this._offset.wrapped;this._offset.wrapped=!1,e&&(e=this._selected.pageIdx,this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=i?a.WRAPPED:a.FOUND,-1!==e)&&e!==this._selected.pageIdx&&d(this,S,D).call(this,e),d(this,k,O).call(this,t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,d(this,S,D).call(this,this._selected.pageIdx))}function oe(e){const t=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),d(this,k,O).call(this,a.FOUND),this._highlightMatches=!1,d(this,L,N).call(this))})}function le(){var t,{pageIdx:i,matchIdx:e}=this._selected;let n=0,a=this._matchesCountTotal;if(-1!==e){for(let e=0;e<i;e++)n+=(null==(t=this._pageMatches[e])?void 0:t.length)||0;n+=e+1}return{current:n=n<1||n>a?a=0:n,total:a}}function he(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:d(this,A,le).call(this)})}function O(e){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:1<arguments.length&&void 0!==arguments[1]&&arguments[1],matchesCount:d(this,A,le).call(this),rawQuery:(null==(e=this._state)?void 0:e.query)??null})}e.PDFFindController=class{constructor(e){var t,i,n,{linkService:e,eventBus:a}=e;s(this,k),s(this,X),s(this,A),s(this,$),s(this,I),s(this,M),s(this,T),s(this,K),s(this,C),s(this,L),s(this,S),s(this,G),s(this,j),s(this,_),s(this,w),s(this,v),s(this,m),n={get:q,set:void 0},o(t=this,i=f),i.set(t,n),s(this,g),s(this,p),this._linkService=e,this._eventBus=a,d(this,g,Q).call(this),a._on("find",d(this,p,Z).bind(this)),a._on("findbarclose",d(this,$,oe).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(e){this._pdfDocument&&d(this,g,Q).call(this),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}scrollMatchIntoView(e){var{element:e=null,selectedLeft:t=0,pageIndex:i=-1,matchIndex:n=-1}=e;this._scrollMatches&&e&&-1!==n&&n===this._selected.matchIdx&&-1!==i&&i===this._selected.pageIdx&&(this._scrollMatches=!1,h.scrollIntoView)(e,{top:-50,left:t+-400},!0)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterType=void 0,t.getCharacterType=function(e){if(e<11904){if(0==(65408&e))return function(e){return 32===e||9===e||13===e||10===e}(e)?i.SPACE:function(e){return 97<=e&&e<=122||65<=e&&e<=90}(e)||function(e){return 48<=e&&e<=57}(e)||95===e?i.ALPHA_LETTER:i.PUNCT;if(3584==(65408&e))return i.THAI_LETTER;if(160===e)return i.SPACE}else{if(function(e){return 13312<=e&&e<=40959||63744<=e&&e<=64255}(e))return i.HAN_LETTER;if(function(e){return 12448<=e&&e<=12543}(e))return i.KATAKANA_LETTER;if(function(e){return 12352<=e&&e<=12447}(e))return i.HIRAGANA_LETTER;if(function(e){return 65376<=e&&e<=65439}(e))return i.HALFWIDTH_KATAKANA_LETTER}return i.ALPHA_LETTER};const i={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};t.CharacterType=i},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFHistory=void 0,t.isDestArraysEqual=o,t.isDestHashesEqual=a;var s=i(1),n=i(6);function r(){return document.location.hash}function a(e,t){return"string"==typeof e&&"string"==typeof t&&(e===t||(0,s.parseQueryString)(e).get("nameddest")===t)}function o(i,n){if(!Array.isArray(i)||!Array.isArray(n))return!1;if(i.length!==n.length)return!1;for(let e=0,t=i.length;e<t;e++)if(!function e(t,i){if(typeof t==typeof i&&!Array.isArray(t)&&!Array.isArray(i)){if(null===t||"object"!=typeof t||null===i)return t===i||Number.isNaN(t)&&Number.isNaN(i);if(Object.keys(t).length===Object.keys(i).length){for(const n in t)if(!e(t[n],i[n]))return;return 1}}}(i[e],n[e]))return!1;return!0}t.PDFHistory=class{constructor(e){var{linkService:e,eventBus:t}=e;this.linkService=e,this.eventBus=t,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",e=>{this._isPagesLoaded=!!e.pagesCount},{once:!0})})}initialize(e){var{fingerprint:e,resetHistory:t=!1,updateUrl:i=!1}=e;if(e&&"string"==typeof e){this._initialized&&this.reset();var n,a,s=""!==this._fingerprint&&this._fingerprint!==e,e=(this._fingerprint=e,this._updateUrl=!0===i,this._initialized=!0,this._bindEvents(),window.history.state);if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=r(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(e,!0)||t)return{hash:i,page:n,rotation:a}=this._parseCurrentHash(!0),!i||s||t?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:i,page:n,rotation:a},!0);s=e.destination;this._updateInternalState(s,e.uid,!0),void 0!==s.rotation&&(this._initialRotation=s.rotation),s.dest?(this._initialBookmark=JSON.stringify(s.dest),this._destination.page=null):s.hash?this._initialBookmark=s.hash:s.page&&(this._initialBookmark="page="+s.page)}else console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push(t){var{namedDest:t=null,explicitDest:i,pageNumber:n}=t;if(this._initialized)if(t&&"string"!=typeof t)console.error("PDFHistory.push: "+`"${t}" is not a valid namedDest parameter.`);else if(Array.isArray(i))if(this._isValidPage(n)||null===n&&!this._destination){t=t||JSON.stringify(i);if(t){let e=!1;if(this._destination&&(a(this._destination.hash,t)||o(this._destination.dest,i))){if(this._destination.page)return;e=!0}this._popStateInProgress&&!e||(this._pushOrReplaceState({dest:i,hash:t,page:n,rotation:this.linkService.rotation},e),this._popStateInProgress)||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))}}else console.error("PDFHistory.push: "+`"${n}" is not a valid pageNumber parameter.`);else console.error("PDFHistory.push: "+`"${i}" is not a valid explicitDest parameter.`)}pushPage(e){var t;this._initialized&&(this._isValidPage(e)?(null==(t=this._destination)?void 0:t.page)===e||this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:"page="+e,page:e,rotation:this.linkService.rotation}),this._popStateInProgress)||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})):console.error(`PDFHistory.pushPage: "${e}" is not a valid page number.`))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){var e;this._initialized&&!this._popStateInProgress&&(e=window.history.state,this._isValidState(e))&&0<e.uid&&window.history.back()}forward(){var e;this._initialized&&!this._popStateInProgress&&(e=window.history.state,this._isValidState(e))&&e.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||0<this._blockHashChange)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(e){var t,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1]||!this._destination,n={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:e};this._updateInternalState(e,n.uid);let a;this._updateUrl&&null!=e&&e.hash&&((t=document.location.href.split("#")[0]).startsWith("file://")||(a=t+"#"+e.hash)),i?window.history.replaceState(n,"",a):window.history.pushState(n,"",a)}_tryPushCurrentPosition(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this._position){let t=this._position;if(e&&((t=Object.assign(Object.create(null),this._position)).temporary=!0),this._destination){if(this._destination.temporary)this._pushOrReplaceState(t,!0);else if(this._destination.hash!==t.hash&&(this._destination.page||!(this._numPositionUpdates<=50))){let e=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(void 0!==this._destination.dest||!this._destination.first)return;e=!0}this._pushOrReplaceState(t,e)}}else this._pushOrReplaceState(t)}}_isValidPage(e){return Number.isInteger(e)&&0<e&&e<=this.linkService.pagesCount}_isValidState(e){if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!(1<arguments.length&&void 0!==arguments[1]&&arguments[1]))return!1;if("string"!=typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;var[t]=performance.getEntriesByType("navigation");if("reload"!==(null==t?void 0:t.type))return!1}return!(!Number.isInteger(e.uid)||e.uid<0)&&null!==e.destination&&"object"==typeof e.destination}_updateInternalState(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&null!=e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._maxUid=Math.max(this._maxUid,t),this._numPositionUpdates=0}_parseCurrentHash(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=unescape(r()).substring(1),i=(0,s.parseQueryString)(t),n=i.get("nameddest")||"";let a=0|i.get("page");return{hash:t,page:a=!this._isValidPage(a)||e&&0<n.length?null:a,rotation:this.linkService.rotation}}_updateViewarea(e){e=e.location;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.rotation},this._popStateInProgress||(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},1e3))}_popState(e){var e=e["state"],t=r(),i=this._currentHash!==t;this._currentHash=t,e?this._isValidState(e)&&(this._popStateInProgress=!0,i&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(()=>{this._blockHashChange--})),t=e.destination,this._updateInternalState(t,e.uid,!0),(0,s.isValidRotation)(t.rotation)&&(this.linkService.rotation=t.rotation),t.dest?this.linkService.goToDestination(t.dest):t.hash?this.linkService.setHash(t.hash):t.page&&(this.linkService.page=t.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})):(this._uid++,{hash:i,page:e,rotation:t}=this._parseCurrentHash(),this._pushOrReplaceState({hash:i,page:e,rotation:t},!0))}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFLayerViewer=void 0;i=i(14);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function a(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var s=new WeakSet;class r extends i.BaseTreeViewer{constructor(e){super(e),n(this,s),this.l10n=e.l10n,this.eventBus._on("optionalcontentconfigchanged",e=>{a(this,s,o).call(this,e.promise)}),this.eventBus._on("resetlayers",()=>{a(this,s,o).call(this)}),this.eventBus._on("togglelayerstree",this._toggleAllTreeItems.bind(this))}reset(){super.reset(),this._optionalContentConfig=null,this._optionalContentHash=null}_dispatchEvent(e){this.eventBus.dispatch("layersloaded",{source:this,layersCount:e})}_bindLink(t,e){let{groupId:i,input:n}=e;const a=()=>{this._optionalContentConfig.setVisibility(i,n.checked),this._optionalContentHash=this._optionalContentConfig.getHash(),this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(this._optionalContentConfig)})};t.onclick=e=>e.target===n?(a(),!0):e.target!==t||(n.checked=!n.checked,a(),!1)}async _setNestedName(e,t){var{name:t=null}=t;"string"==typeof t?e.textContent=this._normalizeTextContent(t):(e.textContent=await this.l10n.get("additional_layers"),e.style.fontStyle="italic")}_addToggleButton(e,t){var{name:t=null}=t;super._addToggleButton(e,null===t)}_toggleAllTreeItems(){this._optionalContentConfig&&super._toggleAllTreeItems()}render(i){var{optionalContentConfig:n,pdfDocument:i}=i,i=(this._optionalContentConfig&&this.reset(),this._optionalContentConfig=n||null,this._pdfDocument=i||null,null==n?void 0:n.getOrder());if(i){this._optionalContentHash=n.getHash();var a=document.createDocumentFragment(),s=[{parent:a,groups:i}];let e=0,t=!1;for(;0<s.length;){var r=s.shift();for(const u of r.groups){var o,l,h,d=document.createElement("div"),c=(d.className="treeItem",document.createElement("a"));d.append(c),"object"==typeof u?(t=!0,this._addToggleButton(d,u),this._setNestedName(c,u),(o=document.createElement("div")).className="treeItems",d.append(o),s.push({parent:o,groups:u.order})):(o=n.getGroup(u),l=document.createElement("input"),this._bindLink(c,{groupId:u,input:l}),l.type="checkbox",l.checked=o.visible,(h=document.createElement("label")).textContent=this._normalizeTextContent(o.name),h.append(l),c.append(h),e++),r.parent.append(d)}}this._finishRendering(a,e,t)}else this._dispatchEvent(0)}}async function o(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(this._optionalContentConfig){var t=this._pdfDocument,i=await(e||t.getOptionalContentConfig());if(t===this._pdfDocument){if(e){if(i.getHash()===this._optionalContentHash)return}else this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(i)});this.render({optionalContentConfig:i,pdfDocument:this._pdfDocument})}}}t.PDFLayerViewer=r},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFOutlineViewer=void 0;var n=i(14),d=i(5),a=i(1);class s extends n.BaseTreeViewer{constructor(e){super(e),this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.eventBus._on("toggleoutlinetree",this._toggleAllTreeItems.bind(this)),this.eventBus._on("currentoutlineitem",this._currentOutlineItem.bind(this)),this.eventBus._on("pagechanging",e=>{this._currentPageNumber=e.pageNumber}),this.eventBus._on("pagesloaded",e=>{this._isPagesLoaded=!!e.pagesCount,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded)}),this.eventBus._on("sidebarviewchanged",e=>{this._sidebarView=e.view})}reset(){super.reset(),this._outline=null,this._pageNumberToDestHashCapability=null,this._currentPageNumber=1,this._isPagesLoaded=null,this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(!1),this._currentOutlineItemCapability=null}_dispatchEvent(e){var t;this._currentOutlineItemCapability=(0,d.createPromiseCapability)(),0===e||null!=(t=this._pdfDocument)&&t.loadingParams.disableAutoFetch?this._currentOutlineItemCapability.resolve(!1):null!==this._isPagesLoaded&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded),this.eventBus.dispatch("outlineloaded",{source:this,outlineCount:e,currentOutlineItemPromise:this._currentOutlineItemCapability.promise})}_bindLink(e,t){let{url:i,newWindow:n,action:a,attachment:s,dest:r,setOCGState:o}=t;const l=this["linkService"];i?l.addLinkAttributes(e,i,n):a?(e.href=l.getAnchorUrl(""),e.onclick=()=>(l.executeNamedAction(a),!1)):s?(e.href=l.getAnchorUrl(""),e.onclick=()=>(this.downloadManager.openOrDownloadData(e,s.content,s.filename),!1)):o?(e.href=l.getAnchorUrl(""),e.onclick=()=>(l.executeSetOCGState(o),!1)):(e.href=l.getDestinationHash(r),e.onclick=e=>(this._updateCurrentTreeItem(e.target.parentNode),r&&l.goToDestination(r),!1))}_setStyles(e,t){var{bold:t,italic:i}=t;t&&(e.style.fontWeight="bold"),i&&(e.style.fontStyle="italic")}_addToggleButton(e,t){var{count:t,items:i}=t;let n=!1;if(t<0){let e=i.length;if(0<e)for(var a=[...i];0<a.length;){var{count:s,items:r}=a.shift();0<s&&0<r.length&&(e+=r.length,a.push(...r))}Math.abs(t)===e&&(n=!0)}super._addToggleButton(e,n)}_toggleAllTreeItems(){this._outline&&super._toggleAllTreeItems()}render(i){var{outline:i,pdfDocument:n}=i;if(this._outline&&this.reset(),this._outline=i||null,this._pdfDocument=n||null,i){var n=document.createDocumentFragment(),a=[{parent:n,items:i}];let e=0,t=!1;for(;0<a.length;){var s=a.shift();for(const l of s.items){var r=document.createElement("div"),o=(r.className="treeItem",document.createElement("a"));this._bindLink(o,l),this._setStyles(o,l),o.textContent=this._normalizeTextContent(l.title),r.append(o),0<l.items.length&&(t=!0,this._addToggleButton(r,l),(o=document.createElement("div")).className="treeItems",r.append(o),a.push({parent:o,items:l.items})),s.parent.append(r),e++}}this._finishRendering(n,e,t)}else this._dispatchEvent(0)}async _currentOutlineItem(){if(!this._isPagesLoaded)throw new Error("_currentOutlineItem: All pages have not been loaded.");if(this._outline&&this._pdfDocument){var t=await this._getPageNumberToDestHash(this._pdfDocument);if(t&&(this._updateCurrentTreeItem(null),this._sidebarView===a.SidebarView.OUTLINE))for(let e=this._currentPageNumber;0<e;e--){var i=t.get(e);if(i){i=this.container.querySelector(`a[href="${i}"]`);if(i){this._scrollToCurrentTreeItem(i.parentNode);break}}}}}async _getPageNumberToDestHash(i){if(!this._pageNumberToDestHashCapability){this._pageNumberToDestHashCapability=(0,d.createPromiseCapability)();for(var n=new Map,a=new Map,s=[{nesting:0,items:this._outline}];0<s.length;){var r,o,e=s.shift(),l=e.nesting;for({dest:r,items:o}of e.items){let e,t;if("string"==typeof r){if(e=await i.getDestination(r),i!==this._pdfDocument)return null}else e=r;if(Array.isArray(e)){var[h]=e;if("object"==typeof h&&null!==h){if(!(t=this.linkService._cachedPageNumber(h)))try{if(t=await i.getPageIndex(h)+1,i!==this._pdfDocument)return null;this.linkService.cachePageRef(t,h)}catch(e){}}else Number.isInteger(h)&&(t=h+1);Number.isInteger(t)&&(!n.has(t)||l>a.get(t))&&(h=this.linkService.getDestinationHash(r),n.set(t,h),a.set(t,l))}0<o.length&&s.push({nesting:l+1,items:o})}}this._pageNumberToDestHashCapability.resolve(0<n.size?n:null)}return this._pageNumberToDestHashCapability.promise}}t.PDFOutlineViewer=s},(O,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFPresentationMode=void 0;var n=t(1),i=t(5);function a(e,t){r(e,t),t.add(e)}function s(e,t,i){r(e,t),t.set(e,i)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){t=h(e,t,"get");return t.get?t.get.call(e):t.value}function l(e,t,i){t=h(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function h(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function d(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const V=3e3,c="pdfPresentationMode",u="pdfPresentationModeControls",F=50,R=.1,p=50,g=Math.PI/6;var f=new WeakMap,m=new WeakMap,v=new WeakSet,w=new WeakSet,_=new WeakSet,b=new WeakSet,y=new WeakSet,P=new WeakSet,E=new WeakSet,S=new WeakSet,L=new WeakSet,C=new WeakSet,T=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet,k=new WeakSet;function W(e){var t,i;this.active&&(e.preventDefault(),e=(0,n.normalizeWheelEventDelta)(e),t=Date.now(),(i=this.mouseScrollTimeStamp)<t&&t-i<F||((0<this.mouseScrollDelta&&e<0||this.mouseScrollDelta<0&&0<e)&&d(this,L,x).call(this),this.mouseScrollDelta+=e,Math.abs(this.mouseScrollDelta)>=R&&(i=this.mouseScrollDelta,d(this,L,x).call(this),0<i?this.pdfViewer.previousPage():this.pdfViewer.nextPage())&&(this.mouseScrollTimeStamp=t)))}function D(e){l(this,f,e),this.eventBus.dispatch("presentationmodechanged",{source:this,state:e})}function U(){d(this,w,D).call(this,n.PresentationModeState.FULLSCREEN),this.container.classList.add(c),setTimeout(()=>{this.pdfViewer.scrollMode=n.ScrollMode.PAGE,null!==o(this,m).spreadMode&&(this.pdfViewer.spreadMode=n.SpreadMode.NONE),this.pdfViewer.currentPageNumber=o(this,m).pageNumber,this.pdfViewer.currentScaleValue="page-fit",null!==o(this,m).annotationEditorMode&&(this.pdfViewer.annotationEditorMode=i.AnnotationEditorType.NONE)},0),d(this,T,$).call(this),d(this,E,N).call(this),this.contextMenuOpen=!1,window.getSelection().removeAllRanges()}function H(){const e=this.pdfViewer.currentPageNumber;this.container.classList.remove(c),setTimeout(()=>{d(this,k,B).call(this),d(this,w,D).call(this,n.PresentationModeState.NORMAL),this.pdfViewer.scrollMode=o(this,m).scrollMode,null!==o(this,m).spreadMode&&(this.pdfViewer.spreadMode=o(this,m).spreadMode),this.pdfViewer.currentScaleValue=o(this,m).scaleValue,this.pdfViewer.currentPageNumber=e,null!==o(this,m).annotationEditorMode&&(this.pdfViewer.annotationEditorMode=o(this,m).annotationEditorMode),l(this,m,null)},0),d(this,M,X).call(this),d(this,S,G).call(this),d(this,L,x).call(this),this.contextMenuOpen=!1}function z(e){this.contextMenuOpen?(this.contextMenuOpen=!1,e.preventDefault()):0!==e.button||e.target.href&&e.target.classList.contains("internalLink")||(e.preventDefault(),e.shiftKey?this.pdfViewer.previousPage():this.pdfViewer.nextPage())}function j(){this.contextMenuOpen=!0}function N(){this.controlsTimeout?clearTimeout(this.controlsTimeout):this.container.classList.add(u),this.controlsTimeout=setTimeout(()=>{this.container.classList.remove(u),delete this.controlsTimeout},V)}function G(){this.controlsTimeout&&(clearTimeout(this.controlsTimeout),this.container.classList.remove(u),delete this.controlsTimeout)}function x(){this.mouseScrollTimeStamp=0,this.mouseScrollDelta=0}function K(e){if(this.active)if(1<e.touches.length)this.touchSwipeState=null;else switch(e.type){case"touchstart":this.touchSwipeState={startX:e.touches[0].pageX,startY:e.touches[0].pageY,endX:e.touches[0].pageX,endY:e.touches[0].pageY};break;case"touchmove":null!==this.touchSwipeState&&(this.touchSwipeState.endX=e.touches[0].pageX,this.touchSwipeState.endY=e.touches[0].pageY,e.preventDefault());break;case"touchend":if(null!==this.touchSwipeState){let e=0;var t=this.touchSwipeState.endX-this.touchSwipeState.startX,i=this.touchSwipeState.endY-this.touchSwipeState.startY,n=Math.abs(Math.atan2(i,t));Math.abs(t)>p&&(n<=g||n>=Math.PI-g)?e=t:Math.abs(i)>p&&Math.abs(n-Math.PI/2)<=g&&(e=i),0<e?this.pdfViewer.previousPage():e<0&&this.pdfViewer.nextPage()}}}function $(){this.showControlsBind=d(this,E,N).bind(this),this.mouseDownBind=d(this,y,z).bind(this),this.mouseWheelBind=d(this,v,W).bind(this),this.resetMouseScrollStateBind=d(this,L,x).bind(this),this.contextMenuBind=d(this,P,j).bind(this),this.touchSwipeBind=d(this,C,K).bind(this),window.addEventListener("mousemove",this.showControlsBind),window.addEventListener("mousedown",this.mouseDownBind),window.addEventListener("wheel",this.mouseWheelBind,{passive:!1}),window.addEventListener("keydown",this.resetMouseScrollStateBind),window.addEventListener("contextmenu",this.contextMenuBind),window.addEventListener("touchstart",this.touchSwipeBind),window.addEventListener("touchmove",this.touchSwipeBind),window.addEventListener("touchend",this.touchSwipeBind)}function X(){window.removeEventListener("mousemove",this.showControlsBind),window.removeEventListener("mousedown",this.mouseDownBind),window.removeEventListener("wheel",this.mouseWheelBind,{passive:!1}),window.removeEventListener("keydown",this.resetMouseScrollStateBind),window.removeEventListener("contextmenu",this.contextMenuBind),window.removeEventListener("touchstart",this.touchSwipeBind),window.removeEventListener("touchmove",this.touchSwipeBind),window.removeEventListener("touchend",this.touchSwipeBind),delete this.showControlsBind,delete this.mouseDownBind,delete this.mouseWheelBind,delete this.resetMouseScrollStateBind,delete this.contextMenuBind,delete this.touchSwipeBind}function Z(){(document.fullscreenElement?d(this,_,U):d(this,b,H)).call(this)}function Q(){this.fullscreenChangeBind=d(this,I,Z).bind(this),window.addEventListener("fullscreenchange",this.fullscreenChangeBind)}function B(){window.removeEventListener("fullscreenchange",this.fullscreenChangeBind),delete this.fullscreenChangeBind}e.PDFPresentationMode=class{constructor(e){var{container:e,pdfViewer:t,eventBus:i}=e;a(this,k),a(this,A),a(this,I),a(this,M),a(this,T),a(this,C),a(this,L),a(this,S),a(this,E),a(this,P),a(this,y),a(this,b),a(this,_),a(this,w),a(this,v),s(this,f,{writable:!0,value:n.PresentationModeState.UNKNOWN}),s(this,m,{writable:!0,value:null}),this.container=e,this.pdfViewer=t,this.eventBus=i,this.contextMenuOpen=!1,this.mouseScrollTimeStamp=0,this.mouseScrollDelta=0,this.touchSwipeState=null}async request(){var{container:e,pdfViewer:t}=this;if(!this.active&&t.pagesCount&&e.requestFullscreen){d(this,A,Q).call(this),d(this,w,D).call(this,n.PresentationModeState.CHANGING);e=e.requestFullscreen();l(this,m,{pageNumber:t.currentPageNumber,scaleValue:t.currentScaleValue,scrollMode:t.scrollMode,spreadMode:null,annotationEditorMode:null}),t.spreadMode===n.SpreadMode.NONE||t.pageViewsReady&&t.hasEqualPageSizes||(console.warn("Ignoring Spread modes when entering PresentationMode, since the document may contain varying page sizes."),o(this,m).spreadMode=t.spreadMode),t.annotationEditorMode!==i.AnnotationEditorType.DISABLE&&(o(this,m).annotationEditorMode=t.annotationEditorMode);try{return await e,t.focus(),!0}catch(e){d(this,k,B).call(this),d(this,w,D).call(this,n.PresentationModeState.NORMAL)}}return!1}get active(){return o(this,f)===n.PresentationModeState.CHANGING||o(this,f)===n.PresentationModeState.FULLSCREEN}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFRenderingQueue=void 0;var n=i(5),a=i(1);t.PDFRenderingQueue=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}hasViewer(){return!!this.pdfViewer}renderHighestPriority(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(e)||this.isThumbnailViewEnabled&&null!=(e=this.pdfThumbnailViewer)&&e.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}getHighestPriority(e,i,n){var t=3<arguments.length&&void 0!==arguments[3]&&arguments[3],a=e.views,s=a.length;if(0===s)return null;for(let e=0;e<s;e++){var r=a[e].view;if(!this.isViewFinished(r))return r}var o=e.first.id,l=e.last.id;if(s<l-o+1){var h=e.ids;for(let e=1,t=l-o;e<t;e++){var d=n?o+e:l-e;if(!h.has(d)){d=i[d-1];if(!this.isViewFinished(d))return d}}}var e=n?l:o-2,c=i[e];return c&&!this.isViewFinished(c)||t&&(c=i[e+=n?1:-1])&&!this.isViewFinished(c)?c:null}isViewFinished(e){return e.renderingState===a.RenderingStates.FINISHED}renderView(e){switch(e.renderingState){case a.RenderingStates.FINISHED:return!1;case a.RenderingStates.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case a.RenderingStates.RUNNING:this.highestPriorityPage=e.renderingId;break;case a.RenderingStates.INITIAL:this.highestPriorityPage=e.renderingId,e.draw().finally(()=>{this.renderHighestPriority()}).catch(e=>{e instanceof n.RenderingCancelledException||console.error(`renderView: "${e}"`)})}return!0}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFScriptingManager=void 0;var h=i(1),r=i(5);t.PDFScriptingManager=class{constructor(e){var{eventBus:e,sandboxBundleSrc:t=null,scriptingFactory:i=null,docPropertiesLookup:n=null}=e;this._pdfDocument=null,this._pdfViewer=null,this._closeCapability=null,this._destroyCapability=null,this._scripting=null,this._mouseState=Object.create(null),this._ready=!1,this._eventBus=e,this._sandboxBundleSrc=t,this._scriptingFactory=i,this._docPropertiesLookup=n}setViewer(e){this._pdfViewer=e}async setDocument(e){if(this._pdfDocument&&await this._destroyScripting(),this._pdfDocument=e){var[t,i,n]=await Promise.all([e.getFieldObjects(),e.getCalculationOrderIds(),e.getJSActions()]);if(t||n){if(e===this._pdfDocument){try{this._scripting=this._createScripting()}catch(e){return console.error(`PDFScriptingManager.setDocument: "${null==e?void 0:e.message}".`),void await this._destroyScripting()}this._internalEvents.set("updatefromsandbox",e=>{(null==e?void 0:e.source)===window&&this._updateFromSandbox(e.detail)}),this._internalEvents.set("dispatcheventinsandbox",e=>{var t;null!=(t=this._scripting)&&t.dispatchEventInSandbox(e.detail)}),this._internalEvents.set("pagechanging",e=>{var{pageNumber:e,previous:t}=e;e!==t&&(this._dispatchPageClose(t),this._dispatchPageOpen(e))}),this._internalEvents.set("pagerendered",e=>{e=e.pageNumber;this._pageOpenPending.has(e)&&e===this._pdfViewer.currentPageNumber&&this._dispatchPageOpen(e)}),this._internalEvents.set("pagesdestroy",async e=>{var t;await this._dispatchPageClose(this._pdfViewer.currentPageNumber),await(null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillClose"})),null!=(t=this._closeCapability)&&t.resolve()}),this._domEvents.set("mousedown",e=>{this._mouseState.isDown=!0}),this._domEvents.set("mouseup",e=>{this._mouseState.isDown=!1});for(var[a,s]of this._internalEvents)this._eventBus._on(a,s);for(var[r,o]of this._domEvents)window.addEventListener(r,o,!0);try{var l=await this._getDocProperties();if(e!==this._pdfDocument)return;await this._scripting.createSandbox({objects:t,calculationOrder:i,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...l,actions:n}}),this._eventBus.dispatch("sandboxcreated",{source:this})}catch(e){return console.error(`PDFScriptingManager.setDocument: "${null==e?void 0:e.message}".`),void await this._destroyScripting()}await(null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"Open"})),await this._dispatchPageOpen(this._pdfViewer.currentPageNumber,!0),Promise.resolve().then(()=>{e===this._pdfDocument&&(this._ready=!0)})}}else await this._destroyScripting()}}async dispatchWillSave(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillSave"})}async dispatchDidSave(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidSave"})}async dispatchWillPrint(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillPrint"})}async dispatchDidPrint(e){var t;return null==(t=this._scripting)?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidPrint"})}get mouseState(){return this._mouseState}get destroyPromise(){var e;return(null==(e=this._destroyCapability)?void 0:e.promise)||null}get ready(){return this._ready}get _internalEvents(){return(0,r.shadow)(this,"_internalEvents",new Map)}get _domEvents(){return(0,r.shadow)(this,"_domEvents",new Map)}get _pageOpenPending(){return(0,r.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,r.shadow)(this,"_visitedPages",new Map)}async _updateFromSandbox(e){var t=this._pdfViewer.isInPresentationMode||this._pdfViewer.isChangingPresentationMode,{id:i,siblings:n,command:a,value:s}=e;if(i){if(!t||!e.focus){delete e.id,delete e.siblings;for(const l of n?[i,...n]:[i]){var r=document.querySelector(`[data-element-id="${l}"]`);r?r.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:e})):null!=(r=this._pdfDocument)&&r.annotationStorage.setValue(l,e)}}}else switch(a){case"clear":console.clear();break;case"error":console.error(s);break;case"layout":if(t)return;var o=(0,h.apiPageLayoutToViewerModes)(s);this._pdfViewer.spreadMode=o.spreadMode;break;case"page-num":this._pdfViewer.currentPageNumber=s+1;break;case"print":await this._pdfViewer.pagesPromise,this._eventBus.dispatch("print",{source:this});break;case"println":console.log(s);break;case"zoom":if(t)return;this._pdfViewer.currentScaleValue=s;break;case"SaveAs":this._eventBus.dispatch("download",{source:this});break;case"FirstPage":this._pdfViewer.currentPageNumber=1;break;case"LastPage":this._pdfViewer.currentPageNumber=this._pdfViewer.pagesCount;break;case"NextPage":this._pdfViewer.nextPage();break;case"PrevPage":this._pdfViewer.previousPage();break;case"ZoomViewIn":if(t)return;this._pdfViewer.increaseScale();break;case"ZoomViewOut":if(t)return;this._pdfViewer.decreaseScale()}}async _dispatchPageOpen(i){var e;const n=this._pdfDocument,a=this._visitedPages;if(1<arguments.length&&void 0!==arguments[1]&&arguments[1]&&(this._closeCapability=(0,r.createPromiseCapability)()),this._closeCapability){const s=this._pdfViewer.getPageView(i-1);(null===s||void 0===s?void 0:s.renderingState)!==h.RenderingStates.FINISHED?this._pageOpenPending.add(i):(this._pageOpenPending.delete(i),e=(async()=>{var e,t=await(a.has(i)?null:null==(t=s.pdfPage)?void 0:t.getJSActions());n===this._pdfDocument&&await(null==(e=this._scripting)?void 0:e.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:i,actions:t}))})(),a.set(i,e))}}async _dispatchPageClose(e){var t,i=this._pdfDocument,n=this._visitedPages;this._closeCapability&&!this._pageOpenPending.has(e)&&(t=n.get(e))&&(n.set(e,null),await t,i===this._pdfDocument)&&await(null==(n=this._scripting)?void 0:n.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:e}))}async _getDocProperties(){if(this._docPropertiesLookup)return this._docPropertiesLookup(this._pdfDocument);throw new Error("_getDocProperties: Unable to lookup properties.")}_createScripting(){if(this._destroyCapability=(0,r.createPromiseCapability)(),this._scripting)throw new Error("_createScripting: Scripting already exists.");if(this._scriptingFactory)return this._scriptingFactory.createScripting({sandboxBundleSrc:this._sandboxBundleSrc});throw new Error("_createScripting: Cannot create scripting.")}async _destroyScripting(){var e;if(this._scripting){this._closeCapability&&(await Promise.race([this._closeCapability.promise,new Promise(e=>{setTimeout(e,1e3)})]).catch(e=>{}),this._closeCapability=null),this._pdfDocument=null;try{await this._scripting.destroySandbox()}catch(e){}for(var[t,i]of this._internalEvents)this._eventBus._off(t,i);this._internalEvents.clear();for(var[n,a]of this._domEvents)window.removeEventListener(n,a,!0);this._domEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),this._scripting=null,delete this._mouseState.isDown,this._ready=!1,null!=(e=this._destroyCapability)&&e.resolve()}else(this._pdfDocument=null)!=(e=this._destroyCapability)&&e.resolve()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSidebar=void 0;var l=i(1);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function h(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const n="pdfSidebarNotification";var d=new WeakSet,c=new WeakSet,u=new WeakSet,r=new WeakSet,o=new WeakSet,p=new WeakSet;function g(){this.isInitialViewSet&&!this.isInitialEventDispatched&&(this.isInitialEventDispatched=!0),this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.visibleView})}function f(){this.onToggled?this.onToggled():(this.pdfViewer.forceRendering(),this.pdfThumbnailViewer.forceRendering())}function m(){var{pdfViewer:t,pdfThumbnailViewer:i}=this,n=t.pagesCount;for(let e=0;e<n;e++){var a=t.getPageView(e);(null==a?void 0:a.renderingState)===l.RenderingStates.FINISHED&&i.getThumbnail(e).setImage(a)}i.scrollThumbnailIntoView(t.currentPageNumber)}function a(){this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar_notification2"),this.l10n.translate(this.toggleButton),this.isOpen||this.toggleButton.classList.add(n)}function v(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];(this.isOpen||e)&&this.toggleButton.classList.remove(n),e&&(this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar"),this.l10n.translate(this.toggleButton))}function w(){this.sidebarContainer.addEventListener("transitionend",e=>{e.target===this.sidebarContainer&&this.outerContainer.classList.remove("sidebarMoving")}),this.toggleButton.addEventListener("click",()=>{this.toggle()}),this.thumbnailButton.addEventListener("click",()=>{this.switchView(l.SidebarView.THUMBS)}),this.outlineButton.addEventListener("click",()=>{this.switchView(l.SidebarView.OUTLINE)}),this.outlineButton.addEventListener("dblclick",()=>{this.eventBus.dispatch("toggleoutlinetree",{source:this})}),this.attachmentsButton.addEventListener("click",()=>{this.switchView(l.SidebarView.ATTACHMENTS)}),this.layersButton.addEventListener("click",()=>{this.switchView(l.SidebarView.LAYERS)}),this.layersButton.addEventListener("dblclick",()=>{this.eventBus.dispatch("resetlayers",{source:this})}),this._currentOutlineItemButton.addEventListener("click",()=>{this.eventBus.dispatch("currentoutlineitem",{source:this})});const t=(e,t,i)=>{t.disabled=!e,e?h(this,r,a).call(this):this.active===i&&this.switchView(l.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",e=>{t(e.outlineCount,this.outlineButton,l.SidebarView.OUTLINE),e.currentOutlineItemPromise.then(e=>{this.isInitialViewSet&&(this._currentOutlineItemButton.disabled=!e)})}),this.eventBus._on("attachmentsloaded",e=>{t(e.attachmentsCount,this.attachmentsButton,l.SidebarView.ATTACHMENTS)}),this.eventBus._on("layersloaded",e=>{t(e.layersCount,this.layersButton,l.SidebarView.LAYERS)}),this.eventBus._on("presentationmodechanged",e=>{e.state===l.PresentationModeState.NORMAL&&this.visibleView===l.SidebarView.THUMBS&&h(this,u,m).call(this)})}t.PDFSidebar=class{constructor(e){var{elements:e,pdfViewer:t,pdfThumbnailViewer:i,eventBus:n,l10n:a}=e;s(this,p),s(this,o),s(this,r),s(this,u),s(this,c),s(this,d),this.isOpen=!1,this.active=l.SidebarView.THUMBS,this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,this.onToggled=null,this.pdfViewer=t,this.pdfThumbnailViewer=i,this.outerContainer=e.outerContainer,this.sidebarContainer=e.sidebarContainer,this.toggleButton=e.toggleButton,this.thumbnailButton=e.thumbnailButton,this.outlineButton=e.outlineButton,this.attachmentsButton=e.attachmentsButton,this.layersButton=e.layersButton,this.thumbnailView=e.thumbnailView,this.outlineView=e.outlineView,this.attachmentsView=e.attachmentsView,this.layersView=e.layersView,this._outlineOptionsContainer=e.outlineOptionsContainer,this._currentOutlineItemButton=e.currentOutlineItemButton,this.eventBus=n,this.l10n=a,h(this,p,w).call(this)}reset(){this.isInitialViewSet=!1,this.isInitialEventDispatched=!1,h(this,o,v).call(this,!0),this.switchView(l.SidebarView.THUMBS),this.outlineButton.disabled=!1,this.attachmentsButton.disabled=!1,this.layersButton.disabled=!1,this._currentOutlineItemButton.disabled=!0}get visibleView(){return this.isOpen?this.active:l.SidebarView.NONE}setInitialView(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l.SidebarView.NONE;this.isInitialViewSet||(this.isInitialViewSet=!0,e!==l.SidebarView.NONE&&e!==l.SidebarView.UNKNOWN&&(this.switchView(e,!0),this.isInitialEventDispatched))||h(this,d,g).call(this)}switchView(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=e!==this.active;let n=!1;switch(e){case l.SidebarView.NONE:return void(this.isOpen&&this.close());case l.SidebarView.THUMBS:this.isOpen&&i&&(n=!0);break;case l.SidebarView.OUTLINE:if(this.outlineButton.disabled)return;break;case l.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return;break;case l.SidebarView.LAYERS:if(this.layersButton.disabled)return;break;default:return void console.error(`PDFSidebar.switchView: "${e}" is not a valid view.`)}var a=(this.active=e)===l.SidebarView.THUMBS,s=e===l.SidebarView.OUTLINE,r=e===l.SidebarView.ATTACHMENTS,o=e===l.SidebarView.LAYERS;this.thumbnailButton.classList.toggle("toggled",a),this.outlineButton.classList.toggle("toggled",s),this.attachmentsButton.classList.toggle("toggled",r),this.layersButton.classList.toggle("toggled",o),this.thumbnailButton.setAttribute("aria-checked",a),this.outlineButton.setAttribute("aria-checked",s),this.attachmentsButton.setAttribute("aria-checked",r),this.layersButton.setAttribute("aria-checked",o),this.thumbnailView.classList.toggle("hidden",!a),this.outlineView.classList.toggle("hidden",!s),this.attachmentsView.classList.toggle("hidden",!r),this.layersView.classList.toggle("hidden",!o),this._outlineOptionsContainer.classList.toggle("hidden",!s),t&&!this.isOpen?this.open():(n&&(h(this,u,m).call(this),h(this,c,f).call(this)),i&&h(this,d,g).call(this))}open(){this.isOpen||(this.isOpen=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.outerContainer.classList.add("sidebarMoving","sidebarOpen"),this.active===l.SidebarView.THUMBS&&h(this,u,m).call(this),h(this,c,f).call(this),h(this,d,g).call(this),h(this,o,v).call(this))}close(){this.isOpen&&(this.isOpen=!1,this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"),this.outerContainer.classList.add("sidebarMoving"),this.outerContainer.classList.remove("sidebarOpen"),h(this,c,f).call(this),h(this,d,g).call(this))}toggle(){this.isOpen?this.close():this.open()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSidebarResizer=void 0;var n=i(1);const a="sidebarResizing";t.PDFSidebarResizer=class{constructor(e,t,i){this.isRTL=!1,this.sidebarOpen=!1,this._width=null,this._outerContainerWidth=null,this._boundEvents=Object.create(null),this.outerContainer=e.outerContainer,this.resizer=e.resizer,this.eventBus=t,i.getDirection().then(e=>{this.isRTL="rtl"===e}),this._addEventListeners()}get outerContainerWidth(){return this._outerContainerWidth||(this._outerContainerWidth=this.outerContainer.clientWidth)}_updateWidth(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;var t=Math.floor(this.outerContainerWidth/2);return(e=(e=e>t?t:e)<200?200:e)!==this._width&&(this._width=e,n.docStyle.setProperty("--sidebar-width",e+"px"),!0)}_mouseMove(e){let t=e.clientX;this.isRTL&&(t=this.outerContainerWidth-t),this._updateWidth(t)}_mouseUp(e){this.outerContainer.classList.remove(a),this.eventBus.dispatch("resize",{source:this});var t=this._boundEvents;window.removeEventListener("mousemove",t.mouseMove),window.removeEventListener("mouseup",t.mouseUp)}_addEventListeners(){const t=this._boundEvents;t.mouseMove=this._mouseMove.bind(this),t.mouseUp=this._mouseUp.bind(this),this.resizer.addEventListener("mousedown",e=>{0===e.button&&(this.outerContainer.classList.add(a),window.addEventListener("mousemove",t.mouseMove),window.addEventListener("mouseup",t.mouseUp))}),this.eventBus._on("sidebarviewchanged",e=>{this.sidebarOpen=!(null==e||!e.view)}),this.eventBus._on("resize",e=>{if((null==e?void 0:e.source)===window&&(this._outerContainerWidth=null,this._width))if(this.sidebarOpen){this.outerContainer.classList.add(a);const t=this._updateWidth(this._width);Promise.resolve().then(()=>{this.outerContainer.classList.remove(a),t&&this.eventBus.dispatch("resize",{source:this})})}else this._updateWidth(this._width)})}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFThumbnailViewer=void 0;var l=i(1),o=i(28);function s(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function n(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}const h="selected";var r=new WeakSet,d=new WeakSet;async function a(e){if(e.pdfPage)return e.pdfPage;try{var t=await this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(t),t}catch(e){return console.error("Unable to get page for thumb view",e),null}}function c(e){var t;return 1===(null==(t=e.first)?void 0:t.id)||(null==(t=e.last)?void 0:t.id)!==this._thumbnails.length&&this.scroll.down}t.PDFThumbnailViewer=class{constructor(e){var{container:e,linkService:t,renderingQueue:i,l10n:n,pageColors:a}=e;s(this,d),s(this,r),this.container=e,this.linkService=t,this.renderingQueue=i,this.l10n=n,this.pageColors=a||null,!this.pageColors||CSS.supports("color",this.pageColors.background)&&CSS.supports("color",this.pageColors.foreground)||((this.pageColors.background||this.pageColors.foreground)&&console.warn("PDFThumbnailViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."),this.pageColors=null),this.scroll=(0,l.watchScroll)(this.container,this._scrollUpdated.bind(this)),this._resetView()}_scrollUpdated(){this.renderingQueue.renderHighestPriority()}getThumbnail(e){return this._thumbnails[e]}_getVisibleThumbs(){return(0,l.getVisibleElements)({scrollEl:this.container,views:this._thumbnails})}scrollThumbnailIntoView(t){if(this.pdfDocument){var i=this._thumbnails[t-1];if(i){t!==this._currentPageNumber&&(this._thumbnails[this._currentPageNumber-1].div.classList.remove(h),i.div.classList.add(h));var{first:n,last:a,views:s}=this._getVisibleThumbs();if(0<s.length){let e=!1;if(t<=n.id||t>=a.id)e=!0;else for(var{id:r,percent:o}of s)if(r===t){e=o<100;break}e&&(0,l.scrollIntoView)(i.div,{top:-19})}this._currentPageNumber=t}else console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.')}}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,l.isValidRotation)(e))throw new Error("Invalid thumbnails rotation angle.");if(this.pdfDocument&&this._pagesRotation!==e){var t={rotation:this._pagesRotation=e};for(const i of this._thumbnails)i.update(t)}}cleanup(){for(const e of this._thumbnails)e.renderingState!==l.RenderingStates.FINISHED&&e.reset();o.TempImageFactory.destroyCanvas()}_resetView(){this._thumbnails=[],this._currentPageNumber=1,this._pageLabels=null,this._pagesRotation=0,this.container.textContent=""}setDocument(s){if(this.pdfDocument&&(this._cancelRendering(),this._resetView()),this.pdfDocument=s){var e=s.getPage(1);const r=s.getOptionalContentConfig();e.then(e=>{var t,i=s.numPages,n=e.getViewport({scale:1});for(let e=1;e<=i;++e){var a=new o.PDFThumbnailView({container:this.container,id:e,defaultViewport:n.clone(),optionalContentConfigPromise:r,linkService:this.linkService,renderingQueue:this.renderingQueue,l10n:this.l10n,pageColors:this.pageColors});this._thumbnails.push(a)}null!=(t=this._thumbnails[0])&&t.setPdfPage(e),this._thumbnails[this._currentPageNumber-1].div.classList.add(h)}).catch(e=>{console.error("Unable to initialize thumbnail viewer",e)})}}_cancelRendering(){for(const e of this._thumbnails)e.cancelRendering()}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._thumbnails.length;e<t;e++){var i;this._thumbnails[e].setPageLabel((null==(i=this._pageLabels)?void 0:i[e])??null)}}}forceRendering(){var e=this._getVisibleThumbs(),t=n(this,d,c).call(this,e);const i=this.renderingQueue.getHighestPriority(e,this._thumbnails,t);return!!i&&(n(this,r,a).call(this,i).then(()=>{this.renderingQueue.renderView(i)}),!0)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TempImageFactory=t.PDFThumbnailView=void 0;var c=i(1),l=i(5);function a(e,t,i,n){o(e,t),r(i,"set");t=e,e=i,i=n;if(e.set)e.set.call(t,i);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=i}return n}function s(e,t,i){o(e,t),r(i,"get");t=e,e=i;return e.get?e.get.call(t):e.value}function r(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function o(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}class h{static getCanvas(e,t){var i=s(this,h,d)||a(this,h,d,document.createElement("canvas")),n=(i.width=e,i.height=t,i.getContext("2d",{alpha:!1}));return n.save(),n.fillStyle="rgb(255, 255, 255)",n.fillRect(0,0,e,t),n.restore(),[i,i.getContext("2d")]}static destroyCanvas(){var e=s(this,h,d);e&&(e.width=0,e.height=0),a(this,h,d,null)}}t.TempImageFactory=h;var d={writable:!0,value:null};t.PDFThumbnailView=class{constructor(e){let{container:t,id:i,defaultViewport:n,optionalContentConfigPromise:a,linkService:s,renderingQueue:r,l10n:o,pageColors:l}=e;this.id=i,this.renderingId="thumbnail"+i,this.pageLabel=null,this.pdfPage=null,this.rotation=0,this.viewport=n,this.pdfPageRotate=n.rotation,this._optionalContentConfigPromise=a||null,this.pageColors=l||null,this.linkService=s,this.renderingQueue=r,this.renderTask=null,this.renderingState=c.RenderingStates.INITIAL,this.resume=null;var e=this.viewport.width,h=e/this.viewport.height;this.canvasWidth=98,this.canvasHeight=this.canvasWidth/h|0,this.scale=this.canvasWidth/e,this.l10n=o;const d=document.createElement("a");d.href=s.getAnchorUrl("#page="+i),this._thumbPageTitle.then(e=>{d.title=e}),d.onclick=function(){return s.goToPage(i),!1},this.anchor=d;h=document.createElement("div"),h.className="thumbnail",h.setAttribute("data-page-number",this.id),this.div=h,e=document.createElement("div");e.className="thumbnailSelectionRing";e.style.width=this.canvasWidth+2+"px",e.style.height=this.canvasHeight+2+"px",this.ring=e,h.append(e),d.append(h),t.append(d)}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;var t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:1,rotation:t}),this.reset()}reset(){this.cancelRendering(),this.renderingState=c.RenderingStates.INITIAL;var e=this.viewport.width,t=this.viewport.height,t=(this.canvasHeight=this.canvasWidth/(e/t)|0,this.scale=this.canvasWidth/e,this.div.removeAttribute("data-loaded"),this.ring);t.textContent="";t.style.width=this.canvasWidth+2+"px",t.style.height=this.canvasHeight+2+"px",this.canvas&&(this.canvas.width=0,this.canvas.height=0,delete this.canvas),this.image&&(this.image.removeAttribute("src"),delete this.image)}update(e){var{rotation:e=null}=e,e=("number"==typeof e&&(this.rotation=e),(this.rotation+this.pdfPageRotate)%360);this.viewport=this.viewport.clone({scale:1,rotation:e}),this.reset()}cancelRendering(){this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.resume=null}_getPageDrawContext(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=document.createElement("canvas"),i=t.getContext("2d",{alpha:!1}),n=new c.OutputScale,e=(t.width=e*this.canvasWidth*n.sx|0,t.height=e*this.canvasHeight*n.sy|0,n.scaled?[n.sx,0,0,n.sy,0,0]:null);return{ctx:i,canvas:t,transform:e}}_convertCanvasToImage(e){if(this.renderingState!==c.RenderingStates.FINISHED)throw new Error("_convertCanvasToImage: Rendering has not finished.");e=this._reduceImage(e);const t=document.createElement("img");t.className="thumbnailImage",this._thumbPageCanvas.then(e=>{t.setAttribute("aria-label",e)}),t.style.width=this.canvasWidth+"px",t.style.height=this.canvasHeight+"px",t.src=e.toDataURL(),this.image=t,this.div.setAttribute("data-loaded",!0),this.ring.append(t),e.width=0,e.height=0}draw(){var t=this;if(this.renderingState!==c.RenderingStates.INITIAL)return console.error("Must be in new state before drawing"),Promise.resolve();var e=this["pdfPage"];if(!e)return this.renderingState=c.RenderingStates.FINISHED,Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=c.RenderingStates.RUNNING;async function i(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(o===t.renderTask&&(t.renderTask=null),!(e instanceof l.RenderingCancelledException)&&(t.renderingState=c.RenderingStates.FINISHED,t._convertCanvasToImage(a),e))throw e}const{ctx:n,canvas:a,transform:s}=this._getPageDrawContext(2);var r={canvasContext:n,transform:s,viewport:this.viewport.clone({scale:2*this.scale}),optionalContentConfigPromise:this._optionalContentConfigPromise,pageColors:this.pageColors};const o=this.renderTask=e.render(r);o.onContinue=e=>{this.renderingQueue.isHighestPriority(this)?e():(this.renderingState=c.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=c.RenderingStates.RUNNING,e()})};e=o.promise.then(function(){return i(null)},function(e){return i(e)});return e.finally(()=>{var e;a.width=0,a.height=0,this.linkService.isPageCached(this.id)||null!=(e=this.pdfPage)&&e.cleanup()}),e}setImage(e){var t,i;this.renderingState===c.RenderingStates.INITIAL&&({thumbnailCanvas:e,pdfPage:t,scale:i}=e,e)&&(this.pdfPage||this.setPdfPage(t),i<this.scale||(this.renderingState=c.RenderingStates.FINISHED,this._convertCanvasToImage(e)))}_reduceImage(i){var{ctx:n,canvas:a}=this._getPageDrawContext();if(i.width<=2*a.width)n.drawImage(i,0,0,i.width,i.height,0,0,a.width,a.height);else{let e=a.width<<3,t=a.height<<3;for(var[s,r]=h.getCanvas(e,t);e>i.width||t>i.height;)e>>=1,t>>=1;for(r.drawImage(i,0,0,i.width,i.height,0,0,e,t);e>2*a.width;)r.drawImage(s,0,0,e,t,0,0,e>>1,t>>1),e>>=1,t>>=1;n.drawImage(s,0,0,e,t,0,0,a.width,a.height)}return a}get _thumbPageTitle(){return this.l10n.get("thumb_page_title",{page:this.pageLabel??this.id})}get _thumbPageCanvas(){return this.l10n.get("thumb_page_canvas",{page:this.pageLabel??this.id})}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,this._thumbPageTitle.then(e=>{this.anchor.title=e}),this.renderingState===c.RenderingStates.FINISHED&&this._thumbPageCanvas.then(e=>{var t;null!=(t=this.image)&&t.setAttribute("aria-label",e)})}}},(O,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PagesCountLimit=e.PDFViewer=e.PDFPageViewBuffer=void 0;var m=t(5),_=t(1),V=t(30),F=t(32),u=t(31),R=t(33),W=t(23),U=t(3),H=t(35),z=t(36),j=t(37),G=t(38);function i(e,t){a(e,t),t.add(e)}function n(e,t,i){a(e,t),t.set(e,i)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function w(e,t){t=s(e,t,"get");return t.get?t.get.call(e):t.value}function b(e,t,i){t=s(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function s(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}const r="enablePermissions",y={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};function P(e){return Object.values(m.AnnotationEditorType).includes(e)&&e!==m.AnnotationEditorType.DISABLE}e.PagesCountLimit=y;var o=new WeakMap,l=new WeakMap,h=new WeakSet;class d{constructor(e){i(this,h),n(this,o,{writable:!0,value:new Set}),n(this,l,{writable:!0,value:0}),b(this,l,e)}push(e){var t=w(this,o);t.has(e)&&t.delete(e),t.add(e),t.size>w(this,l)&&v(this,h,c).call(this)}resize(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=(b(this,l,e),w(this,o));if(t){var n=i.size;let e=1;for(const a of i)if(t.has(a.id)&&(i.delete(a),i.add(a)),++e>n)break}for(;i.size>w(this,l);)v(this,h,c).call(this)}has(e){return w(this,o).has(e)}[Symbol.iterator](){return w(this,o).keys()}}function c(){var e=w(this,o).keys().next().value;null!=e&&e.destroy(),w(this,o).delete(e)}e.PDFPageViewBuffer=d;var E=new WeakMap,S=new WeakMap,L=new WeakMap,p=new WeakMap,C=new WeakMap,g=new WeakMap,f=new WeakMap,T=new WeakMap,M=new WeakSet,I=new WeakSet,A=new WeakSet,k=new WeakSet,D=new WeakSet,N=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet;function Z(e){var t={annotationEditorMode:w(this,S),annotationMode:w(this,p),textLayerMode:this.textLayerMode};return e&&(e.includes(m.PermissionFlag.COPY)||this.viewer.classList.add(r),e.includes(m.PermissionFlag.MODIFY_CONTENTS)||(t.annotationEditorMode=m.AnnotationEditorType.DISABLE),e.includes(m.PermissionFlag.MODIFY_ANNOTATIONS)||e.includes(m.PermissionFlag.FILL_INTERACTIVE_FORMS)||w(this,p)!==m.AnnotationMode.ENABLE_FORMS||(t.annotationMode=m.AnnotationMode.ENABLE)),t}function Q(){var e;return"hidden"!==document.visibilityState&&this.container.offsetParent&&0!==this._getVisiblePages().views.length?(e=new Promise(e=>{b(this,T,()=>{"hidden"===document.visibilityState&&(e(),document.removeEventListener("visibilitychange",w(this,T)),b(this,T,null))}),document.addEventListener("visibilitychange",w(this,T))}),Promise.race([this._onePageRenderedCapability.promise,e])):Promise.resolve()}function x(){if(this._scrollMode!==_.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var e=this._currentPageNumber,t=w(this,f),i=this.viewer;if(i.textContent="",t.pages.length=0,this._spreadMode!==_.SpreadMode.NONE||this.isInPresentationMode){var n=new Set,a=this._spreadMode-1,s=(-1==a?n.add(e-1):e%2!=a?(n.add(e-1),n.add(e)):(n.add(e-2),n.add(e-1)),document.createElement("div"));s.className="spread",this.isInPresentationMode&&((a=document.createElement("div")).className="dummyPage",s.append(a));for(const o of n){var r=this._pages[o];r&&(s.append(r.div),t.pages.push(r))}i.append(s)}else{a=this._pages[e-1];i.append(a.div),t.pages.push(a)}t.scrollDown=e>=t.previousPageNumber,t.previousPageNumber=e}function B(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;var i,n,a,{div:e,id:s}=e;this._scrollMode===_.ScrollMode.PAGE&&(this._setCurrentPageNumber(s),v(this,A,x).call(this),this.update()),!t&&!this.isInPresentationMode&&(i=(s=e.offsetLeft+e.clientLeft)+e.clientWidth,{scrollLeft:n,clientWidth:a}=this.container,this._scrollMode===_.ScrollMode.HORIZONTAL||s<n||n+a<i)&&(t={left:0,top:0}),(0,_.scrollIntoView)(e,t)}function q(e){return e===this._currentScale||Math.abs(e-this._currentScale)<1e-15}function Y(){var e=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0),v(this,k,B).call(this,e)}async function J(e){if(e.pdfPage)return e.pdfPage;try{var t,i,n=await this.pdfDocument.getPage(e.id);return e.pdfPage||e.setPdfPage(n),null!=(t=(i=this.linkService)._cachedPageNumber)&&t.call(i,n.ref)||this.linkService.cachePageRef(e.id,n.ref),n}catch(e){return console.error("Unable to get page for page view",e),null}}function ee(e){var t;if(1===(null==(t=e.first)?void 0:t.id))return!0;if((null==(t=e.last)?void 0:t.id)===this.pagesCount)return!1;switch(this._scrollMode){case _.ScrollMode.PAGE:return w(this,f).scrollDown;case _.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}function te(e){for(const i of e){var t=this._pages[i-1];null!=t&&t.toggleLoadingIconSpinner(!0)}for(const n of w(this,E))e.has(n.id)||n.toggleLoadingIconSpinner(!1)}e.PDFViewer=class{constructor(e){i(this,X),i(this,$),i(this,K),i(this,N),i(this,D),i(this,k),i(this,A),i(this,I),i(this,M),n(this,E,{writable:!0,value:null}),n(this,S,{writable:!0,value:m.AnnotationEditorType.NONE}),n(this,L,{writable:!0,value:null}),n(this,p,{writable:!0,value:m.AnnotationMode.ENABLE_FORMS}),n(this,C,{writable:!0,value:!1}),n(this,g,{writable:!0,value:0}),n(this,f,{writable:!0,value:null}),n(this,T,{writable:!0,value:null});var t="3.0.279";if(m.version!==t)throw new Error(`The API version "${m.version}" does not match the Viewer version "${t}".`);if(this.container=e.container,this.viewer=e.viewer||e.container.firstElementChild,"DIV"!==(null==(t=this.container)?void 0:t.tagName.toUpperCase())||"DIV"!==(null==(t=this.viewer)?void 0:t.tagName.toUpperCase()))throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&"absolute"!==getComputedStyle(this.container).position)throw new Error("The `container` must be absolutely positioned.");this.eventBus=e.eventBus,this.linkService=e.linkService||new U.SimpleLinkService,this.downloadManager=e.downloadManager||null,this.findController=e.findController||null,this._scriptingManager=e.scriptingManager||null,this.removePageBorders=e.removePageBorders||!1,this.textLayerMode=e.textLayerMode??_.TextLayerMode.ENABLE,b(this,p,e.annotationMode??m.AnnotationMode.ENABLE_FORMS),b(this,S,e.annotationEditorMode??m.AnnotationEditorType.NONE),this.imageResourcesPath=e.imageResourcesPath||"",this.enablePrintAutoRotate=e.enablePrintAutoRotate||!1,this.renderer=e.renderer||_.RendererType.CANVAS,this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels,this.l10n=e.l10n||u.NullL10n,b(this,C,e.enablePermissions||!1),this.pageColors=e.pageColors||null,!this.pageColors||CSS.supports("color",this.pageColors.background)&&CSS.supports("color",this.pageColors.foreground)||((this.pageColors.background||this.pageColors.foreground)&&console.warn("PDFViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."),this.pageColors=null),this.defaultRenderingQueue=!e.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new W.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=e.renderingQueue,this.scroll=(0,_.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=_.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),this.updateContainerHeightCss()}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every(function(e){return null==e?void 0:e.pdfPage})}get renderForms(){return w(this,p)===m.AnnotationMode.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e))throw new Error("Invalid page number.");this.pdfDocument&&!this._setCurrentPageNumber(e,!0)&&console.error(`currentPageNumber: "${e}" is not a valid page.`)}_setCurrentPageNumber(e){var t,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(this._currentPageNumber!==e){if(!(0<e&&e<=this.pagesCount))return!1;var n=this._currentPageNumber;this._currentPageNumber=e,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:(null==(t=this._pageLabels)?void 0:t[e-1])??null,previous:n})}return i&&v(this,N,Y).call(this),!0}get currentPageLabel(){var e;return(null==(e=this._pageLabels)?void 0:e[this._currentPageNumber-1])??null}set currentPageLabel(t){if(this.pdfDocument){let e=0|t;var i;this._pageLabels&&0<=(i=this._pageLabels.indexOf(t))&&(e=i+1),this._setCurrentPageNumber(e,!0)||console.error(`currentPageLabel: "${t}" is not a valid page.`)}}get currentScale(){return this._currentScale!==_.UNKNOWN_SCALE?this._currentScale:_.DEFAULT_SCALE}set currentScale(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){this.pdfDocument&&this._setScale(e,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,_.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument&&((e%=360)<0&&(e+=360),this._pagesRotation!==e)){this._pagesRotation=e;var t=this._currentPageNumber,i={rotation:e};for(const n of this._pages)n.update(i);this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t}),this.defaultRenderingQueue&&this.update()}}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}setDocument(u){if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),null!=(e=this.findController)&&e.setDocument(null),null!=(e=this._scriptingManager)&&e.setDocument(null),w(this,L))&&(w(this,L).destroy(),b(this,L,null)),this.pdfDocument=u){const p=u.isPureXfa,g=u.numPages;var e=u.getPage(1);const f=u.getOptionalContentConfig();var t,i=w(this,C)?u.getPermissions():Promise.resolve();g>y.FORCE_SCROLL_MODE_PAGE&&(console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document."),t=this._scrollMode=_.ScrollMode.PAGE,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t})),this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:g})},()=>{}),this._onBeforeDraw=e=>{e=this._pages[e.pageNumber-1];e&&w(this,E).push(e)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=e=>{e.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:e.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,w(this,T)&&(document.removeEventListener("visibilitychange",w(this,T)),b(this,T,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([e,i]).then(e=>{var[e,t]=e;if(u===this.pdfDocument){this._firstPageCapability.resolve(e),this._optionalContentConfigPromise=f;var{annotationEditorMode:t,annotationMode:i,textLayerMode:n}=v(this,M,Z).call(this,t),a=(t!==m.AnnotationEditorType.DISABLE&&(t=t,p?console.warn("Warning: XFA-editing is not implemented."):P(t)?(b(this,L,new m.AnnotationEditorUIManager(this.container,this.eventBus)),t!==m.AnnotationEditorType.NONE&&w(this,L).updateMode(t)):console.error("Invalid AnnotationEditor mode: "+t)),this._scrollMode===_.ScrollMode.PAGE?null:this.viewer),s=this.currentScale,r=e.getViewport({scale:s*m.PixelsPerInch.PDF_TO_CSS_UNITS}),o=n===_.TextLayerMode.DISABLE||p?null:this,l=i!==m.AnnotationMode.DISABLE?this:null,h=p?this:null,d=w(this,L)?this:null;for(let e=1;e<=g;++e){var c=new R.PDFPageView({container:a,eventBus:this.eventBus,id:e,scale:s,defaultViewport:r.clone(),optionalContentConfigPromise:f,renderingQueue:this.renderingQueue,textLayerFactory:o,textLayerMode:n,annotationLayerFactory:l,annotationMode:i,xfaLayerFactory:h,annotationEditorLayerFactory:d,textHighlighterFactory:this,structTreeLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderer:this.renderer,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n});this._pages.push(c)}t=this._pages[0];t&&(t.setPdfPage(e),this.linkService.cachePageRef(1,e.ref)),this._scrollMode===_.ScrollMode.PAGE?v(this,A,x).call(this):this._spreadMode!==_.SpreadMode.NONE&&this._updateSpreadMode(),v(this,I,Q).call(this).then(async()=>{var e;if(null!=(e=this.findController)&&e.setDocument(u),null!=(e=this._scriptingManager)&&e.setDocument(u),w(this,L)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:w(this,S)}),u.loadingParams.disableAutoFetch||g>y.FORCE_LAZY_PAGE_INIT)this._pagesCapability.resolve();else{let n=g-1;if(n<=0)this._pagesCapability.resolve();else for(let i=2;i<=g;++i){var t=u.getPage(i).then(e=>{var t=this._pages[i-1];t.pdfPage||t.setPdfPage(e),this.linkService.cachePageRef(i,e.ref),0==--n&&this._pagesCapability.resolve()},e=>{console.error(`Unable to get page ${i} to initialize viewer`,e),0==--n&&this._pagesCapability.resolve()});i%y.PAUSE_EAGER_PAGE_INIT==0&&await t}}}),this.eventBus.dispatch("pagesinit",{source:this}),u.getMetadata().then(e=>{e=e.info;u===this.pdfDocument&&e.Language&&(this.viewer.lang=e.Language)}),this.defaultRenderingQueue&&this.update()}}).catch(e=>{console.error("Unable to initialize viewer",e),this._pagesCapability.reject(e)})}}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let e=0,t=this._pages.length;e<t;e++){var i;this._pages[e].setPageLabel((null==(i=this._pageLabels)?void 0:i[e])??null)}}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=_.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,b(this,E,new d(10)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=(0,m.createPromiseCapability)(),this._onePageRenderedCapability=(0,m.createPromiseCapability)(),this._pagesCapability=(0,m.createPromiseCapability)(),this._scrollMode=_.ScrollMode.VERTICAL,this._previousScrollMode=_.ScrollMode.UNKNOWN,this._spreadMode=_.SpreadMode.NONE,b(this,f,{previousPageNumber:1,scrollDown:!0,pages:[]}),this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),w(this,T)&&(document.removeEventListener("visibilitychange",w(this,T)),b(this,T,null)),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),this.viewer.classList.remove(r)}_scrollUpdate(){0!==this.pagesCount&&this.update()}_setScaleUpdatePages(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(this._currentScaleValue=t.toString(),v(this,D,q).call(this,e))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{_.docStyle.setProperty("--scale-factor",e*m.PixelsPerInch.PDF_TO_CSS_UNITS);var a={scale:e};for(const s of this._pages)s.update(a);if(this._currentScale=e,!i){let e=this._currentPageNumber,t;!this._location||this.isInPresentationMode||this.isChangingPresentationMode||(e=this._location.pageNumber,t=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:e,destArray:t,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:n?t:void 0}),this.defaultRenderingQueue&&this.update(),this.updateContainerHeightCss()}}get _pageWidthScaleFactor(){return this._spreadMode!==_.SpreadMode.NONE&&this._scrollMode!==_.ScrollMode.HORIZONTAL?2:1}_setScale(i){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];let a=parseFloat(i);if(0<a)this._setScaleUpdatePages(a,i,n,!1);else{var s=this._pages[this._currentPageNumber-1];if(s){let e=_.SCROLLBAR_PADDING,t=_.VERTICAL_PADDING;this.isInPresentationMode?e=t=4:this.removePageBorders?e=t=0:this._scrollMode===_.ScrollMode.HORIZONTAL&&([e,t]=[t,e]);var r=(this.container.clientWidth-e)/s.width*s.scale/this._pageWidthScaleFactor,o=(this.container.clientHeight-t)/s.height*s.scale;switch(i){case"page-actual":a=1;break;case"page-width":a=r;break;case"page-height":a=o;break;case"page-fit":a=Math.min(r,o);break;case"auto":var l=(0,_.isPortraitOrientation)(s)?r:Math.min(o,r);a=Math.min(_.MAX_AUTO_SCALE,l);break;default:return void console.error(`_setScale: "${i}" is an unknown zoom value.`)}this._setScaleUpdatePages(a,i,n,!0)}}}pageLabelToPageNumber(e){return!this._pageLabels||(e=this._pageLabels.indexOf(e))<0?null:e+1}scrollPageIntoView(e){var{pageNumber:e,destArray:o=null,allowNegativeOffset:l=!1,ignoreDestinationZoom:h=!1}=e;if(this.pdfDocument){var d=Number.isInteger(e)&&this._pages[e-1];if(d)if(this.isInPresentationMode||!o)this._setCurrentPageNumber(e,!0);else{let i=0,n=0,a=0,s=0,e,t;var c=d.rotation%180!=0,u=(c?d.height:d.width)/d.scale/m.PixelsPerInch.PDF_TO_CSS_UNITS,p=(c?d.width:d.height)/d.scale/m.PixelsPerInch.PDF_TO_CSS_UNITS;let r=0;switch(o[1].name){case"XYZ":i=o[2],n=o[3],r=o[4],i=null!==i?i:0,n=null!==n?n:p;break;case"Fit":case"FitB":r="page-fit";break;case"FitH":case"FitBH":n=o[2],r="page-width",null===n&&this._location?(i=this._location.left,n=this._location.top):("number"!=typeof n||n<0)&&(n=p);break;case"FitV":case"FitBV":i=o[2],a=u,s=p,r="page-height";break;case"FitR":i=o[2],n=o[3],a=o[4]-i,s=o[5]-n;var g=this.removePageBorders?0:_.SCROLLBAR_PADDING,f=this.removePageBorders?0:_.VERTICAL_PADDING;e=(this.container.clientWidth-g)/a/m.PixelsPerInch.PDF_TO_CSS_UNITS,t=(this.container.clientHeight-f)/s/m.PixelsPerInch.PDF_TO_CSS_UNITS,r=Math.min(Math.abs(e),Math.abs(t));break;default:return void console.error(`scrollPageIntoView: "${o[1].name}" is not a valid destination type.`)}if(h||(r&&r!==this._currentScale?this.currentScaleValue=r:this._currentScale===_.UNKNOWN_SCALE&&(this.currentScaleValue=_.DEFAULT_SCALE_VALUE)),"page-fit"!==r||o[4]){c=[d.viewport.convertToViewportPoint(i,n),d.viewport.convertToViewportPoint(i+a,n+s)];let e=Math.min(c[0][0],c[1][0]),t=Math.min(c[0][1],c[1][1]);l||(e=Math.max(e,0),t=Math.max(t,0)),v(this,k,B).call(this,d,{left:e,top:t})}else v(this,k,B).call(this,d)}else console.error(`scrollPageIntoView: "${e}" is not a valid pageNumber parameter.`)}}_updateLocation(e){var t=this._currentScale,i=this._currentScaleValue,t=parseFloat(i)===t?Math.round(1e4*t)/100:i,i=e.id,n=this._pages[i-1],a=this.container,n=n.getPagePoint(a.scrollLeft-e.x,a.scrollTop-e.y),a=Math.round(n[0]),e=Math.round(n[1]);let s="#page="+i;this.isInPresentationMode||(s+=`&zoom=${t},${a},`+e),this._location={pageNumber:i,scale:t,top:e,left:a,rotation:this._pagesRotation,pdfOpenParams:s}}update(){var t=this._getVisiblePages(),i=t.views,n=i.length;if(0!==n){var n=Math.max(10,2*n+1),a=(w(this,E).resize(n,t.ids),this.renderingQueue.renderHighestPriority(t),this._spreadMode===_.SpreadMode.NONE&&(this._scrollMode===_.ScrollMode.PAGE||this._scrollMode===_.ScrollMode.VERTICAL)),s=this._currentPageNumber;let e=!1;for(const r of i){if(r.percent<100)break;if(r.id===s&&a){e=!0;break}}this._setCurrentPageNumber(e?s:i[0].id),this._updateLocation(t.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isContainerRtl(){return"rtl"===getComputedStyle(this.container).direction}get isInPresentationMode(){return this.presentationModeState===_.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===_.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){var e=this._scrollMode===_.ScrollMode.PAGE?w(this,f).pages:this._pages,t=this._scrollMode===_.ScrollMode.HORIZONTAL,i=t&&this._isContainerRtl;return(0,_.getVisibleElements)({scrollEl:this.container,views:e,sortByVisibility:!0,horizontal:t,rtl:i})}isPageVisible(e){return!!this.pdfDocument&&(Number.isInteger(e)&&0<e&&e<=this.pagesCount?this._getVisiblePages().ids.has(e):(console.error(`isPageVisible: "${e}" is not a valid page.`),!1))}isPageCached(e){var t;return!!this.pdfDocument&&(Number.isInteger(e)&&0<e&&e<=this.pagesCount?(t=this._pages[e-1],w(this,E).has(t)):(console.error(`isPageCached: "${e}" is not a valid page.`),!1))}cleanup(){for(const e of this._pages)e.renderingState!==_.RenderingStates.FINISHED&&e.reset()}_cancelRendering(){for(const e of this._pages)e.cancelRendering()}forceRendering(e){var e=e||this._getVisiblePages(),t=v(this,$,ee).call(this,e),i=this._spreadMode!==_.SpreadMode.NONE&&this._scrollMode!==_.ScrollMode.HORIZONTAL;const n=this.renderingQueue.getHighestPriority(e,this._pages,t,i);return v(this,X,te).call(this,e.ids),!!n&&(v(this,K,J).call(this,n).then(()=>{this.renderingQueue.renderView(n)}),!0)}createTextLayerBuilder(e){var{textLayerDiv:e,pageIndex:t,viewport:i,eventBus:n,highlighter:a,accessibilityManager:s=null}=e;return new j.TextLayerBuilder({textLayerDiv:e,eventBus:n,pageIndex:t,viewport:i,highlighter:a,accessibilityManager:s})}createTextHighlighter(e){var{pageIndex:e,eventBus:t}=e;return new z.TextHighlighter({eventBus:t,pageIndex:e,findController:this.isInPresentationMode?null:this.findController})}createAnnotationLayerBuilder(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null==(i=this.pdfDocument)?void 0:i.annotationStorage,imageResourcesPath:n="",renderForms:a=!0,l10n:s=u.NullL10n,enableScripting:r=this.enableScripting,hasJSActionsPromise:o=null==(o=this.pdfDocument)?void 0:o.hasJSActions(),mouseState:l=null==(l=this._scriptingManager)?void 0:l.mouseState,fieldObjectsPromise:h=null==(h=this.pdfDocument)?void 0:h.getFieldObjects(),annotationCanvasMap:d=null,accessibilityManager:c=null}=e;return new F.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:i,imageResourcesPath:n,renderForms:a,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s,enableScripting:r,hasJSActionsPromise:o,mouseState:l,fieldObjectsPromise:h,annotationCanvasMap:d,accessibilityManager:c})}createAnnotationEditorLayerBuilder(e){var{uiManager:e=w(this,L),pageDiv:t,pdfPage:i,accessibilityManager:n=null,l10n:a,annotationStorage:s=null==(s=this.pdfDocument)?void 0:s.annotationStorage}=e;return new V.AnnotationEditorLayerBuilder({uiManager:e,pageDiv:t,pdfPage:i,annotationStorage:s,accessibilityManager:n,l10n:a})}createXfaLayerBuilder(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null==(i=this.pdfDocument)?void 0:i.annotationStorage}=e;return new G.XfaLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:i,linkService:this.linkService})}createStructTreeLayerBuilder(e){e=e.pdfPage;return new H.StructTreeLayerBuilder({pdfPage:e})}get hasEqualPageSizes(){var i=this._pages[0];for(let e=1,t=this._pages.length;e<t;++e){var n=this._pages[e];if(n.width!==i.width||n.height!==i.height)return!1}return!0}getPagesOverview(){return this._pages.map(e=>{e=e.pdfPage.getViewport({scale:1});return!this.enablePrintAutoRotate||(0,_.isPortraitOrientation)(e)?{width:e.width,height:e.height,rotation:e.rotation}:{width:e.height,height:e.width,rotation:(e.rotation-90)%360}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise||(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)}set optionalContentConfigPromise(e){if(!(e instanceof Promise))throw new Error("Invalid optionalContentConfigPromise: "+e);if(this.pdfDocument&&this._optionalContentConfigPromise){var t={optionalContentConfigPromise:this._optionalContentConfigPromise=e};for(const i of this._pages)i.update(t);this.update(),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:e})}}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!(0,_.isValidScrollMode)(e))throw new Error("Invalid scroll mode: "+e);this.pagesCount>y.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",t===_.ScrollMode.HORIZONTAL),i.classList.toggle("scrollWrapped",t===_.ScrollMode.WRAPPED),this.pdfDocument&&e&&(t===_.ScrollMode.PAGE?v(this,A,x).call(this):this._previousScrollMode===_.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode!==e){if(!(0,_.isValidSpreadMode)(e))throw new Error("Invalid spread mode: "+e);this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var n=this.viewer,a=this._pages;if(this._scrollMode===_.ScrollMode.PAGE)v(this,A,x).call(this);else if(n.textContent="",this._spreadMode===_.SpreadMode.NONE)for(const t of this._pages)n.append(t.div);else{var s=this._spreadMode-1;let i=null;for(let e=0,t=a.length;e<t;++e)null===i?((i=document.createElement("div")).className="spread",n.append(i)):e%2==s&&(i=i.cloneNode(!1),n.append(i)),i.append(a[e].div)}e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}}_getPageAdvance(i){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];switch(this._scrollMode){case _.ScrollMode.WRAPPED:var t,n,a,s,r=this._getVisiblePages()["views"],o=new Map;for({id:t,y:n,percent:a,widthPercent:s}of r)if(!(0===a||s<100)){let e=o.get(n);e||o.set(n,e=e||[]),e.push(t)}for(const w of o.values()){var l=w.indexOf(i);if(-1!==l){var h=w.length;if(1===h)break;if(e)for(let e=l-1;0<=e;e--){var d=w[e],c=w[e+1]-1;if(d<c)return i-c}else for(let e=l+1,t=h;e<t;e++){var u=w[e],p=w[e-1]+1;if(p<u)return p-i}if(e){l=w[0];if(l<i)return i-l+1}else{l=w[h-1];if(i<l)return l-i+1}break}}break;case _.ScrollMode.HORIZONTAL:break;case _.ScrollMode.PAGE:case _.ScrollMode.VERTICAL:if(this._spreadMode!==_.SpreadMode.NONE){r=this._spreadMode-1;if((!e||i%2==r)&&(e||i%2!=r)){var g,f,m,r=this._getVisiblePages()["views"],v=e?i-1:i+1;for({id:g,percent:f,widthPercent:m}of r)if(g===v){if(0<f&&100===m)return 2;break}}}}return 1}nextPage(){var e,t=this._currentPageNumber,i=this.pagesCount;return!(i<=t||(e=this._getPageAdvance(t,!1)||1,this.currentPageNumber=Math.min(t+e,i),0))}previousPage(){var e,t=this._currentPageNumber;return!(t<=1||(e=this._getPageAdvance(t,!0)||1,this.currentPageNumber=Math.max(t-e,1),0))}increaseScale(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=this._currentScale;for(;t=(t*_.DEFAULT_SCALE_DELTA).toFixed(2),t=Math.ceil(10*t)/10,t=Math.min(_.MAX_SCALE,t),0<--e&&t<_.MAX_SCALE;);this.currentScaleValue=t}decreaseScale(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=this._currentScale;for(;t=(t/_.DEFAULT_SCALE_DELTA).toFixed(2),t=Math.floor(10*t)/10,t=Math.max(_.MIN_SCALE,t),0<--e&&t>_.MIN_SCALE;);this.currentScaleValue=t}updateContainerHeightCss(){var e=this.container.clientHeight;e!==w(this,g)&&(b(this,g,e),_.docStyle.setProperty("--viewer-container-height",e+"px"))}get annotationEditorMode(){return w(this,L)?w(this,S):m.AnnotationEditorType.DISABLE}set annotationEditorMode(e){if(!w(this,L))throw new Error("The AnnotationEditor is not enabled.");if(w(this,S)!==e){if(!P(e))throw new Error("Invalid AnnotationEditor mode: "+e);this.pdfDocument&&(b(this,S,e),this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:e}),w(this,L).updateMode(e))}}set annotationEditorParams(e){var{type:e,value:t}=e;if(!w(this,L))throw new Error("The AnnotationEditor is not enabled.");w(this,L).updateParams(e,t)}refresh(){if(this.pdfDocument){var e={};for(const t of this._pages)t.update(e);this.update()}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayerBuilder=void 0;var a=i(5),n=i(31);function s(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function r(e,t,i){t=o(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function o(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var l=new WeakMap;t.AnnotationEditorLayerBuilder=class{constructor(e){s(this,l,{writable:!0,value:void 0}),this.pageDiv=e.pageDiv,this.pdfPage=e.pdfPage,this.annotationStorage=e.annotationStorage||null,this.accessibilityManager=e.accessibilityManager,this.l10n=e.l10n||n.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,r(this,l,e.uiManager)}async render(e){var t,i,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"display";"display"!==n||this._cancelled||(e=e.clone({dontFlip:!0}),this.div?(this.annotationEditorLayer.update({viewport:e}),this.show()):(this.div=document.createElement("div"),this.div.className="annotationEditorLayer",this.div.tabIndex=0,this.pageDiv.append(this.div),this.annotationEditorLayer=new a.AnnotationEditorLayer({uiManager:(t=o(i=this,t=l,"get")).get?t.get.call(i):t.value,div:this.div,annotationStorage:this.annotationStorage,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage._pageIndex,l10n:this.l10n,viewport:e}),i={viewport:e,div:this.div,annotations:null,intent:n},this.annotationEditorLayer.render(i)))}cancel(){this._cancelled=!0,this.destroy()}hide(){this.div&&(this.div.hidden=!0)}show(){this.div&&(this.div.hidden=!1)}destroy(){this.div&&(this.pageDiv=null,this.annotationEditorLayer.destroy(),this.div.remove())}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.fixupLangCode=function(e){return a[null==e?void 0:e.toLowerCase()]||e},t.getL10nFallback=n;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading:"Loading…",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image"};function n(e,t){switch(e){case"find_match_count":e=`find_match_count[${1===t.total?"one":"other"}]`;break;case"find_match_count_limit":e=`find_match_count_limit[${1===t.limit?"one":"other"}]`}return i[e]||""}i.print_progress_percent="{{progress}}%";const a={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};t.NullL10n={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e){var i,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:n(e,t);return e=e,(i=t)?e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,t)=>t in i?i[t]:"{{"+t+"}}"):e},async translate(e){}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayerBuilder=void 0;var a=i(5),g=i(31);t.AnnotationLayerBuilder=class{constructor(e){var{pageDiv:e,pdfPage:t,linkService:i,downloadManager:n,annotationStorage:a=null,imageResourcesPath:s="",renderForms:r=!0,l10n:o=g.NullL10n,enableScripting:l=!1,hasJSActionsPromise:h=null,fieldObjectsPromise:d=null,mouseState:c=null,annotationCanvasMap:u=null,accessibilityManager:p=null}=e;this.pageDiv=e,this.pdfPage=t,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=s,this.renderForms=r,this.l10n=o,this.annotationStorage=a,this.enableScripting=l,this._hasJSActionsPromise=h,this._fieldObjectsPromise=d,this._mouseState=c,this._annotationCanvasMap=u,this._accessibilityManager=p,this.div=null,this._cancelled=!1}async render(e){var[t,i=!1,n=null]=await Promise.all([this.pdfPage.getAnnotations({intent:1<arguments.length&&void 0!==arguments[1]?arguments[1]:"display"}),this._hasJSActionsPromise,this._fieldObjectsPromise]);this._cancelled||0===t.length||(e={viewport:e.clone({dontFlip:!0}),div:this.div,annotations:t,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:i,fieldObjects:n,mouseState:this._mouseState,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager},this.div?a.AnnotationLayer.update(e):(this.div=document.createElement("div"),this.div.className="annotationLayer",this.pageDiv.append(this.div),e.div=this.div,a.AnnotationLayer.render(e),this.l10n.translate(this.div)))}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPageView=void 0;var c=i(5),u=i(1),n=i(2),s=i(31),d=i(34);function r(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function p(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}const l=n.compatibilityParams.maxCanvasPixels||16777216;var g=new WeakMap,f=new WeakMap;t.PDFPageView=class{constructor(e){r(this,g,{writable:!0,value:c.AnnotationMode.ENABLE_FORMS}),r(this,f,{writable:!0,value:{initialOptionalContent:!0,regularAnnotations:!0}});var t=e.container,i=e.defaultViewport;this.id=e.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=e.scale||u.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this._optionalContentConfigPromise=e.optionalContentConfigPromise||null,this.hasRestrictedScaling=!1,this.textLayerMode=e.textLayerMode??u.TextLayerMode.ENABLE,o(this,g,e.annotationMode??c.AnnotationMode.ENABLE_FORMS),this.imageResourcesPath=e.imageResourcesPath||"",this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels||l,this.pageColors=e.pageColors||null,this.eventBus=e.eventBus,this.renderingQueue=e.renderingQueue,this.textLayerFactory=e.textLayerFactory,this.annotationLayerFactory=e.annotationLayerFactory,this.annotationEditorLayerFactory=e.annotationEditorLayerFactory,this.xfaLayerFactory=e.xfaLayerFactory,this.textHighlighter=null==(i=e.textHighlighterFactory)?void 0:i.createTextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus}),this.structTreeLayerFactory=e.structTreeLayerFactory,this.renderer=e.renderer||u.RendererType.CANVAS,this.l10n=e.l10n||s.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=u.RenderingStates.INITIAL,this.resume=null,this._renderError=null,this._isStandalone=!(null!=(i=this.renderingQueue)&&i.hasViewer()),this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;const n=document.createElement("div");if(n.className="page",n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px",n.setAttribute("data-page-number",this.id),n.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(e=>{n.setAttribute("aria-label",e)}),this.div=n,null!=t&&t.append(n),this._isStandalone){const a=e["optionalContentConfigPromise"];a&&a.then(e=>{a===this._optionalContentConfigPromise&&(p(this,f).initialOptionalContent=e.hasInitialVisibility)})}}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;var t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*c.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:t}),this.reset()}destroy(){var e;this.reset(),null!=(e=this.pdfPage)&&e.cleanup()}async _renderAnnotationLayer(){let t=null;try{await this.annotationLayer.render(this.viewport,"display")}catch(e){console.error(`_renderAnnotationLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:t})}}async _renderAnnotationEditorLayer(){let t=null;try{await this.annotationEditorLayer.render(this.viewport,"display")}catch(e){console.error(`_renderAnnotationEditorLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:t})}}async _renderXfaLayer(){let t=null;try{var e=await this.xfaLayer.render(this.viewport,"display");null!=e&&e.textDivs&&this.textHighlighter&&this._buildXfaTextContentItems(e.textDivs)}catch(e){console.error(`_renderXfaLayer: "${e}".`),t=e}finally{this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:t})}}async _buildXfaTextContentItems(e){var t=[];for(const i of(await this.pdfPage.getTextContent()).items)t.push(i.str);this.textHighlighter.setTextMapping(e,t),this.textHighlighter.enable()}_resetZoomLayer(){var e,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.zoomLayer&&(e=this.zoomLayer.firstChild,this.paintedViewportMap.delete(e),e.width=0,e.height=0,t&&this.zoomLayer.remove(),this.zoomLayer=null)}reset(){var{keepZoomLayer:e=!1,keepAnnotationLayer:t=!1,keepAnnotationEditorLayer:i=!1,keepXfaLayer:n=!1}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=(this.cancelRendering({keepAnnotationLayer:t,keepAnnotationEditorLayer:i,keepXfaLayer:n}),this.renderingState=u.RenderingStates.INITIAL,this.div),s=(a.style.width=Math.floor(this.viewport.width)+"px",a.style.height=Math.floor(this.viewport.height)+"px",a.childNodes),r=e&&this.zoomLayer||null,o=t&&(null==(e=this.annotationLayer)?void 0:e.div)||null,l=i&&(null==(t=this.annotationEditorLayer)?void 0:t.div)||null,h=n&&(null==(e=this.xfaLayer)?void 0:e.div)||null;for(let e=s.length-1;0<=e;e--){var d=s[e];switch(d){case r:case o:case l:case h:continue}d.remove()}a.removeAttribute("data-loaded"),o&&this.annotationLayer.hide(),l?this.annotationEditorLayer.hide():null!=(i=this.annotationEditorLayer)&&i.destroy(),h&&this.xfaLayer.hide(),r||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon notVisible",this._isStandalone&&this.toggleLoadingIconSpinner(!0),this.loadingIconDiv.setAttribute("role","img"),this.l10n.get("loading").then(e=>{var t;null!=(t=this.loadingIconDiv)&&t.setAttribute("aria-label",e)}),a.append(this.loadingIconDiv)}update(t){let{scale:e=0,rotation:i=null,optionalContentConfigPromise:n=null}=t;this.scale=e||this.scale,"number"==typeof i&&(this.rotation=i),n instanceof Promise&&(this._optionalContentConfigPromise=n).then(e=>{n===this._optionalContentConfigPromise&&(p(this,f).initialOptionalContent=e.hasInitialVisibility)});var t=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*c.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:t}),this._isStandalone&&u.docStyle.setProperty("--scale-factor",this.viewport.scale),this.svg)this.cssTransform({target:this.svg,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0}),this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});else{let e=!1;if(this.canvas&&0<this.maxCanvasPixels&&(t=this.outputScale,(Math.floor(this.viewport.width)*t.sx|0)*(Math.floor(this.viewport.height)*t.sy|0)>this.maxCanvasPixels)&&(e=!0),this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&e)return this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0}),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});this.zoomLayer||this.canvas.hidden||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0})}}cancelRendering(){var{keepAnnotationLayer:e=!1,keepAnnotationEditorLayer:t=!1,keepXfaLayer:i=!1}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!this.annotationLayer||e&&this.annotationLayer.div||(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),!this.annotationEditorLayer||t&&this.annotationEditorLayer.div||(this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),!this.xfaLayer||i&&this.xfaLayer.div||(this.xfaLayer.cancel(),(this.xfaLayer=null)!=(e=this.textHighlighter)&&e.disable()),this._onTextLayerRendered&&(this.eventBus._off("textlayerrendered",this._onTextLayerRendered),this._onTextLayerRendered=null)}cssTransform(n){var{target:n,redrawAnnotationLayer:e=!1,redrawAnnotationEditorLayer:t=!1,redrawXfaLayer:i=!1}=n,a=this.viewport.width,s=this.viewport.height,r=this.div,r=(n.style.width=n.parentNode.style.width=r.style.width=Math.floor(a)+"px",n.style.height=n.parentNode.style.height=r.style.height=Math.floor(s)+"px",this.viewport.rotation-this.paintedViewportMap.get(n).rotation),o=Math.abs(r);let l=1,h=1;if(90!==o&&270!==o||(l=s/a,h=a/s),n.style.transform=`rotate(${r}deg) scale(${l}, ${h})`,this.textLayer){o=this.textLayer.viewport,s=this.viewport.rotation-o.rotation,n=Math.abs(s);let e=a/o.width;90!==n&&270!==n||(e=a/o.height);var d=this.textLayer.textLayerDiv;let t,i;switch(n){case 0:t=i=0;break;case 90:t=0,i="-"+d.style.height;break;case 180:t="-"+d.style.width,i="-"+d.style.height;break;case 270:t="-"+d.style.width,i=0;break;default:console.error("Bad rotation value.")}d.style.transform=`rotate(${n}deg) `+`scale(${e}) `+`translate(${t}, ${i})`,d.style.transformOrigin="0% 0%"}e&&this.annotationLayer&&this._renderAnnotationLayer(),t&&this.annotationEditorLayer&&this._renderAnnotationEditorLayer(),i&&this.xfaLayer&&this._renderXfaLayer()}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}toggleLoadingIconSpinner(){var e;null!=(e=this.loadingIconDiv)&&e.classList.toggle("notVisible",!(0<arguments.length&&void 0!==arguments[0]&&arguments[0]))}draw(){var t=this;this.renderingState!==u.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:i,pdfPage:n}=this;if(!n)return this.renderingState=u.RenderingStates.FINISHED,this.loadingIconDiv&&(this.loadingIconDiv.remove(),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=u.RenderingStates.RUNNING;var e=document.createElement("div"),a=(e.style.width=i.style.width,e.style.height=i.style.height,e.classList.add("canvasWrapper"),(null==(a=this.annotationLayer)?void 0:a.div)||(null==(a=this.annotationEditorLayer)?void 0:a.div));a?a.before(e):i.append(e);let s=null,r=(this.textLayerMode!==u.TextLayerMode.DISABLE&&this.textLayerFactory&&(this._accessibilityManager||(this._accessibilityManager=new d.TextAccessibilityManager),(h=document.createElement("div")).className="textLayer",h.style.width=e.style.width,h.style.height=e.style.height,a?a.before(h):i.append(h),s=this.textLayerFactory.createTextLayerBuilder({textLayerDiv:h,pageIndex:this.id-1,viewport:this.viewport,eventBus:this.eventBus,highlighter:this.textHighlighter,accessibilityManager:this._accessibilityManager})),this.textLayer=s,p(this,g)!==c.AnnotationMode.DISABLE&&this.annotationLayerFactory&&(this._annotationCanvasMap||(this._annotationCanvasMap=new Map),this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder({pageDiv:i,pdfPage:n,imageResourcesPath:this.imageResourcesPath,renderForms:p(this,g)===c.AnnotationMode.ENABLE_FORMS,l10n:this.l10n,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager}))),null!=(a=this.xfaLayer)&&a.div&&i.append(this.xfaLayer.div),null);this.renderingQueue&&(r=e=>{this.renderingQueue.isHighestPriority(this)?e():(this.renderingState=u.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=u.RenderingStates.RUNNING,e()})});async function o(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(l===t.paintTask&&(t.paintTask=null),e instanceof c.RenderingCancelledException)t._renderError=null;else if(t._renderError=e,t.renderingState=u.RenderingStates.FINISHED,t.loadingIconDiv&&(t.loadingIconDiv.remove(),delete t.loadingIconDiv),t._resetZoomLayer(!0),p(t,f).regularAnnotations=!l.separateAnnots,t.eventBus.dispatch("pagerendered",{source:t,pageNumber:t.id,cssTransform:!1,timestamp:performance.now(),error:t._renderError}),e)throw e}const l=this.renderer===u.RendererType.SVG?this.paintOnSvg(e):this.paintOnCanvas(e);l.onRenderContinue=r;var h=(this.paintTask=l).promise.then(()=>o(null).then(()=>{var e;s&&(e=n.streamTextContent({includeMarkedContent:!0}),s.setTextContentStream(e),s.render()),this.annotationLayer&&this._renderAnnotationLayer().then(()=>{this.annotationEditorLayerFactory&&(this.annotationEditorLayer||(this.annotationEditorLayer=this.annotationEditorLayerFactory.createAnnotationEditorLayerBuilder({pageDiv:i,pdfPage:n,l10n:this.l10n,accessibilityManager:this._accessibilityManager})),this._renderAnnotationEditorLayer())})}),function(e){return o(e)});return this.xfaLayerFactory&&(this.xfaLayer||(this.xfaLayer=this.xfaLayerFactory.createXfaLayerBuilder({pageDiv:i,pdfPage:n})),this._renderXfaLayer()),this.structTreeLayerFactory&&this.textLayer&&this.canvas&&(this._onTextLayerRendered=e=>{e.pageNumber===this.id&&(this.eventBus._off("textlayerrendered",this._onTextLayerRendered),this._onTextLayerRendered=null,this.canvas)&&this.pdfPage.getStructTree().then(e=>{e&&this.canvas&&((e=this.structTreeLayer.render(e)).classList.add("structTree"),this.canvas.append(e))})},this.eventBus._on("textlayerrendered",this._onTextLayerRendered),this.structTreeLayer=this.structTreeLayerFactory.createStructTreeLayerBuilder({pdfPage:n})),i.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),h}paintOnCanvas(e){const t=(0,c.createPromiseCapability)(),i={promise:t.promise,onRenderContinue(e){e()},cancel(){d.cancel()},get separateAnnots(){return d.separateAnnots}};var n=this.viewport;const a=document.createElement("canvas");a.setAttribute("role","presentation");let s=a.hidden=!0;function r(){s&&(a.hidden=!1,s=!1)}e.append(a);var e=(this.canvas=a).getContext("2d",{alpha:!1}),o=this.outputScale=new u.OutputScale,l=(this.useOnlyCssZoom&&(l=n.clone({scale:c.PixelsPerInch.PDF_TO_CSS_UNITS}),o.sx*=l.width/n.width,o.sy*=l.height/n.height),0<this.maxCanvasPixels&&(l=n.width*n.height,l=Math.sqrt(this.maxCanvasPixels/l),o.sx>l||o.sy>l?(o.sx=l,o.sy=l,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1),(0,u.approximateFraction)(o.sx)),h=(0,u.approximateFraction)(o.sy),l=(a.width=(0,u.roundToDivide)(n.width*o.sx,l[0]),a.height=(0,u.roundToDivide)(n.height*o.sy,h[0]),a.style.width=(0,u.roundToDivide)(n.width,l[1])+"px",a.style.height=(0,u.roundToDivide)(n.height,h[1])+"px",this.paintedViewportMap.set(a,n),o.scaled?[o.sx,0,0,o.sy,0,0]:null),h={canvasContext:e,transform:l,viewport:this.viewport,annotationMode:p(this,g),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:this.pageColors};const d=this.pdfPage.render(h);return d.onContinue=function(e){r(),i.onRenderContinue?i.onRenderContinue(e):e()},d.promise.then(function(){r(),t.resolve()},function(e){r(),t.reject(e)}),i}paintOnSvg(t){let e=!1;const i=()=>{if(e)throw new c.RenderingCancelledException("Rendering cancelled, page "+this.id,"svg")},n=this.pdfPage,a=this.viewport.clone({scale:c.PixelsPerInch.PDF_TO_CSS_UNITS});return{promise:n.getOperatorList({annotationMode:p(this,g)}).then(e=>{return i(),new c.SVGGraphics(n.commonObjs,n.objs).getSVG(e,a).then(e=>{i(),this.svg=e,this.paintedViewportMap.set(e,a),e.style.width=t.style.width,e.style.height=t.style.height,this.renderingState=u.RenderingStates.FINISHED,t.append(e)})}),onRenderContinue(e){e()},cancel(){e=!0},get separateAnnots(){return!1}}}setPageLabel(e){this.pageLabel="string"==typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){var{initialOptionalContent:e,regularAnnotations:t}=p(this,f);return e&&t?this.canvas:null}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextAccessibilityManager=void 0;var s=i(1);function n(e,t,i){a(e,t),t.set(e,i)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}function o(e,t,i){if(e!==t)throw new TypeError("Private static access of wrong provenance");return i}function l(e,t){t=d(e,t,"get");return t.get?t.get.call(e):t.value}function h(e,t,i){t=d(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function d(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var c=new WeakMap,u=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakSet;function m(e,t){var i,n,a,s,r,o,e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return 0===e.width&&0===e.height?1:0===t.width&&0===t.height||(i=e.y,n=e.y+e.height,a=e.y+e.height/2,s=t.y,r=t.y+t.height,o=t.y+t.height/2,a<=s&&n<=o)?-1:o<=i&&r<=a?1:e.x+e.width/2-(t.x+t.width/2)}function v(e,t){var i=t.getAttribute("aria-owns");null!=i&&i.includes(e)||t.setAttribute("aria-owns",i?i+" "+e:e),t.removeAttribute("role")}t.TextAccessibilityManager=class w{constructor(){var e,t;a(e=this,t=f),t.add(e),n(this,c,{writable:!0,value:!1}),n(this,u,{writable:!0,value:null}),n(this,p,{writable:!0,value:new Map}),n(this,g,{writable:!0,value:new Map})}setTextMapping(e){h(this,u,e)}enable(){if(l(this,c))throw new Error("TextAccessibilityManager is already enabled.");if(!l(this,u))throw new Error("Text divs and strings have not been set.");if(h(this,c,!0),h(this,u,l(this,u).slice()),l(this,u).sort(o(w,w,m)),0<l(this,p).size){var e,t,i=l(this,u);for([e,t]of l(this,p))document.getElementById(e)?r(this,f,v).call(this,e,i[t]):l(this,p).delete(e)}for(var[n,a]of l(this,g))this.addPointerInTextLayer(n,a);l(this,g).clear()}disable(){l(this,c)&&(l(this,g).clear(),h(this,u,null),h(this,c,!1))}removePointerInTextLayer(e){if(l(this,c)){var t=l(this,u);if(t&&0!==t.length){const n=e.id;var i=l(this,p).get(n);if(void 0!==i){t=t[i],l(this,p).delete(n);let e=t.getAttribute("aria-owns");null!=(i=e)&&i.includes(n)&&((e=e.split(" ").filter(e=>e!==n).join(" "))?t.setAttribute("aria-owns",e):(t.removeAttribute("aria-owns"),t.setAttribute("role","presentation")))}}}else l(this,g).delete(e)}addPointerInTextLayer(t,e){var i,n,a=t.id;a&&(l(this,c)?(e&&this.removePointerInTextLayer(t),(i=l(this,u))&&0!==i.length&&(n=(0,s.binarySearchFirstItem)(i,e=>o(w,w,m).call(w,t,e)<0),n=Math.max(0,n-1),r(this,f,v).call(this,a,i[n]),l(this,p).set(a,n))):l(this,g).set(t,e))}moveElementInDOM(e,t,i,n){if(this.addPointerInTextLayer(i,n),e.hasChildNodes()){if(0!==(n=Array.from(e.childNodes).filter(e=>e!==t)).length){const a=i||t;0===(i=(0,s.binarySearchFirstItem)(n,e=>o(w,w,m).call(w,a,e)<0))?n[0].before(t):n[i-1].after(t)}}else e.append(t)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructTreeLayerBuilder=void 0;const s={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},r=/^H(\d+)$/;t.StructTreeLayerBuilder=class{constructor(e){e=e.pdfPage;this.pdfPage=e}render(e){return this._walk(e)}_setAttributes(e,t){void 0!==e.alt&&t.setAttribute("aria-label",e.alt),void 0!==e.id&&t.setAttribute("aria-owns",e.id),void 0!==e.lang&&t.setAttribute("lang",e.lang)}_walk(e){if(!e)return null;var t,i,n=document.createElement("span");if("role"in e&&(t=e["role"],(i=t.match(r))?(n.setAttribute("role","heading"),n.setAttribute("aria-level",i[1])):s[t]&&n.setAttribute("role",s[t])),this._setAttributes(e,n),e.children)if(1===e.children.length&&"id"in e.children[0])this._setAttributes(e.children[0],n);else for(const a of e.children)n.append(this._walk(a));return n}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextHighlighter=void 0;t.TextHighlighter=class{constructor(e){var{findController:e,eventBus:t,pageIndex:i}=e;this.findController=e,this.matches=[],this.eventBus=t,this.pageIdx=i,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(e,t){this.textDivs=e,this.textContentItemsStr=t}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=e=>{e.pageIndex!==this.pageIdx&&-1!==e.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches)&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}_convertMatches(i,n){if(!i)return[];var a=this["textContentItemsStr"];let s=0,r=0;var o=a.length-1,l=[];for(let t=0,e=i.length;t<e;t++){let e=i[t];for(;s!==o&&e>=r+a[s].length;)r+=a[s].length,s++;s===a.length&&console.error("Could not find a matching mapping");var h={begin:{divIdx:s,offset:e-r}};for(e+=n[t];s!==o&&e>r+a[s].length;)r+=a[s].length,s++;h.end={divIdx:s,offset:e-r},l.push(h)}return l}_renderMatches(a){if(0!==a.length){var{findController:s,pageIdx:r}=this;const{textContentItemsStr:m,textDivs:v}=this;var o=r===s.selected.pageIdx,l=s.selected.matchIdx,t=s.state.highlightAll;let i=null;var h={divIdx:-1,offset:void 0};let e=l,n=e+1;if(t)e=0,n=a.length;else if(!o)return;for(let t=e;t<n;t++){var d=a[t],c=d.begin,d=d.end,u=o&&t===l,p=u?" selected":"";let e=0;if(i&&c.divIdx===i.divIdx?f(i.divIdx,i.offset,c.offset):(null!==i&&f(i.divIdx,i.offset,h.offset),g(c)),c.divIdx===d.divIdx)e=f(c.divIdx,c.offset,d.offset,"highlight"+p);else{e=f(c.divIdx,c.offset,h.offset,"highlight begin"+p);for(let e=c.divIdx+1,t=d.divIdx;e<t;e++)v[e].className="highlight middle"+p;g(d,"highlight end"+p)}i=d,u&&s.scrollMatchIntoView({element:v[c.divIdx],selectedLeft:e,pageIndex:r,matchIndex:l})}function g(e,t){var i=e.divIdx;v[i].textContent="",f(i,0,e.offset,t)}function f(e,t,i,n){let a=v[e];a.nodeType===Node.TEXT_NODE&&(s=document.createElement("span"),a.before(s),s.append(a),v[e]=s,a=s);var s=m[e].substring(t,i),e=document.createTextNode(s);return n?((t=document.createElement("span")).className=n+" appended",t.append(e),a.append(t),n.includes("selected")?t.offsetLeft:0):(a.append(e),0)}i&&f(i.divIdx,i.offset,h.offset)}}_updateMatches(){if(this.enabled){var{findController:e,matches:t,pageIdx:n}=this,{textContentItemsStr:a,textDivs:s}=this;let i=-1;for(const o of t){for(let e=Math.max(i,o.begin.divIdx),t=o.end.divIdx;e<=t;e++){var r=s[e];r.textContent=a[e],r.className=""}i=o.end.divIdx+1}null!=e&&e.highlightMatches&&(t=e.pageMatches[n]||null,e=e.pageMatchesLength[n]||null,this.matches=this._convertMatches(t,e),this._renderMatches(this.matches))}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerBuilder=void 0;var n=i(5);function r(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function o(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var l=new WeakSet,h=new WeakSet;function a(){this.renderingDone=!0;var e=document.createElement("div");e.className="endOfContent",this.textLayerDiv.append(e),this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}function d(){const a=this.textLayerDiv;a.addEventListener("mousedown",t=>{var i,n=a.querySelector(".endOfContent");if(n){let e=t.target!==a;(e=e&&"none"!==getComputedStyle(n).getPropertyValue("-moz-user-select"))&&(i=a.getBoundingClientRect(),t=Math.max(0,(t.pageY-i.top)/i.height),n.style.top=(100*t).toFixed(2)+"%"),n.classList.add("active")}}),a.addEventListener("mouseup",()=>{var e=a.querySelector(".endOfContent");e&&(e.style.top="",e.classList.remove("active"))})}t.TextLayerBuilder=class{constructor(e){var{textLayerDiv:e,eventBus:t,pageIndex:i,viewport:n,highlighter:a=null,accessibilityManager:s=null}=e;r(this,h),r(this,l),this.textLayerDiv=e,this.eventBus=t,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageNumber=i+1,this.viewport=n,this.textDivs=[],this.textLayerRenderTask=null,this.highlighter=a,this.accessibilityManager=s,o(this,h,d).call(this)}render(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;if((this.textContent||this.textContentStream)&&!this.renderingDone){this.cancel(),this.textDivs.length=0,null!=(e=this.highlighter)&&e.setTextMapping(this.textDivs,this.textContentItemsStr),null!=(e=this.accessibilityManager)&&e.setTextMapping(this.textDivs);const i=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:i,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t}),this.textLayerRenderTask.promise.then(()=>{var e;this.textLayerDiv.append(i),o(this,l,a).call(this),null!=(e=this.highlighter)&&e.enable(),null!=(e=this.accessibilityManager)&&e.enable()},function(e){})}}cancel(){var e;this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),null!=(e=this.highlighter)&&e.disable(),null!=(e=this.accessibilityManager)&&e.disable()}setTextContentStream(e){this.cancel(),this.textContentStream=e}setTextContent(e){this.cancel(),this.textContent=e}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayerBuilder=void 0;var a=i(5);t.XfaLayerBuilder=class{constructor(e){var{pageDiv:e,pdfPage:t,annotationStorage:i=null,linkService:n,xfaHtml:a=null}=e;this.pageDiv=e,this.pdfPage=t,this.annotationStorage=i,this.linkService=n,this.xfaHtml=a,this.div=null,this._cancelled=!1}render(t){let i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"display";var e,n;return"print"===i?(e={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:i},n=document.createElement("div"),this.pageDiv.append(n),e.div=n,n=a.XfaLayer.render(e),Promise.resolve(n)):this.pdfPage.getXfa().then(e=>{return this._cancelled||!e?{textDivs:[]}:(e={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:e,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:i},this.div?a.XfaLayer.update(e):(this.div=document.createElement("div"),this.pageDiv.append(this.div),e.div=this.div,a.XfaLayer.render(e)))}).catch(e=>{console.error(e)})}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SecondaryToolbar=void 0;var c=i(1),a=i(7),u=i(29);function n(e,t){var i=e;if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object");t.add(e)}function s(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var r=new WeakSet,o=new WeakSet,l=new WeakSet,h=new WeakSet,d=new WeakSet;function p(){this.items.firstPage.disabled=this.pageNumber<=1,this.items.lastPage.disabled=this.pageNumber>=this.pagesCount,this.items.pageRotateCw.disabled=0===this.pagesCount,this.items.pageRotateCcw.disabled=0===this.pagesCount}function g(){this.toggleButton.addEventListener("click",this.toggle.bind(this));for(const{element:n,eventName:a,close:s,eventDetails:r}of this.buttons)n.addEventListener("click",e=>{if(null!==a){var t={source:this};for(const i in r)t[i]=r[i];this.eventBus.dispatch(a,t)}s&&this.close(),this.externalServices.reportTelemetry({type:"buttons",data:{id:n.id}})})}function f(e){let{cursorSelectToolButton:i,cursorHandToolButton:n}=e;this.eventBus._on("cursortoolchanged",function(e){var e=e["tool"],t=e===a.CursorTool.SELECT,e=e===a.CursorTool.HAND;i.classList.toggle("toggled",t),n.classList.toggle("toggled",e),i.setAttribute("aria-checked",t),n.setAttribute("aria-checked",e)})}function m(e){let{scrollPageButton:a,scrollVerticalButton:s,scrollHorizontalButton:r,scrollWrappedButton:o,spreadNoneButton:l,spreadOddButton:h,spreadEvenButton:d}=e;const t=e=>{var e=e["mode"],t=e===c.ScrollMode.PAGE,i=e===c.ScrollMode.VERTICAL,n=e===c.ScrollMode.HORIZONTAL,e=e===c.ScrollMode.WRAPPED,t=(a.classList.toggle("toggled",t),s.classList.toggle("toggled",i),r.classList.toggle("toggled",n),o.classList.toggle("toggled",e),a.setAttribute("aria-checked",t),s.setAttribute("aria-checked",i),r.setAttribute("aria-checked",n),o.setAttribute("aria-checked",e),this.pagesCount>u.PagesCountLimit.FORCE_SCROLL_MODE_PAGE);a.disabled=t,s.disabled=t,r.disabled=t,o.disabled=t,l.disabled=n,h.disabled=n,d.disabled=n};this.eventBus._on("scrollmodechanged",t),this.eventBus._on("secondarytoolbarreset",e=>{e.source===this&&t({mode:c.ScrollMode.VERTICAL})})}function v(e){let{spreadNoneButton:n,spreadOddButton:a,spreadEvenButton:s}=e;function t(e){var e=e["mode"],t=e===c.SpreadMode.NONE,i=e===c.SpreadMode.ODD,e=e===c.SpreadMode.EVEN;n.classList.toggle("toggled",t),a.classList.toggle("toggled",i),s.classList.toggle("toggled",e),n.setAttribute("aria-checked",t),a.setAttribute("aria-checked",i),s.setAttribute("aria-checked",e)}this.eventBus._on("spreadmodechanged",t),this.eventBus._on("secondarytoolbarreset",e=>{e.source===this&&t({mode:c.SpreadMode.NONE})})}t.SecondaryToolbar=class{constructor(e,t,i){n(this,d),n(this,h),n(this,l),n(this,o),n(this,r),this.toolbar=e.toolbar,this.toggleButton=e.toggleButton,this.buttons=[{element:e.presentationModeButton,eventName:"presentationmode",close:!0},{element:e.printButton,eventName:"print",close:!0},{element:e.downloadButton,eventName:"download",close:!0},{element:e.viewBookmarkButton,eventName:null,close:!0},{element:e.firstPageButton,eventName:"firstpage",close:!0},{element:e.lastPageButton,eventName:"lastpage",close:!0},{element:e.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:e.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:e.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.SELECT},close:!0},{element:e.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.HAND},close:!0},{element:e.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.PAGE},close:!0},{element:e.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.VERTICAL},close:!0},{element:e.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.HORIZONTAL},close:!0},{element:e.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:c.ScrollMode.WRAPPED},close:!0},{element:e.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.NONE},close:!0},{element:e.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.ODD},close:!0},{element:e.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:c.SpreadMode.EVEN},close:!0},{element:e.documentPropertiesButton,eventName:"documentproperties",close:!0}],this.buttons.push({element:e.openFileButton,eventName:"openfile",close:!0}),this.items={firstPage:e.firstPageButton,lastPage:e.lastPageButton,pageRotateCw:e.pageRotateCwButton,pageRotateCcw:e.pageRotateCcwButton},this.eventBus=t,this.externalServices=i,this.opened=!1,s(this,o,g).call(this),s(this,l,f).call(this,e),s(this,h,m).call(this,e),s(this,d,v).call(this,e),this.reset()}get isOpen(){return this.opened}setPageNumber(e){this.pageNumber=e,s(this,r,p).call(this)}setPagesCount(e){this.pagesCount=e,s(this,r,p).call(this)}reset(){this.pageNumber=0,this.pagesCount=0,s(this,r,p).call(this),this.eventBus.dispatch("secondarytoolbarreset",{source:this})}open(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.toolbar.classList.remove("hidden"))}close(){this.opened&&(this.opened=!1,this.toolbar.classList.add("hidden"),this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"))}toggle(){this.opened?this.close():this.open()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Toolbar=void 0;var l=i(1),d=i(5);function r(e,t){o(e,t),t.add(e)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,i){t=c(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function c(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}function u(e,t,i){if(t.has(e))return i;throw new TypeError("attempted to get private field on non-instance")}var p=new WeakMap,g=new WeakSet,f=new WeakSet,m=new WeakSet,v=new WeakSet;function w(e){var{pageNumber:t,scaleSelect:i}=this.items;const n=this;for(const{element:a,eventName:s,eventDetails:r}of this.buttons)a.addEventListener("click",e=>{if(null!==s){var t={source:this};if(r)for(const i in r)t[i]=r[i];this.eventBus.dispatch(s,t)}});t.addEventListener("click",function(){this.select()}),t.addEventListener("change",function(){n.eventBus.dispatch("pagenumberchanged",{source:n,value:this.value})}),i.addEventListener("change",function(){"custom"!==this.value&&n.eventBus.dispatch("scalechanged",{source:n,value:this.value})}),i.addEventListener("click",function(e){e=e.target;this.value===n.pageScaleValue&&"OPTION"===e.tagName.toUpperCase()&&this.blur()}),i.oncontextmenu=l.noContextMenuHandler,this.eventBus._on("localized",()=>{h(this,p,!0),u(this,v,y).call(this),u(this,m,b).call(this,!0)}),u(this,f,_).call(this,e)}function _(e){let{editorFreeTextButton:r,editorFreeTextParamsToolbar:o,editorInkButton:l,editorInkParamsToolbar:h}=e;function t(e){var t,i,n,a=1<arguments.length&&void 0!==arguments[1]&&arguments[1];for({mode:t,button:i,toolbar:n}of[{mode:d.AnnotationEditorType.FREETEXT,button:r,toolbar:o},{mode:d.AnnotationEditorType.INK,button:l,toolbar:h}]){var s=t===e.mode;i.classList.toggle("toggled",s),i.setAttribute("aria-checked",s),i.disabled=a,null!==n&&void 0!==n&&n.classList.toggle("hidden",!s)}}this.eventBus._on("annotationeditormodechanged",t),this.eventBus._on("toolbarreset",e=>{e.source===this&&t({mode:d.AnnotationEditorType.NONE},!0)})}function b(){var e,t,i=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if((t=c(e=this,t=p,"get")).get?t.get.call(e):t.value){const{pageNumber:n,pagesCount:a,pageScaleValue:s,pageScale:r,items:o}=this;i&&(this.hasPageLabels?o.pageNumber.type="text":(o.pageNumber.type="number",this.l10n.get("of_pages",{pagesCount:a}).then(e=>{o.numPages.textContent=e})),o.pageNumber.max=a),this.hasPageLabels?(o.pageNumber.value=this.pageLabel,this.l10n.get("page_of_pages",{pageNumber:n,pagesCount:a}).then(e=>{o.numPages.textContent=e})):o.pageNumber.value=n,o.previous.disabled=n<=1,o.next.disabled=a<=n,o.zoomOut.disabled=r<=l.MIN_SCALE,o.zoomIn.disabled=r>=l.MAX_SCALE,this.l10n.get("page_scale_percent",{scale:Math.round(1e4*r)/100}).then(e=>{let t=!1;for(const i of o.scaleSelect.options)i.value!==s?i.selected=!1:(i.selected=!0,t=!0);t||(o.customScaleOption.textContent=e,o.customScaleOption.selected=!0)})}}async function y(){var{items:e,l10n:t}=this,t=Promise.all([t.get("page_scale_auto"),t.get("page_scale_actual"),t.get("page_scale_fit"),t.get("page_scale_width")]),e=(await l.animationStarted,getComputedStyle(e.scaleSelect)),i=parseFloat(e.getPropertyValue("--scale-select-width")),n=document.createElement("canvas"),a=n.getContext("2d",{alpha:!1});a.font=e.fontSize+" "+e.fontFamily;let s=0;for(const o of await t){var r=a.measureText(o)["width"];r>s&&(s=r)}(s+=.3*i)>i&&l.docStyle.setProperty("--scale-select-width",s+"px"),n.width=0,n.height=0}t.Toolbar=class{constructor(t,e,i){var n,a,s;r(this,v),r(this,m),r(this,f),r(this,g),s={writable:!0,value:!1},o(n=this,a=p),a.set(n,s),this.toolbar=t.container,this.eventBus=e,this.l10n=i,this.buttons=[{element:t.previous,eventName:"previouspage"},{element:t.next,eventName:"nextpage"},{element:t.zoomIn,eventName:"zoomin"},{element:t.zoomOut,eventName:"zoomout"},{element:t.print,eventName:"print"},{element:t.download,eventName:"download"},{element:t.editorFreeTextButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){var e=t.editorFreeTextButton["classList"];return e.contains("toggled")?d.AnnotationEditorType.NONE:d.AnnotationEditorType.FREETEXT}}},{element:t.editorInkButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){var e=t.editorInkButton["classList"];return e.contains("toggled")?d.AnnotationEditorType.NONE:d.AnnotationEditorType.INK}}}],this.buttons.push({element:t.openFile,eventName:"openfile"}),this.items={numPages:t.numPages,pageNumber:t.pageNumber,scaleSelect:t.scaleSelect,customScaleOption:t.customScaleOption,previous:t.previous,next:t.next,zoomIn:t.zoomIn,zoomOut:t.zoomOut},u(this,g,w).call(this,t),this.reset()}setPageNumber(e,t){this.pageNumber=e,this.pageLabel=t,u(this,m,b).call(this,!1)}setPagesCount(e,t){this.pagesCount=e,this.hasPageLabels=t,u(this,m,b).call(this,!0)}setPageScale(e,t){this.pageScaleValue=(e||t).toString(),this.pageScale=t,u(this,m,b).call(this,!1)}reset(){this.pageNumber=0,this.pageLabel=null,this.hasPageLabels=!1,this.pagesCount=0,this.pageScaleValue=l.DEFAULT_SCALE_VALUE,this.pageScale=l.DEFAULT_SCALE,u(this,m,b).call(this,!0),this.updateLoadingIndicatorState(),this.eventBus.dispatch("toolbarreset",{source:this})}updateLoadingIndicatorState(){var e=this.items["pageNumber"];e.classList.toggle("visiblePageIsLoading",0<arguments.length&&void 0!==arguments[0]&&arguments[0])}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ViewHistory=void 0;t.ViewHistory=class{constructor(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:20;this.fingerprint=e,this.cacheSize=t,this._initializedPromise=this._readFromStorage().then(e=>{var i=JSON.parse(e||"{}");let n=-1;if(Array.isArray(i.files)){for(;i.files.length>=this.cacheSize;)i.files.shift();for(let e=0,t=i.files.length;e<t;e++)if(i.files[e].fingerprint===this.fingerprint){n=e;break}}else i.files=[];-1===n&&(n=i.files.push({fingerprint:this.fingerprint})-1),this.file=i.files[n],this.database=i})}async _writeToStorage(){var e=JSON.stringify(this.database);localStorage.setItem("pdfjs.history",e)}async _readFromStorage(){return localStorage.getItem("pdfjs.history")}async set(e,t){return await this._initializedPromise,this.file[e]=t,this._writeToStorage()}async setMultiple(e){await this._initializedPromise;for(const t in e)this.file[t]=e[t];return this._writeToStorage()}async get(e,t){await this._initializedPromise;e=this.file[e];return void 0!==e?e:t}async getMultiple(e){await this._initializedPromise;var t=Object.create(null);for(const n in e){var i=this.file[n];t[n]=void 0!==i?i:e[n]}return t}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericCom=void 0;var n=i(4),a=i(43),s=i(44),r=i(45),o=i(47);t.GenericCom={};class l extends a.BasePreferences{async _writeToStorage(e){localStorage.setItem("pdfjs.preferences",JSON.stringify(e))}async _readFromStorage(e){return JSON.parse(localStorage.getItem("pdfjs.preferences"))}}class h extends n.DefaultExternalServices{static createDownloadManager(e){return new s.DownloadManager}static createPreferences(){return new l}static createL10n(e){var{locale:e="en-US"}=e;return new r.GenericL10n(e)}static createScripting(e){e=e.sandboxBundleSrc;return new o.GenericScripting(e)}}n.PDFViewerApplication.externalServices=h},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasePreferences=void 0;i(2);function n(e,t,i){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,i)}function r(e,t){t=a(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,i){t=a(e,t,"set");if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}function a(e,t,i){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+i+" private field on non-instance")}var l=new WeakMap,h=new WeakMap,d=new WeakMap;t.BasePreferences=class s{constructor(){if(n(this,l,{writable:!0,value:Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomValue:"",disablePageLabels:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!0,externalLinkTarget:0,historyUpdateUrl:!1,ignoreDestinationZoom:!1,forcePageColors:!1,pageColorsBackground:"Canvas",pageColorsForeground:"CanvasText",pdfBugEnabled:!1,sidebarViewOnLoad:-1,scrollModeOnLoad:-1,spreadModeOnLoad:-1,textLayerMode:1,useOnlyCssZoom:!1,viewerCssTheme:0,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0,renderer:"canvas"})}),n(this,h,{writable:!0,value:Object.create(null)}),n(this,d,{writable:!0,value:null}),this.constructor===s)throw new Error("Cannot initialize BasePreferences.");o(this,d,this._readFromStorage(r(this,l)).then(e=>{for(const i in r(this,l)){var t=null==e?void 0:e[i];typeof t==typeof r(this,l)[i]&&(r(this,h)[i]=t)}}))}async _writeToStorage(e){throw new Error("Not implemented: _writeToStorage")}async _readFromStorage(e){throw new Error("Not implemented: _readFromStorage")}async reset(){await r(this,d);const t=r(this,h);return o(this,h,Object.create(null)),this._writeToStorage(r(this,l)).catch(e=>{throw o(this,h,t),e})}async set(e,t){await r(this,d);const i=r(this,l)[e],n=r(this,h);if(void 0===i)throw new Error(`Set preference: "${e}" is undefined.`);if(void 0===t)throw new Error("Set preference: no value is specified.");var a=typeof t,s=typeof i;if(a!=s){if("number"!=a||"string"!=s)throw new Error(`Set preference: "${t}" is a ${a}, expected a ${s}.`);t=t.toString()}else if("number"==a&&!Number.isInteger(t))throw new Error(`Set preference: "${t}" must be an integer.`);return r(this,h)[e]=t,this._writeToStorage(r(this,h)).catch(e=>{throw o(this,h,n),e})}async get(e){await r(this,d);var t=r(this,l)[e];if(void 0===t)throw new Error(`Get preference: "${e}" is undefined.`);return r(this,h)[e]??t}async getAll(){await r(this,d);var e=Object.create(null);for(const t in r(this,l))e[t]=r(this,h)[t]??r(this,l)[t];return e}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var r=i(5);function n(e,t){var i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=e,i.target="_parent","download"in i&&(i.download=t),(document.body||document.documentElement).append(i),i.click(),i.remove()}t.DownloadManager=class{constructor(){this._openBlobUrls=new WeakMap}downloadUrl(e,t){(0,r.createValidAbsoluteUrl)(e,"http://example.com")?n(e+"#pdfjs.action=download",t):console.error("downloadUrl - not a valid URL: "+e)}downloadData(e,t,i){n(URL.createObjectURL(new Blob([e],{type:i})),t)}openOrDownloadData(i,e,n){var a=(0,r.isPdfFile)(n),s=a?"application/pdf":"";if(a){let t=this._openBlobUrls.get(i);t||(t=URL.createObjectURL(new Blob([e],{type:s})),this._openBlobUrls.set(i,t)),a="?file="+encodeURIComponent(t+"#"+n);try{return window.open(a),!0}catch(e){console.error("openOrDownloadData: "+e),URL.revokeObjectURL(t),this._openBlobUrls.delete(i)}}return this.downloadData(e,n,s),!1}download(e,t,i){n(URL.createObjectURL(e),i)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0,i(46);var n=i(31);const a=document.webL10n;t.GenericL10n=class{constructor(i){this._lang=i,this._ready=new Promise((e,t)=>{a.setLanguage((0,n.fixupLangCode)(i),()=>{e(a)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:(0,n.getL10nFallback)(e,t);return(await this._ready).get(e,t,i)}async translate(e){return(await this._ready).translate(e)}}},()=>{function _(e,t,i){t=t||function(e){},i=i||function(){};var n=new XMLHttpRequest;n.open("GET",e,a),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=utf-8"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status||0===n.status?t(n.responseText):i())},n.onerror=i,n.ontimeout=i;try{n.send(null)}catch(e){i()}}function u(e,v,a,t){var w=e.replace(/[^\/]*$/,"")||"./";function i(e,t){var c={},i=/^\s*|\s*$/,u=/^\s*#|^\s*$/,p=/^\s*\[(.*)\]\s*$/,g=/^\s*@import\s+url\((.*)\)\s*$/i,f=/^([^=\s]*)\s*=\s*(.+)$/;function m(e,a,s){var r=e.replace(i,"").split(/[\r\n]+/),o="*",l=v.split("-",1)[0],h=!1,d="";!function e(){for(;;){if(!r.length)return void s();var t,i,n=r.shift();if(!u.test(n)){if(a){if(d=p.exec(n)){o=d[1].toLowerCase(),h="*"!==o&&o!==v&&o!==l;continue}if(h)continue;if(d=g.exec(n))return t=w+d[1],i=e,void _(t,function(e){m(e,!1,i)},function(){console.warn(t+" not found."),i()})}(n=n.match(f))&&3==n.length&&(c[n[1]]=(n=n[2]).lastIndexOf("\\")<0?n:n.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'"))}}}()}m(e,!0,function(){t(c)})}_(e,function(e){f+=e,i(e,function(e){for(var t in e){var i,n=t.lastIndexOf("."),n=0<n?(i=t.substring(0,n),t.substring(n+1)):(i=t,d);g[i]||(g[i]={}),g[i][n]=e[t]}a&&a()})},t)}function i(e,t){e=e&&e.toLowerCase(),t=t||function(){},g={},m=f="",m=e;var i=p.querySelectorAll('link[type="application/l10n"]'),n=i.length;if(0===n){var a=(o=p.querySelector('script[type="application/l10n"]'))?JSON.parse(o.innerHTML):null;if(a&&a.locales&&a.default_locale){if(console.log("using the embedded JSON directory, early way out"),!(g=a.locales[e])){var s,r=a.default_locale.toLowerCase();for(s in a.locales){if((s=s.toLowerCase())===e){g=a.locales[e];break}s===r&&(g=a.locales[r])}}t()}else console.log("no resource to load, early way out");w="complete"}else for(var o,l=0,h=function(){n<=++l&&(t(),w="complete")},d=0;d<n;d++)new c(i[d]).load(e,h);function c(e){var i=e.href;this.load=function(e,t){u(i,e,t,function(){console.warn(i+" not found."),console.warn('"'+e+'" resource not found'),m="",t()})}}}function h(e,t,i){var n=g[e];if(!n){if(console.warn("#"+e+" is undefined."),!i)return null;n=i}var a,s,r,o,l,h,d,c,u={};for(a in n){var p=n[a];s=p,r=t,o=e,l=a,c=d=h=void 0,(c=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(s))&&c.length&&(h=c[1],c=c[2],r&&c in r?d=r[c]:c in g&&(d=g[c]),h in v)&&(r=v[h],s=r(s,d,o,l)),p=function(e,i,n){return e.replace(/\{\{\s*(.+?)\s*\}\}/g,function(e,t){return i&&t in i?i[t]:t in g?g[t]:(console.log("argument {{"+t+"}} for #"+n+" is undefined."),e)})}(s,t,e),u[a]=p}return u}function s(e){var t=function(e){if(!e)return{};var t=e.getAttribute("data-l10n-id"),e=e.getAttribute("data-l10n-args"),i={};if(e)try{i=JSON.parse(e)}catch(e){console.warn("could not parse arguments for #"+t)}return{id:t,args:i}}(e);if(t.id){var i=h(t.id,t.args);if(i){if(i[d]){if(0===function(e){if(e.children)return e.children.length;if(void 0!==e.childElementCount)return e.childElementCount;for(var t=0,i=0;i<e.childNodes.length;i++)t+=1===e.nodeType?1:0;return t}(e))e[d]=i[d];else{for(var n,a=e.childNodes,s=!1,r=0,o=a.length;r<o;r++)3===a[r].nodeType&&/\S/.test(a[r].nodeValue)&&(s?a[r].nodeValue="":(a[r].nodeValue=i[d],s=!0));s||(n=p.createTextNode(i[d]),e.prepend(n))}delete i[d]}for(var l in i)e[l]=i[l]}else console.warn("#"+t.id+" is undefined.")}}var e,p,g,f,d,m,v,w,a;document.webL10n=(e=window,p=document,g={},d="textContent",w="loading",a=!(m=f=""),(v={}).plural=function(e,t,i,n){var a,s,r,t=parseFloat(t);return isNaN(t)||n==d&&(v._pluralRules||(v._pluralRules=(r={0:function(e){return"other"},1:function(e){return l(e%100,3,10)?"few":0===e?"zero":l(e%100,11,99)?"many":2==e?"two":1==e?"one":"other"},2:function(e){return 0!==e&&e%10==0?"many":2==e?"two":1==e?"one":"other"},3:function(e){return 1==e?"one":"other"},4:function(e){return l(e,0,1)?"one":"other"},5:function(e){return l(e,0,2)&&2!=e?"one":"other"},6:function(e){return 0===e?"zero":e%10==1&&e%100!=11?"one":"other"},7:function(e){return 2==e?"two":1==e?"one":"other"},8:function(e){return l(e,3,6)?"few":l(e,7,10)?"many":2==e?"two":1==e?"one":"other"},9:function(e){return 0===e||1!=e&&l(e%100,1,19)?"few":1==e?"one":"other"},10:function(e){return l(e%10,2,9)&&!l(e%100,11,19)?"few":e%10!=1||l(e%100,11,19)?"other":"one"},11:function(e){return l(e%10,2,4)&&!l(e%100,12,14)?"few":e%10==0||l(e%10,5,9)||l(e%100,11,14)?"many":e%10==1&&e%100!=11?"one":"other"},12:function(e){return l(e,2,4)?"few":1==e?"one":"other"},13:function(e){return l(e%10,2,4)&&!l(e%100,12,14)?"few":1!=e&&l(e%10,0,1)||l(e%10,5,9)||l(e%100,12,14)?"many":1==e?"one":"other"},14:function(e){return l(e%100,3,4)?"few":e%100==2?"two":e%100==1?"one":"other"},15:function(e){return 0===e||l(e%100,2,10)?"few":l(e%100,11,19)?"many":1==e?"one":"other"},16:function(e){return e%10==1&&11!=e?"one":"other"},17:function(e){return 3==e?"few":0===e?"zero":6==e?"many":2==e?"two":1==e?"one":"other"},18:function(e){return 0===e?"zero":l(e,0,2)&&0!==e&&2!=e?"one":"other"},19:function(e){return l(e,2,10)?"few":l(e,0,1)?"one":"other"},20:function(e){return!l(e%10,3,4)&&e%10!=9||l(e%100,10,19)||l(e%100,70,79)||l(e%100,90,99)?e%1e6==0&&0!==e?"many":e%10!=2||o(e%100,[12,72,92])?e%10!=1||o(e%100,[11,71,91])?"other":"one":"two":"few"},21:function(e){return 0===e?"zero":1==e?"one":"other"},22:function(e){return l(e,0,1)||l(e,11,99)?"one":"other"},23:function(e){return l(e%10,1,2)||e%20==0?"one":"other"},24:function(e){return l(e,3,10)||l(e,13,19)?"few":o(e,[2,12])?"two":o(e,[1,11])?"one":"other"}},(s={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[(a=m).replace(/-.*$/,"")])in r?r[s]:(console.warn("plural form unknown for ["+a+"]"),function(){return"other"}))),r="["+v._pluralRules(t)+"]",0===t&&i+"[zero]"in g?e=g[i+"[zero]"][n]:1==t&&i+"[one]"in g?e=g[i+"[one]"][n]:2==t&&i+"[two]"in g?e=g[i+"[two]"][n]:i+r in g?e=g[i+r][n]:i+"[other]"in g&&(e=g[i+"[other]"][n])),e;function o(e,t){return-1!==t.indexOf(e)}function l(e,t,i){return t<=e&&e<=i}},{get:function(e,t,i){var n,a=e.lastIndexOf("."),s=d,a=(0<a&&(s=e.substring(a+1),e=e.substring(0,a)),i&&((n={})[s]=i),h(e,t,n));return a&&s in a?a[s]:"{{"+e+"}}"},getData:function(){return g},getText:function(){return f},getLanguage:function(){return m},setLanguage:function(e,t){i(e,function(){t&&t()})},getDirection:function(){var e=m.split("-",1)[0];return 0<=["ar","he","fa","ps","ur"].indexOf(e)?"rtl":"ltr"},translate:function(e){e=e||p.documentElement;for(var t,i=(t=e)?t.querySelectorAll("*[data-l10n-id]"):[],n=i.length,a=0;a<n;a++)s(i[a]);s(e)},getReadyState:function(){return w},ready:function(t){t&&("complete"==w||"interactive"==w?e.setTimeout(function(){t()}):p.addEventListener&&p.addEventListener("localized",function e(){p.removeEventListener("localized",e),t()}))}})},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericScripting=void 0,t.docPropertiesLookup=async function(e){var t="".split("#")[0];let{info:i,metadata:n,contentDispositionFilename:a,contentLength:s}=await e.getMetadata();{var r;s||(r=(await e.getDownloadInfo())["length"],s=r)}return{...i,baseURL:t,filesize:s,filename:a||(0,o.getPdfFilenameFromUrl)(""),metadata:null==n?void 0:n.getRaw(),authors:null==n?void 0:n.get("dc:creator"),numPages:e.numPages,URL:""}};var o=i(5);t.GenericScripting=class{constructor(e){this._ready=(0,o.loadScript)(e,!0).then(()=>window.pdfjsSandbox.QuickJSSandbox())}async createSandbox(e){(await this._ready).create(e)}async dispatchEventInSandbox(e){const t=await this._ready;setTimeout(()=>t.dispatchEvent(e),0)}async destroySandbox(){(await this._ready).nukeSandbox()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPrintService=o;var h=i(5),n=i(4),s=i(49);let d=null,a=null,r=null;function o(e,t,i,n){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,r=6<arguments.length?arguments[6]:void 0;this.pdfDocument=e,this.pagesOverview=t,this.printContainer=i,this._printResolution=n||150,this._optionalContentConfigPromise=a||e.getOptionalContentConfig(),this._printAnnotationStoragePromise=s||Promise.resolve(),this.l10n=r,this.currentPage=-1,this.scratchCanvas=document.createElement("canvas")}o.prototype={layout(){this.throwIfInactive();var e=document.querySelector("body"),t=(e.setAttribute("data-pdfjsprinting",!0),this.pagesOverview.every(function(e){return e.width===this.pagesOverview[0].width&&e.height===this.pagesOverview[0].height},this)),t=(t||console.warn("Not all pages have the same size. The printed result may be incorrect!"),this.pageStyleSheet=document.createElement("style"),this.pagesOverview[0]);this.pageStyleSheet.textContent="@page { size: "+t.width+"pt "+t.height+"pt;}",e.append(this.pageStyleSheet)},destroy(){d===this&&(this.printContainer.textContent="",document.querySelector("body").removeAttribute("data-pdfjsprinting"),this.pageStyleSheet&&(this.pageStyleSheet.remove(),this.pageStyleSheet=null),this.scratchCanvas.width=this.scratchCanvas.height=0,this.scratchCanvas=null,d=null,f().then(function(){r.active===a&&r.close(a)}))},renderPages(){if(this.pdfDocument.isPureXfa)return(0,s.getXfaHtmlForPrinting)(this.printContainer,this.pdfDocument),Promise.resolve();const n=this.pagesOverview.length,a=(e,t)=>{var i;this.throwIfInactive(),++this.currentPage>=n?(p(n,n,this.l10n),e()):(p(i=this.currentPage,n,this.l10n),function(e,t,i,n,a,s){var r=d.scratchCanvas;const o=n/h.PixelsPerInch.PDF,l=(r.width=Math.floor(i.width*o),r.height=Math.floor(i.height*o),r.getContext("2d"));return l.save(),l.fillStyle="rgb(255, 255, 255)",l.fillRect(0,0,r.width,r.height),l.restore(),Promise.all([e.getPage(t),s]).then(function(e){var[e,t]=e,t={canvasContext:l,transform:[o,0,0,o,0,0],viewport:e.getViewport({scale:1,rotation:i.rotation}),intent:"print",annotationMode:h.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:a,printAnnotationStorage:t};return e.render(t).promise})}(this.pdfDocument,i+1,this.pagesOverview[i],this._printResolution,this._optionalContentConfigPromise,this._printAnnotationStoragePromise).then(this.useRenderedPage.bind(this)).then(function(){a(e,t)},t))};return new Promise(a)},useRenderedPage(){this.throwIfInactive();const i=document.createElement("img");var e=this.scratchCanvas,e=("toBlob"in e?e.toBlob(function(e){i.src=URL.createObjectURL(e)}):i.src=e.toDataURL(),document.createElement("div"));return e.className="printedPage",e.append(i),this.printContainer.append(e),new Promise(function(e,t){i.onload=e,i.onerror=t})},performPrint(){return this.throwIfInactive(),new Promise(e=>{setTimeout(()=>{this.active?(l.call(window),setTimeout(e,20)):e()},0)})},get active(){return this===d},throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}};const l=window.print;function c(e){var t=document.createEvent("CustomEvent");t.initCustomEvent(e,!1,!1,"custom"),window.dispatchEvent(t)}function u(){d&&(d.destroy(),c("afterprint"))}function p(e,t,i){a=a||document.getElementById("printServiceDialog");e=Math.round(100*e/t),t=a.querySelector("progress");const n=a.querySelector(".relative-progress");t.value=e,i.get("print_progress_percent",{progress:e}).then(e=>{n.textContent=e})}window.print=function(){if(d)console.warn("Ignored window.print() because of a pending print job.");else{f().then(function(){d&&r.open(a)});try{c("beforeprint")}finally{if(!d)return console.error("Expected print service to be initialized."),void f().then(function(){r.active===a&&r.close(a)});const e=d;d.renderPages().then(function(){return e.performPrint()}).catch(function(){}).then(function(){e.active&&u()})}}},window.addEventListener("keydown",function(e){80!==e.keyCode||!e.ctrlKey&&!e.metaKey||e.altKey||e.shiftKey&&!window.chrome&&!window.opera||(window.print(),e.preventDefault(),e.stopImmediatePropagation())},!0),"onbeforeprint"in window&&(t=function(e){"custom"!==e.detail&&e.stopImmediatePropagation()},window.addEventListener("beforeprint",t),window.addEventListener("afterprint",t));let g;function f(){if(!g){if(!(r=n.PDFViewerApplication.overlayManager))throw new Error("The overlay manager has not yet been initialized.");a=a||document.getElementById("printServiceDialog"),g=r.register(a,!0),document.getElementById("printCancel").onclick=u,a.addEventListener("close",u)}return g}n.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService(e,t,i,n,a,s,r){if(d)throw new Error("The print service is created and active.");return d=new o(e,t,i,n,a,s,r)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getXfaHtmlForPrinting=function(e,t){var i=t.allXfaHtml,n=new h.SimpleLinkService,a=Math.round(100*l.PixelsPerInch.PDF_TO_CSS_UNITS)/100;for(const o of i.children){var s=document.createElement("div"),s=(s.className="xfaPrintedPage",e.append(s),new d.XfaLayerBuilder({pageDiv:s,pdfPage:null,annotationStorage:t.annotationStorage,linkService:n,xfaHtml:o})),r=(0,l.getXfaPageViewport)(o,{scale:a});s.render(r,"print")}};var l=i(5),h=i(3),d=i(38)}],r={};function o(e){var t=r[e];return void 0!==t||(t=r[e]={exports:{}},s[e](t,t.exports,o)),t.exports}function l(){var e={appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),viewFind:document.getElementById("viewFind"),openFile:document.getElementById("openFile"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),editorInkButton:document.getElementById("editorInk"),editorInkParamsToolbar:document.getElementById("editorInkParamsToolbar"),download:document.getElementById("download")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("presentationMode"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),downloadButton:document.getElementById("secondaryDownload"),viewBookmarkButton:document.getElementById("viewBookmark"),firstPageButton:document.getElementById("firstPage"),lastPageButton:document.getElementById("lastPage"),pageRotateCwButton:document.getElementById("pageRotateCw"),pageRotateCcwButton:document.getElementById("pageRotateCcw"),cursorSelectToolButton:document.getElementById("cursorSelectTool"),cursorHandToolButton:document.getElementById("cursorHandTool"),scrollPageButton:document.getElementById("scrollPage"),scrollVerticalButton:document.getElementById("scrollVertical"),scrollHorizontalButton:document.getElementById("scrollHorizontal"),scrollWrappedButton:document.getElementById("scrollWrapped"),spreadNoneButton:document.getElementById("spreadNone"),spreadOddButton:document.getElementById("spreadOdd"),spreadEvenButton:document.getElementById("spreadEven"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),sidebarContainer:document.getElementById("sidebarContainer"),toggleButton:document.getElementById("sidebarToggle"),thumbnailButton:document.getElementById("viewThumbnail"),outlineButton:document.getElementById("viewOutline"),attachmentsButton:document.getElementById("viewAttachments"),layersButton:document.getElementById("viewLayers"),thumbnailView:document.getElementById("thumbnailView"),outlineView:document.getElementById("outlineView"),attachmentsView:document.getElementById("attachmentsView"),layersView:document.getElementById("layersView"),outlineOptionsContainer:document.getElementById("outlineOptionsContainer"),currentOutlineItemButton:document.getElementById("currentOutlineItem")},sidebarResizer:{outerContainer:document.getElementById("outerContainer"),resizer:document.getElementById("sidebarResizer")},findBar:{bar:document.getElementById("findbar"),toggleButton:document.getElementById("viewFind"),findField:document.getElementById("findInput"),highlightAllCheckbox:document.getElementById("findHighlightAll"),caseSensitiveCheckbox:document.getElementById("findMatchCase"),matchDiacriticsCheckbox:document.getElementById("findMatchDiacritics"),entireWordCheckbox:document.getElementById("findEntireWord"),findMsg:document.getElementById("findMsg"),findResultsCount:document.getElementById("findResultsCount"),findPreviousButton:document.getElementById("findPrevious"),findNextButton:document.getElementById("findNext")},passwordOverlay:{dialog:document.getElementById("passwordDialog"),label:document.getElementById("passwordText"),input:document.getElementById("password"),submitButton:document.getElementById("passwordSubmit"),cancelButton:document.getElementById("passwordCancel")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},annotationEditorParams:{editorFreeTextFontSize:document.getElementById("editorFreeTextFontSize"),editorFreeTextColor:document.getElementById("editorFreeTextColor"),editorInkColor:document.getElementById("editorInkColor"),editorInkThickness:document.getElementById("editorInkThickness"),editorInkOpacity:document.getElementById("editorInkOpacity")},printContainer:document.getElementById("printContainer"),openFileInput:document.getElementById("fileInput"),debuggerScriptPath:"./debugger.js"},t=document.createEvent("CustomEvent");t.initCustomEvent("webviewerloaded",!0,!0,{source:window});try{parent.document.dispatchEvent(t)}catch(e){console.error("webviewerloaded: "+e),document.dispatchEvent(t)}a.PDFViewerApplication.run(e)}e={},Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"PDFViewerApplication",{enumerable:!0,get:function(){return a.PDFViewerApplication}}),e.PDFViewerApplicationConstants=void 0,Object.defineProperty(e,"PDFViewerApplicationOptions",{enumerable:!0,get:function(){return i.AppOptions}}),t=o(1),i=o(2),n=o(3),a=o(4),n={LinkTarget:n.LinkTarget,RenderingStates:t.RenderingStates,ScrollMode:t.ScrollMode,SpreadMode:t.SpreadMode},e.PDFViewerApplicationConstants=n,window.PDFViewerApplication=a.PDFViewerApplication,window.PDFViewerApplicationConstants=n,window.PDFViewerApplicationOptions=i.AppOptions,o(42),o(48),null!=(e=(t=document).blockUnblockOnload)&&e.call(t,!0),"interactive"===document.readyState||"complete"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,!0)})();