react-pdf-highlighter
Version:
Set of React components for PDF annotation
1 lines • 598 kB
JavaScript
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var r in e)__hasOwnProp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))t.indexOf(r)<0&&__propIsEnum.call(e,r)&&(n[r]=e[r]);return n},__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n);import React$2,{Component,PureComponent,createElement}from"react";import ReactDOM from"react-dom";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(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),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.')}var FUNC_ERROR_TEXT="Expected a function",NAN=NaN,symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),objectProto=Object.prototype,objectToString=objectProto.toString,nativeMax=Math.max,nativeMin=Math.min,now=function(){return root.Date.now()};function debounce(e,t,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);function f(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){return u=e,s=setTimeout(v,t),c?f(e):a}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function v(){var e=now();if(g(e))return m(e);s=setTimeout(v,function(e){var n=t-(e-l);return h?nativeMin(n,o-(e-u)):n}(e))}function m(e){return s=void 0,d&&r?f(e):(r=i=void 0,a)}function y(){var e=now(),n=g(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return p(l);if(h)return s=setTimeout(v,t),f(l)}return void 0===s&&(s=setTimeout(v,t)),a}return t=toNumber(t)||0,isObject(n)&&(c=!!n.leading,o=(h="maxWait"in n)?nativeMax(toNumber(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:m(now())},y}function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&objectToString.call(e)==symbolTag}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return NAN;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(reTrim,"");var n=reIsBinary.test(e);return n||reIsOctal.test(e)?freeParseInt(e.slice(2),n?2:8):reIsBadHex.test(e)?NAN:+e}var lodash_debounce=debounce,pdf_viewer$2={exports:{}},pdf={exports:{}},__viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:__viteBrowserExternal}),require$$5=getAugmentedNamespace(__viteBrowserExternal$1),factory;(function(module,exports){var factory;factory=function(){return(()=>{var __webpack_modules__=[,(e,t,n)=>{function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.url,r=t.target,i=t.rel,o=t.enabled,s=void 0===o||o;(0,a.assert)(n&&"string"==typeof n,'addLinkAttributes: A valid "url" parameter must provided.');var l=(0,a.removeNullCharacters)(n);s?e.href=e.title=l:(e.href="",e.title="Disabled: ".concat(l),e.onclick=function(){return!1});var u="";switch(r){case T.NONE:break;case T.SELF:u="_self";break;case T.BLANK:u="_blank";break;case T.PARENT:u="_parent";break;case T.TOP:u="_top"}e.target=u,e.rel="string"==typeof i?i:b},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),n=e.indexOf("?"),r=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",r)+1,r)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(R(e))return(0,a.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=n.exec(e),o=r.exec(i[1])||r.exec(i[2])||r.exec(i[3]);if(o&&(o=o[0]).includes("%"))try{o=r.exec(decodeURIComponent(o))[0]}catch(s){}return o||t},t.isDataScheme=R,t.isFetchSupported=O,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=M,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(n,r){var i=document.createElement("script");i.src=e,i.onload=function(e){t&&i.remove(),n(e)},i.onerror=function(){r(new Error("Cannot load script at: ".concat(i.src)))},(document.head||document.documentElement).appendChild(i)}))},t.StatTimer=t.RenderingCancelledException=t.PDFDateString=t.PageViewport=t.LinkTarget=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.BaseCMapReaderFactory=t.BaseCanvasFactory=void 0;var i,o=(i=n(2))&&i.__esModule?i:{default:i},a=n(4);function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)}))}}function h(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})(e,t)}function f(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==r(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}var b="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=b;var _="http://www.w3.org/2000/svg",w=function(){function e(){v(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseCanvasFactory.")}return y(e,[{key:"create",value:function(e,t){(0,a.unreachable)("Abstract method `create` called.")}},{key:"reset",value:function(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}]),e}();t.BaseCanvasFactory=w;var S=function(e){h(n,e);var t=f(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.ownerDocument,o=void 0===i?globalThis.document:i;return v(this,n),(e=t.call(this))._document=o,e}return y(n,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var n=this._document.createElement("canvas"),r=n.getContext("2d");return n.width=e,n.height=t,{canvas:n,context:r}}}]),n}(w);t.DOMCanvasFactory=S;var A=function(){function e(t){var n=t.baseUrl,r=void 0===n?null:n,i=t.isCompressed,o=void 0!==i&&i;v(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=r,this.isCompressed=o}var t;return y(e,[{key:"fetch",value:(t=c(o.default.mark((function e(t){var n,r,i,s=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(n){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return r=this.baseUrl+n+(this.isCompressed?".bcmap":""),i=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(r,i).catch((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(r))})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e,t){(0,a.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=A;var x=function(e){h(n,e);var t=f(n);function n(){return v(this,n),t.apply(this,arguments)}return y(n,[{key:"_fetchData",value:function(e,t){var n=this;return O()&&M(e,document.baseURI)?fetch(e).then(function(){var e=c(o.default.mark((function e(r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.ok){e.next=2;break}throw new Error(r.statusText);case 2:if(!n.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,r.arrayBuffer();case 6:e.t1=e.sent,i=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=a.stringToBytes,e.next=13,r.text();case 13:e.t3=e.sent,i=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:i,compressionType:t});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):new Promise((function(r,i){var o=new XMLHttpRequest;o.open("GET",e,!0),n.isCompressed&&(o.responseType="arraybuffer"),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){var e;if((200===o.status||0===o.status)&&(n.isCompressed&&o.response?e=new Uint8Array(o.response):!n.isCompressed&&o.responseText&&(e=(0,a.stringToBytes)(o.responseText)),e))return void r({cMapData:e,compressionType:t});i(new Error(o.statusText))}},o.send(null)}))}}]),n}(A);t.DOMCMapReaderFactory=x;var k=function(){function e(){v(this,e)}return y(e,[{key:"create",value:function(e,t){(0,a.assert)(e>0&&t>0,"Invalid SVG dimensions");var n=document.createElementNS(_,"svg:svg");return n.setAttribute("version","1.1"),n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 "+e+" "+t),n}},{key:"createElement",value:function(e){return(0,a.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(_,e)}}]),e}();t.DOMSVGFactory=k;var P=function(){function e(t){var n=t.viewBox,r=t.scale,i=t.rotation,o=t.offsetX,a=void 0===o?0:o,s=t.offsetY,l=void 0===s?0:s,u=t.dontFlip,c=void 0!==u&&u;v(this,e),this.viewBox=n,this.scale=r,this.rotation=i,this.offsetX=a,this.offsetY=l;var h,d,f,p,g,m,y,b,_=(n[2]+n[0])/2,w=(n[3]+n[1])/2;switch((i%=360)<0&&(i+=360),i){case 180:h=-1,d=0,f=0,p=1;break;case 90:h=0,d=1,f=1,p=0;break;case 270:h=0,d=-1,f=-1,p=0;break;case 0:h=1,d=0,f=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(f=-f,p=-p),0===h?(g=Math.abs(w-n[1])*r+a,m=Math.abs(_-n[0])*r+l,y=Math.abs(n[3]-n[1])*r,b=Math.abs(n[2]-n[0])*r):(g=Math.abs(_-n[0])*r+a,m=Math.abs(w-n[1])*r+l,y=Math.abs(n[2]-n[0])*r,b=Math.abs(n[3]-n[1])*r),this.transform=[h*r,d*r,f*r,p*r,g-h*r*_-f*r*w,m-d*r*_-p*r*w],this.width=y,this.height=b}return y(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.scale,r=void 0===n?this.scale:n,i=t.rotation,o=void 0===i?this.rotation:i,a=t.offsetX,s=void 0===a?this.offsetX:a,l=t.offsetY,u=void 0===l?this.offsetY:l,c=t.dontFlip,h=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:r,rotation:o,offsetX:s,offsetY:u,dontFlip:h})}},{key:"convertToViewportPoint",value:function(e,t){return a.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=a.Util.applyTransform([e[0],e[1]],this.transform),n=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}},{key:"convertToPdfPoint",value:function(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=P;var C=function(e){h(n,e);var t=f(n);function n(e,r){var i;return v(this,n),(i=t.call(this,e)).type=r,i}return n}(a.BaseException);t.RenderingCancelledException=C;var T={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function R(e){for(var t=e.length,n=0;n<t&&""===e[n].trim();)n++;return"data:"===e.substring(n,n+5).toLowerCase()}t.LinkTarget=T;var E,L=function(){function e(){v(this,e),this.started=Object.create(null),this.times=[]}return y(e,[{key:"time",value:function(e){e in this.started&&(0,a.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,a.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=[],n=0,r=s(this.times);try{for(r.s();!(e=r.n()).done;){var i=e.value.name;i.length>n&&(n=i.length)}}catch(c){r.e(c)}finally{r.f()}var o,a=s(this.times);try{for(a.s();!(o=a.n()).done;){var l=o.value,u=l.end-l.start;t.push("".concat(l.name.padEnd(n)," ").concat(u,"ms\n"))}}catch(c){a.e(c)}finally{a.f()}return t.join("")}}]),e}();function O(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function M(e,t){try{var n=(t?new URL(e,t):new URL(e)).protocol;return"http:"===n||"https:"===n}catch(r){return!1}}t.StatTimer=L;var D=function(){function e(){v(this,e)}return y(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,a.isString)(e))return null;E||(E=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=E.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;var i=parseInt(t[3],10);i=i>=1&&i<=31?i: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 l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;var u=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===u?(o+=c,s+=h):"+"===u&&(o-=c,s-=h),new Date(Date.UTC(n,r,i,o,s,l))}}]),e}();t.PDFDateString=D},(e,t,n)=>{e.exports=n(3)},(e,t,n)=>{function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(e){var t,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(O){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new R(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=h(e,t,n);if("normal"===l.type){if(r=n.done?g:f,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=g,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",g="completed",v={};function m(){}function y(){}function b(){}var _={};_[a]=function(){return this};var w=Object.getPrototypeOf,S=w&&w(w(E([])));S&&S!==n&&i.call(S,a)&&(_=S);var A=b.prototype=m.prototype=Object.create(_);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,a,s,l){var u=h(e[o],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===r(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}}function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=h(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:L}}function L(){return{value:t,done:!0}}return y.prototype=A.constructor=b,b.constructor=y,y.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},x(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new k(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(A),u(A,l,"Generator"),A[a]=function(){return this},A.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:E(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}("object"===r(e=n.nmd(e))?e.exports:{});try{regeneratorRuntime=i}catch(o){Function("r","regeneratorRuntime = r")(i)}},(e,t,n)=>{function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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})(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(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}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=R,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var n=0,r=0;r<t;r++)n+=R(e[r]);for(var i=0,o=new Uint8Array(n),a=0;a<t;a++){var s=e[a];s instanceof Uint8Array||(s="string"==typeof s?T(s):new Uint8Array(s));var l=s.byteLength;o.set(s,i),i+=l}return o},t.assert=m,t.bytesToString=function(e){m(null!==e&&"object"===a(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,n=8192;if(t<n)return String.fromCharCode.apply(null,e);for(var r=[],i=0;i<t;i+=n){var o=Math.min(i+n,t),s=e.subarray(i,o);r.push(String.fromCharCode.apply(null,s))}return r.join("")},t.createObjectURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!n)return URL.createObjectURL(new Blob([e],{type:t}));for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="data:".concat(t,";base64,"),o=0,a=e.length;o<a;o+=3){var s=255&e[o],l=255&e[o+1],u=255&e[o+2],c=s>>2,h=(3&s)<<4|l>>4,d=o+1<a?(15&l)<<2|u>>6:64,f=o+2<a?63&u:64;i+=r[c]+r[h]+r[d]+r[f]}return i},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(n,r){e.resolve=function(e){t=!0,n(e)},e.reject=function(e){t=!0,r(e)}})),e},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var n=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}}(n))return n}catch(r){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)}))},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")},t.getVerbosityLevel=function(){return p},t.info=function(e){p>=f.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){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isBool=function(e){return"boolean"==typeof e},t.isNum=function(e){return"number"==typeof e},t.isSameOrigin=function(e,t){var n;try{if(!(n=new URL(e)).origin||"null"===n.origin)return!1}catch(i){return!1}var r=new URL(t,n);return n.origin===r.origin},t.isString=function(e){return"string"==typeof e},t.objectFromMap=function(e){var t,n,r,o=Object.create(null),a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}(e);try{for(a.s();!(t=a.n()).done;){var s=(n=t.value,r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(n,r)||i(n,r)||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.")}()),l=s[0],u=s[1];o[l]=u}}catch(c){a.e(c)}finally{a.f()}return o},t.objectSize=function(e){return Object.keys(e).length},t.removeNullCharacters=function(e){return"string"!=typeof e?(g("The argument for removeNullCharacters must be a string."),e):e.replace(C,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(p=e)},t.shadow=y,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=T,t.stringToPDFString=function(e){var t=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(var r=2;r<t;r+=2)n.push(String.fromCharCode(e.charCodeAt(r)<<8|e.charCodeAt(r+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var i=2;i<t;i+=2)n.push(String.fromCharCode(e.charCodeAt(i+1)<<8|e.charCodeAt(i)));else for(var o=0;o<t;++o){var a=I[e.charCodeAt(o)];n.push(a?String.fromCharCode(a):e.charAt(o))}return n.join("")},t.stringToUTF16BEString=function(e){for(var t=["þÿ"],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);t.push(String.fromCharCode(i>>8&255)),t.push(String.fromCharCode(255&i))}return t.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.unreachable=v,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=g,t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,n(5),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.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"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var f={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=f,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var p=f.WARNINGS;function g(e){p>=f.WARNINGS&&console.log("Warning: ".concat(e))}function v(e){throw new Error(e)}function m(e,t){e||v(t)}function y(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}var b=function(){function e(t){this.constructor===e&&v("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=b;var _=function(e){l(n,e);var t=c(n);function n(e,r){var i;return s(this,n),(i=t.call(this,e)).code=r,i}return n}(b);t.PasswordException=_;var w=function(e){l(n,e);var t=c(n);function n(e,r){var i;return s(this,n),(i=t.call(this,e)).details=r,i}return n}(b);t.UnknownErrorException=w;var S=function(e){l(n,e);var t=c(n);function n(){return s(this,n),t.apply(this,arguments)}return n}(b);t.InvalidPDFException=S;var A=function(e){l(n,e);var t=c(n);function n(){return s(this,n),t.apply(this,arguments)}return n}(b);t.MissingPDFException=A;var x=function(e){l(n,e);var t=c(n);function n(e,r){var i;return s(this,n),(i=t.call(this,e)).status=r,i}return n}(b);t.UnexpectedResponseException=x;var k=function(e){l(n,e);var t=c(n);function n(){return s(this,n),t.apply(this,arguments)}return n}(b);t.FormatError=k;var P=function(e){l(n,e);var t=c(n);function n(){return s(this,n),t.apply(this,arguments)}return n}(b);t.AbortException=P;var C=/\x00/g;function T(e){m("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,n=new Uint8Array(t),r=0;r<t;++r)n[r]=255&e.charCodeAt(r);return n}function R(e){return void 0!==e.length?e.length:(m(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}var E={get value(){return y(this,"value",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}};t.IsLittleEndianCached=E;var L={get value(){return y(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=L;var O,M=(O=Array(256).keys(),function(e){if(Array.isArray(e))return o(e)}(O)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(O)||i(O)||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.")}()).map((function(e){return e.toString(16).padStart(2,"0")})),D=function(){function e(){s(this,e)}var t,n,i;return t=e,i=[{key:"makeHexColor",value:function(e,t,n){return"#".concat(M[e]).concat(M[t]).concat(M[n])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}},{key:"getAxialAlignedBoundingBox",value:function(t,n){var r=e.applyTransform(t,n),i=e.applyTransform(t.slice(2,4),n),o=e.applyTransform([t[0],t[3]],n),a=e.applyTransform([t[2],t[1]],n);return[Math.min(r[0],i[0],o[0],a[0]),Math.min(r[1],i[1],o[1],a[1]),Math.max(r[0],i[0],o[0],a[0]),Math.max(r[1],i[1],o[1],a[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],a=(n+o)/2,s=Math.sqrt(Math.pow(n+o,2)-4*(n*o-i*r))/2,l=a+s||1,u=a-s||1;return[Math.sqrt(l),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,n){function r(e,t){return e-t}var i=[t[0],t[2],n[0],n[2]].sort(r),o=[t[1],t[3],n[1],n[3]].sort(r),a=[];return t=e.normalizeRect(t),n=e.normalizeRect(n),i[0]===t[0]&&i[1]===n[0]||i[0]===n[0]&&i[1]===t[0]?(a[0]=i[1],a[2]=i[2],o[0]===t[1]&&o[1]===n[1]||o[0]===n[1]&&o[1]===t[1]?(a[1]=o[1],a[3]=o[2],a):null):null}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}();t.Util=D;var 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]},(e,t,n)=>{var r=n(6);"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=n(7)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&r.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&r.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),Object.fromEntries||n(52),globalThis.Promise.allSettled||(globalThis.Promise=n(85)),function(){var e=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),e=!0}catch(t){}e||(globalThis.ReadableStream=n(111).ReadableStream)}(),String.prototype.padStart||n(112),String.prototype.padEnd||n(118),Object.values||(Object.values=n(120)),Object.entries||(Object.entries=n(123)))},(e,t)=>{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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var r=!("object"!==("undefined"==typeof process?"undefined":n(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r},(e,t,n)=>{n(8),e.exports=n(10)},(e,t,n)=>{n(9)({global:!0},{globalThis:n(10)})},(e,t,n)=>{var r=n(10),i=n(11).f,o=n(25),a=n(28),s=n(29),l=n(39),u=n(51);e.exports=function(e,t){var n,c,h,d,f,p=e.target,g=e.global,v=e.stat;if(n=g?r:v?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(d=t[c],h=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!u(g?c:p+(v?".":"#")+c,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(n,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")()},(e,t,n)=>{var r=n(12),i=n(14),o=n(15),a=n(16),s=n(20),l=n(22),u=n(23),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),u)try{return c(e,t)}catch(n){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},(e,t,n)=>{var r=n(13);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(t){return!0}}},(e,t)=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,n)=>{var r=n(17),i=n(19);e.exports=function(e){return r(i(e))}},(e,t,n)=>{var r=n(13),i=n(18),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},(e,t,n)=>{var r=n(21);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},(e,t,n)=>{var r=n(12),i=n(13),o=n(24);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},(e,t,n)=>{var r=n(10),i=n(21),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},(e,t,n)=>{var r=n(12),i=n(26),o=n(15);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},(e,t,n)=>{var r=n(12),i=n(23),o=n(27),a=n(20),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},(e,t,n)=>{var r=n(21);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},(e,t,n)=>{var r=n(10),i=n(25),o=n(22),a=n(29),s=n(30),l=n(32),u=l.get,c=l.enforce,h=String(String).split("String");(e.exports=function(e,t,n,s){var l,u=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(l=c(n)).source||(l.source=h.join("string"==typeof t?t:""))),e!==r?(u?!f&&e[t]&&(d=!0):delete e[t],d?e[t]=n:i(e,t,n)):d?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},(e,t,n)=>{var r=n(10),i=n(25);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},(e,t,n)=>{var r=n(31),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},(e,t,n)=>{var r=n(10),i=n(29),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},(e,t,n)=>{var r,i,o,a=n(33),s=n(10),l=n(21),u=n(25),c=n(22),h=n(31),d=n(34),f=n(38),p=s.WeakMap;if(a){var g=h.state||(h.state=new p),v=g.get,m=g.has,y=g.set;r=function(e,t){return t.facade=e,y.call(g,e,t),t},i=function(e){return v.call(g,e)||{}},o=function(e){return m.call(g,e)}}else{var b=d("state");f[b]=!0,r=function(e,t){return t.facade=e,u(e,b,t),t},i=function(e){return c(e,b)?e[b]:{}},o=function(e){return c(e,b)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},(e,t,n)=>{var r=n(10),i=n(30),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},(e,t,n)=>{var r=n(35),i=n(37),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},(e,t,n)=>{var r=n(36),i=n(31);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},e=>{e.exports=!1},e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},e=>{e.exports={}},(e,t,n)=>{var r=n(22),i=n(40),o=n(11),a=n(26);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||s(e,c,l(t,c))}}},(e,t,n)=>{var r=n(41),i=n(43),o=n(50),a=n(27);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},(e,t,n)=>{var r=n(42),i=n(10),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},(e,t,n)=>{var r=n(10);e.exports=r},(e,t,n)=>{var r=n(44),i=n(49).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},(e,t,n)=>{var r=n(22),i=n(16),o=n(45).indexOf,a=n(38);e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},(e,t,n)=>{var r=n(16),i=n(46),o=n(48),a=function(e){return function(t,n,a){var s,l=r(t),u=i(l.length),c=o(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},(e,t,n)=>{var r=n(47),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},(e,t,n)=>{var r=n(47),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,n)=>{var r=n(13),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},(e,t,n)=>{n(53),n(75);var r=n(42);e.exports=r.Object.fromEntries},(e,t,n)=>{var r=n(16),i=n(54),o=n(65),a=n(32),s=n(66),l="Array Iterator",u=a.set,c=a.getterFor(l);e.exports=s(Array,"Array",(function(e,t){u(this,{type:l,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),