????

Your IP : 3.138.123.143


Current Path : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/
Upload File :
Current File : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/9198.cef7c331.chunk.js

/*! For license information please see 9198.cef7c331.chunk.js.LICENSE.txt */
(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[9198],{6305:(e,t,r)=>{var s=r(73738).default;function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=s(e)&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var l=i?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a},e.exports.__esModule=!0,e.exports.default=e.exports},8743:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var s=r(58168),n=r(98587),a=r(9950),i=r(11942),o=r.n(i),l=r(48738),c=r.n(l),h=r(44208),d=["className","cssModule","active","tag"],u={tag:h.Wx,active:o().bool,className:o().string,cssModule:o().object},p=function(e){var t=e.className,r=e.cssModule,i=e.active,o=e.tag,l=(0,n.A)(e,d),u=(0,h.qO)(c()(t,"nav-item",!!i&&"active"),r);return a.createElement(o,(0,s.A)({},l,{className:u}))};p.propTypes=u,p.defaultProps={tag:"li"};const g=p},13144:(e,t,r)=>{"use strict";var s=r(24994),n=r(6305);t.A=void 0;var a=n(r(9950)),i=(0,s(r(53209)).default)(a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.A=i},13642:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(9950);function n(e){var t=s.useState(e),r=t[0],n=t[1],a=e||r;return s.useEffect((function(){null==r&&n("mui-".concat(Math.round(1e5*Math.random())))}),[r]),a}},30477:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>s.A,createChainedFunction:()=>n.A,createSvgIcon:()=>a.A,debounce:()=>i.A,deprecatedPropType:()=>o,isMuiElement:()=>l.A,ownerDocument:()=>c.A,ownerWindow:()=>h.A,requirePropFactory:()=>d,setRef:()=>u.A,unstable_useId:()=>A.A,unsupportedProp:()=>p,useControlled:()=>g.A,useEventCallback:()=>f.A,useForkRef:()=>m.A,useIsFocusVisible:()=>b.A});var s=r(52521),n=r(68023),a=r(32776),i=r(62684);function o(e,t){return function(){return null}}var l=r(38648),c=r(95673),h=r(80680);function d(e){return function(){return null}}var u=r(2946);function p(e,t,r,s,n){return null}var g=r(58438),f=r(81097),m=r(539),A=r(13642),b=r(96602)},36640:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var s=r(58168),n=r(98587),a=r(9417),i=r(77387),o=r(9950),l=r(11942),c=r.n(l),h=r(48738),d=r.n(h),u=r(44208),p=["className","cssModule","active","tag","innerRef"],g={tag:u.Wx,innerRef:c().oneOfType([c().object,c().func,c().string]),disabled:c().bool,active:c().bool,className:c().string,cssModule:c().object,onClick:c().func,href:c().any},f=function(e){function t(t){var r;return(r=e.call(this,t)||this).onClick=r.onClick.bind((0,a.A)(r)),r}(0,i.A)(t,e);var r=t.prototype;return r.onClick=function(e){this.props.disabled?e.preventDefault():("#"===this.props.href&&e.preventDefault(),this.props.onClick&&this.props.onClick(e))},r.render=function(){var e=this.props,t=e.className,r=e.cssModule,a=e.active,i=e.tag,l=e.innerRef,c=(0,n.A)(e,p),h=(0,u.qO)(d()(t,"nav-link",{disabled:c.disabled,active:a}),r);return o.createElement(i,(0,s.A)({},c,{ref:l,onClick:this.onClick,className:h}))},t}(o.Component);f.propTypes=g,f.defaultProps={tag:"a"};const m=f},38648:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(9950);function n(e,t){return s.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},43510:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var s=r(58168),n=r(80045),a=r(9950),i=r(2803),o=r(33720),l=a.forwardRef((function(e,t){var r=e.disableSpacing,o=void 0!==r&&r,l=e.classes,c=e.className,h=(0,n.A)(e,["disableSpacing","classes","className"]);return a.createElement("div",(0,s.A)({className:(0,i.A)(l.root,c,!o&&l.spacing),ref:t},h))}));const c=(0,o.A)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(l)},51445:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var s=r(58168),n=r(77387),a=r(9950),i=r(11942),o=r.n(i),l=r(48738),c=r.n(l),h=r(55451),d=r(44208),u={tag:d.Wx,activeTab:o().any,className:o().string,cssModule:o().object},p=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={activeTab:r.props.activeTab},r}return(0,n.A)(t,e),t.getDerivedStateFromProps=function(e,t){return t.activeTab!==e.activeTab?{activeTab:e.activeTab}:null},t.prototype.render=function(){var e=this.props,t=e.className,r=e.cssModule,n=e.tag,i=(0,d.cJ)(this.props,Object.keys(u)),o=(0,d.qO)(c()("tab-content",t),r);return a.createElement(h.H.Provider,{value:{activeTabId:this.state.activeTab}},a.createElement(n,(0,s.A)({},i,{className:o})))},t}(a.Component);const g=p;p.propTypes=u,p.defaultProps={tag:"div"}},52088:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var s=r(58168),n=r(98587),a=r(9950),i=r(11942),o=r.n(i),l=r(48738),c=r.n(l),h=r(55451),d=r(44208),u=["className","cssModule","tabId","tag"],p={tag:d.Wx,className:o().string,cssModule:o().object,tabId:o().any};function g(e){var t=e.className,r=e.cssModule,i=e.tabId,o=e.tag,l=(0,n.A)(e,u),p=function(e){return(0,d.qO)(c()("tab-pane",t,{active:i===e}),r)};return a.createElement(h.H.Consumer,null,(function(e){var t=e.activeTabId;return a.createElement(o,(0,s.A)({},l,{className:p(t)}))}))}g.propTypes=p,g.defaultProps={tag:"div"}},52308:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var s=r(58168),n=r(98587),a=r(9950),i=r(11942),o=r.n(i),l=r(48738),c=r.n(l),h=r(44208),d=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],u={tabs:o().bool,pills:o().bool,vertical:o().oneOfType([o().bool,o().string]),horizontal:o().string,justified:o().bool,fill:o().bool,navbar:o().bool,card:o().bool,tag:h.Wx,className:o().string,cssModule:o().object},p=function(e){var t=e.className,r=e.cssModule,i=e.tabs,o=e.pills,l=e.vertical,u=e.horizontal,p=e.justified,g=e.fill,f=e.navbar,m=e.card,A=e.tag,b=(0,n.A)(e,d),_=(0,h.qO)(c()(t,f?"navbar-nav":"nav",!!u&&"justify-content-"+u,function(e){return!1!==e&&(!0===e||"xs"===e?"flex-column":"flex-"+e+"-column")}(l),{"nav-tabs":i,"card-header-tabs":m&&i,"nav-pills":o,"card-header-pills":m&&o,"nav-justified":p,"nav-fill":g}),r);return a.createElement(A,(0,s.A)({},b,{className:_}))};p.propTypes=u,p.defaultProps={tag:"ul",vertical:!1};const g=p},53209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.createSvgIcon}});var s=r(30477)},55451:(e,t,r)=>{"use strict";r.d(t,{H:()=>s});var s=r(9950).createContext({})},73114:function(module,__unused_webpack_exports,__webpack_require__){var factory;factory=function(){return function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return s.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return s.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return s.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return s.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return s.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return s.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return n.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return a.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return a.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return a.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return a.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return a.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return a.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return a.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return a.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return a.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return a.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return a.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return a.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return a.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return a.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return a.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return i.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return o.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return h.SVGGraphics}});var s=r(1),n=r(5),a=r(2),i=r(16),o=r(7),l=r(10),c=r(17),h=r(18);{const{isNodeJS:e}=r(4);if(e){const e=r(19).PDFNodeStream;(0,n.setPDFNetworkStreamFactory)((t=>new e(t)))}else{const e=r(22).PDFNetworkStream;let t;(0,s.isFetchSupported)()&&(t=r(23).PDFFetchStream),(0,n.setPDFNetworkStreamFactory)((r=>t&&(0,s.isValidFetchUrl)(r.url)?new t(r):new e(r)))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){let{url:t,target:r,rel:a,enabled:i=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.assert)(t&&"string"===typeof t,'addLinkAttributes: A valid "url" parameter must provided.');const o=(0,s.removeNullCharacters)(t);i?e.href=e.title=o:(e.href="",e.title=`Disabled: ${o}`,e.onclick=()=>!1);let c="";switch(r){case l.NONE:break;case l.SELF:c="_self";break;case l.BLANK:c="_blank";break;case l.PARENT:c="_parent";break;case l.TOP:c="_top"}e.target=c,e.rel="string"===typeof a?a:n},t.getFilenameFromUrl=function(e){const t=e.indexOf("#"),r=e.indexOf("?"),s=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",s)+1,s)},t.isFetchSupported=c,t.isValidFetchUrl=h,t.loadScript=function(e){return new Promise(((t,r)=>{const s=document.createElement("script");s.src=e,s.onload=t,s.onerror=function(){r(new Error(`Cannot load script at: ${s.src}`))},(document.head||document.documentElement).appendChild(s)}))},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var s=r(2);const n="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=n;const a="http://www.w3.org/2000/svg";t.DOMCanvasFactory=class{create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:s}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},t.DOMCMapReaderFactory=class{constructor(e){let{baseUrl:t=null,isCompressed:r=!1}=e;this.baseUrl=t,this.isCompressed=r}async fetch(e){let{name:t}=e;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const r=this.baseUrl+t+(this.isCompressed?".bcmap":""),n=this.isCompressed?s.CMapCompressionType.BINARY:s.CMapCompressionType.NONE;return c()&&h(r,document.baseURI)?fetch(r).then((async e=>{if(!e.ok)throw new Error(e.statusText);let t;return t=this.isCompressed?new Uint8Array(await e.arrayBuffer()):(0,s.stringToBytes)(await e.text()),{cMapData:t,compressionType:n}})).catch((e=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+`CMap at: ${r}`)})):new Promise(((e,t)=>{const a=new XMLHttpRequest;a.open("GET",r,!0),this.isCompressed&&(a.responseType="arraybuffer"),a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){let t;if(this.isCompressed&&a.response?t=new Uint8Array(a.response):!this.isCompressed&&a.responseText&&(t=(0,s.stringToBytes)(a.responseText)),t)return void e({cMapData:t,compressionType:n})}t(new Error(a.statusText))}},a.send(null)})).catch((e=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+`CMap at: ${r}`)}))}},t.DOMSVGFactory=class{create(e,t){(0,s.assert)(e>0&&t>0,"Invalid SVG dimensions");const r=document.createElementNS(a,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}createElement(e){return(0,s.assert)("string"===typeof e,"Invalid SVG element type"),document.createElementNS(a,e)}};class i{constructor(e){let{viewBox:t,scale:r,rotation:s,offsetX:n=0,offsetY:a=0,dontFlip:i=!1}=e;this.viewBox=t,this.scale=r,this.rotation=s,this.offsetX=n,this.offsetY=a;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let c,h,d,u,p,g,f,m;switch(s%=360,s=s<0?s+360:s,s){case 180:c=-1,h=0,d=0,u=1;break;case 90:c=0,h=1,d=1,u=0;break;case 270:c=0,h=-1,d=-1,u=0;break;case 0:c=1,h=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}i&&(d=-d,u=-u),0===c?(p=Math.abs(l-t[1])*r+n,g=Math.abs(o-t[0])*r+a,f=Math.abs(t[3]-t[1])*r,m=Math.abs(t[2]-t[0])*r):(p=Math.abs(o-t[0])*r+n,g=Math.abs(l-t[1])*r+a,f=Math.abs(t[2]-t[0])*r,m=Math.abs(t[3]-t[1])*r),this.transform=[c*r,h*r,d*r,u*r,p-c*r*o-d*r*l,g-h*r*o-u*r*l],this.width=f,this.height=m}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:s=this.offsetY,dontFlip:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new i({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:s,dontFlip:n})}convertToViewportPoint(e,t){return s.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=s.Util.applyTransform([e[0],e[1]],this.transform),r=s.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return s.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=i;class o extends s.BaseException{constructor(e,t){super(e),this.type=t}}t.RenderingCancelledException=o;const l={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function c(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype&&"undefined"!==typeof ReadableStream}function h(e,t){try{const{protocol:r}=t?new URL(e,t):new URL(e);return"http:"===r||"https:"===r}catch(r){return!1}}let d;t.LinkTarget=l,t.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,s.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,s.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const r of this.times){const e=r.name;e.length>t&&(t=e.length)}for(const r of this.times){const s=r.end-r.start;e.push(`${r.name.padEnd(t)} ${s}ms\n`)}return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||!(0,s.isString)(e))return null;d||(d=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=d.exec(e);if(!t)return null;const r=parseInt(t[1],10);let n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let i=parseInt(t[4],10);i=i>=0&&i<=23?i:0;let o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;const c=t[7]||"Z";let h=parseInt(t[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===c?(i+=h,o+=u):"+"===c&&(i-=h,o-=u),new Date(Date.UTC(r,n,a,i,o,l))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=u,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let a=0;a<t;a++)r+=u(e[a]);let s=0;const n=new Uint8Array(r);for(let a=0;a<t;a++){let t=e[a];t instanceof Uint8Array||(t="string"===typeof t?d(t):new Uint8Array(t));const r=t.byteLength;n.set(t,s),s+=r}return n},t.assert=o,t.bytesToString=function(e){o(null!==e&&"object"===typeof e&&void 0!==e.length,"Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const s=[];for(let n=0;n<t;n+=r){const a=Math.min(n+r,t),i=e.subarray(n,a);s.push(String.fromCharCode.apply(null,i))}return s.join("")},t.createPromiseCapability=function(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get:()=>t}),e.promise=new Promise((function(r,s){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,s(e)}})),e},t.getVerbosityLevel=function(){return n},t.info=function(e){n>=s.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"===typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean"===typeof e},t.isEmptyObj=function(e){for(const t in e)return!1;return!0},t.isNum=function(e){return"number"===typeof e},t.isString=function(e){return"string"===typeof e},t.isSameOrigin=function(e,t){let r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(n){return!1}const s=new URL(t,r);return r.origin===s.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{const r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(r){}return null},t.removeNullCharacters=function(e){return"string"!==typeof e?(a("The argument for removeNullCharacters must be a string."),e):e.replace(h,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(n=e)},t.shadow=l,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=d,t.stringToPDFString=function(e){const t=e.length,r=[];if("\xfe"===e[0]&&"\xff"===e[1])for(let s=2;s<t;s+=2)r.push(String.fromCharCode(e.charCodeAt(s)<<8|e.charCodeAt(s+1)));else if("\xff"===e[0]&&"\xfe"===e[1])for(let s=2;s<t;s+=2)r.push(String.fromCharCode(e.charCodeAt(s+1)<<8|e.charCodeAt(s)));else for(let s=0;s<t;++s){const t=A[e.charCodeAt(s)];r.push(t?String.fromCharCode(t):e.charAt(s))}return r.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=a,t.unreachable=i,t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0,r(3),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const s={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=s,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let n=s.WARNINGS;function a(e){n>=s.WARNINGS&&console.log(`Warning: ${e}`)}function i(e){throw new Error(e)}function o(e,t){e||i(t)}function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}const c=function(){function e(t){this.constructor===e&&i("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=c,t.PasswordException=class extends c{constructor(e,t){super(e),this.code=t}},t.UnknownErrorException=class extends c{constructor(e,t){super(e),this.details=t}},t.InvalidPDFException=class extends c{},t.MissingPDFException=class extends c{},t.UnexpectedResponseException=class extends c{constructor(e,t){super(e),this.status=t}},t.FormatError=class extends c{},t.AbortException=class extends c{};const h=/\x00/g;function d(e){o("string"===typeof e,"Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let s=0;s<t;++s)r[s]=255&e.charCodeAt(s);return r}function u(e){return void 0!==e.length?e.length:(o(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}const p={get value(){return l(this,"value",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=p;const g={get value(){return l(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=g;const f=["rgb(",0,",",0,",",0,")"];class m{static makeCssRgb(e,t,r){return f[1]=e,f[3]=t,f[5]=r,f.join("")}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=m.applyTransform(e,t),s=m.applyTransform(e.slice(2,4),t),n=m.applyTransform([e[0],e[3]],t),a=m.applyTransform([e[2],e[1]],t);return[Math.min(r[0],s[0],n[0],a[0]),Math.min(r[1],s[1],n[1],a[1]),Math.max(r[0],s[0],n[0],a[0]),Math.max(r[1],s[1],n[1],a[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],s=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],i=(r+a)/2,o=Math.sqrt((r+a)*(r+a)-4*(r*a-n*s))/2,l=i+o||1,c=i-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){function r(e,t){return e-t}const s=[e[0],e[2],t[0],t[2]].sort(r),n=[e[1],e[3],t[1],t[3]].sort(r),a=[];return e=m.normalizeRect(e),t=m.normalizeRect(t),s[0]===e[0]&&s[1]===t[0]||s[0]===t[0]&&s[1]===e[0]?(a[0]=s[1],a[2]=s[2],n[0]===e[1]&&n[1]===t[1]||n[0]===t[1]&&n[1]===e[1]?(a[1]=n[1],a[3]=n[2],a):null):null}}t.Util=m;const A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],b=function(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){const e=new Blob([t],{type:r});return URL.createObjectURL(e)}let s=`data:${r};base64,`;for(let n=0,a=t.length;n<a;n+=3){const r=255&t[n],i=255&t[n+1],o=255&t[n+2];s+=e[r>>2]+e[(3&r)<<4|i>>4]+e[n+1<a?(15&i)<<2|o>>6:64]+e[n+2<a?63&o:64]}return s}}();t.createObjectURL=b},function(e,t,r){"use strict";r(4)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const s="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=s},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_api_compatibility=__w_pdfjs_require__(7),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let r;if("string"===typeof e)r={url:e};else if((0,_util.isArrayBuffer)(e))r={data:e};else if(e instanceof PDFDataRangeTransport)r={range:e};else{if("object"!==typeof e)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");r=e}const s=Object.create(null);let n=null,a=null;for(const o in r)if("url"!==o||"undefined"===typeof window)if("range"!==o)if("worker"!==o)if("data"!==o||r[o]instanceof Uint8Array)s[o]=r[o];else{const e=r[o];if("string"===typeof e)s[o]=(0,_util.stringToBytes)(e);else if("object"!==typeof e||null===e||isNaN(e.length)){if(!(0,_util.isArrayBuffer)(e))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");s[o]=new Uint8Array(e)}else s[o]=new Uint8Array(e)}else a=r[o];else n=r[o];else s[o]=new URL(r[o],window.location).href;if(s.rangeChunkSize=s.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,s.CMapReaderFactory=s.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,s.ignoreErrors=!0!==s.stopAtErrors,s.fontExtraProperties=!0===s.fontExtraProperties,s.pdfBug=!0===s.pdfBug,Number.isInteger(s.maxImageSize)||(s.maxImageSize=-1),"boolean"!==typeof s.isEvalSupported&&(s.isEvalSupported=!0),"boolean"!==typeof s.disableFontFace&&(s.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!==typeof s.disableRange&&(s.disableRange=!1),"boolean"!==typeof s.disableStream&&(s.disableStream=!1),"boolean"!==typeof s.disableAutoFetch&&(s.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(s.verbosity),!a){const e={verbosity:s.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};a=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=a}const i=t.docId;return a.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(a,s,n,i),r=new Promise((function(e){let t;n?t=new _transport_stream.PDFDataTransportStream({length:s.length,initialData:s.initialData,progressiveDone:s.progressiveDone,disableRange:s.disableRange,disableStream:s.disableStream},n):s.data||(t=createPDFNetworkStream({url:s.url,length:s.length,httpHeaders:s.httpHeaders,withCredentials:s.withCredentials,rangeChunkSize:s.rangeChunkSize,disableRange:s.disableRange,disableStream:s.disableStream})),e(t)}));return Promise.all([e,r]).then((function(e){let[r,n]=e;if(t.destroyed)throw new Error("Loading aborted");const o=new _message_handler.MessageHandler(i,r,a.port);o.postMessageTransfers=a.postMessageTransfers;const l=new WorkerTransport(o,t,n,s);t._transport=l,o.send("Ready",null)}))})).catch(t._capability.reject),t}function _fetchDocument(e,t,r,s){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone),e.messageHandler.sendWithPromise("GetDocRequest",{docId:s,apiVersion:"2.5.207",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties}).then((function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t})))}const PDFDocumentLoadingTask=function(){let e=0;return class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then((()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}))}}}();class PDFDataRangeTransport{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.length=e,this.initialData=t,this.progressiveDone=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const r of this._progressListeners)r(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getOpenActionDestination(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getOutline(){return this._transport.getOutline()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(){return this._transport.startCleanup()}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=s?new _display_utils.StatTimer:null,this._pdfBug=s,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:s=0,dontFlip:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:s,dontFlip:n})}getAnnotations(){let{intent:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.annotationsPromise&&this.annotationsIntent===e||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,e),this.annotationsIntent=e),this.annotationsPromise}render(e){let{canvasContext:t,viewport:r,intent:s="display",enableWebGL:n=!1,renderInteractiveForms:a=!1,transform:i=null,imageLayer:o=null,canvasFactory:l=null,background:c=null}=e;this._stats&&this._stats.time("Overall");const h="print"===s?"print":"display";this.pendingCleanup=!1,this.intentStates[h]||(this.intentStates[h]=Object.create(null));const d=this.intentStates[h];d.streamReaderCancelTimeout&&(clearTimeout(d.streamReaderCancelTimeout),d.streamReaderCancelTimeout=null);const u=l||new _display_utils.DOMCanvasFactory,p=new _webgl.WebGLContext({enable:n});d.displayReadyCapability||(d.displayReadyCapability=(0,_util.createPromiseCapability)(),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:h,renderInteractiveForms:!0===a}));const g=e=>{const t=d.renderTasks.indexOf(f);t>=0&&d.renderTasks.splice(t,1),(this.cleanupAfterRender||"print"===h)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(f.capability.reject(e),this._abortOperatorList({intentState:d,reason:e})):f.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},f=new InternalRenderTask({callback:g,params:{canvasContext:t,viewport:r,transform:i,imageLayer:o,background:c},objs:this.objs,commonObjs:this.commonObjs,operatorList:d.operatorList,pageIndex:this._pageIndex,canvasFactory:u,webGLContext:p,useRequestAnimationFrame:"print"!==h,pdfBug:this._pdfBug});d.renderTasks||(d.renderTasks=[]),d.renderTasks.push(f);const m=f.task;return d.displayReadyCapability.promise.then((e=>{this.pendingCleanup?g():(this._stats&&this._stats.time("Rendering"),f.initializeGraphics(e),f.operatorListChanged())})).catch(g),m}getOperatorList(){const e="oplist";this.intentStates[e]||(this.intentStates[e]=Object.create(null));const t=this.intentStates[e];let r;return t.opListReadCapability||(r={},r.operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);const e=t.renderTasks.indexOf(r);e>=0&&t.renderTasks.splice(e,1)}},t.opListReadCapability=(0,_util.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(r),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:e})),t.opListReadCapability.promise}streamTextContent(){let{normalizeWhitespace:e=!1,disableCombineTextItems:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===e,combineTextItems:!0!==t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.streamTextContent(e);return new Promise((function(e,r){const s=t.getReader(),n={items:[],styles:Object.create(null)};!function t(){s.read().then((function(r){let{value:s,done:a}=r;a?e(n):(Object.assign(n.styles,s.styles),n.items.push(...s.items),t())}),r)}()}))}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;const e=[];return Object.keys(this.intentStates).forEach((t=>{const r=this.intentStates[t];this._abortOperatorList({intentState:r,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==t&&r.renderTasks.forEach((function(t){const r=t.capability.promise.catch((function(){}));e.push(r),t.cancel()}))})),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.pendingCleanup||Object.keys(this.intentStates).some((e=>{const t=this.intentStates[e];return 0!==t.renderTasks.length||!t.operatorList.lastChunk})))&&(Object.keys(this.intentStates).forEach((e=>{delete this.intentStates[e]})),this.objs.clear(),this.annotationsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0)}_startRenderPage(e,t){const r=this.intentStates[t];r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let r=0,s=e.length;r<s;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;for(let r=0;r<t.renderTasks.length;r++)t.renderTasks[r].operatorListChanged();e.lastChunk&&this._tryCleanup()}_pumpOperatorList(e){(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');const t=this._transport.messageHandler.sendWithStream("GetOperatorList",e).getReader(),r=this.intentStates[e.intent];r.streamReader=t;const s=()=>{t.read().then((e=>{let{value:t,done:n}=e;n?r.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,r),s())}),(e=>{if(r.streamReader=null,!this._transport.destroyed){if(r.operatorList){r.operatorList.lastChunk=!0;for(let e=0;e<r.renderTasks.length;e++)r.renderTasks[e].operatorListChanged();this._tryCleanup()}if(r.displayReadyCapability)r.displayReadyCapability.reject(e);else{if(!r.opListReadCapability)throw e;r.opListReadCapability.reject(e)}}}))};s()}_abortOperatorList(e){let{intentState:t,reason:r,force:s=!1}=e;if((0,_util.assert)(r instanceof Error||"object"===typeof r&&null!==r,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),t.streamReader){if(!s){if(0!==t.renderTasks.length)return;if(r instanceof _display_utils.RenderingCancelledException)return void(t.streamReaderCancelTimeout=setTimeout((()=>{this._abortOperatorList({intentState:t,reason:r,force:!0}),t.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}t.streamReader.cancel(new _util.AbortException(r&&r.message)),t.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some((e=>this.intentStates[e]===t&&(delete this.intentStates[e],!0))),this.cleanup())}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._listeners=[],this._defer=e,this._deferred=Promise.resolve(void 0)}postMessage(e,t){if(!this._defer)return void this._listeners.forEach((t=>{t.call(this,{data:e})}));const r=new WeakMap,s={data:function e(s){if("object"!==typeof s||null===s)return s;if(r.has(s))return r.get(s);let n,a;if((n=s.buffer)&&(0,_util.isArrayBuffer)(n))return a=t&&t.includes(n)?new s.constructor(n,s.byteOffset,s.byteLength):new s.constructor(s),r.set(s,a),a;a=Array.isArray(s)?[]:{},r.set(s,a);for(const t in s){let r,n=s;for(;!(r=Object.getOwnPropertyDescriptor(n,t));)n=Object.getPrototypeOf(n);if("undefined"!==typeof r.value)if("function"!==typeof r.value)a[t]=e(r.value);else if(s.hasOwnProperty&&s.hasOwnProperty(t))throw new Error(`LoopbackPort.postMessage - cannot clone: ${s[t]}`)}return a}(e)};this._deferred.then((()=>{this._listeners.forEach((e=>{e.call(this,s)}))}))}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const r=this._listeners.indexOf(t);this._listeners.splice(r,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorker=function PDFWorkerClosure(){const pdfWorkerPorts=new WeakMap;let isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document&&"currentScript"in document){const e=document.currentScript&&document.currentScript.src;e&&(fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if("undefined"!==typeof fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();const loader=async function(){const mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){const t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}class PDFWorker{constructor(){let{name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t&&pdfWorkerPorts.has(t))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=r,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return pdfWorkerPorts.set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if("undefined"!==typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let t=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),r=new _message_handler.MessageHandler("main","worker",e),s=()=>{e.removeEventListener("error",n),r.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=()=>{this._webWorker||s()};e.addEventListener("error",n),r.on("test",(t=>{e.removeEventListener("error",n),this.destroyed?s():t?(this._messageHandler=r,this._port=e,this._webWorker=e,t.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),e.terminate())})),r.on("ready",(t=>{if(e.removeEventListener("error",n),this.destroyed)s();else try{a()}catch(r){this._setupFakeWorker()}}));const a=()=>{const e=new Uint8Array([this.postMessageTransfers?255:0]);try{r.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,r.send("test",e)}};return void a()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const r="fake"+nextFakeWorkerId++,s=new _message_handler.MessageHandler(r+"_worker",r,t);e.setup(s,t);const n=new _message_handler.MessageHandler(r,r+"_worker",t);this._messageHandler=n,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(e.port)?pdfWorkerPorts.get(e.port):new PDFWorker(e)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(e,t,r,s){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=s,this.CMapReaderFactory=new s.CMapReaderFactory({baseUrl:s.cMapUrl,isCompressed:s.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];this.pageCache.forEach((function(t){t&&e.push(t._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.fontLoader.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function(e){let{value:r,done:s}=e;s?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(r),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e)}})),e.on("ReaderHeadersReady",(e=>{const r=(0,_util.createPromiseCapability)(),s=this._fullReader;return s.headersReady.then((()=>{s.isStreamingSupported&&s.isRangeSupported||(this._lastProgress&&t.onProgress&&t.onProgress(this._lastProgress),s.onProgress=e=>{t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:s.isStreamingSupported,isRangeSupported:s.isRangeSupported,contentLength:s.contentLength})}),r.reject),r.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=()=>{r.read().then((function(e){let{value:r,done:s}=e;s?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(r),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(r),1,[r]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{r.cancel(e)}):t.close()})),e.on("GetDoc",(e=>{let{pdfInfo:r}=e;this._numPages=r.numPages,t._capability.resolve(new PDFDocumentProxy(r,this))})),e.on("DocException",(function(e){let r;switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":r=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details)}t._capability.reject(r)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const s=e=>{this._passwordCapability.resolve({password:e})};try{t.onPassword(s,e.code)}catch(r){this._passwordCapability.reject(r)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||this.pageCache[e.pageIndex]._startRenderPage(e.transparency,e.intent)})),e.on("commonobj",(t=>{if(this.destroyed)return;const[r,s,n]=t;if(!this.commonObjs.has(r))switch(s){case"Font":const t=this._params;if("error"in n){const e=n.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(r,e);break}let a=null;t.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(a={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const i=new _font_loader.FontFaceObject(n,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:a});this.fontLoader.bind(i).catch((t=>e.sendWithPromise("FontFallback",{id:r}))).finally((()=>{!t.fontExtraProperties&&i.data&&(i.data=null),this.commonObjs.resolve(r,i)}));break;case"FontPath":case"FontType3Res":case"Image":this.commonObjs.resolve(r,n);break;default:throw new Error(`Got unknown common object type ${s}`)}})),e.on("obj",(e=>{if(this.destroyed)return;const[t,r,s,n]=e,a=this.pageCache[r];if(!a.objs.has(t)){if("Image"!==s)throw new Error(`Got unknown object type ${s}`);{a.objs.resolve(t,n);const e=8e6;n&&"data"in n&&n.data.length>e&&(a.cleanupAfterRender=!0)}}})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})})),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",((e,t)=>{if(this.destroyed)return void t.error(new Error("Worker was destroyed"));let r=!1;t.onPull=()=>{r?t.close():(r=!0,this.CMapReaderFactory.fetch(e).then((function(e){t.enqueue(e,1,[e.cMapData.buffer])})).catch((function(e){t.error(e)})))}}))}_onUnsupportedFeature(e){let{featureId:t}=e;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));const t=e-1;if(t in this.pagePromises)return this.pagePromises[t];const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const r=new PDFPageProxy(t,e,this,this._params.pdfBug);return this.pageCache[t]=r,r}));return this.pagePromises[t]=r,r}getPageIndex(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch((function(e){return Promise.reject(new Error(e))}))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then((e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?this._fullReader.filename:null})))}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}startCleanup(){return this.messageHandler.sendWithPromise("Cleanup",null).then((()=>{for(let e=0,t=this.pageCache.length;e<t;e++){const t=this.pageCache[e];if(t&&!t.cleanup())throw new Error(`startCleanup: Page ${e+1} is currently rendering.`)}this.commonObjs.clear(),this.fontLoader.clear()}))}get loadingParams(){const e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableFontFace:e.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;const r=this._objs[e];if(!r||!r.resolved)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=this._objs[e];return!!t&&t.resolved}resolve(e,t){const r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(e){this._internalRenderTask=e,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}const InternalRenderTask=function(){const e=new WeakSet;return class{constructor(e){let{callback:t,params:r,objs:s,commonObjs:n,operatorList:a,pageIndex:i,canvasFactory:o,webGLContext:l,useRequestAnimationFrame:c=!1,pdfBug:h=!1}=e;this.callback=t,this.params=r,this.objs=s,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=i,this.canvasFactory=o,this.webGLContext=l,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=r.canvasContext.canvas}initializeGraphics(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.cancelled)return;if(this._canvas){if(e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:s,transform:n,imageLayer:a,background:i}=this.params;this.gfx=new _canvas.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a),this.gfx.beginDrawing({transform:n,viewport:s,transparency:t,background:i}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this.cancel.bind(this))})):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback())))}}}(),version="2.5.207";exports.version=version;const build="0974d605";exports.build=build},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var s=r(2);class n{constructor(e){let{docId:t,onUnsupportedFeature:r}=e;this.constructor===n&&(0,s.unreachable)("Cannot initialize BaseFontLoader."),this.docId=t,this._onUnsupportedFeature=r,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||(t=this.styleElement=document.createElement("style"),t.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,document.documentElement.getElementsByTagName("head")[0].appendChild(t));const r=t.sheet;r.insertRule(e,r.cssRules.length)}clear(){this.nativeFontFaces.forEach((function(e){document.fonts.delete(e)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(r){throw this._onUnsupportedFeature({featureId:s.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,s.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((r=>{const s=this._queueLoadingCallback(r);this._prepareFontLoadEvent([t],[e],s)}))}}_queueLoadingCallback(e){(0,s.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const e="undefined"!==typeof document&&!!document.fonts;return(0,s.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){(0,s.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,s.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,r){(0,s.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let a;t.FontLoader=a,t.FontLoader=a=class extends n{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"===typeof navigator)e=!0;else{const t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,s.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this.loadingContext,r={id:"pdfjs-font-loading-"+t.nextRequestId++,done:!1,complete:function(){for((0,s.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){const e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}get _loadTestFont(){return(0,s.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,s){return e.substring(0,t)+s+e.substring(t+r)}let i,o;const l=document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let h=0;const d=`lt${Date.now()}${this.loadTestFontId++}`;let u=this._loadTestFont;u=a(u,976,d.length,d);const p=1482184792;let g=n(u,16);for(i=0,o=d.length-3;i<o;i+=4)g=g-p+n(d,i)|0;i<d.length&&(g=g-p+n(d+"XXX",i)|0),u=a(u,16,4,(0,s.string32)(g));const f=`@font-face {font-family:"${d}";src:url(data:font/opentype;base64,${btoa(u)});}`;this.insertRule(f);const m=[];for(i=0,o=t.length;i<o;i++)m.push(t[i].loadedName);m.push(d);const A=document.createElement("div");for(A.style.visibility="hidden",A.style.width=A.style.height="10px",A.style.position="absolute",A.style.top=A.style.left="0px",i=0,o=m.length;i<o;++i){const e=document.createElement("span");e.textContent="Hi",e.style.fontFamily=m[i],A.appendChild(e)}document.body.appendChild(A),function e(t,r){if(h++,h>30)return(0,s.warn)("Load test font never loaded."),void r();c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(d,(function(){document.body.removeChild(A),r.complete()}))}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:r=!0,disableFontFace:s=!1,ignoreErrors:n=!1,onUnsupportedFeature:a=null,fontRegistry:i=null}=t;this.compiledGlyphs=Object.create(null);for(const o in e)this[o]=e[o];this.isEvalSupported=!1!==r,this.disableFontFace=!0===s,this.ignoreErrors=!0===n,this._onUnsupportedFeature=a,this.fontRegistry=i}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;const e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,s.bytesToString)(new Uint8Array(this.data)),t=`url(data:${this.mimetype};base64,${btoa(e)});`,r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(a){if(!this.ignoreErrors)throw a;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:s.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,s.warn)(`getPathGenerator - ignoring character: "${a}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&s.IsEvalSupportedCached.value){let e,s="";for(let t=0,a=r.length;t<a;t++)n=r[t],e=void 0!==n.args?n.args.join(","):"",s+="c."+n.cmd+"("+e+");\n";return this.compiledGlyphs[t]=new Function("c","size",s)}return this.compiledGlyphs[t]=function(e,t){for(let s=0,a=r.length;s<a;s++)n=r[s],"scale"===n.cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apiCompatibilityParams=void 0;var s=r(4);const n=Object.create(null);s.isNodeJS&&(n.disableFontFace=!0);const a=Object.freeze(n);t.apiCompatibilityParams=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var s=r(2),n=r(9),a=4096,i=.65,o=16;function l(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],r=e[1],s=e[2],n=e[3],a=e[4],i=e[5],o=t*n-r*s,l=r*s-t*n;return[n/o,r/l,s/l,t/o,(n*a-s*i)/l,(r*a-t*i)/o]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,s,n,a,i){var o=this._transformMatrix;this._transformMatrix=[o[0]*t+o[2]*r,o[1]*t+o[3]*r,o[0]*s+o[2]*n,o[1]*s+o[3]*n,o[0]*a+o[2]*i+o[4],o[1]*a+o[3]*i+o[5]],e._originalTransform(t,r,s,n,a,i)},e.setTransform=function(t,r,s,n,a,i){this._transformMatrix=[t,r,s,n,a,i],e._originalSetTransform(t,r,s,n,a,i)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*-r+s[2]*t,s[1]*-r+s[3]*t,s[4],s[5]],this._originalRotate(e)})}var c=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,s){var n;return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,r),n.context.setTransform(1,0,0,1,0,0)):(n=this.canvasFactory.create(t,r),this.cache[e]=n),s&&l(n.context),n},clear(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}(),h=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=s.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=s.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=s.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}(),d=function(){function e(e,t,r,s,n,a){this.ctx=e,this.current=new h,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=s,this.webGLContext=n,this.imageLayer=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new c(this.canvasFactory),e&&l(e),this._cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,n,a,i,l,c=t.height,h=t.width,d=c%o,u=(c-d)/o,p=0===d?u:u+1,g=e.createImageData(h,o),f=0,m=t.data,A=g.data;if(t.kind===s.ImageKind.GRAYSCALE_1BPP){var b=m.byteLength,_=new Uint32Array(A.buffer,0,A.byteLength>>2),v=_.length,y=h+7>>3,S=4294967295,x=s.IsLittleEndianCached.value?4278190080:255;for(n=0;n<p;n++){for(i=n<u?o:d,r=0,a=0;a<i;a++){for(var C=b-f,P=0,k=C>y?h:8*C-7,R=-8&k,w=0,T=0;P<R;P+=8)T=m[f++],_[r++]=128&T?S:x,_[r++]=64&T?S:x,_[r++]=32&T?S:x,_[r++]=16&T?S:x,_[r++]=8&T?S:x,_[r++]=4&T?S:x,_[r++]=2&T?S:x,_[r++]=1&T?S:x;for(;P<k;P++)0===w&&(T=m[f++],w=128),_[r++]=T&w?S:x,w>>=1}for(;r<v;)_[r++]=0;e.putImageData(g,0,n*o)}}else if(t.kind===s.ImageKind.RGBA_32BPP){for(a=0,l=h*o*4,n=0;n<u;n++)A.set(m.subarray(f,f+l)),f+=l,e.putImageData(g,0,a),a+=o;n<p&&(l=h*d*4,A.set(m.subarray(f,f+l)),e.putImageData(g,0,a))}else{if(t.kind!==s.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(l=h*(i=o),n=0;n<p;n++){for(n>=u&&(l=h*(i=d)),r=0,a=l;a--;)A[r++]=m[f++],A[r++]=m[f++],A[r++]=m[f++],A[r++]=255;e.putImageData(g,0,n*o)}}}}function r(e,t){for(var r=t.height,s=t.width,n=r%o,a=(r-n)/o,i=0===n?a:a+1,l=e.createImageData(s,o),c=0,h=t.data,d=l.data,u=0;u<i;u++){for(var p=u<a?o:n,g=3,f=0;f<p;f++)for(var m=0,A=0;A<s;A++){if(!m){var b=h[c++];m=128}d[g]=b&m?0:255,g+=4,m>>=1}e.putImageData(l,0,u*o)}}function d(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],s=0,n=r.length;s<n;s++){var a=r[s];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function u(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function p(e,t,r,s){for(var n=e.length,a=3;a<n;a+=4){var i=e[a];if(0===i)e[a-3]=t,e[a-2]=r,e[a-1]=s;else if(i<255){var o=255-i;e[a-3]=e[a-3]*i+t*o>>8,e[a-2]=e[a-2]*i+r*o>>8,e[a-1]=e[a-1]*i+s*o>>8}}}function g(e,t,r){for(var s=e.length,n=1/255,a=3;a<s;a+=4){var i=r?r[e[a]]:e[a];t[a]=t[a]*i*n|0}}function f(e,t,r){for(var s=e.length,n=3;n<s;n+=4){var a=77*e[n-3]+152*e[n-2]+28*e[n-1];t[n]=r?t[n]*r[a>>8]>>8:t[n]*a>>16}}function m(e,t,r,s){var n=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var i=t.backdrop||null;if(!t.transferMap&&s.isEnabled){const a=s.composeSMask({layer:r.canvas,mask:n,properties:{subtype:t.subtype,backdrop:i}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(a,t.offsetX,t.offsetY)}!function(e,t,r,s,n,a,i){var o,l=!!a,c=l?a[0]:0,h=l?a[1]:0,d=l?a[2]:0;o="Luminosity"===n?f:g;for(var u=Math.min(s,Math.ceil(1048576/r)),m=0;m<s;m+=u){var A=Math.min(u,s-m),b=e.getImageData(0,m,r,A),_=t.getImageData(0,m,r,A);l&&p(b.data,c,h,d),o(b.data,_.data,i),e.putImageData(_,0,m)}}(a,r,n.width,n.height,t.subtype,i,t.transferMap),e.drawImage(n,0,0)}var A=["butt","round","square"],b=["miter","round","bevel"],_={},v={};for(var y in e.prototype={beginDrawing(e){let{transform:t,viewport:r,transparency:s=!1,background:n=null}=e;var a=this.ctx.canvas.width,i=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=n||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,a,i),this.ctx.restore(),s){var o=this.cachedCanvases.getCanvas("transparent",a,i,!0);this.compositeCtx=this.ctx,this.transparentCanvas=o.canvas,this.ctx=o.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),u(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,r.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,r,n){var a=e.argsArray,i=e.fnArray,o=t||0,l=a.length;if(l===o)return o;for(var c,h=l-o>10&&"function"===typeof r,d=h?Date.now()+15:0,u=0,p=this.commonObjs,g=this.objs;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,r),o;if((c=i[o])!==s.OPS.dependency)this[c].apply(this,a[o]);else for(const e of a[o]){const t=e.startsWith("g_")?p:g;if(!t.has(e))return t.get(e,r),o}if(++o===l)return o;if(h&&++u>10){if(Date.now()>d)return r(),o;u=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=A[e]},setLineJoin:function(e){this.ctx.lineJoin=b[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent(e){},setFlatness(e){},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var s=e[t],n=s[0],a=s[1];switch(n){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=s[1];break;case"ca":this.current.fillAlpha=s[1],this.ctx.globalAlpha=s[1];break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,s="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(s,t,r,!0),a=this.ctx,i=a.mozCurrentTransform;this.ctx.save();var o=n.context;o.scale(1/e.scaleX,1/e.scaleY),o.translate(-e.offsetX,-e.offsetY),o.transform.apply(o,i),e.startTransformInverse=o.mozCurrentTransformInverse,d(a,o),this.ctx=o,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),m(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),d(e,this.ctx),this.current.resumeSMaskCtx=e;var t=s.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),m(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),d(e,this.ctx);var t=s.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(e,t,r,s,n,a){this.ctx.transform(e,t,r,s,n,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,n=this.current,a=n.x,i=n.y,o=0,l=0,c=e.length;o<c;o++)switch(0|e[o]){case s.OPS.rectangle:a=t[l++],i=t[l++];var h=t[l++],d=t[l++];0===h&&(h=this.getSinglePixelWidth()),0===d&&(d=this.getSinglePixelWidth());var u=a+h,p=i+d;this.ctx.moveTo(a,i),this.ctx.lineTo(u,i),this.ctx.lineTo(u,p),this.ctx.lineTo(a,p),this.ctx.lineTo(a,i),this.ctx.closePath();break;case s.OPS.moveTo:a=t[l++],i=t[l++],r.moveTo(a,i);break;case s.OPS.lineTo:a=t[l++],i=t[l++],r.lineTo(a,i);break;case s.OPS.curveTo:a=t[l+4],i=t[l+5],r.bezierCurveTo(t[l],t[l+1],t[l+2],t[l+3],a,i),l+=6;break;case s.OPS.curveTo2:r.bezierCurveTo(a,i,t[l],t[l+1],t[l+2],t[l+3]),a=t[l+2],i=t[l+3],l+=4;break;case s.OPS.curveTo3:a=t[l+2],i=t[l+3],r.bezierCurveTo(t[l],t[l+1],a,i,a,i),l+=4;break;case s.OPS.closePath:r.closePath()}n.setCurrentPoint(a,i)},closePath:function(){this.ctx.closePath()},stroke:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,r&&r.hasOwnProperty("type")&&"Pattern"===r.type){t.save();const e=t.mozCurrentTransform,n=s.Util.singularValueDecompose2dScale(e)[0];t.strokeStyle=r.getPattern(t,this),t.lineWidth=Math.max(this.getSinglePixelWidth()*i,this.current.lineWidth*n),t.stroke(),t.restore()}else t.lineWidth=Math.max(this.getSinglePixelWidth()*i,this.current.lineWidth),t.stroke();e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.fillColor,s=!1;this.current.patternFill&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=r.getPattern(t,this),s=!0),this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill(),s&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=_},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=s.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var s=e[r];t.setTransform.apply(t,s.transform),t.translate(s.x,s.y),s.addToPath(t,s.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var r=this.commonObjs.get(e),n=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(n.fontMatrix=r.fontMatrix?r.fontMatrix:s.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,s.warn)("Invalid font matrix for font "+e),t<0?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;var a=r.loadedName||"sans-serif";let i="normal";r.black?i="900":r.bold&&(i="bold");var o=r.italic?"italic":"normal",l=`"${a}", ${r.fallbackName}`;let c=t;t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font=`${o} ${i} ${c}px ${l}`},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,s,n,a){this.current.textMatrix=[e,t,r,s,n,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(e,t,r,n){var a=this.ctx,i=this.current,o=i.font,l=i.textRenderingMode,c=i.fontSize/i.fontSizeScale,h=l&s.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&s.TextRenderingMode.ADD_TO_PATH_FLAG);const u=i.patternFill&&!o.missingFile;var p;(o.disableFontFace||d||u)&&(p=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||u?(a.save(),a.translate(t,r),a.beginPath(),p(a,c),n&&a.setTransform.apply(a,n),h!==s.TextRenderingMode.FILL&&h!==s.TextRenderingMode.FILL_STROKE||a.fill(),h!==s.TextRenderingMode.STROKE&&h!==s.TextRenderingMode.FILL_STROKE||a.stroke(),a.restore()):(h!==s.TextRenderingMode.FILL&&h!==s.TextRenderingMode.FILL_STROKE||a.fillText(e,t,r),h!==s.TextRenderingMode.STROKE&&h!==s.TextRenderingMode.FILL_STROKE||a.strokeText(e,t,r)),d&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:a.mozCurrentTransform,x:t,y:r,fontSize:c,addToPath:p})},get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,n=3;n<t.length;n+=4)if(t[n]>0&&t[n]<255){r=!0;break}return(0,s.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var n=t.fontSize;if(0===n)return;var a=this.ctx,o=t.fontSizeScale,l=t.charSpacing,c=t.wordSpacing,h=t.fontDirection,d=t.textHScale*h,u=e.length,p=r.vertical,g=p?1:-1,f=r.defaultVMetrics,m=n*t.fontMatrix[0],A=t.textRenderingMode===s.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;let b;if(a.save(),t.patternFill){a.save();const e=t.fillColor.getPattern(a,this);b=a.mozCurrentTransform,a.restore(),a.fillStyle=e}a.transform.apply(a,t.textMatrix),a.translate(t.x,t.y+t.textRise),h>0?a.scale(d,-1):a.scale(d,1);var _=t.lineWidth,v=t.textMatrixScale;if(0===v||0===_){var y=t.textRenderingMode&s.TextRenderingMode.FILL_STROKE_MASK;y!==s.TextRenderingMode.STROKE&&y!==s.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,_=this.getSinglePixelWidth()*i)}else _/=v;1!==o&&(a.scale(o,o),_/=o),a.lineWidth=_;var S,x=0;for(S=0;S<u;++S){var C=e[S];if((0,s.isNum)(C))x+=g*C*n/1e3;else{var P,k,R,w,T,E,F,L=!1,M=(C.isSpace?c:0)+l,I=C.fontChar,O=C.accent,N=C.width;if(p?(T=C.vmetric||f,E=-(E=C.vmetric?T[1]:.5*N)*m,F=T[2]*m,N=T?-T[0]:N,P=E/o,k=(x+F)/o):(P=x/o,k=0),r.remeasure&&N>0){var D=1e3*a.measureText(I).width/n*o;if(N<D&&this.isFontSubpixelAAEnabled){var j=N/D;L=!0,a.save(),a.scale(j,1),P/=j}else N!==D&&(P+=(N-D)/2e3*n/o)}(C.isInFont||r.missingFile)&&(A&&!O?a.fillText(I,P,k):(this.paintChar(I,P,k,b),O&&(R=P+O.offset.x/o,w=k-O.offset.y/o,this.paintChar(O.fontChar,R,w,b)))),x+=p?N*m-M*h:N*m+M*h,L&&a.restore()}}p?t.y-=x:t.x+=x*d,a.restore()},showType3Text:function(e){var t,r,n,a,i=this.ctx,o=this.current,l=o.font,c=o.fontSize,h=o.fontDirection,d=l.vertical?1:-1,u=o.charSpacing,p=o.wordSpacing,g=o.textHScale*h,f=o.fontMatrix||s.FONT_IDENTITY_MATRIX,m=e.length;if(o.textRenderingMode!==s.TextRenderingMode.INVISIBLE&&0!==c){for(this._cachedGetSinglePixelWidth=null,i.save(),i.transform.apply(i,o.textMatrix),i.translate(o.x,o.y),i.scale(g,h),t=0;t<m;++t)if(r=e[t],(0,s.isNum)(r))a=d*r*c/1e3,this.ctx.translate(a,0),o.x+=a*g;else{var A=(r.isSpace?p:0)+u,b=l.charProcOperatorList[r.operatorListId];b?(this.processingType3=r,this.save(),i.scale(c,c),i.transform.apply(i,f),this.executeOperatorList(b),this.restore(),n=s.Util.applyTransform([r.width,0],f)[0]*c+A,i.translate(n,0),o.x+=n*g):(0,s.warn)(`Type3 character "${r.operatorListId}" is not available.`)}i.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,s,n,a){this.ctx.rect(r,s,n-r,a-s),this.clip(),this.endPath()},getColorN_Pattern:function(t){var r;if("TilingPattern"===t[0]){var s=t[1],a=this.baseTransform||this.ctx.mozCurrentTransform.slice(),i={createCanvasGraphics:t=>new e(t,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)};r=new n.TilingPattern(t,s,this.ctx,i,a)}else r=(0,n.getShadingPatternFromIR)(t);return r},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,r){var n=s.Util.makeCssRgb(e,t,r);this.ctx.strokeStyle=n,this.current.strokeColor=n},setFillRGBColor:function(e,t,r){var n=s.Util.makeCssRgb(e,t,r);this.ctx.fillStyle=n,this.current.fillColor=n,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var r=(0,n.getShadingPatternFromIR)(e);t.fillStyle=r.getPattern(t,this,!0);var a=t.mozCurrentTransformInverse;if(a){var i=t.canvas,o=i.width,l=i.height,c=s.Util.applyTransform([0,0],a),h=s.Util.applyTransform([0,l],a),d=s.Util.applyTransform([o,0],a),u=s.Util.applyTransform([o,l],a),p=Math.min(c[0],h[0],d[0],u[0]),g=Math.min(c[1],h[1],d[1],u[1]),f=Math.max(c[0],h[0],d[0],u[0]),m=Math.max(c[1],h[1],d[1],u[1]);this.ctx.fillRect(p,g,f-p,m-g)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,s.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,s.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t){var r=t[2]-t[0],s=t[3]-t[1];this.ctx.rect(t[0],t[1],r,s),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx;e.isolated||(0,s.info)("TODO: Support non-isolated groups."),e.knockout&&(0,s.warn)("Knockout groups not supported.");var r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var n=s.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),i=[0,0,t.canvas.width,t.canvas.height];n=s.Util.intersect(n,i)||[0,0,0,0];var o=Math.floor(n[0]),l=Math.floor(n[1]),c=Math.max(Math.ceil(n[2])-o,1),h=Math.max(Math.ceil(n[3])-l,1),u=1,p=1;c>a&&(u=c/a,c=a),h>a&&(p=h/a,h=a);var g="groupAt"+this.groupLevel;e.smask&&(g+="_smask_"+this.smaskCounter++%2);var f=this.cachedCanvases.getCanvas(g,c,h,!0),m=f.context;m.scale(1/u,1/p),m.translate(-o,-l),m.transform.apply(m,r),e.smask?this.smaskStack.push({canvas:f.canvas,context:m,offsetX:o,offsetY:l,scaleX:u,scaleY:p,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,l),t.scale(u,p)),d(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),u(this.ctx),this.current=new h,Array.isArray(e)&&4===e.length){var s=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],s,n),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,s=e.width,n=e.height,a=this.current.fillColor,i=this.current.patternFill,o=this.processingType3;if(o&&void 0===o.compiled&&(o.compiled=s<=1e3&&n<=1e3?function(e){var t,r,s,n,a=e.width,i=e.height,o=a+1,l=new Uint8Array(o*(i+1)),c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=a+7&-8,d=e.data,u=new Uint8Array(h*i),p=0;for(t=0,n=d.length;t<n;t++)for(var g=128,f=d[t];g>0;)u[p++]=f&g?0:255,g>>=1;var m=0;for(0!==u[p=0]&&(l[0]=1,++m),r=1;r<a;r++)u[p]!==u[p+1]&&(l[r]=u[p]?2:1,++m),p++;for(0!==u[p]&&(l[r]=2,++m),t=1;t<i;t++){s=t*o,u[(p=t*h)-h]!==u[p]&&(l[s]=u[p]?1:8,++m);var A=(u[p]?4:0)+(u[p-h]?8:0);for(r=1;r<a;r++)c[A=(A>>2)+(u[p+1]?4:0)+(u[p-h+1]?8:0)]&&(l[s+r]=c[A],++m),p++;if(u[p-h]!==u[p]&&(l[s+r]=u[p]?2:4,++m),m>1e3)return null}for(s=t*o,0!==u[p=h*(i-1)]&&(l[s]=8,++m),r=1;r<a;r++)u[p]!==u[p+1]&&(l[s+r]=u[p]?4:8,++m),p++;if(0!==u[p]&&(l[s+r]=4,++m),m>1e3)return null;var b=new Int32Array([0,o,-1,0,-o,0,0,0,1]),_=[];for(t=0;m&&t<=i;t++){for(var v=t*o,y=v+a;v<y&&!l[v];)v++;if(v!==y){var S,x=[v%o,t],C=l[v],P=v;do{var k=b[C];do{v+=k}while(!l[v]);5!==(S=l[v])&&10!==S?(C=S,l[v]=0):(C=S&51*C>>4,l[v]&=C>>2|C<<2),x.push(v%o),x.push(v/o|0),l[v]||--m}while(P!==v);_.push(x),--t}}return function(e){e.save(),e.scale(1/a,-1/i),e.translate(0,-i),e.beginPath();for(let r=0,s=_.length;r<s;r++){var t=_[r];e.moveTo(t[0],t[1]);for(let r=2,s=t.length;r<s;r+=2)e.lineTo(t[r],t[r+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:s,height:n}):null),o&&o.compiled)o.compiled(t);else{var l=this.cachedCanvases.getCanvas("maskCanvas",s,n),c=l.context;c.save(),r(c,e),c.globalCompositeOperation="source-in",c.fillStyle=i?a.getPattern(c,this):a,c.fillRect(0,0,s,n),c.restore(),this.paintInlineImageXObject(l.canvas)}},paintImageMaskXObjectRepeat:function(e,t,s,n){var a=e.width,i=e.height,o=this.current.fillColor,l=this.current.patternFill,c=this.cachedCanvases.getCanvas("maskCanvas",a,i),h=c.context;h.save(),r(h,e),h.globalCompositeOperation="source-in",h.fillStyle=l?o.getPattern(h,this):o,h.fillRect(0,0,a,i),h.restore();for(var d=this.ctx,u=0,p=n.length;u<p;u+=2)d.save(),d.transform(t,0,0,s,n[u],n[u+1]),d.scale(1,-1),d.drawImage(c.canvas,0,0,a,i,0,-1,1,1),d.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,s=this.current.fillColor,n=this.current.patternFill,a=0,i=e.length;a<i;a++){var o=e[a],l=o.width,c=o.height,h=this.cachedCanvases.getCanvas("maskCanvas",l,c),d=h.context;d.save(),r(d,o),d.globalCompositeOperation="source-in",d.fillStyle=n?s.getPattern(d,this):s,d.fillRect(0,0,l,c),d.restore(),t.save(),t.transform.apply(t,o.transform),t.scale(1,-1),t.drawImage(h.canvas,0,0,l,c,0,-1,1,1),t.restore()}},paintImageXObject:function(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,s.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,r,n){const a=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(a){for(var i=a.width,o=a.height,l=[],c=0,h=n.length;c<h;c+=2)l.push({transform:[t,0,0,r,n[c],n[c+1]],x:0,y:0,w:i,h:o});this.paintInlineImageXObjectGroup(a,l)}else(0,s.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var r=e.width,s=e.height,n=this.ctx;this.save(),n.scale(1/r,-1/s);var a,i,o=n.mozCurrentTransformInverse,l=o[0],c=o[1],h=Math.max(Math.sqrt(l*l+c*c),1),d=o[2],u=o[3],p=Math.max(Math.sqrt(d*d+u*u),1);if("function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e;else{var g=(i=this.cachedCanvases.getCanvas("inlineImage",r,s)).context;t(g,e),a=i.canvas}for(var f=r,m=s,A="prescale1";h>2&&f>1||p>2&&m>1;){var b=f,_=m;h>2&&f>1&&(h/=f/(b=Math.ceil(f/2))),p>2&&m>1&&(p/=m/(_=Math.ceil(m/2))),(g=(i=this.cachedCanvases.getCanvas(A,b,_)).context).clearRect(0,0,b,_),g.drawImage(a,0,0,f,m,0,0,b,_),a=i.canvas,f=b,m=_,A="prescale1"===A?"prescale2":"prescale1"}if(n.drawImage(a,0,0,f,m,0,-s,r,s),this.imageLayer){var v=this.getCanvasPosition(0,-s);this.imageLayer.appendImage({imgData:e,left:v[0],top:v[1],width:r/o[0],height:s/o[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var s=this.ctx,n=e.width,a=e.height,i=this.cachedCanvases.getCanvas("inlineImage",n,a);t(i.context,e);for(var o=0,l=r.length;o<l;o++){var c=r[o];if(s.save(),s.transform.apply(s,c.transform),s.scale(1,-1),s.drawImage(i.canvas,c.x,c.y,c.w,c.h,0,-1,1,1),this.imageLayer){var h=this.getCanvasPosition(c.x,c.y);this.imageLayer.appendImage({imgData:e,left:h[0],top:h[1],width:n,height:a})}s.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,s.warn)("Unsupported 'paintXObject' command.")},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){},beginMarkedContentProps:function(e,t){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===v?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth(e){if(null===this._cachedGetSinglePixelWidth){const e=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1],e[2]*e[2]+e[3]*e[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},s.OPS)e.prototype[s.OPS[y]]=e.prototype[y];return e}();t.CanvasGraphics=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=n[e[0]];if(!t)throw new Error(`Unknown IR type: ${e[0]}`);return t.fromIR(e)},t.TilingPattern=void 0;var s=r(2),n={};function a(e,t){if(!t||"undefined"===typeof Path2D)return;const r=t[2]-t[0],s=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],r,s),e.clip(n)}n.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],s=e[3],n=e[4],i=e[5],o=e[6],l=e[7];return{type:"Pattern",getPattern:function(e){var c;a(e,r),"axial"===t?c=e.createLinearGradient(n[0],n[1],i[0],i[1]):"radial"===t&&(c=e.createRadialGradient(n[0],n[1],o,i[0],i[1],l));for(var h=0,d=s.length;h<d;++h){var u=s[h];c.addColorStop(u[0],u[1])}return c}}}};var i=function(){function e(e,t,r,s,n,a,i,o){var l,c=t.coords,h=t.colors,d=e.data,u=4*e.width;c[r+1]>c[s+1]&&(l=r,r=s,s=l,l=a,a=i,i=l),c[s+1]>c[n+1]&&(l=s,s=n,n=l,l=i,i=o,o=l),c[r+1]>c[s+1]&&(l=r,r=s,s=l,l=a,a=i,i=l);var p=(c[r]+t.offsetX)*t.scaleX,g=(c[r+1]+t.offsetY)*t.scaleY,f=(c[s]+t.offsetX)*t.scaleX,m=(c[s+1]+t.offsetY)*t.scaleY,A=(c[n]+t.offsetX)*t.scaleX,b=(c[n+1]+t.offsetY)*t.scaleY;if(!(g>=b))for(var _,v,y,S,x,C,P,k,R=h[a],w=h[a+1],T=h[a+2],E=h[i],F=h[i+1],L=h[i+2],M=h[o],I=h[o+1],O=h[o+2],N=Math.round(g),D=Math.round(b),j=N;j<=D;j++){if(j<m){let e;e=j<g?0:g===m?1:(g-j)/(g-m),_=p-(p-f)*e,v=R-(R-E)*e,y=w-(w-F)*e,S=T-(T-L)*e}else{let e;e=j>b?1:m===b?0:(m-j)/(m-b),_=f-(f-A)*e,v=E-(E-M)*e,y=F-(F-I)*e,S=L-(L-O)*e}let e;e=j<g?0:j>b?1:(g-j)/(g-b),x=p-(p-A)*e,C=R-(R-M)*e,P=w-(w-I)*e,k=T-(T-O)*e;for(var U=Math.round(Math.min(_,x)),W=Math.round(Math.max(_,x)),q=u*j+4*U,G=U;G<=W;G++)e=(_-G)/(_-x),e<0?e=0:e>1&&(e=1),d[q++]=v-(v-C)*e|0,d[q++]=y-(y-P)*e|0,d[q++]=S-(S-k)*e|0,d[q++]=255}}function t(t,r,s){var n,a,i=r.coords,o=r.colors;switch(r.type){case"lattice":var l=r.verticesPerRow,c=Math.floor(i.length/l)-1,h=l-1;for(n=0;n<c;n++)for(var d=n*l,u=0;u<h;u++,d++)e(t,s,i[d],i[d+1],i[d+l],o[d],o[d+1],o[d+l]),e(t,s,i[d+l+1],i[d+1],i[d+l],o[d+l+1],o[d+1],o[d+l]);break;case"triangles":for(n=0,a=i.length;n<a;n+=3)e(t,s,i[n],i[n+1],i[n+2],o[n],o[n+1],o[n+2]);break;default:throw new Error("illegal figure")}}return function(e,r,s,n,a,i,o,l){var c,h,d,u,p=Math.floor(e[0]),g=Math.floor(e[1]),f=Math.ceil(e[2])-p,m=Math.ceil(e[3])-g,A=Math.min(Math.ceil(Math.abs(f*r[0]*1.1)),3e3),b=Math.min(Math.ceil(Math.abs(m*r[1]*1.1)),3e3),_=f/A,v=m/b,y={coords:s,colors:n,offsetX:-p,offsetY:-g,scaleX:1/_,scaleY:1/v},S=A+4,x=b+4;if(l.isEnabled)c=l.drawFigures({width:A,height:b,backgroundColor:i,figures:a,context:y}),(h=o.getCanvas("mesh",S,x,!1)).context.drawImage(c,2,2),c=h.canvas;else{var C=(h=o.getCanvas("mesh",S,x,!1)).context,P=C.createImageData(A,b);if(i){var k=P.data;for(d=0,u=k.length;d<u;d+=4)k[d]=i[0],k[d+1]=i[1],k[d+2]=i[2],k[d+3]=255}for(d=0;d<a.length;d++)t(P,a[d],y);C.putImageData(P,2,2),c=h.canvas}return{canvas:c,offsetX:p-2*_,offsetY:g-2*v,scaleX:_,scaleY:v}}}();n.Mesh={fromIR:function(e){var t=e[2],r=e[3],n=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return{type:"Pattern",getPattern:function(e,d,u){var p;if(a(e,c),u)p=s.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(p=s.Util.singularValueDecompose2dScale(d.baseTransform),l){var g=s.Util.singularValueDecompose2dScale(l);p=[p[0]*g[0],p[1]*g[1]]}var f=i(o,p,t,r,n,u?null:h,d.cachedCanvases,d.webGLContext);return u||(e.setTransform.apply(e,d.baseTransform),l&&e.transform.apply(e,l)),e.translate(f.offsetX,f.offsetY),e.scale(f.scaleX,f.scaleY),e.createPattern(f.canvas,"no-repeat")}}}},n.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var o=function(){var e=1,t=2;function r(e,t,r,s,n){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=s,this.baseTransform=n,this.type="Pattern",this.ctx=r}return r.prototype={createPatternCanvas:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,a=this.ystep,i=this.paintType,o=this.tilingType,l=this.color,c=this.canvasGraphicsFactory;(0,s.info)("TilingType: "+o);var h=r[0],d=r[1],u=r[2],p=r[3],g=s.Util.singularValueDecompose2dScale(this.matrix),f=s.Util.singularValueDecompose2dScale(this.baseTransform),m=[g[0]*f[0],g[1]*f[1]],A=this.getSizeAndScale(n,this.ctx.canvas.width,m[0]),b=this.getSizeAndScale(a,this.ctx.canvas.height,m[1]),_=e.cachedCanvases.getCanvas("pattern",A.size,b.size,!0),v=_.context,y=c.createCanvasGraphics(v);return y.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(y,i,l),y.transform(A.scale,0,0,b.scale,0,0),y.transform(1,0,0,1,-h,-d),this.clipBbox(y,r,h,d,u,p),y.executeOperatorList(t),this.ctx.transform(1,0,0,1,h,d),this.ctx.scale(1/A.scale,1/b.scale),_.canvas},getSizeAndScale:function(e,t,r){e=Math.abs(e);var s=Math.max(3e3,t),n=Math.ceil(e*r);return n>=s?n=s:r=n/e,{scale:r,size:n}},clipBbox:function(e,t,r,s,n,a){if(Array.isArray(t)&&4===t.length){var i=n-r,o=a-s;e.ctx.rect(r,s,i,o),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(r,n,a){const i=r.ctx,o=r.current;switch(n){case e:var l=this.ctx;i.fillStyle=l.fillStyle,i.strokeStyle=l.strokeStyle,o.fillColor=l.fillStyle,o.strokeColor=l.strokeStyle;break;case t:var c=s.Util.makeCssRgb(a[0],a[1],a[2]);i.fillStyle=c,i.strokeStyle=c,o.fillColor=c,o.strokeColor=c;break;default:throw new s.FormatError(`Unsupported paint type: ${n}`)}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const s=Object.create(null);t.GlobalWorkerOptions=s,s.workerPort=void 0===s.workerPort?null:s.workerPort,s.workerSrc=void 0===s.workerSrc?"":s.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var s=r(2);const n=1,a=2,i=1,o=2,l=3,c=4,h=5,d=6,u=7,p=8;function g(e){if("object"!==typeof e||null===e)return e;switch(e.name){case"AbortException":return new s.AbortException(e.message);case"MissingPDFException":return new s.MissingPDFException(e.message);case"UnexpectedResponseException":return new s.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new s.UnknownErrorException(e.message,e.details);default:return new s.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===n)r.resolve(t.data);else{if(t.callback!==a)throw new Error("Unexpected callback case");r.reject(g(t.reason))}return}const s=this.actionHandler[t.action];if(!s)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,i=t.sourceName;new Promise((function(e){e(s(t.data))})).then((function(s){r.postMessage({sourceName:e,targetName:i,callback:n,callbackId:t.callbackId,data:s})}),(function(s){r.postMessage({sourceName:e,targetName:i,callback:a,callbackId:t.callbackId,reason:g(s)})}))}else t.streamId?this._createStreamSink(t):s(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const n=this.callbackId++,a=(0,s.createPromiseCapability)();this.callbackCapabilities[n]=a;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(i){a.reject(i)}return a.promise}sendWithStream(e,t,r,n){const a=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:r=>{const i=(0,s.createPromiseCapability)();return this.streamControllers[a]={controller:r,startCall:i,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:o,targetName:l,action:e,streamId:a,data:t,desiredSize:r.desiredSize},n),i.promise},pull:e=>{const t=(0,s.createPromiseCapability)();return this.streamControllers[a].pullCall=t,c.postMessage({sourceName:o,targetName:l,stream:d,streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,s.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,s.createPromiseCapability)();return this.streamControllers[a].cancelCall=t,this.streamControllers[a].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:i,streamId:a,reason:g(e)}),t.promise}},r)}_createStreamSink(e){const t=this,r=this.actionHandler[e.action],n=e.streamId,a=this.sourceName,i=e.sourceName,o=this.comObj,d={enqueue(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=r,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,s.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:i,stream:c,streamId:n,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:a,targetName:i,stream:l,streamId:n}),delete t.streamSinks[n])},error(e){(0,s.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:a,targetName:i,stream:h,streamId:n,reason:g(e)}))},sinkCapability:(0,s.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[n]=d,new Promise((function(t){t(r(e.data,d))})).then((function(){o.postMessage({sourceName:a,targetName:i,stream:p,streamId:n,success:!0})}),(function(e){o.postMessage({sourceName:a,targetName:i,stream:p,streamId:n,reason:g(e)})}))}_processStreamMessage(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case p:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(g(e.reason));break;case u:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(g(e.reason));break;case d:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:u,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;const{onPull:f}=this.streamSinks[e.streamId];new Promise((function(e){e(f&&f())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:u,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:u,streamId:t,reason:g(e)})}));break;case c:if((0,s.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case l:if((0,s.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case h:(0,s.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(g(e.reason)),this._deleteStreamController(t);break;case o:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(g(e.reason)),this._deleteStreamController(t);break;case i:if(!this.streamSinks[t])break;const{onCancel:m}=this.streamSinks[e.streamId];new Promise((function(t){t(m&&m(g(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,reason:g(e)})})),this.streamSinks[t].sinkCapability.reject(g(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e){await Promise.allSettled([this.streamControllers[e].startCall,this.streamControllers[e].pullCall,this.streamControllers[e].cancelCall].map((function(e){return e&&e.promise}))),delete this.streamControllers[e]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var s=r(2),n=r(13);t.Metadata=class{constructor(e){(0,s.assert)("string"===typeof e,"Metadata: input is not a string"),e=this._repair(e);const t=(new n.SimpleXMLParser).parseFromString(e);this._metadataMap=new Map,t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){const r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,s){return String.fromCharCode(64*t+8*r+1*s)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${t} isn't defined.`)}));let s="";for(let n=0,a=r.length;n<a;n+=2){const e=256*r.charCodeAt(n)+r.charCodeAt(n+1);s+=e>=32&&e<127&&60!==e&&62!==e&&38!==e?String.fromCharCode(e):"&#x"+(65536+e).toString(16).substring(1)+";"}return">"+s}))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;const r=t?t.nodeName.toLowerCase():null;if(!t||"rdf:rdf"!==r||!t.hasChildNodes())return;const s=t.childNodes;for(let n=0,a=s.length;n<a;n++){const e=s[n];if("rdf:description"===e.nodeName.toLowerCase())for(let t=0,r=e.childNodes.length;t<r;t++)if("#text"!==e.childNodes[t].nodeName.toLowerCase()){const r=e.childNodes[t],s=r.nodeName.toLowerCase();this._metadataMap.set(s,r.textContent.trim())}}}get(e){return this._metadataMap.has(e)?this._metadataMap.get(e):null}getAll(){const e=Object.create(null);for(const[t,r]of this._metadataMap)e[t]=r;return e}has(e){return this._metadataMap.has(e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;const s=0,n=-2,a=-3,i=-4,o=-5,l=-6,c=-9;function h(e,t){const r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}class d{_resolveEntities(e){return e.replace(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCharCode(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCharCode(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return this.onResolveEntity(t)}))}_parseContent(e,t){const r=[];let s=t;function n(){for(;s<e.length&&h(e,s);)++s}for(;s<e.length&&!h(e,s)&&">"!==e[s]&&"/"!==e[s];)++s;const a=e.substring(t,s);for(n();s<e.length&&">"!==e[s]&&"/"!==e[s]&&"?"!==e[s];){n();let t="",a="";for(;s<e.length&&!h(e,s)&&"="!==e[s];)t+=e[s],++s;if(n(),"="!==e[s])return null;++s,n();const i=e[s];if('"'!==i&&"'"!==i)return null;const o=e.indexOf(i,++s);if(o<0)return null;a=e.substring(s,o),r.push({name:t,value:this._resolveEntities(a)}),s=o+1,n()}return{name:a,attributes:r,parsed:s-t}}_parseProcessingInstruction(e,t){let r=t;for(;r<e.length&&!h(e,r)&&">"!==e[r]&&"/"!==e[r];)++r;const s=e.substring(t,r);!function(){for(;r<e.length&&h(e,r);)++r}();const n=r;for(;r<e.length&&("?"!==e[r]||">"!==e[r+1]);)++r;return{name:s,value:e.substring(n,r),parsed:r-t}}parseXml(e){let t=0;for(;t<e.length;){let r=t;if("<"===e[t]){let t;switch(++r,e[r]){case"/":if(++r,t=e.indexOf(">",r),t<0)return void this.onError(c);this.onEndElement(e.substring(r,t)),r=t+1;break;case"?":++r;const s=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+s.parsed,r+s.parsed+2))return void this.onError(a);this.onPi(s.name,s.value),r+=s.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if(t=e.indexOf("--\x3e",r+3),t<0)return void this.onError(o);this.onComment(e.substring(r+3,t)),r=t+3}else if("[CDATA["===e.substring(r+1,r+8)){if(t=e.indexOf("]]>",r+8),t<0)return void this.onError(n);this.onCdata(e.substring(r+8,t)),r=t+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(l);{const s=e.indexOf("[",r+8);let n=!1;if(t=e.indexOf(">",r+8),t<0)return void this.onError(i);if(s>0&&t>s){if(t=e.indexOf("]>",r+8),t<0)return void this.onError(i);n=!0}const a=e.substring(r+8,t+(n?1:0));this.onDoctype(a),r=t+(n?2:1)}}break;default:const h=this._parseContent(e,r);if(null===h)return void this.onError(l);let d=!1;if("/>"===e.substring(r+h.parsed,r+h.parsed+2))d=!0;else if(">"!==e.substring(r+h.parsed,r+h.parsed+1))return void this.onError(c);this.onBeginElement(h.name,h.attributes,d),r+=h.parsed+(d?2:1)}}else{for(;r<e.length&&"<"!==e[r];)r++;const s=e.substring(t,r);this.onText(this._resolveEntities(s))}t=r}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,r){}onEndElement(e){}onError(e){}}class u{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}}t.SimpleXMLParser=class extends d{constructor(){super(),this._currentFragment=null,this._stack=null,this._errorCode=s}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=s,this.parseXml(e),this._errorCode!==s)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onResolveEntity(e){return"apos"===e?"'":super.onResolveEntity(e)}onText(e){if(function(e){for(let t=0,r=e.length;t<r;t++)if(!h(e,t))return!1;return!0}(e))return;const t=new u("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new u("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,r){const s=new u(e);s.childNodes=[],this._currentFragment.push(s),r||(this._stack.push(this._currentFragment),this._currentFragment=s.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment[this._currentFragment.length-1];if(t)for(let r=0,s=t.childNodes.length;r<s;r++)t.childNodes[r].parentNode=t}onError(e){this._errorCode=e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var s=r(2);t.PDFDataTransportStream=class{constructor(e,t){(0,s.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1;const r=e.initialData;if(r&&r.length>0){const e=new Uint8Array(r).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,s.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;t&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,s.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new n(this,e,this._progressiveDone)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new a(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}};class n{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._stream=e,this._done=r||!1,this._filename=null,this._queuedChunks=t||[],this._loaded=0;for(const s of this._queuedChunks)this._loaded+=s.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class a{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var s=r(2);t.WebGLContext=class{constructor(e){let{enable:t=!1}=e;this._enabled=!0===t}get isEnabled(){let e=this._enabled;return e&&(e=n.tryInitGL()),(0,s.shadow)(this,"isEnabled",e)}composeSMask(e){let{layer:t,mask:r,properties:s}=e;return n.composeSMask(t,r,s)}drawFigures(e){let{width:t,height:r,backgroundColor:s,figures:a,context:i}=e;return n.drawFigures(t,r,s,a,i)}clear(){n.cleanup()}};var n=function(){function e(e,t,r){var s=e.createShader(r);if(e.shaderSource(s,t),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS)){var n=e.getShaderInfoLog(s);throw new Error("Error during shader compilation: "+n)}return s}function t(t,r){return e(t,r,t.VERTEX_SHADER)}function r(t,r){return e(t,r,t.FRAGMENT_SHADER)}function s(e,t){for(var r=e.createProgram(),s=0,n=t.length;s<n;++s)e.attachShader(r,t[s]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){var a=e.getProgramInfoLog(r);throw new Error("Error during program linking: "+a)}return r}function n(e,t,r){e.activeTexture(r);var s=e.createTexture();return e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),s}var a,i;function o(){a||(i=document.createElement("canvas"),a=i.getContext("webgl",{premultipliedalpha:!1}))}var l=null,c=null;return{tryInitGL(){try{return o(),!!a}catch(e){}return!1},composeSMask:function(e,c,h){var d=e.width,u=e.height;l||function(){var e,n;o(),e=i,i=null,n=a,a=null;var c=s(n,[t(n,"  attribute vec2 a_position;                                      attribute vec2 a_texCoord;                                                                                                      uniform vec2 u_resolution;                                                                                                      varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0;       gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_texCoord = a_texCoord;                                      }                                                             "),r(n,"  precision mediump float;                                                                                                        uniform vec4 u_backdrop;                                        uniform int u_subtype;                                          uniform sampler2D u_image;                                      uniform sampler2D u_mask;                                                                                                       varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec4 imageColor = texture2D(u_image, v_texCoord);               vec4 maskColor = texture2D(u_mask, v_texCoord);                 if (u_backdrop.a > 0.0) {                                         maskColor.rgb = maskColor.rgb * maskColor.a +                                   u_backdrop.rgb * (1.0 - maskColor.a);         }                                                               float lum;                                                      if (u_subtype == 0) {                                             lum = maskColor.a;                                            } else {                                                          lum = maskColor.r * 0.3 + maskColor.g * 0.59 +                        maskColor.b * 0.11;                                     }                                                               imageColor.a *= lum;                                            imageColor.rgb *= imageColor.a;                                 gl_FragColor = imageColor;                                    }                                                             ")]);n.useProgram(c);var h={};h.gl=n,h.canvas=e,h.resolutionLocation=n.getUniformLocation(c,"u_resolution"),h.positionLocation=n.getAttribLocation(c,"a_position"),h.backdropLocation=n.getUniformLocation(c,"u_backdrop"),h.subtypeLocation=n.getUniformLocation(c,"u_subtype");var d=n.getAttribLocation(c,"a_texCoord"),u=n.getUniformLocation(c,"u_image"),p=n.getUniformLocation(c,"u_mask"),g=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,g),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),n.STATIC_DRAW),n.enableVertexAttribArray(d),n.vertexAttribPointer(d,2,n.FLOAT,!1,0,0),n.uniform1i(u,0),n.uniform1i(p,1),l=h}();var p=l,g=p.canvas,f=p.gl;g.width=d,g.height=u,f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(p.resolutionLocation,d,u),h.backdrop?f.uniform4f(p.resolutionLocation,h.backdrop[0],h.backdrop[1],h.backdrop[2],1):f.uniform4f(p.resolutionLocation,0,0,0,0),f.uniform1i(p.subtypeLocation,"Luminosity"===h.subtype?1:0);var m=n(f,e,f.TEXTURE0),A=n(f,c,f.TEXTURE1),b=f.createBuffer();return f.bindBuffer(f.ARRAY_BUFFER,b),f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,u,0,u,d,0,d,u]),f.STATIC_DRAW),f.enableVertexAttribArray(p.positionLocation),f.vertexAttribPointer(p.positionLocation,2,f.FLOAT,!1,0,0),f.clearColor(0,0,0,0),f.enable(f.BLEND),f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),f.clear(f.COLOR_BUFFER_BIT),f.drawArrays(f.TRIANGLES,0,6),f.flush(),f.deleteTexture(m),f.deleteTexture(A),f.deleteBuffer(b),g},drawFigures:function(e,n,l,h,d){c||function(){var e,n;o(),e=i,i=null,n=a,a=null;var l=s(n,[t(n,"  attribute vec2 a_position;                                      attribute vec3 a_color;                                                                                                         uniform vec2 u_resolution;                                      uniform vec2 u_scale;                                           uniform vec2 u_offset;                                                                                                          varying vec4 v_color;                                                                                                           void main() {                                                     vec2 position = (a_position + u_offset) * u_scale;              vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0;         gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_color = vec4(a_color / 255.0, 1.0);                         }                                                             "),r(n,"  precision mediump float;                                                                                                        varying vec4 v_color;                                                                                                           void main() {                                                     gl_FragColor = v_color;                                       }                                                             ")]);n.useProgram(l);var h={};h.gl=n,h.canvas=e,h.resolutionLocation=n.getUniformLocation(l,"u_resolution"),h.scaleLocation=n.getUniformLocation(l,"u_scale"),h.offsetLocation=n.getUniformLocation(l,"u_offset"),h.positionLocation=n.getAttribLocation(l,"a_position"),h.colorLocation=n.getAttribLocation(l,"a_color"),c=h}();var u=c,p=u.canvas,g=u.gl;p.width=e,p.height=n,g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.uniform2f(u.resolutionLocation,e,n);var f,m,A,b=0;for(f=0,m=h.length;f<m;f++)switch(h[f].type){case"lattice":b+=((A=h[f].coords.length/h[f].verticesPerRow|0)-1)*(h[f].verticesPerRow-1)*6;break;case"triangles":b+=h[f].coords.length}var _=new Float32Array(2*b),v=new Uint8Array(3*b),y=d.coords,S=d.colors,x=0,C=0;for(f=0,m=h.length;f<m;f++){var P=h[f],k=P.coords,R=P.colors;switch(P.type){case"lattice":var w=P.verticesPerRow;A=k.length/w|0;for(var T=1;T<A;T++)for(var E=T*w+1,F=1;F<w;F++,E++)_[x]=y[k[E-w-1]],_[x+1]=y[k[E-w-1]+1],_[x+2]=y[k[E-w]],_[x+3]=y[k[E-w]+1],_[x+4]=y[k[E-1]],_[x+5]=y[k[E-1]+1],v[C]=S[R[E-w-1]],v[C+1]=S[R[E-w-1]+1],v[C+2]=S[R[E-w-1]+2],v[C+3]=S[R[E-w]],v[C+4]=S[R[E-w]+1],v[C+5]=S[R[E-w]+2],v[C+6]=S[R[E-1]],v[C+7]=S[R[E-1]+1],v[C+8]=S[R[E-1]+2],_[x+6]=_[x+2],_[x+7]=_[x+3],_[x+8]=_[x+4],_[x+9]=_[x+5],_[x+10]=y[k[E]],_[x+11]=y[k[E]+1],v[C+9]=v[C+3],v[C+10]=v[C+4],v[C+11]=v[C+5],v[C+12]=v[C+6],v[C+13]=v[C+7],v[C+14]=v[C+8],v[C+15]=S[R[E]],v[C+16]=S[R[E]+1],v[C+17]=S[R[E]+2],x+=12,C+=18;break;case"triangles":for(var L=0,M=k.length;L<M;L++)_[x]=y[k[L]],_[x+1]=y[k[L]+1],v[C]=S[R[L]],v[C+1]=S[R[L]+1],v[C+2]=S[R[L]+2],x+=2,C+=3}}l?g.clearColor(l[0]/255,l[1]/255,l[2]/255,1):g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT);var I=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,I),g.bufferData(g.ARRAY_BUFFER,_,g.STATIC_DRAW),g.enableVertexAttribArray(u.positionLocation),g.vertexAttribPointer(u.positionLocation,2,g.FLOAT,!1,0,0);var O=g.createBuffer();return g.bindBuffer(g.ARRAY_BUFFER,O),g.bufferData(g.ARRAY_BUFFER,v,g.STATIC_DRAW),g.enableVertexAttribArray(u.colorLocation),g.vertexAttribPointer(u.colorLocation,3,g.UNSIGNED_BYTE,!1,0,0),g.uniform2f(u.scaleLocation,d.scaleX,d.scaleY),g.uniform2f(u.offsetLocation,d.offsetX,d.offsetY),g.drawArrays(g.TRIANGLES,0,b),g.flush(),g.deleteBuffer(I),g.deleteBuffer(O),p},cleanup(){l&&l.canvas&&(l.canvas.width=0,l.canvas.height=0),c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),l=null,c=null}}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var s=r(1),n=r(2);class a{static create(e){switch(e.data.annotationType){case n.AnnotationType.LINK:return new o(e);case n.AnnotationType.TEXT:return new l(e);case n.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new h(e);case"Btn":return e.data.radioButton?new u(e):e.data.checkBox?new d(e):new p(e);case"Ch":return new g(e)}return new c(e);case n.AnnotationType.POPUP:return new f(e);case n.AnnotationType.FREETEXT:return new A(e);case n.AnnotationType.LINE:return new b(e);case n.AnnotationType.SQUARE:return new _(e);case n.AnnotationType.CIRCLE:return new v(e);case n.AnnotationType.POLYLINE:return new y(e);case n.AnnotationType.CARET:return new x(e);case n.AnnotationType.INK:return new C(e);case n.AnnotationType.POLYGON:return new S(e);case n.AnnotationType.HIGHLIGHT:return new P(e);case n.AnnotationType.UNDERLINE:return new k(e);case n.AnnotationType.SQUIGGLY:return new R(e);case n.AnnotationType.STRIKEOUT:return new w(e);case n.AnnotationType.STAMP:return new T(e);case n.AnnotationType.FILEATTACHMENT:return new E(e);default:return new i(e)}}}class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderInteractiveForms=e.renderInteractiveForms,this.svgFactory=e.svgFactory,t&&(this.container=this._createContainer(r))}_createContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.data,r=this.page,s=this.viewport,a=document.createElement("section");let i=t.rect[2]-t.rect[0],o=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);const l=n.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(a.style.transform=`matrix(${s.transform.join(",")})`,a.style.transformOrigin=`-${l[0]}px -${l[1]}px`,!e&&t.borderStyle.width>0){a.style.borderWidth=`${t.borderStyle.width}px`,t.borderStyle.style!==n.AnnotationBorderStyleType.UNDERLINE&&(i-=2*t.borderStyle.width,o-=2*t.borderStyle.width);const e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius;if(e>0||r>0){const t=`${e}px / ${r}px`;a.style.borderRadius=t}switch(t.borderStyle.style){case n.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case n.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case n.AnnotationBorderStyleType.BEVELED:(0,n.warn)("Unimplemented border style: beveled");break;case n.AnnotationBorderStyleType.INSET:(0,n.warn)("Unimplemented border style: inset");break;case n.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=n.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left=`${l[0]}px`,a.style.top=`${l[1]}px`,a.style.width=`${i}px`,a.style.height=`${o}px`,a}_createPopup(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));const s=new m({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}).render();s.style.left=e.style.width,e.appendChild(s)}render(){(0,n.unreachable)("Abstract method `AnnotationElement.render` called")}}class o extends i{constructor(e){super(e,!!(e.data.url||e.data.dest||e.data.action))}render(){this.container.className="linkAnnotation";const{data:e,linkService:t}=this,r=document.createElement("a");return e.url?(0,s.addLinkAttributes)(r,{url:e.url,target:e.newWindow?s.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(r,e.action):this._bindLink(r,e.dest),this.container.appendChild(r),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.navigateTo(t),!1),t&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}}class l extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents))}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}class c extends i{render(){return this.container}}class h extends c{constructor(e){super(e,e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue)}render(){const e=["left","center","right"];this.container.className="textWidgetAnnotation";let t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea"),t.textContent=this.data.fieldValue):(t=document.createElement("input"),t.type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,t.name=this.data.fieldName,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing=`calc(${e}px - 1ch)`}}else{t=document.createElement("div"),t.textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";let e=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(e=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(t,e)}return null!==this.data.textAlignment&&(t.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(t),this.container}_setTextStyle(e,t){const r=e.style;if(r.fontSize=`${this.data.fontSize}px`,r.direction=this.data.fontDirection<0?"rtl":"ltr",!t)return;let s="normal";t.black?s="900":t.bold&&(s="bold"),r.fontWeight=s,r.fontStyle=t.italic?"italic":"normal";const n=t.loadedName?`"${t.loadedName}", `:"",a=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+a}}class d extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation checkBox";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",e.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class u extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class p extends o{render(){const e=super.render();return e.className="buttonWidgetAnnotation pushButton",e}}class g extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="choiceWidgetAnnotation";const e=document.createElement("select");e.disabled=this.data.readOnly,e.name=this.data.fieldName,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(const t of this.data.options){const r=document.createElement("option");r.textContent=t.displayValue,r.value=t.exportValue,this.data.fieldValue.includes(t.displayValue)&&r.setAttribute("selected",!0),e.appendChild(r)}return this.container.appendChild(e),this.container}}class f extends i{constructor(e){super(e,!(!e.data.title&&!e.data.contents))}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const e=`[data-annotation-id="${this.data.parentId}"]`,t=this.layer.querySelector(e);if(!t)return this.container;const r=new m({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),s=parseFloat(t.style.left),n=parseFloat(t.style.width);return this.container.style.transformOrigin=`-${s+n}px -${t.style.top}`,this.container.style.left=`${s+n}px`,this.container.appendChild(r.render()),this.container}}class m{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.modificationDate=e.modificationDate,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){const e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);const t=document.createElement("div");t.className="popup";const r=this.color;if(r){const e=.7*(255-r[0])+r[0],s=.7*(255-r[1])+r[1],a=.7*(255-r[2])+r[2];t.style.backgroundColor=n.Util.makeCssRgb(0|e,0|s,0|a)}const a=document.createElement("h1");a.textContent=this.title,t.appendChild(a);const i=s.PDFDateString.toDateObject(this.modificationDate);if(i){const e=document.createElement("span");e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:i.toLocaleDateString(),time:i.toLocaleTimeString()}),t.appendChild(e)}const o=this._formatContents(this.contents);return t.appendChild(o),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}_formatContents(e){const t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/);for(let s=0,n=r.length;s<n;++s){const e=r[s];t.appendChild(document.createTextNode(e)),s<n-1&&t.appendChild(document.createElement("br"))}return t}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}_hide(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}class A extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class b extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="lineAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),n=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),n.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),n.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),n.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),s.appendChild(n),this.container.append(s),this._createPopup(this.container,n,e),this.container}}class _ extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="squareAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),n=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",n/2),a.setAttribute("y",n/2),a.setAttribute("width",t-n),a.setAttribute("height",r-n),a.setAttribute("stroke-width",n||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),s.appendChild(a),this.container.append(s),this._createPopup(this.container,a,e),this.container}}class v extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){this.container.className="circleAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),n=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",r/2),a.setAttribute("rx",t/2-n/2),a.setAttribute("ry",r/2-n/2),a.setAttribute("stroke-width",n||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),s.appendChild(a),this.container.append(s),this._createPopup(this.container,a,e),this.container}}class y extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r);let n=[];for(const i of e.vertices){const t=i.x-e.rect[0],r=e.rect[3]-i.y;n.push(t+","+r)}n=n.join(" ");const a=this.svgFactory.createElement(this.svgElementName);return a.setAttribute("points",n),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),s.appendChild(a),this.container.append(s),this._createPopup(this.container,a,e),this.container}}class S extends y{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class x extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class C extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r);for(const n of e.inkLists){let t=[];for(const s of n){const r=s.x-e.rect[0],n=e.rect[3]-s.y;t.push(`${r},${n}`)}t=t.join(" ");const r=this.svgFactory.createElement(this.svgElementName);r.setAttribute("points",t),r.setAttribute("stroke-width",e.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","none"),this._createPopup(this.container,r,e),s.appendChild(r)}return this.container.append(s),this.container}}class P extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class k extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class R extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class w extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class T extends i{constructor(e){super(e,!!(e.data.hasPopup||e.data.title||e.data.contents),!0)}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class E extends i{constructor(e){super(e,!0);const{filename:t,content:r}=this.data.file;this.filename=(0,s.getFilenameFromUrl)(t),this.content=r,this.linkService.eventBus&&this.linkService.eventBus.dispatch("fileattachmentannotation",{source:this,id:(0,n.stringToPDFString)(t),filename:t,content:r})}render(){this.container.className="fileAttachmentAnnotation";const e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}_download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,n.warn)("Download cannot be started due to unavailable download manager")}}t.AnnotationLayer=class{static render(e){const t=[],r=[];for(const s of e.annotations)s&&(s.annotationType!==n.AnnotationType.POPUP?t.push(s):r.push(s));r.length&&t.push(...r);for(const n of t){const t=a.create({data:n,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new s.DOMSVGFactory});t.isRenderable&&e.div.appendChild(t.render())}}static update(e){for(const t of e.annotations){const r=e.div.querySelector(`[data-annotation-id="${t.id}"]`);r&&(r.style.transform=`matrix(${e.viewport.transform.join(",")})`)}e.div.removeAttribute("hidden")}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var s=r(2),n=function(){var e=/\S/;function t(t,r,n){var a,i=document.createElement("span"),o={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(t._textDivs.push(i),a=r.str,!e.test(a))return o.isWhitespace=!0,void t._textDivProperties.set(i,o);var l=s.Util.transform(t._viewport.transform,r.transform),c=Math.atan2(l[1],l[0]),h=n[r.fontName];h.vertical&&(c+=Math.PI/2);var d=Math.sqrt(l[2]*l[2]+l[3]*l[3]),u=d;let p,g;h.ascent?u=h.ascent*u:h.descent&&(u=(1+h.descent)*u),0===c?(p=l[4],g=l[5]-u):(p=l[4]+u*Math.sin(c),g=l[5]-u*Math.cos(c)),i.style.left=`${p}px`,i.style.top=`${g}px`,i.style.fontSize=`${d}px`,i.style.fontFamily=h.fontFamily,i.textContent=r.str,t._fontInspectorEnabled&&(i.dataset.fontName=r.fontName),0!==c&&(o.angle=c*(180/Math.PI));let f=!1;if(r.str.length>1)f=!0;else if(r.transform[0]!==r.transform[3]){const e=Math.abs(r.transform[0]),t=Math.abs(r.transform[3]);e!==t&&Math.max(e,t)/Math.min(e,t)>1.5&&(f=!0)}if(f&&(h.vertical?o.canvasWidth=r.height*t._viewport.scale:o.canvasWidth=r.width*t._viewport.scale),t._textDivProperties.set(i,o),t._textContentStream&&t._layoutText(i),t._enhanceTextSelection){var m=1,A=0;0!==c&&(m=Math.cos(c),A=Math.sin(c));var b,_,v=(h.vertical?r.height:r.width)*t._viewport.scale,y=d;0!==c?(b=[m,A,-A,m,p,g],_=s.Util.getAxialAlignedBoundingBox([0,0,v,y],b)):_=[p,g,p+v,g+y],t._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:i,size:[v,y],m:b})}}function r(e){if(!e._canceled){var t=e._textDivs,r=e._capability,s=t.length;if(s>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var n=0;n<s;n++)e._layoutText(t[n]);e._renderingDone=!0,r.resolve()}}function n(e,t,r){let s=0;for(let n=0;n<r;n++){const r=e[t++];r>0&&(s=s?Math.min(r,s):r)}return s}function a(e){for(var t=e._bounds,r=e._viewport,a=function(e,t,r){var s=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));i(e,s);var n=new Array(r.length);return s.forEach((function(e){var t=e.index;n[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),r.map((function(t,r){var a=n[r],i=s[r];i.x1=t.top,i.y1=e-a.right,i.x2=t.bottom,i.y2=e-a.left,i.index=r,i.x1New=void 0,i.x2New=void 0})),i(t,s),s.forEach((function(e){var t=e.index;n[t].top=e.x1New,n[t].bottom=e.x2New})),n}(r.width,r.height,t),o=0;o<a.length;o++){var l=t[o].div,c=e._textDivProperties.get(l);if(0!==c.angle){var h=a[o],d=t[o],u=d.m,p=u[0],g=u[1],f=[[0,0],[0,d.size[1]],[d.size[0],0],d.size],m=new Float64Array(64);f.forEach((function(e,t){var r=s.Util.applyTransform(e,u);m[t+0]=p&&(h.left-r[0])/p,m[t+4]=g&&(h.top-r[1])/g,m[t+8]=p&&(h.right-r[0])/p,m[t+12]=g&&(h.bottom-r[1])/g,m[t+16]=g&&(h.left-r[0])/-g,m[t+20]=p&&(h.top-r[1])/p,m[t+24]=g&&(h.right-r[0])/-g,m[t+28]=p&&(h.bottom-r[1])/p,m[t+32]=p&&(h.left-r[0])/-p,m[t+36]=g&&(h.top-r[1])/-g,m[t+40]=p&&(h.right-r[0])/-p,m[t+44]=g&&(h.bottom-r[1])/-g,m[t+48]=g&&(h.left-r[0])/g,m[t+52]=p&&(h.top-r[1])/-p,m[t+56]=g&&(h.right-r[0])/g,m[t+60]=p&&(h.bottom-r[1])/-p}));var A=1+Math.min(Math.abs(p),Math.abs(g));c.paddingLeft=n(m,32,16)/A,c.paddingTop=n(m,48,16)/A,c.paddingRight=n(m,0,16)/A,c.paddingBottom=n(m,16,16)/A,e._textDivProperties.set(l,c)}else c.paddingLeft=t[o].left-a[o].left,c.paddingTop=t[o].top-a[o].top,c.paddingRight=a[o].right-t[o].right,c.paddingBottom=a[o].bottom-t[o].bottom,e._textDivProperties.set(l,c)}}function i(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach((function(e){for(var t=0;t<r.length&&r[t].end<=e.y1;)t++;for(var s,n,a=r.length-1;a>=0&&r[a].start>=e.y2;)a--;var i,o,l=-1/0;for(i=t;i<=a;i++){var c;(c=(n=(s=r[i]).boundary).x2>e.x1?n.index>e.index?n.x1New:e.x1:void 0===n.x2New?(n.x2+e.x1)/2:n.x2New)>l&&(l=c)}for(e.x1New=l,i=t;i<=a;i++)void 0===(n=(s=r[i]).boundary).x2New?n.x2>e.x1?n.index>e.index&&(n.x2New=n.x2):n.x2New=l:n.x2New>l&&(n.x2New=Math.max(l,n.x2));var h=[],d=null;for(i=t;i<=a;i++){var u=(n=(s=r[i]).boundary).x2>e.x2?n:e;d===u?h[h.length-1].end=s.end:(h.push({start:s.start,end:s.end,boundary:u}),d=u)}for(r[t].start<e.y1&&(h[0].start=e.y1,h.unshift({start:r[t].start,end:e.y1,boundary:r[t].boundary})),e.y2<r[a].end&&(h[h.length-1].end=e.y2,h.push({start:e.y2,end:r[a].end,boundary:r[a].boundary})),i=t;i<=a;i++)if(void 0===(n=(s=r[i]).boundary).x2New){var p=!1;for(o=t-1;!p&&o>=0&&r[o].start>=n.y1;o--)p=r[o].boundary===n;for(o=a+1;!p&&o<r.length&&r[o].end<=n.y2;o++)p=r[o].boundary===n;for(o=0;!p&&o<h.length;o++)p=h[o].boundary===n;p||(n.x2New=l)}Array.prototype.splice.apply(r,[t,a-t+1].concat(h))})),r.forEach((function(t){var r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))}))}function o(e){let{textContent:t,textContentStream:r,container:n,viewport:a,textDivs:i,textContentItemsStr:o,enhanceTextSelection:l}=e;this._textContent=t,this._textContentStream=r,this._container=n,this._viewport=a,this._textDivs=i||[],this._textContentItemsStr=o||[],this._enhanceTextSelection=!!l,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,s.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)})).catch((()=>{}))}return o.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new s.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems(e,r){for(let s=0,n=e.length;s<n;s++)this._textContentItemsStr.push(e[s].str),t(this,e[s],r)},_layoutText(e){const t=this._textDivProperties.get(e);if(t.isWhitespace)return;let r="";if(0!==t.canvasWidth){const{fontSize:s,fontFamily:n}=e.style;s===this._layoutTextLastFontSize&&n===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${s} ${n}`,this._layoutTextLastFontSize=s,this._layoutTextLastFontFamily=n);const{width:a}=this._layoutTextCtx.measureText(e.textContent);a>0&&(t.scale=t.canvasWidth/a,r=`scaleX(${t.scale})`)}0!==t.angle&&(r=`rotate(${t.angle}deg) ${r}`),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),this._textDivProperties.set(e,t),this._container.appendChild(e)},_render:function(e){const t=(0,s.createPromiseCapability)();let n=Object.create(null);const a=document.createElement("canvas");if(a.mozOpaque=!0,this._layoutTextCtx=a.getContext("2d",{alpha:!1}),this._textContent){const e=this._textContent.items,r=this._textContent.styles;this._processItems(e,r),t.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const e=()=>{this._reader.read().then((r=>{let{value:s,done:a}=r;a?t.resolve():(Object.assign(n,s.styles),this._processItems(s.items,n),e())}),t.reject)};this._reader=this._textContentStream.getReader(),e()}}t.promise.then((()=>{n=null,e?this._renderTimer=setTimeout((()=>{r(this),this._renderTimer=null}),e):r(this)}),this._capability.reject)},expandTextDivs:function(e){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(a(this),this._bounds=null);const t=[],r=[];for(var s=0,n=this._textDivs.length;s<n;s++){const n=this._textDivs[s],a=this._textDivProperties.get(n);a.isWhitespace||(e?(t.length=0,r.length=0,a.originalTransform&&t.push(a.originalTransform),a.paddingTop>0?(r.push(`${a.paddingTop}px`),t.push(`translateY(${-a.paddingTop}px)`)):r.push(0),a.paddingRight>0?r.push(a.paddingRight/a.scale+"px"):r.push(0),a.paddingBottom>0?r.push(`${a.paddingBottom}px`):r.push(0),a.paddingLeft>0?(r.push(a.paddingLeft/a.scale+"px"),t.push(`translateX(${-a.paddingLeft/a.scale}px)`)):r.push(0),n.style.padding=r.join(" "),t.length&&(n.style.transform=t.join(" "))):(n.style.padding=null,n.style.transform=a.originalTransform))}}},function(e){var t=new o({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var s=r(2),n=r(1),a=r(4);let i=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=i;{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",h=["butt","round","square"],d=["miter","round","bevel"],u=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let s=0;s<256;s++){let e=s;for(let t=0;t<8;t++)e=1&e?3988292384^e>>1&2147483647:e>>1&2147483647;t[s]=e}function r(e,r,s,n){let a=n;const i=r.length;s[a]=i>>24&255,s[a+1]=i>>16&255,s[a+2]=i>>8&255,s[a+3]=255&i,a+=4,s[a]=255&e.charCodeAt(0),s[a+1]=255&e.charCodeAt(1),s[a+2]=255&e.charCodeAt(2),s[a+3]=255&e.charCodeAt(3),a+=4,s.set(r,a),a+=r.length;const o=function(e,r,s){let n=-1;for(let a=r;a<s;a++){const r=255&(n^e[a]);n=n>>>8^t[r]}return~n}(s,n+4,a);s[a]=o>>24&255,s[a+1]=o>>16&255,s[a+2]=o>>8&255,s[a+3]=255&o}function n(e){let t=e.length;const r=65535,s=Math.ceil(t/r),n=new Uint8Array(2+t+5*s+4);let a=0;n[a++]=120,n[a++]=156;let i=0;for(;t>r;)n[a++]=0,n[a++]=255,n[a++]=255,n[a++]=0,n[a++]=0,n.set(e.subarray(i,i+r),a),a+=r,i+=r,t-=r;n[a++]=1,n[a++]=255&t,n[a++]=t>>8&255,n[a++]=255&~t,n[a++]=(65535&~t)>>8&255,n.set(e.subarray(i),a),a+=e.length-i;const o=function(e,t,r){let s=1,n=0;for(let a=t;a<r;++a)s=(s+(255&e[a]))%65521,n=(n+s)%65521;return n<<16|s}(e,0,e.length);return n[a++]=o>>24&255,n[a++]=o>>16&255,n[a++]=o>>8&255,n[a++]=255&o,n}function i(t,i,o,l){const c=t.width,h=t.height;let d,u,p;const g=t.data;switch(i){case s.ImageKind.GRAYSCALE_1BPP:u=0,d=1,p=c+7>>3;break;case s.ImageKind.RGB_24BPP:u=2,d=8,p=3*c;break;case s.ImageKind.RGBA_32BPP:u=6,d=8,p=4*c;break;default:throw new Error("invalid format")}const f=new Uint8Array((1+p)*h);let m=0,A=0;for(let e=0;e<h;++e)f[m++]=0,f.set(g.subarray(A,A+p),m),A+=p,m+=p;if(i===s.ImageKind.GRAYSCALE_1BPP&&l){m=0;for(let e=0;e<h;e++){m++;for(let e=0;e<p;e++)f[m++]^=255}}const b=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,h>>24&255,h>>16&255,h>>8&255,255&h,d,u,0,0,0]),_=function(e){if(!a.isNodeJS)return n(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const r=__webpack_require__(82787).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(t){(0,s.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return n(e)}(f),v=e.length+36+b.length+_.length,y=new Uint8Array(v);let S=0;return y.set(e,S),S+=e.length,r("IHDR",b,y,S),S+=12+b.length,r("IDATA",_,y,S),S+=12+_.length,r("IEND",new Uint8Array(0),y,S),(0,s.createObjectURL)(y,"image/png",o)}return function(e,t,r){return i(e,void 0===e.kind?s.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}();class p{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=s.IDENTITY_MATRIX,this.fontMatrix=s.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=s.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=o.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function g(e){let t=[];const r=[];for(const s of e)"save"!==s.fn?"restore"===s.fn?t=r.pop():t.push(s):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items);return t}function f(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)}function m(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${f(e[0])} ${f(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${f(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${f(e[4])} ${f(e[5])})`;return`matrix(${f(e[0])} ${f(e[1])} ${f(e[2])} ${f(e[3])} ${f(e[4])} ${f(e[5])})`}let A=0,b=0,_=0;t.SVGGraphics=i=class{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.svgFactory=new n.DOMSVGFactory,this.current=new p,this.transformMatrix=s.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[];for(const n in s.OPS)this._operatorIdMapping[s.OPS[n]]=n}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,r=e.argsArray;for(let n=0,a=t.length;n<a;n++)if(t[n]===s.OPS.dependency)for(const e of r[n]){const t=e.startsWith("g_")?this.commonObjs:this.objs,r=new Promise((r=>{t.get(e,r)}));this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,n,a,i){const o=[e,t,r,n,a,i];this.transformMatrix=s.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;const r=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=s.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r)))}convertOpList(e){const t=this._operatorIdMapping,r=e.argsArray,s=e.fnArray,n=[];for(let a=0,i=s.length;a<i;a++){const e=s[a];n.push({fnId:e,fn:t[e],args:r[a]})}return g(n)}executeOpTree(e){for(const t of e){const e=t.fn,r=t.fnId,n=t.args;switch(0|r){case s.OPS.beginText:this.beginText();break;case s.OPS.dependency:break;case s.OPS.setLeading:this.setLeading(n);break;case s.OPS.setLeadingMoveText:this.setLeadingMoveText(n[0],n[1]);break;case s.OPS.setFont:this.setFont(n);break;case s.OPS.showText:case s.OPS.showSpacedText:this.showText(n[0]);break;case s.OPS.endText:this.endText();break;case s.OPS.moveText:this.moveText(n[0],n[1]);break;case s.OPS.setCharSpacing:this.setCharSpacing(n[0]);break;case s.OPS.setWordSpacing:this.setWordSpacing(n[0]);break;case s.OPS.setHScale:this.setHScale(n[0]);break;case s.OPS.setTextMatrix:this.setTextMatrix(n[0],n[1],n[2],n[3],n[4],n[5]);break;case s.OPS.setTextRise:this.setTextRise(n[0]);break;case s.OPS.setTextRenderingMode:this.setTextRenderingMode(n[0]);break;case s.OPS.setLineWidth:this.setLineWidth(n[0]);break;case s.OPS.setLineJoin:this.setLineJoin(n[0]);break;case s.OPS.setLineCap:this.setLineCap(n[0]);break;case s.OPS.setMiterLimit:this.setMiterLimit(n[0]);break;case s.OPS.setFillRGBColor:this.setFillRGBColor(n[0],n[1],n[2]);break;case s.OPS.setStrokeRGBColor:this.setStrokeRGBColor(n[0],n[1],n[2]);break;case s.OPS.setStrokeColorN:this.setStrokeColorN(n);break;case s.OPS.setFillColorN:this.setFillColorN(n);break;case s.OPS.shadingFill:this.shadingFill(n[0]);break;case s.OPS.setDash:this.setDash(n[0],n[1]);break;case s.OPS.setRenderingIntent:this.setRenderingIntent(n[0]);break;case s.OPS.setFlatness:this.setFlatness(n[0]);break;case s.OPS.setGState:this.setGState(n[0]);break;case s.OPS.fill:this.fill();break;case s.OPS.eoFill:this.eoFill();break;case s.OPS.stroke:this.stroke();break;case s.OPS.fillStroke:this.fillStroke();break;case s.OPS.eoFillStroke:this.eoFillStroke();break;case s.OPS.clip:this.clip("nonzero");break;case s.OPS.eoClip:this.clip("evenodd");break;case s.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case s.OPS.paintImageXObject:this.paintImageXObject(n[0]);break;case s.OPS.paintInlineImageXObject:this.paintInlineImageXObject(n[0]);break;case s.OPS.paintImageMaskXObject:this.paintImageMaskXObject(n[0]);break;case s.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(n[0],n[1]);break;case s.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case s.OPS.closePath:this.closePath();break;case s.OPS.closeStroke:this.closeStroke();break;case s.OPS.closeFillStroke:this.closeFillStroke();break;case s.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case s.OPS.nextLine:this.nextLine();break;case s.OPS.transform:this.transform(n[0],n[1],n[2],n[3],n[4],n[5]);break;case s.OPS.constructPath:this.constructPath(n[0],n[1]);break;case s.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,s.warn)(`Unimplemented operator ${e}`)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,s,n,a){const i=this.current;i.textMatrix=i.lineMatrix=[e,t,r,s,n,a],i.textMatrixScale=Math.sqrt(e*e+t*t),i.x=i.lineX=0,i.y=i.lineY=0,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",`${f(i.fontSize)}px`),i.tspan.setAttributeNS(null,"y",f(-i.y)),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtElement.appendChild(i.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=s.IDENTITY_MATRIX,e.lineMatrix=s.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size",`${f(r.fontSize)}px`),r.tspan.setAttributeNS(null,"y",f(-r.y))}showText(e){const t=this.current,r=t.font,n=t.fontSize;if(0===n)return;const a=t.fontSizeScale,i=t.charSpacing,c=t.wordSpacing,h=t.fontDirection,d=t.textHScale*h,u=r.vertical,p=u?1:-1,g=r.defaultVMetrics,A=n*t.fontMatrix[0];let b=0;for(const o of e){if(null===o){b+=h*c;continue}if((0,s.isNum)(o)){b+=p*o*n/1e3;continue}const e=(o.isSpace?c:0)+i,l=o.fontChar;let d,f,m,_=o.width;if(u){let e;const t=o.vmetric||g;e=o.vmetric?t[1]:.5*_,e=-e*A;const r=t[2]*A;_=t?-t[0]:_,d=e/a,f=(b+r)/a}else d=b/a,f=0;(o.isInFont||r.missingFile)&&(t.xcoords.push(t.x+d),u&&t.ycoords.push(-t.y+f),t.tspan.textContent+=l),m=u?_*A-e*h:_*A+e*h,b+=m}t.tspan.setAttributeNS(null,"x",t.xcoords.map(f).join(" ")),u?t.tspan.setAttributeNS(null,"y",t.ycoords.map(f).join(" ")):t.tspan.setAttributeNS(null,"y",f(-t.y)),u?t.y-=b:t.x+=b*d,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size",`${f(t.fontSize)}px`),t.fontStyle!==o.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==o.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);const _=t.textRenderingMode&s.TextRenderingMode.FILL_STROKE_MASK;if(_===s.TextRenderingMode.FILL||_===s.TextRenderingMode.FILL_STROKE?(t.fillColor!==o.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===s.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),_===s.TextRenderingMode.STROKE||_===s.TextRenderingMode.FILL_STROKE){const e=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,e)}let v=t.textMatrix;0!==t.textRise&&(v=v.slice(),v[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform",`${m(v)} scale(${f(d)}, -1)`),t.txtElement.setAttributeNS(l,"xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const t=(0,s.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }\n`}setFont(e){const t=this.current,r=this.commonObjs.get(e[0]);let n=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix?r.fontMatrix:s.FONT_IDENTITY_MATRIX;let a="normal";r.black?a="900":r.bold&&(a="bold");const i=r.italic?"italic":"normal";n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=a,t.fontStyle=i,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){const e=this.current;e.textRenderingMode&s.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement&&e.txtElement.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=h[e]}setLineJoin(e){this.current.lineJoin=d[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=s.Util.makeCssRgb(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=s.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,r=this.viewport.height,n=s.Util.inverseTransform(this.transformMatrix),a=s.Util.applyTransform([0,0],n),i=s.Util.applyTransform([0,r],n),o=s.Util.applyTransform([t,0],n),l=s.Util.applyTransform([t,r],n),c=Math.min(a[0],i[0],o[0],l[0]),h=Math.min(a[1],i[1],o[1],l[1]),d=Math.max(a[0],i[0],o[0],l[0]),u=Math.max(a[1],i[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",c),p.setAttributeNS(null,"y",h),p.setAttributeNS(null,"width",d-c),p.setAttributeNS(null,"height",u-h),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],r=e[2],n=e[3]||s.IDENTITY_MATRIX,[a,i,o,l]=e[4],c=e[5],h=e[6],d=e[7],u="shading"+_++,[p,g]=s.Util.applyTransform([a,i],n),[f,m]=s.Util.applyTransform([o,l],n),[A,b]=s.Util.singularValueDecompose2dScale(n),v=c*A,y=h*b,S=this.svgFactory.createElement("svg:pattern");S.setAttributeNS(null,"id",u),S.setAttributeNS(null,"patternUnits","userSpaceOnUse"),S.setAttributeNS(null,"width",v),S.setAttributeNS(null,"height",y),S.setAttributeNS(null,"x",`${p}`),S.setAttributeNS(null,"y",`${g}`);const x=this.svg,C=this.transformMatrix,P=this.current.fillColor,k=this.current.strokeColor,R=this.svgFactory.create(f-p,m-g);if(this.svg=R,this.transformMatrix=n,2===d){const e=s.Util.makeCssRgb(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=x,this.transformMatrix=C,this.current.fillColor=P,this.current.strokeColor=k,S.appendChild(R.childNodes[0]),this.defs.appendChild(S),`url(#${u})`}_makeShadingPattern(e){switch(e[0]){case"RadialAxial":const t="shading"+_++,r=e[3];let n;switch(e[1]){case"axial":const r=e[4],s=e[5];n=this.svgFactory.createElement("svg:linearGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"x1",r[0]),n.setAttributeNS(null,"y1",r[1]),n.setAttributeNS(null,"x2",s[0]),n.setAttributeNS(null,"y2",s[1]);break;case"radial":const a=e[4],i=e[5],o=e[6],l=e[7];n=this.svgFactory.createElement("svg:radialGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"cx",i[0]),n.setAttributeNS(null,"cy",i[1]),n.setAttributeNS(null,"r",l),n.setAttributeNS(null,"fx",a[0]),n.setAttributeNS(null,"fy",a[1]),n.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of r){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),n.appendChild(t)}return this.defs.appendChild(n),`url(#${t})`;case"Mesh":return(0,s.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const r=this.current;let n=r.x,a=r.y,i=[],o=0;for(const l of e)switch(0|l){case s.OPS.rectangle:n=t[o++],a=t[o++];const e=n+t[o++],r=a+t[o++];i.push("M",f(n),f(a),"L",f(e),f(a),"L",f(e),f(r),"L",f(n),f(r),"Z");break;case s.OPS.moveTo:n=t[o++],a=t[o++],i.push("M",f(n),f(a));break;case s.OPS.lineTo:n=t[o++],a=t[o++],i.push("L",f(n),f(a));break;case s.OPS.curveTo:n=t[o+4],a=t[o+5],i.push("C",f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3]),f(n),f(a)),o+=6;break;case s.OPS.curveTo2:i.push("C",f(n),f(a),f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3])),n=t[o+2],a=t[o+3],o+=4;break;case s.OPS.curveTo3:n=t[o+2],a=t[o+3],i.push("C",f(t[o]),f(t[o+1]),f(n),f(a),f(n),f(a)),o+=4;break;case s.OPS.closePath:i.push("Z")}i=i.join(" "),r.path&&e.length>0&&e[0]!==s.OPS.rectangle&&e[0]!==s.OPS.moveTo?i=r.path.getAttributeNS(null,"d")+i:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",i),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,a)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath"+A++,r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",m(this.transformMatrix));const s=e.element.cloneNode(!0);"evenodd"===this.pendingClip?s.setAttributeNS(null,"clip-rule","evenodd"):s.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(s),this.defs.appendChild(r),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach((function(e){e.clipGroup=null})),r.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r);break;case"CA":this.setStrokeAlpha(r);break;case"ca":this.setFillAlpha(r);break;default:(0,s.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=this.current;let s=r.dashArray;1!==t&&s.length>0&&(s=s.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",f(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",f(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",s.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*r.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}paintImageXObject(e){const t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,s.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const r=e.width,s=e.height,n=u(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",f(r)),a.setAttributeNS(null,"height",f(s)),this.current.element=a,this.clip("nonzero");const i=this.svgFactory.createElement("svg:image");i.setAttributeNS(c,"xlink:href",n),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",f(-s)),i.setAttributeNS(null,"width",f(r)+"px"),i.setAttributeNS(null,"height",f(s)+"px"),i.setAttributeNS(null,"transform",`scale(${f(1/r)} ${f(-1/s)})`),t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}paintImageMaskXObject(e){const t=this.current,r=e.width,s=e.height,n=t.fillColor;t.maskId="mask"+b++;const a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);const i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",f(r)),i.setAttributeNS(null,"height",f(s)),i.setAttributeNS(null,"fill",n),i.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(i),this.paintInlineImageXObject(e,a)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],r=t[3]-t[1],s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x",t[0]),s.setAttributeNS(null,"y",t[1]),s.setAttributeNS(null,"width",f(e)),s.setAttributeNS(null,"height",f(r)),this.current.element=s,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;const s=this.svgFactory.createElement("svg:g");return s.setAttributeNS(null,"transform",m(e.transform)),t.appendChild(s),this.svg=s,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",m(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var s=r(2),n=r(20);const a=__webpack_require__(23237),i=__webpack_require__(97492),o=__webpack_require__(31815),l=__webpack_require__(66671),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new p(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new m(this,e,t):new g(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class h{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)(),this._headersCapability=(0,s.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new s.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class d{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function u(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class p extends h{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new s.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:a,suggestedLength:i}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=i||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r)};this._request=null,"http:"===this._url.protocol?this._request=i.request(u(this._url,e.httpHeaders),t):this._request=o.request(u(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class g extends d{constructor(e,t,r){super(e),this._httpHeaders={};for(const s in e.httpHeaders){const t=e.httpHeaders[s];"undefined"!==typeof t&&(this._httpHeaders[s]=t)}this._httpHeaders.Range=`bytes=${t}-${r-1}`;const n=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new s.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null,"http:"===this._url.protocol?this._request=i.request(u(this._url,this._httpHeaders),n):this._request=o.request(u(this._url,this._httpHeaders),n),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class f extends h{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),a.lstat(t,((e,r)=>{if(e)return"ENOENT"===e.code&&(e=new s.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=r.size,this._setReadableStream(a.createReadStream(t)),this._headersCapability.resolve()}))}}class m extends d{constructor(e,t,r){super(e);let s=decodeURIComponent(this._url.path);c.test(this._url.href)&&(s=s.replace(/^\//,"")),this._setReadableStream(a.createReadStream(s,{start:t,end:r-1}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new s.MissingPDFException('Missing PDF "'+t+'".'):new s.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,n.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(r){}if(/\.pdf$/i.test(e))return e}return null},t.validateRangeRequestCapabilities=function(e){let{getResponseHeader:t,isHttp:r,rangeChunkSize:n,disableRange:a}=e;(0,s.assert)(n>0,"Range chunk size must be larger than zero");const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(t("Content-Length"),10);return Number.isInteger(o)?(i.suggestedLength=o,o<=2*n||a||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var s=r(2),n=r(21)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,r=s("filename\\*","i").exec(e);if(r){r=r[1];let e=i(r);return e=unescape(e),e=o(e),e=l(e),a(e)}if(r=function(e){const t=[];let r;const n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=n.exec(e));){let[,e,s,n]=r;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[s,n]}const a=[];for(let s=0;s<t.length&&s in t;++s){let[e,r]=t[s];r=i(r),e&&(r=unescape(r),0===s&&(r=o(r))),a.push(r)}return a.join("")}(e),r)return a(l(r));if(r=s("filename","i").exec(e),r){r=r[1];let e=i(r);return e=l(e),a(e)}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function n(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{const s=new TextDecoder(e,{fatal:!0}),n=Array.from(r,(function(e){return 255&e.charCodeAt(0)}));r=s.decode(new Uint8Array(n)),t=!1}catch(s){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(n){}}}return r}function a(e){return t&&/[\x80-\xff]/.test(e)&&(e=n("utf-8",e),t&&(e=n("iso-8859-1",e))),e}function i(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function o(e){const t=e.indexOf("'");return-1===t?e:n(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,s){if("q"===r||"Q"===r)return n(t,s=(s=s.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{s=atob(s)}catch(a){}return n(t,s)}))}return""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var s=r(2),n=r(20);class a{constructor(e,t){this.url=e,t=t||{},this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const s={begin:e,end:t};for(const n in r)s[n]=r[n];return this.request(s)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),r=this.currXhrId++,s=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const n in this.httpHeaders){const e=this.httpHeaders[n];"undefined"!==typeof e&&t.setRequestHeader(n,e)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),s.expectedStatus=206):s.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),s.onHeadersReceived=e.onHeadersReceived,s.onDone=e.onDone,s.onError=e.onError,s.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){const r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}onStateChange(e,t){const r=this.pendingRequests[e];if(!r)return;const n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==n.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===n.status&&this.isHttp)return void(r.onError&&r.onError(n.status));const a=n.status||200;if((200!==a||206!==r.expectedStatus)&&a!==r.expectedStatus)return void(r.onError&&r.onError(n.status));const i=function(e){const t=e.response;return"string"!==typeof t?t:(0,s.stringToBytes)(t).buffer}(n);if(206===a){const e=n.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:i})}else i?r.onDone({begin:0,chunk:i}):r.onError&&r.onError(n.status)}hasPendingRequests(){for(const e in this.pendingRequests)return!0;return!1}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortAllRequests(){for(const e in this.pendingRequests)this.abortRequest(0|e)}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new a(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new i(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new o(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class i{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:s,suggestedLength:a}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}_onError(e){const t=this._url,r=(0,n.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach((function(e){e.reject(r)})),this._requests=[],this._cachedChunks=[]}_onProgress(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,r){this._manager=e;const s={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=e.requestRange(t,r,s),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}_onProgress(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var s=r(2),n=r(20);function a(e,t,r){return{method:"GET",headers:e,signal:r&&r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function i(e){const t=new Headers;for(const r in e){const s=e[r];"undefined"!==typeof s&&t.append(r,s)}return t}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new o(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new l(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}};class o{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=i(this._stream.httpHeaders);const r=t.url;fetch(r,a(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:a,suggestedLength:i}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=i||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new s.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}class l{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=(0,s.createPromiseCapability)(),this._isStreamingSupported=!o.disableStream,"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._headers=i(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const l=o.url;fetch(l,a(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()})),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}}])},module.exports=factory()},73738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},96918:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var s=r(58168),n=r(80045),a=r(9950),i=r(2803),o=r(33720),l=r(39886),c=a.forwardRef((function(e,t){var r=e.children,o=e.classes,c=e.className,h=e.disableTypography,d=void 0!==h&&h,u=(0,n.A)(e,["children","classes","className","disableTypography"]);return a.createElement("div",(0,s.A)({className:(0,i.A)(o.root,c),ref:t},u),d?r:a.createElement(l.A,{component:"h2",variant:"h6"},r))}));const h=(0,o.A)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(c)}}]);