pdfjs-dist
Version:
Generic build of Mozilla's PDF.js library.
22 lines • 427 kB
JavaScript
/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2021 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @licend The above is the entire license notice for the
* Javascript code in this page
*/
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],r):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=r():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=r()}(this,(function(){return(()=>{var __webpack_modules__=[,(t,r,a)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0});r.addLinkAttributes=function addLinkAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.url,o=r.target,u=r.rel,c=r.enabled,d=void 0===c||c;(0,i.assert)(a&&"string"==typeof a,'addLinkAttributes: A valid "url" parameter must provided.');var h=(0,i.removeNullCharacters)(a);if(d)t.href=t.title=h;else{t.href="";t.title="Disabled: ".concat(h);t.onclick=function(){return!1}}var p="";switch(o){case g.NONE:break;case g.SELF:p="_self";break;case g.BLANK:p="_blank";break;case g.PARENT:p="_parent";break;case g.TOP:p="_top"}t.target=p;t.rel="string"==typeof u?u:l};r.deprecated=function deprecated(t){console.log("Deprecated API usage: "+t)};r.getFilenameFromUrl=function getFilenameFromUrl(t){var r=t.indexOf("#"),a=t.indexOf("?"),o=Math.min(r>0?r:t.length,a>0?a:t.length);return t.substring(t.lastIndexOf("/",o)+1,o)};r.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof t)return r;if(isDataScheme(t)){(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return r}var a=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,o=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,l=a.exec(t),u=o.exec(l[1])||o.exec(l[2])||o.exec(l[3]);if(u&&(u=u[0]).includes("%"))try{u=o.exec(decodeURIComponent(u))[0]}catch(t){}return u||r};r.isDataScheme=isDataScheme;r.isFetchSupported=isFetchSupported;r.isPdfFile=function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)};r.isValidFetchUrl=isValidFetchUrl;r.loadScript=function loadScript(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(a,o){var i=document.createElement("script");i.src=t;i.onload=function(t){r&&i.remove();a(t)};i.onerror=function(){o(new Error("Cannot load script at: ".concat(i.src)))};(document.head||document.documentElement).appendChild(i)}))};r.StatTimer=r.RenderingCancelledException=r.PDFDateString=r.PageViewport=r.LinkTarget=r.DOMSVGFactory=r.DOMCMapReaderFactory=r.DOMCanvasFactory=r.DEFAULT_LINK_REL=r.BaseCMapReaderFactory=r.BaseCanvasFactory=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(2)),i=a(4);function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=t[Symbol.iterator]()},n:function n(){var t=a.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=new Array(r);a<r;a++)o[a]=t[a];return o}function asyncGeneratorStep(t,r,a,o,i,l,u){try{var c=t[l](u),d=c.value}catch(t){a(t);return}c.done?r(d):Promise.resolve(d).then(o,i)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(o,i){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,o,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,i,_next,_throw,"throw",t)}_next(void 0)}))}}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}var l="noopener noreferrer nofollow";r.DEFAULT_LINK_REL=l;var u="http://www.w3.org/2000/svg",c=function(){function BaseCanvasFactory(){_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){(0,i.unreachable)("Abstract method `create` called.")}},{key:"reset",value:function reset(t,r,a){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=r;t.canvas.height=a}},{key:"destroy",value:function destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}}]);return BaseCanvasFactory}();r.BaseCanvasFactory=c;var d=function(t){_inherits(DOMCanvasFactory,t);var r=_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.ownerDocument,i=void 0===o?globalThis.document:o;_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=i;return t}_createClass(DOMCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=this._document.createElement("canvas"),o=a.getContext("2d");a.width=t;a.height=r;return{canvas:a,context:o}}}]);return DOMCanvasFactory}(c);r.DOMCanvasFactory=d;var h=function(){function BaseCMapReaderFactory(t){var r=t.baseUrl,a=void 0===r?null:r,o=t.isCompressed,l=void 0!==o&&o;_classCallCheck(this,BaseCMapReaderFactory);this.constructor===BaseCMapReaderFactory&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=a;this.isCompressed=l}_createClass(BaseCMapReaderFactory,[{key:"fetch",value:(t=_asyncToGenerator(o.default.mark((function _callee(t){var r,a,l,u=this;return o.default.wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:r=t.name;if(this.baseUrl){o.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){o.next=5;break}throw new Error("CMap name must be specified.");case 5:a=this.baseUrl+r+(this.isCompressed?".bcmap":"");l=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return o.abrupt("return",this._fetchData(a,l).catch((function(t){throw new Error("Unable to load ".concat(u.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return o.stop()}}),_callee,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t,r){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseCMapReaderFactory}();r.BaseCMapReaderFactory=h;var p=function(t){_inherits(DOMCMapReaderFactory,t);var r=_createSuper(DOMCMapReaderFactory);function DOMCMapReaderFactory(){_classCallCheck(this,DOMCMapReaderFactory);return r.apply(this,arguments)}_createClass(DOMCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){var a=this;return isFetchSupported()&&isValidFetchUrl(t,document.baseURI)?fetch(t).then(function(){var t=_asyncToGenerator(o.default.mark((function _callee2(t){var l;return o.default.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:if(t.ok){o.next=2;break}throw new Error(t.statusText);case 2:if(!a.isCompressed){o.next=10;break}o.t0=Uint8Array;o.next=6;return t.arrayBuffer();case 6:o.t1=o.sent;l=new o.t0(o.t1);o.next=15;break;case 10:o.t2=i.stringToBytes;o.next=13;return t.text();case 13:o.t3=o.sent;l=(0,o.t2)(o.t3);case 15:return o.abrupt("return",{cMapData:l,compressionType:r});case 16:case"end":return o.stop()}}),_callee2)})));return function(r){return t.apply(this,arguments)}}()):new Promise((function(o,l){var u=new XMLHttpRequest;u.open("GET",t,!0);a.isCompressed&&(u.responseType="arraybuffer");u.onreadystatechange=function(){if(u.readyState===XMLHttpRequest.DONE){if(200===u.status||0===u.status){var t;a.isCompressed&&u.response?t=new Uint8Array(u.response):!a.isCompressed&&u.responseText&&(t=(0,i.stringToBytes)(u.responseText));if(t){o({cMapData:t,compressionType:r});return}}l(new Error(u.statusText))}};u.send(null)}))}}]);return DOMCMapReaderFactory}(h);r.DOMCMapReaderFactory=p;var m=function(){function DOMSVGFactory(){_classCallCheck(this,DOMSVGFactory)}_createClass(DOMSVGFactory,[{key:"create",value:function create(t,r){(0,i.assert)(t>0&&r>0,"Invalid SVG dimensions");var a=document.createElementNS(u,"svg:svg");a.setAttribute("version","1.1");a.setAttribute("width",t+"px");a.setAttribute("height",r+"px");a.setAttribute("preserveAspectRatio","none");a.setAttribute("viewBox","0 0 "+t+" "+r);return a}},{key:"createElement",value:function createElement(t){(0,i.assert)("string"==typeof t,"Invalid SVG element type");return document.createElementNS(u,t)}}]);return DOMSVGFactory}();r.DOMSVGFactory=m;var v=function(){function PageViewport(t){var r=t.viewBox,a=t.scale,o=t.rotation,i=t.offsetX,l=void 0===i?0:i,u=t.offsetY,c=void 0===u?0:u,d=t.dontFlip,h=void 0!==d&&d;_classCallCheck(this,PageViewport);this.viewBox=r;this.scale=a;this.rotation=o;this.offsetX=l;this.offsetY=c;var p,m,v,y,g,b,_,S,C=(r[2]+r[0])/2,A=(r[3]+r[1])/2;(o%=360)<0&&(o+=360);switch(o){case 180:p=-1;m=0;v=0;y=1;break;case 90:p=0;m=1;v=1;y=0;break;case 270:p=0;m=-1;v=-1;y=0;break;case 0:p=1;m=0;v=0;y=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(h){v=-v;y=-y}if(0===p){g=Math.abs(A-r[1])*a+l;b=Math.abs(C-r[0])*a+c;_=Math.abs(r[3]-r[1])*a;S=Math.abs(r[2]-r[0])*a}else{g=Math.abs(C-r[0])*a+l;b=Math.abs(A-r[1])*a+c;_=Math.abs(r[2]-r[0])*a;S=Math.abs(r[3]-r[1])*a}this.transform=[p*a,m*a,v*a,y*a,g-p*a*C-v*a*A,b-m*a*C-y*a*A];this.width=_;this.height=S}_createClass(PageViewport,[{key:"clone",value:function clone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=void 0===r?this.scale:r,o=t.rotation,i=void 0===o?this.rotation:o,l=t.offsetX,u=void 0===l?this.offsetX:l,c=t.offsetY,d=void 0===c?this.offsetY:c,h=t.dontFlip,p=void 0!==h&&h;return new PageViewport({viewBox:this.viewBox.slice(),scale:a,rotation:i,offsetX:u,offsetY:d,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return i.Util.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=i.Util.applyTransform([t[0],t[1]],this.transform),a=i.Util.applyTransform([t[2],t[3]],this.transform);return[r[0],r[1],a[0],a[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(t,r){return i.Util.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}();r.PageViewport=v;var y=function(t){_inherits(RenderingCancelledException,t);var r=_createSuper(RenderingCancelledException);function RenderingCancelledException(t,a){var o;_classCallCheck(this,RenderingCancelledException);(o=r.call(this,t)).type=a;return o}return RenderingCancelledException}(i.BaseException);r.RenderingCancelledException=y;var g={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};r.LinkTarget=g;function isDataScheme(t){for(var r=t.length,a=0;a<r&&""===t[a].trim();)a++;return"data:"===t.substring(a,a+5).toLowerCase()}var b,_=function(){function StatTimer(){_classCallCheck(this,StatTimer);this.started=Object.create(null);this.times=[]}_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&(0,i.warn)("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||(0,i.warn)("Timer has not been started for ".concat(t));this.times.push({name:t,start:this.started[t],end:Date.now()});delete this.started[t]}},{key:"toString",value:function toString(){var t,r=[],a=0,o=_createForOfIteratorHelper(this.times);try{for(o.s();!(t=o.n()).done;){var i=t.value.name;i.length>a&&(a=i.length)}}catch(t){o.e(t)}finally{o.f()}var l,u=_createForOfIteratorHelper(this.times);try{for(u.s();!(l=u.n()).done;){var c=l.value,d=c.end-c.start;r.push("".concat(c.name.padEnd(a)," ").concat(d,"ms\n"))}}catch(t){u.e(t)}finally{u.f()}return r.join("")}}]);return StatTimer}();r.StatTimer=_;function isFetchSupported(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function isValidFetchUrl(t,r){try{var a=(r?new URL(t,r):new URL(t)).protocol;return"http:"===a||"https:"===a}catch(t){return!1}}var S=function(){function PDFDateString(){_classCallCheck(this,PDFDateString)}_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||!(0,i.isString)(t))return null;b||(b=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=b.exec(t);if(!r)return null;var a=parseInt(r[1],10),o=parseInt(r[2],10);o=o>=1&&o<=12?o-1:0;var l=parseInt(r[3],10);l=l>=1&&l<=31?l:1;var u=parseInt(r[4],10);u=u>=0&&u<=23?u:0;var c=parseInt(r[5],10);c=c>=0&&c<=59?c:0;var d=parseInt(r[6],10);d=d>=0&&d<=59?d:0;var h=r[7]||"Z",p=parseInt(r[8],10);p=p>=0&&p<=23?p:0;var m=parseInt(r[9],10)||0;m=m>=0&&m<=59?m:0;if("-"===h){u+=p;c+=m}else if("+"===h){u-=p;c-=m}return new Date(Date.UTC(a,o,l,u,c,d))}}]);return PDFDateString}();r.PDFDateString=S},(t,r,a)=>{"use strict";t.exports=a(3)},(t,r,a)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){var r,a=Object.prototype,o=a.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function define(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var i=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(i.prototype),u=new Context(o||[]);l._invoke=function makeInvokeMethod(t,r,a){var o=d;return function invoke(i,l){if(o===p)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw l;return doneResult()}a.method=i;a.arg=l;for(;;){var u=a.delegate;if(u){var c=maybeInvokeDelegate(u,a);if(c){if(c===v)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(o===d){o=m;throw a.arg}a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);o=p;var y=tryCatch(t,r,a);if("normal"===y.type){o=a.done?m:h;if(y.arg===v)continue;return{value:y.arg,done:a.done}}if("throw"===y.type){o=m;a.method="throw";a.arg=y.arg}}}}(t,a,u);return l}t.wrap=wrap;function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var y={};y[l]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(values([])));b&&b!==a&&o.call(b,l)&&(y=b);var _=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(y);GeneratorFunction.prototype=_.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction");function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,GeneratorFunctionPrototype);else{t.__proto__=GeneratorFunctionPrototype;define(t,c,"GeneratorFunction")}t.prototype=Object.create(_);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){function invoke(a,i,l,u){var c=tryCatch(t[a],t,i);if("throw"!==c.type){var d=c.arg,h=d.value;return h&&"object"===_typeof(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(h).then((function(t){d.value=t;l(d)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var a;this._invoke=function enqueue(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,o,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[u]=function(){return this};t.AsyncIterator=AsyncIterator;t.async=function(r,a,o,i,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,a,o,i),l);return t.isGeneratorFunction(a)?u:u.next().then((function(t){return t.done?t.value:u.next()}))};function maybeInvokeDelegate(t,a){var o=t.iterator[a.method];if(o===r){a.delegate=null;if("throw"===a.method){if(t.iterator.return){a.method="return";a.arg=r;maybeInvokeDelegate(t,a);if("throw"===a.method)return v}a.method="throw";a.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=tryCatch(o,t.iterator,a.arg);if("throw"===i.type){a.method="throw";a.arg=i.arg;a.delegate=null;return v}var l=i.arg;if(!l){a.method="throw";a.arg=new TypeError("iterator result is not an object");a.delegate=null;return v}if(!l.done)return l;a[t.resultName]=l.value;a.next=t.nextLoc;if("return"!==a.method){a.method="next";a.arg=r}a.delegate=null;return v}defineIteratorMethods(_);define(_,c,"Generator");_[l]=function(){return this};_.toString=function(){return"[object Generator]"};function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]);if(2 in t){r.finallyLoc=t[2];r.afterLoc=t[3]}this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal";delete r.arg;t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}];t.forEach(pushTryEntry,this);this.reset(!0)}t.keys=function(t){var r=[];for(var a in t)r.push(a);r.reverse();return function next(){for(;r.length;){var a=r.pop();if(a in t){next.value=a;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function next(){for(;++i<t.length;)if(o.call(t,i)){next.value=t[i];next.done=!1;return next}next.value=r;next.done=!0;return next};return u.next=u}}return{next:doneResult}}t.values=values;function doneResult(){return{value:r,done:!0}}Context.prototype={constructor:Context,reset:function reset(t){this.prev=0;this.next=0;this.sent=this._sent=r;this.done=!1;this.delegate=null;this.method="next";this.arg=r;this.tryEntries.forEach(resetTryEntry);if(!t)for(var a in this)"t"===a.charAt(0)&&o.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var a=this;function handle(o,i){u.type="throw";u.arg=t;a.next=o;if(i){a.method="next";a.arg=r}return!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var l=this.tryEntries[i],u=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),d=o.call(l,"finallyLoc");if(c&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var l=i;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};u.type=t;u.arg=r;if(l){this.method="next";this.next=l.finallyLoc;return v}return this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&r&&(this.next=r);return v},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t){this.complete(a.completion,a.afterLoc);resetTryEntry(a);return v}}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var o=a.completion;if("throw"===o.type){var i=o.arg;resetTryEntry(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,a,o){this.delegate={iterator:values(t),resultName:a,nextLoc:o};"next"===this.method&&(this.arg=r);return v}};return t}("object"===_typeof(t=a.nmd(t))?t.exports:{});try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var a=0,o=0;o<r;o++)a+=arrayByteLength(t[o]);for(var i=0,l=new Uint8Array(a),u=0;u<r;u++){var c=t[u];c instanceof Uint8Array||(c="string"==typeof c?stringToBytes(c):new Uint8Array(c));var d=c.byteLength;l.set(c,i);i+=d}return l};r.assert=assert;r.bytesToString=function bytesToString(t){assert(null!==t&&"object"===_typeof(t)&&void 0!==t.length,"Invalid argument for bytesToString");var r=t.length,a=8192;if(r<a)return String.fromCharCode.apply(null,t);for(var o=[],i=0;i<r;i+=a){var l=Math.min(i+a,r),u=t.subarray(i,l);o.push(String.fromCharCode.apply(null,u))}return o.join("")};r.createObjectURL=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!a)return URL.createObjectURL(new Blob([t],{type:r}));for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="data:".concat(r,";base64,"),l=0,u=t.length;l<u;l+=3){var c=255&t[l],d=255&t[l+1],h=255&t[l+2],p=c>>2,m=(3&c)<<4|d>>4,v=l+1<u?(15&d)<<2|h>>6:64,y=l+2<u?63&h:64;i+=o[p]+o[m]+o[v]+o[y]}return i};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(a,o){t.resolve=function(t){r=!0;a(t)};t.reject=function(t){r=!0;o(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t,r){if(!t)return null;try{var a=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(t){}return null};r.escapeString=function escapeString(t){return t.replace(/([()\\\n\r])/g,(function(t){return"\n"===t?"\\n":"\r"===t?"\\r":"\\".concat(t)}))};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return i};r.info=function info(t){i>=o.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var a=0,o=t.length;a<o;a++)if(t[a]!==r[a])return!1;return!0};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.isBool=function isBool(t){return"boolean"==typeof t};r.isNum=function isNum(t){return"number"==typeof t};r.isSameOrigin=function isSameOrigin(t,r){var a;try{if(!(a=new URL(t)).origin||"null"===a.origin)return!1}catch(t){return!1}var o=new URL(r,a);return a.origin===o.origin};r.isString=function isString(t){return"string"==typeof t};r.objectFromMap=function objectFromMap(t){var r,a=Object.create(null),o=function _createForOfIteratorHelper(t,r){var a;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=t[Symbol.iterator]()},n:function n(){var t=a.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}(t);try{for(o.s();!(r=o.n()).done;){var i=(c=r.value,d=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(c)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],o=!0,i=!1,l=void 0;try{for(var u,c=t[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){a.push(u.value);if(r&&a.length===r)break}}catch(t){i=!0;l=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw l}}return a}(c,d)||_unsupportedIterableToArray(c,d)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],u=i[1];a[l]=u}}catch(t){o.e(t)}finally{o.f()}var c,d;return a};r.objectSize=function objectSize(t){return Object.keys(t).length};r.removeNullCharacters=function removeNullCharacters(t){if("string"!=typeof t){warn("The argument for removeNullCharacters must be a string.");return t}return t.replace(y,"")};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(i=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){var r=t.length,a=[];if("þ"===t[0]&&"ÿ"===t[1])for(var o=2;o<r;o+=2)a.push(String.fromCharCode(t.charCodeAt(o)<<8|t.charCodeAt(o+1)));else if("ÿ"===t[0]&&"þ"===t[1])for(var i=2;i<r;i+=2)a.push(String.fromCharCode(t.charCodeAt(i+1)<<8|t.charCodeAt(i)));else for(var l=0;l<r;++l){var u=C[t.charCodeAt(l)];a.push(u?String.fromCharCode(u):t.charAt(l))}return a.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],a=0,o=t.length;a<o;a++){var i=t.charCodeAt(a);r.push(String.fromCharCode(i>>8&255));r.push(String.fromCharCode(255&i))}return r.join("")};r.stringToUTF8String=function stringToUTF8String(t){return decodeURIComponent(escape(t))};r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;r.VerbosityLevel=r.Util=r.UNSUPPORTED_FEATURES=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.IsLittleEndianCached=r.IsEvalSupportedCached=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;a(5);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=new Array(r);a<r;a++)o[a]=t[a];return o}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,o=_getPrototypeOf(t);if(r){var i=_getPrototypeOf(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};r.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var i=o.WARNINGS;function warn(t){i>=o.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function assert(t,r){t||unreachable(r)}function shadow(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!1});return a}var l=function BaseExceptionClosure(){function BaseException(t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=l;var u=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,a){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t)).code=a;return o}return PasswordException}(l);r.PasswordException=u;var c=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,a){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t)).details=a;return o}return UnknownErrorException}(l);r.UnknownErrorException=c;var d=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return r.apply(this,arguments)}return InvalidPDFException}(l);r.InvalidPDFException=d;var h=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return r.apply(this,arguments)}return MissingPDFException}(l);r.MissingPDFException=h;var p=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,a){var o;_classCallCheck(this,UnexpectedResponseException);(o=r.call(this,t)).status=a;return o}return UnexpectedResponseException}(l);r.UnexpectedResponseException=p;var m=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return r.apply(this,arguments)}return FormatError}(l);r.FormatError=m;var v=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return r.apply(this,arguments)}return AbortException}(l);r.AbortException=v;var y=/\x00/g;function stringToBytes(t){assert("string"==typeof t,"Invalid argument for stringToBytes");for(var r=t.length,a=new Uint8Array(r),o=0;o<r;++o)a[o]=255&t.charCodeAt(o);return a}function arrayByteLength(t){if(void 0!==t.length)return t.length;assert(void 0!==t.byteLength,"arrayByteLength - invalid argument.");return t.byteLength}var g={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=g;var b={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=b;var _=function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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.")}()}(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),S=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);return t}(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,a){return"#".concat(_[t]).concat(_[r]).concat(_[a])}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var a=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/a,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/a]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var a=Util.applyTransform(t,r),o=Util.applyTransform(t.slice(2,4),r),i=Util.applyTransform([t[0],t[3]],r),l=Util.applyTransform([t[2],t[1]],r);return[Math.min(a[0],o[0],i[0],l[0]),Math.min(a[1],o[1],i[1],l[1]),Math.max(a[0],o[0],i[0],l[0]),Math.max(a[1],o[1],i[1],l[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],a=t[0]*r[0]+t[1]*r[2],o=t[0]*r[1]+t[1]*r[3],i=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],u=(a+l)/2,c=Math.sqrt(Math.pow(a+l,2)-4*(a*l-i*o))/2,d=u+c||1,h=u-c||1;return[Math.sqrt(d),Math.sqrt(h)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){function compare(t,r){return t-r}var a=[t[0],t[2],r[0],r[2]].sort(compare),o=[t[1],t[3],r[1],r[3]].sort(compare),i=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]))return null;i[0]=a[1];i[2]=a[2];if(!(o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]))return null;i[1]=o[1];i[3]=o[2];return i}}]);return Util}();r.Util=S;var C=[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]},(t,r,a)=>{"use strict";var o=a(6);if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=a(7));globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&o.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&o.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkObjectFromEntries(){Object.fromEntries||a(52)}();!function checkPromise(){globalThis.Promise.allSettled||(globalThis.Promise=a(85))}();!function checkReadableStream(){var t=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function start(t){t.close()}});t=!0}catch(t){}t||(globalThis.ReadableStream=a(111).ReadableStream)}();!function checkStringPadStart(){String.prototype.padStart||a(112)}();!function checkStringPadEnd(){String.prototype.padEnd||a(118)}();!function checkObjectValues(){Object.values||(Object.values=a(120))}();!function checkObjectEntries(){Object.entries||(Object.entries=a(123))}()}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=a},(t,r,a)=>{a(8);t.exports=a(10)},(t,r,a)=>{a(9)({global:!0},{globalThis:a(10)})},(t,r,a)=>{var o=a(10),i=a(11).f,l=a(25),u=a(28),c=a(29),d=a(39),h=a(51);t.exports=function(t,r){var a,p,m,v,y,g=t.target,b=t.global,_=t.stat;if(a=b?o:_?o[g]||c(g,{}):(o[g]||{}).prototype)for(p in r){v=r[p];m=t.noTargetGet?(y=i(a,p))&&y.value:a[p];if(!h(b?p:g+(_?".":"#")+p,t.forced)&&void 0!==m){if(typeof v==typeof m)continue;d(v,m)}(t.sham||m&&m.sham)&&l(v,"sham",!0);u(a,p,v,t)}}},t=>{var check=function(t){return t&&t.Math==Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(t,r,a)=>{var o=a(12),i=a(14),l=a(15),u=a(16),c=a(20),d=a(22),h=a(23),p=Object.getOwnPropertyDescriptor;r.f=o?p:function getOwnPropertyDescriptor(t,r){t=u(t);r=c(r,!0);if(h)try{return p(t,r)}catch(t){}if(d(t,r))return l(!i.f.call(t,r),t[r])}},(t,r,a)=>{var o=a(13);t.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r)=>{"use strict";var a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!a.call({1:2},1);r.f=i?function propertyIsEnumerable(t){var r=o(this,t);return!!r&&r.enumerable}:a},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,a)=>{var o=a(17),i=a(19);t.exports=function(t){return o(i(t))}},(t,r,a)=>{var o=a(13),i=a(18),l="".split;t.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?l.call(t,""):Object(t)}:Object},t=>{var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},(t,r,a)=>{var o=a(21);t.exports=function(t,r){if(!o(t))return t;var a,i;if(r&&"function"==typeof(a=t.toString)&&!o(i=a.call(t)))return i;if("function"==typeof(a=t.valueOf)&&!o(i=a.call(t)))return i;if(!r&&"function"==typeof(a=t.toString)&&!o(i=a.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},t=>{var r={}.hasOwnProperty;t.exports=function(t,a){return r.call(t,a)}},(t,r,a)=>{var o=a(12),i=a(13),l=a(24);t.exports=!o&&!i((function(){return 7!=Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},(t,r,a)=>{var o=a(10),i=a(21),l=o.document,u=i(l)&&i(l.createElement);t.exports=function(t){return u?l.createElement(t):{}}},(t,r,a)=>{var o=a(12),i=a(26),l=a(15);t.exports=o?function(t,r,a){return i.f(t,r,l(1,a))}:function(t,r,a){t[r]=a;return t}},(t,r,a)=>{var o=a(12),i=a(23),l=a(27),u=a(20),c=Object.defineProperty;r.f=o?c:function defineProperty(t,r,a){l(t);r=u(r,!0);l(a);if(i)try{return c(t,r,a)}catch(t){}if("get"in a||"set"in a)throw TypeError("Accessors not supported");"value"in a&&(t[r]=a.value);return t}},(t,r,a)=>{var o=a(21);t.exports=function(t){if(!o(t))throw TypeError(String(t)+" is not an object");return t}},(t,r,a)=>{var o=a(10),i=a(25),l=a(22),u=a(29),c=a(30),d=a(32),h=d.get,p=d.enforce,m=String(String).split("String");(t.exports=function(t,r,a,c){var d,h=!!c&&!!c.unsafe,v=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet;if("function"==typeof a){"string"!=typeof r||l(a,"name")||i(a,"name",r);(d=p(a)).source||(d.source=m.join("string"==typeof r?r:""))}if(t!==o){h?!y&&t[r]&&(v=!0):delete t[r];v?t[r]=a:i(t,r,a)}else v?t[r]=a:u(r,a)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&h(this).source||c(this)}))},(t,r,a)=>{var o=a(10),i=a(25);t.exports=function(t,r){try{i(o,t,r)}catch(a){o[t]=r}return r}},(t,r,a)=>{var o=a(31),i=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(t){return i.call(t)});t.exports=o.inspectSource},(t,r,a)=>{var o=a(10),i=a(29),l="__core-js_shared__",u=o[l]||i(l,{});t.exports=u},(t,r,a)=>{var o,i,l,u=a(33),c=a(10),d=a(21),h=a(25),p=a(22),m=a(31),v=a(34),y=a(38),g=c.WeakMap;if(u){var b=m.state||(m.state=new g),_=b.get,S=b.has,C=b.set;o=function(t,r){r.facade=t;C.call