From 994f9b771a5ac1f8946fc25bef9c29433e03dd9a Mon Sep 17 00:00:00 2001 From: xujiujiu <906784584@qq.com> Date: Sat, 21 Dec 2024 13:25:55 +0000 Subject: [PATCH] pdf-view version 1.0.6 --- README.md | 62 ++++++++++++++----- dist/index.js | 8 +-- example/example/react_demo/src/App.js | 6 +- example/example/vue3/package.json | 2 +- .../vue3/src/components/HelloWorld.vue | 26 ++++---- example/example/vue3/src/main.js | 2 +- example/example/vue3/vite.config.js | 9 +++ package.json | 2 +- 8 files changed, 77 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index d2062a0..51cc190 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,41 @@ 也可在项目中通过new PdfViewLib() 的方式调用 -## 使用方式 +## 安装 +支持 script 标签安装和 npm 安装方式 + +### npm 安装方式 -安装依赖 +```bash +npm install pdfview-dist ``` -npm i pdfview-dist + +具体使用方法参考[使用方法](#使用方式) + +### script 标签安装方式 + ++ 引入js + +```html + +``` + ++ 引入css(仅在使用[模块调用模式](#方式2模块调用模式)需要) + +```html + ``` -模块提供了2种使用方式,支持一些不支持使用 webComponent 的 场景 + ++ 注册组件 +```js +// 可全局注册对应组件 +PdfViewRegistry('pdf-view') +``` + +具体使用方法也可参考[使用方法](#使用方式) + +## 使用方式 +本模块模块提供了2种使用方式,支持一些不支持使用 webComponent 的 场景 ### 方式1: webcomponent 组件注册模式 @@ -69,7 +97,7 @@ const App = { } } ``` - +### 按需加载 若按需加载组件,如只在某个页面中使用,由于 pdf 组件在弱网环境下,加载较慢。为了更好的体验,可以使用加载状态的占位符和渲染条件判断,来控制 pdf 组件的显示 ``` js @@ -110,23 +138,25 @@ created() { }); }, ``` +## API接口方法 -## API +### API | 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------------- | ------- | ------ | ---- | --------------------------------------------------------------------- | -| source | string | ArrayBuffer | '' | 是 | pdf资源,支持http协议或ArrayBuffer 类型数据 | +| source | string/ArrayBuffer | '' | 是 | pdf资源,支持http协议或ArrayBuffer 类型数据 | | width | number | | 否 | 组件宽度,默认100% | | height | number | | 否 | 组件高度,默认100% | -| limit | number | | 否 | 最大渲染 pdf 的页数 | +| limit | number | | 否 | 分片渲染 pdf 的最大页数, 默认10 | | cmap-url | string | | 否 | 字体的cmaps文件夹路径,如 https://unpkg.com/pdfjs-dist@2.5.207/cmaps/ | | hide-page-num | boolean | false | 否 | 不展示左上角页码 | +| hide-back-top | boolean | false | 否 | 不展示右下角回到顶部按钮 | | scale | number | 1 | 否 | 当前展示倍数,默认1倍 | | max-zoom | number | 2 | 否 | 双击缩放倍数,范围1+ | | zoom-disabled | boolean | false | 否 | 是否关闭双击缩放 | -| canvas-id-prefix | string | | 否 | canvas id 前缀 | +| page-id-prefix | string | | 否 | pdf 页面元素的 id 前缀 | -## on事件 +### 事件 | 事件名 | 出参 | 说明 | @@ -138,18 +168,16 @@ created() { | error | { code: number, message: 错误提示 } | 是否已完成阅读事件 | - -## 函数方法 +### 函数方法 | 方法名 | 入参 | 传参取值 | 说明 | | ------- | ------ | ------ |--------------------- | | setZoom | Boolean | 默认为false | 控制双击缩放功能 | -| goto | Number | | 跳转第几页 | -| clearPdf | | | 清除pdf 渲染内容 | - +| goto | Number | | 跳转第几页 | +| clearPdf | | | 清除 pdf 渲染内容 | -## 兼容性: +# 兼容性: | 系统 | 版本 | 说明 | | ------- | ------ | --------------------- | @@ -158,7 +186,7 @@ created() { | chrome | 78+ | - | | safari | 11.1+ | - | -## 依赖 +# 依赖 | 插件名 | 版本 | 说明 | | ------- | ------ | --------------------- | | pdfjs-dist | 2.5.207 | - | \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index e8369d0..56ddb9f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,6 +1,6 @@ /*! - * pdfjs-view v1.0.5 - * (c) 2024-12-11 + * pdfjs-view v1.0.6 + * (c) 2024-12-21 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["pdfjs-view"]=t()}(this,(function(){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getAugmentedNamespace(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')} /** @@ -236,7 +236,7 @@ const previousStylePropertyCache=new WeakMap,styleMap$3=directive((e=>t=>{if(!(t * @licend The above is the entire license notice for the * Javascript code in this page */ -(function(module,exports){var factory;factory=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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){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 a.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return a.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return a.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return a.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return a.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return a.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return i.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return i.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return i.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return i.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return i.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return i.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return i.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return i.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return i.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return i.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return i.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return i.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return i.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return i.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return i.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 c.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return u.SVGGraphics}});var n=r(1),a=r(198),i=r(5),o=r(209),s=r(200),c=r(203),l=r(210),u=r(211);if(r(7).isNodeJS){var h=r(212).PDFNodeStream;(0,a.setPDFNetworkStreamFactory)((function(e){return new h(e)}))}else{var f,d=r(215).PDFNetworkStream;(0,n.isFetchSupported)()&&(f=r(216).PDFFetchStream),(0,a.setPDFNetworkStreamFactory)((function(e){return f&&(0,n.isValidFetchUrl)(e.url)?new f(e):new d(e)}))}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(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 c=(0,i.removeNullCharacters)(r);s?e.href=e.title=c:(e.href="",e.title="Disabled: ".concat(c),e.onclick=function(){return!1});var l="";switch(n){case A.NONE:break;case A.SELF:l="_self";break;case A.BLANK:l="_blank";break;case A.PARENT:l="_parent";break;case A.TOP:l="_top"}e.target=l,e.rel="string"==typeof a?a:v},t.getFilenameFromUrl=function(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.isFetchSupported=P,t.isValidFetchUrl=T,t.loadScript=function(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)}))},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(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}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,o=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(y,"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(y,e)}}]),e}();t.DOMSVGFactory=S;var k=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,i=t.offsetX,o=void 0===i?0:i,s=t.offsetY,c=void 0===s?0:s,l=t.dontFlip,u=void 0!==l&&l;p(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=o,this.offsetY=c;var h,f,d,g,m,v,y,b,w=(r[2]+r[0])/2,S=(r[3]+r[1])/2;switch(a=(a%=360)<0?a+360:a){case 180:h=-1,f=0,d=0,g=1;break;case 90:h=0,f=1,d=1,g=0;break;case 270:h=0,f=-1,d=-1,g=0;break;case 0:h=1,f=0,d=0,g=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}u&&(d=-d,g=-g),0===h?(m=Math.abs(S-r[1])*n+o,v=Math.abs(w-r[0])*n+c,y=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(m=Math.abs(w-r[0])*n+o,v=Math.abs(S-r[1])*n+c,y=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,g*n,m-h*n*w-d*n*S,v-f*n*w-g*n*S],this.width=y,this.height=b}return m(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,a=t.rotation,i=void 0===a?this.rotation:a,o=t.offsetX,s=void 0===o?this.offsetX:o,c=t.offsetY,l=void 0===c?this.offsetY:c,u=t.dontFlip,h=void 0!==u&&u;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:i,offsetX:s,offsetY:l,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=k;var _=function(e){!function(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&&l(e,t)}(r,e);var t=u(r);function r(e,n){var a;return p(this,r),(a=t.call(this,e)).type=n,a}return r}(i.BaseException);t.RenderingCancelledException=_;var A={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=A;var x,C=function(){function e(){p(this,e),this.started=Object.create(null),this.times=[]}return m(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 a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var i,s=o(this.times);try{for(s.s();!(i=s.n()).done;){var c=i.value,l=c.end-c.start;t.push("".concat(c.name.padEnd(r)," ").concat(l,"ms\n"))}}catch(e){s.e(e)}finally{s.f()}return t.join("")}}]),e}();function P(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function T(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.StatTimer=C;var E=function(){function e(){p(this,e)}return m(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;x||(x=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=x.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 c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;var l=t[7]||"Z",u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(o+=u,s+=h):"+"===l&&(o-=u,s-=h),new Date(Date.UTC(r,n,a,o,s,c))}}]),e}();t.PDFDateString=E},function(e,t,r){e.exports=r(3)},function(e,t,r){(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,a=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),o=new T(n||[]);return i._invoke=function(e,t,r){var n=h;return function(a,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw i;return R()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(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===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(E([])));S&&S!==n&&a.call(S,o)&&(b=S);var k=y.prototype=m.prototype=Object.create(b);function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e,r){function n(i,o,s,c){var l=u(e[i],e,o);if("throw"!==l.type){var h=l.arg,f=h.value;return f&&"object"===t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(f).then((function(e){h.value=e,s(h)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;this._invoke=function(e,t){function a(){return new r((function(r,a){n(e,t,r,a)}))}return i=i?i.then(a,a):a()}}function x(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,x(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 a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,g;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(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,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){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){function n(e,t){for(var r=0;r=u.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.removeNullCharacters=function(e){return"string"!=typeof e?(f("The argument for removeNullCharacters must be a string."),e):e.replace(A,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=x,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n=u.WARNINGS&&console.log("Warning: ".concat(e))}function d(e){throw new Error(e)}function p(e,t){e||d(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=function(){function e(t){this.constructor===e&&d("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=m;var v=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).code=n,a}return r}(m);t.PasswordException=v;var y=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).details=n,a}return r}(m);t.UnknownErrorException=y;var b=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.InvalidPDFException=b;var w=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.MissingPDFException=w;var S=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).status=n,a}return r}(m);t.UnexpectedResponseException=S;var k=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.FormatError=k;var _=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.AbortException=_;var A=/\x00/g;function x(e){p("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;ne[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 a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=R;var O,I=[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],F=(O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var r=new Blob([e],{type:t});return URL.createObjectURL(r)}for(var n="data:".concat(t,";base64,"),a=0,i=e.length;a>2]+O[(3&o)<<4|s>>4]+O[a+1>6:64]+O[a+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),function(){if(i&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var a=void 0===n?[t,r]:[t,r,n];e.apply(this,a)},window.history.replaceState=function(e,r,n){var a=void 0===n?[e,r]:[e,r,n];t.apply(this,a)}}}(),String.prototype.startsWith||r(53),String.prototype.endsWith||r(64),String.prototype.includes||r(66),Array.prototype.includes||r(68),Array.from||r(76),Object.assign||r(98),Math.log2||(Math.log2=r(101)),Number.isNaN||(Number.isNaN=r(103)),Number.isInteger||(Number.isInteger=r(105)),Uint8Array.prototype.slice||r(108),globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(113)),globalThis.URL=r(136),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(143).ReadableStream)}(),globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(144)),globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(151)),globalThis.WeakMap||(globalThis.WeakMap=r(153)),globalThis.WeakSet||(globalThis.WeakSet=r(159)),String.prototype.codePointAt||r(161),String.fromCodePoint||(String.fromCodePoint=r(163)),globalThis.Symbol||r(165),String.prototype.padStart||r(188),String.prototype.padEnd||r(193),Object.values||(Object.values=r(195))}},function(e,t,r){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 a="object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=a},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){r(10)({global:!0},{globalThis:r(11)})},function(e,t,r){var n=r(11),a=r(12).f,i=r(26),o=r(29),s=r(30),c=r(40),l=r(52);e.exports=function(e,t){var r,u,h,f,d,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in t){if(f=t[u],h=e.noTargetGet?(d=a(r,u))&&d.value:r[u],!l(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&i(f,"sham",!0),o(r,u,f,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 commonjsGlobal&&commonjsGlobal)||Function("return this")()},function(e,t,r){var n=r(13),a=r(15),i=r(16),o=r(17),s=r(21),c=r(23),l=r(24),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(c(e,t))return i(!a.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(e){return!0}}},function(e,t,r){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,i=a&&!n.call({1:2},1);t.f=i?function(e){var t=a(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),a=r(20);e.exports=function(e){return n(a(e))}},function(e,t,r){var n=r(14),a=r(19),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?i.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(null==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,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;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),a=r(14),i=r(25);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),a=r(22),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(13),a=r(27),i=r(16);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),a=r(24),i=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}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),a=r(26),i=r(23),o=r(30),s=r(31),c=r(33),l=c.get,u=c.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),u(r).source=h.join("string"==typeof t?t:"")),e!==n?(c?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=r:a(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,r){var n=r(11),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),a=r(30),i="__core-js_shared__",o=n[i]||a(i,{});e.exports=o},function(e,t,r){var n,a,i,o=r(34),s=r(11),c=r(22),l=r(26),u=r(23),h=r(35),f=r(39),d=s.WeakMap;if(o){var p=new d,g=p.get,m=p.has,v=p.set;n=function(e,t){return v.call(p,e,t),t},a=function(e){return g.call(p,e)||{}},i=function(e){return m.call(p,e)}}else{var y=h("state");f[y]=!0,n=function(e,t){return l(e,y,t),t},a=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(11),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},function(e,t,r){var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,r){var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[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),a=r(41),i=r(12),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,c=i.f,l=0;lc;)n(s,r=t[c++])&&(~i(l,r)||l.push(r));return l}},function(e,t,r){var n=r(17),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,c=n(t),l=a(c.length),u=i(o,l);if(e&&r!=r){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(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),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(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),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==l||r!=c&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".startsWith,f=Math.min,d=l("startsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"startsWith"),n&&!n.writable)||d)},{startsWith:function(e){var t=String(c(this));s(e);var r=o(f(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return h?h.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),a=r(19),i=r(57)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==a(e))}},function(e,t,r){var n=r(11),a=r(36),i=r(23),o=r(38),s=r(58),c=r(59),l=a("wks"),u=n.Symbol,h=c?u:u&&u.withoutSetter||o;e.exports=function(e){return i(l,e)||(s&&i(u,e)?l[e]=u[e]:l[e]=h("Symbol."+e)),l[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)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(11),a=r(62),i=Function.call;e.exports=function(e,t,r){return a(i,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,a){return e.call(t,r,n,a)}}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){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".endsWith,f=Math.min,d=l("endsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"endsWith"),n&&!n.writable)||d)},{endsWith:function(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=o(t.length),a=void 0===r?n:f(o(r),n),i=String(e);return h?h.call(t,i,a):t.slice(a-i.length,a)===i}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){var n=r(10),a=r(55),i=r(20);n({target:"String",proto:!0,forced:!r(60)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(a(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){var n=r(10),a=r(46).includes,i=r(70);n({target:"Array",proto:!0,forced:!r(75)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,r){var n=r(57),a=r(71),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,a=r(28),i=r(72),o=r(50),s=r(39),c=r(74),l=r(25),u=r(35),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},g=function(e){return"<"+f+">"+e+""},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m=n?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):(t=l("iframe"),r="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var a=o.length;a--;)delete m[h][o[a]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[h]=a(e),r=new p,p[h]=null,r[d]=e):r=m(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(13),a=r(27),i=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,c=0;s>c;)a.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),a=r(14),i=r(23),o=Object.defineProperty,s={},c=function(e){throw e};e.exports=function(e,t){if(i(s,e))return s[e];t||(t={});var r=[][e],l=!!i(t,"ACCESSORS")&&t.ACCESSORS,u=i(t,0)?t[0]:c,h=i(t,1)?t[1]:void 0;return s[e]=!!r&&!a((function(){if(l&&!n)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:c}):e[1]=1,r.call(e,u,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){var n=r(78).charAt,a=r(33),i=r(79),o="String Iterator",s=a.set,c=a.getterFor(o);i(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),a=r(20),i=function(e){return function(t,r){var i,o,s=String(a(t)),c=n(r),l=s.length;return c<0||c>=l?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):i:e?s.slice(c,c+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,r){var n=r(10),a=r(80),i=r(82),o=r(87),s=r(85),c=r(26),l=r(29),u=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v="keys",y="values",b="entries",w=function(){return this};e.exports=function(e,t,r,u,d,S,k){a(r,t,u);var _,A,x,C=function(e){if(e===d&&O)return O;if(!g&&e in E)return E[e];switch(e){case v:case y:case b:return function(){return new r(this,e)}}return function(){return new r(this)}},P=t+" Iterator",T=!1,E=e.prototype,R=E[m]||E["@@iterator"]||d&&E[d],O=!g&&R||C(d),I="Array"==t&&E.entries||R;if(I&&(_=i(I.call(new e)),p!==Object.prototype&&_.next&&(h||i(_)===p||(o?o(_,p):"function"!=typeof _[m]&&c(_,m,w)),s(_,P,!0,!0),h&&(f[P]=w))),d==y&&R&&R.name!==y&&(T=!0,O=function(){return R.call(this)}),h&&!k||E[m]===O||c(E,m,O),f[t]=O,d)if(A={values:C(y),keys:S?O:C(v),entries:C(b)},k)for(x in A)(g||T||!(x in E))&&l(E,x,A[x]);else n({target:t,proto:!0,forced:g||T},A);return A}},function(e,t,r){var n=r(81).IteratorPrototype,a=r(71),i=r(16),o=r(85),s=r(86),c=function(){return this};e.exports=function(e,t,r){var l=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,l,!1,!0),s[l]=c,e}},function(e,t,r){var n,a,i,o=r(82),s=r(26),c=r(23),l=r(57),u=r(37),h=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=o(o(i)))!==Object.prototype&&(n=a):f=!0),null==n&&(n={}),u||c(n,h)||s(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),a=r(83),i=r(35),o=r(84),s=i("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c: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,a=r(23),i=r(57)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),a=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,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),a=r(90);n({target:"Array",stat:!0,forced:!r(97)((function(e){Array.from(e)}))},{from:a})},function(e,t,r){var n=r(62),a=r(83),i=r(91),o=r(92),s=r(47),c=r(93),l=r(94);e.exports=function(e){var t,r,u,h,f,d,p=a(e),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=l(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&o(b))for(r=new g(t=s(p.length));t>w;w++)d=y?v(p[w],w):p[w],c(r,w,d);else for(f=(h=b.call(p)).next,r=new g;!(u=f.call(h)).done;w++)d=y?i(h,v,[u.value,w],!0):u.value,c(r,w,d);return r.length=w,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,a){try{return a?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(57),a=r(86),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},function(e,t,r){var n=r(21),a=r(27),i=r(16);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},function(e,t,r){var n=r(95),a=r(86),i=r(57)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){var n=r(96),a=r(19),i=r(57)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(57)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(57)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}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),a=r(100);n({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},function(e,t,r){var n=r(13),a=r(14),i=r(73),o=r(51),s=r(15),c=r(83),l=r(18),u=Object.assign,h=Object.defineProperty;e.exports=!u||a((function(){if(n&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!=u({},e)[r]||i(u({},t)).join("")!=a}))?function(e,t){for(var r=c(e),a=arguments.length,u=1,h=o.f,f=s.f;a>u;)for(var d,p=l(arguments[u++]),g=h?i(p).concat(h(p)):i(p),m=g.length,v=0;m>v;)d=g[v++],n&&!f.call(p,d)||(r[d]=p[d]);return r}:u},function(e,t,r){r(102);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),a=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return a(e)/i}})},function(e,t,r){r(104);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){r(10)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(106);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){r(10)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(22),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,r){r(109)},function(e,t,r){var n=r(110),a=r(112),i=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,l=[].slice;c("slice",(function(e,t){for(var r=l.call(o(this),e,t),n=a(this,this.constructor),i=0,c=r.length,u=new(s(n))(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},function(e,t,r){var n,a=r(111),i=r(13),o=r(11),s=r(22),c=r(23),l=r(95),u=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),g=r(57),m=r(38),v=o.Int8Array,y=v&&v.prototype,b=o.Uint8ClampedArray,w=b&&b.prototype,S=v&&d(v),k=y&&d(y),_=Object.prototype,A=_.isPrototypeOf,x=g("toStringTag"),C=m("TYPED_ARRAY_TAG"),P=a&&!!p&&"Opera"!==l(o.opera),T=!1,E={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R=function(e){return s(e)&&c(E,l(e))};for(n in E)o[n]||(P=!1);if((!P||"function"!=typeof S||S===Function.prototype)&&(S=function(){throw TypeError("Incorrect invocation")},P))for(n in E)o[n]&&p(o[n],S);if((!P||!k||k===_)&&(k=S.prototype,P))for(n in E)o[n]&&p(o[n].prototype,k);if(P&&d(w)!==k&&p(w,k),i&&!c(k,x))for(n in T=!0,f(k,x,{get:function(){return s(this)?this[C]:void 0}}),E)o[n]&&u(o[n],C,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:T&&C,aTypedArray:function(e){if(R(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(A.call(S,e))return e}else for(var t in E)if(c(E,n)){var r=o[t];if(r&&(e===r||A.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var n in E){var a=o[n];a&&c(a.prototype,e)&&delete a.prototype[e]}k[e]&&!r||h(k,e,r?t:P&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(i){if(p){if(r)for(n in E)(a=o[n])&&c(a,e)&&delete a[e];if(S[e]&&!r)return;try{return h(S,e,r?t:P&&v[e]||t)}catch(e){}}for(n in E)!(a=o[n])||a[e]&&!r||h(a,e,t)}},isView:function(e){var t=l(e);return"DataView"===t||c(E,t)},isTypedArray:R,TypedArray:S,TypedArrayPrototype:k}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(28),a=r(63),i=r(57)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},function(e,t,r){r(114),r(77),r(116),r(119),r(134),r(135);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),a=r(29),i=r(115);n||a(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,r){var n=r(96),a=r(95);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},function(e,t,r){var n=r(11),a=r(117),i=r(118),o=r(26),s=r(57),c=s("iterator"),l=s("toStringTag"),u=i.values;for(var h in a){var f=n[h],d=f&&f.prototype;if(d){if(d[c]!==u)try{o(d,c,u)}catch(e){d[c]=u}if(d[l]||o(d,l,h),a[h])for(var p in i)if(d[p]!==i[p])try{o(d,p,i[p])}catch(e){d[p]=i[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){var n=r(17),a=r(70),i=r(86),o=r(33),s=r(79),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=s(Array,"Array",(function(e,t){l(this,{type:c,target:n(e),index:0,kind:t})}),(function(){var e=u(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"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},function(e,t,r){var n,a,i,o,s=r(10),c=r(37),l=r(11),u=r(42),h=r(120),f=r(29),d=r(121),p=r(85),g=r(122),m=r(22),v=r(63),y=r(123),b=r(19),w=r(31),S=r(124),k=r(97),_=r(112),A=r(125).set,x=r(128),C=r(129),P=r(131),T=r(130),E=r(132),R=r(33),O=r(52),I=r(57),F=r(133),L=I("species"),M="Promise",N=R.get,D=R.set,B=R.getterFor(M),j=h,U=l.TypeError,q=l.document,z=l.process,G=u("fetch"),W=T.f,H=W,V="process"==b(z),X=!!(q&&q.createEvent&&l.dispatchEvent),Y="unhandledrejection",K=O(M,(function(){if(w(j)===String(j)){if(66===F)return!0;if(!V&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!j.prototype.finally)return!0;if(F>=51&&/native code/.test(j))return!1;var e=j.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),J=K||!k((function(e){j.all(e).catch((function(){}))})),Q=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){for(var a=t.value,i=1==t.state,o=0;n.length>o;){var s,c,l,u=n[o++],h=i?u.ok:u.fail,f=u.resolve,d=u.reject,p=u.domain;try{h?(i||(2===t.rejection&&re(e,t),t.rejection=1),!0===h?s=a:(p&&p.enter(),s=h(a),p&&(p.exit(),l=!0)),s===u.promise?d(U("Promise-chain cycle")):(c=Q(s))?c.call(s,f,d):f(s)):d(a)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&ee(e,t)}))}},Z=function(e,t,r){var n,a;X?((n=q.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},(a=l["on"+e])?a(n):e===Y&&P("Unhandled promise rejection",r)},ee=function(e,t){A.call(l,(function(){var r,n=t.value;if(te(t)&&(r=E((function(){V?z.emit("unhandledRejection",n,e):Z(Y,e,n)})),t.rejection=V||te(t)?2:1,r.error))throw r.value}))},te=function(e){return 1!==e.rejection&&!e.parent},re=function(e,t){A.call(l,(function(){V?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,r,n){return function(a){e(t,r,a,n)}},ae=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,$(e,t,!0))},ie=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw U("Promise can't be resolved itself");var a=Q(r);a?x((function(){var n={done:!1};try{a.call(r,ne(ie,e,n,t),ne(ae,e,n,t))}catch(r){ae(e,n,r,t)}})):(t.value=r,t.state=1,$(e,t,!1))}catch(r){ae(e,{done:!1},r,t)}}};K&&(j=function(e){y(this,j,M),v(e),n.call(this);var t=N(this);try{e(ne(ie,this,t),ne(ae,this,t))}catch(e){ae(this,t,e)}},(n=function(e){D(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(j.prototype,{then:function(e,t){var r=B(this),n=W(_(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=V?z.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&$(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(ae,e,t)},T.f=W=function(e){return e===j||e===i?new a(e):H(e)},c||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new j((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof G&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(j,G.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:K},{Promise:j}),p(j,M,!1,!0),g(M),i=u(M),s({target:M,stat:!0,forced:K},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:c||K},{resolve:function(e){return C(c&&this===i?j:this,e)}}),s({target:M,stat:!0,forced:J},{all:function(e){var t=this,r=W(t),n=r.resolve,a=r.reject,i=E((function(){var r=v(t.resolve),i=[],o=0,s=1;S(e,(function(e){var c=o++,l=!1;i.push(void 0),s++,r.call(t,e).then((function(e){l||(l=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=W(t),n=r.reject,a=E((function(){var a=v(t.resolve);S(e,(function(e){a.call(t,e).then(r.resolve,n)}))}));return a.error&&n(a.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 a in t)n(e,a,t[a],r);return e}},function(e,t,r){var n=r(42),a=r(27),i=r(57),o=r(13),s=i("species");e.exports=function(e){var t=n(e),r=a.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=r(28),a=r(92),i=r(47),o=r(62),s=r(94),c=r(91),l=function(e,t){this.stopped=e,this.result=t},u=e.exports=function(e,t,r,u,h){var f,d,p,g,m,v,y,b=o(t,r,u?2:1);if(h)f=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(a(d)){for(p=0,g=i(e.length);g>p;p++)if((m=u?b(n(y=e[p])[0],y[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}f=d.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(m=c(f,b,y.value,u))&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(e){return new l(!0,e)}},function(e,t,r){var n,a,i,o=r(11),s=r(14),c=r(19),l=r(62),u=r(74),h=r(25),f=r(126),d=o.location,p=o.setImmediate,g=o.clearImmediate,m=o.process,v=o.MessageChannel,y=o.Dispatch,b=0,w={},S="onreadystatechange",k=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},_=function(e){return function(){k(e)}},A=function(e){k(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&g||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},g=function(e){delete w[e]},"process"==c(m)?n=function(e){m.nextTick(_(e))}:y&&y.now?n=function(e){y.now(_(e))}:v&&!f?(i=(a=new v).port2,a.port1.onmessage=A,n=l(i.postMessage,i,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=S in h("script")?function(e){u.appendChild(h("script"))[S]=function(){u.removeChild(this),k(e)}}:function(e){setTimeout(_(e),0)}:(n=x,o.addEventListener("message",A,!1))),e.exports={set:p,clear:g}},function(e,t,r){var n=r(127);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,a,i,o,s,c,l,u,h=r(11),f=r(12).f,d=r(19),p=r(125).set,g=r(126),m=h.MutationObserver||h.WebKitMutationObserver,v=h.process,y=h.Promise,b="process"==d(v),w=f(h,"queueMicrotask"),S=w&&w.value;S||(n=function(){var e,t;for(b&&(e=v.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},b?o=function(){v.nextTick(n)}:m&&!g?(s=!0,c=document.createTextNode(""),new m(n).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):y&&y.resolve?(l=y.resolve(void 0),u=l.then,o=function(){u.call(l,n)}):o=function(){p.call(h,n)}),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},function(e,t,r){var n=r(28),a=r(22),i=r(130);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(63),a=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 a(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(e){return{error:!0,value:e}}}},function(e,t,r){var n,a,i=r(11),o=r(127),s=i.process,c=s&&s.versions,l=c&&c.v8;l?a=(n=l.split("."))[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},function(e,t,r){var n=r(10),a=r(63),i=r(130),o=r(132),s=r(124);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,c=r.reject,l=o((function(){var r=a(t.resolve),i=[],o=0,c=1;s(e,(function(e){var a=o++,s=!1;i.push(void 0),c++,r.call(t,e).then((function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--c||n(i))}),(function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--c||n(i))}))})),--c||n(i)}));return l.error&&c(l.value),r.promise}})},function(e,t,r){var n=r(10),a=r(37),i=r(120),o=r(14),s=r(42),c=r(112),l=r(129),u=r(29);n({target:"Promise",proto:!0,real:!0,forced:!!i&&o((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),a||"function"!=typeof i||i.prototype.finally||u(i.prototype,"finally",s("Promise").prototype.finally)},function(e,t,r){r(137),r(142),r(140);var n=r(43);e.exports=n.URL},function(e,t,r){r(77);var n,a=r(10),i=r(13),o=r(138),s=r(11),c=r(72),l=r(29),u=r(123),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,g=r(139),m=r(85),v=r(140),y=r(33),b=s.URL,w=v.URLSearchParams,S=v.getState,k=y.set,_=y.getterFor("URL"),A=Math.floor,x=Math.pow,C="Invalid scheme",P="Invalid host",T="Invalid port",E=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,O=/\d/,I=/^(0x|0X)/,F=/^[0-7]+$/,L=/^\d+$/,M=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,D=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,B=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,j=/[\u0009\u000A\u000D]/g,U=function(e,t){var r,n,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return P;if(!(r=z(t.slice(1,-1))))return P;e.host=r}else if(J(e)){if(t=g(t),N.test(t))return P;if(null===(r=q(t)))return P;e.host=r}else{if(D.test(t))return P;for(r="",n=d(t),a=0;a4)return e;for(r=[],n=0;n1&&"0"==a.charAt(0)&&(i=I.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)o=0;else{if(!(10==i?L:8==i?F:M).test(a))return e;o=parseInt(a,i)}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;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!O.test(f()))return;for(;O.test(f());){if(i=parseInt(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[l]=256*c[l]+a,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[l++]=t}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!=l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!=l)return;return c},G=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},W={},H=f({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),V=f({},H,{"#":1,"?":1,"{":1,"}":1}),X=f({},V,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(e){return h(K,e.scheme)},Q=function(e){return""!=e.username||""!=e.password},$=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},ee=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&Z(t[0],!0)||t.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},ne={},ae={},ie={},oe={},se={},ce={},le={},ue={},he={},fe={},de={},pe={},ge={},me={},ve={},ye={},be={},we={},Se={},ke={},_e={},Ae=function(e,t,r,a){var i,o,s,c,l,u=r||ne,f=0,p="",g=!1,m=!1,v=!1;for(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(B,"")),t=t.replace(j,""),i=d(t);f<=i.length;){switch(o=i[f],u){case ne:if(!o||!E.test(o)){if(r)return C;u=ie;continue}p+=o.toLowerCase(),u=ae;break;case ae:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))p+=o.toLowerCase();else{if(":"!=o){if(r)return C;p="",u=ie,f=0;continue}if(r&&(J(e)!=h(K,p)||"file"==p&&(Q(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,r)return void(J(e)&&K[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?u=me:J(e)&&a&&a.scheme==e.scheme?u=oe:J(e)?u=ue:"/"==i[f+1]?(u=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),u=Se)}break;case ie:if(!a||a.cannotBeABaseURL&&"#"!=o)return C;if(a.cannotBeABaseURL&&"#"==o){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=_e;break}u="file"==a.scheme?me:ce;continue;case oe:if("/"!=o||"/"!=i[f+1]){u=ce;continue}u=he,f++;break;case se:if("/"==o){u=fe;break}u=we;continue;case ce:if(e.scheme=a.scheme,o==n)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==o||"\\"==o&&J(e))u=le;else if("?"==o)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=ke;else{if("#"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=we;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}break;case le:if(!J(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=we;continue}u=fe}else u=he;break;case ue:if(u=he,"/"!=o||"/"!=p.charAt(f+1))continue;f++;break;case he:if("/"!=o&&"\\"!=o){u=fe;continue}break;case fe:if("@"==o){g&&(p="%40"+p),g=!0,s=d(p);for(var y=0;y65535)return T;e.port=J(e)&&S===K[e.scheme]?null:S,p=""}if(r)return;u=be;continue}return T}p+=o;break;case me:if(e.scheme="file","/"==o||"\\"==o)u=ve;else{if(!a||"file"!=a.scheme){u=we;continue}if(o==n)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==o)e.host=a.host,e.path=a.path.slice(),e.query="",u=ke;else{if("#"!=o){ee(i.slice(f).join(""))||(e.host=a.host,e.path=a.path.slice(),te(e)),u=we;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}}break;case ve:if("/"==o||"\\"==o){u=ye;break}a&&"file"==a.scheme&&!ee(i.slice(f).join(""))&&(Z(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=we;continue;case ye:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&Z(p))u=we;else if(""==p){if(e.host="",r)return;u=be}else{if(c=U(e,p))return c;if("localhost"==e.host&&(e.host=""),r)return;p="",u=be}continue}p+=o;break;case be:if(J(e)){if(u=we,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(u=we,"/"!=o))continue}else e.fragment="",u=_e;else e.query="",u=ke;break;case we:if(o==n||"/"==o||"\\"==o&&J(e)||!r&&("?"==o||"#"==o)){if(".."===(l=(l=p).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(te(e),"/"==o||"\\"==o&&J(e)||e.path.push("")):re(p)?"/"==o||"\\"==o&&J(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(o==n||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=ke):"#"==o&&(e.fragment="",u=_e)}else p+=Y(o,V);break;case Se:"?"==o?(e.query="",u=ke):"#"==o?(e.fragment="",u=_e):o!=n&&(e.path[0]+=Y(o,W));break;case ke:r||"#"!=o?o!=n&&("'"==o&&J(e)?e.query+="%27":e.query+="#"==o?"%23":Y(o,W)):(e.fragment="",u=_e);break;case _e:o!=n&&(e.fragment+=Y(o,H))}f++}},xe=function(e){var t,r,n=u(this,xe,"URL"),a=arguments.length>1?arguments[1]:void 0,o=String(e),s=k(n,{type:"URL"});if(void 0!==a)if(a instanceof xe)t=_(a);else if(r=Ae(t={},String(a)))throw TypeError(r);if(r=Ae(s,o,null,t))throw TypeError(r);var c=s.searchParams=new w,l=S(c);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(c)||null},i||(n.href=Pe.call(n),n.origin=Te.call(n),n.protocol=Ee.call(n),n.username=Re.call(n),n.password=Oe.call(n),n.host=Ie.call(n),n.hostname=Fe.call(n),n.port=Le.call(n),n.pathname=Me.call(n),n.search=Ne.call(n),n.searchParams=De.call(n),n.hash=Be.call(n))},Ce=xe.prototype,Pe=function(){var e=_(this),t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,l=t+":";return null!==a?(l+="//",Q(e)&&(l+=r+(n?":"+n:"")+"@"),l+=G(a),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},Te=function(){var e=_(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&J(e)?t+"://"+G(e.host)+(null!==r?":"+r:""):"null"},Ee=function(){return _(this).scheme+":"},Re=function(){return _(this).username},Oe=function(){return _(this).password},Ie=function(){var e=_(this),t=e.host,r=e.port;return null===t?"":null===r?G(t):G(t)+":"+r},Fe=function(){var e=_(this).host;return null===e?"":G(e)},Le=function(){var e=_(this).port;return null===e?"":String(e)},Me=function(){var e=_(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ne=function(){var e=_(this).query;return e?"?"+e:""},De=function(){return _(this).searchParams},Be=function(){var e=_(this).fragment;return e?"#"+e:""},je=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&c(Ce,{href:je(Pe,(function(e){var t=_(this),r=String(e),n=Ae(t,r);if(n)throw TypeError(n);S(t.searchParams).updateSearchParams(t.query)})),origin:je(Te),protocol:je(Ee,(function(e){var t=_(this);Ae(t,String(e)+":",ne)})),username:je(Re,(function(e){var t=_(this),r=d(String(e));if(!$(t)){t.username="";for(var n=0;n>1,e+=s(e/t);e>455;n+=36)e=s(e/35);return s(n+36*e/(e+38))},h=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r=h&&as((n-f)/v))throw RangeError(o);for(f+=(m-h)*v,h=m,r=0;rn)throw RangeError(o);if(a==h){for(var y=f,b=36;;b+=36){var w=b<=d?1:b>=d+26?26:b-d;if(y0?arguments[0]:void 0,u=[];if(P(this,{type:x,entries:u,updateURL:function(){},updateSearchParams:U}),void 0!==l)if(m(l))if("function"==typeof(e=w(l)))for(r=(t=e.call(l)).next;!(n=r.call(t)).done;){if((o=(i=(a=b(g(n.value))).next).call(a)).done||(s=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:s.value+""})}else for(c in l)f(l,c)&&u.push({key:c,value:l[c]+""});else j(u,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},W=G.prototype;s(W,{append:function(e,t){q(arguments.length,2);var r=T(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){q(arguments.length,1);for(var t=T(this),r=t.entries,n=e+"",a=0;ae.key){a.splice(t,0,e);break}t===r&&a.push(e)}n.updateURL()},forEach:function(e){for(var t,r=T(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),a=0;a1&&(m(t=arguments[1])&&(r=t.body,p(r)===x&&((n=t.headers?new _(t.headers):new _).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(r)),headers:y(0,n)}))),a.push(t)),k.apply(this,a)}}),e.exports={URLSearchParams:G,getState:T}},function(e,t,r){var n=r(28),a=r(94);e.exports=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){r(10)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){!function(e){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},a=r;function i(e){return"object"==typeof e&&null!==e||"function"==typeof e}function o(e){return e.slice()}function s(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function c(e){return!1!==l(e)&&e!==1/0}function l(e){return!("number"!=typeof e||n(e)||e<0)}function u(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 a=e[t];if(void 0!==a){if("function"!=typeof a)throw new TypeError(a+" is not a method");switch(r){case 0:return function(){return d(a,e,n)};case 1:return function(t){var r=[t].concat(n);return d(a,e,r)}}}return function(){return _(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return u(n,e,r)}function d(e,t,r){try{return _(u(e,t,r))}catch(e){return A(e)}}function p(e){return e}function g(e){return!1}function m(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 v(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 y=Promise,b=Promise.prototype.then,w=Promise.resolve.bind(y),S=Promise.reject.bind(y);function k(e){return new y(e)}function _(e){return w(e)}function A(e){return S(e)}function x(e,t,r){return b.call(e,t,r)}function C(e,t,r){x(x(e,t,r),void 0,a)}function P(e,t){C(e,t)}function T(e,t){C(e,void 0,t)}function E(e,t,r){return x(e,t,r)}function R(e){x(e,void 0,a)}var O=16384,I=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===O-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,a=e._elements,i=a[r];return n===O&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function F(e,t,r){var n=null;!0===r&&(n=Object.prototype);var a=Object.create(n);return a.value=e,a.done=t,a}function L(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?B(e):"closed"===t._state?U(e):j(e,t._storedError)}function M(e,t){return Nr(e._ownerReadableStream,t)}function N(e){"readable"===e._ownerReadableStream._state?q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(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 B(e){e._closedPromise=k((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function j(e,t){B(e),q(e,t)}function U(e){B(e),G(e)}function q(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function z(e,t){j(e,t)}function G(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var W=t("[[CancelSteps]]"),H=t("[[PullSteps]]");function V(e,t){void 0===t&&(t=!1);var r=new Z(e);return r._forAuthorCode=t,r}function X(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function Y(e,t,r){var n=e._reader;n._readRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function K(e){return e._reader._readRequests.length}function J(e){var t=e._reader;return void 0!==t&&!!ee(t)}var Q,$,Z=function(){function e(e){if(!1===Lr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:A(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?A(D("read from")):te(this):A(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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?_(F(void 0,!0,e._forAuthorCode)):"errored"===t._state?A(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&&((Q={})[t.asyncIterator]=function(){return this},$=Q,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ie(this))return A(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?A(D("iterate")):E(te(e),(function(t){var r=t.done;return r&&N(e),F(t.value,r,!0)}))},return:function(e){if(!1===ie(this))return A(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return A(D("finish iterating"));if(t._readRequests.length>0)return A(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=M(t,e);return N(t),E(r,(function(){return F(e,!0,!0)}))}return N(t),_(F(e,!0,!0))}};function ae(e,t){void 0===t&&(t=!1);var r=V(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ie(e){return!!i(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 ce(e,t,r){if(!c(r=Number(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 le(e){return e._queue.peek().value}function ue(e){e._queue=new I,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={}),me(this);var r=t.size,n=t.highWaterMark;if(void 0!==e.type)throw new RangeError("Invalid type is specified");var a=v(r);void 0===n&&(n=1),Ye(this,e,n=m(n),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ve(this))throw ot("locked");return ye(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ve(this)?A(ot("abort")):!0===ye(this)?A(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ve(this)?A(ot("close")):!0===ye(this)?A(new TypeError("Cannot close a stream that already has a writer")):!0===Ee(this)?A(new TypeError("Cannot close an already-closing stream")):we(this)},e.prototype.getWriter=function(){if(!1===ve(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Me(e)}function ge(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(de.prototype);return me(o),Xe(o,Object.create(He.prototype),e,t,r,n,a,i),o}function me(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new I,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function ye(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return _(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=k((function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=a,!1===n&&_e(e,t),a}function we(e){var t=e._state;if("closed"===t||"errored"===t)return A(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=k((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&!0===e._backpressure&&"writable"===t&&St(n),Je(e._writableStreamController),r}function Se(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function ke(e,t){"writable"!==e._state?Ae(e):_e(e,t)}function _e(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&qe(n,t),!1===Re(e)&&!0===r._started&&Ae(e)}function Ae(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new I,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Fe(e);C(e._writableStreamController[he](r._reason),(function(){r._resolve(),Fe(e)}),(function(t){r._reject(t),Fe(e)}))}else Fe(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ce(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,ke(e,t)}function Pe(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&pt(t)}function Te(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),ke(e,t)}function Ee(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Re(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Oe(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ie(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Fe(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 Le(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):St(r)),e._backpressure=t}var Me=function(){function e(e){if(!1===ve(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===ye(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===Ee(e)&&!0===e._backpressure?gt(this):vt(this),lt(this);else if("erroring"===t)mt(this,e._storedError),lt(this);else if("closed"===t)vt(this),ht(this);else{var r=e._storedError;mt(this,r),ut(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Ne(this)?A(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 ct("desiredSize");return ze(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Ne(this)?A(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Ne(this)?A(st("abort")):void 0===this._ownerWritableStream?A(ct("abort")):De(this,e)},e.prototype.close=function(){if(!1===Ne(this))return A(st("close"));var e=this._ownerWritableStream;return void 0===e?A(ct("close")):!0===Ee(e)?A(new TypeError("Cannot close an already-closing stream")):Be(this)},e.prototype.releaseLock=function(){if(!1===Ne(this))throw st("releaseLock");void 0!==this._ownerWritableStream&&Ge(this)},e.prototype.write=function(e){return!1===Ne(this)?A(st("write")):void 0===this._ownerWritableStream?A(ct("write to")):We(this,e)},e}();function Ne(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function De(e,t){return be(e._ownerWritableStream,t)}function Be(e){return we(e._ownerWritableStream)}function je(e){var t=e._ownerWritableStream,r=t._state;return!0===Ee(t)||"closed"===r?_(void 0):"errored"===r?A(t._storedError):Be(e)}function Ue(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function qe(e,t){"pending"===e._readyPromiseState?yt(e,t):wt(e,t)}function ze(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:$e(t._writableStreamController)}function Ge(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r),Ue(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function We(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=Qe(n,t);if(r!==e._ownerWritableStream)return A(ct("write to"));var i=r._state;if("errored"===i)return A(r._storedError);if(!0===Ee(r)||"closed"===i)return A(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return A(r._storedError);var o=Se(r);return Ze(n,t,a),o}var He=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===Ve(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&it(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Ke(this),t},e.prototype[fe]=function(){ue(this)},e}();function Ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Xe(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=at(t);Le(e,c),C(_(r()),(function(){t._started=!0,et(t)}),(function(r){t._started=!0,ke(e,r)}))}function Ye(e,t,r,n){var a=Object.create(He.prototype);function i(){return f(t,"start",[a])}var o=h(t,"write",1,[a]),s=h(t,"close",0,[]),c=h(t,"abort",1,[]);Xe(e,a,i,o,s,c,r,n)}function Ke(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Je(e){ce(e,"close",0),et(e)}function Qe(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return tt(e,t),1}}function $e(e){return e._strategyHWM-e._queueTotalSize}function Ze(e,t,r){var n={chunk:t};try{ce(e,n,r)}catch(t){return void tt(e,t)}var a=e._controlledWritableStream;!1===Ee(a)&&"writable"===a._state&&Le(a,at(e)),et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=le(e);"close"===r?rt(e):nt(e,r.chunk)}}else Ae(t)}function tt(e,t){"writable"===e._controlledWritableStream._state&&it(e,t)}function rt(e){var t=e._controlledWritableStream;Oe(t),se(e);var r=e._closeAlgorithm();Ke(e),C(r,(function(){Pe(t)}),(function(e){Te(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Ie(r),C(e._writeAlgorithm(t),(function(){xe(r);var t=r._state;if(se(e),!1===Ee(r)&&"writable"===t){var n=at(e);Le(r,n)}et(e)}),(function(t){"writable"===r._state&&Ke(e),Ce(r,t)}))}function at(e){return $e(e)<=0}function it(e,t){var r=e._controlledWritableStream;Ke(e),_e(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 ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(e){e._closedPromise=k((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ut(e,t){lt(e),ft(e,t)}function ht(e){lt(e),pt(e)}function ft(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){ut(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function gt(e){e._readyPromise=k((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function mt(e,t){gt(e),yt(e,t)}function vt(e){gt(e),St(e)}function yt(e,t){R(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){gt(e)}function wt(e,t){mt(e,t)}function St(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function kt(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}var _t="undefined"!=typeof DOMException?DOMException:void 0;function At(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){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 Ct=At(_t)?_t:xt();function Pt(e,t,n,a,i,o){var s=V(e),c=pe(t);e._disturbed=!0;var l=!1,u=_(void 0);return k((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Ct("Aborted","AbortError"),n=[];!1===a&&n.push((function(){return"writable"===t._state?be(t,r):_(void 0)})),!1===i&&n.push((function(){return"readable"===e._state?Nr(e,r):_(void 0)})),w((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 k((function(e,t){function r(n){n?e():x(g(),r,t)}r(!1)}))}function g(){return!0===l?_(!0):x(c._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(u=x(We(c,e.value),void 0,r),!1)}))}))}if(y(e,s._closedPromise,(function(e){!1===a?w((function(){return be(t,e)}),!0,e):S(!0,e)})),y(t,c._closedPromise,(function(t){!1===i?w((function(){return Nr(e,t)}),!0,t):S(!0,t)})),b(e,s._closedPromise,(function(){!1===n?w((function(){return je(c)})):S()})),!0===Ee(t)||"closed"===t._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?w((function(){return Nr(e,m)}),!0,m):S(!0,m)}function v(){var e=u;return x(u,(function(){return e!==u?v():void 0}))}function y(e,t,r){"errored"===e._state?r(e._storedError):T(t,r)}function b(e,t,r){"closed"===e._state?r():P(t,r)}function w(e,r,n){function a(){C(e(),(function(){return A(r,n)}),(function(e){return A(!0,e)}))}!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),a):a())}function S(e,r){!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),(function(){return A(e,r)})):A(e,r))}function A(e,t){Ge(c),N(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}R(p())}))}var Tt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Et(this))throw qt("desiredSize");return Nt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Et(this))throw qt("close");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits close");Ft(this)},e.prototype.enqueue=function(e){if(!1===Et(this))throw qt("enqueue");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Lt(this,e)},e.prototype.error=function(e){if(!1===Et(this))throw qt("error");Mt(this,e)},e.prototype[W]=function(e){ue(this);var t=this._cancelAlgorithm(e);return It(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?(It(this),Dr(e)):Rt(this),_(F(t,!1,e._reader._forAuthorCode))}var r=X(e);return Rt(this),r},e}();function Et(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Rt(e){!1!==Ot(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Rt(e))}),(function(t){Mt(e,t)}))):e._pullAgain=!0)}function Ot(e){var t=e._controlledReadableStream;return!1!==Bt(e)&&!1!==e._started&&(!0===Mr(t)&&K(t)>0||Nt(e)>0)}function It(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ft(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(It(e),Dr(t))}function Lt(e,t){var r=e._controlledReadableStream;if(!0===Mr(r)&&K(r)>0)Y(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Mt(e,t),t}try{ce(e,t,n)}catch(t){throw Mt(e,t),t}}Rt(e)}function Mt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ue(e),It(e),Br(r,t))}function Nt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Dt(e){return!0!==Ot(e)}function Bt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Rt(t)}),(function(e){Mt(t,e)}))}function Ut(e,t,r,n){var a=Object.create(Tt.prototype);function i(){return f(t,"start",[a])}var o=h(t,"pull",0,[a]),s=h(t,"cancel",1,[]);jt(e,a,i,o,s,r,n)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function zt(e,t){var r,n,a,i,s,c=V(e),l=!1,u=!1,h=!1,f=k((function(e){s=e}));function d(){return!0===l||(l=!0,R(E(te(c),(function(e){if(l=!1,!0===e.done)return!1===u&&Ft(a._readableStreamController),void(!1===h&&Ft(i._readableStreamController));var t=e.value,r=t,n=t;!1===u&&Lt(a._readableStreamController,r),!1===h&&Lt(i._readableStreamController,n)})))),_(void 0)}function p(t){if(u=!0,r=t,!0===h){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function g(t){if(h=!0,n=t,!0===u){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function m(){}return a=Ir(m,d,p),i=Ir(m,d,g),T(c._closedPromise,(function(e){Mt(a._readableStreamController,e),Mt(i._readableStreamController,e)})),[a,i]}var Gt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Wt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Xt(this))throw wr("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Xt(this))throw wr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");g(this._view.buffer),gr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Xt(this))throw wr("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");g(e.buffer),mr(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===Vt(this))throw Sr("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(Wt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Vt(this))throw Sr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Vt(this))throw Sr("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===Vt(this))throw Sr("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");g(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Vt(this))throw Sr("error");dr(this,e)},e.prototype[W]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),ue(this);var t=this._cancelAlgorithm(e);return ur(this),t},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(e){return A(e)}return _(F(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var a=void 0;try{a=new ArrayBuffer(n)}catch(e){return A(e)}var i={buffer:a,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}var o=X(e);return Yt(this),o},e}();function Vt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Xt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Yt(e){!1!==lr(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Yt(e))}),(function(t){dr(e,t)}))):e._pullAgain=!0)}function Kt(e){rr(e),e._pendingPullIntos=new I}function Jt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Qt(t);"default"===t.readerType?Y(e,n,r):Ar(e,n,r)}function Qt(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,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,c=a,l=!1;o>n&&(c=o-t.bytesFilled,l=!0);for(var u=e._queue;c>0;){var h=u.peek(),f=Math.min(c,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?u.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),c-=f}return l}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(ur(e),Dr(e._controlledReadableByteStream)):Yt(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){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===Zt(e,t)&&(cr(e),Jt(e._controlledReadableByteStream,t))}}function ar(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var a=t.constructor,i={buffer:p(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(i),_r(r);if("closed"===r._state)return _(F(new a(i.buffer,i.byteOffset,0),!0,r._reader._forAuthorCode));if(e._queueTotalSize>0){if(!0===Zt(e,i)){var o=Qt(i);return tr(e),_(F(o,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var s=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,s),A(s)}}e._pendingPullIntos.push(i);var c=_r(r);return Yt(e),c}function ir(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Cr(r))for(;xr(r)>0;)Jt(r,cr(e))}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 a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);$t(e,i,0,i.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Jt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ir(e,r)}else or(e,t,r);Yt(e)}function cr(e){var t=e._pendingPullIntos.shift();return rr(e),t}function lr(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===J(t)&&K(t)>0||!0===Cr(t)&&xr(t)>0||pr(e)>0)}function ur(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&&e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,r),r}ur(e),Dr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,a=t.byteOffset,i=t.byteLength,o=p(n);!0===J(r)?0===K(r)?$t(e,o,a,i):Y(r,new Uint8Array(o,a,i),!1):!0===Cr(r)?($t(e,o,a,i),nr(e)):$t(e,o,a,i),Yt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Kt(e),ue(e),ur(e),Br(r,t))}function pr(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function gr(e,t){if(!1===c(t=Number(t)))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function mr(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 vr(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,ue(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=m(i),t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new I,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Yt(t)}),(function(e){dr(t,e)}))}function yr(e,t,r){var n=Object.create(Ht.prototype);function a(){return f(t,"start",[n])}var i=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Gt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");vr(e,n,a,i,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function wr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Sr(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function kr(e,t){void 0===t&&(t=!1);var r=new Pr(e);return r._forAuthorCode=t,r}function _r(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function Ar(e,t,r){var n=e._reader;n._readIntoRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Cr(e){var t=e._reader;return void 0!==t&&!!Tr(t)}var Pr=function(){function e(e){if(!Lr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Vt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readIntoRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return Tr(this)?this._closedPromise:A(Rr("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(Rr("cancel"))},e.prototype.read=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("read from")):ArrayBuffer.isView(e)?(g(e.buffer),0===e.byteLength?A(new TypeError("view must have non-zero byteLength")):Er(this,e)):A(new TypeError("view must be an array buffer view")):A(Rr("read"))},e.prototype.releaseLock=function(){if(!Tr(this))throw Rr("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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Er(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?A(r._storedError):ar(r._readableStreamController,t)}function Rr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Or=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Fr(this);var r=t.size,n=t.highWaterMark,a=e.type;if("bytes"===String(a)){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),yr(this,e,n=m(n))}else{if(void 0!==a)throw new RangeError("Invalid type is specified");var i=v(r);void 0===n&&(n=1),Ut(this,e,n=m(n),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Lr(this))throw jr("locked");return Mr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Lr(this)?A(jr("cancel")):!0===Mr(this)?A(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===Lr(this))throw jr("getReader");if(void 0===t)return V(this,!0);if("byob"===(t=String(t)))return kr(this,!0);throw new RangeError("Invalid mode is specified")},e.prototype.pipeThrough=function(e,t){var r=e.writable,n=e.readable,a=void 0===t?{}:t,i=a.preventClose,o=a.preventAbort,s=a.preventCancel,c=a.signal;if(!1===Lr(this))throw jr("pipeThrough");if(!1===ve(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Lr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(i=Boolean(i),o=Boolean(o),s=Boolean(s),void 0!==c&&!kt(c))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Mr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===ye(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return R(Pt(this,r,i,o,s,c)),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,a=r.preventAbort,i=r.preventCancel,o=r.signal;return!1===Lr(this)?A(jr("pipeTo")):!1===ve(e)?A(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),a=Boolean(a),i=Boolean(i),void 0===o||kt(o)?!0===Mr(this)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===ye(e)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pt(this,e,n,a,i,o):A(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Lr(this))throw jr("tee");return o(zt(this))},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Lr(this))throw jr("getIterator");return ae(this,r)},e}();function Ir(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(Or.prototype);return Fr(i),jt(i,Object.create(Tt.prototype),e,t,r,n,a),i}function Fr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Lr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Mr(e){return void 0!==e._reader}function Nr(e,t){return e._disturbed=!0,"closed"===e._state?_(void 0):"errored"===e._state?A(e._storedError):(Dr(e),E(e._readableStreamController[W](t),r))}function Dr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(F(void 0,!0,t._forAuthorCode))})),t._readRequests=new I),G(t))}function Br(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 I):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new I),q(r,t))}function jr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"==typeof t.asyncIterator&&Object.defineProperty(Or.prototype,t.asyncIterator,{value:Or.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ur=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),zr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,a=t.highWaterMark,i=r.size,o=r.highWaterMark;if(void 0!==e.writableType)throw new RangeError("Invalid writable type specified");var s=v(n);if(void 0===a&&(a=1),a=m(a),void 0!==e.readableType)throw new RangeError("Invalid readable type specified");var c,l=v(i);void 0===o&&(o=0),o=m(o),Gr(this,k((function(e){c=e})),a,s,o,l),Qr(this,e);var u=f(e,"start",[this._transformStreamController]);c(u)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Wr(this))throw ln("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Wr(this))throw ln("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Gr(e,t,r,n,a,i){function o(){return t}function s(t){return nn(e,t)}function c(t){return an(e,t)}function l(){return on(e)}function u(){return sn(e)}function h(t){return Vr(e,t),_(void 0)}e._writable=ge(o,s,l,c,r,n),e._readable=Ir(o,u,h,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Xr(e,!0),e._transformStreamController=void 0}function Wr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Hr(e,t){Mt(e._readable._readableStreamController,t),Vr(e,t)}function Vr(e,t){$r(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Xr(e,!1)}function Xr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=k((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Yr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Kr(this))throw cn("desiredSize");return Nt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Kr(this))throw cn("enqueue");Zr(this,e)},e.prototype.error=function(e){if(!1===Kr(this))throw cn("error");en(this,e)},e.prototype.terminate=function(){if(!1===Kr(this))throw cn("terminate");rn(this)},e}();function Kr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Jr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Qr(e,t){var r=Object.create(Yr.prototype),n=function(e){try{return Zr(r,e),_(void 0)}catch(e){return A(e)}},a=t.transform;if(void 0!==a){if("function"!=typeof a)throw new TypeError("transform is not a method");n=function(e){return d(a,t,[e,r])}}var i=h(t,"flush",0,[r]);Jr(e,r,n,i)}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===Bt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Lt(n,t)}catch(e){throw Vr(r,e),r._readable._storedError}Dt(n)!==r._backpressure&&Xr(r,!0)}function en(e,t){Hr(e._controlledTransformStream,t)}function tn(e,t){return E(e._transformAlgorithm(t),void 0,(function(t){throw Hr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===Bt(r)&&Ft(r),Vr(t,new TypeError("TransformStream terminated"))}function nn(e,t){var r=e._transformStreamController;return!0===e._backpressure?E(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return tn(r,t)})):tn(r,t)}function an(e,t){return Hr(e,t),_(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return $r(r),E(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===Bt(e)&&Ft(e)}),(function(r){throw Hr(e,r),t._storedError}))}function sn(e){return Xr(e,!1),e._backpressureChangePromise}function cn(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ln(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Ur,e.CountQueuingStrategy=qr,e.ReadableStream=Or,e.TransformStream=zr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){r(145),r(114),r(77),r(116);var n=r(43);e.exports=n.Map},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){var n=r(10),a=r(11),i=r(52),o=r(29),s=r(147),c=r(124),l=r(123),u=r(22),h=r(14),f=r(97),d=r(85),p=r(149);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),v=g?"set":"add",y=a[e],b=y&&y.prototype,w=y,S={},k=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!(m&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(i(e,"function"!=typeof y||!(m||b.forEach&&!h((function(){(new y).entries().next()})))))w=r.getConstructor(t,e,g,v),s.REQUIRED=!0;else if(i(e,!0)){var _=new w,A=_[v](m?{}:-0,1)!=_,x=h((function(){_.has(1)})),C=f((function(e){new y(e)})),P=!m&&h((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));C||((w=t((function(t,r){l(t,w,e);var n=p(new y,t,w);return null!=r&&c(r,n[v],n,g),n}))).prototype=b,b.constructor=w),(x||P)&&(k("delete"),k("has"),g&&k("get")),(P||A)&&k(v),m&&b.clear&&delete b.clear}return S[e]=w,n({global:!0,forced:w!=y},S),d(w,e),m||r.setStrong(w,e,g),w}},function(e,t,r){var n=r(39),a=r(22),i=r(23),o=r(27).f,s=r(38),c=r(148),l=s("meta"),u=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,l)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[l].objectID},getWeakData:function(e,t){if(!i(e,l)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[l].weakData},onFreeze:function(e){return c&&d.REQUIRED&&h(e)&&!i(e,l)&&f(e),e}};n[l]=!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),a=r(87);e.exports=function(e,t,r){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==r&&n(o=i.prototype)&&o!==r.prototype&&a(e,o),e}},function(e,t,r){var n=r(27).f,a=r(71),i=r(121),o=r(62),s=r(123),c=r(124),l=r(79),u=r(122),h=r(13),f=r(147).fastKey,d=r(33),p=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,l){var u=e((function(e,n){s(e,u,t),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[l],e,r)})),d=g(t),m=function(e,t,r){var n,a,i=d(e),o=v(e,t);return o?o.value=r:(i.last=o={index:a=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=o),n&&(n.next=o),h?i.size++:e.size++,"F"!==a&&(i.index[a]=o)),e},v=function(e,t){var r,n=d(e),a=f(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(u.prototype,{clear:function(){for(var e=d(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=d(t),n=v(t,e);if(n){var a=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=a),a&&(a.previous=i),r.first==n&&(r.first=a),r.last==n&&(r.last=i),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),i(u.prototype,r?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(u.prototype,"size",{get:function(){return d(this).size}}),u},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),i=g(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;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),u(t)}}},function(e,t,r){r(152),r(114),r(77),r(116);var n=r(43);e.exports=n.Set},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){r(114),r(154),r(116);var n=r(43);e.exports=n.WeakMap},function(e,t,r){var n,a=r(11),i=r(121),o=r(147),s=r(146),c=r(155),l=r(22),u=r(33).enforce,h=r(34),f=!a.ActiveXObject&&"ActiveXObject"in a,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",p,c);if(h&&f){n=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,w=m.set;i(m,{delete:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var r=u(this);r.frozen||(r.frozen=new n),y.call(this,e)?w.call(this,e,t):r.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,r){var n=r(121),a=r(147).getWeakData,i=r(28),o=r(22),s=r(123),c=r(124),l=r(156),u=r(23),h=r(33),f=h.set,d=h.getterFor,p=l.find,g=l.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.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=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:m++,frozen:void 0}),null!=n&&c(n,e[l],e,r)})),p=d(t),g=function(e,t,r){var n=p(e),o=a(i(t),!0);return!0===o?v(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=a(e);return!0===r?v(t).delete(e):r&&u(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=a(e);return!0===r?v(t).has(e):r&&u(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=a(e);return!0===r?v(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),a=r(18),i=r(83),o=r(47),s=r(157),c=[].push,l=function(e){var t=1==e,r=2==e,l=3==e,u=4==e,h=6==e,f=5==e||h;return function(d,p,g,m){for(var v,y,b=i(d),w=a(b),S=n(p,g,3),k=o(w.length),_=0,A=m||s,x=t?A(d,k):r?A(d,0):void 0;k>_;_++)if((f||_ in w)&&(y=S(v=w[_],_,b),e))if(t)x[_]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:c.call(x,v)}else if(u)return!1;return h?-1:l||u?u:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,r){var n=r(22),a=r(158),i=r(57)("species");e.exports=function(e,t){var r;return a(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!a(r.prototype)?n(r)&&null===(r=r[i])&&(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(114),r(160),r(116);var n=r(43);e.exports=n.WeakSet},function(e,t,r){r(146)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(155))},function(e,t,r){r(162);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){var n=r(10),a=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return a(this,e)}})},function(e,t,r){r(164);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),a=r(49),i=String.fromCharCode,o=String.fromCodePoint;n({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(166),r(114),r(168),r(172),r(173),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);var n=r(43);e.exports=n.Symbol},function(e,t,r){var n=r(10),a=r(14),i=r(158),o=r(22),s=r(83),c=r(47),l=r(93),u=r(157),h=r(167),f=r(57),d=r(133),p=f("isConcatSpreadable"),g=9007199254740991,m="Maximum allowed index exceeded",v=d>=51||!a((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),y=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,r,n,a,i,o=s(this),h=u(o,0),f=0;for(t=-1,n=arguments.length;tg)throw TypeError(m);for(r=0;r=g)throw TypeError(m);l(h,f++,i)}return h.length=f,h}})},function(e,t,r){var n=r(14),a=r(57),i=r(133),o=a("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){var n=r(10),a=r(11),i=r(42),o=r(37),s=r(13),c=r(58),l=r(59),u=r(14),h=r(23),f=r(158),d=r(22),p=r(28),g=r(83),m=r(17),v=r(21),y=r(16),b=r(71),w=r(73),S=r(44),k=r(169),_=r(51),A=r(12),x=r(27),C=r(15),P=r(26),T=r(29),E=r(36),R=r(35),O=r(39),I=r(38),F=r(57),L=r(170),M=r(171),N=r(85),D=r(33),B=r(156).forEach,j=R("hidden"),U="Symbol",q="prototype",z=F("toPrimitive"),G=D.set,W=D.getterFor(U),H=Object[q],V=a.Symbol,X=i("JSON","stringify"),Y=A.f,K=x.f,J=k.f,Q=C.f,$=E("symbols"),Z=E("op-symbols"),ee=E("string-to-symbol-registry"),te=E("symbol-to-string-registry"),re=E("wks"),ne=a.QObject,ae=!ne||!ne[q]||!ne[q].findChild,ie=s&&u((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Y(H,t);n&&delete H[t],K(e,t,r),n&&e!==H&&K(H,t,n)}:K,oe=function(e,t){var r=$[e]=b(V[q]);return G(r,{type:U,tag:e,description:t}),s||(r.description=t),r},se=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof V},ce=function(e,t,r){e===H&&ce(Z,t,r),p(e);var n=v(t,!0);return p(r),h($,n)?(r.enumerable?(h(e,j)&&e[j][n]&&(e[j][n]=!1),r=b(r,{enumerable:y(0,!1)})):(h(e,j)||K(e,j,y(1,{})),e[j][n]=!0),ie(e,n,r)):K(e,n,r)},le=function(e,t){p(e);var r=m(t),n=w(r).concat(de(r));return B(n,(function(t){s&&!ue.call(r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=v(e,!0),r=Q.call(this,t);return!(this===H&&h($,t)&&!h(Z,t))&&(!(r||!h(this,t)||!h($,t)||h(this,j)&&this[j][t])||r)},he=function(e,t){var r=m(e),n=v(t,!0);if(r!==H||!h($,n)||h(Z,n)){var a=Y(r,n);return!a||!h($,n)||h(r,j)&&r[j][n]||(a.enumerable=!0),a}},fe=function(e){var t=J(m(e)),r=[];return B(t,(function(e){h($,e)||h(O,e)||r.push(e)})),r},de=function(e){var t=e===H,r=J(t?Z:m(e)),n=[];return B(r,(function(e){!h($,e)||t&&!h(H,e)||n.push($[e])})),n};c||(V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),r=function(e){this===H&&r.call(Z,e),h(this,j)&&h(this[j],t)&&(this[j][t]=!1),ie(this,t,y(1,e))};return s&&ae&&ie(H,t,{configurable:!0,set:r}),oe(t,e)},T(V[q],"toString",(function(){return W(this).tag})),T(V,"withoutSetter",(function(e){return oe(I(e),e)})),C.f=ue,x.f=ce,A.f=he,S.f=k.f=fe,_.f=de,L.f=function(e){return oe(F(e),e)},s&&(K(V[q],"description",{configurable:!0,get:function(){return W(this).description}}),o||T(H,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(w(re),(function(e){M(e)})),n({target:U,stat:!0,forced:!c},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=V(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(){ae=!0},useSimple:function(){ae=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?b(e):le(b(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:de}),n({target:"Object",stat:!0,forced:u((function(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(g(e))}}),X&&n({target:"JSON",stat:!0,forced:!c||u((function(){var e=V();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,r){for(var n,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);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}),a[1]=t,X.apply(null,a)}}),V[q][z]||P(V[q],z,V[q].valueOf),N(V,U),O[j]=!0},function(e,t,r){var n=r(17),a=r(44).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),a=r(23),i=r(170),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});a(t,e)||o(t,e,{value:i.f(e)})}},function(e,t,r){r(171)("asyncIterator")},function(e,t,r){var n=r(10),a=r(13),i=r(11),o=r(23),s=r(22),c=r(27).f,l=r(40),u=i.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new u(e):void 0===e?u():u(e);return""===e&&(h[t]=!0),t};l(f,u);var d=f.prototype=u.prototype;d.constructor=f;var p=d.toString,g="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=g?t.slice(7,-1):t.replace(m,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){r(171)("hasInstance")},function(e,t,r){r(171)("isConcatSpreadable")},function(e,t,r){r(171)("iterator")},function(e,t,r){r(171)("match")},function(e,t,r){r(171)("matchAll")},function(e,t,r){r(171)("replace")},function(e,t,r){r(171)("search")},function(e,t,r){r(171)("species")},function(e,t,r){r(171)("split")},function(e,t,r){r(171)("toPrimitive")},function(e,t,r){r(171)("toStringTag")},function(e,t,r){r(171)("unscopables")},function(e,t,r){r(85)(Math,"Math",!0)},function(e,t,r){var n=r(11);r(85)(n.JSON,"JSON",!0)},function(e,t,r){r(189);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){var n=r(10),a=r(190).start;n({target:"String",proto:!0,forced:r(192)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),a=r(191),i=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var c,l,u=String(i(t)),h=u.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?u:(c=d-h,(l=a.call(f,o(c/f.length))).length>c&&(l=l.slice(0,c)),e?u+l:l+u)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){var n=r(48),a=r(20);e.exports="".repeat||function(e){var t=String(a(this)),r="",i=n(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(r+=t);return r}},function(e,t,r){var n=r(127);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(194);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){var n=r(10),a=r(190).end;n({target:"String",proto:!0,forced:r(192)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(196);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),a=r(197).values;n({target:"Object",stat:!0},{values:function(e){return a(e)}})},function(e,t,r){var n=r(13),a=r(73),i=r(17),o=r(15).f,s=function(e){return function(t){for(var r,s=i(t),c=a(s),l=c.length,u=0,h=[];l>u;)r=c[u++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}};e.exports={entries:s(!0),values:s(!1)}},function(module,exports,__w_pdfjs_require__){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__(199),_api_compatibility=__w_pdfjs_require__(200),_canvas=__w_pdfjs_require__(201),_worker_options=__w_pdfjs_require__(203),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(204),_metadata=__w_pdfjs_require__(205),_transport_stream=__w_pdfjs_require__(207),_webgl=__w_pdfjs_require__(208);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,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,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}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;)(0,r.value)(e,t)}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(e){a.e(e)}finally{a.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;)(0,r.value)(e)}catch(e){n.e(e)}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;)(0,t.value)()}catch(e){r.e(e)}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:"getOpenActionDestination",value:function(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}},{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:"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:"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){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,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=Object.create(null),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,a=e.offsetX,i=void 0===a?0:a,o=e.offsetY,s=void 0===o?0:o,c=e.dontFlip,l=void 0!==c&&c;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:i,offsetY:s,dontFlip:l})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?null:e;return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,a=e.intent,i=void 0===a?"display":a,o=e.enableWebGL,s=void 0!==o&&o,c=e.renderInteractiveForms,l=void 0!==c&&c,u=e.transform,h=void 0===u?null:u,f=e.imageLayer,d=void 0===f?null:f,p=e.canvasFactory,g=void 0===p?null:p,m=e.background,v=void 0===m?null:m;this._stats&&this._stats.time("Overall");var y="print"===i?"print":"display";this.pendingCleanup=!1,this.intentStates[y]||(this.intentStates[y]=Object.create(null));var b=this.intentStates[y];b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);var w=g||new _display_utils.DOMCanvasFactory,S=new _webgl.WebGLContext({enable:s});b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:y,renderInteractiveForms:!0===l}));var k=function(e){var r=b.renderTasks.indexOf(_);r>=0&&b.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===y)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(_.capability.reject(e),t._abortOperatorList({intentState:b,reason:e})):_.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},_=new InternalRenderTask({callback:k,params:{canvasContext:r,viewport:n,transform:h,imageLayer:d,background:v},objs:this.objs,commonObjs:this.commonObjs,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:w,webGLContext:S,useRequestAnimationFrame:"print"!==y,pdfBug:this._pdfBug});b.renderTasks||(b.renderTasks=[]),b.renderTasks.push(_);var A=_.task;return b.displayReadyCapability.promise.then((function(e){t.pendingCleanup?k():(t._stats&&t._stats.time("Rendering"),_.initializeGraphics(e),_.operatorListChanged())})).catch(k),A}},{key:"getOperatorList",value:function(){var e="oplist";this.intentStates[e]||(this.intentStates[e]=Object.create(null));var t,r=this.intentStates[e];return r.opListReadCapability||((t={}).operatorListChanged=function(){if(r.operatorList.lastChunk){r.opListReadCapability.resolve(r.operatorList);var e=r.renderTasks.indexOf(t);e>=0&&r.renderTasks.splice(e,1)}},r.opListReadCapability=(0,_util.createPromiseCapability)(),r.renderTasks=[],r.renderTasks.push(t),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:e})),r.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,a=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==a},{highWaterMark:100,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){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){var n,i=r.value;r.done?e(a):(Object.assign(a.styles,i.styles),(n=a.items).push.apply(n,_toConsumableArray(i.items)),t())}),r)}()}))}},{key:"_destroy",value:function(){var e=this;this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var t=[];return Object.keys(this.intentStates).forEach((function(r){var n=e.intentStates[r];e._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==r&&n.renderTasks.forEach((function(e){var r=e.capability.promise.catch((function(){}));t.push(r),e.cancel()}))})),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=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.pendingCleanup||Object.keys(this.intentStates).some((function(t){var r=e.intentStates[t];return 0!==r.renderTasks.length||!r.operatorList.lastChunk}))||(Object.keys(this.intentStates).forEach((function(t){delete e.intentStates[t]})),this.objs.clear(),this.annotationsPromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,0))}},{key:"_startRenderPage",value:function(e,t){var r=this.intentStates[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;if(this._defer){var n=new WeakMap,a={data:function e(r){if("object"!==_typeof(r)||null===r)return r;if(n.has(r))return n.get(r);var a,i;if((a=r.buffer)&&(0,_util.isArrayBuffer)(a))return i=t&&t.includes(a)?new r.constructor(a,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,i),i;for(var o in i=Array.isArray(r)?[]:{},n.set(r,i),r){for(var s=void 0,c=r;!(s=Object.getOwnPropertyDescriptor(c,o));)c=Object.getPrototypeOf(c);if(void 0!==s.value)if("function"!=typeof s.value)i[o]=e(s.value);else if(r.hasOwnProperty&&r.hasOwnProperty(o))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(r[o]))}return i}(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&&"function"==typeof commonjsRequire)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(void 0!==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(e){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref10=_asyncToGenerator(_regenerator.default.mark((function _callee(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap((function _callee$(_context){for(;;)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||"function"!=typeof commonjsRequire){_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 _ref10.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,a=t.port,i=void 0===a?null:a,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),i&&pdfWorkerPorts.has(i))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,i)return pdfWorkerPorts.set(i,this),void this._initializeFromPort(i);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),a=function(){r.removeEventListener("error",i),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},i=function(){e._webWorker||a()};r.addEventListener("error",i),n.on("test",(function(t){r.removeEventListener("error",i),e.destroyed?a():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",i),e.destroyed)a();else try{o()}catch(t){e._setupFakeWorker()}}));var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{n.send("test",t,[t.buffer])}catch(e){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,n.send("test",t)}};return void o()}catch(e){(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++,a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var i=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=i,e._readyCapability.resolve(),i.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,a){_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)}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.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;e.done?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)}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&r.onProgress&&r.onProgress(e._lastProgress),a.onProgress=function(e){r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.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;e.done?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(e){n.cancel(e)}):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)}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword)try{r.onPassword((function(t){e._passwordCapability.resolve({password:t})}),t.code)}catch(t){e._passwordCapability.reject(t)}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){e.destroyed||e.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)})),t.on("commonobj",(function(r){if(!e.destroyed){var n=_slicedToArray(r,3),a=n[0],i=n[1],o=n[2];if(!e.commonObjs.has(a))switch(i){case"Font":var s=e._params;if("error"in o){var c=o.error;(0,_util.warn)("Error during font loading: ".concat(c)),e.commonObjs.resolve(a,c);break}var l=null;s.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(l={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var u=new _font_loader.FontFaceObject(o,{isEvalSupported:s.isEvalSupported,disableFontFace:s.disableFontFace,ignoreErrors:s.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:l});e.fontLoader.bind(u).catch((function(e){return t.sendWithPromise("FontFallback",{id:a})})).finally((function(){!s.fontExtraProperties&&u.data&&(u.data=null),e.commonObjs.resolve(a,u)}));break;case"FontPath":case"FontType3Res":case"Image":e.commonObjs.resolve(a,o);break;default:throw new Error("Got unknown common object type ".concat(i))}}})),t.on("obj",(function(t){if(!e.destroyed){var r=_slicedToArray(t,4),n=r[0],a=r[1],i=r[2],o=r[3],s=e.pageCache[a];if(!s.objs.has(n)){if("Image"!==i)throw new Error("Got unknown object type ".concat(i));s.objs.resolve(n,o),o&&"data"in o&&o.data.length>8e6&&(s.cleanupAfterRender=!0)}}})),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.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:"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:"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,a=e.objs,i=e.commonObjs,o=e.operatorList,s=e.pageIndex,c=e.canvasFactory,l=e.webGLContext,u=e.useRequestAnimationFrame,h=void 0!==u&&u,f=e.pdfBug,d=void 0!==f&&f;_classCallCheck(this,t),this.callback=r,this.params=n,this.objs=a,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=c,this.webGLContext=l,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}var r;return _createClass(t,[{key:"initializeGraphics",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];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 r=this.params,n=r.canvasContext,a=r.viewport,i=r.transform,o=r.imageLayer,s=r.background;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,o),this.gfx.beginDrawing({transform:i,viewport:a,transparency:t,background:s}),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:(r=_asyncToGenerator(_regenerator.default.mark((function t(){return _regenerator.default.wrap((function(t){for(;;)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(){return r.apply(this,arguments)})}]),t}();return t}(),version="2.5.207";exports.version=version;var build="0974d605";exports.build=build},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);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){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,c=document.createElement("canvas");c.width=1,c.height=1;var l=c.getContext("2d"),u=0,h="lt".concat(Date.now()).concat(this.loadTestFontId++),f=this._loadTestFont,d=1482184792,p=n(f=a(f,976,h.length,h),16);for(o=0,s=h.length-3;o30)return(0,i.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,(function(){document.body.removeChild(y),r.complete()}))}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}}]),r}(g);var m=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,i=r.disableFontFace,o=void 0!==i&&i,s=r.ignoreErrors,c=void 0!==s&&s,l=r.onUnsupportedFeature,u=void 0===l?null:l,f=r.fontRegistry,d=void 0===f?null:f;for(var p in h(this,e),this.compiledGlyphs=Object.create(null),t)this[p]=t[p];this.isEvalSupported=!1!==a,this.disableFontFace=!0===o,this.ignoreErrors=!0===c,this._onUnsupportedFeature=u,this.fontRegistry=d}return d(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(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){for(var a,o="",s=0,c=r.length;s=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>2),w=b.length,S=u+7>>3,k=4294967295,_=n.IsLittleEndianCached.value?4278190080:255;for(a=0;aS?u:8*A-7,P=-8&C,T=0,E=0;x>=1}for(;r=f&&(s=u*(o=h)),r=0,i=s;i--;)v[r++]=m[g++],v[r++]=m[g++],v[r++]=m[g++],v[r++]=255;e.putImageData(p,0,a*l)}}}}function r(e,t){for(var r=t.height,n=t.width,a=r%l,i=(r-a)/l,o=0===a?i:i+1,s=e.createImageData(n,l),c=0,u=t.data,h=s.data,f=0;f>=1}e.putImageData(s,0,f*l)}}function o(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n>8,e[i-2]=e[i-2]*o+r*s>>8,e[i-1]=e[i-1]*o+n*s>>8}}}function g(e,t,r){for(var n=e.length,a=3;a>8]>>8:t[a]*i>>16}}function v(e,t,r,n){var a=t.canvas,i=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&n.isEnabled){var s=n.composeSMask({layer:r.canvas,mask:a,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,r,n,a,i,o){var s,c=!!i,l=c?i[0]:0,u=c?i[1]:0,h=c?i[2]:0;s="Luminosity"===a?m:g;for(var f=Math.min(n,Math.ceil(1048576/r)),d=0;d10&&"function"==typeof r,f=h?Date.now()+15:0,d=0,p=this.commonObjs,g=this.objs;;){if(void 0!==a&&c===a.nextBreakPoint)return a.breakIt(c,r),c;if((u=s[c])!==n.OPS.dependency)this[u].apply(this,o[c]);else{var m,v=i(o[c]);try{for(v.s();!(m=v.n()).done;){var y=m.value,b=y.startsWith("g_")?p:g;if(!b.has(y))return b.get(y,r),c}}catch(e){v.e(e)}finally{v.f()}}if(++c===l)return c;if(h&&++d>10){if(Date.now()>f)return r(),c;d=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=y[e]},setLineJoin:function(e){this.ctx.lineJoin=b[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent: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=i?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(n,t,r,!0),i=this.ctx,s=i.mozCurrentTransform;this.ctx.save();var c=a.context;c.scale(1/e.scaleX,1/e.scaleY),c.translate(-e.offsetX,-e.offsetY),c.transform.apply(c,s),e.startTransformInverse=c.mozCurrentTransformInverse,o(i,c),this.ctx=c,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),o(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(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),o(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,a,i){this.ctx.transform(e,t,r,n,a,i),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,a=this.current,i=a.x,o=a.y,s=0,c=0,l=e.length;s100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(o," ").concat(l,"px ").concat(c)}},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,a,i){this.current.textMatrix=[e,t,r,n,a,i],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,a){var i,o=this.ctx,s=this.current,c=s.font,l=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,h=l&n.TextRenderingMode.FILL_STROKE_MASK,f=!!(l&n.TextRenderingMode.ADD_TO_PATH_FLAG),d=s.patternFill&&!c.missingFile;(c.disableFontFace||f||d)&&(i=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||d?(o.save(),o.translate(t,r),o.beginPath(),i(o,u),a&&o.setTransform.apply(o,a),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&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:u,addToPath:i})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var a=t.fontSize;if(0!==a){var i,o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,u=t.wordSpacing,h=t.fontDirection,f=t.textHScale*h,d=e.length,p=r.vertical,g=p?1:-1,m=r.defaultVMetrics,v=a*t.fontMatrix[0],y=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var b=t.fillColor.getPattern(o,this);i=o.mozCurrentTransform,o.restore(),o.fillStyle=b}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),h>0?o.scale(f,-1):o.scale(f,1);var w=t.lineWidth,S=t.textMatrixScale;if(0===S||0===w){var k=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;k!==n.TextRenderingMode.STROKE&&k!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,w=this.getSinglePixelWidth()*c)}else w/=S;1!==s&&(o.scale(s,s),w/=s),o.lineWidth=w;var _,A=0;for(_=0;_0){var B=1e3*o.measureText(M).width/a*s;if(Ds&&(f=u/s,u=s),h>s&&(d=h/s,h=s);var p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);var g=this.cachedCanvases.getCanvas(p,u,h,!0),m=g.context;m.scale(1/f,1/d),m.translate(-c,-l),m.transform.apply(m,r),e.smask?this.smaskStack.push({canvas:g.canvas,context:m,offsetX:c,offsetY:l,scaleX:f,scaleY:d,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(c,l),t.scale(f,d)),o(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),d(this.ctx),this.current=new f,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],a=e[3]-e[1];this.ctx.rect(e[0],e[1],n,a),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,n=e.width,a=e.height,i=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=n<=1e3&&a<=1e3?function(e){var t,r,n,a,i=e.width,o=e.height,s=i+1,c=new Uint8Array(s*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=i+7&-8,h=e.data,f=new Uint8Array(u*o),d=0;for(t=0,a=h.length;t0;)f[d++]=g&p?0:255,p>>=1;var m=0;for(0!==f[d=0]&&(c[0]=1,++m),r=1;r>2)+(f[d+1]?4:0)+(f[d-u+1]?8:0)]&&(c[n+r]=l[v],++m),d++;if(f[d-u]!==f[d]&&(c[n+r]=f[d]?2:4,++m),m>1e3)return null}for(n=t*s,0!==f[d=u*(o-1)]&&(c[n]=8,++m),r=1;r1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),b=[];for(t=0;m&&t<=o;t++){for(var w=t*s,S=w+i;w>4,c[w]&=A>>2|A<<2),_.push(w%s),_.push(w/s|0),c[w]||--m}while(x!==w);b.push(_),--t}}return function(e){e.save(),e.scale(1/i,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=b.length;t2&&g>1||d>2&&m>1;){var y=g,b=m;u>2&&g>1&&(u/=g/(y=Math.ceil(g/2))),d>2&&m>1&&(d/=m/(b=Math.ceil(m/2))),(p=(o=this.cachedCanvases.getCanvas(v,y,b)).context).clearRect(0,0,y,b),p.drawImage(i,0,0,g,m,0,0,y,b),i=o.canvas,g=y,m=b,v="prescale1"===v?"prescale2":"prescale1"}if(a.drawImage(i,0,0,g,m,0,-n,r,n),this.imageLayer){var w=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:w[0],top:w[1],width:r/s[0],height:n/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var n=this.ctx,a=e.width,i=e.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i);t(o.context,e);for(var s=0,c=r.length;sl[n+1]&&(c=r,r=n,n=c,c=i,i=o,o=c),l[n+1]>l[a+1]&&(c=n,n=a,a=c,c=o,o=s,s=c),l[r+1]>l[n+1]&&(c=r,r=n,n=c,c=i,i=o,o=c);var d=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,g=(l[n]+t.offsetX)*t.scaleX,m=(l[n+1]+t.offsetY)*t.scaleY,v=(l[a]+t.offsetX)*t.scaleX,y=(l[a+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var b,w,S,k,_,A,x,C,P=u[i],T=u[i+1],E=u[i+2],R=u[o],O=u[o+1],I=u[o+2],F=u[s],L=u[s+1],M=u[s+2],N=Math.round(p),D=Math.round(y),B=N;B<=D;B++){if(By?1:m===y?0:(m-B)/(m-y)),w=R-(R-F)*U,S=O-(O-L)*U,k=I-(I-M)*U}var q=void 0;_=d-(d-v)*(q=By?1:(p-B)/(p-y)),A=P-(P-F)*q,x=T-(T-L)*q,C=E-(E-M)*q;for(var z=Math.round(Math.min(b,_)),G=Math.round(Math.max(b,_)),W=f*B+4*z,H=z;H<=G;H++)(q=(b-H)/(b-_))<0?q=0:q>1&&(q=1),h[W++]=w-(w-A)*q|0,h[W++]=S-(S-x)*q|0,h[W++]=k-(k-C)*q|0,h[W++]=255}}function t(t,r,n){var a,i,o=r.coords,s=r.colors;switch(r.type){case"lattice":var c=r.verticesPerRow,l=Math.floor(o.length/c)-1,u=c-1;for(a=0;a=n?a=n:r=a/e,{scale:r,size:a}},clipBbox:function(e,t,r,n,a,i){if(Array.isArray(t)&&4===t.length){var o=a-r,s=i-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(r,a,i){var o=r.ctx,s=r.current;switch(a){case e:var c=this.ctx;o.fillStyle=c.fillStyle,o.strokeStyle=c.strokeStyle,s.fillColor=c.fillStyle,s.strokeColor=c.strokeStyle;break;case t:var l=n.Util.makeCssRgb(i[0],i[1],i[2]);o.fillStyle=l,o.strokeStyle=l,s.fillColor=l,s.strokeColor=l;break;default:throw new n.FormatError("Unsupported paint type: ".concat(a))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=s},function(e,t,r){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){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(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 c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:p,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d,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:g,streamId:n,reason:b(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[n]=c,new Promise((function(t){t(r(e.data,c))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case y:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(b(e.reason));break;case v:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(b(e.reason));break;case m:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:v,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:v,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)})}));break;case p: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: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 g:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(b(e.reason)),this._deleteStreamController(t);break;case f:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(b(e.reason)),this._deleteStreamController(t);break;case h:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:b(e)})})),this.streamSinks[t].sinkCapability.reject(b(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(c=a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)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)})),w=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=c.apply(e,t);function i(e){o(a,r,n,i,s,"next",e)}function s(e){o(a,r,n,i,s,"throw",e)}i(void 0)}))},function(e){return w.apply(this,arguments)})},{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)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.MessageHandler=w},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(5),a=r(206);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||o(e,t)||function(){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 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);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="",a=0,i=r.length;a=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())for(t=t.firstChild;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,a=0,i=n.length;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}(this._metadataMap);try{for(r.s();!(e=r.n()).done;){var n=i(e.value,2),a=n[0],s=n[1];t[a]=s}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"has",value:function(e){return this._metadataMap.has(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.Metadata=l},function(e,t,r){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)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(e,t)||function(){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 i(e,t){(null==t||t>e.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 a(){for(;n"!==e[n]&&"/"!==e[n];)++n;var i=e.substring(t,n);for(a();n"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();for(var o,s="";n"!==e[r]&&"/"!==e[r];)++r;var n=e.substring(t,r);!function(){for(;r"!==e[r+1]);)++r;return{name:n,value:e.substring(a,r),parsed:r-t}}},{key:"parseXml",value:function(e){for(var t=0;t",r))<0)return void this.onError(b);this.onEndElement(e.substring(r,n)),r=n+1;break;case"?":++r;var a=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+a.parsed,r+a.parsed+2))return void this.onError(g);this.onPi(a.name,a.value),r+=a.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((n=e.indexOf("--\x3e",r+3))<0)return void this.onError(v);this.onComment(e.substring(r+3,n)),r=n+3}else if("[CDATA["===e.substring(r+1,r+8)){if((n=e.indexOf("]]>",r+8))<0)return void this.onError(p);this.onCdata(e.substring(r+8,n)),r=n+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(y);var i=e.indexOf("[",r+8),o=!1;if((n=e.indexOf(">",r+8))<0)return void this.onError(m);if(i>0&&n>i){if((n=e.indexOf("]>",r+8))<0)return void this.onError(m);o=!0}var s=e.substring(r+8,n+(o?1:0));this.onDoctype(s),r=n+(o?2:1)}break;default:var c=this._parseContent(e,r);if(null===c)return void this.onError(y);var l=!1;if("/>"===e.substring(r+c.parsed,r+c.parsed+2))l=!0;else if(">"!==e.substring(r+c.parsed,r+c.parsed+1))return void this.onError(b);this.onBeginElement(c.name,c.attributes,l),r+=c.parsed+(l?2:1)}}else{for(;r0}},{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}(),_=function(e){!function(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&&s(e,t)}(r,e);var t=c(r);function r(){var e;return u(this,r),(e=t.call(this))._currentFragment=null,e._stack=null,e._errorCode=d,e}return f(r,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=d,this.parseXml(e),this._errorCode===d){var t=a(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){return"apos"===e?"'":o(l(r.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}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 f(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 p(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),this._rangeReaders.slice(0).forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=d;var p=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var a,i=c(this._queuedChunks);try{for(i.s();!(a=i.n()).done;){var o=a.value;this._loaded+=o.byteLength}}catch(e){i.e(e)}finally{i.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}var t;return f(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"read",value:(t=s(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){u(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}var t;return f(e,[{key:"_enqueue",value:function(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}},{key:"read",value:(t=s(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(5);function a(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}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],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];p(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,r&&(this.container=this._createContainer(n))}return m(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,i=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];i.setAttribute("data-annotation-id",t.id);var c=a.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(i.style.transform="matrix(".concat(n.transform.join(","),")"),i.style.transformOrigin="-".concat(c[0],"px -").concat(c[1],"px"),!e&&t.borderStyle.width>0){i.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,u=t.borderStyle.verticalCornerRadius;if(l>0||u>0){var h="".concat(l,"px / ").concat(u,"px");i.style.borderRadius=h}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}t.color?i.style.borderColor=a.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):i.style.borderWidth=0}return i.style.left="".concat(c[0],"px"),i.style.top="".concat(c[1],"px"),i.style.width="".concat(o,"px"),i.style.height="".concat(s,"px"),i}},{key:"_createPopup",value:function(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new T({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}).render();n.style.left=e.style.width,e.appendChild(n)}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),b=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.url||e.data.dest||e.data.action);return t.call(this,e,n)}return m(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}(y),w=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n)}return m(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}(y),S=function(e){l(r,e);var t=h(r);function r(){return p(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){return this.container}}]),r}(y),k=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,n)}return m(r,[{key:"render",value:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea")).textContent=this.data.fieldValue:((e=document.createElement("input")).type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,e.name=this.data.fieldName,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var t=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc(".concat(t,"px - 1ch)")}}else{(e=document.createElement("div")).textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var r=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(r=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(e,r)}return null!==this.data.textAlignment&&(e.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(e),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 a=t.loadedName?'"'.concat(t.loadedName,'", '):"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=a+i}}}]),r}(S),_=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",e.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),r}(S),A=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),r}(S),x=function(e){l(r,e);var t=h(r);function r(){return p(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){var e=s(d(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),r}(b),C=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,e.name=this.data.fieldName,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));var t,r=i(this.data.options);try{for(r.s();!(t=r.n()).done;){var n=t.value,a=document.createElement("option");a.textContent=n.displayValue,a.value=n.exportValue,this.data.fieldValue.includes(n.displayValue)&&a.setAttribute("selected",!0),e.appendChild(a)}}catch(e){r.e(e)}finally{r.f()}return this.container.appendChild(e),this.container}}]),r}(S),P=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!(!e.data.title&&!e.data.contents);return t.call(this,e,n)}return m(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelector(e);if(!t)return this.container;var r=new T({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=parseFloat(t.style.left),a=parseFloat(t.style.width);return this.container.style.transformOrigin="-".concat(n+a,"px -").concat(t.style.top),this.container.style.left="".concat(n+a,"px"),this.container.appendChild(r.render()),this.container}}]),r}(y),T=function(){function e(t){p(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 m(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var i=.7*(255-r[0])+r[0],o=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];t.style.backgroundColor=a.Util.makeCssRgb(0|i,0|o,0|s)}var c=document.createElement("h1");c.textContent=this.title,t.appendChild(c);var l=n.PDFDateString.toDateObject(this.modificationDate);if(l){var u=document.createElement("span");u.textContent="{{date}}, {{time}}",u.dataset.l10nId="annotation_date_string",u.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),t.appendChild(u)}var h=this._formatContents(this.contents);return t.appendChild(h),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,a=r.length;n0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),E=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),R=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(y),O=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",a/2),i.setAttribute("y",a/2),i.setAttribute("width",t-a),i.setAttribute("height",r-a),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(y),I=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",r/2),i.setAttribute("rx",t/2-a/2),i.setAttribute("ry",r/2-a/2),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(y),F=function(e){l(r,e);var t=h(r);function r(e){var n;p(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,a,!0)).containerClassName="polylineAnnotation",n.svgElementName="svg:polyline",n}return m(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],a=this.svgFactory.create(r,n),o=[],s=i(t.vertices);try{for(s.s();!(e=s.n()).done;){var c=e.value,l=c.x-t.rect[0],u=t.rect[3]-c.y;o.push(l+","+u)}}catch(e){s.e(e)}finally{s.f()}o=o.join(" ");var h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",o),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),a.appendChild(h),this.container.append(a),this._createPopup(this.container,h,t),this.container}}]),r}(y),L=function(e){l(r,e);var t=h(r);function r(e){var n;return p(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(F),M=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),N=function(e){l(r,e);var t=h(r);function r(e){var n;p(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,a,!0)).containerClassName="inkAnnotation",n.svgElementName="svg:polyline",n}return m(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],a=this.svgFactory.create(r,n),o=i(t.inkLists);try{for(o.s();!(e=o.n()).done;){var s,c=e.value,l=[],u=i(c);try{for(u.s();!(s=u.n()).done;){var h=s.value,f=h.x-t.rect[0],d=t.rect[3]-h.y;l.push("".concat(f,",").concat(d))}}catch(e){u.e(e)}finally{u.f()}l=l.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",l),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,t),a.appendChild(p)}}catch(e){o.e(e)}finally{o.f()}return this.container.append(a),this.container}}]),r}(y),D=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),B=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),j=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),U=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),q=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),z=function(e){l(r,e);var t=h(r);function r(e){var i;p(this,r);var o=(i=t.call(this,e,!0)).data.file,s=o.filename,c=o.content;return i.filename=(0,n.getFilenameFromUrl)(s),i.content=c,i.linkService.eventBus&&i.linkService.eventBus.dispatch("fileattachmentannotation",{source:f(i),id:(0,a.stringToPDFString)(s),filename:s,content:c}),i}return m(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,a.warn)("Download cannot be started due to unavailable download manager")}}]),r}(y),G=function(){function e(){p(this,e)}return m(e,null,[{key:"render",value:function(e){var t,r=[],o=[],s=i(e.annotations);try{for(s.s();!(t=s.n()).done;){var c=t.value;c&&(c.annotationType!==a.AnnotationType.POPUP?r.push(c):o.push(c))}}catch(e){s.e(e)}finally{s.f()}o.length&&r.push.apply(r,o);for(var l=0,u=r;l1)g=!0;else if(r.transform[0]!==r.transform[3]){var m=Math.abs(r.transform[0]),v=Math.abs(r.transform[3]);m!==v&&Math.max(m,v)/Math.min(m,v)>1.5&&(g=!0)}if(g&&(u.vertical?s.canvasWidth=r.height*t._viewport.scale:s.canvasWidth=r.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var y=1,b=0;0!==l&&(y=Math.cos(l),b=Math.sin(l));var w,S,k=(u.vertical?r.height:r.width)*t._viewport.scale,_=d;0!==l?(w=[y,b,-b,y,h,f],S=n.Util.getAxialAlignedBoundingBox([0,0,k,_],w)):S=[h,f,h+k,f+_],t._bounds.push({left:S[0],top:S[1],right:S[2],bottom:S[3],div:o,size:[k,_],m:w})}}function r(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a0&&(n=n?Math.min(i,n):i)}return n}function i(e){for(var t=e._bounds,r=e._viewport,i=function(e,t,r){var n=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));o(e,n);var a=new Array(r.length);return n.forEach((function(e){var t=e.index;a[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),r.map((function(t,r){var i=a[r],o=n[r];o.x1=t.top,o.y1=e-i.right,o.x2=t.bottom,o.y2=e-i.left,o.index=r,o.x1New=void 0,o.x2New=void 0})),o(t,n),n.forEach((function(e){var t=e.index;a[t].top=e.x1New,a[t].bottom=e.x2New})),a}(r.width,r.height,t),s=0;s=0&&r[i].start>=e.y2;)i--;var o,s,c=-1/0;for(o=t;o<=i;o++){var l;(l=(a=(n=r[o]).boundary).x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New)>c&&(c=l)}for(e.x1New=c,o=t;o<=i;o++)void 0===(a=(n=r[o]).boundary).x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));var u=[],h=null;for(o=t;o<=i;o++){var f=(a=(n=r[o]).boundary).x2>e.x2?a:e;h===f?u[u.length-1].end=n.end:(u.push({start:n.start,end:n.end,boundary:f}),h=f)}for(r[t].start=0&&r[s].start>=a.y1;s--)d=r[s].boundary===a;for(s=i+1;!d&&s0&&(t.scale=t.canvasWidth/o,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,a=(0,n.createPromiseCapability)(),i=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,c=this._textContent.styles;this._processItems(s,c),a.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then((function(r){var n=r.value;r.done?a.resolve():(Object.assign(i,n.styles),t._processItems(n.items,i),e())}),a.reject)}()}a.promise.then((function(){i=null,e?t._renderTimer=setTimeout((function(){r(t),t._renderTimer=null}),e):r(t)}),this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(i(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n0?(r.push("".concat(s.paddingTop,"px")),t.push("translateY(".concat(-s.paddingTop,"px)"))):r.push(0),s.paddingRight>0?r.push("".concat(s.paddingRight/s.scale,"px")):r.push(0),s.paddingBottom>0?r.push("".concat(s.paddingBottom,"px")):r.push(0),s.paddingLeft>0?(r.push("".concat(s.paddingLeft/s.scale,"px")),t.push("translateX(".concat(-s.paddingLeft/s.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=s.originalTransform))}}}},function(e){var t=new s({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(5),a=r(1),i=r(7);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||l(e,t)||function(){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 c(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function l(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);r>1&2147483647:a>>1&2147483647;t[r]=a}function s(e,r,n,a){var i=a,o=r.length;n[i]=o>>24&255,n[i+1]=o>>16&255,n[i+2]=o>>8&255,n[i+3]=255&o,n[i+=4]=255&e.charCodeAt(0),n[i+1]=255&e.charCodeAt(1),n[i+2]=255&e.charCodeAt(2),n[i+3]=255&e.charCodeAt(3),i+=4,n.set(r,i);var s=function(e,r,n){for(var a=-1,i=r;i>>8^t[o]}return-1^a}(n,a+4,i+=r.length);n[i]=s>>24&255,n[i+1]=s>>16&255,n[i+2]=s>>8&255,n[i+3]=255&s}function c(e){var t=e.length,r=65535,n=Math.ceil(t/r),a=new Uint8Array(2+t+5*n+4),i=0;a[i++]=120,a[i++]=156;for(var o=0;t>r;)a[i++]=0,a[i++]=255,a[i++]=255,a[i++]=0,a[i++]=0,a.set(e.subarray(o,o+r),i),i+=r,o+=r,t-=r;a[i++]=1,a[i++]=255&t,a[i++]=t>>8&255,a[i++]=255&~t,a[i++]=(65535&~t)>>8&255,a.set(e.subarray(o),i),i+=e.length-o;var s=function(e,t,r){for(var n=1,a=0,i=t;i>24&255,a[i++]=s>>16&255,a[i++]=s>>8&255,a[i++]=255&s,a}function l(t,r,a,o){var l,u,h,f=t.width,d=t.height,p=t.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:u=0,l=1,h=f+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,l=8,h=3*f;break;case n.ImageKind.RGBA_32BPP:u=6,l=8,h=4*f;break;default:throw new Error("invalid format")}for(var g=new Uint8Array((1+h)*d),m=0,v=0,y=0;y>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,l,u,0,0,0]),k=function(e){if(!i.isNodeJS)return c(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=require$$4.deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return c(e)}(g),_=e.length+36+S.length+k.length,A=new Uint8Array(_),x=0;return A.set(e,x),s("IHDR",S,A,x+=e.length),s("IDATA",k,A,x+=12+S.length),x+=12+k.length,s("IEND",new Uint8Array(0),A,x),(0,n.createObjectURL)(A,"image/png",a)}return function(e,t,r){return l(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),S=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=v.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=v.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 d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),k=0,_=0,A=0;t.SVGGraphics=p=function(){function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new S,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=!!i,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[o]]=o}return d(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,a=e.argsArray,i=0,o=r.length;i0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=y[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[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,a=n.Util.inverseTransform(this.transformMatrix),i=n.Util.applyTransform([0,0],a),o=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),c=n.Util.applyTransform([t,r],a),l=Math.min(i[0],o[0],s[0],c[0]),u=Math.min(i[1],o[1],s[1],c[1]),h=Math.max(i[0],o[0],s[0],c[0]),f=Math.max(i[1],o[1],s[1],c[1]),d=this.svgFactory.createElement("svg:rect");d.setAttributeNS(null,"x",l),d.setAttributeNS(null,"y",u),d.setAttributeNS(null,"width",h-l),d.setAttributeNS(null,"height",f-u),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],a=e[3]||n.IDENTITY_MATRIX,i=s(e[4],4),c=i[0],l=i[1],u=i[2],h=i[3],f=e[5],d=e[6],p=e[7],g="shading".concat(A++),m=s(n.Util.applyTransform([c,l],a),2),v=m[0],y=m[1],b=s(n.Util.applyTransform([u,h],a),2),w=b[0],S=b[1],k=s(n.Util.singularValueDecompose2dScale(a),2),_=f*k[0],x=d*k[1],C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",g),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",_),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x","".concat(v)),C.setAttributeNS(null,"y","".concat(y));var P=this.svg,T=this.transformMatrix,E=this.current.fillColor,R=this.current.strokeColor,O=this.svgFactory.create(w-v,S-y);if(this.svg=O,this.transformMatrix=a,2===p){var I=n.Util.makeCssRgb.apply(n.Util,o(t));this.current.fillColor=I,this.current.strokeColor=I}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=T,this.current.fillColor=E,this.current.strokeColor=R,C.appendChild(O.childNodes[0]),this.defs.appendChild(C),"url(#".concat(g,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(A++),a=e[3];switch(e[1]){case"axial":var i=e[4],o=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",i[0]),t.setAttributeNS(null,"y1",i[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],l=e[5],u=e[6],h=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",h),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",u);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var f,d=c(a);try{for(d.s();!(f=d.n()).done;){var p=f.value,g=this.svgFactory.createElement("svg:stop");g.setAttributeNS(null,"offset",p[0]),g.setAttributeNS(null,"stop-color",p[1]),t.appendChild(g)}}catch(e){d.e(e)}finally{d.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,a=this.current,i=a.x,o=a.y,s=[],l=0,u=c(e);try{for(u.s();!(r=u.n()).done;)switch(0|r.value){case n.OPS.rectangle:i=t[l++],o=t[l++];var h=t[l++],f=t[l++],d=i+h,p=o+f;s.push("M",g(i),g(o),"L",g(d),g(o),"L",g(d),g(p),"L",g(i),g(p),"Z");break;case n.OPS.moveTo:i=t[l++],o=t[l++],s.push("M",g(i),g(o));break;case n.OPS.lineTo:i=t[l++],o=t[l++],s.push("L",g(i),g(o));break;case n.OPS.curveTo:i=t[l+4],o=t[l+5],s.push("C",g(t[l]),g(t[l+1]),g(t[l+2]),g(t[l+3]),g(i),g(o)),l+=6;break;case n.OPS.curveTo2:s.push("C",g(i),g(o),g(t[l]),g(t[l+1]),g(t[l+2]),g(t[l+3])),i=t[l+2],o=t[l+3],l+=4;break;case n.OPS.curveTo3:i=t[l+2],o=t[l+3],s.push("C",g(t[l]),g(t[l+1]),g(i),g(o),g(i),g(o)),l+=4;break;case n.OPS.closePath:s.push("Z")}}catch(e){u.e(e)}finally{u.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(i,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(k++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",m(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=c(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),i=a[0],o=a[1];switch(i){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(i))}}}catch(e){r.e(e)}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",g(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",g(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(g).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",g(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=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,a=w(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",g(r)),i.setAttributeNS(null,"height",g(n)),this.current.element=i,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",g(-n)),o.setAttributeNS(null,"width",g(r)+"px"),o.setAttributeNS(null,"height",g(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(g(1/r)," ").concat(g(-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,a=t.fillColor;t.maskId="mask".concat(_++);var i=this.svgFactory.createElement("svg:mask");i.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",g(r)),o.setAttributeNS(null,"height",g(n)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(i),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,i)}},{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],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",g(r)),a.setAttributeNS(null,"height",g(n)),this.current.element=a,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",m(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",m(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(213);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 c(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&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){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}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function f(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){f(i,n,a,o,s,"next",e)}function s(e){f(i,n,a,o,s,"throw",e)}o(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*a||i||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(o.allowRangeRequests=!0),o):o},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(5),a=r(214)},function(e,t,r){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}(e,t)||function(){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){(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 a=n.status||200;if(200===a&&206===r.expectedStatus||a===r.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,i.stringToBytes)(t).buffer}(n);if(206===a){var s=n.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(c[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:"hasPendingRequests",value:function(){for(var e in this.pendingRequests)return!0;return!1}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortAllRequests",value:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),d=function(){function e(t){l(this,e),this._source=t,this._manager=new f(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 p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new g(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),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}}]),e}();t.PDFNetworkStream=d;var p=function(){function e(t,r){l(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}var t;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,o.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,i=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,o.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:(t=c(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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}(),g=function(){function e(t,r,n){l(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}var t;return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:(t=c(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(213);function s(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){s(i,n,a,o,c,"next",e)}function c(e){s(i,n,a,o,c,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&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),P(r),p}},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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(regeneratorRuntime$1);var runtime=regeneratorRuntime$1.exports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var pdfjsLib$2=pdf.exports,RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},PAGE_FRAGMENT=10,RESTART_NUM=3,PDFRenderingQueue$2=function(){function e(t){_classCallCheck(this,e),this.PDFViewer=null,this.cacheList=[],this.restartViewId=null,this.restartNum=0,this.highestPriorityPage=null,this.isPainting=!1,this.limit="number"==typeof t.limit&&t.limit>0?t.limit:PAGE_FRAGMENT}return _createClass(e,[{key:"restartViewId",set:function(e){this.restartViewId!==e&&(this.restartNum=0)}},{key:"setViewer",value:function(e){this.PDFViewer=e}},{key:"setCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(t.length){var n=this.cacheList.length,a=[],i=Array.from({length:t[1]-t[0]+1},(function(e,r){return r+t[0]}));t[0]-this.cacheList[n-1]>3||this.cacheList[0]-t[1]>3?(a=_toConsumableArray(this.cacheList),this.cacheList=i):this.cacheList=this.cacheList.concat(i.filter((function(t){return!e.cacheList.includes(t)}))||[]).sort((function(e,t){return e-t}));var o=this.cacheList.length-this.limit;if(o>0){var s=this.cacheList.slice(0,o),c=this.cacheList.slice(-o);a=r&&s.every((function(e){return i.includes(e)}))?c:!r&&c.every((function(e){return i.includes(e)}))?s:r?this.cacheList.slice(0,o):this.cacheList.slice(-o)}var l=a.length;if(l){for(var u=0;u=0;){var r=this.cacheList[t],n=this.PDFViewer.getPageView(r);if(!this.isViewFinished(n))return n;t++}return null}},{key:"isViewFinished",value:function(e){return e.renderingState===RenderingStates.FINISHED}},{key:"render",value:function(e){var t=this;switch(e.renderingState){case RenderingStates.FINISHED:break;case RenderingStates.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case RenderingStates.RUNNING:this.highestPriorityPage=e.renderingId;break;case RenderingStates.INITIAL:this.highestPriorityPage=e.renderingId,this.isPainting=!0,e.draw().finally((function(){t.renderHighestPriority()})).catch((function(r){e.finishPaintTask(r),r instanceof pdfjsLib$2.RenderingCancelledException?t.renderHighestPriority():(t.cacheList.includes(e.renderingId)&&t.restartNum<=RESTART_NUM&&(t.restartViewId=e.renderingId,e.reset(),t.renderHighestPriority()),console.log('renderView: "'.concat(r,'"')))}))}}},{key:"clearUp",value:function(){for(;this.cacheList.length;){var e=this.cacheList.shift();this.PDFViewer.getPageView(e).reset()}this.resetQueueConfig()}},{key:"resetQueueConfig",value:function(){this.restartViewId=null,this.restartNum=0,this.highestPriorityPage=null,this.isPainting=!1}}]),e}(),PageViewer$2=function(){function e(t){_classCallCheck(this,e),this.pdfViewer=t.pdfViewer,this.div=t.div,this.renderingQueue=t.renderingQueue,this.renderingId=t.id,this.pdfScale=t.pdfScale,this.height=t.height,this.width=t.width,this._renderingState=RenderingStates.INITIAL,this.page=null,this.viewport=t.defaultViewport||null,this.renderTask=null,this.isLoading=!1,this.renderError=null,this.canvas=null,this.canvasIdPrefix=t.canvasIdPrefix,this.ratio=window.devicePixelRatio>2?2:window.devicePixelRatio||1,this.loadingDiv=document.createElement("div"),this.loadingDiv.classList.add("__pdf_page_loader","page".concat(this.renderingId,"_loader"))}return _createClass(e,[{key:"offsetTop",get:function(){return this.div.offsetTop}},{key:"renderingState",get:function(){return this._renderingState},set:function(e){if(e!==this._renderingState)switch(this._renderingState=e,e){case RenderingStates.PAUSED:case RenderingStates.RUNNING:this.isLoading||(this.div.appendChild(this.loadingDiv),this.isLoading=!0);break;case RenderingStates.INITIAL:case RenderingStates.FINISHED:this.isLoading&&(this.div.removeChild(this.loadingDiv),this.isLoading=!1)}}},{key:"setPdfPage",value:function(e){this.page=e,this.viewport=e.getViewport({scale:this.pdfScale})}},{key:"reset",value:function(){this.renderingState!==RenderingStates.FINISHED&&this.cancelRendering(),this.renderingState=RenderingStates.INITIAL,this.releaseCanvas(),this.renderTask=null,this.isLoading=!1,this.renderError=null}},{key:"cancelRendering",value:function(){this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.resume=null}},{key:"releaseCanvas",value:function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0,delete this.canvas);for(var e=this.div.childNodes,t=e.length-1;t>=0;t--){e[t].remove()}this.page&&this.page.cleanup()}},{key:"draw",value:function(){var e=this;return this.renderingState!==RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset()),new Promise((function(t,r){var n=e.page;if(!n)return e.renderingState=RenderingStates.FINISHED,r(new Error("page is not loaded"));e.renderingState=RenderingStates.RUNNING;var a=null;e.renderingQueue&&(a=function(t){if(!e.renderingQueue.isHighestPriority(e))return e.renderingState=RenderingStates.PAUSED,void(e.resume=function(){e.renderingState=RenderingStates.RUNNING,t()});t()});var i=e.paintCanvas(),o=e.renderTask=n.render(i);o.onContinue=a.bind(e),o.promise.then((function(){e.div.appendChild(e.canvas),e.finishPaintTask(null),t()}),(function(e){r(e)}))}))}},{key:"finishPaintTask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.renderTask&&(this.renderTask=null),this.renderingState=RenderingStates.FINISHED,e&&(this.renderError=e)}},{key:"paintCanvas",value:function(){this.canvas=document.createElement("canvas"),this.canvas.classList.add("__pdf_canvas","pdfCanvas_".concat(this.renderingId)),this.canvasIdPrefix&&(this.canvas.id="".concat(this.canvasIdPrefix.toString()).concat(this.renderingId));var e=this.viewport.width*this.ratio,t=this.viewport.height*this.ratio;this.canvas.width=e,this.canvas.height=t,this.canvas.style.width="100%",this.canvas.style.height="100%";var r=this.canvas.getContext("2d",{alpha:!1});return{viewport:this.viewport,canvasContext:r,transform:this.ratio>1?[this.ratio,0,0,this.ratio,0,0]:null}}}]),e}(),PDFViewer$2=function(){function e(t){_classCallCheck(this,e),this.pdfTitle=null,this.pdfDocument=null,this.viewer=t.viewer,this.pdfScale=t.pdfScale,this.scale=t.scale,this.pages=[],this.renderingQueue=t.renderingQueue,this.currentNum=1,this.iniState=!0}var t,r;return _createClass(e,[{key:"numPages",get:function(){return this.pdfDocument?Number(this.pdfDocument.numPages):0}},{key:"pagesCount",get:function(){return this.pages.length}},{key:"setScale",value:function(e){this.scale=e}},{key:"setDocument",value:function(e){this.iniState=!0,e&&(this.pdfDocument!==e&&this.resetPdfViewer(),this.pdfDocument=e,this.renderingQueue.setViewer(this),this.viewer.scrollTop=0,this.iniState=!1,this.setTitle())}},{key:"setTitle",value:(r=_asyncToGenerator(regenerator.mark((function e(){var t,r;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfDocument.getMetadata();case 2:t=e.sent,r=t.info,this.pdfTitle=r.title||"";case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getPage",value:function(e){return this.pdfDocument.getPage(e)}},{key:"resetPdfViewer",value:function(){this.renderingQueue.clearUp(),this.pdfDocument=null,this.pages=[],this.title=null}},{key:"pushPage",value:function(e){this.pages.push(e)}},{key:"getPageView",value:function(e){return this.pages[e-1]}},{key:"loadPage",value:(t=_asyncToGenerator(regenerator.mark((function e(t){var r;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.page){e.next=2;break}return e.abrupt("return",t.page);case 2:return e.prev=2,e.next=5,this.getPage(t.renderingId);case 5:return r=e.sent,t.setPdfPage(r),e.abrupt("return",r);case 10:return e.prev=10,e.t0=e.catch(2),console.log("Unable to get page for view",e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e){return t.apply(this,arguments)})},{key:"renderPageInterval",value:function(e,t){this.currentNum=e;var r=[e-1,e+1];this.numPages<3?r=[1,this.numPages]:(r[0]<1&&(r=[1,3]),r[1]>this.numPages&&(r=[this.numPages-2,this.numPages])),this.renderingQueue.setCache(r,t),this.renderingQueue.renderHighestPriority(!0)}}]),e}();function debounce$2(e,t,r){var n=arguments,a=this,i=null;return function(o){var s=a,c=n;function l(){i=setTimeout((function(){e.apply(s,c),i=null}),t)}r?(clearTimeout(i),l()):i||l()}}function isArrayBuffer$2(e){return"object"===_typeof$1(e)&&null!==e&&void 0!==e.byteLength}function classMap$2(e){var t=[];for(var r in e)e[r]&&t.push(r);return t.join(" ")}function styleMap$2(e){var t=[];for(var r in e)e[r]&&t.push("".concat(r,":").concat(e[r]));return t.join(";")}function addClass$1(e,t){e&&!e.contains(t)&&e.add(t)}function removeClass$1(e,t){e&&e.contains(t)&&e.remove(t)}var pdfStyles$1="\n .__pdf_component {\n background-color: #eee;\n position: relative;\n display: flex;\n flex-direction: column;\n }\n .__pdf_loading_bar {\n --process-percent: 0;\n height: 4px;\n background: rgba(10, 132, 255, 1);\n width: var(--process-percent);\n border-radius: 0 20px 20px 0;\n position: absolute;\n top: 0;\n z-index: 9;\n }\n .__pdf_component_out_box,\n .__pdf_component .__pdf_error {\n display: flex;\n overflow: hidden;\n flex-grow: 1;\n width: 100%;\n position: relative;\n }\n .__pdf_component .__pdf_error {\n justify-content: center;\n align-items: center;\n }\n .__pdf_component_box {\n overflow: auto;\n position: relative;\n width: 100%;\n margin: 8px 0;\n }\n .__pdf_container {\n width: 100%;\n box-sizing: border-box;\n min-height: 100%;\n font-size: 0;\n }\n .__pdf_pageNum_box {\n position: absolute;\n z-index: 9;\n top: 20px;\n left: 24px;\n background: #fff;\n border-radius: 4px;\n font-family: PingFangSC-Regular;\n font-size: 14px;\n color: #ccc;\n font-weight: 600;\n display: inline-block;\n padding: 4px 8px;\n }\n .__pdf_forceRead_desc {\n background-color: #fff5e7;\n color: #8c6d4d;\n text-align: center;\n height: 36px;\n line-height: 36px;\n font-size: 14px;\n font-weight: 600;\n font-family: PingFangSC-Regular;\n }\n .__pdf_forceRead_btn {\n height: 45px;\n color: #fff;\n font-size: 16px;\n text-align: center;\n line-height: 45px;\n font-weight: 600;\n background: #ffffff;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n }\n .__pdf_page {\n margin: 8px 8px 0;\n box-sizing: border-box;\n // background-clip: content-box;\n position: relative;\n background-color: #fff;\n box-shadow: 0px 0px 3px #ccc;\n }\n .__pdf_page:first-child {\n margin-top: 0;\n }\n .__pdf_canvas {\n background-color: #fff;\n }\n .__pdf_loader,\n .__pdf_page_loader {\n border: 5px solid #f3f3f3;\n border-top: 5px solid #555;\n border-radius: 50%;\n width: 50px;\n height: 50px;\n display: inline-block;\n animation: __pdf_spin 2s linear infinite;\n position: absolute;\n left: calc(50% - 25px);\n top: 40%;\n z-index: 10;\n }\n \n @keyframes __pdf_spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes __pdf_hide {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n .__pdf_component .__pdf_hide-num {\n opacity: 0;\n animation: __pdf_hide 1s 1;\n }\n .__pdf_component .__pdf_display-none {\n display: none;\n }\n ",utils=Object.freeze({__proto__:null,RenderingStates:RenderingStates,PAGE_FRAGMENT:PAGE_FRAGMENT,PDFRenderingQueue:PDFRenderingQueue$2,PageViewer:PageViewer$2,PDFViewer:PDFViewer$2,debounce:debounce$2,isArrayBuffer:isArrayBuffer$2,classMap:classMap$2,styleMap:styleMap$2,addClass:addClass$1,removeClass:removeClass$1,pdfStyles:pdfStyles$1}),require$$0=getAugmentedNamespace(utils),pdf_worker={exports:{}},_templateObject,_templateObject2;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},_get.apply(this,arguments)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}} +(function(module,exports){var factory;factory=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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){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 a.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return a.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return a.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return a.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return a.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return a.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return i.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return i.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return i.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return i.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return i.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return i.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return i.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return i.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return i.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return i.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return i.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return i.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return i.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return i.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return i.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 c.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return u.SVGGraphics}});var n=r(1),a=r(198),i=r(5),o=r(209),s=r(200),c=r(203),l=r(210),u=r(211);if(r(7).isNodeJS){var h=r(212).PDFNodeStream;(0,a.setPDFNetworkStreamFactory)((function(e){return new h(e)}))}else{var f,d=r(215).PDFNetworkStream;(0,n.isFetchSupported)()&&(f=r(216).PDFFetchStream),(0,a.setPDFNetworkStreamFactory)((function(e){return f&&(0,n.isValidFetchUrl)(e.url)?new f(e):new d(e)}))}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(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 c=(0,i.removeNullCharacters)(r);s?e.href=e.title=c:(e.href="",e.title="Disabled: ".concat(c),e.onclick=function(){return!1});var l="";switch(n){case A.NONE:break;case A.SELF:l="_self";break;case A.BLANK:l="_blank";break;case A.PARENT:l="_parent";break;case A.TOP:l="_top"}e.target=l,e.rel="string"==typeof a?a:v},t.getFilenameFromUrl=function(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.isFetchSupported=P,t.isValidFetchUrl=T,t.loadScript=function(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)}))},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(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}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,o=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(y,"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(y,e)}}]),e}();t.DOMSVGFactory=k;var S=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,i=t.offsetX,o=void 0===i?0:i,s=t.offsetY,c=void 0===s?0:s,l=t.dontFlip,u=void 0!==l&&l;p(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=o,this.offsetY=c;var h,f,d,g,m,v,y,b,w=(r[2]+r[0])/2,k=(r[3]+r[1])/2;switch(a=(a%=360)<0?a+360:a){case 180:h=-1,f=0,d=0,g=1;break;case 90:h=0,f=1,d=1,g=0;break;case 270:h=0,f=-1,d=-1,g=0;break;case 0:h=1,f=0,d=0,g=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}u&&(d=-d,g=-g),0===h?(m=Math.abs(k-r[1])*n+o,v=Math.abs(w-r[0])*n+c,y=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(m=Math.abs(w-r[0])*n+o,v=Math.abs(k-r[1])*n+c,y=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,g*n,m-h*n*w-d*n*k,v-f*n*w-g*n*k],this.width=y,this.height=b}return m(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,a=t.rotation,i=void 0===a?this.rotation:a,o=t.offsetX,s=void 0===o?this.offsetX:o,c=t.offsetY,l=void 0===c?this.offsetY:c,u=t.dontFlip,h=void 0!==u&&u;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:i,offsetX:s,offsetY:l,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=S;var _=function(e){!function(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&&l(e,t)}(r,e);var t=u(r);function r(e,n){var a;return p(this,r),(a=t.call(this,e)).type=n,a}return r}(i.BaseException);t.RenderingCancelledException=_;var A={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=A;var x,C=function(){function e(){p(this,e),this.started=Object.create(null),this.times=[]}return m(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 a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var i,s=o(this.times);try{for(s.s();!(i=s.n()).done;){var c=i.value,l=c.end-c.start;t.push("".concat(c.name.padEnd(r)," ").concat(l,"ms\n"))}}catch(e){s.e(e)}finally{s.f()}return t.join("")}}]),e}();function P(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function T(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.StatTimer=C;var E=function(){function e(){p(this,e)}return m(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,i.isString)(e))return null;x||(x=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=x.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 c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;var l=t[7]||"Z",u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(o+=u,s+=h):"+"===l&&(o-=u,s-=h),new Date(Date.UTC(r,n,a,o,s,c))}}]),e}();t.PDFDateString=E},function(e,t,r){e.exports=r(3)},function(e,t,r){(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,a=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),o=new T(n||[]);return i._invoke=function(e,t,r){var n=h;return function(a,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw i;return R()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(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===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(E([])));k&&k!==n&&a.call(k,o)&&(b=k);var S=y.prototype=m.prototype=Object.create(b);function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e,r){function n(i,o,s,c){var l=u(e[i],e,o);if("throw"!==l.type){var h=l.arg,f=h.value;return f&&"object"===t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(f).then((function(e){h.value=e,s(h)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;this._invoke=function(e,t){function a(){return new r((function(r,a){n(e,t,r,a)}))}return i=i?i.then(a,a):a()}}function x(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,x(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 a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,g;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(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,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){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){function n(e,t){for(var r=0;r=u.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.removeNullCharacters=function(e){return"string"!=typeof e?(f("The argument for removeNullCharacters must be a string."),e):e.replace(A,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=x,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n=u.WARNINGS&&console.log("Warning: ".concat(e))}function d(e){throw new Error(e)}function p(e,t){e||d(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=function(){function e(t){this.constructor===e&&d("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=m;var v=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).code=n,a}return r}(m);t.PasswordException=v;var y=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).details=n,a}return r}(m);t.UnknownErrorException=y;var b=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.InvalidPDFException=b;var w=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.MissingPDFException=w;var k=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).status=n,a}return r}(m);t.UnexpectedResponseException=k;var S=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.FormatError=S;var _=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.AbortException=_;var A=/\x00/g;function x(e){p("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;ne[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 a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=R;var O,I=[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],F=(O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var r=new Blob([e],{type:t});return URL.createObjectURL(r)}for(var n="data:".concat(t,";base64,"),a=0,i=e.length;a>2]+O[(3&o)<<4|s>>4]+O[a+1>6:64]+O[a+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),function(){if(i&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var a=void 0===n?[t,r]:[t,r,n];e.apply(this,a)},window.history.replaceState=function(e,r,n){var a=void 0===n?[e,r]:[e,r,n];t.apply(this,a)}}}(),String.prototype.startsWith||r(53),String.prototype.endsWith||r(64),String.prototype.includes||r(66),Array.prototype.includes||r(68),Array.from||r(76),Object.assign||r(98),Math.log2||(Math.log2=r(101)),Number.isNaN||(Number.isNaN=r(103)),Number.isInteger||(Number.isInteger=r(105)),Uint8Array.prototype.slice||r(108),globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(113)),globalThis.URL=r(136),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(143).ReadableStream)}(),globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(144)),globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(151)),globalThis.WeakMap||(globalThis.WeakMap=r(153)),globalThis.WeakSet||(globalThis.WeakSet=r(159)),String.prototype.codePointAt||r(161),String.fromCodePoint||(String.fromCodePoint=r(163)),globalThis.Symbol||r(165),String.prototype.padStart||r(188),String.prototype.padEnd||r(193),Object.values||(Object.values=r(195))}},function(e,t,r){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 a="object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=a},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){r(10)({global:!0},{globalThis:r(11)})},function(e,t,r){var n=r(11),a=r(12).f,i=r(26),o=r(29),s=r(30),c=r(40),l=r(52);e.exports=function(e,t){var r,u,h,f,d,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in t){if(f=t[u],h=e.noTargetGet?(d=a(r,u))&&d.value:r[u],!l(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&i(f,"sham",!0),o(r,u,f,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 commonjsGlobal&&commonjsGlobal)||Function("return this")()},function(e,t,r){var n=r(13),a=r(15),i=r(16),o=r(17),s=r(21),c=r(23),l=r(24),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(c(e,t))return i(!a.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(e){return!0}}},function(e,t,r){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,i=a&&!n.call({1:2},1);t.f=i?function(e){var t=a(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),a=r(20);e.exports=function(e){return n(a(e))}},function(e,t,r){var n=r(14),a=r(19),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?i.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(null==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,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;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),a=r(14),i=r(25);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),a=r(22),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(13),a=r(27),i=r(16);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),a=r(24),i=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}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),a=r(26),i=r(23),o=r(30),s=r(31),c=r(33),l=c.get,u=c.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),u(r).source=h.join("string"==typeof t?t:"")),e!==n?(c?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=r:a(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,r){var n=r(11),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),a=r(30),i="__core-js_shared__",o=n[i]||a(i,{});e.exports=o},function(e,t,r){var n,a,i,o=r(34),s=r(11),c=r(22),l=r(26),u=r(23),h=r(35),f=r(39),d=s.WeakMap;if(o){var p=new d,g=p.get,m=p.has,v=p.set;n=function(e,t){return v.call(p,e,t),t},a=function(e){return g.call(p,e)||{}},i=function(e){return m.call(p,e)}}else{var y=h("state");f[y]=!0,n=function(e,t){return l(e,y,t),t},a=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(11),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},function(e,t,r){var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,r){var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[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),a=r(41),i=r(12),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,c=i.f,l=0;lc;)n(s,r=t[c++])&&(~i(l,r)||l.push(r));return l}},function(e,t,r){var n=r(17),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,c=n(t),l=a(c.length),u=i(o,l);if(e&&r!=r){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(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),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(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),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==l||r!=c&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".startsWith,f=Math.min,d=l("startsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"startsWith"),n&&!n.writable)||d)},{startsWith:function(e){var t=String(c(this));s(e);var r=o(f(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return h?h.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),a=r(19),i=r(57)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==a(e))}},function(e,t,r){var n=r(11),a=r(36),i=r(23),o=r(38),s=r(58),c=r(59),l=a("wks"),u=n.Symbol,h=c?u:u&&u.withoutSetter||o;e.exports=function(e){return i(l,e)||(s&&i(u,e)?l[e]=u[e]:l[e]=h("Symbol."+e)),l[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)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(11),a=r(62),i=Function.call;e.exports=function(e,t,r){return a(i,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,a){return e.call(t,r,n,a)}}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){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".endsWith,f=Math.min,d=l("endsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"endsWith"),n&&!n.writable)||d)},{endsWith:function(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=o(t.length),a=void 0===r?n:f(o(r),n),i=String(e);return h?h.call(t,i,a):t.slice(a-i.length,a)===i}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){var n=r(10),a=r(55),i=r(20);n({target:"String",proto:!0,forced:!r(60)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(a(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){var n=r(10),a=r(46).includes,i=r(70);n({target:"Array",proto:!0,forced:!r(75)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,r){var n=r(57),a=r(71),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,a=r(28),i=r(72),o=r(50),s=r(39),c=r(74),l=r(25),u=r(35),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},g=function(e){return"<"+f+">"+e+""},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m=n?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):(t=l("iframe"),r="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var a=o.length;a--;)delete m[h][o[a]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[h]=a(e),r=new p,p[h]=null,r[d]=e):r=m(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(13),a=r(27),i=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,c=0;s>c;)a.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),a=r(14),i=r(23),o=Object.defineProperty,s={},c=function(e){throw e};e.exports=function(e,t){if(i(s,e))return s[e];t||(t={});var r=[][e],l=!!i(t,"ACCESSORS")&&t.ACCESSORS,u=i(t,0)?t[0]:c,h=i(t,1)?t[1]:void 0;return s[e]=!!r&&!a((function(){if(l&&!n)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:c}):e[1]=1,r.call(e,u,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){var n=r(78).charAt,a=r(33),i=r(79),o="String Iterator",s=a.set,c=a.getterFor(o);i(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),a=r(20),i=function(e){return function(t,r){var i,o,s=String(a(t)),c=n(r),l=s.length;return c<0||c>=l?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):i:e?s.slice(c,c+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,r){var n=r(10),a=r(80),i=r(82),o=r(87),s=r(85),c=r(26),l=r(29),u=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v="keys",y="values",b="entries",w=function(){return this};e.exports=function(e,t,r,u,d,k,S){a(r,t,u);var _,A,x,C=function(e){if(e===d&&O)return O;if(!g&&e in E)return E[e];switch(e){case v:case y:case b:return function(){return new r(this,e)}}return function(){return new r(this)}},P=t+" Iterator",T=!1,E=e.prototype,R=E[m]||E["@@iterator"]||d&&E[d],O=!g&&R||C(d),I="Array"==t&&E.entries||R;if(I&&(_=i(I.call(new e)),p!==Object.prototype&&_.next&&(h||i(_)===p||(o?o(_,p):"function"!=typeof _[m]&&c(_,m,w)),s(_,P,!0,!0),h&&(f[P]=w))),d==y&&R&&R.name!==y&&(T=!0,O=function(){return R.call(this)}),h&&!S||E[m]===O||c(E,m,O),f[t]=O,d)if(A={values:C(y),keys:k?O:C(v),entries:C(b)},S)for(x in A)(g||T||!(x in E))&&l(E,x,A[x]);else n({target:t,proto:!0,forced:g||T},A);return A}},function(e,t,r){var n=r(81).IteratorPrototype,a=r(71),i=r(16),o=r(85),s=r(86),c=function(){return this};e.exports=function(e,t,r){var l=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,l,!1,!0),s[l]=c,e}},function(e,t,r){var n,a,i,o=r(82),s=r(26),c=r(23),l=r(57),u=r(37),h=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=o(o(i)))!==Object.prototype&&(n=a):f=!0),null==n&&(n={}),u||c(n,h)||s(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),a=r(83),i=r(35),o=r(84),s=i("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c: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,a=r(23),i=r(57)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),a=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,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),a=r(90);n({target:"Array",stat:!0,forced:!r(97)((function(e){Array.from(e)}))},{from:a})},function(e,t,r){var n=r(62),a=r(83),i=r(91),o=r(92),s=r(47),c=r(93),l=r(94);e.exports=function(e){var t,r,u,h,f,d,p=a(e),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=l(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&o(b))for(r=new g(t=s(p.length));t>w;w++)d=y?v(p[w],w):p[w],c(r,w,d);else for(f=(h=b.call(p)).next,r=new g;!(u=f.call(h)).done;w++)d=y?i(h,v,[u.value,w],!0):u.value,c(r,w,d);return r.length=w,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,a){try{return a?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(57),a=r(86),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},function(e,t,r){var n=r(21),a=r(27),i=r(16);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},function(e,t,r){var n=r(95),a=r(86),i=r(57)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){var n=r(96),a=r(19),i=r(57)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(57)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(57)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}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),a=r(100);n({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},function(e,t,r){var n=r(13),a=r(14),i=r(73),o=r(51),s=r(15),c=r(83),l=r(18),u=Object.assign,h=Object.defineProperty;e.exports=!u||a((function(){if(n&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!=u({},e)[r]||i(u({},t)).join("")!=a}))?function(e,t){for(var r=c(e),a=arguments.length,u=1,h=o.f,f=s.f;a>u;)for(var d,p=l(arguments[u++]),g=h?i(p).concat(h(p)):i(p),m=g.length,v=0;m>v;)d=g[v++],n&&!f.call(p,d)||(r[d]=p[d]);return r}:u},function(e,t,r){r(102);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),a=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return a(e)/i}})},function(e,t,r){r(104);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){r(10)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(106);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){r(10)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(22),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,r){r(109)},function(e,t,r){var n=r(110),a=r(112),i=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,l=[].slice;c("slice",(function(e,t){for(var r=l.call(o(this),e,t),n=a(this,this.constructor),i=0,c=r.length,u=new(s(n))(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},function(e,t,r){var n,a=r(111),i=r(13),o=r(11),s=r(22),c=r(23),l=r(95),u=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),g=r(57),m=r(38),v=o.Int8Array,y=v&&v.prototype,b=o.Uint8ClampedArray,w=b&&b.prototype,k=v&&d(v),S=y&&d(y),_=Object.prototype,A=_.isPrototypeOf,x=g("toStringTag"),C=m("TYPED_ARRAY_TAG"),P=a&&!!p&&"Opera"!==l(o.opera),T=!1,E={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R=function(e){return s(e)&&c(E,l(e))};for(n in E)o[n]||(P=!1);if((!P||"function"!=typeof k||k===Function.prototype)&&(k=function(){throw TypeError("Incorrect invocation")},P))for(n in E)o[n]&&p(o[n],k);if((!P||!S||S===_)&&(S=k.prototype,P))for(n in E)o[n]&&p(o[n].prototype,S);if(P&&d(w)!==S&&p(w,S),i&&!c(S,x))for(n in T=!0,f(S,x,{get:function(){return s(this)?this[C]:void 0}}),E)o[n]&&u(o[n],C,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:T&&C,aTypedArray:function(e){if(R(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(A.call(k,e))return e}else for(var t in E)if(c(E,n)){var r=o[t];if(r&&(e===r||A.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var n in E){var a=o[n];a&&c(a.prototype,e)&&delete a.prototype[e]}S[e]&&!r||h(S,e,r?t:P&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(i){if(p){if(r)for(n in E)(a=o[n])&&c(a,e)&&delete a[e];if(k[e]&&!r)return;try{return h(k,e,r?t:P&&v[e]||t)}catch(e){}}for(n in E)!(a=o[n])||a[e]&&!r||h(a,e,t)}},isView:function(e){var t=l(e);return"DataView"===t||c(E,t)},isTypedArray:R,TypedArray:k,TypedArrayPrototype:S}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(28),a=r(63),i=r(57)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},function(e,t,r){r(114),r(77),r(116),r(119),r(134),r(135);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),a=r(29),i=r(115);n||a(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,r){var n=r(96),a=r(95);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},function(e,t,r){var n=r(11),a=r(117),i=r(118),o=r(26),s=r(57),c=s("iterator"),l=s("toStringTag"),u=i.values;for(var h in a){var f=n[h],d=f&&f.prototype;if(d){if(d[c]!==u)try{o(d,c,u)}catch(e){d[c]=u}if(d[l]||o(d,l,h),a[h])for(var p in i)if(d[p]!==i[p])try{o(d,p,i[p])}catch(e){d[p]=i[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){var n=r(17),a=r(70),i=r(86),o=r(33),s=r(79),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=s(Array,"Array",(function(e,t){l(this,{type:c,target:n(e),index:0,kind:t})}),(function(){var e=u(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"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},function(e,t,r){var n,a,i,o,s=r(10),c=r(37),l=r(11),u=r(42),h=r(120),f=r(29),d=r(121),p=r(85),g=r(122),m=r(22),v=r(63),y=r(123),b=r(19),w=r(31),k=r(124),S=r(97),_=r(112),A=r(125).set,x=r(128),C=r(129),P=r(131),T=r(130),E=r(132),R=r(33),O=r(52),I=r(57),F=r(133),L=I("species"),M="Promise",N=R.get,D=R.set,B=R.getterFor(M),j=h,U=l.TypeError,q=l.document,z=l.process,G=u("fetch"),W=T.f,H=W,V="process"==b(z),X=!!(q&&q.createEvent&&l.dispatchEvent),Y="unhandledrejection",K=O(M,(function(){if(w(j)===String(j)){if(66===F)return!0;if(!V&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!j.prototype.finally)return!0;if(F>=51&&/native code/.test(j))return!1;var e=j.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),J=K||!S((function(e){j.all(e).catch((function(){}))})),Q=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){for(var a=t.value,i=1==t.state,o=0;n.length>o;){var s,c,l,u=n[o++],h=i?u.ok:u.fail,f=u.resolve,d=u.reject,p=u.domain;try{h?(i||(2===t.rejection&&re(e,t),t.rejection=1),!0===h?s=a:(p&&p.enter(),s=h(a),p&&(p.exit(),l=!0)),s===u.promise?d(U("Promise-chain cycle")):(c=Q(s))?c.call(s,f,d):f(s)):d(a)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&ee(e,t)}))}},Z=function(e,t,r){var n,a;X?((n=q.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},(a=l["on"+e])?a(n):e===Y&&P("Unhandled promise rejection",r)},ee=function(e,t){A.call(l,(function(){var r,n=t.value;if(te(t)&&(r=E((function(){V?z.emit("unhandledRejection",n,e):Z(Y,e,n)})),t.rejection=V||te(t)?2:1,r.error))throw r.value}))},te=function(e){return 1!==e.rejection&&!e.parent},re=function(e,t){A.call(l,(function(){V?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,r,n){return function(a){e(t,r,a,n)}},ae=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,$(e,t,!0))},ie=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw U("Promise can't be resolved itself");var a=Q(r);a?x((function(){var n={done:!1};try{a.call(r,ne(ie,e,n,t),ne(ae,e,n,t))}catch(r){ae(e,n,r,t)}})):(t.value=r,t.state=1,$(e,t,!1))}catch(r){ae(e,{done:!1},r,t)}}};K&&(j=function(e){y(this,j,M),v(e),n.call(this);var t=N(this);try{e(ne(ie,this,t),ne(ae,this,t))}catch(e){ae(this,t,e)}},(n=function(e){D(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(j.prototype,{then:function(e,t){var r=B(this),n=W(_(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=V?z.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&$(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(ae,e,t)},T.f=W=function(e){return e===j||e===i?new a(e):H(e)},c||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new j((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof G&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(j,G.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:K},{Promise:j}),p(j,M,!1,!0),g(M),i=u(M),s({target:M,stat:!0,forced:K},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:c||K},{resolve:function(e){return C(c&&this===i?j:this,e)}}),s({target:M,stat:!0,forced:J},{all:function(e){var t=this,r=W(t),n=r.resolve,a=r.reject,i=E((function(){var r=v(t.resolve),i=[],o=0,s=1;k(e,(function(e){var c=o++,l=!1;i.push(void 0),s++,r.call(t,e).then((function(e){l||(l=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=W(t),n=r.reject,a=E((function(){var a=v(t.resolve);k(e,(function(e){a.call(t,e).then(r.resolve,n)}))}));return a.error&&n(a.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 a in t)n(e,a,t[a],r);return e}},function(e,t,r){var n=r(42),a=r(27),i=r(57),o=r(13),s=i("species");e.exports=function(e){var t=n(e),r=a.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=r(28),a=r(92),i=r(47),o=r(62),s=r(94),c=r(91),l=function(e,t){this.stopped=e,this.result=t},u=e.exports=function(e,t,r,u,h){var f,d,p,g,m,v,y,b=o(t,r,u?2:1);if(h)f=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(a(d)){for(p=0,g=i(e.length);g>p;p++)if((m=u?b(n(y=e[p])[0],y[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}f=d.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(m=c(f,b,y.value,u))&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(e){return new l(!0,e)}},function(e,t,r){var n,a,i,o=r(11),s=r(14),c=r(19),l=r(62),u=r(74),h=r(25),f=r(126),d=o.location,p=o.setImmediate,g=o.clearImmediate,m=o.process,v=o.MessageChannel,y=o.Dispatch,b=0,w={},k="onreadystatechange",S=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},_=function(e){return function(){S(e)}},A=function(e){S(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&g||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},g=function(e){delete w[e]},"process"==c(m)?n=function(e){m.nextTick(_(e))}:y&&y.now?n=function(e){y.now(_(e))}:v&&!f?(i=(a=new v).port2,a.port1.onmessage=A,n=l(i.postMessage,i,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=k in h("script")?function(e){u.appendChild(h("script"))[k]=function(){u.removeChild(this),S(e)}}:function(e){setTimeout(_(e),0)}:(n=x,o.addEventListener("message",A,!1))),e.exports={set:p,clear:g}},function(e,t,r){var n=r(127);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,a,i,o,s,c,l,u,h=r(11),f=r(12).f,d=r(19),p=r(125).set,g=r(126),m=h.MutationObserver||h.WebKitMutationObserver,v=h.process,y=h.Promise,b="process"==d(v),w=f(h,"queueMicrotask"),k=w&&w.value;k||(n=function(){var e,t;for(b&&(e=v.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},b?o=function(){v.nextTick(n)}:m&&!g?(s=!0,c=document.createTextNode(""),new m(n).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):y&&y.resolve?(l=y.resolve(void 0),u=l.then,o=function(){u.call(l,n)}):o=function(){p.call(h,n)}),e.exports=k||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},function(e,t,r){var n=r(28),a=r(22),i=r(130);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(63),a=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 a(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(e){return{error:!0,value:e}}}},function(e,t,r){var n,a,i=r(11),o=r(127),s=i.process,c=s&&s.versions,l=c&&c.v8;l?a=(n=l.split("."))[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},function(e,t,r){var n=r(10),a=r(63),i=r(130),o=r(132),s=r(124);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,c=r.reject,l=o((function(){var r=a(t.resolve),i=[],o=0,c=1;s(e,(function(e){var a=o++,s=!1;i.push(void 0),c++,r.call(t,e).then((function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--c||n(i))}),(function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--c||n(i))}))})),--c||n(i)}));return l.error&&c(l.value),r.promise}})},function(e,t,r){var n=r(10),a=r(37),i=r(120),o=r(14),s=r(42),c=r(112),l=r(129),u=r(29);n({target:"Promise",proto:!0,real:!0,forced:!!i&&o((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),a||"function"!=typeof i||i.prototype.finally||u(i.prototype,"finally",s("Promise").prototype.finally)},function(e,t,r){r(137),r(142),r(140);var n=r(43);e.exports=n.URL},function(e,t,r){r(77);var n,a=r(10),i=r(13),o=r(138),s=r(11),c=r(72),l=r(29),u=r(123),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,g=r(139),m=r(85),v=r(140),y=r(33),b=s.URL,w=v.URLSearchParams,k=v.getState,S=y.set,_=y.getterFor("URL"),A=Math.floor,x=Math.pow,C="Invalid scheme",P="Invalid host",T="Invalid port",E=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,O=/\d/,I=/^(0x|0X)/,F=/^[0-7]+$/,L=/^\d+$/,M=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,D=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,B=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,j=/[\u0009\u000A\u000D]/g,U=function(e,t){var r,n,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return P;if(!(r=z(t.slice(1,-1))))return P;e.host=r}else if(J(e)){if(t=g(t),N.test(t))return P;if(null===(r=q(t)))return P;e.host=r}else{if(D.test(t))return P;for(r="",n=d(t),a=0;a4)return e;for(r=[],n=0;n1&&"0"==a.charAt(0)&&(i=I.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)o=0;else{if(!(10==i?L:8==i?F:M).test(a))return e;o=parseInt(a,i)}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;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!O.test(f()))return;for(;O.test(f());){if(i=parseInt(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[l]=256*c[l]+a,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[l++]=t}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!=l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!=l)return;return c},G=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},W={},H=f({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),V=f({},H,{"#":1,"?":1,"{":1,"}":1}),X=f({},V,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(e){return h(K,e.scheme)},Q=function(e){return""!=e.username||""!=e.password},$=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},ee=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&Z(t[0],!0)||t.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},ne={},ae={},ie={},oe={},se={},ce={},le={},ue={},he={},fe={},de={},pe={},ge={},me={},ve={},ye={},be={},we={},ke={},Se={},_e={},Ae=function(e,t,r,a){var i,o,s,c,l,u=r||ne,f=0,p="",g=!1,m=!1,v=!1;for(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(B,"")),t=t.replace(j,""),i=d(t);f<=i.length;){switch(o=i[f],u){case ne:if(!o||!E.test(o)){if(r)return C;u=ie;continue}p+=o.toLowerCase(),u=ae;break;case ae:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))p+=o.toLowerCase();else{if(":"!=o){if(r)return C;p="",u=ie,f=0;continue}if(r&&(J(e)!=h(K,p)||"file"==p&&(Q(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,r)return void(J(e)&&K[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?u=me:J(e)&&a&&a.scheme==e.scheme?u=oe:J(e)?u=ue:"/"==i[f+1]?(u=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),u=ke)}break;case ie:if(!a||a.cannotBeABaseURL&&"#"!=o)return C;if(a.cannotBeABaseURL&&"#"==o){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=_e;break}u="file"==a.scheme?me:ce;continue;case oe:if("/"!=o||"/"!=i[f+1]){u=ce;continue}u=he,f++;break;case se:if("/"==o){u=fe;break}u=we;continue;case ce:if(e.scheme=a.scheme,o==n)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==o||"\\"==o&&J(e))u=le;else if("?"==o)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=Se;else{if("#"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=we;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}break;case le:if(!J(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=we;continue}u=fe}else u=he;break;case ue:if(u=he,"/"!=o||"/"!=p.charAt(f+1))continue;f++;break;case he:if("/"!=o&&"\\"!=o){u=fe;continue}break;case fe:if("@"==o){g&&(p="%40"+p),g=!0,s=d(p);for(var y=0;y65535)return T;e.port=J(e)&&k===K[e.scheme]?null:k,p=""}if(r)return;u=be;continue}return T}p+=o;break;case me:if(e.scheme="file","/"==o||"\\"==o)u=ve;else{if(!a||"file"!=a.scheme){u=we;continue}if(o==n)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==o)e.host=a.host,e.path=a.path.slice(),e.query="",u=Se;else{if("#"!=o){ee(i.slice(f).join(""))||(e.host=a.host,e.path=a.path.slice(),te(e)),u=we;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}}break;case ve:if("/"==o||"\\"==o){u=ye;break}a&&"file"==a.scheme&&!ee(i.slice(f).join(""))&&(Z(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=we;continue;case ye:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&Z(p))u=we;else if(""==p){if(e.host="",r)return;u=be}else{if(c=U(e,p))return c;if("localhost"==e.host&&(e.host=""),r)return;p="",u=be}continue}p+=o;break;case be:if(J(e)){if(u=we,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(u=we,"/"!=o))continue}else e.fragment="",u=_e;else e.query="",u=Se;break;case we:if(o==n||"/"==o||"\\"==o&&J(e)||!r&&("?"==o||"#"==o)){if(".."===(l=(l=p).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(te(e),"/"==o||"\\"==o&&J(e)||e.path.push("")):re(p)?"/"==o||"\\"==o&&J(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(o==n||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=Se):"#"==o&&(e.fragment="",u=_e)}else p+=Y(o,V);break;case ke:"?"==o?(e.query="",u=Se):"#"==o?(e.fragment="",u=_e):o!=n&&(e.path[0]+=Y(o,W));break;case Se:r||"#"!=o?o!=n&&("'"==o&&J(e)?e.query+="%27":e.query+="#"==o?"%23":Y(o,W)):(e.fragment="",u=_e);break;case _e:o!=n&&(e.fragment+=Y(o,H))}f++}},xe=function(e){var t,r,n=u(this,xe,"URL"),a=arguments.length>1?arguments[1]:void 0,o=String(e),s=S(n,{type:"URL"});if(void 0!==a)if(a instanceof xe)t=_(a);else if(r=Ae(t={},String(a)))throw TypeError(r);if(r=Ae(s,o,null,t))throw TypeError(r);var c=s.searchParams=new w,l=k(c);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(c)||null},i||(n.href=Pe.call(n),n.origin=Te.call(n),n.protocol=Ee.call(n),n.username=Re.call(n),n.password=Oe.call(n),n.host=Ie.call(n),n.hostname=Fe.call(n),n.port=Le.call(n),n.pathname=Me.call(n),n.search=Ne.call(n),n.searchParams=De.call(n),n.hash=Be.call(n))},Ce=xe.prototype,Pe=function(){var e=_(this),t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,l=t+":";return null!==a?(l+="//",Q(e)&&(l+=r+(n?":"+n:"")+"@"),l+=G(a),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},Te=function(){var e=_(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&J(e)?t+"://"+G(e.host)+(null!==r?":"+r:""):"null"},Ee=function(){return _(this).scheme+":"},Re=function(){return _(this).username},Oe=function(){return _(this).password},Ie=function(){var e=_(this),t=e.host,r=e.port;return null===t?"":null===r?G(t):G(t)+":"+r},Fe=function(){var e=_(this).host;return null===e?"":G(e)},Le=function(){var e=_(this).port;return null===e?"":String(e)},Me=function(){var e=_(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ne=function(){var e=_(this).query;return e?"?"+e:""},De=function(){return _(this).searchParams},Be=function(){var e=_(this).fragment;return e?"#"+e:""},je=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&c(Ce,{href:je(Pe,(function(e){var t=_(this),r=String(e),n=Ae(t,r);if(n)throw TypeError(n);k(t.searchParams).updateSearchParams(t.query)})),origin:je(Te),protocol:je(Ee,(function(e){var t=_(this);Ae(t,String(e)+":",ne)})),username:je(Re,(function(e){var t=_(this),r=d(String(e));if(!$(t)){t.username="";for(var n=0;n>1,e+=s(e/t);e>455;n+=36)e=s(e/35);return s(n+36*e/(e+38))},h=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r=h&&as((n-f)/v))throw RangeError(o);for(f+=(m-h)*v,h=m,r=0;rn)throw RangeError(o);if(a==h){for(var y=f,b=36;;b+=36){var w=b<=d?1:b>=d+26?26:b-d;if(y0?arguments[0]:void 0,u=[];if(P(this,{type:x,entries:u,updateURL:function(){},updateSearchParams:U}),void 0!==l)if(m(l))if("function"==typeof(e=w(l)))for(r=(t=e.call(l)).next;!(n=r.call(t)).done;){if((o=(i=(a=b(g(n.value))).next).call(a)).done||(s=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:s.value+""})}else for(c in l)f(l,c)&&u.push({key:c,value:l[c]+""});else j(u,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},W=G.prototype;s(W,{append:function(e,t){q(arguments.length,2);var r=T(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){q(arguments.length,1);for(var t=T(this),r=t.entries,n=e+"",a=0;ae.key){a.splice(t,0,e);break}t===r&&a.push(e)}n.updateURL()},forEach:function(e){for(var t,r=T(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),a=0;a1&&(m(t=arguments[1])&&(r=t.body,p(r)===x&&((n=t.headers?new _(t.headers):new _).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(r)),headers:y(0,n)}))),a.push(t)),S.apply(this,a)}}),e.exports={URLSearchParams:G,getState:T}},function(e,t,r){var n=r(28),a=r(94);e.exports=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){r(10)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){!function(e){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},a=r;function i(e){return"object"==typeof e&&null!==e||"function"==typeof e}function o(e){return e.slice()}function s(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function c(e){return!1!==l(e)&&e!==1/0}function l(e){return!("number"!=typeof e||n(e)||e<0)}function u(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 a=e[t];if(void 0!==a){if("function"!=typeof a)throw new TypeError(a+" is not a method");switch(r){case 0:return function(){return d(a,e,n)};case 1:return function(t){var r=[t].concat(n);return d(a,e,r)}}}return function(){return _(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return u(n,e,r)}function d(e,t,r){try{return _(u(e,t,r))}catch(e){return A(e)}}function p(e){return e}function g(e){return!1}function m(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 v(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 y=Promise,b=Promise.prototype.then,w=Promise.resolve.bind(y),k=Promise.reject.bind(y);function S(e){return new y(e)}function _(e){return w(e)}function A(e){return k(e)}function x(e,t,r){return b.call(e,t,r)}function C(e,t,r){x(x(e,t,r),void 0,a)}function P(e,t){C(e,t)}function T(e,t){C(e,void 0,t)}function E(e,t,r){return x(e,t,r)}function R(e){x(e,void 0,a)}var O=16384,I=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===O-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,a=e._elements,i=a[r];return n===O&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function F(e,t,r){var n=null;!0===r&&(n=Object.prototype);var a=Object.create(n);return a.value=e,a.done=t,a}function L(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?B(e):"closed"===t._state?U(e):j(e,t._storedError)}function M(e,t){return Nr(e._ownerReadableStream,t)}function N(e){"readable"===e._ownerReadableStream._state?q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(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 B(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function j(e,t){B(e),q(e,t)}function U(e){B(e),G(e)}function q(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function z(e,t){j(e,t)}function G(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var W=t("[[CancelSteps]]"),H=t("[[PullSteps]]");function V(e,t){void 0===t&&(t=!1);var r=new Z(e);return r._forAuthorCode=t,r}function X(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function Y(e,t,r){var n=e._reader;n._readRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function K(e){return e._reader._readRequests.length}function J(e){var t=e._reader;return void 0!==t&&!!ee(t)}var Q,$,Z=function(){function e(e){if(!1===Lr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:A(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?A(D("read from")):te(this):A(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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?_(F(void 0,!0,e._forAuthorCode)):"errored"===t._state?A(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&&((Q={})[t.asyncIterator]=function(){return this},$=Q,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ie(this))return A(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?A(D("iterate")):E(te(e),(function(t){var r=t.done;return r&&N(e),F(t.value,r,!0)}))},return:function(e){if(!1===ie(this))return A(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return A(D("finish iterating"));if(t._readRequests.length>0)return A(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=M(t,e);return N(t),E(r,(function(){return F(e,!0,!0)}))}return N(t),_(F(e,!0,!0))}};function ae(e,t){void 0===t&&(t=!1);var r=V(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ie(e){return!!i(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 ce(e,t,r){if(!c(r=Number(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 le(e){return e._queue.peek().value}function ue(e){e._queue=new I,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={}),me(this);var r=t.size,n=t.highWaterMark;if(void 0!==e.type)throw new RangeError("Invalid type is specified");var a=v(r);void 0===n&&(n=1),Ye(this,e,n=m(n),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ve(this))throw ot("locked");return ye(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ve(this)?A(ot("abort")):!0===ye(this)?A(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ve(this)?A(ot("close")):!0===ye(this)?A(new TypeError("Cannot close a stream that already has a writer")):!0===Ee(this)?A(new TypeError("Cannot close an already-closing stream")):we(this)},e.prototype.getWriter=function(){if(!1===ve(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Me(e)}function ge(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(de.prototype);return me(o),Xe(o,Object.create(He.prototype),e,t,r,n,a,i),o}function me(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new I,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function ye(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return _(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=S((function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=a,!1===n&&_e(e,t),a}function we(e){var t=e._state;if("closed"===t||"errored"===t)return A(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&&kt(n),Je(e._writableStreamController),r}function ke(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function Se(e,t){"writable"!==e._state?Ae(e):_e(e,t)}function _e(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&qe(n,t),!1===Re(e)&&!0===r._started&&Ae(e)}function Ae(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new I,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Fe(e);C(e._writableStreamController[he](r._reason),(function(){r._resolve(),Fe(e)}),(function(t){r._reject(t),Fe(e)}))}else Fe(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ce(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Se(e,t)}function Pe(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&pt(t)}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 Ee(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Re(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Oe(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ie(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Fe(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 Le(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):kt(r)),e._backpressure=t}var Me=function(){function e(e){if(!1===ve(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===ye(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===Ee(e)&&!0===e._backpressure?gt(this):vt(this),lt(this);else if("erroring"===t)mt(this,e._storedError),lt(this);else if("closed"===t)vt(this),ht(this);else{var r=e._storedError;mt(this,r),ut(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Ne(this)?A(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 ct("desiredSize");return ze(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Ne(this)?A(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Ne(this)?A(st("abort")):void 0===this._ownerWritableStream?A(ct("abort")):De(this,e)},e.prototype.close=function(){if(!1===Ne(this))return A(st("close"));var e=this._ownerWritableStream;return void 0===e?A(ct("close")):!0===Ee(e)?A(new TypeError("Cannot close an already-closing stream")):Be(this)},e.prototype.releaseLock=function(){if(!1===Ne(this))throw st("releaseLock");void 0!==this._ownerWritableStream&&Ge(this)},e.prototype.write=function(e){return!1===Ne(this)?A(st("write")):void 0===this._ownerWritableStream?A(ct("write to")):We(this,e)},e}();function Ne(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function De(e,t){return be(e._ownerWritableStream,t)}function Be(e){return we(e._ownerWritableStream)}function je(e){var t=e._ownerWritableStream,r=t._state;return!0===Ee(t)||"closed"===r?_(void 0):"errored"===r?A(t._storedError):Be(e)}function Ue(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function qe(e,t){"pending"===e._readyPromiseState?yt(e,t):wt(e,t)}function ze(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:$e(t._writableStreamController)}function Ge(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r),Ue(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function We(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=Qe(n,t);if(r!==e._ownerWritableStream)return A(ct("write to"));var i=r._state;if("errored"===i)return A(r._storedError);if(!0===Ee(r)||"closed"===i)return A(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return A(r._storedError);var o=ke(r);return Ze(n,t,a),o}var He=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===Ve(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&it(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Ke(this),t},e.prototype[fe]=function(){ue(this)},e}();function Ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Xe(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=at(t);Le(e,c),C(_(r()),(function(){t._started=!0,et(t)}),(function(r){t._started=!0,Se(e,r)}))}function Ye(e,t,r,n){var a=Object.create(He.prototype);function i(){return f(t,"start",[a])}var o=h(t,"write",1,[a]),s=h(t,"close",0,[]),c=h(t,"abort",1,[]);Xe(e,a,i,o,s,c,r,n)}function Ke(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Je(e){ce(e,"close",0),et(e)}function Qe(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return tt(e,t),1}}function $e(e){return e._strategyHWM-e._queueTotalSize}function Ze(e,t,r){var n={chunk:t};try{ce(e,n,r)}catch(t){return void tt(e,t)}var a=e._controlledWritableStream;!1===Ee(a)&&"writable"===a._state&&Le(a,at(e)),et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=le(e);"close"===r?rt(e):nt(e,r.chunk)}}else Ae(t)}function tt(e,t){"writable"===e._controlledWritableStream._state&&it(e,t)}function rt(e){var t=e._controlledWritableStream;Oe(t),se(e);var r=e._closeAlgorithm();Ke(e),C(r,(function(){Pe(t)}),(function(e){Te(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Ie(r),C(e._writeAlgorithm(t),(function(){xe(r);var t=r._state;if(se(e),!1===Ee(r)&&"writable"===t){var n=at(e);Le(r,n)}et(e)}),(function(t){"writable"===r._state&&Ke(e),Ce(r,t)}))}function at(e){return $e(e)<=0}function it(e,t){var r=e._controlledWritableStream;Ke(e),_e(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 ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ut(e,t){lt(e),ft(e,t)}function ht(e){lt(e),pt(e)}function ft(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){ut(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function gt(e){e._readyPromise=S((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function mt(e,t){gt(e),yt(e,t)}function vt(e){gt(e),kt(e)}function yt(e,t){R(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){gt(e)}function wt(e,t){mt(e,t)}function kt(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(e){return!1}}var _t="undefined"!=typeof DOMException?DOMException:void 0;function At(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){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 Ct=At(_t)?_t:xt();function Pt(e,t,n,a,i,o){var s=V(e),c=pe(t);e._disturbed=!0;var l=!1,u=_(void 0);return S((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Ct("Aborted","AbortError"),n=[];!1===a&&n.push((function(){return"writable"===t._state?be(t,r):_(void 0)})),!1===i&&n.push((function(){return"readable"===e._state?Nr(e,r):_(void 0)})),w((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(g(),r,t)}r(!1)}))}function g(){return!0===l?_(!0):x(c._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(u=x(We(c,e.value),void 0,r),!1)}))}))}if(y(e,s._closedPromise,(function(e){!1===a?w((function(){return be(t,e)}),!0,e):k(!0,e)})),y(t,c._closedPromise,(function(t){!1===i?w((function(){return Nr(e,t)}),!0,t):k(!0,t)})),b(e,s._closedPromise,(function(){!1===n?w((function(){return je(c)})):k()})),!0===Ee(t)||"closed"===t._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?w((function(){return Nr(e,m)}),!0,m):k(!0,m)}function v(){var e=u;return x(u,(function(){return e!==u?v():void 0}))}function y(e,t,r){"errored"===e._state?r(e._storedError):T(t,r)}function b(e,t,r){"closed"===e._state?r():P(t,r)}function w(e,r,n){function a(){C(e(),(function(){return A(r,n)}),(function(e){return A(!0,e)}))}!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),a):a())}function k(e,r){!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),(function(){return A(e,r)})):A(e,r))}function A(e,t){Ge(c),N(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}R(p())}))}var Tt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Et(this))throw qt("desiredSize");return Nt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Et(this))throw qt("close");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits close");Ft(this)},e.prototype.enqueue=function(e){if(!1===Et(this))throw qt("enqueue");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Lt(this,e)},e.prototype.error=function(e){if(!1===Et(this))throw qt("error");Mt(this,e)},e.prototype[W]=function(e){ue(this);var t=this._cancelAlgorithm(e);return It(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?(It(this),Dr(e)):Rt(this),_(F(t,!1,e._reader._forAuthorCode))}var r=X(e);return Rt(this),r},e}();function Et(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Rt(e){!1!==Ot(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Rt(e))}),(function(t){Mt(e,t)}))):e._pullAgain=!0)}function Ot(e){var t=e._controlledReadableStream;return!1!==Bt(e)&&!1!==e._started&&(!0===Mr(t)&&K(t)>0||Nt(e)>0)}function It(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ft(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(It(e),Dr(t))}function Lt(e,t){var r=e._controlledReadableStream;if(!0===Mr(r)&&K(r)>0)Y(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Mt(e,t),t}try{ce(e,t,n)}catch(t){throw Mt(e,t),t}}Rt(e)}function Mt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ue(e),It(e),Br(r,t))}function Nt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Dt(e){return!0!==Ot(e)}function Bt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Rt(t)}),(function(e){Mt(t,e)}))}function Ut(e,t,r,n){var a=Object.create(Tt.prototype);function i(){return f(t,"start",[a])}var o=h(t,"pull",0,[a]),s=h(t,"cancel",1,[]);jt(e,a,i,o,s,r,n)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function zt(e,t){var r,n,a,i,s,c=V(e),l=!1,u=!1,h=!1,f=S((function(e){s=e}));function d(){return!0===l||(l=!0,R(E(te(c),(function(e){if(l=!1,!0===e.done)return!1===u&&Ft(a._readableStreamController),void(!1===h&&Ft(i._readableStreamController));var t=e.value,r=t,n=t;!1===u&&Lt(a._readableStreamController,r),!1===h&&Lt(i._readableStreamController,n)})))),_(void 0)}function p(t){if(u=!0,r=t,!0===h){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function g(t){if(h=!0,n=t,!0===u){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function m(){}return a=Ir(m,d,p),i=Ir(m,d,g),T(c._closedPromise,(function(e){Mt(a._readableStreamController,e),Mt(i._readableStreamController,e)})),[a,i]}var Gt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Wt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Xt(this))throw wr("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Xt(this))throw wr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");g(this._view.buffer),gr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Xt(this))throw wr("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");g(e.buffer),mr(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===Vt(this))throw kr("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(Wt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Vt(this))throw kr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Vt(this))throw kr("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===Vt(this))throw kr("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");g(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Vt(this))throw kr("error");dr(this,e)},e.prototype[W]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),ue(this);var t=this._cancelAlgorithm(e);return ur(this),t},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(e){return A(e)}return _(F(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var a=void 0;try{a=new ArrayBuffer(n)}catch(e){return A(e)}var i={buffer:a,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}var o=X(e);return Yt(this),o},e}();function Vt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Xt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Yt(e){!1!==lr(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Yt(e))}),(function(t){dr(e,t)}))):e._pullAgain=!0)}function Kt(e){rr(e),e._pendingPullIntos=new I}function Jt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Qt(t);"default"===t.readerType?Y(e,n,r):Ar(e,n,r)}function Qt(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,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,c=a,l=!1;o>n&&(c=o-t.bytesFilled,l=!0);for(var u=e._queue;c>0;){var h=u.peek(),f=Math.min(c,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?u.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),c-=f}return l}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(ur(e),Dr(e._controlledReadableByteStream)):Yt(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){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===Zt(e,t)&&(cr(e),Jt(e._controlledReadableByteStream,t))}}function ar(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var a=t.constructor,i={buffer:p(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(i),_r(r);if("closed"===r._state)return _(F(new a(i.buffer,i.byteOffset,0),!0,r._reader._forAuthorCode));if(e._queueTotalSize>0){if(!0===Zt(e,i)){var o=Qt(i);return tr(e),_(F(o,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var s=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,s),A(s)}}e._pendingPullIntos.push(i);var c=_r(r);return Yt(e),c}function ir(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Cr(r))for(;xr(r)>0;)Jt(r,cr(e))}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 a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);$t(e,i,0,i.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Jt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ir(e,r)}else or(e,t,r);Yt(e)}function cr(e){var t=e._pendingPullIntos.shift();return rr(e),t}function lr(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===J(t)&&K(t)>0||!0===Cr(t)&&xr(t)>0||pr(e)>0)}function ur(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&&e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,r),r}ur(e),Dr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,a=t.byteOffset,i=t.byteLength,o=p(n);!0===J(r)?0===K(r)?$t(e,o,a,i):Y(r,new Uint8Array(o,a,i),!1):!0===Cr(r)?($t(e,o,a,i),nr(e)):$t(e,o,a,i),Yt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Kt(e),ue(e),ur(e),Br(r,t))}function pr(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function gr(e,t){if(!1===c(t=Number(t)))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function mr(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 vr(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,ue(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=m(i),t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new I,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Yt(t)}),(function(e){dr(t,e)}))}function yr(e,t,r){var n=Object.create(Ht.prototype);function a(){return f(t,"start",[n])}var i=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Gt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");vr(e,n,a,i,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function wr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function kr(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 Pr(e);return r._forAuthorCode=t,r}function _r(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function Ar(e,t,r){var n=e._reader;n._readIntoRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Cr(e){var t=e._reader;return void 0!==t&&!!Tr(t)}var Pr=function(){function e(e){if(!Lr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Vt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readIntoRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return Tr(this)?this._closedPromise:A(Rr("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(Rr("cancel"))},e.prototype.read=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("read from")):ArrayBuffer.isView(e)?(g(e.buffer),0===e.byteLength?A(new TypeError("view must have non-zero byteLength")):Er(this,e)):A(new TypeError("view must be an array buffer view")):A(Rr("read"))},e.prototype.releaseLock=function(){if(!Tr(this))throw Rr("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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Er(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?A(r._storedError):ar(r._readableStreamController,t)}function Rr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Or=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Fr(this);var r=t.size,n=t.highWaterMark,a=e.type;if("bytes"===String(a)){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),yr(this,e,n=m(n))}else{if(void 0!==a)throw new RangeError("Invalid type is specified");var i=v(r);void 0===n&&(n=1),Ut(this,e,n=m(n),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Lr(this))throw jr("locked");return Mr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Lr(this)?A(jr("cancel")):!0===Mr(this)?A(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===Lr(this))throw jr("getReader");if(void 0===t)return V(this,!0);if("byob"===(t=String(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,a=void 0===t?{}:t,i=a.preventClose,o=a.preventAbort,s=a.preventCancel,c=a.signal;if(!1===Lr(this))throw jr("pipeThrough");if(!1===ve(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Lr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(i=Boolean(i),o=Boolean(o),s=Boolean(s),void 0!==c&&!St(c))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Mr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===ye(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return R(Pt(this,r,i,o,s,c)),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,a=r.preventAbort,i=r.preventCancel,o=r.signal;return!1===Lr(this)?A(jr("pipeTo")):!1===ve(e)?A(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),a=Boolean(a),i=Boolean(i),void 0===o||St(o)?!0===Mr(this)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===ye(e)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pt(this,e,n,a,i,o):A(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Lr(this))throw jr("tee");return o(zt(this))},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Lr(this))throw jr("getIterator");return ae(this,r)},e}();function Ir(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(Or.prototype);return Fr(i),jt(i,Object.create(Tt.prototype),e,t,r,n,a),i}function Fr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Lr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Mr(e){return void 0!==e._reader}function Nr(e,t){return e._disturbed=!0,"closed"===e._state?_(void 0):"errored"===e._state?A(e._storedError):(Dr(e),E(e._readableStreamController[W](t),r))}function Dr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(F(void 0,!0,t._forAuthorCode))})),t._readRequests=new I),G(t))}function Br(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 I):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new I),q(r,t))}function jr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"==typeof t.asyncIterator&&Object.defineProperty(Or.prototype,t.asyncIterator,{value:Or.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ur=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),zr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,a=t.highWaterMark,i=r.size,o=r.highWaterMark;if(void 0!==e.writableType)throw new RangeError("Invalid writable type specified");var s=v(n);if(void 0===a&&(a=1),a=m(a),void 0!==e.readableType)throw new RangeError("Invalid readable type specified");var c,l=v(i);void 0===o&&(o=0),o=m(o),Gr(this,S((function(e){c=e})),a,s,o,l),Qr(this,e);var u=f(e,"start",[this._transformStreamController]);c(u)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Wr(this))throw ln("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Wr(this))throw ln("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Gr(e,t,r,n,a,i){function o(){return t}function s(t){return nn(e,t)}function c(t){return an(e,t)}function l(){return on(e)}function u(){return sn(e)}function h(t){return Vr(e,t),_(void 0)}e._writable=ge(o,s,l,c,r,n),e._readable=Ir(o,u,h,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Xr(e,!0),e._transformStreamController=void 0}function Wr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Hr(e,t){Mt(e._readable._readableStreamController,t),Vr(e,t)}function Vr(e,t){$r(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Xr(e,!1)}function Xr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=S((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Yr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Kr(this))throw cn("desiredSize");return Nt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Kr(this))throw cn("enqueue");Zr(this,e)},e.prototype.error=function(e){if(!1===Kr(this))throw cn("error");en(this,e)},e.prototype.terminate=function(){if(!1===Kr(this))throw cn("terminate");rn(this)},e}();function Kr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Jr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Qr(e,t){var r=Object.create(Yr.prototype),n=function(e){try{return Zr(r,e),_(void 0)}catch(e){return A(e)}},a=t.transform;if(void 0!==a){if("function"!=typeof a)throw new TypeError("transform is not a method");n=function(e){return d(a,t,[e,r])}}var i=h(t,"flush",0,[r]);Jr(e,r,n,i)}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===Bt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Lt(n,t)}catch(e){throw Vr(r,e),r._readable._storedError}Dt(n)!==r._backpressure&&Xr(r,!0)}function en(e,t){Hr(e._controlledTransformStream,t)}function tn(e,t){return E(e._transformAlgorithm(t),void 0,(function(t){throw Hr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===Bt(r)&&Ft(r),Vr(t,new TypeError("TransformStream terminated"))}function nn(e,t){var r=e._transformStreamController;return!0===e._backpressure?E(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return tn(r,t)})):tn(r,t)}function an(e,t){return Hr(e,t),_(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return $r(r),E(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===Bt(e)&&Ft(e)}),(function(r){throw Hr(e,r),t._storedError}))}function sn(e){return Xr(e,!1),e._backpressureChangePromise}function cn(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ln(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Ur,e.CountQueuingStrategy=qr,e.ReadableStream=Or,e.TransformStream=zr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){r(145),r(114),r(77),r(116);var n=r(43);e.exports=n.Map},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){var n=r(10),a=r(11),i=r(52),o=r(29),s=r(147),c=r(124),l=r(123),u=r(22),h=r(14),f=r(97),d=r(85),p=r(149);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),v=g?"set":"add",y=a[e],b=y&&y.prototype,w=y,k={},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!(m&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(i(e,"function"!=typeof y||!(m||b.forEach&&!h((function(){(new y).entries().next()})))))w=r.getConstructor(t,e,g,v),s.REQUIRED=!0;else if(i(e,!0)){var _=new w,A=_[v](m?{}:-0,1)!=_,x=h((function(){_.has(1)})),C=f((function(e){new y(e)})),P=!m&&h((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));C||((w=t((function(t,r){l(t,w,e);var n=p(new y,t,w);return null!=r&&c(r,n[v],n,g),n}))).prototype=b,b.constructor=w),(x||P)&&(S("delete"),S("has"),g&&S("get")),(P||A)&&S(v),m&&b.clear&&delete b.clear}return k[e]=w,n({global:!0,forced:w!=y},k),d(w,e),m||r.setStrong(w,e,g),w}},function(e,t,r){var n=r(39),a=r(22),i=r(23),o=r(27).f,s=r(38),c=r(148),l=s("meta"),u=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,l)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[l].objectID},getWeakData:function(e,t){if(!i(e,l)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[l].weakData},onFreeze:function(e){return c&&d.REQUIRED&&h(e)&&!i(e,l)&&f(e),e}};n[l]=!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),a=r(87);e.exports=function(e,t,r){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==r&&n(o=i.prototype)&&o!==r.prototype&&a(e,o),e}},function(e,t,r){var n=r(27).f,a=r(71),i=r(121),o=r(62),s=r(123),c=r(124),l=r(79),u=r(122),h=r(13),f=r(147).fastKey,d=r(33),p=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,l){var u=e((function(e,n){s(e,u,t),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[l],e,r)})),d=g(t),m=function(e,t,r){var n,a,i=d(e),o=v(e,t);return o?o.value=r:(i.last=o={index:a=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=o),n&&(n.next=o),h?i.size++:e.size++,"F"!==a&&(i.index[a]=o)),e},v=function(e,t){var r,n=d(e),a=f(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(u.prototype,{clear:function(){for(var e=d(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=d(t),n=v(t,e);if(n){var a=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=a),a&&(a.previous=i),r.first==n&&(r.first=a),r.last==n&&(r.last=i),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),i(u.prototype,r?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(u.prototype,"size",{get:function(){return d(this).size}}),u},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),i=g(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;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),u(t)}}},function(e,t,r){r(152),r(114),r(77),r(116);var n=r(43);e.exports=n.Set},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){r(114),r(154),r(116);var n=r(43);e.exports=n.WeakMap},function(e,t,r){var n,a=r(11),i=r(121),o=r(147),s=r(146),c=r(155),l=r(22),u=r(33).enforce,h=r(34),f=!a.ActiveXObject&&"ActiveXObject"in a,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",p,c);if(h&&f){n=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,w=m.set;i(m,{delete:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var r=u(this);r.frozen||(r.frozen=new n),y.call(this,e)?w.call(this,e,t):r.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,r){var n=r(121),a=r(147).getWeakData,i=r(28),o=r(22),s=r(123),c=r(124),l=r(156),u=r(23),h=r(33),f=h.set,d=h.getterFor,p=l.find,g=l.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.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=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:m++,frozen:void 0}),null!=n&&c(n,e[l],e,r)})),p=d(t),g=function(e,t,r){var n=p(e),o=a(i(t),!0);return!0===o?v(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=a(e);return!0===r?v(t).delete(e):r&&u(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=a(e);return!0===r?v(t).has(e):r&&u(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=a(e);return!0===r?v(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),a=r(18),i=r(83),o=r(47),s=r(157),c=[].push,l=function(e){var t=1==e,r=2==e,l=3==e,u=4==e,h=6==e,f=5==e||h;return function(d,p,g,m){for(var v,y,b=i(d),w=a(b),k=n(p,g,3),S=o(w.length),_=0,A=m||s,x=t?A(d,S):r?A(d,0):void 0;S>_;_++)if((f||_ in w)&&(y=k(v=w[_],_,b),e))if(t)x[_]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:c.call(x,v)}else if(u)return!1;return h?-1:l||u?u:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,r){var n=r(22),a=r(158),i=r(57)("species");e.exports=function(e,t){var r;return a(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!a(r.prototype)?n(r)&&null===(r=r[i])&&(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(114),r(160),r(116);var n=r(43);e.exports=n.WeakSet},function(e,t,r){r(146)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(155))},function(e,t,r){r(162);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){var n=r(10),a=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return a(this,e)}})},function(e,t,r){r(164);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),a=r(49),i=String.fromCharCode,o=String.fromCodePoint;n({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(166),r(114),r(168),r(172),r(173),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);var n=r(43);e.exports=n.Symbol},function(e,t,r){var n=r(10),a=r(14),i=r(158),o=r(22),s=r(83),c=r(47),l=r(93),u=r(157),h=r(167),f=r(57),d=r(133),p=f("isConcatSpreadable"),g=9007199254740991,m="Maximum allowed index exceeded",v=d>=51||!a((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),y=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,r,n,a,i,o=s(this),h=u(o,0),f=0;for(t=-1,n=arguments.length;tg)throw TypeError(m);for(r=0;r=g)throw TypeError(m);l(h,f++,i)}return h.length=f,h}})},function(e,t,r){var n=r(14),a=r(57),i=r(133),o=a("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){var n=r(10),a=r(11),i=r(42),o=r(37),s=r(13),c=r(58),l=r(59),u=r(14),h=r(23),f=r(158),d=r(22),p=r(28),g=r(83),m=r(17),v=r(21),y=r(16),b=r(71),w=r(73),k=r(44),S=r(169),_=r(51),A=r(12),x=r(27),C=r(15),P=r(26),T=r(29),E=r(36),R=r(35),O=r(39),I=r(38),F=r(57),L=r(170),M=r(171),N=r(85),D=r(33),B=r(156).forEach,j=R("hidden"),U="Symbol",q="prototype",z=F("toPrimitive"),G=D.set,W=D.getterFor(U),H=Object[q],V=a.Symbol,X=i("JSON","stringify"),Y=A.f,K=x.f,J=S.f,Q=C.f,$=E("symbols"),Z=E("op-symbols"),ee=E("string-to-symbol-registry"),te=E("symbol-to-string-registry"),re=E("wks"),ne=a.QObject,ae=!ne||!ne[q]||!ne[q].findChild,ie=s&&u((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Y(H,t);n&&delete H[t],K(e,t,r),n&&e!==H&&K(H,t,n)}:K,oe=function(e,t){var r=$[e]=b(V[q]);return G(r,{type:U,tag:e,description:t}),s||(r.description=t),r},se=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof V},ce=function(e,t,r){e===H&&ce(Z,t,r),p(e);var n=v(t,!0);return p(r),h($,n)?(r.enumerable?(h(e,j)&&e[j][n]&&(e[j][n]=!1),r=b(r,{enumerable:y(0,!1)})):(h(e,j)||K(e,j,y(1,{})),e[j][n]=!0),ie(e,n,r)):K(e,n,r)},le=function(e,t){p(e);var r=m(t),n=w(r).concat(de(r));return B(n,(function(t){s&&!ue.call(r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=v(e,!0),r=Q.call(this,t);return!(this===H&&h($,t)&&!h(Z,t))&&(!(r||!h(this,t)||!h($,t)||h(this,j)&&this[j][t])||r)},he=function(e,t){var r=m(e),n=v(t,!0);if(r!==H||!h($,n)||h(Z,n)){var a=Y(r,n);return!a||!h($,n)||h(r,j)&&r[j][n]||(a.enumerable=!0),a}},fe=function(e){var t=J(m(e)),r=[];return B(t,(function(e){h($,e)||h(O,e)||r.push(e)})),r},de=function(e){var t=e===H,r=J(t?Z:m(e)),n=[];return B(r,(function(e){!h($,e)||t&&!h(H,e)||n.push($[e])})),n};c||(V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),r=function(e){this===H&&r.call(Z,e),h(this,j)&&h(this[j],t)&&(this[j][t]=!1),ie(this,t,y(1,e))};return s&&ae&&ie(H,t,{configurable:!0,set:r}),oe(t,e)},T(V[q],"toString",(function(){return W(this).tag})),T(V,"withoutSetter",(function(e){return oe(I(e),e)})),C.f=ue,x.f=ce,A.f=he,k.f=S.f=fe,_.f=de,L.f=function(e){return oe(F(e),e)},s&&(K(V[q],"description",{configurable:!0,get:function(){return W(this).description}}),o||T(H,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(w(re),(function(e){M(e)})),n({target:U,stat:!0,forced:!c},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=V(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(){ae=!0},useSimple:function(){ae=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?b(e):le(b(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:de}),n({target:"Object",stat:!0,forced:u((function(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(g(e))}}),X&&n({target:"JSON",stat:!0,forced:!c||u((function(){var e=V();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,r){for(var n,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);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}),a[1]=t,X.apply(null,a)}}),V[q][z]||P(V[q],z,V[q].valueOf),N(V,U),O[j]=!0},function(e,t,r){var n=r(17),a=r(44).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),a=r(23),i=r(170),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});a(t,e)||o(t,e,{value:i.f(e)})}},function(e,t,r){r(171)("asyncIterator")},function(e,t,r){var n=r(10),a=r(13),i=r(11),o=r(23),s=r(22),c=r(27).f,l=r(40),u=i.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new u(e):void 0===e?u():u(e);return""===e&&(h[t]=!0),t};l(f,u);var d=f.prototype=u.prototype;d.constructor=f;var p=d.toString,g="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=g?t.slice(7,-1):t.replace(m,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){r(171)("hasInstance")},function(e,t,r){r(171)("isConcatSpreadable")},function(e,t,r){r(171)("iterator")},function(e,t,r){r(171)("match")},function(e,t,r){r(171)("matchAll")},function(e,t,r){r(171)("replace")},function(e,t,r){r(171)("search")},function(e,t,r){r(171)("species")},function(e,t,r){r(171)("split")},function(e,t,r){r(171)("toPrimitive")},function(e,t,r){r(171)("toStringTag")},function(e,t,r){r(171)("unscopables")},function(e,t,r){r(85)(Math,"Math",!0)},function(e,t,r){var n=r(11);r(85)(n.JSON,"JSON",!0)},function(e,t,r){r(189);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){var n=r(10),a=r(190).start;n({target:"String",proto:!0,forced:r(192)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),a=r(191),i=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var c,l,u=String(i(t)),h=u.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?u:(c=d-h,(l=a.call(f,o(c/f.length))).length>c&&(l=l.slice(0,c)),e?u+l:l+u)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){var n=r(48),a=r(20);e.exports="".repeat||function(e){var t=String(a(this)),r="",i=n(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(r+=t);return r}},function(e,t,r){var n=r(127);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(194);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){var n=r(10),a=r(190).end;n({target:"String",proto:!0,forced:r(192)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(196);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),a=r(197).values;n({target:"Object",stat:!0},{values:function(e){return a(e)}})},function(e,t,r){var n=r(13),a=r(73),i=r(17),o=r(15).f,s=function(e){return function(t){for(var r,s=i(t),c=a(s),l=c.length,u=0,h=[];l>u;)r=c[u++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}};e.exports={entries:s(!0),values:s(!1)}},function(module,exports,__w_pdfjs_require__){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__(199),_api_compatibility=__w_pdfjs_require__(200),_canvas=__w_pdfjs_require__(201),_worker_options=__w_pdfjs_require__(203),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(204),_metadata=__w_pdfjs_require__(205),_transport_stream=__w_pdfjs_require__(207),_webgl=__w_pdfjs_require__(208);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,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,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}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;)(0,r.value)(e,t)}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(e){a.e(e)}finally{a.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;)(0,r.value)(e)}catch(e){n.e(e)}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;)(0,t.value)()}catch(e){r.e(e)}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:"getOpenActionDestination",value:function(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}},{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:"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:"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){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,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=Object.create(null),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,a=e.offsetX,i=void 0===a?0:a,o=e.offsetY,s=void 0===o?0:o,c=e.dontFlip,l=void 0!==c&&c;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:i,offsetY:s,dontFlip:l})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?null:e;return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,a=e.intent,i=void 0===a?"display":a,o=e.enableWebGL,s=void 0!==o&&o,c=e.renderInteractiveForms,l=void 0!==c&&c,u=e.transform,h=void 0===u?null:u,f=e.imageLayer,d=void 0===f?null:f,p=e.canvasFactory,g=void 0===p?null:p,m=e.background,v=void 0===m?null:m;this._stats&&this._stats.time("Overall");var y="print"===i?"print":"display";this.pendingCleanup=!1,this.intentStates[y]||(this.intentStates[y]=Object.create(null));var b=this.intentStates[y];b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);var w=g||new _display_utils.DOMCanvasFactory,k=new _webgl.WebGLContext({enable:s});b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:y,renderInteractiveForms:!0===l}));var S=function(e){var r=b.renderTasks.indexOf(_);r>=0&&b.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===y)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(_.capability.reject(e),t._abortOperatorList({intentState:b,reason:e})):_.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},_=new InternalRenderTask({callback:S,params:{canvasContext:r,viewport:n,transform:h,imageLayer:d,background:v},objs:this.objs,commonObjs:this.commonObjs,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:w,webGLContext:k,useRequestAnimationFrame:"print"!==y,pdfBug:this._pdfBug});b.renderTasks||(b.renderTasks=[]),b.renderTasks.push(_);var A=_.task;return b.displayReadyCapability.promise.then((function(e){t.pendingCleanup?S():(t._stats&&t._stats.time("Rendering"),_.initializeGraphics(e),_.operatorListChanged())})).catch(S),A}},{key:"getOperatorList",value:function(){var e="oplist";this.intentStates[e]||(this.intentStates[e]=Object.create(null));var t,r=this.intentStates[e];return r.opListReadCapability||((t={}).operatorListChanged=function(){if(r.operatorList.lastChunk){r.opListReadCapability.resolve(r.operatorList);var e=r.renderTasks.indexOf(t);e>=0&&r.renderTasks.splice(e,1)}},r.opListReadCapability=(0,_util.createPromiseCapability)(),r.renderTasks=[],r.renderTasks.push(t),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:e})),r.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,a=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===r,combineTextItems:!0!==a},{highWaterMark:100,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){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){var n,i=r.value;r.done?e(a):(Object.assign(a.styles,i.styles),(n=a.items).push.apply(n,_toConsumableArray(i.items)),t())}),r)}()}))}},{key:"_destroy",value:function(){var e=this;this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var t=[];return Object.keys(this.intentStates).forEach((function(r){var n=e.intentStates[r];e._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==r&&n.renderTasks.forEach((function(e){var r=e.capability.promise.catch((function(){}));t.push(r),e.cancel()}))})),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=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.pendingCleanup||Object.keys(this.intentStates).some((function(t){var r=e.intentStates[t];return 0!==r.renderTasks.length||!r.operatorList.lastChunk}))||(Object.keys(this.intentStates).forEach((function(t){delete e.intentStates[t]})),this.objs.clear(),this.annotationsPromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,0))}},{key:"_startRenderPage",value:function(e,t){var r=this.intentStates[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;if(this._defer){var n=new WeakMap,a={data:function e(r){if("object"!==_typeof(r)||null===r)return r;if(n.has(r))return n.get(r);var a,i;if((a=r.buffer)&&(0,_util.isArrayBuffer)(a))return i=t&&t.includes(a)?new r.constructor(a,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,i),i;for(var o in i=Array.isArray(r)?[]:{},n.set(r,i),r){for(var s=void 0,c=r;!(s=Object.getOwnPropertyDescriptor(c,o));)c=Object.getPrototypeOf(c);if(void 0!==s.value)if("function"!=typeof s.value)i[o]=e(s.value);else if(r.hasOwnProperty&&r.hasOwnProperty(o))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(r[o]))}return i}(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&&"function"==typeof commonjsRequire)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(void 0!==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(e){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref10=_asyncToGenerator(_regenerator.default.mark((function _callee(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap((function _callee$(_context){for(;;)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||"function"!=typeof commonjsRequire){_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 _ref10.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,a=t.port,i=void 0===a?null:a,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),i&&pdfWorkerPorts.has(i))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,i)return pdfWorkerPorts.set(i,this),void this._initializeFromPort(i);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),a=function(){r.removeEventListener("error",i),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},i=function(){e._webWorker||a()};r.addEventListener("error",i),n.on("test",(function(t){r.removeEventListener("error",i),e.destroyed?a():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",i),e.destroyed)a();else try{o()}catch(t){e._setupFakeWorker()}}));var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{n.send("test",t,[t.buffer])}catch(e){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,n.send("test",t)}};return void o()}catch(e){(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++,a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var i=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=i,e._readyCapability.resolve(),i.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,a){_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)}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.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;e.done?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)}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&r.onProgress&&r.onProgress(e._lastProgress),a.onProgress=function(e){r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.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;e.done?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(e){n.cancel(e)}):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)}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword)try{r.onPassword((function(t){e._passwordCapability.resolve({password:t})}),t.code)}catch(t){e._passwordCapability.reject(t)}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){e.destroyed||e.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)})),t.on("commonobj",(function(r){if(!e.destroyed){var n=_slicedToArray(r,3),a=n[0],i=n[1],o=n[2];if(!e.commonObjs.has(a))switch(i){case"Font":var s=e._params;if("error"in o){var c=o.error;(0,_util.warn)("Error during font loading: ".concat(c)),e.commonObjs.resolve(a,c);break}var l=null;s.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(l={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var u=new _font_loader.FontFaceObject(o,{isEvalSupported:s.isEvalSupported,disableFontFace:s.disableFontFace,ignoreErrors:s.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:l});e.fontLoader.bind(u).catch((function(e){return t.sendWithPromise("FontFallback",{id:a})})).finally((function(){!s.fontExtraProperties&&u.data&&(u.data=null),e.commonObjs.resolve(a,u)}));break;case"FontPath":case"FontType3Res":case"Image":e.commonObjs.resolve(a,o);break;default:throw new Error("Got unknown common object type ".concat(i))}}})),t.on("obj",(function(t){if(!e.destroyed){var r=_slicedToArray(t,4),n=r[0],a=r[1],i=r[2],o=r[3],s=e.pageCache[a];if(!s.objs.has(n)){if("Image"!==i)throw new Error("Got unknown object type ".concat(i));s.objs.resolve(n,o),o&&"data"in o&&o.data.length>8e6&&(s.cleanupAfterRender=!0)}}})),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.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:"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:"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,a=e.objs,i=e.commonObjs,o=e.operatorList,s=e.pageIndex,c=e.canvasFactory,l=e.webGLContext,u=e.useRequestAnimationFrame,h=void 0!==u&&u,f=e.pdfBug,d=void 0!==f&&f;_classCallCheck(this,t),this.callback=r,this.params=n,this.objs=a,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=c,this.webGLContext=l,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}var r;return _createClass(t,[{key:"initializeGraphics",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];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 r=this.params,n=r.canvasContext,a=r.viewport,i=r.transform,o=r.imageLayer,s=r.background;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,o),this.gfx.beginDrawing({transform:i,viewport:a,transparency:t,background:s}),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:(r=_asyncToGenerator(_regenerator.default.mark((function t(){return _regenerator.default.wrap((function(t){for(;;)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(){return r.apply(this,arguments)})}]),t}();return t}(),version="2.5.207";exports.version=version;var build="0974d605";exports.build=build},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);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){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,c=document.createElement("canvas");c.width=1,c.height=1;var l=c.getContext("2d"),u=0,h="lt".concat(Date.now()).concat(this.loadTestFontId++),f=this._loadTestFont,d=1482184792,p=n(f=a(f,976,h.length,h),16);for(o=0,s=h.length-3;o30)return(0,i.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,(function(){document.body.removeChild(y),r.complete()}))}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}}]),r}(g);var m=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,i=r.disableFontFace,o=void 0!==i&&i,s=r.ignoreErrors,c=void 0!==s&&s,l=r.onUnsupportedFeature,u=void 0===l?null:l,f=r.fontRegistry,d=void 0===f?null:f;for(var p in h(this,e),this.compiledGlyphs=Object.create(null),t)this[p]=t[p];this.isEvalSupported=!1!==a,this.disableFontFace=!0===o,this.ignoreErrors=!0===c,this._onUnsupportedFeature=u,this.fontRegistry=d}return d(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(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){for(var a,o="",s=0,c=r.length;s=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>2),w=b.length,k=u+7>>3,S=4294967295,_=n.IsLittleEndianCached.value?4278190080:255;for(a=0;ak?u:8*A-7,P=-8&C,T=0,E=0;x>=1}for(;r=f&&(s=u*(o=h)),r=0,i=s;i--;)v[r++]=m[g++],v[r++]=m[g++],v[r++]=m[g++],v[r++]=255;e.putImageData(p,0,a*l)}}}}function r(e,t){for(var r=t.height,n=t.width,a=r%l,i=(r-a)/l,o=0===a?i:i+1,s=e.createImageData(n,l),c=0,u=t.data,h=s.data,f=0;f>=1}e.putImageData(s,0,f*l)}}function o(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n>8,e[i-2]=e[i-2]*o+r*s>>8,e[i-1]=e[i-1]*o+n*s>>8}}}function g(e,t,r){for(var n=e.length,a=3;a>8]>>8:t[a]*i>>16}}function v(e,t,r,n){var a=t.canvas,i=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&n.isEnabled){var s=n.composeSMask({layer:r.canvas,mask:a,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,r,n,a,i,o){var s,c=!!i,l=c?i[0]:0,u=c?i[1]:0,h=c?i[2]:0;s="Luminosity"===a?m:g;for(var f=Math.min(n,Math.ceil(1048576/r)),d=0;d10&&"function"==typeof r,f=h?Date.now()+15:0,d=0,p=this.commonObjs,g=this.objs;;){if(void 0!==a&&c===a.nextBreakPoint)return a.breakIt(c,r),c;if((u=s[c])!==n.OPS.dependency)this[u].apply(this,o[c]);else{var m,v=i(o[c]);try{for(v.s();!(m=v.n()).done;){var y=m.value,b=y.startsWith("g_")?p:g;if(!b.has(y))return b.get(y,r),c}}catch(e){v.e(e)}finally{v.f()}}if(++c===l)return c;if(h&&++d>10){if(Date.now()>f)return r(),c;d=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=y[e]},setLineJoin:function(e){this.ctx.lineJoin=b[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent: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=i?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(n,t,r,!0),i=this.ctx,s=i.mozCurrentTransform;this.ctx.save();var c=a.context;c.scale(1/e.scaleX,1/e.scaleY),c.translate(-e.offsetX,-e.offsetY),c.transform.apply(c,s),e.startTransformInverse=c.mozCurrentTransformInverse,o(i,c),this.ctx=c,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),o(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(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),o(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,a,i){this.ctx.transform(e,t,r,n,a,i),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,a=this.current,i=a.x,o=a.y,s=0,c=0,l=e.length;s100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(o," ").concat(l,"px ").concat(c)}},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,a,i){this.current.textMatrix=[e,t,r,n,a,i],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,a){var i,o=this.ctx,s=this.current,c=s.font,l=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,h=l&n.TextRenderingMode.FILL_STROKE_MASK,f=!!(l&n.TextRenderingMode.ADD_TO_PATH_FLAG),d=s.patternFill&&!c.missingFile;(c.disableFontFace||f||d)&&(i=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||d?(o.save(),o.translate(t,r),o.beginPath(),i(o,u),a&&o.setTransform.apply(o,a),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&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:u,addToPath:i})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var a=t.fontSize;if(0!==a){var i,o=this.ctx,s=t.fontSizeScale,l=t.charSpacing,u=t.wordSpacing,h=t.fontDirection,f=t.textHScale*h,d=e.length,p=r.vertical,g=p?1:-1,m=r.defaultVMetrics,v=a*t.fontMatrix[0],y=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var b=t.fillColor.getPattern(o,this);i=o.mozCurrentTransform,o.restore(),o.fillStyle=b}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),h>0?o.scale(f,-1):o.scale(f,1);var w=t.lineWidth,k=t.textMatrixScale;if(0===k||0===w){var S=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;S!==n.TextRenderingMode.STROKE&&S!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,w=this.getSinglePixelWidth()*c)}else w/=k;1!==s&&(o.scale(s,s),w/=s),o.lineWidth=w;var _,A=0;for(_=0;_0){var B=1e3*o.measureText(M).width/a*s;if(Ds&&(f=u/s,u=s),h>s&&(d=h/s,h=s);var p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);var g=this.cachedCanvases.getCanvas(p,u,h,!0),m=g.context;m.scale(1/f,1/d),m.translate(-c,-l),m.transform.apply(m,r),e.smask?this.smaskStack.push({canvas:g.canvas,context:m,offsetX:c,offsetY:l,scaleX:f,scaleY:d,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(c,l),t.scale(f,d)),o(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),d(this.ctx),this.current=new f,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],a=e[3]-e[1];this.ctx.rect(e[0],e[1],n,a),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,n=e.width,a=e.height,i=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=n<=1e3&&a<=1e3?function(e){var t,r,n,a,i=e.width,o=e.height,s=i+1,c=new Uint8Array(s*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=i+7&-8,h=e.data,f=new Uint8Array(u*o),d=0;for(t=0,a=h.length;t0;)f[d++]=g&p?0:255,p>>=1;var m=0;for(0!==f[d=0]&&(c[0]=1,++m),r=1;r>2)+(f[d+1]?4:0)+(f[d-u+1]?8:0)]&&(c[n+r]=l[v],++m),d++;if(f[d-u]!==f[d]&&(c[n+r]=f[d]?2:4,++m),m>1e3)return null}for(n=t*s,0!==f[d=u*(o-1)]&&(c[n]=8,++m),r=1;r1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),b=[];for(t=0;m&&t<=o;t++){for(var w=t*s,k=w+i;w>4,c[w]&=A>>2|A<<2),_.push(w%s),_.push(w/s|0),c[w]||--m}while(x!==w);b.push(_),--t}}return function(e){e.save(),e.scale(1/i,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=b.length;t2&&g>1||d>2&&m>1;){var y=g,b=m;u>2&&g>1&&(u/=g/(y=Math.ceil(g/2))),d>2&&m>1&&(d/=m/(b=Math.ceil(m/2))),(p=(o=this.cachedCanvases.getCanvas(v,y,b)).context).clearRect(0,0,y,b),p.drawImage(i,0,0,g,m,0,0,y,b),i=o.canvas,g=y,m=b,v="prescale1"===v?"prescale2":"prescale1"}if(a.drawImage(i,0,0,g,m,0,-n,r,n),this.imageLayer){var w=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:w[0],top:w[1],width:r/s[0],height:n/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var n=this.ctx,a=e.width,i=e.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i);t(o.context,e);for(var s=0,c=r.length;sl[n+1]&&(c=r,r=n,n=c,c=i,i=o,o=c),l[n+1]>l[a+1]&&(c=n,n=a,a=c,c=o,o=s,s=c),l[r+1]>l[n+1]&&(c=r,r=n,n=c,c=i,i=o,o=c);var d=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,g=(l[n]+t.offsetX)*t.scaleX,m=(l[n+1]+t.offsetY)*t.scaleY,v=(l[a]+t.offsetX)*t.scaleX,y=(l[a+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var b,w,k,S,_,A,x,C,P=u[i],T=u[i+1],E=u[i+2],R=u[o],O=u[o+1],I=u[o+2],F=u[s],L=u[s+1],M=u[s+2],N=Math.round(p),D=Math.round(y),B=N;B<=D;B++){if(By?1:m===y?0:(m-B)/(m-y)),w=R-(R-F)*U,k=O-(O-L)*U,S=I-(I-M)*U}var q=void 0;_=d-(d-v)*(q=By?1:(p-B)/(p-y)),A=P-(P-F)*q,x=T-(T-L)*q,C=E-(E-M)*q;for(var z=Math.round(Math.min(b,_)),G=Math.round(Math.max(b,_)),W=f*B+4*z,H=z;H<=G;H++)(q=(b-H)/(b-_))<0?q=0:q>1&&(q=1),h[W++]=w-(w-A)*q|0,h[W++]=k-(k-x)*q|0,h[W++]=S-(S-C)*q|0,h[W++]=255}}function t(t,r,n){var a,i,o=r.coords,s=r.colors;switch(r.type){case"lattice":var c=r.verticesPerRow,l=Math.floor(o.length/c)-1,u=c-1;for(a=0;a=n?a=n:r=a/e,{scale:r,size:a}},clipBbox:function(e,t,r,n,a,i){if(Array.isArray(t)&&4===t.length){var o=a-r,s=i-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(r,a,i){var o=r.ctx,s=r.current;switch(a){case e:var c=this.ctx;o.fillStyle=c.fillStyle,o.strokeStyle=c.strokeStyle,s.fillColor=c.fillStyle,s.strokeColor=c.strokeStyle;break;case t:var l=n.Util.makeCssRgb(i[0],i[1],i[2]);o.fillStyle=l,o.strokeStyle=l,s.fillColor=l,s.strokeColor=l;break;default:throw new n.FormatError("Unsupported paint type: ".concat(a))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=s},function(e,t,r){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){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(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 c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:p,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d,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:g,streamId:n,reason:b(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[n]=c,new Promise((function(t){t(r(e.data,c))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case y:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(b(e.reason));break;case v:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(b(e.reason));break;case m:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:v,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:v,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)})}));break;case p: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: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 g:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(b(e.reason)),this._deleteStreamController(t);break;case f:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(b(e.reason)),this._deleteStreamController(t);break;case h:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:b(e)})})),this.streamSinks[t].sinkCapability.reject(b(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(c=a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)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)})),w=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=c.apply(e,t);function i(e){o(a,r,n,i,s,"next",e)}function s(e){o(a,r,n,i,s,"throw",e)}i(void 0)}))},function(e){return w.apply(this,arguments)})},{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)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.MessageHandler=w},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(5),a=r(206);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||o(e,t)||function(){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 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);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="",a=0,i=r.length;a=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())for(t=t.firstChild;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,a=0,i=n.length;a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}(this._metadataMap);try{for(r.s();!(e=r.n()).done;){var n=i(e.value,2),a=n[0],s=n[1];t[a]=s}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"has",value:function(e){return this._metadataMap.has(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.Metadata=l},function(e,t,r){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)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(e,t)||function(){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 i(e,t){(null==t||t>e.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 a(){for(;n"!==e[n]&&"/"!==e[n];)++n;var i=e.substring(t,n);for(a();n"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();for(var o,s="";n"!==e[r]&&"/"!==e[r];)++r;var n=e.substring(t,r);!function(){for(;r"!==e[r+1]);)++r;return{name:n,value:e.substring(a,r),parsed:r-t}}},{key:"parseXml",value:function(e){for(var t=0;t",r))<0)return void this.onError(b);this.onEndElement(e.substring(r,n)),r=n+1;break;case"?":++r;var a=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+a.parsed,r+a.parsed+2))return void this.onError(g);this.onPi(a.name,a.value),r+=a.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((n=e.indexOf("--\x3e",r+3))<0)return void this.onError(v);this.onComment(e.substring(r+3,n)),r=n+3}else if("[CDATA["===e.substring(r+1,r+8)){if((n=e.indexOf("]]>",r+8))<0)return void this.onError(p);this.onCdata(e.substring(r+8,n)),r=n+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(y);var i=e.indexOf("[",r+8),o=!1;if((n=e.indexOf(">",r+8))<0)return void this.onError(m);if(i>0&&n>i){if((n=e.indexOf("]>",r+8))<0)return void this.onError(m);o=!0}var s=e.substring(r+8,n+(o?1:0));this.onDoctype(s),r=n+(o?2:1)}break;default:var c=this._parseContent(e,r);if(null===c)return void this.onError(y);var l=!1;if("/>"===e.substring(r+c.parsed,r+c.parsed+2))l=!0;else if(">"!==e.substring(r+c.parsed,r+c.parsed+1))return void this.onError(b);this.onBeginElement(c.name,c.attributes,l),r+=c.parsed+(l?2:1)}}else{for(;r0}},{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}(),_=function(e){!function(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&&s(e,t)}(r,e);var t=c(r);function r(){var e;return u(this,r),(e=t.call(this))._currentFragment=null,e._stack=null,e._errorCode=d,e}return f(r,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=d,this.parseXml(e),this._errorCode===d){var t=a(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){return"apos"===e?"'":o(l(r.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}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 f(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 p(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),this._rangeReaders.slice(0).forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=d;var p=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var a,i=c(this._queuedChunks);try{for(i.s();!(a=i.n()).done;){var o=a.value;this._loaded+=o.byteLength}}catch(e){i.e(e)}finally{i.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}var t;return f(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"read",value:(t=s(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){u(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}var t;return f(e,[{key:"_enqueue",value:function(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}},{key:"read",value:(t=s(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(5);function a(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}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],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];p(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,r&&(this.container=this._createContainer(n))}return m(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,i=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];i.setAttribute("data-annotation-id",t.id);var c=a.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(i.style.transform="matrix(".concat(n.transform.join(","),")"),i.style.transformOrigin="-".concat(c[0],"px -").concat(c[1],"px"),!e&&t.borderStyle.width>0){i.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,u=t.borderStyle.verticalCornerRadius;if(l>0||u>0){var h="".concat(l,"px / ").concat(u,"px");i.style.borderRadius=h}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}t.color?i.style.borderColor=a.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):i.style.borderWidth=0}return i.style.left="".concat(c[0],"px"),i.style.top="".concat(c[1],"px"),i.style.width="".concat(o,"px"),i.style.height="".concat(s,"px"),i}},{key:"_createPopup",value:function(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new T({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}).render();n.style.left=e.style.width,e.appendChild(n)}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),b=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.url||e.data.dest||e.data.action);return t.call(this,e,n)}return m(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}(y),w=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n)}return m(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}(y),k=function(e){l(r,e);var t=h(r);function r(){return p(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){return this.container}}]),r}(y),S=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,n)}return m(r,[{key:"render",value:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea")).textContent=this.data.fieldValue:((e=document.createElement("input")).type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,e.name=this.data.fieldName,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var t=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc(".concat(t,"px - 1ch)")}}else{(e=document.createElement("div")).textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var r=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(r=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(e,r)}return null!==this.data.textAlignment&&(e.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(e),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 a=t.loadedName?'"'.concat(t.loadedName,'", '):"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=a+i}}}]),r}(k),_=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",e.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),r}(k),A=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),r}(k),x=function(e){l(r,e);var t=h(r);function r(){return p(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){var e=s(d(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),r}(b),C=function(e){l(r,e);var t=h(r);function r(e){return p(this,r),t.call(this,e,e.renderInteractiveForms)}return m(r,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,e.name=this.data.fieldName,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));var t,r=i(this.data.options);try{for(r.s();!(t=r.n()).done;){var n=t.value,a=document.createElement("option");a.textContent=n.displayValue,a.value=n.exportValue,this.data.fieldValue.includes(n.displayValue)&&a.setAttribute("selected",!0),e.appendChild(a)}}catch(e){r.e(e)}finally{r.f()}return this.container.appendChild(e),this.container}}]),r}(k),P=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!(!e.data.title&&!e.data.contents);return t.call(this,e,n)}return m(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelector(e);if(!t)return this.container;var r=new T({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=parseFloat(t.style.left),a=parseFloat(t.style.width);return this.container.style.transformOrigin="-".concat(n+a,"px -").concat(t.style.top),this.container.style.left="".concat(n+a,"px"),this.container.appendChild(r.render()),this.container}}]),r}(y),T=function(){function e(t){p(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 m(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var i=.7*(255-r[0])+r[0],o=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];t.style.backgroundColor=a.Util.makeCssRgb(0|i,0|o,0|s)}var c=document.createElement("h1");c.textContent=this.title,t.appendChild(c);var l=n.PDFDateString.toDateObject(this.modificationDate);if(l){var u=document.createElement("span");u.textContent="{{date}}, {{time}}",u.dataset.l10nId="annotation_date_string",u.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),t.appendChild(u)}var h=this._formatContents(this.contents);return t.appendChild(h),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,a=r.length;n0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),E=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),R=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),r}(y),O=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",a/2),i.setAttribute("y",a/2),i.setAttribute("width",t-a),i.setAttribute("height",r-a),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(y),I=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(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),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",r/2),i.setAttribute("rx",t/2-a/2),i.setAttribute("ry",r/2-a/2),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),r}(y),F=function(e){l(r,e);var t=h(r);function r(e){var n;p(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,a,!0)).containerClassName="polylineAnnotation",n.svgElementName="svg:polyline",n}return m(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],a=this.svgFactory.create(r,n),o=[],s=i(t.vertices);try{for(s.s();!(e=s.n()).done;){var c=e.value,l=c.x-t.rect[0],u=t.rect[3]-c.y;o.push(l+","+u)}}catch(e){s.e(e)}finally{s.f()}o=o.join(" ");var h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",o),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),a.appendChild(h),this.container.append(a),this._createPopup(this.container,h,t),this.container}}]),r}(y),L=function(e){l(r,e);var t=h(r);function r(e){var n;return p(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return r}(F),M=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),N=function(e){l(r,e);var t=h(r);function r(e){var n;p(this,r);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(n=t.call(this,e,a,!0)).containerClassName="inkAnnotation",n.svgElementName="svg:polyline",n}return m(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],a=this.svgFactory.create(r,n),o=i(t.inkLists);try{for(o.s();!(e=o.n()).done;){var s,c=e.value,l=[],u=i(c);try{for(u.s();!(s=u.n()).done;){var h=s.value,f=h.x-t.rect[0],d=t.rect[3]-h.y;l.push("".concat(f,",").concat(d))}}catch(e){u.e(e)}finally{u.f()}l=l.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",l),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,t),a.appendChild(p)}}catch(e){o.e(e)}finally{o.f()}return this.container.append(a),this.container}}]),r}(y),D=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),B=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),j=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),U=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),q=function(e){l(r,e);var t=h(r);function r(e){p(this,r);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,n,!0)}return m(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),r}(y),z=function(e){l(r,e);var t=h(r);function r(e){var i;p(this,r);var o=(i=t.call(this,e,!0)).data.file,s=o.filename,c=o.content;return i.filename=(0,n.getFilenameFromUrl)(s),i.content=c,i.linkService.eventBus&&i.linkService.eventBus.dispatch("fileattachmentannotation",{source:f(i),id:(0,a.stringToPDFString)(s),filename:s,content:c}),i}return m(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,a.warn)("Download cannot be started due to unavailable download manager")}}]),r}(y),G=function(){function e(){p(this,e)}return m(e,null,[{key:"render",value:function(e){var t,r=[],o=[],s=i(e.annotations);try{for(s.s();!(t=s.n()).done;){var c=t.value;c&&(c.annotationType!==a.AnnotationType.POPUP?r.push(c):o.push(c))}}catch(e){s.e(e)}finally{s.f()}o.length&&r.push.apply(r,o);for(var l=0,u=r;l1)g=!0;else if(r.transform[0]!==r.transform[3]){var m=Math.abs(r.transform[0]),v=Math.abs(r.transform[3]);m!==v&&Math.max(m,v)/Math.min(m,v)>1.5&&(g=!0)}if(g&&(u.vertical?s.canvasWidth=r.height*t._viewport.scale:s.canvasWidth=r.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var y=1,b=0;0!==l&&(y=Math.cos(l),b=Math.sin(l));var w,k,S=(u.vertical?r.height:r.width)*t._viewport.scale,_=d;0!==l?(w=[y,b,-b,y,h,f],k=n.Util.getAxialAlignedBoundingBox([0,0,S,_],w)):k=[h,f,h+S,f+_],t._bounds.push({left:k[0],top:k[1],right:k[2],bottom:k[3],div:o,size:[S,_],m:w})}}function r(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a0&&(n=n?Math.min(i,n):i)}return n}function i(e){for(var t=e._bounds,r=e._viewport,i=function(e,t,r){var n=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));o(e,n);var a=new Array(r.length);return n.forEach((function(e){var t=e.index;a[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),r.map((function(t,r){var i=a[r],o=n[r];o.x1=t.top,o.y1=e-i.right,o.x2=t.bottom,o.y2=e-i.left,o.index=r,o.x1New=void 0,o.x2New=void 0})),o(t,n),n.forEach((function(e){var t=e.index;a[t].top=e.x1New,a[t].bottom=e.x2New})),a}(r.width,r.height,t),s=0;s=0&&r[i].start>=e.y2;)i--;var o,s,c=-1/0;for(o=t;o<=i;o++){var l;(l=(a=(n=r[o]).boundary).x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New)>c&&(c=l)}for(e.x1New=c,o=t;o<=i;o++)void 0===(a=(n=r[o]).boundary).x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));var u=[],h=null;for(o=t;o<=i;o++){var f=(a=(n=r[o]).boundary).x2>e.x2?a:e;h===f?u[u.length-1].end=n.end:(u.push({start:n.start,end:n.end,boundary:f}),h=f)}for(r[t].start=0&&r[s].start>=a.y1;s--)d=r[s].boundary===a;for(s=i+1;!d&&s0&&(t.scale=t.canvasWidth/o,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,a=(0,n.createPromiseCapability)(),i=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,c=this._textContent.styles;this._processItems(s,c),a.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then((function(r){var n=r.value;r.done?a.resolve():(Object.assign(i,n.styles),t._processItems(n.items,i),e())}),a.reject)}()}a.promise.then((function(){i=null,e?t._renderTimer=setTimeout((function(){r(t),t._renderTimer=null}),e):r(t)}),this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(i(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n0?(r.push("".concat(s.paddingTop,"px")),t.push("translateY(".concat(-s.paddingTop,"px)"))):r.push(0),s.paddingRight>0?r.push("".concat(s.paddingRight/s.scale,"px")):r.push(0),s.paddingBottom>0?r.push("".concat(s.paddingBottom,"px")):r.push(0),s.paddingLeft>0?(r.push("".concat(s.paddingLeft/s.scale,"px")),t.push("translateX(".concat(-s.paddingLeft/s.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=s.originalTransform))}}}},function(e){var t=new s({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(5),a=r(1),i=r(7);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||l(e,t)||function(){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 c(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function l(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);r>1&2147483647:a>>1&2147483647;t[r]=a}function s(e,r,n,a){var i=a,o=r.length;n[i]=o>>24&255,n[i+1]=o>>16&255,n[i+2]=o>>8&255,n[i+3]=255&o,n[i+=4]=255&e.charCodeAt(0),n[i+1]=255&e.charCodeAt(1),n[i+2]=255&e.charCodeAt(2),n[i+3]=255&e.charCodeAt(3),i+=4,n.set(r,i);var s=function(e,r,n){for(var a=-1,i=r;i>>8^t[o]}return-1^a}(n,a+4,i+=r.length);n[i]=s>>24&255,n[i+1]=s>>16&255,n[i+2]=s>>8&255,n[i+3]=255&s}function c(e){var t=e.length,r=65535,n=Math.ceil(t/r),a=new Uint8Array(2+t+5*n+4),i=0;a[i++]=120,a[i++]=156;for(var o=0;t>r;)a[i++]=0,a[i++]=255,a[i++]=255,a[i++]=0,a[i++]=0,a.set(e.subarray(o,o+r),i),i+=r,o+=r,t-=r;a[i++]=1,a[i++]=255&t,a[i++]=t>>8&255,a[i++]=255&~t,a[i++]=(65535&~t)>>8&255,a.set(e.subarray(o),i),i+=e.length-o;var s=function(e,t,r){for(var n=1,a=0,i=t;i>24&255,a[i++]=s>>16&255,a[i++]=s>>8&255,a[i++]=255&s,a}function l(t,r,a,o){var l,u,h,f=t.width,d=t.height,p=t.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:u=0,l=1,h=f+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,l=8,h=3*f;break;case n.ImageKind.RGBA_32BPP:u=6,l=8,h=4*f;break;default:throw new Error("invalid format")}for(var g=new Uint8Array((1+h)*d),m=0,v=0,y=0;y>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,l,u,0,0,0]),S=function(e){if(!i.isNodeJS)return c(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=require$$4.deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return c(e)}(g),_=e.length+36+k.length+S.length,A=new Uint8Array(_),x=0;return A.set(e,x),s("IHDR",k,A,x+=e.length),s("IDATA",S,A,x+=12+k.length),x+=12+S.length,s("IEND",new Uint8Array(0),A,x),(0,n.createObjectURL)(A,"image/png",a)}return function(e,t,r){return l(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),k=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=v.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=v.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 d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),S=0,_=0,A=0;t.SVGGraphics=p=function(){function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new k,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=!!i,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[o]]=o}return d(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,a=e.argsArray,i=0,o=r.length;i0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=y[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[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,a=n.Util.inverseTransform(this.transformMatrix),i=n.Util.applyTransform([0,0],a),o=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),c=n.Util.applyTransform([t,r],a),l=Math.min(i[0],o[0],s[0],c[0]),u=Math.min(i[1],o[1],s[1],c[1]),h=Math.max(i[0],o[0],s[0],c[0]),f=Math.max(i[1],o[1],s[1],c[1]),d=this.svgFactory.createElement("svg:rect");d.setAttributeNS(null,"x",l),d.setAttributeNS(null,"y",u),d.setAttributeNS(null,"width",h-l),d.setAttributeNS(null,"height",f-u),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],a=e[3]||n.IDENTITY_MATRIX,i=s(e[4],4),c=i[0],l=i[1],u=i[2],h=i[3],f=e[5],d=e[6],p=e[7],g="shading".concat(A++),m=s(n.Util.applyTransform([c,l],a),2),v=m[0],y=m[1],b=s(n.Util.applyTransform([u,h],a),2),w=b[0],k=b[1],S=s(n.Util.singularValueDecompose2dScale(a),2),_=f*S[0],x=d*S[1],C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",g),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",_),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x","".concat(v)),C.setAttributeNS(null,"y","".concat(y));var P=this.svg,T=this.transformMatrix,E=this.current.fillColor,R=this.current.strokeColor,O=this.svgFactory.create(w-v,k-y);if(this.svg=O,this.transformMatrix=a,2===p){var I=n.Util.makeCssRgb.apply(n.Util,o(t));this.current.fillColor=I,this.current.strokeColor=I}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=T,this.current.fillColor=E,this.current.strokeColor=R,C.appendChild(O.childNodes[0]),this.defs.appendChild(C),"url(#".concat(g,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(A++),a=e[3];switch(e[1]){case"axial":var i=e[4],o=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",i[0]),t.setAttributeNS(null,"y1",i[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],l=e[5],u=e[6],h=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",h),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",u);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var f,d=c(a);try{for(d.s();!(f=d.n()).done;){var p=f.value,g=this.svgFactory.createElement("svg:stop");g.setAttributeNS(null,"offset",p[0]),g.setAttributeNS(null,"stop-color",p[1]),t.appendChild(g)}}catch(e){d.e(e)}finally{d.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,a=this.current,i=a.x,o=a.y,s=[],l=0,u=c(e);try{for(u.s();!(r=u.n()).done;)switch(0|r.value){case n.OPS.rectangle:i=t[l++],o=t[l++];var h=t[l++],f=t[l++],d=i+h,p=o+f;s.push("M",g(i),g(o),"L",g(d),g(o),"L",g(d),g(p),"L",g(i),g(p),"Z");break;case n.OPS.moveTo:i=t[l++],o=t[l++],s.push("M",g(i),g(o));break;case n.OPS.lineTo:i=t[l++],o=t[l++],s.push("L",g(i),g(o));break;case n.OPS.curveTo:i=t[l+4],o=t[l+5],s.push("C",g(t[l]),g(t[l+1]),g(t[l+2]),g(t[l+3]),g(i),g(o)),l+=6;break;case n.OPS.curveTo2:s.push("C",g(i),g(o),g(t[l]),g(t[l+1]),g(t[l+2]),g(t[l+3])),i=t[l+2],o=t[l+3],l+=4;break;case n.OPS.curveTo3:i=t[l+2],o=t[l+3],s.push("C",g(t[l]),g(t[l+1]),g(i),g(o),g(i),g(o)),l+=4;break;case n.OPS.closePath:s.push("Z")}}catch(e){u.e(e)}finally{u.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(i,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(S++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",m(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=c(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),i=a[0],o=a[1];switch(i){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(i))}}}catch(e){r.e(e)}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",g(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",g(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(g).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",g(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=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,a=w(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",g(r)),i.setAttributeNS(null,"height",g(n)),this.current.element=i,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",g(-n)),o.setAttributeNS(null,"width",g(r)+"px"),o.setAttributeNS(null,"height",g(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(g(1/r)," ").concat(g(-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,a=t.fillColor;t.maskId="mask".concat(_++);var i=this.svgFactory.createElement("svg:mask");i.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",g(r)),o.setAttributeNS(null,"height",g(n)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(i),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,i)}},{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],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",g(r)),a.setAttributeNS(null,"height",g(n)),this.current.element=a,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",m(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",m(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(213);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 c(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&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){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}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function f(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){f(i,n,a,o,s,"next",e)}function s(e){f(i,n,a,o,s,"throw",e)}o(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*a||i||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(o.allowRangeRequests=!0),o):o},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(5),a=r(214)},function(e,t,r){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}(e,t)||function(){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){(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 a=n.status||200;if(200===a&&206===r.expectedStatus||a===r.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,i.stringToBytes)(t).buffer}(n);if(206===a){var s=n.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(c[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:"hasPendingRequests",value:function(){for(var e in this.pendingRequests)return!0;return!1}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortAllRequests",value:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),d=function(){function e(t){l(this,e),this._source=t,this._manager=new f(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 p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new g(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),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}}]),e}();t.PDFNetworkStream=d;var p=function(){function e(t,r){l(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}var t;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,o.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,i=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,o.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:(t=c(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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}(),g=function(){function e(t,r,n){l(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}var t;return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:(t=c(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)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(){return t.apply(this,arguments)})},{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){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(213);function s(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){s(i,n,a,o,c,"next",e)}function c(e){s(i,n,a,o,c,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&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),P(r),p}},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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(regeneratorRuntime$1);var runtime=regeneratorRuntime$1.exports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var pdfjsLib$2=pdf.exports,RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},PAGE_FRAGMENT=10,RESTART_NUM=3,PDFRenderingQueue$2=function(){function e(t){_classCallCheck(this,e),this.PDFViewer=null,this.cacheList=[],this.restartViewId=null,this.restartNum=0,this.highestPriorityPage=null,this.isPainting=!1,this.limit="number"==typeof t.limit&&t.limit>0?t.limit:PAGE_FRAGMENT}return _createClass(e,[{key:"restartViewId",set:function(e){this.restartViewId!==e&&(this.restartNum=0)}},{key:"setViewer",value:function(e){this.PDFViewer=e}},{key:"setCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(t.length){var n=this.cacheList.length,a=[],i=Array.from({length:t[1]-t[0]+1},(function(e,r){return r+t[0]}));t[0]-this.cacheList[n-1]>3||this.cacheList[0]-t[1]>3?(a=_toConsumableArray(this.cacheList),this.cacheList=i):this.cacheList=this.cacheList.concat(i.filter((function(t){return!e.cacheList.includes(t)}))||[]).sort((function(e,t){return e-t}));var o=this.cacheList.length-this.limit;if(o>0){var s=this.cacheList.slice(0,o),c=this.cacheList.slice(-o);a=r&&s.every((function(e){return i.includes(e)}))?c:!r&&c.every((function(e){return i.includes(e)}))?s:r?this.cacheList.slice(0,o):this.cacheList.slice(-o)}var l=a.length;if(l){for(var u=0;u=0;){var r=this.cacheList[t],n=this.PDFViewer.getPageView(r);if(!this.isViewFinished(n))return n;t++}return null}},{key:"isViewFinished",value:function(e){return e.renderingState===RenderingStates.FINISHED}},{key:"render",value:function(e){var t=this;switch(e.renderingState){case RenderingStates.FINISHED:break;case RenderingStates.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case RenderingStates.RUNNING:this.highestPriorityPage=e.renderingId;break;case RenderingStates.INITIAL:this.highestPriorityPage=e.renderingId,this.isPainting=!0,e.draw().finally((function(){t.renderHighestPriority()})).catch((function(r){e.finishPaintTask(r),r instanceof pdfjsLib$2.RenderingCancelledException?t.renderHighestPriority():(t.cacheList.includes(e.renderingId)&&t.restartNum<=RESTART_NUM&&(t.restartViewId=e.renderingId,e.reset(),t.renderHighestPriority()),console.log('renderView: "'.concat(r,'"')))}))}}},{key:"clearUp",value:function(){for(;this.cacheList.length;){var e=this.cacheList.shift();this.PDFViewer.getPageView(e).reset()}this.resetQueueConfig()}},{key:"resetQueueConfig",value:function(){this.restartViewId=null,this.restartNum=0,this.highestPriorityPage=null,this.isPainting=!1}}]),e}(),PageViewer$2=function(){function e(t){_classCallCheck(this,e),this.pdfViewer=t.pdfViewer,this.div=t.div,this.renderingQueue=t.renderingQueue,this.renderingId=t.id,this.pdfScale=t.pdfScale,this.height=t.height,this.width=t.width,this._renderingState=RenderingStates.INITIAL,this.page=null,this.viewport=t.defaultViewport||null,this.renderTask=null,this.isLoading=!1,this.renderError=null,this.canvas=null,this.canvasIdPrefix=t.canvasIdPrefix,this.ratio=window.devicePixelRatio>2?2:window.devicePixelRatio||1,this.loadingDiv=document.createElement("div"),this.loadingDiv.classList.add("__pdf_page_loader","page".concat(this.renderingId,"_loader"))}return _createClass(e,[{key:"offsetTop",get:function(){return this.div.offsetTop}},{key:"renderingState",get:function(){return this._renderingState},set:function(e){if(e!==this._renderingState)switch(this._renderingState=e,e){case RenderingStates.PAUSED:case RenderingStates.RUNNING:this.isLoading||(this.div.appendChild(this.loadingDiv),this.isLoading=!0);break;case RenderingStates.INITIAL:case RenderingStates.FINISHED:this.isLoading&&(this.div.removeChild(this.loadingDiv),this.isLoading=!1)}}},{key:"setPdfPage",value:function(e){this.page=e,this.viewport=e.getViewport({scale:this.pdfScale})}},{key:"reset",value:function(){this.renderingState!==RenderingStates.FINISHED&&this.cancelRendering(),this.renderingState=RenderingStates.INITIAL,this.releaseCanvas(),this.renderTask=null,this.isLoading=!1,this.renderError=null}},{key:"cancelRendering",value:function(){this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.resume=null}},{key:"releaseCanvas",value:function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0,delete this.canvas);for(var e=this.div.childNodes,t=e.length-1;t>=0;t--){e[t].remove()}this.page&&this.page.cleanup()}},{key:"draw",value:function(){var e=this;return this.renderingState!==RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset()),new Promise((function(t,r){var n=e.page;if(!n)return e.renderingState=RenderingStates.FINISHED,r(new Error("page is not loaded"));e.renderingState=RenderingStates.RUNNING;var a=null;e.renderingQueue&&(a=function(t){if(!e.renderingQueue.isHighestPriority(e))return e.renderingState=RenderingStates.PAUSED,void(e.resume=function(){e.renderingState=RenderingStates.RUNNING,t()});t()});var i=e.paintCanvas(),o=e.renderTask=n.render(i);o.onContinue=a.bind(e),o.promise.then((function(){e.div.appendChild(e.canvas),e.finishPaintTask(null),t()}),(function(e){r(e)}))}))}},{key:"finishPaintTask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.renderTask&&(this.renderTask=null),this.renderingState=RenderingStates.FINISHED,e&&(this.renderError=e)}},{key:"paintCanvas",value:function(){this.canvas=document.createElement("canvas"),this.canvas.classList.add("__pdf_canvas","pdfCanvas_".concat(this.renderingId)),this.canvasIdPrefix&&(this.canvas.id="".concat(this.canvasIdPrefix.toString()).concat(this.renderingId));var e=this.viewport.width*this.ratio,t=this.viewport.height*this.ratio;this.canvas.width=e,this.canvas.height=t,this.canvas.style.width="100%",this.canvas.style.height="100%";var r=this.canvas.getContext("2d",{alpha:!1});return{viewport:this.viewport,canvasContext:r,transform:this.ratio>1?[this.ratio,0,0,this.ratio,0,0]:null}}}]),e}(),PDFViewer$2=function(){function e(t){_classCallCheck(this,e),this.pdfTitle=null,this.pdfDocument=null,this.viewer=t.viewer,this.pdfScale=t.pdfScale,this.scale=t.scale,this.pages=[],this.renderingQueue=t.renderingQueue,this.currentNum=1,this.iniState=!0}var t,r;return _createClass(e,[{key:"numPages",get:function(){return this.pdfDocument?Number(this.pdfDocument.numPages):0}},{key:"pagesCount",get:function(){return this.pages.length}},{key:"setScale",value:function(e){this.scale=e}},{key:"setDocument",value:function(e){this.iniState=!0,e&&(this.pdfDocument!==e&&this.resetPdfViewer(),this.pdfDocument=e,this.renderingQueue.setViewer(this),this.viewer.scrollTop=0,this.iniState=!1,this.setTitle())}},{key:"setTitle",value:(r=_asyncToGenerator(regenerator.mark((function e(){var t,r;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfDocument.getMetadata();case 2:t=e.sent,r=t.info,this.pdfTitle=r.title||"";case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getPage",value:function(e){return this.pdfDocument.getPage(e)}},{key:"resetPdfViewer",value:function(){this.renderingQueue.clearUp(),this.pdfDocument=null,this.pages=[],this.title=null}},{key:"pushPage",value:function(e){this.pages.push(e)}},{key:"getPageView",value:function(e){return this.pages[e-1]}},{key:"loadPage",value:(t=_asyncToGenerator(regenerator.mark((function e(t){var r;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.page){e.next=2;break}return e.abrupt("return",t.page);case 2:return e.prev=2,e.next=5,this.getPage(t.renderingId);case 5:return r=e.sent,t.setPdfPage(r),e.abrupt("return",r);case 10:return e.prev=10,e.t0=e.catch(2),console.log("Unable to get page for view",e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e){return t.apply(this,arguments)})},{key:"renderPageInterval",value:function(e,t){this.currentNum=e;var r=[e-1,e+1];this.numPages<3?r=[1,this.numPages]:(r[0]<1&&(r=[1,3]),r[1]>this.numPages&&(r=[this.numPages-2,this.numPages])),this.renderingQueue.setCache(r,t),this.renderingQueue.renderHighestPriority(!0)}}]),e}();function debounce$2(e,t,r){var n=arguments,a=this,i=null;return function(o){var s=a,c=n;function l(){i=setTimeout((function(){e.apply(s,c),i=null}),t)}r?(clearTimeout(i),l()):i||l()}}function isArrayBuffer$2(e){return"object"===_typeof$1(e)&&null!==e&&void 0!==e.byteLength}function classMap$2(e){var t=[];for(var r in e)e[r]&&t.push(r);return t.join(" ")}function styleMap$2(e){var t=[];for(var r in e)e[r]&&t.push("".concat(r,":").concat(e[r]));return t.join(";")}function addClass$1(e,t){e&&!e.contains(t)&&e.add(t)}function removeClass$1(e,t){e&&e.contains(t)&&e.remove(t)}var pdfStyles$1="\n .__pdf_component {\n background-color: #eee;\n position: relative;\n display: flex;\n flex-direction: column;\n }\n .__pdf_loading_bar {\n --process-percent: 0;\n height: 4px;\n background: rgba(10, 132, 255, 1);\n width: var(--process-percent);\n border-radius: 0 20px 20px 0;\n position: absolute;\n top: 0;\n z-index: 9;\n }\n .__pdf_backTop{\n z-index: 9;\n color: #aaa;\n background: #fff;\n height: 36px;\n width: 36px;\n position: absolute;\n bottom: 20px;\n right: 20px;\n border-radius: 50%;\n border: 1px solid #eee;\n font-size: 20px;\n font-weight: 600;\n text-align: center;\n line-height: 36px;\n }\n .__pdf_component_out_box,\n .__pdf_component .__pdf_error {\n display: flex;\n overflow: hidden;\n flex-grow: 1;\n width: 100%;\n position: relative;\n }\n .__pdf_component .__pdf_error {\n justify-content: center;\n align-items: center;\n }\n .__pdf_component_box {\n overflow: auto;\n position: relative;\n width: 100%;\n margin: 8px 0;\n }\n .__pdf_container {\n width: 100%;\n box-sizing: border-box;\n min-height: 100%;\n font-size: 0;\n }\n .__pdf_pageNum_box {\n position: absolute;\n z-index: 9;\n top: 20px;\n left: 24px;\n background: #fff;\n border-radius: 4px;\n font-family: PingFangSC-Regular;\n font-size: 14px;\n color: #ccc;\n font-weight: 600;\n display: inline-block;\n padding: 4px 8px;\n }\n .__pdf_forceRead_desc {\n background-color: #fff5e7;\n color: #8c6d4d;\n text-align: center;\n height: 36px;\n line-height: 36px;\n font-size: 14px;\n font-weight: 600;\n font-family: PingFangSC-Regular;\n }\n .__pdf_forceRead_btn {\n height: 45px;\n color: #fff;\n font-size: 16px;\n text-align: center;\n line-height: 45px;\n font-weight: 600;\n background: #ffffff;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n }\n .__pdf_page {\n margin: 8px 8px 0;\n box-sizing: border-box;\n position: relative;\n background-color: #fff;\n box-shadow: 0px 0px 3px #ccc;\n }\n .__pdf_page:first-child {\n margin-top: 0;\n }\n .__pdf_canvas {\n background-color: #fff;\n }\n .__pdf_loader,\n .__pdf_page_loader {\n border: 5px solid #f3f3f3;\n border-top: 5px solid #555;\n border-radius: 50%;\n width: 50px;\n height: 50px;\n display: inline-block;\n animation: __pdf_spin 2s linear infinite;\n position: absolute;\n left: calc(50% - 25px);\n top: 40%;\n z-index: 10;\n }\n \n @keyframes __pdf_spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n @keyframes __pdf_hide {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n .__pdf_component .__pdf_hide-num {\n opacity: 0;\n animation: __pdf_hide 1s 1;\n }\n .__pdf_component .__pdf_display-none {\n display: none;\n }\n ",utils=Object.freeze({__proto__:null,RenderingStates:RenderingStates,PAGE_FRAGMENT:PAGE_FRAGMENT,PDFRenderingQueue:PDFRenderingQueue$2,PageViewer:PageViewer$2,PDFViewer:PDFViewer$2,debounce:debounce$2,isArrayBuffer:isArrayBuffer$2,classMap:classMap$2,styleMap:styleMap$2,addClass:addClass$1,removeClass:removeClass$1,pdfStyles:pdfStyles$1}),require$$0=getAugmentedNamespace(utils),pdf_worker={exports:{}},_templateObject,_templateObject2;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},_get.apply(this,arguments)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}} /** * @licstart The following is the entire license notice for the * Javascript code in this page @@ -258,4 +258,4 @@ const previousStylePropertyCache=new WeakMap,styleMap$3=directive((e=>t=>{if(!(t * @licend The above is the entire license notice for the * Javascript code in this page */ -!function(e,t){var r;r=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"WorkerMessageHandler",{enumerable:!0,get:function(){return n.WorkerMessageHandler}});var n=r(1)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageHandler=t.WorkerTask=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(198),s=r(199),c=r(7),l=r(238),u=r(239),h=r(201);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}(e,t)||function(){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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=i.VerbosityLevel.INFOS?Date.now():0;r.getOperatorList({handler:A,sink:t,task:a,intent:e.intent,renderInteractiveForms:e.renderInteractiveForms}).then((function(e){P(a),o&&(0,i.info)("page=".concat(n+1," - getOperatorList: time=")+"".concat(Date.now()-o,"ms, len=").concat(e.length)),t.close()}),(function(e){P(a),a.terminated||(A.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorOperatorList}),t.error(e))}))}))}),this),A.on("GetTextContent",(function(e,t){var n=e.pageIndex;t.onPull=function(e){},t.onCancel=function(e){},r.getPage(n).then((function(r){var a=new g("GetTextContent: page "+n);C(a);var o=m>=i.VerbosityLevel.INFOS?Date.now():0;r.extractTextContent({handler:A,task:a,sink:t,normalizeWhitespace:e.normalizeWhitespace,combineTextItems:e.combineTextItems}).then((function(){P(a),o&&(0,i.info)("page=".concat(n+1," - getTextContent: time=")+"".concat(Date.now()-o,"ms")),t.close()}),(function(e){P(a),a.terminated||t.error(e)}))}))})),A.on("FontFallback",(function(e){return r.fontFallback(e.id,A)})),A.on("Cleanup",(function(e){return r.cleanup(!0)})),A.on("Terminate",(function(e){n=!0;var t=[];if(r){r.terminate(new i.AbortException("Worker was terminated."));var a=r.cleanup();t.push(a),r=null}else(0,o.clearPrimitiveCaches)();return c&&c(new i.AbortException("Worker was terminated.")),d.forEach((function(e){t.push(e.finished),e.terminate()})),Promise.all(t).then((function(){A.destroy(),A=null}))})),A.on("Ready",(function(t){!function(e){function t(e){x(),A.send("GetDoc",{pdfInfo:e})}function a(e){if(x(),e instanceof i.PasswordException){var t=new g("PasswordException: response ".concat(e.code));C(t),A.sendWithPromise("PasswordRequest",e).then((function(e){var n=e.password;P(t),r.updatePassword(n),o()})).catch((function(){P(t),A.send("DocException",e)}))}else e instanceof i.InvalidPDFException||e instanceof i.MissingPDFException||e instanceof i.UnexpectedResponseException||e instanceof i.UnknownErrorException?A.send("DocException",e):A.send("DocException",new i.UnknownErrorException(e.message,e.toString()))}function o(){x(),T(!1).then(t,(function(e){x(),e instanceof h.XRefParseException?(r.requestLoadedStream(),r.onLoadedStream().then((function(){x(),T(!0).then(t,a)}))):a(e)}),a)}x(),R(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties}).then((function(e){if(n)throw e.terminate(new i.AbortException("Worker was terminated.")),new Error("Worker was terminated");(r=e).onLoadedStream().then((function(e){A.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(o,a)}(e),e=null})),_},initializeFromPort:function(e){var t=new l.MessageHandler("worker","main",e);v.setup(t,e),t.send("ready",null)}};t.WorkerMessageHandler=v,"undefined"==typeof window&&!c.isNodeJS&&"undefined"!=typeof self&&"function"==typeof(m=self).postMessage&&"onmessage"in m&&v.initializeFromPort(self)},function(e,t,r){e.exports=r(3)},function(e,t,r){(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,a=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),o=new T(n||[]);return i._invoke=function(e,t,r){var n=h;return function(a,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw i;return R()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(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===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(E([])));S&&S!==n&&a.call(S,o)&&(b=S);var k=y.prototype=m.prototype=Object.create(b);function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e,r){function n(i,o,s,c){var l=u(e[i],e,o);if("throw"!==l.type){var h=l.arg,f=h.value;return f&&"object"===t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(f).then((function(e){h.value=e,s(h)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;this._invoke=function(e,t){function a(){return new r((function(r,a){n(e,t,r,a)}))}return i=i?i.then(a,a):a()}}function x(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,x(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 a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,g;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(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,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){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){function n(e,t){for(var r=0;r=u.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.removeNullCharacters=function(e){return"string"!=typeof e?(f("The argument for removeNullCharacters must be a string."),e):e.replace(A,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=x,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n=u.WARNINGS&&console.log("Warning: ".concat(e))}function d(e){throw new Error(e)}function p(e,t){e||d(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=function(){function e(t){this.constructor===e&&d("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=m;var v=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).code=n,a}return r}(m);t.PasswordException=v;var y=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).details=n,a}return r}(m);t.UnknownErrorException=y;var b=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.InvalidPDFException=b;var w=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.MissingPDFException=w;var S=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).status=n,a}return r}(m);t.UnexpectedResponseException=S;var k=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.FormatError=k;var _=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.AbortException=_;var A=/\x00/g;function x(e){p("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;ne[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 a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=R;var O,I=[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],F=(O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var r=new Blob([e],{type:t});return URL.createObjectURL(r)}for(var n="data:".concat(t,";base64,"),a=0,i=e.length;a>2]+O[(3&o)<<4|s>>4]+O[a+1>6:64]+O[a+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),function(){if(i&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var a=void 0===n?[t,r]:[t,r,n];e.apply(this,a)},window.history.replaceState=function(e,r,n){var a=void 0===n?[e,r]:[e,r,n];t.apply(this,a)}}}(),String.prototype.startsWith||r(53),String.prototype.endsWith||r(64),String.prototype.includes||r(66),Array.prototype.includes||r(68),Array.from||r(76),Object.assign||r(98),Math.log2||(Math.log2=r(101)),Number.isNaN||(Number.isNaN=r(103)),Number.isInteger||(Number.isInteger=r(105)),Uint8Array.prototype.slice||r(108),globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(113)),globalThis.URL=r(136),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(143).ReadableStream)}(),globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(144)),globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(151)),globalThis.WeakMap||(globalThis.WeakMap=r(153)),globalThis.WeakSet||(globalThis.WeakSet=r(159)),String.prototype.codePointAt||r(161),String.fromCodePoint||(String.fromCodePoint=r(163)),globalThis.Symbol||r(165),String.prototype.padStart||r(188),String.prototype.padEnd||r(193),Object.values||(Object.values=r(195))}},function(e,t,r){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 a="object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=a},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){r(10)({global:!0},{globalThis:r(11)})},function(e,t,r){var n=r(11),a=r(12).f,i=r(26),o=r(29),s=r(30),c=r(40),l=r(52);e.exports=function(e,t){var r,u,h,f,d,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in t){if(f=t[u],h=e.noTargetGet?(d=a(r,u))&&d.value:r[u],!l(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&i(f,"sham",!0),o(r,u,f,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 commonjsGlobal&&commonjsGlobal)||Function("return this")()},function(e,t,r){var n=r(13),a=r(15),i=r(16),o=r(17),s=r(21),c=r(23),l=r(24),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(c(e,t))return i(!a.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(e){return!0}}},function(e,t,r){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,i=a&&!n.call({1:2},1);t.f=i?function(e){var t=a(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),a=r(20);e.exports=function(e){return n(a(e))}},function(e,t,r){var n=r(14),a=r(19),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?i.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(null==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,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;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),a=r(14),i=r(25);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),a=r(22),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(13),a=r(27),i=r(16);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),a=r(24),i=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}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),a=r(26),i=r(23),o=r(30),s=r(31),c=r(33),l=c.get,u=c.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),u(r).source=h.join("string"==typeof t?t:"")),e!==n?(c?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=r:a(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,r){var n=r(11),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),a=r(30),i="__core-js_shared__",o=n[i]||a(i,{});e.exports=o},function(e,t,r){var n,a,i,o=r(34),s=r(11),c=r(22),l=r(26),u=r(23),h=r(35),f=r(39),d=s.WeakMap;if(o){var p=new d,g=p.get,m=p.has,v=p.set;n=function(e,t){return v.call(p,e,t),t},a=function(e){return g.call(p,e)||{}},i=function(e){return m.call(p,e)}}else{var y=h("state");f[y]=!0,n=function(e,t){return l(e,y,t),t},a=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(11),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},function(e,t,r){var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,r){var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[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),a=r(41),i=r(12),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,c=i.f,l=0;lc;)n(s,r=t[c++])&&(~i(l,r)||l.push(r));return l}},function(e,t,r){var n=r(17),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,c=n(t),l=a(c.length),u=i(o,l);if(e&&r!=r){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(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),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(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),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==l||r!=c&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".startsWith,f=Math.min,d=l("startsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"startsWith"),n&&!n.writable)||d)},{startsWith:function(e){var t=String(c(this));s(e);var r=o(f(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return h?h.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),a=r(19),i=r(57)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==a(e))}},function(e,t,r){var n=r(11),a=r(36),i=r(23),o=r(38),s=r(58),c=r(59),l=a("wks"),u=n.Symbol,h=c?u:u&&u.withoutSetter||o;e.exports=function(e){return i(l,e)||(s&&i(u,e)?l[e]=u[e]:l[e]=h("Symbol."+e)),l[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)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(11),a=r(62),i=Function.call;e.exports=function(e,t,r){return a(i,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,a){return e.call(t,r,n,a)}}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){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".endsWith,f=Math.min,d=l("endsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"endsWith"),n&&!n.writable)||d)},{endsWith:function(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=o(t.length),a=void 0===r?n:f(o(r),n),i=String(e);return h?h.call(t,i,a):t.slice(a-i.length,a)===i}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){var n=r(10),a=r(55),i=r(20);n({target:"String",proto:!0,forced:!r(60)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(a(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){var n=r(10),a=r(46).includes,i=r(70);n({target:"Array",proto:!0,forced:!r(75)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,r){var n=r(57),a=r(71),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,a=r(28),i=r(72),o=r(50),s=r(39),c=r(74),l=r(25),u=r(35),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},g=function(e){return"<"+f+">"+e+""},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m=n?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):(t=l("iframe"),r="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var a=o.length;a--;)delete m[h][o[a]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[h]=a(e),r=new p,p[h]=null,r[d]=e):r=m(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(13),a=r(27),i=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,c=0;s>c;)a.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),a=r(14),i=r(23),o=Object.defineProperty,s={},c=function(e){throw e};e.exports=function(e,t){if(i(s,e))return s[e];t||(t={});var r=[][e],l=!!i(t,"ACCESSORS")&&t.ACCESSORS,u=i(t,0)?t[0]:c,h=i(t,1)?t[1]:void 0;return s[e]=!!r&&!a((function(){if(l&&!n)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:c}):e[1]=1,r.call(e,u,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){var n=r(78).charAt,a=r(33),i=r(79),o="String Iterator",s=a.set,c=a.getterFor(o);i(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),a=r(20),i=function(e){return function(t,r){var i,o,s=String(a(t)),c=n(r),l=s.length;return c<0||c>=l?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):i:e?s.slice(c,c+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,r){var n=r(10),a=r(80),i=r(82),o=r(87),s=r(85),c=r(26),l=r(29),u=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v="keys",y="values",b="entries",w=function(){return this};e.exports=function(e,t,r,u,d,S,k){a(r,t,u);var _,A,x,C=function(e){if(e===d&&O)return O;if(!g&&e in E)return E[e];switch(e){case v:case y:case b:return function(){return new r(this,e)}}return function(){return new r(this)}},P=t+" Iterator",T=!1,E=e.prototype,R=E[m]||E["@@iterator"]||d&&E[d],O=!g&&R||C(d),I="Array"==t&&E.entries||R;if(I&&(_=i(I.call(new e)),p!==Object.prototype&&_.next&&(h||i(_)===p||(o?o(_,p):"function"!=typeof _[m]&&c(_,m,w)),s(_,P,!0,!0),h&&(f[P]=w))),d==y&&R&&R.name!==y&&(T=!0,O=function(){return R.call(this)}),h&&!k||E[m]===O||c(E,m,O),f[t]=O,d)if(A={values:C(y),keys:S?O:C(v),entries:C(b)},k)for(x in A)(g||T||!(x in E))&&l(E,x,A[x]);else n({target:t,proto:!0,forced:g||T},A);return A}},function(e,t,r){var n=r(81).IteratorPrototype,a=r(71),i=r(16),o=r(85),s=r(86),c=function(){return this};e.exports=function(e,t,r){var l=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,l,!1,!0),s[l]=c,e}},function(e,t,r){var n,a,i,o=r(82),s=r(26),c=r(23),l=r(57),u=r(37),h=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=o(o(i)))!==Object.prototype&&(n=a):f=!0),null==n&&(n={}),u||c(n,h)||s(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),a=r(83),i=r(35),o=r(84),s=i("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c: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,a=r(23),i=r(57)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),a=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,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),a=r(90);n({target:"Array",stat:!0,forced:!r(97)((function(e){Array.from(e)}))},{from:a})},function(e,t,r){var n=r(62),a=r(83),i=r(91),o=r(92),s=r(47),c=r(93),l=r(94);e.exports=function(e){var t,r,u,h,f,d,p=a(e),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=l(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&o(b))for(r=new g(t=s(p.length));t>w;w++)d=y?v(p[w],w):p[w],c(r,w,d);else for(f=(h=b.call(p)).next,r=new g;!(u=f.call(h)).done;w++)d=y?i(h,v,[u.value,w],!0):u.value,c(r,w,d);return r.length=w,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,a){try{return a?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(57),a=r(86),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},function(e,t,r){var n=r(21),a=r(27),i=r(16);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},function(e,t,r){var n=r(95),a=r(86),i=r(57)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){var n=r(96),a=r(19),i=r(57)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(57)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(57)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}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),a=r(100);n({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},function(e,t,r){var n=r(13),a=r(14),i=r(73),o=r(51),s=r(15),c=r(83),l=r(18),u=Object.assign,h=Object.defineProperty;e.exports=!u||a((function(){if(n&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!=u({},e)[r]||i(u({},t)).join("")!=a}))?function(e,t){for(var r=c(e),a=arguments.length,u=1,h=o.f,f=s.f;a>u;)for(var d,p=l(arguments[u++]),g=h?i(p).concat(h(p)):i(p),m=g.length,v=0;m>v;)d=g[v++],n&&!f.call(p,d)||(r[d]=p[d]);return r}:u},function(e,t,r){r(102);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),a=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return a(e)/i}})},function(e,t,r){r(104);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){r(10)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(106);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){r(10)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(22),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,r){r(109)},function(e,t,r){var n=r(110),a=r(112),i=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,l=[].slice;c("slice",(function(e,t){for(var r=l.call(o(this),e,t),n=a(this,this.constructor),i=0,c=r.length,u=new(s(n))(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},function(e,t,r){var n,a=r(111),i=r(13),o=r(11),s=r(22),c=r(23),l=r(95),u=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),g=r(57),m=r(38),v=o.Int8Array,y=v&&v.prototype,b=o.Uint8ClampedArray,w=b&&b.prototype,S=v&&d(v),k=y&&d(y),_=Object.prototype,A=_.isPrototypeOf,x=g("toStringTag"),C=m("TYPED_ARRAY_TAG"),P=a&&!!p&&"Opera"!==l(o.opera),T=!1,E={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R=function(e){return s(e)&&c(E,l(e))};for(n in E)o[n]||(P=!1);if((!P||"function"!=typeof S||S===Function.prototype)&&(S=function(){throw TypeError("Incorrect invocation")},P))for(n in E)o[n]&&p(o[n],S);if((!P||!k||k===_)&&(k=S.prototype,P))for(n in E)o[n]&&p(o[n].prototype,k);if(P&&d(w)!==k&&p(w,k),i&&!c(k,x))for(n in T=!0,f(k,x,{get:function(){return s(this)?this[C]:void 0}}),E)o[n]&&u(o[n],C,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:T&&C,aTypedArray:function(e){if(R(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(A.call(S,e))return e}else for(var t in E)if(c(E,n)){var r=o[t];if(r&&(e===r||A.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var n in E){var a=o[n];a&&c(a.prototype,e)&&delete a.prototype[e]}k[e]&&!r||h(k,e,r?t:P&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(i){if(p){if(r)for(n in E)(a=o[n])&&c(a,e)&&delete a[e];if(S[e]&&!r)return;try{return h(S,e,r?t:P&&v[e]||t)}catch(e){}}for(n in E)!(a=o[n])||a[e]&&!r||h(a,e,t)}},isView:function(e){var t=l(e);return"DataView"===t||c(E,t)},isTypedArray:R,TypedArray:S,TypedArrayPrototype:k}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(28),a=r(63),i=r(57)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},function(e,t,r){r(114),r(77),r(116),r(119),r(134),r(135);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),a=r(29),i=r(115);n||a(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,r){var n=r(96),a=r(95);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},function(e,t,r){var n=r(11),a=r(117),i=r(118),o=r(26),s=r(57),c=s("iterator"),l=s("toStringTag"),u=i.values;for(var h in a){var f=n[h],d=f&&f.prototype;if(d){if(d[c]!==u)try{o(d,c,u)}catch(e){d[c]=u}if(d[l]||o(d,l,h),a[h])for(var p in i)if(d[p]!==i[p])try{o(d,p,i[p])}catch(e){d[p]=i[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){var n=r(17),a=r(70),i=r(86),o=r(33),s=r(79),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=s(Array,"Array",(function(e,t){l(this,{type:c,target:n(e),index:0,kind:t})}),(function(){var e=u(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"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},function(e,t,r){var n,a,i,o,s=r(10),c=r(37),l=r(11),u=r(42),h=r(120),f=r(29),d=r(121),p=r(85),g=r(122),m=r(22),v=r(63),y=r(123),b=r(19),w=r(31),S=r(124),k=r(97),_=r(112),A=r(125).set,x=r(128),C=r(129),P=r(131),T=r(130),E=r(132),R=r(33),O=r(52),I=r(57),F=r(133),L=I("species"),M="Promise",N=R.get,D=R.set,B=R.getterFor(M),j=h,U=l.TypeError,q=l.document,z=l.process,G=u("fetch"),W=T.f,H=W,V="process"==b(z),X=!!(q&&q.createEvent&&l.dispatchEvent),Y="unhandledrejection",K=O(M,(function(){if(w(j)===String(j)){if(66===F)return!0;if(!V&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!j.prototype.finally)return!0;if(F>=51&&/native code/.test(j))return!1;var e=j.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),J=K||!k((function(e){j.all(e).catch((function(){}))})),Q=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){for(var a=t.value,i=1==t.state,o=0;n.length>o;){var s,c,l,u=n[o++],h=i?u.ok:u.fail,f=u.resolve,d=u.reject,p=u.domain;try{h?(i||(2===t.rejection&&re(e,t),t.rejection=1),!0===h?s=a:(p&&p.enter(),s=h(a),p&&(p.exit(),l=!0)),s===u.promise?d(U("Promise-chain cycle")):(c=Q(s))?c.call(s,f,d):f(s)):d(a)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&ee(e,t)}))}},Z=function(e,t,r){var n,a;X?((n=q.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},(a=l["on"+e])?a(n):e===Y&&P("Unhandled promise rejection",r)},ee=function(e,t){A.call(l,(function(){var r,n=t.value;if(te(t)&&(r=E((function(){V?z.emit("unhandledRejection",n,e):Z(Y,e,n)})),t.rejection=V||te(t)?2:1,r.error))throw r.value}))},te=function(e){return 1!==e.rejection&&!e.parent},re=function(e,t){A.call(l,(function(){V?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,r,n){return function(a){e(t,r,a,n)}},ae=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,$(e,t,!0))},ie=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw U("Promise can't be resolved itself");var a=Q(r);a?x((function(){var n={done:!1};try{a.call(r,ne(ie,e,n,t),ne(ae,e,n,t))}catch(r){ae(e,n,r,t)}})):(t.value=r,t.state=1,$(e,t,!1))}catch(r){ae(e,{done:!1},r,t)}}};K&&(j=function(e){y(this,j,M),v(e),n.call(this);var t=N(this);try{e(ne(ie,this,t),ne(ae,this,t))}catch(e){ae(this,t,e)}},(n=function(e){D(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(j.prototype,{then:function(e,t){var r=B(this),n=W(_(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=V?z.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&$(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(ae,e,t)},T.f=W=function(e){return e===j||e===i?new a(e):H(e)},c||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new j((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof G&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(j,G.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:K},{Promise:j}),p(j,M,!1,!0),g(M),i=u(M),s({target:M,stat:!0,forced:K},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:c||K},{resolve:function(e){return C(c&&this===i?j:this,e)}}),s({target:M,stat:!0,forced:J},{all:function(e){var t=this,r=W(t),n=r.resolve,a=r.reject,i=E((function(){var r=v(t.resolve),i=[],o=0,s=1;S(e,(function(e){var c=o++,l=!1;i.push(void 0),s++,r.call(t,e).then((function(e){l||(l=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=W(t),n=r.reject,a=E((function(){var a=v(t.resolve);S(e,(function(e){a.call(t,e).then(r.resolve,n)}))}));return a.error&&n(a.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 a in t)n(e,a,t[a],r);return e}},function(e,t,r){var n=r(42),a=r(27),i=r(57),o=r(13),s=i("species");e.exports=function(e){var t=n(e),r=a.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=r(28),a=r(92),i=r(47),o=r(62),s=r(94),c=r(91),l=function(e,t){this.stopped=e,this.result=t},u=e.exports=function(e,t,r,u,h){var f,d,p,g,m,v,y,b=o(t,r,u?2:1);if(h)f=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(a(d)){for(p=0,g=i(e.length);g>p;p++)if((m=u?b(n(y=e[p])[0],y[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}f=d.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(m=c(f,b,y.value,u))&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(e){return new l(!0,e)}},function(e,t,r){var n,a,i,o=r(11),s=r(14),c=r(19),l=r(62),u=r(74),h=r(25),f=r(126),d=o.location,p=o.setImmediate,g=o.clearImmediate,m=o.process,v=o.MessageChannel,y=o.Dispatch,b=0,w={},S="onreadystatechange",k=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},_=function(e){return function(){k(e)}},A=function(e){k(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&g||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},g=function(e){delete w[e]},"process"==c(m)?n=function(e){m.nextTick(_(e))}:y&&y.now?n=function(e){y.now(_(e))}:v&&!f?(i=(a=new v).port2,a.port1.onmessage=A,n=l(i.postMessage,i,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=S in h("script")?function(e){u.appendChild(h("script"))[S]=function(){u.removeChild(this),k(e)}}:function(e){setTimeout(_(e),0)}:(n=x,o.addEventListener("message",A,!1))),e.exports={set:p,clear:g}},function(e,t,r){var n=r(127);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,a,i,o,s,c,l,u,h=r(11),f=r(12).f,d=r(19),p=r(125).set,g=r(126),m=h.MutationObserver||h.WebKitMutationObserver,v=h.process,y=h.Promise,b="process"==d(v),w=f(h,"queueMicrotask"),S=w&&w.value;S||(n=function(){var e,t;for(b&&(e=v.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},b?o=function(){v.nextTick(n)}:m&&!g?(s=!0,c=document.createTextNode(""),new m(n).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):y&&y.resolve?(l=y.resolve(void 0),u=l.then,o=function(){u.call(l,n)}):o=function(){p.call(h,n)}),e.exports=S||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},function(e,t,r){var n=r(28),a=r(22),i=r(130);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(63),a=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 a(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(e){return{error:!0,value:e}}}},function(e,t,r){var n,a,i=r(11),o=r(127),s=i.process,c=s&&s.versions,l=c&&c.v8;l?a=(n=l.split("."))[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},function(e,t,r){var n=r(10),a=r(63),i=r(130),o=r(132),s=r(124);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,c=r.reject,l=o((function(){var r=a(t.resolve),i=[],o=0,c=1;s(e,(function(e){var a=o++,s=!1;i.push(void 0),c++,r.call(t,e).then((function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--c||n(i))}),(function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--c||n(i))}))})),--c||n(i)}));return l.error&&c(l.value),r.promise}})},function(e,t,r){var n=r(10),a=r(37),i=r(120),o=r(14),s=r(42),c=r(112),l=r(129),u=r(29);n({target:"Promise",proto:!0,real:!0,forced:!!i&&o((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),a||"function"!=typeof i||i.prototype.finally||u(i.prototype,"finally",s("Promise").prototype.finally)},function(e,t,r){r(137),r(142),r(140);var n=r(43);e.exports=n.URL},function(e,t,r){r(77);var n,a=r(10),i=r(13),o=r(138),s=r(11),c=r(72),l=r(29),u=r(123),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,g=r(139),m=r(85),v=r(140),y=r(33),b=s.URL,w=v.URLSearchParams,S=v.getState,k=y.set,_=y.getterFor("URL"),A=Math.floor,x=Math.pow,C="Invalid scheme",P="Invalid host",T="Invalid port",E=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,O=/\d/,I=/^(0x|0X)/,F=/^[0-7]+$/,L=/^\d+$/,M=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,D=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,B=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,j=/[\u0009\u000A\u000D]/g,U=function(e,t){var r,n,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return P;if(!(r=z(t.slice(1,-1))))return P;e.host=r}else if(J(e)){if(t=g(t),N.test(t))return P;if(null===(r=q(t)))return P;e.host=r}else{if(D.test(t))return P;for(r="",n=d(t),a=0;a4)return e;for(r=[],n=0;n1&&"0"==a.charAt(0)&&(i=I.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)o=0;else{if(!(10==i?L:8==i?F:M).test(a))return e;o=parseInt(a,i)}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;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!O.test(f()))return;for(;O.test(f());){if(i=parseInt(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[l]=256*c[l]+a,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[l++]=t}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!=l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!=l)return;return c},G=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},W={},H=f({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),V=f({},H,{"#":1,"?":1,"{":1,"}":1}),X=f({},V,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(e){return h(K,e.scheme)},Q=function(e){return""!=e.username||""!=e.password},$=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},ee=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&Z(t[0],!0)||t.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},ne={},ae={},ie={},oe={},se={},ce={},le={},ue={},he={},fe={},de={},pe={},ge={},me={},ve={},ye={},be={},we={},Se={},ke={},_e={},Ae=function(e,t,r,a){var i,o,s,c,l,u=r||ne,f=0,p="",g=!1,m=!1,v=!1;for(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(B,"")),t=t.replace(j,""),i=d(t);f<=i.length;){switch(o=i[f],u){case ne:if(!o||!E.test(o)){if(r)return C;u=ie;continue}p+=o.toLowerCase(),u=ae;break;case ae:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))p+=o.toLowerCase();else{if(":"!=o){if(r)return C;p="",u=ie,f=0;continue}if(r&&(J(e)!=h(K,p)||"file"==p&&(Q(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,r)return void(J(e)&&K[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?u=me:J(e)&&a&&a.scheme==e.scheme?u=oe:J(e)?u=ue:"/"==i[f+1]?(u=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),u=Se)}break;case ie:if(!a||a.cannotBeABaseURL&&"#"!=o)return C;if(a.cannotBeABaseURL&&"#"==o){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=_e;break}u="file"==a.scheme?me:ce;continue;case oe:if("/"!=o||"/"!=i[f+1]){u=ce;continue}u=he,f++;break;case se:if("/"==o){u=fe;break}u=we;continue;case ce:if(e.scheme=a.scheme,o==n)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==o||"\\"==o&&J(e))u=le;else if("?"==o)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=ke;else{if("#"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=we;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}break;case le:if(!J(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=we;continue}u=fe}else u=he;break;case ue:if(u=he,"/"!=o||"/"!=p.charAt(f+1))continue;f++;break;case he:if("/"!=o&&"\\"!=o){u=fe;continue}break;case fe:if("@"==o){g&&(p="%40"+p),g=!0,s=d(p);for(var y=0;y65535)return T;e.port=J(e)&&S===K[e.scheme]?null:S,p=""}if(r)return;u=be;continue}return T}p+=o;break;case me:if(e.scheme="file","/"==o||"\\"==o)u=ve;else{if(!a||"file"!=a.scheme){u=we;continue}if(o==n)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==o)e.host=a.host,e.path=a.path.slice(),e.query="",u=ke;else{if("#"!=o){ee(i.slice(f).join(""))||(e.host=a.host,e.path=a.path.slice(),te(e)),u=we;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}}break;case ve:if("/"==o||"\\"==o){u=ye;break}a&&"file"==a.scheme&&!ee(i.slice(f).join(""))&&(Z(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=we;continue;case ye:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&Z(p))u=we;else if(""==p){if(e.host="",r)return;u=be}else{if(c=U(e,p))return c;if("localhost"==e.host&&(e.host=""),r)return;p="",u=be}continue}p+=o;break;case be:if(J(e)){if(u=we,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(u=we,"/"!=o))continue}else e.fragment="",u=_e;else e.query="",u=ke;break;case we:if(o==n||"/"==o||"\\"==o&&J(e)||!r&&("?"==o||"#"==o)){if(".."===(l=(l=p).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(te(e),"/"==o||"\\"==o&&J(e)||e.path.push("")):re(p)?"/"==o||"\\"==o&&J(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(o==n||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=ke):"#"==o&&(e.fragment="",u=_e)}else p+=Y(o,V);break;case Se:"?"==o?(e.query="",u=ke):"#"==o?(e.fragment="",u=_e):o!=n&&(e.path[0]+=Y(o,W));break;case ke:r||"#"!=o?o!=n&&("'"==o&&J(e)?e.query+="%27":e.query+="#"==o?"%23":Y(o,W)):(e.fragment="",u=_e);break;case _e:o!=n&&(e.fragment+=Y(o,H))}f++}},xe=function(e){var t,r,n=u(this,xe,"URL"),a=arguments.length>1?arguments[1]:void 0,o=String(e),s=k(n,{type:"URL"});if(void 0!==a)if(a instanceof xe)t=_(a);else if(r=Ae(t={},String(a)))throw TypeError(r);if(r=Ae(s,o,null,t))throw TypeError(r);var c=s.searchParams=new w,l=S(c);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(c)||null},i||(n.href=Pe.call(n),n.origin=Te.call(n),n.protocol=Ee.call(n),n.username=Re.call(n),n.password=Oe.call(n),n.host=Ie.call(n),n.hostname=Fe.call(n),n.port=Le.call(n),n.pathname=Me.call(n),n.search=Ne.call(n),n.searchParams=De.call(n),n.hash=Be.call(n))},Ce=xe.prototype,Pe=function(){var e=_(this),t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,l=t+":";return null!==a?(l+="//",Q(e)&&(l+=r+(n?":"+n:"")+"@"),l+=G(a),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},Te=function(){var e=_(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&J(e)?t+"://"+G(e.host)+(null!==r?":"+r:""):"null"},Ee=function(){return _(this).scheme+":"},Re=function(){return _(this).username},Oe=function(){return _(this).password},Ie=function(){var e=_(this),t=e.host,r=e.port;return null===t?"":null===r?G(t):G(t)+":"+r},Fe=function(){var e=_(this).host;return null===e?"":G(e)},Le=function(){var e=_(this).port;return null===e?"":String(e)},Me=function(){var e=_(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ne=function(){var e=_(this).query;return e?"?"+e:""},De=function(){return _(this).searchParams},Be=function(){var e=_(this).fragment;return e?"#"+e:""},je=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&c(Ce,{href:je(Pe,(function(e){var t=_(this),r=String(e),n=Ae(t,r);if(n)throw TypeError(n);S(t.searchParams).updateSearchParams(t.query)})),origin:je(Te),protocol:je(Ee,(function(e){var t=_(this);Ae(t,String(e)+":",ne)})),username:je(Re,(function(e){var t=_(this),r=d(String(e));if(!$(t)){t.username="";for(var n=0;n>1,e+=s(e/t);e>455;n+=36)e=s(e/35);return s(n+36*e/(e+38))},h=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r=h&&as((n-f)/v))throw RangeError(o);for(f+=(m-h)*v,h=m,r=0;rn)throw RangeError(o);if(a==h){for(var y=f,b=36;;b+=36){var w=b<=d?1:b>=d+26?26:b-d;if(y0?arguments[0]:void 0,u=[];if(P(this,{type:x,entries:u,updateURL:function(){},updateSearchParams:U}),void 0!==l)if(m(l))if("function"==typeof(e=w(l)))for(r=(t=e.call(l)).next;!(n=r.call(t)).done;){if((o=(i=(a=b(g(n.value))).next).call(a)).done||(s=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:s.value+""})}else for(c in l)f(l,c)&&u.push({key:c,value:l[c]+""});else j(u,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},W=G.prototype;s(W,{append:function(e,t){q(arguments.length,2);var r=T(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){q(arguments.length,1);for(var t=T(this),r=t.entries,n=e+"",a=0;ae.key){a.splice(t,0,e);break}t===r&&a.push(e)}n.updateURL()},forEach:function(e){for(var t,r=T(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),a=0;a1&&(m(t=arguments[1])&&(r=t.body,p(r)===x&&((n=t.headers?new _(t.headers):new _).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(r)),headers:y(0,n)}))),a.push(t)),k.apply(this,a)}}),e.exports={URLSearchParams:G,getState:T}},function(e,t,r){var n=r(28),a=r(94);e.exports=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){r(10)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){!function(e){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},a=r;function i(e){return"object"==typeof e&&null!==e||"function"==typeof e}function o(e){return e.slice()}function s(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function c(e){return!1!==l(e)&&e!==1/0}function l(e){return!("number"!=typeof e||n(e)||e<0)}function u(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 a=e[t];if(void 0!==a){if("function"!=typeof a)throw new TypeError(a+" is not a method");switch(r){case 0:return function(){return d(a,e,n)};case 1:return function(t){var r=[t].concat(n);return d(a,e,r)}}}return function(){return _(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return u(n,e,r)}function d(e,t,r){try{return _(u(e,t,r))}catch(e){return A(e)}}function p(e){return e}function g(e){return!1}function m(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 v(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 y=Promise,b=Promise.prototype.then,w=Promise.resolve.bind(y),S=Promise.reject.bind(y);function k(e){return new y(e)}function _(e){return w(e)}function A(e){return S(e)}function x(e,t,r){return b.call(e,t,r)}function C(e,t,r){x(x(e,t,r),void 0,a)}function P(e,t){C(e,t)}function T(e,t){C(e,void 0,t)}function E(e,t,r){return x(e,t,r)}function R(e){x(e,void 0,a)}var O=16384,I=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===O-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,a=e._elements,i=a[r];return n===O&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function F(e,t,r){var n=null;!0===r&&(n=Object.prototype);var a=Object.create(n);return a.value=e,a.done=t,a}function L(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?B(e):"closed"===t._state?U(e):j(e,t._storedError)}function M(e,t){return Nr(e._ownerReadableStream,t)}function N(e){"readable"===e._ownerReadableStream._state?q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(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 B(e){e._closedPromise=k((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function j(e,t){B(e),q(e,t)}function U(e){B(e),G(e)}function q(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function z(e,t){j(e,t)}function G(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var W=t("[[CancelSteps]]"),H=t("[[PullSteps]]");function V(e,t){void 0===t&&(t=!1);var r=new Z(e);return r._forAuthorCode=t,r}function X(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function Y(e,t,r){var n=e._reader;n._readRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function K(e){return e._reader._readRequests.length}function J(e){var t=e._reader;return void 0!==t&&!!ee(t)}var Q,$,Z=function(){function e(e){if(!1===Lr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:A(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?A(D("read from")):te(this):A(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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?_(F(void 0,!0,e._forAuthorCode)):"errored"===t._state?A(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&&((Q={})[t.asyncIterator]=function(){return this},$=Q,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ie(this))return A(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?A(D("iterate")):E(te(e),(function(t){var r=t.done;return r&&N(e),F(t.value,r,!0)}))},return:function(e){if(!1===ie(this))return A(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return A(D("finish iterating"));if(t._readRequests.length>0)return A(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=M(t,e);return N(t),E(r,(function(){return F(e,!0,!0)}))}return N(t),_(F(e,!0,!0))}};function ae(e,t){void 0===t&&(t=!1);var r=V(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ie(e){return!!i(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 ce(e,t,r){if(!c(r=Number(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 le(e){return e._queue.peek().value}function ue(e){e._queue=new I,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={}),me(this);var r=t.size,n=t.highWaterMark;if(void 0!==e.type)throw new RangeError("Invalid type is specified");var a=v(r);void 0===n&&(n=1),Ye(this,e,n=m(n),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ve(this))throw ot("locked");return ye(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ve(this)?A(ot("abort")):!0===ye(this)?A(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ve(this)?A(ot("close")):!0===ye(this)?A(new TypeError("Cannot close a stream that already has a writer")):!0===Ee(this)?A(new TypeError("Cannot close an already-closing stream")):we(this)},e.prototype.getWriter=function(){if(!1===ve(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Me(e)}function ge(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(de.prototype);return me(o),Xe(o,Object.create(He.prototype),e,t,r,n,a,i),o}function me(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new I,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function ye(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return _(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=k((function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=a,!1===n&&_e(e,t),a}function we(e){var t=e._state;if("closed"===t||"errored"===t)return A(new TypeError("The stream (in "+t+" state) is not in the writable state and cannot be closed"));var r=k((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&!0===e._backpressure&&"writable"===t&&St(n),Je(e._writableStreamController),r}function Se(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function ke(e,t){"writable"!==e._state?Ae(e):_e(e,t)}function _e(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&qe(n,t),!1===Re(e)&&!0===r._started&&Ae(e)}function Ae(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new I,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Fe(e);C(e._writableStreamController[he](r._reason),(function(){r._resolve(),Fe(e)}),(function(t){r._reject(t),Fe(e)}))}else Fe(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ce(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,ke(e,t)}function Pe(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&pt(t)}function Te(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),ke(e,t)}function Ee(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Re(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Oe(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ie(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Fe(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 Le(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):St(r)),e._backpressure=t}var Me=function(){function e(e){if(!1===ve(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===ye(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===Ee(e)&&!0===e._backpressure?gt(this):vt(this),lt(this);else if("erroring"===t)mt(this,e._storedError),lt(this);else if("closed"===t)vt(this),ht(this);else{var r=e._storedError;mt(this,r),ut(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Ne(this)?A(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 ct("desiredSize");return ze(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Ne(this)?A(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Ne(this)?A(st("abort")):void 0===this._ownerWritableStream?A(ct("abort")):De(this,e)},e.prototype.close=function(){if(!1===Ne(this))return A(st("close"));var e=this._ownerWritableStream;return void 0===e?A(ct("close")):!0===Ee(e)?A(new TypeError("Cannot close an already-closing stream")):Be(this)},e.prototype.releaseLock=function(){if(!1===Ne(this))throw st("releaseLock");void 0!==this._ownerWritableStream&&Ge(this)},e.prototype.write=function(e){return!1===Ne(this)?A(st("write")):void 0===this._ownerWritableStream?A(ct("write to")):We(this,e)},e}();function Ne(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function De(e,t){return be(e._ownerWritableStream,t)}function Be(e){return we(e._ownerWritableStream)}function je(e){var t=e._ownerWritableStream,r=t._state;return!0===Ee(t)||"closed"===r?_(void 0):"errored"===r?A(t._storedError):Be(e)}function Ue(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function qe(e,t){"pending"===e._readyPromiseState?yt(e,t):wt(e,t)}function ze(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:$e(t._writableStreamController)}function Ge(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r),Ue(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function We(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=Qe(n,t);if(r!==e._ownerWritableStream)return A(ct("write to"));var i=r._state;if("errored"===i)return A(r._storedError);if(!0===Ee(r)||"closed"===i)return A(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return A(r._storedError);var o=Se(r);return Ze(n,t,a),o}var He=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===Ve(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&it(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Ke(this),t},e.prototype[fe]=function(){ue(this)},e}();function Ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Xe(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=at(t);Le(e,c),C(_(r()),(function(){t._started=!0,et(t)}),(function(r){t._started=!0,ke(e,r)}))}function Ye(e,t,r,n){var a=Object.create(He.prototype);function i(){return f(t,"start",[a])}var o=h(t,"write",1,[a]),s=h(t,"close",0,[]),c=h(t,"abort",1,[]);Xe(e,a,i,o,s,c,r,n)}function Ke(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Je(e){ce(e,"close",0),et(e)}function Qe(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return tt(e,t),1}}function $e(e){return e._strategyHWM-e._queueTotalSize}function Ze(e,t,r){var n={chunk:t};try{ce(e,n,r)}catch(t){return void tt(e,t)}var a=e._controlledWritableStream;!1===Ee(a)&&"writable"===a._state&&Le(a,at(e)),et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=le(e);"close"===r?rt(e):nt(e,r.chunk)}}else Ae(t)}function tt(e,t){"writable"===e._controlledWritableStream._state&&it(e,t)}function rt(e){var t=e._controlledWritableStream;Oe(t),se(e);var r=e._closeAlgorithm();Ke(e),C(r,(function(){Pe(t)}),(function(e){Te(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Ie(r),C(e._writeAlgorithm(t),(function(){xe(r);var t=r._state;if(se(e),!1===Ee(r)&&"writable"===t){var n=at(e);Le(r,n)}et(e)}),(function(t){"writable"===r._state&&Ke(e),Ce(r,t)}))}function at(e){return $e(e)<=0}function it(e,t){var r=e._controlledWritableStream;Ke(e),_e(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 ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(e){e._closedPromise=k((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ut(e,t){lt(e),ft(e,t)}function ht(e){lt(e),pt(e)}function ft(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){ut(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function gt(e){e._readyPromise=k((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function mt(e,t){gt(e),yt(e,t)}function vt(e){gt(e),St(e)}function yt(e,t){R(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){gt(e)}function wt(e,t){mt(e,t)}function St(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function kt(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}var _t="undefined"!=typeof DOMException?DOMException:void 0;function At(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){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 Ct=At(_t)?_t:xt();function Pt(e,t,n,a,i,o){var s=V(e),c=pe(t);e._disturbed=!0;var l=!1,u=_(void 0);return k((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Ct("Aborted","AbortError"),n=[];!1===a&&n.push((function(){return"writable"===t._state?be(t,r):_(void 0)})),!1===i&&n.push((function(){return"readable"===e._state?Nr(e,r):_(void 0)})),w((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 k((function(e,t){function r(n){n?e():x(g(),r,t)}r(!1)}))}function g(){return!0===l?_(!0):x(c._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(u=x(We(c,e.value),void 0,r),!1)}))}))}if(y(e,s._closedPromise,(function(e){!1===a?w((function(){return be(t,e)}),!0,e):S(!0,e)})),y(t,c._closedPromise,(function(t){!1===i?w((function(){return Nr(e,t)}),!0,t):S(!0,t)})),b(e,s._closedPromise,(function(){!1===n?w((function(){return je(c)})):S()})),!0===Ee(t)||"closed"===t._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?w((function(){return Nr(e,m)}),!0,m):S(!0,m)}function v(){var e=u;return x(u,(function(){return e!==u?v():void 0}))}function y(e,t,r){"errored"===e._state?r(e._storedError):T(t,r)}function b(e,t,r){"closed"===e._state?r():P(t,r)}function w(e,r,n){function a(){C(e(),(function(){return A(r,n)}),(function(e){return A(!0,e)}))}!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),a):a())}function S(e,r){!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),(function(){return A(e,r)})):A(e,r))}function A(e,t){Ge(c),N(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}R(p())}))}var Tt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Et(this))throw qt("desiredSize");return Nt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Et(this))throw qt("close");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits close");Ft(this)},e.prototype.enqueue=function(e){if(!1===Et(this))throw qt("enqueue");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Lt(this,e)},e.prototype.error=function(e){if(!1===Et(this))throw qt("error");Mt(this,e)},e.prototype[W]=function(e){ue(this);var t=this._cancelAlgorithm(e);return It(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?(It(this),Dr(e)):Rt(this),_(F(t,!1,e._reader._forAuthorCode))}var r=X(e);return Rt(this),r},e}();function Et(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Rt(e){!1!==Ot(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Rt(e))}),(function(t){Mt(e,t)}))):e._pullAgain=!0)}function Ot(e){var t=e._controlledReadableStream;return!1!==Bt(e)&&!1!==e._started&&(!0===Mr(t)&&K(t)>0||Nt(e)>0)}function It(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ft(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(It(e),Dr(t))}function Lt(e,t){var r=e._controlledReadableStream;if(!0===Mr(r)&&K(r)>0)Y(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Mt(e,t),t}try{ce(e,t,n)}catch(t){throw Mt(e,t),t}}Rt(e)}function Mt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ue(e),It(e),Br(r,t))}function Nt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Dt(e){return!0!==Ot(e)}function Bt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Rt(t)}),(function(e){Mt(t,e)}))}function Ut(e,t,r,n){var a=Object.create(Tt.prototype);function i(){return f(t,"start",[a])}var o=h(t,"pull",0,[a]),s=h(t,"cancel",1,[]);jt(e,a,i,o,s,r,n)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function zt(e,t){var r,n,a,i,s,c=V(e),l=!1,u=!1,h=!1,f=k((function(e){s=e}));function d(){return!0===l||(l=!0,R(E(te(c),(function(e){if(l=!1,!0===e.done)return!1===u&&Ft(a._readableStreamController),void(!1===h&&Ft(i._readableStreamController));var t=e.value,r=t,n=t;!1===u&&Lt(a._readableStreamController,r),!1===h&&Lt(i._readableStreamController,n)})))),_(void 0)}function p(t){if(u=!0,r=t,!0===h){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function g(t){if(h=!0,n=t,!0===u){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function m(){}return a=Ir(m,d,p),i=Ir(m,d,g),T(c._closedPromise,(function(e){Mt(a._readableStreamController,e),Mt(i._readableStreamController,e)})),[a,i]}var Gt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Wt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Xt(this))throw wr("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Xt(this))throw wr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");g(this._view.buffer),gr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Xt(this))throw wr("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");g(e.buffer),mr(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===Vt(this))throw Sr("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(Wt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Vt(this))throw Sr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Vt(this))throw Sr("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===Vt(this))throw Sr("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");g(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Vt(this))throw Sr("error");dr(this,e)},e.prototype[W]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),ue(this);var t=this._cancelAlgorithm(e);return ur(this),t},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(e){return A(e)}return _(F(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var a=void 0;try{a=new ArrayBuffer(n)}catch(e){return A(e)}var i={buffer:a,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}var o=X(e);return Yt(this),o},e}();function Vt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Xt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Yt(e){!1!==lr(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Yt(e))}),(function(t){dr(e,t)}))):e._pullAgain=!0)}function Kt(e){rr(e),e._pendingPullIntos=new I}function Jt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Qt(t);"default"===t.readerType?Y(e,n,r):Ar(e,n,r)}function Qt(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,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,c=a,l=!1;o>n&&(c=o-t.bytesFilled,l=!0);for(var u=e._queue;c>0;){var h=u.peek(),f=Math.min(c,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?u.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),c-=f}return l}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(ur(e),Dr(e._controlledReadableByteStream)):Yt(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){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===Zt(e,t)&&(cr(e),Jt(e._controlledReadableByteStream,t))}}function ar(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var a=t.constructor,i={buffer:p(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(i),_r(r);if("closed"===r._state)return _(F(new a(i.buffer,i.byteOffset,0),!0,r._reader._forAuthorCode));if(e._queueTotalSize>0){if(!0===Zt(e,i)){var o=Qt(i);return tr(e),_(F(o,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var s=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,s),A(s)}}e._pendingPullIntos.push(i);var c=_r(r);return Yt(e),c}function ir(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Cr(r))for(;xr(r)>0;)Jt(r,cr(e))}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 a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);$t(e,i,0,i.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Jt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ir(e,r)}else or(e,t,r);Yt(e)}function cr(e){var t=e._pendingPullIntos.shift();return rr(e),t}function lr(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===J(t)&&K(t)>0||!0===Cr(t)&&xr(t)>0||pr(e)>0)}function ur(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&&e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,r),r}ur(e),Dr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,a=t.byteOffset,i=t.byteLength,o=p(n);!0===J(r)?0===K(r)?$t(e,o,a,i):Y(r,new Uint8Array(o,a,i),!1):!0===Cr(r)?($t(e,o,a,i),nr(e)):$t(e,o,a,i),Yt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Kt(e),ue(e),ur(e),Br(r,t))}function pr(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function gr(e,t){if(!1===c(t=Number(t)))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function mr(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 vr(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,ue(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=m(i),t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new I,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Yt(t)}),(function(e){dr(t,e)}))}function yr(e,t,r){var n=Object.create(Ht.prototype);function a(){return f(t,"start",[n])}var i=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Gt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");vr(e,n,a,i,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function wr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function Sr(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function kr(e,t){void 0===t&&(t=!1);var r=new Pr(e);return r._forAuthorCode=t,r}function _r(e){return k((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function Ar(e,t,r){var n=e._reader;n._readIntoRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Cr(e){var t=e._reader;return void 0!==t&&!!Tr(t)}var Pr=function(){function e(e){if(!Lr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Vt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readIntoRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return Tr(this)?this._closedPromise:A(Rr("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(Rr("cancel"))},e.prototype.read=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("read from")):ArrayBuffer.isView(e)?(g(e.buffer),0===e.byteLength?A(new TypeError("view must have non-zero byteLength")):Er(this,e)):A(new TypeError("view must be an array buffer view")):A(Rr("read"))},e.prototype.releaseLock=function(){if(!Tr(this))throw Rr("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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Er(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?A(r._storedError):ar(r._readableStreamController,t)}function Rr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Or=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Fr(this);var r=t.size,n=t.highWaterMark,a=e.type;if("bytes"===String(a)){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),yr(this,e,n=m(n))}else{if(void 0!==a)throw new RangeError("Invalid type is specified");var i=v(r);void 0===n&&(n=1),Ut(this,e,n=m(n),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Lr(this))throw jr("locked");return Mr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Lr(this)?A(jr("cancel")):!0===Mr(this)?A(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===Lr(this))throw jr("getReader");if(void 0===t)return V(this,!0);if("byob"===(t=String(t)))return kr(this,!0);throw new RangeError("Invalid mode is specified")},e.prototype.pipeThrough=function(e,t){var r=e.writable,n=e.readable,a=void 0===t?{}:t,i=a.preventClose,o=a.preventAbort,s=a.preventCancel,c=a.signal;if(!1===Lr(this))throw jr("pipeThrough");if(!1===ve(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Lr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(i=Boolean(i),o=Boolean(o),s=Boolean(s),void 0!==c&&!kt(c))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Mr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===ye(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return R(Pt(this,r,i,o,s,c)),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,a=r.preventAbort,i=r.preventCancel,o=r.signal;return!1===Lr(this)?A(jr("pipeTo")):!1===ve(e)?A(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),a=Boolean(a),i=Boolean(i),void 0===o||kt(o)?!0===Mr(this)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===ye(e)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pt(this,e,n,a,i,o):A(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Lr(this))throw jr("tee");return o(zt(this))},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Lr(this))throw jr("getIterator");return ae(this,r)},e}();function Ir(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(Or.prototype);return Fr(i),jt(i,Object.create(Tt.prototype),e,t,r,n,a),i}function Fr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Lr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Mr(e){return void 0!==e._reader}function Nr(e,t){return e._disturbed=!0,"closed"===e._state?_(void 0):"errored"===e._state?A(e._storedError):(Dr(e),E(e._readableStreamController[W](t),r))}function Dr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(F(void 0,!0,t._forAuthorCode))})),t._readRequests=new I),G(t))}function Br(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 I):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new I),q(r,t))}function jr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"==typeof t.asyncIterator&&Object.defineProperty(Or.prototype,t.asyncIterator,{value:Or.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ur=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),zr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,a=t.highWaterMark,i=r.size,o=r.highWaterMark;if(void 0!==e.writableType)throw new RangeError("Invalid writable type specified");var s=v(n);if(void 0===a&&(a=1),a=m(a),void 0!==e.readableType)throw new RangeError("Invalid readable type specified");var c,l=v(i);void 0===o&&(o=0),o=m(o),Gr(this,k((function(e){c=e})),a,s,o,l),Qr(this,e);var u=f(e,"start",[this._transformStreamController]);c(u)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Wr(this))throw ln("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Wr(this))throw ln("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Gr(e,t,r,n,a,i){function o(){return t}function s(t){return nn(e,t)}function c(t){return an(e,t)}function l(){return on(e)}function u(){return sn(e)}function h(t){return Vr(e,t),_(void 0)}e._writable=ge(o,s,l,c,r,n),e._readable=Ir(o,u,h,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Xr(e,!0),e._transformStreamController=void 0}function Wr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Hr(e,t){Mt(e._readable._readableStreamController,t),Vr(e,t)}function Vr(e,t){$r(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Xr(e,!1)}function Xr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=k((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Yr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Kr(this))throw cn("desiredSize");return Nt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Kr(this))throw cn("enqueue");Zr(this,e)},e.prototype.error=function(e){if(!1===Kr(this))throw cn("error");en(this,e)},e.prototype.terminate=function(){if(!1===Kr(this))throw cn("terminate");rn(this)},e}();function Kr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Jr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Qr(e,t){var r=Object.create(Yr.prototype),n=function(e){try{return Zr(r,e),_(void 0)}catch(e){return A(e)}},a=t.transform;if(void 0!==a){if("function"!=typeof a)throw new TypeError("transform is not a method");n=function(e){return d(a,t,[e,r])}}var i=h(t,"flush",0,[r]);Jr(e,r,n,i)}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===Bt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Lt(n,t)}catch(e){throw Vr(r,e),r._readable._storedError}Dt(n)!==r._backpressure&&Xr(r,!0)}function en(e,t){Hr(e._controlledTransformStream,t)}function tn(e,t){return E(e._transformAlgorithm(t),void 0,(function(t){throw Hr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===Bt(r)&&Ft(r),Vr(t,new TypeError("TransformStream terminated"))}function nn(e,t){var r=e._transformStreamController;return!0===e._backpressure?E(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return tn(r,t)})):tn(r,t)}function an(e,t){return Hr(e,t),_(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return $r(r),E(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===Bt(e)&&Ft(e)}),(function(r){throw Hr(e,r),t._storedError}))}function sn(e){return Xr(e,!1),e._backpressureChangePromise}function cn(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ln(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Ur,e.CountQueuingStrategy=qr,e.ReadableStream=Or,e.TransformStream=zr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){r(145),r(114),r(77),r(116);var n=r(43);e.exports=n.Map},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){var n=r(10),a=r(11),i=r(52),o=r(29),s=r(147),c=r(124),l=r(123),u=r(22),h=r(14),f=r(97),d=r(85),p=r(149);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),v=g?"set":"add",y=a[e],b=y&&y.prototype,w=y,S={},k=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!(m&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(i(e,"function"!=typeof y||!(m||b.forEach&&!h((function(){(new y).entries().next()})))))w=r.getConstructor(t,e,g,v),s.REQUIRED=!0;else if(i(e,!0)){var _=new w,A=_[v](m?{}:-0,1)!=_,x=h((function(){_.has(1)})),C=f((function(e){new y(e)})),P=!m&&h((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));C||((w=t((function(t,r){l(t,w,e);var n=p(new y,t,w);return null!=r&&c(r,n[v],n,g),n}))).prototype=b,b.constructor=w),(x||P)&&(k("delete"),k("has"),g&&k("get")),(P||A)&&k(v),m&&b.clear&&delete b.clear}return S[e]=w,n({global:!0,forced:w!=y},S),d(w,e),m||r.setStrong(w,e,g),w}},function(e,t,r){var n=r(39),a=r(22),i=r(23),o=r(27).f,s=r(38),c=r(148),l=s("meta"),u=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,l)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[l].objectID},getWeakData:function(e,t){if(!i(e,l)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[l].weakData},onFreeze:function(e){return c&&d.REQUIRED&&h(e)&&!i(e,l)&&f(e),e}};n[l]=!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),a=r(87);e.exports=function(e,t,r){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==r&&n(o=i.prototype)&&o!==r.prototype&&a(e,o),e}},function(e,t,r){var n=r(27).f,a=r(71),i=r(121),o=r(62),s=r(123),c=r(124),l=r(79),u=r(122),h=r(13),f=r(147).fastKey,d=r(33),p=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,l){var u=e((function(e,n){s(e,u,t),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[l],e,r)})),d=g(t),m=function(e,t,r){var n,a,i=d(e),o=v(e,t);return o?o.value=r:(i.last=o={index:a=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=o),n&&(n.next=o),h?i.size++:e.size++,"F"!==a&&(i.index[a]=o)),e},v=function(e,t){var r,n=d(e),a=f(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(u.prototype,{clear:function(){for(var e=d(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=d(t),n=v(t,e);if(n){var a=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=a),a&&(a.previous=i),r.first==n&&(r.first=a),r.last==n&&(r.last=i),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),i(u.prototype,r?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(u.prototype,"size",{get:function(){return d(this).size}}),u},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),i=g(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;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),u(t)}}},function(e,t,r){r(152),r(114),r(77),r(116);var n=r(43);e.exports=n.Set},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){r(114),r(154),r(116);var n=r(43);e.exports=n.WeakMap},function(e,t,r){var n,a=r(11),i=r(121),o=r(147),s=r(146),c=r(155),l=r(22),u=r(33).enforce,h=r(34),f=!a.ActiveXObject&&"ActiveXObject"in a,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",p,c);if(h&&f){n=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,w=m.set;i(m,{delete:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var r=u(this);r.frozen||(r.frozen=new n),y.call(this,e)?w.call(this,e,t):r.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,r){var n=r(121),a=r(147).getWeakData,i=r(28),o=r(22),s=r(123),c=r(124),l=r(156),u=r(23),h=r(33),f=h.set,d=h.getterFor,p=l.find,g=l.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.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=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:m++,frozen:void 0}),null!=n&&c(n,e[l],e,r)})),p=d(t),g=function(e,t,r){var n=p(e),o=a(i(t),!0);return!0===o?v(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=a(e);return!0===r?v(t).delete(e):r&&u(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=a(e);return!0===r?v(t).has(e):r&&u(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=a(e);return!0===r?v(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),a=r(18),i=r(83),o=r(47),s=r(157),c=[].push,l=function(e){var t=1==e,r=2==e,l=3==e,u=4==e,h=6==e,f=5==e||h;return function(d,p,g,m){for(var v,y,b=i(d),w=a(b),S=n(p,g,3),k=o(w.length),_=0,A=m||s,x=t?A(d,k):r?A(d,0):void 0;k>_;_++)if((f||_ in w)&&(y=S(v=w[_],_,b),e))if(t)x[_]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:c.call(x,v)}else if(u)return!1;return h?-1:l||u?u:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,r){var n=r(22),a=r(158),i=r(57)("species");e.exports=function(e,t){var r;return a(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!a(r.prototype)?n(r)&&null===(r=r[i])&&(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(114),r(160),r(116);var n=r(43);e.exports=n.WeakSet},function(e,t,r){r(146)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(155))},function(e,t,r){r(162);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){var n=r(10),a=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return a(this,e)}})},function(e,t,r){r(164);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),a=r(49),i=String.fromCharCode,o=String.fromCodePoint;n({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(166),r(114),r(168),r(172),r(173),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);var n=r(43);e.exports=n.Symbol},function(e,t,r){var n=r(10),a=r(14),i=r(158),o=r(22),s=r(83),c=r(47),l=r(93),u=r(157),h=r(167),f=r(57),d=r(133),p=f("isConcatSpreadable"),g=9007199254740991,m="Maximum allowed index exceeded",v=d>=51||!a((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),y=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,r,n,a,i,o=s(this),h=u(o,0),f=0;for(t=-1,n=arguments.length;tg)throw TypeError(m);for(r=0;r=g)throw TypeError(m);l(h,f++,i)}return h.length=f,h}})},function(e,t,r){var n=r(14),a=r(57),i=r(133),o=a("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){var n=r(10),a=r(11),i=r(42),o=r(37),s=r(13),c=r(58),l=r(59),u=r(14),h=r(23),f=r(158),d=r(22),p=r(28),g=r(83),m=r(17),v=r(21),y=r(16),b=r(71),w=r(73),S=r(44),k=r(169),_=r(51),A=r(12),x=r(27),C=r(15),P=r(26),T=r(29),E=r(36),R=r(35),O=r(39),I=r(38),F=r(57),L=r(170),M=r(171),N=r(85),D=r(33),B=r(156).forEach,j=R("hidden"),U="Symbol",q="prototype",z=F("toPrimitive"),G=D.set,W=D.getterFor(U),H=Object[q],V=a.Symbol,X=i("JSON","stringify"),Y=A.f,K=x.f,J=k.f,Q=C.f,$=E("symbols"),Z=E("op-symbols"),ee=E("string-to-symbol-registry"),te=E("symbol-to-string-registry"),re=E("wks"),ne=a.QObject,ae=!ne||!ne[q]||!ne[q].findChild,ie=s&&u((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Y(H,t);n&&delete H[t],K(e,t,r),n&&e!==H&&K(H,t,n)}:K,oe=function(e,t){var r=$[e]=b(V[q]);return G(r,{type:U,tag:e,description:t}),s||(r.description=t),r},se=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof V},ce=function(e,t,r){e===H&&ce(Z,t,r),p(e);var n=v(t,!0);return p(r),h($,n)?(r.enumerable?(h(e,j)&&e[j][n]&&(e[j][n]=!1),r=b(r,{enumerable:y(0,!1)})):(h(e,j)||K(e,j,y(1,{})),e[j][n]=!0),ie(e,n,r)):K(e,n,r)},le=function(e,t){p(e);var r=m(t),n=w(r).concat(de(r));return B(n,(function(t){s&&!ue.call(r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=v(e,!0),r=Q.call(this,t);return!(this===H&&h($,t)&&!h(Z,t))&&(!(r||!h(this,t)||!h($,t)||h(this,j)&&this[j][t])||r)},he=function(e,t){var r=m(e),n=v(t,!0);if(r!==H||!h($,n)||h(Z,n)){var a=Y(r,n);return!a||!h($,n)||h(r,j)&&r[j][n]||(a.enumerable=!0),a}},fe=function(e){var t=J(m(e)),r=[];return B(t,(function(e){h($,e)||h(O,e)||r.push(e)})),r},de=function(e){var t=e===H,r=J(t?Z:m(e)),n=[];return B(r,(function(e){!h($,e)||t&&!h(H,e)||n.push($[e])})),n};c||(V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),r=function(e){this===H&&r.call(Z,e),h(this,j)&&h(this[j],t)&&(this[j][t]=!1),ie(this,t,y(1,e))};return s&&ae&&ie(H,t,{configurable:!0,set:r}),oe(t,e)},T(V[q],"toString",(function(){return W(this).tag})),T(V,"withoutSetter",(function(e){return oe(I(e),e)})),C.f=ue,x.f=ce,A.f=he,S.f=k.f=fe,_.f=de,L.f=function(e){return oe(F(e),e)},s&&(K(V[q],"description",{configurable:!0,get:function(){return W(this).description}}),o||T(H,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(w(re),(function(e){M(e)})),n({target:U,stat:!0,forced:!c},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=V(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(){ae=!0},useSimple:function(){ae=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?b(e):le(b(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:de}),n({target:"Object",stat:!0,forced:u((function(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(g(e))}}),X&&n({target:"JSON",stat:!0,forced:!c||u((function(){var e=V();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,r){for(var n,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);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}),a[1]=t,X.apply(null,a)}}),V[q][z]||P(V[q],z,V[q].valueOf),N(V,U),O[j]=!0},function(e,t,r){var n=r(17),a=r(44).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),a=r(23),i=r(170),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});a(t,e)||o(t,e,{value:i.f(e)})}},function(e,t,r){r(171)("asyncIterator")},function(e,t,r){var n=r(10),a=r(13),i=r(11),o=r(23),s=r(22),c=r(27).f,l=r(40),u=i.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new u(e):void 0===e?u():u(e);return""===e&&(h[t]=!0),t};l(f,u);var d=f.prototype=u.prototype;d.constructor=f;var p=d.toString,g="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=g?t.slice(7,-1):t.replace(m,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){r(171)("hasInstance")},function(e,t,r){r(171)("isConcatSpreadable")},function(e,t,r){r(171)("iterator")},function(e,t,r){r(171)("match")},function(e,t,r){r(171)("matchAll")},function(e,t,r){r(171)("replace")},function(e,t,r){r(171)("search")},function(e,t,r){r(171)("species")},function(e,t,r){r(171)("split")},function(e,t,r){r(171)("toPrimitive")},function(e,t,r){r(171)("toStringTag")},function(e,t,r){r(171)("unscopables")},function(e,t,r){r(85)(Math,"Math",!0)},function(e,t,r){var n=r(11);r(85)(n.JSON,"JSON",!0)},function(e,t,r){r(189);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){var n=r(10),a=r(190).start;n({target:"String",proto:!0,forced:r(192)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),a=r(191),i=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var c,l,u=String(i(t)),h=u.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?u:(c=d-h,(l=a.call(f,o(c/f.length))).length>c&&(l=l.slice(0,c)),e?u+l:l+u)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){var n=r(48),a=r(20);e.exports="".repeat||function(e){var t=String(a(this)),r="",i=n(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(r+=t);return r}},function(e,t,r){var n=r(127);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(194);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){var n=r(10),a=r(190).end;n({target:"String",proto:!0,forced:r(192)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(196);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),a=r(197).values;n({target:"Object",stat:!0},{values:function(e){return a(e)}})},function(e,t,r){var n=r(13),a=r(73),i=r(17),o=r(15).f,s=function(e){return function(t){for(var r,s=i(t),c=a(s),l=c.length,u=0,h=[];l>u;)r=c[u++],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){Object.defineProperty(t,"__esModule",{value:!0}),t.clearPrimitiveCaches=function(){l._clearCache(),c._clearCache(),h._clearCache()},t.isEOF=function(e){return e===s},t.isCmd=function(e,t){return e instanceof l&&(void 0===t||e.cmd===t)},t.isDict=g,t.isName=p,t.isRef=function(e){return e instanceof h},t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen},t.isStream=function(e){return"object"===i(e)&&null!==e&&void 0!==e.getBytes},t.RefSetCache=t.RefSet=t.Ref=t.Name=t.Dict=t.Cmd=t.EOF=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n};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 o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}r(5);var s={};t.EOF=s;var c=function(){var e=Object.create(null);function t(e){this.name=e}return t.prototype={},t.get=function(r){var n=e[r];return n||(e[r]=new t(r))},t._clearCache=function(){e=Object.create(null)},t}();t.Name=c;var l=function(){var e=Object.create(null);function t(e){this.cmd=e}return t.prototype={},t.get=function(r){var n=e[r];return n||(e[r]=new t(r))},t._clearCache=function(){e=Object.create(null)},t}();t.Cmd=l;var u=function(){var e=function(){return e};function t(t){this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=e}return t.prototype={assignXref:function(e){this.xref=e},get:function(e,t,r){var n=this._map[e];return void 0===n&&void 0!==t&&void 0===(n=this._map[t])&&void 0!==r&&(n=this._map[r]),n instanceof h&&this.xref?this.xref.fetch(n,this.suppressEncryption):n},getAsync:function(e,t,r){var n,i=this;return(n=a.default.mark((function n(){var o;return a.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0===(o=i._map[e])&&void 0!==t&&void 0===(o=i._map[t])&&void 0!==r&&(o=i._map[r]),!(o instanceof h&&i.xref)){n.next=4;break}return n.abrupt("return",i.xref.fetchAsync(o,i.suppressEncryption));case 4:return n.abrupt("return",o);case 5:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,a){var i=n.apply(e,t);function s(e){o(i,r,a,s,c,"next",e)}function c(e){o(i,r,a,s,c,"throw",e)}s(void 0)}))})()},getArray:function(e,t,r){var n=this.get(e,t,r);if(!Array.isArray(n)||!this.xref)return n;for(var a=0,i=(n=n.slice()).length;a0&&void 0!==arguments[0]&&arguments[0];return this.pdfDocument.cleanup(e)}},{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,i.unreachable)("Abstract method `ensure` called");case 1:case"end":return e.stop()}}),e)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){(0,i.unreachable)("Abstract method `requestRange` called")}},{key:"requestLoadedStream",value:function(){(0,i.unreachable)("Abstract method `requestLoadedStream` called")}},{key:"sendProgressiveData",value:function(e){(0,i.unreachable)("Abstract method `sendProgressiveData` called")}},{key:"updatePassword",value:function(e){this._password=e}},{key:"terminate",value:function(e){(0,i.unreachable)("Abstract method `terminate` called")}},{key:"docId",get:function(){return this._docId}},{key:"password",get:function(){return this._password}},{key:"docBaseUrl",get:function(){var e=null;if(this._docBaseUrl){var t=(0,i.createValidAbsoluteUrl)(this._docBaseUrl);t?e=t.href:(0,i.warn)('Invalid absolute docBaseUrl: "'.concat(this._docBaseUrl,'".'))}return(0,i.shadow)(this,"docBaseUrl",e)}}]),e}(),k=function(e){h(n,e);var t,r=d(n);function n(e,t,a,i,o){var s;y(this,n),(s=r.call(this))._docId=e,s._password=a,s._docBaseUrl=o,s.evaluatorOptions=i;var u=new l.Stream(t);return s.pdfDocument=new c.PDFDocument(p(s),u),s._loadedStreamPromise=Promise.resolve(u),s}return w(n,[{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){var i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(i=t[r])){e.next=3;break}return e.abrupt("return",i.apply(t,n));case 3:return e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return Promise.resolve()}},{key:"requestLoadedStream",value:function(){}},{key:"onLoadedStream",value:function(){return this._loadedStreamPromise}},{key:"terminate",value:function(e){}}]),n}(S);t.LocalPdfManager=k;var _=function(e){h(n,e);var t,r=d(n);function n(e,t,a,i,s){var l;return y(this,n),(l=r.call(this))._docId=e,l._password=a.password,l._docBaseUrl=s,l.msgHandler=a.msgHandler,l.evaluatorOptions=i,l.streamManager=new o.ChunkedStreamManager(t,{msgHandler:a.msgHandler,length:a.length,disableAutoFetch:a.disableAutoFetch,rangeChunkSize:a.rangeChunkSize}),l.pdfDocument=new c.PDFDocument(p(l),l.streamManager.getStream()),l}return w(n,[{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){var i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"!=typeof(i=t[r])){e.next=4;break}return e.abrupt("return",i.apply(t,n));case 4:return e.abrupt("return",i);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof s.MissingDataException){e.next=11;break}throw e.t0;case 11:return e.next=13,this.requestRange(e.t0.begin,e.t0.end);case 13:return e.abrupt("return",this.ensure(t,r,n));case 14:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return this.streamManager.requestRange(e,t)}},{key:"requestLoadedStream",value:function(){this.streamManager.requestAllChunks()}},{key:"sendProgressiveData",value:function(e){this.streamManager.onReceiveData({chunk:e})}},{key:"onLoadedStream",value:function(){return this.streamManager.onLoadedStream()}},{key:"terminate",value:function(e){this.streamManager.abort(e)}}]),n}(S);t.NetworkPdfManager=_},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedStreamManager=t.ChunkedStream=void 0;var n=r(5),a=r(201);function i(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(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}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=this.end?this.numChunks:Math.floor(t/this.chunkSize),a=r;a=t||t<=this.progressiveDataLength))for(var r=this.chunkSize,n=Math.floor(e/r),i=Math.floor((t-1)/r)+1,o=n;o=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){a>this.progressiveDataLength&&this.ensureRange(n,a);var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),o>this.progressiveDataLength&&this.ensureRange(n,o),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"skip",value:function(e){e||(e=1),this.pos+=e}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,t,r){function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[],a=t;a0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,a=this.getBeginChunk(n.begin),o=this.getEndChunk(n.end),s=a;s=0&&n+1!==o&&(t.push({beginChunk:r,endChunk:n+1}),r=o),a+1===e.length&&t.push({beginChunk:r,endChunk:o+1}),n=o}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,a=r?this.progressiveDataLength:e.begin,o=a+t.byteLength,s=Math.floor(a/this.chunkSize),c=o100){(0,n.warn)('getInheritableProperty: maximum loop count exceeded for "'.concat(a,'"'));break}r=r.get("Parent")}return t},t.toRomanNumerals=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,n.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,a=[];e>=1e3;)e-=1e3,a.push("M");r=e/100|0,e%=100,a.push(d[r]),r=e/10|0,e%=10,a.push(d[10+r]),a.push(d[20+e]);var i=a.join("");return t?i.toLowerCase():i},t.log2=function(e){return e<=0?0:Math.ceil(Math.log2(e))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var n=r(5);function a(e){return a="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},a(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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&&s(e,t)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var u=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,"Missing data [".concat(e,", ").concat(n,")"))).begin=e,a.end=n,a}return r}(n.BaseException);t.MissingDataException=u;var h=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(n.BaseException);t.XRefEntryException=h;var f=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(n.BaseException);t.XRefParseException=f;var d=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocument=t.Page=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(203),s=r(198),c=r(201),l=r(205),u=r(218),h=r(215),f=r(204),d=r(219),p=r(220),g=r(234);function m(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){m(i,n,a,o,s,"next",e)}function s(e){m(i,n,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||w(e,t)||function(){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 b(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function w(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);r1&&void 0!==arguments[1]&&arguments[1],r=(0,c.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&(0,s.isDict)(r[0])?s.Dict.merge(this.xref,r):r[0]:r}},{key:"_getBoundingBox",value:function(e){var t=this._getInheritableProperty(e,!0);if(Array.isArray(t)&&4===t.length){if(t[2]-t[0]!=0&&t[3]-t[1]!=0)return t;(0,i.warn)("Empty /".concat(e," entry."))}return null}},{key:"getContentStream",value:function(){var e,t=this.content;if(Array.isArray(t)){var r,n=this.xref,a=[],i=b(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;a.push(n.fetchIfRef(o))}}catch(e){i.e(e)}finally{i.f()}e=new l.StreamsSequenceStream(a)}else e=(0,s.isStream)(t)?t:new l.NullStream;return e}},{key:"loadResources",value:function(e){var t=this;return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((function(){return new o.ObjectLoader(t.resources,e,t.xref).load()}))}},{key:"getOperatorList",value:function(e){var t=this,r=e.handler,n=e.sink,a=e.task,o=e.intent,s=e.renderInteractiveForms,c=this.pdfManager.ensure(this,"getContentStream"),l=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),u=new p.PartialEvaluator({xref:this.xref,handler:r,pageIndex:this.pageIndex,idFactory:this.idFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions,pdfFunctionFactory:this.pdfFunctionFactory}),h=Promise.all([c,l]).then((function(e){var i=y(e,1)[0],s=new d.OperatorList(o,n,t.pageIndex);return r.send("StartRenderPage",{transparency:u.hasBlendModes(t.resources),pageIndex:t.pageIndex,intent:o}),u.getOperatorList({stream:i,task:a,resources:t.resources,operatorList:s}).then((function(){return s}))}));return Promise.all([h,this._parsedAnnotations]).then((function(e){var t=y(e,2),r=t[0],n=t[1];if(0===n.length)return r.flush(!0),{length:r.totalLength};var c,l=[],h=b(n);try{for(h.s();!(c=h.n()).done;){var f=c.value;C(f,o)&&l.push(f.getOperatorList(u,a,s).catch((function(e){return(0,i.warn)("getOperatorList - ignoring annotation data during "+'"'.concat(a.name,'" task: "').concat(e,'".')),null})))}}catch(e){h.e(e)}finally{h.f()}return Promise.all(l).then((function(e){r.addOp(i.OPS.beginAnnotations,[]);var t,n=b(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.addOpList(a)}}catch(e){n.e(e)}finally{n.f()}return r.addOp(i.OPS.endAnnotations,[]),r.flush(!0),{length:r.totalLength}}))}))}},{key:"extractTextContent",value:function(e){var t=this,r=e.handler,n=e.task,a=e.normalizeWhitespace,i=e.sink,o=e.combineTextItems,s=this.pdfManager.ensure(this,"getContentStream"),c=this.loadResources(["ExtGState","XObject","Font"]);return Promise.all([s,c]).then((function(e){var s=y(e,1)[0];return new p.PartialEvaluator({xref:t.xref,handler:r,pageIndex:t.pageIndex,idFactory:t.idFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,globalImageCache:t.globalImageCache,options:t.evaluatorOptions,pdfFunctionFactory:t.pdfFunctionFactory}).getTextContent({stream:s,task:n,resources:t.resources,normalizeWhitespace:a,combineTextItems:o,sink:i})}))}},{key:"getAnnotationsData",value:function(e){return this._parsedAnnotations.then((function(t){for(var r=[],n=0,a=t.length;n=360?e%=360:e<0&&(e=(e%360+360)%360),(0,i.shadow)(this,"rotate",e)}},{key:"annotations",get:function(){return(0,i.shadow)(this,"annotations",this._getInheritableProperty("Annots")||[])}},{key:"_parsedAnnotations",get:function(){var e=this,t=this.pdfManager.ensure(this,"annotations").then((function(){var t,r=[],n=b(e.annotations);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(u.AnnotationFactory.create(e.xref,a,e.pdfManager,e.idFactory).catch((function(e){return(0,i.warn)('_parsedAnnotations: "'.concat(e,'".')),null})))}}catch(e){n.e(e)}finally{n.f()}return Promise.all(r).then((function(e){return e.filter((function(e){return!!e}))}))}));return(0,i.shadow)(this,"_parsedAnnotations",t)}}]),e}();t.Page=P;var T=new Uint8Array([37,80,68,70,45]),E=new Uint8Array([115,116,97,114,116,120,114,101,102]),R=new Uint8Array([101,110,100,111,98,106]),O=/^[1-9]\.[0-9]$/;function I(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1024,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.length,i=e.peekBytes(r),o=i.length-a;if(o<=0)return!1;if(n)for(var s=a-1,c=i.length-1;c>=s;){for(var l=0;l=a)return e.pos+=c-s,!0;c--}else for(var u=0;u<=o;){for(var h=0;h=a)return e.pos+=u,!0;u++}return!1}var F=function(){function e(t,r){var n;if(k(this,e),(0,s.isStream)(r))n=r;else{if(!(0,i.isArrayBuffer)(r))throw new Error("PDFDocument: Unknown argument type");n=new l.Stream(r)}if(n.length<=0)throw new i.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=n,this.xref=new o.XRef(n,t),this.pdfFunctionFactory=new g.PDFFunctionFactory({xref:this.xref,isEvalSupported:t.evaluatorOptions.isEvalSupported}),this._pagePromises=[]}var t;return A(e,[{key:"parse",value:function(e){this.setup(e);var t=this.catalog.catDict.get("Version");(0,s.isName)(t)&&(this.pdfFormatVersion=t.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var r=this.acroForm.get("Fields");Array.isArray(r)&&0!==r.length||this.xfa||(this.acroForm=null)}}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("Cannot fetch AcroForm entry; assuming no AcroForms are present"),this.acroForm=null}try{var n=this.catalog.catDict.get("Collection");(0,s.isDict)(n)&&n.getKeys().length>0&&(this.collection=n)}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("Cannot fetch Collection dictionary.")}}},{key:"checkHeader",value:function(){var e=this.stream;if(e.reset(),I(e,T)){e.moveStart();for(var t,r="";(t=e.getByte())>32&&!(r.length>=12);)r+=String.fromCharCode(t);this.pdfFormatVersion||(this.pdfFormatVersion=r.substring(5))}}},{key:"parseStartXRef",value:function(){this.xref.setStartXRef(this.startXRef)}},{key:"setup",value:function(e){this.xref.parse(e),this.catalog=new o.Catalog(this.pdfManager,this.xref)}},{key:"_getLinearizationPage",value:function(e){var t=this.catalog,r=this.linearization,n=s.Ref.get(r.objectNumberFirst,0);return this.xref.fetchAsync(n).then((function(e){if((0,s.isDict)(e,"Page")||(0,s.isDict)(e)&&!e.has("Type")&&e.has("Contents"))return n&&!t.pageKidsCountCache.has(n)&&t.pageKidsCountCache.put(n,1),[e,n];throw new i.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")})).catch((function(r){return(0,i.info)(r),t.getPageDict(e)}))}},{key:"getPage",value:function(e){var t=this;if(void 0!==this._pagePromises[e])return this._pagePromises[e];var r=this.catalog,n=this.linearization,a=n&&n.pageFirst===e?this._getLinearizationPage(e):r.getPageDict(e);return this._pagePromises[e]=a.then((function(n){var a=y(n,2),i=a[0],o=a[1];return new P({pdfManager:t.pdfManager,xref:t.xref,pageIndex:e,pageDict:i,ref:o,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,globalImageCache:r.globalImageCache,pdfFunctionFactory:t.pdfFunctionFactory})}))}},{key:"checkFirstPage",value:function(){var e=this;return this.getPage(0).catch(function(){var t=v(a.default.mark((function t(r){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r instanceof c.XRefEntryException)){t.next=5;break}return e._pagePromises.length=0,t.next=4,e.cleanup();case 4:throw new c.XRefParseException;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"fontFallback",value:function(e,t){return this.catalog.fontFallback(e,t)}},{key:"cleanup",value:(t=v(a.default.mark((function e(){var t,r=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.abrupt("return",this.catalog?this.catalog.cleanup(t):(0,s.clearPrimitiveCaches)());case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"linearization",get:function(){var e=null;try{e=f.Linearization.create(this.stream)}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)(e)}return(0,i.shadow)(this,"linearization",e)}},{key:"startXRef",get:function(){var e=this.stream,t=0;if(this.linearization)e.reset(),I(e,R)&&(t=e.pos+6-e.start);else{for(var r=E.length,n=!1,a=e.end;!n&&a>0;)(a-=1024-r)<0&&(a=0),e.pos=a,n=I(e,E,1024,!0);if(n){var o;e.skip(9);do{o=e.getByte()}while((0,c.isWhiteSpace)(o));for(var s="";o>=32&&o<=57;)s+=String.fromCharCode(o),o=e.getByte();t=parseInt(s,10),isNaN(t)&&(t=0)}}return(0,i.shadow)(this,"startXRef",t)}},{key:"numPages",get:function(){var e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,i.shadow)(this,"numPages",t)}},{key:"documentInfo",get:function(){var e={Title:i.isString,Author:i.isString,Subject:i.isString,Keywords:i.isString,Creator:i.isString,Producer:i.isString,CreationDate:i.isString,ModDate:i.isString,Trapped:s.isName},t=this.pdfFormatVersion;"string"==typeof t&&O.test(t)||((0,i.warn)("Invalid PDF header version number: ".concat(t)),t=null);var r,n={PDFFormatVersion:t,IsLinearized:!!this.linearization,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa,IsCollectionPresent:!!this.collection};try{r=this.xref.trailer.get("Info")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("The document information dictionary is invalid.")}if((0,s.isDict)(r)){var a,o=b(r.getKeys());try{for(o.s();!(a=o.n()).done;){var l=a.value,u=r.get(l);if(e[l])e[l](u)?n[l]="string"!=typeof u?u:(0,i.stringToPDFString)(u):(0,i.info)('Bad value in document info for "'.concat(l,'".'));else if("string"==typeof l){var h=void 0;if((0,i.isString)(u))h=(0,i.stringToPDFString)(u);else{if(!((0,s.isName)(u)||(0,i.isNum)(u)||(0,i.isBool)(u))){(0,i.info)('Unsupported value in document info for (custom) "'.concat(l,'".'));continue}h=u}n.Custom||(n.Custom=Object.create(null)),n.Custom[l]=h}}}catch(e){o.e(e)}finally{o.f()}}return(0,i.shadow)(this,"documentInfo",n)}},{key:"fingerprint",get:function(){for(var e,t=this.xref.trailer.get("ID"),r=[],n=0,a=(e=Array.isArray(t)&&t[0]&&(0,i.isString)(t[0])&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==t[0]?(0,i.stringToBytes)(t[0]):(0,h.calculateMD5)(this.stream.getByteRange(0,1024),0,1024)).length;n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function S(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0;){var l=n.shift(),h=s.fetchIfRef(l.obj);if(null!==h){if(!h.has("Title"))throw new i.FormatError("Invalid outline item encountered.");var f={url:null,dest:null};e.parseDestDictionary({destDict:h,resultObj:f,docBaseUrl:this.pdfManager.docBaseUrl});var d=h.get("Title"),p=h.get("F")||0,g=h.getArray("C"),m=h.get("Count"),v=c;!Array.isArray(g)||3!==g.length||0===g[0]&&0===g[1]&&0===g[2]||(v=u.ColorSpace.singletons.rgb.getRgb(g,0));var y={dest:f.dest,url:f.url,unsafeUrl:f.unsafeUrl,newWindow:f.newWindow,title:(0,i.stringToPDFString)(d),color:v,count:Number.isInteger(m)?m:void 0,bold:!!(2&p),italic:!!(1&p),items:[]};l.parent.items.push(y),t=h.getRaw("First"),(0,o.isRef)(t)&&!a.has(t)&&(n.push({obj:t,parent:y}),a.put(t)),t=h.getRaw("Next"),(0,o.isRef)(t)&&!a.has(t)&&(n.push({obj:t,parent:l.parent}),a.put(t))}}return r.items.length>0?r.items:null}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(0,o.isDict)(e))return null;var t=e.get("P");if(!(0,i.isNum)(t))return null;t+=Math.pow(2,32);var r=[];for(var n in i.PermissionFlag){var a=i.PermissionFlag[n];t&a&&r.push(a)}return r}},{key:"getDestination",value:function(e){var t=this._readDests();return t instanceof R||t instanceof o.Dict?C(t.get(e)||null):null}},{key:"_readDests",value:function(){var e=this.catDict.get("Names");return e&&e.has("Dests")?new R(e.getRaw("Dests"),this.xref):this.catDict.has("Dests")?this.catDict.get("Dests"):void 0}},{key:"_readPageLabels",value:function(){var e=this.catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,n="",a=new O(e,this.xref).getAll(),s="",l=1,u=0,h=this.numPages;u=1))throw new i.FormatError("Invalid start in PageLabel dictionary.");l=g}else l=1}switch(r){case"D":s=l;break;case"R":case"r":s=(0,c.toRomanNumerals)(l,"r"===r);break;case"A":case"a":for(var m="a"===r?97:65,v=l-1,y=String.fromCharCode(m+v%26),b=[],w=0,S=v/26|0;w<=S;w++)b.push(y);s=b.join("");break;default:if(r)throw new i.FormatError('Invalid style "'.concat(r,'" in PageLabel dictionary.'));s=""}t[u]=n+s,l++}return t}},{key:"fontFallback",value:function(e,t){var r=[];return this.fontCache.forEach((function(e){r.push(e)})),Promise.all(r).then((function(r){var n,a=w(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i.loadedName===e)return void i.fallback(t)}}catch(e){a.e(e)}finally{a.f()}}))}},{key:"cleanup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,o.clearPrimitiveCaches)(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear();var r=[];return this.fontCache.forEach((function(e){r.push(e)})),Promise.all(r).then((function(t){var r,n=w(t);try{for(n.s();!(r=n.n()).done;)delete r.value.dict.translated}catch(e){n.e(e)}finally{n.f()}e.fontCache.clear(),e.builtInCMapCache.clear()}))}},{key:"getPageDict",value:function(e){var t,r=(0,i.createPromiseCapability)(),n=[this.catDict.getRaw("Pages")],a=new o.RefSet,s=this.xref,c=this.pageKidsCountCache,l=0;return function u(){for(var h=function(){var h=n.pop();if((0,o.isRef)(h))return(t=c.get(h))>0&&l+t=0){var f=h.objId;if(f&&!c.has(f)&&c.put(f,t),l+t<=e)return l+=t,"continue"}var d=h.get("Kids");if(!Array.isArray(d))return(0,o.isName)(h.get("Type"),"Page")||!h.has("Type")&&h.has("Contents")?l===e?(r.resolve([h,null]),{v:void 0}):(l++,"continue"):(r.reject(new i.FormatError("Page dictionary kids object is not an array.")),{v:void 0});for(var p=d.length-1;p>=0;p--)n.push(d[p])};n.length;){var f=h();if("continue"!==f&&"object"===b(f))return f.v}r.reject(new Error("Page index ".concat(e," not found.")))}(),r.promise}},{key:"getPageIndex",value:function(e){var t=this.xref,r=0;return function n(a){return function(r){var n,a=0;return t.fetchAsync(r).then((function(t){if((0,o.isRefsEqual)(r,e)&&!(0,o.isDict)(t,"Page")&&(!(0,o.isDict)(t)||t.has("Type")||!t.has("Contents")))throw new i.FormatError("The reference does not point to a /Page dictionary.");if(!t)return null;if(!(0,o.isDict)(t))throw new i.FormatError("Node must be a dictionary.");return n=t.getRaw("Parent"),t.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(0,o.isDict)(e))throw new i.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;for(var s=[],c=!1,l=0,u=e.length;l0&&(0===r||t>=n[r-1])&&t<=e.numPages}))&&(c=s);break;case"NumCopies":s>0&&(c=s);break;default:if("boolean"!=typeof s)throw new i.FormatError("viewerPreferences - expected a boolean value for: ".concat(a));c=s}void 0!==c?(n||(n=Object.create(null)),n[a]=c):(0,i.info)('Bad value in ViewerPreferences for "'.concat(a,'".'))}else(0,i.info)('Bad value in ViewerPreferences for "'.concat(a,'".'))}return(0,i.shadow)(this,"viewerPreferences",n)}},{key:"openAction",get:function(){var t=this.catDict.get("OpenAction"),r=null;if((0,o.isDict)(t)){var n=new o.Dict(this.xref);n.set("A",t);var a={url:null,dest:null,action:null};e.parseDestDictionary({destDict:n,resultObj:a}),Array.isArray(a.dest)?(r||(r=Object.create(null)),r.dest=a.dest):a.action&&(r||(r=Object.create(null)),r.action=a.action)}else Array.isArray(t)&&(r||(r=Object.create(null)),r.dest=t);return(0,i.shadow)(this,"openAction",r)}},{key:"attachments",get:function(){var e=this.catDict.get("Names"),t=null;if(e&&e.has("EmbeddedFiles")){var r=new R(e.getRaw("EmbeddedFiles"),this.xref).getAll();for(var n in r){var a=new I(r[n],this.xref);t||(t=Object.create(null)),t[(0,i.stringToPDFString)(n)]=a.serializable}}return(0,i.shadow)(this,"attachments",t)}},{key:"javaScript",get:function(){var e=this.catDict.get("Names"),t=null;function r(e){var r=e.get("S");if((0,o.isName)(r,"JavaScript")){var n=e.get("JS");if((0,o.isStream)(n))n=(0,i.bytesToString)(n.getBytes());else if(!(0,i.isString)(n))return;t||(t=[]),t.push((0,i.stringToPDFString)(n))}}if(e&&e.has("JavaScript")){var n=new R(e.getRaw("JavaScript"),this.xref).getAll();for(var a in n){var s=n[a];(0,o.isDict)(s)&&r(s)}}var c=this.catDict.get("OpenAction");return(0,o.isDict)(c)&&(0,o.isName)(c.get("S"),"JavaScript")&&r(c),(0,i.shadow)(this,"javaScript",t)}}],[{key:"parseDestDictionary",value:function(e){var t=e.destDict;if((0,o.isDict)(t)){var r=e.resultObj;if("object"===b(r)){var n,a,s=e.docBaseUrl||null,c=t.get("A");if(!(0,o.isDict)(c)&&t.has("Dest")&&(c=t.get("Dest")),(0,o.isDict)(c)){var l=c.get("S");if(!(0,o.isName)(l))return void(0,i.warn)("parseDestDictionary: Invalid type in Action dictionary.");var u=l.name;switch(u){case"URI":n=c.get("URI"),(0,o.isName)(n)?n="/"+n.name:(0,i.isString)(n)&&(n=function(e){return e.startsWith("www.")?"http://".concat(e):e}(n));break;case"GoTo":a=c.get("D");break;case"Launch":case"GoToR":var h=c.get("F");(0,o.isDict)(h)?n=h.get("F")||null:(0,i.isString)(h)&&(n=h);var f=c.get("D");if(f&&((0,o.isName)(f)&&(f=f.name),(0,i.isString)(n))){var d=n.split("#")[0];(0,i.isString)(f)?n=d+"#"+f:Array.isArray(f)&&(n=d+"#"+JSON.stringify(f))}var p=c.get("NewWindow");(0,i.isBool)(p)&&(r.newWindow=p);break;case"Named":var g=c.get("N");(0,o.isName)(g)&&(r.action=g.name);break;case"JavaScript":var m,v=c.get("JS");if((0,o.isStream)(v)?m=(0,i.bytesToString)(v.getBytes()):(0,i.isString)(v)&&(m=v),m){var y=new RegExp("^\\s*("+["app.launchURL","window.open"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec((0,i.stringToPDFString)(m));if(y&&y[2]){n=y[2],"true"===y[3]&&"app.launchURL"===y[1]&&(r.newWindow=!0);break}}default:(0,i.warn)('parseDestDictionary: unsupported action type "'.concat(u,'".'))}}else t.has("Dest")&&(a=t.get("Dest"));if((0,i.isString)(n)){n=function(e){try{return(0,i.stringToUTF8String)(e)}catch(t){return e}}(n);var w=(0,i.createValidAbsoluteUrl)(n,s);w&&(r.url=w.href),r.unsafeUrl=n}a&&((0,o.isName)(a)&&(a=a.name),((0,i.isString)(a)||Array.isArray(a))&&(r.dest=a))}else(0,i.warn)("parseDestDictionary: `resultObj` must be an object.")}else(0,i.warn)("parseDestDictionary: `destDict` must be a dictionary.")}}]),e}();t.Catalog=P;var T=function(){function e(e,t){this.stream=e,this.pdfManager=t,this.entries=[],this.xrefstms=Object.create(null),this._cacheMap=new Map,this.stats={streamTypes:Object.create(null),fontTypes:Object.create(null)}}return e.prototype={setStartXRef:function(e){this.startXRefQueue=[e]},parse:function(e){var t,r,n;e?((0,i.warn)("Indexing all PDF objects"),t=this.indexObjects()):t=this.readXRef(),t.assignXref(this),this.trailer=t;try{r=t.get("Encrypt")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)('XRef.parse - Invalid "Encrypt" reference: "'.concat(e,'".'))}if((0,o.isDict)(r)){var a=t.get("ID"),s=a&&a.length?a[0]:"";r.suppressEncryption=!0,this.encrypt=new l.CipherTransformFactory(r,s,this.pdfManager.password)}try{n=t.get("Root")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)('XRef.parse - Invalid "Root" reference: "'.concat(e,'".'))}if(!(0,o.isDict)(n)||!n.has("Pages")){if(!e)throw new c.XRefParseException;throw new i.FormatError("Invalid root reference")}this.root=n},processXRefTable:function(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});var t=this.readXRefTable(e);if(!(0,o.isCmd)(t,"trailer"))throw new i.FormatError("Invalid XRef table: could not find trailer dictionary");var r=e.getObj();if(!(0,o.isDict)(r)&&r.dict&&(r=r.dict),!(0,o.isDict)(r))throw new i.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,r},readXRefTable:function(e){var t,r=e.lexer.stream,n=this.tableState;for(r.pos=n.streamPos,e.buf1=n.parserBuf1,e.buf2=n.parserBuf2;;){if(!("firstEntryNum"in n)||!("entryCount"in n)){if((0,o.isCmd)(t=e.getObj(),"trailer"))break;n.firstEntryNum=t,n.entryCount=e.getObj()}var a=n.firstEntryNum,s=n.entryCount;if(!Number.isInteger(a)||!Number.isInteger(s))throw new i.FormatError("Invalid XRef table: wrong types in subsection header");for(var c=n.entryNum;c0;){var u=l[0],h=l[1];if(!Number.isInteger(u)||!Number.isInteger(h))throw new i.FormatError("Invalid XRef range fields: ".concat(u,", ").concat(h));if(!Number.isInteger(o)||!Number.isInteger(s)||!Number.isInteger(c))throw new i.FormatError("Invalid XRef entry fields length: ".concat(u,", ").concat(h));for(t=n.entryNum;t=e.length);)r+=String.fromCharCode(n),n=e[t];return r}function t(e,t,r){for(var n=r.length,a=e.length,i=0;t=n)break;t++,i++}return i}var r=/^(\d+)\s+(\d+)\s+obj\b/,n=/\bendobj[\b\s]$/,a=/\s+(\d+\s+\d+\s+obj[\b\s<])$/,l=new Uint8Array([116,114,97,105,108,101,114]),u=new Uint8Array([115,116,97,114,116,120,114,101,102]),h=new Uint8Array([111,98,106]),f=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var d=this.stream;d.pos=0;for(var p,g,m,v=d.getBytes(),y=d.start,b=v.length,w=[],S=[];y=b)break;k=v[y]}while(10!==k&&13!==k);else++y}for(p=0,g=S.length;p2&&void 0!==arguments[2]&&arguments[2],n=e.gen,a=e.num;if(t.gen!==n)throw new c.XRefEntryException("Inconsistent generation in XRef: ".concat(e));var i=this.stream.makeSubStream(t.offset+this.stream.start),l=new s.Parser({lexer:new s.Lexer(i),xref:this,allowStreams:!0}),u=l.getObj(),h=l.getObj(),f=l.getObj();if(u!==a||h!==n||!(f instanceof o.Cmd))throw new c.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e));if("obj"!==f.cmd){if(f.cmd.startsWith("obj")&&(a=parseInt(f.cmd.substring(3),10),!Number.isNaN(a)))return a;throw new c.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e))}return t=this.encrypt&&!r?l.getObj(this.encrypt.createCipherTransform(a,n)):l.getObj(),(0,o.isStream)(t)||this._cacheMap.set(a,t),t},fetchCompressed:function(e,t){var r=t.offset,n=this.fetch(o.Ref.get(r,0));if(!(0,o.isStream)(n))throw new i.FormatError("bad ObjStm stream");var a=n.dict.get("First"),l=n.dict.get("N");if(!Number.isInteger(a)||!Number.isInteger(l))throw new i.FormatError("invalid first and n parameters for ObjStm stream");for(var u=new s.Parser({lexer:new s.Lexer(n),xref:this,allowStreams:!0}),h=new Array(l),f=0;f0;){var a=t.fetchIfRef(n.shift());if((0,o.isDict)(a))if(a.has("Kids"))for(var s=a.get("Kids"),c=0,l=s.length;c10)return(0,i.warn)('Search depth limit reached for "'.concat(this._type,'" tree.')),null;var a=r.get("Kids");if(!Array.isArray(a))return null;for(var o=0,s=a.length-1;o<=s;){var c=o+s>>1,l=t.fetchIfRef(a[c]).get("Limits");if(et.fetchIfRef(l[1]))){r=t.fetchIfRef(a[c]);break}o=c+1}}if(o>s)return null}var u=r.get(this._type);if(Array.isArray(u)){for(var h=0,f=u.length-2;h<=f;){var d=h+f>>1,p=d+(1&d),g=t.fetchIfRef(u[p]);if(eg))return t.fetchIfRef(u[p+1]);h=p+2}}(0,i.info)('Falling back to an exhaustive search, for key "'.concat(e,'", ')+'in "'.concat(this._type,'" tree.'));for(var m=0,v=u.length;m0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof i.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!(0,i.isCmd)(this.buf1,"]")&&!(0,i.isEOF)(this.buf1);)r.push(this.getObj(e));if((0,i.isEOF)(this.buf1)){if(!this.recoveryMode)throw new a.FormatError("End of file inside array");return r}return this.shift(),r;case"<<":for(var n=new i.Dict(this.xref);!(0,i.isCmd)(this.buf1,">>")&&!(0,i.isEOF)(this.buf1);)if((0,i.isName)(this.buf1)){var o=this.buf1.name;if(this.shift(),(0,i.isEOF)(this.buf1))break;n.set(o,this.getObj(e))}else(0,a.info)("Malformed dictionary: key must be a name object"),this.shift();if((0,i.isEOF)(this.buf1)){if(!this.recoveryMode)throw new a.FormatError("End of file inside dictionary");return n}return(0,i.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(n,e):n:(this.shift(),n);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,i.isCmd)(this.buf2,"R")){var s=i.Ref.get(t,this.buf1);return this.shift(),this.shift(),s}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,n=e.pos,i=0;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if((0,a.assert)(2===i,"findDefaultInlineStreamEnd - invalid state."),32===t||10===t||13===t){r=e.pos;for(var s=e.peekBytes(10),c=0,l=s.length;c127)){i=0;break}if(2===i)break}else i=0;-1===t&&((0,a.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&((0,a.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var u=4;return e.skip(-u),t=e.peekByte(),e.skip(u),(0,o.isWhiteSpace)(t)||u--,e.pos-u-n}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,n=e.pos,i=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(i)break}var o=e.pos-n;return-1===t?((0,a.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-o),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),o)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var n=e.pos;for(t=e.peekByte();(0,o.isWhiteSpace)(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>n){var i=e.peekBytes(2);if(69===i[0]&&73===i[1])break}}var s=e.pos-r;return-1===t?((0,a.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-s),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),s)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var n=e.pos-r;return-1===t?((0,a.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,n=r.stream,o=new i.Dict(this.xref);!(0,i.isCmd)(this.buf1,"ID")&&!(0,i.isEOF)(this.buf1);){if(!(0,i.isName)(this.buf1))throw new a.FormatError("Dictionary key must be a name object");var s=this.buf1.name;if(this.shift(),(0,i.isEOF)(this.buf1))break;o.set(s,this.getObj(e))}-1!==r.beginInlineImagePos&&(t=n.pos-r.beginInlineImagePos);var c,l=o.get("Filter","F");if((0,i.isName)(l))c=l.name;else if(Array.isArray(l)){var u=this.xref.fetchIfRef(l[0]);(0,i.isName)(u)&&(c=u.name)}var h,f=n.pos;h="DCTDecode"===c||"DCT"===c?this.findDCTDecodeInlineStreamEnd(n):"ASCII85Decode"===c||"A85"===c?this.findASCII85DecodeInlineStreamEnd(n):"ASCIIHexDecode"===c||"AHx"===c?this.findASCIIHexDecodeInlineStreamEnd(n):this.findDefaultInlineStreamEnd(n);var d,g=n.makeSubStream(f,h,o);if(h<1e3&&t<5552){var m=g.getBytes();g.reset();var v=n.pos;n.pos=r.beginInlineImagePos;var y=n.getBytes(t);n.pos=v,d=p(m)+"_"+p(y);var b=this.imageCache[d];if(void 0!==b)return this.buf2=i.Cmd.get("EI"),this.shift(),b.reset(),b}return e&&(g=e.createStream(g,h)),(g=this.filter(g,o,h)).dict=o,void 0!==d&&(g.cacheKey="inline_".concat(h,"_").concat(d),this.imageCache[d]=g),this.buf2=i.Cmd.get("EI"),this.shift(),g}},{key:"_findStreamLength",value:function(e,t){var r=this.lexer.stream;r.pos=e;for(var n=t.length;r.pos=n)return r.pos+=o,r.pos-e;o++}r.pos+=i}return-1}},{key:"makeStream",value:function(e,t){var r=this.lexer,n=r.stream;r.skipToNextLine();var s=n.pos-1,c=e.get("Length");if(Number.isInteger(c)||((0,a.info)('Bad length "'.concat(c,'" in stream')),c=0),n.pos=s+c,r.nextChar(),this.tryShift()&&(0,i.isCmd)(this.buf2,"endstream"))this.shift();else{var l=new Uint8Array([101,110,100,115,116,114,101,97,109]),u=this._findStreamLength(s,l);if(u<0){for(var h=1;h<=1;h++){var f=l.length-h,d=l.slice(0,f),p=this._findStreamLength(s,d);if(p>=0){var g=n.peekBytes(f+1)[f];if(!(0,o.isWhiteSpace)(g))break;(0,a.info)('Found "'.concat((0,a.bytesToString)(d),'" when ')+"searching for endstream command."),u=p;break}}if(u<0)throw new a.FormatError("Missing endstream command.")}c=u,r.nextChar(),this.shift(),this.shift()}return this.shift(),n=n.makeSubStream(s,c,e),t&&(n=t.createStream(n,c)),(n=this.filter(n,e,c)).dict=e,n}},{key:"filter",value:function(e,t,r){var n=t.get("Filter","F"),o=t.get("DecodeParms","DP");if((0,i.isName)(n))return Array.isArray(o)&&(0,a.warn)("/DecodeParms should not contain an Array, when /Filter contains a Name."),this.makeFilter(e,n.name,r,o);var s=r;if(Array.isArray(n))for(var c=n,l=o,u=0,h=c.length;u=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;h(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}return d(e,[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,n=0;if(45===e?(n=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(n=1,e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){if(10===r&&0===n&&((0,o.isWhiteSpace)(e)||-1===e))return(0,a.warn)("Lexer.getNumber - treating a single decimal point as zero."),0;throw new a.FormatError("Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")"))}n=n||1;for(var i=e-48,s=0,c=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var l=e-48;t?s=10*s+l:(0!==r&&(r*=10),i=10*i+l)}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,a.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)c=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(i/=r),t&&(i*=Math.pow(10,c*s)),n*i}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var n=this.nextChar();;){var i=!1;switch(0|n){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(n=this.nextChar()){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(n));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var o=15&n;i=!0,(n=this.nextChar())>=48&&n<=55&&(o=(o<<3)+(15&n),(n=this.nextChar())>=48&&n<=55&&(i=!1,o=(o<<3)+(15&n))),r.push(String.fromCharCode(o));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(n))}break;default:r.push(String.fromCharCode(n))}if(t)break;i||(n=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!m[e];)if(35===e){if(e=this.nextChar(),m[e]){(0,a.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var n=v(e);if(-1!==n){t=e;var o=v(e=this.nextChar());if(-1===o){if((0,a.warn)("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),m[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(n<<4|o))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&(0,a.warn)("Name token is longer than allowed by the spec: ".concat(r.length)),i.Name.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,a.warn)("getHexString - ignoring invalid character: ".concat(e)):(0,a.warn)("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t,r,n=this.currentChar,i=!0;for(this._hexStringNumWarn=0;;){if(n<0){(0,a.warn)("Unterminated hex string");break}if(62===n){this.nextChar();break}if(1!==m[n]){if(i){if(-1===(t=v(n))){this._hexStringWarn(n),n=this.nextChar();continue}}else{if(-1===(r=v(n))){this._hexStringWarn(n),n=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}i=!i,n=this.nextChar()}else n=this.nextChar()}return e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return i.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==m[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),i.Cmd.get("[");case 93:return this.nextChar(),i.Cmd.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),i.Cmd.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),i.Cmd.get(">>")):i.Cmd.get(">");case 123:return this.nextChar(),i.Cmd.get("{");case 125:return this.nextChar(),i.Cmd.get("}");case 41:throw this.nextChar(),new a.FormatError("Illegal character: ".concat(t))}for(var r=String.fromCharCode(t),n=this.knownCommands,o=n&&void 0!==n[r];(t=this.nextChar())>=0&&!m[t];){var s=r+String.fromCharCode(t);if(o&&void 0===n[s])break;if(128===r.length)throw new a.FormatError("Command token too long: ".concat(r.length));r=s,o=n&&void 0!==n[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),i.Cmd.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}]),e}();t.Lexer=y;var b=function(){function e(){h(this,e)}return d(e,null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.get(t);if(Number.isInteger(n)&&(r?n>=0:n>0))return n;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,n,o=new g({lexer:new y(e),xref:null}),s=o.getObj(),c=o.getObj(),l=o.getObj(),u=o.getObj();if(!(Number.isInteger(s)&&Number.isInteger(c)&&(0,i.isCmd)(l,"obj")&&(0,i.isDict)(u)&&(0,a.isNum)(r=u.get("Linearized"))&&r>0))return null;if((n=t(u,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:n,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var n=0;n0))throw new Error("Hint (".concat(n,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(u),objectNumberFirst:t(u,"O"),endFirst:t(u,"E"),numPages:t(u,"N"),mainXRefEntriesOffset:t(u,"T"),pageFirst:u.has("P")?t(u,"P",!0):0}}}]),e}();t.Linearization=b},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=t.StringStream=t.StreamsSequenceStream=t.Stream=t.RunLengthStream=t.PredictorStream=t.NullStream=t.FlateStream=t.DecodeStream=t.DecryptStream=t.AsciiHexStream=t.Ascii85Stream=void 0;var n=r(5),a=r(198),i=r(201);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(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}}(e)||function(){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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},getBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s},peekByte:function(){var e=this.getByte();return-1!==e&&this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},getByteRange:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(t,r,n){return new e(this.bytes.buffer,t,r,n)}},e}();t.Stream=c;var l=function(){function e(e){var t=(0,n.stringToBytes)(e);c.call(this,t)}return e.prototype=c.prototype,e}();t.StringStream=l;var u=function(){var e=new Uint8Array(0);function t(t){if(this._rawMinBufferLength=t||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=e,this.minBufferLength=512,t)for(;this.minBufferLength1&&void 0!==arguments[1]&&arguments[1],n=this.pos;if(e){for(this.ensureBuffer(n+e),t=n+e;!this.eof&&this.bufferLengtha&&(t=a)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}this.pos=t;var i=this.buffer.subarray(n,t);return!r||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)},peekByte:function(){var e=this.getByte();return-1!==e&&this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new c(this.buffer,e,t,r)},getByteRange:function(e,t){(0,n.unreachable)("Should not call DecodeStream.getByteRange")},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},t}();t.DecodeStream=u;var h=function(){function e(e){this.streams=e;for(var t=0,r=0,n=e.length;r>e,this.codeSize=a-=e,t},o.prototype.getCode=function(e){for(var t,r=this.str,a=e[0],i=e[1],o=this.codeSize,s=this.codeBuf;o>16,u=65535&c;if(l<1||o>l,this.codeSize=o-l,u},o.prototype.generateHuffmanTable=function(e){var t,r=e.length,n=0;for(t=0;tn&&(n=e[t]);for(var a=1<>=1;for(t=u;t>=1)){var u,h;if(1===l)u=a,h=i;else{if(2!==l)throw new n.FormatError("Unknown block type in flate stream");var f,d=this.getBits(5)+257,p=this.getBits(5)+1,g=this.getBits(4)+4,m=new Uint8Array(e.length);for(f=0;f0;)k[f++]=w}u=this.generateHuffmanTable(k.subarray(0,d)),h=this.generateHuffmanTable(k.subarray(d,S))}for(var x=(o=this.buffer)?o.length:0,C=this.bufferLength;;){var P=this.getCode(u);if(P<256)C+1>=x&&(x=(o=this.ensureBuffer(C+1)).length),o[C++]=P;else{if(256===P)return void(this.bufferLength=C);var T=(P=t[P-=257])>>16;T>0&&(T=this.getBits(T)),s=(65535&P)+T,P=this.getCode(h),(T=(P=r[P])>>16)>0&&(T=this.getBits(T));var E=(65535&P)+T;C+s>=x&&(x=(o=this.ensureBuffer(C+s)).length);for(var R=0;R15))throw new n.FormatError("Unsupported predictor: ".concat(i));this.readBlock=2===i?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;var o=this.colors=r.get("Colors")||1,s=this.bits=r.get("BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;return this.pixBytes=o*s+7>>3,this.rowBytes=c*o*s+7>>3,u.call(this,t),this}return e.prototype=Object.create(u.prototype),e.prototype.readBlockTiff=function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),n=this.bits,a=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var o,s=0,c=0,l=0,u=0,h=t;if(1===n&&1===a)for(o=0;o>1,f^=f>>2,s=(1&(f^=f>>4))<<7,r[h++]=f}else if(8===n){for(o=0;o>8&255,r[h++]=255&p}}else{var g=new Uint8Array(a+1),m=(1<>l-n)&m,l-=n,c=c<=8&&(r[y++]=c>>u-8&255,u-=8);u>0&&(r[y++]=(c<<8-u)+(s&(1<<8-u)-1))}this.bufferLength+=e}},e.prototype.readBlockPng=function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),a=this.str.getBytes(e);if(this.eof=!a.length,!this.eof){var i=this.bufferLength,o=this.ensureBuffer(i+e),s=o.subarray(i-e,i);0===s.length&&(s=new Uint8Array(e));var c,l,u,h=i;switch(r){case 0:for(c=0;c>1)+a[c];for(;c>1)+a[c]&255,h++;break;case 4:for(c=0;c0;e=(0,this.decrypt)(e,!t);var r,n=this.bufferLength,a=e.length,i=this.ensureBuffer(n+a);for(r=0;r=0;--n)r[a+n]=255&s,s>>=8}}else this.eof=!0},e}();t.Ascii85Stream=g;var m=function(){function e(e,t){this.str=e,this.dict=e.dict,this.firstDigit=-1,t&&(t*=.5),u.call(this,t)}return e.prototype=Object.create(u.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(8e3);if(e.length){for(var t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t),n=this.bufferLength,a=this.firstDigit,i=0,o=e.length;i=48&&c<=57)s=15&c;else{if(!(c>=65&&c<=70||c>=97&&c<=102)){if(62===c){this.eof=!0;break}continue}s=9+(15&c)}a<0?a=s:(r[n++]=a<<4|s,a=-1)}a>=0&&this.eof&&(r[n++]=a<<4,a=-1),this.firstDigit=a,this.bufferLength=n}else this.eof=!0},e}();t.AsciiHexStream=m;var v=function(){function e(e,t){this.str=e,this.dict=e.dict,u.call(this,t)}return e.prototype=Object.create(u.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])this.eof=!0;else{var t,r=this.bufferLength,n=e[0];if(n<128){if((t=this.ensureBuffer(r+n+1))[r++]=e[1],n>0){var a=this.str.getBytes(n);t.set(a,r),r+=n}}else{n=257-n;var i=e[1];t=this.ensureBuffer(r+n+1);for(var o=0;o>>t&(1<0;if(v<256)f[0]=v,d=1;else{if(!(v>=258)){if(256===v){u=9,o=258,d=0;continue}this.eof=!0,delete this.lzwState;break}if(v=0;t--)f[t]=s[r],r=l[r];else f[d++]=f[0]}if(y&&(l[o]=h,c[o]=c[h]+1,s[o]=f[0],u=++o+i&o+i-1?u:0|Math.min(Math.log(o+i)/.6931471805599453+1,12)),h=v,n<(p+=d)){do{n+=512}while(n1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0;var r,n=t.EndOfBlock;for(null==n&&(n=!0),this.eoblock=n,this.black=t.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}return c.prototype={readNextChar:function(){if(this.eof)return-1;var t,r,a,i,o,s=this.refLine,c=this.codingLine,l=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var u,h,f;if(this.err=!1,this.nextLine2D){for(i=0;c[i]=64);do{h+=f=this._getWhiteCode()}while(f>=64)}else{do{u+=f=this._getWhiteCode()}while(f>=64);do{h+=f=this._getBlackCode()}while(f>=64)}for(this._addPixels(c[this.codingPos]+u,r),c[this.codingPos]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]=64);else do{u+=f=this._getWhiteCode()}while(f>=64);this._addPixels(c[this.codingPos]+u,r),r^=1}var d=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(u=this._lookBits(12),this.eoline)for(;u!==e&&1!==u;)this._eatBits(1),u=this._lookBits(12);else for(;0===u;)this._eatBits(1),u=this._lookBits(12);1===u?(this._eatBits(12),d=!0):u===e&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&d&&this.byteAlign){if(1===(u=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(i=0;i<4;++i)1!==(u=this._lookBits(12))&&(0,n.info)("bad rtc code: "+u),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((u=this._lookBits(13))===e)return this.eof=!0,-1;if(u>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&u))}c[0]>0?this.outputBits=c[this.codingPos=0]:this.outputBits=c[this.codingPos=1],this.row++}if(this.outputBits>=8)o=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&c[this.codingPos]a?(o<<=a,1&this.codingPos||(o|=255>>8-a),this.outputBits-=a,a=0):(o<<=this.outputBits,1&this.codingPos||(o|=255>>8-this.outputBits),a-=this.outputBits,this.outputBits=0,c[this.codingPos]0&&(o<<=a,a=0))}while(a)}return this.black&&(o^=255),o},_addPixels:function(e,t){var r=this.codingLine,a=this.codingPos;e>r[a]&&(e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e),this.codingPos=a},_addPixelsNeg:function(e,t){var r=this.codingLine,a=this.codingPos;if(e>r[a])e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e;else if(e0&&e=i){var c=n[s-i];if(c[0]===o)return this._eatBits(o),[!0,c[1],!0]}}return[!1,0,!1]},_getTwoDimCode:function(){var r,a=0;if(this.eoblock){if(a=this._lookBits(7),(r=t[a])&&r[0]>0)return this._eatBits(r[0]),r[1]}else{var i=this._findTableCode(1,7,t);if(i[0]&&i[2])return i[1]}return(0,n.info)("Bad two dim code"),e},_getWhiteCode:function(){var t,i=0;if(this.eoblock){if((i=this._lookBits(12))===e)return 1;if((t=i>>5==0?r[i]:a[i>>3])[0]>0)return this._eatBits(t[0]),t[1]}else{var o=this._findTableCode(1,9,a);if(o[0])return o[1];if((o=this._findTableCode(11,12,r))[0])return o[1]}return(0,n.info)("bad white code"),this._eatBits(1),1},_getBlackCode:function(){var t,r;if(this.eoblock){if((t=this._lookBits(13))===e)return 1;if((r=t>>7==0?i[t]:t>>9==0&&t>>7!=0?o[(t>>1)-64]:s[t>>7])[0]>0)return this._eatBits(r[0]),r[1]}else{var a=this._findTableCode(2,6,s);if(a[0])return a[1];if((a=this._findTableCode(7,12,o,64))[0])return a[1];if((a=this._findTableCode(10,13,i))[0])return a[1]}return(0,n.info)("bad black code"),this._eatBits(1),1},_lookBits:function(t){for(var r;this.inputBits>16-t;this.inputBuf=this.inputBuf<<8|r,this.inputBits+=8}return this.inputBuf>>this.inputBits-t&65535>>16-t},_eatBits:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}},c}();t.CCITTFaxDecoder=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var n=r(198),a=r(205),i=r(209),o=r(5),s=function(){function e(e,t,r,n){this.stream=e,this.maybeLength=t,this.dict=r,this.params=n,a.DecodeStream.call(this,t)}return e.prototype=Object.create(a.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e=new i.Jbig2Image,t=[];if((0,n.isDict)(this.params)){var r=this.params.get("JBIG2Globals");if((0,n.isStream)(r)){var a=r.getBytes();t.push({data:a,start:0,end:a.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});for(var o=e.parseChunks(t),s=o.length,c=0;c>>0}var o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?s:s>0?-s:null}function s(e,t,r){for(var n=e.getContexts("IAID"),a=1,i=0;i=F&&C=L)for(z=z<<1&y,d=0;d=0&&T=0&&(R=B[P][T])&&(z|=R<=e?F<<=1:F=F<<1|A[O][I];for(f=0;f=k||I<0||I>=S?F<<=1:F=F<<1|n[O][I];var L=x.readBit(C,F);E[R]=L}}return A}function m(e,t,n,a,i,o,c,l,u,f,d,p,m,v,y,b,w,S,k){if(e&&t)throw new h("refinement with Huffman is not supported");var _,A,x=[];for(_=0;_1&&(I=e?k.readBits(S):r(T,"IAIT",P));var F=c*E+I,L=e?v.symbolIDTable.decode(k):s(T,P,u),M=t&&(e?k.readBit():r(T,"IARI",P)),N=l[L],D=N[0].length,B=N.length;if(M){var j=r(T,"IARDW",P),U=r(T,"IARDH",P);N=g(D+=j,B+=U,y,N,(j>>1)+r(T,"IARDX",P),(U>>1)+r(T,"IARDY",P),!1,b,w)}var q,z,G,W=F-(1&p?0:B-1),H=O-(2&p?D-1:0);if(f){for(q=0;q>5&7,u=[31&s],f=t+6;if(7===s){l=536870911&(0,a.readUint32)(e,f-1),f+=3;var d=l+7>>3;for(u[0]=e[f++];--d>0;)u.push(e[f++])}else if(5===s||6===s)throw new h("invalid referred-to flags");r.retainBits=u;var p=4;r.number<=256?p=1:r.number<=65536&&(p=2);var g,m,v=[];for(g=0;g>>24&255,_[3]=S.height>>16&255,_[4]=S.height>>8&255,_[5]=255&S.height,g=f,m=e.length;g>2&3,f.huffmanDWSelector=d>>4&3,f.bitmapSizeSelector=d>>6&1,f.aggregationInstancesSelector=d>>7&1,f.bitmapCodingContextUsed=!!(256&d),f.bitmapCodingContextRetained=!!(512&d),f.template=d>>10&3,f.refinementTemplate=d>>12&1,l+=2,!f.huffman){for(o=0===f.template?4:1,n=[],i=0;i>2&3,p.stripSize=1<>4&3,p.transposed=!!(64&g),p.combinationOperator=g>>7&3,p.defaultPixelValue=g>>9&1,p.dsOffset=g<<17>>27,p.refinementTemplate=g>>15&1,p.huffman){var m=(0,a.readUint16)(c,l);l+=2,p.huffmanFS=3&m,p.huffmanDS=m>>2&3,p.huffmanDT=m>>4&3,p.huffmanRefinementDW=m>>6&3,p.huffmanRefinementDH=m>>8&3,p.huffmanRefinementDX=m>>10&3,p.huffmanRefinementDY=m>>12&3,p.huffmanRefinementSizeSelector=!!(16384&m)}if(p.refinement&&!p.refinementTemplate){for(n=[],i=0;i<2;i++)n.push({x:(0,a.readInt8)(c,l),y:(0,a.readInt8)(c,l+1)}),l+=2;p.refinementAt=n}p.numberOfSymbolInstances=(0,a.readUint32)(c,l),l+=4,r=[p,s.referredTo,c,l,u];break;case 16:var v={},y=c[l++];v.mmr=!!(1&y),v.template=y>>1&3,v.patternWidth=c[l++],v.patternHeight=c[l++],v.maxPatternIndex=(0,a.readUint32)(c,l),l+=4,r=[v,s.number,c,l,u];break;case 22:case 23:var S={};S.info=b(c,l),l+=w;var k=c[l++];S.mmr=!!(1&k),S.template=k>>1&3,S.enableSkip=!!(8&k),S.combinationOperator=k>>4&7,S.defaultPixelValue=k>>7&1,S.gridWidth=(0,a.readUint32)(c,l),l+=4,S.gridHeight=(0,a.readUint32)(c,l),l+=4,S.gridOffsetX=4294967295&(0,a.readUint32)(c,l),l+=4,S.gridOffsetY=4294967295&(0,a.readUint32)(c,l),l+=4,S.gridVectorX=(0,a.readUint16)(c,l),l+=2,S.gridVectorY=(0,a.readUint16)(c,l),l+=2,r=[S,s.referredTo,c,l,u];break;case 38:case 39:var _={};_.info=b(c,l),l+=w;var A=c[l++];if(_.mmr=!!(1&A),_.template=A>>1&3,_.prediction=!!(8&A),!_.mmr){for(o=0===_.template?4:1,n=[],i=0;i>2&1,x.combinationOperator=C>>3&3,x.requiresBuffer=!!(32&C),x.combinationOperatorOverride=!!(64&C),r=[x];break;case 49:case 50:case 51:case 62:break;case 53:r=[s.number,c,l,u];break;default:throw new h("segment type ".concat(s.typeName,"(").concat(s.type,")")+" is not implemented")}var P="on"+s.typeName;P in t&&t[P].apply(t,r)}function k(e,t){for(var r=0,n=e.length;r0&&this.rootNode.buildTree(a,a.prefixLength-1)}}_.prototype={onPageInformation:function(e){this.currentPageInfo=e;var t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,a=r.length;n>3,u=o.combinationOperatorOverride?e.combinationOperator:o.combinationOperator,f=this.buffer,d=128>>(7&e.x),p=e.y*l+(e.x>>3);switch(u){case 0:for(r=0;r>=1)||(a=128,i++);p+=l}break;case 2:for(r=0;r>=1)||(a=128,i++);p+=l}break;default:throw new h("operator ".concat(u," is not supported"))}},onImmediateGenericRegion:function(e,r,n,a){var i=e.info,o=new t(r,n,a),s=p(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(i,s)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,n,i,o,c,l){var u,f;e.huffman&&(u=function(e,t,r){var n,a,i,o,s=0;switch(e.huffmanDHSelector){case 0:case 1:n=T(e.huffmanDHSelector+4);break;case 3:n=R(s,t,r),s++;break;default:throw new h("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:a=T(e.huffmanDWSelector+2);break;case 3:a=R(s,t,r),s++;break;default:throw new h("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=R(s,t,r),s++):i=T(1),o=e.aggregationInstancesSelector?R(s,t,r):T(1),{tableDeltaHeight:n,tableDeltaWidth:a,tableBitmapSize:i,tableAggregateInstances:o}}(e,i,this.customTables),f=new E(o,c,l));var d=this.symbols;d||(this.symbols=d={});for(var v=[],y=0,b=i.length;y1)R=m(e,t,C,k,0,L,1,n.concat(S),_,0,0,1,0,c,f,d,v,0,y);else{var M=s(x,A,_),N=r(x,"IARDX",A),D=r(x,"IARDY",A);R=g(C,k,f,M=32){var f=void 0,d=void 0,p=void 0;switch(u){case 32:if(0===l)throw new h("no previous value in symbol ID table");d=a.readBits(2)+3,f=i[l-1].prefixLength;break;case 33:d=a.readBits(3)+3,f=0;break;case 34:d=a.readBits(7)+11,f=0;break;default:throw new h("invalid code length in symbol ID table")}for(p=0;p=0;y--)R=e?I(T,l,u,!0):p(!1,l,u,r,!1,null,P,v),q[y]=R;for(O=0;O=0;b--)M|=(L=q[b][O][F]^L)<>8,(D=f+O*m+F*g>>8)>=0&&D+A<=n&&B>=0&&B+x<=i)for(y=0;y=i))for(U=S[G],j=N[y],b=0;b=0&&z>1&7),h=1+(o>>4&7),f=[],d=s;do{n=l.readBits(u),i=l.readBits(h),f.push(new A([d,n,i,0])),d+=1<>t&1;if(t<=0)this.children[r]=new x(e);else{var n=this.children[r];n||(this.children[r]=n=new x(null)),n.buildTree(e,t-1)}},decodeNode:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new h("invalid Huffman data");return r.decodeNode(e)}},C.prototype={decode:function(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function(e){for(var t=e.length,r=0,n=0;n>f&1,f--}if(n&&!l)for(var p=0;p<5&&-1!==s.readNextChar();p++);return c}function F(){}return E.prototype={readBit:function(){if(this.shift<0){if(this.position>=this.end)throw new h("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e},readBits:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}},F.prototype={parseChunks:function(e){return function(e){for(var t=new _,r=0,n=e.length;r>=1;return{imgData:d,width:l,height:u}}(e),r=t.imgData,n=t.width,i=t.height;return this.width=n,this.height=i,r}},F}();t.Jbig2Image=f},function(e,t,r){function n(e,t){for(var r=0;r>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var t,r,i;return t=e,(r=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,n=e[t]>>1,i=1&e[t],o=a[n],s=o.qe,c=this.a-s;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&c));return this.a=c,e[t]=n<<1|i,r}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ArithmeticDecoder=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var n=r(205),a=r(198),i=r(212),o=r(5),s=function(){function e(e,t,r,a){for(var i;-1!==(i=e.getByte());)if(255===i){e.skip(-1);break}this.stream=e,this.maybeLength=t,this.dict=r,this.params=a,n.DecodeStream.call(this,t)}return e.prototype=Object.create(n.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(t)){for(var r=this.dict.get("BitsPerComponent")||8,n=t.length,o=new Int32Array(n),s=!1,c=(1<0&&void 0!==arguments[0]?arguments[0]:{},t=e.decodeTransform,r=void 0===t?null:t,n=e.colorTransform,a=void 0===n?-1:n;this._decodeTransform=r,this._colorTransform=a}function m(e,t){for(var r,n,a=0,i=[],o=16;o>0&&!e[o-1];)o--;i.push({children:[],index:0});var s,c=i[0];for(r=0;r0;)c=i.pop();for(c.index++,i.push(c);i.length<=r;)i.push(s={children:[],index:0}),c.children[c.index]=s.children,c=s;a++}r+19&&void 0!==arguments[9]&&arguments[9],y=o.mcusPerLine,b=o.progressive,w=r,k=0,_=0;function A(){if(_>0)return _--,k>>_&1;if(255===(k=t[r++])){var e=t[r++];if(e){if(220===e&&m){r+=2;var n=(0,a.readUint16)(t,r);if(r+=2,n>0&&n!==o.scanLines)throw new f("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===e){if(m){var i=8*O;if(i>0&&i>>7}function x(e){for(var t=e;;){switch(i(t=t[A()])){case"number":return t;case"object":continue}throw new h("invalid huffman sequence")}}function C(e){for(var t=0;e>0;)t=t<<1|A(),e--;return t}function P(e){if(1===e)return 1===A()?1:-1;var t=C(e);return t>=1<0)E--;else for(var n=l,a=u;n<=a;){var i=x(t.huffmanTableAC),o=15&i,s=i>>4;if(0!==o){var c=e[n+=s];t.blockData[r+c]=P(o)*(1<>4,0==(n=15&a))s<15?(E=C(s)+(1<>4;if(0!==s){var l=e[i+=c];t.blockData[r+l]=P(s),i++}else{if(c<15)break;i+=16}}};var q,z,G,W,H=0;for(z=1===U?s[0].blocksPerLine*s[0].blocksPerColumn:y*o.mcusPerColumn;H<=z;){var V=c?Math.min(z-H,c):z;if(V>0){for(M=0;M0?"unexpected":"excessive";(0,n.warn)("decodeScan - ".concat(X," MCU data, current marker is: ").concat(q.invalid)),r=q.offset}if(!(q.marker>=65488&&q.marker<=65495))break;r+=2}return r-w}function b(e,n,a){var i,f,d,g,m,v,y,b,w,S,k,_,A,x,C,P,T,E=e.quantizationTable,R=e.blockData;if(!E)throw new h("missing required Quantization Table.");for(var O=0;O<64;O+=8)w=R[n+O],S=R[n+O+1],k=R[n+O+2],_=R[n+O+3],A=R[n+O+4],x=R[n+O+5],C=R[n+O+6],P=R[n+O+7],w*=E[O],0!=(S|k|_|A|x|C|P)?(S*=E[O+1],k*=E[O+2],_*=E[O+3],A*=E[O+4],x*=E[O+5],C*=E[O+6],P*=E[O+7],f=(i=(i=u*w+128>>8)+(f=u*A+128>>8)+1>>1)-f,T=(d=k)*l+(g=C)*c+128>>8,d=d*c-g*l+128>>8,y=(m=(m=p*(S-P)+128>>8)+(y=x<<4)+1>>1)-y,v=(b=(b=p*(S+P)+128>>8)+(v=_<<4)+1>>1)-v,g=(i=i+(g=T)+1>>1)-g,d=(f=f+d+1>>1)-d,T=m*s+b*o+2048>>12,m=m*o-b*s+2048>>12,b=T,T=v*r+y*t+2048>>12,v=v*t-y*r+2048>>12,y=T,a[O]=i+b,a[O+7]=i-b,a[O+1]=f+y,a[O+6]=f-y,a[O+2]=d+v,a[O+5]=d-v,a[O+3]=g+m,a[O+4]=g-m):(T=u*w+512>>10,a[O]=T,a[O+1]=T,a[O+2]=T,a[O+3]=T,a[O+4]=T,a[O+5]=T,a[O+6]=T,a[O+7]=T);for(var I=0;I<8;++I)w=a[I],0!=((S=a[I+8])|(k=a[I+16])|(_=a[I+24])|(A=a[I+32])|(x=a[I+40])|(C=a[I+48])|(P=a[I+56]))?(f=(i=4112+((i=u*w+2048>>12)+(f=u*A+2048>>12)+1>>1))-f,T=(d=k)*l+(g=C)*c+2048>>12,d=d*c-g*l+2048>>12,g=T,y=(m=(m=p*(S-P)+2048>>12)+(y=x)+1>>1)-y,v=(b=(b=p*(S+P)+2048>>12)+(v=_)+1>>1)-v,T=m*s+b*o+2048>>12,m=m*o-b*s+2048>>12,b=T,T=v*r+y*t+2048>>12,v=v*t-y*r+2048>>12,(w=(i=i+g+1>>1)+b)<16?w=0:w>=4080?w=255:w>>=4,(S=(f=f+d+1>>1)+(y=T))<16?S=0:S>=4080?S=255:S>>=4,(k=(d=f-d)+v)<16?k=0:k>=4080?k=255:k>>=4,(_=(g=i-g)+m)<16?_=0:_>=4080?_=255:_>>=4,(A=g-m)<16?A=0:A>=4080?A=255:A>>=4,(x=d-v)<16?x=0:x>=4080?x=255:x>>=4,(C=f-y)<16?C=0:C>=4080?C=255:C>>=4,(P=i-b)<16?P=0:P>=4080?P=255:P>>=4,R[n+I]=w,R[n+I+8]=S,R[n+I+16]=k,R[n+I+24]=_,R[n+I+32]=A,R[n+I+40]=x,R[n+I+48]=C,R[n+I+56]=P):(T=(T=u*w+8192>>14)<-2040?0:T>=2024?255:T+2056>>4,R[n+I]=T,R[n+I+8]=T,R[n+I+16]=T,R[n+I+24]=T,R[n+I+32]=T,R[n+I+40]=T,R[n+I+48]=T,R[n+I+56]=T)}function w(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,a=new Int16Array(64),i=0;i2&&void 0!==arguments[2]?arguments[2]:t,n=e.length-1,i=r=n)return null;var o=(0,a.readUint16)(e,t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var s=(0,a.readUint16)(e,i);!(s>=65472&&s<=65534);){if(++i>=n)return null;s=(0,a.readUint16)(e,i)}return{invalid:o.toString(16),marker:s,offset:i}}return g.prototype={parse:function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,i=void 0===r?null:r;function o(){var e=(0,a.readUint16)(t,u),r=(u+=2)+e-2,i=S(t,r,u);i&&i.invalid&&((0,n.warn)("readDataBlock - incorrect length, current marker is: "+i.invalid),r=i.offset);var o=t.subarray(u,r);return u+=o.length,o}function s(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n>4==0)for(C=0;C<64;C++)O[e[C]]=t[u++];else{if(R>>4!=1)throw new h("DQT - invalid table spec");for(C=0;C<64;C++)O[e[C]]=(0,a.readUint16)(t,u),u+=2}b[15&R]=O}break;case 65472:case 65473:case 65474:if(c)throw new h("Only single frame JPEGs supported");u+=2,(c={}).extended=65473===A,c.progressive=65474===A,c.precision=t[u++];var I=(0,a.readUint16)(t,u);u+=2,c.scanLines=i||I,c.samplesPerLine=(0,a.readUint16)(t,u),u+=2,c.components=[],c.componentIds={};var F,L=t[u++],M=0,N=0;for(x=0;x>4,B=15&t[u+1];M>4==0?_:k)[15&q]=m(z,W)}break;case 65501:u+=2,l=(0,a.readUint16)(t,u),u+=2;break;case 65498:var H=1==++v&&!i;u+=2;var V,X=t[u++],Y=[];for(x=0;x>4],V.huffmanTableAC=k[15&J],Y.push(V)}var Q=t[u++],$=t[u++],Z=t[u++];try{var ee=y(t,u,c,Y,l,Q,$,Z>>4,15&Z,H);u+=ee}catch(e){if(e instanceof f)return(0,n.warn)("".concat(e.message," -- attempting to re-parse the JPEG image.")),this.parse(t,{dnlScanLines:e.scanLines});if(e instanceof d){(0,n.warn)("".concat(e.message," -- ignoring the rest of the image data."));break e}throw e}break;case 65500:u+=4;break;case 65535:255!==t[u]&&u--;break;default:var te=S(t,u-2,u-3);if(te&&te.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+te.invalid),u=te.offset;break}if(u>=t.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new h("JpegImage.parse - unknown marker: "+A.toString(16))}A=(0,a.readUint16)(t,u),u+=2}for(this.width=c.samplesPerLine,this.height=c.scanLines,this.jfif=p,this.adobe=g,this.components=[],x=0;x2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,m=this.height/t,v=0,y=this.components.length,b=e*t*y,w=new Uint8ClampedArray(b),S=new Uint32Array(e),k=4294967288;for(c=0;c>8)+_[u+1];return w},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform:1===this._colorTransform},_convertYccToRgb:function(e){for(var t,r,n,a=0,i=e.length;a4)throw new h("Unsupported color mode");var s=this._getLinearizedBlockData(t,r,o);if(1===this.numComponents&&a){for(var c=s.length,l=new Uint8ClampedArray(3*c),u=0,f=0;f0?Math.min(n.xcb,a.PPx-1):Math.min(n.xcb,a.PPx),a.ycb_=r>0?Math.min(n.ycb,a.PPy-1):Math.min(n.ycb,a.PPy),a}function c(e,t,r){var n=1<t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,l=t.try1>t.try0?Math.ceil(t.try1/a)-Math.floor(t.try0/a):0,u=c*l;t.precinctParameters={precinctWidth:n,precinctHeight:a,numprecinctswide:c,numprecinctshigh:l,numprecincts:u,precinctWidthInSubband:o,precinctHeightInSubband:s}}function l(e,t,r){var n,a,i,o,s=r.xcb_,c=r.ycb_,l=1<>s,f=t.tby0>>c,d=t.tbx1+l-1>>s,p=t.tby1+u-1>>c,g=t.resolution.precinctParameters,m=[],v=[];for(a=f;ay.cbxMax&&(y.cbxMax=n),ay.cbyMax&&(y.cbyMax=a)):v[o]=y={cbxMin:n,cbyMin:a,cbxMax:n,cbyMax:a},i.precinct=y}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-h+1,numcodeblockhigh:p-f+1},t.codeblocks=m,t.precincts=v}function h(e,t,r){for(var n=[],a=e.subbands,i=0,o=a.length;ie.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[l],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[c],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){var i=e.resolutions[r],o=i.precinctParameters.numprecincts;if(!(a>=o)){for(;t=0;--m){var v=c.resolutions[m],y=g*v.precinctParameters.precinctWidth,b=g*v.precinctParameters.precinctHeight;h=Math.min(h,y),f=Math.min(f,b),d=Math.max(d,v.precinctParameters.numprecinctswide),p=Math.max(p,v.precinctParameters.numprecinctshigh),u[m]={width:y,height:b},g<<=1}r=Math.min(r,h),n=Math.min(n,f),a=Math.max(a,d),i=Math.max(i,p),o[s]={resolutions:u,minWidth:h,minHeight:f,maxNumWide:d,maxNumHigh:p}}return{components:o,minWidth:r,minHeight:n,maxNumWide:a,maxNumHigh:i}}function b(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=t.Csiz,i=0;i>>(s-=e)&(1<0;){var j=k.shift();void 0===(w=j.codeblock).data&&(w.data=[]),w.data.push({data:t,start:r+o,end:r+o+j.dataLength,codingpasses:j.codingpasses}),o+=j.dataLength}}}return o}function S(e,t,r,n,a,o,s,c){for(var l=n.tbx0,u=n.tby0,h=n.tbx1-n.tbx0,f=n.codeblocks,d="H"===n.type.charAt(0)?1:0,p="H"===n.type.charAt(1)?t:0,g=0,m=f.length;g=o?L:L*(1<0?1-v:0));var P=y.subbands[_],R=e[P.type];S(k,b,0,P,d?1:Math.pow(2,f+R-C)*(1+x/2048),u+C-1,d,h)}g.push({width:b,height:w,items:k})}var O=p.calculate(g,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:O.width,height:O.height,items:O.items}}function _(e,t){for(var r=e.SIZ.Csiz,n=e.tiles[t],a=0;a>24&255,s>>16&255,s>>8&255,255&s);(0,n.warn)("Unsupported header type "+s+" ("+d+")")}l&&(t+=c)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function(e){for(var t=e.getByte();t>=0;)if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);var o=e.getUint16();return this.width=r-a,this.height=n-i,this.componentsCount=o,void(this.bitsPerComponent=8)}throw new u("No size marker found in JPX stream")},parseCodestream:function(e,t,i){var s={},c=!1;try{for(var l=t;l+1>5,p=[];f>3,E.mu=0):(E.epsilon=e[f]>>3,E.mu=(7&e[f])<<8|e[f+1],f+=2),p.push(E)}T.SPqcds=p,s.mainHeader?s.QCD=T:(s.currentTile.QCD=T,s.currentTile.QCC=[]);break;case 65373:y=(0,a.readUint16)(e,l);var R,O={};switch(f=l+2,s.SIZ.Csiz<257?R=e[f++]:(R=(0,a.readUint16)(e,f),f+=2),31&(d=e[f++])){case 0:g=8,m=!0;break;case 1:g=16,m=!1;break;case 2:g=16,m=!0;break;default:throw new Error("Invalid SQcd value "+d)}for(O.noQuantization=8===g,O.scalarExpounded=m,O.guardBits=d>>5,p=[];f>3,E.mu=0):(E.epsilon=e[f]>>3,E.mu=(7&e[f])<<8|e[f+1],f+=2),p.push(E);O.SPqcds=p,s.mainHeader?s.QCC[R]=O:s.currentTile.QCC[R]=O;break;case 65362:y=(0,a.readUint16)(e,l);var I={};f=l+2;var F=e[f++];I.entropyCoderWithCustomPrecincts=!!(1&F),I.sopMarkerUsed=!!(2&F),I.ephMarkerUsed=!!(4&F),I.progressionOrder=e[f++],I.layersCount=(0,a.readUint16)(e,f),f+=2,I.multipleComponentTransform=e[f++],I.decompositionLevelsCount=e[f++],I.xcb=2+(15&e[f++]),I.ycb=2+(15&e[f++]);var L=e[f++];if(I.selectiveArithmeticCodingBypass=!!(1&L),I.resetContextProbabilities=!!(2&L),I.terminationOnEachCodingPass=!!(4&L),I.verticallyStripe=!!(8&L),I.predictableTermination=!!(16&L),I.segmentationSymbolUsed=!!(32&L),I.reversibleTransformation=e[f++],I.entropyCoderWithCustomPrecincts){for(var M=[];f>4})}I.precinctsSizes=M}var D=[];if(I.selectiveArithmeticCodingBypass&&D.push("selectiveArithmeticCodingBypass"),I.resetContextProbabilities&&D.push("resetContextProbabilities"),I.terminationOnEachCodingPass&&D.push("terminationOnEachCodingPass"),I.verticallyStripe&&D.push("verticallyStripe"),I.predictableTermination&&D.push("predictableTermination"),D.length>0)throw c=!0,new Error("Unsupported COD options ("+D.join(", ")+")");s.mainHeader?s.COD=I:(s.currentTile.COD=I,s.currentTile.COC=[]);break;case 65424:y=(0,a.readUint16)(e,l),(v={}).index=(0,a.readUint16)(e,l+2),v.length=(0,a.readUint32)(e,l+4),v.dataEnd=v.length+l-2,v.partIndex=e[l+8],v.partsCount=e[l+9],s.mainHeader=!1,0===v.partIndex&&(v.COD=s.COD,v.COC=s.COC.slice(0),v.QCD=s.QCD,v.QCC=s.QCC.slice(0)),s.currentTile=v;break;case 65427:0===(v=s.currentTile).partIndex&&(_(s,v.index),b(s)),w(s,e,l,y=v.dataEnd-l);break;case 65365:case 65367:case 65368:case 65380:y=(0,a.readUint16)(e,l);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+h.toString(16))}l+=y}}catch(e){if(c||this.failOnCorruptedImage)throw new u(e.message);(0,n.warn)("JPX: Trying to recover from: "+e.message)}this.tiles=function(e){for(var t=e.SIZ,r=e.components,n=t.Csiz,a=[],i=0,o=e.tiles.length;i>2);y[w++]=E+m>>u,y[w++]=E>>u,y[w++]=E+g>>u}else for(f=0;f>u,y[w++]=p-.34413*g-.71414*m>>u,y[w++]=p+1.772*g>>u;if(S)for(f=0,w=3;f>u}else for(s=0;s>u,w+=n}a.push(b)}return a}(s),this.width=s.SIZ.Xsiz-s.SIZ.XOsiz,this.height=s.SIZ.Ysiz-s.SIZ.YOsiz,this.componentsCount=s.SIZ.Csiz}};var A=function(){function e(e,t){var r=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;n>=1,t>>=1,n++}n--,(r=this.levels[n]).items[r.index]=a,this.currentLevel=n,delete this.value},incrementValue:function(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return--e<0?(this.value=r,!1):(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,!0)}},e}(),x=function(){function e(e,t,r){var n=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var i=0;ir)return this.currentLevel=n,this.propagateValues(),!1;e>>=1,t>>=1,n++}return this.currentLevel=n-1,!0},incrementValue:function(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()},propagateValues:function(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;)(t=this.levels[e]).items[t.index]=r},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return t.items[t.index]=255,!(--e<0||(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,0))}},e}(),C=function(){var e=17,t=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),r=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),n=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function a(e,a,i,o,s){var c;this.width=e,this.height=a,c="HH"===i?n:"HL"===i?r:t,this.contextLabelTable=c;var l,u=e*a;this.neighborsSignificance=new Uint8Array(u),this.coefficentsSign=new Uint8Array(u),l=s>14?new Uint32Array(u):s>6?new Uint16Array(u):new Uint8Array(u),this.coefficentsMagnitude=l,this.processingFlags=new Uint8Array(u);var h=new Uint8Array(u);if(0!==o)for(var f=0;f0,c=t+10&&(n=r-i,s&&(a[n-1]+=16),c&&(a[n+1]+=16),a[n]+=4),e+1=r)break;if(o[f]&=-2,!n[f]&&i[f]){var g=c[i[f]];if(e.readBit(s,g)){var m=this.decodeSignBit(p,h,f);a[f]=m,n[f]=1,this.setNeighborsSignificance(p,h,f),o[f]|=2}l[f]++,o[f]|=1}}},decodeSignBit:function(e,t,r){var n,a,i,o,s,c,l=this.width,u=this.height,h=this.coefficentsMagnitude,f=this.coefficentsSign;o=t>0&&0!==h[r-1],t+10&&0!==h[r-l],e+1=0?(s=9+n,c=this.decoder.readBit(this.contexts,s)):(s=9-n,c=1^this.decoder.readBit(this.contexts,s)),c},runMagnitudeRefinementPass:function(){for(var e,t=this.decoder,r=this.width,n=this.height,a=this.coefficentsMagnitude,i=this.neighborsSignificance,o=this.contexts,s=this.bitsDecoded,c=this.processingFlags,l=r*n,u=4*r,h=0;h>1,c=-1.586134342059924,l=-.052980118572961,u=.882911075530934,h=.443506852043971,f=1.230174104914001;for(n=(t|=0)-3,a=s+4;a--;n+=2)e[n]*=.8128930661159609;for(i=h*e[(n=t-2)-1],a=s+3;a--&&(o=h*e[n+1],e[n]=f*e[n]-i-o,a--);n+=2)i=h*e[(n+=2)+1],e[n]=f*e[n]-i-o;for(i=u*e[(n=t-1)-1],a=s+2;a--&&(o=u*e[n+1],e[n]-=i+o,a--);n+=2)i=u*e[(n+=2)+1],e[n]-=i+o;for(i=l*e[(n=t)-1],a=s+1;a--&&(o=l*e[n+1],e[n]-=i+o,a--);n+=2)i=l*e[(n+=2)+1],e[n]-=i+o;if(0!==s)for(i=c*e[(n=t+1)-1],a=s;a--&&(o=c*e[n+1],e[n]-=i+o,a--);n+=2)i=c*e[(n+=2)+1],e[n]-=i+o},e}(),E=function(){function e(){P.call(this)}return e.prototype=Object.create(P.prototype),e.prototype.filter=function(e,t,r){var n,a,i=r>>1;for(n=t|=0,a=i+1;a--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,a=i;a--;n+=2)e[n]+=e[n-1]+e[n+1]>>1},e}();return t}();t.JpxImage=h},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA512=t.calculateSHA384=t.calculateSHA256=t.calculateMD5=t.PDF20=t.PDF17=t.CipherTransformFactory=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0;var n=r(5),a=r(198),i=r(205);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&&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=function(){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}}();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r>5&255,h[n++]=r>>13&255,h[n++]=r>>21&255,h[n++]=r>>>29&255,h[n++]=0,h[n++]=0,h[n++]=0;var f=new Int32Array(16);for(n=0;n>>32-_)|0,v=S}o=o+v|0,s=s+y|0,c=c+b|0,l=l+w|0}return new Uint8Array([255&o,o>>8&255,o>>16&255,o>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])});t.calculateMD5=v;var y=function(){function e(e,t){this.high=0|e,this.low=0|t}return e.prototype={and:function(e){this.high&=e.high,this.low&=e.low},xor:function(e){this.high^=e.high,this.low^=e.low},or:function(e){this.high|=e.high,this.low|=e.low},shiftRight:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)},shiftLeft:function(e){e>=32?(this.high=this.low<>>32-e,this.low=this.low<>>e|r<<32-e,this.high=r>>>e|t<<32-e},not:function(){this.high=~this.high,this.low=~this.low},add:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r},copyTo:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low},assign:function(e){this.high=e.high,this.low=e.low}},e}(),b=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function n(t){return e(t,2)^e(t,13)^e(t,22)}function a(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(s,c,l){var u,h,f,d=1779033703,p=3144134277,g=1013904242,m=2773480762,v=1359893119,y=2600822924,b=528734635,w=1541459225,S=64*Math.ceil((l+9)/64),k=new Uint8Array(S);for(u=0;u>>29&255,k[u++]=l>>21&255,k[u++]=l>>13&255,k[u++]=l>>5&255,k[u++]=l<<3&255;var _,A=new Uint32Array(64);for(u=0;u>>10)+A[h-7]+i(A[h-15])+A[h-16];var x,C,P=d,T=p,E=g,R=m,O=v,I=y,F=b,L=w;for(h=0;h<64;++h)x=L+a(O)+t(O,I,F)+o[h]+A[h],C=n(P)+r(P,T,E),L=F,F=I,I=O,O=R+x|0,R=E,E=T,T=P,P=x+C|0;d=d+P|0,p=p+T|0,g=g+E|0,m=m+R|0,v=v+O|0,y=y+I|0,b=b+F|0,w=w+L|0}return new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,v>>24&255,v>>16&255,v>>8&255,255&v,y>>24&255,y>>16&255,y>>8&255,255&y,b>>24&255,b>>16&255,b>>8&255,255&b,w>>24&255,w>>16&255,w>>8&255,255&w])}}();t.calculateSHA256=b;var w=function(){function e(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.not(),a.and(n),e.xor(a)}function t(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.and(n),e.xor(a),a.assign(r),a.and(n),e.xor(a)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var o=[new y(1116352408,3609767458),new y(1899447441,602891725),new y(3049323471,3964484399),new y(3921009573,2173295548),new y(961987163,4081628472),new y(1508970993,3053834265),new y(2453635748,2937671579),new y(2870763221,3664609560),new y(3624381080,2734883394),new y(310598401,1164996542),new y(607225278,1323610764),new y(1426881987,3590304994),new y(1925078388,4068182383),new y(2162078206,991336113),new y(2614888103,633803317),new y(3248222580,3479774868),new y(3835390401,2666613458),new y(4022224774,944711139),new y(264347078,2341262773),new y(604807628,2007800933),new y(770255983,1495990901),new y(1249150122,1856431235),new y(1555081692,3175218132),new y(1996064986,2198950837),new y(2554220882,3999719339),new y(2821834349,766784016),new y(2952996808,2566594879),new y(3210313671,3203337956),new y(3336571891,1034457026),new y(3584528711,2466948901),new y(113926993,3758326383),new y(338241895,168717936),new y(666307205,1188179964),new y(773529912,1546045734),new y(1294757372,1522805485),new y(1396182291,2643833823),new y(1695183700,2343527390),new y(1986661051,1014477480),new y(2177026350,1206759142),new y(2456956037,344077627),new y(2730485921,1290863460),new y(2820302411,3158454273),new y(3259730800,3505952657),new y(3345764771,106217008),new y(3516065817,3606008344),new y(3600352804,1432725776),new y(4094571909,1467031594),new y(275423344,851169720),new y(430227734,3100823752),new y(506948616,1363258195),new y(659060556,3750685593),new y(883997877,3785050280),new y(958139571,3318307427),new y(1322822218,3812723403),new y(1537002063,2003034995),new y(1747873779,3602036899),new y(1955562222,1575990012),new y(2024104815,1125592928),new y(2227730452,2716904306),new y(2361852424,442776044),new y(2428436474,593698344),new y(2756734187,3733110249),new y(3204031479,2999351573),new y(3329325298,3815920427),new y(3391569614,3928383900),new y(3515267271,566280711),new y(3940187606,3454069534),new y(4118630271,4000239992),new y(116418474,1914138554),new y(174292421,2731055270),new y(289380356,3203993006),new y(460393269,320620315),new y(685471733,587496836),new y(852142971,1086792851),new y(1017036298,365543100),new y(1126000580,2618297676),new y(1288033470,3409855158),new y(1501505948,4234509866),new y(1607167915,987167468),new y(1816402316,1246189591)];return function(s,c,l,u){var h,f,d,p,g,m,v,b;(u=!!u)?(h=new y(3418070365,3238371032),f=new y(1654270250,914150663),d=new y(2438529370,812702999),p=new y(355462360,4144912697),g=new y(1731405415,4290775857),m=new y(2394180231,1750603025),v=new y(3675008525,1694076839),b=new y(1203062813,3204075428)):(h=new y(1779033703,4089235720),f=new y(3144134277,2227873595),d=new y(1013904242,4271175723),p=new y(2773480762,1595750129),g=new y(1359893119,2917565137),m=new y(2600822924,725511199),v=new y(528734635,4215389547),b=new y(1541459225,327033209));var w,S,k,_=128*Math.ceil((l+17)/128),A=new Uint8Array(_);for(w=0;w>>29&255,A[w++]=l>>21&255,A[w++]=l>>13&255,A[w++]=l>>5&255,A[w++]=l<<3&255;var x=new Array(80);for(w=0;w<80;w++)x[w]=new y(0,0);var C,P,T=new y(0,0),E=new y(0,0),R=new y(0,0),O=new y(0,0),I=new y(0,0),F=new y(0,0),L=new y(0,0),M=new y(0,0),N=new y(0,0),D=new y(0,0),B=new y(0,0),j=new y(0,0);for(w=0;w<_;){for(S=0;S<16;++S)x[S].high=A[w]<<24|A[w+1]<<16|A[w+2]<<8|A[w+3],x[S].low=A[w+4]<<24|A[w+5]<<16|A[w+6]<<8|A[w+7],w+=8;for(S=16;S<80;++S)i(C=x[S],x[S-2],j),C.add(x[S-7]),a(B,x[S-15],j),C.add(B),C.add(x[S-16]);for(T.assign(h),E.assign(f),R.assign(d),O.assign(p),I.assign(g),F.assign(m),L.assign(v),M.assign(b),S=0;S<80;++S)N.assign(M),n(B,I,j),N.add(B),e(B,I,F,L,j),N.add(B),N.add(o[S]),N.add(x[S]),r(D,T,j),t(B,T,E,R,j),D.add(B),C=M,M=L,L=F,F=I,O.add(N),I=O,O=R,R=E,E=T,C.assign(N),C.add(D),T=C;h.add(T),f.add(E),d.add(R),p.add(O),g.add(I),m.add(F),v.add(L),b.add(M)}return u?(P=new Uint8Array(48),h.copyTo(P,0),f.copyTo(P,8),d.copyTo(P,16),p.copyTo(P,24),g.copyTo(P,32),m.copyTo(P,40)):(P=new Uint8Array(64),h.copyTo(P,0),f.copyTo(P,8),d.copyTo(P,16),p.copyTo(P,24),g.copyTo(P,32),m.copyTo(P,40),v.copyTo(P,48),b.copyTo(P,56)),P}}();t.calculateSHA512=w;var S=function(e,t,r){return w(e,t,r,!0)};t.calculateSHA384=S;var k=function(){function e(){}return e.prototype={decryptBlock:function(e){return e}},e}(),_=function(){function e(){h(this,e),this.constructor===e&&(0,n.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(var t=0;t<256;t++)this._mixCol[t]=t<128?t<<1:t<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}return d(e,[{key:"_expandKey",value:function(e){(0,n.unreachable)("Cannot call `_expandKey` on the base class")}},{key:"_decrypt",value:function(e,t){var r,n,a,i=new Uint8Array(16);i.set(e);for(var o=0,s=this._keySize;o<16;++o,++s)i[o]^=t[s];for(var c=this._cyclesOfRepetition-1;c>=1;--c){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var l=0;l<16;++l)i[l]=this._inv_s[i[l]];for(var u=0,h=16*c;u<16;++u,++h)i[u]^=t[h];for(var f=0;f<16;f+=4){var d=this._mix[i[f]],p=this._mix[i[f+1]],g=this._mix[i[f+2]],m=this._mix[i[f+3]];r=d^p>>>8^p<<24^g>>>16^g<<16^m>>>24^m<<8,i[f]=r>>>24&255,i[f+1]=r>>16&255,i[f+2]=r>>8&255,i[f+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var v=0;v<16;++v)i[v]=this._inv_s[i[v]],i[v]^=t[v];return i}},{key:"_encrypt",value:function(e,t){var r,n,a,i=this._s,o=new Uint8Array(16);o.set(e);for(var s=0;s<16;++s)o[s]^=t[s];for(var c=1;c=p;--d)if(h[d]!==f){f=0;break}u-=f,i[i.length-1]=h.subarray(0,16-f)}}for(var g=new Uint8Array(u),m=0,v=0,y=i.length;m2&&void 0!==arguments[2]?arguments[2]:null,n=e.length,a=this.buffer,i=this.bufferPosition;if(r)this.iv=r;else{for(var o=0;i<16&&o=256&&(s=255&(27^s)));for(var u=0;u<4;++u)r[c]=n^=r[c-32],r[++c]=a^=r[c-32],r[++c]=i^=r[c-32],r[++c]=o^=r[c-32],c++}return r}}]),r}(_);t.AES256Cipher=x;var C=function(){function e(e,t){if(e.length!==t.length)return!1;for(var r=0;ro-32;){var s=t.length+a.length+n.length,c=new Uint8Array(64*s),l=e(t,a);l=e(l,n);for(var u=0,h=0;u<64;u++,h+=s)c.set(l,h);i=new A(a.subarray(0,16)).encrypt(c,a.subarray(16,32));for(var f=0,d=0;d<16;d++)f*=1,f%=3,f+=(i[d]>>>0)%3,f%=3;0===f?a=b(i,0,i.length):1===f?a=S(i,0,i.length):2===f&&(a=w(i,0,i.length)),o++}return a.subarray(0,32)}function r(){}function n(e,t){if(e.length!==t.length)return!1;for(var r=0;r>8&255,f[d++]=i>>16&255,f[d++]=i>>>24&255,l=0,u=t.length;l=4&&!c&&(f[d++]=255,f[d++]=255,f[d++]=255,f[d++]=255);var g=v(f,0,d),m=s>>3;if(o>=3)for(l=0;l<50;++l)g=v(g,0,m);var y,b=g.subarray(0,m);if(o>=3){for(d=0;d<32;++d)f[d]=e[d];for(l=0,u=t.length;l>3;if(n>=3)for(i=0;i<50;++i)u=v(u,0,u.length);if(n>=3){l=r;var f,d=new Uint8Array(h);for(i=19;i>=0;i--){for(f=0;f=4){var L=i.get("CF");(0,a.isDict)(L)&&(L.suppressEncryption=!0),this.cf=L,this.stmf=i.get("StmF")||r,this.strf=i.get("StrF")||r,this.eff=i.get("EFF")||this.stmf}}function o(e,t,r,n){var a,i,o=new Uint8Array(r.length+9);for(a=0,i=r.length;a>8&255,o[a++]=e>>16&255,o[a++]=255&t,o[a++]=t>>8&255,n&&(o[a++]=115,o[a++]=65,o[a++]=108,o[a++]=84),v(o,0,a).subarray(0,Math.min(r.length+5,16))}function s(e,t,r,i,s){if(!(0,a.isName)(t))throw new n.FormatError("Invalid crypt filter name.");var c,l=e.get(t.name);if(null!=l&&(c=l.get("CFM")),!c||"None"===c.name)return function(){return new k};if("V2"===c.name)return function(){return new p(o(r,i,s,!1))};if("AESV2"===c.name)return function(){return new A(o(r,i,s,!0))};if("AESV3"===c.name)return function(){return new x(s)};throw new n.FormatError("Unknown crypto method")}return i.prototype={createCipherTransform:function(e,t){if(4===this.algorithm||5===this.algorithm)return new T(s(this.cf,this.stmf,e,t,this.encryptionKey),s(this.cf,this.strf,e,t,this.encryptionKey));var r=o(e,t,this.encryptionKey,!1),n=function(){return new p(r)};return new T(n,n)}},i}();t.CipherTransformFactory=E},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var n=r(5),a=r(198);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 o(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&&s(e,t)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;rh&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var d=o<=8?new Uint8Array(h):new Uint16Array(h),p=0;p2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;if(e=t.fetchIfRef(e),(0,a.isName)(e))switch(e.name){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:if((0,a.isDict)(r)){var o=r.get("ColorSpace");if((0,a.isDict)(o)){var s=o.get(e.name);if(s){if((0,a.isName)(s))return this.parseToIR(s,t,r,i);e=s;break}}}throw new n.FormatError("unrecognized colorspace ".concat(e.name))}if(Array.isArray(e)){var c,l,u,h=t.fetchIfRef(e[0]).name;switch(h){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return["CalGrayCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.get("Gamma")];case"CalRGB":return["CalRGBCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.getArray("Gamma"),l.getArray("Matrix")];case"ICCBased":var f=t.fetchIfRef(e[1]).dict;if(c=f.get("N"),u=f.get("Alternate")){var d=this.parseToIR(u,t,r,i);if(this.fromIR(d,i).numComps===c)return d;(0,n.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===c)return"DeviceGrayCS";if(3===c)return"DeviceRgbCS";if(4===c)return"DeviceCmykCS";break;case"Pattern":var p=e[1]||null;return p&&(p=this.parseToIR(p,t,r,i)),["PatternCS",p];case"Indexed":case"I":var g=this.parseToIR(e[1],t,r,i),m=t.fetchIfRef(e[2])+1,v=t.fetchIfRef(e[3]);return(0,a.isStream)(v)&&(v=v.getBytes()),["IndexedCS",g,m,v];case"Separation":case"DeviceN":var y=t.fetchIfRef(e[1]);return["AlternateCS",c=Array.isArray(y)?y.length:1,u=this.parseToIR(e[2],t,r,i),i.create(t.fetchIfRef(e[3]))];case"Lab":return["LabCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.getArray("Range")];default:throw new n.FormatError('unimplemented color space object "'.concat(h,'"'))}}throw new n.FormatError('unrecognized color space object: "'.concat(e,'"'))}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,n.warn)("The decode map is not the correct length"),!0;for(var r=0,a=e.length;r8?Math.pow((e+16)/116,3):e*h}function y(n,o,c,u,h,f){var d=m(0,1,o[c]*f),y=m(0,1,o[c+1]*f),b=m(0,1,o[c+2]*f),w=Math.pow(d,n.GR),S=Math.pow(y,n.GG),k=Math.pow(b,n.GB),_=n.MXA*w+n.MXB*S+n.MXC*k,A=n.MYA*w+n.MYB*S+n.MYC*k,x=n.MZA*w+n.MZB*S+n.MZC*k,C=s;C[0]=_,C[1]=A,C[2]=x;var P=l;!function(r,n,a){if(1===r[0]&&1===r[2])return a[0]=n[0],a[1]=n[1],void(a[2]=n[2]);var o=a;p(e,n,o);var s=i;!function(e,t,r){r[0]=1*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1*t[2]/e[2]}(r,o,s),p(t,s,a)}(n.whitePoint,C,P);var T=s;!function(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var n=v(0),a=(1-n)/(1-v(e[0])),i=1-a,o=(1-n)/(1-v(e[1])),s=1-o,c=(1-n)/(1-v(e[2])),l=1-c;r[0]=t[0]*a+i,r[1]=t[1]*o+s,r[2]=t[2]*c+l}(n.blackPoint,P,T);var E=l;!function(r,n,a){var o=a;p(e,n,o);var s=i;!function(e,t,r){r[0]=.95047*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1.08883*t[2]/e[2]}(r,o,s),p(t,s,a)}(a,T,E);var R=s;p(r,E,R),u[h]=255*g(R[0]),u[h+1]=255*g(R[1]),u[h+2]=255*g(R[2])}return function(e){o(r,e);var t=c(r);function r(e,a,i,o){var s;if(u(this,r),s=t.call(this,"CalRGB",3),!e)throw new n.FormatError("WhitePoint missing - required for color space CalRGB");a=a||new Float32Array(3),i=i||new Float32Array([1,1,1]),o=o||new Float32Array([1,0,0,0,1,0,0,0,1]);var c=e[0],l=e[1],h=e[2];s.whitePoint=e;var f=a[0],d=a[1],p=a[2];if(s.blackPoint=a,s.GR=i[0],s.GG=i[1],s.GB=i[2],s.MXA=o[0],s.MYA=o[1],s.MZA=o[2],s.MXB=o[3],s.MYB=o[4],s.MZB=o[5],s.MXC=o[6],s.MYC=o[7],s.MZC=o[8],c<0||h<0||1!==l)throw new n.FormatError("Invalid WhitePoint components for ".concat(s.name)+", no fallback available");return(f<0||d<0||p<0)&&((0,n.info)("Invalid BlackPoint for ".concat(s.name," [").concat(f,", ").concat(d,", ").concat(p,"], ")+"falling back to default."),s.blackPoint=new Float32Array(3)),(s.GR<0||s.GG<0||s.GB<0)&&((0,n.info)("Invalid Gamma [".concat(s.GR,", ").concat(s.GG,", ").concat(s.GB,"] for ")+"".concat(s.name,", falling back to default.")),s.GR=s.GG=s.GB=1),s}return f(r,[{key:"getRgbItem",value:function(e,t,r,n){y(this,e,t,r,n,1)}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){for(var s=1/((1<=6/29?e*e*e:108/841*(e-4/29)}function t(e,t,r,n){return r+e*(n-r)/t}function r(r,n,a,i,o,s){var c=n[a],l=n[a+1],u=n[a+2];!1!==i&&(c=t(c,i,0,100),l=t(l,i,r.amin,r.amax),u=t(u,i,r.bmin,r.bmax)),l>r.amax?l=r.amax:lr.bmax?u=r.bmax:uo.amax||o.bmin>o.bmax)&&((0,n.info)("Invalid Range, falling back to defaults"),o.amin=-100,o.amax=100,o.bmin=-100,o.bmax=100),o}return f(a,[{key:"getRgbItem",value:function(e,t,n,a){r(this,e,t,!1,n,a)}},{key:"getRgbBuffer",value:function(e,t,n,a,i,o,s){for(var c=(1<1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),e}();t.LocalImageCache=c;var l=function(){function e(){i(this,e),this._refCache=new a.RefSetCache,this._imageCache=new a.RefSetCache}return s(e,null,[{key:"NUM_PAGES_THRESHOLD",get:function(){return(0,n.shadow)(this,"NUM_PAGES_THRESHOLD",2)}},{key:"MAX_IMAGES_TO_CACHE",get:function(){return(0,n.shadow)(this,"MAX_IMAGES_TO_CACHE",10)}}]),s(e,[{key:"shouldCache",value:function(t,r){var n=this._refCache.get(t);return!((n?n.size+(n.has(r)?0:1):1)=e.MAX_IMAGES_TO_CACHE)}},{key:"addPageIndex",value:function(e,t){var r=this._refCache.get(e);r||(r=new Set,this._refCache.put(e,r)),r.add(t)}},{key:"getData",value:function(t,r){if(!this._refCache.has(t))return null;var n=this._refCache.get(t);return n.size=e.MAX_IMAGES_TO_CACHE?(0,n.info)("GlobalImageCache.setData - ignoring image above MAX_IMAGES_TO_CACHE."):this._imageCache.put(t,r))}},{key:"clear",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._refCache.clear(),this._imageCache.clear()}}]),e}();t.GlobalImageCache=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getQuadPoints=x,t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0;var n=r(5),a=r(203),i=r(198),o=r(216),s=r(201),c=r(219),l=r(205);function u(e,t,r){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}},u(e,t,r||e)}function h(e){return h="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},h(e)}function f(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&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){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}}();return function(){var r,n=m(e);if(t){var a=m(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return g(this,r)}}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||b(e,t)||function(){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 b(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)return null;for(var n=[],a=0,i=r.length/8;at[2]||lt[3])return null;n[a].push({x:c,y:l})}}return n}t.AnnotationFactory=A;var C=function(){function e(t){S(this,e);var r=t.dict;this.setContents(r.get("Contents")),this.setModificationDate(r.get("M")),this.setFlags(r.get("F")),this.setRectangle(r.getArray("Rect")),this.setColor(r.getArray("C")),this.setBorderStyle(r),this.setAppearance(r),this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,contents:this.contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype}}return _(e,[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,n.AnnotationFlag.HIDDEN)&&!this._hasFlag(e,n.AnnotationFlag.NOVIEW)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,n.AnnotationFlag.PRINT)&&!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,n.AnnotationFlag.HIDDEN)}},{key:"setContents",value:function(e){this.contents=(0,n.stringToPDFString)(e||"")}},{key:"setModificationDate",value:function(e){this.modificationDate=(0,n.isString)(e)?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&e>0?e:0}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){Array.isArray(e)&&4===e.length?this.rectangle=n.Util.normalizeRect(e):this.rectangle=[0,0,0,0]}},{key:"setColor",value:function(e){var t=new Uint8ClampedArray(3);if(Array.isArray(e))switch(e.length){case 0:this.color=null;break;case 1:o.ColorSpace.singletons.gray.getRgbItem(e,0,t,0),this.color=t;break;case 3:o.ColorSpace.singletons.rgb.getRgbItem(e,0,t,0),this.color=t;break;case 4:o.ColorSpace.singletons.cmyk.getRgbItem(e,0,t,0),this.color=t;break;default:this.color=t}else this.color=t}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new P,(0,i.isDict)(e))if(e.has("BS")){var t=e.get("BS"),r=t.get("Type");r&&!(0,i.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){var n=e.getArray("Border");Array.isArray(n)&&n.length>=3&&(this.borderStyle.setHorizontalCornerRadius(n[0]),this.borderStyle.setVerticalCornerRadius(n[1]),this.borderStyle.setWidth(n[2],this.rectangle),4===n.length&&this.borderStyle.setDashArray(n[3]))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if((0,i.isDict)(t)){var r=t.get("N");if((0,i.isStream)(r))this.appearance=r;else if((0,i.isDict)(r)){var n=e.get("AS");(0,i.isName)(n)&&r.has(n.name)&&(this.appearance=r.get(n.name))}}}},{key:"loadResources",value:function(e){return this.appearance.dict.getAsync("Resources").then((function(t){if(t)return new a.ObjectLoader(t,e,t.xref).load().then((function(){return t}))}))}},{key:"getOperatorList",value:function(e,t,r){var a=this;if(!this.appearance)return Promise.resolve(new c.OperatorList);var i=this.data,o=this.appearance.dict,s=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),l=o.getArray("BBox")||[0,0,1,1],u=o.getArray("Matrix")||[1,0,0,1,0,0],h=function(e,t,r){var a=y(n.Util.getAxialAlignedBoundingBox(t,r),4),i=a[0],o=a[1],s=a[2],c=a[3];if(i===s||o===c)return[1,0,0,1,e[0],e[1]];var l=(e[2]-e[0])/(s-i),u=(e[3]-e[1])/(c-o);return[l,0,0,u,e[0]-i*l,e[1]-o*u]}(i.rect,l,u);return s.then((function(r){var o=new c.OperatorList;return o.addOp(n.OPS.beginAnnotation,[i.rect,h,u]),e.getOperatorList({stream:a.appearance,task:t,resources:r,operatorList:o}).then((function(){return o.addOp(n.OPS.endAnnotation,[]),a.appearance.reset(),o}))}))}},{key:"viewable",get:function(){return 0===this.flags||this._isViewable(this.flags)}},{key:"printable",get:function(){return 0!==this.flags&&this._isPrintable(this.flags)}}]),e}();t.Annotation=C;var P=function(){function e(){S(this,e),this.width=1,this.style=n.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return _(e,[{key:"setWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];if((0,i.isName)(e))this.width=0;else if(Number.isInteger(e)){if(e>0){var r=(t[2]-t[0])/2,a=(t[3]-t[1])/2;r>0&&a>0&&(e>r||e>a)&&((0,n.warn)("AnnotationBorderStyle.setWidth - ignoring width: ".concat(e)),e=1)}this.width=e}}},{key:"setStyle",value:function(e){if((0,i.isName)(e))switch(e.name){case"S":this.style=n.AnnotationBorderStyleType.SOLID;break;case"D":this.style=n.AnnotationBorderStyleType.DASHED;break;case"B":this.style=n.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=n.AnnotationBorderStyleType.INSET;break;case"U":this.style=n.AnnotationBorderStyleType.UNDERLINE}}},{key:"setDashArray",value:function(e){if(Array.isArray(e)&&e.length>0){var t,r=!0,n=!0,a=v(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;if(!(+i>=0)){r=!1;break}i>0&&(n=!1)}}catch(e){a.e(e)}finally{a.f()}r&&!n?this.dashArray=e:this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}]),e}();t.AnnotationBorderStyle=P;var T=function(e){f(r,e);var t=p(r);function r(e){var a;S(this,r),a=t.call(this,e);var o=e.dict;if(o.has("IRT")){var s=o.getRaw("IRT");a.data.inReplyTo=(0,i.isRef)(s)?s.toString():null;var c=o.get("RT");a.data.replyType=(0,i.isName)(c)?c.name:n.AnnotationReplyType.REPLY}if(a.data.replyType===n.AnnotationReplyType.GROUP){var l=o.get("IRT");a.data.title=(0,n.stringToPDFString)(l.get("T")||""),a.setContents(l.get("Contents")),a.data.contents=a.contents,l.has("CreationDate")?(a.setCreationDate(l.get("CreationDate")),a.data.creationDate=a.creationDate):a.data.creationDate=null,l.has("M")?(a.setModificationDate(l.get("M")),a.data.modificationDate=a.modificationDate):a.data.modificationDate=null,a.data.hasPopup=l.has("Popup"),l.has("C")?(a.setColor(l.getArray("C")),a.data.color=a.color):a.data.color=null}else a.data.title=(0,n.stringToPDFString)(o.get("T")||""),a.setCreationDate(o.get("CreationDate")),a.data.creationDate=a.creationDate,a.data.hasPopup=o.has("Popup"),o.has("C")||(a.data.color=null);return a}return _(r,[{key:"setCreationDate",value:function(e){this.creationDate=(0,n.isString)(e)?e:null}}]),r}(C);t.MarkupAnnotation=T;var E=function(e){f(r,e);var t=p(r);function r(e){var a;S(this,r),a=t.call(this,e);var o=e.dict,c=a.data;c.annotationType=n.AnnotationType.WIDGET,c.fieldName=a._constructFieldName(o),c.fieldValue=(0,s.getInheritableProperty)({dict:o,key:"V",getArray:!0}),c.alternativeText=(0,n.stringToPDFString)(o.get("TU")||""),c.defaultAppearance=(0,s.getInheritableProperty)({dict:o,key:"DA"})||"";var l=(0,s.getInheritableProperty)({dict:o,key:"FT"});return c.fieldType=(0,i.isName)(l)?l.name:null,a.fieldResources=(0,s.getInheritableProperty)({dict:o,key:"DR"})||i.Dict.empty,c.fieldFlags=(0,s.getInheritableProperty)({dict:o,key:"Ff"}),(!Number.isInteger(c.fieldFlags)||c.fieldFlags<0)&&(c.fieldFlags=0),c.readOnly=a.hasFieldFlag(n.AnnotationFieldFlag.READONLY),"Sig"===c.fieldType&&(c.fieldValue=null,a.setFlags(n.AnnotationFlag.HIDDEN)),a}return _(r,[{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return(0,n.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,n.stringToPDFString)(e.get("T"));var t=[];e.has("T")&&t.unshift((0,n.stringToPDFString)(e.get("T")));for(var r=e;r.has("Parent")&&(r=r.get("Parent"),(0,i.isDict)(r));)r.has("T")&&t.unshift((0,n.stringToPDFString)(r.get("T")));return t.join(".")}},{key:"hasFieldFlag",value:function(e){return!!(this.data.fieldFlags&e)}},{key:"getOperatorList",value:function(e,t,n){return n?Promise.resolve(new c.OperatorList):u(m(r.prototype),"getOperatorList",this).call(this,e,t,n)}}]),r}(C),R=function(e){f(r,e);var t=p(r);function r(e){var a;S(this,r),a=t.call(this,e);var i=e.dict;a.data.fieldValue=(0,n.stringToPDFString)(a.data.fieldValue||"");var o=(0,s.getInheritableProperty)({dict:i,key:"Q"});(!Number.isInteger(o)||o<0||o>2)&&(o=null),a.data.textAlignment=o;var c=(0,s.getInheritableProperty)({dict:i,key:"MaxLen"});return(!Number.isInteger(c)||c<0)&&(c=null),a.data.maxLen=c,a.data.multiLine=a.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE),a.data.comb=a.hasFieldFlag(n.AnnotationFieldFlag.COMB)&&!a.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD)&&!a.hasFieldFlag(n.AnnotationFieldFlag.FILESELECT)&&null!==a.data.maxLen,a}return _(r,[{key:"getOperatorList",value:function(e,t,a){if(a||this.appearance)return u(m(r.prototype),"getOperatorList",this).call(this,e,t,a);var i=new c.OperatorList;if(!this.data.defaultAppearance)return Promise.resolve(i);var o=new l.Stream((0,n.stringToBytes)(this.data.defaultAppearance));return e.getOperatorList({stream:o,task:t,resources:this.fieldResources,operatorList:i}).then((function(){return i}))}}]),r}(E),O=function(e){f(r,e);var t=p(r);function r(e){var a;return S(this,r),(a=t.call(this,e)).data.checkBox=!a.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.radioButton=a.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.pushButton=a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.checkBox?a._processCheckBox(e):a.data.radioButton?a._processRadioButton(e):a.data.pushButton?a._processPushButton(e):(0,n.warn)("Invalid field flags for button widget annotation"),a}return _(r,[{key:"_processCheckBox",value:function(e){(0,i.isName)(this.data.fieldValue)&&(this.data.fieldValue=this.data.fieldValue.name);var t=e.dict.get("AP");if((0,i.isDict)(t)){var r=t.get("D");if((0,i.isDict)(r)){var n=r.getKeys();2===n.length&&(this.data.exportValue="Off"===n[0]?n[1]:n[0])}}}},{key:"_processRadioButton",value:function(e){this.data.fieldValue=this.data.buttonValue=null;var t=e.dict.get("Parent");if((0,i.isDict)(t)&&t.has("V")){var r=t.get("V");(0,i.isName)(r)&&(this.data.fieldValue=r.name)}var n=e.dict.get("AP");if((0,i.isDict)(n)){var a=n.get("N");if((0,i.isDict)(a)){var o,s=v(a.getKeys());try{for(s.s();!(o=s.n()).done;){var c=o.value;if("Off"!==c){this.data.buttonValue=c;break}}}catch(e){s.e(e)}finally{s.f()}}}}},{key:"_processPushButton",value:function(e){e.dict.has("A")?a.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl}):(0,n.warn)("Push buttons without action dictionaries are not supported")}}]),r}(E),I=function(e){f(r,e);var t=p(r);function r(e){var a;S(this,r),(a=t.call(this,e)).data.options=[];var i=(0,s.getInheritableProperty)({dict:e.dict,key:"Opt"});if(Array.isArray(i))for(var o=e.xref,c=0,l=i.length;c1e3&&(h=Math.max(h,p),g+=d+2,p=0,d=0),f.push({transform:m,x:p,y:g,w:v.width,h:v.height}),p+=v.width+2,d=Math.max(d,v.height)}var y=Math.max(h,p)+1,b=g+d+1,w=new Uint8ClampedArray(y*b*4),S=y<<2;for(u=0;u=0;)k[x-4]=k[x],k[x-3]=k[x+1],k[x-2]=k[x+2],k[x-1]=k[x+3],k[x+_]=k[x+_-4],k[x+_+1]=k[x+_-3],k[x+_+2]=k[x+_-2],k[x+_+3]=k[x+_-1],x-=S}return r.splice(o,4*l,n.OPS.paintInlineImageXObjectGroup),a.splice(o,4*l,[{width:y,height:b,kind:n.ImageKind.RGBA_32BPP,data:w},f]),o+1})),e(t,[n.OPS.save,n.OPS.transform,n.OPS.paintImageMaskXObject,n.OPS.restore],null,(function(e,t){var r=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return r[t]===n.OPS.save;case 1:return r[t]===n.OPS.transform;case 2:return r[t]===n.OPS.paintImageMaskXObject;case 3:return r[t]===n.OPS.restore}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(a))}),(function(e,t){var r,a=e.fnArray,i=e.argsArray,o=e.iCurr,s=o-3,c=o-2,l=o-1,u=Math.floor((t-s)/4);if(u=function(e,t,r,a){for(var i=e+2,o=0;o=4&&r[i-4]===r[o]&&r[i-3]===r[s]&&r[i-2]===r[c]&&r[i-1]===r[l]&&n[i-4][0]===u&&n[i-4][1]===h&&(f++,d-=5);for(var p=d+4,g=1;g=(n=e.length))break}(a=(a||t)[e[r]])&&!Array.isArray(a)?(o.iCurr=r,r++,!a.checkFn||(0,a.checkFn)(o)?(i=a,a=null):a=null):r++}this.state=a,this.match=i,this.lastProcessed=r}else this.lastProcessed=n},push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()},flush:function(){for(;this.match;){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}},reset:function(){this.state=null,this.match=null,this.lastProcessed=0}},r}(),i=function(){function e(e){this.queue=e}return e.prototype={push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t)},flush:function(){},reset:function(){}},e}(),o=function(){function e(e,t,r){this._streamSink=t,this.fnArray=[],this.argsArray=[],this.optimizer=t&&"oplist"!==e?new a(this):new i(this),this.dependencies=Object.create(null),this._totalLength=0,this.pageIndex=r,this.intent=e,this.weight=0,this._resolved=t?null:Promise.resolve()}return e.prototype={get length(){return this.argsArray.length},get ready(){return this._resolved||this._streamSink.ready},get totalLength(){return this._totalLength+this.length},addOp:function(e,t){this.optimizer.push(e,t),this.weight++,this._streamSink&&(this.weight>=1e3||this.weight>=995&&(e===n.OPS.restore||e===n.OPS.endText))&&this.flush()},addDependency:function(e){e in this.dependencies||(this.dependencies[e]=!0,this.addOp(n.OPS.dependency,[e]))},addDependencies:function(e){for(var t in e)this.addDependency(t)},addOpList:function(t){if(t instanceof e){Object.assign(this.dependencies,t.dependencies);for(var r=0,a=t.length;r0&&void 0!==arguments[0]&&arguments[0];this.optimizer.flush();var t=this.length;this._totalLength+=t,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,length:t},1,this._transfers),this.dependencies=Object.create(null),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}},e}();t.OperatorList=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PartialEvaluator=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(221),s=r(198),c=r(222),l=r(225),u=r(201),h=r(228),f=r(227),d=r(231),p=r(204),g=r(232),m=r(216),v=r(205),y=r(226),b=r(233),w=r(234),S=r(217),k=r(236),_=r(219),A=r(237);function x(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function P(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];if(Array.isArray(e)){for(var r=0,a=e.length;r0&&void 0!==arguments[0]?arguments[0]:e,r=Object.create(this);return r.options=t,r},hasBlendModes:function(e){if(!(e instanceof s.Dict))return!1;var t=Object.create(null);e.objId&&(t[e.objId]=!0);for(var r=[e],n=this.xref;r.length;){var a=r.shift(),o=a.get("ExtGState");if(o instanceof s.Dict)for(var c=o.getKeys(),l=0,h=c.length;lm)){r.next=12;break}return(0,i.warn)("Image exceeded maximum allowed size and was removed."),r.abrupt("return",void 0);case 12:if(!f.get("ImageMask","IM")){r.next=25;break}return w=f.get("Width","W"),S=f.get("Height","H"),k=w+7>>3,_=o.getBytes(k*S,!0),x=f.getArray("Decode","D"),(y=A.PDFImage.createMask({imgArray:_,width:w,height:S,imageIsFromDecodeStream:o instanceof v.DecodeStream,inverseDecode:!!x&&x[0]>0})).cached=!!u,b=[y],l.addOp(i.OPS.paintImageMaskXObject,b),u&&h.set(u,d,{fn:i.OPS.paintImageMaskXObject,args:b}),r.abrupt("return",void 0);case 25:if(C=f.get("SMask","SM")||!1,P=f.get("Mask")||!1,!c||C||P||!(p+g<200)){r.next=33;break}return T=new A.PDFImage({xref:t.xref,res:n,image:o,isInline:c,pdfFunctionFactory:t.pdfFunctionFactory}),y=T.createImageData(!0),l.addOp(i.OPS.paintInlineImageXObject,[y]),r.abrupt("return",void 0);case 33:if(E="img_".concat(t.idFactory.createObjId()),R=!1,t.parsingType3Font?E="".concat(t.idFactory.getDocId(),"_type3res_").concat(E):d&&(R=t.globalImageCache.shouldCache(d,t.pageIndex))&&(E="".concat(t.idFactory.getDocId(),"_").concat(E)),l.addDependency(E),b=[E,p,g],O=A.PDFImage.buildImage({xref:t.xref,res:n,image:o,isInline:c,pdfFunctionFactory:t.pdfFunctionFactory}).then((function(e){if(y=e.createImageData(!1),t.parsingType3Font)return t.handler.sendWithPromise("commonobj",[E,"FontType3Res",y],[y.data.buffer]);R?t.handler.send("commonobj",[E,"Image",y],[y.data.buffer]):t.handler.send("obj",[E,t.pageIndex,"Image",y],[y.data.buffer])})).catch((function(e){if((0,i.warn)("Unable to decode image: "+e),t.parsingType3Font)return t.handler.sendWithPromise("commonobj",[E,"FontType3Res",null]);R?t.handler.send("commonobj",[E,"Image",null]):t.handler.send("obj",[E,t.pageIndex,"Image",null])})),!t.parsingType3Font){r.next=41;break}return r.next=41,O;case 41:return l.addOp(i.OPS.paintImageXObject,b),u&&(h.set(u,d,{fn:i.OPS.paintImageXObject,args:b}),d&&((0,i.assert)(!c,"Cannot cache an inline image globally."),t.globalImageCache.addPageIndex(d,t.pageIndex),R&&t.globalImageCache.setData(d,{objId:E,fn:i.OPS.paintImageXObject,args:b}))),r.abrupt("return",void 0);case 44:case"end":return r.stop()}}),r)})))()},handleSMask:function(e,t,r,n,a){var i=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},s=e.get("TR");if((0,w.isPDFFunction)(s)){for(var c=this.pdfFunctionFactory.create(s),l=new Uint8Array(256),u=new Float32Array(1),h=0;h<256;h++)u[0]=h/255,c(u,0,u,0),l[h]=255*u[0]|0;o.transferMap=l}return this.buildFormXObject(t,i,o,r,n,a.state.clone())},handleTilingType:function(e,t,r,n,a,o,c){var l=this,u=new _.OperatorList,h=[a.get("Resources"),r],f=s.Dict.merge(this.xref,h);return this.getOperatorList({stream:n,task:c,resources:f,operatorList:u}).then((function(){return(0,d.getTilingPatternIR)({fnArray:u.fnArray,argsArray:u.argsArray},a,t)})).then((function(t){o.addDependencies(u.dependencies),o.addOp(e,t)}),(function(e){if(!(e instanceof i.AbortException)){if(l.options.ignoreErrors)return l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorTilingPattern}),void(0,i.warn)('handleTilingType - ignoring pattern: "'.concat(e,'".'));throw e}}))},handleSetFont:function(e,t,r,n,a,o){var s,l=this;return t&&(s=(t=t.slice())[0].name),this.loadFont(s,r,e).then((function(t){return t.font.isType3Font?t.loadType3Data(l,e,n,a).then((function(){return t})).catch((function(e){return l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontLoadType3}),new O({loadedName:"g_font_error",font:new c.ErrorFont("Type3 font load error: ".concat(e)),dict:t.font,extraProperties:l.options.fontExtraProperties})})):t})).then((function(e){return o.font=e.font,e.send(l.handler),e.loadedName}))},handleText:function(e,r){var n=r.font,a=n.charsToGlyphs(e);return n.data&&(r.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG||"Pattern"===r.fillColorSpace.name||n.disableFontFace||this.options.disableFontFace)&&t.buildFontPaths(n,a,this.handler),a},ensureStateFont:function(e){if(!e.font){var t=new i.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontState}),void(0,i.warn)('ensureStateFont: "'.concat(t,'".'));throw t}},setGState:function(e,t,r,a,o){for(var c=this,l=[],u=t.getKeys(),h=Promise.resolve(),f=function(){var f=u[d],p=t.get(f);switch(f){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":l.push([f,p]);break;case"Font":h=h.then((function(){return c.handleSetFont(e,null,p[0],r,a,o.state).then((function(e){r.addDependency(e),l.push([f,[e,p[1]]])}))}));break;case"BM":l.push([f,n(p)]);break;case"SMask":if((0,s.isName)(p,"None")){l.push([f,!1]);break}(0,s.isDict)(p)?(h=h.then((function(){return c.handleSMask(p,e,r,a,o)})),l.push([f,!0])):(0,i.warn)("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,i.info)("graphic state operator "+f);break;default:(0,i.info)("Unknown graphic state operator "+f)}},d=0,p=u.length;d0&&r.addOp(i.OPS.setGState,[l])}))},loadFont:function(e,r,n){var a,o=this,l=function(){return Promise.resolve(new O({loadedName:"g_font_error",font:new c.ErrorFont('Font "'.concat(e,'" is not available.')),dict:r,extraProperties:o.options.fontExtraProperties}))},u=this.xref;if(r){if(!(0,s.isRef)(r))throw new i.FormatError('The "font" object should be a reference.');a=r}else{var h=n.get("Font");h&&(a=h.getRaw(e))}if(!a){var f='Font "'.concat(e||r&&r.toString(),'" is not available');if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,i.warn)("".concat(f,".")),l();this.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontMissing}),(0,i.warn)("".concat(f," -- attempting to fallback to a default font.")),a=t.getFallbackFontDict()}if(this.fontCache.has(a))return this.fontCache.get(a);if(r=u.fetchIfRef(a),!(0,s.isDict)(r))return l();if(r.translated)return r.translated;var d,p,g=(0,i.createPromiseCapability)(),m=this.preEvaluateFont(r),v=m.descriptor,y=m.hash,b=(0,s.isRef)(a);if(b&&(d=a.toString()),y&&(0,s.isDict)(v)){v.fontAliases||(v.fontAliases=Object.create(null));var w=v.fontAliases;if(w[y]){var S=w[y].aliasRef;if(b&&S&&this.fontCache.has(S))return this.fontCache.putAlias(a,S),this.fontCache.get(a)}else w[y]={fontID:c.Font.getFontID()};b&&(w[y].aliasRef=a),d=w[y].fontID}b?this.fontCache.put(a,g.promise):(d||(d=this.idFactory.createObjId()),this.fontCache.put("id_".concat(d),g.promise)),(0,i.assert)(d,'The "fontID" must be defined.'),r.loadedName="".concat(this.idFactory.getDocId(),"_f").concat(d),r.translated=g.promise;try{p=this.translateFont(m)}catch(e){p=Promise.reject(e)}return p.then((function(e){void 0!==e.fontType&&(u.stats.fontTypes[e.fontType]=!0),g.resolve(new O({loadedName:r.loadedName,font:e,dict:r,extraProperties:o.options.fontExtraProperties}))})).catch((function(e){o.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontTranslate});try{var t=v&&v.get("FontFile3"),n=t&&t.get("Subtype"),a=(0,c.getFontType)(m.type,n&&n.name);u.stats.fontTypes[a]=!0}catch(e){}g.resolve(new O({loadedName:r.loadedName,font:new c.ErrorFont(e instanceof Error?e.message:e),dict:r,extraProperties:o.options.fontExtraProperties}))})),g.promise},buildPath:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=e.length-1;if(r||(r=[]),a<0||e.fnArray[a]!==i.OPS.constructPath)n&&((0,i.warn)('Encountered path operator "'.concat(t,'" inside of a text object.')),e.addOp(i.OPS.save,null)),e.addOp(i.OPS.constructPath,[[t],r]),n&&e.addOp(i.OPS.restore,null);else{var o=e.argsArray[a];o[0].push(t),Array.prototype.push.apply(o[1],r)}},parseColorSpace:function(e){var t=this,r=e.cs,n=e.resources;return new Promise((function(e){e(m.ColorSpace.parse(r,t.xref,n,t.pdfFunctionFactory))})).catch((function(e){if(e instanceof i.AbortException)return null;if(t.options.ignoreErrors)return t.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorColorSpace}),(0,i.warn)('parseColorSpace - ignoring ColorSpace: "'.concat(e,'".')),null;throw e}))},handleColorN:function(e,t,r,n,o,c,l){var u=this;return E(a.default.mark((function h(){var f,p,g,m,v,y,b;return a.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(f=r[r.length-1],!(0,s.isName)(f)||!(p=o.get(f.name))){a.next=16;break}if(g=(0,s.isStream)(p)?p.dict:p,1!==(m=g.get("PatternType"))){a.next=9;break}return v=n.base?n.base.getRgb(r,0):null,a.abrupt("return",u.handleTilingType(t,v,c,p,g,e,l));case 9:if(2!==m){a.next=15;break}return y=g.get("Shading"),b=g.getArray("Matrix"),p=d.Pattern.parseShading(y,b,u.xref,c,u.handler,u.pdfFunctionFactory),e.addOp(t,p.getIR()),a.abrupt("return",void 0);case 15:throw new i.FormatError("Unknown PatternType: ".concat(m));case 16:throw new i.FormatError("Unknown PatternName: ".concat(f));case 17:case"end":return a.stop()}}),h)})))()},getOperatorList:function(e){var t=this,n=e.stream,a=e.task,o=e.resources,c=e.operatorList,l=e.initialState,u=void 0===l?null:l;if(o=o||s.Dict.empty,u=u||new L,!c)throw new Error('getOperatorList: missing "operatorList" parameter');var h=this,f=this.xref,g=!1,v=new S.LocalImageCache,y=o.get("XObject")||s.Dict.empty,b=o.get("Pattern")||s.Dict.empty,w=new I(u),k=new M(n,f,w),_=new r;function A(e){for(var t=0,r=k.savedStatesDepth;t0&&(t[3]*=r*w.fontMatrix[3])}var n=i.Util.transform(w.ctm,i.Util.transform(w.textMatrix,t));A.transform=n,e.vertical?(A.width=Math.sqrt(n[0]*n[0]+n[1]*n[1]),A.height=0,A.vertical=!0):(A.width=0,A.height=Math.sqrt(n[2]*n[2]+n[3]*n[3]),A.vertical=!1);var a=w.textLineMatrix[0],o=w.textLineMatrix[1],s=Math.sqrt(a*a+o*o);a=w.ctm[0],o=w.ctm[1];var c=Math.sqrt(a*a+o*o);A.textAdvanceScale=c*s,A.lastAdvanceWidth=0,A.lastAdvanceHeight=0;var l=e.spaceWidth/1e3*w.fontSize;return l?(A.spaceWidth=l,A.fakeSpaceMin=l*x,A.fakeMultiSpaceMin=l*C,A.fakeMultiSpaceMax=l*P,A.textRunBreakAllowed=!e.isMonospace):(A.spaceWidth=0,A.fakeSpaceMin=1/0,A.fakeMultiSpaceMin=1/0,A.fakeMultiSpaceMax=0,A.textRunBreakAllowed=!1),A.initialized=!0,A}function D(e){for(var t,r=0,n=e.length;r=32&&t<=127;)r++;return r0&&U(d,r.str)}var p=0,g=0;t.vertical?a+=g=c*w.fontMatrix[0]*w.fontSize+f:n+=p=(c*w.fontMatrix[0]*w.fontSize+f)*w.textHScale,w.translateTextMatrix(p,g),r.str.push(l)}return t.vertical?(r.lastAdvanceHeight=a,r.height+=Math.abs(a)):(r.lastAdvanceWidth=n,r.width+=n),r}function U(e,t){if(!(e0;)t.push(" ")}function q(){var e,t,r;A.initialized&&(A.vertical?A.height*=A.textAdvanceScale:A.width*=A.textAdvanceScale,_.items.push((t=(e=A).str.join(""),r=(0,g.bidi)(t,-1,e.vertical),{str:f?D(r.str):r.str,dir:r.dir,width:e.width,height:e.height,transform:e.transform,fontName:e.fontName})),A.initialized=!1,A.str.length=0)}function z(){var e=_.items.length;e>0&&(v.enqueue(_,e),_.items=[],_.styles=Object.create(null))}var G=new r;return new Promise((function e(t,r){var n=function(n){z(),Promise.all([n,v.ready]).then((function(){try{e(t,r)}catch(e){r(e)}}),r)};a.ensureNotTerminated(),G.reset();for(var c,u={},h=[];!(c=G.check())&&(h.length=0,u.args=h,L.read(u));){w=l.state;var d,g=u.fn;switch(h=u.args,0|g){case i.OPS.setFont:var y=h[0].name,S=h[1];if(w.font&&y===w.fontName&&S===w.fontSize)break;return q(),w.fontName=y,w.fontSize=S,void n(B(y,null));case i.OPS.setTextRise:q(),w.textRise=h[0];break;case i.OPS.setHScale:q(),w.textHScale=h[0]/100;break;case i.OPS.setLeading:q(),w.leading=h[0];break;case i.OPS.moveText:var k=!!w.font&&0===(w.font.vertical?h[0]:h[1]);if(d=h[0]-h[1],m&&k&&A.initialized&&d>0&&d<=A.fakeMultiSpaceMax){w.translateTextLineMatrix(h[0],h[1]),A.width+=h[0]-A.lastAdvanceWidth,A.height+=h[1]-A.lastAdvanceHeight,U(h[0]-A.lastAdvanceWidth-(h[1]-A.lastAdvanceHeight),A.str);break}q(),w.translateTextLineMatrix(h[0],h[1]),w.textMatrix=w.textLineMatrix.slice();break;case i.OPS.setLeadingMoveText:q(),w.leading=-h[1],w.translateTextLineMatrix(h[0],h[1]),w.textMatrix=w.textLineMatrix.slice();break;case i.OPS.nextLine:q(),w.carriageReturn();break;case i.OPS.setTextMatrix:if(d=w.calcTextLineMatrixAdvance(h[0],h[1],h[2],h[3],h[4],h[5]),m&&null!==d&&A.initialized&&d.value>0&&d.value<=A.fakeMultiSpaceMax){w.translateTextLineMatrix(d.width,d.height),A.width+=d.width-A.lastAdvanceWidth,A.height+=d.height-A.lastAdvanceHeight,U(d.width-A.lastAdvanceWidth-(d.height-A.lastAdvanceHeight),A.str);break}q(),w.setTextMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),w.setTextLineMatrix(h[0],h[1],h[2],h[3],h[4],h[5]);break;case i.OPS.setCharSpacing:w.charSpacing=h[0];break;case i.OPS.setWordSpacing:w.wordSpacing=h[0];break;case i.OPS.beginText:q(),w.textMatrix=i.IDENTITY_MATRIX.slice(),w.textLineMatrix=i.IDENTITY_MATRIX.slice();break;case i.OPS.showSpacedText:if(!l.state.font){T.ensureStateFont(l.state);continue}for(var x,C=h[0],P=0,F=C.length;PA.fakeMultiSpaceMax)||(A.height+=x)):(x=(d=-d)*w.textHScale,w.translateTextMatrix(x,0),(M=A.textRunBreakAllowed&&d>A.fakeMultiSpaceMax)||(A.width+=x)),M?q():d>0&&U(d,A.str)}break;case i.OPS.showText:if(!l.state.font){T.ensureStateFont(l.state);continue}j(h[0]);break;case i.OPS.nextLineShowText:if(!l.state.font){T.ensureStateFont(l.state);continue}q(),w.carriageReturn(),j(h[0]);break;case i.OPS.nextLineSetSpacingShowText:if(!l.state.font){T.ensureStateFont(l.state);continue}q(),w.wordSpacing=h[0],w.charSpacing=h[1],w.carriageReturn(),j(h[2]);break;case i.OPS.paintXObject:q(),R||(R=o.get("XObject")||s.Dict.empty);var D=h[0].name;if(D&&O.getByName(D))break;return void n(new Promise((function(e,t){if(!D)throw new i.FormatError("XObject must be referred to by name.");var r=R.getRaw(D);if(r instanceof s.Ref){if(O.getByRef(r))return void e();r=E.fetch(r)}if(r){if(!(0,s.isStream)(r))throw new i.FormatError("XObject should be a stream");var n=r.dict.get("Subtype");if(!(0,s.isName)(n))throw new i.FormatError("XObject should have a Name subtype");if("Form"!==n.name)return O.set(D,r.dict.objId,!0),void e();var c=l.state.clone(),u=new I(c),h=r.dict.getArray("Matrix");Array.isArray(h)&&6===h.length&&u.transform(h),z();var d={enqueueInvoked:!1,enqueue:function(e,t){this.enqueueInvoked=!0,v.enqueue(e,t)},get desiredSize(){return v.desiredSize},get ready(){return v.ready}};T.getTextContent({stream:r,task:a,resources:r.dict.get("Resources")||o,stateManager:u,normalizeWhitespace:f,combineTextItems:m,sink:d,seenStyles:b}).then((function(){d.enqueueInvoked||O.set(D,r.dict.objId,!0),e()}),t)}else e()})).catch((function(e){if(!(e instanceof i.AbortException)){if(!T.options.ignoreErrors)throw e;(0,i.warn)('getTextContent - ignoring XObject: "'.concat(e,'".'))}})));case i.OPS.setGState:q();var W=h[0],H=o.get("ExtGState");if(!(0,s.isDict)(H)||!(0,s.isName)(W))break;var V=H.get(W.name);if(!(0,s.isDict)(V))break;var X=V.get("Font");if(X)return w.fontName=null,w.fontSize=X[1],void n(B(null,X[0]))}if(_.items.length>=v.desiredSize){c=!0;break}}c?n(p):(q(),z(),t())})).catch((function(e){if(!(e instanceof i.AbortException)){if(t.options.ignoreErrors)return(0,i.warn)('getTextContent - ignoring errors during "'.concat(a.name,'" ')+'task: "'.concat(e,'".')),q(),void z();throw e}}))},extractDataStructures:function(e,t,r){var n,a=this,o=this.xref,u=e.get("ToUnicode")||t.get("ToUnicode"),h=u?this.readToUnicode(u):Promise.resolve(void 0);if(r.composite){var f=e.get("CIDSystemInfo");(0,s.isDict)(f)&&(r.cidSystemInfo={registry:(0,i.stringToPDFString)(f.get("Registry")),ordering:(0,i.stringToPDFString)(f.get("Ordering")),supplement:f.get("Supplement")});var d=e.get("CIDToGIDMap");(0,s.isStream)(d)&&(n=d.getBytes())}var p,g=[],m=null;if(e.has("Encoding")){if(p=e.get("Encoding"),(0,s.isDict)(p)){if(m=p.get("BaseEncoding"),m=(0,s.isName)(m)?m.name:null,p.has("Differences"))for(var v=p.get("Differences"),y=0,b=0,w=v.length;b0,r.dict=e,h.then((function(e){return r.toUnicode=e,a.buildToUnicode(r)})).then((function(e){return r.toUnicode=e,n&&(r.cidToGidMap=a.readCidToGidMap(n,e)),r}))},_buildSimpleFontToUnicode:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,i.assert)(!e.composite,"Must be a simple font.");var r=[],n=e.defaultEncoding.slice(),a=e.baseEncodingName,o=e.differences;for(var s in o){var u=o[s];".notdef"!==u&&(n[s]=u)}var f=(0,y.getGlyphsUnicode)();for(var d in n){var p=n[d];if(""!==p)if(void 0!==f[p])r[d]=String.fromCharCode(f[p]);else{var g=0;switch(p[0]){case"G":3===p.length&&(g=parseInt(p.substring(1),16));break;case"g":5===p.length&&(g=parseInt(p.substring(1),16));break;case"C":case"c":if(p.length>=3&&p.length<=4){var m=p.substring(1);if(t){g=parseInt(m,16);break}if(g=+m,Number.isNaN(g)&&Number.isInteger(parseInt(m,16)))return this._buildSimpleFontToUnicode(e,!0)}break;default:var v=(0,h.getUnicodeForGlyph)(p,f);-1!==v&&(g=v)}if(g>0&&g<=1114111&&Number.isInteger(g)){if(a&&g===+d){var b=(0,l.getEncoding)(a);if(b&&(p=b[d])){r[d]=String.fromCharCode(f[p]);continue}}r[d]=String.fromCodePoint(g)}}}return new c.ToUnicodeMap(r)},buildToUnicode:function(e){if(e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._buildSimpleFontToUnicode(e)),Promise.resolve(e.toUnicode);if(!e.composite)return Promise.resolve(this._buildSimpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof o.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){var t=e.cidSystemInfo.registry,r=e.cidSystemInfo.ordering,n=s.Name.get(t+"-"+r+"-UCS2");return o.CMapFactory.create({encoding:n,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(t){var r=e.cMap,n=[];return r.forEach((function(e,r){if(r>65535)throw new i.FormatError("Max size of CID is 65,535");var a=t.lookup(r);a&&(n[e]=String.fromCharCode((a.charCodeAt(0)<<8)+a.charCodeAt(1)))})),new c.ToUnicodeMap(n)}))}return Promise.resolve(new c.IdentityToUnicodeMap(e.firstChar,e.lastChar))},readToUnicode:function(e){var t=this,r=e;return(0,s.isName)(r)?o.CMapFactory.create({encoding:r,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(e){return e instanceof o.IdentityCMap?new c.IdentityToUnicodeMap(0,65535):new c.ToUnicodeMap(e.getMap())})):(0,s.isStream)(r)?o.CMapFactory.create({encoding:r,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(e){if(e instanceof o.IdentityCMap)return new c.IdentityToUnicodeMap(0,65535);var t=new Array(e.length);return e.forEach((function(e,r){for(var n=[],a=0;a>1;(0!==i||t.has(o))&&(r[o]=i)}return r},extractWidths:function(e,t,r){var n,a,i,o,l,u,h,f,d=this.xref,p=[],g=0,m=[];if(r.composite){if(g=e.has("DW")?e.get("DW"):1e3,f=e.get("W"))for(a=0,i=f.length;ac&&(0,i.info)("Command ".concat(n,": expected [0, ").concat(c,"] args, ")+"but received ".concat(l," args."));else{if(l!==c){for(var u=this.nonProcessedArgs;l>c;)u.push(t.shift()),l--;for(;l=i.OPS.moveTo&&o<=i.OPS.endPath&&++this._numInvalidPathOPS>20)throw new i.FormatError("Invalid ".concat(h));(0,i.warn)("Skipping ".concat(h)),null!==t&&(t.length=0);continue}}return this.preprocessCommand(o,t),e.fn=o,e.args=t,!0}if(r===s.EOF)return!1;if(null!==r&&(null===t&&(t=[]),t.push(r),t.length>33))throw new i.FormatError("Too many arguments")}},preprocessCommand:function(e,t){switch(0|e){case i.OPS.save:this.stateManager.save();break;case i.OPS.restore:this.stateManager.restore();break;case i.OPS.transform:this.stateManager.transform(t)}}},t}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CMapFactory=t.IdentityCMap=t.CMap=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(198),s=r(204),c=r(201),l=r(205);function u(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function h(e){return h="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},h(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){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}}();return function(){var r,n=p(e);if(t){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function g(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&&void 0!==arguments[0]&&arguments[0];g(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}return v(e,[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>b)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var n=r.length-1;e<=t;)this._map[e++]=r,r=r.substring(0,n)+String.fromCharCode(r.charCodeAt(n)+1)}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var n=r.length,a=0;e<=t&&a>>0;for(var s=a[i],c=0,l=s.length;c=u&&n<=h)return r.charcode=n,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}]),e}();t.CMap=w;var S=function(e){!function(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&&f(e,t)}(r,e);var t=d(r);function r(e,n){var a;return g(this,r),(a=t.call(this)).vertical=e,a.addCodespaceRange(n,0,65535),a}return v(r,[{key:"mapCidRange",value:function(e,t,r){(0,i.unreachable)("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){(0,i.unreachable)("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){(0,i.unreachable)("should not access .isIdentityCMap")}}]),r}(w);t.IdentityCMap=S;var k=function(){function e(e,t){for(var r=0,n=0;n<=t;n++)r=r<<8|e[n];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){for(var n=0,a=r;a>=0;a--)n+=e[a]+t[a],e[a]=255&n,n>>=8}function n(e,t){for(var r=1,n=t;n>=0&&r>0;n--)r+=e[n],e[n]=255&r,r>>=8}var a=16,o=19;function s(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(o)}function c(){}return s.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new i.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t},readSigned:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1},readHex:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1},readHexNumber:function(e,t){var r,n=this.tmpBuf,a=0;do{var o=this.readByte();if(o<0)throw new i.FormatError("unexpected EOF in bcmap");r=!(128&o),n[a++]=127&o}while(!r);for(var s=t,c=0,l=0;s>=0;){for(;l<8&&n.length>0;)c=n[--a]<>=8,l-=8}},readHexSigned:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,n=0,a=0;a<=t;a++)n=(1&n)<<8|e[a],e[a]=n>>1^r},readString:function(){for(var e=this.readNumber(),t="",r=0;r=0;){var S=p>>5;if(7!==S){var k=!!(16&p),_=15&p;if(_+1>a)throw new Error("processBinaryCMap: Invalid dataSize.");var A,x=h.readNumber();switch(S){case 0:for(h.readHex(m,_),h.readHexNumber(v,_),r(v,m,_),o.addCodespaceRange(_+1,e(m,_),e(v,_)),A=1;A>>0}function t(e){if(!(0,i.isString)(e))throw new i.FormatError("Malformed CMap: expected string.")}function r(e){if(!Number.isInteger(e))throw new i.FormatError("Malformed CMap: expected int.")}function n(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfchar"))return;t(a);var i=e(a);t(a=n.getObj());var s=a;r.mapOne(i,s)}}function h(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfrange"))return;t(a);var s=e(a);t(a=n.getObj());var c=e(a);if(a=n.getObj(),Number.isInteger(a)||(0,i.isString)(a)){var l=Number.isInteger(a)?String.fromCharCode(a):a;r.mapBfRange(s,c,l)}else{if(!(0,o.isCmd)(a,"["))break;a=n.getObj();for(var u=[];!(0,o.isCmd)(a,"]")&&!(0,o.isEOF)(a);)u.push(a),a=n.getObj();r.mapBfRangeToArray(s,c,u)}}throw new i.FormatError("Invalid bf range.")}function f(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidchar"))return;t(i);var s=e(i);r(i=a.getObj());var c=i;n.mapOne(s,c)}}function d(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidrange"))return;t(i);var s=e(i);t(i=a.getObj());var c=e(i);r(i=a.getObj());var l=i;n.mapCidRange(s,c,l)}}function p(t,r){for(;;){var n=r.getObj();if((0,o.isEOF)(n))break;if((0,o.isCmd)(n,"endcodespacerange"))return;if(!(0,i.isString)(n))break;var a=e(n);if(n=r.getObj(),!(0,i.isString)(n))break;var s=e(n);t.addCodespaceRange(n.length,a,s)}throw new i.FormatError("Invalid codespace range.")}function g(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function m(e,t){var r=t.getObj();(0,o.isName)(r)&&(0,i.isString)(r.name)&&(e.name=r.name)}function v(e,t,r,a){var s,l;e:for(;;)try{var u=t.getObj();if((0,o.isEOF)(u))break;if((0,o.isName)(u))"WMode"===u.name?g(e,t):"CMapName"===u.name&&m(e,t),s=u;else if((0,o.isCmd)(u))switch(u.cmd){case"endcmap":break e;case"usecmap":(0,o.isName)(s)&&(l=s.name);break;case"begincodespacerange":p(e,t);break;case"beginbfchar":n(e,t);break;case"begincidchar":f(e,t);break;case"beginbfrange":h(e,t);break;case"begincidrange":d(e,t)}}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)("Invalid cMap data: "+e);continue}return!a&&l&&(a=l),a?b(e,r,a):Promise.resolve(e)}function b(e,t,r){return _(r,t).then((function(t){if(e.useCMap=t,0===e.numCodespaceRanges){for(var r=e.useCMap.codespaceRanges,n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];this._map=e}return e.prototype={get length(){return this._map.length},forEach:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))},has:function(e){return void 0!==this._map[e]},get:function(e){return this._map[e]},charCodeOf:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1},amend:function(e){for(var t in e)this._map[t]=e[t]}},e}();t.ToUnicodeMap=T;var E=function(){function e(e,t){this.firstChar=e,this.lastChar=t}return e.prototype={get length(){return this.lastChar+1-this.firstChar},forEach:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)},has:function(e){return this.firstChar<=e&&e<=this.lastChar},get:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)},charCodeOf:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1},amend:function(e){(0,n.unreachable)("Should not call amend()")}},e}();t.IdentityToUnicodeMap=E;var R=function(){function e(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function t(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function r(e,t,r){var n,a;if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(n=0,a=r.length;nr;)r<<=1,n++;var a=r*t;return{range:a,entry:n,rangeShift:t*e-a}},a.prototype={toArray:function(){var i=this.sfnt,o=this.tables,s=Object.keys(o);s.sort();var c,u,h,f,d,p=s.length,g=12+16*p,m=[g];for(c=0;c>>0,m.push(g);var v=new Uint8Array(g);for(c=0;c>>0;t(v,g+4,b),t(v,g+8,m[c]),t(v,g+12,o[d].length),g+=16}return v},addTable:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}},a}(),O=function(){function e(e,t,r){var a;this.name=e,this.loadedName=r.loadedName,this.isType3Font=r.isType3Font,this.missingFile=!1,this.glyphCache=Object.create(null),this.isSerifFont=!!(r.flags&k.Serif),this.isSymbolicFont=!!(r.flags&k.Symbolic),this.isMonospace=!!(r.flags&k.FixedPitch);var i=r.type,o=r.subtype;this.type=i,this.subtype=o;var s="sans-serif";if(this.isMonospace?s="monospace":this.isSerifFont&&(s="serif"),this.fallbackName=s,this.differences=r.differences,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.composite=r.composite,this.cMap=r.cMap,this.ascent=r.ascent/y,this.descent=r.descent/y,this.fontMatrix=r.fontMatrix,this.bbox=r.bbox,this.defaultEncoding=r.defaultEncoding,this.toUnicode=r.toUnicode,this.fallbackToUnicode=r.fallbackToUnicode||new T,this.toFontChar=[],"Type3"!==r.type){if(this.cidEncoding=r.cidEncoding,this.vertical=!!r.vertical,this.vertical&&(this.vmetrics=r.vmetrics,this.defaultVMetrics=r.defaultVMetrics),!t||t.isEmpty)return t&&(0,n.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")"),void this.fallbackToSystemFont();var c=function(e,t){var r,a,i=t.type,o=t.subtype,s=t.composite;return function(e){var t=e.peekBytes(4);return 65536===(0,l.readUint32)(t,0)||"true"===(0,n.bytesToString)(t)}(e)||I(e)?r=s?"CIDFontType2":"TrueType":function(e){var t=e.peekBytes(4);return"OTTO"===(0,n.bytesToString)(t)}(e)?r=s?"CIDFontType2":"OpenType":function(e){var t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?r=s?"CIDFontType0":"MMType1"===i?"MMType1":"Type1":function(e){var t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e)?s?(r="CIDFontType0",a="CIDFontType0C"):(r="MMType1"===i?"MMType1":"Type1",a="Type1C"):((0,n.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),r=i,a=o),[r,a]}(t,r),u=p(c,2);i=u[0],o=u[1],i===this.type&&o===this.subtype||(0,n.info)("Inconsistent font file Type/SubType, expected: "+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(i,"/").concat(o,"."));try{var h;switch(i){case"MMType1":(0,n.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var f="Type1C"===o||"CIDFontType0C"===o?new M(t,r):new L(e,t,r);A(r),h=this.convert(e,f,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",h=this.checkAndRepair(e,t,r),this.isOpenType&&(A(r),i="OpenType");break;default:throw new n.FormatError("Font ".concat(i," is not supported"))}}catch(e){return(0,n.warn)(e),void this.fallbackToSystemFont()}this.data=h,this.fontType=x(i,o),this.fontMatrix=r.fontMatrix,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.toUnicode=r.toUnicode,this.seacMap=r.seacMap}else{for(a=0;a<256;a++)this.toFontChar[a]=this.differences[a]||r.defaultEncoding[a];this.fontType=n.FontType.TYPE3}}var t;function r(e,t){return(e<<8)+t}function d(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function m(e){return String.fromCharCode(e>>8&255,255&e)}function O(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function I(e){var t=e.peekBytes(4);return"ttcf"===(0,n.bytesToString)(t)}function F(e,t,r){for(var n,a=[],i=0,o=e.length;ic){if(++o>=v.length){(0,n.warn)("Ran out of space in font private use area.");break}s=v[o][0],c=v[o][1]}var h=s++;0===u&&(u=r),a[h]=u,i[l]=h}}return{toFontChar:i,charCodeToGlyphId:a,nextAvailableFontCharCode:s}}function D(e,t){var r,a,i,o,s=function(e,t){var r=[];for(var n in e)e[n]>=t||r.push({fontCharCode:0|n,glyphId:e[n]});0===r.length&&r.push({fontCharCode:0,glyphId:0}),r.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));for(var a=[],i=r.length,o=0;o65535?2:1,l="\0\0"+m(c)+"\0\0"+(0,n.string32)(4+8*c);for(r=s.length-1;r>=0&&!(s[r][0]<=65535);--r);var u=r+1;s[r][0]<65535&&65535===s[r][1]&&(s[r][1]=65534);var h,f,d,p,g=s[r][1]<65535?1:0,v=u+g,y=R.getSearchParams(v,2),b="",w="",S="",k="",_="",A=0;for(r=0,a=u;r0&&(w+="ÿÿ",b+="ÿÿ",S+="\0",k+="\0\0");var P="\0\0"+m(2*v)+m(y.range)+m(y.entry)+m(y.rangeShift)+w+"\0\0"+b+S+k+_,T="",E="";if(c>1){for(l+="\0\0\n"+(0,n.string32)(4+8*c+4+P.length),T="",r=0,a=s.length;r(h|=0)||!l)&&(l=h),u 123 are reserved for internal usage");s|=1<65535&&(u=65535)}else l=0,u=255;var d=e.bbox||[0,0,0,0],p=r.unitsPerEm||1/(e.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],g=e.ascentScaled?1:p/y,v=r.ascent||Math.round(g*(e.ascent||d[3])),b=r.descent||Math.round(g*(e.descent||d[1]));b>0&&e.descent>0&&d[1]<0&&(b=-b);var w=r.yMax||v,S=-r.yMin||-b;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,n.string32)(a)+(0,n.string32)(i)+(0,n.string32)(o)+(0,n.string32)(s)+"*21*"+m(e.italicAngle?1:0)+m(l||e.firstChar)+m(u||e.lastChar)+m(v)+m(b)+"\0d"+m(w)+m(S)+"\0\0\0\0\0\0\0\0"+m(e.xHeight)+m(e.capHeight)+m(0)+m(l||e.firstChar)+"\0"}function j(e){var t=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+(0,n.string32)(t)+"\0\0\0\0"+(0,n.string32)(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function U(e,t){t||(t=[[],[]]);var r,n,a,i,o,s=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||"",t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],c=[];for(r=0,n=s.length;r0&&void 0!==arguments[0]&&arguments[0]?[].concat(w,S):w,a=Object.create(null),i=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(n);try{for(i.s();!(r=i.n()).done;)void 0!==(t=this[e=r.value])&&(a[e]=t)}catch(e){i.e(e)}finally{i.f()}return a},fallbackToSystemFont:function(){var e=this;this.missingFile=!0;var t=this.name,r=this.type,a=this.subtype,l=t.replace(/[,_]/g,"-").replace(/\s/g,""),u=(0,s.getStdFontMap)(),h=(0,s.getNonStdFontMap)(),f=!!u[l]||!(!h[l]||!u[h[l]]);if(l=u[l]||h[l]||l,this.bold=-1!==l.search(/bold/gi),this.italic=-1!==l.search(/oblique/gi)||-1!==l.search(/italic/gi),this.black=-1!==t.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,f&&"CIDFontType2"===r&&this.cidEncoding.startsWith("Identity-")){var d=(0,s.getGlyphMapForStandardFonts)(),p=[];for(var g in d)p[+g]=d[g];if(/Arial-?Black/i.test(t)){var m=(0,s.getSupplementalGlyphMapForArialBlack)();for(var v in m)p[+v]=m[v]}else if(/Calibri/i.test(t)){var y=(0,s.getSupplementalGlyphMapForCalibri)();for(var b in y)p[+b]=y[b]}this.toUnicode instanceof E||this.toUnicode.forEach((function(e,t){p[+e]=t})),this.toFontChar=p,this.toUnicode=new T(p)}else if(/Symbol/i.test(l))this.toFontChar=F(o.SymbolSetEncoding,(0,i.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(l))/Wingdings/i.test(t)&&(0,n.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."),this.toFontChar=F(o.ZapfDingbatsEncoding,(0,i.getDingbatsGlyphsUnicode)(),this.differences);else if(f)this.toFontChar=F(this.defaultEncoding,(0,i.getGlyphsUnicode)(),this.differences);else{var w=(0,i.getGlyphsUnicode)(),S=[];if(this.toUnicode.forEach((function(t,r){if(!e.composite){var n=e.differences[t]||e.defaultEncoding[t],a=(0,c.getUnicodeForGlyph)(n,w);-1!==a&&(r=a)}S[+t]=r})),this.composite&&this.toUnicode instanceof E&&/Verdana/i.test(t)){var k=(0,s.getGlyphMapForStandardFonts)();for(var _ in k)S[+_]=k[_]}this.toFontChar=S}this.loadedName=l.split("-")[0],this.fontType=x(r,a)},checkAndRepair:function(e,t,s){var c=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function l(e,t){var r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(var n=0;n>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0,o=e.pos;e.pos=e.start?e.start:0,e.skip(a);var s=e.getBytes(i);return e.pos=o,"head"===t&&(s[8]=s[9]=s[10]=s[11]=0,s[17]|=32),{tag:t,checksum:r,length:i,offset:a,data:s}}function p(e){return{version:(0,n.bytesToString)(e.getBytes(4)),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function g(e,t,r,n,a,i){var o={length:0,sizeOfInstructions:0};if(r-t<=12)return o;var s=e.subarray(t,r),c=d(s[0],s[1]);if(c<0)return function(e,t,r){e[t+1]=r,e[t]=r>>>8}(s,0,c=-1),n.set(s,a),o.length=s.length,o;var l,u=10,h=0;for(l=0;ls.length?o:!i&&p>0?(n.set(s.subarray(0,f),a),n.set([0,0],a+f),n.set(s.subarray(g,k),a+f+2),k-=p,s.length-k>3&&(k=k+3&-4),o.length=k,o):s.length-k>3?(k=k+3&-4,n.set(s.subarray(0,k),a),o.length=k,o):(n.set(s,a),o.length=s.length,o)}function m(e){var r=(t.start?t.start:0)+e.offset;t.pos=r;var a=[[],[]],i=e.length,o=r+i;if(0!==t.getUint16()||i<6)return a;var s,c,l=t.getUint16(),u=t.getUint16(),h=[];for(s=0;so)){t.pos=p;var g=d.name;if(d.encoding){for(var m="",v=0,y=d.length;v0&&(l+=S-1)}}else(m||y)&&((0,n.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,h=l,o=f.pop(),t.functionsDefined[o]={data:c,i:l};else if(!m&&!y)if(o=f[f.length-1],isNaN(o))(0,n.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[o]=!0,o in t.functionsStackDeltas){var _=f.length+t.functionsStackDeltas[o];if(_<0)return(0,n.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);f.length=_}else if(o in t.functionsDefined&&!p.includes(o)){if(d.push({data:c,i:l,stackTop:f.length-1}),p.push(o),!(s=t.functionsDefined[o]))return(0,n.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=s.data,l=s.i}if(!m&&!y){var A=0;for(w<=142?A=k[w]:w>=192&&w<=223?A=-1:w>=224&&(A=-2),w>=113&&w<=117&&(a=f.pop(),isNaN(a)||(A=2*-a));A<0&&f.length>0;)f.pop(),A++;for(;A>0;)f.push(NaN),A--}}t.tooComplexToFollowFunctions=g;var x=[c];l>c.length&&x.push(new Uint8Array(l-c.length)),h>u&&((0,n.warn)("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){var r,n,a=0;for(r=0,n=t.length;r>>0,o=[],s=0;s>>0);var c={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:i,offsetTable:o};switch(r){case 1:return c;case 2:return c.dsigTag=e.getInt32()>>>0,c.dsigLength=e.getInt32()>>>0,c.dsigOffset=e.getInt32()>>>0,c}throw new n.FormatError("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),a=r.numFonts,i=r.offsetTable,o=0;o0||!(s.cMap instanceof h.IdentityCMap));if("OTTO"===v.version&&!E||!y.head||!y.hhea||!y.maxp||!y.post)return S=new f.Stream(y["CFF "].data),w=new M(S,s),A(s),this.convert(e,w,s);delete y.glyf,delete y.loca,delete y.fpgm,delete y.prep,delete y["cvt "],this.isOpenType=!0}if(!y.maxp)throw new n.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+y.maxp.offset;var O=t.getInt32(),F=t.getUint16(),L=F+1,q=!0;L>65535&&(q=!1,L=F,(0,n.warn)("Not enough space in glyfs to duplicate first glyph."));var z=0,G=0;O>=65536&&y.maxp.length>=22&&(t.pos+=8,t.getUint16()>2&&(y.maxp.data[14]=0,y.maxp.data[15]=2),t.pos+=4,z=t.getUint16(),t.pos+=4,G=t.getUint16()),y.maxp.data[4]=L>>8,y.maxp.data[5]=255&L;var W=function(e,t,r,a){var i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&x(e,i),t&&x(t,i),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,n.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,a=e.functionsUsed.length;rt)return(0,n.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,n.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(i,a),r&&1&r.length){var o=new Uint8Array(r.length+1);o.set(r.data),r.data=o}return i.hintsValid}(y.fpgm,y.prep,y["cvt "],z);if(W||(delete y.fpgm,delete y.prep,delete y["cvt "]),function(e,t,r,a,i){if(t){e.pos=(e.start?e.start:0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=8,e.pos+=2;var o=e.getUint16();o>a&&((0,n.info)("The numOfMetrics ("+o+") should not be greater than the numGlyphs ("+a+")"),o=a,t.data[34]=(65280&o)>>8,t.data[35]=255&o);var s=a-o-(r.length-4*o>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),i&&(c[r.length]=r.data[2],c[r.length+1]=r.data[3]),r.data=c}}else r&&(r.data=null)}(t,y.hhea,y.hmtx,L,q),!y.head)throw new n.FormatError('Required "head" table is not found');!function(e,t,a){var i,o,s,c,l=e.data,u=(i=l[0],o=l[1],s=l[2],c=l[3],(i<<24)+(o<<16)+(s<<8)+c);u>>16!=1&&((0,n.info)("Attempting to fix invalid version in head table: "+u),l[0]=0,l[1]=1,l[2]=0,l[3]=0);var h=r(l[50],l[51]);if(h<0||h>1){(0,n.info)("Attempting to fix invalid indexToLocFormat in head table: "+h);var f=t+1;if(a===f<<1)l[50]=0,l[51]=0;else{if(a!==f<<2)throw new n.FormatError("Could not fix indexToLocFormat: "+h);l[50]=0,l[51]=1}}}(y.head,F,T?y.loca.length:0);var H=Object.create(null);if(T){var V=r(y.head.data[50],y.head.data[51]),X=function(e,t,r,n,a,i,o){var s,c,l;n?(s=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},l=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(s=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},l=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var u=i?r+1:r,h=s*(1+u),f=new Uint8Array(h);f.set(e.data.subarray(0,h)),e.data=f;var d,p,m=t.data,v=m.length,y=new Uint8Array(v),b=c(f,0),w=0,S=Object.create(null);for(l(f,0,w),d=0,p=s;dv&&(v+3&-4)===k&&(k=v),k>v&&(b=k);var _=g(m,b,k,y,w,a),A=_.length;0===A&&(S[d]=!0),_.sizeOfInstructions>o&&(o=_.sizeOfInstructions),l(f,p,w+=A),b=k}if(0===w){var x=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(d=0,p=s;dC+w?t.data=y.subarray(0,C+w):(t.data=new Uint8Array(C+w),t.data.set(y.subarray(0,w))),t.data.set(y.subarray(0,C),w),l(e.data,f.length-s,w+C)}else t.data=y.subarray(0,w);return{missingGlyphs:S,maxSizeOfInstructions:o}}(y.loca,y.glyf,F,V,W,q,G);H=X.missingGlyphs,O>=65536&&y.maxp.length>=22&&(y.maxp.data[26]=X.maxSizeOfInstructions>>8,y.maxp.data[27]=255&X.maxSizeOfInstructions)}if(!y.hhea)throw new n.FormatError('Required "hhea" table is not found');0===y.hhea.data[10]&&0===y.hhea.data[11]&&(y.hhea.data[10]=255,y.hhea.data[11]=255);var Y={unitsPerEm:r(y.head.data[18],y.head.data[19]),yMax:r(y.head.data[42],y.head.data[43]),yMin:d(y.head.data[38],y.head.data[39]),ascent:r(y.hhea.data[4],y.hhea.data[5]),descent:d(y.hhea.data[6],y.hhea.data[7])};this.ascent=Y.ascent/Y.unitsPerEm,this.descent=Y.descent/Y.unitsPerEm,y.post&&function(e,r,a){var i=(t.start?t.start:0)+e.offset;t.pos=i;var o,s=i+e.length,c=t.getInt32();t.skip(28);var l,u=!0;switch(c){case 65536:o=_;break;case 131072:var h=t.getUint16();if(h!==a){u=!1;break}var f=[];for(l=0;l=32768){u=!1;break}f.push(d)}if(!u)break;for(var p=[],g=[];t.pos65535)throw new n.FormatError("Max size of CID is 65,535");var r=-1;$?r=t:void 0!==Q[t]&&(r=Q[t]),r>=0&&r>>0,p=!1;if((!s||s.platformId!==h||s.encodingId!==f)&&(0===h&&0===f||1===h&&0===f?p=!0:3!==h||1!==f||!a&&s?r&&3===h&&0===f&&(p=!0,l=!0):(p=!0,r||(l=!0)),p&&(s={platformId:h,encodingId:f,offset:d}),l))break}if(s&&(t.pos=o+s.offset),!s||-1===t.peekByte())return(0,n.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var g=t.getUint16();t.skip(4);var m,v,y=!1,b=[];if(0===g){for(m=0;m<256;m++){var w=t.getByte();w&&b.push({charCode:m,glyphId:w})}y=!0}else if(4===g){var S=t.getUint16()>>1;t.skip(6);var k,_=[];for(k=0;k>1)-(S-k);i.offsetIndex=C,A=Math.max(A,C+i.end-i.start+1)}else i.offsetIndex=-1}var P=[];for(m=0;m0&&J(fe)&&(K[oe]=fe)}}}}else if(0===ee&&0===te)for(var de=0;de=61440&&ge<=61695&&(ge&=255),K[ge]=re[pe].glyphId}}0===K.length&&(K[0]=0);var me=L-1;q||(me=0);var ve=N(K,J,me);if(this.toFontChar=ve.toFontChar,y.cmap={tag:"cmap",data:D(ve.charCodeToGlyphId,L)},y["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;var r=t.getUint16();t.skip(60);var n=t.getUint16();return!(r<4&&768&n||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(y["OS/2"],t)||(y["OS/2"]={tag:"OS/2",data:B(s,ve.charCodeToGlyphId,Y)}),!T)try{S=new f.Stream(y["CFF "].data),(w=new a.CFFParser(S,s,b).parse()).duplicateFirstGlyph();var ye=new a.CFFCompiler(w);y["CFF "].data=ye.compile()}catch(e){(0,n.warn)("Failed to compile font "+s.loadedName)}if(y.name){var be=m(y.name);y.name.data=U(e,be)}else y.name={tag:"name",data:U(this.name)};var we=new R(v.version);for(var Se in y)we.addTable(Se,y[Se].data);return we.toArray()},convert:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(!e.hasIncludedToUnicodeMap&&!(e.hasEncoding||t===e.defaultEncoding||e.toUnicode instanceof E)){var r=[],n=(0,i.getGlyphsUnicode)();for(var a in t){var o=t[a],s=(0,c.getUnicodeForGlyph)(o,n);-1!==s&&(r[a]=String.fromCharCode(s))}e.toUnicode.amend(r)}}(r,r.builtInEncoding);var a=1;t instanceof M&&(a=t.numGlyphs-1);var s=t.getGlyphMapping(r),l=N(s,t.hasGlyphId.bind(t),a);this.toFontChar=l.toFontChar;var u=t.numGlyphs;function h(e,t){var r=null;for(var n in e)t===e[n]&&(r||(r=[]),r.push(0|n));return r}function f(e,t){for(var r in e)if(t===e[r])return 0|r;return l.charCodeToGlyphId[l.nextAvailableFontCharCode]=t,l.nextAvailableFontCharCode++}var d=t.seacs;if(d&&d.length){var p=r.fontMatrix||n.FONT_IDENTITY_MATRIX,g=t.getCharset(),v=Object.create(null);for(var y in d){var b=d[y|=0],w=o.StandardEncoding[b[2]],S=o.StandardEncoding[b[3]],k=g.indexOf(w),_=g.indexOf(S);if(!(k<0||_<0)){var A={x:b[0]*p[0]+b[1]*p[2]+p[4],y:b[0]*p[1]+b[1]*p[3]+p[5]},x=h(s,y);if(x)for(var C=0,P=x.length;C=0?n:0;else if(l)for(a in t)c[a]=t[a];else for(s=o.StandardEncoding,a=0;a=0?n:0;var u,h=e.differences;if(h)for(a in h){var f=h[a];if(-1===(n=r.indexOf(f))){u||(u=(0,i.getGlyphsUnicode)());var d=C(f,u);d!==f&&(n=r.indexOf(d))}c[a]=n>=0?n:0}return c}t.ErrorFont=I;var L=function(){function e(e,t,r){for(var n,a=e.length,i=t.length,o=a-i,s=r,c=!1;s=i){for(s+=n;s=0&&(c[l]=i)}return F(e,c,o)},hasGlyphId:function(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)},getSeacs:function(e){var t,r,n=[];for(t=0,r=e.length;t0;b--)y[b]-=y[b-1];g.setByName(v,y)}}o.topDict.privateDict=g;var w=new a.CFFIndex;for(l=0,u=n.length;l=t)throw new n.FormatError("Invalid CFF header");0!==r&&((0,n.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);var a=e[0],i=e[1],o=e[2],s=e[3];return{obj:new u(a,i,o,s),endPos:o}},parseDict:function(e){var t=0;function r(){var r=e[t++];return 30===r?function(){for(var r="",n=15,a=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],i=e.length;t>4,c=15&o;if(s===n)break;if(r+=a[s],c===n)break;r+=a[c]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:((0,n.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)}var a=[],i=[];t=0;for(var o=e.length;t10)return!1;for(var s=r.stackSize,c=r.stack,l=a.length,u=0;u>16,u+=2,s++;else if(14===h){if(s>=4&&(s-=4,this.seacAnalysisEnabled))return r.seac=c.slice(s,s+4),!1;f=e[h]}else if(h>=32&&h<=246)c[s]=h-139,s++;else if(h>=247&&h<=254)c[s]=h<251?(h-247<<8)+a[u]+108:-(h-251<<8)-a[u]-108,u++,s++;else if(255===h)c[s]=(a[u]<<24|a[u+1]<<16|a[u+2]<<8|a[u+3])/65536,u+=4,s++;else if(19===h||20===h)r.hints+=s>>1,u+=r.hints+7>>3,s%=2,f=e[h];else{if(10===h||29===h){var p;if(!(p=10===h?i:o))return f=e[h],(0,n.warn)("Missing subrsIndex for "+f.id),!1;var g=32768;p.count<1240?g=107:p.count<33900&&(g=1131);var m=c[--s]+g;if(m<0||m>=p.count||isNaN(m))return f=e[h],(0,n.warn)("Out of bounds subrIndex for "+f.id),!1;if(r.stackSize=s,r.callDepth++,!this.parseCharString(r,p.get(m),i,o))return!1;r.callDepth--,s=r.stackSize;continue}if(11===h)return r.stackSize=s,!0;f=e[h]}if(f){if(f.stem&&(r.hints+=s>>1,3===h||23===h?r.hasVStems=!0:!r.hasVStems||1!==h&&18!==h||((0,n.warn)("CFF stem hints are in wrong order"),a[u-1]=1===h?3:23)),"min"in f&&!r.undefStack&&s=2&&f.stem?s%=2:s>1&&(0,n.warn)("Found too many parameters for stack-clearing command"),s>0&&c[s-1]>=0&&(r.width=c[s-1])),"stackDelta"in f?("stackFn"in f&&f.stackFn(c,s),s+=f.stackDelta):f.stackClearing?s=0:f.resetStack?(s=0,r.undefStack=!1):f.undefStack&&(s=0,r.undefStack=!0,r.firstStackClearing=!1)}}return r.stackSize=s,!0},parseCharStrings:function(e){for(var t=e.charStrings,r=e.localSubrIndex,a=e.globalSubrIndex,i=e.fdSelect,o=e.fdArray,s=e.privateDict,c=[],l=[],u=t.count,h=0;h=o.length&&((0,n.warn)("Invalid fd index for glyph index."),p=!1),p&&(g=(m=o[v].privateDict).subrsIndex)}else r&&(g=r);if(p&&(p=this.parseCharString(d,f,g,a)),null!==d.width){var y=m.getByName("nominalWidthX");l[h]=y+d.width}else{var b=m.getByName("defaultWidthX");l[h]=b}null!==d.seac&&(c[h]=d.seac),p||t.set(h,new Uint8Array([14]))}return{charStrings:t,seacs:c,widths:l}},emptyPrivateDictionary:function(e){var t=this.createDict(g,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t},parsePrivateDict:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],n=t[1];if(0===r||n>=this.bytes.length)this.emptyPrivateDictionary(e);else{var a=n+r,i=this.bytes.subarray(n,a),o=this.parseDict(i),s=this.createDict(g,o,e.strings);if(e.privateDict=s,s.getByName("Subrs")){var c=s.getByName("Subrs"),l=n+c;if(0===c||l>=this.bytes.length)this.emptyPrivateDictionary(e);else{var u=this.parseIndex(l);s.subrsIndex=u.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)},parseCharsets:function(e,t,r,i){if(0===e)return new v(!0,m.ISO_ADOBE,a.ISOAdobeCharset);if(1===e)return new v(!0,m.EXPERT,a.ExpertCharset);if(2===e)return new v(!0,m.EXPERT_SUBSET,a.ExpertSubsetCharset);var o,s,c,l=this.bytes,u=e,h=l[e++],f=[i?0:".notdef"];switch(t-=1,h){case 0:for(c=0;c=65535)(0,n.warn)("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}},hasGlyphId:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}},e}();t.CFF=l;var u=function(e,t,r,n){this.major=e,this.minor=t,this.hdrSize=r,this.offSize=n};t.CFFHeader=u;var h=function(){function e(){this.strings=[]}return e.prototype={get:function(e){return e>=0&&e<=390?o[e]:e-s<=this.strings.length?this.strings[e-s]:o[0]},getSID:function(e){var t=o.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+s:-1},add:function(e){this.strings.push(e)},get count(){return this.strings.length}},e}();t.CFFStrings=h;var f=function(){function e(){this.objects=[],this.length=0}return e.prototype={add:function(e){this.length+=e.length,this.objects.push(e)},set:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t},get:function(e){return this.objects[e]},get count(){return this.objects.length}},e}();t.CFFIndex=f;var d=function(){function e(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}return e.prototype={setByKey:function(e,t){if(!(e in this.keyToNameMap))return!1;var r=t.length;if(0===r)return!0;for(var a=0;a=this.fdSelect.length?-1:this.fdSelect[e]}},e}();t.CFFFDSelect=b;var w=function(){function e(){this.offsets=Object.create(null)}return e.prototype={isTracking:function(e){return e in this.offsets},track:function(e,t){if(e in this.offsets)throw new n.FormatError("Already tracking location of ".concat(e));this.offsets[e]=t},offset:function(e){for(var t in this.offsets)this.offsets[t]+=e},setEntryLocation:function(e,t,r){if(!(e in this.offsets))throw new n.FormatError("Not tracking location of ".concat(e));for(var a=r.data,i=this.offsets[e],o=0,s=t.length;o>24&255,a[u]=d>>16&255,a[h]=d>>8&255,a[f]=255&d}}},e}(),S=function(){function e(e){this.cff=e}return e.prototype={compile:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var a=this.compileNameIndex(e.names);if(t.add(a),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var i=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var o=0,s=e.fdArray.length;o=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]},compileHeader:function(e){return[e.major,e.minor,e.hdrSize,e.offSize]},compileNameIndex:function(e){for(var t=new f,r=0,a=e.length;r"~"||"["===l||"]"===l||"("===l||")"===l||"{"===l||"}"===l||"<"===l||">"===l||"/"===l||"%"===l)&&(l="_"),s[c]=l}""===(s=s.join(""))&&(s="Bad_Font_Name"),t.add((0,n.stringToBytes)(s))}return this.compileIndex(t)},compileTopDicts:function(e,t,r){for(var n=[],a=new f,i=0,o=e.length;i>8&255,255&o]);else{(i=new Uint8Array(1+2*o))[0]=0;for(var s=0,c=e.charset.length,l=!1,u=1;u>8&255,i[u+1]=255&h}}return this.compileTypedArray(i)},compileEncoding:function(e){return this.compileTypedArray(e.raw)},compileFDSelect:function(e){var t,r,n=e.format;switch(n){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=n,r=0;r>8&255,255&r,o),a=o)}var s=(i.length-3)/3;i[1]=s>>8&255,i[2]=255&s,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)},compileTypedArray:function(e){for(var t=[],r=0,n=e.length;r>8&255,255&n],s=1;for(a=0;a>8&255,255&c):3===i?o.push(c>>16&255,c>>8&255,255&c):o.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[a]&&(c+=r[a].length);for(a=0;a=65520&&e<=65535?0:e>=62976&&e<=63743?a()[e]||e:173===e?45:e},t.reverseIfRtl=function(e){var t,r,n=e.length;if(n<=1||(t=e.charCodeAt(0),r=i[13],!(t>=r.begin&&t=(r=i[11]).begin&&t=0;o--)a+=e[o];return a},t.getUnicodeRangeFor=function(e){for(var t=0,r=i.length;t=n.begin&&e=5&&a<=7))return-1;n=e.substring(1)}if(n===n.toUpperCase()&&(r=parseInt(n,16))>=0)return r}return-1}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var n=r(5),a=r(223),i=r(226),o=r(225),s=r(205);function c(e){return c="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},c(e)}function l(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 h(e){var t=function(){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}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r>1;for(s=a+l+14,o=[],c=0;c>1;r>16,l=0,u=0;if(s+=10,c<0)do{o=e[s]<<8|e[s+1];var h,f,d=e[s+2]<<8|e[s+3];s+=4,1&o?(h=(e[s]<<24|e[s+1]<<16)>>16,f=(e[s+2]<<24|e[s+3]<<16)>>16,s+=4):(h=e[s++],f=e[s++]),2&o?(l=h,u=f):(l=0,u=0);var g=1,m=1,v=0,y=0;8&o?(g=m=(e[s]<<24|e[s+1]<<16)/1073741824,s+=2):64&o?(g=(e[s]<<24|e[s+1]<<16)/1073741824,m=(e[s+2]<<24|e[s+3]<<16)/1073741824,s+=4):128&o&&(g=(e[s]<<24|e[s+1]<<16)/1073741824,v=(e[s+2]<<24|e[s+3]<<16)/1073741824,y=(e[s+4]<<24|e[s+5]<<16)/1073741824,m=(e[s+6]<<24|e[s+7]<<16)/1073741824,s+=8);var b=r.glyphs[d];b&&(t.push({cmd:"save"}),t.push({cmd:"transform",args:[g,v,y,m,l,u]}),p(b,t,r),t.push({cmd:"restore"}))}while(32&o);else{var w,S,k=[];for(w=0;w0;)A.push({flags:o})}for(w=0;w<_;w++){switch(18&A[w].flags){case 0:l+=(e[s]<<24|e[s+1]<<16)>>16,s+=2;break;case 2:l-=e[s++];break;case 18:l+=e[s++]}A[w].x=l}for(w=0;w<_;w++){switch(36&A[w].flags){case 0:u+=(e[s]<<24|e[s+1]<<16)>>16,s+=2;break;case 4:u-=e[s++];break;case 36:u+=e[s++]}A[w].y=u}var C=0;for(s=0;s>1,C=!0;break;case 4:d+=u.pop(),s(h,d),C=!0;break;case 5:for(;u.length>0;)h+=u.shift(),d+=u.shift(),c(h,d);break;case 6:for(;u.length>0&&(c(h+=u.shift(),d),0!==u.length);)d+=u.shift(),c(h,d);break;case 7:for(;u.length>0&&(d+=u.shift(),c(h,d),0!==u.length);)c(h+=u.shift(),d);break;case 8:for(;u.length>0;)y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S+u.shift(),l(y,w,b,S,h,d);break;case 10:if(A=u.pop(),x=null,a.isCFFCIDFont){var T=a.fdSelect.getFDIndex(i);if(T>=0&&TMath.abs(d-I)?h+=u.shift():d+=u.shift(),l(y,w,b,S,h,d);break;default:throw new n.FormatError("unknown operator: 12 ".concat(P))}break;case 14:if(u.length>=4){var F=u.pop(),L=u.pop();d=u.pop(),h=u.pop(),t.push({cmd:"save"}),t.push({cmd:"translate",args:[h,d]});var M=f(a.cmap,String.fromCharCode(a.glyphNameMap[o.StandardEncoding[F]]));m(a.glyphs[M.glyphId],t,a,M.glyphId),t.push({cmd:"restore"}),M=f(a.cmap,String.fromCharCode(a.glyphNameMap[o.StandardEncoding[L]])),m(a.glyphs[M.glyphId],t,a,M.glyphId)}return;case 19:case 20:v+=(p+=u.length>>1)+7>>3,C=!0;break;case 21:d+=u.pop(),s(h+=u.pop(),d),C=!0;break;case 22:s(h+=u.pop(),d),C=!0;break;case 24:for(;u.length>2;)y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S+u.shift(),l(y,w,b,S,h,d);h+=u.shift(),d+=u.shift(),c(h,d);break;case 25:for(;u.length>6;)h+=u.shift(),d+=u.shift(),c(h,d);y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S+u.shift(),l(y,w,b,S,h,d);break;case 26:for(u.length%2&&(h+=u.shift());u.length>0;)y=h,w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b,d=S+u.shift(),l(y,w,b,S,h,d);break;case 27:for(u.length%2&&(d+=u.shift());u.length>0;)l(y=h+u.shift(),w=d,b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S);break;case 28:u.push((g[v]<<24|g[v+1]<<16)>>16),v+=2;break;case 29:A=u.pop()+a.gsubrsBias,(x=a.gsubrs[A])&&e(x);break;case 30:for(;u.length>0&&(y=h,w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S+(1===u.length?u.shift():0),l(y,w,b,S,h,d),0!==u.length);)y=h+u.shift(),w=d,b=y+u.shift(),S=w+u.shift(),d=S+u.shift(),l(y,w,b,S,h=b+(1===u.length?u.shift():0),d);break;case 31:for(;u.length>0&&(y=h+u.shift(),w=d,b=y+u.shift(),S=w+u.shift(),d=S+u.shift(),l(y,w,b,S,h=b+(1===u.length?u.shift():0),d),0!==u.length);)y=h,w=d+u.shift(),b=y+u.shift(),S=w+u.shift(),h=b+u.shift(),d=S+(1===u.length?u.shift():0),l(y,w,b,S,h,d);break;default:if(P<32)throw new n.FormatError("unknown operator: ".concat(P));P<247?u.push(P-139):P<251?u.push(256*(P-247)+g[v++]+108):P<255?u.push(256*-(P-251)-g[v++]-108):(u.push((g[v]<<24|g[v+1]<<16|g[v+2]<<8|g[v+3])/65536),v+=4)}C&&(u.length=0)}}(e)}var v=[],y=function(){function e(t){d(this,e),this.constructor===e&&(0,n.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}return g(e,[{key:"getPathJs",value:function(e){var t=f(this.cmap,e),r=this.compiledGlyphs[t.glyphId];return r||(r=this.compileGlyph(this.glyphs[t.glyphId],t.glyphId),this.compiledGlyphs[t.glyphId]=r),void 0===this.compiledCharCodeToGlyphId[t.charCode]&&(this.compiledCharCodeToGlyphId[t.charCode]=t.glyphId),r}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return v;var r=this.fontMatrix;if(this.isCFFCIDFont){var a=this.fdSelect.getFDIndex(t);a>=0&&an)return!0;for(var a=n-e,i=a;i>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return this.output.push.apply(this.output,t),r?this.stack.splice(a,e):this.stack.length=0,!1}},f}(),c=function(){function e(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function t(e,t,r){if(r>=e.length)return new Uint8Array(0);var n,a,i=0|t;for(n=0;n>8,i=52845*(c+i)+22719&65535}return s}function r(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}function o(r,n,o){if(n){var s=r.getBytes(),c=!((e(s[0])||(0,a.isWhiteSpace)(s[0]))&&e(s[1])&&e(s[2])&&e(s[3])&&e(s[4])&&e(s[5])&&e(s[6])&&e(s[7]));r=new i.Stream(c?t(s,55665,4):function(t,r,n){var a,i,o=0|r,s=t.length,c=new Uint8Array(s>>>1);for(a=0,i=0;a>8,o=52845*(h+o)+22719&65535}}}return c.slice(n,i)}(s,55665,4))}this.seacAnalysisEnabled=!!o,this.stream=r,this.nextChar()}return o.prototype={readNumberArray:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e},readNumber:function(){var e=this.getToken();return parseFloat(e||0)},readInt:function(){var e=this.getToken();return 0|parseInt(e||0,10)},readBoolean:function(){return"true"===this.getToken()?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isWhiteSpace)(t))break;t=this.nextChar()}if(r(t))return this.nextChar(),String.fromCharCode(t);var n="";do{n+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,a.isWhiteSpace)(t)&&!r(t));return n},readCharStrings:function(e,r){return-1===r?e:t(e,4330,r)},extractFontProgram:function(e){var t=this.stream,r=[],n=[],a=Object.create(null);a.lenIV=4;for(var i,o,c,l,u,h={subrs:[],charstrings:[],properties:{privateData:a}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)if("/"===i){var f=this.getToken();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=h.properties.privateData.lenIV,u=this.readCharStrings(c,l),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),n.push({glyph:f,encoded:u})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){var d=this.readInt();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=h.properties.privateData.lenIV,u=this.readCharStrings(c,l),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),r[d]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var p=this.readNumberArray();p.length>0&&p.length;break;case"StemSnapH":case"StemSnapV":h.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":h.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":h.properties.privateData[i]=this.readNumber();break;case"ForceBold":h.properties.privateData[i]=this.readBoolean()}for(var g=0;g-1&&void 0===e.widths[w]&&w>=e.firstChar&&w<=e.lastChar&&(e.widths[w]=m.width)}}return h},extractFontHeader:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var a,i=this.getToken();if(/^\d+$/.test(i)){a=[];var o=0|parseInt(i,10);this.getToken();for(var s=0;s=h||C<=0)(0,n.info)("Bad shading domain.");else{for(var T,E=new Float32Array(s.numComps),R=new Float32Array(1),O=0;O<=10;O++){R[0]=u+O*C,x(R,0,E,0),T=s.getRgb(E,0);var I=n.Util.makeCssRgb(T[0],T[1],T[2]);P.push([O/10,I])}var F="transparent";e.has("Background")&&(T=s.getRgb(e.get("Background"),0),F=n.Util.makeCssRgb(T[0],T[1],T[2])),d||(P.unshift([0,F]),P[1][0]+=p.SMALL_NUMBER),g||(P[P.length-1][0]-=p.SMALL_NUMBER,P.push([1,F])),this.colorStops=P}}return e.prototype={getIR:function(){var e,t,r,a,i,o=this.coordsArr,l=this.shadingType;l===s?(t=[o[0],o[1]],r=[o[2],o[3]],a=null,i=null,e="axial"):l===c?(t=[o[0],o[1]],r=[o[3],o[4]],a=o[2],i=o[5],e="radial"):(0,n.unreachable)("getPattern type unknown: ".concat(l));var u=this.matrix;if(u&&(t=n.Util.applyTransform(t,u),r=n.Util.applyTransform(r,u),l===c)){var h=n.Util.singularValueDecompose2dScale(u);a*=h[0],i*=h[1]}return["RadialAxial",e,this.bbox,this.colorStops,t,r,a,i]}},e}(),p.Mesh=function(){function e(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;var r=t.numComps;this.tmpCompsBuf=new Float32Array(r);var n=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(n):this.tmpCompsBuf}e.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var e=this.stream.getByte();return!(e<0||(this.buffer=e,this.bufferLength=8,0))},readBits:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var n=this.stream.getByte();return this.buffer=n&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),n=this.context.decode,a=e<32?1/((1<s?s:t,r=r>c?c:r,n=n=0&&"ET"===d[P];--P)d[P]="EN";for(P=m+1;P0&&(E=d[m-1]);var R=x;T+1O&&o(O)&&(F=O);for(O=I;O>=F;--O){var L=-1;for(m=0,v=S.length;m=0&&(u(f,L,m),L=-1):L<0&&(L=m);L>=0&&u(f,L,S.length)}for(m=0,v=f.length;m"!==M||(f[m]="")}return h(f.join(""),p)};var n=r(5),a=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function o(e){return 0!=(1&e)}function s(e){return 0==(1&e)}function c(e,t,r){for(var n=t,a=e.length;n2&&void 0!==arguments[2]&&arguments[2]?r="ttb":t||(r="rtl"),{str:e,dir:r}}var f=[],d=[]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=void 0;var n=r(201),a=(0,n.getLookupTableFactory)((function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-BoldOblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Oblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e.Symbol=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790})),e["Times-Roman"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-BoldItalic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Italic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e.ZapfDingbats=(0,n.getLookupTableFactory)((function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918}))}));t.getMetrics=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isPDFFunction=function(e){var t;if("object"!==o(e))return!1;if((0,a.isDict)(e))t=e;else{if(!(0,a.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")},t.PostScriptCompiler=t.PostScriptEvaluator=t.PDFFunctionFactory=void 0;var n=r(5),a=r(198),i=r(235);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){for(var r=0;r>c)*u,l&=(1<r?e=r:e0&&(f=n[u-1]);var d=r[1];u>1,l=a.length>>1,u=new f(o),h=Object.create(null),p=8192,g=new Float32Array(l);return function(e,t,r,n){var a,o,s="",f=g;for(a=0;a(b=i[2*a+1]))&&(o=b),m[a]=o}p>0&&(p--,h[s]=m),r.set(m,n)}else r.set(d,n)}}},h=function(){function e(e){this.stack=e?Array.prototype.slice.call(e,0):[]}return e.prototype={push:function(e){if(this.stack.length>=100)throw new Error("PostScript function stack overflow.");this.stack.push(e)},pop:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()},copy:function(e){if(this.stack.length+e>=100)throw new Error("PostScript function stack overflow.");for(var t=this.stack,r=t.length-e,n=e-1;n>=0;n--,r++)t.push(t[r])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){var r,n,a,i=this.stack,o=i.length-e,s=i.length-1,c=o+(t-Math.floor(t/e)*e);for(r=o,n=s;r0?i.push(r<>a);break;case"ceiling":r=i.pop(),i.push(Math.ceil(r));break;case"copy":r=i.pop(),i.copy(r);break;case"cos":r=i.pop(),i.push(Math.cos(r));break;case"cvi":r=0|i.pop(),i.push(r);break;case"cvr":break;case"div":a=i.pop(),r=i.pop(),i.push(r/a);break;case"dup":i.copy(1);break;case"eq":a=i.pop(),r=i.pop(),i.push(r===a);break;case"exch":i.roll(2,1);break;case"exp":a=i.pop(),r=i.pop(),i.push(Math.pow(r,a));break;case"false":i.push(!1);break;case"floor":r=i.pop(),i.push(Math.floor(r));break;case"ge":a=i.pop(),r=i.pop(),i.push(r>=a);break;case"gt":a=i.pop(),r=i.pop(),i.push(r>a);break;case"idiv":a=i.pop(),r=i.pop(),i.push(r/a|0);break;case"index":r=i.pop(),i.index(r);break;case"le":a=i.pop(),r=i.pop(),i.push(r<=a);break;case"ln":r=i.pop(),i.push(Math.log(r));break;case"log":r=i.pop(),i.push(Math.log(r)/Math.LN10);break;case"lt":a=i.pop(),r=i.pop(),i.push(r=t?new r(t):e.max<=t?e:new i(e,t)}function d(){}return e.prototype.visit=function(e){(0,n.unreachable)("abstract method")},t.prototype=Object.create(e.prototype),t.prototype.visit=function(e){e.visitArgument(this)},r.prototype=Object.create(e.prototype),r.prototype.visit=function(e){e.visitLiteral(this)},a.prototype=Object.create(e.prototype),a.prototype.visit=function(e){e.visitBinaryOperation(this)},i.prototype=Object.create(e.prototype),i.prototype.visit=function(e){e.visitMin(this)},o.prototype=Object.create(e.prototype),o.prototype.visit=function(e){e.visitVariable(this)},s.prototype=Object.create(e.prototype),s.prototype.visit=function(e){e.visitVariableDefinition(this)},c.prototype={visitArgument:function(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")},visitVariable:function(e){this.parts.push("v",e.index)},visitLiteral:function(e){this.parts.push(e.number)},visitBinaryOperation:function(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")},visitMin:function(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")},toString:function(){return this.parts.join("")}},d.prototype={compile:function(e,n,a){for(var i,d,p,g,m,v,y,b,w=[],S=[],k=n.length>>1,_=a.length>>1,A=0,x=0;xe.min&&(o.unshift("Math.max(",n,", "),o.push(")")),i=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var n=r.join("");switch(n.toLowerCase()){case"if":return f.IF;case"ifelse":return f.IFELSE;default:return f.getOperator(n)}}},{key:"getNumber",value:function(){var e=this.currentChar,t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new n.FormatError("Invalid floating point number: ".concat(r));return r}}]),e}();t.PostScriptLexer=d},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var n=r(5);function a(e,t){for(var r=0;r>>8,t[r++]=255&c)}}else{if(!(0,n.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");r=(t=e).byteLength}for(var l=r>>2,u=r-4*l,h=new Uint32Array(t.buffer,0,l),f=0,d=0,p=this.h1,g=this.h2,m=3432918353,v=461845907,y=11601,b=13715,w=0;w>>17)*v&o|f*b&s)<<13|p>>>19)+3864292196:g=5*(g=(g^=d=(d=(d=(d=h[w])*m&o|d*y&s)<<15|d>>>17)*v&o|d*b&s)<<13|g>>>19)+3864292196;switch(f=0,u){case 3:f^=t[4*l+2]<<16;case 2:f^=t[4*l+1]<<8;case 1:f=(f=(f=(f^=t[4*l])*m&o|f*y&s)<<15|f>>>17)*v&o|f*b&s,1&l?p^=f:g^=f}this.h1=p,this.h2=g}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;e=3981806797*(e^=t>>>1)&o|36045*e&s,e=444984403*(e^=(t=4283543511*t&o|(2950163797*(t<<16|e>>>16)&o)>>>16)>>>1)&o|60499*e&s;var r=((e^=(t=3301882366*t&o|(3120437893*(t<<16|e>>>16)&o)>>>16)>>>1)>>>0).toString(16),n=(t>>>0).toString(16);return r.padStart(8,"0")+n.padStart(8,"0")}}])&&a(t.prototype,r),c&&a(t,c),e}();t.MurmurHash3_64=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var n=r(5),a=r(198),i=r(216),o=r(205),s=r(211),c=r(214),l=function(){function e(e,t,r,n){return(e=t+e*r)<0?e=0:e>n&&(e=n),e}function t(e,t,r,n,a,i){var o,s=a*i;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);var c,l,u,h,f=r/a,d=n/i,p=0,g=new Uint16Array(a),m=r;for(c=0;c0&&Number.isInteger(s.height)&&s.height>0&&(s.width!==S||s.height!==k)&&((0,n.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),S=s.width,k=s.height),S<1||k<1)throw new n.FormatError("Invalid image width: ".concat(S," or height: ").concat(k));this.width=S,this.height=k,this.interpolate=y.get("Interpolate","I")||!1,this.imageMask=y.get("ImageMask","IM")||!1,this.matte=y.get("Matte")||!1;var _=s.bitsPerComponent;if(!_&&!(_=y.get("BitsPerComponent","BPC"))){if(!this.imageMask)throw new n.FormatError("Bits per component missing in image: ".concat(this.imageMask));_=1}if(this.bpc=_,!this.imageMask){var A=y.get("ColorSpace","CS");if(!A)switch((0,n.info)("JPX images (which do not require color spaces)"),s.numComps){case 1:A=a.Name.get("DeviceGray");break;case 3:A=a.Name.get("DeviceRGB");break;case 4:A=a.Name.get("DeviceCMYK");break;default:throw new Error("JPX images with ".concat(s.numComps," ")+"color components not supported.")}var x=u?o:null;this.colorSpace=i.ColorSpace.parse(A,t,x,v),this.numComps=this.colorSpace.numComps}if(this.decode=y.getArray("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,_)||m&&!i.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var C=(1<<_)-1;this.decodeCoefficients=[],this.decodeAddends=[];for(var P=this.colorSpace&&"Indexed"===this.colorSpace.name,T=0,E=0;T>3)*i,l=n.byteLength;if(!o||s&&c!==l)if(s)for((t=new Uint8ClampedArray(c)).set(n),r=l;r>7&1,r[f+1]=l>>6&1,r[f+2]=l>>5&1,r[f+3]=l>>4&1,r[f+4]=l>>3&1,r[f+5]=l>>2&1,r[f+6]=l>>1&1,r[f+7]=1&l,f+=8;if(f>=1}else{var v=0;for(l=0,f=0,c=o;f>y;b<0?b=0:b>h&&(b=h),r[f]=b,l&=(1<g[w+1]){v=255;break}}c[h]=v}}if(c)for(h=0,d=3,f=a*o;h0&&void 0!==arguments[0]&&arguments[0],r=this.drawWidth,a=this.drawHeight,i={width:r,height:a,kind:0,data:null},c=this.numComps,l=this.width,u=this.height,h=this.bpc,f=l*c*h+7>>3;if(!t){var d;if("DeviceGray"===this.colorSpace.name&&1===h?d=n.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==h||this.needsDecode||(d=n.ImageKind.RGB_24BPP),d&&!this.smask&&!this.mask&&r===l&&a===u){if(i.kind=d,e=this.getImageBytes(u*f),this.image instanceof o.DecodeStream)i.data=e;else{var p=new Uint8ClampedArray(e.length);p.set(e),i.data=p}if(this.needsDecode){(0,n.assert)(d===n.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var g=i.data,m=0,v=g.length;m>3,l=this.getImageBytes(o*c),u=this.getComponents(l);if(1!==s){this.needsDecode&&this.decodeBuffer(u),a=i*o;var h=255/((1<3&&void 0!==arguments[3]&&arguments[3];return this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGB=!!n,this.image.getBytes(e,!0)}},r}();t.PDFImage=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(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 c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:p,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d,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:g,streamId:n,reason:b(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[n]=c,new Promise((function(t){t(r(e.data,c))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case y:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(b(e.reason));break;case v:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(b(e.reason));break;case m:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:v,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:v,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)})}));break;case p: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: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 g:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(b(e.reason)),this._deleteStreamController(t);break;case f:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(b(e.reason)),this._deleteStreamController(t);break;case h:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:b(e)})})),this.streamSinks[t].sinkCapability.reject(b(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(c=a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)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)})),w=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=c.apply(e,t);function i(e){o(a,r,n,i,s,"next",e)}function s(e){o(a,r,n,i,s,"throw",e)}i(void 0)}))},function(e){return w.apply(this,arguments)})},{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)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.MessageHandler=w},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFWorkerStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,c,"next",e)}function c(e){o(i,n,a,s,c,"throw",e)}s(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;rthis.numPages)){var r=this.shadowRoot.querySelector(".__pdf_page"+e).offsetTop;this.container.scrollTop=r,this.scrollDown=this.num-e<0,this.pdfViewer.renderPageInterval(e,this.scrollDown),this.num=e,this.updateNum(this.num),this.scrolling=!0,setTimeout((function(){t.scrolling=!1}),2e3)}}},{key:"progress",value:function(e){var t=this,r=Math.round(100*e);r<=this.percent||(r<=100&&-1!==this.percent&&(this.percent=r,this.percentUpdate(100*e),this.requestUpdate()),r>=100&&(this.hasInit||(setTimeout((function(){var e=new CustomEvent("ready",{composed:!0,detail:{title:t.pdfViewer.pdfTitle,totalPage:t.numPages}});t.dispatchEvent(e)}),100),this.hasInit=!0),setTimeout((function(){t.percent=-1,t.requestUpdate()}),0)))}},{key:"debounce",value:function(e,t,r){var n=arguments,a=this,i=null;return function(o){var s=a,c=n;function l(){i=setTimeout((function(){e.apply(s,c),i=null}),t)}r?(clearTimeout(i),l()):i||l()}}},{key:"handleScroll",value:function(e){var t=this.num,r=Math.ceil(this.container.scrollTop);if(this.numPages&&!this.initializing&&!this.pdfViewer.iniState){if(r<=0)this.num=1;else{this.scrolling=!0;var n=r-this.pdfScrollTop;this.pdfScrollTop=r,this.scrollDown=n>0;var a=this.shadowRoot.querySelector(".__pdf_page1").clientHeight,i=this.num+Math.ceil(n/a);i=i>this.numPages?this.numPages:i<1?1:i;for(var o=Math.ceil(a/2);i>=1&&i<=this.numPages;){var s=this.shadowRoot.querySelector(".__pdf_page"+i),c=this.shadowRoot.querySelector(".__pdf_page"+(i+1));if(r>=s.offsetTop-o&&(!c||r=c.offsetTop-o&&i++}}this.readAll||this.judgeReadFinish(),this.num!==t&&this.updateNum(this.num),this.requestUpdate()}}},{key:"handleView",value:function(e){this.pdfViewer.currentNum!==this.num&&(this.pdfViewer.renderPageInterval(this.num,this.scrollDown),this.isHitBottom()&&this.numPages-this.num>1&&this.pdfViewer.renderPageInterval(this.numPages,this.scrollDown))}},{key:"initCanvasPagesDom",value:function(){var e=this.shadowRoot.querySelector(".__pdf_container");e.innerHTML="";for(var t=0;t\n '),e.appendChild(r.children[0])}}},{key:"renderPdf",value:function(){var e=_asyncToGenerator(regenerator.mark((function e(){var t,r,n,a,i,o,s,c;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfViewer.getPage(1);case 2:for(t=e.sent,r=t.getViewport({scale:this.pdfScale}),n=r.height/r.width,a=Math.floor(this.container.clientWidth)-16,i=a*n,this.firstPage={height:i,width:a},o=1;o<=this.numPages;++o)(s=this.shadowRoot.querySelector(".__pdf_page"+o)).style.width="".concat(a,"px"),s.style.height="".concat(i,"px"),c=new PageViewer$1({id:o,canvasIdPrefix:this.canvasIdPrefix,pdfScale:this.pdfScale,scale:this.scale,defaultViewport:r.clone(),renderingQueue:this.renderingQueue,div:s,width:a,height:i}),this.pdfViewer.pushPage(c);this.pdfViewer.renderPageInterval(1,!0),this.scrolling=!1,this.initializing=!1,this.judgeReadFinish(),this.requestUpdate();case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateNum",value:function(e){var t=new CustomEvent("numUpdate",{composed:!0,detail:{currentNum:e}});this.dispatchEvent(t)}},{key:"percentUpdate",value:function(e){var t=new CustomEvent("progress",{composed:!0,detail:{progress:e}});this.dispatchEvent(t)}},{key:"isHitBottom",value:function(){var e=this.container,t=e.clientHeight;return e.scrollHeight-10<=t+Math.ceil(this.container.scrollTop)}},{key:"judgeReadFinish",value:function(){(this.readAll||this.isHitBottom())&&this.readFinish()}},{key:"readFinish",value:function(){if(this.readAll){var e=new CustomEvent("readFinish",{detail:{finishReading:!0}});this.dispatchEvent(e)}}},{key:"setScale",value:function(e,t){if(this.container.style.getPropertyValue("--pdf-scale-factor"),t){this.container.scrollTop,this.container.scrollLeft;var r=this.container.getBoundingClientRect();t.x,r.left,t.y,r.top;this.container.offsetTop,this.num,this.container.style.setProperty("--pdf-scale-factor",e)}else this.container.style.setProperty("--pdf-scale-factor",e),this.pdfViewer.setScale(e)}},{key:"doubleClick",value:function(){var e=this,t=1,r=Date.now();return function(n){if(n.stopPropagation(),1===t&&(r=(new Date).getTime(),t++,setTimeout((function(){t=1}),300)),2==t)t++;else if((new Date).getTime()-r<400){var a=e.container.style.getPropertyValue("--pdf-scale-factor");e.setScale(Number(a)===Number(e.scale)?e.maxZoom:e.scale,n),t=1}}}},{key:"onError",value:function(e){this.initializing=!1,this.showMsg=e.message,this.requestUpdate();var t=new CustomEvent("error",{detail:e});this.dispatchEvent(t)}},{key:"render",value:function(){return html(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n \x3c!----\x3e\n \n \n \n \n ','\n \n \n \n \n ',"/",'\n \n
\n
\n
\n \n \n '])),pdfStyles,classMap$1({"__pdf_display-none":!this.height}),styleMap$1({height:this.height+"px",width:this.width?this.width+"px":"auto"}),classMap$1({"__pdf_display-none":!this.initializing}),classMap$1({"__pdf_display-none":!this.showMsg}),this.showMsg,classMap$1({"__pdf_display-none":this.showMsg}),styleMap$1({"--process-percent":this.percent+"%"}),classMap$1({"__pdf_display-none":this.initializing||!this.numPages,"__pdf_hide-num":!this.scrolling}),this.num,this.numPages,this.doubleClick())}}],[{key:"styles",get:function(){return css(_templateObject2||(_templateObject2=_taggedTemplateLiteral([""])))}},{key:"properties",get:function(){return{source:{type:[String,ArrayBuffer]},width:{type:Number,attribute:!0},height:{type:Number,attribute:!0},limit:{type:Number,attribute:!0},hidePageNum:{type:Boolean,attribute:"hide-page-num"},"cmap-url":{type:String},scale:{type:Number,attribute:!0},"max-zoom":{type:Number,attribute:!0},zoomDisabled:{type:Boolean,attribute:"zoom-disabled"},canvasIdPrefix:{type:String,attribute:"canvas-id-prefix"}}}}]),n}(LitElement);function PdfViewRegistry(e){customElements.get(e)?console.warn("<"+e+">组件已注册"):customElements.define(e,PdfView)}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var _require=require$$0,debounce=_require.debounce,isArrayBuffer=_require.isArrayBuffer,classMap=_require.classMap,styleMap=_require.styleMap,addClass=_require.addClass,removeClass=_require.removeClass;_require.pdfStyles;var PDFRenderingQueue=_require.PDFRenderingQueue,PageViewer=_require.PageViewer,PDFViewer=_require.PDFViewer,pdfjsLib=pdf.exports;pdfjsLib.GlobalWorkerOptions.workerSrc=("undefined"!=typeof window?window:{}).pdfjsWorker=pdf_worker.exports;var _options=new WeakMap,_defineProperties=new WeakSet,_initPdf=new WeakSet,_init=new WeakSet,_progress=new WeakSet,_renderPdf=new WeakSet,_handleScroll=new WeakSet,_handleView=new WeakSet,_bindEvent=new WeakSet,_doubleClick=new WeakSet,_isHitBottom=new WeakSet,_judgeReadFinish=new WeakSet,_readFinish=new WeakSet,_updateNum=new WeakSet,_onError=new WeakSet,_updateDom=new WeakSet,_render=new WeakSet,PdfViewLib=function(){function e(t,r){if(_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_render),_classPrivateMethodInitSpec(this,_updateDom),_classPrivateMethodInitSpec(this,_onError),_classPrivateMethodInitSpec(this,_updateNum),_classPrivateMethodInitSpec(this,_readFinish),_classPrivateMethodInitSpec(this,_judgeReadFinish),_classPrivateMethodInitSpec(this,_isHitBottom),_classPrivateMethodInitSpec(this,_doubleClick),_classPrivateMethodInitSpec(this,_bindEvent),_classPrivateMethodInitSpec(this,_handleView),_classPrivateMethodInitSpec(this,_handleScroll),_classPrivateMethodInitSpec(this,_renderPdf),_classPrivateMethodInitSpec(this,_progress),_classPrivateMethodInitSpec(this,_init),_classPrivateMethodInitSpec(this,_initPdf),_classPrivateMethodInitSpec(this,_defineProperties),_classPrivateFieldInitSpec(this,_options,{writable:!0,value:{height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:"auto",initializing:!1,showMsg:"",percent:0,num:0,numPages:0,scrolling:!1,readAll:!1}}),_defineProperty(this,"hasInit",!1),_defineProperty(this,"key",Date.now()),_defineProperty(this,"source",""),_defineProperty(this,"scale",1),_defineProperty(this,"maxZoom",2),_defineProperty(this,"zoomDisable",!1),_defineProperty(this,"pdfScale",1),_defineProperty(this,"limit",0),_defineProperty(this,"pdfViewer",null),_defineProperty(this,"renderingQueue",null),_defineProperty(this,"dom",null),_defineProperty(this,"id",""),_defineProperty(this,"eventMap",{}),_defineProperty(this,"domStyle",""),_defineProperty(this,"container",null),_defineProperty(this,"pdfScrollTop",0),_defineProperty(this,"scrollDown",!0),_defineProperty(this,"timer",null),_defineProperty(this,"canvasIdPrefix",""),t&&(this.dom=document.querySelector(t)),!this.dom)throw new Error("pdf组件初始化异常:请传入正确的节点 id");if(!r.source)throw new Error("pdf类初始化异常:请输入正确的 pdf 地址");r.height&&(_classPrivateFieldGet(this,_options).height=r.height),r.width&&(_classPrivateFieldGet(this,_options).width=r.width),this.source=r.source,r.pdfScale&&(this.pdfScale=r.pdfScale),this.zoomDisable=r.zoomDisable,this.container=void 0,this.canvasIdPrefix=r["canvas-id-prefix"]||"",r.scale&&!Number.isNaN(r.scale)&&(this.scale=r.scale),r.limit&&!Number.isNaN(r.limit)&&(this.limit=r.limit),r.maxZoom&&!Number.isNaN(r.maxZoom)&&(this.maxZoom=r.maxZoom),_classPrivateMethodGet(this,_render,_render2).call(this),_classPrivateMethodGet(this,_defineProperties,_defineProperties2).call(this),_classPrivateMethodGet(this,_bindEvent,_bindEvent2).call(this),_classPrivateMethodGet(this,_initPdf,_initPdf2).call(this)}return _createClass(e,[{key:"clearPdf",value:function(){this.pdfViewer.resetPdfViewer()}},{key:"setScale",value:function(e,t){var r=this.container.style.getPropertyValue("--pdf-scale-factor");if(t){var n=e/r,a=this.container.scrollTop,i=this.container.scrollLeft,o=this.container.getBoundingClientRect(),s={x:t.x-o.left,y:t.y-o.top},c=s.x,l=s.y,u=this.container.offsetTop*_classPrivateFieldGet(this,_options).num,h=Math.floor((a+l-u)*n-l+u),f=Math.floor((i+c)*n-c);this.container.style.setProperty("--pdf-scale-factor",e),this.container.scrollTop=h>0?h:0,this.container.scrollLeft=f>0?f:0}else this.container.style.setProperty("--pdf-scale-factor",e),this.pdfViewer.setScale(e)}},{key:"goto",value:function(e){var t=this;if(e%1==0&&e&&!(e>_classPrivateFieldGet(this,_options).numPages)){var r=this.dom.querySelector(".__pdf_page"+e).offsetTop;this.container.scrollTop=r,this.scrollDown=this.num-e<0,this.pdfViewer.renderPageInterval(e,this.scrollDown),this.num=e,_classPrivateMethodGet(this,_updateNum,_updateNum2).call(this,this.num),this.scrolling=!0,setTimeout((function(){t.scrolling=!1}),2e3)}}},{key:"on",value:function(e,t){this.dom.addEventListener(e,t),this.eventMap[e]?this.eventMap[e].push(t):this.eventMap[e]=[t]}},{key:"trigger",value:function(e,t){var r=this.eventMap[e];r&&r.forEach((function(e){e(t)}))}}]),e}();function _defineProperties2(){var e=this,t=this;Object.keys(_classPrivateFieldGet(this,_options)).forEach((function(r){t["data_"+r]=_classPrivateFieldGet(e,_options)[r],Object.defineProperty(_classPrivateFieldGet(e,_options),r,{get:function(){return t["data_"+r]},set:function(e){t["data_"+r]=e,_classPrivateMethodGet(t,_updateDom,_updateDom2).call(t,r)}})}))}function _initPdf2(){this.renderingQueue=new PDFRenderingQueue({limit:this.limit}),this.pdfViewer=new PDFViewer({viewer:this.container,pdfScale:this.pdfScale,scale:this.scale,renderingQueue:this.renderingQueue}),_classPrivateMethodGet(this,_init,_init2).call(this,this.source)}function _init2(e){return _init3.apply(this,arguments)}function _init3(){return _init3=_asyncToGenerator(regenerator.mark((function e(t){var r,n,a=this;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.container.style.setProperty("--pdf-scale-factor",this.scale),("string"==typeof this.source||isArrayBuffer(this.source))&&this.source&&("string"!=typeof this.source||/\.pdf$/i.test(this.source))){e.next=3;break}return e.abrupt("return",_classPrivateMethodGet(this,_onError,_onError2).call(this,{code:1,message:"请传入正确的 pdf 文件地址"}));case 3:if(_classPrivateFieldGet(this,_options).showMsg="",_classPrivateFieldGet(this,_options).initializing=!0,_classPrivateFieldGet(this,_options).readAll=!1,_classPrivateFieldGet(this,_options).percent=0,ReadableStream){e.next=9;break}return e.abrupt("return",_classPrivateMethodGet(this,_onError,_onError2).call(this,{code:4,message:"当前环境不支持 pdf 组件预览"}));case 9:r={isEvalSupported:!1},this["cmap-url"]&&(r.cMapUrl=this["cmap-url"]),"string"==typeof t&&(r.url=t),isArrayBuffer(t)&&(r.data=t),(n=pdfjsLib.getDocument(r)).onProgress=function(e){var t=e.loaded,r=e.total;_classPrivateMethodGet(a,_progress,_progress2).call(a,t/r)},n.promise.then((function(e){a.pdfViewer.setDocument(e),_classPrivateFieldGet(a,_options).numPages=a.pdfViewer.numPages,_classPrivateFieldGet(a,_options).num=1,_classPrivateMethodGet(a,_renderPdf,_renderPdf2).call(a)})).catch((function(e){_classPrivateMethodGet(a,_onError,_onError2).call(a,{message:"pdf 文件加载失败",code:3})}));case 16:case"end":return e.stop()}}),e,this)}))),_init3.apply(this,arguments)}function _progress2(e){var t=this;if(e){var r=Math.round(100*e);r<=_classPrivateFieldGet(this,_options).percent||(r<=100&&-1!==_classPrivateFieldGet(this,_options).percent&&(_classPrivateFieldGet(this,_options).percent=r,this.trigger("progress",{progress:r})),r>=100&&(this.hasInit||(this.trigger("ready",{title:this.pdfViewer.pdfTitle,totalPage:this.numPages}),this.hasInit=!0),setTimeout((function(){_classPrivateFieldGet(t,_options).percent=-1}),0)))}}function _renderPdf2(){return _renderPdf3.apply(this,arguments)}function _renderPdf3(){return(_renderPdf3=_asyncToGenerator(regenerator.mark((function e(){var t,r,n,a,i,o,s,c;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfViewer.getPage(1);case 2:for(t=e.sent,r=t.getViewport({scale:this.pdfScale}),n=r.height/r.width,a=Math.floor(this.container.clientWidth)-16,i=Math.floor(a*n),this.firstPage={height:i,width:a},o=1;o<=_classPrivateFieldGet(this,_options).numPages;++o)(s=this.dom.querySelector(".__pdf_page"+o)).style.width="calc(var(--pdf-scale-factor) * ".concat(a,"px)"),s.style.height="calc(var(--pdf-scale-factor) * ".concat(i,"px)"),c=new PageViewer({id:o,canvasIdPrefix:this.canvasIdPrefix,pdfScale:this.pdfScale,scale:this.scale,defaultViewport:r.clone(),renderingQueue:this.renderingQueue,div:s,width:a,height:i}),this.pdfViewer.pushPage(c);this.pdfViewer.renderPageInterval(1,!0),_classPrivateFieldGet(this,_options).scrolling=!1,_classPrivateFieldGet(this,_options).initializing=!1,_classPrivateMethodGet(this,_judgeReadFinish,_judgeReadFinish2).call(this);case 13:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function _handleScroll2(e){var t=this.num,r=Math.ceil(this.container.scrollTop);if(_classPrivateFieldGet(this,_options).numPages&&!_classPrivateFieldGet(this,_options).initializing&&!this.pdfViewer.iniState){if(r<=0)_classPrivateFieldGet(this,_options).num=1;else{_classPrivateFieldGet(this,_options).scrolling=!0;var n=r-this.pdfScrollTop;this.pdfScrollTop=r,this.scrollDown=n>0;var a=this.dom.querySelector(".__pdf_page1").clientHeight,i=_classPrivateFieldGet(this,_options).num+Math.ceil(n/a);i=i>_classPrivateFieldGet(this,_options).numPages?_classPrivateFieldGet(this,_options).numPages:i<1?1:i;for(var o=Math.ceil(a/2);i>=1&&i<=_classPrivateFieldGet(this,_options).numPages;){var s=this.dom.querySelector(".__pdf_page"+i),c=this.dom.querySelector(".__pdf_page"+(i+1));if(r>=s.offsetTop-o&&(!c||r=c.offsetTop-o&&i++}}_classPrivateFieldGet(this,_options).readAll||_classPrivateMethodGet(this,_judgeReadFinish,_judgeReadFinish2).call(this),this.num!==t&&_classPrivateMethodGet(this,_updateNum,_updateNum2).call(this,this.num)}}function _handleView2(e){this.pdfViewer.currentNum!==_classPrivateFieldGet(this,_options).num&&(this.pdfViewer.renderPageInterval(_classPrivateFieldGet(this,_options).num,this.scrollDown),_classPrivateMethodGet(this,_isHitBottom,_isHitBottom2).call(this)&&_classPrivateFieldGet(this,_options).numPages-_classPrivateFieldGet(this,_options).num>1&&this.pdfViewer.renderPageInterval(_classPrivateFieldGet(this,_options).numPages,this.scrollDown))}function _bindEvent2(){var e=this;this.dom.querySelector(".__pdf_container")&&this.dom.querySelector(".__pdf_container").addEventListener("click",_classPrivateMethodGet(this,_doubleClick,_doubleClick2).bind(this)()),this.dom.querySelector(".__pdf_forceRead_btn")&&this.dom.querySelector(".__pdf_forceRead_btn").addEventListener("click",_classPrivateMethodGet(this,_readFinish,_readFinish2).bind(this)),this.container=this.dom.querySelector(".__pdf_component_box"),this.container.addEventListener("scroll",debounce(_classPrivateMethodGet(this,_handleScroll,_handleScroll2).bind(this),100)),this.container.addEventListener("scroll",debounce((function(t){_classPrivateFieldGet(e,_options).scrolling=!1}),3e3,!0).bind(this)),this.container.addEventListener("scroll",debounce(_classPrivateMethodGet(this,_handleView,_handleView2).bind(this),50,!0).bind(this))}function _doubleClick2(){var e=this;if(!this.zoomDisable){var t=1,r=Date.now();return function(n){if(n.stopPropagation(),1===t&&(r=(new Date).getTime(),t++,setTimeout((function(){t=1}),300)),2==t)t++;else if((new Date).getTime()-r<400){var a=e.container.style.getPropertyValue("--pdf-scale-factor");e.setScale(Number(a)===Number(e.scale)?e.maxZoom:e.scale,n),t=1}}}}function _isHitBottom2(){var e=this.container,t=e.clientHeight;return e.scrollHeight-10<=t+Math.ceil(this.container.scrollTop)}function _judgeReadFinish2(){(this.readAll||_classPrivateMethodGet(this,_isHitBottom,_isHitBottom2).call(this))&&_classPrivateMethodGet(this,_readFinish,_readFinish2).call(this)}function _readFinish2(){this.readAll&&this.trigger("#readFinish",{finishReading:!0})}function _updateNum2(e){this.on("numUpdate",{currentNum:e})}function _onError2(e){_classPrivateFieldGet(this,_options).initializing=!1,_classPrivateFieldGet(this,_options).showMsg=e.message,this.trigger("error",e)}function _updateDom2(e){var t=this.dom.querySelector(".__pdf_component"),r=this.dom.querySelector(".__pdf_error"),n=this.dom.querySelector(".__pdf_component_out_box"),a=this.dom.querySelector(".__pdf_pageNum_box"),i=this.dom.querySelector(".__pdf_loader"),o=this.dom.querySelector(".__pdf_loading_bar"),s=this.dom.querySelector(".__pdf_container");if("height"!==e&&"width"!==e||(_classPrivateFieldGet(this,_options).height?removeClass(t.classList,"__pdf_display-none"):addClass(t.classList,"__pdf_display-none"),t.style.height=_classPrivateFieldGet(this,_options).height+"px",t.style.width=_classPrivateFieldGet(this,_options).width?_classPrivateFieldGet(this,_options).width+"px":"auto"),"showMsg"===e&&(_classPrivateFieldGet(this,_options).showMsg?(removeClass(r.classList,"__pdf_display-none"),addClass(n.classList,"__pdf_display-none")):(addClass(r.classList,"__pdf_display-none"),removeClass(n.classList,"__pdf_display-none")),_classPrivateFieldGet(this,_options).showMsg&&(r.innerHTML=_classPrivateFieldGet(this,_options).showMsg)),"initializing"===e&&(_classPrivateFieldGet(this,_options).initializing?removeClass(i.classList,"__pdf_display-none"):addClass(i.classList,"__pdf_display-none")),["initializing","numPages"].includes(e)&&(!_classPrivateFieldGet(this,_options).initializing&&_classPrivateFieldGet(this,_options).numPages?removeClass(a.classList,"__pdf_display-none"):addClass(a.classList,"__pdf_display-none")),"scrolling"===e&&(_classPrivateFieldGet(this,_options).scrolling?removeClass(a.classList,"__pdf_hide-num"):addClass(a.classList,"__pdf_hide-num")),"percent"===e&&(o.style["--process-percent"]=_classPrivateFieldGet(this,_options).percent+"%"),"numPages"===e){for(var c="",l=0;l<_classPrivateFieldGet(this,_options).numPages;l++)c+='
');s.innerHTML=c}"num"===e&&(a.innerHTML=_classPrivateFieldGet(this,_options).num+"/"+_classPrivateFieldGet(this,_options).numPages)}function _render2(){this.dom.innerHTML='\n \n \n \n ').concat(_classPrivateFieldGet(this,_options).showMsg,'\n \n
\n
\n \n ').concat(_classPrivateFieldGet(this,_options).num,"/").concat(_classPrivateFieldGet(this,_options).numPages,'\n \n
\n
\n
\n \n \n ')}var index={PdfViewRegistry:PdfViewRegistry,PdfViewLib:PdfViewLib};return index})); +!function(e,t){var r;r=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"WorkerMessageHandler",{enumerable:!0,get:function(){return n.WorkerMessageHandler}});var n=r(1)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageHandler=t.WorkerTask=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(198),s=r(199),c=r(7),l=r(238),u=r(239),h=r(201);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}(e,t)||function(){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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=i.VerbosityLevel.INFOS?Date.now():0;r.getOperatorList({handler:A,sink:t,task:a,intent:e.intent,renderInteractiveForms:e.renderInteractiveForms}).then((function(e){P(a),o&&(0,i.info)("page=".concat(n+1," - getOperatorList: time=")+"".concat(Date.now()-o,"ms, len=").concat(e.length)),t.close()}),(function(e){P(a),a.terminated||(A.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorOperatorList}),t.error(e))}))}))}),this),A.on("GetTextContent",(function(e,t){var n=e.pageIndex;t.onPull=function(e){},t.onCancel=function(e){},r.getPage(n).then((function(r){var a=new g("GetTextContent: page "+n);C(a);var o=m>=i.VerbosityLevel.INFOS?Date.now():0;r.extractTextContent({handler:A,task:a,sink:t,normalizeWhitespace:e.normalizeWhitespace,combineTextItems:e.combineTextItems}).then((function(){P(a),o&&(0,i.info)("page=".concat(n+1," - getTextContent: time=")+"".concat(Date.now()-o,"ms")),t.close()}),(function(e){P(a),a.terminated||t.error(e)}))}))})),A.on("FontFallback",(function(e){return r.fontFallback(e.id,A)})),A.on("Cleanup",(function(e){return r.cleanup(!0)})),A.on("Terminate",(function(e){n=!0;var t=[];if(r){r.terminate(new i.AbortException("Worker was terminated."));var a=r.cleanup();t.push(a),r=null}else(0,o.clearPrimitiveCaches)();return c&&c(new i.AbortException("Worker was terminated.")),d.forEach((function(e){t.push(e.finished),e.terminate()})),Promise.all(t).then((function(){A.destroy(),A=null}))})),A.on("Ready",(function(t){!function(e){function t(e){x(),A.send("GetDoc",{pdfInfo:e})}function a(e){if(x(),e instanceof i.PasswordException){var t=new g("PasswordException: response ".concat(e.code));C(t),A.sendWithPromise("PasswordRequest",e).then((function(e){var n=e.password;P(t),r.updatePassword(n),o()})).catch((function(){P(t),A.send("DocException",e)}))}else e instanceof i.InvalidPDFException||e instanceof i.MissingPDFException||e instanceof i.UnexpectedResponseException||e instanceof i.UnknownErrorException?A.send("DocException",e):A.send("DocException",new i.UnknownErrorException(e.message,e.toString()))}function o(){x(),T(!1).then(t,(function(e){x(),e instanceof h.XRefParseException?(r.requestLoadedStream(),r.onLoadedStream().then((function(){x(),T(!0).then(t,a)}))):a(e)}),a)}x(),R(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties}).then((function(e){if(n)throw e.terminate(new i.AbortException("Worker was terminated.")),new Error("Worker was terminated");(r=e).onLoadedStream().then((function(e){A.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(o,a)}(e),e=null})),_},initializeFromPort:function(e){var t=new l.MessageHandler("worker","main",e);v.setup(t,e),t.send("ready",null)}};t.WorkerMessageHandler=v,"undefined"==typeof window&&!c.isNodeJS&&"undefined"!=typeof self&&"function"==typeof(m=self).postMessage&&"onmessage"in m&&v.initializeFromPort(self)},function(e,t,r){e.exports=r(3)},function(e,t,r){(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,a=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,i=Object.create(a.prototype),o=new T(n||[]);return i._invoke=function(e,t,r){var n=h;return function(a,i){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw i;return R()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=x(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===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,k=w&&w(w(E([])));k&&k!==n&&a.call(k,o)&&(b=k);var S=y.prototype=m.prototype=Object.create(b);function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e,r){function n(i,o,s,c){var l=u(e[i],e,o);if("throw"!==l.type){var h=l.arg,f=h.value;return f&&"object"===t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(f).then((function(e){h.value=e,s(h)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;this._invoke=function(e,t){function a(){return new r((function(r,a){n(e,t,r,a)}))}return i=i?i.then(a,a):a()}}function x(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,x(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 a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,g;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(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,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(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 a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){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){function n(e,t){for(var r=0;r=u.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.removeNullCharacters=function(e){return"string"!=typeof e?(f("The argument for removeNullCharacters must be a string."),e):e.replace(A,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=x,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n=u.WARNINGS&&console.log("Warning: ".concat(e))}function d(e){throw new Error(e)}function p(e,t){e||d(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=function(){function e(t){this.constructor===e&&d("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=m;var v=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).code=n,a}return r}(m);t.PasswordException=v;var y=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).details=n,a}return r}(m);t.UnknownErrorException=y;var b=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.InvalidPDFException=b;var w=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.MissingPDFException=w;var k=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,e)).status=n,a}return r}(m);t.UnexpectedResponseException=k;var S=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.FormatError=S;var _=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(m);t.AbortException=_;var A=/\x00/g;function x(e){p("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;ne[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 a=[t[0],t[2],r[0],r[2]].sort(n),i=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}],(r=null)&&n(t.prototype,r),a&&n(t,a),e}();t.Util=R;var O,I=[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],F=(O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var r=new Blob([e],{type:t});return URL.createObjectURL(r)}for(var n="data:".concat(t,";base64,"),a=0,i=e.length;a>2]+O[(3&o)<<4|s>>4]+O[a+1>6:64]+O[a+21?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),function(){if(i&&s){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var a=void 0===n?[t,r]:[t,r,n];e.apply(this,a)},window.history.replaceState=function(e,r,n){var a=void 0===n?[e,r]:[e,r,n];t.apply(this,a)}}}(),String.prototype.startsWith||r(53),String.prototype.endsWith||r(64),String.prototype.includes||r(66),Array.prototype.includes||r(68),Array.from||r(76),Object.assign||r(98),Math.log2||(Math.log2=r(101)),Number.isNaN||(Number.isNaN=r(103)),Number.isInteger||(Number.isInteger=r(105)),Uint8Array.prototype.slice||r(108),globalThis.Promise&&globalThis.Promise.allSettled||(globalThis.Promise=r(113)),globalThis.URL=r(136),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(e){}e||(globalThis.ReadableStream=r(143).ReadableStream)}(),globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(144)),globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(151)),globalThis.WeakMap||(globalThis.WeakMap=r(153)),globalThis.WeakSet||(globalThis.WeakSet=r(159)),String.prototype.codePointAt||r(161),String.fromCodePoint||(String.fromCodePoint=r(163)),globalThis.Symbol||r(165),String.prototype.padStart||r(188),String.prototype.padEnd||r(193),Object.values||(Object.values=r(195))}},function(e,t,r){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 a="object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=a},function(e,t,r){r(9),e.exports=r(11)},function(e,t,r){r(10)({global:!0},{globalThis:r(11)})},function(e,t,r){var n=r(11),a=r(12).f,i=r(26),o=r(29),s=r(30),c=r(40),l=r(52);e.exports=function(e,t){var r,u,h,f,d,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||s(p,{}):(n[p]||{}).prototype)for(u in t){if(f=t[u],h=e.noTargetGet?(d=a(r,u))&&d.value:r[u],!l(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(e.sham||h&&h.sham)&&i(f,"sham",!0),o(r,u,f,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 commonjsGlobal&&commonjsGlobal)||Function("return this")()},function(e,t,r){var n=r(13),a=r(15),i=r(16),o=r(17),s=r(21),c=r(23),l=r(24),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(c(e,t))return i(!a.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(e){return!0}}},function(e,t,r){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,i=a&&!n.call({1:2},1);t.f=i?function(e){var t=a(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),a=r(20);e.exports=function(e){return n(a(e))}},function(e,t,r){var n=r(14),a=r(19),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?i.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(null==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,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;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),a=r(14),i=r(25);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(11),a=r(22),i=n.document,o=a(i)&&a(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(13),a=r(27),i=r(16);e.exports=n?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(13),a=r(24),i=r(28),o=r(21),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(i(e),t=o(t,!0),i(r),a)try{return s(e,t,r)}catch(e){}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),a=r(26),i=r(23),o=r(30),s=r(31),c=r(33),l=c.get,u=c.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||i(r,"name")||a(r,"name",t),u(r).source=h.join("string"==typeof t?t:"")),e!==n?(c?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=r:a(e,t,r)):l?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,r){var n=r(11),a=r(26);e.exports=function(e,t){try{a(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(32),a=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return a.call(e)}),e.exports=n.inspectSource},function(e,t,r){var n=r(11),a=r(30),i="__core-js_shared__",o=n[i]||a(i,{});e.exports=o},function(e,t,r){var n,a,i,o=r(34),s=r(11),c=r(22),l=r(26),u=r(23),h=r(35),f=r(39),d=s.WeakMap;if(o){var p=new d,g=p.get,m=p.has,v=p.set;n=function(e,t){return v.call(p,e,t),t},a=function(e){return g.call(p,e)||{}},i=function(e){return m.call(p,e)}}else{var y=h("state");f[y]=!0,n=function(e,t){return l(e,y,t),t},a=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:n,get:a,has:i,enforce:function(e){return i(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(11),a=r(31),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(a(i))},function(e,t,r){var n=r(36),a=r(38),i=n("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},function(e,t,r){var n=r(37),a=r(32);(e.exports=function(e,t){return a[e]||(a[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),a=r(41),i=r(12),o=r(27);e.exports=function(e,t){for(var r=a(t),s=o.f,c=i.f,l=0;lc;)n(s,r=t[c++])&&(~i(l,r)||l.push(r));return l}},function(e,t,r){var n=r(17),a=r(47),i=r(49),o=function(e){return function(t,r,o){var s,c=n(t),l=a(c.length),u=i(o,l);if(e&&r!=r){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,r){var n=r(48),a=Math.min;e.exports=function(e){return e>0?a(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),a=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):i(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),a=/#|\.prototype\./,i=function(e,t){var r=s[o(e)];return r==l||r!=c&&("function"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,r){r(54);var n=r(61);e.exports=n("String","startsWith")},function(e,t,r){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".startsWith,f=Math.min,d=l("startsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"startsWith"),n&&!n.writable)||d)},{startsWith:function(e){var t=String(c(this));s(e);var r=o(f(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return h?h.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),a=r(19),i=r(57)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==a(e))}},function(e,t,r){var n=r(11),a=r(36),i=r(23),o=r(38),s=r(58),c=r(59),l=a("wks"),u=n.Symbol,h=c?u:u&&u.withoutSetter||o;e.exports=function(e){return i(l,e)||(s&&i(u,e)?l[e]=u[e]:l[e]=h("Symbol."+e)),l[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)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(11),a=r(62),i=Function.call;e.exports=function(e,t,r){return a(i,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,a){return e.call(t,r,n,a)}}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){var n,a=r(10),i=r(12).f,o=r(47),s=r(55),c=r(20),l=r(60),u=r(37),h="".endsWith,f=Math.min,d=l("endsWith");a({target:"String",proto:!0,forced:!(!u&&!d&&(n=i(String.prototype,"endsWith"),n&&!n.writable)||d)},{endsWith:function(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=o(t.length),a=void 0===r?n:f(o(r),n),i=String(e);return h?h.call(t,i,a):t.slice(a-i.length,a)===i}})},function(e,t,r){r(67);var n=r(61);e.exports=n("String","includes")},function(e,t,r){var n=r(10),a=r(55),i=r(20);n({target:"String",proto:!0,forced:!r(60)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(a(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){var n=r(10),a=r(46).includes,i=r(70);n({target:"Array",proto:!0,forced:!r(75)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,r){var n=r(57),a=r(71),i=r(27),o=n("unscopables"),s=Array.prototype;null==s[o]&&i.f(s,o,{configurable:!0,value:a(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,r){var n,a=r(28),i=r(72),o=r(50),s=r(39),c=r(74),l=r(25),u=r(35),h="prototype",f="script",d=u("IE_PROTO"),p=function(){},g=function(e){return"<"+f+">"+e+""},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m=n?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):(t=l("iframe"),r="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var a=o.length;a--;)delete m[h][o[a]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[h]=a(e),r=new p,p[h]=null,r[d]=e):r=m(),void 0===t?r:i(r,t)}},function(e,t,r){var n=r(13),a=r(27),i=r(28),o=r(73);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=o(t),s=n.length,c=0;s>c;)a.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(45),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){var n=r(42);e.exports=n("document","documentElement")},function(e,t,r){var n=r(13),a=r(14),i=r(23),o=Object.defineProperty,s={},c=function(e){throw e};e.exports=function(e,t){if(i(s,e))return s[e];t||(t={});var r=[][e],l=!!i(t,"ACCESSORS")&&t.ACCESSORS,u=i(t,0)?t[0]:c,h=i(t,1)?t[1]:void 0;return s[e]=!!r&&!a((function(){if(l&&!n)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:c}):e[1]=1,r.call(e,u,h)}))}},function(e,t,r){r(77),r(89);var n=r(43);e.exports=n.Array.from},function(e,t,r){var n=r(78).charAt,a=r(33),i=r(79),o="String Iterator",s=a.set,c=a.getterFor(o);i(String,"String",(function(e){s(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(48),a=r(20),i=function(e){return function(t,r){var i,o,s=String(a(t)),c=n(r),l=s.length;return c<0||c>=l?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):i:e?s.slice(c,c+2):o-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,r){var n=r(10),a=r(80),i=r(82),o=r(87),s=r(85),c=r(26),l=r(29),u=r(57),h=r(37),f=r(86),d=r(81),p=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v="keys",y="values",b="entries",w=function(){return this};e.exports=function(e,t,r,u,d,k,S){a(r,t,u);var _,A,x,C=function(e){if(e===d&&O)return O;if(!g&&e in E)return E[e];switch(e){case v:case y:case b:return function(){return new r(this,e)}}return function(){return new r(this)}},P=t+" Iterator",T=!1,E=e.prototype,R=E[m]||E["@@iterator"]||d&&E[d],O=!g&&R||C(d),I="Array"==t&&E.entries||R;if(I&&(_=i(I.call(new e)),p!==Object.prototype&&_.next&&(h||i(_)===p||(o?o(_,p):"function"!=typeof _[m]&&c(_,m,w)),s(_,P,!0,!0),h&&(f[P]=w))),d==y&&R&&R.name!==y&&(T=!0,O=function(){return R.call(this)}),h&&!S||E[m]===O||c(E,m,O),f[t]=O,d)if(A={values:C(y),keys:k?O:C(v),entries:C(b)},S)for(x in A)(g||T||!(x in E))&&l(E,x,A[x]);else n({target:t,proto:!0,forced:g||T},A);return A}},function(e,t,r){var n=r(81).IteratorPrototype,a=r(71),i=r(16),o=r(85),s=r(86),c=function(){return this};e.exports=function(e,t,r){var l=t+" Iterator";return e.prototype=a(n,{next:i(1,r)}),o(e,l,!1,!0),s[l]=c,e}},function(e,t,r){var n,a,i,o=r(82),s=r(26),c=r(23),l=r(57),u=r(37),h=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=o(o(i)))!==Object.prototype&&(n=a):f=!0),null==n&&(n={}),u||c(n,h)||s(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(e,t,r){var n=r(23),a=r(83),i=r(35),o=r(84),s=i("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=a(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c: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,a=r(23),i=r(57)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(28),a=r(88);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),a(i),t?e.call(r,i):r.__proto__=i,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),a=r(90);n({target:"Array",stat:!0,forced:!r(97)((function(e){Array.from(e)}))},{from:a})},function(e,t,r){var n=r(62),a=r(83),i=r(91),o=r(92),s=r(47),c=r(93),l=r(94);e.exports=function(e){var t,r,u,h,f,d,p=a(e),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=l(p),w=0;if(y&&(v=n(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&o(b))for(r=new g(t=s(p.length));t>w;w++)d=y?v(p[w],w):p[w],c(r,w,d);else for(f=(h=b.call(p)).next,r=new g;!(u=f.call(h)).done;w++)d=y?i(h,v,[u.value,w],!0):u.value,c(r,w,d);return r.length=w,r}},function(e,t,r){var n=r(28);e.exports=function(e,t,r,a){try{return a?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(57),a=r(86),i=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||o[i]===e)}},function(e,t,r){var n=r(21),a=r(27),i=r(16);e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},function(e,t,r){var n=r(95),a=r(86),i=r(57)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){var n=r(96),a=r(19),i=r(57)("toStringTag"),o="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?a(t):"Object"==(n=a(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(57)("toStringTag")]="z",e.exports="[object z]"===String(n)},function(e,t,r){var n=r(57)("iterator"),a=!1;try{var i=0,o={next:function(){return{done:!!i++}},return:function(){a=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}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),a=r(100);n({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},function(e,t,r){var n=r(13),a=r(14),i=r(73),o=r(51),s=r(15),c=r(83),l=r(18),u=Object.assign,h=Object.defineProperty;e.exports=!u||a((function(){if(n&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!=u({},e)[r]||i(u({},t)).join("")!=a}))?function(e,t){for(var r=c(e),a=arguments.length,u=1,h=o.f,f=s.f;a>u;)for(var d,p=l(arguments[u++]),g=h?i(p).concat(h(p)):i(p),m=g.length,v=0;m>v;)d=g[v++],n&&!f.call(p,d)||(r[d]=p[d]);return r}:u},function(e,t,r){r(102);var n=r(43);e.exports=n.Math.log2},function(e,t,r){var n=r(10),a=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return a(e)/i}})},function(e,t,r){r(104);var n=r(43);e.exports=n.Number.isNaN},function(e,t,r){r(10)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,r){r(106);var n=r(43);e.exports=n.Number.isInteger},function(e,t,r){r(10)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(22),a=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&a(e)===e}},function(e,t,r){r(109)},function(e,t,r){var n=r(110),a=r(112),i=r(14),o=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,l=[].slice;c("slice",(function(e,t){for(var r=l.call(o(this),e,t),n=a(this,this.constructor),i=0,c=r.length,u=new(s(n))(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},function(e,t,r){var n,a=r(111),i=r(13),o=r(11),s=r(22),c=r(23),l=r(95),u=r(26),h=r(29),f=r(27).f,d=r(82),p=r(87),g=r(57),m=r(38),v=o.Int8Array,y=v&&v.prototype,b=o.Uint8ClampedArray,w=b&&b.prototype,k=v&&d(v),S=y&&d(y),_=Object.prototype,A=_.isPrototypeOf,x=g("toStringTag"),C=m("TYPED_ARRAY_TAG"),P=a&&!!p&&"Opera"!==l(o.opera),T=!1,E={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R=function(e){return s(e)&&c(E,l(e))};for(n in E)o[n]||(P=!1);if((!P||"function"!=typeof k||k===Function.prototype)&&(k=function(){throw TypeError("Incorrect invocation")},P))for(n in E)o[n]&&p(o[n],k);if((!P||!S||S===_)&&(S=k.prototype,P))for(n in E)o[n]&&p(o[n].prototype,S);if(P&&d(w)!==S&&p(w,S),i&&!c(S,x))for(n in T=!0,f(S,x,{get:function(){return s(this)?this[C]:void 0}}),E)o[n]&&u(o[n],C,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:T&&C,aTypedArray:function(e){if(R(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(p){if(A.call(k,e))return e}else for(var t in E)if(c(E,n)){var r=o[t];if(r&&(e===r||A.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var n in E){var a=o[n];a&&c(a.prototype,e)&&delete a.prototype[e]}S[e]&&!r||h(S,e,r?t:P&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(i){if(p){if(r)for(n in E)(a=o[n])&&c(a,e)&&delete a[e];if(k[e]&&!r)return;try{return h(k,e,r?t:P&&v[e]||t)}catch(e){}}for(n in E)!(a=o[n])||a[e]&&!r||h(a,e,t)}},isView:function(e){var t=l(e);return"DataView"===t||c(E,t)},isTypedArray:R,TypedArray:k,TypedArrayPrototype:S}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(28),a=r(63),i=r(57)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[i])?t:a(r)}},function(e,t,r){r(114),r(77),r(116),r(119),r(134),r(135);var n=r(43);e.exports=n.Promise},function(e,t,r){var n=r(96),a=r(29),i=r(115);n||a(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,r){var n=r(96),a=r(95);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},function(e,t,r){var n=r(11),a=r(117),i=r(118),o=r(26),s=r(57),c=s("iterator"),l=s("toStringTag"),u=i.values;for(var h in a){var f=n[h],d=f&&f.prototype;if(d){if(d[c]!==u)try{o(d,c,u)}catch(e){d[c]=u}if(d[l]||o(d,l,h),a[h])for(var p in i)if(d[p]!==i[p])try{o(d,p,i[p])}catch(e){d[p]=i[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){var n=r(17),a=r(70),i=r(86),o=r(33),s=r(79),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=s(Array,"Array",(function(e,t){l(this,{type:c,target:n(e),index:0,kind:t})}),(function(){var e=u(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"),i.Arguments=i.Array,a("keys"),a("values"),a("entries")},function(e,t,r){var n,a,i,o,s=r(10),c=r(37),l=r(11),u=r(42),h=r(120),f=r(29),d=r(121),p=r(85),g=r(122),m=r(22),v=r(63),y=r(123),b=r(19),w=r(31),k=r(124),S=r(97),_=r(112),A=r(125).set,x=r(128),C=r(129),P=r(131),T=r(130),E=r(132),R=r(33),O=r(52),I=r(57),F=r(133),L=I("species"),M="Promise",N=R.get,D=R.set,B=R.getterFor(M),j=h,U=l.TypeError,q=l.document,z=l.process,G=u("fetch"),W=T.f,H=W,V="process"==b(z),X=!!(q&&q.createEvent&&l.dispatchEvent),Y="unhandledrejection",K=O(M,(function(){if(w(j)===String(j)){if(66===F)return!0;if(!V&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!j.prototype.finally)return!0;if(F>=51&&/native code/.test(j))return!1;var e=j.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),J=K||!S((function(e){j.all(e).catch((function(){}))})),Q=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x((function(){for(var a=t.value,i=1==t.state,o=0;n.length>o;){var s,c,l,u=n[o++],h=i?u.ok:u.fail,f=u.resolve,d=u.reject,p=u.domain;try{h?(i||(2===t.rejection&&re(e,t),t.rejection=1),!0===h?s=a:(p&&p.enter(),s=h(a),p&&(p.exit(),l=!0)),s===u.promise?d(U("Promise-chain cycle")):(c=Q(s))?c.call(s,f,d):f(s)):d(a)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&ee(e,t)}))}},Z=function(e,t,r){var n,a;X?((n=q.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),l.dispatchEvent(n)):n={promise:t,reason:r},(a=l["on"+e])?a(n):e===Y&&P("Unhandled promise rejection",r)},ee=function(e,t){A.call(l,(function(){var r,n=t.value;if(te(t)&&(r=E((function(){V?z.emit("unhandledRejection",n,e):Z(Y,e,n)})),t.rejection=V||te(t)?2:1,r.error))throw r.value}))},te=function(e){return 1!==e.rejection&&!e.parent},re=function(e,t){A.call(l,(function(){V?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,r,n){return function(a){e(t,r,a,n)}},ae=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,$(e,t,!0))},ie=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw U("Promise can't be resolved itself");var a=Q(r);a?x((function(){var n={done:!1};try{a.call(r,ne(ie,e,n,t),ne(ae,e,n,t))}catch(r){ae(e,n,r,t)}})):(t.value=r,t.state=1,$(e,t,!1))}catch(r){ae(e,{done:!1},r,t)}}};K&&(j=function(e){y(this,j,M),v(e),n.call(this);var t=N(this);try{e(ne(ie,this,t),ne(ae,this,t))}catch(e){ae(this,t,e)}},(n=function(e){D(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(j.prototype,{then:function(e,t){var r=B(this),n=W(_(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=V?z.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&$(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(ae,e,t)},T.f=W=function(e){return e===j||e===i?new a(e):H(e)},c||"function"!=typeof h||(o=h.prototype.then,f(h.prototype,"then",(function(e,t){var r=this;return new j((function(e,t){o.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof G&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(j,G.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:K},{Promise:j}),p(j,M,!1,!0),g(M),i=u(M),s({target:M,stat:!0,forced:K},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:c||K},{resolve:function(e){return C(c&&this===i?j:this,e)}}),s({target:M,stat:!0,forced:J},{all:function(e){var t=this,r=W(t),n=r.resolve,a=r.reject,i=E((function(){var r=v(t.resolve),i=[],o=0,s=1;k(e,(function(e){var c=o++,l=!1;i.push(void 0),s++,r.call(t,e).then((function(e){l||(l=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise},race:function(e){var t=this,r=W(t),n=r.reject,a=E((function(){var a=v(t.resolve);k(e,(function(e){a.call(t,e).then(r.resolve,n)}))}));return a.error&&n(a.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 a in t)n(e,a,t[a],r);return e}},function(e,t,r){var n=r(42),a=r(27),i=r(57),o=r(13),s=i("species");e.exports=function(e){var t=n(e),r=a.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=r(28),a=r(92),i=r(47),o=r(62),s=r(94),c=r(91),l=function(e,t){this.stopped=e,this.result=t},u=e.exports=function(e,t,r,u,h){var f,d,p,g,m,v,y,b=o(t,r,u?2:1);if(h)f=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(a(d)){for(p=0,g=i(e.length);g>p;p++)if((m=u?b(n(y=e[p])[0],y[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}f=d.call(e)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(m=c(f,b,y.value,u))&&m&&m instanceof l)return m;return new l(!1)};u.stop=function(e){return new l(!0,e)}},function(e,t,r){var n,a,i,o=r(11),s=r(14),c=r(19),l=r(62),u=r(74),h=r(25),f=r(126),d=o.location,p=o.setImmediate,g=o.clearImmediate,m=o.process,v=o.MessageChannel,y=o.Dispatch,b=0,w={},k="onreadystatechange",S=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},_=function(e){return function(){S(e)}},A=function(e){S(e.data)},x=function(e){o.postMessage(e+"",d.protocol+"//"+d.host)};p&&g||(p=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(b),b},g=function(e){delete w[e]},"process"==c(m)?n=function(e){m.nextTick(_(e))}:y&&y.now?n=function(e){y.now(_(e))}:v&&!f?(i=(a=new v).port2,a.port1.onmessage=A,n=l(i.postMessage,i,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||s(x)||"file:"===d.protocol?n=k in h("script")?function(e){u.appendChild(h("script"))[k]=function(){u.removeChild(this),S(e)}}:function(e){setTimeout(_(e),0)}:(n=x,o.addEventListener("message",A,!1))),e.exports={set:p,clear:g}},function(e,t,r){var n=r(127);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,a,i,o,s,c,l,u,h=r(11),f=r(12).f,d=r(19),p=r(125).set,g=r(126),m=h.MutationObserver||h.WebKitMutationObserver,v=h.process,y=h.Promise,b="process"==d(v),w=f(h,"queueMicrotask"),k=w&&w.value;k||(n=function(){var e,t;for(b&&(e=v.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?o():i=void 0,e}}i=void 0,e&&e.enter()},b?o=function(){v.nextTick(n)}:m&&!g?(s=!0,c=document.createTextNode(""),new m(n).observe(c,{characterData:!0}),o=function(){c.data=s=!s}):y&&y.resolve?(l=y.resolve(void 0),u=l.then,o=function(){u.call(l,n)}):o=function(){p.call(h,n)}),e.exports=k||function(e){var t={fn:e,next:void 0};i&&(i.next=t),a||(a=t,o()),i=t}},function(e,t,r){var n=r(28),a=r(22),i=r(130);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(63),a=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 a(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(e){return{error:!0,value:e}}}},function(e,t,r){var n,a,i=r(11),o=r(127),s=i.process,c=s&&s.versions,l=c&&c.v8;l?a=(n=l.split("."))[0]+n[1]:o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(a=n[1]),e.exports=a&&+a},function(e,t,r){var n=r(10),a=r(63),i=r(130),o=r(132),s=r(124);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,c=r.reject,l=o((function(){var r=a(t.resolve),i=[],o=0,c=1;s(e,(function(e){var a=o++,s=!1;i.push(void 0),c++,r.call(t,e).then((function(e){s||(s=!0,i[a]={status:"fulfilled",value:e},--c||n(i))}),(function(e){s||(s=!0,i[a]={status:"rejected",reason:e},--c||n(i))}))})),--c||n(i)}));return l.error&&c(l.value),r.promise}})},function(e,t,r){var n=r(10),a=r(37),i=r(120),o=r(14),s=r(42),c=r(112),l=r(129),u=r(29);n({target:"Promise",proto:!0,real:!0,forced:!!i&&o((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),r="function"==typeof e;return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),a||"function"!=typeof i||i.prototype.finally||u(i.prototype,"finally",s("Promise").prototype.finally)},function(e,t,r){r(137),r(142),r(140);var n=r(43);e.exports=n.URL},function(e,t,r){r(77);var n,a=r(10),i=r(13),o=r(138),s=r(11),c=r(72),l=r(29),u=r(123),h=r(23),f=r(100),d=r(90),p=r(78).codeAt,g=r(139),m=r(85),v=r(140),y=r(33),b=s.URL,w=v.URLSearchParams,k=v.getState,S=y.set,_=y.getterFor("URL"),A=Math.floor,x=Math.pow,C="Invalid scheme",P="Invalid host",T="Invalid port",E=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,O=/\d/,I=/^(0x|0X)/,F=/^[0-7]+$/,L=/^\d+$/,M=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,D=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,B=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,j=/[\u0009\u000A\u000D]/g,U=function(e,t){var r,n,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return P;if(!(r=z(t.slice(1,-1))))return P;e.host=r}else if(J(e)){if(t=g(t),N.test(t))return P;if(null===(r=q(t)))return P;e.host=r}else{if(D.test(t))return P;for(r="",n=d(t),a=0;a4)return e;for(r=[],n=0;n1&&"0"==a.charAt(0)&&(i=I.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)o=0;else{if(!(10==i?L:8==i?F:M).test(a))return e;o=parseInt(a,i)}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;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!O.test(f()))return;for(;O.test(f());){if(i=parseInt(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[l]=256*c[l]+a,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[l++]=t}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!=l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!=l)return;return c},G=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},W={},H=f({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),V=f({},H,{"#":1,"?":1,"{":1,"}":1}),X=f({},V,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var r=p(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(e){return h(K,e.scheme)},Q=function(e){return""!=e.username||""!=e.password},$=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var r;return 2==e.length&&E.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},ee=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&Z(t[0],!0)||t.pop()},re=function(e){return"."===e||"%2e"===e.toLowerCase()},ne={},ae={},ie={},oe={},se={},ce={},le={},ue={},he={},fe={},de={},pe={},ge={},me={},ve={},ye={},be={},we={},ke={},Se={},_e={},Ae=function(e,t,r,a){var i,o,s,c,l,u=r||ne,f=0,p="",g=!1,m=!1,v=!1;for(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(B,"")),t=t.replace(j,""),i=d(t);f<=i.length;){switch(o=i[f],u){case ne:if(!o||!E.test(o)){if(r)return C;u=ie;continue}p+=o.toLowerCase(),u=ae;break;case ae:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))p+=o.toLowerCase();else{if(":"!=o){if(r)return C;p="",u=ie,f=0;continue}if(r&&(J(e)!=h(K,p)||"file"==p&&(Q(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,r)return void(J(e)&&K[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?u=me:J(e)&&a&&a.scheme==e.scheme?u=oe:J(e)?u=ue:"/"==i[f+1]?(u=se,f++):(e.cannotBeABaseURL=!0,e.path.push(""),u=ke)}break;case ie:if(!a||a.cannotBeABaseURL&&"#"!=o)return C;if(a.cannotBeABaseURL&&"#"==o){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=_e;break}u="file"==a.scheme?me:ce;continue;case oe:if("/"!=o||"/"!=i[f+1]){u=ce;continue}u=he,f++;break;case se:if("/"==o){u=fe;break}u=we;continue;case ce:if(e.scheme=a.scheme,o==n)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==o||"\\"==o&&J(e))u=le;else if("?"==o)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=Se;else{if("#"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=we;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}break;case le:if(!J(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=we;continue}u=fe}else u=he;break;case ue:if(u=he,"/"!=o||"/"!=p.charAt(f+1))continue;f++;break;case he:if("/"!=o&&"\\"!=o){u=fe;continue}break;case fe:if("@"==o){g&&(p="%40"+p),g=!0,s=d(p);for(var y=0;y65535)return T;e.port=J(e)&&k===K[e.scheme]?null:k,p=""}if(r)return;u=be;continue}return T}p+=o;break;case me:if(e.scheme="file","/"==o||"\\"==o)u=ve;else{if(!a||"file"!=a.scheme){u=we;continue}if(o==n)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==o)e.host=a.host,e.path=a.path.slice(),e.query="",u=Se;else{if("#"!=o){ee(i.slice(f).join(""))||(e.host=a.host,e.path=a.path.slice(),te(e)),u=we;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=_e}}break;case ve:if("/"==o||"\\"==o){u=ye;break}a&&"file"==a.scheme&&!ee(i.slice(f).join(""))&&(Z(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=we;continue;case ye:if(o==n||"/"==o||"\\"==o||"?"==o||"#"==o){if(!r&&Z(p))u=we;else if(""==p){if(e.host="",r)return;u=be}else{if(c=U(e,p))return c;if("localhost"==e.host&&(e.host=""),r)return;p="",u=be}continue}p+=o;break;case be:if(J(e)){if(u=we,"/"!=o&&"\\"!=o)continue}else if(r||"?"!=o)if(r||"#"!=o){if(o!=n&&(u=we,"/"!=o))continue}else e.fragment="",u=_e;else e.query="",u=Se;break;case we:if(o==n||"/"==o||"\\"==o&&J(e)||!r&&("?"==o||"#"==o)){if(".."===(l=(l=p).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(te(e),"/"==o||"\\"==o&&J(e)||e.path.push("")):re(p)?"/"==o||"\\"==o&&J(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(o==n||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=Se):"#"==o&&(e.fragment="",u=_e)}else p+=Y(o,V);break;case ke:"?"==o?(e.query="",u=Se):"#"==o?(e.fragment="",u=_e):o!=n&&(e.path[0]+=Y(o,W));break;case Se:r||"#"!=o?o!=n&&("'"==o&&J(e)?e.query+="%27":e.query+="#"==o?"%23":Y(o,W)):(e.fragment="",u=_e);break;case _e:o!=n&&(e.fragment+=Y(o,H))}f++}},xe=function(e){var t,r,n=u(this,xe,"URL"),a=arguments.length>1?arguments[1]:void 0,o=String(e),s=S(n,{type:"URL"});if(void 0!==a)if(a instanceof xe)t=_(a);else if(r=Ae(t={},String(a)))throw TypeError(r);if(r=Ae(s,o,null,t))throw TypeError(r);var c=s.searchParams=new w,l=k(c);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(c)||null},i||(n.href=Pe.call(n),n.origin=Te.call(n),n.protocol=Ee.call(n),n.username=Re.call(n),n.password=Oe.call(n),n.host=Ie.call(n),n.hostname=Fe.call(n),n.port=Le.call(n),n.pathname=Me.call(n),n.search=Ne.call(n),n.searchParams=De.call(n),n.hash=Be.call(n))},Ce=xe.prototype,Pe=function(){var e=_(this),t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,l=t+":";return null!==a?(l+="//",Q(e)&&(l+=r+(n?":"+n:"")+"@"),l+=G(a),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},Te=function(){var e=_(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&J(e)?t+"://"+G(e.host)+(null!==r?":"+r:""):"null"},Ee=function(){return _(this).scheme+":"},Re=function(){return _(this).username},Oe=function(){return _(this).password},Ie=function(){var e=_(this),t=e.host,r=e.port;return null===t?"":null===r?G(t):G(t)+":"+r},Fe=function(){var e=_(this).host;return null===e?"":G(e)},Le=function(){var e=_(this).port;return null===e?"":String(e)},Me=function(){var e=_(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ne=function(){var e=_(this).query;return e?"?"+e:""},De=function(){return _(this).searchParams},Be=function(){var e=_(this).fragment;return e?"#"+e:""},je=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&c(Ce,{href:je(Pe,(function(e){var t=_(this),r=String(e),n=Ae(t,r);if(n)throw TypeError(n);k(t.searchParams).updateSearchParams(t.query)})),origin:je(Te),protocol:je(Ee,(function(e){var t=_(this);Ae(t,String(e)+":",ne)})),username:je(Re,(function(e){var t=_(this),r=d(String(e));if(!$(t)){t.username="";for(var n=0;n>1,e+=s(e/t);e>455;n+=36)e=s(e/35);return s(n+36*e/(e+38))},h=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&a<=56319&&r=h&&as((n-f)/v))throw RangeError(o);for(f+=(m-h)*v,h=m,r=0;rn)throw RangeError(o);if(a==h){for(var y=f,b=36;;b+=36){var w=b<=d?1:b>=d+26?26:b-d;if(y0?arguments[0]:void 0,u=[];if(P(this,{type:x,entries:u,updateURL:function(){},updateSearchParams:U}),void 0!==l)if(m(l))if("function"==typeof(e=w(l)))for(r=(t=e.call(l)).next;!(n=r.call(t)).done;){if((o=(i=(a=b(g(n.value))).next).call(a)).done||(s=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");u.push({key:o.value+"",value:s.value+""})}else for(c in l)f(l,c)&&u.push({key:c,value:l[c]+""});else j(u,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},W=G.prototype;s(W,{append:function(e,t){q(arguments.length,2);var r=T(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){q(arguments.length,1);for(var t=T(this),r=t.entries,n=e+"",a=0;ae.key){a.splice(t,0,e);break}t===r&&a.push(e)}n.updateURL()},forEach:function(e){for(var t,r=T(this).entries,n=d(e,arguments.length>1?arguments[1]:void 0,3),a=0;a1&&(m(t=arguments[1])&&(r=t.body,p(r)===x&&((n=t.headers?new _(t.headers):new _).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(r)),headers:y(0,n)}))),a.push(t)),S.apply(this,a)}}),e.exports={URLSearchParams:G,getState:T}},function(e,t,r){var n=r(28),a=r(94);e.exports=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){r(10)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){!function(e){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},a=r;function i(e){return"object"==typeof e&&null!==e||"function"==typeof e}function o(e){return e.slice()}function s(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}function c(e){return!1!==l(e)&&e!==1/0}function l(e){return!("number"!=typeof e||n(e)||e<0)}function u(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 a=e[t];if(void 0!==a){if("function"!=typeof a)throw new TypeError(a+" is not a method");switch(r){case 0:return function(){return d(a,e,n)};case 1:return function(t){var r=[t].concat(n);return d(a,e,r)}}}return function(){return _(void 0)}}function f(e,t,r){var n=e[t];if(void 0!==n)return u(n,e,r)}function d(e,t,r){try{return _(u(e,t,r))}catch(e){return A(e)}}function p(e){return e}function g(e){return!1}function m(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 v(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 y=Promise,b=Promise.prototype.then,w=Promise.resolve.bind(y),k=Promise.reject.bind(y);function S(e){return new y(e)}function _(e){return w(e)}function A(e){return k(e)}function x(e,t,r){return b.call(e,t,r)}function C(e,t,r){x(x(e,t,r),void 0,a)}function P(e,t){C(e,t)}function T(e,t){C(e,void 0,t)}function E(e,t,r){return x(e,t,r)}function R(e){x(e,void 0,a)}var O=16384,I=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===O-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,a=e._elements,i=a[r];return n===O&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,i},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}();function F(e,t,r){var n=null;!0===r&&(n=Object.prototype);var a=Object.create(n);return a.value=e,a.done=t,a}function L(e,t){e._forAuthorCode=!0,e._ownerReadableStream=t,t._reader=e,"readable"===t._state?B(e):"closed"===t._state?U(e):j(e,t._storedError)}function M(e,t){return Nr(e._ownerReadableStream,t)}function N(e){"readable"===e._ownerReadableStream._state?q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(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 B(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function j(e,t){B(e),q(e,t)}function U(e){B(e),G(e)}function q(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function z(e,t){j(e,t)}function G(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}var W=t("[[CancelSteps]]"),H=t("[[PullSteps]]");function V(e,t){void 0===t&&(t=!1);var r=new Z(e);return r._forAuthorCode=t,r}function X(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function Y(e,t,r){var n=e._reader;n._readRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function K(e){return e._reader._readRequests.length}function J(e){var t=e._reader;return void 0!==t&&!!ee(t)}var Q,$,Z=function(){function e(e){if(!1===Lr(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return ee(this)?this._closedPromise:A(re("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return ee(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(re("cancel"))},e.prototype.read=function(){return ee(this)?void 0===this._ownerReadableStream?A(D("read from")):te(this):A(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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function te(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?_(F(void 0,!0,e._forAuthorCode)):"errored"===t._state?A(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&&((Q={})[t.asyncIterator]=function(){return this},$=Q,Object.defineProperty($,t.asyncIterator,{enumerable:!1}));var ne={next:function(){if(!1===ie(this))return A(oe("next"));var e=this._asyncIteratorReader;return void 0===e._ownerReadableStream?A(D("iterate")):E(te(e),(function(t){var r=t.done;return r&&N(e),F(t.value,r,!0)}))},return:function(e){if(!1===ie(this))return A(oe("next"));var t=this._asyncIteratorReader;if(void 0===t._ownerReadableStream)return A(D("finish iterating"));if(t._readRequests.length>0)return A(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this._preventCancel){var r=M(t,e);return N(t),E(r,(function(){return F(e,!0,!0)}))}return N(t),_(F(e,!0,!0))}};function ae(e,t){void 0===t&&(t=!1);var r=V(e),n=Object.create(ne);return n._asyncIteratorReader=r,n._preventCancel=Boolean(t),n}function ie(e){return!!i(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 ce(e,t,r){if(!c(r=Number(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 le(e){return e._queue.peek().value}function ue(e){e._queue=new I,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={}),me(this);var r=t.size,n=t.highWaterMark;if(void 0!==e.type)throw new RangeError("Invalid type is specified");var a=v(r);void 0===n&&(n=1),Ye(this,e,n=m(n),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===ve(this))throw ot("locked");return ye(this)},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===ve(this)?A(ot("abort")):!0===ye(this)?A(new TypeError("Cannot abort a stream that already has a writer")):be(this,e)},e.prototype.close=function(){return!1===ve(this)?A(ot("close")):!0===ye(this)?A(new TypeError("Cannot close a stream that already has a writer")):!0===Ee(this)?A(new TypeError("Cannot close an already-closing stream")):we(this)},e.prototype.getWriter=function(){if(!1===ve(this))throw ot("getWriter");return pe(this)},e}();function pe(e){return new Me(e)}function ge(e,t,r,n,a,i){void 0===a&&(a=1),void 0===i&&(i=function(){return 1});var o=Object.create(de.prototype);return me(o),Xe(o,Object.create(He.prototype),e,t,r,n,a,i),o}function me(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new I,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function ye(e){return void 0!==e._writer}function be(e,t){var r=e._state;if("closed"===r||"errored"===r)return _(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var n=!1;"erroring"===r&&(n=!0,t=void 0);var a=S((function(r,a){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:n}}));return e._pendingAbortRequest._promise=a,!1===n&&_e(e,t),a}function we(e){var t=e._state;if("closed"===t||"errored"===t)return A(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&&kt(n),Je(e._writableStreamController),r}function ke(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function Se(e,t){"writable"!==e._state?Ae(e):_e(e,t)}function _e(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&qe(n,t),!1===Re(e)&&!0===r._started&&Ae(e)}function Ae(e){e._state="errored",e._writableStreamController[fe]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new I,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void Fe(e);C(e._writableStreamController[he](r._reason),(function(){r._resolve(),Fe(e)}),(function(t){r._reject(t),Fe(e)}))}else Fe(e)}function xe(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Ce(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Se(e,t)}function Pe(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&pt(t)}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 Ee(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Re(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Oe(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ie(e){e._inFlightWriteRequest=e._writeRequests.shift()}function Fe(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 Le(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?bt(r):kt(r)),e._backpressure=t}var Me=function(){function e(e){if(!1===ve(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===ye(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===Ee(e)&&!0===e._backpressure?gt(this):vt(this),lt(this);else if("erroring"===t)mt(this,e._storedError),lt(this);else if("closed"===t)vt(this),ht(this);else{var r=e._storedError;mt(this,r),ut(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return!1===Ne(this)?A(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 ct("desiredSize");return ze(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return!1===Ne(this)?A(st("ready")):this._readyPromise},enumerable:!0,configurable:!0}),e.prototype.abort=function(e){return!1===Ne(this)?A(st("abort")):void 0===this._ownerWritableStream?A(ct("abort")):De(this,e)},e.prototype.close=function(){if(!1===Ne(this))return A(st("close"));var e=this._ownerWritableStream;return void 0===e?A(ct("close")):!0===Ee(e)?A(new TypeError("Cannot close an already-closing stream")):Be(this)},e.prototype.releaseLock=function(){if(!1===Ne(this))throw st("releaseLock");void 0!==this._ownerWritableStream&&Ge(this)},e.prototype.write=function(e){return!1===Ne(this)?A(st("write")):void 0===this._ownerWritableStream?A(ct("write to")):We(this,e)},e}();function Ne(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function De(e,t){return be(e._ownerWritableStream,t)}function Be(e){return we(e._ownerWritableStream)}function je(e){var t=e._ownerWritableStream,r=t._state;return!0===Ee(t)||"closed"===r?_(void 0):"errored"===r?A(t._storedError):Be(e)}function Ue(e,t){"pending"===e._closedPromiseState?ft(e,t):dt(e,t)}function qe(e,t){"pending"===e._readyPromiseState?yt(e,t):wt(e,t)}function ze(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:$e(t._writableStreamController)}function Ge(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r),Ue(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function We(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=Qe(n,t);if(r!==e._ownerWritableStream)return A(ct("write to"));var i=r._state;if("errored"===i)return A(r._storedError);if(!0===Ee(r)||"closed"===i)return A(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===i)return A(r._storedError);var o=ke(r);return Ze(n,t,a),o}var He=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return e.prototype.error=function(e){if(!1===Ve(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&it(this,e)},e.prototype[he]=function(e){var t=this._abortAlgorithm(e);return Ke(this),t},e.prototype[fe]=function(){ue(this)},e}();function Ve(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}function Xe(e,t,r,n,a,i,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=i;var c=at(t);Le(e,c),C(_(r()),(function(){t._started=!0,et(t)}),(function(r){t._started=!0,Se(e,r)}))}function Ye(e,t,r,n){var a=Object.create(He.prototype);function i(){return f(t,"start",[a])}var o=h(t,"write",1,[a]),s=h(t,"close",0,[]),c=h(t,"abort",1,[]);Xe(e,a,i,o,s,c,r,n)}function Ke(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Je(e){ce(e,"close",0),et(e)}function Qe(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return tt(e,t),1}}function $e(e){return e._strategyHWM-e._queueTotalSize}function Ze(e,t,r){var n={chunk:t};try{ce(e,n,r)}catch(t){return void tt(e,t)}var a=e._controlledWritableStream;!1===Ee(a)&&"writable"===a._state&&Le(a,at(e)),et(e)}function et(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=le(e);"close"===r?rt(e):nt(e,r.chunk)}}else Ae(t)}function tt(e,t){"writable"===e._controlledWritableStream._state&&it(e,t)}function rt(e){var t=e._controlledWritableStream;Oe(t),se(e);var r=e._closeAlgorithm();Ke(e),C(r,(function(){Pe(t)}),(function(e){Te(t,e)}))}function nt(e,t){var r=e._controlledWritableStream;Ie(r),C(e._writeAlgorithm(t),(function(){xe(r);var t=r._state;if(se(e),!1===Ee(r)&&"writable"===t){var n=at(e);Le(r,n)}et(e)}),(function(t){"writable"===r._state&&Ke(e),Ce(r,t)}))}function at(e){return $e(e)<=0}function it(e,t){var r=e._controlledWritableStream;Ke(e),_e(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 ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(e){e._closedPromise=S((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function ut(e,t){lt(e),ft(e,t)}function ht(e){lt(e),pt(e)}function ft(e,t){R(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function dt(e,t){ut(e,t)}function pt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function gt(e){e._readyPromise=S((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function mt(e,t){gt(e),yt(e,t)}function vt(e){gt(e),kt(e)}function yt(e,t){R(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function bt(e){gt(e)}function wt(e,t){mt(e,t)}function kt(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(e){return!1}}var _t="undefined"!=typeof DOMException?DOMException:void 0;function At(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){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 Ct=At(_t)?_t:xt();function Pt(e,t,n,a,i,o){var s=V(e),c=pe(t);e._disturbed=!0;var l=!1,u=_(void 0);return S((function(h,f){var d;if(void 0!==o){if(d=function(){var r=new Ct("Aborted","AbortError"),n=[];!1===a&&n.push((function(){return"writable"===t._state?be(t,r):_(void 0)})),!1===i&&n.push((function(){return"readable"===e._state?Nr(e,r):_(void 0)})),w((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(g(),r,t)}r(!1)}))}function g(){return!0===l?_(!0):x(c._readyPromise,(function(){return x(te(s),(function(e){return!0===e.done||(u=x(We(c,e.value),void 0,r),!1)}))}))}if(y(e,s._closedPromise,(function(e){!1===a?w((function(){return be(t,e)}),!0,e):k(!0,e)})),y(t,c._closedPromise,(function(t){!1===i?w((function(){return Nr(e,t)}),!0,t):k(!0,t)})),b(e,s._closedPromise,(function(){!1===n?w((function(){return je(c)})):k()})),!0===Ee(t)||"closed"===t._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?w((function(){return Nr(e,m)}),!0,m):k(!0,m)}function v(){var e=u;return x(u,(function(){return e!==u?v():void 0}))}function y(e,t,r){"errored"===e._state?r(e._storedError):T(t,r)}function b(e,t,r){"closed"===e._state?r():P(t,r)}function w(e,r,n){function a(){C(e(),(function(){return A(r,n)}),(function(e){return A(!0,e)}))}!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),a):a())}function k(e,r){!0!==l&&(l=!0,"writable"===t._state&&!1===Ee(t)?P(v(),(function(){return A(e,r)})):A(e,r))}function A(e,t){Ge(c),N(s),void 0!==o&&o.removeEventListener("abort",d),e?f(t):h(void 0)}R(p())}))}var Tt=function(){function e(){throw new TypeError}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Et(this))throw qt("desiredSize");return Nt(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Et(this))throw qt("close");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits close");Ft(this)},e.prototype.enqueue=function(e){if(!1===Et(this))throw qt("enqueue");if(!1===Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return Lt(this,e)},e.prototype.error=function(e){if(!1===Et(this))throw qt("error");Mt(this,e)},e.prototype[W]=function(e){ue(this);var t=this._cancelAlgorithm(e);return It(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?(It(this),Dr(e)):Rt(this),_(F(t,!1,e._reader._forAuthorCode))}var r=X(e);return Rt(this),r},e}();function Et(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Rt(e){!1!==Ot(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Rt(e))}),(function(t){Mt(e,t)}))):e._pullAgain=!0)}function Ot(e){var t=e._controlledReadableStream;return!1!==Bt(e)&&!1!==e._started&&(!0===Mr(t)&&K(t)>0||Nt(e)>0)}function It(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ft(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(It(e),Dr(t))}function Lt(e,t){var r=e._controlledReadableStream;if(!0===Mr(r)&&K(r)>0)Y(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Mt(e,t),t}try{ce(e,t,n)}catch(t){throw Mt(e,t),t}}Rt(e)}function Mt(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(ue(e),It(e),Br(r,t))}function Nt(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Dt(e){return!0!==Ot(e)}function Bt(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function jt(e,t,r,n,a,i,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,ue(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=i,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Rt(t)}),(function(e){Mt(t,e)}))}function Ut(e,t,r,n){var a=Object.create(Tt.prototype);function i(){return f(t,"start",[a])}var o=h(t,"pull",0,[a]),s=h(t,"cancel",1,[]);jt(e,a,i,o,s,r,n)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function zt(e,t){var r,n,a,i,s,c=V(e),l=!1,u=!1,h=!1,f=S((function(e){s=e}));function d(){return!0===l||(l=!0,R(E(te(c),(function(e){if(l=!1,!0===e.done)return!1===u&&Ft(a._readableStreamController),void(!1===h&&Ft(i._readableStreamController));var t=e.value,r=t,n=t;!1===u&&Lt(a._readableStreamController,r),!1===h&&Lt(i._readableStreamController,n)})))),_(void 0)}function p(t){if(u=!0,r=t,!0===h){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function g(t){if(h=!0,n=t,!0===u){var a=o([r,n]),i=Nr(e,a);s(i)}return f}function m(){}return a=Ir(m,d,p),i=Ir(m,d,g),T(c._closedPromise,(function(e){Mt(a._readableStreamController,e),Mt(i._readableStreamController,e)})),[a,i]}var Gt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Wt=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!1===Xt(this))throw wr("view");return this._view},enumerable:!0,configurable:!0}),e.prototype.respond=function(e){if(!1===Xt(this))throw wr("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");g(this._view.buffer),gr(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!1===Xt(this))throw wr("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");g(e.buffer),mr(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===Vt(this))throw kr("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(Wt.prototype);br(r,this,t),this._byobRequest=r}return this._byobRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Vt(this))throw kr("desiredSize");return pr(this)},enumerable:!0,configurable:!0}),e.prototype.close=function(){if(!1===Vt(this))throw kr("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===Vt(this))throw kr("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");g(e.buffer),fr(this,e)},e.prototype.error=function(e){if(!1===Vt(this))throw kr("error");dr(this,e)},e.prototype[W]=function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos.peek().bytesFilled=0),ue(this);var t=this._cancelAlgorithm(e);return ur(this),t},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(e){return A(e)}return _(F(r,!1,e._reader._forAuthorCode))}var n=this._autoAllocateChunkSize;if(void 0!==n){var a=void 0;try{a=new ArrayBuffer(n)}catch(e){return A(e)}var i={buffer:a,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}var o=X(e);return Yt(this),o},e}();function Vt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Xt(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Yt(e){!1!==lr(e)&&(!0!==e._pulling?(e._pulling=!0,C(e._pullAlgorithm(),(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Yt(e))}),(function(t){dr(e,t)}))):e._pullAgain=!0)}function Kt(e){rr(e),e._pendingPullIntos=new I}function Jt(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Qt(t);"default"===t.readerType?Y(e,n,r):Ar(e,n,r)}function Qt(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,a=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),i=t.bytesFilled+a,o=i-i%r,c=a,l=!1;o>n&&(c=o-t.bytesFilled,l=!0);for(var u=e._queue;c>0;){var h=u.peek(),f=Math.min(c,h.byteLength),d=t.byteOffset+t.bytesFilled;s(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?u.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,er(e,f,t),c-=f}return l}function er(e,t,r){rr(e),r.bytesFilled+=t}function tr(e){0===e._queueTotalSize&&!0===e._closeRequested?(ur(e),Dr(e._controlledReadableByteStream)):Yt(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){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();!0===Zt(e,t)&&(cr(e),Jt(e._controlledReadableByteStream,t))}}function ar(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var a=t.constructor,i={buffer:p(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(i),_r(r);if("closed"===r._state)return _(F(new a(i.buffer,i.byteOffset,0),!0,r._reader._forAuthorCode));if(e._queueTotalSize>0){if(!0===Zt(e,i)){var o=Qt(i);return tr(e),_(F(o,!1,r._reader._forAuthorCode))}if(!0===e._closeRequested){var s=new TypeError("Insufficient bytes to fill elements in the given buffer");return dr(e,s),A(s)}}e._pendingPullIntos.push(i);var c=_r(r);return Yt(e),c}function ir(e,t){t.buffer=p(t.buffer);var r=e._controlledReadableByteStream;if(!0===Cr(r))for(;xr(r)>0;)Jt(r,cr(e))}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 a=r.byteOffset+r.bytesFilled,i=r.buffer.slice(a-n,a);$t(e,i,0,i.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,Jt(e._controlledReadableByteStream,r),nr(e)}}function sr(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ir(e,r)}else or(e,t,r);Yt(e)}function cr(e){var t=e._pendingPullIntos.shift();return rr(e),t}function lr(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===J(t)&&K(t)>0||!0===Cr(t)&&xr(t)>0||pr(e)>0)}function ur(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&&e._pendingPullIntos.peek().bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw dr(e,r),r}ur(e),Dr(t)}}function fr(e,t){var r=e._controlledReadableByteStream,n=t.buffer,a=t.byteOffset,i=t.byteLength,o=p(n);!0===J(r)?0===K(r)?$t(e,o,a,i):Y(r,new Uint8Array(o,a,i),!1):!0===Cr(r)?($t(e,o,a,i),nr(e)):$t(e,o,a,i),Yt(e)}function dr(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Kt(e),ue(e),ur(e),Br(r,t))}function pr(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function gr(e,t){if(!1===c(t=Number(t)))throw new RangeError("bytesWritten must be a finite");sr(e,t)}function mr(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 vr(e,t,r,n,a,i,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=void 0,t._queue=t._queueTotalSize=void 0,ue(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=m(i),t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=o,t._pendingPullIntos=new I,e._readableStreamController=t,C(_(r()),(function(){t._started=!0,Yt(t)}),(function(e){dr(t,e)}))}function yr(e,t,r){var n=Object.create(Ht.prototype);function a(){return f(t,"start",[n])}var i=h(t,"pull",0,[n]),o=h(t,"cancel",1,[]),s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===Gt(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");vr(e,n,a,i,o,r,s)}function br(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function wr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function kr(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 Pr(e);return r._forAuthorCode=t,r}function _r(e){return S((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function Ar(e,t,r){var n=e._reader;n._readIntoRequests.shift()._resolve(F(t,r,n._forAuthorCode))}function xr(e){return e._reader._readIntoRequests.length}function Cr(e){var t=e._reader;return void 0!==t&&!!Tr(t)}var Pr=function(){function e(e){if(!Lr(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Vt(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Mr(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");L(this,e),this._readIntoRequests=new I}return Object.defineProperty(e.prototype,"closed",{get:function(){return Tr(this)?this._closedPromise:A(Rr("closed"))},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("cancel")):M(this,e):A(Rr("cancel"))},e.prototype.read=function(e){return Tr(this)?void 0===this._ownerReadableStream?A(D("read from")):ArrayBuffer.isView(e)?(g(e.buffer),0===e.byteLength?A(new TypeError("view must have non-zero byteLength")):Er(this,e)):A(new TypeError("view must be an array buffer view")):A(Rr("read"))},e.prototype.releaseLock=function(){if(!Tr(this))throw Rr("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!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Er(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?A(r._storedError):ar(r._readableStreamController,t)}function Rr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Or=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Fr(this);var r=t.size,n=t.highWaterMark,a=e.type;if("bytes"===String(a)){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),yr(this,e,n=m(n))}else{if(void 0!==a)throw new RangeError("Invalid type is specified");var i=v(r);void 0===n&&(n=1),Ut(this,e,n=m(n),i)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!1===Lr(this))throw jr("locked");return Mr(this)},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){return!1===Lr(this)?A(jr("cancel")):!0===Mr(this)?A(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===Lr(this))throw jr("getReader");if(void 0===t)return V(this,!0);if("byob"===(t=String(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,a=void 0===t?{}:t,i=a.preventClose,o=a.preventAbort,s=a.preventCancel,c=a.signal;if(!1===Lr(this))throw jr("pipeThrough");if(!1===ve(r))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===Lr(n))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(i=Boolean(i),o=Boolean(o),s=Boolean(s),void 0!==c&&!St(c))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Mr(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===ye(r))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return R(Pt(this,r,i,o,s,c)),n},e.prototype.pipeTo=function(e,t){var r=void 0===t?{}:t,n=r.preventClose,a=r.preventAbort,i=r.preventCancel,o=r.signal;return!1===Lr(this)?A(jr("pipeTo")):!1===ve(e)?A(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(n=Boolean(n),a=Boolean(a),i=Boolean(i),void 0===o||St(o)?!0===Mr(this)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===ye(e)?A(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Pt(this,e,n,a,i,o):A(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},e.prototype.tee=function(){if(!1===Lr(this))throw jr("tee");return o(zt(this))},e.prototype.getIterator=function(e){var t=(void 0===e?{}:e).preventCancel,r=void 0!==t&&t;if(!1===Lr(this))throw jr("getIterator");return ae(this,r)},e}();function Ir(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var i=Object.create(Or.prototype);return Fr(i),jt(i,Object.create(Tt.prototype),e,t,r,n,a),i}function Fr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Lr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function Mr(e){return void 0!==e._reader}function Nr(e,t){return e._disturbed=!0,"closed"===e._state?_(void 0):"errored"===e._state?A(e._storedError):(Dr(e),E(e._readableStreamController[W](t),r))}function Dr(e){e._state="closed";var t=e._reader;void 0!==t&&(ee(t)&&(t._readRequests.forEach((function(e){e._resolve(F(void 0,!0,t._forAuthorCode))})),t._readRequests=new I),G(t))}function Br(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 I):(r._readIntoRequests.forEach((function(e){e._reject(t)})),r._readIntoRequests=new I),q(r,t))}function jr(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}"symbol"==typeof t.asyncIterator&&Object.defineProperty(Or.prototype,t.asyncIterator,{value:Or.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var Ur=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(e){return e.byteLength},e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}return e.prototype.size=function(){return 1},e}(),zr=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={});var n=t.size,a=t.highWaterMark,i=r.size,o=r.highWaterMark;if(void 0!==e.writableType)throw new RangeError("Invalid writable type specified");var s=v(n);if(void 0===a&&(a=1),a=m(a),void 0!==e.readableType)throw new RangeError("Invalid readable type specified");var c,l=v(i);void 0===o&&(o=0),o=m(o),Gr(this,S((function(e){c=e})),a,s,o,l),Qr(this,e);var u=f(e,"start",[this._transformStreamController]);c(u)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!1===Wr(this))throw ln("readable");return this._readable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!1===Wr(this))throw ln("writable");return this._writable},enumerable:!0,configurable:!0}),e}();function Gr(e,t,r,n,a,i){function o(){return t}function s(t){return nn(e,t)}function c(t){return an(e,t)}function l(){return on(e)}function u(){return sn(e)}function h(t){return Vr(e,t),_(void 0)}e._writable=ge(o,s,l,c,r,n),e._readable=Ir(o,u,h,a,i),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Xr(e,!0),e._transformStreamController=void 0}function Wr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Hr(e,t){Mt(e._readable._readableStreamController,t),Vr(e,t)}function Vr(e,t){$r(e._transformStreamController),tt(e._writable._writableStreamController,t),!0===e._backpressure&&Xr(e,!1)}function Xr(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=S((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}var Yr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!1===Kr(this))throw cn("desiredSize");return Nt(this._controlledTransformStream._readable._readableStreamController)},enumerable:!0,configurable:!0}),e.prototype.enqueue=function(e){if(!1===Kr(this))throw cn("enqueue");Zr(this,e)},e.prototype.error=function(e){if(!1===Kr(this))throw cn("error");en(this,e)},e.prototype.terminate=function(){if(!1===Kr(this))throw cn("terminate");rn(this)},e}();function Kr(e){return!!i(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Jr(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function Qr(e,t){var r=Object.create(Yr.prototype),n=function(e){try{return Zr(r,e),_(void 0)}catch(e){return A(e)}},a=t.transform;if(void 0!==a){if("function"!=typeof a)throw new TypeError("transform is not a method");n=function(e){return d(a,t,[e,r])}}var i=h(t,"flush",0,[r]);Jr(e,r,n,i)}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===Bt(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Lt(n,t)}catch(e){throw Vr(r,e),r._readable._storedError}Dt(n)!==r._backpressure&&Xr(r,!0)}function en(e,t){Hr(e._controlledTransformStream,t)}function tn(e,t){return E(e._transformAlgorithm(t),void 0,(function(t){throw Hr(e._controlledTransformStream,t),t}))}function rn(e){var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===Bt(r)&&Ft(r),Vr(t,new TypeError("TransformStream terminated"))}function nn(e,t){var r=e._transformStreamController;return!0===e._backpressure?E(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return tn(r,t)})):tn(r,t)}function an(e,t){return Hr(e,t),_(void 0)}function on(e){var t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return $r(r),E(n,(function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===Bt(e)&&Ft(e)}),(function(r){throw Hr(e,r),t._storedError}))}function sn(e){return Xr(e,!1),e._backpressureChangePromise}function cn(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ln(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=Ur,e.CountQueuingStrategy=qr,e.ReadableStream=Or,e.TransformStream=zr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){r(145),r(114),r(77),r(116);var n=r(43);e.exports=n.Map},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){var n=r(10),a=r(11),i=r(52),o=r(29),s=r(147),c=r(124),l=r(123),u=r(22),h=r(14),f=r(97),d=r(85),p=r(149);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),v=g?"set":"add",y=a[e],b=y&&y.prototype,w=y,k={},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!(m&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(i(e,"function"!=typeof y||!(m||b.forEach&&!h((function(){(new y).entries().next()})))))w=r.getConstructor(t,e,g,v),s.REQUIRED=!0;else if(i(e,!0)){var _=new w,A=_[v](m?{}:-0,1)!=_,x=h((function(){_.has(1)})),C=f((function(e){new y(e)})),P=!m&&h((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));C||((w=t((function(t,r){l(t,w,e);var n=p(new y,t,w);return null!=r&&c(r,n[v],n,g),n}))).prototype=b,b.constructor=w),(x||P)&&(S("delete"),S("has"),g&&S("get")),(P||A)&&S(v),m&&b.clear&&delete b.clear}return k[e]=w,n({global:!0,forced:w!=y},k),d(w,e),m||r.setStrong(w,e,g),w}},function(e,t,r){var n=r(39),a=r(22),i=r(23),o=r(27).f,s=r(38),c=r(148),l=s("meta"),u=0,h=Object.isExtensible||function(){return!0},f=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,l)){if(!h(e))return"F";if(!t)return"E";f(e)}return e[l].objectID},getWeakData:function(e,t){if(!i(e,l)){if(!h(e))return!0;if(!t)return!1;f(e)}return e[l].weakData},onFreeze:function(e){return c&&d.REQUIRED&&h(e)&&!i(e,l)&&f(e),e}};n[l]=!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),a=r(87);e.exports=function(e,t,r){var i,o;return a&&"function"==typeof(i=t.constructor)&&i!==r&&n(o=i.prototype)&&o!==r.prototype&&a(e,o),e}},function(e,t,r){var n=r(27).f,a=r(71),i=r(121),o=r(62),s=r(123),c=r(124),l=r(79),u=r(122),h=r(13),f=r(147).fastKey,d=r(33),p=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,l){var u=e((function(e,n){s(e,u,t),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[l],e,r)})),d=g(t),m=function(e,t,r){var n,a,i=d(e),o=v(e,t);return o?o.value=r:(i.last=o={index:a=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=o),n&&(n.next=o),h?i.size++:e.size++,"F"!==a&&(i.index[a]=o)),e},v=function(e,t){var r,n=d(e),a=f(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(u.prototype,{clear:function(){for(var e=d(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=d(t),n=v(t,e);if(n){var a=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=a),a&&(a.previous=i),r.first==n&&(r.first=a),r.last==n&&(r.last=i),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=d(this),n=o(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),i(u.prototype,r?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(u.prototype,"size",{get:function(){return d(this).size}}),u},setStrong:function(e,t,r){var n=t+" Iterator",a=g(t),i=g(n);l(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;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),u(t)}}},function(e,t,r){r(152),r(114),r(77),r(116);var n=r(43);e.exports=n.Set},function(e,t,r){var n=r(146),a=r(150);e.exports=n("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},function(e,t,r){r(114),r(154),r(116);var n=r(43);e.exports=n.WeakMap},function(e,t,r){var n,a=r(11),i=r(121),o=r(147),s=r(146),c=r(155),l=r(22),u=r(33).enforce,h=r(34),f=!a.ActiveXObject&&"ActiveXObject"in a,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",p,c);if(h&&f){n=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,w=m.set;i(m,{delete:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new n),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var r=u(this);r.frozen||(r.frozen=new n),y.call(this,e)?w.call(this,e,t):r.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,r){var n=r(121),a=r(147).getWeakData,i=r(28),o=r(22),s=r(123),c=r(124),l=r(156),u=r(23),h=r(33),f=h.set,d=h.getterFor,p=l.find,g=l.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.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=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,l){var h=e((function(e,n){s(e,h,t),f(e,{type:t,id:m++,frozen:void 0}),null!=n&&c(n,e[l],e,r)})),p=d(t),g=function(e,t,r){var n=p(e),o=a(i(t),!0);return!0===o?v(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=a(e);return!0===r?v(t).delete(e):r&&u(r,t.id)&&delete r[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var r=a(e);return!0===r?v(t).has(e):r&&u(r,t.id)}}),n(h.prototype,r?{get:function(e){var t=p(this);if(o(e)){var r=a(e);return!0===r?v(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},function(e,t,r){var n=r(62),a=r(18),i=r(83),o=r(47),s=r(157),c=[].push,l=function(e){var t=1==e,r=2==e,l=3==e,u=4==e,h=6==e,f=5==e||h;return function(d,p,g,m){for(var v,y,b=i(d),w=a(b),k=n(p,g,3),S=o(w.length),_=0,A=m||s,x=t?A(d,S):r?A(d,0):void 0;S>_;_++)if((f||_ in w)&&(y=k(v=w[_],_,b),e))if(t)x[_]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:c.call(x,v)}else if(u)return!1;return h?-1:l||u?u:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,r){var n=r(22),a=r(158),i=r(57)("species");e.exports=function(e,t){var r;return a(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!a(r.prototype)?n(r)&&null===(r=r[i])&&(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(114),r(160),r(116);var n=r(43);e.exports=n.WeakSet},function(e,t,r){r(146)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(155))},function(e,t,r){r(162);var n=r(61);e.exports=n("String","codePointAt")},function(e,t,r){var n=r(10),a=r(78).codeAt;n({target:"String",proto:!0},{codePointAt:function(e){return a(this,e)}})},function(e,t,r){r(164);var n=r(43);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(10),a=r(49),i=String.fromCharCode,o=String.fromCodePoint;n({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(166),r(114),r(168),r(172),r(173),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);var n=r(43);e.exports=n.Symbol},function(e,t,r){var n=r(10),a=r(14),i=r(158),o=r(22),s=r(83),c=r(47),l=r(93),u=r(157),h=r(167),f=r(57),d=r(133),p=f("isConcatSpreadable"),g=9007199254740991,m="Maximum allowed index exceeded",v=d>=51||!a((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),y=h("concat"),b=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,r,n,a,i,o=s(this),h=u(o,0),f=0;for(t=-1,n=arguments.length;tg)throw TypeError(m);for(r=0;r=g)throw TypeError(m);l(h,f++,i)}return h.length=f,h}})},function(e,t,r){var n=r(14),a=r(57),i=r(133),o=a("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,r){var n=r(10),a=r(11),i=r(42),o=r(37),s=r(13),c=r(58),l=r(59),u=r(14),h=r(23),f=r(158),d=r(22),p=r(28),g=r(83),m=r(17),v=r(21),y=r(16),b=r(71),w=r(73),k=r(44),S=r(169),_=r(51),A=r(12),x=r(27),C=r(15),P=r(26),T=r(29),E=r(36),R=r(35),O=r(39),I=r(38),F=r(57),L=r(170),M=r(171),N=r(85),D=r(33),B=r(156).forEach,j=R("hidden"),U="Symbol",q="prototype",z=F("toPrimitive"),G=D.set,W=D.getterFor(U),H=Object[q],V=a.Symbol,X=i("JSON","stringify"),Y=A.f,K=x.f,J=S.f,Q=C.f,$=E("symbols"),Z=E("op-symbols"),ee=E("string-to-symbol-registry"),te=E("symbol-to-string-registry"),re=E("wks"),ne=a.QObject,ae=!ne||!ne[q]||!ne[q].findChild,ie=s&&u((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Y(H,t);n&&delete H[t],K(e,t,r),n&&e!==H&&K(H,t,n)}:K,oe=function(e,t){var r=$[e]=b(V[q]);return G(r,{type:U,tag:e,description:t}),s||(r.description=t),r},se=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof V},ce=function(e,t,r){e===H&&ce(Z,t,r),p(e);var n=v(t,!0);return p(r),h($,n)?(r.enumerable?(h(e,j)&&e[j][n]&&(e[j][n]=!1),r=b(r,{enumerable:y(0,!1)})):(h(e,j)||K(e,j,y(1,{})),e[j][n]=!0),ie(e,n,r)):K(e,n,r)},le=function(e,t){p(e);var r=m(t),n=w(r).concat(de(r));return B(n,(function(t){s&&!ue.call(r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=v(e,!0),r=Q.call(this,t);return!(this===H&&h($,t)&&!h(Z,t))&&(!(r||!h(this,t)||!h($,t)||h(this,j)&&this[j][t])||r)},he=function(e,t){var r=m(e),n=v(t,!0);if(r!==H||!h($,n)||h(Z,n)){var a=Y(r,n);return!a||!h($,n)||h(r,j)&&r[j][n]||(a.enumerable=!0),a}},fe=function(e){var t=J(m(e)),r=[];return B(t,(function(e){h($,e)||h(O,e)||r.push(e)})),r},de=function(e){var t=e===H,r=J(t?Z:m(e)),n=[];return B(r,(function(e){!h($,e)||t&&!h(H,e)||n.push($[e])})),n};c||(V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),r=function(e){this===H&&r.call(Z,e),h(this,j)&&h(this[j],t)&&(this[j][t]=!1),ie(this,t,y(1,e))};return s&&ae&&ie(H,t,{configurable:!0,set:r}),oe(t,e)},T(V[q],"toString",(function(){return W(this).tag})),T(V,"withoutSetter",(function(e){return oe(I(e),e)})),C.f=ue,x.f=ce,A.f=he,k.f=S.f=fe,_.f=de,L.f=function(e){return oe(F(e),e)},s&&(K(V[q],"description",{configurable:!0,get:function(){return W(this).description}}),o||T(H,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:V}),B(w(re),(function(e){M(e)})),n({target:U,stat:!0,forced:!c},{for:function(e){var t=String(e);if(h(ee,t))return ee[t];var r=V(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(){ae=!0},useSimple:function(){ae=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?b(e):le(b(e),t)},defineProperty:ce,defineProperties:le,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:de}),n({target:"Object",stat:!0,forced:u((function(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(g(e))}}),X&&n({target:"JSON",stat:!0,forced:!c||u((function(){var e=V();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,r){for(var n,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);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}),a[1]=t,X.apply(null,a)}}),V[q][z]||P(V[q],z,V[q].valueOf),N(V,U),O[j]=!0},function(e,t,r){var n=r(17),a=r(44).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(n(e))}},function(e,t,r){var n=r(57);t.f=n},function(e,t,r){var n=r(43),a=r(23),i=r(170),o=r(27).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});a(t,e)||o(t,e,{value:i.f(e)})}},function(e,t,r){r(171)("asyncIterator")},function(e,t,r){var n=r(10),a=r(13),i=r(11),o=r(23),s=r(22),c=r(27).f,l=r(40),u=i.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new u(e):void 0===e?u():u(e);return""===e&&(h[t]=!0),t};l(f,u);var d=f.prototype=u.prototype;d.constructor=f;var p=d.toString,g="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(o(h,e))return"";var r=g?t.slice(7,-1):t.replace(m,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:f})}},function(e,t,r){r(171)("hasInstance")},function(e,t,r){r(171)("isConcatSpreadable")},function(e,t,r){r(171)("iterator")},function(e,t,r){r(171)("match")},function(e,t,r){r(171)("matchAll")},function(e,t,r){r(171)("replace")},function(e,t,r){r(171)("search")},function(e,t,r){r(171)("species")},function(e,t,r){r(171)("split")},function(e,t,r){r(171)("toPrimitive")},function(e,t,r){r(171)("toStringTag")},function(e,t,r){r(171)("unscopables")},function(e,t,r){r(85)(Math,"Math",!0)},function(e,t,r){var n=r(11);r(85)(n.JSON,"JSON",!0)},function(e,t,r){r(189);var n=r(61);e.exports=n("String","padStart")},function(e,t,r){var n=r(10),a=r(190).start;n({target:"String",proto:!0,forced:r(192)},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(47),a=r(191),i=r(20),o=Math.ceil,s=function(e){return function(t,r,s){var c,l,u=String(i(t)),h=u.length,f=void 0===s?" ":String(s),d=n(r);return d<=h||""==f?u:(c=d-h,(l=a.call(f,o(c/f.length))).length>c&&(l=l.slice(0,c)),e?u+l:l+u)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,r){var n=r(48),a=r(20);e.exports="".repeat||function(e){var t=String(a(this)),r="",i=n(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(r+=t);return r}},function(e,t,r){var n=r(127);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(194);var n=r(61);e.exports=n("String","padEnd")},function(e,t,r){var n=r(10),a=r(190).end;n({target:"String",proto:!0,forced:r(192)},{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(196);var n=r(43);e.exports=n.Object.values},function(e,t,r){var n=r(10),a=r(197).values;n({target:"Object",stat:!0},{values:function(e){return a(e)}})},function(e,t,r){var n=r(13),a=r(73),i=r(17),o=r(15).f,s=function(e){return function(t){for(var r,s=i(t),c=a(s),l=c.length,u=0,h=[];l>u;)r=c[u++],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){Object.defineProperty(t,"__esModule",{value:!0}),t.clearPrimitiveCaches=function(){l._clearCache(),c._clearCache(),h._clearCache()},t.isEOF=function(e){return e===s},t.isCmd=function(e,t){return e instanceof l&&(void 0===t||e.cmd===t)},t.isDict=g,t.isName=p,t.isRef=function(e){return e instanceof h},t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen},t.isStream=function(e){return"object"===i(e)&&null!==e&&void 0!==e.getBytes},t.RefSetCache=t.RefSet=t.Ref=t.Name=t.Dict=t.Cmd=t.EOF=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n};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 o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}r(5);var s={};t.EOF=s;var c=function(){var e=Object.create(null);function t(e){this.name=e}return t.prototype={},t.get=function(r){var n=e[r];return n||(e[r]=new t(r))},t._clearCache=function(){e=Object.create(null)},t}();t.Name=c;var l=function(){var e=Object.create(null);function t(e){this.cmd=e}return t.prototype={},t.get=function(r){var n=e[r];return n||(e[r]=new t(r))},t._clearCache=function(){e=Object.create(null)},t}();t.Cmd=l;var u=function(){var e=function(){return e};function t(t){this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=e}return t.prototype={assignXref:function(e){this.xref=e},get:function(e,t,r){var n=this._map[e];return void 0===n&&void 0!==t&&void 0===(n=this._map[t])&&void 0!==r&&(n=this._map[r]),n instanceof h&&this.xref?this.xref.fetch(n,this.suppressEncryption):n},getAsync:function(e,t,r){var n,i=this;return(n=a.default.mark((function n(){var o;return a.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(void 0===(o=i._map[e])&&void 0!==t&&void 0===(o=i._map[t])&&void 0!==r&&(o=i._map[r]),!(o instanceof h&&i.xref)){n.next=4;break}return n.abrupt("return",i.xref.fetchAsync(o,i.suppressEncryption));case 4:return n.abrupt("return",o);case 5:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,a){var i=n.apply(e,t);function s(e){o(i,r,a,s,c,"next",e)}function c(e){o(i,r,a,s,c,"throw",e)}s(void 0)}))})()},getArray:function(e,t,r){var n=this.get(e,t,r);if(!Array.isArray(n)||!this.xref)return n;for(var a=0,i=(n=n.slice()).length;a0&&void 0!==arguments[0]&&arguments[0];return this.pdfDocument.cleanup(e)}},{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,i.unreachable)("Abstract method `ensure` called");case 1:case"end":return e.stop()}}),e)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){(0,i.unreachable)("Abstract method `requestRange` called")}},{key:"requestLoadedStream",value:function(){(0,i.unreachable)("Abstract method `requestLoadedStream` called")}},{key:"sendProgressiveData",value:function(e){(0,i.unreachable)("Abstract method `sendProgressiveData` called")}},{key:"updatePassword",value:function(e){this._password=e}},{key:"terminate",value:function(e){(0,i.unreachable)("Abstract method `terminate` called")}},{key:"docId",get:function(){return this._docId}},{key:"password",get:function(){return this._password}},{key:"docBaseUrl",get:function(){var e=null;if(this._docBaseUrl){var t=(0,i.createValidAbsoluteUrl)(this._docBaseUrl);t?e=t.href:(0,i.warn)('Invalid absolute docBaseUrl: "'.concat(this._docBaseUrl,'".'))}return(0,i.shadow)(this,"docBaseUrl",e)}}]),e}(),S=function(e){h(n,e);var t,r=d(n);function n(e,t,a,i,o){var s;y(this,n),(s=r.call(this))._docId=e,s._password=a,s._docBaseUrl=o,s.evaluatorOptions=i;var u=new l.Stream(t);return s.pdfDocument=new c.PDFDocument(p(s),u),s._loadedStreamPromise=Promise.resolve(u),s}return w(n,[{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){var i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(i=t[r])){e.next=3;break}return e.abrupt("return",i.apply(t,n));case 3:return e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return Promise.resolve()}},{key:"requestLoadedStream",value:function(){}},{key:"onLoadedStream",value:function(){return this._loadedStreamPromise}},{key:"terminate",value:function(e){}}]),n}(k);t.LocalPdfManager=S;var _=function(e){h(n,e);var t,r=d(n);function n(e,t,a,i,s){var l;return y(this,n),(l=r.call(this))._docId=e,l._password=a.password,l._docBaseUrl=s,l.msgHandler=a.msgHandler,l.evaluatorOptions=i,l.streamManager=new o.ChunkedStreamManager(t,{msgHandler:a.msgHandler,length:a.length,disableAutoFetch:a.disableAutoFetch,rangeChunkSize:a.rangeChunkSize}),l.pdfDocument=new c.PDFDocument(p(l),l.streamManager.getStream()),l}return w(n,[{key:"ensure",value:(t=v(a.default.mark((function e(t,r,n){var i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"!=typeof(i=t[r])){e.next=4;break}return e.abrupt("return",i.apply(t,n));case 4:return e.abrupt("return",i);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof s.MissingDataException){e.next=11;break}throw e.t0;case 11:return e.next=13,this.requestRange(e.t0.begin,e.t0.end);case 13:return e.abrupt("return",this.ensure(t,r,n));case 14:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,r,n){return t.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return this.streamManager.requestRange(e,t)}},{key:"requestLoadedStream",value:function(){this.streamManager.requestAllChunks()}},{key:"sendProgressiveData",value:function(e){this.streamManager.onReceiveData({chunk:e})}},{key:"onLoadedStream",value:function(){return this.streamManager.onLoadedStream()}},{key:"terminate",value:function(e){this.streamManager.abort(e)}}]),n}(k);t.NetworkPdfManager=_},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedStreamManager=t.ChunkedStream=void 0;var n=r(5),a=r(201);function i(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(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}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,s=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=this.end?this.numChunks:Math.floor(t/this.chunkSize),a=r;a=t||t<=this.progressiveDataLength))for(var r=this.chunkSize,n=Math.floor(e/r),i=Math.floor((t-1)/r)+1,o=n;o=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){a>this.progressiveDataLength&&this.ensureRange(n,a);var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),o>this.progressiveDataLength&&this.ensureRange(n,o),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"skip",value:function(e){e||(e=1),this.pos+=e}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,t,r){function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[],a=t;a0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,a=this.getBeginChunk(n.begin),o=this.getEndChunk(n.end),s=a;s=0&&n+1!==o&&(t.push({beginChunk:r,endChunk:n+1}),r=o),a+1===e.length&&t.push({beginChunk:r,endChunk:o+1}),n=o}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,a=r?this.progressiveDataLength:e.begin,o=a+t.byteLength,s=Math.floor(a/this.chunkSize),c=o100){(0,n.warn)('getInheritableProperty: maximum loop count exceeded for "'.concat(a,'"'));break}r=r.get("Parent")}return t},t.toRomanNumerals=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,n.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,a=[];e>=1e3;)e-=1e3,a.push("M");r=e/100|0,e%=100,a.push(d[r]),r=e/10|0,e%=10,a.push(d[10+r]),a.push(d[20+e]);var i=a.join("");return t?i.toLowerCase():i},t.log2=function(e){return e<=0?0:Math.ceil(Math.log2(e))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var n=r(5);function a(e){return a="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},a(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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&&s(e,t)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var u=function(e){o(r,e);var t=c(r);function r(e,n){var a;return i(this,r),(a=t.call(this,"Missing data [".concat(e,", ").concat(n,")"))).begin=e,a.end=n,a}return r}(n.BaseException);t.MissingDataException=u;var h=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(n.BaseException);t.XRefEntryException=h;var f=function(e){o(r,e);var t=c(r);function r(){return i(this,r),t.apply(this,arguments)}return r}(n.BaseException);t.XRefParseException=f;var d=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocument=t.Page=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(203),s=r(198),c=r(201),l=r(205),u=r(218),h=r(215),f=r(204),d=r(219),p=r(220),g=r(234);function m(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){m(i,n,a,o,s,"next",e)}function s(e){m(i,n,a,o,s,"throw",e)}o(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||w(e,t)||function(){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 b(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(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],r=(0,c.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&(0,s.isDict)(r[0])?s.Dict.merge(this.xref,r):r[0]:r}},{key:"_getBoundingBox",value:function(e){var t=this._getInheritableProperty(e,!0);if(Array.isArray(t)&&4===t.length){if(t[2]-t[0]!=0&&t[3]-t[1]!=0)return t;(0,i.warn)("Empty /".concat(e," entry."))}return null}},{key:"getContentStream",value:function(){var e,t=this.content;if(Array.isArray(t)){var r,n=this.xref,a=[],i=b(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;a.push(n.fetchIfRef(o))}}catch(e){i.e(e)}finally{i.f()}e=new l.StreamsSequenceStream(a)}else e=(0,s.isStream)(t)?t:new l.NullStream;return e}},{key:"loadResources",value:function(e){var t=this;return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((function(){return new o.ObjectLoader(t.resources,e,t.xref).load()}))}},{key:"getOperatorList",value:function(e){var t=this,r=e.handler,n=e.sink,a=e.task,o=e.intent,s=e.renderInteractiveForms,c=this.pdfManager.ensure(this,"getContentStream"),l=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),u=new p.PartialEvaluator({xref:this.xref,handler:r,pageIndex:this.pageIndex,idFactory:this.idFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,globalImageCache:this.globalImageCache,options:this.evaluatorOptions,pdfFunctionFactory:this.pdfFunctionFactory}),h=Promise.all([c,l]).then((function(e){var i=y(e,1)[0],s=new d.OperatorList(o,n,t.pageIndex);return r.send("StartRenderPage",{transparency:u.hasBlendModes(t.resources),pageIndex:t.pageIndex,intent:o}),u.getOperatorList({stream:i,task:a,resources:t.resources,operatorList:s}).then((function(){return s}))}));return Promise.all([h,this._parsedAnnotations]).then((function(e){var t=y(e,2),r=t[0],n=t[1];if(0===n.length)return r.flush(!0),{length:r.totalLength};var c,l=[],h=b(n);try{for(h.s();!(c=h.n()).done;){var f=c.value;C(f,o)&&l.push(f.getOperatorList(u,a,s).catch((function(e){return(0,i.warn)("getOperatorList - ignoring annotation data during "+'"'.concat(a.name,'" task: "').concat(e,'".')),null})))}}catch(e){h.e(e)}finally{h.f()}return Promise.all(l).then((function(e){r.addOp(i.OPS.beginAnnotations,[]);var t,n=b(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.addOpList(a)}}catch(e){n.e(e)}finally{n.f()}return r.addOp(i.OPS.endAnnotations,[]),r.flush(!0),{length:r.totalLength}}))}))}},{key:"extractTextContent",value:function(e){var t=this,r=e.handler,n=e.task,a=e.normalizeWhitespace,i=e.sink,o=e.combineTextItems,s=this.pdfManager.ensure(this,"getContentStream"),c=this.loadResources(["ExtGState","XObject","Font"]);return Promise.all([s,c]).then((function(e){var s=y(e,1)[0];return new p.PartialEvaluator({xref:t.xref,handler:r,pageIndex:t.pageIndex,idFactory:t.idFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,globalImageCache:t.globalImageCache,options:t.evaluatorOptions,pdfFunctionFactory:t.pdfFunctionFactory}).getTextContent({stream:s,task:n,resources:t.resources,normalizeWhitespace:a,combineTextItems:o,sink:i})}))}},{key:"getAnnotationsData",value:function(e){return this._parsedAnnotations.then((function(t){for(var r=[],n=0,a=t.length;n=360?e%=360:e<0&&(e=(e%360+360)%360),(0,i.shadow)(this,"rotate",e)}},{key:"annotations",get:function(){return(0,i.shadow)(this,"annotations",this._getInheritableProperty("Annots")||[])}},{key:"_parsedAnnotations",get:function(){var e=this,t=this.pdfManager.ensure(this,"annotations").then((function(){var t,r=[],n=b(e.annotations);try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(u.AnnotationFactory.create(e.xref,a,e.pdfManager,e.idFactory).catch((function(e){return(0,i.warn)('_parsedAnnotations: "'.concat(e,'".')),null})))}}catch(e){n.e(e)}finally{n.f()}return Promise.all(r).then((function(e){return e.filter((function(e){return!!e}))}))}));return(0,i.shadow)(this,"_parsedAnnotations",t)}}]),e}();t.Page=P;var T=new Uint8Array([37,80,68,70,45]),E=new Uint8Array([115,116,97,114,116,120,114,101,102]),R=new Uint8Array([101,110,100,111,98,106]),O=/^[1-9]\.[0-9]$/;function I(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1024,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.length,i=e.peekBytes(r),o=i.length-a;if(o<=0)return!1;if(n)for(var s=a-1,c=i.length-1;c>=s;){for(var l=0;l=a)return e.pos+=c-s,!0;c--}else for(var u=0;u<=o;){for(var h=0;h=a)return e.pos+=u,!0;u++}return!1}var F=function(){function e(t,r){var n;if(S(this,e),(0,s.isStream)(r))n=r;else{if(!(0,i.isArrayBuffer)(r))throw new Error("PDFDocument: Unknown argument type");n=new l.Stream(r)}if(n.length<=0)throw new i.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=n,this.xref=new o.XRef(n,t),this.pdfFunctionFactory=new g.PDFFunctionFactory({xref:this.xref,isEvalSupported:t.evaluatorOptions.isEvalSupported}),this._pagePromises=[]}var t;return A(e,[{key:"parse",value:function(e){this.setup(e);var t=this.catalog.catDict.get("Version");(0,s.isName)(t)&&(this.pdfFormatVersion=t.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var r=this.acroForm.get("Fields");Array.isArray(r)&&0!==r.length||this.xfa||(this.acroForm=null)}}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("Cannot fetch AcroForm entry; assuming no AcroForms are present"),this.acroForm=null}try{var n=this.catalog.catDict.get("Collection");(0,s.isDict)(n)&&n.getKeys().length>0&&(this.collection=n)}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("Cannot fetch Collection dictionary.")}}},{key:"checkHeader",value:function(){var e=this.stream;if(e.reset(),I(e,T)){e.moveStart();for(var t,r="";(t=e.getByte())>32&&!(r.length>=12);)r+=String.fromCharCode(t);this.pdfFormatVersion||(this.pdfFormatVersion=r.substring(5))}}},{key:"parseStartXRef",value:function(){this.xref.setStartXRef(this.startXRef)}},{key:"setup",value:function(e){this.xref.parse(e),this.catalog=new o.Catalog(this.pdfManager,this.xref)}},{key:"_getLinearizationPage",value:function(e){var t=this.catalog,r=this.linearization,n=s.Ref.get(r.objectNumberFirst,0);return this.xref.fetchAsync(n).then((function(e){if((0,s.isDict)(e,"Page")||(0,s.isDict)(e)&&!e.has("Type")&&e.has("Contents"))return n&&!t.pageKidsCountCache.has(n)&&t.pageKidsCountCache.put(n,1),[e,n];throw new i.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")})).catch((function(r){return(0,i.info)(r),t.getPageDict(e)}))}},{key:"getPage",value:function(e){var t=this;if(void 0!==this._pagePromises[e])return this._pagePromises[e];var r=this.catalog,n=this.linearization,a=n&&n.pageFirst===e?this._getLinearizationPage(e):r.getPageDict(e);return this._pagePromises[e]=a.then((function(n){var a=y(n,2),i=a[0],o=a[1];return new P({pdfManager:t.pdfManager,xref:t.xref,pageIndex:e,pageDict:i,ref:o,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,globalImageCache:r.globalImageCache,pdfFunctionFactory:t.pdfFunctionFactory})}))}},{key:"checkFirstPage",value:function(){var e=this;return this.getPage(0).catch(function(){var t=v(a.default.mark((function t(r){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r instanceof c.XRefEntryException)){t.next=5;break}return e._pagePromises.length=0,t.next=4,e.cleanup();case 4:throw new c.XRefParseException;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"fontFallback",value:function(e,t){return this.catalog.fontFallback(e,t)}},{key:"cleanup",value:(t=v(a.default.mark((function e(){var t,r=arguments;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.abrupt("return",this.catalog?this.catalog.cleanup(t):(0,s.clearPrimitiveCaches)());case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"linearization",get:function(){var e=null;try{e=f.Linearization.create(this.stream)}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)(e)}return(0,i.shadow)(this,"linearization",e)}},{key:"startXRef",get:function(){var e=this.stream,t=0;if(this.linearization)e.reset(),I(e,R)&&(t=e.pos+6-e.start);else{for(var r=E.length,n=!1,a=e.end;!n&&a>0;)(a-=1024-r)<0&&(a=0),e.pos=a,n=I(e,E,1024,!0);if(n){var o;e.skip(9);do{o=e.getByte()}while((0,c.isWhiteSpace)(o));for(var s="";o>=32&&o<=57;)s+=String.fromCharCode(o),o=e.getByte();t=parseInt(s,10),isNaN(t)&&(t=0)}}return(0,i.shadow)(this,"startXRef",t)}},{key:"numPages",get:function(){var e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,i.shadow)(this,"numPages",t)}},{key:"documentInfo",get:function(){var e={Title:i.isString,Author:i.isString,Subject:i.isString,Keywords:i.isString,Creator:i.isString,Producer:i.isString,CreationDate:i.isString,ModDate:i.isString,Trapped:s.isName},t=this.pdfFormatVersion;"string"==typeof t&&O.test(t)||((0,i.warn)("Invalid PDF header version number: ".concat(t)),t=null);var r,n={PDFFormatVersion:t,IsLinearized:!!this.linearization,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa,IsCollectionPresent:!!this.collection};try{r=this.xref.trailer.get("Info")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.info)("The document information dictionary is invalid.")}if((0,s.isDict)(r)){var a,o=b(r.getKeys());try{for(o.s();!(a=o.n()).done;){var l=a.value,u=r.get(l);if(e[l])e[l](u)?n[l]="string"!=typeof u?u:(0,i.stringToPDFString)(u):(0,i.info)('Bad value in document info for "'.concat(l,'".'));else if("string"==typeof l){var h=void 0;if((0,i.isString)(u))h=(0,i.stringToPDFString)(u);else{if(!((0,s.isName)(u)||(0,i.isNum)(u)||(0,i.isBool)(u))){(0,i.info)('Unsupported value in document info for (custom) "'.concat(l,'".'));continue}h=u}n.Custom||(n.Custom=Object.create(null)),n.Custom[l]=h}}}catch(e){o.e(e)}finally{o.f()}}return(0,i.shadow)(this,"documentInfo",n)}},{key:"fingerprint",get:function(){for(var e,t=this.xref.trailer.get("ID"),r=[],n=0,a=(e=Array.isArray(t)&&t[0]&&(0,i.isString)(t[0])&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==t[0]?(0,i.stringToBytes)(t[0]):(0,h.calculateMD5)(this.stream.getByteRange(0,1024),0,1024)).length;n=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function k(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;){var l=n.shift(),h=s.fetchIfRef(l.obj);if(null!==h){if(!h.has("Title"))throw new i.FormatError("Invalid outline item encountered.");var f={url:null,dest:null};e.parseDestDictionary({destDict:h,resultObj:f,docBaseUrl:this.pdfManager.docBaseUrl});var d=h.get("Title"),p=h.get("F")||0,g=h.getArray("C"),m=h.get("Count"),v=c;!Array.isArray(g)||3!==g.length||0===g[0]&&0===g[1]&&0===g[2]||(v=u.ColorSpace.singletons.rgb.getRgb(g,0));var y={dest:f.dest,url:f.url,unsafeUrl:f.unsafeUrl,newWindow:f.newWindow,title:(0,i.stringToPDFString)(d),color:v,count:Number.isInteger(m)?m:void 0,bold:!!(2&p),italic:!!(1&p),items:[]};l.parent.items.push(y),t=h.getRaw("First"),(0,o.isRef)(t)&&!a.has(t)&&(n.push({obj:t,parent:y}),a.put(t)),t=h.getRaw("Next"),(0,o.isRef)(t)&&!a.has(t)&&(n.push({obj:t,parent:l.parent}),a.put(t))}}return r.items.length>0?r.items:null}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(0,o.isDict)(e))return null;var t=e.get("P");if(!(0,i.isNum)(t))return null;t+=Math.pow(2,32);var r=[];for(var n in i.PermissionFlag){var a=i.PermissionFlag[n];t&a&&r.push(a)}return r}},{key:"getDestination",value:function(e){var t=this._readDests();return t instanceof R||t instanceof o.Dict?C(t.get(e)||null):null}},{key:"_readDests",value:function(){var e=this.catDict.get("Names");return e&&e.has("Dests")?new R(e.getRaw("Dests"),this.xref):this.catDict.has("Dests")?this.catDict.get("Dests"):void 0}},{key:"_readPageLabels",value:function(){var e=this.catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,n="",a=new O(e,this.xref).getAll(),s="",l=1,u=0,h=this.numPages;u=1))throw new i.FormatError("Invalid start in PageLabel dictionary.");l=g}else l=1}switch(r){case"D":s=l;break;case"R":case"r":s=(0,c.toRomanNumerals)(l,"r"===r);break;case"A":case"a":for(var m="a"===r?97:65,v=l-1,y=String.fromCharCode(m+v%26),b=[],w=0,k=v/26|0;w<=k;w++)b.push(y);s=b.join("");break;default:if(r)throw new i.FormatError('Invalid style "'.concat(r,'" in PageLabel dictionary.'));s=""}t[u]=n+s,l++}return t}},{key:"fontFallback",value:function(e,t){var r=[];return this.fontCache.forEach((function(e){r.push(e)})),Promise.all(r).then((function(r){var n,a=w(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i.loadedName===e)return void i.fallback(t)}}catch(e){a.e(e)}finally{a.f()}}))}},{key:"cleanup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,o.clearPrimitiveCaches)(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear();var r=[];return this.fontCache.forEach((function(e){r.push(e)})),Promise.all(r).then((function(t){var r,n=w(t);try{for(n.s();!(r=n.n()).done;)delete r.value.dict.translated}catch(e){n.e(e)}finally{n.f()}e.fontCache.clear(),e.builtInCMapCache.clear()}))}},{key:"getPageDict",value:function(e){var t,r=(0,i.createPromiseCapability)(),n=[this.catDict.getRaw("Pages")],a=new o.RefSet,s=this.xref,c=this.pageKidsCountCache,l=0;return function u(){for(var h=function(){var h=n.pop();if((0,o.isRef)(h))return(t=c.get(h))>0&&l+t=0){var f=h.objId;if(f&&!c.has(f)&&c.put(f,t),l+t<=e)return l+=t,"continue"}var d=h.get("Kids");if(!Array.isArray(d))return(0,o.isName)(h.get("Type"),"Page")||!h.has("Type")&&h.has("Contents")?l===e?(r.resolve([h,null]),{v:void 0}):(l++,"continue"):(r.reject(new i.FormatError("Page dictionary kids object is not an array.")),{v:void 0});for(var p=d.length-1;p>=0;p--)n.push(d[p])};n.length;){var f=h();if("continue"!==f&&"object"===b(f))return f.v}r.reject(new Error("Page index ".concat(e," not found.")))}(),r.promise}},{key:"getPageIndex",value:function(e){var t=this.xref,r=0;return function n(a){return function(r){var n,a=0;return t.fetchAsync(r).then((function(t){if((0,o.isRefsEqual)(r,e)&&!(0,o.isDict)(t,"Page")&&(!(0,o.isDict)(t)||t.has("Type")||!t.has("Contents")))throw new i.FormatError("The reference does not point to a /Page dictionary.");if(!t)return null;if(!(0,o.isDict)(t))throw new i.FormatError("Node must be a dictionary.");return n=t.getRaw("Parent"),t.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(0,o.isDict)(e))throw new i.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;for(var s=[],c=!1,l=0,u=e.length;l0&&(0===r||t>=n[r-1])&&t<=e.numPages}))&&(c=s);break;case"NumCopies":s>0&&(c=s);break;default:if("boolean"!=typeof s)throw new i.FormatError("viewerPreferences - expected a boolean value for: ".concat(a));c=s}void 0!==c?(n||(n=Object.create(null)),n[a]=c):(0,i.info)('Bad value in ViewerPreferences for "'.concat(a,'".'))}else(0,i.info)('Bad value in ViewerPreferences for "'.concat(a,'".'))}return(0,i.shadow)(this,"viewerPreferences",n)}},{key:"openAction",get:function(){var t=this.catDict.get("OpenAction"),r=null;if((0,o.isDict)(t)){var n=new o.Dict(this.xref);n.set("A",t);var a={url:null,dest:null,action:null};e.parseDestDictionary({destDict:n,resultObj:a}),Array.isArray(a.dest)?(r||(r=Object.create(null)),r.dest=a.dest):a.action&&(r||(r=Object.create(null)),r.action=a.action)}else Array.isArray(t)&&(r||(r=Object.create(null)),r.dest=t);return(0,i.shadow)(this,"openAction",r)}},{key:"attachments",get:function(){var e=this.catDict.get("Names"),t=null;if(e&&e.has("EmbeddedFiles")){var r=new R(e.getRaw("EmbeddedFiles"),this.xref).getAll();for(var n in r){var a=new I(r[n],this.xref);t||(t=Object.create(null)),t[(0,i.stringToPDFString)(n)]=a.serializable}}return(0,i.shadow)(this,"attachments",t)}},{key:"javaScript",get:function(){var e=this.catDict.get("Names"),t=null;function r(e){var r=e.get("S");if((0,o.isName)(r,"JavaScript")){var n=e.get("JS");if((0,o.isStream)(n))n=(0,i.bytesToString)(n.getBytes());else if(!(0,i.isString)(n))return;t||(t=[]),t.push((0,i.stringToPDFString)(n))}}if(e&&e.has("JavaScript")){var n=new R(e.getRaw("JavaScript"),this.xref).getAll();for(var a in n){var s=n[a];(0,o.isDict)(s)&&r(s)}}var c=this.catDict.get("OpenAction");return(0,o.isDict)(c)&&(0,o.isName)(c.get("S"),"JavaScript")&&r(c),(0,i.shadow)(this,"javaScript",t)}}],[{key:"parseDestDictionary",value:function(e){var t=e.destDict;if((0,o.isDict)(t)){var r=e.resultObj;if("object"===b(r)){var n,a,s=e.docBaseUrl||null,c=t.get("A");if(!(0,o.isDict)(c)&&t.has("Dest")&&(c=t.get("Dest")),(0,o.isDict)(c)){var l=c.get("S");if(!(0,o.isName)(l))return void(0,i.warn)("parseDestDictionary: Invalid type in Action dictionary.");var u=l.name;switch(u){case"URI":n=c.get("URI"),(0,o.isName)(n)?n="/"+n.name:(0,i.isString)(n)&&(n=function(e){return e.startsWith("www.")?"http://".concat(e):e}(n));break;case"GoTo":a=c.get("D");break;case"Launch":case"GoToR":var h=c.get("F");(0,o.isDict)(h)?n=h.get("F")||null:(0,i.isString)(h)&&(n=h);var f=c.get("D");if(f&&((0,o.isName)(f)&&(f=f.name),(0,i.isString)(n))){var d=n.split("#")[0];(0,i.isString)(f)?n=d+"#"+f:Array.isArray(f)&&(n=d+"#"+JSON.stringify(f))}var p=c.get("NewWindow");(0,i.isBool)(p)&&(r.newWindow=p);break;case"Named":var g=c.get("N");(0,o.isName)(g)&&(r.action=g.name);break;case"JavaScript":var m,v=c.get("JS");if((0,o.isStream)(v)?m=(0,i.bytesToString)(v.getBytes()):(0,i.isString)(v)&&(m=v),m){var y=new RegExp("^\\s*("+["app.launchURL","window.open"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec((0,i.stringToPDFString)(m));if(y&&y[2]){n=y[2],"true"===y[3]&&"app.launchURL"===y[1]&&(r.newWindow=!0);break}}default:(0,i.warn)('parseDestDictionary: unsupported action type "'.concat(u,'".'))}}else t.has("Dest")&&(a=t.get("Dest"));if((0,i.isString)(n)){n=function(e){try{return(0,i.stringToUTF8String)(e)}catch(t){return e}}(n);var w=(0,i.createValidAbsoluteUrl)(n,s);w&&(r.url=w.href),r.unsafeUrl=n}a&&((0,o.isName)(a)&&(a=a.name),((0,i.isString)(a)||Array.isArray(a))&&(r.dest=a))}else(0,i.warn)("parseDestDictionary: `resultObj` must be an object.")}else(0,i.warn)("parseDestDictionary: `destDict` must be a dictionary.")}}]),e}();t.Catalog=P;var T=function(){function e(e,t){this.stream=e,this.pdfManager=t,this.entries=[],this.xrefstms=Object.create(null),this._cacheMap=new Map,this.stats={streamTypes:Object.create(null),fontTypes:Object.create(null)}}return e.prototype={setStartXRef:function(e){this.startXRefQueue=[e]},parse:function(e){var t,r,n;e?((0,i.warn)("Indexing all PDF objects"),t=this.indexObjects()):t=this.readXRef(),t.assignXref(this),this.trailer=t;try{r=t.get("Encrypt")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)('XRef.parse - Invalid "Encrypt" reference: "'.concat(e,'".'))}if((0,o.isDict)(r)){var a=t.get("ID"),s=a&&a.length?a[0]:"";r.suppressEncryption=!0,this.encrypt=new l.CipherTransformFactory(r,s,this.pdfManager.password)}try{n=t.get("Root")}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)('XRef.parse - Invalid "Root" reference: "'.concat(e,'".'))}if(!(0,o.isDict)(n)||!n.has("Pages")){if(!e)throw new c.XRefParseException;throw new i.FormatError("Invalid root reference")}this.root=n},processXRefTable:function(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});var t=this.readXRefTable(e);if(!(0,o.isCmd)(t,"trailer"))throw new i.FormatError("Invalid XRef table: could not find trailer dictionary");var r=e.getObj();if(!(0,o.isDict)(r)&&r.dict&&(r=r.dict),!(0,o.isDict)(r))throw new i.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,r},readXRefTable:function(e){var t,r=e.lexer.stream,n=this.tableState;for(r.pos=n.streamPos,e.buf1=n.parserBuf1,e.buf2=n.parserBuf2;;){if(!("firstEntryNum"in n)||!("entryCount"in n)){if((0,o.isCmd)(t=e.getObj(),"trailer"))break;n.firstEntryNum=t,n.entryCount=e.getObj()}var a=n.firstEntryNum,s=n.entryCount;if(!Number.isInteger(a)||!Number.isInteger(s))throw new i.FormatError("Invalid XRef table: wrong types in subsection header");for(var c=n.entryNum;c0;){var u=l[0],h=l[1];if(!Number.isInteger(u)||!Number.isInteger(h))throw new i.FormatError("Invalid XRef range fields: ".concat(u,", ").concat(h));if(!Number.isInteger(o)||!Number.isInteger(s)||!Number.isInteger(c))throw new i.FormatError("Invalid XRef entry fields length: ".concat(u,", ").concat(h));for(t=n.entryNum;t=e.length);)r+=String.fromCharCode(n),n=e[t];return r}function t(e,t,r){for(var n=r.length,a=e.length,i=0;t=n)break;t++,i++}return i}var r=/^(\d+)\s+(\d+)\s+obj\b/,n=/\bendobj[\b\s]$/,a=/\s+(\d+\s+\d+\s+obj[\b\s<])$/,l=new Uint8Array([116,114,97,105,108,101,114]),u=new Uint8Array([115,116,97,114,116,120,114,101,102]),h=new Uint8Array([111,98,106]),f=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var d=this.stream;d.pos=0;for(var p,g,m,v=d.getBytes(),y=d.start,b=v.length,w=[],k=[];y=b)break;S=v[y]}while(10!==S&&13!==S);else++y}for(p=0,g=k.length;p2&&void 0!==arguments[2]&&arguments[2],n=e.gen,a=e.num;if(t.gen!==n)throw new c.XRefEntryException("Inconsistent generation in XRef: ".concat(e));var i=this.stream.makeSubStream(t.offset+this.stream.start),l=new s.Parser({lexer:new s.Lexer(i),xref:this,allowStreams:!0}),u=l.getObj(),h=l.getObj(),f=l.getObj();if(u!==a||h!==n||!(f instanceof o.Cmd))throw new c.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e));if("obj"!==f.cmd){if(f.cmd.startsWith("obj")&&(a=parseInt(f.cmd.substring(3),10),!Number.isNaN(a)))return a;throw new c.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(e))}return t=this.encrypt&&!r?l.getObj(this.encrypt.createCipherTransform(a,n)):l.getObj(),(0,o.isStream)(t)||this._cacheMap.set(a,t),t},fetchCompressed:function(e,t){var r=t.offset,n=this.fetch(o.Ref.get(r,0));if(!(0,o.isStream)(n))throw new i.FormatError("bad ObjStm stream");var a=n.dict.get("First"),l=n.dict.get("N");if(!Number.isInteger(a)||!Number.isInteger(l))throw new i.FormatError("invalid first and n parameters for ObjStm stream");for(var u=new s.Parser({lexer:new s.Lexer(n),xref:this,allowStreams:!0}),h=new Array(l),f=0;f0;){var a=t.fetchIfRef(n.shift());if((0,o.isDict)(a))if(a.has("Kids"))for(var s=a.get("Kids"),c=0,l=s.length;c10)return(0,i.warn)('Search depth limit reached for "'.concat(this._type,'" tree.')),null;var a=r.get("Kids");if(!Array.isArray(a))return null;for(var o=0,s=a.length-1;o<=s;){var c=o+s>>1,l=t.fetchIfRef(a[c]).get("Limits");if(et.fetchIfRef(l[1]))){r=t.fetchIfRef(a[c]);break}o=c+1}}if(o>s)return null}var u=r.get(this._type);if(Array.isArray(u)){for(var h=0,f=u.length-2;h<=f;){var d=h+f>>1,p=d+(1&d),g=t.fetchIfRef(u[p]);if(eg))return t.fetchIfRef(u[p+1]);h=p+2}}(0,i.info)('Falling back to an exhaustive search, for key "'.concat(e,'", ')+'in "'.concat(this._type,'" tree.'));for(var m=0,v=u.length;m0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof i.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!(0,i.isCmd)(this.buf1,"]")&&!(0,i.isEOF)(this.buf1);)r.push(this.getObj(e));if((0,i.isEOF)(this.buf1)){if(!this.recoveryMode)throw new a.FormatError("End of file inside array");return r}return this.shift(),r;case"<<":for(var n=new i.Dict(this.xref);!(0,i.isCmd)(this.buf1,">>")&&!(0,i.isEOF)(this.buf1);)if((0,i.isName)(this.buf1)){var o=this.buf1.name;if(this.shift(),(0,i.isEOF)(this.buf1))break;n.set(o,this.getObj(e))}else(0,a.info)("Malformed dictionary: key must be a name object"),this.shift();if((0,i.isEOF)(this.buf1)){if(!this.recoveryMode)throw new a.FormatError("End of file inside dictionary");return n}return(0,i.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(n,e):n:(this.shift(),n);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,i.isCmd)(this.buf2,"R")){var s=i.Ref.get(t,this.buf1);return this.shift(),this.shift(),s}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,n=e.pos,i=0;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if((0,a.assert)(2===i,"findDefaultInlineStreamEnd - invalid state."),32===t||10===t||13===t){r=e.pos;for(var s=e.peekBytes(10),c=0,l=s.length;c127)){i=0;break}if(2===i)break}else i=0;-1===t&&((0,a.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&((0,a.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var u=4;return e.skip(-u),t=e.peekByte(),e.skip(u),(0,o.isWhiteSpace)(t)||u--,e.pos-u-n}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,n=e.pos,i=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(i)break}var o=e.pos-n;return-1===t?((0,a.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-o),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),o)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var n=e.pos;for(t=e.peekByte();(0,o.isWhiteSpace)(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>n){var i=e.peekBytes(2);if(69===i[0]&&73===i[1])break}}var s=e.pos-r;return-1===t?((0,a.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-s),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),s)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var n=e.pos-r;return-1===t?((0,a.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,n=r.stream,o=new i.Dict(this.xref);!(0,i.isCmd)(this.buf1,"ID")&&!(0,i.isEOF)(this.buf1);){if(!(0,i.isName)(this.buf1))throw new a.FormatError("Dictionary key must be a name object");var s=this.buf1.name;if(this.shift(),(0,i.isEOF)(this.buf1))break;o.set(s,this.getObj(e))}-1!==r.beginInlineImagePos&&(t=n.pos-r.beginInlineImagePos);var c,l=o.get("Filter","F");if((0,i.isName)(l))c=l.name;else if(Array.isArray(l)){var u=this.xref.fetchIfRef(l[0]);(0,i.isName)(u)&&(c=u.name)}var h,f=n.pos;h="DCTDecode"===c||"DCT"===c?this.findDCTDecodeInlineStreamEnd(n):"ASCII85Decode"===c||"A85"===c?this.findASCII85DecodeInlineStreamEnd(n):"ASCIIHexDecode"===c||"AHx"===c?this.findASCIIHexDecodeInlineStreamEnd(n):this.findDefaultInlineStreamEnd(n);var d,g=n.makeSubStream(f,h,o);if(h<1e3&&t<5552){var m=g.getBytes();g.reset();var v=n.pos;n.pos=r.beginInlineImagePos;var y=n.getBytes(t);n.pos=v,d=p(m)+"_"+p(y);var b=this.imageCache[d];if(void 0!==b)return this.buf2=i.Cmd.get("EI"),this.shift(),b.reset(),b}return e&&(g=e.createStream(g,h)),(g=this.filter(g,o,h)).dict=o,void 0!==d&&(g.cacheKey="inline_".concat(h,"_").concat(d),this.imageCache[d]=g),this.buf2=i.Cmd.get("EI"),this.shift(),g}},{key:"_findStreamLength",value:function(e,t){var r=this.lexer.stream;r.pos=e;for(var n=t.length;r.pos=n)return r.pos+=o,r.pos-e;o++}r.pos+=i}return-1}},{key:"makeStream",value:function(e,t){var r=this.lexer,n=r.stream;r.skipToNextLine();var s=n.pos-1,c=e.get("Length");if(Number.isInteger(c)||((0,a.info)('Bad length "'.concat(c,'" in stream')),c=0),n.pos=s+c,r.nextChar(),this.tryShift()&&(0,i.isCmd)(this.buf2,"endstream"))this.shift();else{var l=new Uint8Array([101,110,100,115,116,114,101,97,109]),u=this._findStreamLength(s,l);if(u<0){for(var h=1;h<=1;h++){var f=l.length-h,d=l.slice(0,f),p=this._findStreamLength(s,d);if(p>=0){var g=n.peekBytes(f+1)[f];if(!(0,o.isWhiteSpace)(g))break;(0,a.info)('Found "'.concat((0,a.bytesToString)(d),'" when ')+"searching for endstream command."),u=p;break}}if(u<0)throw new a.FormatError("Missing endstream command.")}c=u,r.nextChar(),this.shift(),this.shift()}return this.shift(),n=n.makeSubStream(s,c,e),t&&(n=t.createStream(n,c)),(n=this.filter(n,e,c)).dict=e,n}},{key:"filter",value:function(e,t,r){var n=t.get("Filter","F"),o=t.get("DecodeParms","DP");if((0,i.isName)(n))return Array.isArray(o)&&(0,a.warn)("/DecodeParms should not contain an Array, when /Filter contains a Name."),this.makeFilter(e,n.name,r,o);var s=r;if(Array.isArray(n))for(var c=n,l=o,u=0,h=c.length;u=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var y=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;h(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}return d(e,[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,n=0;if(45===e?(n=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(n=1,e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){if(10===r&&0===n&&((0,o.isWhiteSpace)(e)||-1===e))return(0,a.warn)("Lexer.getNumber - treating a single decimal point as zero."),0;throw new a.FormatError("Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")"))}n=n||1;for(var i=e-48,s=0,c=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var l=e-48;t?s=10*s+l:(0!==r&&(r*=10),i=10*i+l)}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,a.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)c=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(i/=r),t&&(i*=Math.pow(10,c*s)),n*i}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var n=this.nextChar();;){var i=!1;switch(0|n){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(n=this.nextChar()){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(n));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var o=15&n;i=!0,(n=this.nextChar())>=48&&n<=55&&(o=(o<<3)+(15&n),(n=this.nextChar())>=48&&n<=55&&(i=!1,o=(o<<3)+(15&n))),r.push(String.fromCharCode(o));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(n))}break;default:r.push(String.fromCharCode(n))}if(t)break;i||(n=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!m[e];)if(35===e){if(e=this.nextChar(),m[e]){(0,a.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var n=v(e);if(-1!==n){t=e;var o=v(e=this.nextChar());if(-1===o){if((0,a.warn)("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),m[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(n<<4|o))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&(0,a.warn)("Name token is longer than allowed by the spec: ".concat(r.length)),i.Name.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,a.warn)("getHexString - ignoring invalid character: ".concat(e)):(0,a.warn)("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t,r,n=this.currentChar,i=!0;for(this._hexStringNumWarn=0;;){if(n<0){(0,a.warn)("Unterminated hex string");break}if(62===n){this.nextChar();break}if(1!==m[n]){if(i){if(-1===(t=v(n))){this._hexStringWarn(n),n=this.nextChar();continue}}else{if(-1===(r=v(n))){this._hexStringWarn(n),n=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}i=!i,n=this.nextChar()}else n=this.nextChar()}return e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return i.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==m[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),i.Cmd.get("[");case 93:return this.nextChar(),i.Cmd.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),i.Cmd.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),i.Cmd.get(">>")):i.Cmd.get(">");case 123:return this.nextChar(),i.Cmd.get("{");case 125:return this.nextChar(),i.Cmd.get("}");case 41:throw this.nextChar(),new a.FormatError("Illegal character: ".concat(t))}for(var r=String.fromCharCode(t),n=this.knownCommands,o=n&&void 0!==n[r];(t=this.nextChar())>=0&&!m[t];){var s=r+String.fromCharCode(t);if(o&&void 0===n[s])break;if(128===r.length)throw new a.FormatError("Command token too long: ".concat(r.length));r=s,o=n&&void 0!==n[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),i.Cmd.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}]),e}();t.Lexer=y;var b=function(){function e(){h(this,e)}return d(e,null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.get(t);if(Number.isInteger(n)&&(r?n>=0:n>0))return n;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,n,o=new g({lexer:new y(e),xref:null}),s=o.getObj(),c=o.getObj(),l=o.getObj(),u=o.getObj();if(!(Number.isInteger(s)&&Number.isInteger(c)&&(0,i.isCmd)(l,"obj")&&(0,i.isDict)(u)&&(0,a.isNum)(r=u.get("Linearized"))&&r>0))return null;if((n=t(u,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:n,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var n=0;n0))throw new Error("Hint (".concat(n,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(u),objectNumberFirst:t(u,"O"),endFirst:t(u,"E"),numPages:t(u,"N"),mainXRefEntriesOffset:t(u,"T"),pageFirst:u.has("P")?t(u,"P",!0):0}}}]),e}();t.Linearization=b},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=t.StringStream=t.StreamsSequenceStream=t.Stream=t.RunLengthStream=t.PredictorStream=t.NullStream=t.FlateStream=t.DecodeStream=t.DecryptStream=t.AsciiHexStream=t.Ascii85Stream=void 0;var n=r(5),a=r(198),i=r(201);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(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}}(e)||function(){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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},getBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,n=this.pos,a=this.end;if(!e){var i=r.subarray(n,a);return t?new Uint8ClampedArray(i):i}var o=n+e;o>a&&(o=a),this.pos=o;var s=r.subarray(n,o);return t?new Uint8ClampedArray(s):s},peekByte:function(){var e=this.getByte();return-1!==e&&this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},getByteRange:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(t,r,n){return new e(this.bytes.buffer,t,r,n)}},e}();t.Stream=c;var l=function(){function e(e){var t=(0,n.stringToBytes)(e);c.call(this,t)}return e.prototype=c.prototype,e}();t.StringStream=l;var u=function(){var e=new Uint8Array(0);function t(t){if(this._rawMinBufferLength=t||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=e,this.minBufferLength=512,t)for(;this.minBufferLength1&&void 0!==arguments[1]&&arguments[1],n=this.pos;if(e){for(this.ensureBuffer(n+e),t=n+e;!this.eof&&this.bufferLengtha&&(t=a)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}this.pos=t;var i=this.buffer.subarray(n,t);return!r||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)},peekByte:function(){var e=this.getByte();return-1!==e&&this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new c(this.buffer,e,t,r)},getByteRange:function(e,t){(0,n.unreachable)("Should not call DecodeStream.getByteRange")},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},t}();t.DecodeStream=u;var h=function(){function e(e){this.streams=e;for(var t=0,r=0,n=e.length;r>e,this.codeSize=a-=e,t},o.prototype.getCode=function(e){for(var t,r=this.str,a=e[0],i=e[1],o=this.codeSize,s=this.codeBuf;o>16,u=65535&c;if(l<1||o>l,this.codeSize=o-l,u},o.prototype.generateHuffmanTable=function(e){var t,r=e.length,n=0;for(t=0;tn&&(n=e[t]);for(var a=1<>=1;for(t=u;t>=1)){var u,h;if(1===l)u=a,h=i;else{if(2!==l)throw new n.FormatError("Unknown block type in flate stream");var f,d=this.getBits(5)+257,p=this.getBits(5)+1,g=this.getBits(4)+4,m=new Uint8Array(e.length);for(f=0;f0;)S[f++]=w}u=this.generateHuffmanTable(S.subarray(0,d)),h=this.generateHuffmanTable(S.subarray(d,k))}for(var x=(o=this.buffer)?o.length:0,C=this.bufferLength;;){var P=this.getCode(u);if(P<256)C+1>=x&&(x=(o=this.ensureBuffer(C+1)).length),o[C++]=P;else{if(256===P)return void(this.bufferLength=C);var T=(P=t[P-=257])>>16;T>0&&(T=this.getBits(T)),s=(65535&P)+T,P=this.getCode(h),(T=(P=r[P])>>16)>0&&(T=this.getBits(T));var E=(65535&P)+T;C+s>=x&&(x=(o=this.ensureBuffer(C+s)).length);for(var R=0;R15))throw new n.FormatError("Unsupported predictor: ".concat(i));this.readBlock=2===i?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;var o=this.colors=r.get("Colors")||1,s=this.bits=r.get("BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;return this.pixBytes=o*s+7>>3,this.rowBytes=c*o*s+7>>3,u.call(this,t),this}return e.prototype=Object.create(u.prototype),e.prototype.readBlockTiff=function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),n=this.bits,a=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var o,s=0,c=0,l=0,u=0,h=t;if(1===n&&1===a)for(o=0;o>1,f^=f>>2,s=(1&(f^=f>>4))<<7,r[h++]=f}else if(8===n){for(o=0;o>8&255,r[h++]=255&p}}else{var g=new Uint8Array(a+1),m=(1<>l-n)&m,l-=n,c=c<=8&&(r[y++]=c>>u-8&255,u-=8);u>0&&(r[y++]=(c<<8-u)+(s&(1<<8-u)-1))}this.bufferLength+=e}},e.prototype.readBlockPng=function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),a=this.str.getBytes(e);if(this.eof=!a.length,!this.eof){var i=this.bufferLength,o=this.ensureBuffer(i+e),s=o.subarray(i-e,i);0===s.length&&(s=new Uint8Array(e));var c,l,u,h=i;switch(r){case 0:for(c=0;c>1)+a[c];for(;c>1)+a[c]&255,h++;break;case 4:for(c=0;c0;e=(0,this.decrypt)(e,!t);var r,n=this.bufferLength,a=e.length,i=this.ensureBuffer(n+a);for(r=0;r=0;--n)r[a+n]=255&s,s>>=8}}else this.eof=!0},e}();t.Ascii85Stream=g;var m=function(){function e(e,t){this.str=e,this.dict=e.dict,this.firstDigit=-1,t&&(t*=.5),u.call(this,t)}return e.prototype=Object.create(u.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(8e3);if(e.length){for(var t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t),n=this.bufferLength,a=this.firstDigit,i=0,o=e.length;i=48&&c<=57)s=15&c;else{if(!(c>=65&&c<=70||c>=97&&c<=102)){if(62===c){this.eof=!0;break}continue}s=9+(15&c)}a<0?a=s:(r[n++]=a<<4|s,a=-1)}a>=0&&this.eof&&(r[n++]=a<<4,a=-1),this.firstDigit=a,this.bufferLength=n}else this.eof=!0},e}();t.AsciiHexStream=m;var v=function(){function e(e,t){this.str=e,this.dict=e.dict,u.call(this,t)}return e.prototype=Object.create(u.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])this.eof=!0;else{var t,r=this.bufferLength,n=e[0];if(n<128){if((t=this.ensureBuffer(r+n+1))[r++]=e[1],n>0){var a=this.str.getBytes(n);t.set(a,r),r+=n}}else{n=257-n;var i=e[1];t=this.ensureBuffer(r+n+1);for(var o=0;o>>t&(1<0;if(v<256)f[0]=v,d=1;else{if(!(v>=258)){if(256===v){u=9,o=258,d=0;continue}this.eof=!0,delete this.lzwState;break}if(v=0;t--)f[t]=s[r],r=l[r];else f[d++]=f[0]}if(y&&(l[o]=h,c[o]=c[h]+1,s[o]=f[0],u=++o+i&o+i-1?u:0|Math.min(Math.log(o+i)/.6931471805599453+1,12)),h=v,n<(p+=d)){do{n+=512}while(n1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0;var r,n=t.EndOfBlock;for(null==n&&(n=!0),this.eoblock=n,this.black=t.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}return c.prototype={readNextChar:function(){if(this.eof)return-1;var t,r,a,i,o,s=this.refLine,c=this.codingLine,l=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var u,h,f;if(this.err=!1,this.nextLine2D){for(i=0;c[i]=64);do{h+=f=this._getWhiteCode()}while(f>=64)}else{do{u+=f=this._getWhiteCode()}while(f>=64);do{h+=f=this._getBlackCode()}while(f>=64)}for(this._addPixels(c[this.codingPos]+u,r),c[this.codingPos]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]0?--t:++t;s[t]<=c[this.codingPos]&&s[t]=64);else do{u+=f=this._getWhiteCode()}while(f>=64);this._addPixels(c[this.codingPos]+u,r),r^=1}var d=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(u=this._lookBits(12),this.eoline)for(;u!==e&&1!==u;)this._eatBits(1),u=this._lookBits(12);else for(;0===u;)this._eatBits(1),u=this._lookBits(12);1===u?(this._eatBits(12),d=!0):u===e&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&d&&this.byteAlign){if(1===(u=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(i=0;i<4;++i)1!==(u=this._lookBits(12))&&(0,n.info)("bad rtc code: "+u),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((u=this._lookBits(13))===e)return this.eof=!0,-1;if(u>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&u))}c[0]>0?this.outputBits=c[this.codingPos=0]:this.outputBits=c[this.codingPos=1],this.row++}if(this.outputBits>=8)o=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&c[this.codingPos]a?(o<<=a,1&this.codingPos||(o|=255>>8-a),this.outputBits-=a,a=0):(o<<=this.outputBits,1&this.codingPos||(o|=255>>8-this.outputBits),a-=this.outputBits,this.outputBits=0,c[this.codingPos]0&&(o<<=a,a=0))}while(a)}return this.black&&(o^=255),o},_addPixels:function(e,t){var r=this.codingLine,a=this.codingPos;e>r[a]&&(e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e),this.codingPos=a},_addPixelsNeg:function(e,t){var r=this.codingLine,a=this.codingPos;if(e>r[a])e>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e;else if(e0&&e=i){var c=n[s-i];if(c[0]===o)return this._eatBits(o),[!0,c[1],!0]}}return[!1,0,!1]},_getTwoDimCode:function(){var r,a=0;if(this.eoblock){if(a=this._lookBits(7),(r=t[a])&&r[0]>0)return this._eatBits(r[0]),r[1]}else{var i=this._findTableCode(1,7,t);if(i[0]&&i[2])return i[1]}return(0,n.info)("Bad two dim code"),e},_getWhiteCode:function(){var t,i=0;if(this.eoblock){if((i=this._lookBits(12))===e)return 1;if((t=i>>5==0?r[i]:a[i>>3])[0]>0)return this._eatBits(t[0]),t[1]}else{var o=this._findTableCode(1,9,a);if(o[0])return o[1];if((o=this._findTableCode(11,12,r))[0])return o[1]}return(0,n.info)("bad white code"),this._eatBits(1),1},_getBlackCode:function(){var t,r;if(this.eoblock){if((t=this._lookBits(13))===e)return 1;if((r=t>>7==0?i[t]:t>>9==0&&t>>7!=0?o[(t>>1)-64]:s[t>>7])[0]>0)return this._eatBits(r[0]),r[1]}else{var a=this._findTableCode(2,6,s);if(a[0])return a[1];if((a=this._findTableCode(7,12,o,64))[0])return a[1];if((a=this._findTableCode(10,13,i))[0])return a[1]}return(0,n.info)("bad black code"),this._eatBits(1),1},_lookBits:function(t){for(var r;this.inputBits>16-t;this.inputBuf=this.inputBuf<<8|r,this.inputBits+=8}return this.inputBuf>>this.inputBits-t&65535>>16-t},_eatBits:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}},c}();t.CCITTFaxDecoder=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var n=r(198),a=r(205),i=r(209),o=r(5),s=function(){function e(e,t,r,n){this.stream=e,this.maybeLength=t,this.dict=r,this.params=n,a.DecodeStream.call(this,t)}return e.prototype=Object.create(a.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e=new i.Jbig2Image,t=[];if((0,n.isDict)(this.params)){var r=this.params.get("JBIG2Globals");if((0,n.isStream)(r)){var a=r.getBytes();t.push({data:a,start:0,end:a.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});for(var o=e.parseChunks(t),s=o.length,c=0;c>>0}var o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?s:s>0?-s:null}function s(e,t,r){for(var n=e.getContexts("IAID"),a=1,i=0;i=F&&C=L)for(z=z<<1&y,d=0;d=0&&T=0&&(R=B[P][T])&&(z|=R<=e?F<<=1:F=F<<1|A[O][I];for(f=0;f=S||I<0||I>=k?F<<=1:F=F<<1|n[O][I];var L=x.readBit(C,F);E[R]=L}}return A}function m(e,t,n,a,i,o,c,l,u,f,d,p,m,v,y,b,w,k,S){if(e&&t)throw new h("refinement with Huffman is not supported");var _,A,x=[];for(_=0;_1&&(I=e?S.readBits(k):r(T,"IAIT",P));var F=c*E+I,L=e?v.symbolIDTable.decode(S):s(T,P,u),M=t&&(e?S.readBit():r(T,"IARI",P)),N=l[L],D=N[0].length,B=N.length;if(M){var j=r(T,"IARDW",P),U=r(T,"IARDH",P);N=g(D+=j,B+=U,y,N,(j>>1)+r(T,"IARDX",P),(U>>1)+r(T,"IARDY",P),!1,b,w)}var q,z,G,W=F-(1&p?0:B-1),H=O-(2&p?D-1:0);if(f){for(q=0;q>5&7,u=[31&s],f=t+6;if(7===s){l=536870911&(0,a.readUint32)(e,f-1),f+=3;var d=l+7>>3;for(u[0]=e[f++];--d>0;)u.push(e[f++])}else if(5===s||6===s)throw new h("invalid referred-to flags");r.retainBits=u;var p=4;r.number<=256?p=1:r.number<=65536&&(p=2);var g,m,v=[];for(g=0;g>>24&255,_[3]=k.height>>16&255,_[4]=k.height>>8&255,_[5]=255&k.height,g=f,m=e.length;g>2&3,f.huffmanDWSelector=d>>4&3,f.bitmapSizeSelector=d>>6&1,f.aggregationInstancesSelector=d>>7&1,f.bitmapCodingContextUsed=!!(256&d),f.bitmapCodingContextRetained=!!(512&d),f.template=d>>10&3,f.refinementTemplate=d>>12&1,l+=2,!f.huffman){for(o=0===f.template?4:1,n=[],i=0;i>2&3,p.stripSize=1<>4&3,p.transposed=!!(64&g),p.combinationOperator=g>>7&3,p.defaultPixelValue=g>>9&1,p.dsOffset=g<<17>>27,p.refinementTemplate=g>>15&1,p.huffman){var m=(0,a.readUint16)(c,l);l+=2,p.huffmanFS=3&m,p.huffmanDS=m>>2&3,p.huffmanDT=m>>4&3,p.huffmanRefinementDW=m>>6&3,p.huffmanRefinementDH=m>>8&3,p.huffmanRefinementDX=m>>10&3,p.huffmanRefinementDY=m>>12&3,p.huffmanRefinementSizeSelector=!!(16384&m)}if(p.refinement&&!p.refinementTemplate){for(n=[],i=0;i<2;i++)n.push({x:(0,a.readInt8)(c,l),y:(0,a.readInt8)(c,l+1)}),l+=2;p.refinementAt=n}p.numberOfSymbolInstances=(0,a.readUint32)(c,l),l+=4,r=[p,s.referredTo,c,l,u];break;case 16:var v={},y=c[l++];v.mmr=!!(1&y),v.template=y>>1&3,v.patternWidth=c[l++],v.patternHeight=c[l++],v.maxPatternIndex=(0,a.readUint32)(c,l),l+=4,r=[v,s.number,c,l,u];break;case 22:case 23:var k={};k.info=b(c,l),l+=w;var S=c[l++];k.mmr=!!(1&S),k.template=S>>1&3,k.enableSkip=!!(8&S),k.combinationOperator=S>>4&7,k.defaultPixelValue=S>>7&1,k.gridWidth=(0,a.readUint32)(c,l),l+=4,k.gridHeight=(0,a.readUint32)(c,l),l+=4,k.gridOffsetX=4294967295&(0,a.readUint32)(c,l),l+=4,k.gridOffsetY=4294967295&(0,a.readUint32)(c,l),l+=4,k.gridVectorX=(0,a.readUint16)(c,l),l+=2,k.gridVectorY=(0,a.readUint16)(c,l),l+=2,r=[k,s.referredTo,c,l,u];break;case 38:case 39:var _={};_.info=b(c,l),l+=w;var A=c[l++];if(_.mmr=!!(1&A),_.template=A>>1&3,_.prediction=!!(8&A),!_.mmr){for(o=0===_.template?4:1,n=[],i=0;i>2&1,x.combinationOperator=C>>3&3,x.requiresBuffer=!!(32&C),x.combinationOperatorOverride=!!(64&C),r=[x];break;case 49:case 50:case 51:case 62:break;case 53:r=[s.number,c,l,u];break;default:throw new h("segment type ".concat(s.typeName,"(").concat(s.type,")")+" is not implemented")}var P="on"+s.typeName;P in t&&t[P].apply(t,r)}function S(e,t){for(var r=0,n=e.length;r0&&this.rootNode.buildTree(a,a.prefixLength-1)}}_.prototype={onPageInformation:function(e){this.currentPageInfo=e;var t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,a=r.length;n>3,u=o.combinationOperatorOverride?e.combinationOperator:o.combinationOperator,f=this.buffer,d=128>>(7&e.x),p=e.y*l+(e.x>>3);switch(u){case 0:for(r=0;r>=1)||(a=128,i++);p+=l}break;case 2:for(r=0;r>=1)||(a=128,i++);p+=l}break;default:throw new h("operator ".concat(u," is not supported"))}},onImmediateGenericRegion:function(e,r,n,a){var i=e.info,o=new t(r,n,a),s=p(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(i,s)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,n,i,o,c,l){var u,f;e.huffman&&(u=function(e,t,r){var n,a,i,o,s=0;switch(e.huffmanDHSelector){case 0:case 1:n=T(e.huffmanDHSelector+4);break;case 3:n=R(s,t,r),s++;break;default:throw new h("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:a=T(e.huffmanDWSelector+2);break;case 3:a=R(s,t,r),s++;break;default:throw new h("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=R(s,t,r),s++):i=T(1),o=e.aggregationInstancesSelector?R(s,t,r):T(1),{tableDeltaHeight:n,tableDeltaWidth:a,tableBitmapSize:i,tableAggregateInstances:o}}(e,i,this.customTables),f=new E(o,c,l));var d=this.symbols;d||(this.symbols=d={});for(var v=[],y=0,b=i.length;y1)R=m(e,t,C,S,0,L,1,n.concat(k),_,0,0,1,0,c,f,d,v,0,y);else{var M=s(x,A,_),N=r(x,"IARDX",A),D=r(x,"IARDY",A);R=g(C,S,f,M=32){var f=void 0,d=void 0,p=void 0;switch(u){case 32:if(0===l)throw new h("no previous value in symbol ID table");d=a.readBits(2)+3,f=i[l-1].prefixLength;break;case 33:d=a.readBits(3)+3,f=0;break;case 34:d=a.readBits(7)+11,f=0;break;default:throw new h("invalid code length in symbol ID table")}for(p=0;p=0;y--)R=e?I(T,l,u,!0):p(!1,l,u,r,!1,null,P,v),q[y]=R;for(O=0;O=0;b--)M|=(L=q[b][O][F]^L)<>8,(D=f+O*m+F*g>>8)>=0&&D+A<=n&&B>=0&&B+x<=i)for(y=0;y=i))for(U=k[G],j=N[y],b=0;b=0&&z>1&7),h=1+(o>>4&7),f=[],d=s;do{n=l.readBits(u),i=l.readBits(h),f.push(new A([d,n,i,0])),d+=1<>t&1;if(t<=0)this.children[r]=new x(e);else{var n=this.children[r];n||(this.children[r]=n=new x(null)),n.buildTree(e,t-1)}},decodeNode:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new h("invalid Huffman data");return r.decodeNode(e)}},C.prototype={decode:function(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function(e){for(var t=e.length,r=0,n=0;n>f&1,f--}if(n&&!l)for(var p=0;p<5&&-1!==s.readNextChar();p++);return c}function F(){}return E.prototype={readBit:function(){if(this.shift<0){if(this.position>=this.end)throw new h("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e},readBits:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}},F.prototype={parseChunks:function(e){return function(e){for(var t=new _,r=0,n=e.length;r>=1;return{imgData:d,width:l,height:u}}(e),r=t.imgData,n=t.width,i=t.height;return this.width=n,this.height=i,r}},F}();t.Jbig2Image=f},function(e,t,r){function n(e,t){for(var r=0;r>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var t,r,i;return t=e,(r=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,n=e[t]>>1,i=1&e[t],o=a[n],s=o.qe,c=this.a-s;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&c));return this.a=c,e[t]=n<<1|i,r}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ArithmeticDecoder=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var n=r(205),a=r(198),i=r(212),o=r(5),s=function(){function e(e,t,r,a){for(var i;-1!==(i=e.getByte());)if(255===i){e.skip(-1);break}this.stream=e,this.maybeLength=t,this.dict=r,this.params=a,n.DecodeStream.call(this,t)}return e.prototype=Object.create(n.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(t)){for(var r=this.dict.get("BitsPerComponent")||8,n=t.length,o=new Int32Array(n),s=!1,c=(1<0&&void 0!==arguments[0]?arguments[0]:{},t=e.decodeTransform,r=void 0===t?null:t,n=e.colorTransform,a=void 0===n?-1:n;this._decodeTransform=r,this._colorTransform=a}function m(e,t){for(var r,n,a=0,i=[],o=16;o>0&&!e[o-1];)o--;i.push({children:[],index:0});var s,c=i[0];for(r=0;r0;)c=i.pop();for(c.index++,i.push(c);i.length<=r;)i.push(s={children:[],index:0}),c.children[c.index]=s.children,c=s;a++}r+19&&void 0!==arguments[9]&&arguments[9],y=o.mcusPerLine,b=o.progressive,w=r,S=0,_=0;function A(){if(_>0)return _--,S>>_&1;if(255===(S=t[r++])){var e=t[r++];if(e){if(220===e&&m){r+=2;var n=(0,a.readUint16)(t,r);if(r+=2,n>0&&n!==o.scanLines)throw new f("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===e){if(m){var i=8*O;if(i>0&&i>>7}function x(e){for(var t=e;;){switch(i(t=t[A()])){case"number":return t;case"object":continue}throw new h("invalid huffman sequence")}}function C(e){for(var t=0;e>0;)t=t<<1|A(),e--;return t}function P(e){if(1===e)return 1===A()?1:-1;var t=C(e);return t>=1<0)E--;else for(var n=l,a=u;n<=a;){var i=x(t.huffmanTableAC),o=15&i,s=i>>4;if(0!==o){var c=e[n+=s];t.blockData[r+c]=P(o)*(1<>4,0==(n=15&a))s<15?(E=C(s)+(1<>4;if(0!==s){var l=e[i+=c];t.blockData[r+l]=P(s),i++}else{if(c<15)break;i+=16}}};var q,z,G,W,H=0;for(z=1===U?s[0].blocksPerLine*s[0].blocksPerColumn:y*o.mcusPerColumn;H<=z;){var V=c?Math.min(z-H,c):z;if(V>0){for(M=0;M0?"unexpected":"excessive";(0,n.warn)("decodeScan - ".concat(X," MCU data, current marker is: ").concat(q.invalid)),r=q.offset}if(!(q.marker>=65488&&q.marker<=65495))break;r+=2}return r-w}function b(e,n,a){var i,f,d,g,m,v,y,b,w,k,S,_,A,x,C,P,T,E=e.quantizationTable,R=e.blockData;if(!E)throw new h("missing required Quantization Table.");for(var O=0;O<64;O+=8)w=R[n+O],k=R[n+O+1],S=R[n+O+2],_=R[n+O+3],A=R[n+O+4],x=R[n+O+5],C=R[n+O+6],P=R[n+O+7],w*=E[O],0!=(k|S|_|A|x|C|P)?(k*=E[O+1],S*=E[O+2],_*=E[O+3],A*=E[O+4],x*=E[O+5],C*=E[O+6],P*=E[O+7],f=(i=(i=u*w+128>>8)+(f=u*A+128>>8)+1>>1)-f,T=(d=S)*l+(g=C)*c+128>>8,d=d*c-g*l+128>>8,y=(m=(m=p*(k-P)+128>>8)+(y=x<<4)+1>>1)-y,v=(b=(b=p*(k+P)+128>>8)+(v=_<<4)+1>>1)-v,g=(i=i+(g=T)+1>>1)-g,d=(f=f+d+1>>1)-d,T=m*s+b*o+2048>>12,m=m*o-b*s+2048>>12,b=T,T=v*r+y*t+2048>>12,v=v*t-y*r+2048>>12,y=T,a[O]=i+b,a[O+7]=i-b,a[O+1]=f+y,a[O+6]=f-y,a[O+2]=d+v,a[O+5]=d-v,a[O+3]=g+m,a[O+4]=g-m):(T=u*w+512>>10,a[O]=T,a[O+1]=T,a[O+2]=T,a[O+3]=T,a[O+4]=T,a[O+5]=T,a[O+6]=T,a[O+7]=T);for(var I=0;I<8;++I)w=a[I],0!=((k=a[I+8])|(S=a[I+16])|(_=a[I+24])|(A=a[I+32])|(x=a[I+40])|(C=a[I+48])|(P=a[I+56]))?(f=(i=4112+((i=u*w+2048>>12)+(f=u*A+2048>>12)+1>>1))-f,T=(d=S)*l+(g=C)*c+2048>>12,d=d*c-g*l+2048>>12,g=T,y=(m=(m=p*(k-P)+2048>>12)+(y=x)+1>>1)-y,v=(b=(b=p*(k+P)+2048>>12)+(v=_)+1>>1)-v,T=m*s+b*o+2048>>12,m=m*o-b*s+2048>>12,b=T,T=v*r+y*t+2048>>12,v=v*t-y*r+2048>>12,(w=(i=i+g+1>>1)+b)<16?w=0:w>=4080?w=255:w>>=4,(k=(f=f+d+1>>1)+(y=T))<16?k=0:k>=4080?k=255:k>>=4,(S=(d=f-d)+v)<16?S=0:S>=4080?S=255:S>>=4,(_=(g=i-g)+m)<16?_=0:_>=4080?_=255:_>>=4,(A=g-m)<16?A=0:A>=4080?A=255:A>>=4,(x=d-v)<16?x=0:x>=4080?x=255:x>>=4,(C=f-y)<16?C=0:C>=4080?C=255:C>>=4,(P=i-b)<16?P=0:P>=4080?P=255:P>>=4,R[n+I]=w,R[n+I+8]=k,R[n+I+16]=S,R[n+I+24]=_,R[n+I+32]=A,R[n+I+40]=x,R[n+I+48]=C,R[n+I+56]=P):(T=(T=u*w+8192>>14)<-2040?0:T>=2024?255:T+2056>>4,R[n+I]=T,R[n+I+8]=T,R[n+I+16]=T,R[n+I+24]=T,R[n+I+32]=T,R[n+I+40]=T,R[n+I+48]=T,R[n+I+56]=T)}function w(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,a=new Int16Array(64),i=0;i2&&void 0!==arguments[2]?arguments[2]:t,n=e.length-1,i=r=n)return null;var o=(0,a.readUint16)(e,t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var s=(0,a.readUint16)(e,i);!(s>=65472&&s<=65534);){if(++i>=n)return null;s=(0,a.readUint16)(e,i)}return{invalid:o.toString(16),marker:s,offset:i}}return g.prototype={parse:function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,i=void 0===r?null:r;function o(){var e=(0,a.readUint16)(t,u),r=(u+=2)+e-2,i=k(t,r,u);i&&i.invalid&&((0,n.warn)("readDataBlock - incorrect length, current marker is: "+i.invalid),r=i.offset);var o=t.subarray(u,r);return u+=o.length,o}function s(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n>4==0)for(C=0;C<64;C++)O[e[C]]=t[u++];else{if(R>>4!=1)throw new h("DQT - invalid table spec");for(C=0;C<64;C++)O[e[C]]=(0,a.readUint16)(t,u),u+=2}b[15&R]=O}break;case 65472:case 65473:case 65474:if(c)throw new h("Only single frame JPEGs supported");u+=2,(c={}).extended=65473===A,c.progressive=65474===A,c.precision=t[u++];var I=(0,a.readUint16)(t,u);u+=2,c.scanLines=i||I,c.samplesPerLine=(0,a.readUint16)(t,u),u+=2,c.components=[],c.componentIds={};var F,L=t[u++],M=0,N=0;for(x=0;x>4,B=15&t[u+1];M>4==0?_:S)[15&q]=m(z,W)}break;case 65501:u+=2,l=(0,a.readUint16)(t,u),u+=2;break;case 65498:var H=1==++v&&!i;u+=2;var V,X=t[u++],Y=[];for(x=0;x>4],V.huffmanTableAC=S[15&J],Y.push(V)}var Q=t[u++],$=t[u++],Z=t[u++];try{var ee=y(t,u,c,Y,l,Q,$,Z>>4,15&Z,H);u+=ee}catch(e){if(e instanceof f)return(0,n.warn)("".concat(e.message," -- attempting to re-parse the JPEG image.")),this.parse(t,{dnlScanLines:e.scanLines});if(e instanceof d){(0,n.warn)("".concat(e.message," -- ignoring the rest of the image data."));break e}throw e}break;case 65500:u+=4;break;case 65535:255!==t[u]&&u--;break;default:var te=k(t,u-2,u-3);if(te&&te.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+te.invalid),u=te.offset;break}if(u>=t.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new h("JpegImage.parse - unknown marker: "+A.toString(16))}A=(0,a.readUint16)(t,u),u+=2}for(this.width=c.samplesPerLine,this.height=c.scanLines,this.jfif=p,this.adobe=g,this.components=[],x=0;x2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,m=this.height/t,v=0,y=this.components.length,b=e*t*y,w=new Uint8ClampedArray(b),k=new Uint32Array(e),S=4294967288;for(c=0;c>8)+_[u+1];return w},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform:1===this._colorTransform},_convertYccToRgb:function(e){for(var t,r,n,a=0,i=e.length;a4)throw new h("Unsupported color mode");var s=this._getLinearizedBlockData(t,r,o);if(1===this.numComponents&&a){for(var c=s.length,l=new Uint8ClampedArray(3*c),u=0,f=0;f0?Math.min(n.xcb,a.PPx-1):Math.min(n.xcb,a.PPx),a.ycb_=r>0?Math.min(n.ycb,a.PPy-1):Math.min(n.ycb,a.PPy),a}function c(e,t,r){var n=1<t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,l=t.try1>t.try0?Math.ceil(t.try1/a)-Math.floor(t.try0/a):0,u=c*l;t.precinctParameters={precinctWidth:n,precinctHeight:a,numprecinctswide:c,numprecinctshigh:l,numprecincts:u,precinctWidthInSubband:o,precinctHeightInSubband:s}}function l(e,t,r){var n,a,i,o,s=r.xcb_,c=r.ycb_,l=1<>s,f=t.tby0>>c,d=t.tbx1+l-1>>s,p=t.tby1+u-1>>c,g=t.resolution.precinctParameters,m=[],v=[];for(a=f;ay.cbxMax&&(y.cbxMax=n),ay.cbyMax&&(y.cbyMax=a)):v[o]=y={cbxMin:n,cbyMin:a,cbxMax:n,cbyMax:a},i.precinct=y}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-h+1,numcodeblockhigh:p-f+1},t.codeblocks=m,t.precincts=v}function h(e,t,r){for(var n=[],a=e.subbands,i=0,o=a.length;ie.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[l],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[c],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){var i=e.resolutions[r],o=i.precinctParameters.numprecincts;if(!(a>=o)){for(;t=0;--m){var v=c.resolutions[m],y=g*v.precinctParameters.precinctWidth,b=g*v.precinctParameters.precinctHeight;h=Math.min(h,y),f=Math.min(f,b),d=Math.max(d,v.precinctParameters.numprecinctswide),p=Math.max(p,v.precinctParameters.numprecinctshigh),u[m]={width:y,height:b},g<<=1}r=Math.min(r,h),n=Math.min(n,f),a=Math.max(a,d),i=Math.max(i,p),o[s]={resolutions:u,minWidth:h,minHeight:f,maxNumWide:d,maxNumHigh:p}}return{components:o,minWidth:r,minHeight:n,maxNumWide:a,maxNumHigh:i}}function b(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],a=t.Csiz,i=0;i>>(s-=e)&(1<0;){var j=S.shift();void 0===(w=j.codeblock).data&&(w.data=[]),w.data.push({data:t,start:r+o,end:r+o+j.dataLength,codingpasses:j.codingpasses}),o+=j.dataLength}}}return o}function k(e,t,r,n,a,o,s,c){for(var l=n.tbx0,u=n.tby0,h=n.tbx1-n.tbx0,f=n.codeblocks,d="H"===n.type.charAt(0)?1:0,p="H"===n.type.charAt(1)?t:0,g=0,m=f.length;g=o?L:L*(1<0?1-v:0));var P=y.subbands[_],R=e[P.type];k(S,b,0,P,d?1:Math.pow(2,f+R-C)*(1+x/2048),u+C-1,d,h)}g.push({width:b,height:w,items:S})}var O=p.calculate(g,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:O.width,height:O.height,items:O.items}}function _(e,t){for(var r=e.SIZ.Csiz,n=e.tiles[t],a=0;a>24&255,s>>16&255,s>>8&255,255&s);(0,n.warn)("Unsupported header type "+s+" ("+d+")")}l&&(t+=c)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function(e){for(var t=e.getByte();t>=0;)if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);var o=e.getUint16();return this.width=r-a,this.height=n-i,this.componentsCount=o,void(this.bitsPerComponent=8)}throw new u("No size marker found in JPX stream")},parseCodestream:function(e,t,i){var s={},c=!1;try{for(var l=t;l+1>5,p=[];f>3,E.mu=0):(E.epsilon=e[f]>>3,E.mu=(7&e[f])<<8|e[f+1],f+=2),p.push(E)}T.SPqcds=p,s.mainHeader?s.QCD=T:(s.currentTile.QCD=T,s.currentTile.QCC=[]);break;case 65373:y=(0,a.readUint16)(e,l);var R,O={};switch(f=l+2,s.SIZ.Csiz<257?R=e[f++]:(R=(0,a.readUint16)(e,f),f+=2),31&(d=e[f++])){case 0:g=8,m=!0;break;case 1:g=16,m=!1;break;case 2:g=16,m=!0;break;default:throw new Error("Invalid SQcd value "+d)}for(O.noQuantization=8===g,O.scalarExpounded=m,O.guardBits=d>>5,p=[];f>3,E.mu=0):(E.epsilon=e[f]>>3,E.mu=(7&e[f])<<8|e[f+1],f+=2),p.push(E);O.SPqcds=p,s.mainHeader?s.QCC[R]=O:s.currentTile.QCC[R]=O;break;case 65362:y=(0,a.readUint16)(e,l);var I={};f=l+2;var F=e[f++];I.entropyCoderWithCustomPrecincts=!!(1&F),I.sopMarkerUsed=!!(2&F),I.ephMarkerUsed=!!(4&F),I.progressionOrder=e[f++],I.layersCount=(0,a.readUint16)(e,f),f+=2,I.multipleComponentTransform=e[f++],I.decompositionLevelsCount=e[f++],I.xcb=2+(15&e[f++]),I.ycb=2+(15&e[f++]);var L=e[f++];if(I.selectiveArithmeticCodingBypass=!!(1&L),I.resetContextProbabilities=!!(2&L),I.terminationOnEachCodingPass=!!(4&L),I.verticallyStripe=!!(8&L),I.predictableTermination=!!(16&L),I.segmentationSymbolUsed=!!(32&L),I.reversibleTransformation=e[f++],I.entropyCoderWithCustomPrecincts){for(var M=[];f>4})}I.precinctsSizes=M}var D=[];if(I.selectiveArithmeticCodingBypass&&D.push("selectiveArithmeticCodingBypass"),I.resetContextProbabilities&&D.push("resetContextProbabilities"),I.terminationOnEachCodingPass&&D.push("terminationOnEachCodingPass"),I.verticallyStripe&&D.push("verticallyStripe"),I.predictableTermination&&D.push("predictableTermination"),D.length>0)throw c=!0,new Error("Unsupported COD options ("+D.join(", ")+")");s.mainHeader?s.COD=I:(s.currentTile.COD=I,s.currentTile.COC=[]);break;case 65424:y=(0,a.readUint16)(e,l),(v={}).index=(0,a.readUint16)(e,l+2),v.length=(0,a.readUint32)(e,l+4),v.dataEnd=v.length+l-2,v.partIndex=e[l+8],v.partsCount=e[l+9],s.mainHeader=!1,0===v.partIndex&&(v.COD=s.COD,v.COC=s.COC.slice(0),v.QCD=s.QCD,v.QCC=s.QCC.slice(0)),s.currentTile=v;break;case 65427:0===(v=s.currentTile).partIndex&&(_(s,v.index),b(s)),w(s,e,l,y=v.dataEnd-l);break;case 65365:case 65367:case 65368:case 65380:y=(0,a.readUint16)(e,l);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+h.toString(16))}l+=y}}catch(e){if(c||this.failOnCorruptedImage)throw new u(e.message);(0,n.warn)("JPX: Trying to recover from: "+e.message)}this.tiles=function(e){for(var t=e.SIZ,r=e.components,n=t.Csiz,a=[],i=0,o=e.tiles.length;i>2);y[w++]=E+m>>u,y[w++]=E>>u,y[w++]=E+g>>u}else for(f=0;f>u,y[w++]=p-.34413*g-.71414*m>>u,y[w++]=p+1.772*g>>u;if(k)for(f=0,w=3;f>u}else for(s=0;s>u,w+=n}a.push(b)}return a}(s),this.width=s.SIZ.Xsiz-s.SIZ.XOsiz,this.height=s.SIZ.Ysiz-s.SIZ.YOsiz,this.componentsCount=s.SIZ.Csiz}};var A=function(){function e(e,t){var r=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;n>=1,t>>=1,n++}n--,(r=this.levels[n]).items[r.index]=a,this.currentLevel=n,delete this.value},incrementValue:function(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return--e<0?(this.value=r,!1):(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,!0)}},e}(),x=function(){function e(e,t,r){var n=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var i=0;ir)return this.currentLevel=n,this.propagateValues(),!1;e>>=1,t>>=1,n++}return this.currentLevel=n-1,!0},incrementValue:function(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()},propagateValues:function(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;)(t=this.levels[e]).items[t.index]=r},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return t.items[t.index]=255,!(--e<0||(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,0))}},e}(),C=function(){var e=17,t=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),r=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),n=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function a(e,a,i,o,s){var c;this.width=e,this.height=a,c="HH"===i?n:"HL"===i?r:t,this.contextLabelTable=c;var l,u=e*a;this.neighborsSignificance=new Uint8Array(u),this.coefficentsSign=new Uint8Array(u),l=s>14?new Uint32Array(u):s>6?new Uint16Array(u):new Uint8Array(u),this.coefficentsMagnitude=l,this.processingFlags=new Uint8Array(u);var h=new Uint8Array(u);if(0!==o)for(var f=0;f0,c=t+10&&(n=r-i,s&&(a[n-1]+=16),c&&(a[n+1]+=16),a[n]+=4),e+1=r)break;if(o[f]&=-2,!n[f]&&i[f]){var g=c[i[f]];if(e.readBit(s,g)){var m=this.decodeSignBit(p,h,f);a[f]=m,n[f]=1,this.setNeighborsSignificance(p,h,f),o[f]|=2}l[f]++,o[f]|=1}}},decodeSignBit:function(e,t,r){var n,a,i,o,s,c,l=this.width,u=this.height,h=this.coefficentsMagnitude,f=this.coefficentsSign;o=t>0&&0!==h[r-1],t+10&&0!==h[r-l],e+1=0?(s=9+n,c=this.decoder.readBit(this.contexts,s)):(s=9-n,c=1^this.decoder.readBit(this.contexts,s)),c},runMagnitudeRefinementPass:function(){for(var e,t=this.decoder,r=this.width,n=this.height,a=this.coefficentsMagnitude,i=this.neighborsSignificance,o=this.contexts,s=this.bitsDecoded,c=this.processingFlags,l=r*n,u=4*r,h=0;h>1,c=-1.586134342059924,l=-.052980118572961,u=.882911075530934,h=.443506852043971,f=1.230174104914001;for(n=(t|=0)-3,a=s+4;a--;n+=2)e[n]*=.8128930661159609;for(i=h*e[(n=t-2)-1],a=s+3;a--&&(o=h*e[n+1],e[n]=f*e[n]-i-o,a--);n+=2)i=h*e[(n+=2)+1],e[n]=f*e[n]-i-o;for(i=u*e[(n=t-1)-1],a=s+2;a--&&(o=u*e[n+1],e[n]-=i+o,a--);n+=2)i=u*e[(n+=2)+1],e[n]-=i+o;for(i=l*e[(n=t)-1],a=s+1;a--&&(o=l*e[n+1],e[n]-=i+o,a--);n+=2)i=l*e[(n+=2)+1],e[n]-=i+o;if(0!==s)for(i=c*e[(n=t+1)-1],a=s;a--&&(o=c*e[n+1],e[n]-=i+o,a--);n+=2)i=c*e[(n+=2)+1],e[n]-=i+o},e}(),E=function(){function e(){P.call(this)}return e.prototype=Object.create(P.prototype),e.prototype.filter=function(e,t,r){var n,a,i=r>>1;for(n=t|=0,a=i+1;a--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,a=i;a--;n+=2)e[n]+=e[n-1]+e[n+1]>>1},e}();return t}();t.JpxImage=h},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA512=t.calculateSHA384=t.calculateSHA256=t.calculateMD5=t.PDF20=t.PDF17=t.CipherTransformFactory=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0;var n=r(5),a=r(198),i=r(205);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&&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=function(){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}}();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r>5&255,h[n++]=r>>13&255,h[n++]=r>>21&255,h[n++]=r>>>29&255,h[n++]=0,h[n++]=0,h[n++]=0;var f=new Int32Array(16);for(n=0;n>>32-_)|0,v=k}o=o+v|0,s=s+y|0,c=c+b|0,l=l+w|0}return new Uint8Array([255&o,o>>8&255,o>>16&255,o>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])});t.calculateMD5=v;var y=function(){function e(e,t){this.high=0|e,this.low=0|t}return e.prototype={and:function(e){this.high&=e.high,this.low&=e.low},xor:function(e){this.high^=e.high,this.low^=e.low},or:function(e){this.high|=e.high,this.low|=e.low},shiftRight:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)},shiftLeft:function(e){e>=32?(this.high=this.low<>>32-e,this.low=this.low<>>e|r<<32-e,this.high=r>>>e|t<<32-e},not:function(){this.high=~this.high,this.low=~this.low},add:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r},copyTo:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low},assign:function(e){this.high=e.high,this.low=e.low}},e}(),b=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function n(t){return e(t,2)^e(t,13)^e(t,22)}function a(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(s,c,l){var u,h,f,d=1779033703,p=3144134277,g=1013904242,m=2773480762,v=1359893119,y=2600822924,b=528734635,w=1541459225,k=64*Math.ceil((l+9)/64),S=new Uint8Array(k);for(u=0;u>>29&255,S[u++]=l>>21&255,S[u++]=l>>13&255,S[u++]=l>>5&255,S[u++]=l<<3&255;var _,A=new Uint32Array(64);for(u=0;u>>10)+A[h-7]+i(A[h-15])+A[h-16];var x,C,P=d,T=p,E=g,R=m,O=v,I=y,F=b,L=w;for(h=0;h<64;++h)x=L+a(O)+t(O,I,F)+o[h]+A[h],C=n(P)+r(P,T,E),L=F,F=I,I=O,O=R+x|0,R=E,E=T,T=P,P=x+C|0;d=d+P|0,p=p+T|0,g=g+E|0,m=m+R|0,v=v+O|0,y=y+I|0,b=b+F|0,w=w+L|0}return new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,v>>24&255,v>>16&255,v>>8&255,255&v,y>>24&255,y>>16&255,y>>8&255,255&y,b>>24&255,b>>16&255,b>>8&255,255&b,w>>24&255,w>>16&255,w>>8&255,255&w])}}();t.calculateSHA256=b;var w=function(){function e(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.not(),a.and(n),e.xor(a)}function t(e,t,r,n,a){e.assign(t),e.and(r),a.assign(t),a.and(n),e.xor(a),a.assign(r),a.and(n),e.xor(a)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var o=[new y(1116352408,3609767458),new y(1899447441,602891725),new y(3049323471,3964484399),new y(3921009573,2173295548),new y(961987163,4081628472),new y(1508970993,3053834265),new y(2453635748,2937671579),new y(2870763221,3664609560),new y(3624381080,2734883394),new y(310598401,1164996542),new y(607225278,1323610764),new y(1426881987,3590304994),new y(1925078388,4068182383),new y(2162078206,991336113),new y(2614888103,633803317),new y(3248222580,3479774868),new y(3835390401,2666613458),new y(4022224774,944711139),new y(264347078,2341262773),new y(604807628,2007800933),new y(770255983,1495990901),new y(1249150122,1856431235),new y(1555081692,3175218132),new y(1996064986,2198950837),new y(2554220882,3999719339),new y(2821834349,766784016),new y(2952996808,2566594879),new y(3210313671,3203337956),new y(3336571891,1034457026),new y(3584528711,2466948901),new y(113926993,3758326383),new y(338241895,168717936),new y(666307205,1188179964),new y(773529912,1546045734),new y(1294757372,1522805485),new y(1396182291,2643833823),new y(1695183700,2343527390),new y(1986661051,1014477480),new y(2177026350,1206759142),new y(2456956037,344077627),new y(2730485921,1290863460),new y(2820302411,3158454273),new y(3259730800,3505952657),new y(3345764771,106217008),new y(3516065817,3606008344),new y(3600352804,1432725776),new y(4094571909,1467031594),new y(275423344,851169720),new y(430227734,3100823752),new y(506948616,1363258195),new y(659060556,3750685593),new y(883997877,3785050280),new y(958139571,3318307427),new y(1322822218,3812723403),new y(1537002063,2003034995),new y(1747873779,3602036899),new y(1955562222,1575990012),new y(2024104815,1125592928),new y(2227730452,2716904306),new y(2361852424,442776044),new y(2428436474,593698344),new y(2756734187,3733110249),new y(3204031479,2999351573),new y(3329325298,3815920427),new y(3391569614,3928383900),new y(3515267271,566280711),new y(3940187606,3454069534),new y(4118630271,4000239992),new y(116418474,1914138554),new y(174292421,2731055270),new y(289380356,3203993006),new y(460393269,320620315),new y(685471733,587496836),new y(852142971,1086792851),new y(1017036298,365543100),new y(1126000580,2618297676),new y(1288033470,3409855158),new y(1501505948,4234509866),new y(1607167915,987167468),new y(1816402316,1246189591)];return function(s,c,l,u){var h,f,d,p,g,m,v,b;(u=!!u)?(h=new y(3418070365,3238371032),f=new y(1654270250,914150663),d=new y(2438529370,812702999),p=new y(355462360,4144912697),g=new y(1731405415,4290775857),m=new y(2394180231,1750603025),v=new y(3675008525,1694076839),b=new y(1203062813,3204075428)):(h=new y(1779033703,4089235720),f=new y(3144134277,2227873595),d=new y(1013904242,4271175723),p=new y(2773480762,1595750129),g=new y(1359893119,2917565137),m=new y(2600822924,725511199),v=new y(528734635,4215389547),b=new y(1541459225,327033209));var w,k,S,_=128*Math.ceil((l+17)/128),A=new Uint8Array(_);for(w=0;w>>29&255,A[w++]=l>>21&255,A[w++]=l>>13&255,A[w++]=l>>5&255,A[w++]=l<<3&255;var x=new Array(80);for(w=0;w<80;w++)x[w]=new y(0,0);var C,P,T=new y(0,0),E=new y(0,0),R=new y(0,0),O=new y(0,0),I=new y(0,0),F=new y(0,0),L=new y(0,0),M=new y(0,0),N=new y(0,0),D=new y(0,0),B=new y(0,0),j=new y(0,0);for(w=0;w<_;){for(k=0;k<16;++k)x[k].high=A[w]<<24|A[w+1]<<16|A[w+2]<<8|A[w+3],x[k].low=A[w+4]<<24|A[w+5]<<16|A[w+6]<<8|A[w+7],w+=8;for(k=16;k<80;++k)i(C=x[k],x[k-2],j),C.add(x[k-7]),a(B,x[k-15],j),C.add(B),C.add(x[k-16]);for(T.assign(h),E.assign(f),R.assign(d),O.assign(p),I.assign(g),F.assign(m),L.assign(v),M.assign(b),k=0;k<80;++k)N.assign(M),n(B,I,j),N.add(B),e(B,I,F,L,j),N.add(B),N.add(o[k]),N.add(x[k]),r(D,T,j),t(B,T,E,R,j),D.add(B),C=M,M=L,L=F,F=I,O.add(N),I=O,O=R,R=E,E=T,C.assign(N),C.add(D),T=C;h.add(T),f.add(E),d.add(R),p.add(O),g.add(I),m.add(F),v.add(L),b.add(M)}return u?(P=new Uint8Array(48),h.copyTo(P,0),f.copyTo(P,8),d.copyTo(P,16),p.copyTo(P,24),g.copyTo(P,32),m.copyTo(P,40)):(P=new Uint8Array(64),h.copyTo(P,0),f.copyTo(P,8),d.copyTo(P,16),p.copyTo(P,24),g.copyTo(P,32),m.copyTo(P,40),v.copyTo(P,48),b.copyTo(P,56)),P}}();t.calculateSHA512=w;var k=function(e,t,r){return w(e,t,r,!0)};t.calculateSHA384=k;var S=function(){function e(){}return e.prototype={decryptBlock:function(e){return e}},e}(),_=function(){function e(){h(this,e),this.constructor===e&&(0,n.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(var t=0;t<256;t++)this._mixCol[t]=t<128?t<<1:t<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}return d(e,[{key:"_expandKey",value:function(e){(0,n.unreachable)("Cannot call `_expandKey` on the base class")}},{key:"_decrypt",value:function(e,t){var r,n,a,i=new Uint8Array(16);i.set(e);for(var o=0,s=this._keySize;o<16;++o,++s)i[o]^=t[s];for(var c=this._cyclesOfRepetition-1;c>=1;--c){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var l=0;l<16;++l)i[l]=this._inv_s[i[l]];for(var u=0,h=16*c;u<16;++u,++h)i[u]^=t[h];for(var f=0;f<16;f+=4){var d=this._mix[i[f]],p=this._mix[i[f+1]],g=this._mix[i[f+2]],m=this._mix[i[f+3]];r=d^p>>>8^p<<24^g>>>16^g<<16^m>>>24^m<<8,i[f]=r>>>24&255,i[f+1]=r>>16&255,i[f+2]=r>>8&255,i[f+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],n=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=n,r=i[15],n=i[11],a=i[7],i[15]=i[3],i[11]=r,i[7]=n,i[3]=a;for(var v=0;v<16;++v)i[v]=this._inv_s[i[v]],i[v]^=t[v];return i}},{key:"_encrypt",value:function(e,t){var r,n,a,i=this._s,o=new Uint8Array(16);o.set(e);for(var s=0;s<16;++s)o[s]^=t[s];for(var c=1;c=p;--d)if(h[d]!==f){f=0;break}u-=f,i[i.length-1]=h.subarray(0,16-f)}}for(var g=new Uint8Array(u),m=0,v=0,y=i.length;m2&&void 0!==arguments[2]?arguments[2]:null,n=e.length,a=this.buffer,i=this.bufferPosition;if(r)this.iv=r;else{for(var o=0;i<16&&o=256&&(s=255&(27^s)));for(var u=0;u<4;++u)r[c]=n^=r[c-32],r[++c]=a^=r[c-32],r[++c]=i^=r[c-32],r[++c]=o^=r[c-32],c++}return r}}]),r}(_);t.AES256Cipher=x;var C=function(){function e(e,t){if(e.length!==t.length)return!1;for(var r=0;ro-32;){var s=t.length+a.length+n.length,c=new Uint8Array(64*s),l=e(t,a);l=e(l,n);for(var u=0,h=0;u<64;u++,h+=s)c.set(l,h);i=new A(a.subarray(0,16)).encrypt(c,a.subarray(16,32));for(var f=0,d=0;d<16;d++)f*=1,f%=3,f+=(i[d]>>>0)%3,f%=3;0===f?a=b(i,0,i.length):1===f?a=k(i,0,i.length):2===f&&(a=w(i,0,i.length)),o++}return a.subarray(0,32)}function r(){}function n(e,t){if(e.length!==t.length)return!1;for(var r=0;r>8&255,f[d++]=i>>16&255,f[d++]=i>>>24&255,l=0,u=t.length;l=4&&!c&&(f[d++]=255,f[d++]=255,f[d++]=255,f[d++]=255);var g=v(f,0,d),m=s>>3;if(o>=3)for(l=0;l<50;++l)g=v(g,0,m);var y,b=g.subarray(0,m);if(o>=3){for(d=0;d<32;++d)f[d]=e[d];for(l=0,u=t.length;l>3;if(n>=3)for(i=0;i<50;++i)u=v(u,0,u.length);if(n>=3){l=r;var f,d=new Uint8Array(h);for(i=19;i>=0;i--){for(f=0;f=4){var L=i.get("CF");(0,a.isDict)(L)&&(L.suppressEncryption=!0),this.cf=L,this.stmf=i.get("StmF")||r,this.strf=i.get("StrF")||r,this.eff=i.get("EFF")||this.stmf}}function o(e,t,r,n){var a,i,o=new Uint8Array(r.length+9);for(a=0,i=r.length;a>8&255,o[a++]=e>>16&255,o[a++]=255&t,o[a++]=t>>8&255,n&&(o[a++]=115,o[a++]=65,o[a++]=108,o[a++]=84),v(o,0,a).subarray(0,Math.min(r.length+5,16))}function s(e,t,r,i,s){if(!(0,a.isName)(t))throw new n.FormatError("Invalid crypt filter name.");var c,l=e.get(t.name);if(null!=l&&(c=l.get("CFM")),!c||"None"===c.name)return function(){return new S};if("V2"===c.name)return function(){return new p(o(r,i,s,!1))};if("AESV2"===c.name)return function(){return new A(o(r,i,s,!0))};if("AESV3"===c.name)return function(){return new x(s)};throw new n.FormatError("Unknown crypto method")}return i.prototype={createCipherTransform:function(e,t){if(4===this.algorithm||5===this.algorithm)return new T(s(this.cf,this.stmf,e,t,this.encryptionKey),s(this.cf,this.strf,e,t,this.encryptionKey));var r=o(e,t,this.encryptionKey,!1),n=function(){return new p(r)};return new T(n,n)}},i}();t.CipherTransformFactory=E},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var n=r(5),a=r(198);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 o(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&&s(e,t)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){var t=function(){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}}();return function(){var r,n=l(e);if(t){var a=l(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;rh&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var d=o<=8?new Uint8Array(h):new Uint16Array(h),p=0;p2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;if(e=t.fetchIfRef(e),(0,a.isName)(e))switch(e.name){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:if((0,a.isDict)(r)){var o=r.get("ColorSpace");if((0,a.isDict)(o)){var s=o.get(e.name);if(s){if((0,a.isName)(s))return this.parseToIR(s,t,r,i);e=s;break}}}throw new n.FormatError("unrecognized colorspace ".concat(e.name))}if(Array.isArray(e)){var c,l,u,h=t.fetchIfRef(e[0]).name;switch(h){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return["CalGrayCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.get("Gamma")];case"CalRGB":return["CalRGBCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.getArray("Gamma"),l.getArray("Matrix")];case"ICCBased":var f=t.fetchIfRef(e[1]).dict;if(c=f.get("N"),u=f.get("Alternate")){var d=this.parseToIR(u,t,r,i);if(this.fromIR(d,i).numComps===c)return d;(0,n.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===c)return"DeviceGrayCS";if(3===c)return"DeviceRgbCS";if(4===c)return"DeviceCmykCS";break;case"Pattern":var p=e[1]||null;return p&&(p=this.parseToIR(p,t,r,i)),["PatternCS",p];case"Indexed":case"I":var g=this.parseToIR(e[1],t,r,i),m=t.fetchIfRef(e[2])+1,v=t.fetchIfRef(e[3]);return(0,a.isStream)(v)&&(v=v.getBytes()),["IndexedCS",g,m,v];case"Separation":case"DeviceN":var y=t.fetchIfRef(e[1]);return["AlternateCS",c=Array.isArray(y)?y.length:1,u=this.parseToIR(e[2],t,r,i),i.create(t.fetchIfRef(e[3]))];case"Lab":return["LabCS",(l=t.fetchIfRef(e[1])).getArray("WhitePoint"),l.getArray("BlackPoint"),l.getArray("Range")];default:throw new n.FormatError('unimplemented color space object "'.concat(h,'"'))}}throw new n.FormatError('unrecognized color space object: "'.concat(e,'"'))}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,n.warn)("The decode map is not the correct length"),!0;for(var r=0,a=e.length;r8?Math.pow((e+16)/116,3):e*h}function y(n,o,c,u,h,f){var d=m(0,1,o[c]*f),y=m(0,1,o[c+1]*f),b=m(0,1,o[c+2]*f),w=Math.pow(d,n.GR),k=Math.pow(y,n.GG),S=Math.pow(b,n.GB),_=n.MXA*w+n.MXB*k+n.MXC*S,A=n.MYA*w+n.MYB*k+n.MYC*S,x=n.MZA*w+n.MZB*k+n.MZC*S,C=s;C[0]=_,C[1]=A,C[2]=x;var P=l;!function(r,n,a){if(1===r[0]&&1===r[2])return a[0]=n[0],a[1]=n[1],void(a[2]=n[2]);var o=a;p(e,n,o);var s=i;!function(e,t,r){r[0]=1*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1*t[2]/e[2]}(r,o,s),p(t,s,a)}(n.whitePoint,C,P);var T=s;!function(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var n=v(0),a=(1-n)/(1-v(e[0])),i=1-a,o=(1-n)/(1-v(e[1])),s=1-o,c=(1-n)/(1-v(e[2])),l=1-c;r[0]=t[0]*a+i,r[1]=t[1]*o+s,r[2]=t[2]*c+l}(n.blackPoint,P,T);var E=l;!function(r,n,a){var o=a;p(e,n,o);var s=i;!function(e,t,r){r[0]=.95047*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1.08883*t[2]/e[2]}(r,o,s),p(t,s,a)}(a,T,E);var R=s;p(r,E,R),u[h]=255*g(R[0]),u[h+1]=255*g(R[1]),u[h+2]=255*g(R[2])}return function(e){o(r,e);var t=c(r);function r(e,a,i,o){var s;if(u(this,r),s=t.call(this,"CalRGB",3),!e)throw new n.FormatError("WhitePoint missing - required for color space CalRGB");a=a||new Float32Array(3),i=i||new Float32Array([1,1,1]),o=o||new Float32Array([1,0,0,0,1,0,0,0,1]);var c=e[0],l=e[1],h=e[2];s.whitePoint=e;var f=a[0],d=a[1],p=a[2];if(s.blackPoint=a,s.GR=i[0],s.GG=i[1],s.GB=i[2],s.MXA=o[0],s.MYA=o[1],s.MZA=o[2],s.MXB=o[3],s.MYB=o[4],s.MZB=o[5],s.MXC=o[6],s.MYC=o[7],s.MZC=o[8],c<0||h<0||1!==l)throw new n.FormatError("Invalid WhitePoint components for ".concat(s.name)+", no fallback available");return(f<0||d<0||p<0)&&((0,n.info)("Invalid BlackPoint for ".concat(s.name," [").concat(f,", ").concat(d,", ").concat(p,"], ")+"falling back to default."),s.blackPoint=new Float32Array(3)),(s.GR<0||s.GG<0||s.GB<0)&&((0,n.info)("Invalid Gamma [".concat(s.GR,", ").concat(s.GG,", ").concat(s.GB,"] for ")+"".concat(s.name,", falling back to default.")),s.GR=s.GG=s.GB=1),s}return f(r,[{key:"getRgbItem",value:function(e,t,r,n){y(this,e,t,r,n,1)}},{key:"getRgbBuffer",value:function(e,t,r,n,a,i,o){for(var s=1/((1<=6/29?e*e*e:108/841*(e-4/29)}function t(e,t,r,n){return r+e*(n-r)/t}function r(r,n,a,i,o,s){var c=n[a],l=n[a+1],u=n[a+2];!1!==i&&(c=t(c,i,0,100),l=t(l,i,r.amin,r.amax),u=t(u,i,r.bmin,r.bmax)),l>r.amax?l=r.amax:lr.bmax?u=r.bmax:uo.amax||o.bmin>o.bmax)&&((0,n.info)("Invalid Range, falling back to defaults"),o.amin=-100,o.amax=100,o.bmin=-100,o.bmax=100),o}return f(a,[{key:"getRgbItem",value:function(e,t,n,a){r(this,e,t,!1,n,a)}},{key:"getRgbBuffer",value:function(e,t,n,a,i,o,s){for(var c=(1<1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}]),e}();t.LocalImageCache=c;var l=function(){function e(){i(this,e),this._refCache=new a.RefSetCache,this._imageCache=new a.RefSetCache}return s(e,null,[{key:"NUM_PAGES_THRESHOLD",get:function(){return(0,n.shadow)(this,"NUM_PAGES_THRESHOLD",2)}},{key:"MAX_IMAGES_TO_CACHE",get:function(){return(0,n.shadow)(this,"MAX_IMAGES_TO_CACHE",10)}}]),s(e,[{key:"shouldCache",value:function(t,r){var n=this._refCache.get(t);return!((n?n.size+(n.has(r)?0:1):1)=e.MAX_IMAGES_TO_CACHE)}},{key:"addPageIndex",value:function(e,t){var r=this._refCache.get(e);r||(r=new Set,this._refCache.put(e,r)),r.add(t)}},{key:"getData",value:function(t,r){if(!this._refCache.has(t))return null;var n=this._refCache.get(t);return n.size=e.MAX_IMAGES_TO_CACHE?(0,n.info)("GlobalImageCache.setData - ignoring image above MAX_IMAGES_TO_CACHE."):this._imageCache.put(t,r))}},{key:"clear",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this._refCache.clear(),this._imageCache.clear()}}]),e}();t.GlobalImageCache=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getQuadPoints=x,t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0;var n=r(5),a=r(203),i=r(198),o=r(216),s=r(201),c=r(219),l=r(205);function u(e,t,r){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(r):a.value}},u(e,t,r||e)}function h(e){return h="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},h(e)}function f(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&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){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}}();return function(){var r,n=m(e);if(t){var a=m(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return g(this,r)}}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,t)||b(e,t)||function(){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 b(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)return null;for(var n=[],a=0,i=r.length/8;at[2]||lt[3])return null;n[a].push({x:c,y:l})}}return n}t.AnnotationFactory=A;var C=function(){function e(t){k(this,e);var r=t.dict;this.setContents(r.get("Contents")),this.setModificationDate(r.get("M")),this.setFlags(r.get("F")),this.setRectangle(r.getArray("Rect")),this.setColor(r.getArray("C")),this.setBorderStyle(r),this.setAppearance(r),this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,contents:this.contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype}}return _(e,[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,n.AnnotationFlag.HIDDEN)&&!this._hasFlag(e,n.AnnotationFlag.NOVIEW)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,n.AnnotationFlag.PRINT)&&!this._hasFlag(e,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,n.AnnotationFlag.HIDDEN)}},{key:"setContents",value:function(e){this.contents=(0,n.stringToPDFString)(e||"")}},{key:"setModificationDate",value:function(e){this.modificationDate=(0,n.isString)(e)?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&e>0?e:0}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){Array.isArray(e)&&4===e.length?this.rectangle=n.Util.normalizeRect(e):this.rectangle=[0,0,0,0]}},{key:"setColor",value:function(e){var t=new Uint8ClampedArray(3);if(Array.isArray(e))switch(e.length){case 0:this.color=null;break;case 1:o.ColorSpace.singletons.gray.getRgbItem(e,0,t,0),this.color=t;break;case 3:o.ColorSpace.singletons.rgb.getRgbItem(e,0,t,0),this.color=t;break;case 4:o.ColorSpace.singletons.cmyk.getRgbItem(e,0,t,0),this.color=t;break;default:this.color=t}else this.color=t}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new P,(0,i.isDict)(e))if(e.has("BS")){var t=e.get("BS"),r=t.get("Type");r&&!(0,i.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){var n=e.getArray("Border");Array.isArray(n)&&n.length>=3&&(this.borderStyle.setHorizontalCornerRadius(n[0]),this.borderStyle.setVerticalCornerRadius(n[1]),this.borderStyle.setWidth(n[2],this.rectangle),4===n.length&&this.borderStyle.setDashArray(n[3]))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if((0,i.isDict)(t)){var r=t.get("N");if((0,i.isStream)(r))this.appearance=r;else if((0,i.isDict)(r)){var n=e.get("AS");(0,i.isName)(n)&&r.has(n.name)&&(this.appearance=r.get(n.name))}}}},{key:"loadResources",value:function(e){return this.appearance.dict.getAsync("Resources").then((function(t){if(t)return new a.ObjectLoader(t,e,t.xref).load().then((function(){return t}))}))}},{key:"getOperatorList",value:function(e,t,r){var a=this;if(!this.appearance)return Promise.resolve(new c.OperatorList);var i=this.data,o=this.appearance.dict,s=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),l=o.getArray("BBox")||[0,0,1,1],u=o.getArray("Matrix")||[1,0,0,1,0,0],h=function(e,t,r){var a=y(n.Util.getAxialAlignedBoundingBox(t,r),4),i=a[0],o=a[1],s=a[2],c=a[3];if(i===s||o===c)return[1,0,0,1,e[0],e[1]];var l=(e[2]-e[0])/(s-i),u=(e[3]-e[1])/(c-o);return[l,0,0,u,e[0]-i*l,e[1]-o*u]}(i.rect,l,u);return s.then((function(r){var o=new c.OperatorList;return o.addOp(n.OPS.beginAnnotation,[i.rect,h,u]),e.getOperatorList({stream:a.appearance,task:t,resources:r,operatorList:o}).then((function(){return o.addOp(n.OPS.endAnnotation,[]),a.appearance.reset(),o}))}))}},{key:"viewable",get:function(){return 0===this.flags||this._isViewable(this.flags)}},{key:"printable",get:function(){return 0!==this.flags&&this._isPrintable(this.flags)}}]),e}();t.Annotation=C;var P=function(){function e(){k(this,e),this.width=1,this.style=n.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return _(e,[{key:"setWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];if((0,i.isName)(e))this.width=0;else if(Number.isInteger(e)){if(e>0){var r=(t[2]-t[0])/2,a=(t[3]-t[1])/2;r>0&&a>0&&(e>r||e>a)&&((0,n.warn)("AnnotationBorderStyle.setWidth - ignoring width: ".concat(e)),e=1)}this.width=e}}},{key:"setStyle",value:function(e){if((0,i.isName)(e))switch(e.name){case"S":this.style=n.AnnotationBorderStyleType.SOLID;break;case"D":this.style=n.AnnotationBorderStyleType.DASHED;break;case"B":this.style=n.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=n.AnnotationBorderStyleType.INSET;break;case"U":this.style=n.AnnotationBorderStyleType.UNDERLINE}}},{key:"setDashArray",value:function(e){if(Array.isArray(e)&&e.length>0){var t,r=!0,n=!0,a=v(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;if(!(+i>=0)){r=!1;break}i>0&&(n=!1)}}catch(e){a.e(e)}finally{a.f()}r&&!n?this.dashArray=e:this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}]),e}();t.AnnotationBorderStyle=P;var T=function(e){f(r,e);var t=p(r);function r(e){var a;k(this,r),a=t.call(this,e);var o=e.dict;if(o.has("IRT")){var s=o.getRaw("IRT");a.data.inReplyTo=(0,i.isRef)(s)?s.toString():null;var c=o.get("RT");a.data.replyType=(0,i.isName)(c)?c.name:n.AnnotationReplyType.REPLY}if(a.data.replyType===n.AnnotationReplyType.GROUP){var l=o.get("IRT");a.data.title=(0,n.stringToPDFString)(l.get("T")||""),a.setContents(l.get("Contents")),a.data.contents=a.contents,l.has("CreationDate")?(a.setCreationDate(l.get("CreationDate")),a.data.creationDate=a.creationDate):a.data.creationDate=null,l.has("M")?(a.setModificationDate(l.get("M")),a.data.modificationDate=a.modificationDate):a.data.modificationDate=null,a.data.hasPopup=l.has("Popup"),l.has("C")?(a.setColor(l.getArray("C")),a.data.color=a.color):a.data.color=null}else a.data.title=(0,n.stringToPDFString)(o.get("T")||""),a.setCreationDate(o.get("CreationDate")),a.data.creationDate=a.creationDate,a.data.hasPopup=o.has("Popup"),o.has("C")||(a.data.color=null);return a}return _(r,[{key:"setCreationDate",value:function(e){this.creationDate=(0,n.isString)(e)?e:null}}]),r}(C);t.MarkupAnnotation=T;var E=function(e){f(r,e);var t=p(r);function r(e){var a;k(this,r),a=t.call(this,e);var o=e.dict,c=a.data;c.annotationType=n.AnnotationType.WIDGET,c.fieldName=a._constructFieldName(o),c.fieldValue=(0,s.getInheritableProperty)({dict:o,key:"V",getArray:!0}),c.alternativeText=(0,n.stringToPDFString)(o.get("TU")||""),c.defaultAppearance=(0,s.getInheritableProperty)({dict:o,key:"DA"})||"";var l=(0,s.getInheritableProperty)({dict:o,key:"FT"});return c.fieldType=(0,i.isName)(l)?l.name:null,a.fieldResources=(0,s.getInheritableProperty)({dict:o,key:"DR"})||i.Dict.empty,c.fieldFlags=(0,s.getInheritableProperty)({dict:o,key:"Ff"}),(!Number.isInteger(c.fieldFlags)||c.fieldFlags<0)&&(c.fieldFlags=0),c.readOnly=a.hasFieldFlag(n.AnnotationFieldFlag.READONLY),"Sig"===c.fieldType&&(c.fieldValue=null,a.setFlags(n.AnnotationFlag.HIDDEN)),a}return _(r,[{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return(0,n.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,n.stringToPDFString)(e.get("T"));var t=[];e.has("T")&&t.unshift((0,n.stringToPDFString)(e.get("T")));for(var r=e;r.has("Parent")&&(r=r.get("Parent"),(0,i.isDict)(r));)r.has("T")&&t.unshift((0,n.stringToPDFString)(r.get("T")));return t.join(".")}},{key:"hasFieldFlag",value:function(e){return!!(this.data.fieldFlags&e)}},{key:"getOperatorList",value:function(e,t,n){return n?Promise.resolve(new c.OperatorList):u(m(r.prototype),"getOperatorList",this).call(this,e,t,n)}}]),r}(C),R=function(e){f(r,e);var t=p(r);function r(e){var a;k(this,r),a=t.call(this,e);var i=e.dict;a.data.fieldValue=(0,n.stringToPDFString)(a.data.fieldValue||"");var o=(0,s.getInheritableProperty)({dict:i,key:"Q"});(!Number.isInteger(o)||o<0||o>2)&&(o=null),a.data.textAlignment=o;var c=(0,s.getInheritableProperty)({dict:i,key:"MaxLen"});return(!Number.isInteger(c)||c<0)&&(c=null),a.data.maxLen=c,a.data.multiLine=a.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE),a.data.comb=a.hasFieldFlag(n.AnnotationFieldFlag.COMB)&&!a.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD)&&!a.hasFieldFlag(n.AnnotationFieldFlag.FILESELECT)&&null!==a.data.maxLen,a}return _(r,[{key:"getOperatorList",value:function(e,t,a){if(a||this.appearance)return u(m(r.prototype),"getOperatorList",this).call(this,e,t,a);var i=new c.OperatorList;if(!this.data.defaultAppearance)return Promise.resolve(i);var o=new l.Stream((0,n.stringToBytes)(this.data.defaultAppearance));return e.getOperatorList({stream:o,task:t,resources:this.fieldResources,operatorList:i}).then((function(){return i}))}}]),r}(E),O=function(e){f(r,e);var t=p(r);function r(e){var a;return k(this,r),(a=t.call(this,e)).data.checkBox=!a.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.radioButton=a.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.pushButton=a.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),a.data.checkBox?a._processCheckBox(e):a.data.radioButton?a._processRadioButton(e):a.data.pushButton?a._processPushButton(e):(0,n.warn)("Invalid field flags for button widget annotation"),a}return _(r,[{key:"_processCheckBox",value:function(e){(0,i.isName)(this.data.fieldValue)&&(this.data.fieldValue=this.data.fieldValue.name);var t=e.dict.get("AP");if((0,i.isDict)(t)){var r=t.get("D");if((0,i.isDict)(r)){var n=r.getKeys();2===n.length&&(this.data.exportValue="Off"===n[0]?n[1]:n[0])}}}},{key:"_processRadioButton",value:function(e){this.data.fieldValue=this.data.buttonValue=null;var t=e.dict.get("Parent");if((0,i.isDict)(t)&&t.has("V")){var r=t.get("V");(0,i.isName)(r)&&(this.data.fieldValue=r.name)}var n=e.dict.get("AP");if((0,i.isDict)(n)){var a=n.get("N");if((0,i.isDict)(a)){var o,s=v(a.getKeys());try{for(s.s();!(o=s.n()).done;){var c=o.value;if("Off"!==c){this.data.buttonValue=c;break}}}catch(e){s.e(e)}finally{s.f()}}}}},{key:"_processPushButton",value:function(e){e.dict.has("A")?a.Catalog.parseDestDictionary({destDict:e.dict,resultObj:this.data,docBaseUrl:e.pdfManager.docBaseUrl}):(0,n.warn)("Push buttons without action dictionaries are not supported")}}]),r}(E),I=function(e){f(r,e);var t=p(r);function r(e){var a;k(this,r),(a=t.call(this,e)).data.options=[];var i=(0,s.getInheritableProperty)({dict:e.dict,key:"Opt"});if(Array.isArray(i))for(var o=e.xref,c=0,l=i.length;c1e3&&(h=Math.max(h,p),g+=d+2,p=0,d=0),f.push({transform:m,x:p,y:g,w:v.width,h:v.height}),p+=v.width+2,d=Math.max(d,v.height)}var y=Math.max(h,p)+1,b=g+d+1,w=new Uint8ClampedArray(y*b*4),k=y<<2;for(u=0;u=0;)S[x-4]=S[x],S[x-3]=S[x+1],S[x-2]=S[x+2],S[x-1]=S[x+3],S[x+_]=S[x+_-4],S[x+_+1]=S[x+_-3],S[x+_+2]=S[x+_-2],S[x+_+3]=S[x+_-1],x-=k}return r.splice(o,4*l,n.OPS.paintInlineImageXObjectGroup),a.splice(o,4*l,[{width:y,height:b,kind:n.ImageKind.RGBA_32BPP,data:w},f]),o+1})),e(t,[n.OPS.save,n.OPS.transform,n.OPS.paintImageMaskXObject,n.OPS.restore],null,(function(e,t){var r=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return r[t]===n.OPS.save;case 1:return r[t]===n.OPS.transform;case 2:return r[t]===n.OPS.paintImageMaskXObject;case 3:return r[t]===n.OPS.restore}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(a))}),(function(e,t){var r,a=e.fnArray,i=e.argsArray,o=e.iCurr,s=o-3,c=o-2,l=o-1,u=Math.floor((t-s)/4);if(u=function(e,t,r,a){for(var i=e+2,o=0;o=4&&r[i-4]===r[o]&&r[i-3]===r[s]&&r[i-2]===r[c]&&r[i-1]===r[l]&&n[i-4][0]===u&&n[i-4][1]===h&&(f++,d-=5);for(var p=d+4,g=1;g=(n=e.length))break}(a=(a||t)[e[r]])&&!Array.isArray(a)?(o.iCurr=r,r++,!a.checkFn||(0,a.checkFn)(o)?(i=a,a=null):a=null):r++}this.state=a,this.match=i,this.lastProcessed=r}else this.lastProcessed=n},push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()},flush:function(){for(;this.match;){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}},reset:function(){this.state=null,this.match=null,this.lastProcessed=0}},r}(),i=function(){function e(e){this.queue=e}return e.prototype={push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t)},flush:function(){},reset:function(){}},e}(),o=function(){function e(e,t,r){this._streamSink=t,this.fnArray=[],this.argsArray=[],this.optimizer=t&&"oplist"!==e?new a(this):new i(this),this.dependencies=Object.create(null),this._totalLength=0,this.pageIndex=r,this.intent=e,this.weight=0,this._resolved=t?null:Promise.resolve()}return e.prototype={get length(){return this.argsArray.length},get ready(){return this._resolved||this._streamSink.ready},get totalLength(){return this._totalLength+this.length},addOp:function(e,t){this.optimizer.push(e,t),this.weight++,this._streamSink&&(this.weight>=1e3||this.weight>=995&&(e===n.OPS.restore||e===n.OPS.endText))&&this.flush()},addDependency:function(e){e in this.dependencies||(this.dependencies[e]=!0,this.addOp(n.OPS.dependency,[e]))},addDependencies:function(e){for(var t in e)this.addDependency(t)},addOpList:function(t){if(t instanceof e){Object.assign(this.dependencies,t.dependencies);for(var r=0,a=t.length;r0&&void 0!==arguments[0]&&arguments[0];this.optimizer.flush();var t=this.length;this._totalLength+=t,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,length:t},1,this._transfers),this.dependencies=Object.create(null),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}},e}();t.OperatorList=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PartialEvaluator=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(221),s=r(198),c=r(222),l=r(225),u=r(201),h=r(228),f=r(227),d=r(231),p=r(204),g=r(232),m=r(216),v=r(205),y=r(226),b=r(233),w=r(234),k=r(217),S=r(236),_=r(219),A=r(237);function x(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function P(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];if(Array.isArray(e)){for(var r=0,a=e.length;r0&&void 0!==arguments[0]?arguments[0]:e,r=Object.create(this);return r.options=t,r},hasBlendModes:function(e){if(!(e instanceof s.Dict))return!1;var t=Object.create(null);e.objId&&(t[e.objId]=!0);for(var r=[e],n=this.xref;r.length;){var a=r.shift(),o=a.get("ExtGState");if(o instanceof s.Dict)for(var c=o.getKeys(),l=0,h=c.length;lm)){r.next=12;break}return(0,i.warn)("Image exceeded maximum allowed size and was removed."),r.abrupt("return",void 0);case 12:if(!f.get("ImageMask","IM")){r.next=25;break}return w=f.get("Width","W"),k=f.get("Height","H"),S=w+7>>3,_=o.getBytes(S*k,!0),x=f.getArray("Decode","D"),(y=A.PDFImage.createMask({imgArray:_,width:w,height:k,imageIsFromDecodeStream:o instanceof v.DecodeStream,inverseDecode:!!x&&x[0]>0})).cached=!!u,b=[y],l.addOp(i.OPS.paintImageMaskXObject,b),u&&h.set(u,d,{fn:i.OPS.paintImageMaskXObject,args:b}),r.abrupt("return",void 0);case 25:if(C=f.get("SMask","SM")||!1,P=f.get("Mask")||!1,!c||C||P||!(p+g<200)){r.next=33;break}return T=new A.PDFImage({xref:t.xref,res:n,image:o,isInline:c,pdfFunctionFactory:t.pdfFunctionFactory}),y=T.createImageData(!0),l.addOp(i.OPS.paintInlineImageXObject,[y]),r.abrupt("return",void 0);case 33:if(E="img_".concat(t.idFactory.createObjId()),R=!1,t.parsingType3Font?E="".concat(t.idFactory.getDocId(),"_type3res_").concat(E):d&&(R=t.globalImageCache.shouldCache(d,t.pageIndex))&&(E="".concat(t.idFactory.getDocId(),"_").concat(E)),l.addDependency(E),b=[E,p,g],O=A.PDFImage.buildImage({xref:t.xref,res:n,image:o,isInline:c,pdfFunctionFactory:t.pdfFunctionFactory}).then((function(e){if(y=e.createImageData(!1),t.parsingType3Font)return t.handler.sendWithPromise("commonobj",[E,"FontType3Res",y],[y.data.buffer]);R?t.handler.send("commonobj",[E,"Image",y],[y.data.buffer]):t.handler.send("obj",[E,t.pageIndex,"Image",y],[y.data.buffer])})).catch((function(e){if((0,i.warn)("Unable to decode image: "+e),t.parsingType3Font)return t.handler.sendWithPromise("commonobj",[E,"FontType3Res",null]);R?t.handler.send("commonobj",[E,"Image",null]):t.handler.send("obj",[E,t.pageIndex,"Image",null])})),!t.parsingType3Font){r.next=41;break}return r.next=41,O;case 41:return l.addOp(i.OPS.paintImageXObject,b),u&&(h.set(u,d,{fn:i.OPS.paintImageXObject,args:b}),d&&((0,i.assert)(!c,"Cannot cache an inline image globally."),t.globalImageCache.addPageIndex(d,t.pageIndex),R&&t.globalImageCache.setData(d,{objId:E,fn:i.OPS.paintImageXObject,args:b}))),r.abrupt("return",void 0);case 44:case"end":return r.stop()}}),r)})))()},handleSMask:function(e,t,r,n,a){var i=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},s=e.get("TR");if((0,w.isPDFFunction)(s)){for(var c=this.pdfFunctionFactory.create(s),l=new Uint8Array(256),u=new Float32Array(1),h=0;h<256;h++)u[0]=h/255,c(u,0,u,0),l[h]=255*u[0]|0;o.transferMap=l}return this.buildFormXObject(t,i,o,r,n,a.state.clone())},handleTilingType:function(e,t,r,n,a,o,c){var l=this,u=new _.OperatorList,h=[a.get("Resources"),r],f=s.Dict.merge(this.xref,h);return this.getOperatorList({stream:n,task:c,resources:f,operatorList:u}).then((function(){return(0,d.getTilingPatternIR)({fnArray:u.fnArray,argsArray:u.argsArray},a,t)})).then((function(t){o.addDependencies(u.dependencies),o.addOp(e,t)}),(function(e){if(!(e instanceof i.AbortException)){if(l.options.ignoreErrors)return l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorTilingPattern}),void(0,i.warn)('handleTilingType - ignoring pattern: "'.concat(e,'".'));throw e}}))},handleSetFont:function(e,t,r,n,a,o){var s,l=this;return t&&(s=(t=t.slice())[0].name),this.loadFont(s,r,e).then((function(t){return t.font.isType3Font?t.loadType3Data(l,e,n,a).then((function(){return t})).catch((function(e){return l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontLoadType3}),new O({loadedName:"g_font_error",font:new c.ErrorFont("Type3 font load error: ".concat(e)),dict:t.font,extraProperties:l.options.fontExtraProperties})})):t})).then((function(e){return o.font=e.font,e.send(l.handler),e.loadedName}))},handleText:function(e,r){var n=r.font,a=n.charsToGlyphs(e);return n.data&&(r.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG||"Pattern"===r.fillColorSpace.name||n.disableFontFace||this.options.disableFontFace)&&t.buildFontPaths(n,a,this.handler),a},ensureStateFont:function(e){if(!e.font){var t=new i.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(this.options.ignoreErrors)return this.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontState}),void(0,i.warn)('ensureStateFont: "'.concat(t,'".'));throw t}},setGState:function(e,t,r,a,o){for(var c=this,l=[],u=t.getKeys(),h=Promise.resolve(),f=function(){var f=u[d],p=t.get(f);switch(f){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":l.push([f,p]);break;case"Font":h=h.then((function(){return c.handleSetFont(e,null,p[0],r,a,o.state).then((function(e){r.addDependency(e),l.push([f,[e,p[1]]])}))}));break;case"BM":l.push([f,n(p)]);break;case"SMask":if((0,s.isName)(p,"None")){l.push([f,!1]);break}(0,s.isDict)(p)?(h=h.then((function(){return c.handleSMask(p,e,r,a,o)})),l.push([f,!0])):(0,i.warn)("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,i.info)("graphic state operator "+f);break;default:(0,i.info)("Unknown graphic state operator "+f)}},d=0,p=u.length;d0&&r.addOp(i.OPS.setGState,[l])}))},loadFont:function(e,r,n){var a,o=this,l=function(){return Promise.resolve(new O({loadedName:"g_font_error",font:new c.ErrorFont('Font "'.concat(e,'" is not available.')),dict:r,extraProperties:o.options.fontExtraProperties}))},u=this.xref;if(r){if(!(0,s.isRef)(r))throw new i.FormatError('The "font" object should be a reference.');a=r}else{var h=n.get("Font");h&&(a=h.getRaw(e))}if(!a){var f='Font "'.concat(e||r&&r.toString(),'" is not available');if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,i.warn)("".concat(f,".")),l();this.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontMissing}),(0,i.warn)("".concat(f," -- attempting to fallback to a default font.")),a=t.getFallbackFontDict()}if(this.fontCache.has(a))return this.fontCache.get(a);if(r=u.fetchIfRef(a),!(0,s.isDict)(r))return l();if(r.translated)return r.translated;var d,p,g=(0,i.createPromiseCapability)(),m=this.preEvaluateFont(r),v=m.descriptor,y=m.hash,b=(0,s.isRef)(a);if(b&&(d=a.toString()),y&&(0,s.isDict)(v)){v.fontAliases||(v.fontAliases=Object.create(null));var w=v.fontAliases;if(w[y]){var k=w[y].aliasRef;if(b&&k&&this.fontCache.has(k))return this.fontCache.putAlias(a,k),this.fontCache.get(a)}else w[y]={fontID:c.Font.getFontID()};b&&(w[y].aliasRef=a),d=w[y].fontID}b?this.fontCache.put(a,g.promise):(d||(d=this.idFactory.createObjId()),this.fontCache.put("id_".concat(d),g.promise)),(0,i.assert)(d,'The "fontID" must be defined.'),r.loadedName="".concat(this.idFactory.getDocId(),"_f").concat(d),r.translated=g.promise;try{p=this.translateFont(m)}catch(e){p=Promise.reject(e)}return p.then((function(e){void 0!==e.fontType&&(u.stats.fontTypes[e.fontType]=!0),g.resolve(new O({loadedName:r.loadedName,font:e,dict:r,extraProperties:o.options.fontExtraProperties}))})).catch((function(e){o.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorFontTranslate});try{var t=v&&v.get("FontFile3"),n=t&&t.get("Subtype"),a=(0,c.getFontType)(m.type,n&&n.name);u.stats.fontTypes[a]=!0}catch(e){}g.resolve(new O({loadedName:r.loadedName,font:new c.ErrorFont(e instanceof Error?e.message:e),dict:r,extraProperties:o.options.fontExtraProperties}))})),g.promise},buildPath:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=e.length-1;if(r||(r=[]),a<0||e.fnArray[a]!==i.OPS.constructPath)n&&((0,i.warn)('Encountered path operator "'.concat(t,'" inside of a text object.')),e.addOp(i.OPS.save,null)),e.addOp(i.OPS.constructPath,[[t],r]),n&&e.addOp(i.OPS.restore,null);else{var o=e.argsArray[a];o[0].push(t),Array.prototype.push.apply(o[1],r)}},parseColorSpace:function(e){var t=this,r=e.cs,n=e.resources;return new Promise((function(e){e(m.ColorSpace.parse(r,t.xref,n,t.pdfFunctionFactory))})).catch((function(e){if(e instanceof i.AbortException)return null;if(t.options.ignoreErrors)return t.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.errorColorSpace}),(0,i.warn)('parseColorSpace - ignoring ColorSpace: "'.concat(e,'".')),null;throw e}))},handleColorN:function(e,t,r,n,o,c,l){var u=this;return E(a.default.mark((function h(){var f,p,g,m,v,y,b;return a.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(f=r[r.length-1],!(0,s.isName)(f)||!(p=o.get(f.name))){a.next=16;break}if(g=(0,s.isStream)(p)?p.dict:p,1!==(m=g.get("PatternType"))){a.next=9;break}return v=n.base?n.base.getRgb(r,0):null,a.abrupt("return",u.handleTilingType(t,v,c,p,g,e,l));case 9:if(2!==m){a.next=15;break}return y=g.get("Shading"),b=g.getArray("Matrix"),p=d.Pattern.parseShading(y,b,u.xref,c,u.handler,u.pdfFunctionFactory),e.addOp(t,p.getIR()),a.abrupt("return",void 0);case 15:throw new i.FormatError("Unknown PatternType: ".concat(m));case 16:throw new i.FormatError("Unknown PatternName: ".concat(f));case 17:case"end":return a.stop()}}),h)})))()},getOperatorList:function(e){var t=this,n=e.stream,a=e.task,o=e.resources,c=e.operatorList,l=e.initialState,u=void 0===l?null:l;if(o=o||s.Dict.empty,u=u||new L,!c)throw new Error('getOperatorList: missing "operatorList" parameter');var h=this,f=this.xref,g=!1,v=new k.LocalImageCache,y=o.get("XObject")||s.Dict.empty,b=o.get("Pattern")||s.Dict.empty,w=new I(u),S=new M(n,f,w),_=new r;function A(e){for(var t=0,r=S.savedStatesDepth;t0&&(t[3]*=r*w.fontMatrix[3])}var n=i.Util.transform(w.ctm,i.Util.transform(w.textMatrix,t));A.transform=n,e.vertical?(A.width=Math.sqrt(n[0]*n[0]+n[1]*n[1]),A.height=0,A.vertical=!0):(A.width=0,A.height=Math.sqrt(n[2]*n[2]+n[3]*n[3]),A.vertical=!1);var a=w.textLineMatrix[0],o=w.textLineMatrix[1],s=Math.sqrt(a*a+o*o);a=w.ctm[0],o=w.ctm[1];var c=Math.sqrt(a*a+o*o);A.textAdvanceScale=c*s,A.lastAdvanceWidth=0,A.lastAdvanceHeight=0;var l=e.spaceWidth/1e3*w.fontSize;return l?(A.spaceWidth=l,A.fakeSpaceMin=l*x,A.fakeMultiSpaceMin=l*C,A.fakeMultiSpaceMax=l*P,A.textRunBreakAllowed=!e.isMonospace):(A.spaceWidth=0,A.fakeSpaceMin=1/0,A.fakeMultiSpaceMin=1/0,A.fakeMultiSpaceMax=0,A.textRunBreakAllowed=!1),A.initialized=!0,A}function D(e){for(var t,r=0,n=e.length;r=32&&t<=127;)r++;return r0&&U(d,r.str)}var p=0,g=0;t.vertical?a+=g=c*w.fontMatrix[0]*w.fontSize+f:n+=p=(c*w.fontMatrix[0]*w.fontSize+f)*w.textHScale,w.translateTextMatrix(p,g),r.str.push(l)}return t.vertical?(r.lastAdvanceHeight=a,r.height+=Math.abs(a)):(r.lastAdvanceWidth=n,r.width+=n),r}function U(e,t){if(!(e0;)t.push(" ")}function q(){var e,t,r;A.initialized&&(A.vertical?A.height*=A.textAdvanceScale:A.width*=A.textAdvanceScale,_.items.push((t=(e=A).str.join(""),r=(0,g.bidi)(t,-1,e.vertical),{str:f?D(r.str):r.str,dir:r.dir,width:e.width,height:e.height,transform:e.transform,fontName:e.fontName})),A.initialized=!1,A.str.length=0)}function z(){var e=_.items.length;e>0&&(v.enqueue(_,e),_.items=[],_.styles=Object.create(null))}var G=new r;return new Promise((function e(t,r){var n=function(n){z(),Promise.all([n,v.ready]).then((function(){try{e(t,r)}catch(e){r(e)}}),r)};a.ensureNotTerminated(),G.reset();for(var c,u={},h=[];!(c=G.check())&&(h.length=0,u.args=h,L.read(u));){w=l.state;var d,g=u.fn;switch(h=u.args,0|g){case i.OPS.setFont:var y=h[0].name,k=h[1];if(w.font&&y===w.fontName&&k===w.fontSize)break;return q(),w.fontName=y,w.fontSize=k,void n(B(y,null));case i.OPS.setTextRise:q(),w.textRise=h[0];break;case i.OPS.setHScale:q(),w.textHScale=h[0]/100;break;case i.OPS.setLeading:q(),w.leading=h[0];break;case i.OPS.moveText:var S=!!w.font&&0===(w.font.vertical?h[0]:h[1]);if(d=h[0]-h[1],m&&S&&A.initialized&&d>0&&d<=A.fakeMultiSpaceMax){w.translateTextLineMatrix(h[0],h[1]),A.width+=h[0]-A.lastAdvanceWidth,A.height+=h[1]-A.lastAdvanceHeight,U(h[0]-A.lastAdvanceWidth-(h[1]-A.lastAdvanceHeight),A.str);break}q(),w.translateTextLineMatrix(h[0],h[1]),w.textMatrix=w.textLineMatrix.slice();break;case i.OPS.setLeadingMoveText:q(),w.leading=-h[1],w.translateTextLineMatrix(h[0],h[1]),w.textMatrix=w.textLineMatrix.slice();break;case i.OPS.nextLine:q(),w.carriageReturn();break;case i.OPS.setTextMatrix:if(d=w.calcTextLineMatrixAdvance(h[0],h[1],h[2],h[3],h[4],h[5]),m&&null!==d&&A.initialized&&d.value>0&&d.value<=A.fakeMultiSpaceMax){w.translateTextLineMatrix(d.width,d.height),A.width+=d.width-A.lastAdvanceWidth,A.height+=d.height-A.lastAdvanceHeight,U(d.width-A.lastAdvanceWidth-(d.height-A.lastAdvanceHeight),A.str);break}q(),w.setTextMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),w.setTextLineMatrix(h[0],h[1],h[2],h[3],h[4],h[5]);break;case i.OPS.setCharSpacing:w.charSpacing=h[0];break;case i.OPS.setWordSpacing:w.wordSpacing=h[0];break;case i.OPS.beginText:q(),w.textMatrix=i.IDENTITY_MATRIX.slice(),w.textLineMatrix=i.IDENTITY_MATRIX.slice();break;case i.OPS.showSpacedText:if(!l.state.font){T.ensureStateFont(l.state);continue}for(var x,C=h[0],P=0,F=C.length;PA.fakeMultiSpaceMax)||(A.height+=x)):(x=(d=-d)*w.textHScale,w.translateTextMatrix(x,0),(M=A.textRunBreakAllowed&&d>A.fakeMultiSpaceMax)||(A.width+=x)),M?q():d>0&&U(d,A.str)}break;case i.OPS.showText:if(!l.state.font){T.ensureStateFont(l.state);continue}j(h[0]);break;case i.OPS.nextLineShowText:if(!l.state.font){T.ensureStateFont(l.state);continue}q(),w.carriageReturn(),j(h[0]);break;case i.OPS.nextLineSetSpacingShowText:if(!l.state.font){T.ensureStateFont(l.state);continue}q(),w.wordSpacing=h[0],w.charSpacing=h[1],w.carriageReturn(),j(h[2]);break;case i.OPS.paintXObject:q(),R||(R=o.get("XObject")||s.Dict.empty);var D=h[0].name;if(D&&O.getByName(D))break;return void n(new Promise((function(e,t){if(!D)throw new i.FormatError("XObject must be referred to by name.");var r=R.getRaw(D);if(r instanceof s.Ref){if(O.getByRef(r))return void e();r=E.fetch(r)}if(r){if(!(0,s.isStream)(r))throw new i.FormatError("XObject should be a stream");var n=r.dict.get("Subtype");if(!(0,s.isName)(n))throw new i.FormatError("XObject should have a Name subtype");if("Form"!==n.name)return O.set(D,r.dict.objId,!0),void e();var c=l.state.clone(),u=new I(c),h=r.dict.getArray("Matrix");Array.isArray(h)&&6===h.length&&u.transform(h),z();var d={enqueueInvoked:!1,enqueue:function(e,t){this.enqueueInvoked=!0,v.enqueue(e,t)},get desiredSize(){return v.desiredSize},get ready(){return v.ready}};T.getTextContent({stream:r,task:a,resources:r.dict.get("Resources")||o,stateManager:u,normalizeWhitespace:f,combineTextItems:m,sink:d,seenStyles:b}).then((function(){d.enqueueInvoked||O.set(D,r.dict.objId,!0),e()}),t)}else e()})).catch((function(e){if(!(e instanceof i.AbortException)){if(!T.options.ignoreErrors)throw e;(0,i.warn)('getTextContent - ignoring XObject: "'.concat(e,'".'))}})));case i.OPS.setGState:q();var W=h[0],H=o.get("ExtGState");if(!(0,s.isDict)(H)||!(0,s.isName)(W))break;var V=H.get(W.name);if(!(0,s.isDict)(V))break;var X=V.get("Font");if(X)return w.fontName=null,w.fontSize=X[1],void n(B(null,X[0]))}if(_.items.length>=v.desiredSize){c=!0;break}}c?n(p):(q(),z(),t())})).catch((function(e){if(!(e instanceof i.AbortException)){if(t.options.ignoreErrors)return(0,i.warn)('getTextContent - ignoring errors during "'.concat(a.name,'" ')+'task: "'.concat(e,'".')),q(),void z();throw e}}))},extractDataStructures:function(e,t,r){var n,a=this,o=this.xref,u=e.get("ToUnicode")||t.get("ToUnicode"),h=u?this.readToUnicode(u):Promise.resolve(void 0);if(r.composite){var f=e.get("CIDSystemInfo");(0,s.isDict)(f)&&(r.cidSystemInfo={registry:(0,i.stringToPDFString)(f.get("Registry")),ordering:(0,i.stringToPDFString)(f.get("Ordering")),supplement:f.get("Supplement")});var d=e.get("CIDToGIDMap");(0,s.isStream)(d)&&(n=d.getBytes())}var p,g=[],m=null;if(e.has("Encoding")){if(p=e.get("Encoding"),(0,s.isDict)(p)){if(m=p.get("BaseEncoding"),m=(0,s.isName)(m)?m.name:null,p.has("Differences"))for(var v=p.get("Differences"),y=0,b=0,w=v.length;b0,r.dict=e,h.then((function(e){return r.toUnicode=e,a.buildToUnicode(r)})).then((function(e){return r.toUnicode=e,n&&(r.cidToGidMap=a.readCidToGidMap(n,e)),r}))},_buildSimpleFontToUnicode:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,i.assert)(!e.composite,"Must be a simple font.");var r=[],n=e.defaultEncoding.slice(),a=e.baseEncodingName,o=e.differences;for(var s in o){var u=o[s];".notdef"!==u&&(n[s]=u)}var f=(0,y.getGlyphsUnicode)();for(var d in n){var p=n[d];if(""!==p)if(void 0!==f[p])r[d]=String.fromCharCode(f[p]);else{var g=0;switch(p[0]){case"G":3===p.length&&(g=parseInt(p.substring(1),16));break;case"g":5===p.length&&(g=parseInt(p.substring(1),16));break;case"C":case"c":if(p.length>=3&&p.length<=4){var m=p.substring(1);if(t){g=parseInt(m,16);break}if(g=+m,Number.isNaN(g)&&Number.isInteger(parseInt(m,16)))return this._buildSimpleFontToUnicode(e,!0)}break;default:var v=(0,h.getUnicodeForGlyph)(p,f);-1!==v&&(g=v)}if(g>0&&g<=1114111&&Number.isInteger(g)){if(a&&g===+d){var b=(0,l.getEncoding)(a);if(b&&(p=b[d])){r[d]=String.fromCharCode(f[p]);continue}}r[d]=String.fromCodePoint(g)}}}return new c.ToUnicodeMap(r)},buildToUnicode:function(e){if(e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._buildSimpleFontToUnicode(e)),Promise.resolve(e.toUnicode);if(!e.composite)return Promise.resolve(this._buildSimpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof o.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){var t=e.cidSystemInfo.registry,r=e.cidSystemInfo.ordering,n=s.Name.get(t+"-"+r+"-UCS2");return o.CMapFactory.create({encoding:n,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(t){var r=e.cMap,n=[];return r.forEach((function(e,r){if(r>65535)throw new i.FormatError("Max size of CID is 65,535");var a=t.lookup(r);a&&(n[e]=String.fromCharCode((a.charCodeAt(0)<<8)+a.charCodeAt(1)))})),new c.ToUnicodeMap(n)}))}return Promise.resolve(new c.IdentityToUnicodeMap(e.firstChar,e.lastChar))},readToUnicode:function(e){var t=this,r=e;return(0,s.isName)(r)?o.CMapFactory.create({encoding:r,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(e){return e instanceof o.IdentityCMap?new c.IdentityToUnicodeMap(0,65535):new c.ToUnicodeMap(e.getMap())})):(0,s.isStream)(r)?o.CMapFactory.create({encoding:r,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then((function(e){if(e instanceof o.IdentityCMap)return new c.IdentityToUnicodeMap(0,65535);var t=new Array(e.length);return e.forEach((function(e,r){for(var n=[],a=0;a>1;(0!==i||t.has(o))&&(r[o]=i)}return r},extractWidths:function(e,t,r){var n,a,i,o,l,u,h,f,d=this.xref,p=[],g=0,m=[];if(r.composite){if(g=e.has("DW")?e.get("DW"):1e3,f=e.get("W"))for(a=0,i=f.length;ac&&(0,i.info)("Command ".concat(n,": expected [0, ").concat(c,"] args, ")+"but received ".concat(l," args."));else{if(l!==c){for(var u=this.nonProcessedArgs;l>c;)u.push(t.shift()),l--;for(;l=i.OPS.moveTo&&o<=i.OPS.endPath&&++this._numInvalidPathOPS>20)throw new i.FormatError("Invalid ".concat(h));(0,i.warn)("Skipping ".concat(h)),null!==t&&(t.length=0);continue}}return this.preprocessCommand(o,t),e.fn=o,e.args=t,!0}if(r===s.EOF)return!1;if(null!==r&&(null===t&&(t=[]),t.push(r),t.length>33))throw new i.FormatError("Too many arguments")}},preprocessCommand:function(e,t){switch(0|e){case i.OPS.save:this.stateManager.save();break;case i.OPS.restore:this.stateManager.restore();break;case i.OPS.transform:this.stateManager.transform(t)}}},t}()},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CMapFactory=t.IdentityCMap=t.CMap=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5),o=r(198),s=r(204),c=r(201),l=r(205);function u(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function h(e){return h="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},h(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){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}}();return function(){var r,n=p(e);if(t){var a=p(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function g(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&&void 0!==arguments[0]&&arguments[0];g(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}return v(e,[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>b)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var n=r.length-1;e<=t;)this._map[e++]=r,r=r.substring(0,n)+String.fromCharCode(r.charCodeAt(n)+1)}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>b)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var n=r.length,a=0;e<=t&&a>>0;for(var s=a[i],c=0,l=s.length;c=u&&n<=h)return r.charcode=n,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}]),e}();t.CMap=w;var k=function(e){!function(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&&f(e,t)}(r,e);var t=d(r);function r(e,n){var a;return g(this,r),(a=t.call(this)).vertical=e,a.addCodespaceRange(n,0,65535),a}return v(r,[{key:"mapCidRange",value:function(e,t,r){(0,i.unreachable)("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){(0,i.unreachable)("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){(0,i.unreachable)("should not access .isIdentityCMap")}}]),r}(w);t.IdentityCMap=k;var S=function(){function e(e,t){for(var r=0,n=0;n<=t;n++)r=r<<8|e[n];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){for(var n=0,a=r;a>=0;a--)n+=e[a]+t[a],e[a]=255&n,n>>=8}function n(e,t){for(var r=1,n=t;n>=0&&r>0;n--)r+=e[n],e[n]=255&r,r>>=8}var a=16,o=19;function s(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(o)}function c(){}return s.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new i.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t},readSigned:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1},readHex:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1},readHexNumber:function(e,t){var r,n=this.tmpBuf,a=0;do{var o=this.readByte();if(o<0)throw new i.FormatError("unexpected EOF in bcmap");r=!(128&o),n[a++]=127&o}while(!r);for(var s=t,c=0,l=0;s>=0;){for(;l<8&&n.length>0;)c=n[--a]<>=8,l-=8}},readHexSigned:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,n=0,a=0;a<=t;a++)n=(1&n)<<8|e[a],e[a]=n>>1^r},readString:function(){for(var e=this.readNumber(),t="",r=0;r=0;){var k=p>>5;if(7!==k){var S=!!(16&p),_=15&p;if(_+1>a)throw new Error("processBinaryCMap: Invalid dataSize.");var A,x=h.readNumber();switch(k){case 0:for(h.readHex(m,_),h.readHexNumber(v,_),r(v,m,_),o.addCodespaceRange(_+1,e(m,_),e(v,_)),A=1;A>>0}function t(e){if(!(0,i.isString)(e))throw new i.FormatError("Malformed CMap: expected string.")}function r(e){if(!Number.isInteger(e))throw new i.FormatError("Malformed CMap: expected int.")}function n(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfchar"))return;t(a);var i=e(a);t(a=n.getObj());var s=a;r.mapOne(i,s)}}function h(r,n){for(;;){var a=n.getObj();if((0,o.isEOF)(a))break;if((0,o.isCmd)(a,"endbfrange"))return;t(a);var s=e(a);t(a=n.getObj());var c=e(a);if(a=n.getObj(),Number.isInteger(a)||(0,i.isString)(a)){var l=Number.isInteger(a)?String.fromCharCode(a):a;r.mapBfRange(s,c,l)}else{if(!(0,o.isCmd)(a,"["))break;a=n.getObj();for(var u=[];!(0,o.isCmd)(a,"]")&&!(0,o.isEOF)(a);)u.push(a),a=n.getObj();r.mapBfRangeToArray(s,c,u)}}throw new i.FormatError("Invalid bf range.")}function f(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidchar"))return;t(i);var s=e(i);r(i=a.getObj());var c=i;n.mapOne(s,c)}}function d(n,a){for(;;){var i=a.getObj();if((0,o.isEOF)(i))break;if((0,o.isCmd)(i,"endcidrange"))return;t(i);var s=e(i);t(i=a.getObj());var c=e(i);r(i=a.getObj());var l=i;n.mapCidRange(s,c,l)}}function p(t,r){for(;;){var n=r.getObj();if((0,o.isEOF)(n))break;if((0,o.isCmd)(n,"endcodespacerange"))return;if(!(0,i.isString)(n))break;var a=e(n);if(n=r.getObj(),!(0,i.isString)(n))break;var s=e(n);t.addCodespaceRange(n.length,a,s)}throw new i.FormatError("Invalid codespace range.")}function g(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function m(e,t){var r=t.getObj();(0,o.isName)(r)&&(0,i.isString)(r.name)&&(e.name=r.name)}function v(e,t,r,a){var s,l;e:for(;;)try{var u=t.getObj();if((0,o.isEOF)(u))break;if((0,o.isName)(u))"WMode"===u.name?g(e,t):"CMapName"===u.name&&m(e,t),s=u;else if((0,o.isCmd)(u))switch(u.cmd){case"endcmap":break e;case"usecmap":(0,o.isName)(s)&&(l=s.name);break;case"begincodespacerange":p(e,t);break;case"beginbfchar":n(e,t);break;case"begincidchar":f(e,t);break;case"beginbfrange":h(e,t);break;case"begincidrange":d(e,t)}}catch(e){if(e instanceof c.MissingDataException)throw e;(0,i.warn)("Invalid cMap data: "+e);continue}return!a&&l&&(a=l),a?b(e,r,a):Promise.resolve(e)}function b(e,t,r){return _(r,t).then((function(t){if(e.useCMap=t,0===e.numCodespaceRanges){for(var r=e.useCMap.codespaceRanges,n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];this._map=e}return e.prototype={get length(){return this._map.length},forEach:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))},has:function(e){return void 0!==this._map[e]},get:function(e){return this._map[e]},charCodeOf:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1},amend:function(e){for(var t in e)this._map[t]=e[t]}},e}();t.ToUnicodeMap=T;var E=function(){function e(e,t){this.firstChar=e,this.lastChar=t}return e.prototype={get length(){return this.lastChar+1-this.firstChar},forEach:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)},has:function(e){return this.firstChar<=e&&e<=this.lastChar},get:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)},charCodeOf:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1},amend:function(e){(0,n.unreachable)("Should not call amend()")}},e}();t.IdentityToUnicodeMap=E;var R=function(){function e(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function t(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function r(e,t,r){var n,a;if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(n=0,a=r.length;nr;)r<<=1,n++;var a=r*t;return{range:a,entry:n,rangeShift:t*e-a}},a.prototype={toArray:function(){var i=this.sfnt,o=this.tables,s=Object.keys(o);s.sort();var c,u,h,f,d,p=s.length,g=12+16*p,m=[g];for(c=0;c>>0,m.push(g);var v=new Uint8Array(g);for(c=0;c>>0;t(v,g+4,b),t(v,g+8,m[c]),t(v,g+12,o[d].length),g+=16}return v},addTable:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}},a}(),O=function(){function e(e,t,r){var a;this.name=e,this.loadedName=r.loadedName,this.isType3Font=r.isType3Font,this.missingFile=!1,this.glyphCache=Object.create(null),this.isSerifFont=!!(r.flags&S.Serif),this.isSymbolicFont=!!(r.flags&S.Symbolic),this.isMonospace=!!(r.flags&S.FixedPitch);var i=r.type,o=r.subtype;this.type=i,this.subtype=o;var s="sans-serif";if(this.isMonospace?s="monospace":this.isSerifFont&&(s="serif"),this.fallbackName=s,this.differences=r.differences,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.composite=r.composite,this.cMap=r.cMap,this.ascent=r.ascent/y,this.descent=r.descent/y,this.fontMatrix=r.fontMatrix,this.bbox=r.bbox,this.defaultEncoding=r.defaultEncoding,this.toUnicode=r.toUnicode,this.fallbackToUnicode=r.fallbackToUnicode||new T,this.toFontChar=[],"Type3"!==r.type){if(this.cidEncoding=r.cidEncoding,this.vertical=!!r.vertical,this.vertical&&(this.vmetrics=r.vmetrics,this.defaultVMetrics=r.defaultVMetrics),!t||t.isEmpty)return t&&(0,n.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")"),void this.fallbackToSystemFont();var c=function(e,t){var r,a,i=t.type,o=t.subtype,s=t.composite;return function(e){var t=e.peekBytes(4);return 65536===(0,l.readUint32)(t,0)||"true"===(0,n.bytesToString)(t)}(e)||I(e)?r=s?"CIDFontType2":"TrueType":function(e){var t=e.peekBytes(4);return"OTTO"===(0,n.bytesToString)(t)}(e)?r=s?"CIDFontType2":"OpenType":function(e){var t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?r=s?"CIDFontType0":"MMType1"===i?"MMType1":"Type1":function(e){var t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e)?s?(r="CIDFontType0",a="CIDFontType0C"):(r="MMType1"===i?"MMType1":"Type1",a="Type1C"):((0,n.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),r=i,a=o),[r,a]}(t,r),u=p(c,2);i=u[0],o=u[1],i===this.type&&o===this.subtype||(0,n.info)("Inconsistent font file Type/SubType, expected: "+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(i,"/").concat(o,"."));try{var h;switch(i){case"MMType1":(0,n.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var f="Type1C"===o||"CIDFontType0C"===o?new M(t,r):new L(e,t,r);A(r),h=this.convert(e,f,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",h=this.checkAndRepair(e,t,r),this.isOpenType&&(A(r),i="OpenType");break;default:throw new n.FormatError("Font ".concat(i," is not supported"))}}catch(e){return(0,n.warn)(e),void this.fallbackToSystemFont()}this.data=h,this.fontType=x(i,o),this.fontMatrix=r.fontMatrix,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.toUnicode=r.toUnicode,this.seacMap=r.seacMap}else{for(a=0;a<256;a++)this.toFontChar[a]=this.differences[a]||r.defaultEncoding[a];this.fontType=n.FontType.TYPE3}}var t;function r(e,t){return(e<<8)+t}function d(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function m(e){return String.fromCharCode(e>>8&255,255&e)}function O(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function I(e){var t=e.peekBytes(4);return"ttcf"===(0,n.bytesToString)(t)}function F(e,t,r){for(var n,a=[],i=0,o=e.length;ic){if(++o>=v.length){(0,n.warn)("Ran out of space in font private use area.");break}s=v[o][0],c=v[o][1]}var h=s++;0===u&&(u=r),a[h]=u,i[l]=h}}return{toFontChar:i,charCodeToGlyphId:a,nextAvailableFontCharCode:s}}function D(e,t){var r,a,i,o,s=function(e,t){var r=[];for(var n in e)e[n]>=t||r.push({fontCharCode:0|n,glyphId:e[n]});0===r.length&&r.push({fontCharCode:0,glyphId:0}),r.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));for(var a=[],i=r.length,o=0;o65535?2:1,l="\0\0"+m(c)+"\0\0"+(0,n.string32)(4+8*c);for(r=s.length-1;r>=0&&!(s[r][0]<=65535);--r);var u=r+1;s[r][0]<65535&&65535===s[r][1]&&(s[r][1]=65534);var h,f,d,p,g=s[r][1]<65535?1:0,v=u+g,y=R.getSearchParams(v,2),b="",w="",k="",S="",_="",A=0;for(r=0,a=u;r0&&(w+="ÿÿ",b+="ÿÿ",k+="\0",S+="\0\0");var P="\0\0"+m(2*v)+m(y.range)+m(y.entry)+m(y.rangeShift)+w+"\0\0"+b+k+S+_,T="",E="";if(c>1){for(l+="\0\0\n"+(0,n.string32)(4+8*c+4+P.length),T="",r=0,a=s.length;r(h|=0)||!l)&&(l=h),u 123 are reserved for internal usage");s|=1<65535&&(u=65535)}else l=0,u=255;var d=e.bbox||[0,0,0,0],p=r.unitsPerEm||1/(e.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],g=e.ascentScaled?1:p/y,v=r.ascent||Math.round(g*(e.ascent||d[3])),b=r.descent||Math.round(g*(e.descent||d[1]));b>0&&e.descent>0&&d[1]<0&&(b=-b);var w=r.yMax||v,k=-r.yMin||-b;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,n.string32)(a)+(0,n.string32)(i)+(0,n.string32)(o)+(0,n.string32)(s)+"*21*"+m(e.italicAngle?1:0)+m(l||e.firstChar)+m(u||e.lastChar)+m(v)+m(b)+"\0d"+m(w)+m(k)+"\0\0\0\0\0\0\0\0"+m(e.xHeight)+m(e.capHeight)+m(0)+m(l||e.firstChar)+"\0"}function j(e){var t=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+(0,n.string32)(t)+"\0\0\0\0"+(0,n.string32)(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function U(e,t){t||(t=[[],[]]);var r,n,a,i,o,s=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||"",t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],c=[];for(r=0,n=s.length;r0&&void 0!==arguments[0]&&arguments[0]?[].concat(w,k):w,a=Object.create(null),i=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(n);try{for(i.s();!(r=i.n()).done;)void 0!==(t=this[e=r.value])&&(a[e]=t)}catch(e){i.e(e)}finally{i.f()}return a},fallbackToSystemFont:function(){var e=this;this.missingFile=!0;var t=this.name,r=this.type,a=this.subtype,l=t.replace(/[,_]/g,"-").replace(/\s/g,""),u=(0,s.getStdFontMap)(),h=(0,s.getNonStdFontMap)(),f=!!u[l]||!(!h[l]||!u[h[l]]);if(l=u[l]||h[l]||l,this.bold=-1!==l.search(/bold/gi),this.italic=-1!==l.search(/oblique/gi)||-1!==l.search(/italic/gi),this.black=-1!==t.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,f&&"CIDFontType2"===r&&this.cidEncoding.startsWith("Identity-")){var d=(0,s.getGlyphMapForStandardFonts)(),p=[];for(var g in d)p[+g]=d[g];if(/Arial-?Black/i.test(t)){var m=(0,s.getSupplementalGlyphMapForArialBlack)();for(var v in m)p[+v]=m[v]}else if(/Calibri/i.test(t)){var y=(0,s.getSupplementalGlyphMapForCalibri)();for(var b in y)p[+b]=y[b]}this.toUnicode instanceof E||this.toUnicode.forEach((function(e,t){p[+e]=t})),this.toFontChar=p,this.toUnicode=new T(p)}else if(/Symbol/i.test(l))this.toFontChar=F(o.SymbolSetEncoding,(0,i.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(l))/Wingdings/i.test(t)&&(0,n.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."),this.toFontChar=F(o.ZapfDingbatsEncoding,(0,i.getDingbatsGlyphsUnicode)(),this.differences);else if(f)this.toFontChar=F(this.defaultEncoding,(0,i.getGlyphsUnicode)(),this.differences);else{var w=(0,i.getGlyphsUnicode)(),k=[];if(this.toUnicode.forEach((function(t,r){if(!e.composite){var n=e.differences[t]||e.defaultEncoding[t],a=(0,c.getUnicodeForGlyph)(n,w);-1!==a&&(r=a)}k[+t]=r})),this.composite&&this.toUnicode instanceof E&&/Verdana/i.test(t)){var S=(0,s.getGlyphMapForStandardFonts)();for(var _ in S)k[+_]=S[_]}this.toFontChar=k}this.loadedName=l.split("-")[0],this.fontType=x(r,a)},checkAndRepair:function(e,t,s){var c=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function l(e,t){var r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(var n=0;n>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0,o=e.pos;e.pos=e.start?e.start:0,e.skip(a);var s=e.getBytes(i);return e.pos=o,"head"===t&&(s[8]=s[9]=s[10]=s[11]=0,s[17]|=32),{tag:t,checksum:r,length:i,offset:a,data:s}}function p(e){return{version:(0,n.bytesToString)(e.getBytes(4)),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function g(e,t,r,n,a,i){var o={length:0,sizeOfInstructions:0};if(r-t<=12)return o;var s=e.subarray(t,r),c=d(s[0],s[1]);if(c<0)return function(e,t,r){e[t+1]=r,e[t]=r>>>8}(s,0,c=-1),n.set(s,a),o.length=s.length,o;var l,u=10,h=0;for(l=0;ls.length?o:!i&&p>0?(n.set(s.subarray(0,f),a),n.set([0,0],a+f),n.set(s.subarray(g,S),a+f+2),S-=p,s.length-S>3&&(S=S+3&-4),o.length=S,o):s.length-S>3?(S=S+3&-4,n.set(s.subarray(0,S),a),o.length=S,o):(n.set(s,a),o.length=s.length,o)}function m(e){var r=(t.start?t.start:0)+e.offset;t.pos=r;var a=[[],[]],i=e.length,o=r+i;if(0!==t.getUint16()||i<6)return a;var s,c,l=t.getUint16(),u=t.getUint16(),h=[];for(s=0;so)){t.pos=p;var g=d.name;if(d.encoding){for(var m="",v=0,y=d.length;v0&&(l+=k-1)}}else(m||y)&&((0,n.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,h=l,o=f.pop(),t.functionsDefined[o]={data:c,i:l};else if(!m&&!y)if(o=f[f.length-1],isNaN(o))(0,n.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[o]=!0,o in t.functionsStackDeltas){var _=f.length+t.functionsStackDeltas[o];if(_<0)return(0,n.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);f.length=_}else if(o in t.functionsDefined&&!p.includes(o)){if(d.push({data:c,i:l,stackTop:f.length-1}),p.push(o),!(s=t.functionsDefined[o]))return(0,n.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=s.data,l=s.i}if(!m&&!y){var A=0;for(w<=142?A=S[w]:w>=192&&w<=223?A=-1:w>=224&&(A=-2),w>=113&&w<=117&&(a=f.pop(),isNaN(a)||(A=2*-a));A<0&&f.length>0;)f.pop(),A++;for(;A>0;)f.push(NaN),A--}}t.tooComplexToFollowFunctions=g;var x=[c];l>c.length&&x.push(new Uint8Array(l-c.length)),h>u&&((0,n.warn)("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){var r,n,a=0;for(r=0,n=t.length;r>>0,o=[],s=0;s>>0);var c={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:i,offsetTable:o};switch(r){case 1:return c;case 2:return c.dsigTag=e.getInt32()>>>0,c.dsigLength=e.getInt32()>>>0,c.dsigOffset=e.getInt32()>>>0,c}throw new n.FormatError("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),a=r.numFonts,i=r.offsetTable,o=0;o0||!(s.cMap instanceof h.IdentityCMap));if("OTTO"===v.version&&!E||!y.head||!y.hhea||!y.maxp||!y.post)return k=new f.Stream(y["CFF "].data),w=new M(k,s),A(s),this.convert(e,w,s);delete y.glyf,delete y.loca,delete y.fpgm,delete y.prep,delete y["cvt "],this.isOpenType=!0}if(!y.maxp)throw new n.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+y.maxp.offset;var O=t.getInt32(),F=t.getUint16(),L=F+1,q=!0;L>65535&&(q=!1,L=F,(0,n.warn)("Not enough space in glyfs to duplicate first glyph."));var z=0,G=0;O>=65536&&y.maxp.length>=22&&(t.pos+=8,t.getUint16()>2&&(y.maxp.data[14]=0,y.maxp.data[15]=2),t.pos+=4,z=t.getUint16(),t.pos+=4,G=t.getUint16()),y.maxp.data[4]=L>>8,y.maxp.data[5]=255&L;var W=function(e,t,r,a){var i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&x(e,i),t&&x(t,i),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,n.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,a=e.functionsUsed.length;rt)return(0,n.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,n.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(i,a),r&&1&r.length){var o=new Uint8Array(r.length+1);o.set(r.data),r.data=o}return i.hintsValid}(y.fpgm,y.prep,y["cvt "],z);if(W||(delete y.fpgm,delete y.prep,delete y["cvt "]),function(e,t,r,a,i){if(t){e.pos=(e.start?e.start:0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=8,e.pos+=2;var o=e.getUint16();o>a&&((0,n.info)("The numOfMetrics ("+o+") should not be greater than the numGlyphs ("+a+")"),o=a,t.data[34]=(65280&o)>>8,t.data[35]=255&o);var s=a-o-(r.length-4*o>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),i&&(c[r.length]=r.data[2],c[r.length+1]=r.data[3]),r.data=c}}else r&&(r.data=null)}(t,y.hhea,y.hmtx,L,q),!y.head)throw new n.FormatError('Required "head" table is not found');!function(e,t,a){var i,o,s,c,l=e.data,u=(i=l[0],o=l[1],s=l[2],c=l[3],(i<<24)+(o<<16)+(s<<8)+c);u>>16!=1&&((0,n.info)("Attempting to fix invalid version in head table: "+u),l[0]=0,l[1]=1,l[2]=0,l[3]=0);var h=r(l[50],l[51]);if(h<0||h>1){(0,n.info)("Attempting to fix invalid indexToLocFormat in head table: "+h);var f=t+1;if(a===f<<1)l[50]=0,l[51]=0;else{if(a!==f<<2)throw new n.FormatError("Could not fix indexToLocFormat: "+h);l[50]=0,l[51]=1}}}(y.head,F,T?y.loca.length:0);var H=Object.create(null);if(T){var V=r(y.head.data[50],y.head.data[51]),X=function(e,t,r,n,a,i,o){var s,c,l;n?(s=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},l=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(s=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},l=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var u=i?r+1:r,h=s*(1+u),f=new Uint8Array(h);f.set(e.data.subarray(0,h)),e.data=f;var d,p,m=t.data,v=m.length,y=new Uint8Array(v),b=c(f,0),w=0,k=Object.create(null);for(l(f,0,w),d=0,p=s;dv&&(v+3&-4)===S&&(S=v),S>v&&(b=S);var _=g(m,b,S,y,w,a),A=_.length;0===A&&(k[d]=!0),_.sizeOfInstructions>o&&(o=_.sizeOfInstructions),l(f,p,w+=A),b=S}if(0===w){var x=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(d=0,p=s;dC+w?t.data=y.subarray(0,C+w):(t.data=new Uint8Array(C+w),t.data.set(y.subarray(0,w))),t.data.set(y.subarray(0,C),w),l(e.data,f.length-s,w+C)}else t.data=y.subarray(0,w);return{missingGlyphs:k,maxSizeOfInstructions:o}}(y.loca,y.glyf,F,V,W,q,G);H=X.missingGlyphs,O>=65536&&y.maxp.length>=22&&(y.maxp.data[26]=X.maxSizeOfInstructions>>8,y.maxp.data[27]=255&X.maxSizeOfInstructions)}if(!y.hhea)throw new n.FormatError('Required "hhea" table is not found');0===y.hhea.data[10]&&0===y.hhea.data[11]&&(y.hhea.data[10]=255,y.hhea.data[11]=255);var Y={unitsPerEm:r(y.head.data[18],y.head.data[19]),yMax:r(y.head.data[42],y.head.data[43]),yMin:d(y.head.data[38],y.head.data[39]),ascent:r(y.hhea.data[4],y.hhea.data[5]),descent:d(y.hhea.data[6],y.hhea.data[7])};this.ascent=Y.ascent/Y.unitsPerEm,this.descent=Y.descent/Y.unitsPerEm,y.post&&function(e,r,a){var i=(t.start?t.start:0)+e.offset;t.pos=i;var o,s=i+e.length,c=t.getInt32();t.skip(28);var l,u=!0;switch(c){case 65536:o=_;break;case 131072:var h=t.getUint16();if(h!==a){u=!1;break}var f=[];for(l=0;l=32768){u=!1;break}f.push(d)}if(!u)break;for(var p=[],g=[];t.pos65535)throw new n.FormatError("Max size of CID is 65,535");var r=-1;$?r=t:void 0!==Q[t]&&(r=Q[t]),r>=0&&r>>0,p=!1;if((!s||s.platformId!==h||s.encodingId!==f)&&(0===h&&0===f||1===h&&0===f?p=!0:3!==h||1!==f||!a&&s?r&&3===h&&0===f&&(p=!0,l=!0):(p=!0,r||(l=!0)),p&&(s={platformId:h,encodingId:f,offset:d}),l))break}if(s&&(t.pos=o+s.offset),!s||-1===t.peekByte())return(0,n.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var g=t.getUint16();t.skip(4);var m,v,y=!1,b=[];if(0===g){for(m=0;m<256;m++){var w=t.getByte();w&&b.push({charCode:m,glyphId:w})}y=!0}else if(4===g){var k=t.getUint16()>>1;t.skip(6);var S,_=[];for(S=0;S>1)-(k-S);i.offsetIndex=C,A=Math.max(A,C+i.end-i.start+1)}else i.offsetIndex=-1}var P=[];for(m=0;m0&&J(fe)&&(K[oe]=fe)}}}}else if(0===ee&&0===te)for(var de=0;de=61440&&ge<=61695&&(ge&=255),K[ge]=re[pe].glyphId}}0===K.length&&(K[0]=0);var me=L-1;q||(me=0);var ve=N(K,J,me);if(this.toFontChar=ve.toFontChar,y.cmap={tag:"cmap",data:D(ve.charCodeToGlyphId,L)},y["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;var r=t.getUint16();t.skip(60);var n=t.getUint16();return!(r<4&&768&n||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(y["OS/2"],t)||(y["OS/2"]={tag:"OS/2",data:B(s,ve.charCodeToGlyphId,Y)}),!T)try{k=new f.Stream(y["CFF "].data),(w=new a.CFFParser(k,s,b).parse()).duplicateFirstGlyph();var ye=new a.CFFCompiler(w);y["CFF "].data=ye.compile()}catch(e){(0,n.warn)("Failed to compile font "+s.loadedName)}if(y.name){var be=m(y.name);y.name.data=U(e,be)}else y.name={tag:"name",data:U(this.name)};var we=new R(v.version);for(var ke in y)we.addTable(ke,y[ke].data);return we.toArray()},convert:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(!e.hasIncludedToUnicodeMap&&!(e.hasEncoding||t===e.defaultEncoding||e.toUnicode instanceof E)){var r=[],n=(0,i.getGlyphsUnicode)();for(var a in t){var o=t[a],s=(0,c.getUnicodeForGlyph)(o,n);-1!==s&&(r[a]=String.fromCharCode(s))}e.toUnicode.amend(r)}}(r,r.builtInEncoding);var a=1;t instanceof M&&(a=t.numGlyphs-1);var s=t.getGlyphMapping(r),l=N(s,t.hasGlyphId.bind(t),a);this.toFontChar=l.toFontChar;var u=t.numGlyphs;function h(e,t){var r=null;for(var n in e)t===e[n]&&(r||(r=[]),r.push(0|n));return r}function f(e,t){for(var r in e)if(t===e[r])return 0|r;return l.charCodeToGlyphId[l.nextAvailableFontCharCode]=t,l.nextAvailableFontCharCode++}var d=t.seacs;if(d&&d.length){var p=r.fontMatrix||n.FONT_IDENTITY_MATRIX,g=t.getCharset(),v=Object.create(null);for(var y in d){var b=d[y|=0],w=o.StandardEncoding[b[2]],k=o.StandardEncoding[b[3]],S=g.indexOf(w),_=g.indexOf(k);if(!(S<0||_<0)){var A={x:b[0]*p[0]+b[1]*p[2]+p[4],y:b[0]*p[1]+b[1]*p[3]+p[5]},x=h(s,y);if(x)for(var C=0,P=x.length;C=0?n:0;else if(l)for(a in t)c[a]=t[a];else for(s=o.StandardEncoding,a=0;a=0?n:0;var u,h=e.differences;if(h)for(a in h){var f=h[a];if(-1===(n=r.indexOf(f))){u||(u=(0,i.getGlyphsUnicode)());var d=C(f,u);d!==f&&(n=r.indexOf(d))}c[a]=n>=0?n:0}return c}t.ErrorFont=I;var L=function(){function e(e,t,r){for(var n,a=e.length,i=t.length,o=a-i,s=r,c=!1;s=i){for(s+=n;s=0&&(c[l]=i)}return F(e,c,o)},hasGlyphId:function(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)},getSeacs:function(e){var t,r,n=[];for(t=0,r=e.length;t0;b--)y[b]-=y[b-1];g.setByName(v,y)}}o.topDict.privateDict=g;var w=new a.CFFIndex;for(l=0,u=n.length;l=t)throw new n.FormatError("Invalid CFF header");0!==r&&((0,n.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);var a=e[0],i=e[1],o=e[2],s=e[3];return{obj:new u(a,i,o,s),endPos:o}},parseDict:function(e){var t=0;function r(){var r=e[t++];return 30===r?function(){for(var r="",n=15,a=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],i=e.length;t>4,c=15&o;if(s===n)break;if(r+=a[s],c===n)break;r+=a[c]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:((0,n.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)}var a=[],i=[];t=0;for(var o=e.length;t10)return!1;for(var s=r.stackSize,c=r.stack,l=a.length,u=0;u>16,u+=2,s++;else if(14===h){if(s>=4&&(s-=4,this.seacAnalysisEnabled))return r.seac=c.slice(s,s+4),!1;f=e[h]}else if(h>=32&&h<=246)c[s]=h-139,s++;else if(h>=247&&h<=254)c[s]=h<251?(h-247<<8)+a[u]+108:-(h-251<<8)-a[u]-108,u++,s++;else if(255===h)c[s]=(a[u]<<24|a[u+1]<<16|a[u+2]<<8|a[u+3])/65536,u+=4,s++;else if(19===h||20===h)r.hints+=s>>1,u+=r.hints+7>>3,s%=2,f=e[h];else{if(10===h||29===h){var p;if(!(p=10===h?i:o))return f=e[h],(0,n.warn)("Missing subrsIndex for "+f.id),!1;var g=32768;p.count<1240?g=107:p.count<33900&&(g=1131);var m=c[--s]+g;if(m<0||m>=p.count||isNaN(m))return f=e[h],(0,n.warn)("Out of bounds subrIndex for "+f.id),!1;if(r.stackSize=s,r.callDepth++,!this.parseCharString(r,p.get(m),i,o))return!1;r.callDepth--,s=r.stackSize;continue}if(11===h)return r.stackSize=s,!0;f=e[h]}if(f){if(f.stem&&(r.hints+=s>>1,3===h||23===h?r.hasVStems=!0:!r.hasVStems||1!==h&&18!==h||((0,n.warn)("CFF stem hints are in wrong order"),a[u-1]=1===h?3:23)),"min"in f&&!r.undefStack&&s=2&&f.stem?s%=2:s>1&&(0,n.warn)("Found too many parameters for stack-clearing command"),s>0&&c[s-1]>=0&&(r.width=c[s-1])),"stackDelta"in f?("stackFn"in f&&f.stackFn(c,s),s+=f.stackDelta):f.stackClearing?s=0:f.resetStack?(s=0,r.undefStack=!1):f.undefStack&&(s=0,r.undefStack=!0,r.firstStackClearing=!1)}}return r.stackSize=s,!0},parseCharStrings:function(e){for(var t=e.charStrings,r=e.localSubrIndex,a=e.globalSubrIndex,i=e.fdSelect,o=e.fdArray,s=e.privateDict,c=[],l=[],u=t.count,h=0;h=o.length&&((0,n.warn)("Invalid fd index for glyph index."),p=!1),p&&(g=(m=o[v].privateDict).subrsIndex)}else r&&(g=r);if(p&&(p=this.parseCharString(d,f,g,a)),null!==d.width){var y=m.getByName("nominalWidthX");l[h]=y+d.width}else{var b=m.getByName("defaultWidthX");l[h]=b}null!==d.seac&&(c[h]=d.seac),p||t.set(h,new Uint8Array([14]))}return{charStrings:t,seacs:c,widths:l}},emptyPrivateDictionary:function(e){var t=this.createDict(g,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t},parsePrivateDict:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],n=t[1];if(0===r||n>=this.bytes.length)this.emptyPrivateDictionary(e);else{var a=n+r,i=this.bytes.subarray(n,a),o=this.parseDict(i),s=this.createDict(g,o,e.strings);if(e.privateDict=s,s.getByName("Subrs")){var c=s.getByName("Subrs"),l=n+c;if(0===c||l>=this.bytes.length)this.emptyPrivateDictionary(e);else{var u=this.parseIndex(l);s.subrsIndex=u.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)},parseCharsets:function(e,t,r,i){if(0===e)return new v(!0,m.ISO_ADOBE,a.ISOAdobeCharset);if(1===e)return new v(!0,m.EXPERT,a.ExpertCharset);if(2===e)return new v(!0,m.EXPERT_SUBSET,a.ExpertSubsetCharset);var o,s,c,l=this.bytes,u=e,h=l[e++],f=[i?0:".notdef"];switch(t-=1,h){case 0:for(c=0;c=65535)(0,n.warn)("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}},hasGlyphId:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}},e}();t.CFF=l;var u=function(e,t,r,n){this.major=e,this.minor=t,this.hdrSize=r,this.offSize=n};t.CFFHeader=u;var h=function(){function e(){this.strings=[]}return e.prototype={get:function(e){return e>=0&&e<=390?o[e]:e-s<=this.strings.length?this.strings[e-s]:o[0]},getSID:function(e){var t=o.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+s:-1},add:function(e){this.strings.push(e)},get count(){return this.strings.length}},e}();t.CFFStrings=h;var f=function(){function e(){this.objects=[],this.length=0}return e.prototype={add:function(e){this.length+=e.length,this.objects.push(e)},set:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t},get:function(e){return this.objects[e]},get count(){return this.objects.length}},e}();t.CFFIndex=f;var d=function(){function e(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}return e.prototype={setByKey:function(e,t){if(!(e in this.keyToNameMap))return!1;var r=t.length;if(0===r)return!0;for(var a=0;a=this.fdSelect.length?-1:this.fdSelect[e]}},e}();t.CFFFDSelect=b;var w=function(){function e(){this.offsets=Object.create(null)}return e.prototype={isTracking:function(e){return e in this.offsets},track:function(e,t){if(e in this.offsets)throw new n.FormatError("Already tracking location of ".concat(e));this.offsets[e]=t},offset:function(e){for(var t in this.offsets)this.offsets[t]+=e},setEntryLocation:function(e,t,r){if(!(e in this.offsets))throw new n.FormatError("Not tracking location of ".concat(e));for(var a=r.data,i=this.offsets[e],o=0,s=t.length;o>24&255,a[u]=d>>16&255,a[h]=d>>8&255,a[f]=255&d}}},e}(),k=function(){function e(e){this.cff=e}return e.prototype={compile:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var a=this.compileNameIndex(e.names);if(t.add(a),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var i=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var o=0,s=e.fdArray.length;o=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]},compileHeader:function(e){return[e.major,e.minor,e.hdrSize,e.offSize]},compileNameIndex:function(e){for(var t=new f,r=0,a=e.length;r"~"||"["===l||"]"===l||"("===l||")"===l||"{"===l||"}"===l||"<"===l||">"===l||"/"===l||"%"===l)&&(l="_"),s[c]=l}""===(s=s.join(""))&&(s="Bad_Font_Name"),t.add((0,n.stringToBytes)(s))}return this.compileIndex(t)},compileTopDicts:function(e,t,r){for(var n=[],a=new f,i=0,o=e.length;i>8&255,255&o]);else{(i=new Uint8Array(1+2*o))[0]=0;for(var s=0,c=e.charset.length,l=!1,u=1;u>8&255,i[u+1]=255&h}}return this.compileTypedArray(i)},compileEncoding:function(e){return this.compileTypedArray(e.raw)},compileFDSelect:function(e){var t,r,n=e.format;switch(n){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=n,r=0;r>8&255,255&r,o),a=o)}var s=(i.length-3)/3;i[1]=s>>8&255,i[2]=255&s,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)},compileTypedArray:function(e){for(var t=[],r=0,n=e.length;r>8&255,255&n],s=1;for(a=0;a>8&255,255&c):3===i?o.push(c>>16&255,c>>8&255,255&c):o.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[a]&&(c+=r[a].length);for(a=0;a=65520&&e<=65535?0:e>=62976&&e<=63743?a()[e]||e:173===e?45:e},t.reverseIfRtl=function(e){var t,r,n=e.length;if(n<=1||(t=e.charCodeAt(0),r=i[13],!(t>=r.begin&&t=(r=i[11]).begin&&t=0;o--)a+=e[o];return a},t.getUnicodeRangeFor=function(e){for(var t=0,r=i.length;t=n.begin&&e=5&&a<=7))return-1;n=e.substring(1)}if(n===n.toUpperCase()&&(r=parseInt(n,16))>=0)return r}return-1}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var n=r(5),a=r(223),i=r(226),o=r(225),s=r(205);function c(e){return c="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},c(e)}function l(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 h(e){var t=function(){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}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r)}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r>1;for(s=a+l+14,o=[],c=0;c>1;r>16,l=0,u=0;if(s+=10,c<0)do{o=e[s]<<8|e[s+1];var h,f,d=e[s+2]<<8|e[s+3];s+=4,1&o?(h=(e[s]<<24|e[s+1]<<16)>>16,f=(e[s+2]<<24|e[s+3]<<16)>>16,s+=4):(h=e[s++],f=e[s++]),2&o?(l=h,u=f):(l=0,u=0);var g=1,m=1,v=0,y=0;8&o?(g=m=(e[s]<<24|e[s+1]<<16)/1073741824,s+=2):64&o?(g=(e[s]<<24|e[s+1]<<16)/1073741824,m=(e[s+2]<<24|e[s+3]<<16)/1073741824,s+=4):128&o&&(g=(e[s]<<24|e[s+1]<<16)/1073741824,v=(e[s+2]<<24|e[s+3]<<16)/1073741824,y=(e[s+4]<<24|e[s+5]<<16)/1073741824,m=(e[s+6]<<24|e[s+7]<<16)/1073741824,s+=8);var b=r.glyphs[d];b&&(t.push({cmd:"save"}),t.push({cmd:"transform",args:[g,v,y,m,l,u]}),p(b,t,r),t.push({cmd:"restore"}))}while(32&o);else{var w,k,S=[];for(w=0;w0;)A.push({flags:o})}for(w=0;w<_;w++){switch(18&A[w].flags){case 0:l+=(e[s]<<24|e[s+1]<<16)>>16,s+=2;break;case 2:l-=e[s++];break;case 18:l+=e[s++]}A[w].x=l}for(w=0;w<_;w++){switch(36&A[w].flags){case 0:u+=(e[s]<<24|e[s+1]<<16)>>16,s+=2;break;case 4:u-=e[s++];break;case 36:u+=e[s++]}A[w].y=u}var C=0;for(s=0;s>1,C=!0;break;case 4:d+=u.pop(),s(h,d),C=!0;break;case 5:for(;u.length>0;)h+=u.shift(),d+=u.shift(),c(h,d);break;case 6:for(;u.length>0&&(c(h+=u.shift(),d),0!==u.length);)d+=u.shift(),c(h,d);break;case 7:for(;u.length>0&&(d+=u.shift(),c(h,d),0!==u.length);)c(h+=u.shift(),d);break;case 8:for(;u.length>0;)y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k+u.shift(),l(y,w,b,k,h,d);break;case 10:if(A=u.pop(),x=null,a.isCFFCIDFont){var T=a.fdSelect.getFDIndex(i);if(T>=0&&TMath.abs(d-I)?h+=u.shift():d+=u.shift(),l(y,w,b,k,h,d);break;default:throw new n.FormatError("unknown operator: 12 ".concat(P))}break;case 14:if(u.length>=4){var F=u.pop(),L=u.pop();d=u.pop(),h=u.pop(),t.push({cmd:"save"}),t.push({cmd:"translate",args:[h,d]});var M=f(a.cmap,String.fromCharCode(a.glyphNameMap[o.StandardEncoding[F]]));m(a.glyphs[M.glyphId],t,a,M.glyphId),t.push({cmd:"restore"}),M=f(a.cmap,String.fromCharCode(a.glyphNameMap[o.StandardEncoding[L]])),m(a.glyphs[M.glyphId],t,a,M.glyphId)}return;case 19:case 20:v+=(p+=u.length>>1)+7>>3,C=!0;break;case 21:d+=u.pop(),s(h+=u.pop(),d),C=!0;break;case 22:s(h+=u.pop(),d),C=!0;break;case 24:for(;u.length>2;)y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k+u.shift(),l(y,w,b,k,h,d);h+=u.shift(),d+=u.shift(),c(h,d);break;case 25:for(;u.length>6;)h+=u.shift(),d+=u.shift(),c(h,d);y=h+u.shift(),w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k+u.shift(),l(y,w,b,k,h,d);break;case 26:for(u.length%2&&(h+=u.shift());u.length>0;)y=h,w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b,d=k+u.shift(),l(y,w,b,k,h,d);break;case 27:for(u.length%2&&(d+=u.shift());u.length>0;)l(y=h+u.shift(),w=d,b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k);break;case 28:u.push((g[v]<<24|g[v+1]<<16)>>16),v+=2;break;case 29:A=u.pop()+a.gsubrsBias,(x=a.gsubrs[A])&&e(x);break;case 30:for(;u.length>0&&(y=h,w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k+(1===u.length?u.shift():0),l(y,w,b,k,h,d),0!==u.length);)y=h+u.shift(),w=d,b=y+u.shift(),k=w+u.shift(),d=k+u.shift(),l(y,w,b,k,h=b+(1===u.length?u.shift():0),d);break;case 31:for(;u.length>0&&(y=h+u.shift(),w=d,b=y+u.shift(),k=w+u.shift(),d=k+u.shift(),l(y,w,b,k,h=b+(1===u.length?u.shift():0),d),0!==u.length);)y=h,w=d+u.shift(),b=y+u.shift(),k=w+u.shift(),h=b+u.shift(),d=k+(1===u.length?u.shift():0),l(y,w,b,k,h,d);break;default:if(P<32)throw new n.FormatError("unknown operator: ".concat(P));P<247?u.push(P-139):P<251?u.push(256*(P-247)+g[v++]+108):P<255?u.push(256*-(P-251)-g[v++]-108):(u.push((g[v]<<24|g[v+1]<<16|g[v+2]<<8|g[v+3])/65536),v+=4)}C&&(u.length=0)}}(e)}var v=[],y=function(){function e(t){d(this,e),this.constructor===e&&(0,n.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}return g(e,[{key:"getPathJs",value:function(e){var t=f(this.cmap,e),r=this.compiledGlyphs[t.glyphId];return r||(r=this.compileGlyph(this.glyphs[t.glyphId],t.glyphId),this.compiledGlyphs[t.glyphId]=r),void 0===this.compiledCharCodeToGlyphId[t.charCode]&&(this.compiledCharCodeToGlyphId[t.charCode]=t.glyphId),r}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return v;var r=this.fontMatrix;if(this.isCFFCIDFont){var a=this.fdSelect.getFDIndex(t);a>=0&&an)return!0;for(var a=n-e,i=a;i>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return this.output.push.apply(this.output,t),r?this.stack.splice(a,e):this.stack.length=0,!1}},f}(),c=function(){function e(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function t(e,t,r){if(r>=e.length)return new Uint8Array(0);var n,a,i=0|t;for(n=0;n>8,i=52845*(c+i)+22719&65535}return s}function r(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}function o(r,n,o){if(n){var s=r.getBytes(),c=!((e(s[0])||(0,a.isWhiteSpace)(s[0]))&&e(s[1])&&e(s[2])&&e(s[3])&&e(s[4])&&e(s[5])&&e(s[6])&&e(s[7]));r=new i.Stream(c?t(s,55665,4):function(t,r,n){var a,i,o=0|r,s=t.length,c=new Uint8Array(s>>>1);for(a=0,i=0;a>8,o=52845*(h+o)+22719&65535}}}return c.slice(n,i)}(s,55665,4))}this.seacAnalysisEnabled=!!o,this.stream=r,this.nextChar()}return o.prototype={readNumberArray:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e},readNumber:function(){var e=this.getToken();return parseFloat(e||0)},readInt:function(){var e=this.getToken();return 0|parseInt(e||0,10)},readBoolean:function(){return"true"===this.getToken()?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isWhiteSpace)(t))break;t=this.nextChar()}if(r(t))return this.nextChar(),String.fromCharCode(t);var n="";do{n+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,a.isWhiteSpace)(t)&&!r(t));return n},readCharStrings:function(e,r){return-1===r?e:t(e,4330,r)},extractFontProgram:function(e){var t=this.stream,r=[],n=[],a=Object.create(null);a.lenIV=4;for(var i,o,c,l,u,h={subrs:[],charstrings:[],properties:{privateData:a}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)if("/"===i){var f=this.getToken();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=h.properties.privateData.lenIV,u=this.readCharStrings(c,l),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),n.push({glyph:f,encoded:u})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){var d=this.readInt();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=h.properties.privateData.lenIV,u=this.readCharStrings(c,l),this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),r[d]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var p=this.readNumberArray();p.length>0&&p.length;break;case"StemSnapH":case"StemSnapV":h.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":h.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":h.properties.privateData[i]=this.readNumber();break;case"ForceBold":h.properties.privateData[i]=this.readBoolean()}for(var g=0;g-1&&void 0===e.widths[w]&&w>=e.firstChar&&w<=e.lastChar&&(e.widths[w]=m.width)}}return h},extractFontHeader:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var a,i=this.getToken();if(/^\d+$/.test(i)){a=[];var o=0|parseInt(i,10);this.getToken();for(var s=0;s=h||C<=0)(0,n.info)("Bad shading domain.");else{for(var T,E=new Float32Array(s.numComps),R=new Float32Array(1),O=0;O<=10;O++){R[0]=u+O*C,x(R,0,E,0),T=s.getRgb(E,0);var I=n.Util.makeCssRgb(T[0],T[1],T[2]);P.push([O/10,I])}var F="transparent";e.has("Background")&&(T=s.getRgb(e.get("Background"),0),F=n.Util.makeCssRgb(T[0],T[1],T[2])),d||(P.unshift([0,F]),P[1][0]+=p.SMALL_NUMBER),g||(P[P.length-1][0]-=p.SMALL_NUMBER,P.push([1,F])),this.colorStops=P}}return e.prototype={getIR:function(){var e,t,r,a,i,o=this.coordsArr,l=this.shadingType;l===s?(t=[o[0],o[1]],r=[o[2],o[3]],a=null,i=null,e="axial"):l===c?(t=[o[0],o[1]],r=[o[3],o[4]],a=o[2],i=o[5],e="radial"):(0,n.unreachable)("getPattern type unknown: ".concat(l));var u=this.matrix;if(u&&(t=n.Util.applyTransform(t,u),r=n.Util.applyTransform(r,u),l===c)){var h=n.Util.singularValueDecompose2dScale(u);a*=h[0],i*=h[1]}return["RadialAxial",e,this.bbox,this.colorStops,t,r,a,i]}},e}(),p.Mesh=function(){function e(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;var r=t.numComps;this.tmpCompsBuf=new Float32Array(r);var n=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(n):this.tmpCompsBuf}e.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var e=this.stream.getByte();return!(e<0||(this.buffer=e,this.bufferLength=8,0))},readBits:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var n=this.stream.getByte();return this.buffer=n&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),n=this.context.decode,a=e<32?1/((1<s?s:t,r=r>c?c:r,n=n=0&&"ET"===d[P];--P)d[P]="EN";for(P=m+1;P0&&(E=d[m-1]);var R=x;T+1O&&o(O)&&(F=O);for(O=I;O>=F;--O){var L=-1;for(m=0,v=k.length;m=0&&(u(f,L,m),L=-1):L<0&&(L=m);L>=0&&u(f,L,k.length)}for(m=0,v=f.length;m"!==M||(f[m]="")}return h(f.join(""),p)};var n=r(5),a=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function o(e){return 0!=(1&e)}function s(e){return 0==(1&e)}function c(e,t,r){for(var n=t,a=e.length;n2&&void 0!==arguments[2]&&arguments[2]?r="ttb":t||(r="rtl"),{str:e,dir:r}}var f=[],d=[]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=void 0;var n=r(201),a=(0,n.getLookupTableFactory)((function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-BoldOblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Oblique"]=(0,n.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e.Symbol=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790})),e["Times-Roman"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Bold"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-BoldItalic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Italic"]=(0,n.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e.ZapfDingbats=(0,n.getLookupTableFactory)((function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918}))}));t.getMetrics=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isPDFFunction=function(e){var t;if("object"!==o(e))return!1;if((0,a.isDict)(e))t=e;else{if(!(0,a.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")},t.PostScriptCompiler=t.PostScriptEvaluator=t.PDFFunctionFactory=void 0;var n=r(5),a=r(198),i=r(235);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){for(var r=0;r>c)*u,l&=(1<r?e=r:e0&&(f=n[u-1]);var d=r[1];u>1,l=a.length>>1,u=new f(o),h=Object.create(null),p=8192,g=new Float32Array(l);return function(e,t,r,n){var a,o,s="",f=g;for(a=0;a(b=i[2*a+1]))&&(o=b),m[a]=o}p>0&&(p--,h[s]=m),r.set(m,n)}else r.set(d,n)}}},h=function(){function e(e){this.stack=e?Array.prototype.slice.call(e,0):[]}return e.prototype={push:function(e){if(this.stack.length>=100)throw new Error("PostScript function stack overflow.");this.stack.push(e)},pop:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()},copy:function(e){if(this.stack.length+e>=100)throw new Error("PostScript function stack overflow.");for(var t=this.stack,r=t.length-e,n=e-1;n>=0;n--,r++)t.push(t[r])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){var r,n,a,i=this.stack,o=i.length-e,s=i.length-1,c=o+(t-Math.floor(t/e)*e);for(r=o,n=s;r0?i.push(r<>a);break;case"ceiling":r=i.pop(),i.push(Math.ceil(r));break;case"copy":r=i.pop(),i.copy(r);break;case"cos":r=i.pop(),i.push(Math.cos(r));break;case"cvi":r=0|i.pop(),i.push(r);break;case"cvr":break;case"div":a=i.pop(),r=i.pop(),i.push(r/a);break;case"dup":i.copy(1);break;case"eq":a=i.pop(),r=i.pop(),i.push(r===a);break;case"exch":i.roll(2,1);break;case"exp":a=i.pop(),r=i.pop(),i.push(Math.pow(r,a));break;case"false":i.push(!1);break;case"floor":r=i.pop(),i.push(Math.floor(r));break;case"ge":a=i.pop(),r=i.pop(),i.push(r>=a);break;case"gt":a=i.pop(),r=i.pop(),i.push(r>a);break;case"idiv":a=i.pop(),r=i.pop(),i.push(r/a|0);break;case"index":r=i.pop(),i.index(r);break;case"le":a=i.pop(),r=i.pop(),i.push(r<=a);break;case"ln":r=i.pop(),i.push(Math.log(r));break;case"log":r=i.pop(),i.push(Math.log(r)/Math.LN10);break;case"lt":a=i.pop(),r=i.pop(),i.push(r=t?new r(t):e.max<=t?e:new i(e,t)}function d(){}return e.prototype.visit=function(e){(0,n.unreachable)("abstract method")},t.prototype=Object.create(e.prototype),t.prototype.visit=function(e){e.visitArgument(this)},r.prototype=Object.create(e.prototype),r.prototype.visit=function(e){e.visitLiteral(this)},a.prototype=Object.create(e.prototype),a.prototype.visit=function(e){e.visitBinaryOperation(this)},i.prototype=Object.create(e.prototype),i.prototype.visit=function(e){e.visitMin(this)},o.prototype=Object.create(e.prototype),o.prototype.visit=function(e){e.visitVariable(this)},s.prototype=Object.create(e.prototype),s.prototype.visit=function(e){e.visitVariableDefinition(this)},c.prototype={visitArgument:function(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")},visitVariable:function(e){this.parts.push("v",e.index)},visitLiteral:function(e){this.parts.push(e.number)},visitBinaryOperation:function(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")},visitMin:function(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")},toString:function(){return this.parts.join("")}},d.prototype={compile:function(e,n,a){for(var i,d,p,g,m,v,y,b,w=[],k=[],S=n.length>>1,_=a.length>>1,A=0,x=0;xe.min&&(o.unshift("Math.max(",n,", "),o.push(")")),i=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var n=r.join("");switch(n.toLowerCase()){case"if":return f.IF;case"ifelse":return f.IFELSE;default:return f.getOperator(n)}}},{key:"getNumber",value:function(){var e=this.currentChar,t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new n.FormatError("Invalid floating point number: ".concat(r));return r}}]),e}();t.PostScriptLexer=d},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var n=r(5);function a(e,t){for(var r=0;r>>8,t[r++]=255&c)}}else{if(!(0,n.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");r=(t=e).byteLength}for(var l=r>>2,u=r-4*l,h=new Uint32Array(t.buffer,0,l),f=0,d=0,p=this.h1,g=this.h2,m=3432918353,v=461845907,y=11601,b=13715,w=0;w>>17)*v&o|f*b&s)<<13|p>>>19)+3864292196:g=5*(g=(g^=d=(d=(d=(d=h[w])*m&o|d*y&s)<<15|d>>>17)*v&o|d*b&s)<<13|g>>>19)+3864292196;switch(f=0,u){case 3:f^=t[4*l+2]<<16;case 2:f^=t[4*l+1]<<8;case 1:f=(f=(f=(f^=t[4*l])*m&o|f*y&s)<<15|f>>>17)*v&o|f*b&s,1&l?p^=f:g^=f}this.h1=p,this.h2=g}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;e=3981806797*(e^=t>>>1)&o|36045*e&s,e=444984403*(e^=(t=4283543511*t&o|(2950163797*(t<<16|e>>>16)&o)>>>16)>>>1)&o|60499*e&s;var r=((e^=(t=3301882366*t&o|(3120437893*(t<<16|e>>>16)&o)>>>16)>>>1)>>>0).toString(16),n=(t>>>0).toString(16);return r.padStart(8,"0")+n.padStart(8,"0")}}])&&a(t.prototype,r),c&&a(t,c),e}();t.MurmurHash3_64=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var n=r(5),a=r(198),i=r(216),o=r(205),s=r(211),c=r(214),l=function(){function e(e,t,r,n){return(e=t+e*r)<0?e=0:e>n&&(e=n),e}function t(e,t,r,n,a,i){var o,s=a*i;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);var c,l,u,h,f=r/a,d=n/i,p=0,g=new Uint16Array(a),m=r;for(c=0;c0&&Number.isInteger(s.height)&&s.height>0&&(s.width!==k||s.height!==S)&&((0,n.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),k=s.width,S=s.height),k<1||S<1)throw new n.FormatError("Invalid image width: ".concat(k," or height: ").concat(S));this.width=k,this.height=S,this.interpolate=y.get("Interpolate","I")||!1,this.imageMask=y.get("ImageMask","IM")||!1,this.matte=y.get("Matte")||!1;var _=s.bitsPerComponent;if(!_&&!(_=y.get("BitsPerComponent","BPC"))){if(!this.imageMask)throw new n.FormatError("Bits per component missing in image: ".concat(this.imageMask));_=1}if(this.bpc=_,!this.imageMask){var A=y.get("ColorSpace","CS");if(!A)switch((0,n.info)("JPX images (which do not require color spaces)"),s.numComps){case 1:A=a.Name.get("DeviceGray");break;case 3:A=a.Name.get("DeviceRGB");break;case 4:A=a.Name.get("DeviceCMYK");break;default:throw new Error("JPX images with ".concat(s.numComps," ")+"color components not supported.")}var x=u?o:null;this.colorSpace=i.ColorSpace.parse(A,t,x,v),this.numComps=this.colorSpace.numComps}if(this.decode=y.getArray("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,_)||m&&!i.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var C=(1<<_)-1;this.decodeCoefficients=[],this.decodeAddends=[];for(var P=this.colorSpace&&"Indexed"===this.colorSpace.name,T=0,E=0;T>3)*i,l=n.byteLength;if(!o||s&&c!==l)if(s)for((t=new Uint8ClampedArray(c)).set(n),r=l;r>7&1,r[f+1]=l>>6&1,r[f+2]=l>>5&1,r[f+3]=l>>4&1,r[f+4]=l>>3&1,r[f+5]=l>>2&1,r[f+6]=l>>1&1,r[f+7]=1&l,f+=8;if(f>=1}else{var v=0;for(l=0,f=0,c=o;f>y;b<0?b=0:b>h&&(b=h),r[f]=b,l&=(1<g[w+1]){v=255;break}}c[h]=v}}if(c)for(h=0,d=3,f=a*o;h0&&void 0!==arguments[0]&&arguments[0],r=this.drawWidth,a=this.drawHeight,i={width:r,height:a,kind:0,data:null},c=this.numComps,l=this.width,u=this.height,h=this.bpc,f=l*c*h+7>>3;if(!t){var d;if("DeviceGray"===this.colorSpace.name&&1===h?d=n.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==h||this.needsDecode||(d=n.ImageKind.RGB_24BPP),d&&!this.smask&&!this.mask&&r===l&&a===u){if(i.kind=d,e=this.getImageBytes(u*f),this.image instanceof o.DecodeStream)i.data=e;else{var p=new Uint8ClampedArray(e.length);p.set(e),i.data=p}if(this.needsDecode){(0,n.assert)(d===n.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var g=i.data,m=0,v=g.length;m>3,l=this.getImageBytes(o*c),u=this.getComponents(l);if(1!==s){this.needsDecode&&this.decodeBuffer(u),a=i*o;var h=255/((1<3&&void 0!==arguments[3]&&arguments[3];return this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGB=!!n,this.image.getBytes(e,!0)}},r}();t.PDFImage=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(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 c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:a,targetName:o,stream:p,streamId:n,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:a,targetName:o,stream:d,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:g,streamId:n,reason:b(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[n]=c,new Promise((function(t){t(r(e.data,c))})).then((function(){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,success:!0})}),(function(e){s.postMessage({sourceName:a,targetName:o,stream:y,streamId:n,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj;switch(e.stream){case y:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(b(e.reason));break;case v:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(b(e.reason));break;case m:if(!this.streamSinks[t]){a.postMessage({sourceName:r,targetName:n,stream:v,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:v,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)})}));break;case p: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: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 g:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(b(e.reason)),this._deleteStreamController(t);break;case f:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(b(e.reason)),this._deleteStreamController(t);break;case h:if(!this.streamSinks[t])break;var s=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(s&&s(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:b(e)})})),this.streamSinks[t].sinkCapability.reject(b(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(c=a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)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)})),w=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=c.apply(e,t);function i(e){o(a,r,n,i,s,"next",e)}function s(e){o(a,r,n,i,s,"throw",e)}i(void 0)}))},function(e){return w.apply(this,arguments)})},{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)}}],r&&s(t.prototype,r),n&&s(t,n),e}();t.MessageHandler=w},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFWorkerStream=void 0;var n,a=(n=r(2))&&n.__esModule?n:{default:n},i=r(5);function o(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,c,"next",e)}function c(e){o(i,n,a,s,c,"throw",e)}s(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;rthis.numPages)){var r=this.shadowRoot.querySelector(".__pdf_page"+e).offsetTop;this.container.scrollTop=r,this.scrollDown=this.num-e<0,this.pdfViewer.renderPageInterval(e,this.scrollDown),this.num=e,this.updateNum(this.num),this.scrolling=!0,setTimeout((function(){t.scrolling=!1}),2e3)}}},{key:"progress",value:function(e){var t=this,r=Math.round(100*e);r<=this.percent||(r<=100&&-1!==this.percent&&(this.percent=r,this.percentUpdate(r),this.requestUpdate()),r>=100&&(this.hasInit||(setTimeout((function(){var e=new CustomEvent("ready",{composed:!0,detail:{title:t.pdfViewer.pdfTitle,totalPage:t.numPages}});t.dispatchEvent(e)}),100),this.hasInit=!0),setTimeout((function(){t.percent=-1,t.requestUpdate()}),0)))}},{key:"debounce",value:function(e,t,r){var n=arguments,a=this,i=null;return function(o){var s=a,c=n;function l(){i=setTimeout((function(){e.apply(s,c),i=null}),t)}r?(clearTimeout(i),l()):i||l()}}},{key:"handleScroll",value:function(e){var t=this.num,r=Math.ceil(this.container.scrollTop);if(this.numPages&&!this.initializing&&!this.pdfViewer.iniState){if(r<=0)this.num=1;else{this.scrolling=!0;var n=r-this.pdfScrollTop;this.pdfScrollTop=r,this.scrollDown=n>0;var a=this.shadowRoot.querySelector(".__pdf_page1").clientHeight,i=this.num+Math.ceil(n/a);i=i>this.numPages?this.numPages:i<1?1:i;for(var o=Math.ceil(a/2);i>=1&&i<=this.numPages;){var s=this.shadowRoot.querySelector(".__pdf_page"+i),c=this.shadowRoot.querySelector(".__pdf_page"+(i+1));if(r>=s.offsetTop-o&&(!c||r=c.offsetTop-o&&i++}}this.readAll||this.judgeReadFinish(),this.num!==t&&this.updateNum(this.num),this.requestUpdate()}}},{key:"handleView",value:function(e){this.pdfViewer.currentNum!==this.num&&(this.pdfViewer.renderPageInterval(this.num,this.scrollDown),this.isHitBottom()&&this.numPages-this.num>1&&this.pdfViewer.renderPageInterval(this.numPages,this.scrollDown))}},{key:"initCanvasPagesDom",value:function(){var e=this.shadowRoot.querySelector(".__pdf_container");e.innerHTML="";for(var t=0;t\n '),e.appendChild(r.children[0])}}},{key:"renderPdf",value:function(){var e=_asyncToGenerator(regenerator.mark((function e(){var t,r,n,a,i,o,s,c;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfViewer.getPage(1);case 2:for(t=e.sent,r=t.getViewport({scale:this.pdfScale}),n=r.height/r.width,a=Math.floor(this.container.clientWidth)-16,i=a*n,this.firstPage={height:i,width:a},o=1;o<=this.numPages;++o)(s=this.shadowRoot.querySelector(".__pdf_page"+o)).style.width="".concat(a,"px"),s.style.height="".concat(i,"px"),c=new PageViewer$1({id:o,pageIdPrefix:this.pageIdPrefix,pdfScale:this.pdfScale,scale:this.scale,defaultViewport:r.clone(),renderingQueue:this.renderingQueue,div:s,width:a,height:i}),this.pdfViewer.pushPage(c);this.pdfViewer.renderPageInterval(1,!0),this.scrolling=!1,this.initializing=!1,this.judgeReadFinish(),this.requestUpdate();case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateNum",value:function(e){var t=new CustomEvent("numUpdate",{composed:!0,detail:{currentNum:e}});this.dispatchEvent(t)}},{key:"percentUpdate",value:function(e){var t=new CustomEvent("progress",{composed:!0,detail:{progress:e}});this.dispatchEvent(t)}},{key:"isHitBottom",value:function(){var e=this.container,t=e.clientHeight;return e.scrollHeight-10<=t+Math.ceil(this.container.scrollTop)}},{key:"judgeReadFinish",value:function(){(this.readAll||this.isHitBottom())&&this.readFinish()}},{key:"readFinish",value:function(){if(this.readAll){var e=new CustomEvent("readFinish",{detail:{finishReading:!0}});this.dispatchEvent(e)}}},{key:"setScale",value:function(e,t){if(!this.zoomDisable){if(e<1)return console.warn("不支持1倍以下的缩小");if(this.container.style.getPropertyValue("--pdf-scale-factor"),t){this.container.scrollTop,this.container.scrollLeft;var r=this.container.getBoundingClientRect();t.x,r.left,t.y,r.top;this.container.offsetTop,this.num,this.container.style.setProperty("--pdf-scale-factor",e)}else this.container.style.setProperty("--pdf-scale-factor",e),this.pdfViewer.setScale(e)}}},{key:"doubleClick",value:function(){var e=this;if(!this.zoomDisable){var t=1,r=Date.now();return function(n){if(n.stopPropagation(),1===t&&(r=(new Date).getTime(),t++,setTimeout((function(){t=1}),300)),2==t)t++;else if((new Date).getTime()-r<400){var a=e.container.style.getPropertyValue("--pdf-scale-factor");e.setScale(Number(a)===Number(e.scale)?e.maxZoom:e.scale,n),t=1}}}}},{key:"backTop",value:function(){this.container.scrollTop=0,this.goto(1)}},{key:"onError",value:function(e){this.initializing=!1,this.showMsg=e.message,this.requestUpdate();var t=new CustomEvent("error",{detail:e});this.dispatchEvent(t)}},{key:"render",value:function(){return html(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n \x3c!----\x3e\n \n \n \n \n ','\n \n \n \n \n ',"/",'\n \n\n
\n
\n
\n
\n \n \n '])),pdfStyles,classMap$1({"__pdf_display-none":!this.height}),styleMap$1({height:this.height+"px",width:this.width?this.width+"px":"auto"}),classMap$1({"__pdf_display-none":!this.initializing}),classMap$1({"__pdf_display-none":!this.showMsg}),this.showMsg,classMap$1({"__pdf_display-none":this.showMsg}),styleMap$1({"--process-percent":this.percent+"%"}),classMap$1({"__pdf_display-none":this.initializing||!this.numPages,"__pdf_hide-num":!this.scrolling}),this.num,this.numPages,classMap$1({"__pdf_display-none":this.num<=1||this.hideBackTop}),this.backTop,this.doubleClick())}}],[{key:"styles",get:function(){return css(_templateObject2||(_templateObject2=_taggedTemplateLiteral([""])))}},{key:"properties",get:function(){return{source:{type:[String,ArrayBuffer]},width:{type:Number,attribute:!0},height:{type:Number,attribute:!0},limit:{type:Number,attribute:!0},hideBackTop:{type:Boolean,attribute:"hide-back-top"},hidePageNum:{type:Boolean,attribute:"hide-page-num"},"cmap-url":{type:String},scale:{type:Number,attribute:!0},"max-zoom":{type:Number,attribute:!0},zoomDisable:{type:Boolean,attribute:"zoom-disable"},pageIdPrefix:{type:String,attribute:"page-id-prefix"}}}}]),n}(LitElement);function PdfViewRegistry(e){customElements.get(e)?console.warn("<"+e+">组件已注册"):customElements.define(e,PdfView)}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var _require=require$$0,debounce=_require.debounce,isArrayBuffer=_require.isArrayBuffer,classMap=_require.classMap,styleMap=_require.styleMap,addClass=_require.addClass,removeClass=_require.removeClass;_require.pdfStyles;var PDFRenderingQueue=_require.PDFRenderingQueue,PageViewer=_require.PageViewer,PDFViewer=_require.PDFViewer,pdfjsLib=pdf.exports;pdfjsLib.GlobalWorkerOptions.workerSrc=("undefined"!=typeof window?window:{}).pdfjsWorker=pdf_worker.exports;var _options=new WeakMap,_defineProperties=new WeakSet,_initPdf=new WeakSet,_init=new WeakSet,_progress=new WeakSet,_renderPdf=new WeakSet,_handleScroll=new WeakSet,_handleView=new WeakSet,_bindEvent=new WeakSet,_doubleClick=new WeakSet,_isHitBottom=new WeakSet,_judgeReadFinish=new WeakSet,_readFinish=new WeakSet,_backTop=new WeakSet,_updateNum=new WeakSet,_onError=new WeakSet,_updateDom=new WeakSet,_render=new WeakSet,PdfViewLib=function(){function e(t,r){if(_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_render),_classPrivateMethodInitSpec(this,_updateDom),_classPrivateMethodInitSpec(this,_onError),_classPrivateMethodInitSpec(this,_updateNum),_classPrivateMethodInitSpec(this,_backTop),_classPrivateMethodInitSpec(this,_readFinish),_classPrivateMethodInitSpec(this,_judgeReadFinish),_classPrivateMethodInitSpec(this,_isHitBottom),_classPrivateMethodInitSpec(this,_doubleClick),_classPrivateMethodInitSpec(this,_bindEvent),_classPrivateMethodInitSpec(this,_handleView),_classPrivateMethodInitSpec(this,_handleScroll),_classPrivateMethodInitSpec(this,_renderPdf),_classPrivateMethodInitSpec(this,_progress),_classPrivateMethodInitSpec(this,_init),_classPrivateMethodInitSpec(this,_initPdf),_classPrivateMethodInitSpec(this,_defineProperties),_classPrivateFieldInitSpec(this,_options,{writable:!0,value:{height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:"auto",initializing:!1,showMsg:"",percent:0,num:0,numPages:0,hideBackTop:!1,scrolling:!1,readAll:!1}}),_defineProperty(this,"hasInit",!1),_defineProperty(this,"key",Date.now()),_defineProperty(this,"source",""),_defineProperty(this,"scale",1),_defineProperty(this,"maxZoom",2),_defineProperty(this,"zoomDisable",!1),_defineProperty(this,"pdfScale",1),_defineProperty(this,"limit",0),_defineProperty(this,"pdfViewer",null),_defineProperty(this,"renderingQueue",null),_defineProperty(this,"dom",null),_defineProperty(this,"id",""),_defineProperty(this,"eventMap",{}),_defineProperty(this,"domStyle",""),_defineProperty(this,"container",null),_defineProperty(this,"pdfScrollTop",0),_defineProperty(this,"scrollDown",!0),_defineProperty(this,"timer",null),_defineProperty(this,"pageIdPrefix",""),t&&(this.dom=document.querySelector(t)),!this.dom)throw new Error("pdf组件初始化异常:请传入正确的节点 id");if(!r.source)throw new Error("pdf类初始化异常:请输入正确的 pdf 地址");r.height&&(_classPrivateFieldGet(this,_options).height=r.height),r.width&&(_classPrivateFieldGet(this,_options).width=r.width),this.source=r.source,r.pdfScale&&(this.pdfScale=r["pdf-scale"]),this.container=void 0,this.pageIdPrefix=r["page-id-prefix"]||"",r.scale&&!Number.isNaN(r.scale)&&(this.scale=r.scale),r.limit&&!Number.isNaN(r.limit)&&(this.limit=r.limit),r.maxZoom&&!Number.isNaN(r["max-zoom"])&&(this.maxZoom=r.maxZoom),_classPrivateFieldGet(this,_options).hideBackTop=r["hide-back-top"],this.zoomDisable=!!r["zoom-disable"],_classPrivateMethodGet(this,_render,_render2).call(this),_classPrivateMethodGet(this,_defineProperties,_defineProperties2).call(this),_classPrivateMethodGet(this,_bindEvent,_bindEvent2).call(this),_classPrivateMethodGet(this,_initPdf,_initPdf2).call(this)}return _createClass(e,[{key:"clearPdf",value:function(){this.pdfViewer.resetPdfViewer()}},{key:"setScale",value:function(e,t){if(!this.zoomDisable){if(e<1)return console.warn("不支持1倍以下的缩小");var r=this.container.style.getPropertyValue("--pdf-scale-factor");if(t){var n=e/r,a=this.container.scrollTop,i=this.container.scrollLeft,o=this.container.getBoundingClientRect(),s={x:t.x-o.left,y:t.y-o.top},c=s.x,l=s.y,u=this.container.offsetTop*_classPrivateFieldGet(this,_options).num,h=Math.floor((a+l-u)*n-l+u),f=Math.floor((i+c)*n-c);this.container.style.setProperty("--pdf-scale-factor",e),this.container.scrollTop=h>0?h:0,this.container.scrollLeft=f>0?f:0}else this.container.style.setProperty("--pdf-scale-factor",e),this.pdfViewer.setScale(e)}}},{key:"setZoom",value:function(e){this.zoomDisable=!e}},{key:"goto",value:function(e){var t=this;if(e%1==0&&e&&!(e>_classPrivateFieldGet(this,_options).numPages)){var r=this.dom.querySelector(".__pdf_page"+e).offsetTop;this.container.scrollTop=r,this.scrollDown=this.num-e<0,this.pdfViewer.renderPageInterval(e,this.scrollDown),this.num=e,_classPrivateMethodGet(this,_updateNum,_updateNum2).call(this,this.num),this.scrolling=!0,setTimeout((function(){t.scrolling=!1}),2e3)}}},{key:"on",value:function(e,t){this.dom.addEventListener(e,t),this.eventMap[e]?this.eventMap[e].push(t):this.eventMap[e]=[t]}},{key:"trigger",value:function(e,t){var r=this.eventMap[e];r&&r.forEach((function(e){e(t)}))}}]),e}();function _defineProperties2(){var e=this,t=this;Object.keys(_classPrivateFieldGet(this,_options)).forEach((function(r){t["data_"+r]=_classPrivateFieldGet(e,_options)[r],Object.defineProperty(_classPrivateFieldGet(e,_options),r,{get:function(){return t["data_"+r]},set:function(e){t["data_"+r]=e,_classPrivateMethodGet(t,_updateDom,_updateDom2).call(t,r)}})}))}function _initPdf2(){this.renderingQueue=new PDFRenderingQueue({limit:this.limit}),this.pdfViewer=new PDFViewer({viewer:this.container,pdfScale:this.pdfScale,scale:this.scale,renderingQueue:this.renderingQueue}),_classPrivateMethodGet(this,_init,_init2).call(this,this.source)}function _init2(e){return _init3.apply(this,arguments)}function _init3(){return _init3=_asyncToGenerator(regenerator.mark((function e(t){var r,n,a=this;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.container.style.setProperty("--pdf-scale-factor",this.scale),("string"==typeof this.source||isArrayBuffer(this.source))&&this.source&&("string"!=typeof this.source||/\.pdf$/i.test(this.source))){e.next=3;break}return e.abrupt("return",_classPrivateMethodGet(this,_onError,_onError2).call(this,{code:1,message:"请传入正确的 pdf 文件地址"}));case 3:if(_classPrivateFieldGet(this,_options).showMsg="",_classPrivateFieldGet(this,_options).initializing=!0,_classPrivateFieldGet(this,_options).readAll=!1,_classPrivateFieldGet(this,_options).percent=0,ReadableStream){e.next=9;break}return e.abrupt("return",_classPrivateMethodGet(this,_onError,_onError2).call(this,{code:4,message:"当前环境不支持 pdf 组件预览"}));case 9:r={isEvalSupported:!1},this["cmap-url"]&&(r.cMapUrl=this["cmap-url"]),"string"==typeof t&&(r.url=t),isArrayBuffer(t)&&(r.data=t),(n=pdfjsLib.getDocument(r)).onProgress=function(e){var t=e.loaded,r=e.total;_classPrivateMethodGet(a,_progress,_progress2).call(a,t/r)},n.promise.then((function(e){a.pdfViewer.setDocument(e),_classPrivateFieldGet(a,_options).numPages=a.pdfViewer.numPages,_classPrivateFieldGet(a,_options).num=1,_classPrivateMethodGet(a,_renderPdf,_renderPdf2).call(a)})).catch((function(e){_classPrivateMethodGet(a,_onError,_onError2).call(a,{message:"pdf 文件加载失败",code:3})}));case 16:case"end":return e.stop()}}),e,this)}))),_init3.apply(this,arguments)}function _progress2(e){var t=this;if(e){var r=Math.round(100*e);r<=_classPrivateFieldGet(this,_options).percent||(r<=100&&-1!==_classPrivateFieldGet(this,_options).percent&&(_classPrivateFieldGet(this,_options).percent=r,this.trigger("progress",{progress:r})),r>=100&&(this.hasInit||(this.trigger("ready",{title:this.pdfViewer.pdfTitle,totalPage:this.numPages}),this.hasInit=!0),setTimeout((function(){_classPrivateFieldGet(t,_options).percent=-1}),0)))}}function _renderPdf2(){return _renderPdf3.apply(this,arguments)}function _renderPdf3(){return(_renderPdf3=_asyncToGenerator(regenerator.mark((function e(){var t,r,n,a,i,o,s,c;return regenerator.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.pdfViewer.getPage(1);case 2:for(t=e.sent,r=t.getViewport({scale:this.pdfScale}),n=r.height/r.width,a=Math.floor(this.container.clientWidth)-16,i=Math.floor(a*n),this.firstPage={height:i,width:a},o=1;o<=_classPrivateFieldGet(this,_options).numPages;++o)(s=this.dom.querySelector(".__pdf_page"+o)).style.width="calc(var(--pdf-scale-factor) * ".concat(a,"px)"),s.style.height="calc(var(--pdf-scale-factor) * ".concat(i,"px)"),c=new PageViewer({id:o,pageIdPrefix:this.pageIdPrefix,pdfScale:this.pdfScale,scale:this.scale,defaultViewport:r.clone(),renderingQueue:this.renderingQueue,div:s,width:a,height:i}),this.pdfViewer.pushPage(c);this.pdfViewer.renderPageInterval(1,!0),_classPrivateFieldGet(this,_options).scrolling=!1,_classPrivateFieldGet(this,_options).initializing=!1,_classPrivateMethodGet(this,_judgeReadFinish,_judgeReadFinish2).call(this);case 13:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function _handleScroll2(e){var t=this.num,r=Math.ceil(this.container.scrollTop);if(_classPrivateFieldGet(this,_options).numPages&&!_classPrivateFieldGet(this,_options).initializing&&!this.pdfViewer.iniState){if(r<=0)_classPrivateFieldGet(this,_options).num=1;else{_classPrivateFieldGet(this,_options).scrolling=!0;var n=r-this.pdfScrollTop;this.pdfScrollTop=r,this.scrollDown=n>0;var a=this.dom.querySelector(".__pdf_page1").clientHeight,i=_classPrivateFieldGet(this,_options).num+Math.ceil(n/a);i=i>_classPrivateFieldGet(this,_options).numPages?_classPrivateFieldGet(this,_options).numPages:i<1?1:i;for(var o=Math.ceil(a/2);i>=1&&i<=_classPrivateFieldGet(this,_options).numPages;){var s=this.dom.querySelector(".__pdf_page"+i),c=this.dom.querySelector(".__pdf_page"+(i+1));if(r>=s.offsetTop-o&&(!c||r=c.offsetTop-o&&i++}}_classPrivateFieldGet(this,_options).readAll||_classPrivateMethodGet(this,_judgeReadFinish,_judgeReadFinish2).call(this),this.num!==t&&_classPrivateMethodGet(this,_updateNum,_updateNum2).call(this,this.num)}}function _handleView2(e){this.pdfViewer.currentNum!==_classPrivateFieldGet(this,_options).num&&(this.pdfViewer.renderPageInterval(_classPrivateFieldGet(this,_options).num,this.scrollDown),_classPrivateMethodGet(this,_isHitBottom,_isHitBottom2).call(this)&&_classPrivateFieldGet(this,_options).numPages-_classPrivateFieldGet(this,_options).num>1&&this.pdfViewer.renderPageInterval(_classPrivateFieldGet(this,_options).numPages,this.scrollDown))}function _bindEvent2(){var e=this,t=this.dom.querySelector(".__pdf_container"),r=this.dom.querySelector(".__pdf_forceRead_btn"),n=this.dom.querySelector(".__pdf_backTop");t&&t.addEventListener("click",_classPrivateMethodGet(this,_doubleClick,_doubleClick2).bind(this)()),r&&r.addEventListener("click",_classPrivateMethodGet(this,_readFinish,_readFinish2).bind(this)),n&&n.addEventListener("click",_classPrivateMethodGet(this,_backTop,_backTop2).bind(this)),this.container=this.dom.querySelector(".__pdf_component_box"),this.container.addEventListener("scroll",debounce(_classPrivateMethodGet(this,_handleScroll,_handleScroll2).bind(this),100)),this.container.addEventListener("scroll",debounce((function(t){_classPrivateFieldGet(e,_options).scrolling=!1}),3e3,!0).bind(this)),this.container.addEventListener("scroll",debounce(_classPrivateMethodGet(this,_handleView,_handleView2).bind(this),50,!0).bind(this))}function _doubleClick2(){var e=this;if(!this.zoomDisable){var t=1,r=Date.now();return function(n){if(n.stopPropagation(),1===t&&(r=(new Date).getTime(),t++,setTimeout((function(){t=1}),300)),2==t)t++;else if((new Date).getTime()-r<400){var a=e.container.style.getPropertyValue("--pdf-scale-factor");e.setScale(Number(a)===Number(e.scale)?e.maxZoom:e.scale,n),t=1}}}}function _isHitBottom2(){var e=this.container,t=e.clientHeight;return e.scrollHeight-10<=t+Math.ceil(this.container.scrollTop)}function _judgeReadFinish2(){(this.readAll||_classPrivateMethodGet(this,_isHitBottom,_isHitBottom2).call(this))&&_classPrivateMethodGet(this,_readFinish,_readFinish2).call(this)}function _readFinish2(){this.readAll&&this.trigger("#readFinish",{finishReading:!0})}function _backTop2(){this.container.scrollTop=0,this.goto(1)}function _updateNum2(e){this.on("numUpdate",{currentNum:e})}function _onError2(e){_classPrivateFieldGet(this,_options).initializing=!1,_classPrivateFieldGet(this,_options).showMsg=e.message,this.trigger("error",e)}function _updateDom2(e){var t=this.dom.querySelector(".__pdf_component"),r=this.dom.querySelector(".__pdf_error"),n=this.dom.querySelector(".__pdf_component_out_box"),a=this.dom.querySelector(".__pdf_pageNum_box"),i=this.dom.querySelector(".__pdf_loader"),o=this.dom.querySelector(".__pdf_loading_bar"),s=this.dom.querySelector(".__pdf_container"),c=this.dom.querySelector(".__pdf_backTop");if("height"!==e&&"width"!==e||(_classPrivateFieldGet(this,_options).height?removeClass(t.classList,"__pdf_display-none"):addClass(t.classList,"__pdf_display-none"),t.style.height=_classPrivateFieldGet(this,_options).height+"px",t.style.width=_classPrivateFieldGet(this,_options).width?_classPrivateFieldGet(this,_options).width+"px":"auto"),"showMsg"===e&&(_classPrivateFieldGet(this,_options).showMsg?(removeClass(r.classList,"__pdf_display-none"),addClass(n.classList,"__pdf_display-none")):(addClass(r.classList,"__pdf_display-none"),removeClass(n.classList,"__pdf_display-none")),_classPrivateFieldGet(this,_options).showMsg&&(r.innerHTML=_classPrivateFieldGet(this,_options).showMsg)),"initializing"===e&&(_classPrivateFieldGet(this,_options).initializing?removeClass(i.classList,"__pdf_display-none"):addClass(i.classList,"__pdf_display-none")),["initializing","numPages"].includes(e)&&(!_classPrivateFieldGet(this,_options).initializing&&_classPrivateFieldGet(this,_options).numPages?removeClass(a.classList,"__pdf_display-none"):addClass(a.classList,"__pdf_display-none")),"scrolling"===e&&(_classPrivateFieldGet(this,_options).scrolling?removeClass(a.classList,"__pdf_hide-num"):addClass(a.classList,"__pdf_hide-num")),"percent"===e&&(o.style["--process-percent"]=_classPrivateFieldGet(this,_options).percent+"%"),"numPages"===e){for(var l="",u=0;u<_classPrivateFieldGet(this,_options).numPages;u++)l+='
');s.innerHTML=l}"num"!==e&&"hideBackTop"!==e||("num"===e&&(a.innerHTML=_classPrivateFieldGet(this,_options).num+"/"+_classPrivateFieldGet(this,_options).numPages),_classPrivateFieldGet(this,_options).num<=1||_classPrivateFieldGet(this,_options).hideBackTop?addClass(c.classList,"__pdf_display-none"):removeClass(c.classList,"__pdf_display-none"))}function _render2(){this.dom.innerHTML='\n \n \n \n ').concat(_classPrivateFieldGet(this,_options).showMsg,'\n \n
\n
\n \n ').concat(_classPrivateFieldGet(this,_options).num,"/").concat(_classPrivateFieldGet(this,_options).numPages,'\n \n
\n
\n
\n
\n \n \n ')}var index={PdfViewRegistry:PdfViewRegistry,PdfViewLib:PdfViewLib};return index})); diff --git a/example/example/react_demo/src/App.js b/example/example/react_demo/src/App.js index f2c3d49..74ec647 100644 --- a/example/example/react_demo/src/App.js +++ b/example/example/react_demo/src/App.js @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import './App.css'; -import "pdfview/dist/css.css"; +import "pdfview/dist/index.css"; const src = './1.pdf'; @@ -21,7 +21,7 @@ function App() { setPdfViewLib(new module.PdfViewLib('#pdf-com', { source: src, maxZoom: 5, - height: 200, + height: 300, })) setComponentLoaded(true) }); @@ -33,7 +33,7 @@ function App() {

自定义组件模式

{!componentLoaded &&
加载中...
} - {componentLoaded && } + {componentLoaded && }

js调用模式

diff --git a/example/example/vue3/package.json b/example/example/vue3/package.json index 88fcb98..4bb0365 100644 --- a/example/example/vue3/package.json +++ b/example/example/vue3/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "vite --host 0.0.0.0 --port 9999", + "dev": "vite --host 0.0.0.0 --port 9999 --force", "build": "vite build", "preview": "vite preview", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore", diff --git a/example/example/vue3/src/components/HelloWorld.vue b/example/example/vue3/src/components/HelloWorld.vue index ff1fdc1..b4c8456 100644 --- a/example/example/vue3/src/components/HelloWorld.vue +++ b/example/example/vue3/src/components/HelloWorld.vue @@ -18,7 +18,7 @@ :source="data.src" :scale="data.scale" :max-zoom="3" - :height="200" + :height="300" @readFinish="readFinish" @numUpdate="updateNum" @progress="progress" @@ -31,7 +31,7 @@