(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-848bd87a"],{"0b3f":function(e,t,r){"use strict";r("f4a7")},1:function(e,t){},1244:function(e,t,r){"use strict";r.r(t);var n=r("ae31"),i=Promise.resolve();t["default"]=function(e){function t(e){return"object"===typeof e&&null!==e&&!0===e.__PDFDocumentLoadingTask}function r(t,r){var n;if("string"===typeof t)n={url:t};else if(t instanceof Uint8Array)n={data:t};else{if("object"!==typeof t||null===t)throw new TypeError("invalid src type");n=Object.assign({},t)}r&&r.withCredentials&&(n.withCredentials=r.withCredentials);var i=e.getDocument(n);return i.__PDFDocumentLoadingTask=!0,r&&r.onPassword&&(i.onPassword=r.onPassword),r&&r.onProgress&&(i.onProgress=r.onProgress),i}function a(a,o,s){var u=null,c=null,l=null,h=!1;function f(){a.getContext("2d").clearRect(0,0,a.width,a.height)}function d(){while(o.firstChild)o.removeChild(o.firstChild)}a.getContext("2d").save(),this.destroy=function(){null!==u&&(i=u.destroy(),u=null)},this.getResolutionScale=function(){return a.offsetWidth/a.width},this.printPage=function(e,t){if(null!==c){var r=void 0===e?150:e,n=r/72,i=96/72,a=document.createElement("iframe");new Promise((function(e,t){a.frameBorder="0",a.scrolling="no",a.width="0px;",a.height="0px;",a.style.cssText="position: absolute; top: 0; left: 0",a.onload=function(){e(this.contentWindow)},window.document.body.appendChild(a)})).then((function(e){return e.document.title="",u.getPage(1).then((function(t){var r=t.getViewport({scale:1});return e.document.head.appendChild(e.document.createElement("style")).textContent="@supports ((size:A4) and (size:1pt 1pt)) {@page { margin: 1pt; size: "+r.width*n/i+"pt "+r.height*n/i+"pt; }}@media print {body { margin: 0 }canvas { page-break-before: avoid; page-break-after: always; page-break-inside: avoid }}@media screen {body { margin: 0 }}",e}))})).then((function(e){for(var r=[],i=1;i<=u.numPages;++i)void 0!==t&&-1===t.indexOf(i)||r.push(u.getPage(i).then((function(t){var r=t.getViewport({scale:1}),i=e.document.body.appendChild(e.document.createElement("canvas"));return i.width=r.width*n,i.height=r.height*n,t.render({canvasContext:i.getContext("2d"),transform:[n,0,0,n,0,0],viewport:r,intent:"print"}).promise})));Promise.all(r).then((function(){e.focus(),e.document.queryCommandSupported("print")?e.document.execCommand("print",!1,null):e.print(),o()})).catch((function(e){o(),s("error",e)}))}))}function o(){a.parentNode.removeChild(a)}},this.renderPage=function(t){if(null!==l){if(h)return;return h=!0,void l.cancel().catch((function(e){s("error",e)}))}if(null!==c){var r=(void 0===c.rotate?0:c.rotate)+(void 0===t?0:t),f=a.offsetWidth/c.getViewport({scale:1}).width*(window.devicePixelRatio||1),p=c.getViewport({scale:f,rotation:r});s("page-size",p.width,p.height,f),a.width=p.width,a.height=p.height,l=c.render({canvasContext:a.getContext("2d"),viewport:p}),o.style.visibility="hidden",d();var v={scrollPageIntoView:function(e){s("link-clicked",e.pageNumber)}},g=new n["PDFLinkService"];g.setDocument(u),g.setViewer(v),i=i.then(function(){var r=c.getAnnotations({intent:"display"}).then((function(t){e.AnnotationLayer.render({viewport:p.clone({dontFlip:!0}),div:o,annotations:t,page:c,linkService:g,renderInteractiveForms:!1})})),n=l.promise.then((function(){o.style.visibility="",h=!1,l=null})).catch(function(r){if(l=null,r instanceof e.RenderingCancelledException)return h=!1,void this.renderPage(t);s("error",r)}.bind(this));return Promise.all([r,n])}.bind(this))}},this.forEachPage=function(e){var t=u.numPages;(function r(n){u.getPage(n).then(e).then((function(){++n<=t&&r(n)}))})(1)},this.loadPage=function(e,t){c=null,null!==u&&(i=i.then((function(){return u.getPage(e)})).then(function(e){c=e,this.renderPage(t),s("page-loaded",e.pageNumber)}.bind(this)).catch((function(e){f(),d(),s("error",e)})))},this.loadDocument=function(n){if(u=null,c=null,s("num-pages",void 0),!n)return a.removeAttribute("width"),a.removeAttribute("height"),void d();i=i.then((function(){var i;if(t(n)){if(n.destroyed)return void s("error",new Error("loadingTask has been destroyed"));i=n}else i=r(n,{onPassword:function(t,r){var n;switch(r){case e.PasswordResponses.NEED_PASSWORD:n="NEED_PASSWORD";break;case e.PasswordResponses.INCORRECT_PASSWORD:n="INCORRECT_PASSWORD";break}s("password",t,n)},onProgress:function(e){var t=e.loaded/e.total;s("progress",Math.min(t,1))}});return i.promise})).then((function(e){u=e,s("num-pages",e.numPages),s("loaded")})).catch((function(e){f(),d(),s("error",e)}))},o.style.transformOrigin="0 0"}return{createLoadingTask:r,PDFJSWrapper:a}}},2:function(e,t){},2712:function(e,t,r){},3:function(e,t){},"34df":function(e,t,r){"use strict";r("2712")},4:function(e,t){},"4d7f":function(e,t,r){e.exports=function(){return new Worker(r.p+"330af2b56c03776cb3a2.worker.js")}},5:function(e,t){},6:function(e,t){},"654c":function(module,exports,__webpack_require__){(function(Buffer,process,global){(function(e,t){module.exports=t()})(0,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},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 n.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return n.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return i.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return i.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 o.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return s.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return u.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}});var n=r(1),i=r(202),a=r(5),o=r(216),s=r(206),u=r(209),c=r(217),l=r(218),h=r(7),f=h.isNodeJS;if(f){var d=r(219).PDFNodeStream;(0,i.setPDFNetworkStreamFactory)((function(e){return new d(e)}))}else{var p,v=r(222).PDFNetworkStream;(0,n.isFetchSupported)()&&(p=r(223).PDFFetchStream),(0,i.setPDFNetworkStreamFactory)((function(e){return p&&(0,n.isValidFetchUrl)(e.url)?new p(e):new v(e)}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=O,t.getFilenameFromUrl=I,t.isFetchSupported=N,t.isValidFetchUrl=D,t.loadScript=j,t.deprecated=U,t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.BaseCMapReaderFactory=t.DOMCanvasFactory=t.BaseCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},i=n.ownerDocument,a=void 0===i?globalThis.document:i;return b(this,r),e=t.call(this),e._document=a,e}return w(r,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}}]),r}(k);t.DOMCanvasFactory=x;var P=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,o=void 0!==a&&a;b(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=o}return w(e,[{key:"fetch",value:function(){var e=l(n["default"].mark((function e(t){var r,a,o,s=this;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return a=this.baseUrl+r+(this.isCompressed?".bcmap":""),o=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(a,o)["catch"]((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_fetchData",value:function(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=P;var C=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return w(r,[{key:"_fetchData",value:function(e,t){var r=this;return N()&&D(e,document.baseURI)?fetch(e).then(function(){var e=l(n["default"].mark((function e(a){var o;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a.ok){e.next=2;break}throw new Error(a.statusText);case 2:if(!r.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,a.arrayBuffer();case 6:e.t1=e.sent,o=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=i.stringToBytes,e.next=13,a.text();case 13:e.t3=e.sent,o=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:o,compressionType:t});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):new Promise((function(n,a){var o=new XMLHttpRequest;o.open("GET",e,!0),r.isCompressed&&(o.responseType="arraybuffer"),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){var e;if(200===o.status||0===o.status)if(r.isCompressed&&o.response?e=new Uint8Array(o.response):!r.isCompressed&&o.responseText&&(e=(0,i.stringToBytes)(o.responseText)),e)return void n({cMapData:e,compressionType:t});a(new Error(o.statusText))}},o.send(null)}))}}]),r}(P);t.DOMCMapReaderFactory=C;var T=function(){function e(){b(this,e)}return w(e,[{key:"create",value:function(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");var 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}},{key:"createElement",value:function(e){return(0,i.assert)("string"===typeof e,"Invalid SVG element type"),document.createElementNS(A,e)}}]),e}();t.DOMSVGFactory=T;var R=function(){function e(t){var r=t.viewBox,n=t.scale,i=t.rotation,a=t.offsetX,o=void 0===a?0:a,s=t.offsetY,u=void 0===s?0:s,c=t.dontFlip,l=void 0!==c&&c;b(this,e),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=u;var h,f,d,p,v,g,y,m,_=(r[2]+r[0])/2,w=(r[3]+r[1])/2;switch(i%=360,i=i<0?i+360:i,i){case 180:h=-1,f=0,d=0,p=1;break;case 90:h=0,f=1,d=1,p=0;break;case 270:h=0,f=-1,d=-1,p=0;break;case 0:h=1,f=0,d=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}l&&(d=-d,p=-p),0===h?(v=Math.abs(w-r[1])*n+o,g=Math.abs(_-r[0])*n+u,y=Math.abs(r[3]-r[1])*n,m=Math.abs(r[2]-r[0])*n):(v=Math.abs(_-r[0])*n+o,g=Math.abs(w-r[1])*n+u,y=Math.abs(r[2]-r[0])*n,m=Math.abs(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,p*n,v-h*n*_-d*n*w,g-f*n*_-p*n*w],this.width=y,this.height=m}return w(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,i=t.rotation,a=void 0===i?this.rotation:i,o=t.offsetX,s=void 0===o?this.offsetX:o,u=t.offsetY,c=void 0===u?this.offsetY:u,l=t.dontFlip,h=void 0!==l&&l;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:s,offsetY:c,dontFlip:h})}},{key:"convertToViewportPoint",value:function(e,t){return i.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=R;var E=function(e){f(r,e);var t=p(r);function r(e,n){var i;return b(this,r),i=t.call(this,e),i.type=n,i}return r}(i.BaseException);t.RenderingCancelledException=E;var L={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,a=t.rel,o=t.enabled,s=void 0===o||o;(0,i.assert)(r&&"string"===typeof r,'addLinkAttributes: A valid "url" parameter must provided.');var u=(0,i.removeNullCharacters)(r);s?e.href=e.title=u:(e.href="",e.title="Disabled: ".concat(u),e.onclick=function(){return!1});var c="";switch(n){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";break}e.target=c,e.rel="string"===typeof a?a:S}function I(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)}t.LinkTarget=L;var M,F=function(){function e(){b(this,e),this.started=Object.create(null),this.times=[]}return w(e,[{key:"time",value:function(e){e in this.started&&(0,i.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,i.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=o(this.times);try{for(n.s();!(e=n.n()).done;){var i=e.value,a=i.name;a.length>r&&(r=a.length)}}catch(h){n.e(h)}finally{n.f()}var s,u=o(this.times);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=c.end-c.start;t.push("".concat(c.name.padEnd(r)," ").concat(l,"ms\n"))}}catch(h){u.e(h)}finally{u.f()}return t.join("")}}]),e}();function N(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype&&"undefined"!==typeof ReadableStream}function D(e,t){try{var r=t?new URL(e,t):new URL(e),n=r.protocol;return"http:"===n||"https:"===n}catch(i){return!1}}function j(e){return new Promise((function(t,r){var n=document.createElement("script");n.src=e,n.onload=t,n.onerror=function(){r(new Error("Cannot load script at: ".concat(n.src)))},(document.head||document.documentElement).appendChild(n)}))}function U(e){console.log("Deprecated API usage: "+e)}t.StatTimer=F;var q=function(){function e(){b(this,e)}return w(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;M||(M=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=M.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var c=t[7]||"Z",l=parseInt(t[8],10);l=l>=0&&l<=23?l:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===c?(o+=l,s+=h):"+"===c&&(o-=l,s-=h),new Date(Date.UTC(r,n,a,o,s,u))}}]),e}();t.PDFDateString=q},function(e,t,r){"use strict";e.exports=r(3)},function(e,t,r){"use strict";(function(e){function t(e){return 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},t(e)}var r=function(e){var r,n=Object.prototype,i=n.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(I){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),o=new E(n||[]);return a._invoke=P(e,r,o),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(I){return{type:"throw",arg:I}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function y(){}function m(){}function b(){}var _={};_[o]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(L([])));S&&S!==n&&i.call(S,o)&&(_=S);var A=b.prototype=y.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,r){function n(a,o,s,u){var c=h(e[a],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"===t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):r.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var a;function o(e,t){function i(){return new r((function(r,i){n(e,t,r,i)}))}return a=a?a.then(i,i):i()}this._invoke=o}function P(e,t,r){var n=f;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===i)throw a;return O()}r.method=i,r.arg=a;while(1){var o=r.delegate;if(o){var s=C(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=h(e,t,r);if("normal"===u.type){if(n=r.done?v:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function C(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=r,C(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,g;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){while(++n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(n){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e,t){for(var r=0;r=R.INFOS&&console.log("Info: ".concat(e))}function j(e){M>=R.WARNINGS&&console.log("Warning: ".concat(e))}function U(e){throw new Error(e)}function q(e,t){e||U(t)}function B(e,t){var r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(i){return!1}var n=new URL(t,r);return r.origin===n.origin}function W(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function V(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(W(r))return r}catch(n){}return null}function z(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var H=function(){function e(t){this.constructor===e&&U("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=H;var G=function(e){s(r,e);var t=c(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.code=n,i}return r}(H);t.PasswordException=G;var Y=function(e){s(r,e);var t=c(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.details=n,i}return r}(H);t.UnknownErrorException=Y;var X=function(e){s(r,e);var t=c(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(H);t.InvalidPDFException=X;var Q=function(e){s(r,e);var t=c(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(H);t.MissingPDFException=Q;var K=function(e){s(r,e);var t=c(r);function r(e,n){var i;return o(this,r),i=t.call(this,e),i.status=n,i}return r}(H);t.UnexpectedResponseException=K;var J=function(e){s(r,e);var t=c(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(H);t.FormatError=J;var $=function(e){s(r,e);var t=c(r);function r(){return o(this,r),t.apply(this,arguments)}return r}(H);t.AbortException=$;var Z=/\x00/g;function ee(e){return"string"!==typeof e?(j("The argument for removeNullCharacters must be a string."),e):e.replace(Z,"")}function te(e){q(null!==e&&"object"===a(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function oe(){var e=new Uint8Array(4);e[0]=1;var t=new Uint32Array(e.buffer,0,1);return 1===t[0]}var se={get value(){return z(this,"value",oe())}};function ue(){try{return new Function(""),!0}catch(e){return!1}}t.IsLittleEndianCached=se;var ce={get value(){return z(this,"value",ue())}};t.IsEvalSupportedCached=ce;var le=["rgb(",0,",",0,",",0,")"],he=function(){function e(){o(this,e)}return i(e,null,[{key:"makeCssRgb",value:function(e,t,r){return le[1]=e,le[3]=t,le[5]=r,le.join("")}},{key:"transform",value:function(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]]}},{key:"applyTransform",value:function(e,t){var r=e[0]*t[0]+e[1]*t[2]+t[4],n=e[0]*t[1]+e[1]*t[3]+t[5];return[r,n]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2],n=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,i=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r;return[n,i]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]}},{key:"inverseTransform",value:function(e){var 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]}},{key:"apply3dTransform",value:function(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]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,u=o+s||1,c=o-s||1;return[Math.sqrt(u),Math.sqrt(c)]}},{key:"normalizeRect",value:function(e){var 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}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]?(o[0]=i[1],o[2]=i[2],a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1]?(o[1]=a[1],o[3]=a[2],o):null):null}}]),e}();t.Util=he;var fe=[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];function de(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n0&&void 0!==arguments[0]?arguments[0]:new Date(Date.now()),t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),(e.getUTCDate()+1).toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")}function Ae(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e}var ke=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&URL.createObjectURL){var i=new Blob([t],{type:r});return URL.createObjectURL(i)}for(var a="data:".concat(r,";base64,"),o=0,s=t.length;o>2,f=(3&u)<<4|c>>4,d=o+1>6:64,p=o+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t})}}(),function(){if(a&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var i=void 0===n?[t,r]:[t,r,n];e.apply(this,i)},window.history.replaceState=function(e,r,n){var i=void 0===n?[e,r]:[e,r,n];t.apply(this,i)}}}(),function(){String.prototype.startsWith||r(53)}(),function(){String.prototype.endsWith||r(64)}(),function(){String.prototype.includes||r(66)}(),function(){Array.prototype.includes||r(68)}(),function(){Array.from||r(76)}(),function(){Object.assign||r(98)}(),function(){Object.fromEntries||r(101)}(),function(){Math.log2||(Math.log2=r(105))}(),function(){Number.isNaN||(Number.isNaN=r(107))}(),function(){Number.isInteger||(Number.isInteger=r(109))}(),function(){Uint8Array.prototype.slice||r(112)}(),function(){globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(117))}(),function(){globalThis.URL=r(138)}(),function(){var e=!1;if("undefined"!==typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(t){}e||(globalThis.ReadableStream=r(145).ReadableStream)}(),function(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(146))}(),function(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(153))}(),function(){globalThis.WeakMap||(globalThis.WeakMap=r(155))}(),function(){globalThis.WeakSet||(globalThis.WeakSet=r(161))}(),function(){String.prototype.codePointAt||r(163)}(),function(){String.fromCodePoint||(String.fromCodePoint=r(165))}(),function(){globalThis.Symbol||r(167)}(),function(){String.prototype.padStart||r(190)}(),function(){String.prototype.padEnd||r(195)}(),function(){Object.values||(Object.values=r(197))}(),function(){Object.entries||(Object.entries=r(200))}()}},function(e,t,r){"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var i="object"===("undefined"===typeof process?"undefined":n(process))&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=i},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){var n=r(10),i=r(11);n({global:!0},{globalThis:i})},function(e,t,r){var n=r(11),i=r(12).f,a=r(26),o=r(29),s=r(30),u=r(40),c=r(52);e.exports=function(e,t){var r,l,h,f,d,p,v=e.target,g=e.global,y=e.stat;if(l=g?n:y?n[v]||s(v,{}):(n[v]||{}).prototype,l)for(h in t){if(d=t[h],e.noTargetGet?(p=i(l,h),f=p&&p.value):f=l[h],r=c(g?h:v+(y?".":"#")+h,e.forced),!r&&void 0!==f){if(typeof d===typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(l,h,d,e)}}},function(e,t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||Function("return this")()},function(e,t,r){var n=r(13),i=r(15),a=r(16),o=r(17),s=r(21),u=r(23),c=r(24),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=o(e),t=s(t,!0),c)try{return l(e,t)}catch(r){}if(u(e,t))return a(!i.f.call(e,t),e[t])}},function(e,t,r){var n=r(14);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(18),i=r(20);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(14),i=r(19),a="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(22);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(13),i=r(14),a=r(25);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),i=r(22),a=n.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t,r){var n=r(13),i=r(27),a=r(16);e.exports=n?function(e,t,r){return i.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),i=r(24),a=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(a(e),t=o(t,!0),a(r),i)try{return s(e,t,r)}catch(n){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(22);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){var n=r(11),i=r(26),a=r(23),o=r(30),s=r(31),u=r(33),c=u.get,l=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||a(r,"name")||i(r,"name",t),l(r).source=h.join("string"==typeof t?t:"")),e!==n?(u?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=r:i(e,t,r)):c?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(e,t,r){var n=r(11),i=r(26);e.exports=function(e,t){try{i(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),i=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return i.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),i=r(30),a="__core-js_shared__",o=n[a]||i(a,{});e.exports=o},function(e,t,r){var n,i,a,o=r(34),s=r(11),u=r(22),c=r(26),l=r(23),h=r(35),f=r(39),d=s.WeakMap,p=function(e){return a(e)?i(e):n(e,{})},v=function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(o){var g=new d,y=g.get,m=g.has,b=g.set;n=function(e,t){return b.call(g,e,t),t},i=function(e){return y.call(g,e)||{}},a=function(e){return m.call(g,e)}}else{var _=h("state");f[_]=!0,n=function(e,t){return c(e,_,t),t},i=function(e){return l(e,_)?e[_]:{}},a=function(e){return l(e,_)}}e.exports={set:n,get:i,has:a,enforce:p,getterFor:v}},function(e,t,r){var n=r(11),i=r(31),a=n.WeakMap;e.exports="function"===typeof a&&/native code/.test(i(a))},function(e,t,r){var n=r(36),i=r(38),a=n("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},function(e,t,r){var n=r(37),i=r(32);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t){e.exports={}},function(e,t,r){var n=r(23),i=r(41),a=r(12),o=r(27);e.exports=function(e,t){for(var r=i(t),s=o.f,u=a.f,c=0;cu)n(s,r=t[u++])&&(~a(c,r)||c.push(r));return c}},function(e,t,r){var n=r(17),i=r(47),a=r(49),o=function(e){return function(t,r,o){var s,u=n(t),c=i(u.length),l=a(o,c);if(e&&r!=r){while(c>l)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(48),i=Math.max,a=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):a(r,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(14),i=/#|\.prototype\./,a=function(e,t){var r=s[o(e)];return r==c||r!=u&&("function"==typeof t?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},u=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){"use strict";var n=r(10),i=r(12).f,a=r(47),o=r(55),s=r(20),u=r(60),c=r(37),l="".startsWith,h=Math.min,f=u("startsWith"),d=!c&&!f&&!!function(){var e=i(String.prototype,"startsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!d&&!f},{startsWith:function(e){var t=String(s(this));o(e);var r=a(h(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return l?l.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){var n=r(56);e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,r){var n=r(22),i=r(19),a=r(57),o=a("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,r){var n=r(11),i=r(36),a=r(23),o=r(38),s=r(58),u=r(59),c=i("wks"),l=n.Symbol,h=u?l:l&&l.withoutSetter||o;e.exports=function(e){return a(c,e)||(s&&a(l,e)?c[e]=l[e]:c[e]=h("Symbol."+e)),c[e]}},function(e,t,r){var n=r(14);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(e,t,r){var n=r(58);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){var n=r(57),i=n("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[i]=!1,"/./"[e](t)}catch(n){}}return!1}},function(e,t,r){var n=r(11),i=r(62),a=Function.call;e.exports=function(e,t,r){return i(a,n[e].prototype[t],r)}},function(e,t,r){var n=r(63);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,r){r(65);var n=r(61);e.exports=n("String","endsWith")},function(e,t,r){"use strict";var n=r(10),i=r(12).f,a=r(47),o=r(55),s=r(20),u=r(60),c=r(37),l="".endsWith,h=Math.min,f=u("endsWith"),d=!c&&!f&&!!function(){var e=i(String.prototype,"endsWith");return e&&!e.writable}();n({target:"String",proto:!0,forced:!d&&!f},{endsWith:function(e){var t=String(s(this));o(e);var r=arguments.length>1?arguments[1]:void 0,n=a(t.length),i=void 0===r?n:h(a(r),n),u=String(e);return l?l.call(t,u,i):t.slice(i-u.length,i)===u}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){"use strict";var n=r(10),i=r(55),a=r(20),o=r(60);n({target:"String",proto:!0,forced:!o("includes")},{includes:function(e){return!!~String(a(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(69);var n=r(61);e.exports=n("Array","includes")},function(e,t,r){"use strict";var n=r(10),i=r(46).includes,a=r(70),o=r(75),s=o("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:!s},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,r){var n=r(57),i=r(71),a=r(27),o=n("unscopables"),s=Array.prototype;void 0==s[o]&&a.f(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,i=r(28),a=r(72),o=r(50),s=r(39),u=r(74),c=r(25),l=r(35),h=">",f="<",d="prototype",p="script",v=l("IE_PROTO"),g=function(){},y=function(e){return f+p+h+e+f+"/"+p+h},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=c("iframe"),r="java"+p+":";return t.style.display="none",u.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(y("document.F=Object")),e.close(),e.F},_=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}_=n?m(n):b();var e=o.length;while(e--)delete _[d][o[e]];return _()};s[v]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(g[d]=i(e),r=new g,g[d]=null,r[v]=e):r=_(),void 0===t?r:a(r,t)}},function(e,t,r){var n=r(13),i=r(27),a=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){a(e);var r,n=o(t),s=n.length,u=0;while(s>u)i.f(e,r=n[u++],t[r]);return e}},function(e,t,r){var n=r(45),i=r(50);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),i=r(14),a=r(23),o=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(a(s,e))return s[e];t||(t={});var r=[][e],c=!!a(t,"ACCESSORS")&&t.ACCESSORS,l=a(t,0)?t[0]:u,h=a(t,1)?t[1]:void 0;return s[e]=!!r&&!i((function(){if(c&&!n)return!0;var e={length:-1};c?o(e,1,{enumerable:!0,get:u}):e[1]=1,r.call(e,l,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){"use strict";var n=r(78).charAt,i=r(33),a=r(79),o="String Iterator",s=i.set,u=i.getterFor(o);a(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=u(this),r=t.string,i=t.index;return i>=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),i=r(20),a=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),c=s.length;return u<0||u>=c?e?"":void 0:(a=s.charCodeAt(u),a<55296||a>56319||u+1===c||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536)}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,r){"use strict";var n=r(10),i=r(80),a=r(82),o=r(87),s=r(85),u=r(26),c=r(29),l=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,g=l("iterator"),y="keys",m="values",b="entries",_=function(){return this};e.exports=function(e,t,r,l,d,w,S){i(r,t,l);var A,k,x,P=function(e){if(e===d&&L)return L;if(!v&&e in R)return R[e];switch(e){case y:return function(){return new r(this,e)};case m:return function(){return new r(this,e)};case b:return function(){return new r(this,e)}}return function(){return new r(this)}},C=t+" Iterator",T=!1,R=e.prototype,E=R[g]||R["@@iterator"]||d&&R[d],L=!v&&E||P(d),O="Array"==t&&R.entries||E;if(O&&(A=a(O.call(new e)),p!==Object.prototype&&A.next&&(h||a(A)===p||(o?o(A,p):"function"!=typeof A[g]&&u(A,g,_)),s(A,C,!0,!0),h&&(f[C]=_))),d==m&&E&&E.name!==m&&(T=!0,L=function(){return E.call(this)}),h&&!S||R[g]===L||u(R,g,L),f[t]=L,d)if(k={values:P(m),keys:w?L:P(y),entries:P(b)},S)for(x in k)(v||T||!(x in R))&&c(R,x,k[x]);else n({target:t,proto:!0,forced:v||T},k);return k}},function(e,t,r){"use strict";var n=r(81).IteratorPrototype,i=r(71),a=r(16),o=r(85),s=r(86),u=function(){return this};e.exports=function(e,t,r){var c=t+" Iterator";return e.prototype=i(n,{next:a(1,r)}),o(e,c,!1,!0),s[c]=u,e}},function(e,t,r){"use strict";var n,i,a,o=r(82),s=r(26),u=r(23),c=r(57),l=r(37),h=c("iterator"),f=!1,d=function(){return this};[].keys&&(a=[].keys(),"next"in a?(i=o(o(a)),i!==Object.prototype&&(n=i)):f=!0),void 0==n&&(n={}),l||u(n,h)||s(n,h,d),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),i=r(83),a=r(35),o=r(84),s=a("IE_PROTO"),u=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,r){var n=r(20);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(14);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,r){var n=r(27).f,i=r(23),a=r(57),o=a("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),i=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(r,[]),t=r instanceof Array}catch(a){}return function(r,a){return n(r),i(a),t?e.call(r,a):r.__proto__=a,r}}():void 0)},function(e,t,r){var n=r(22);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,r){var n=r(10),i=r(90),a=r(97),o=!a((function(e){Array.from(e)}));n({target:"Array",stat:!0,forced:o},{from:i})},function(e,t,r){"use strict";var n=r(62),i=r(83),a=r(91),o=r(92),s=r(47),u=r(93),c=r(94);e.exports=function(e){var t,r,l,h,f,d,p=i(e),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,b=c(p),_=0;if(m&&(y=n(y,g>2?arguments[2]:void 0,2)),void 0==b||v==Array&&o(b))for(t=s(p.length),r=new v(t);t>_;_++)d=m?y(p[_],_):p[_],u(r,_,d);else for(h=b.call(p),f=h.next,r=new v;!(l=f.call(h)).done;_++)d=m?a(h,y,[l.value,_],!0):l.value,u(r,_,d);return r.length=_,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){var a=e["return"];throw void 0!==a&&n(a.call(e)),o}}},function(e,t,r){var n=r(57),i=r(86),a=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},function(e,t,r){"use strict";var n=r(21),i=r(27),a=r(16);e.exports=function(e,t,r){var o=n(t);o in e?i.f(e,o,a(0,r)):e[o]=r}},function(e,t,r){var n=r(95),i=r(86),a=r(57),o=a("iterator");e.exports=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){var n=r(96),i=r(19),a=r(57),o=a("toStringTag"),s="Arguments"==i(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(r){}};e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(t=Object(e),o))?r:s?i(t):"Object"==(n=i(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n=r(57),i=n("toStringTag"),a={};a[i]="z",e.exports="[object z]"===String(a)},function(e,t,r){var n=r(57),i=n("iterator"),a=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){a=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(u){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var n={};n[i]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(u){}return r}},function(e,t,r){r(99);var n=r(43);e.exports=n.Object.assign},function(e,t,r){var n=r(10),i=r(100);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,r){"use strict";var n=r(13),i=r(14),a=r(73),o=r(51),s=r(15),u=r(83),c=r(18),l=Object.assign,h=Object.defineProperty;e.exports=!l||i((function(){if(n&&1!==l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[r]||a(l({},t)).join("")!=i}))?function(e,t){var r=u(e),i=arguments.length,l=1,h=o.f,f=s.f;while(i>l){var d,p=c(arguments[l++]),v=h?a(p).concat(h(p)):a(p),g=v.length,y=0;while(g>y)d=v[y++],n&&!f.call(p,d)||(r[d]=p[d])}return r}:l},function(e,t,r){r(102),r(103);var n=r(43);e.exports=n.Object.fromEntries},function(e,t,r){"use strict";var n=r(17),i=r(70),a=r(86),o=r(33),s=r(79),u="Array Iterator",c=o.set,l=o.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:n(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,r){var n=r(10),i=r(104),a=r(93);n({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,r){a(t,e,r)}),void 0,!0),t}})},function(e,t,r){var n=r(28),i=r(92),a=r(47),o=r(62),s=r(94),u=r(91),c=function(e,t){this.stopped=e,this.result=t},l=e.exports=function(e,t,r,l,h){var f,d,p,v,g,y,m,b=o(t,r,l?2:1);if(h)f=e;else{if(d=s(e),"function"!=typeof d)throw TypeError("Target is not iterable");if(i(d)){for(p=0,v=a(e.length);v>p;p++)if(g=l?b(n(m=e[p])[0],m[1]):b(e[p]),g&&g instanceof c)return g;return new c(!1)}f=d.call(e)}y=f.next;while(!(m=y.call(f)).done)if(g=u(f,b,m.value,l),"object"==typeof g&&g&&g instanceof c)return g;return new c(!1)};l.stop=function(e){return new c(!0,e)}},function(e,t,r){r(106);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),i=Math.log,a=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return i(e)/a}})},function(e,t,r){r(108);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){var n=r(10);n({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(110);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){var n=r(10),i=r(111);n({target:"Number",stat:!0},{isInteger:i})},function(e,t,r){var n=r(22),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){r(113)},function(e,t,r){"use strict";var n=r(114),i=r(116),a=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,u=n.exportTypedArrayMethod,c=[].slice,l=a((function(){new Int8Array(1).slice()}));u("slice",(function(e,t){var r=c.call(o(this),e,t),n=i(this,this.constructor),a=0,u=r.length,l=new(s(n))(u);while(u>a)l[a]=r[a++];return l}),l)},function(e,t,r){"use strict";var n,i=r(115),a=r(13),o=r(11),s=r(22),u=r(23),c=r(95),l=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),v=r(57),g=r(38),y=o.Int8Array,m=y&&y.prototype,b=o.Uint8ClampedArray,_=b&&b.prototype,w=y&&d(y),S=m&&d(m),A=Object.prototype,k=A.isPrototypeOf,x=v("toStringTag"),P=g("TYPED_ARRAY_TAG"),C=i&&!!p&&"Opera"!==c(o.opera),T=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},E=function(e){var t=c(e);return"DataView"===t||u(R,t)},L=function(e){return s(e)&&u(R,c(e))},O=function(e){if(L(e))return e;throw TypeError("Target is not a typed array")},I=function(e){if(p){if(k.call(w,e))return e}else for(var t in R)if(u(R,n)){var r=o[t];if(r&&(e===r||k.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},M=function(e,t,r){if(a){if(r)for(var n in R){var i=o[n];i&&u(i.prototype,e)&&delete i.prototype[e]}S[e]&&!r||h(S,e,r?t:C&&m[e]||t)}},F=function(e,t,r){var n,i;if(a){if(p){if(r)for(n in R)i=o[n],i&&u(i,e)&&delete i[e];if(w[e]&&!r)return;try{return h(w,e,r?t:C&&y[e]||t)}catch(s){}}for(n in R)i=o[n],!i||i[e]&&!r||h(i,e,t)}};for(n in R)o[n]||(C=!1);if((!C||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},C))for(n in R)o[n]&&p(o[n],w);if((!C||!S||S===A)&&(S=w.prototype,C))for(n in R)o[n]&&p(o[n].prototype,S);if(C&&d(_)!==S&&p(_,S),a&&!u(S,x))for(n in T=!0,f(S,x,{get:function(){return s(this)?this[P]:void 0}}),R)o[n]&&l(o[n],P,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:C,TYPED_ARRAY_TAG:T&&P,aTypedArray:O,aTypedArrayConstructor:I,exportTypedArrayMethod:M,exportTypedArrayStaticMethod:F,isView:E,isTypedArray:L,TypedArray:w,TypedArrayPrototype:S}},function(e,t){e.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},function(e,t,r){var n=r(28),i=r(63),a=r(57),o=a("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||void 0==(r=n(a)[o])?t:i(r)}},function(e,t,r){r(118),r(77),r(120),r(122),r(136),r(137);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),i=r(29),a=r(119);n||i(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,r){"use strict";var n=r(96),i=r(95);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,r){var n=r(11),i=r(121),a=r(102),o=r(26),s=r(57),u=s("iterator"),c=s("toStringTag"),l=a.values;for(var h in i){var f=n[h],d=f&&f.prototype;if(d){if(d[u]!==l)try{o(d,u,l)}catch(v){d[u]=l}if(d[c]||o(d,c,h),i[h])for(var p in a)if(d[p]!==a[p])try{o(d,p,a[p])}catch(v){d[p]=a[p]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,r){"use strict";var n,i,a,o,s=r(10),u=r(37),c=r(11),l=r(42),h=r(123),f=r(29),d=r(124),p=r(85),v=r(125),g=r(22),y=r(63),m=r(126),b=r(19),_=r(31),w=r(104),S=r(97),A=r(116),k=r(127).set,x=r(130),P=r(131),C=r(133),T=r(132),R=r(134),E=r(33),L=r(52),O=r(57),I=r(135),M=O("species"),F="Promise",N=E.get,D=E.set,j=E.getterFor(F),U=h,q=c.TypeError,B=c.document,W=c.process,V=l("fetch"),z=T.f,H=z,G="process"==b(W),Y=!!(B&&B.createEvent&&c.dispatchEvent),X="unhandledrejection",Q="rejectionhandled",K=0,J=1,$=2,Z=1,ee=2,te=L(F,(function(){var e=_(U)!==String(U);if(!e){if(66===I)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!U.prototype["finally"])return!0;if(I>=51&&/native code/.test(U))return!1;var t=U.resolve(1),r=function(e){e((function(){}),(function(){}))},n=t.constructor={};return n[M]=r,!(t.then((function(){}))instanceof r)})),re=te||!S((function(e){U.all(e)["catch"]((function(){}))})),ne=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},ie=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){var i=t.value,a=t.state==J,o=0;while(n.length>o){var s,u,c,l=n[o++],h=a?l.ok:l.fail,f=l.resolve,d=l.reject,p=l.domain;try{h?(a||(t.rejection===ee&&ue(e,t),t.rejection=Z),!0===h?s=i:(p&&p.enter(),s=h(i),p&&(p.exit(),c=!0)),s===l.promise?d(q("Promise-chain cycle")):(u=ne(s))?u.call(s,f,d):f(s)):d(i)}catch(v){p&&!c&&p.exit(),d(v)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&oe(e,t)}))}},ae=function(e,t,r){var n,i;Y?(n=B.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},(i=c["on"+e])?i(n):e===X&&C("Unhandled promise rejection",r)},oe=function(e,t){k.call(c,(function(){var r,n=t.value,i=se(t);if(i&&(r=R((function(){G?W.emit("unhandledRejection",n,e):ae(X,e,n)})),t.rejection=G||se(t)?ee:Z,r.error))throw r.value}))},se=function(e){return e.rejection!==Z&&!e.parent},ue=function(e,t){k.call(c,(function(){G?W.emit("rejectionHandled",e):ae(Q,e,t.value)}))},ce=function(e,t,r,n){return function(i){e(t,r,i,n)}},le=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=$,ie(e,t,!0))},he=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw q("Promise can't be resolved itself");var i=ne(r);i?x((function(){var n={done:!1};try{i.call(r,ce(he,e,n,t),ce(le,e,n,t))}catch(a){le(e,n,a,t)}})):(t.value=r,t.state=J,ie(e,t,!1))}catch(a){le(e,{done:!1},a,t)}}};te&&(U=function(e){m(this,U,F),y(e),n.call(this);var t=N(this);try{e(ce(he,this,t),ce(le,this,t))}catch(r){le(this,t,r)}},n=function(e){D(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:K,value:void 0})},n.prototype=d(U.prototype,{then:function(e,t){var r=j(this),n=z(A(this,U));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=G?W.domain:void 0,r.parent=!0,r.reactions.push(n),r.state!=K&&ie(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ce(he,e,t),this.reject=ce(le,e,t)},T.f=z=function(e){return e===U||e===a?new i(e):H(e)},u||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new U((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof V&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return P(U,V.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:te},{Promise:U}),p(U,F,!1,!0),v(F),a=l(F),s({target:F,stat:!0,forced:te},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:F,stat:!0,forced:u||te},{resolve:function(e){return P(u&&this===a?U:this,e)}}),s({target:F,stat:!0,forced:re},{all:function(e){var t=this,r=z(t),n=r.resolve,i=r.reject,a=R((function(){var r=y(t.resolve),a=[],o=0,s=1;w(e,(function(e){var u=o++,c=!1;a.push(void 0),s++,r.call(t,e).then((function(e){c||(c=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise},race:function(e){var t=this,r=z(t),n=r.reject,i=R((function(){var i=y(t.resolve);w(e,(function(e){i.call(t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},function(e,t,r){var n=r(11);e.exports=n.Promise},function(e,t,r){var n=r(29);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(42),i=r(27),a=r(57),o=r(13),s=a("species");e.exports=function(e){var t=n(e),r=i.f;o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){var n,i,a,o=r(11),s=r(14),u=r(19),c=r(62),l=r(74),h=r(25),f=r(128),d=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,y=o.MessageChannel,m=o.Dispatch,b=0,_={},w="onreadystatechange",S=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},A=function(e){return function(){S(e)}},k=function(e){S(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&v||(p=function(e){var t=[],r=1;while(arguments.length>r)t.push(arguments[r++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},v=function(e){delete _[e]},"process"==u(g)?n=function(e){g.nextTick(A(e))}:m&&m.now?n=function(e){m.now(A(e))}:y&&!f?(i=new y,a=i.port2,i.port1.onmessage=k,n=c(a.postMessage,a,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=w in h("script")?function(e){l.appendChild(h("script"))[w]=function(){l.removeChild(this),S(e)}}:function(e){setTimeout(A(e),0)}:(n=x,o.addEventListener("message",k,!1))),e.exports={set:p,clear:v}},function(e,t,r){var n=r(129);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},function(e,t,r){var n=r(42);e.exports=n("navigator","userAgent")||""},function(e,t,r){var n,i,a,o,s,u,c,l,h=r(11),f=r(12).f,d=r(19),p=r(127).set,v=r(128),g=h.MutationObserver||h.WebKitMutationObserver,y=h.process,m=h.Promise,b="process"==d(y),_=f(h,"queueMicrotask"),w=_&&_.value;w||(n=function(){var e,t;b&&(e=y.domain)&&e.exit();while(i){t=i.fn,i=i.next;try{t()}catch(r){throw i?o():a=void 0,r}}a=void 0,e&&e.enter()},b?o=function(){y.nextTick(n)}:g&&!v?(s=!0,u=document.createTextNode(""),new g(n).observe(u,{characterData:!0}),o=function(){u.data=s=!s}):m&&m.resolve?(c=m.resolve(void 0),l=c.then,o=function(){l.call(c,n)}):o=function(){p.call(h,n)}),e.exports=w||function(e){var t={fn:e,next:void 0};a&&(a.next=t),i||(i=t,o()),a=t}},function(e,t,r){var n=r(28),i=r(22),a=r(132);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=a.f(e),o=r.resolve;return o(t),r.promise}},function(e,t,r){"use strict";var n=r(63),i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},function(e,t,r){var n=r(11);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,r){var n,i,a=r(11),o=r(129),s=a.process,u=s&&s.versions,c=u&&u.v8;c?(n=c.split("."),i=n[0]+n[1]):o&&(n=o.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/),n&&(i=n[1]))),e.exports=i&&+i},function(e,t,r){"use strict";var n=r(10),i=r(63),a=r(132),o=r(134),s=r(104);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,c=o((function(){var r=i(t.resolve),a=[],o=0,u=1;s(e,(function(e){var i=o++,s=!1;a.push(void 0),u++,r.call(t,e).then((function(e){s||(s=!0,a[i]={status:"fulfilled",value:e},--u||n(a))}),(function(e){s||(s=!0,a[i]={status:"rejected",reason:e},--u||n(a))}))})),--u||n(a)}));return c.error&&u(c.value),r.promise}})},function(e,t,r){"use strict";var n=r(10),i=r(37),a=r(123),o=r(14),s=r(42),u=r(116),c=r(131),l=r(29),h=!!a&&o((function(){a.prototype["finally"].call({then:function(){}},(function(){}))}));n({target:"Promise",proto:!0,real:!0,forced:h},{finally:function(e){var t=u(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return c(t,e()).then((function(){return r}))}:e,r?function(r){return c(t,e()).then((function(){throw r}))}:e)}}),i||"function"!=typeof a||a.prototype["finally"]||l(a.prototype,"finally",s("Promise").prototype["finally"])},function(e,t,r){r(139),r(144),r(142);var n=r(43);e.exports=n.URL},function(e,t,r){"use strict";r(77);var n,i=r(10),a=r(13),o=r(140),s=r(11),u=r(72),c=r(29),l=r(126),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,v=r(141),g=r(85),y=r(142),m=r(33),b=s.URL,_=y.URLSearchParams,w=y.getState,S=m.set,A=m.getterFor("URL"),k=Math.floor,x=Math.pow,P="Invalid authority",C="Invalid scheme",T="Invalid host",R="Invalid port",E=/[A-Za-z]/,L=/[\d+-.A-Za-z]/,O=/\d/,I=/^(0x|0X)/,M=/^[0-7]+$/,F=/^\d+$/,N=/^[\dA-Fa-f]+$/,D=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,j=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,q=/[\u0009\u000A\u000D]/g,B=function(e,t){var r,n,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return T;if(r=V(t.slice(1,-1)),!r)return T;e.host=r}else if($(e)){if(t=v(t),D.test(t))return T;if(r=W(t),null===r)return T;e.host=r}else{if(j.test(t))return T;for(r="",n=d(t),i=0;i4)return e;for(r=[],n=0;n1&&"0"==i.charAt(0)&&(a=I.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?F:8==a?M:N).test(i))return e;o=parseInt(i,a)}r.push(o)}for(n=0;n=x(256,5-t))return null}else if(o>255)return null;for(s=r.pop(),n=0;n6)return;n=0;while(f()){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!O.test(f()))return;while(O.test(f())){if(a=parseInt(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}u[c]=256*u[c]+i,n++,2!=n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;h++,c++,l=c}}if(null!==l){o=c-l,c=7;while(0!=c&&o>0)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s}else if(8!=c)return;return u},z=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t},H=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=z(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},G={},Y=f({},G,{" ":1,'"':1,"<":1,">":1,"`":1}),X=f({},Y,{"#":1,"?":1,"{":1,"}":1}),Q=f({},X,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),K=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},J={ftp:21,file:null,http:80,https:443,ws:80,wss:443},$=function(e){return h(J,e.scheme)},Z=function(e){return""!=e.username||""!=e.password},ee=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},te=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},re=function(e){var t;return e.length>1&&te(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},ne=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&te(t[0],!0)||t.pop()},ie=function(e){return"."===e||"%2e"===e.toLowerCase()},ae=function(e){return e=e.toLowerCase(),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},oe={},se={},ue={},ce={},le={},he={},fe={},de={},pe={},ve={},ge={},ye={},me={},be={},_e={},we={},Se={},Ae={},ke={},xe={},Pe={},Ce=function(e,t,r,i){var a,o,s,u,c=r||oe,l=0,f="",p=!1,v=!1,g=!1;r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(U,"")),t=t.replace(q,""),a=d(t);while(l<=a.length){switch(o=a[l],c){case oe:if(!o||!E.test(o)){if(r)return C;c=ue;continue}f+=o.toLowerCase(),c=se;break;case se:if(o&&(L.test(o)||"+"==o||"-"==o||"."==o))f+=o.toLowerCase();else{if(":"!=o){if(r)return C;f="",c=ue,l=0;continue}if(r&&($(e)!=h(J,f)||"file"==f&&(Z(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,r)return void($(e)&&J[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?c=be:$(e)&&i&&i.scheme==e.scheme?c=ce:$(e)?c=de:"/"==a[l+1]?(c=le,l++):(e.cannotBeABaseURL=!0,e.path.push(""),c=ke)}break;case ue:if(!i||i.cannotBeABaseURL&&"#"!=o)return C;if(i.cannotBeABaseURL&&"#"==o){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,c=Pe;break}c="file"==i.scheme?be:he;continue;case ce:if("/"!=o||"/"!=a[l+1]){c=he;continue}c=pe,l++;break;case le:if("/"==o){c=ve;break}c=Ae;continue;case he:if(e.scheme=i.scheme,o==n)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==o||"\\"==o&&$(e))c=fe;else if("?"==o)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",c=xe;else{if("#"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),c=Ae;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=Pe}break;case fe:if(!$(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,c=Ae;continue}c=ve}else c=pe;break;case de:if(c=pe,"/"!=o||"/"!=f.charAt(l+1))continue;l++;break;case pe:if("/"!=o&&"\\"!=o){c=ve;continue}break;case ve:if("@"==o){p&&(f="%40"+f),p=!0,s=d(f);for(var y=0;y65535)return R;e.port=$(e)&&_===J[e.scheme]?null:_,f=""}if(r)return;c=Se;continue}return R}f+=o;break;case be:if(e.scheme="file","/"==o||"\\"==o)c=_e;else{if(!i||"file"!=i.scheme){c=Ae;continue}if(o==n)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==o)e.host=i.host,e.path=i.path.slice(),e.query="",c=xe;else{if("#"!=o){re(a.slice(l).join(""))||(e.host=i.host,e.path=i.path.slice(),ne(e)),c=Ae;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=Pe}}break;case _e:if("/"==o||"\\"==o){c=we;break}i&&"file"==i.scheme&&!re(a.slice(l).join(""))&&(te(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),c=Ae;continue;case we:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&te(f))c=Ae;else if(""==f){if(e.host="",r)return;c=Se}else{if(u=B(e,f),u)return u;if("localhost"==e.host&&(e.host=""),r)return;f="",c=Se}continue}f+=o;break;case Se:if($(e)){if(c=Ae,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(c=Ae,"/"!=o))continue}else e.fragment="",c=Pe;else e.query="",c=xe;break;case Ae:if(o==n||"/"==o||"\\"==o&&$(e)||!r&&("?"==o||"#"==o)){if(ae(f)?(ne(e),"/"==o||"\\"==o&&$(e)||e.path.push("")):ie(f)?"/"==o||"\\"==o&&$(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&te(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(o==n||"?"==o||"#"==o))while(e.path.length>1&&""===e.path[0])e.path.shift();"?"==o?(e.query="",c=xe):"#"==o&&(e.fragment="",c=Pe)}else f+=K(o,X);break;case ke:"?"==o?(e.query="",c=xe):"#"==o?(e.fragment="",c=Pe):o!=n&&(e.path[0]+=K(o,G));break;case xe:r||"#"!=o?o!=n&&("'"==o&&$(e)?e.query+="%27":e.query+="#"==o?"%23":K(o,G)):(e.fragment="",c=Pe);break;case Pe:o!=n&&(e.fragment+=K(o,Y));break}l++}},Te=function(e){var t,r,n=l(this,Te,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(e),s=S(n,{type:"URL"});if(void 0!==i)if(i instanceof Te)t=A(i);else if(r=Ce(t={},String(i)),r)throw TypeError(r);if(r=Ce(s,o,null,t),r)throw TypeError(r);var u=s.searchParams=new _,c=w(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},a||(n.href=Ee.call(n),n.origin=Le.call(n),n.protocol=Oe.call(n),n.username=Ie.call(n),n.password=Me.call(n),n.host=Fe.call(n),n.hostname=Ne.call(n),n.port=De.call(n),n.pathname=je.call(n),n.search=Ue.call(n),n.searchParams=qe.call(n),n.hash=Be.call(n))},Re=Te.prototype,Ee=function(){var e=A(this),t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",Z(e)&&(c+=r+(n?":"+n:"")+"@"),c+=H(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Le=function(){var e=A(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(n){return"null"}return"file"!=t&&$(e)?t+"://"+H(e.host)+(null!==r?":"+r:""):"null"},Oe=function(){return A(this).scheme+":"},Ie=function(){return A(this).username},Me=function(){return A(this).password},Fe=function(){var e=A(this),t=e.host,r=e.port;return null===t?"":null===r?H(t):H(t)+":"+r},Ne=function(){var e=A(this).host;return null===e?"":H(e)},De=function(){var e=A(this).port;return null===e?"":String(e)},je=function(){var e=A(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=A(this).query;return e?"?"+e:""},qe=function(){return A(this).searchParams},Be=function(){var e=A(this).fragment;return e?"#"+e:""},We=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&u(Re,{href:We(Ee,(function(e){var t=A(this),r=String(e),n=Ce(t,r);if(n)throw TypeError(n);w(t.searchParams).updateSearchParams(t.query)})),origin:We(Le),protocol:We(Oe,(function(e){var t=A(this);Ce(t,String(e)+":",oe)})),username:We(Ie,(function(e){var t=A(this),r=d(String(e));if(!ee(t)){t.username="";for(var n=0;n=55296&&i<=56319&&r>1,e+=g(e/t);e>v*o>>1;n+=i)e=g(e/v);return g(n+(v+1)*e/(e+s))},w=function(e){var t=[];e=m(e);var r,s,u=e.length,f=l,d=0,v=c;for(r=0;r=f&&sg((n-d)/k))throw RangeError(p);for(d+=(A-f)*k,f=A,r=0;rn)throw RangeError(p);if(s==f){for(var x=d,P=i;;P+=i){var C=P<=v?a:P>=v+o?o:P-v;if(x0?arguments[0]:void 0,l=this,d=[];if(C(l,{type:x,entries:d,updateURL:function(){},updateSearchParams:q}),void 0!==c)if(g(c))if(e=_(c),"function"===typeof e){t=e.call(c),r=t.next;while(!(n=r.call(t)).done){if(i=b(v(n.value)),a=i.next,(o=a.call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:o.value+"",value:s.value+""})}}else for(u in c)f(c,u)&&d.push({key:u,value:c[u]+""});else U(d,"string"===typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},z=V.prototype;s(z,{append:function(e,t){B(arguments.length,2);var r=T(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){B(arguments.length,1);var t=T(this),r=t.entries,n=e+"",i=0;while(ie.key){i.splice(t,0,e);break}t===r&&i.push(e)}n.updateURL()},forEach:function(e){var t,r=T(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),i=0;while(i1&&(t=arguments[1],g(t)&&(r=t.body,p(r)===x&&(n=t.headers?new A(t.headers):new A,n.has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:m(0,String(r)),headers:m(0,n)}))),i.push(t)),S.apply(this,i)}}),e.exports={URLSearchParams:V,getState:T}},function(e,t,r){var n=r(28),i=r(94);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){"use strict";var n=r(10);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){(function(e,r){r(t)})(0,(function(e){"use strict";var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol:function(e){return"Symbol("+e+")"};function r(){}var n=Number.isNaN||function(e){return e!==e},i=r;function a(e){return"object"===typeof e&&null!==e||"function"===typeof e}function o(e){return e.slice()}function s(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function u(e){return!1!==c(e)&&e!==1/0}function c(e){return"number"===typeof e&&(!n(e)&&!(e<0))}function l(e,t,r){if("function"!==typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function h(e,t,r,n){var i=e[t];if(void 0!==i){if("function"!==typeof i)throw new TypeError(i+" is not a method");switch(r){case 0:return function(){return d(i,e,n)};case 1:return function(t){var r=[t].concat(n);return d(i,e,r)}}}return function(){return A(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return l(n,e,r)}function d(e,t,r){try{return A(l(e,t,r))}catch(n){return k(n)}}function p(e){return e}function v(e){return!1}function g(e){if(e=Number(e),n(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e}function y(e){if(void 0===e)return function(){return 1};if("function"!==typeof e)throw new TypeError("size property of a queuing strategy must be a function");return function(t){return e(t)}}var m=Promise,b=Promise.prototype.then,_=Promise.resolve.bind(m),w=Promise.reject.bind(m);function S(e){return new m(e)}function A(e){return _(e)}function k(e){return w(e)}function x(e,t,r){return b.call(e,t,r)}function P(e,t,r){x(x(e,t,r),void 0,i)}function C(e,t){P(e,t)}function T(e,t){P(e,void 0,t)}function R(e,t,r){return x(e,t,r)}function E(e){x(e,void 0,i)}var L=16384,O=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===L-1&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,i=e._elements,a=i[r];return n===L&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,a},e.prototype.forEach=function(e){var t=this._cursor,r=this._front,n=r._elements;while(t!==n.length||void 0!==r._next){if(t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length))break;e(n[t]),++t}},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function I(e,t,r){var n=null;!0===r&&(n=Object.prototype);var i=Object.create(n);return i.value=e,i.done=t,i}function M(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?j(e):"closed"===t._state?q(e):U(e,t._storedError)}function F(e,t){var r=e._ownerReadableStream;return Nr(r,t)}function N(e){"readable"===e._ownerReadableStream._state?B(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):W(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function D(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function j(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function U(e,t){j(e),B(e,t)}function q(e){j(e),V(e)}function B(e,t){E(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function W(e,t){U(e,t)}function V(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var z=t("[[CancelSteps]]"),H=t("[[PullSteps]]");function G(e,t){void 0===t&&(t=!1);var r=new Z(e);return r._forAuthorCode=t,r}function Y(e){var t=S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}));return t}function X(e,t,r){var n=e._reader,i=n._readRequests.shift();i._resolve(I(t,r,n._forAuthorCode))}function Q(e){return e._reader._readRequests.length}function K(e){var t=e._reader;return void 0!==t&&!!ee(t)}var J,$,Z=function(){function e(e){if(!1===Mr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Fr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readRequests=new O}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:k(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?k(D("cancel")):F(this,e):k(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?k(D("read from")):te(this):k(re("read"))},e.prototype.releaseLock=function(){if(!ee(this))throw re("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");N(this)}},e}();function ee(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?A(I(void 0,!0,e._forAuthorCode)):"errored"===t._state?k(t._storedError):t._readableStreamController[H]()}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}"symbol"===typeof t.asyncIterator&&(J={},J[t.asyncIterator]=function(){return this},$=J,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ae(this))return k(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?k(D("iterate")):R(te(e),(function(t){var r=t.done;r&&N(e);var n=t.value;return I(n,r,!0)}))},return:function(e){if(!1===ae(this))return k(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return k(D("finish iterating"));if(t._readRequests.length>0)return k(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=F(t,e);return N(t),R(r,(function(){return I(e,!0,!0)}))}return N(t),A(I(e,!0,!0))}};function ie(e,t){void 0===t&&(t=!1);var r=G(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ae(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorReader")}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}function se(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function ue(e,t,r){if(r=Number(r),!u(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ce(e){var t=e._queue.peek();return t.value}function le(e){e._queue=new O,e._queueTotalSize=0}void 0!==$&&Object.setPrototypeOf(ne,$),Object.defineProperty(ne,"next",{enumerable:!1}),Object.defineProperty(ne,"return",{enumerable:!1});var he=t("[[AbortSteps]]"),fe=t("[[ErrorSteps]]"),de=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),ge(this);var r=t.size,n=t.highWaterMark,i=e.type;if(void 0!==i)throw new RangeError("Invalid type is specified");var a=y(r);void 0===n&&(n=1),n=g(n),Xe(this,e,n,a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ye(this))throw ot("locked");return me(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ye(this)?k(ot("abort")):!0===me(this)?k(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ye(this)?k(ot("close")):!0===me(this)?k(new TypeError("Cannot close a stream that already has a writer")):!0===Re(this)?k(new TypeError("Cannot close an already-closing stream")):_e(this)},e.prototype.getWriter=function(){if(!1===ye(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Fe(e)}function ve(e,t,r,n,i,a){void 0===i&&(i=1),void 0===a&&(a=function(){return 1});var o=Object.create(de.prototype);ge(o);var s=Object.create(He.prototype);return Ye(o,s,e,t,r,n,i,a),o}function ge(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new O,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ye(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function me(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return A(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var i=S((function(r,i){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=i,!1===n&&Ae(e,t),i}function _e(e){var t=e._state;if("closed"===t||"errored"===t)return k(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=S((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&!0===e._backpressure&&"writable"===t&&wt(n),Ke(e._writableStreamController),r}function we(e){var t=S((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}));return t}function Se(e,t){var r=e._state;"writable"!==r?ke(e):Ae(e,t)}function Ae(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Be(n,t),!1===Ee(e)&&!0===r._started&&ke(e)}function ke(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new O,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Ie(e);var n=e._writableStreamController[he](r._reason);P(n,(function(){r._resolve(),Ie(e)}),(function(t){r._reject(t),Ie(e)}))}else Ie(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Pe(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Se(e,t)}function Ce(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&pt(r)}function Te(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Se(e,t)}function Re(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Ee(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Le(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Oe(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Ie(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&ft(t,e._storedError)}function Me(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):wt(r)),e._backpressure=t}var Fe=function(){function e(e){if(!1===ye(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===me(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!1===Re(e)&&!0===e._backpressure?vt(this):yt(this),ct(this);else if("erroring"===t)gt(this,e._storedError),ct(this);else if("closed"===t)yt(this),ht(this);else{var r=e._storedError;gt(this,r),lt(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Ne(this)?k(st("closed")):this._closedPromise},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Ne(this))throw st("desiredSize");if(void 0===this._ownerWritableStream)throw ut("desiredSize");return We(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Ne(this)?k(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Ne(this)?k(st("abort")):void 0===this._ownerWritableStream?k(ut("abort")):De(this,e)},e.prototype.close=function(){if(!1===Ne(this))return k(st("close"));var e=this._ownerWritableStream;return void 0===e?k(ut("close")):!0===Re(e)?k(new TypeError("Cannot close an already-closing stream")):je(this)},e.prototype.releaseLock=function(){if(!1===Ne(this))throw st("releaseLock");var e=this._ownerWritableStream;void 0!==e&&Ve(this)},e.prototype.write=function(e){return!1===Ne(this)?k(st("write")):void 0===this._ownerWritableStream?k(ut("write to")):ze(this,e)},e}();function Ne(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function De(e,t){var r=e._ownerWritableStream;return be(r,t)}function je(e){var t=e._ownerWritableStream;return _e(t)}function Ue(e){var t=e._ownerWritableStream,r=t._state;return!0===Re(t)||"closed"===r?A(void 0):"errored"===r?k(t._storedError):je(e)}function qe(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function Be(e,t){"pending"===e._readyPromiseState?mt(e,t):_t(e,t)}function We(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:$e(t._writableStreamController)}function Ve(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Be(e,r),qe(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function ze(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=Je(n,t);if(r!==e._ownerWritableStream)return k(ut("write to"));var a=r._state;if("errored"===a)return k(r._storedError);if(!0===Re(r)||"closed"===a)return k(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return k(r._storedError);var o=we(r);return Ze(n,t,i),o}var He=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===Ge(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var t=this._controlledWritableStream._state;"writable"===t&&at(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Qe(this),t},e.prototype[fe]=function(){le(this)},e}();function Ge(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Ye(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,le(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var u=it(t);Me(e,u);var c=r(),l=A(c);P(l,(function(){t._started=!0,et(t)}),(function(r){t._started=!0,Se(e,r)}))}function Xe(e,t,r,n){var i=Object.create(He.prototype);function a(){return f(t,"start",[i])}var o=h(t,"write",1,[i]),s=h(t,"close",0,[]),u=h(t,"abort",1,[]);Ye(e,i,a,o,s,u,r,n)}function Qe(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ke(e){ue(e,"close",0),et(e)}function Je(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return tt(e,r),1}}function $e(e){return e._strategyHWM-e._queueTotalSize}function Ze(e,t,r){var n={chunk:t};try{ue(e,n,r)}catch(o){return void tt(e,o)}var i=e._controlledWritableStream;if(!1===Re(i)&&"writable"===i._state){var a=it(e);Me(i,a)}et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("erroring"!==r){if(0!==e._queue.length){var n=ce(e);"close"===n?rt(e):nt(e,n.chunk)}}else ke(t)}}function tt(e,t){"writable"===e._controlledWritableStream._state&&at(e,t)}function rt(e){var t=e._controlledWritableStream;Le(t),se(e);var r=e._closeAlgorithm();Qe(e),P(r,(function(){Ce(t)}),(function(e){Te(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Oe(r);var n=e._writeAlgorithm(t);P(n,(function(){xe(r);var t=r._state;if(se(e),!1===Re(r)&&"writable"===t){var n=it(e);Me(r,n)}et(e)}),(function(t){"writable"===r._state&&Qe(e),Pe(r,t)}))}function it(e){var t=$e(e);return t<=0}function at(e,t){var r=e._controlledWritableStream;Qe(e),Ae(r,t)}function ot(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function st(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function ut(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function ct(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function lt(e,t){ct(e),ft(e,t)}function ht(e){ct(e),pt(e)}function ft(e,t){E(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){lt(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function vt(e){e._readyPromise=S((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function gt(e,t){vt(e),mt(e,t)}function yt(e){vt(e),wt(e)}function mt(e,t){E(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){vt(e)}function _t(e,t){gt(e,t)}function wt(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function St(e){if("object"!==typeof e||null===e)return!1;try{return"boolean"===typeof e.aborted}catch(J){return!1}}var At="undefined"!==typeof DOMException?DOMException:void 0;function kt(e){if("function"!==typeof e&&"object"!==typeof e)return!1;try{return new e,!0}catch(J){return!1}}function xt(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var Pt=kt(At)?At:xt();function Ct(e,t,n,i,a,o){var s=G(e),u=pe(t);e._disturbed=!0;var c=!1,l=A(void 0);return S((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Pt("Aborted","AbortError"),n=[];!1===i&&n.push((function(){return"writable"===t._state?be(t,r):A(void 0)})),!1===a&&n.push((function(){return"readable"===e._state?Nr(e,r):A(void 0)})),_((function(){return Promise.all(n.map((function(e){return e()})))}),!0,r)},!0===o.aborted)return void d();o.addEventListener("abort",d)}function p(){return S((function(e,t){function r(n){n?e():x(v(),r,t)}r(!1)}))}function v(){return!0===c?A(!0):x(u._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(l=x(ze(u,e.value),void 0,r),!1)}))}))}if(m(e,s._closedPromise,(function(e){!1===i?_((function(){return be(t,e)}),!0,e):w(!0,e)})),m(t,u._closedPromise,(function(t){!1===a?_((function(){return Nr(e,t)}),!0,t):w(!0,t)})),b(e,s._closedPromise,(function(){!1===n?_((function(){return Ue(u)})):w()})),!0===Re(t)||"closed"===t._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");!1===a?_((function(){return Nr(e,g)}),!0,g):w(!0,g)}function y(){var e=l;return x(l,(function(){return e!==l?y():void 0}))}function m(e,t,r){"errored"===e._state?r(e._storedError):T(t,r)}function b(e,t,r){"closed"===e._state?r():C(t,r)}function _(e,r,n){function i(){P(e(),(function(){return k(r,n)}),(function(e){return k(!0,e)}))}!0!==c&&(c=!0,"writable"===t._state&&!1===Re(t)?C(y(),i):i())}function w(e,r){!0!==c&&(c=!0,"writable"===t._state&&!1===Re(t)?C(y(),(function(){return k(e,r)})):k(e,r))}function k(e,t){Ve(u),N(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}E(p())}))}var Tt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Rt(this))throw Bt("desiredSize");return Nt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Rt(this))throw Bt("close");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits close");It(this)},e.prototype.enqueue=function(e){if(!1===Rt(this))throw Bt("enqueue");if(!1===jt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Mt(this,e)},e.prototype.error=function(e){if(!1===Rt(this))throw Bt("error");Ft(this,e)},e.prototype[z]=function(e){le(this);var t=this._cancelAlgorithm(e);return Ot(this),t},e.prototype[H]=function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=se(this);return!0===this._closeRequested&&0===this._queue.length?(Ot(this),Dr(e)):Et(this),A(I(t,!1,e._reader._forAuthorCode))}var r=Y(e);return Et(this),r},e}();function Rt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Et(e){var t=Lt(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();P(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Et(e))}),(function(t){Ft(e,t)}))}else e._pullAgain=!0}function Lt(e){var t=e._controlledReadableStream;if(!1===jt(e))return!1;if(!1===e._started)return!1;if(!0===Fr(t)&&Q(t)>0)return!0;var r=Nt(e);return r>0}function Ot(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function It(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Ot(e),Dr(t))}function Mt(e,t){var r=e._controlledReadableStream;if(!0===Fr(r)&&Q(r)>0)X(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(i){throw Ft(e,i),i}try{ue(e,t,n)}catch(a){throw Ft(e,a),a}}Et(e)}function Ft(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(le(e),Ot(e),jr(r,t))}function Nt(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function Dt(e){return!0!==Lt(e)}function jt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function Ut(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,le(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();P(A(s),(function(){t._started=!0,Et(t)}),(function(e){Ft(t,e)}))}function qt(e,t,r,n){var i=Object.create(Tt.prototype);function a(){return f(t,"start",[i])}var o=h(t,"pull",0,[i]),s=h(t,"cancel",1,[]);Ut(e,i,a,o,s,r,n)}function Bt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Wt(e,t){var r,n,i,a,s,u=G(e),c=!1,l=!1,h=!1,f=S((function(e){s=e}));function d(){if(!0===c)return A(void 0);c=!0;var e=R(te(u),(function(e){c=!1;var t=e.done;if(!0===t)return!1===l&&It(i._readableStreamController),void(!1===h&&It(a._readableStreamController));var r=e.value,n=r,o=r;!1===l&&Mt(i._readableStreamController,n),!1===h&&Mt(a._readableStreamController,o)}));return E(e),A(void 0)}function p(t){if(l=!0,r=t,!0===h){var i=o([r,n]),a=Nr(e,i);s(a)}return f}function v(t){if(h=!0,n=t,!0===l){var i=o([r,n]),a=Nr(e,i);s(a)}return f}function g(){}return i=Or(g,d,p),a=Or(g,d,v),T(u._closedPromise,(function(e){Ft(i._readableStreamController,e),Ft(a._readableStreamController,e)})),[i,a]}var Vt=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},zt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Yt(this))throw _r("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Yt(this))throw _r("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");v(this._view.buffer),vr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Yt(this))throw _r("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");v(e.buffer),gr(this._associatedReadableByteStreamController,e)},e}(),Ht=function(){function e(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!1===Gt(this))throw wr("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek(),t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(zt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Gt(this))throw wr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Gt(this))throw wr("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");hr(this)},e.prototype.enqueue=function(e){if(!1===Gt(this))throw wr("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");v(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Gt(this))throw wr("error");dr(this,e)},e.prototype[z]=function(e){if(this._pendingPullIntos.length>0){var t=this._pendingPullIntos.peek();t.bytesFilled=0}le(this);var r=this._cancelAlgorithm(e);return lr(this),r},e.prototype[H]=function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,tr(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(s){return k(s)}return A(I(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(u){return k(u)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=Y(e);return Xt(this),o},e}();function Gt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Yt(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Xt(e){var t=cr(e);if(!1!==t)if(!0!==e._pulling){e._pulling=!0;var r=e._pullAlgorithm();P(r,(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Xt(e))}),(function(t){dr(e,t)}))}else e._pullAgain=!0}function Qt(e){rr(e),e._pendingPullIntos=new O}function Kt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Jt(t);"default"===t.readerType?X(e,n,r):kr(e,n,r)}function Jt(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function $t(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Zt(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,u=i,c=!1;o>n&&(u=o-t.bytesFilled,c=!0);var l=e._queue;while(u>0){var h=l.peek(),f=Math.min(u,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?l.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),u-=f}return c}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(lr(e),Dr(e._controlledReadableByteStream)):Xt(e)}function rr(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function nr(e){while(e._pendingPullIntos.length>0){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===Zt(e,t)&&(ur(e),Kt(e._controlledReadableByteStream,t))}}function ir(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a=p(t.buffer),o={buffer:a,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(o),Ar(r);if("closed"===r._state){var s=new i(o.buffer,o.byteOffset,0);return A(I(s,!0,r._reader._forAuthorCode))}if(e._queueTotalSize>0){if(!0===Zt(e,o)){var u=Jt(o);return tr(e),A(I(u,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,c),k(c)}}e._pendingPullIntos.push(o);var l=Ar(r);return Xt(e),l}function ar(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Pr(r))while(xr(r)>0){var n=ur(e);Kt(r,n)}}function or(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(er(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);$t(e,a,0,a.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Kt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek(),n=e._controlledReadableByteStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ar(e,r)}else or(e,t,r);Xt(e)}function ur(e){var t=e._pendingPullIntos.shift();return rr(e),t}function cr(e){var t=e._controlledReadableByteStream;if("readable"!==t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===K(t)&&Q(t)>0)return!0;if(!0===Pr(t)&&xr(t)>0)return!0;var r=pr(e);return r>0}function lr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function hr(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,n),n}}lr(e),Dr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=p(n);if(!0===K(r))if(0===Q(r))$t(e,o,i,a);else{var s=new Uint8Array(o,i,a);X(r,s,!1)}else!0===Pr(r)?($t(e,o,i,a),nr(e)):$t(e,o,i,a);Xt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Qt(e),le(e),lr(e),jr(r,t))}function pr(e){var t=e._controlledReadableByteStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function vr(e,t){if(t=Number(t),!1===u(t))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function gr(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,sr(e,t.byteLength)}function yr(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,le(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=g(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new O,e._readableStreamController=t;var s=r();P(A(s),(function(){t._started=!0,Xt(t)}),(function(e){dr(t,e)}))}function mr(e,t,r){var n=Object.create(Ht.prototype);function i(){return f(t,"start",[n])}var a=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Vt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");yr(e,n,i,a,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function _r(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function wr(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Sr(e,t){void 0===t&&(t=!1);var r=new Cr(e);return r._forAuthorCode=t,r}function Ar(e){var t=S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}));return t}function kr(e,t,r){var n=e._reader,i=n._readIntoRequests.shift();i._resolve(I(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Pr(e){var t=e._reader;return void 0!==t&&!!Tr(t)}var Cr=function(){function e(e){if(!Mr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Gt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Fr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,e),this._readIntoRequests=new O}return Object.defineProperty(e.prototype,"closed",{get:function(){return Tr(this)?this._closedPromise:k(Er("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Tr(this)?void 0===this._ownerReadableStream?k(D("cancel")):F(this,e):k(Er("cancel"))},e.prototype.read=function(e){return Tr(this)?void 0===this._ownerReadableStream?k(D("read from")):ArrayBuffer.isView(e)?(v(e.buffer),0===e.byteLength?k(new TypeError("view must have non-zero byteLength")):Rr(this,e)):k(new TypeError("view must be an array buffer view")):k(Er("read"))},e.prototype.releaseLock=function(){if(!Tr(this))throw Er("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");N(this)}},e}();function Tr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Rr(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?k(r._storedError):ir(r._readableStreamController,t)}function Er(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Lr=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Ir(this);var r=t.size,n=t.highWaterMark,i=e.type,a=String(i);if("bytes"===a){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),n=g(n),mr(this,e,n)}else{if(void 0!==i)throw new RangeError("Invalid type is specified");var o=y(r);void 0===n&&(n=1),n=g(n),qt(this,e,n,o)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Mr(this))throw Ur("locked");return Fr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Mr(this)?k(Ur("cancel")):!0===Fr(this)?k(new TypeError("Cannot cancel a stream that already has a reader")):Nr(this,e)},e.prototype.getReader=function(e){var t=(void 0===e?{}:e).mode;if(!1===Mr(this))throw Ur("getReader");if(void 0===t)return G(this,!0);if(t=String(t),"byob"===t)return Sr(this,!0);throw new RangeError("Invalid mode is specified")},e.prototype.pipeThrough=function(e,t){var r=e.writable,n=e.readable,i=void 0===t?{}:t,a=i.preventClose,o=i.preventAbort,s=i.preventCancel,u=i.signal;if(!1===Mr(this))throw Ur("pipeThrough");if(!1===ye(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Mr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(a=Boolean(a),o=Boolean(o),s=Boolean(s),void 0!==u&&!St(u))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Fr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===me(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var c=Ct(this,r,a,o,s,u);return E(c),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,i=r.preventAbort,a=r.preventCancel,o=r.signal;return!1===Mr(this)?k(Ur("pipeTo")):!1===ye(e)?k(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),i=Boolean(i),a=Boolean(a),void 0===o||St(o)?!0===Fr(this)?k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===me(e)?k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Ct(this,e,n,i,a,o):k(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Mr(this))throw Ur("tee");var e=Wt(this);return o(e)},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Mr(this))throw Ur("getIterator");return ie(this,r)},e}();function Or(e,t,r,n,i){void 0===n&&(n=1),void 0===i&&(i=function(){return 1});var a=Object.create(Lr.prototype);Ir(a);var o=Object.create(Tt.prototype);return Ut(a,o,e,t,r,n,i),a}function Ir(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Mr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Fr(e){return void 0!==e._reader}function Nr(e,t){if(e._disturbed=!0,"closed"===e._state)return A(void 0);if("errored"===e._state)return k(e._storedError);Dr(e);var n=e._readableStreamController[z](t);return R(n,r)}function Dr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(I(void 0,!0,t._forAuthorCode))})),t._readRequests=new O),V(t))}function jr(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(ee(r)?(r._readRequests.forEach((function(e){e._reject(t)})),r._readRequests=new O):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new O),B(r,t))}function Ur(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"===typeof t.asyncIterator&&Object.defineProperty(Lr.prototype,t.asyncIterator,{value:Lr.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),Br=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),Wr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,i=t.highWaterMark,a=r.size,o=r.highWaterMark,s=e.writableType;if(void 0!==s)throw new RangeError("Invalid writable type specified");var u=y(n);void 0===i&&(i=1),i=g(i);var c=e.readableType;if(void 0!==c)throw new RangeError("Invalid readable type specified");var l,h=y(a);void 0===o&&(o=0),o=g(o);var d=S((function(e){l=e}));Vr(this,d,i,u,o,h),Jr(this,e);var p=f(e,"start",[this._transformStreamController]);l(p)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===zr(this))throw cn("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===zr(this))throw cn("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Vr(e,t,r,n,i,a){function o(){return t}function s(t){return nn(e,t)}function u(t){return an(e,t)}function c(){return on(e)}function l(){return sn(e)}function h(t){return Gr(e,t),A(void 0)}e._writable=ve(o,s,c,u,r,n),e._readable=Or(o,l,h,i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Yr(e,!0),e._transformStreamController=void 0}function zr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Hr(e,t){Ft(e._readable._readableStreamController,t),Gr(e,t)}function Gr(e,t){$r(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Yr(e,!1)}function Yr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=S((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Xr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Qr(this))throw un("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return Nt(e)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Qr(this))throw un("enqueue");Zr(this,e)},e.prototype.error=function(e){if(!1===Qr(this))throw un("error");en(this,e)},e.prototype.terminate=function(){if(!1===Qr(this))throw un("terminate");rn(this)},e}();function Qr(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Kr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Jr(e,t){var r=Object.create(Xr.prototype),n=function(e){try{return Zr(r,e),A(void 0)}catch(t){return k(t)}},i=t.transform;if(void 0!==i){if("function"!==typeof i)throw new TypeError("transform is not a method");n=function(e){return d(i,t,[e,r])}}var a=h(t,"flush",0,[r]);Kr(e,r,n,a)}function $r(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Zr(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===jt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Mt(n,t)}catch(a){throw Gr(r,a),r._readable._storedError}var i=Dt(n);i!==r._backpressure&&Yr(r,!0)}function en(e,t){Hr(e._controlledTransformStream,t)}function tn(e,t){var r=e._transformAlgorithm(t);return R(r,void 0,(function(t){throw Hr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===jt(r)&&It(r);var n=new TypeError("TransformStream terminated");Gr(t,n)}function nn(e,t){var r=e._transformStreamController;if(!0===e._backpressure){var n=e._backpressureChangePromise;return R(n,(function(){var n=e._writable,i=n._state;if("erroring"===i)throw n._storedError;return tn(r,t)}))}return tn(r,t)}function an(e,t){return Hr(e,t),A(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return $r(r),R(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===jt(e)&&It(e)}),(function(r){throw Hr(e,r),t._storedError}))}function sn(e){return Yr(e,!1),e._backpressureChangePromise}function un(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function cn(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=qr,e.CountQueuingStrategy=Br,e.ReadableStream=Lr,e.TransformStream=Wr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}))},function(e,t,r){r(147),r(118),r(77),r(120);var n=r(43);e.exports=n.Map},function(e,t,r){"use strict";var n=r(148),i=r(152);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){"use strict";var n=r(10),i=r(11),a=r(52),o=r(29),s=r(149),u=r(104),c=r(126),l=r(22),h=r(14),f=r(97),d=r(85),p=r(151);e.exports=function(e,t,r){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),y=v?"set":"add",m=i[e],b=m&&m.prototype,_=m,w={},S=function(e){var t=b[e];o(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(a(e,"function"!=typeof m||!(g||b.forEach&&!h((function(){(new m).entries().next()})))))_=r.getConstructor(t,e,v,y),s.REQUIRED=!0;else if(a(e,!0)){var A=new _,k=A[y](g?{}:-0,1)!=A,x=h((function(){A.has(1)})),P=f((function(e){new m(e)})),C=!g&&h((function(){var e=new m,t=5;while(t--)e[y](t,t);return!e.has(-0)}));P||(_=t((function(t,r){c(t,_,e);var n=p(new m,t,_);return void 0!=r&&u(r,n[y],n,v),n})),_.prototype=b,b.constructor=_),(x||C)&&(S("delete"),S("has"),v&&S("get")),(C||k)&&S(y),g&&b.clear&&delete b.clear}return w[e]=_,n({global:!0,forced:_!=m},w),d(_,e),g||r.setStrong(_,e,v),_}},function(e,t,r){var n=r(39),i=r(22),a=r(23),o=r(27).f,s=r(38),u=r(150),c=s("meta"),l=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,c,{value:{objectID:"O"+ ++l,weakData:{}}})},d=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,c)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[c].objectID},p=function(e,t){if(!a(e,c)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[c].weakData},v=function(e){return u&&g.REQUIRED&&h(e)&&!a(e,c)&&f(e),e},g=e.exports={REQUIRED:!1,fastKey:d,getWeakData:p,onFreeze:v};n[c]=!0},function(e,t,r){var n=r(14);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,r){var n=r(22),i=r(87);e.exports=function(e,t,r){var a,o;return i&&"function"==typeof(a=t.constructor)&&a!==r&&n(o=a.prototype)&&o!==r.prototype&&i(e,o),e}},function(e,t,r){"use strict";var n=r(27).f,i=r(71),a=r(124),o=r(62),s=r(126),u=r(104),c=r(79),l=r(125),h=r(13),f=r(149).fastKey,d=r(33),p=d.set,v=d.getterFor;e.exports={getConstructor:function(e,t,r,c){var l=e((function(e,n){s(e,l,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),h||(e.size=0),void 0!=n&&u(n,e[c],e,r)})),d=v(t),g=function(e,t,r){var n,i,a=d(e),o=y(e,t);return o?o.value=r:(a.last=o={index:i=f(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=o),n&&(n.next=o),h?a.size++:e.size++,"F"!==i&&(a.index[i]=o)),e},y=function(e,t){var r,n=d(e),i=f(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return a(l.prototype,{clear:function(){var e=this,t=d(e),r=t.index,n=t.first;while(n)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete r[n.index],n=n.next;t.first=t.last=void 0,h?t.size=0:e.size=0},delete:function(e){var t=this,r=d(t),n=y(t,e);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),h?r.size--:t.size--}return!!n},forEach:function(e){var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);while(t=t?t.next:r.first){n(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!y(this,e)}}),a(l.prototype,r?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),h&&n(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(e,t,r){var n=t+" Iterator",i=v(t),a=v(n);c(e,t,(function(e,t){p(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){var e=a(this),t=e.kind,r=e.last;while(r&&r.removed)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(t)}}},function(e,t,r){r(154),r(118),r(77),r(120);var n=r(43);e.exports=n.Set},function(e,t,r){"use strict";var n=r(148),i=r(152);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(118),r(156),r(120);var n=r(43);e.exports=n.WeakMap},function(e,t,r){"use strict";var n,i=r(11),a=r(124),o=r(149),s=r(148),u=r(157),c=r(22),l=r(33).enforce,h=r(34),f=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=e.exports=s("WeakMap",p,u);if(h&&f){n=u.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var g=v.prototype,y=g["delete"],m=g.has,b=g.get,_=g.set;a(g,{delete:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen["delete"](e)}return y.call(this,e)},has:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new n),m.call(this,e)||t.frozen.has(e)}return m.call(this,e)},get:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new n),m.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!d(e)){var r=l(this);r.frozen||(r.frozen=new n),m.call(this,e)?_.call(this,e,t):r.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,r){"use strict";var n=r(124),i=r(149).getWeakData,a=r(28),o=r(22),s=r(126),u=r(104),c=r(158),l=r(23),h=r(33),f=h.set,d=h.getterFor,p=c.find,v=c.findIndex,g=0,y=function(e){return e.frozen||(e.frozen=new m)},m=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};m.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var r=b(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,c){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:g++,frozen:void 0}),void 0!=n&&u(n,e[c],e,r)})),p=d(t),v=function(e,t,r){var n=p(e),o=i(a(t),!0);return!0===o?y(n).set(t,r):o[n.id]=r,e};return n(h.prototype,{delete:function(e){var t=p(this);if(!o(e))return!1;var r=i(e);return!0===r?y(t)["delete"](e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=i(e);return!0===r?y(t).has(e):r&&l(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=i(e);return!0===r?y(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),i=r(18),a=r(83),o=r(47),s=r(159),u=[].push,c=function(e){var t=1==e,r=2==e,c=3==e,l=4==e,h=6==e,f=5==e||h;return function(d,p,v,g){for(var y,m,b=a(d),_=i(b),w=n(p,v,3),S=o(_.length),A=0,k=g||s,x=t?k(d,S):r?k(d,0):void 0;S>A;A++)if((f||A in _)&&(y=_[A],m=w(y,A,b),e))if(t)x[A]=m;else if(m)switch(e){case 3:return!0;case 5:return y;case 6:return A;case 2:u.call(x,y)}else if(l)return!1;return h?-1:c||l?l:x}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,r){var n=r(22),i=r(160),a=r(57),o=a("species");e.exports=function(e,t){var r;return i(e)&&(r=e.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)?n(r)&&(r=r[o],null===r&&(r=void 0)):r=void 0),new(void 0===r?Array:r)(0===t?0:t)}},function(e,t,r){var n=r(19);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){r(118),r(162),r(120);var n=r(43);e.exports=n.WeakSet},function(e,t,r){"use strict";var n=r(148),i=r(157);n("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(164);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){"use strict";var n=r(10),i=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,r){r(166);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),i=r(49),a=String.fromCharCode,o=String.fromCodePoint,s=!!o&&1!=o.length;n({target:"String",stat:!0,forced:s},{fromCodePoint:function(e){var t,r=[],n=arguments.length,o=0;while(n>o){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(168),r(118),r(170),r(174),r(175),r(176),r(177),r(178),r(179),r(180),r(181),r(182),r(183),r(184),r(185),r(186),r(187),r(188),r(189);var n=r(43);e.exports=n.Symbol},function(e,t,r){"use strict";var n=r(10),i=r(14),a=r(160),o=r(22),s=r(83),u=r(47),c=r(93),l=r(159),h=r(169),f=r(57),d=r(135),p=f("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:a(e)},_=!y||!m;n({target:"Array",proto:!0,forced:_},{concat:function(e){var t,r,n,i,a,o=s(this),h=l(o,0),f=0;for(t=-1,n=arguments.length;tv)throw TypeError(g);for(r=0;r=v)throw TypeError(g);c(h,f++,a)}return h.length=f,h}})},function(e,t,r){var n=r(14),i=r(57),a=r(135),o=i("species");e.exports=function(e){return a>=51||!n((function(){var t=[],r=t.constructor={};return r[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){"use strict";var n=r(10),i=r(11),a=r(42),o=r(37),s=r(13),u=r(58),c=r(59),l=r(14),h=r(23),f=r(160),d=r(22),p=r(28),v=r(83),g=r(17),y=r(21),m=r(16),b=r(71),_=r(73),w=r(44),S=r(171),A=r(51),k=r(12),x=r(27),P=r(15),C=r(26),T=r(29),R=r(36),E=r(35),L=r(39),O=r(38),I=r(57),M=r(172),F=r(173),N=r(85),D=r(33),j=r(158).forEach,U=E("hidden"),q="Symbol",B="prototype",W=I("toPrimitive"),V=D.set,z=D.getterFor(q),H=Object[B],G=i.Symbol,Y=a("JSON","stringify"),X=k.f,Q=x.f,K=S.f,J=P.f,$=R("symbols"),Z=R("op-symbols"),ee=R("string-to-symbol-registry"),te=R("symbol-to-string-registry"),re=R("wks"),ne=i.QObject,ie=!ne||!ne[B]||!ne[B].findChild,ae=s&&l((function(){return 7!=b(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=X(H,t);n&&delete H[t],Q(e,t,r),n&&e!==H&&Q(H,t,n)}:Q,oe=function(e,t){var r=$[e]=b(G[B]);return V(r,{type:q,tag:e,description:t}),s||(r.description=t),r},se=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof G},ue=function(e,t,r){e===H&&ue(Z,t,r),p(e);var n=y(t,!0);return p(r),h($,n)?(r.enumerable?(h(e,U)&&e[U][n]&&(e[U][n]=!1),r=b(r,{enumerable:m(0,!1)})):(h(e,U)||Q(e,U,m(1,{})),e[U][n]=!0),ae(e,n,r)):Q(e,n,r)},ce=function(e,t){p(e);var r=g(t),n=_(r).concat(pe(r));return j(n,(function(t){s&&!he.call(r,t)||ue(e,t,r[t])})),e},le=function(e,t){return void 0===t?b(e):ce(b(e),t)},he=function(e){var t=y(e,!0),r=J.call(this,t);return!(this===H&&h($,t)&&!h(Z,t))&&(!(r||!h(this,t)||!h($,t)||h(this,U)&&this[U][t])||r)},fe=function(e,t){var r=g(e),n=y(t,!0);if(r!==H||!h($,n)||h(Z,n)){var i=X(r,n);return!i||!h($,n)||h(r,U)&&r[U][n]||(i.enumerable=!0),i}},de=function(e){var t=K(g(e)),r=[];return j(t,(function(e){h($,e)||h(L,e)||r.push(e)})),r},pe=function(e){var t=e===H,r=K(t?Z:g(e)),n=[];return j(r,(function(e){!h($,e)||t&&!h(H,e)||n.push($[e])})),n};if(u||(G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=O(e),r=function(e){this===H&&r.call(Z,e),h(this,U)&&h(this[U],t)&&(this[U][t]=!1),ae(this,t,m(1,e))};return s&&ie&&ae(H,t,{configurable:!0,set:r}),oe(t,e)},T(G[B],"toString",(function(){return z(this).tag})),T(G,"withoutSetter",(function(e){return oe(O(e),e)})),P.f=he,x.f=ue,k.f=fe,w.f=S.f=de,A.f=pe,M.f=function(e){return oe(I(e),e)},s&&(Q(G[B],"description",{configurable:!0,get:function(){return z(this).description}}),o||T(H,"propertyIsEnumerable",he,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),j(_(re),(function(e){F(e)})),n({target:q,stat:!0,forced:!u},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=G(t);return ee[t]=r,te[r]=t,r},keyFor:function(e){if(!se(e))throw TypeError(e+" is not a symbol");if(h(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!s},{create:le,defineProperty:ue,defineProperties:ce,getOwnPropertyDescriptor:fe}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:de,getOwnPropertySymbols:pe}),n({target:"Object",stat:!0,forced:l((function(){A.f(1)}))},{getOwnPropertySymbols:function(e){return A.f(v(e))}}),Y){var ve=!u||l((function(){var e=G();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}));n({target:"JSON",stat:!0,forced:ve},{stringify:function(e,t,r){var n,i=[e],a=1;while(arguments.length>a)i.push(arguments[a++]);if(n=t,(d(t)||void 0!==e)&&!se(e))return f(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!se(t))return t}),i[1]=t,Y.apply(null,i)}})}G[B][W]||C(G[B],W,G[B].valueOf),N(G,q),L[U]=!0},function(e,t,r){var n=r(17),i=r(44).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),i=r(23),a=r(172),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},function(e,t,r){var n=r(173);n("asyncIterator")},function(e,t,r){"use strict";var n=r(10),i=r(13),a=r(11),o=r(23),s=r(22),u=r(27).f,c=r(40),l=a.Symbol;if(i&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new l(e):void 0===e?l():l(e);return""===e&&(h[t]=!0),t};c(f,l);var d=f.prototype=l.prototype;d.constructor=f;var p=d.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=v?t.slice(7,-1):t.replace(g,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){var n=r(173);n("hasInstance")},function(e,t,r){var n=r(173);n("isConcatSpreadable")},function(e,t,r){var n=r(173);n("iterator")},function(e,t,r){var n=r(173);n("match")},function(e,t,r){var n=r(173);n("matchAll")},function(e,t,r){var n=r(173);n("replace")},function(e,t,r){var n=r(173);n("search")},function(e,t,r){var n=r(173);n("species")},function(e,t,r){var n=r(173);n("split")},function(e,t,r){var n=r(173);n("toPrimitive")},function(e,t,r){var n=r(173);n("toStringTag")},function(e,t,r){var n=r(173);n("unscopables")},function(e,t,r){var n=r(85);n(Math,"Math",!0)},function(e,t,r){var n=r(11),i=r(85);i(n.JSON,"JSON",!0)},function(e,t,r){r(191);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){"use strict";var n=r(10),i=r(192).start,a=r(194);n({target:"String",proto:!0,forced:a},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),i=r(193),a=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var u,c,l=String(a(t)),h=l.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?l:(u=d-h,c=i.call(f,o(u/f.length)),c.length>u&&(c=c.slice(0,u)),e?l+c:c+l)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){"use strict";var n=r(48),i=r(20);e.exports="".repeat||function(e){var t=String(i(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t,r){var n=r(129);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(196);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){"use strict";var n=r(10),i=r(192).end,a=r(194);n({target:"String",proto:!0,forced:a},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(198);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),i=r(199).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,r){var n=r(13),i=r(73),a=r(17),o=r(15).f,s=function(e){return function(t){var r,s=a(t),u=i(s),c=u.length,l=0,h=[];while(c>l)r=u[l++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}};e.exports={entries:s(!0),values:s(!1)}},function(e,t,r){r(201);var n=r(43);e.exports=n.Object.entries},function(e,t,r){var n=r(10),i=r(199).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},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 _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(203),_node_utils=__w_pdfjs_require__(204),_annotation_storage=__w_pdfjs_require__(205),_api_compatibility=__w_pdfjs_require__(206),_canvas=__w_pdfjs_require__(207),_worker_options=__w_pdfjs_require__(209),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(210),_metadata=__w_pdfjs_require__(211),_optional_content_config=__w_pdfjs_require__(213),_transport_stream=__w_pdfjs_require__(214),_webgl=__w_pdfjs_require__(215);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)}))}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;){var i=r.value;i(e,t)}}catch(a){n.e(a)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,i=_createForOfIteratorHelper(r._progressListeners);try{for(i.s();!(n=i.n()).done;){var a=n.value;a(e,t)}}catch(o){i.e(o)}finally{i.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;){var i=r.value;i(e)}}catch(a){n.e(a)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;){var n=t.value;n()}}catch(i){r.e(i)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){_classCallCheck(this,e),this._pdfInfo=t,this._transport=r}return _createClass(e,[{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){return this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"saveDocument",value:function(e){return this._transport.saveDocument(e)}},{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=i,this._transport=n,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}return _createClass(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,i=e.offsetX,a=void 0===i?0:i,o=e.offsetY,s=void 0===o?0:o,u=e.dontFlip,c=void 0!==u&&u;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:a,offsetY:s,dontFlip:c})}},{key:"getAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,r=void 0===t?null:t;return this.annotationsPromise&&this.annotationsIntent===r||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,r),this.annotationsIntent=r),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,i=e.intent,a=void 0===i?"display":i,o=e.enableWebGL,s=void 0!==o&&o,u=e.renderInteractiveForms,c=void 0!==u&&u,l=e.transform,h=void 0===l?null:l,f=e.imageLayer,d=void 0===f?null:f,p=e.canvasFactory,v=void 0===p?null:p,g=e.background,y=void 0===g?null:g,m=e.annotationStorage,b=void 0===m?null:m,_=e.optionalContentConfigPromise,w=void 0===_?null:_;this._stats&&this._stats.time("Overall");var S="print"===a?"print":"display";this.pendingCleanup=!1,w||(w=this._transport.getOptionalContentConfig());var A=this._intentStates.get(S);A||(A=Object.create(null),this._intentStates.set(S,A)),A.streamReaderCancelTimeout&&(clearTimeout(A.streamReaderCancelTimeout),A.streamReaderCancelTimeout=null);var k=v||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),x=new _webgl.WebGLContext({enable:s});A.displayReadyCapability||(A.displayReadyCapability=(0,_util.createPromiseCapability)(),A.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:S,renderInteractiveForms:!0===c,annotationStorage:b&&b.getAll()||null}));var P=function(e){var r=A.renderTasks.indexOf(C);r>=0&&A.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===S)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(C.capability.reject(e),t._abortOperatorList({intentState:A,reason:e})):C.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},C=new InternalRenderTask({callback:P,params:{canvasContext:r,viewport:n,transform:h,imageLayer:d,background:y},objs:this.objs,commonObjs:this.commonObjs,operatorList:A.operatorList,pageIndex:this._pageIndex,canvasFactory:k,webGLContext:x,useRequestAnimationFrame:"print"!==S,pdfBug:this._pdfBug});A.renderTasks||(A.renderTasks=[]),A.renderTasks.push(C);var T=C.task;return Promise.all([A.displayReadyCapability.promise,w]).then((function(e){var r=_slicedToArray(e,2),n=r[0],i=r[1];t.pendingCleanup?P():(t._stats&&t._stats.time("Rendering"),C.initializeGraphics({transparency:n,optionalContentConfig:i}),C.operatorListChanged())}))["catch"](P),T}},{key:"getOperatorList",value:function(){function e(){if(n.operatorList.lastChunk){n.opListReadCapability.resolve(n.operatorList);var e=n.renderTasks.indexOf(t);e>=0&&n.renderTasks.splice(e,1)}}var t,r="oplist",n=this._intentStates.get(r);return n||(n=Object.create(null),this._intentStates.set(r,n)),n.opListReadCapability||(t=Object.create(null),t.operatorListChanged=e,n.opListReadCapability=(0,_util.createPromiseCapability)(),n.renderTasks=[],n.renderTasks.push(t),n.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:r})),n.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,i=void 0!==n&&n,a=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==i},{highWaterMark:a,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise((function(e,r){function n(){i.read().then((function(t){var r,i=t.value,o=t.done;o?e(a):(Object.assign(a.styles,i.styles),(r=a.items).push.apply(r,_toConsumableArray(i.items)),n())}),r)}var i=t.getReader(),a={items:[],styles:Object.create(null)};n()}))}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var e,t=[],r=_createForOfIteratorHelper(this._intentStates);try{for(r.s();!(e=r.n()).done;){var n=_slicedToArray(e.value,2),i=n[0],a=n[1];if(this._abortOperatorList({intentState:a,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==i){var o,s=_createForOfIteratorHelper(a.renderTasks);try{for(s.s();!(o=s.n()).done;){var u=o.value;t.push(u.completed),u.cancel()}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){r.e(c)}finally{r.f()}return this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,i=n.renderTasks,a=n.operatorList;if(0!==i.length||!a.lastChunk)return!1}}catch(o){r.e(o)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this.annotationsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this;function n(e){if("object"!==_typeof(e)||null===e)return e;if(i.has(e))return i.get(e);var r,a;if((r=e.buffer)&&(0,_util.isArrayBuffer)(r)){var o=t&&t.includes(r);return a=o?new e.constructor(r,e.byteOffset,e.byteLength):new e.constructor(e),i.set(e,a),a}for(var s in a=Array.isArray(e)?[]:{},i.set(e,a),e){var u=void 0,c=e;while(!(u=Object.getOwnPropertyDescriptor(c,s)))c=Object.getPrototypeOf(c);if("undefined"!==typeof u.value)if("function"!==typeof u.value)a[s]=n(u.value);else if(e.hasOwnProperty&&e.hasOwnProperty(s))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(e[s]))}return a}if(this._defer){var i=new WeakMap,a={data:n(e)};this._deferred.then((function(){r._listeners.forEach((function(e){e.call(r,a)}))}))}else this._listeners.forEach((function(t){t.call(r,{data:e})}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===("undefined"===typeof document?"undefined":_typeof(document))&&"currentScript"in document){var pdfjsFilePath=document.currentScript&&document.currentScript.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.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(){var e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref12=_asyncToGenerator(_regenerator["default"].mark((function _callee(){var mainWorkerMessageHandler,worker;return _regenerator["default"].wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(mainWorkerMessageHandler=getMainThreadWorkerMessageHandler(),!mainWorkerMessageHandler){_context.next=3;break}return _context.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context.next=6;break}return worker=eval("require")(_getWorkerSrc()),_context.abrupt("return",worker.WorkerMessageHandler);case 6:return _context.next=8,(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context.stop()}}),_callee)})));return function(){return _ref12.apply(this,arguments)}}();return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}var PDFWorker=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,n=void 0===r?null:r,i=t.port,a=void 0===i?null:i,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),a&&pdfWorkerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=n,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=s,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return pdfWorkerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(e,[{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!==typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var t=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),i=function(){r.removeEventListener("error",a),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},a=function(){e._webWorker||i()};r.addEventListener("error",a),n.on("test",(function(t){r.removeEventListener("error",a),e.destroyed?i():t?(e._messageHandler=n,e._port=r,e._webWorker=r,t.supportTransfers||(e.postMessageTransfers=!1),e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())})),n.on("ready",(function(t){if(r.removeEventListener("error",a),e.destroyed)i();else try{o()}catch(n){e._setupFakeWorker()}}));var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{n.send("test",t,[t.buffer])}catch(r){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,n.send("test",t)}};return void o()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake"+nextFakeWorkerId++,i=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(i,r);var a=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=a,e._readyCapability.resolve(),a.send("configure",{verbosity:e.verbosity})}}))["catch"]((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){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)}},{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}}],[{key:"fromPort",value:function(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new e(t)}},{key:"getWorkerSrc",value:function(){return _getWorkerSrc()}}]),e}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function e(t,r,n,i){_classCallCheck(this,e),this.messageHandler=t,this.loadingTask=r,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:i.ownerDocument}),this._params=i,this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"destroy",value:function(){var e=this;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"));var t=[];this.pageCache.forEach((function(e){e&&t.push(e._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then((function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then((function(e){var t=e.value,n=e.done;n?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}))["catch"]((function(e){r.error(e)}))},r.onCancel=function(t){e._fullReader.cancel(t),r.ready["catch"]((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),i=e._fullReader;return i.headersReady.then((function(){i.isStreamingSupported&&i.isRangeSupported||(e._lastProgress&&r.onProgress&&r.onProgress(e._lastProgress),i.onProgress=function(e){r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject),n.promise})),t.on("GetRangeReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then((function(e){var t=e.value,n=e.done;n?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))}))["catch"]((function(e){r.error(e)}))},r.onCancel=function(t){n.cancel(t),r.ready["catch"]((function(t){if(!e.destroyed)throw t}))}):r.close()})),t.on("GetDoc",(function(t){var n=t.pdfInfo;e._numPages=n.numPages,r._capability.resolve(new PDFDocumentProxy(n,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break}if(!(t instanceof Error)){var n="DocException - expected a valid Error.";(0,_util.warn)(n)}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword){var n=function(t){e._passwordCapability.resolve({password:t})};try{r.onPassword(n,t.code)}catch(i){e._passwordCapability.reject(i)}}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){r.onProgress&&r.onProgress({loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){if(!e.destroyed){var r=e.pageCache[t.pageIndex];r._startRenderPage(t.transparency,t.intent)}})),t.on("commonobj",(function(r){if(!e.destroyed){var n=_slicedToArray(r,3),i=n[0],a=n[1],o=n[2];if(!e.commonObjs.has(i))switch(a){case"Font":var s=e._params;if("error"in o){var u=o.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(i,u);break}var c=null;s.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var l=new _font_loader.FontFaceObject(o,{isEvalSupported:s.isEvalSupported,disableFontFace:s.disableFontFace,ignoreErrors:s.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});e.fontLoader.bind(l)["catch"]((function(e){return t.sendWithPromise("FontFallback",{id:i})}))["finally"]((function(){!s.fontExtraProperties&&l.data&&(l.data=null),e.commonObjs.resolve(i,l)}));break;case"FontPath":case"Image":e.commonObjs.resolve(i,o);break;default:throw new Error("Got unknown common object type ".concat(a))}}})),t.on("obj",(function(t){if(!e.destroyed){var r=_slicedToArray(t,4),n=r[0],i=r[1],a=r[2],o=r[3],s=e.pageCache[i];if(!s.objs.has(n))switch(a){case"Image":s.objs.resolve(n,o);var u=8e6;o&&"data"in o&&o.data.length>u&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(a))}}})),t.on("DocProgress",(function(t){e.destroyed||r.onProgress&&r.onProgress({loaded:t.loaded,total:t.total})})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(function(t,r){if(e.destroyed)r.error(new Error("Worker was destroyed"));else{var n=!1;r.onPull=function(){n?r.close():(n=!0,e.CMapReaderFactory.fetch(t).then((function(e){r.enqueue(e,1,[e.cMapData.buffer])}))["catch"]((function(e){r.error(e)})))}}}))}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1;if(r in this.pagePromises)return this.pagePromises[r];var n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return t.pageCache[r]=n,n}));return this.pagePromises[r]=n,n}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e})["catch"]((function(e){return Promise.reject(new Error(e))}))}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(e){return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:e&&e.getAll()||null,filename:this._fullReader?this._fullReader.filename:null})["finally"]((function(){e&&e.resetModified()}))}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:e._fullReader?e._fullReader.filename:null}}))}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;return this.messageHandler.sendWithPromise("Cleanup",null).then((function(){for(var t=0,r=e.pageCache.length;t1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return!!t&&t.resolved}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"cancel",value:function(){this._internalRenderTask.cancel()}},{key:"promise",get:function(){return this._internalRenderTask.capability.promise}}]),e}(),InternalRenderTask=function(){var e=new WeakSet,t=function(){function t(e){var r=e.callback,n=e.params,i=e.objs,a=e.commonObjs,o=e.operatorList,s=e.pageIndex,u=e.canvasFactory,c=e.webGLContext,l=e.useRequestAnimationFrame,h=void 0!==l&&l,f=e.pdfBug,d=void 0!==f&&f;_classCallCheck(this,t),this.callback=r,this.params=n,this.objs=i,this.commonObjs=a,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=u,this.webGLContext=c,this._pdfBug=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"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=n.canvasContext.canvas}return _createClass(t,[{key:"initializeGraphics",value:function(t){var r=t.transparency,n=void 0!==r&&r,i=t.optionalContentConfig;if(!this.cancelled){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());var a=this.params,o=a.canvasContext,s=a.viewport,u=a.transform,c=a.imageLayer,l=a.background;this.gfx=new _canvas.CanvasGraphics(o,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,c,i),this.gfx.beginDrawing({transform:u,viewport:s,transparency:n,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var 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 ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound()["catch"](e.cancel.bind(e))})):Promise.resolve().then(this._nextBound)["catch"](this.cancel.bind(this))}},{key:"_next",value:function(){var t=_asyncToGenerator(_regenerator["default"].mark((function t(){return _regenerator["default"].wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2: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()));case 4:case"end":return t.stop()}}),t,this)})));function r(){return t.apply(this,arguments)}return r}()},{key:"completed",get:function(){return this.capability.promise["catch"]((function(){}))}}]),t}();return t}(),version="2.6.347";exports.version=version;var build="3be9c65f";exports.build=build},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return o="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},o(e)}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){var t=f();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){p(a,n,i,o,s,"next",e)}function s(e){p(a,n,i,o,s,"throw",e)}o(void 0)}))}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r0&&r.requests[0].done){var e=r.requests.shift();setTimeout(e.callback,0)}}var r=this.loadingContext,n={id:"pdfjs-font-loading-".concat(r.nextRequestId++),done:!1,complete:t,callback:e};return r.requests.push(n),n}},{key:"_prepareFontLoadEvent",value:function(e,t,r){var n,a,o=this;function s(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function u(e,t,r,n){var i=e.substring(0,t),a=e.substring(t+r);return i+n+a}var c=this._document.createElement("canvas");c.width=1,c.height=1;var l=c.getContext("2d"),h=0;function f(e,t){if(h++,h>30)return(0,i.warn)("Load test font never loaded."),void t();l.font="30px "+e,l.fillText(".",0,20);var r=l.getImageData(0,0,1,1);r.data[3]>0?t():setTimeout(f.bind(null,e,t))}var d="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=976;p=u(p,v,d.length,d);var g=16,y=1482184792,m=s(p,g);for(n=0,a=d.length-3;n=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){var e=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,i.shadow)(this,"_loadTestFont",e())}}]),r}(_);var w=function(){function e(t,r){var n=r.isEvalSupported,i=void 0===n||n,a=r.disableFontFace,o=void 0!==a&&a,s=r.ignoreErrors,u=void 0!==s&&s,c=r.onUnsupportedFeature,l=void 0===c?null:c,h=r.fontRegistry,f=void 0===h?null:h;for(var d in g(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==i,this.disableFontFace=!0===o,this.ignoreErrors=!0===u,this._onUnsupportedFeature=l,this.fontRegistry=f}return m(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,i.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(c){if(!this.ignoreErrors)throw c;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(c,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){for(var a,o="",s=0,u=r.length;s=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function o(e,t){if(e){if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)d[p++]=g&v?0:255,v>>=1}var y=0;for(p=0,0!==d[p]&&(c[0]=1,++y),r=1;r>2)+(d[p+1]?4:0)+(d[p-h+1]?8:0),l[m]&&(c[n+r]=l[m],++y),p++;if(d[p-h]!==d[p]&&(c[n+r]=d[p]?2:4,++y),y>a)return null}for(p=h*(s-1),n=t*u,0!==d[p]&&(c[n]=8,++y),r=1;ra)return null;var b=new Int32Array([0,u,-1,0,-u,0,0,0,1]),_=[];for(t=0;y&&t<=s;t++){var w=t*u,S=w+o;while(w>4,c[w]&=x>>2|x<<2),k.push(w%u),k.push(w/u|0),c[w]||--y}while(P!==w);_.push(k),--t}}var T=function(e){e.save(),e.scale(1/o,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=_.length;t2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var i,a,o,s,u,c,l,h,f,d=t.height,v=t.width,g=d%p,y=(d-g)/p,m=0===g?y:y+1,b=e.createImageData(v,p),_=0,w=t.data,S=b.data;if(r)switch(r.length){case 1:c=r[0],l=r[0],h=r[0],f=r[0];break;case 4:c=r[0],l=r[1],h=r[2],f=r[3];break}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var A=w.byteLength,k=new Uint32Array(S.buffer,0,S.byteLength>>2),x=k.length,P=v+7>>3,C=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(f&&255===f[0]&&0===f[255]){var R=[T,C];C=R[0],T=R[1]}for(a=0;aP?v:8*E-7,I=-8&O,M=0,F=0;L>=1}while(i=y&&(s=g,u=v*s),i=0,o=u;o--;)S[i++]=w[_++],S[i++]=w[_++],S[i++]=w[_++],S[i++]=255;if(U)for(var q=0;q>=1}e.putImageData(s,0,h*p)}}function b(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,i=r.length;n>8,e[a-2]=e[a-2]*o+r*s>>8,e[a-1]=e[a-1]*o+n*s>>8}}}function S(e,t,r){for(var n=e.length,i=1/255,a=3;a>8]>>8:t[i]*a>>16}}function k(e,t,r,n,i,a,o){var s,u=!!a,c=u?a[0]:0,l=u?a[1]:0,h=u?a[2]:0;s="Luminosity"===i?A:S;for(var f=1048576,d=Math.min(n,Math.ceil(f/r)),p=0;pt&&"function"===typeof o,p=d?Date.now()+e:0,v=0,g=this.commonObjs,y=this.objs;while(1){if(void 0!==s&&l===s.nextBreakPoint)return s.breakIt(l,o),l;if(f=c[l],f!==n.OPS.dependency)this[f].apply(this,u[l]);else{var m,b=a(u[l]);try{for(b.s();!(m=b.n()).done;){var _=m.value,w=_.startsWith("g_")?g:y;if(!w.has(_))return w.get(_,o),l}}catch(S){b.e(S)}finally{b.f()}}if(l++,l===h)return l;if(d&&++v>t){if(Date.now()>p)return o(),l;v=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=P[e]},setLineJoin:function(e){this.ctx.lineJoin=C[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:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,r=e.length;t0&&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;break;case"TR":this.current.transferMaps=a}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,r,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,b(a,s),this.ctx=s,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(),x(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),b(e,this.ctx),this.current.resumeSMaskCtx=e;var t=n.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(),x(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),b(e,this.ctx);var t=n.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,n,i,a){this.ctx.transform(e,t,r,n,i,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,i=this.current,a=i.x,o=i.y,s=0,u=0,c=e.length;sc&&(h=c),this.current.fontSizeScale=t/h,this.ctx.font="".concat(s," ").concat(o," ").concat(h,"px ").concat(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,n,i,a){this.current.textMatrix=[e,t,r,n,i,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:function(e,t,r,i){var a,o=this.ctx,s=this.current,u=s.font,c=s.textRenderingMode,l=s.fontSize/s.fontSizeScale,h=c&n.TextRenderingMode.FILL_STROKE_MASK,f=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),d=s.patternFill&&!u.missingFile;if((u.disableFontFace||f||d)&&(a=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||d?(o.save(),o.translate(t,r),o.beginPath(),a(o,l),i&&o.setTransform.apply(o,i),h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fill(),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fillText(e,t,r),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.strokeText(e,t,r)),f){var p=this.pendingTextPaths||(this.pendingTextPaths=[]);p.push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:l,addToPath:a})}},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10),t=e.context;t.scale(1.5,1),t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,i=!1,a=3;a0&&r[a]<255){i=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",i)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var i=t.fontSize;if(0!==i){var a,o=this.ctx,s=t.fontSizeScale,u=t.charSpacing,c=t.wordSpacing,l=t.fontDirection,f=t.textHScale*l,d=e.length,p=r.vertical,v=p?1:-1,g=r.defaultVMetrics,y=i*t.fontMatrix[0],m=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var b=t.fillColor.getPattern(o,this);a=o.mozCurrentTransform,o.restore(),o.fillStyle=b}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),l>0?o.scale(f,-1):o.scale(f,1);var _=t.lineWidth,w=t.textMatrixScale;if(0===w||0===_){var S=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;S!==n.TextRenderingMode.STROKE&&S!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,_=this.getSinglePixelWidth()*h)}else _/=w;1!==s&&(o.scale(s,s),_/=s),o.lineWidth=_;var A,k=0;for(A=0;A0){var U=1e3*o.measureText(N).width/i*s;if(jl&&(h=u/l,u=l),c>l&&(f=c/l,c=l);var d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(d,u,c,!0),v=p.context;v.scale(1/h,1/f),v.translate(-o,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:o,offsetY:s,scaleX:h,scaleY:f,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,s),t.scale(h,f)),b(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null}},endGroup:function(e){if(this.contentVisible){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(),_(this.ctx),this.current=new m,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],n,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,i=this.current.fillColor,a=this.current.patternFill,o=this.processingType3;if(f&&o&&void 0===o.compiled&&(o.compiled=r<=d&&n<=d?y({data:e.data,width:r,height:n}):null),o&&o.compiled)o.compiled(t);else{var u=this.cachedCanvases.getCanvas("maskCanvas",r,n),c=u.context;c.save(),s(c,e),c.globalCompositeOperation="source-in",c.fillStyle=a?i.getPattern(c,this):i,c.fillRect(0,0,r,n),c.restore(),this.paintInlineImageXObject(u.canvas)}}},paintImageMaskXObjectRepeat:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var o=e.width,u=e.height,c=this.current.fillColor,l=this.current.patternFill,h=this.cachedCanvases.getCanvas("maskCanvas",o,u),f=h.context;f.save(),s(f,e),f.globalCompositeOperation="source-in",f.fillStyle=l?c.getPattern(f,this):c,f.fillRect(0,0,o,u),f.restore();for(var d=this.ctx,p=0,v=a.length;p2&&v>1||d>2&&g>1){var m=v,b=g;l>2&&v>1&&(m=Math.ceil(v/2),l/=v/m),d>2&&g>1&&(b=Math.ceil(g/2),d/=g/b),a=this.cachedCanvases.getCanvas(y,m,b),p=a.context,p.clearRect(0,0,m,b),p.drawImage(i,0,0,v,g,0,0,m,b),i=a.canvas,v=m,g=b,y="prescale1"===y?"prescale2":"prescale1"}if(n.drawImage(i,0,0,v,g,0,-r,t,r),this.imageLayer){var _=this.getCanvasPosition(0,-r);this.imageLayer.appendImage({imgData:e,left:_[0],top:_[1],width:t/s[0],height:r/s[3]})}this.restore()}},paintInlineImageXObjectGroup:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,i=e.height,a=this.cachedCanvases.getCanvas("inlineImage",n,i),s=a.context;o(s,e,this.current.transferMaps);for(var u=0,c=t.length;u=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}},n.OPS)r.prototype[n.OPS[E]]=r.prototype[E];return r}();t.CanvasGraphics=b},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=s,t.TilingPattern=void 0;var n=r(5),i={};function a(e,t){if(t&&"undefined"!==typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],r,n),e.clip(i)}}i.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],o=e[5],s=e[6],u=e[7];return{type:"Pattern",getPattern:function(e){var c;a(e,r),"axial"===t?c=e.createLinearGradient(i[0],i[1],o[0],o[1]):"radial"===t&&(c=e.createRadialGradient(i[0],i[1],s,o[0],o[1],u));for(var l=0,h=n.length;lc[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),c[n+1]>c[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),c[r+1]>c[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var d=(c[r]+t.offsetX)*t.scaleX,p=(c[r+1]+t.offsetY)*t.scaleY,v=(c[n]+t.offsetX)*t.scaleX,g=(c[n+1]+t.offsetY)*t.scaleY,y=(c[i]+t.offsetX)*t.scaleX,m=(c[i+1]+t.offsetY)*t.scaleY;if(!(p>=m))for(var b,_,w,S,A,k,x,P,C=l[a],T=l[a+1],R=l[a+2],E=l[o],L=l[o+1],O=l[o+2],I=l[s],M=l[s+1],F=l[s+2],N=Math.round(p),D=Math.round(m),j=N;j<=D;j++){if(jm?1:g===m?0:(g-j)/(g-m),b=v-(v-y)*q,_=E-(E-I)*q,w=L-(L-M)*q,S=O-(O-F)*q}var B=void 0;B=jm?1:(p-j)/(p-m),A=d-(d-y)*B,k=C-(C-I)*B,x=T-(T-M)*B,P=R-(R-F)*B;for(var W=Math.round(Math.min(b,A)),V=Math.round(Math.max(b,A)),z=f*j+4*W,H=W;H<=V;H++)B=(b-H)/(b-A),B<0?B=0:B>1&&(B=1),h[z++]=_-(_-k)*B|0,h[z++]=w-(w-x)*B|0,h[z++]=S-(S-P)*B|0,h[z++]=255}}function t(t,r,n){var i,a,o=r.coords,s=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,c=Math.floor(o.length/u)-1,l=u-1;for(i=0;i=i?a=i:n=a/e,{scale:n,size:a}},clipBbox:function(e,t,r,n,i,a){if(Array.isArray(t)&&4===t.length){var o=i-r,s=a-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(t,r,i){var a=t.ctx,o=t.current;switch(r){case e.COLORED:var s=this.ctx;a.fillStyle=s.fillStyle,a.strokeStyle=s.strokeStyle,o.fillColor=s.fillStyle,o.strokeColor=s.strokeStyle;break;case e.UNCOLORED:var u=n.Util.makeCssRgb(i[0],i[1],i[2]);a.fillStyle=u,a.strokeStyle=u,o.fillColor=u,o.strokeColor=u;break;default:throw new n.FormatError("Unsupported paint type: ".concat(r))}},getPattern:function(e,t){e=this.ctx,e.setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var u=this.desiredSize;this.desiredSize-=r,u>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:d.ENQUEUE,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d.CLOSE,streamId:n}),delete t.streamSinks[n])},error:function(e){(0,i.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d.ERROR,streamId:n,reason:p(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[n]=u,new Promise((function(t){t(r(e.data,u))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:d.START_COMPLETE,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:d.START_COMPLETE,streamId:n,reason:p(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case d.START_COMPLETE:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(p(e.reason));break;case d.PULL_COMPLETE:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(p(e.reason));break;case d.PULL:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var o=this.streamSinks[e.streamId].onPull;new Promise((function(e){e(o&&o())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d.PULL_COMPLETE,streamId:t,reason:p(e)})}));break;case d.ENQUEUE:if((0,i.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case d.CLOSE:if((0,i.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 d.ERROR:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(p(e.reason)),this._deleteStreamController(t);break;case d.CANCEL_COMPLETE:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(p(e.reason)),this._deleteStreamController(t);break;case d.CANCEL:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(p(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d.CANCEL_COMPLETE,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d.CANCEL_COMPLETE,streamId:t,reason:p(e)})})),this.streamSinks[t].sinkCapability.reject(p(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e=s(n["default"].mark((function e(t){return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(e){return e&&e.promise})));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),e}();t.MessageHandler=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(5),i=r(212);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r\\376\\377([^<]+)/g,(function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)})).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: ".concat(t," isn't defined."))})),n="",i=0,a=r.length;i=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+n}))}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase()){t=t.firstChild;while(t&&"rdf:rdf"!==t.nodeName.toLowerCase())t=t.nextSibling}var r=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes())for(var n=t.childNodes,i=0,a=n.length;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(r)}))}},{key:"_parseContent",value:function(e,t){var r=[],n=t;function i(){while(n"!==e[n]&&"/"!==e[n])++n;var a=e.substring(t,n);i();while(n"!==e[n]&&"/"!==e[n]&&"?"!==e[n]){i();var o="",s="";while(n"!==e[r]&&"/"!==e[r])++r;var i=e.substring(t,r);n();var a=r;while(r"!==e[r+1]))++r;var o=e.substring(a,r);return{name:i,value:o,parsed:r-t}}},{key:"parseXml",value:function(e){var t=0;while(t",n),a<0)return void this.onError(S.UnterminatedElement);this.onEndElement(e.substring(n,a)),n=a+1;break;case"?":++n;var o=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+o.parsed,n+o.parsed+2))return void this.onError(S.UnterminatedXmlDeclaration);this.onPi(o.name,o.value),n+=o.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if(a=e.indexOf("--\x3e",n+3),a<0)return void this.onError(S.UnterminatedComment);this.onComment(e.substring(n+3,a)),n=a+3}else if("[CDATA["===e.substring(n+1,n+8)){if(a=e.indexOf("]]>",n+8),a<0)return void this.onError(S.UnterminatedCdat);this.onCdata(e.substring(n+8,a)),n=a+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(S.MalformedElement);var s=e.indexOf("[",n+8),u=!1;if(a=e.indexOf(">",n+8),a<0)return void this.onError(S.UnterminatedDoctypeDeclaration);if(s>0&&a>s){if(a=e.indexOf("]>",n+8),a<0)return void this.onError(S.UnterminatedDoctypeDeclaration);u=!0}var c=e.substring(n+8,a+(u?1:0));this.onDoctype(c),n=a+(u?2:1)}break;default:var l=this._parseContent(e,n);if(null===l)return void this.onError(S.MalformedElement);var h=!1;if("/>"===e.substring(n+l.parsed,n+l.parsed+2))h=!0;else if(">"!==e.substring(n+l.parsed,n+l.parsed+1))return void this.onError(S.UnterminatedElement);this.onBeginElement(l.name,l.attributes,h),n+=l.parsed+(h?2:1);break}}else{while(n0}},{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}}]),e}(),C=function(e){f(r,e);var t=p(r);function r(){var e;return b(this,r),e=t.call(this),e._currentFragment=null,e._stack=null,e._errorCode=S.NoError,e}return w(r,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=S.NoError,this.parseXml(e),this._errorCode===S.NoError){var t=i(this._currentFragment,1),r=t[0];if(r)return{documentElement:r}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return l(m(r.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!k(e)){var t=new P("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new P("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,r){var n=new P(e);n.childNodes=[],this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var r=0,n=t.childNodes.length;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==r["return"]||r["return"]()}finally{if(u)throw o}}}}function a(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size?Object.fromEntries(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}();t.OptionalContentConfig=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n=a(r(2)),i=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function c(e,t){if(e){if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var o=new Uint8Array(a).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){n._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){n._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){n._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){n._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return d(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,i.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new v(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t=this._rangeReaders.slice(0);t.forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=p;var v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];h(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var i,a=u(this._queuedChunks);try{for(a.s();!(i=a.n()).done;){var o=i.value;this._loaded+=o.byteLength}}catch(s){a.e(s)}finally{a.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(this._requests.length>0){var t=this._requests.shift();t.resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}},{key:"read",value:function(){var e=s(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}}]),e}(),g=function(){function e(t,r,n){h(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return d(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{var t=this._requests.shift();t.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)}}},{key:"read",value:function(){var e=s(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(5);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function c(e,t){if(e){if("string"===typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];b(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,r&&(this.container=this._createContainer(n))}return w(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var u=i.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(".concat(n.transform.join(","),")"),a.style.transformOrigin="-".concat(u[0],"px -").concat(u[1],"px"),!e&&t.borderStyle.width>0){a.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var c=t.borderStyle.horizontalCornerRadius,l=t.borderStyle.verticalCornerRadius;if(c>0||l>0){var h="".concat(c,"px / ").concat(l,"px");a.style.borderRadius=h}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid";break;default:break}t.color?a.style.borderColor=i.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left="".concat(u[0],"px"),a.style.top="".concat(u[1],"px"),a.style.width="".concat(o,"px"),a.style.height="".concat(s,"px"),a}},{key:"_createPopup",value:function(e,t,r){t||(t=document.createElement("div"),t.style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new I({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}),i=n.render();i.style.left=e.style.width,e.appendChild(i)}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),k=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.url||e.data.dest||e.data.action);return t.call(this,e,n)}return w(r,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=this.data,t=this.linkService,r=document.createElement("a");return e.url?(0,n.addLinkAttributes)(r,{url:e.url,target:e.newWindow?n.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}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),r}(A),x=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n)}return w(r,[{key:"render",value:function(){this.container.className="textAnnotation";var 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}}]),r}(A),P=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return w(r,[{key:"render",value:function(){return this.container}}]),r}(A),C=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,n)}return w(r,[{key:"render",value:function(){var e=["left","center","right"],t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderInteractiveForms){var i=t.getOrCreateValue(r,this.data.fieldValue);if(this.data.multiLine?(n=document.createElement("textarea"),n.textContent=i):(n=document.createElement("input"),n.type="text",n.setAttribute("value",i)),n.addEventListener("input",(function(e){t.setValue(r,e.target.value)})),n.disabled=this.data.readOnly,n.name=this.data.fieldName,null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var a=this.data.rect[2]-this.data.rect[0],o=a/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(o,"px - 1ch)")}}else{n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";var s=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(s=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(n,s)}return null!==this.data.textAlignment&&(n.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e,t){var r=e.style;if(r.fontSize="".concat(this.data.fontSize,"px"),r.direction=this.data.fontDirection<0?"rtl":"ltr",t){var n="normal";t.black?n="900":t.bold&&(n="bold"),r.fontWeight=n,r.fontStyle=t.italic?"italic":"normal";var i=t.loadedName?'"'.concat(t.loadedName,'", '):"",a=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=i+a}}}]),r}(P),T=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return w(r,[{key:"render",value:function(){var e=this.annotationStorage,t=this.data,r=t.id,n=e.getOrCreateValue(r,t.fieldValue&&"Off"!==t.fieldValue);this.container.className="buttonWidgetAnnotation checkBox";var i=document.createElement("input");return i.disabled=t.readOnly,i.type="checkbox",i.name=this.data.fieldName,n&&i.setAttribute("checked",!0),i.addEventListener("change",(function(t){e.setValue(r,t.target.checked)})),this.container.appendChild(i),this.container}}]),r}(P),R=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return w(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=this.annotationStorage,t=this.data,r=t.id,n=e.getOrCreateValue(r,t.fieldValue===t.buttonValue),i=document.createElement("input");return i.disabled=t.readOnly,i.type="radio",i.name=t.fieldName,n&&i.setAttribute("checked",!0),i.addEventListener("change",(function(t){var n,i=t.target.name,a=u(document.getElementsByName(i));try{for(a.s();!(n=a.n()).done;){var o=n.value;o!==t.target&&e.setValue(o.parentNode.getAttribute("data-annotation-id"),!1)}}catch(s){a.e(s)}finally{a.f()}e.setValue(r,t.target.checked)})),this.container.appendChild(i),this.container}}]),r}(P),E=function(e){f(r,e);var t=p(r);function r(){return b(this,r),t.apply(this,arguments)}return w(r,[{key:"render",value:function(){var e=o(m(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),r}(k),L=function(e){f(r,e);var t=p(r);function r(e){return b(this,r),t.call(this,e,e.renderInteractiveForms)}return w(r,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=this.annotationStorage,t=this.data.id;e.getOrCreateValue(t,this.data.fieldValue.length>0?this.data.fieldValue[0]:null);var r=document.createElement("select");r.disabled=this.data.readOnly,r.name=this.data.fieldName,this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0));var n,i=u(this.data.options);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=document.createElement("option");o.textContent=a.displayValue,o.value=a.exportValue,this.data.fieldValue.includes(a.exportValue)&&o.setAttribute("selected",!0),r.appendChild(o)}}catch(s){i.e(s)}finally{i.f()}return r.addEventListener("input",(function(r){var n=r.target.options,i=n[n.selectedIndex].value;e.setValue(t,i)})),this.container.appendChild(r),this.container}}]),r}(P),O=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!(!e.data.title&&!e.data.contents);return t.call(this,e,n)}return w(r,[{key:"render",value:function(){var e=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",e.includes(this.data.parentType))return this.container;var t='[data-annotation-id="'.concat(this.data.parentId,'"]'),r=this.layer.querySelector(t);if(!r)return this.container;var n=new I({container:this.container,trigger:r,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),i=parseFloat(r.style.left),a=parseFloat(r.style.width);return this.container.style.transformOrigin="-".concat(i+a,"px -").concat(r.style.top),this.container.style.left="".concat(i+a,"px"),this.container.appendChild(n.render()),this.container}}]),r}(A),I=function(){function e(t){b(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return w(e,[{key:"render",value:function(){var e=.7,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);var r=document.createElement("div");r.className="popup";var a=this.color;if(a){var o=e*(255-a[0])+a[0],s=e*(255-a[1])+a[1],u=e*(255-a[2])+a[2];r.style.backgroundColor=i.Util.makeCssRgb(0|o,0|s,0|u)}var c=document.createElement("h1");c.textContent=this.title,r.appendChild(c);var l=n.PDFDateString.toDateObject(this.modificationDate);if(l){var h=document.createElement("span");h.textContent="{{date}}, {{time}}",h.dataset.l10nId="annotation_date_string",h.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),r.appendChild(h)}var f=this._formatContents(this.contents);return r.appendChild(f),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)),r.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(r),t}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),M=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),F=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(A),N=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",r-i),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(A),D=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=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-i/2),a.setAttribute("ry",r/2-i/2),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(A),j=function(e){f(r,e);var t=p(r);function r(e){var n;b(this,r);var i=!!(e.data.hasPopup||e.data.title||e.data.contents);return n=t.call(this,e,i,!0),n.containerClassName="polylineAnnotation",n.svgElementName="svg:polyline",n}return w(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],i=this.svgFactory.create(r,n),a=[],o=u(t.vertices);try{for(o.s();!(e=o.n()).done;){var s=e.value,c=s.x-t.rect[0],l=t.rect[3]-s.y;a.push(c+","+l)}}catch(f){o.e(f)}finally{o.f()}a=a.join(" ");var h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",a),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),i.appendChild(h),this.container.append(i),this._createPopup(this.container,h,t),this.container}}]),r}(A),U=function(e){f(r,e);var t=p(r);function r(e){var n;return b(this,r),n=t.call(this,e),n.containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(j),q=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),B=function(e){f(r,e);var t=p(r);function r(e){var n;b(this,r);var i=!!(e.data.hasPopup||e.data.title||e.data.contents);return n=t.call(this,e,i,!0),n.containerClassName="inkAnnotation",n.svgElementName="svg:polyline",n}return w(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],i=this.svgFactory.create(r,n),a=u(t.inkLists);try{for(a.s();!(e=a.n()).done;){var o,s=e.value,c=[],l=u(s);try{for(l.s();!(o=l.n()).done;){var h=o.value,f=h.x-t.rect[0],d=t.rect[3]-h.y;c.push("".concat(f,",").concat(d))}}catch(v){l.e(v)}finally{l.f()}c=c.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",c),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,t),i.appendChild(p)}}catch(v){a.e(v)}finally{a.f()}return this.container.append(i),this.container}}]),r}(A),W=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),V=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),z=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),H=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),G=function(e){f(r,e);var t=p(r);function r(e){b(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return w(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(A),Y=function(e){f(r,e);var t=p(r);function r(e){var a;b(this,r),a=t.call(this,e,!0);var o=a.data.file,s=o.filename,u=o.content;return a.filename=(0,n.getFilenameFromUrl)(s),a.content=u,a.linkService.eventBus&&a.linkService.eventBus.dispatch("fileattachmentannotation",{source:g(a),id:(0,i.stringToPDFString)(s),filename:s,content:u}),a}return w(r,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var 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}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}]),r}(A),X=function(){function e(){b(this,e)}return w(e,null,[{key:"render",value:function(e){var t,r=[],o=[],s=u(e.annotations);try{for(s.s();!(t=s.n()).done;){var c=t.value;c&&(c.annotationType!==i.AnnotationType.POPUP?r.push(c):o.push(c))}}catch(p){s.e(p)}finally{s.f()}o.length&&r.push.apply(r,o);for(var l=0,h=r;l1)p=!0;else if(t.transform[0]!==t.transform[3]){var v=Math.abs(t.transform[0]),g=Math.abs(t.transform[3]);v!==g&&Math.max(v,g)/Math.min(v,g)>1.5&&(p=!0)}if(p&&(c.vertical?o.canvasWidth=t.height*e._viewport.scale:o.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(a,o),e._textContentStream&&e._layoutText(a),e._enhanceTextSelection){var y=1,m=0;0!==u&&(y=Math.cos(u),m=Math.sin(u));var b,_,w=(c.vertical?t.height:t.width)*e._viewport.scale,S=f;0!==u?(b=[y,m,-m,y,l,h],_=n.Util.getAxialAlignedBoundingBox([0,0,w,S],b)):_=[l,h,l+w,h+S],e._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:a,size:[w,S],m:b})}}function a(t){if(!t._canceled){var r=t._textDivs,n=t._capability,i=r.length;if(i>e)return t._renderingDone=!0,void n.resolve();if(!t._textContentStream)for(var a=0;a0&&(n=n?Math.min(a,n):a)}return n}function s(e){for(var t=e._bounds,r=e._viewport,i=u(r.width,r.height,t),a=0;a=0&&n[a].start>=e.y2)a--;var o,s,u=-1/0;for(o=t;o<=a;o++){var c;r=n[o],i=r.boundary,c=i.x2>e.x1?i.index>e.index?i.x1New:e.x1:void 0===i.x2New?(i.x2+e.x1)/2:i.x2New,c>u&&(u=c)}for(e.x1New=u,o=t;o<=a;o++)r=n[o],i=r.boundary,void 0===i.x2New?i.x2>e.x1?i.index>e.index&&(i.x2New=i.x2):i.x2New=u:i.x2New>u&&(i.x2New=Math.max(u,i.x2));var l=[],h=null;for(o=t;o<=a;o++){r=n[o],i=r.boundary;var f=i.x2>e.x2?i:e;h===f?l[l.length-1].end=r.end:(l.push({start:r.start,end:r.end,boundary:f}),h=f)}for(n[t].start=0&&n[s].start>=i.y1;s--)d=n[s].boundary===i;for(s=a+1;!d&&s0&&(t.scale=t.canvasWidth/s,r="scaleX(".concat(t.scale,")"))}0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(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){var t=this,r=(0,n.createPromiseCapability)(),i=Object.create(null),o=this._document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,u=this._textContent.styles;this._processItems(s,u),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');var c=function e(){t._reader.read().then((function(n){var a=n.value,o=n.done;o?r.resolve():(Object.assign(i,a.styles),t._processItems(a.items,i),e())}),r.reject)};this._reader=this._textContentStream.getReader(),c()}r.promise.then((function(){i=null,e?t._renderTimer=setTimeout((function(){a(t),t._renderTimer=null}),e):a(t)}),this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(s(this),this._bounds=null);for(var t=[],r=[],n=0,i=this._textDivs.length;n0?(r.push("".concat(o.paddingTop,"px")),t.push("translateY(".concat(-o.paddingTop,"px)"))):r.push(0),o.paddingRight>0?r.push("".concat(o.paddingRight/o.scale,"px")):r.push(0),o.paddingBottom>0?r.push("".concat(o.paddingBottom,"px")):r.push(0),o.paddingLeft>0?(r.push("".concat(o.paddingLeft/o.scale,"px")),t.push("translateX(".concat(-o.paddingLeft/o.scale,"px)"))):r.push(0),a.style.padding=r.join(" "),t.length&&(a.style.transform=t.join(" "))):(a.style.padding=null,a.style.transform=o.originalTransform))}}}},h}();t.renderTextLayer=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(5),i=r(1),a=r(7);function o(e){return c(e)||u(e)||v(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function c(e){if(Array.isArray(e))return g(e)}function l(e,t){return d(e)||f(e,t)||v(e,t)||h()}function h(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){i=!0,a=u}finally{try{n||null==s["return"]||s["return"]()}finally{if(i)throw a}}return r}}function d(e){if(Array.isArray(e))return e}function p(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function v(e,t){if(e){if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>1&2147483647:o>>1&2147483647;r[i]=o}function u(e,t,n){for(var i=-1,a=t;a>>8^s}return-1^i}function c(e,t,r,n){var i=n,a=t.length;r[i]=a>>24&255,r[i+1]=a>>16&255,r[i+2]=a>>8&255,r[i+3]=255&a,i+=4,r[i]=255&e.charCodeAt(0),r[i+1]=255&e.charCodeAt(1),r[i+2]=255&e.charCodeAt(2),r[i+3]=255&e.charCodeAt(3),i+=4,r.set(t,i),i+=t.length;var o=u(r,n+4,i);r[i]=o>>24&255,r[i+1]=o>>16&255,r[i+2]=o>>8&255,r[i+3]=255&o}function l(e,t,r){for(var n=1,i=0,a=t;a=8?e:Buffer.from(e);var r=__webpack_require__(3).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(i){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+i)}return f(e)}function f(e){var t=e.length,r=65535,n=Math.ceil(t/r),i=new Uint8Array(2+t+5*n+4),a=0;i[a++]=120,i[a++]=156;var o=0;while(t>r)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(o,o+r),a),a+=r,o+=r,t-=r;i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(o),a),a+=e.length-o;var s=l(e,0,e.length);return i[a++]=s>>24&255,i[a++]=s>>16&255,i[a++]=s>>8&255,i[a++]=255&s,i}function d(r,i,a,o){var s,u,l,f=r.width,d=r.height,p=r.data;switch(i){case n.ImageKind.GRAYSCALE_1BPP:u=0,s=1,l=f+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,s=8,l=3*f;break;case n.ImageKind.RGBA_32BPP:u=6,s=8,l=4*f;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+l)*d),g=0,y=0,m=0;m>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,s,u,0,0,0]),S=h(v),A=e.length+3*t+w.length+S.length,k=new Uint8Array(A),x=0;return k.set(e,x),x+=e.length,c("IHDR",w,k,x),x+=t+w.length,c("IDATA",S,k,x),x+=t+S.length,c("IEND",new Uint8Array(0),k,x),(0,n.createObjectURL)(k,"image/png",a)}return function(e,t,r){var i=void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind;return d(e,i,t,r)}}(),E=function(){function e(){y(this,e),this.fontSizeScale=1,this.fontWeight=k.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.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=k.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=""}return b(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),L=0,O=0,I=0;t.SVGGraphics=_=function(){function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in y(this,e),this.svgFactory=new i.DOMSVGFactory,this.current=new E,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=r,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!a,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[o]]=o}return b(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,i=e.argsArray,a=0,o=r.length;a0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=C[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=T[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeCssRgb(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,i=n.Util.inverseTransform(this.transformMatrix),a=n.Util.applyTransform([0,0],i),o=n.Util.applyTransform([0,r],i),s=n.Util.applyTransform([t,0],i),u=n.Util.applyTransform([t,r],i),c=Math.min(a[0],o[0],s[0],u[0]),l=Math.min(a[1],o[1],s[1],u[1]),h=Math.max(a[0],o[0],s[0],u[0]),f=Math.max(a[1],o[1],s[1],u[1]),d=this.svgFactory.createElement("svg:rect");d.setAttributeNS(null,"x",c),d.setAttributeNS(null,"y",l),d.setAttributeNS(null,"width",h-c),d.setAttributeNS(null,"height",f-l),d.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&d.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(d)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],i=e[3]||n.IDENTITY_MATRIX,a=l(e[4],4),s=a[0],u=a[1],c=a[2],h=a[3],f=e[5],d=e[6],p=e[7],v="shading".concat(I++),g=n.Util.applyTransform([s,u],i),y=l(g,2),m=y[0],b=y[1],_=n.Util.applyTransform([c,h],i),w=l(_,2),S=w[0],A=w[1],k=n.Util.singularValueDecompose2dScale(i),x=l(k,2),P=x[0],C=x[1],T=f*P,R=d*C,E=this.svgFactory.createElement("svg:pattern");E.setAttributeNS(null,"id",v),E.setAttributeNS(null,"patternUnits","userSpaceOnUse"),E.setAttributeNS(null,"width",T),E.setAttributeNS(null,"height",R),E.setAttributeNS(null,"x","".concat(m)),E.setAttributeNS(null,"y","".concat(b));var L=this.svg,O=this.transformMatrix,M=this.current.fillColor,F=this.current.strokeColor,N=this.svgFactory.create(S-m,A-b);if(this.svg=N,this.transformMatrix=i,2===p){var D=n.Util.makeCssRgb.apply(n.Util,o(t));this.current.fillColor=D,this.current.strokeColor=D}return this.executeOpTree(this.convertOpList(r)),this.svg=L,this.transformMatrix=O,this.current.fillColor=M,this.current.strokeColor=F,E.appendChild(N.childNodes[0]),this.defs.appendChild(E),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(I++),i=e[3];switch(e[1]){case"axial":var a=e[4],o=e[5];t=this.svgFactory.createElement("svg:linearGradient"),t.setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",a[0]),t.setAttributeNS(null,"y1",a[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],u=e[5],c=e[6],l=e[7];t=this.svgFactory.createElement("svg:radialGradient"),t.setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",l),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h,f=p(i);try{for(f.s();!(h=f.n()).done;){var d=h.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",d[0]),v.setAttributeNS(null,"stop-color",d[1]),t.appendChild(v)}}catch(g){f.e(g)}finally{f.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,i=this.current,a=i.x,o=i.y,s=[],u=0,c=p(e);try{for(c.s();!(r=c.n()).done;){var l=r.value;switch(0|l){case n.OPS.rectangle:a=t[u++],o=t[u++];var h=t[u++],f=t[u++],d=a+h,v=o+f;s.push("M",S(a),S(o),"L",S(d),S(o),"L",S(d),S(v),"L",S(a),S(v),"Z");break;case n.OPS.moveTo:a=t[u++],o=t[u++],s.push("M",S(a),S(o));break;case n.OPS.lineTo:a=t[u++],o=t[u++],s.push("L",S(a),S(o));break;case n.OPS.curveTo:a=t[u+4],o=t[u+5],s.push("C",S(t[u]),S(t[u+1]),S(t[u+2]),S(t[u+3]),S(a),S(o)),u+=6;break;case n.OPS.curveTo2:s.push("C",S(a),S(o),S(t[u]),S(t[u+1]),S(t[u+2]),S(t[u+3])),a=t[u+2],o=t[u+3],u+=4;break;case n.OPS.curveTo3:a=t[u+2],o=t[u+3],s.push("C",S(t[u]),S(t[u+1]),S(a),S(o),S(a),S(o)),u+=4;break;case n.OPS.closePath:s.push("Z");break}}}catch(g){c.e(g)}finally{c.f()}s=s.join(" "),i.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=i.path.getAttributeNS(null,"d")+s:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(i.path)),i.path.setAttributeNS(null,"d",s),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(a,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(L++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",A(this.transformMatrix));var n=e.element.cloneNode(!0);"evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),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(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=p(e);try{for(r.s();!(t=r.n()).done;){var i=l(t.value,2),a=i[0],o=i[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(a));break}}}catch(s){r.e(s)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",S(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",S(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(S).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",S(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var 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)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,i=R(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",S(r)),a.setAttributeNS(null,"height",S(n)),this.current.element=a,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS(P,"xlink:href",i),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",S(-n)),o.setAttributeNS(null,"width",S(r)+"px"),o.setAttributeNS(null,"height",S(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(S(1/r)," ").concat(S(-1/n),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,i=t.fillColor;t.maskId="mask".concat(O++);var a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",S(r)),o.setAttributeNS(null,"height",S(n)),o.setAttributeNS(null,"fill",i),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",t[0]),i.setAttributeNS(null,"y",t[1]),i.setAttributeNS(null,"width",S(r)),i.setAttributeNS(null,"height",S(n)),this.current.element=i,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",A(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var 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}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",A(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n=o(r(2)),i=r(5),a=r(220);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="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},s(e)}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function l(e){var t=d();return function(){var r,n=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){v(a,n,i,o,s,"next",e)}function s(e){v(a,n,i,o,s,"throw",e)}o(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);if(!Number.isInteger(s))return o;if(o.suggestedLength=s,s<=2*i)return o;if(a||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;var u=t("Content-Encoding")||"identity";return"identity"!==u||(o.allowRangeRequests=!0),o}function o(e){var t=e("Content-Disposition");if(t){var r=(0,i.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(n){}if(/\.pdf$/i.test(r))return r}return null}function s(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)}function u(e){return 200===e||206===e}},function(e,t,r){"use strict";function n(e,t){return u(e)||s(e,t)||a(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"===typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var i=n.status||f,a=i===f&&r.expectedStatus===d;if(a||i===r.expectedStatus){var o=p(n);if(i===d){var s=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),g=function(){function e(t){c(this,e),this._source=t,this._manager=new v(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new m(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t=this._rangeRequestReaders.slice(0);t.forEach((function(t){t.cancel(e)}))}}]),e}();t.PDFNetworkStream=g;var y=function(){function e(t,r){c(this,e),this._manager=t;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=(0,i.createPromiseCapability)(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.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}return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,a.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,o=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e)if(this._requests.length>0){var t=this._requests.shift();t.resolve({value:e.chunk,done:!1})}else 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=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,a.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach((function(e){e.reject(r)})),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"read",value:function(){var e=u(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(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}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}}]),e}(),m=function(){function e(t,r,n){c(this,e),this._manager=t;var i={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;if(this._requests.length>0){var r=this._requests.shift();r.resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:function(){var e=u(n["default"].mark((function e(){var t,r;return n["default"].wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,i.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cancel",value:function(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()}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n=o(r(2)),i=r(5),a=r(220);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"display";return this.pdfPage.getAnnotations({intent:r}).then((function(r){if(!t._cancelled&&0!==r.length){var i={viewport:e.clone({dontFlip:!0}),div:t.div,annotations:r,page:t.pdfPage,imageResourcesPath:t.imageResourcesPath,renderInteractiveForms:t.renderInteractiveForms,linkService:t.linkService,downloadManager:t.downloadManager,annotationStorage:t.annotationStorage};t.div?n.AnnotationLayer.update(i):(t.div=document.createElement("div"),t.div.className="annotationLayer",t.pageDiv.appendChild(t.div),i.div=t.div,n.AnnotationLayer.render(i),t.l10n.translate(t.div))}}))}},{key:"cancel",value:function(){this._cancelled=!0}},{key:"hide",value:function(){this.div&&this.div.setAttribute("hidden","true")}}]),e}();t.AnnotationLayerBuilder=c;var l=function(){function e(){o(this,e)}return u(e,[{key:"createAnnotationLayerBuilder",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.NullL10n;return new c({pageDiv:e,pdfPage:t,imageResourcesPath:n,renderInteractiveForms:o,linkService:new a.SimpleLinkService,l10n:s,annotationStorage:r})}}]),e}();t.DefaultAnnotationLayerFactory=l},function(e,t,n){"use strict";var i;i="undefined"!==typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:r("654c"),e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=Q,t.isValidScrollMode=K,t.isValidSpreadMode=J,t.isPortraitOrientation=$,t.clamp=ne,t.getPDFFileNameFromURL=G,t.noContextMenuHandler=z,t.parseQueryString=D,t.backtrackBeforeAllVisibleElements=W,t.getVisibleElements=V,t.roundToDivide=q,t.getPageSizeInches=B,t.approximateFraction=U,t.getOutputScale=M,t.scrollIntoView=F,t.watchScroll=N,t.binarySearchFirstItem=j,t.normalizeWheelEventDirection=Y,t.normalizeWheelEventDelta=X,t.waitOnEventOrTimeout=ee,t.moveToEndOfArray=ae,t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;var n=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]&&arguments[2],n=e.offsetParent;if(n){var i=e.offsetTop+e.clientTop,a=e.offsetLeft+e.clientLeft;while(n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||r&&"hidden"===getComputedStyle(n).overflow)if(n.dataset._scaleY&&(i/=n.dataset._scaleY,a/=n.dataset._scaleX),i+=n.offsetTop,a+=n.offsetLeft,n=n.offsetParent,!n)return;t&&(void 0!==t.top&&(i+=t.top),void 0!==t.left&&(a+=t.left,n.scrollLeft=a)),n.scrollTop=i}else console.error("offsetParent is not set -- cannot scroll")}function N(e,t){var r=function(r){i||(i=window.requestAnimationFrame((function(){i=null;var r=e.scrollLeft,a=n.lastX;r!==a&&(n.right=r>a),n.lastX=r;var o=e.scrollTop,s=n.lastY;o!==s&&(n.down=o>s),n.lastY=o,t(n)})))},n={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r},i=null;return e.addEventListener("scroll",r,!0),n}function D(e){for(var t=e.split("&"),r=Object.create(null),n=0,i=t.length;n1?a[1]:null;r[decodeURIComponent(o)]=decodeURIComponent(s)}return r}function j(e,t){var r=0,n=e.length-1;if(n<0||!t(e[n]))return e.length;if(t(e[r]))return r;while(r>1,a=e[i];t(a)?n=i:r=i+1}return r}function U(e){if(Math.floor(e)===e)return[e,1];var t=1/e,r=8;if(t>r)return[1,r];if(Math.floor(t)===t)return[1,t];var n,i=e>1?t:e,a=0,o=1,s=1,u=1;while(1){var c=a+s,l=o+u;if(l>r)break;i<=c/l?(s=c,u=l):(a=c,o=l)}return n=i-a/o=r&&(n=t[e-1].div,i=n.offsetTop+n.clientTop);for(var a=e-2;a>=0;--a){if(n=t[a].div,n.offsetTop+n.clientTop+n.clientHeight<=i)break;e=a}return e}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.scrollTop,a=i+e.clientHeight,o=e.scrollLeft,s=o+e.clientWidth;function u(e){var t=e.div,r=t.offsetTop+t.clientTop+t.clientHeight;return r>i}function c(e){var t=e.div,r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>o}var l=[],h=t.length,f=0===h?0:j(t,n?c:u);f>0&&f=a&&(d=S);else if((n?y:m)>d)break;if(!(S<=i||m>=a||w<=o||y>=s)){var A=Math.max(0,i-m)+Math.max(0,S-a),k=Math.max(0,o-y)+Math.max(0,w-s),x=(_-A)*(b-k)*100/_/b|0;l.push({id:v.id,x:y,y:m,view:v,percent:x})}}var P=l[0],C=l[l.length-1];return r&&l.sort((function(e,t){var r=e.percent-t.percent;return Math.abs(r)>.001?-r:e.id-t.id})),{first:P,last:C,views:l}}function z(e){e.preventDefault()}function H(e){var t=0,r=e.length;while(t1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(H(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;var r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,n=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=r.exec(e),a=n.exec(i[1])||n.exec(i[2])||n.exec(i[3]);if(a&&(a=a[0],a.includes("%")))try{a=n.exec(decodeURIComponent(a))[0]}catch(o){}return a||t}function Y(e){var t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY),r=Math.atan2(e.deltaY,e.deltaX);return-.25*Math.PI=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function a(n){t instanceof re?t._off(r,o):t.removeEventListener(r,o),c&&clearTimeout(c),e(n)}var o=a.bind(null,Z.EVENT);t instanceof re?t._on(r,o):t.addEventListener(r,o);var s=a.bind(null,Z.TIMEOUT),c=setTimeout(s,i)}))}t.WaitOnType=Z;var te=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=te;var re=function(){function e(t){a(this,e),this._listeners=Object.create(null)}return s(e,[{key:"on",value:function(e,t){this._on(e,t,{external:!0})}},{key:"off",value:function(e,t){this._off(e,t,{external:!0})}},{key:"dispatch",value:function(e){var t=this._listeners[e];if(t&&0!==t.length){var r,n=Array.prototype.slice.call(arguments,1);t.slice(0).forEach((function(e){var t=e.listener,i=e.external;if(i)return r||(r=[]),void r.push(t);t.apply(null,n)})),r&&(r.forEach((function(e){e.apply(null,n)})),r=null)}}},{key:"_on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this._listeners[e];n||(this._listeners[e]=n=[]),n.push({listener:t,external:!0===(r&&r.external)})}},{key:"_off",value:function(e,t){var r=this._listeners[e];if(r)for(var n=0,i=r.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=r.height,i=r.width,o=r.units;a(this,e),this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=n||100,this.width=i||100,this.units=o||"%",this.div.style.height=this.height+this.units,this.percent=0}return s(e,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");var e=this.width*this._percent/100;this.div.style.width=e+this.units}},{key:"setWidth",value:function(e){if(e){var t=e.parentNode,r=t.offsetWidth-e.offsetWidth;r>0&&(this.bar.style.width="calc(100% - ".concat(r,"px)"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}},{key:"show",value:function(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}},{key:"percent",get:function(){return this._percent},set:function(e){this._indeterminate=isNaN(e),this._percent=ne(e,0,100),this._updateBar()}}]),e}();function ae(e,t){for(var r=[],n=e.length,i=0,a=0;a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),R(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(n){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(6)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var n=r(3);function i(e){return i="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},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventBus,n=t.externalLinkTarget,i=void 0===n?null:n,o=t.externalLinkRel,s=void 0===o?null:o,u=t.externalLinkEnabled,c=void 0===u||u,l=t.ignoreDestinationZoom,h=void 0!==l&&l;a(this,e),this.eventBus=r,this.externalLinkTarget=i,this.externalLinkRel=s,this.externalLinkEnabled=c,this._ignoreDestinationZoom=h,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}return s(e,[{key:"setDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"navigateTo",value:function(e){var t=this,r=function r(n){var i,a=n.namedDest,o=n.explicitDest,s=o[0];if(s instanceof Object){if(i=t._cachedPageNumber(s),null===i)return void t.pdfDocument.getPageIndex(s).then((function(e){t.cachePageRef(e+1,s),r({namedDest:a,explicitDest:o})}))["catch"]((function(){console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid page reference, for dest="'.concat(e,'".'))}))}else{if(!Number.isInteger(s))return void console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid destination reference, for dest="'.concat(e,'".'));i=s+1}!i||i<1||i>t.pagesCount?console.error('PDFLinkService.navigateTo: "'.concat(i,'" is not ')+'a valid page number, for dest="'.concat(e,'".')):(t.pdfHistory&&(t.pdfHistory.pushCurrentPosition(),t.pdfHistory.push({namedDest:a,explicitDest:o,pageNumber:i})),t.pdfViewer.scrollPageIntoView({pageNumber:i,destArray:o,ignoreDestinationZoom:t._ignoreDestinationZoom}))};new Promise((function(r,n){"string"!==typeof e?r({namedDest:"",explicitDest:e}):t.pdfDocument.getDestination(e).then((function(t){r({namedDest:e,explicitDest:t})}))})).then((function(t){Array.isArray(t.explicitDest)?r(t):console.error('PDFLinkService.navigateTo: "'.concat(t.explicitDest,'" is')+' not a valid destination array, for dest="'.concat(e,'".'))}))}},{key:"getDestinationHash",value:function(e){if("string"===typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){var t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"setHash",value:function(e){var t,r;if(e.includes("=")){var i=(0,n.parseQueryString)(e);if("search"in i&&this.eventBus.dispatch("findfromurlhash",{source:this,query:i.search.replace(/"/g,""),phraseSearch:"true"===i.phrase}),"page"in i&&(t=0|i.page||1),"zoom"in i){var a=i.zoom.split(","),o=a[0],s=parseFloat(o);o.includes("Fit")?"Fit"===o||"FitB"===o?r=[null,{name:o}]:"FitH"===o||"FitBH"===o||"FitV"===o||"FitBV"===o?r=[null,{name:o},a.length>1?0|a[1]:null]:"FitR"===o?5!==a.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):r=[null,{name:o},0|a[1],0|a[2],0|a[3],0|a[4]]:console.error('PDFLinkService.setHash: "'.concat(o,'" is not ')+"a valid zoom value."):r=[null,{name:"XYZ"},a.length>1?0|a[1]:null,a.length>2?0|a[2]:null,s?s/100:o]}r?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:r,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in i&&this.eventBus.dispatch("pagemode",{source:this,mode:i.pagemode}),"nameddest"in i&&this.navigateTo(i.nameddest)}else{r=unescape(e);try{r=JSON.parse(r),Array.isArray(r)||(r=r.toString())}catch(u){}if("string"===typeof r||c(r))return void this.navigateTo(r);console.error('PDFLinkService.setHash: "'.concat(unescape(e),'" is not ')+"a valid destination.")}}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break;default:break}this.eventBus.dispatch("namedaction",{source:this,action:e})}},{key:"cachePageRef",value:function(e,t){if(t){var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);this._pagesRefCache[r]=e}}},{key:"_cachedPageNumber",value:function(e){var t=0===e.gen?"".concat(e.num,"R"):"".concat(e.num,"R").concat(e.gen);return this._pagesRefCache&&this._pagesRefCache[t]||null}},{key:"isPageVisible",value:function(e){return this.pdfViewer.isPageVisible(e)}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return this.pdfViewer.pagesRotation},set:function(e){this.pdfViewer.pagesRotation=e}}]),e}();function c(e){if(!Array.isArray(e))return!1;var t=e.length;if(t<2)return!1;var r=e[0];if(("object"!==i(r)||!Number.isInteger(r.num)||!Number.isInteger(r.gen))&&!(Number.isInteger(r)&&r>=0))return!1;var n=e[1];if("object"!==i(n)||"string"!==typeof n.name)return!1;var a=!0;switch(n.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;a=!1;break;default:return!1}for(var o=2;o0&&void 0!==arguments[0]?arguments[0]:0;if((this.textContent||this.textContentStream)&&!this.renderingDone){this.cancel(),this.textDivs=[];var r=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:r,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then((function(){e.textLayerDiv.appendChild(r),e._finishRendering(),e._updateMatches()}),(function(e){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=function(t){t.pageIndex!==e.pageIdx&&-1!==t.pageIndex||e._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}}},{key:"cancel",value:function(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}},{key:"setTextContentStream",value:function(e){this.cancel(),this.textContentStream=e}},{key:"setTextContent",value:function(e){this.cancel(),this.textContent=e}},{key:"_convertMatches",value:function(e,t){if(!e)return[];for(var r=this.findController,n=this.textContentItemsStr,i=0,a=0,o=n.length-1,s=r.state.query.length,u=[],c=0,l=e.length;c=a+n[i].length)a+=n[i].length,i++;i===n.length&&console.error("Could not find a matching mapping");var f={begin:{divIdx:i,offset:h-a}};h+=t?t[c]:s;while(i!==o&&h>a+n[i].length)a+=n[i].length,i++;f.end={divIdx:i,offset:h-a},u.push(f)}return u}},{key:"_renderMatches",value:function(e){if(0!==e.length){var t=this.findController,r=this.pageIdx,n=this.textContentItemsStr,i=this.textDivs,a=r===t.selected.pageIdx,o=t.selected.matchIdx,s=t.state.highlightAll,u=null,c={divIdx:-1,offset:void 0},l=o,h=l+1;if(s)l=0,h=e.length;else if(!a)return;for(var f=l;f3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return new u({textLayerDiv:e,pageIndex:t,viewport:r,enhanceTextSelection:n,eventBus:i})}}]),e}();t.DefaultTextLayerFactory=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var n=r(2),i=r(10);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r1,l=/CriOS/.test(i);(function(){(u||l)&&(n.disableCreateObjectURL=!0)})(),function(){(c||s)&&(n.maxCanvasPixels=5242880)}();var h=Object.freeze(n);t.viewerCompatibilityParams=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0;var n=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r0?(i=t.substring(0,s),o=t.substring(s+1)):(i=t,o=a),n[i]||(n[i]={}),n[i][o]=e[t]}r&&r()}))}),o)}function g(e,t){e&&(e=e.toLowerCase()),t=t||function(){},y(),o=e;var r=l(),i=r.length;if(0!==i){var a=null,s=0;a=function(){s++,s>=i&&(t(),u="complete")};for(var c=0;c0&&(o=e.substring(i+1),e=e.substring(0,i)),r&&(n={},n[o]=r);var s=b(e,t,n);return s&&o in s?s[o]:"{{"+e+"}}"},getData:function(){return n},getText:function(){return i},getLanguage:function(){return o},setLanguage:function(e,t){g(e,(function(){t&&t()}))},getDirection:function(){var e=["ar","he","fa","ps","ur"],t=o.split("-",1)[0];return e.indexOf(t)>=0?"rtl":"ltr"},translate:k,getReadyState:function(){return u},ready:function(r){r&&("complete"==u||"interactive"==u?e.setTimeout((function(){r()})):t.addEventListener&&t.addEventListener("localized",(function e(){t.removeEventListener("localized",e),r()})))}}}(window,document)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindController=t.FindState=void 0;var n=r(2),i=r(14),a=r(3);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r=1&&r<=n.pagesCount&&r!==n.page&&!n.isPageVisible(r);case"findhighlightallchange":return!1}return!0}},{key:"_prepareMatches",value:function(e,t,r){function n(t){var r=e[t],n=e[t+1];if(t=0;i--){var a=e[i];if(!a.skipped){if(a.match+a.matchLength=r.match+r.matchLength)return r.skipped=!0,!0}}return!1}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(var i=0,a=e.length;i0){var n=e.charCodeAt(t),a=e.charCodeAt(t-1);if((0,i.getCharacterType)(n)===(0,i.getCharacterType)(a))return!1}var o=t+r-1;if(o0&&(this._matchesCountTotal+=s,this._updateUIResultsCount())}}},{key:"_extractText",value:function(){var e=this;if(!(this._extractTextPromises.length>0))for(var t=Promise.resolve(),r=function(r,i){var a=(0,n.createPromiseCapability)();e._extractTextPromises[r]=a.promise,t=t.then((function(){return e._pdfDocument.getPage(r+1).then((function(e){return e.getTextContent({normalizeWhitespace:!0})})).then((function(t){for(var n=t.items,i=[],o=0,s=n.length;o0)return a.matchIdx=t?a.matchIdx-1:a.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(t)}this._nextPageMatch()}}else this._updateUIState(c.FOUND)}},{key:"_matchesReady",value:function(e){var t=this._offset,r=e.length,n=this._state.findPrevious;return r?(t.matchIdx=n?r-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(n),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}},{key:"_nextPageMatch",value:function(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");var e=null;do{var t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}},{key:"_advanceOffsetPage",value:function(e){var t=this._offset,r=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=r||t.pageIdx<0)&&(t.pageIdx=e?r-1:0,t.wrapped=!0)}},{key:"_updateMatch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=c.NOT_FOUND,r=this._offset.wrapped;if(this._offset.wrapped=!1,e){var n=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=r?c.WRAPPED:c.FOUND,-1!==n&&n!==this._selected.pageIdx&&this._updatePage(n)}this._updateUIState(t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}},{key:"_onFindBarClose",value:function(e){var t=this,r=this._pdfDocument;this._firstPageCapability.promise.then((function(){!t._pdfDocument||r&&t._pdfDocument!==r||(t._findTimeout&&(clearTimeout(t._findTimeout),t._findTimeout=null),t._resumePageIdx&&(t._resumePageIdx=null,t._dirtyMatch=!0),t._updateUIState(c.FOUND),t._highlightMatches=!1,t._updateAllPages())}))}},{key:"_requestMatchesCount",value:function(){var e=this._selected,t=e.pageIdx,r=e.matchIdx,n=0,i=this._matchesCountTotal;if(-1!==r){for(var a=0;ai)&&(n=i=0),{current:n,total:i}}},{key:"_updateUIResultsCount",value:function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}},{key:"_updateUIState",value:function(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount(),rawQuery:this._state?this._state.query:null})}},{key:"highlightMatches",get:function(){return this._highlightMatches}},{key:"pageMatches",get:function(){return this._pageMatches}},{key:"pageMatchesLength",get:function(){return this._pageMatchesLength}},{key:"selected",get:function(){return this._selected}},{key:"state",get:function(){return this._state}},{key:"_query",get:function(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=v(this._state.query)),this._normalizedQuery}}]),e}();t.PDFFindController=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCharacterType=p,t.CharacterType=void 0;var n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function i(e){return e<11904}function a(e){return 0===(65408&e)}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function s(e){return e>=48&&e<=57}function u(e){return 32===e||9===e||13===e||10===e}function c(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}function l(e){return e>=12448&&e<=12543}function h(e){return e>=12352&&e<=12447}function f(e){return e>=65376&&e<=65439}function d(e){return 3584===(65408&e)}function p(e){return i(e)?a(e)?u(e)?n.SPACE:o(e)||s(e)||95===e?n.ALPHA_LETTER:n.PUNCT:d(e)?n.THAI_LETTER:160===e?n.SPACE:n.ALPHA_LETTER:c(e)?n.HAN_LETTER:l(e)?n.KATAKANA_LETTER:h(e)?n.HIRAGANA_LETTER:f(e)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER}t.CharacterType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDestHashesEqual=b,t.isDestArraysEqual=_,t.PDFHistory=void 0;var n=r(3);function i(e){return i="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},i(e)}function a(e,t){return l(e)||c(e,t)||s(e,t)||o()}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis._maxUid&&(this._maxUid=this._uid),void 0!==f.rotation&&(this._initialRotation=f.rotation),f.dest?(this._initialBookmark=JSON.stringify(f.dest),this._destination.page=null):f.hash?this._initialBookmark=f.hash:f.page&&(this._initialBookmark="page=".concat(f.page))}else console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}},{key:"reset",value:function(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}},{key:"push",value:function(e){var t=this,r=e.namedDest,n=void 0===r?null:r,i=e.explicitDest,a=e.pageNumber;if(this._initialized)if(n&&"string"!==typeof n)console.error("PDFHistory.push: "+'"'.concat(n,'" is not a valid namedDest parameter.'));else if(Array.isArray(i))if(Number.isInteger(a)&&a>0&&a<=this.linkService.pagesCount||null===a&&!this._destination){var o=n||JSON.stringify(i);if(o){var s=!1;if(this._destination&&(b(this._destination.hash,o)||_(this._destination.dest,i))){if(this._destination.page)return;s=!0}this._popStateInProgress&&!s||(this._pushOrReplaceState({dest:i,hash:o,page:a,rotation:this.linkService.rotation},s),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((function(){t._popStateInProgress=!1}))))}}else console.error("PDFHistory.push: "+'"'.concat(a,'" is not a valid pageNumber parameter.'));else console.error("PDFHistory.push: "+'"'.concat(i,'" is not a valid explicitDest parameter.'))}},{key:"pushCurrentPosition",value:function(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}},{key:"back",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid>0&&window.history.back()}}},{key:"forward",value:function(){if(this._initialized&&!this._popStateInProgress){var e=window.history.state;this._isValidState(e)&&e.uid1&&void 0!==arguments[1]&&arguments[1],n=r||!this._destination,i={fingerprint:this._fingerprint,uid:n?this._uid:this._uid+1,destination:e};if(this._updateInternalState(e,i.uid),this._updateUrl&&e&&e.hash){var a=document.location.href.split("#")[0];a.startsWith("file://")||(t="".concat(a,"#").concat(e.hash))}n?window.history.replaceState(i,"",t):(this._maxUid=this._uid,window.history.pushState(i,"",t))}},{key:"_tryPushCurrentPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._position){var t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),this._destination){if(this._destination.temporary)this._pushOrReplaceState(t,!0);else if(this._destination.hash!==t.hash&&(this._destination.page||!(v<=0||this._numPositionUpdates<=v))){var r=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first)return;r=!0}this._pushOrReplaceState(t,r)}}else this._pushOrReplaceState(t)}}},{key:"_isValidState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!t)return!1;if("string"!==typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;var r=performance.getEntriesByType("navigation"),n=a(r,1),o=n[0];if(!o||"reload"!==o.type)return!1}return!(!Number.isInteger(e.uid)||e.uid<0)&&(null!==e.destination&&"object"===i(e.destination))}},{key:"_updateInternalState",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),r&&e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=unescape(y()).substring(1),r=(0,n.parseQueryString)(t),i=r.nameddest||"",a=0|r.page;return Number.isInteger(a)&&a>0&&a<=this.linkService.pagesCount&&!(e&&i.length>0)||(a=null),{hash:t,page:a,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function(e){var t=this,r=e.location;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page=".concat(r.pageNumber):r.pdfOpenParams.substring(1),page:this.linkService.page,first:r.pageNumber,rotation:r.rotation},this._popStateInProgress||(v>0&&this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,g>0&&(this._updateViewareaTimeout=setTimeout((function(){t._popStateInProgress||t._tryPushCurrentPosition(!0),t._updateViewareaTimeout=null}),g)))}},{key:"_popState",value:function(e){var t=this,r=e.state,i=y(),a=this._currentHash!==i;if(this._currentHash=i,r){if(this._isValidState(r)){this._popStateInProgress=!0,a&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:p}).then((function(){t._blockHashChange--})));var o=r.destination;this._updateInternalState(o,r.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,n.isValidRotation)(o.rotation)&&(this.linkService.rotation=o.rotation),o.dest?this.linkService.navigateTo(o.dest):o.hash?this.linkService.setHash(o.hash):o.page&&(this.linkService.page=o.page),Promise.resolve().then((function(){t._popStateInProgress=!1}))}}else{this._uid++;var s=this._parseCurrentHash(),u=s.hash,c=s.page,l=s.rotation;this._pushOrReplaceState({hash:u,page:c,rotation:l},!0)}}},{key:"_pageHide",value:function(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}},{key:"_unbindEvents",value:function(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}},{key:"popStateInProgress",get:function(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}},{key:"initialBookmark",get:function(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function(){return this._initialized?this._initialRotation:null}}]),e}();function b(e,t){if("string"!==typeof e||"string"!==typeof t)return!1;if(e===t)return!0;var r=(0,n.parseQueryString)(e),i=r.nameddest;return i===t}function _(e,t){function r(e,t){if(i(e)!==i(t))return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!==e&&"object"===i(e)&&null!==t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!r(e[n],t[n]))return!1;return!0}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0,a=e.length;n0&&void 0!==arguments[0]&&arguments[0];if(this.zoomLayer){var t=this.zoomLayer.firstChild;this.paintedViewportMap["delete"](t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.cancelRendering(t),this.renderingState=o.RenderingStates.INITIAL;var r=this.div;r.style.width=Math.floor(this.viewport.width)+"px",r.style.height=Math.floor(this.viewport.height)+"px";for(var n=r.childNodes,i=e&&this.zoomLayer||null,a=t&&this.annotationLayer&&this.annotationLayer.div||null,s=n.length-1;s>=0;s--){var u=n[s];i!==u&&a!==u&&r.removeChild(u)}r.removeAttribute("data-loaded"),a?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),i||(this.canvas&&(this.paintedViewportMap["delete"](this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap["delete"](this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",r.appendChild(this.loadingIconDiv)}},{key:"update",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.scale=e||this.scale,"undefined"!==typeof t&&(this.rotation=t),r instanceof Promise&&(this._optionalContentConfigPromise=r);var n=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:n}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});var a=!1;if(this.canvas&&this.maxCanvasPixels>0){var o=this.outputScale;(Math.floor(this.viewport.width)*o.sx|0)*(Math.floor(this.viewport.height)*o.sy|0)>this.maxCanvasPixels&&(a=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&a)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}},{key:"cancelRendering",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!e&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}},{key:"cssTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.viewport.width,n=this.viewport.height,i=this.div;e.style.width=e.parentNode.style.width=i.style.width=Math.floor(r)+"px",e.style.height=e.parentNode.style.height=i.style.height=Math.floor(n)+"px";var a=this.viewport.rotation-this.paintedViewportMap.get(e).rotation,o=Math.abs(a),s=1,u=1;90!==o&&270!==o||(s=n/r,u=r/n);var c="rotate("+a+"deg) scale("+s+","+u+")";if(e.style.transform=c,this.textLayer){var l=this.textLayer.viewport,h=this.viewport.rotation-l.rotation,f=Math.abs(h),d=r/l.width;90!==f&&270!==f||(d=r/l.height);var p,v,g=this.textLayer.textLayerDiv;switch(f){case 0:p=v=0;break;case 90:p=0,v="-"+g.style.height;break;case 180:p="-"+g.style.width,v="-"+g.style.height;break;case 270:p="-"+g.style.width,v=0;break;default:console.error("Bad rotation value.");break}g.style.transform="rotate("+f+"deg) scale("+d+", "+d+") translate("+p+", "+v+")",g.style.transformOrigin="0% 0%"}t&&this.annotationLayer&&this._renderAnnotationLayer()}},{key:"getPagePoint",value:function(e,t){return this.viewport.convertToPdfPoint(e,t)}},{key:"draw",value:function(){var e=this;this.renderingState!==o.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());var t=this.div,r=this.pdfPage;if(!r)return this.renderingState=o.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=o.RenderingStates.RUNNING;var s=document.createElement("div");s.style.width=t.style.width,s.style.height=t.style.height,s.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?t.insertBefore(s,this.annotationLayer.div):t.appendChild(s);var u=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){var c=document.createElement("div");c.className="textLayer",c.style.width=s.style.width,c.style.height=s.style.height,this.annotationLayer&&this.annotationLayer.div?t.insertBefore(c,this.annotationLayer.div):t.appendChild(c),u=this.textLayerFactory.createTextLayerBuilder(c,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=u;var h=null;this.renderingQueue&&(h=function(t){if(!e.renderingQueue.isHighestPriority(e))return e.renderingState=o.RenderingStates.PAUSED,void(e.resume=function(){e.renderingState=o.RenderingStates.RUNNING,t()});t()});var f=function(){var i=l(n["default"].mark((function i(s){return n["default"].wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(d===e.paintTask&&(e.paintTask=null),!(s instanceof a.RenderingCancelledException)){n.next=4;break}return e.error=null,n.abrupt("return");case 4:if(e.renderingState=o.RenderingStates.FINISHED,e.loadingIconDiv&&(t.removeChild(e.loadingIconDiv),delete e.loadingIconDiv),e._resetZoomLayer(!0),e.error=s,e.stats=r.stats,e.eventBus.dispatch("pagerendered",{source:e,pageNumber:e.id,cssTransform:!1,timestamp:performance.now()}),!s){n.next=12;break}throw s;case 12:case"end":return n.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),d=this.renderer===i.RendererType.SVG?this.paintOnSvg(s):this.paintOnCanvas(s);d.onRenderContinue=h,this.paintTask=d;var p=d.promise.then((function(){return f(null).then((function(){if(u){var e=r.streamTextContent({normalizeWhitespace:!0});u.setTextContentStream(e),u.render()}}))}),(function(e){return f(e)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(t,r,this._annotationStorage,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this._renderAnnotationLayer()),t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),p}},{key:"paintOnCanvas",value:function(e){var t=(0,a.createPromiseCapability)(),r={promise:t.promise,onRenderContinue:function(e){e()},cancel:function(){m.cancel()}},n=this.viewport,o=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((function(e){o.setAttribute("aria-label",e)})),o.setAttribute("hidden","hidden");var s=!0,u=function(){s&&(o.removeAttribute("hidden"),s=!1)};e.appendChild(o),this.canvas=o,o.mozOpaque=!0;var c=o.getContext("2d",{alpha:!1}),l=(0,i.getOutputScale)(c);if(this.outputScale=l,this.useOnlyCssZoom){var h=n.clone({scale:i.CSS_UNITS});l.sx*=h.width/n.width,l.sy*=h.height/n.height,l.scaled=!0}if(this.maxCanvasPixels>0){var f=n.width*n.height,d=Math.sqrt(this.maxCanvasPixels/f);l.sx>d||l.sy>d?(l.sx=d,l.sy=d,l.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}var p=(0,i.approximateFraction)(l.sx),v=(0,i.approximateFraction)(l.sy);o.width=(0,i.roundToDivide)(n.width*l.sx,p[0]),o.height=(0,i.roundToDivide)(n.height*l.sy,v[0]),o.style.width=(0,i.roundToDivide)(n.width,p[1])+"px",o.style.height=(0,i.roundToDivide)(n.height,v[1])+"px",this.paintedViewportMap.set(o,n);var g=l.scaled?[l.sx,0,0,l.sy,0,0]:null,y={canvasContext:c,transform:g,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms,optionalContentConfigPromise:this._optionalContentConfigPromise},m=this.pdfPage.render(y);return m.onContinue=function(e){u(),r.onRenderContinue?r.onRenderContinue(e):e()},m.promise.then((function(){u(),t.resolve(void 0)}),(function(e){u(),t.reject(e)})),r}},{key:"paintOnSvg",value:function(e){var t=this,r=!1,n=function(){if(r)throw new a.RenderingCancelledException("Rendering cancelled, page ".concat(t.id),"svg")},s=this.pdfPage,u=this.viewport.clone({scale:i.CSS_UNITS}),c=s.getOperatorList().then((function(r){n();var i=new a.SVGGraphics(s.commonObjs,s.objs);return i.getSVG(r,u).then((function(r){n(),t.svg=r,t.paintedViewportMap.set(r,u),r.style.width=e.style.width,r.style.height=e.style.height,t.renderingState=o.RenderingStates.FINISHED,e.appendChild(r)}))}));return{promise:c,onRenderContinue:function(e){e()},cancel:function(){r=!0}}}},{key:"setPageLabel",value:function(e){this.pageLabel="string"===typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}},{key:"width",get:function(){return this.viewport.width}},{key:"height",get:function(){return this.viewport.height}}]),e}();t.PDFPageView=v},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),c(y(r.prototype),"_scrollIntoView",this).call(this,{pageDiv:n,pageSpot:a,pageNumber:s}),this._updateScrollDown=function(){t.scroll.down=u,t._updateScrollDown=null}}},{key:"_getVisiblePages",value:function(){return this._getCurrentVisiblePage()}},{key:"_updateHelper",value:function(e){}},{key:"_updateScrollMode",value:function(){}},{key:"_updateSpreadMode",value:function(){}},{key:"_viewerElement",get:function(){return(0,i.shadow)(this,"_viewerElement",this._shadowViewer)}},{key:"_isScrollModeHorizontal",get:function(){return(0,i.shadow)(this,"_isScrollModeHorizontal",!1)}}]),r}(n.BaseViewer);t.PDFSinglePageViewer=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewer=void 0;var n=r(3),i=r(17),a=r(1),o=r(2),s=r(16),u=r(7),c=r(8);function l(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(s)throw a}}}}function h(e,t){if(e){if("string"===typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&t.splice(n,1),t.push(r),t.length>e&&t.shift().destroy()},this.resize=function(r,i){if(e=r,i){for(var a=new Set,o=0,s=i.length;oe)t.shift().destroy()}}function m(e,t){return t===e||Math.abs(t-e)<1e-15}var b=function(){function e(t){var r=this;if(d(this,e),this.constructor===e)throw new Error("Cannot initialize BaseViewer.");if(this._name=this.constructor.name,this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,!(this.container instanceof HTMLDivElement&&this.viewer instanceof HTMLDivElement))throw new Error("Invalid `container` and/or `viewer` option.");this.eventBus=t.eventBus,this.linkService=t.linkService||new u.SimpleLinkService,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,this.removePageBorders=t.removePageBorders||!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms="boolean"!==typeof t.renderInteractiveForms||t.renderInteractiveForms,this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n||n.NullL10n,this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new i.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then((function(){r.eventBus.dispatch("baseviewerinit",{source:r})}))}return v(e,[{key:"getPageView",value:function(e){return this._pages[e]}},{key:"_setCurrentPageNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._currentPageNumber===e?(t&&this._resetCurrentPageView(),!0):07500)t._pagesCapability.resolve();else{var n=r-1;if(n<=0)t._pagesCapability.resolve();else for(var i=function(r){e.getPage(r).then((function(e){var i=t._pages[r-1];i.pdfPage||i.setPdfPage(e),t.linkService.cachePageRef(r,e.ref),0===--n&&t._pagesCapability.resolve()}),(function(e){console.error("Unable to get page ".concat(r," to initialize viewer"),e),0===--n&&t._pagesCapability.resolve()}))},a=2;a<=r;++a)i(a)}})),t.eventBus.dispatch("pagesinit",{source:t}),t.defaultRenderingQueue&&t.update()}))["catch"]((function(e){console.error("Unable to initialize viewer",e)}))}}},{key:"setPageLabels",value:function(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error("".concat(this._name,".setPageLabels: Invalid page labels."))):this._pageLabels=null;for(var t=0,r=this._pages.length;t2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this._currentScaleValue=t.toString(),m(this._currentScale,e))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{for(var i=0,a=this._pages.length;i1&&void 0!==arguments[1]&&arguments[1],r=parseFloat(e);if(r>0)this._setScaleUpdatePages(r,e,t,!1);else{var i=this._pages[this._currentPageNumber-1];if(!i)return;var a=this.isInPresentationMode||this.removePageBorders,o=a?0:n.SCROLLBAR_PADDING,s=a?0:n.VERTICAL_PADDING;if(!a&&this._isScrollModeHorizontal){var u=[s,o];o=u[0],s=u[1]}var c=(this.container.clientWidth-o)/i.width*i.scale,l=(this.container.clientHeight-s)/i.height*i.scale;switch(e){case"page-actual":r=1;break;case"page-width":r=c;break;case"page-height":r=l;break;case"page-fit":r=Math.min(c,l);break;case"auto":var h=(0,n.isPortraitOrientation)(i)?c:Math.min(l,c);r=Math.min(n.MAX_AUTO_SCALE,h);break;default:return void console.error("".concat(this._name,'._setScale: "').concat(e,'" is an unknown zoom value.'))}this._setScaleUpdatePages(r,e,t,!0)}}},{key:"_resetCurrentPageView",value:function(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0);var e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}},{key:"scrollPageIntoView",value:function(e){var t=e.pageNumber,r=e.destArray,i=void 0===r?null:r,a=e.allowNegativeOffset,o=void 0!==a&&a,s=e.ignoreDestinationZoom,u=void 0!==s&&s;if(this.pdfDocument){var c=Number.isInteger(t)&&this._pages[t-1];if(c)if(!this.isInPresentationMode&&i){var l,h,f=0,d=0,p=0,v=0,g=c.rotation%180!==0,y=(g?c.height:c.width)/c.scale/n.CSS_UNITS,m=(g?c.width:c.height)/c.scale/n.CSS_UNITS,b=0;switch(i[1].name){case"XYZ":f=i[2],d=i[3],b=i[4],f=null!==f?f:0,d=null!==d?d:m;break;case"Fit":case"FitB":b="page-fit";break;case"FitH":case"FitBH":d=i[2],b="page-width",null===d&&this._location&&(f=this._location.left,d=this._location.top);break;case"FitV":case"FitBV":f=i[2],p=y,v=m,b="page-height";break;case"FitR":f=i[2],d=i[3],p=i[4]-f,v=i[5]-d;var _=this.removePageBorders?0:n.SCROLLBAR_PADDING,w=this.removePageBorders?0:n.VERTICAL_PADDING;l=(this.container.clientWidth-_)/p/n.CSS_UNITS,h=(this.container.clientHeight-w)/v/n.CSS_UNITS,b=Math.min(Math.abs(l),Math.abs(h));break;default:return void console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(i[1].name,'" is not a valid destination type.'))}if(u||(b&&b!==this._currentScale?this.currentScaleValue=b:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),"page-fit"!==b||i[4]){var S=[c.viewport.convertToViewportPoint(f,d),c.viewport.convertToViewportPoint(f+p,d+v)],A=Math.min(S[0][0],S[1][0]),k=Math.min(S[0][1],S[1][1]);o||(A=Math.max(A,0),k=Math.max(k,0)),this._scrollIntoView({pageDiv:c.div,pageSpot:{left:A,top:k},pageNumber:t})}else this._scrollIntoView({pageDiv:c.div,pageNumber:t})}else this._setCurrentPageNumber(t,!0);else console.error("".concat(this._name,".scrollPageIntoView: ")+'"'.concat(t,'" is not a valid pageNumber parameter.'))}}},{key:"_updateLocation",value:function(e){var t=this._currentScale,r=this._currentScaleValue,n=parseFloat(r)===t?Math.round(1e4*t)/100:r,i=e.id,a="#page="+i;a+="&zoom="+n;var o=this._pages[i-1],s=this.container,u=o.getPagePoint(s.scrollLeft-e.x,s.scrollTop-e.y),c=Math.round(u[0]),l=Math.round(u[1]);a+=","+c+","+l,this._location={pageNumber:i,scale:n,top:l,left:c,rotation:this._pagesRotation,pdfOpenParams:a}}},{key:"_updateHelper",value:function(e){throw new Error("Not implemented: _updateHelper")}},{key:"update",value:function(){var e=this._getVisiblePages(),t=e.views,r=t.length;if(0!==r){var n=Math.max(g,2*r+1);this._buffer.resize(n,t),this.renderingQueue.renderHighestPriority(e),this._updateHelper(t),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}}},{key:"containsElement",value:function(e){return this.container.contains(e)}},{key:"focus",value:function(){this.container.focus()}},{key:"_getCurrentVisiblePage",value:function(){if(!this.pagesCount)return{views:[]};var e=this._pages[this._currentPageNumber-1],t=e.div,r={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:r,last:r,views:[r]}}},{key:"_getVisiblePages",value:function(){return(0,n.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}},{key:"isPageVisible",value:function(e){return!!this.pdfDocument&&(e<1||e>this.pagesCount?(console.error("".concat(this._name,'.isPageVisible: "').concat(e,'" is out of bounds.')),!1):this._getVisiblePages().views.some((function(t){return t.id===e})))}},{key:"cleanup",value:function(){for(var e=0,t=this._pages.length;e3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;return new c.TextLayerBuilder({textLayerDiv:e,eventBus:i,pageIndex:t,viewport:r,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&n})}},{key:"createAnnotationLayerBuilder",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:n.NullL10n;return new a.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,annotationStorage:r,imageResourcesPath:i,renderInteractiveForms:o,linkService:this.linkService,downloadManager:this.downloadManager,l10n:s})}},{key:"getPagesOverview",value:function(){var e=this._pages.map((function(e){var t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));return this.enablePrintAutoRotate?e.map((function(e){return(0,n.isPortraitOrientation)(e)?e:{width:e.height,height:e.width,rotation:(e.rotation+90)%360}})):e}},{key:"_updateScrollMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this._scrollMode,r=this.viewer;r.classList.toggle("scrollHorizontal",t===n.ScrollMode.HORIZONTAL),r.classList.toggle("scrollWrapped",t===n.ScrollMode.WRAPPED),this.pdfDocument&&e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}},{key:"_updateSpreadMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var t=this.viewer,r=this._pages;if(t.textContent="",this._spreadMode===n.SpreadMode.NONE)for(var i=0,a=r.length;i=0&&(t=r+1)}this._setCurrentPageNumber(t,!0)||console.error("".concat(this._name,'.currentPageLabel: "').concat(e,'" is not a valid page.'))}}},{key:"currentScale",get:function(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE},set:function(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}},{key:"currentScaleValue",get:function(){return this._currentScaleValue},set:function(e){this.pdfDocument&&this._setScale(e,!1)}},{key:"pagesRotation",get:function(){return this._pagesRotation},set:function(e){if(!(0,n.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument&&this._pagesRotation!==e){this._pagesRotation=e;for(var t=this._currentPageNumber,r=0,i=this._pages.length;rthis.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}},{key:"hasEqualPageSizes",get:function(){for(var e=this._pages[0],t=1,r=this._pages.length;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r["return"]||r["return"]()}finally{if(u)throw a}}}}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rl+h)&&(i={left:0,top:0})}f(_(r.prototype),"_scrollIntoView",this).call(this,{pageDiv:t,pageSpot:i,pageNumber:o})}},{key:"_getVisiblePages",value:function(){return this.isInPresentationMode?this._getCurrentVisiblePage():f(_(r.prototype),"_getVisiblePages",this).call(this)}},{key:"_updateHelper",value:function(e){if(!this.isInPresentationMode){var t,r=this._currentPageNumber,n=!1,i=o(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.percent<100)break;if(a.id===r){n=!0;break}}}catch(s){i.e(s)}finally{i.f()}n||(r=e[0].id),this._setCurrentPageNumber(r)}}},{key:"_viewerElement",get:function(){return(0,i.shadow)(this,"_viewerElement",this.viewer)}}]),r}(n.BaseViewer);t.PDFViewer=w}])}))},dd22:function(e,t,r){"use strict";var n,i,a={props:{initial:{type:Boolean,default:!1}},data:function(){return{size:{width:-1,height:-1}}},methods:{reset:function(){var e=this.$el.firstChild,t=this.$el.lastChild;e.scrollLeft=1e5,e.scrollTop=1e5,t.scrollLeft=1e5,t.scrollTop=1e5},update:function(){this.size.width=this.$el.offsetWidth,this.size.height=this.$el.offsetHeight}},watch:{size:{deep:!0,handler:function(e){this.reset(),this.$emit("resize",{width:this.size.width,height:this.size.height})}}},render:function(e){var t="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",r="position: absolute; left: 0; top: 0;";return e("div",{style:t+"animation-name: resizeSensorVisibility;",on:{"~animationstart":this.update}},[e("div",{style:t,on:{scroll:this.update}},[e("div",{style:r+"width: 100000px; height: 100000px;"})]),e("div",{style:t,on:{scroll:this.update}},[e("div",{style:r+"width: 200%; height: 200%;"})])])},beforeDestroy:function(){this.$emit("resize",{width:0,height:0}),this.$emit("resizeSensorBeforeDestroy")},mounted:function(){if(!0===this.initial&&this.$nextTick(this.update),this.$el.offsetParent!==this.$el.parentNode&&(this.$el.parentNode.style.position="relative"),"attachEvent"in this.$el&&!("AnimationEvent"in window)){var e=function(){this.update(),t()}.bind(this),t=function(){this.$el.detachEvent("onresize",e),this.$off("resizeSensorBeforeDestroy",t)}.bind(this);this.$el.attachEvent("onresize",e),this.$on("resizeSensorBeforeDestroy",t),this.reset()}}},o=a,s=(r("34df"),r("1805")),u=Object(s["a"])(o,n,i,!1,null,null,null),c=u.exports,l=function(e){var t=e.createLoadingTask,r=e.PDFJSWrapper;return{createLoadingTask:t,render:function(e){return e("span",{attrs:{style:"position: relative; display: block"}},[e("canvas",{attrs:{style:"display: inline-block; width: 100%; height: 100%; vertical-align: top"},ref:"canvas"}),e("span",{style:"display: inline-block; width: 100%; height: 100%",class:"annotationLayer",ref:"annotationLayer"}),e(c,{props:{initial:!0},on:{resize:this.resize}})])},props:{src:{type:[String,Object,Uint8Array],default:""},page:{type:Number,default:1},rotate:{type:Number}},watch:{src:function(){this.pdf.loadDocument(this.src)},page:function(){this.pdf.loadPage(this.page,this.rotate)},rotate:function(){this.pdf.renderPage(this.rotate)}},methods:{resize:function(e){if(null!==this.$el.parentNode&&(0!==e.width||0!==e.height)){this.$refs.canvas.style.height=this.$refs.canvas.offsetWidth*(this.$refs.canvas.height/this.$refs.canvas.width)+"px";var t=this.pdf.getResolutionScale();(t<.85||t>1.15)&&this.pdf.renderPage(this.rotate)}},print:function(e,t){this.pdf.printPage(e,t)}},mounted:function(){this.pdf=new r(this.$refs.canvas,this.$refs.annotationLayer,this.$emit.bind(this)),this.$on("loaded",(function(){this.pdf.loadPage(this.page,this.rotate)})),this.$on("page-size",(function(e,t){this.$refs.canvas.style.height=this.$refs.canvas.offsetWidth*(t/e)+"px"})),this.pdf.loadDocument(this.src)},destroyed:function(){this.pdf.destroy()}}};if("server"!==Object({NODE_ENV:"production",BASE_URL:"/"}).VUE_ENV){var h=r("1244").default,f=r("654c");if("undefined"!==typeof window&&"Worker"in window&&-1===navigator.appVersion.indexOf("MSIE 10")){var d=r("4d7f");f.GlobalWorkerOptions.workerPort=new d}var p=l(h(f))}else p=l({});var v,g,y=p,m=y,b=(r("0b3f"),Object(s["a"])(m,v,g,!1,null,null,null));t["a"]=b.exports},f4a7:function(e,t,r){}}]);