!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=t():e["pdfjs-dist/build/pdf.worker"]=e.pdfjsWorker=t()}(this,function(){return a={},n.m=r=[function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"WorkerMessageHandler",{enumerable:!0,get:function(){return a.WorkerMessageHandler}});var a=r(1)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageHandler=t.WorkerTask=void 0;var a,k=(a=r(2))&&a.__esModule?a:{default:a},S=r(5),x=r(198),C=r(199),n=r(7),A=r(238),I=r(239),T=r(201);function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],a=!0,n=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){n=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r=S.VerbosityLevel.INFOS?Date.now():0;e.getOperatorList({handler:g,sink:n,task:t,intent:a.intent,renderInteractiveForms:a.renderInteractiveForms}).then(function(e){v(t),r&&(0,S.info)("page=".concat(i+1," - getOperatorList: time=")+"".concat(Date.now()-r,"ms, len=").concat(e.length)),n.close()},function(e){v(t),t.terminated||(g.send("UnsupportedFeature",{featureId:S.UNSUPPORTED_FEATURES.errorOperatorList}),n.error(e))})})},this),g.on("GetTextContent",function(a,n){var i=a.pageIndex;n.onPull=function(e){},n.onCancel=function(e){},o.getPage(i).then(function(e){var t=new P("GetTextContent: page "+i);h(t);var r=s>=S.VerbosityLevel.INFOS?Date.now():0;e.extractTextContent({handler:g,task:t,sink:n,normalizeWhitespace:a.normalizeWhitespace,combineTextItems:a.combineTextItems}).then(function(){v(t),r&&(0,S.info)("page=".concat(i+1," - getTextContent: time=")+"".concat(Date.now()-r,"ms")),n.close()},function(e){v(t),t.terminated||n.error(e)})})}),g.on("FontFallback",function(e){return o.fontFallback(e.id,g)}),g.on("Cleanup",function(){return o.cleanup(!0)}),g.on("Terminate",function(){i=!0;var e,t=[];return o?(o.terminate(new S.AbortException("Worker was terminated.")),e=o.cleanup(),t.push(e),o=null):(0,x.clearPrimitiveCaches)(),f&&f(new S.AbortException("Worker was terminated.")),r.forEach(function(e){t.push(e.finished),e.terminate()}),Promise.all(t).then(function(){g.destroy(),g=null})}),g.on("Ready",function(){function t(e){m(),g.send("GetDoc",{pdfInfo:e})}function r(e){var r;m(),e instanceof S.PasswordException?(h(r=new P("PasswordException: response ".concat(e.code))),g.sendWithPromise("PasswordRequest",e).then(function(e){var t=e.password;v(r),o.updatePassword(t),a()}).catch(function(){v(r),g.send("DocException",e)})):e instanceof S.InvalidPDFException||e instanceof S.MissingPDFException||e instanceof S.UnexpectedResponseException||e instanceof S.UnknownErrorException?g.send("DocException",e):g.send("DocException",new S.UnknownErrorException(e.message,e.toString()))}function a(){m(),b(!1).then(t,function(e){m(),e instanceof T.XRefParseException?(o.requestLoadedStream(),o.onLoadedStream().then(function(){m(),b(!0).then(t,r)})):r(e)},r)}var e;e=n,m(),w(e,{maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties}).then(function(e){if(i)throw e.terminate(new S.AbortException("Worker was terminated.")),new Error("Worker was terminated");(o=e).onLoadedStream().then(function(e){g.send("DataLoaded",{length:e.bytes.byteLength})})}).then(a,r),n=null}),u},initializeFromPort:function(e){var t=new A.MessageHandler("worker","main",e);c.setup(t,e),t.send("ready",null)}};t.WorkerMessageHandler=c,"undefined"==typeof window&&!n.isNodeJS&&"undefined"!=typeof self&&("function"==typeof(s=self).postMessage&&"onmessage"in s)&&c.initializeFromPort(self)},function(e,t,r){"use strict";e.exports=r(3)},function(e,t,r){"use strict";(function(e){function E(e){return(E="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 t=function(o){var h,e=Object.prototype,u=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",a=t.toStringTag||"@@toStringTag";function s(e,t,r,a){var i,o,s,c,n=t&&t.prototype instanceof b?t:b,l=Object.create(n.prototype),u=new I(a||[]);return l._invoke=(i=e,o=r,s=u,c=d,function(e,t){if(c===g)throw new Error("Generator is already running");if(c===m){if("throw"===e)throw t;return O()}for(s.method=e,s.arg=t;;){var r=s.delegate;if(r){var a=function e(t,r){var a=t.iterator[r.method];if(a===h){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=h,e(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var n=f(a,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,v;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=h),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}(r,s);if(a){if(a===v)continue;return a}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(c===d)throw c=m,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);c=g;var n=f(i,o,s);if("normal"===n.type){if(c=s.done?m:p,n.arg===v)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(c=m,s.method="throw",s.arg=n.arg)}}),l}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}o.wrap=s;var d="suspendedStart",p="suspendedYield",g="executing",m="completed",v={};function b(){}function i(){}function c(){}var l={};l[n]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(T([])));w&&w!==e&&u.call(w,n)&&(l=w);var k=c.prototype=b.prototype=Object.create(l);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function x(c,l){var t;this._invoke=function(r,a){function e(){return new l(function(e,t){!function t(e,r,a,n){var i=f(c[e],c,r);if("throw"!==i.type){var o=i.arg,s=o.value;return s&&"object"===E(s)&&u.call(s,"__await")?l.resolve(s.__await).then(function(e){t("next",e,a,n)},function(e){t("throw",e,a,n)}):l.resolve(s).then(function(e){o.value=e,a(o)},function(e){return t("throw",e,a,n)})}n(i.arg)}(r,a,e,t)})}return t=t?t.then(e,e):e()}}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 A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r=u.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===s(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,r){return e.length===r.length&&e.every(function(e,t){return e===r[t]})},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var a=new URL(t,r);return r.origin===a.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.removeNullCharacters=function(e){return"string"==typeof e?e.replace(A,""):(f("The argument for removeNullCharacters must be a string."),e)},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(h=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=I,t.stringToPDFString=function(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var a=2;a=u.WARNINGS&&console.log("Warning: ".concat(e))}function d(e){throw new Error(e)}function p(e,t){e||d(t)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var m=(v.prototype=new Error,v.constructor=v);function v(e){this.constructor===v&&d("Cannot initialize BaseException."),this.message=e,this.name=this.constructor.name}t.BaseException=m;var b=function(){o(n,m);var a=c(n);function n(e,t){var r;return i(this,n),(r=a.call(this,e)).code=t,r}return n}();t.PasswordException=b;var y=function(){o(n,m);var a=c(n);function n(e,t){var r;return i(this,n),(r=a.call(this,e)).details=t,r}return n}();t.UnknownErrorException=y;var w=function(){o(t,m);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.InvalidPDFException=w;var k=function(){o(t,m);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.MissingPDFException=k;var S=function(){o(n,m);var a=c(n);function n(e,t){var r;return i(this,n),(r=a.call(this,e)).status=t,r}return n}();t.UnexpectedResponseException=S;var x=function(){o(t,m);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.FormatError=x;var C=function(){o(t,m);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.AbortException=C;var A=/\x00/g;function I(e){p("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),a=0;ae[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(e,t){function r(e,t){return e-t}var a=[e[0],e[2],t[0],t[2]].sort(r),n=[e[1],e[3],t[1],t[3]].sort(r),i=[];return e=o.normalizeRect(e),t=o.normalizeRect(t),a[0]===e[0]&&a[1]===t[0]||a[0]===t[0]&&a[1]===e[0]?(i[0]=a[1],i[2]=a[2],n[0]===e[1]&&n[1]===t[1]||n[0]===t[1]&&n[1]===e[1]?(i[1]=n[1],i[3]=n[2],i):null):null}}],(t=null)&&a(e.prototype,t),r&&a(e,r),o}();t.Util=F;var R=[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];var _,B=(_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t,r){if(!(2>2]+_[(3&s)<<4|c>>4]+_[i+1>6:64]+_[i+2n;)o(a,r=t[n++])&&(~c(i,r)||i.push(r));return i}},function(e,t,r){function a(s){return function(e,t,r){var a,n=c(e),i=l(n.length),o=u(r,i);if(s&&t!=t){for(;o"+e+""}var i,o=r(28),s=r(72),c=r(50),l=r(39),u=r(74),h=r(25),f=r(35),d="prototype",p="script",g=f("IE_PROTO"),m=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;m=i?function(e){e.write(n("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=h("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(n("document.F=Object")),e.close(),e.F);for(var r=c.length;r--;)delete m[d][c[r]];return m()};l[g]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(a[d]=o(e),r=new a,a[d]=null,r[g]=e):r=m(),void 0===t?r:s(r,t)}},function(e,t,r){var a=r(13),o=r(27),s=r(28),c=r(73);e.exports=a?Object.defineProperties:function(e,t){s(e);for(var r,a=c(t),n=a.length,i=0;i=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})})},function(e,t,r){function a(s){return function(e,t){var r,a,n=String(l(e)),i=c(t),o=n.length;return i<0||o<=i?s?"":void 0:(r=n.charCodeAt(i))<55296||56319=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:a,done:!1}:"values"==r?{value:t[a],done:!1}:{value:[a,t[a]],done:!1}},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";function g(e){var t;return!(!k(e)||"function"!=typeof(t=e.then))&&t}function i(h,f,d){var p;f.notified||(f.notified=!0,p=f.reactions,P(function(){for(var e=f.value,t=1==f.state,r=0;p.length>r;){var a,n,i,o=p[r++],s=t?o.ok:o.fail,c=o.resolve,l=o.reject,u=o.domain;try{s?(t||(2===f.rejection&&ne(h,f),f.rejection=1),!0===s?a=e:(u&&u.enter(),a=s(e),u&&(u.exit(),i=!0)),a===o.promise?l(W("Promise-chain cycle")):(n=g(a))?n.call(a,c,l):c(a)):l(e)}catch(e){u&&!i&&u.exit(),l(e)}}f.reactions=[],f.notified=!1,d&&!f.rejection&&re(h,f)}))}function n(e,t,r){var a,n;Q?((a=X.createEvent("Event")).promise=t,a.reason=r,a.initEvent(e,!1,!0),d.dispatchEvent(a)):a={promise:t,reason:r},(n=d["on"+e])?n(a):e===$&&R("Unhandled promise rejection",r)}function o(t,r,a,n){return function(e){t(r,a,e,n)}}function s(e,t,r,a){t.done||(t.done=!0,a&&(t=a),t.value=r,t.state=2,i(e,t,!0))}var a,c,l,u,h=r(10),f=r(37),d=r(11),p=r(42),m=r(120),v=r(29),b=r(121),y=r(85),w=r(122),k=r(22),S=r(63),x=r(123),C=r(19),A=r(31),I=r(124),T=r(97),O=r(112),E=r(125).set,P=r(128),F=r(129),R=r(131),_=r(130),B=r(132),M=r(33),L=r(52),D=r(57),N=r(133),U=D("species"),j="Promise",q=M.get,z=M.set,G=M.getterFor(j),H=m,W=d.TypeError,X=d.document,V=d.process,Y=p("fetch"),K=_.f,J=K,Z="process"==C(V),Q=!!(X&&X.createEvent&&d.dispatchEvent),$="unhandledrejection",ee=L(j,function(){if(!(A(H)!==String(H))){if(66===N)return!0;if(!Z&&"function"!=typeof PromiseRejectionEvent)return!0}if(f&&!H.prototype.finally)return!0;if(51<=N&&/native code/.test(H))return!1;function e(e){e(function(){},function(){})}var t=H.resolve(1);return(t.constructor={})[U]=e,!(t.then(function(){})instanceof e)}),te=ee||!T(function(e){H.all(e).catch(function(){})}),re=function(r,a){E.call(d,function(){var e,t=a.value;if(ae(a)&&(e=B(function(){Z?V.emit("unhandledRejection",t,r):n($,r,t)}),a.rejection=Z||ae(a)?2:1,e.error))throw e.value})},ae=function(e){return 1!==e.rejection&&!e.parent},ne=function(e,t){E.call(d,function(){Z?V.emit("rejectionHandled",e):n("rejectionhandled",e,t.value)})},ie=function(r,a,e,t){if(!a.done){a.done=!0,t&&(a=t);try{if(r===e)throw W("Promise can't be resolved itself");var n=g(e);n?P(function(){var t={done:!1};try{n.call(e,o(ie,r,t,a),o(s,r,t,a))}catch(e){s(r,t,e,a)}}):(a.value=e,a.state=1,i(r,a,!1))}catch(e){s(r,{done:!1},e,a)}}};ee&&(H=function(e){x(this,H,j),S(e),a.call(this);var t=q(this);try{e(o(ie,this,t),o(s,this,t))}catch(e){s(this,t,e)}},(a=function(){z(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=b(H.prototype,{then:function(e,t){var r=G(this),a=K(O(this,H));return a.ok="function"!=typeof e||e,a.fail="function"==typeof t&&t,a.domain=Z?V.domain:void 0,r.parent=!0,r.reactions.push(a),0!=r.state&&i(this,r,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),c=function(){var e=new a,t=q(e);this.promise=e,this.resolve=o(ie,e,t),this.reject=o(s,e,t)},_.f=K=function(e){return e===H||e===l?new c:J(e)},f||"function"!=typeof m||(u=m.prototype.then,v(m.prototype,"then",function(e,t){var r=this;return new H(function(e,t){u.call(r,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof Y&&h({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return F(H,Y.apply(d,arguments))}}))),h({global:!0,wrap:!0,forced:ee},{Promise:H}),y(H,j,!1,!0),w(j),l=p(j),h({target:j,stat:!0,forced:ee},{reject:function(e){var t=K(this);return t.reject.call(void 0,e),t.promise}}),h({target:j,stat:!0,forced:f||ee},{resolve:function(e){return F(f&&this===l?H:this,e)}}),h({target:j,stat:!0,forced:te},{all:function(e){var s=this,t=K(s),c=t.resolve,l=t.reject,r=B(function(){var a=S(s.resolve),n=[],i=0,o=1;I(e,function(e){var t=i++,r=!1;n.push(void 0),o++,a.call(s,e).then(function(e){r||(r=!0,n[t]=e,--o||c(n))},l)}),--o||c(n)});return r.error&&l(r.value),t.promise},race:function(e){var r=this,a=K(r),n=a.reject,t=B(function(){var t=S(r.resolve);I(e,function(e){t.call(r,e).then(a.resolve,n)})});return t.error&&n(t.value),a.promise}})},function(e,t,r){var a=r(11);e.exports=a.Promise},function(e,t,r){var n=r(29);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},function(e,t,r){"use strict";var a=r(42),n=r(27),i=r(57),o=r(13),s=i("species");e.exports=function(e){var t=a(e),r=n.f;o&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){function d(e,t){this.stopped=e,this.result=t}var p=r(28),g=r(92),m=r(47),v=r(62),b=r(94),y=r(91);(e.exports=function(e,t,r,a,n){var i,o,s,c,l,u,h,f=v(t,r,a?2:1);if(n)i=e;else{if("function"!=typeof(o=b(e)))throw TypeError("Target is not iterable");if(g(o)){for(s=0,c=m(e.length);s=L(256,5-t))return null}else if(255":1,"`":1}),te=m({},ee,{"#":1,"?":1,"{":1,"}":1}),re=m({},te,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ae=function(e,t){var r=v(e,0);return 32w((b-i)/h))throw RangeError(y);for(i+=(l-n)*h,n=l,u=0;ub)throw RangeError(y);if(t==n){for(var f=i,d=36;;d+=36){var p=d<=o?1:o+26<=d?26:d-o;if(f>1,e+=w(e/t);455e.key){a.splice(t,0,e);break}t===i&&a.push(e)}r.updateURL()},forEach:function(e,t){for(var r,a=M(this).entries,n=w(e,10){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}L(this)};return e}(),Q,$;function ee(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_readRequests")){return false}return true}function te(e){var t=e._ownerReadableStream;t._disturbed=true;if(t._state==="closed"){return C(_(undefined,true,e._forAuthorCode))}if(t._state==="errored"){return k(t._storedError)}return t._readableStreamController[W]()}function re(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}if(typeof t.asyncIterator==="symbol"){$=(Q={},Q[t.asyncIterator]=function(){return this},Q);Object.defineProperty($,t.asyncIterator,{enumerable:false})}var ae={next:function(){if(ie(this)===false){return k(oe("next"))}var a=this._asyncIteratorReader;if(a._ownerReadableStream===undefined){return k(D("iterate"))}return E(te(a),function(e){var t=e.done;if(t){L(a)}var r=e.value;return _(r,t,true)})},return:function(e){if(ie(this)===false){return k(oe("next"))}var t=this._asyncIteratorReader;if(t._ownerReadableStream===undefined){return k(D("finish iterating"))}if(t._readRequests.length>0){return k(new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled"))}if(this._preventCancel===false){var r=M(t,e);L(t);return E(r,function(){return _(e,true,true)})}L(t);return C(_(e,true,true))}};if($!==undefined){Object.setPrototypeOf(ae,$)}function ne(e,t){if(t===void 0){t=false}var r=X(e);var a=Object.create(ae);a._asyncIteratorReader=r;a._preventCancel=Boolean(t);return a}function ie(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorReader")){return false}return true}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}function se(e){var t=e._queue.shift();e._queueTotalSize-=t.size;if(e._queueTotalSize<0){e._queueTotalSize=0}return t.value}function ce(e,t,r){r=Number(r);if(!i(r)){throw new RangeError("Size must be a finite, non-NaN, non-negative number.")}e._queue.push({value:t,size:r});e._queueTotalSize+=r}function le(e){var t=e._queue.peek();return t.value}function ue(e){e._queue=new R;e._queueTotalSize=0}Object.defineProperty(ae,"next",{enumerable:false}),Object.defineProperty(ae,"return",{enumerable:false});var he=t("[[AbortSteps]]"),fe=t("[[ErrorSteps]]"),de=function(){function e(e,t){if(e===void 0){e={}}if(t===void 0){t={}}me(this);var r=t.size;var a=t.highWaterMark;var n=e.type;if(n!==undefined){throw new RangeError("Invalid type is specified")}var i=v(r);if(a===undefined){a=1}a=g(a);Ye(this,e,a,i)}Object.defineProperty(e.prototype,"locked",{get:function(){if(ve(this)===false){throw ot("locked")}return be(this)},enumerable:true,configurable:true});e.prototype.abort=function(e){if(ve(this)===false){return k(ot("abort"))}if(be(this)===true){return k(new TypeError("Cannot abort a stream that already has a writer"))}return ye(this,e)};e.prototype.close=function(){if(ve(this)===false){return k(ot("close"))}if(be(this)===true){return k(new TypeError("Cannot close a stream that already has a writer"))}if(Ee(this)===true){return k(new TypeError("Cannot close an already-closing stream"))}return we(this)};e.prototype.getWriter=function(){if(ve(this)===false){throw ot("getWriter")}return pe(this)};return e}();function pe(e){return new Me(e)}function ge(e,t,r,a,n,i){if(n===void 0){n=1}if(i===void 0){i=function(){return 1}}var o=Object.create(de.prototype);me(o);var s=Object.create(We.prototype);Ve(o,s,e,t,r,a,n,i);return o}function me(e){e._state="writable";e._storedError=undefined;e._writer=undefined;e._writableStreamController=undefined;e._writeRequests=new R;e._inFlightWriteRequest=undefined;e._closeRequest=undefined;e._inFlightCloseRequest=undefined;e._pendingAbortRequest=undefined;e._backpressure=false}function ve(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")){return false}return true}function be(e){if(e._writer===undefined){return false}return true}function ye(r,a){var e=r._state;if(e==="closed"||e==="errored"){return C(undefined)}if(r._pendingAbortRequest!==undefined){return r._pendingAbortRequest._promise}var n=false;if(e==="erroring"){n=true;a=undefined}var t=x(function(e,t){r._pendingAbortRequest={_promise:undefined,_resolve:e,_reject:t,_reason:a,_wasAlreadyErroring:n}});r._pendingAbortRequest._promise=t;if(n===false){xe(r,a)}return t}function we(a){var e=a._state;if(e==="closed"||e==="errored"){return k(new TypeError("The stream (in "+e+" state) is not in the writable state and cannot be closed"))}var t=x(function(e,t){var r={_resolve:e,_reject:t};a._closeRequest=r});var r=a._writer;if(r!==undefined&&a._backpressure===true&&e==="writable"){kt(r)}Je(a._writableStreamController);return t}function ke(a){var e=x(function(e,t){var r={_resolve:e,_reject:t};a._writeRequests.push(r)});return e}function Se(e,t){var r=e._state;if(r==="writable"){xe(e,t);return}Ce(e)}function xe(e,t){var r=e._writableStreamController;e._state="erroring";e._storedError=t;var a=e._writer;if(a!==undefined){qe(a,t)}if(Pe(e)===false&&r._started===true){Ce(e)}}function Ce(t){t._state="errored";t._writableStreamController[fe]();var r=t._storedError;t._writeRequests.forEach(function(e){e._reject(r)});t._writeRequests=new R;if(t._pendingAbortRequest===undefined){_e(t);return}var a=t._pendingAbortRequest;t._pendingAbortRequest=undefined;if(a._wasAlreadyErroring===true){a._reject(r);_e(t);return}var e=t._writableStreamController[he](a._reason);I(e,function(){a._resolve();_e(t)},function(e){a._reject(e);_e(t)})}function Ae(e){e._inFlightWriteRequest._resolve(undefined);e._inFlightWriteRequest=undefined}function Ie(e,t){e._inFlightWriteRequest._reject(t);e._inFlightWriteRequest=undefined;Se(e,t)}function Te(e){e._inFlightCloseRequest._resolve(undefined);e._inFlightCloseRequest=undefined;var t=e._state;if(t==="erroring"){e._storedError=undefined;if(e._pendingAbortRequest!==undefined){e._pendingAbortRequest._resolve();e._pendingAbortRequest=undefined}}e._state="closed";var r=e._writer;if(r!==undefined){pt(r)}}function Oe(e,t){e._inFlightCloseRequest._reject(t);e._inFlightCloseRequest=undefined;if(e._pendingAbortRequest!==undefined){e._pendingAbortRequest._reject(t);e._pendingAbortRequest=undefined}Se(e,t)}function Ee(e){if(e._closeRequest===undefined&&e._inFlightCloseRequest===undefined){return false}return true}function Pe(e){if(e._inFlightWriteRequest===undefined&&e._inFlightCloseRequest===undefined){return false}return true}function Fe(e){e._inFlightCloseRequest=e._closeRequest;e._closeRequest=undefined}function Re(e){e._inFlightWriteRequest=e._writeRequests.shift()}function _e(e){if(e._closeRequest!==undefined){e._closeRequest._reject(e._storedError);e._closeRequest=undefined}var t=e._writer;if(t!==undefined){ft(t,e._storedError)}}function Be(e,t){var r=e._writer;if(r!==undefined&&t!==e._backpressure){if(t===true){yt(r)}else{kt(r)}}e._backpressure=t}var Me=function(){function e(e){if(ve(e)===false){throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance")}if(be(e)===true){throw new TypeError("This stream has already been locked for exclusive writing by another writer")}this._ownerWritableStream=e;e._writer=this;var t=e._state;if(t==="writable"){if(Ee(e)===false&&e._backpressure===true){gt(this)}else{vt(this)}lt(this)}else if(t==="erroring"){mt(this,e._storedError);lt(this)}else if(t==="closed"){vt(this);ht(this)}else{var r=e._storedError;mt(this,r);ut(this,r)}}Object.defineProperty(e.prototype,"closed",{get:function(){if(Le(this)===false){return k(st("closed"))}return this._closedPromise},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(Le(this)===false){throw st("desiredSize")}if(this._ownerWritableStream===undefined){throw ct("desiredSize")}return ze(this)},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"ready",{get:function(){if(Le(this)===false){return k(st("ready"))}return this._readyPromise},enumerable:true,configurable:true});e.prototype.abort=function(e){if(Le(this)===false){return k(st("abort"))}if(this._ownerWritableStream===undefined){return k(ct("abort"))}return De(this,e)};e.prototype.close=function(){if(Le(this)===false){return k(st("close"))}var e=this._ownerWritableStream;if(e===undefined){return k(ct("close"))}if(Ee(e)===true){return k(new TypeError("Cannot close an already-closing stream"))}return Ne(this)};e.prototype.releaseLock=function(){if(Le(this)===false){throw st("releaseLock")}var e=this._ownerWritableStream;if(e===undefined){return}Ge(this)};e.prototype.write=function(e){if(Le(this)===false){return k(st("write"))}if(this._ownerWritableStream===undefined){return k(ct("write to"))}return He(this,e)};return e}();function Le(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")){return false}return true}function De(e,t){var r=e._ownerWritableStream;return ye(r,t)}function Ne(e){var t=e._ownerWritableStream;return we(t)}function Ue(e){var t=e._ownerWritableStream;var r=t._state;if(Ee(t)===true||r==="closed"){return C(undefined)}if(r==="errored"){return k(t._storedError)}return Ne(e)}function je(e,t){if(e._closedPromiseState==="pending"){ft(e,t)}else{dt(e,t)}}function qe(e,t){if(e._readyPromiseState==="pending"){bt(e,t)}else{wt(e,t)}}function ze(e){var t=e._ownerWritableStream;var r=t._state;if(r==="errored"||r==="erroring"){return null}if(r==="closed"){return 0}return Qe(t._writableStreamController)}function Ge(e){var t=e._ownerWritableStream;var r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qe(e,r);je(e,r);t._writer=undefined;e._ownerWritableStream=undefined}function He(e,t){var r=e._ownerWritableStream;var a=r._writableStreamController;var n=Ze(a,t);if(r!==e._ownerWritableStream){return k(ct("write to"))}var i=r._state;if(i==="errored"){return k(r._storedError)}if(Ee(r)===true||i==="closed"){return k(new TypeError("The stream is closing or closed and cannot be written to"))}if(i==="erroring"){return k(r._storedError)}var o=ke(r);$e(a,t,n);return o}var We=function(){function e(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}e.prototype.error=function(e){if(Xe(this)===false){throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController")}var t=this._controlledWritableStream._state;if(t!=="writable"){return}it(this,e)};e.prototype[he]=function(e){var t=this._abortAlgorithm(e);Ke(this);return t};e.prototype[fe]=function(){ue(this)};return e}();function Xe(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")){return false}return true}function Ve(t,r,e,a,n,i,o,s){r._controlledWritableStream=t;t._writableStreamController=r;r._queue=undefined;r._queueTotalSize=undefined;ue(r);r._started=false;r._strategySizeAlgorithm=s;r._strategyHWM=o;r._writeAlgorithm=a;r._closeAlgorithm=n;r._abortAlgorithm=i;var c=nt(r);Be(t,c);var l=e();var u=C(l);I(u,function(){r._started=true;et(r)},function(e){r._started=true;Se(t,e)})}function Ye(e,t,r,a){var n=Object.create(We.prototype);function i(){return p(t,"start",[n])}var o=l(t,"write",1,[n]);var s=l(t,"close",0,[]);var c=l(t,"abort",1,[]);Ve(e,n,i,o,s,c,r,a)}function Ke(e){e._writeAlgorithm=undefined;e._closeAlgorithm=undefined;e._abortAlgorithm=undefined;e._strategySizeAlgorithm=undefined}function Je(e){ce(e,"close",0);et(e)}function Ze(t,e){try{return t._strategySizeAlgorithm(e)}catch(e){tt(t,e);return 1}}function Qe(e){return e._strategyHWM-e._queueTotalSize}function $e(t,e,r){var a={chunk:e};try{ce(t,a,r)}catch(e){tt(t,e);return}var n=t._controlledWritableStream;if(Ee(n)===false&&n._state==="writable"){var i=nt(t);Be(n,i)}et(t)}function et(e){var t=e._controlledWritableStream;if(e._started===false){return}if(t._inFlightWriteRequest!==undefined){return}var r=t._state;if(r==="erroring"){Ce(t);return}if(e._queue.length===0){return}var a=le(e);if(a==="close"){rt(e)}else{at(e,a.chunk)}}function tt(e,t){if(e._controlledWritableStream._state==="writable"){it(e,t)}}function rt(e){var t=e._controlledWritableStream;Fe(t);se(e);var r=e._closeAlgorithm();Ke(e);I(r,function(){Te(t)},function(e){Oe(t,e)})}function at(r,e){var a=r._controlledWritableStream;Re(a);var t=r._writeAlgorithm(e);I(t,function(){Ae(a);var e=a._state;se(r);if(Ee(a)===false&&e==="writable"){var t=nt(r);Be(a,t)}et(r)},function(e){if(a._state==="writable"){Ke(r)}Ie(a,e)})}function nt(e){var t=Qe(e);return t<=0}function it(e,t){var r=e._controlledWritableStream;Ke(e);xe(r,t)}function ot(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function st(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function ct(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function lt(r){r._closedPromise=x(function(e,t){r._closedPromise_resolve=e;r._closedPromise_reject=t;r._closedPromiseState="pending"})}function ut(e,t){lt(e);ft(e,t)}function ht(e){lt(e);pt(e)}function ft(e,t){P(e._closedPromise);e._closedPromise_reject(t);e._closedPromise_resolve=undefined;e._closedPromise_reject=undefined;e._closedPromiseState="rejected"}function dt(e,t){ut(e,t)}function pt(e){e._closedPromise_resolve(undefined);e._closedPromise_resolve=undefined;e._closedPromise_reject=undefined;e._closedPromiseState="resolved"}function gt(r){r._readyPromise=x(function(e,t){r._readyPromise_resolve=e;r._readyPromise_reject=t});r._readyPromiseState="pending"}function mt(e,t){gt(e);bt(e,t)}function vt(e){gt(e);kt(e)}function bt(e,t){P(e._readyPromise);e._readyPromise_reject(t);e._readyPromise_resolve=undefined;e._readyPromise_reject=undefined;e._readyPromiseState="rejected"}function yt(e){gt(e)}function wt(e,t){mt(e,t)}function kt(e){e._readyPromise_resolve(undefined);e._readyPromise_resolve=undefined;e._readyPromise_reject=undefined;e._readyPromiseState="fulfilled"}function St(e){if(typeof e!=="object"||e===null){return false}try{return typeof e.aborted==="boolean"}catch(e){return false}}var xt=typeof DOMException!=="undefined"?DOMException:undefined;function Ct(e){if(!(typeof e==="function"||typeof e==="object")){return false}try{new e;return true}catch(e){return false}}function At(){var e=function e(t,r){this.message=t||"";this.name=r||"Error";if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}};e.prototype=Object.create(Error.prototype);Object.defineProperty(e.prototype,"constructor",{value:e,writable:true,configurable:true});return e}var It=Ct(xt)?xt:At();function Tt(f,d,p,g,m,v){var b=X(f);var y=pe(d);f._disturbed=true;var w=false;var k=C(undefined);return x(function(r,a){var n;if(v!==undefined){n=function(){var e=new It("Aborted","AbortError");var t=[];if(g===false){t.push(function(){if(d._state==="writable"){return ye(d,e)}return C(undefined)})}if(m===false){t.push(function(){if(f._state==="readable"){return Lr(f,e)}return C(undefined)})}l(function(){return Promise.all(t.map(function(e){return e()}))},true,e)};if(v.aborted===true){n();return}v.addEventListener("abort",n)}function e(){return x(function(t,r){function a(e){if(e){t()}else{A(i(),a,r)}}a(false)})}function i(){if(w===true){return C(true)}return A(y._readyPromise,function(){return A(te(b),function(e){if(e.done===true){return true}k=A(He(y,e.value),undefined,S);return false})})}s(f,b._closedPromise,function(e){if(g===false){l(function(){return ye(d,e)},true,e)}else{u(true,e)}});s(d,y._closedPromise,function(e){if(m===false){l(function(){return Lr(f,e)},true,e)}else{u(true,e)}});c(f,b._closedPromise,function(){if(p===false){l(function(){return Ue(y)})}else{u()}});if(Ee(d)===true||d._state==="closed"){var t=new TypeError("the destination writable stream closed before all data could be piped to it");if(m===false){l(function(){return Lr(f,t)},true,t)}else{u(true,t)}}P(e());function o(){var e=k;return A(k,function(){return e!==k?o():undefined})}function s(e,t,r){if(e._state==="errored"){r(e._storedError)}else{O(t,r)}}function c(e,t,r){if(e._state==="closed"){r()}else{T(t,r)}}function l(e,t,r){if(w===true){return}w=true;if(d._state==="writable"&&Ee(d)===false){T(o(),a)}else{a()}function a(){I(e(),function(){return h(t,r)},function(e){return h(true,e)})}}function u(e,t){if(w===true){return}w=true;if(d._state==="writable"&&Ee(d)===false){T(o(),function(){return h(e,t)})}else{h(e,t)}}function h(e,t){Ge(y);L(b);if(v!==undefined){v.removeEventListener("abort",n)}if(e){a(t)}else{r(undefined)}}})}var Ot=function(){function e(){throw new TypeError}Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(Et(this)===false){throw qt("desiredSize")}return Lt(this)},enumerable:true,configurable:true});e.prototype.close=function(){if(Et(this)===false){throw qt("close")}if(Nt(this)===false){throw new TypeError("The stream is not in a state that permits close")}_t(this)};e.prototype.enqueue=function(e){if(Et(this)===false){throw qt("enqueue")}if(Nt(this)===false){throw new TypeError("The stream is not in a state that permits enqueue")}return Bt(this,e)};e.prototype.error=function(e){if(Et(this)===false){throw qt("error")}Mt(this,e)};e.prototype[H]=function(e){ue(this);var t=this._cancelAlgorithm(e);Rt(this);return t};e.prototype[W]=function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=se(this);if(this._closeRequested===true&&this._queue.length===0){Rt(this);Dr(e)}else{Pt(this)}return C(_(t,false,e._reader._forAuthorCode))}var r=V(e);Pt(this);return r};return e}();function Et(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")){return false}return true}function Pt(t){var e=Ft(t);if(e===false){return}if(t._pulling===true){t._pullAgain=true;return}t._pulling=true;var r=t._pullAlgorithm();I(r,function(){t._pulling=false;if(t._pullAgain===true){t._pullAgain=false;Pt(t)}},function(e){Mt(t,e)})}function Ft(e){var t=e._controlledReadableStream;if(Nt(e)===false){return false}if(e._started===false){return false}if(Mr(t)===true&&K(t)>0){return true}var r=Lt(e);if(r>0){return true}return false}function Rt(e){e._pullAlgorithm=undefined;e._cancelAlgorithm=undefined;e._strategySizeAlgorithm=undefined}function _t(e){var t=e._controlledReadableStream;e._closeRequested=true;if(e._queue.length===0){Rt(e);Dr(t)}}function Bt(t,e){var r=t._controlledReadableStream;if(Mr(r)===true&&K(r)>0){Y(r,e,false)}else{var a=void 0;try{a=t._strategySizeAlgorithm(e)}catch(e){Mt(t,e);throw e}try{ce(t,e,a)}catch(e){Mt(t,e);throw e}}Pt(t)}function Mt(e,t){var r=e._controlledReadableStream;if(r._state!=="readable"){return}ue(e);Rt(e);Nr(r,t)}function Lt(e){var t=e._controlledReadableStream;var r=t._state;if(r==="errored"){return null}if(r==="closed"){return 0}return e._strategyHWM-e._queueTotalSize}function Dt(e){if(Ft(e)===true){return false}return true}function Nt(e){var t=e._controlledReadableStream._state;if(e._closeRequested===false&&t==="readable"){return true}return false}function Ut(e,t,r,a,n,i,o){t._controlledReadableStream=e;t._queue=undefined;t._queueTotalSize=undefined;ue(t);t._started=false;t._closeRequested=false;t._pullAgain=false;t._pulling=false;t._strategySizeAlgorithm=o;t._strategyHWM=i;t._pullAlgorithm=a;t._cancelAlgorithm=n;e._readableStreamController=t;var s=r();I(C(s),function(){t._started=true;Pt(t)},function(e){Mt(t,e)})}function jt(e,t,r,a){var n=Object.create(Ot.prototype);function i(){return p(t,"start",[n])}var o=l(t,"pull",0,[n]);var s=l(t,"cancel",1,[]);Ut(e,n,i,o,s,r,a)}function qt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function zt(a,e){var t=X(a);var i=false;var o=false;var s=false;var n;var c;var l;var u;var h;var f=x(function(e){h=e});function r(){if(i===true){return C(undefined)}i=true;var e=E(te(t),function(e){i=false;var t=e.done;if(t===true){if(o===false){_t(l._readableStreamController)}if(s===false){_t(u._readableStreamController)}return}var r=e.value;var a=r;var n=r;if(o===false){Bt(l._readableStreamController,a)}if(s===false){Bt(u._readableStreamController,n)}});P(e);return C(undefined)}function d(e){o=true;n=e;if(s===true){var t=m([n,c]);var r=Lr(a,t);h(r)}return f}function p(e){s=true;c=e;if(o===true){var t=m([n,c]);var r=Lr(a,t);h(r)}return f}function g(){}l=Rr(g,r,d);u=Rr(g,r,p);O(t._closedPromise,function(e){Mt(l._readableStreamController,e);Mt(u._readableStreamController,e)});return[l,u]}var Gt=Number.isInteger||function(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e},Ht=function(){function e(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}Object.defineProperty(e.prototype,"view",{get:function(){if(Vt(this)===false){throw wr("view")}return this._view},enumerable:true,configurable:true});e.prototype.respond=function(e){if(Vt(this)===false){throw wr("respond")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(u(this._view.buffer)===true);gr(this._associatedReadableByteStreamController,e)};e.prototype.respondWithNewView=function(e){if(Vt(this)===false){throw wr("respond")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(!ArrayBuffer.isView(e)){throw new TypeError("You can only respond with array buffer views")}if(u(e.buffer)===true);mr(this._associatedReadableByteStreamController,e)};return e}(),Wt=function(){function e(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(Xt(this)===false){throw kr("byobRequest")}if(this._byobRequest===undefined&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek();var t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);var r=Object.create(Ht.prototype);yr(r,this,t);this._byobRequest=r}return this._byobRequest},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(Xt(this)===false){throw kr("desiredSize")}return pr(this)},enumerable:true,configurable:true});e.prototype.close=function(){if(Xt(this)===false){throw kr("close")}if(this._closeRequested===true){throw new TypeError("The stream has already been closed; do not close it again!")}var e=this._controlledReadableByteStream._state;if(e!=="readable"){throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed")}hr(this)};e.prototype.enqueue=function(e){if(Xt(this)===false){throw kr("enqueue")}if(this._closeRequested===true){throw new TypeError("stream is closed or draining")}var t=this._controlledReadableByteStream._state;if(t!=="readable"){throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to")}if(!ArrayBuffer.isView(e)){throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController")}if(u(e.buffer)===true);fr(this,e)};e.prototype.error=function(e){if(Xt(this)===false){throw kr("error")}dr(this,e)};e.prototype[H]=function(e){if(this._pendingPullIntos.length>0){var t=this._pendingPullIntos.peek();t.bytesFilled=0}ue(this);var r=this._cancelAlgorithm(e);ur(this);return r};e.prototype[W]=function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength;tr(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return k(e)}return C(_(r,false,e._reader._forAuthorCode))}var a=this._autoAllocateChunkSize;if(a!==undefined){var n=void 0;try{n=new ArrayBuffer(a)}catch(e){return k(e)}var i={buffer:n,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}var o=V(e);Yt(this);return o};return e}();function Xt(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")){return false}return true}function Vt(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")){return false}return true}function Yt(t){var e=lr(t);if(e===false){return}if(t._pulling===true){t._pullAgain=true;return}t._pulling=true;var r=t._pullAlgorithm();I(r,function(){t._pulling=false;if(t._pullAgain===true){t._pullAgain=false;Yt(t)}},function(e){dr(t,e)})}function Kt(e){rr(e);e._pendingPullIntos=new R}function Jt(e,t){var r=false;if(e._state==="closed"){r=true}var a=Zt(t);if(t.readerType==="default"){Y(e,a,r)}else{Cr(e,a,r)}}function Zt(e){var t=e.bytesFilled;var r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function Qt(e,t,r,a){e._queue.push({buffer:t,byteOffset:r,byteLength:a});e._queueTotalSize+=a}function $t(e,t){var r=t.elementSize;var a=t.bytesFilled-t.bytesFilled%r;var n=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled);var i=t.bytesFilled+n;var o=i-i%r;var s=n;var c=false;if(o>a){s=o-t.bytesFilled;c=true}var l=e._queue;while(s>0){var u=l.peek();var h=Math.min(s,u.byteLength);var f=t.byteOffset+t.bytesFilled;d(t.buffer,f,u.buffer,u.byteOffset,h);if(u.byteLength===h){l.shift()}else{u.byteOffset+=h;u.byteLength-=h}e._queueTotalSize-=h;er(e,h,t);s-=h}return c}function er(e,t,r){rr(e);r.bytesFilled+=t}function tr(e){if(e._queueTotalSize===0&&e._closeRequested===true){ur(e);Dr(e._controlledReadableByteStream)}else{Yt(e)}}function rr(e){if(e._byobRequest===undefined){return}e._byobRequest._associatedReadableByteStreamController=undefined;e._byobRequest._view=undefined;e._byobRequest=undefined}function ar(e){while(e._pendingPullIntos.length>0){if(e._queueTotalSize===0){return}var t=e._pendingPullIntos.peek();if($t(e,t)===true){cr(e);Jt(e._controlledReadableByteStream,t)}}}function nr(e,t){var r=e._controlledReadableByteStream;var a=1;if(t.constructor!==DataView){a=t.constructor.BYTES_PER_ELEMENT}var n=t.constructor;var i=h(t.buffer);var o={buffer:i,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,ctor:n,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(o);return xr(r)}if(r._state==="closed"){var s=new n(o.buffer,o.byteOffset,0);return C(_(s,true,r._reader._forAuthorCode))}if(e._queueTotalSize>0){if($t(e,o)===true){var c=Zt(o);tr(e);return C(_(c,false,r._reader._forAuthorCode))}if(e._closeRequested===true){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");dr(e,l);return k(l)}}e._pendingPullIntos.push(o);var u=xr(r);Yt(e);return u}function ir(e,t){t.buffer=h(t.buffer);var r=e._controlledReadableByteStream;if(Ir(r)===true){while(Ar(r)>0){var a=cr(e);Jt(r,a)}}}function or(e,t,r){if(r.bytesFilled+t>r.byteLength){throw new RangeError("bytesWritten out of range")}er(e,t,r);if(r.bytesFilled0){var n=r.byteOffset+r.bytesFilled;var i=r.buffer.slice(n-a,n);Qt(e,i,0,i.byteLength)}r.buffer=h(r.buffer);r.bytesFilled-=a;Jt(e._controlledReadableByteStream,r);ar(e)}function sr(e,t){var r=e._pendingPullIntos.peek();var a=e._controlledReadableByteStream;if(a._state==="closed"){if(t!==0){throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}ir(e,r)}else{or(e,t,r)}Yt(e)}function cr(e){var t=e._pendingPullIntos.shift();rr(e);return t}function lr(e){var t=e._controlledReadableByteStream;if(t._state!=="readable"){return false}if(e._closeRequested===true){return false}if(e._started===false){return false}if(J(t)===true&&K(t)>0){return true}if(Ir(t)===true&&Ar(t)>0){return true}var r=pr(e);if(r>0){return true}return false}function ur(e){e._pullAlgorithm=undefined;e._cancelAlgorithm=undefined}function hr(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0){e._closeRequested=true;return}if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled>0){var a=new TypeError("Insufficient bytes to fill elements in the given buffer");dr(e,a);throw a}}ur(e);Dr(t)}function fr(e,t){var r=e._controlledReadableByteStream;var a=t.buffer;var n=t.byteOffset;var i=t.byteLength;var o=h(a);if(J(r)===true){if(K(r)===0){Qt(e,o,n,i)}else{var s=new Uint8Array(o,n,i);Y(r,s,false)}}else if(Ir(r)===true){Qt(e,o,n,i);ar(e)}else{Qt(e,o,n,i)}Yt(e)}function dr(e,t){var r=e._controlledReadableByteStream;if(r._state!=="readable"){return}Kt(e);ue(e);ur(e);Nr(r,t)}function pr(e){var t=e._controlledReadableByteStream;var r=t._state;if(r==="errored"){return null}if(r==="closed"){return 0}return e._strategyHWM-e._queueTotalSize}function gr(e,t){t=Number(t);if(i(t)===false){throw new RangeError("bytesWritten must be a finite")}sr(e,t)}function mr(e,t){var r=e._pendingPullIntos.peek();if(r.byteOffset+r.bytesFilled!==t.byteOffset){throw new RangeError("The region specified by view does not match byobRequest")}if(r.byteLength!==t.byteLength){throw new RangeError("The buffer of view has different capacity than byobRequest")}r.buffer=t.buffer;sr(e,t.byteLength)}function vr(e,t,r,a,n,i,o){t._controlledReadableByteStream=e;t._pullAgain=false;t._pulling=false;t._byobRequest=undefined;t._queue=t._queueTotalSize=undefined;ue(t);t._closeRequested=false;t._started=false;t._strategyHWM=g(i);t._pullAlgorithm=a;t._cancelAlgorithm=n;t._autoAllocateChunkSize=o;t._pendingPullIntos=new R;e._readableStreamController=t;var s=r();I(C(s),function(){t._started=true;Yt(t)},function(e){dr(t,e)})}function br(e,t,r){var a=Object.create(Wt.prototype);function n(){return p(t,"start",[a])}var i=l(t,"pull",0,[a]);var o=l(t,"cancel",1,[]);var s=t.autoAllocateChunkSize;if(s!==undefined){s=Number(s);if(Gt(s)===false||s<=0){throw new RangeError("autoAllocateChunkSize must be a positive integer")}}vr(e,a,n,i,o,r,s)}function yr(e,t,r){e._associatedReadableByteStreamController=t;e._view=r}function wr(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function kr(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Sr(e,t){if(t===void 0){t=false}var r=new Tr(e);r._forAuthorCode=t;return r}function xr(a){var e=x(function(e,t){var r={_resolve:e,_reject:t};a._reader._readIntoRequests.push(r)});return e}function Cr(e,t,r){var a=e._reader;var n=a._readIntoRequests.shift();n._resolve(_(t,r,a._forAuthorCode))}function Ar(e){return e._reader._readIntoRequests.length}function Ir(e){var t=e._reader;if(t===undefined){return false}if(!Or(t)){return false}return true}var Tr=function(){function e(e){if(!Br(e)){throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a "+"byte source")}if(Xt(e._readableStreamController)===false){throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte "+"source")}if(Mr(e)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}B(this,e);this._readIntoRequests=new R}Object.defineProperty(e.prototype,"closed",{get:function(){if(!Or(this)){return k(Pr("closed"))}return this._closedPromise},enumerable:true,configurable:true});e.prototype.cancel=function(e){if(!Or(this)){return k(Pr("cancel"))}if(this._ownerReadableStream===undefined){return k(D("cancel"))}return M(this,e)};e.prototype.read=function(e){if(!Or(this)){return k(Pr("read"))}if(this._ownerReadableStream===undefined){return k(D("read from"))}if(!ArrayBuffer.isView(e)){return k(new TypeError("view must be an array buffer view"))}if(u(e.buffer)===true);if(e.byteLength===0){return k(new TypeError("view must have non-zero byteLength"))}return Er(this,e)};e.prototype.releaseLock=function(){if(!Or(this)){throw Pr("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readIntoRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}L(this)};return e}();function Or(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")){return false}return true}function Er(e,t){var r=e._ownerReadableStream;r._disturbed=true;if(r._state==="errored"){return k(r._storedError)}return nr(r._readableStreamController,t)}function Pr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}var Fr=function(){function e(e,t){if(e===void 0){e={}}if(t===void 0){t={}}_r(this);var r=t.size;var a=t.highWaterMark;var n=e.type;var i=String(n);if(i==="bytes"){if(r!==undefined){throw new RangeError("The strategy for a byte stream cannot have a size function")}if(a===undefined){a=0}a=g(a);br(this,e,a)}else if(n===undefined){var o=v(r);if(a===undefined){a=1}a=g(a);jt(this,e,a,o)}else{throw new RangeError("Invalid type is specified")}}Object.defineProperty(e.prototype,"locked",{get:function(){if(Br(this)===false){throw Ur("locked")}return Mr(this)},enumerable:true,configurable:true});e.prototype.cancel=function(e){if(Br(this)===false){return k(Ur("cancel"))}if(Mr(this)===true){return k(new TypeError("Cannot cancel a stream that already has a reader"))}return Lr(this,e)};e.prototype.getReader=function(e){var t=(e===void 0?{}:e).mode;if(Br(this)===false){throw Ur("getReader")}if(t===undefined){return X(this,true)}t=String(t);if(t==="byob"){return Sr(this,true)}throw new RangeError("Invalid mode is specified")};e.prototype.pipeThrough=function(e,t){var r=e.writable,a=e.readable;var n=t===void 0?{}:t,i=n.preventClose,o=n.preventAbort,s=n.preventCancel,c=n.signal;if(Br(this)===false){throw Ur("pipeThrough")}if(ve(r)===false){throw new TypeError("writable argument to pipeThrough must be a WritableStream")}if(Br(a)===false){throw new TypeError("readable argument to pipeThrough must be a ReadableStream")}i=Boolean(i);o=Boolean(o);s=Boolean(s);if(c!==undefined&&!St(c)){throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal")}if(Mr(this)===true){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")}if(be(r)===true){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")}var l=Tt(this,r,i,o,s,c);P(l);return a};e.prototype.pipeTo=function(e,t){var r=t===void 0?{}:t,a=r.preventClose,n=r.preventAbort,i=r.preventCancel,o=r.signal;if(Br(this)===false){return k(Ur("pipeTo"))}if(ve(e)===false){return k(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"))}a=Boolean(a);n=Boolean(n);i=Boolean(i);if(o!==undefined&&!St(o)){return k(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal"))}if(Mr(this)===true){return k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"))}if(be(e)===true){return k(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"))}return Tt(this,e,a,n,i,o)};e.prototype.tee=function(){if(Br(this)===false){throw Ur("tee")}var e=zt(this);return m(e)};e.prototype.getIterator=function(e){var t=(e===void 0?{}:e).preventCancel,r=t===void 0?false:t;if(Br(this)===false){throw Ur("getIterator")}return ne(this,r)};return e}();if(typeof t.asyncIterator==="symbol"){Object.defineProperty(Fr.prototype,t.asyncIterator,{value:Fr.prototype.getIterator,enumerable:false,writable:true,configurable:true})}function Rr(e,t,r,a,n){if(a===void 0){a=1}if(n===void 0){n=function(){return 1}}var i=Object.create(Fr.prototype);_r(i);var o=Object.create(Ot.prototype);Ut(i,o,e,t,r,a,n);return i}function _r(e){e._state="readable";e._reader=undefined;e._storedError=undefined;e._disturbed=false}function Br(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")){return false}return true}function Mr(e){if(e._reader===undefined){return false}return true}function Lr(e,t){e._disturbed=true;if(e._state==="closed"){return C(undefined)}if(e._state==="errored"){return k(e._storedError)}Dr(e);var r=e._readableStreamController[H](t);return E(r,S)}function Dr(e){e._state="closed";var t=e._reader;if(t===undefined){return}if(ee(t)){t._readRequests.forEach(function(e){e._resolve(_(undefined,true,t._forAuthorCode))});t._readRequests=new R}G(t)}function Nr(e,t){e._state="errored";e._storedError=t;var r=e._reader;if(r===undefined){return}if(ee(r)){r._readRequests.forEach(function(e){e._reject(t)});r._readRequests=new R}else{r._readIntoRequests.forEach(function(e){e._reject(t)});r._readIntoRequests=new R}q(r,t)}function Ur(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}var jr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}e.prototype.size=function(e){return e.byteLength};return e}(),qr=function(){function e(e){var t=e.highWaterMark;this.highWaterMark=t}e.prototype.size=function(){return 1};return e}(),zr=function(){function e(e,t,r){if(e===void 0){e={}}if(t===void 0){t={}}if(r===void 0){r={}}var a=t.size;var n=t.highWaterMark;var i=r.size;var o=r.highWaterMark;var s=e.writableType;if(s!==undefined){throw new RangeError("Invalid writable type specified")}var c=v(a);if(n===undefined){n=1}n=g(n);var l=e.readableType;if(l!==undefined){throw new RangeError("Invalid readable type specified")}var u=v(i);if(o===undefined){o=0}o=g(o);var h;var f=x(function(e){h=e});Gr(this,f,n,c,o,u);Zr(this,e);var d=p(e,"start",[this._transformStreamController]);h(d)}Object.defineProperty(e.prototype,"readable",{get:function(){if(Hr(this)===false){throw ca("readable")}return this._readable},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"writable",{get:function(){if(Hr(this)===false){throw ca("writable")}return this._writable},enumerable:true,configurable:true});return e}();function Gr(t,e,r,a,n,i){function o(){return e}function s(e){return aa(t,e)}function c(e){return na(t,e)}function l(){return ia(t)}t._writable=ge(o,s,l,c,r,a);function u(){return oa(t)}function h(e){Xr(t,e);return C(undefined)}t._readable=Rr(o,u,h,n,i);t._backpressure=undefined;t._backpressureChangePromise=undefined;t._backpressureChangePromise_resolve=undefined;Vr(t,true);t._transformStreamController=undefined}function Hr(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")){return false}return true}function Wr(e,t){Mt(e._readable._readableStreamController,t);Xr(e,t)}function Xr(e,t){Qr(e._transformStreamController);tt(e._writable._writableStreamController,t);if(e._backpressure===true){Vr(e,false)}}function Vr(t,e){if(t._backpressureChangePromise!==undefined){t._backpressureChangePromise_resolve()}t._backpressureChangePromise=x(function(e){t._backpressureChangePromise_resolve=e});t._backpressure=e}var Yr=function(){function e(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(Kr(this)===false){throw sa("desiredSize")}var e=this._controlledTransformStream._readable._readableStreamController;return Lt(e)},enumerable:true,configurable:true});e.prototype.enqueue=function(e){if(Kr(this)===false){throw sa("enqueue")}$r(this,e)};e.prototype.error=function(e){if(Kr(this)===false){throw sa("error")}ea(this,e)};e.prototype.terminate=function(){if(Kr(this)===false){throw sa("terminate")}ra(this)};return e}();function Kr(e){if(!n(e)){return false}if(!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")){return false}return true}function Jr(e,t,r,a){t._controlledTransformStream=e;e._transformStreamController=t;t._transformAlgorithm=r;t._flushAlgorithm=a}function Zr(e,t){var r=Object.create(Yr.prototype);var a=function(e){try{$r(r,e);return C(undefined)}catch(e){return k(e)}};var n=t.transform;if(n!==undefined){if(typeof n!=="function"){throw new TypeError("transform is not a method")}a=function(e){return c(n,t,[e,r])}}var i=l(t,"flush",0,[r]);Jr(e,r,a,i)}function Qr(e){e._transformAlgorithm=undefined;e._flushAlgorithm=undefined}function $r(e,t){var r=e._controlledTransformStream;var a=r._readable._readableStreamController;if(Nt(a)===false){throw new TypeError("Readable side is not in a state that permits enqueue")}try{Bt(a,t)}catch(e){Xr(r,e);throw r._readable._storedError}var n=Dt(a);if(n!==r._backpressure){Vr(r,true)}}function ea(e,t){Wr(e._controlledTransformStream,t)}function ta(t,e){var r=t._transformAlgorithm(e);return E(r,undefined,function(e){Wr(t._controlledTransformStream,e);throw e})}function ra(e){var t=e._controlledTransformStream;var r=t._readable._readableStreamController;if(Nt(r)===true){_t(r)}var a=new TypeError("TransformStream terminated");Xr(t,a)}function aa(r,a){var n=r._transformStreamController;if(r._backpressure===true){var e=r._backpressureChangePromise;return E(e,function(){var e=r._writable;var t=e._state;if(t==="erroring"){throw e._storedError}return ta(n,a)})}return ta(n,a)}function na(e,t){Wr(e,t);return C(undefined)}function ia(t){var r=t._readable;var e=t._transformStreamController;var a=e._flushAlgorithm();Qr(e);return E(a,function(){if(r._state==="errored"){throw r._storedError}var e=r._readableStreamController;if(Nt(e)===true){_t(e)}},function(e){Wr(t,e);throw r._storedError})}function oa(e){Vr(e,false);return e._backpressureChangePromise}function sa(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function ca(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.ByteLengthQueuingStrategy=jr,e.CountQueuingStrategy=qr,e.ReadableStream=Fr,e.TransformStream=zr,e.WritableStream=de,Object.defineProperty(e,"__esModule",{value:true})}(t)},function(e,t,r){r(145),r(114),r(77),r(116);var a=r(43);e.exports=a.Map},function(e,t,r){"use strict";var a=r(146),n=r(150);e.exports=a("Map",function(t){return function(e){return t(this,arguments.length?e:void 0)}},n)},function(e,t,r){"use strict";var m=r(10),v=r(11),b=r(52),y=r(29),w=r(147),k=r(124),S=r(123),x=r(22),C=r(14),A=r(97),I=r(85),T=r(149);e.exports=function(a,e,t){function r(e){var r=d[e];y(d,e,"add"==e?function(e){return r.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(u&&!x(e))&&r.call(this,0===e?0:e)}:"get"==e?function(e){return u&&!x(e)?void 0:r.call(this,0===e?0:e)}:"has"==e?function(e){return!(u&&!x(e))&&r.call(this,0===e?0:e)}:function(e,t){return r.call(this,0===e?0:e,t),this})}var n,i,o,s,c,l=-1!==a.indexOf("Map"),u=-1!==a.indexOf("Weak"),h=l?"set":"add",f=v[a],d=f&&f.prototype,p=f,g={};return b(a,"function"!=typeof f||!(u||d.forEach&&!C(function(){(new f).entries().next()})))?(p=t.getConstructor(e,a,l,h),w.REQUIRED=!0):b(a,!0)&&(i=(n=new p)[h](u?{}:-0,1)!=n,o=C(function(){n.has(1)}),s=A(function(e){new f(e)}),c=!u&&C(function(){for(var e=new f,t=5;t--;)e[h](t,t);return!e.has(-0)}),s||(((p=e(function(e,t){S(e,p,a);var r=T(new f,e,p);return null!=t&&k(t,r[h],r,l),r})).prototype=d).constructor=p),(o||c)&&(r("delete"),r("has"),l&&r("get")),(c||i)&&r(h),u&&d.clear&&delete d.clear),g[a]=p,m({global:!0,forced:p!=f},g),I(p,a),u||t.setStrong(p,a,l),p}},function(e,t,r){function a(e){s(e,u,{value:{objectID:"O"+ ++h,weakData:{}}})}var n=r(39),i=r(22),o=r(23),s=r(27).f,c=r(38),l=r(148),u=c("meta"),h=0,f=Object.isExtensible||function(){return!0},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!f(e))return"F";if(!t)return"E";a(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!f(e))return!0;if(!t)return!1;a(e)}return e[u].weakData},onFreeze:function(e){return l&&d.REQUIRED&&f(e)&&!o(e,u)&&a(e),e}};n[u]=!0},function(e,t,r){var a=r(14);e.exports=!a(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,r){var i=r(22),o=r(87);e.exports=function(e,t,r){var a,n;return o&&"function"==typeof(a=t.constructor)&&a!==r&&i(n=a.prototype)&&n!==r.prototype&&o(e,n),e}},function(e,t,r){"use strict";var l=r(27).f,u=r(71),h=r(121),f=r(62),d=r(123),p=r(124),o=r(79),s=r(122),g=r(13),m=r(147).fastKey,a=r(33),v=a.set,b=a.getterFor;e.exports={getConstructor:function(e,r,a,n){function i(e,t,r){var a,n,i=s(e),o=c(e,t);return o?o.value=r:(i.last=o={index:n=m(t,!0),key:t,value:r,previous:a=i.last,next:void 0,removed:!1},i.first||(i.first=o),a&&(a.next=o),g?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}var o=e(function(e,t){d(e,o,r),v(e,{type:r,index:u(null),first:void 0,last:void 0,size:0}),g||(e.size=0),null!=t&&p(t,e[n],e,a)}),s=b(r),c=function(e,t){var r,a=s(e),n=m(t);if("F"!==n)return a.index[n];for(r=a.first;r;r=r.next)if(r.key==t)return r};return h(o.prototype,{clear:function(){for(var e=s(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,g?e.size=0:this.size=0},delete:function(e){var t,r,a=s(this),n=c(this,e);return n&&(t=n.next,r=n.previous,delete a.index[n.index],n.removed=!0,r&&(r.next=t),t&&(t.previous=r),a.first==n&&(a.first=t),a.last==n&&(a.last=r),g?a.size--:this.size--),!!n},forEach:function(e,t){for(var r,a=s(this),n=f(e,1>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(166),r(114),r(168),r(172),r(173),r(174),r(175),r(176),r(177),r(178),r(179),r(180),r(181),r(182),r(183),r(184),r(185),r(186),r(187);var a=r(43);e.exports=a.Symbol},function(e,t,r){"use strict";var a=r(10),n=r(14),l=r(158),u=r(22),h=r(83),f=r(47),d=r(93),p=r(157),i=r(167),o=r(57),s=r(133),g=o("isConcatSpreadable"),m=9007199254740991,v="Maximum allowed index exceeded",c=51<=s||!n(function(){var e=[];return e[g]=!1,e.concat()[0]!==e}),b=i("concat");a({target:"Array",proto:!0,forced:!c||!b},{concat:function(e){for(var t,r,a,n=h(this),i=p(n,0),o=0,s=-1,c=arguments.length;sa&&(n=n.slice(0,a)),l?i+n:n+i)}}var u=r(47),h=r(191),f=r(20),d=Math.ceil;e.exports={start:a(!1),end:a(!0)}},function(e,t,r){"use strict";var n=r(48),i=r(20);e.exports="".repeat||function(e){var t=String(i(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;0>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t,r){var a=r(127);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a)},function(e,t,r){r(194);var a=r(61);e.exports=a("String","padEnd")},function(e,t,r){"use strict";var a=r(10),n=r(190).end;a({target:"String",proto:!0,forced:r(192)},{padEnd:function(e,t){return n(this,e,1=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r=this.end?this.numChunks:Math.floor(t/this.chunkSize),n=r;n=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getBytes",value:function(e,t){var r=1this.progressiveDataLength&&this.ensureRange(n,i);var o=a.subarray(n,i);return r?new Uint8ClampedArray(o):o}var s=n+e;ithis.progressiveDataLength&&this.ensureRange(n,s),this.pos=s;var c=a.subarray(n,s);return r?new Uint8ClampedArray(c):c}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e,t){var r=1this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"skip",value:function(e){e=e||1,this.pos+=e}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,t,r){function a(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),(a.prototype=Object.create(this)).getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,a=[],n=t;n>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var u=r(5);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(i){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t,r,a,n=l(i);return t=o?(e=l(this).constructor,Reflect.construct(n,arguments,e)):n.apply(this,arguments),r=this,!(a=t)||"object"!==s(a)&&"function"!=typeof a?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(r):a}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var n=function(){o(n,u.BaseException);var a=c(n);function n(e,t){var r;return i(this,n),(r=a.call(this,"Missing data [".concat(e,", ").concat(t,")"))).begin=e,r.end=t,r}return n}();t.MissingDataException=n;var h=function(){o(t,u.BaseException);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.XRefEntryException=h;var f=function(){o(t,u.BaseException);var e=c(t);function t(){return i(this,t),e.apply(this,arguments)}return t}();t.XRefParseException=f;var d=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDocument=t.Page=void 0;var a,n=(a=r(2))&&a.__esModule?a:{default:a},f=r(5),i=r(203),l=r(198),u=r(201),s=r(205),o=r(218),c=r(215),h=r(204),d=r(219),p=r(220),g=r(234);function m(e,t,r,a,n,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(a,n)}function v(s){return function(){var e=this,o=arguments;return new Promise(function(t,r){var a=s.apply(e,o);function n(e){m(a,t,r,n,i,"next",e)}function i(e){m(a,t,r,n,i,"throw",e)}n(void 0)})}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],a=!0,n=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){n=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw i}}return r}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function g(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r=r[t-1])&&e<=a.numPages})&&(o=i);break;case"NumCopies":0=e.length);)r+=String.fromCharCode(a),a=e[t];return r}(g,m);if(S.startsWith("xref")&&(4===S.length||/\s/.test(S[4])))m+=e(g,m,s),b.push(m),m+=e(g,m,c);else if(k=t.exec(S)){var x=0|k[1],C=0|k[2];this.entries[x]&&this.entries[x].gen!==C||(this.entries[x]={offset:m-h.start,gen:C,uncompressed:!0});for(var A=void 0,I=m+S.length;I>1,c=t.fetchIfRef(n[s]).get("Limits");if(et.fetchIfRef(c[1]))){r=t.fetchIfRef(n[s]);break}i=1+s}}if(o>1,d=f+(1&f),p=t.fetchIfRef(l[d]);if(e>")&&!(0,b.isEOF)(this.buf1);)if((0,b.isName)(this.buf1)){var i=this.buf1.name;if(this.shift(),(0,b.isEOF)(this.buf1))break;n.set(i,this.getObj(t))}else(0,v.info)("Malformed dictionary: key must be a name object"),this.shift();if((0,b.isEOF)(this.buf1)){if(!this.recoveryMode)throw new v.FormatError("End of file inside dictionary");return n}return(0,b.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(n,t):n:(this.shift(),n);default:return r}if(Number.isInteger(r)){if(Number.isInteger(this.buf1)&&(0,b.isCmd)(this.buf2,"R")){var o=b.Ref.get(r,this.buf1);return this.shift(),this.shift(),o}return r}return"string"==typeof r&&t?t.decryptString(r):r}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,a=e.pos,n=0;-1!==(t=e.getByte());)if(0===n)n=69===t?1:0;else if(1===n)n=73===t?2:0;else if((0,v.assert)(2===n,"findDefaultInlineStreamEnd - invalid state."),32===t||10===t||13===t){r=e.pos;for(var i=e.peekBytes(10),o=0,s=i.length;or){var n=e.peekBytes(2);if(69===n[0]&&73===n[1])break}}var i=e.pos-t;return-1===a?((0,v.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var a=e.pos-r;return-1===t?((0,v.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-a),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),a)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,a=r.stream,n=new b.Dict(this.xref);!(0,b.isCmd)(this.buf1,"ID")&&!(0,b.isEOF)(this.buf1);){if(!(0,b.isName)(this.buf1))throw new v.FormatError("Dictionary key must be a name object");var i=this.buf1.name;if(this.shift(),(0,b.isEOF)(this.buf1))break;n.set(i,this.getObj(e))}-1!==r.beginInlineImagePos&&(t=a.pos-r.beginInlineImagePos);var o,s,c=n.get("Filter","F");(0,b.isName)(c)?o=c.name:Array.isArray(c)&&(s=this.xref.fetchIfRef(c[0]),(0,b.isName)(s)&&(o=s.name));var l,u=a.pos,h="DCTDecode"===o||"DCT"===o?this.findDCTDecodeInlineStreamEnd(a):"ASCII85Decode"===o||"A85"===o?this.findASCII85DecodeInlineStreamEnd(a):"ASCIIHexDecode"===o||"AHx"===o?this.findASCIIHexDecodeInlineStreamEnd(a):this.findDefaultInlineStreamEnd(a),f=a.makeSubStream(u,h,n);if(h<1e3&&t<5552){var d=f.getBytes();f.reset();var p=a.pos;a.pos=r.beginInlineImagePos;var g=a.getBytes(t);a.pos=p,l=y(d)+"_"+y(g);var m=this.imageCache[l];if(void 0!==m)return this.buf2=b.Cmd.get("EI"),this.shift(),m.reset(),m}return e&&(f=e.createStream(f,h)),(f=this.filter(f,n,h)).dict=n,void 0!==l&&(f.cacheKey="inline_".concat(h,"_").concat(l),this.imageCache[l]=f),this.buf2=b.Cmd.get("EI"),this.shift(),f}},{key:"_findStreamLength",value:function(e,t){var r=this.lexer.stream;r.pos=e;for(var a=t.length;r.pos>")):b.Cmd.get(">");case 123:return this.nextChar(),b.Cmd.get("{");case 125:return this.nextChar(),b.Cmd.get("}");case 41:throw this.nextChar(),new v.FormatError("Illegal character: ".concat(t))}for(var r=String.fromCharCode(t),a=this.knownCommands,n=a&&void 0!==a[r];0<=(t=this.nextChar())&&!s[t];){var i=r+String.fromCharCode(t);if(n&&void 0===a[i])break;if(128===r.length)throw new v.FormatError("Command token too long: ".concat(r.length));r=i,n=a&&void 0!==a[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),b.Cmd.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;0<=e;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}]),r}();t.Lexer=g;var m=function(){function e(){f(this,e)}return n(e,null,[{key:"create",value:function(e){function t(e,t,r){var a=2e.length)&&(t=e.length);for(var r=0,a=new Array(t);r=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},getBytes:function(e,t){var r=1this.end&&(t=this.end),this.bytes.subarray(e,t)},skip:function(e){e=e||1,this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(e,t,r){return new o(this.bytes.buffer,e,t,r)}},o);function o(e,t,r,a){this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.start=t||0,this.pos=this.start,this.end=t+r||this.bytes.length,this.dict=a}t.Stream=i;var l=(u.prototype=i.prototype,u);function u(e){var t=(0,F.stringToBytes)(e);i.call(this,t)}t.StringStream=l;var h,f=(h=new Uint8Array(0),d.prototype={get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength},ensureBuffer:function(e){var t=this.buffer;if(e<=t.byteLength)return t;for(var r=this.minBufferLength;r>e,this.codeSize=a-=e,t},v.prototype.getCode=function(e){for(var t,r=this.str,a=e[0],n=e[1],i=this.codeSize,o=this.codeBuf;i>16,l=65535&s;if(c<1||i>c,this.codeSize=i-c,l},v.prototype.generateHuffmanTable=function(e){var t=e.length,r=0;for(h=0;hr&&(r=e[h]);for(var a=1<>=1;for(h=l;h>=1)){if(-1===(e=a.getByte()))throw new F.FormatError("Bad block header in flate stream");var i=e;if(-1===(e=a.getByte()))throw new F.FormatError("Bad block header in flate stream");if(i|=e<<8,-1===(e=a.getByte()))throw new F.FormatError("Bad block header in flate stream");var o=e;if(-1===(e=a.getByte()))throw new F.FormatError("Bad block header in flate stream");if((o|=e<<8)!=(65535&~i)&&(0!=i||0!=o))throw new F.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var s,c=this.bufferLength,l=c+i,u=this.ensureBuffer(l);return this.bufferLength=l,void(0==i?-1===a.peekByte()&&(this.eof=!0):(s=a.getBytes(i),u.set(s,c),s.length>16;0>16)&&(O=this.getBits(O));var E=(65535&T)+O;A<=I+v&&(A=(u=this.ensureBuffer(I+v)).length);for(var P=0;P>1,h^=h>>2,o=(1&(h^=h>>4))<<7,r[u++]=h}else if(8===a){for(d=0;d>8&255,r[u++]=255&p}}else{var g=new Uint8Array(n+1),m=(1<>c-a)&m,c-=a,s=s<>l-8&255,l-=8);0>1)+a[s];for(;s>1)+a[s]&255,u++;break;case 4:for(s=0;s>3,this.rowBytes=o*n*i+7>>3,f.call(this,t),this}t.PredictorStream=b;var w=((k.prototype=Object.create(f.prototype)).readBlock=function(){if(this.initialized?t=this.nextChunk:(t=this.str.getBytes(512),this.initialized=!0),t&&0!==t.length){this.nextChunk=this.str.getBytes(512);for(var e=this.nextChunk&&0>=8}}else this.eof=!0},x);function x(e,t){this.str=e,this.dict=e.dict,this.input=new Uint8Array(5),t&&(t*=.8),f.call(this,t)}t.Ascii85Stream=S;var C=((A.prototype=Object.create(f.prototype)).readBlock=function(){var e=this.str.getBytes(8e3);if(e.length){for(var t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t),a=this.bufferLength,n=this.firstDigit,i=0,o=e.length;i>>t&(1<>1==1)break;this._eatBits(1)}this._eatBits(12),0r?(s<<=r,1&this.codingPos||(s|=255>>8-r),this.outputBits-=r,r=0):(s<<=this.outputBits,1&this.codingPos||(s|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,l[this.codingPos]r[a]&&(e>this.columns&&((0,f.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e),this.codingPos=a},_addPixelsNeg:function(e,t){var r=this.codingLine,a=this.codingPos;if(e>r[a])e>this.columns&&((0,f.info)("row is wrong length"),this.err=!0,e=this.columns),1&a^t&&++a,r[a]=e;else if(e>5==0?n[t]:i[t>>3])[0])return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,9,i);if(r[0])return r[1];if((r=this._findTableCode(11,12,n))[0])return r[1]}return(0,f.info)("bad white code"),this._eatBits(1),1},_getBlackCode:function(){var e,t;if(this.eoblock){if(-1===(e=this._lookBits(13)))return 1;if(0<(t=e>>7==0?o[e]:e>>9==0&&e>>7!=0?s[(e>>1)-64]:c[e>>7])[0])return this._eatBits(t[0]),t[1]}else{var r=this._findTableCode(2,6,c);if(r[0])return r[1];if((r=this._findTableCode(7,12,s,64))[0])return r[1];if((r=this._findTableCode(10,13,o))[0])return r[1]}return(0,f.info)("bad black code"),this._eatBits(1),1},_lookBits:function(e){for(var t;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e},_eatBits:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}},u);function u(e){var t=1>>0}var a=r(1),s=r(1)?r(1)?r(1)?r(1)?r(1)?r(32)+4436:r(12)+340:r(8)+84:r(6)+20:r(4)+4:r(2);return 0===a?s:0>1)+X(C,"IARDX",x),(P>>1)+X(C,"IARDY",x),!1,g,m));var D,N,U,j=F-(1&h?0:L-1),q=T-(2&h?M-1:0);if(l){for(D=0;D>5&7,c=[31&o],l=t+6;if(7===o){s=536870911&(0,$.readUint32)(e,l-1),l+=3;var u=s+7>>3;for(c[0]=e[l++];0<--u;)c.push(e[l++])}else if(5===o||6===o)throw new ee("invalid referred-to flags");r.retainBits=c;var h=4;r.number<=256?h=1:r.number<=65536&&(h=2);for(var f,d=[],p=0;p>>24&255,b[3]=m.height>>16&255,b[4]=m.height>>8&255,b[5]=255&m.height,p=l,f=e.length;p>2&3,u.huffmanDWSelector=h>>4&3,u.bitmapSizeSelector=h>>6&1,u.aggregationInstancesSelector=h>>7&1,u.bitmapCodingContextUsed=!!(256&h),u.bitmapCodingContextRetained=!!(512&h),u.template=h>>10&3,u.refinementTemplate=h>>12&1,c+=2,!u.huffman){for(i=0===u.template?4:1,a=[],n=0;n>2&3,f.stripSize=1<>4&3,f.transposed=!!(64&p),f.combinationOperator=p>>7&3,f.defaultPixelValue=p>>9&1,f.dsOffset=p<<17>>27,f.refinementTemplate=p>>15&1,f.huffman&&(d=(0,$.readUint16)(s,c),c+=2,f.huffmanFS=3&d,f.huffmanDS=d>>2&3,f.huffmanDT=d>>4&3,f.huffmanRefinementDW=d>>6&3,f.huffmanRefinementDH=d>>8&3,f.huffmanRefinementDX=d>>10&3,f.huffmanRefinementDY=d>>12&3,f.huffmanRefinementSizeSelector=!!(16384&d)),f.refinement&&!f.refinementTemplate){for(a=[],n=0;n<2;n++)a.push({x:(0,$.readInt8)(s,c),y:(0,$.readInt8)(s,c+1)}),c+=2;f.refinementAt=a}f.numberOfSymbolInstances=(0,$.readUint32)(s,c),c+=4,r=[f,o.referredTo,s,c,l];break;case 16:var g={},m=s[c++];g.mmr=!!(1&m),g.template=m>>1&3,g.patternWidth=s[c++],g.patternHeight=s[c++],g.maxPatternIndex=(0,$.readUint32)(s,c),c+=4,r=[g,o.number,s,c,l];break;case 22:case 23:var v={};v.info=C(s,c),c+=A;var b=s[c++];v.mmr=!!(1&b),v.template=b>>1&3,v.enableSkip=!!(8&b),v.combinationOperator=b>>4&7,v.defaultPixelValue=b>>7&1,v.gridWidth=(0,$.readUint32)(s,c),c+=4,v.gridHeight=(0,$.readUint32)(s,c),c+=4,v.gridOffsetX=4294967295&(0,$.readUint32)(s,c),c+=4,v.gridOffsetY=4294967295&(0,$.readUint32)(s,c),c+=4,v.gridVectorX=(0,$.readUint16)(s,c),c+=2,v.gridVectorY=(0,$.readUint16)(s,c),c+=2,r=[v,o.referredTo,s,c,l];break;case 38:case 39:var y={};y.info=C(s,c),c+=A;var w=s[c++];if(y.mmr=!!(1&w),y.template=w>>1&3,y.prediction=!!(8&w),!y.mmr){for(i=0===y.template?4:1,a=[],n=0;n>2&1,k.combinationOperator=S>>3&3,k.requiresBuffer=!!(32&S),k.combinationOperatorOverride=!!(64&S),r=[k];break;case 49:case 50:case 51:break;case 53:r=[o.number,s,c,l];break;case 62:break;default:throw new ee("segment type ".concat(o.typeName,"(").concat(o.type,")")+" is not implemented")}var x="on"+o.typeName;x in t&&t[x].apply(t,r)}(e[r],t)}function y(){}function k(e){2===e.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=e[0],this.rangeLength=0,this.prefixCode=e[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=e[0],this.prefixLength=e[1],this.rangeLength=e[2],this.prefixCode=e[3],this.isLowerRange="lower"===e[4])}function i(e){this.children=[],e?(this.isLeaf=!0,this.rangeLength=e.rangeLength,this.rangeLow=e.rangeLow,this.isLowerRange=e.isLowerRange,this.isOOB=e.isOOB):this.isLeaf=!1}function S(e,t){t||this.assignPrefixCodes(e),this.rootNode=new i(null);for(var r=0,a=e.length;r>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var a=0,n=r.length;a>3,u=o.combinationOperatorOverride?e.combinationOperator:o.combinationOperator,h=this.buffer,f=128>>(7&e.x),d=e.y*l+(e.x>>3);switch(u){case 0:for(r=0;r>=1)||(n=128,i++);d+=l}break;case 2:for(r=0;r>=1)||(n=128,i++);d+=l}break;default:throw new ee("operator ".concat(u," is not supported"))}},onImmediateGenericRegion:function(e,t,r,a){var n=e.info,i=new m(t,r,a),o=Y(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(n,o)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,t,r,a,n,i){var o,s;e.huffman&&(o=function(e,t,r){var a,n,i,o,s=0;switch(e.huffmanDHSelector){case 0:case 1:a=Z(e.huffmanDHSelector+4);break;case 3:a=x(s,t,r),s++;break;default:throw new ee("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:n=Z(e.huffmanDWSelector+2);break;case 3:n=x(s,t,r),s++;break;default:throw new ee("invalid Huffman DW selector")}e.bitmapSizeSelector?(i=x(s,t,r),s++):i=Z(1);o=e.aggregationInstancesSelector?x(s,t,r):Z(1);return{tableDeltaHeight:a,tableDeltaWidth:n,tableBitmapSize:i,tableAggregateInstances:o}}(e,r,this.customTables),s=new G(a,n,i));var c=this.symbols;c||(this.symbols=c={});for(var l=[],u=0,h=r.length;u>8,0<=(R=u+T*d+O*f>>8)&&R+k<=a&&0<=_&&_+S<=n)for(U=0;U>1&7),u=1+(i>>4&7),h=[],f=o;for(;a=c.readBits(l),n=c.readBits(u),h.push(new k([f,a,n,0])),f+=1<>t&1;t<=0?this.children[a]=new i(e):((r=this.children[a])||(this.children[a]=r=new i(null)),r.buildTree(e,t-1))},decodeNode:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new ee("invalid Huffman data");return r.decodeNode(e)}},S.prototype={decode:function(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function(e){for(var t=e.length,r=0,a=0;a>h&1,h--}if(a&&!c)for(var d=0;d<5&&-1!==o.readNextChar();d++);return s}function e(){}return G.prototype={readBit:function(){if(this.shift<0){if(this.position>=this.end)throw new ee("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e},readBits:function(e){for(var t=0,r=e-1;0<=r;r--)t|=this.readBit()<=this.end?-1:this.data[this.position++]}},e.prototype={parseChunks:function(e){for(var t=new y,r=0,a=e.length;r>=1;return{imgData:u,width:s,height:c}}(e),r=t.imgData,a=t.width,n=t.height;return this.width=a,this.height=n,r}},e}();t.Jbig2Image=l},function(e,t,r){"use strict";function n(e,t){for(var r=0;r>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var e,t,r;return e=a,(t=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?143>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,a=e[t]>>1,n=1&e[t],i=c[a],o=i.qe,s=this.a-o;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--,0==(32768&s););return this.a=s,e[t]=a<<1|n,r}}])&&n(e.prototype,t),r&&n(e,r),a}();t.ArithmeticDecoder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var i=r(205),h=r(198),f=r(212),a=r(5),n=(o.prototype=Object.create(i.DecodeStream.prototype),Object.defineProperty(o.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),o.prototype.ensureBuffer=function(e){},o.prototype.readBlock=function(){if(!this.eof){var e,t={decodeTransform:void 0,colorTransform:void 0},r=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(r)){for(var a=this.dict.get("BitsPerComponent")||8,n=r.length,i=new Int32Array(n),o=!1,s=(1<>4==0)for(R=0;R<64;R++)v[Y[R]]=n[o++];else{if(m>>4!=1)throw new K("DQT - invalid table spec");for(R=0;R<64;R++)v[Y[R]]=(0,V.readUint16)(n,o),o+=2}u[15&m]=v}break;case 65472:case 65473:case 65474:if(t)throw new K("Only single frame JPEGs supported");o+=2,(t={}).extended=65473===d,t.progressive=65474===d,t.precision=n[o++];var b=(0,V.readUint16)(n,o);o+=2,t.scanLines=i||b,t.samplesPerLine=(0,V.readUint16)(n,o),o+=2,t.components=[],t.componentIds={};for(var y,w=n[o++],k=0,S=0,x=0;x>4,A=15&n[o+1];k>4==0?f:h)[15&E]=function(e,t){for(var r,a=0,n=[],i=16;0>4],N.huffmanTableAC=h[15&U],L.push(N)}var j=n[o++],q=n[o++],z=n[o++];try{var G=Q(n,o,t,L,r,j,q,z>>4,15&z,B);o+=G}catch(e){if(e instanceof J)return(0,X.warn)("".concat(e.message," -- attempting to re-parse the JPEG image.")),this.parse(n,{dnlScanLines:e.scanLines});if(e instanceof Z){(0,X.warn)("".concat(e.message," -- ignoring the rest of the image data."));break e}throw e}break;case 65500:o+=4;break;case 65535:255!==n[o]&&o--;break;default:var H=ee(n,o-2,o-3);if(H&&H.invalid){(0,X.warn)("JpegImage.parse - unexpected data, current marker is: "+H.invalid),o=H.offset;break}if(o>=n.length-1){(0,X.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new K("JpegImage.parse - unknown marker: "+d.toString(16))}d=(0,V.readUint16)(n,o),o+=2}for(this.width=t.samplesPerLine,this.height=t.scanLines,this.jfif=s,this.adobe=c,this.components=[],x=0;x>8)+x[u+1];return w},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform:1===this._colorTransform},_convertYccToRgb:function(e){for(var t,r,a,n=0,i=e.length;n>--g&1;if(255===(p=a[n++])){var e=a[n++];if(e){if(220===e&&s){n+=2;var t=(0,V.readUint16)(a,n);if(n+=2,0>>(g=7)}function v(e){for(var t=e;;){switch(N(t=t[m()])){case"number":return t;case"object":continue}throw new K("invalid huffman sequence")}}function b(e){for(var t=0;0>4;if(0!=i){var s=Y[r+=o];e.blockData[t+s]=y(i)*(1<>4,0==(r=15&a))S=o<15?(w=b(o)+(1<>4;if(0!=o){var c=Y[n+=s];e.blockData[t+c]=y(o),n++}else{if(s<15)break;n+=16}}},B=0,M=1===R?e[0].blocksPerLine*e[0].blocksPerColumn:c*i.mcusPerColumn;B<=M;){var L,D=t?Math.min(M-B,t):M;if(0>8)+(n=P*g+128>>8)+1>>1)-n,y=(i=d)*E+(o=v)*O+128>>8,i=i*O-o*E+128>>8,l=(s=(s=F*(f-b)+128>>8)+(l=m<<4)+1>>1)-l,c=(u=(u=F*(f+b)+128>>8)+(c=p<<4)+1>>1)-c,o=(a=a+(o=y)+1>>1)-o,i=(n=n+i+1>>1)-i,y=s*T+u*I+2048>>12,s=s*I-u*T+2048>>12,u=y,y=c*A+l*C+2048>>12,c=c*C-l*A+2048>>12,l=y,r[S]=a+u,r[S+7]=a-u,r[S+1]=n+l,r[S+6]=n-l,r[S+2]=i+c,r[S+5]=i-c,r[S+3]=o+s,r[S+4]=o-s):(y=P*h+512>>10,r[S]=y,r[S+1]=y,r[S+2]=y,r[S+3]=y,r[S+4]=y,r[S+5]=y,r[S+6]=y,r[S+7]=y);for(var x=0;x<8;++x)h=r[x],0!=((f=r[x+8])|(d=r[x+16])|(p=r[x+24])|(g=r[x+32])|(m=r[x+40])|(v=r[x+48])|(b=r[x+56]))?(n=(a=4112+((a=P*h+2048>>12)+(n=P*g+2048>>12)+1>>1))-n,y=(i=d)*E+(o=v)*O+2048>>12,i=i*O-o*E+2048>>12,o=y,l=(s=(s=F*(f-b)+2048>>12)+(l=m)+1>>1)-l,c=(u=(u=F*(f+b)+2048>>12)+(c=p)+1>>1)-c,y=s*T+u*I+2048>>12,s=s*I-u*T+2048>>12,u=y,y=c*A+l*C+2048>>12,c=c*C-l*A+2048>>12,(h=(a=a+o+1>>1)+u)<16?h=0:4080<=h?h=255:h>>=4,(f=(n=n+i+1>>1)+(l=y))<16?f=0:4080<=f?f=255:f>>=4,(d=(i=n-i)+c)<16?d=0:4080<=d?d=255:d>>=4,(p=(o=a-o)+s)<16?p=0:4080<=p?p=255:p>>=4,(g=o-s)<16?g=0:4080<=g?g=255:g>>=4,(m=i-c)<16?m=0:4080<=m?m=255:m>>=4,(v=n-l)<16?v=0:4080<=v?v=255:v>>=4,(b=a-u)<16?b=0:4080<=b?b=255:b>>=4,k[t+x]=h,k[t+x+8]=f,k[t+x+16]=d,k[t+x+24]=p,k[t+x+32]=g,k[t+x+40]=m,k[t+x+48]=v,k[t+x+56]=b):(y=(y=P*h+8192>>14)<-2040?0:2024<=y?255:y+2056>>4,k[t+x]=y,k[t+x+8]=y,k[t+x+16]=y,k[t+x+24]=y,k[t+x+32]=y,k[t+x+40]=y,k[t+x+48]=y,k[t+x+56]=y)}(t,U(t,i,o),n)}return t.blockData}function ee(e,t,r){var a=2=n)return null;s=(0,V.readUint16)(e,i)}return{invalid:o.toString(16),marker:s,offset:i}}t.JpegImage=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JpxStream=void 0;var n=r(205),y=r(214),a=r(5),i=(o.prototype=Object.create(n.DecodeStream.prototype),Object.defineProperty(o.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),o.prototype.ensureBuffer=function(e){},o.prototype.readBlock=function(){if(!this.eof){var e=new y.JpxImage;e.parse(this.bytes);var t=e.width,r=e.height,a=e.componentsCount,n=e.tiles.length;if(1===n)this.buffer=e.tiles[0].items;else{for(var i=new Uint8ClampedArray(t*r*a),o=0;o>i,u=t.tby0>>o,h=t.tbx1+s-1>>i,f=t.tby1+c-1>>o,d=t.resolution.precinctParameters,p=[],g=[],m=u;mv.cbxMax&&(v.cbxMax=a),mv.cbyMax&&(v.cbyMax=m)):g[b]=v={cbxMin:a,cbyMin:m,cbxMax:a,cbyMax:m},n.precinct=v)}t.codeblockParameters={codeblockWidth:i,codeblockHeight:o,numcodeblockwide:h-l+1,numcodeblockhigh:f-u+1},t.codeblocks=p,t.precincts=g}function m(e,t,r){for(var a=[],n=e.subbands,i=0,o=n.length;ie.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[l],r=t.precinctParameters.numprecincts;he.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[c],r=t.precinctParameters.numprecincts;he.codingStyleParameters.decompositionLevelsCount)){var t=e.resolutions[h];if(!(t.precinctParameters.numprecincts<=n)){for(;a>24&255,i>>16&255,i>>8&255,255&i);(0,G.warn)("Unsupported header type "+i+" ("+u+")")}s&&(t+=o)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function(e){for(var t=e.getByte();0<=t;){if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,a=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);var o=e.getUint16();return this.width=r-n,this.height=a-i,this.componentsCount=o,void(this.bitsPerComponent=8)}}throw new X("No size marker found in JPX stream")},parseCodestream:function(e,t,r){var a,n,i={},o=!1;try{for(var s=t;s+1>5,u=[];b>3,S.mu=0):(S.epsilon=e[b]>>3,S.mu=(7&e[b])<<8|e[b+1],b+=2),u.push(S)}k.SPqcds=u,i.mainHeader?i.QCD=k:(i.currentTile.QCD=k,i.currentTile.QCC=[]);break;case 65373:p=(0,H.readUint16)(e,s);var x,C={};switch(b=s+2,i.SIZ.Csiz<257?x=e[b++]:(x=(0,H.readUint16)(e,b),b+=2),31&(l=e[b++])){case 0:h=8,f=!0;break;case 1:f=!(h=16);break;case 2:h=16,f=!0;break;default:throw new Error("Invalid SQcd value "+l)}for(C.noQuantization=8===h,C.scalarExpounded=f,C.guardBits=l>>5,u=[];b>3,S.mu=0):(S.epsilon=e[b]>>3,S.mu=(7&e[b])<<8|e[b+1],b+=2),u.push(S);C.SPqcds=u,i.mainHeader?i.QCC[x]=C:i.currentTile.QCC[x]=C;break;case 65362:p=(0,H.readUint16)(e,s);var A={};b=s+2;var I=e[b++];A.entropyCoderWithCustomPrecincts=!!(1&I),A.sopMarkerUsed=!!(2&I),A.ephMarkerUsed=!!(4&I),A.progressionOrder=e[b++],A.layersCount=(0,H.readUint16)(e,b),b+=2,A.multipleComponentTransform=e[b++],A.decompositionLevelsCount=e[b++],A.xcb=2+(15&e[b++]),A.ycb=2+(15&e[b++]);var T=e[b++];if(A.selectiveArithmeticCodingBypass=!!(1&T),A.resetContextProbabilities=!!(2&T),A.terminationOnEachCodingPass=!!(4&T),A.verticallyStripe=!!(8&T),A.predictableTermination=!!(16&T),A.segmentationSymbolUsed=!!(32&T),A.reversibleTransformation=e[b++],A.entropyCoderWithCustomPrecincts){for(var O=[];b>4})}A.precinctsSizes=O}var P=[];if(A.selectiveArithmeticCodingBypass&&P.push("selectiveArithmeticCodingBypass"),A.resetContextProbabilities&&P.push("resetContextProbabilities"),A.terminationOnEachCodingPass&&P.push("terminationOnEachCodingPass"),A.verticallyStripe&&P.push("verticallyStripe"),A.predictableTermination&&P.push("predictableTermination"),0e.trx0?Math.ceil(e.trx1/r)-Math.floor(e.trx0/r):0,c=e.try1>e.try0?Math.ceil(e.try1/a)-Math.floor(e.try0/a):0,l=s*c;e.precinctParameters={precinctWidth:r,precinctHeight:a,numprecinctswide:s,numprecinctshigh:c,numprecincts:l,precinctWidthInSubband:i,precinctHeightInSubband:o}}(g,p),l.push(g),0===h?((t={type:"LL"}).tbx0=Math.ceil(s.tcx0/m),t.tby0=Math.ceil(s.tcy0/m),t.tbx1=Math.ceil(s.tcx1/m),t.tby1=Math.ceil(s.tcy1/m),t.resolution=g,R(0,t,p),u.push(t),g.subbands=[t]):(f=1<>>(o-=e)&(1<>2);b[w++]=O+m>>r,b[w++]=O>>r,b[w++]=O+g>>r}else for(f=0;f>r,b[w++]=p-.34413*g-.71414*m>>r,b[w++]=p+1.772*g>>r;if(k)for(f=0,w=3;f>r}else for(t=0;t>r,w+=o}s.push(y)}return s}(i),this.width=i.SIZ.Xsiz-i.SIZ.XOsiz,this.height=i.SIZ.Ysiz-i.SIZ.YOsiz,this.componentsCount=i.SIZ.Csiz}};var N=(t.prototype={reset:function(e,t){for(var r,a=0,n=0;a>=1,t>>=1,a++}a--,(r=this.levels[a]).items[r.index]=n,this.currentLevel=a,delete this.value},incrementValue:function(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return--e<0?(this.value=r,!1):(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,!0)}},t);function t(e,t){var r=(0,H.log2)(Math.max(e,t))+1;this.levels=[];for(var a=0;a>=1,t>>=1,a++}return this.currentLevel=a-1,!0},incrementValue:function(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()},propagateValues:function(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];0<=--e;)(t=this.levels[e]).items[t.index]=r},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];return t.items[t.index]=255,!(--e<0||(this.currentLevel=e,(t=this.levels[e]).items[t.index]=r,0))}},r);function r(e,t,r){var a=(0,H.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;n>1,o=-1.586134342059924,s=-.052980118572961,c=.882911075530934,l=.443506852043971,u=1.230174104914001,h=(t|=0)-3,f=4+i;f--;h+=2)e[h]*=.8128930661159609;for(a=l*e[(h=t-2)-1],f=3+i;f--&&(n=l*e[h+1],e[h]=u*e[h]-a-n,f--);h+=2)a=l*e[(h+=2)+1],e[h]=u*e[h]-a-n;for(a=c*e[(h=t-1)-1],f=2+i;f--&&(n=c*e[h+1],e[h]-=a+n,f--);h+=2)a=c*e[(h+=2)+1],e[h]-=a+n;for(a=s*e[(h=t)-1],f=1+i;f--&&(n=s*e[h+1],e[h]-=a+n,f--);h+=2)a=s*e[(h+=2)+1],e[h]-=a+n;if(0!=i)for(a=o*e[(h=t+1)-1],f=i;f--&&(n=o*e[h+1],e[h]-=a+n,f--);h+=2)a=o*e[(h+=2)+1],e[h]-=a+n},s);function s(){i.call(this)}var z=((c.prototype=Object.create(i.prototype)).filter=function(e,t,r){for(var a=r>>1,n=t|=0,i=1+a;i--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,i=a;i--;n+=2)e[n]+=e[n-1]+e[n+1]>>1},c);function c(){i.call(this)}return e}();t.JpxImage=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA512=t.calculateSHA384=t.calculateSHA256=t.calculateMD5=t.PDF20=t.PDF17=t.CipherTransformFactory=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0;var N=r(5),U=r(198),a=r(205);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(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&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(i){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t,r,a,n=c(i);return t=o?(e=c(this).constructor,Reflect.construct(n,arguments,e)):n.apply(this,arguments),r=this,!(a=t)||"object"!==s(a)&&"function"!=typeof a?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(r):a}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r>5&255,l[u++]=r>>13&255,l[u++]=r>>21&255,l[u++]=r>>>29&255,l[u++]=0,l[u++]=0,l[u++]=0;var h=new Int32Array(16);for(u=0;u>>32-k)|0,p=y}n=n+p|0,i=i+g|0,o=o+m|0,s=s+v|0}return new Uint8Array([255&n,n>>8&255,n>>16&255,n>>>24&255,255&i,i>>8&255,i>>16&255,i>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255])});t.calculateMD5=q;var ee=(d.prototype={and:function(e){this.high&=e.high,this.low&=e.low},xor:function(e){this.high^=e.high,this.low^=e.low},or:function(e){this.high|=e.high,this.low|=e.low},shiftRight:function(e){32<=e?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)},shiftLeft:function(e){32<=e?(this.high=this.low<>>32-e,this.low=this.low<>>e|r<<32-e,this.high=r>>>e|t<<32-e},not:function(){this.high=~this.high,this.low=~this.low},add:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);4294967295>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low},assign:function(e){this.high=e.high,this.low=e.low}},d);function d(e,t){this.high=0|e,this.low=0|t}var M,p=(M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],function(e,t,r){for(var a,n=1779033703,i=3144134277,o=1013904242,s=2773480762,c=1359893119,l=2600822924,u=528734635,h=1541459225,f=64*Math.ceil((r+9)/64),d=new Uint8Array(f),p=0;p>>29&255,d[p++]=r>>21&255,d[p++]=r>>13&255,d[p++]=r>>5&255,d[p++]=r<<3&255;var g,m,v,b,y,w,k,S,x=new Uint32Array(64);for(p=0;p>>10)+x[B-7]+(L(k=x[B-15],7)^L(k,18)^k>>>3)+x[B-16];for(var C,A,I=n,T=i,O=o,E=s,P=c,F=l,R=u,_=h,B=0;B<64;++B)C=_+(L(w=P,6)^L(w,11)^L(w,25))+((y=P)&F^~y&R)+M[B]+x[B],A=(L(b=I,2)^L(b,13)^L(b,22))+((g=I)&(m=T)^g&(v=O)^m&v),_=R,R=F,F=P,P=E+C|0,E=O,O=T,T=I,I=C+A|0;n=n+I|0,i=i+T|0,o=o+O|0,s=s+E|0,c=c+P|0,l=l+F|0,u=u+R|0,h=h+_|0}return new Uint8Array([n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,u>>24&255,u>>16&255,u>>8&255,255&u,h>>24&255,h>>16&255,h>>8&255,255&h])});function L(e,t){return e>>>t|e<<32-t}t.calculateSHA256=p;var te,g=(te=[new ee(1116352408,3609767458),new ee(1899447441,602891725),new ee(3049323471,3964484399),new ee(3921009573,2173295548),new ee(961987163,4081628472),new ee(1508970993,3053834265),new ee(2453635748,2937671579),new ee(2870763221,3664609560),new ee(3624381080,2734883394),new ee(310598401,1164996542),new ee(607225278,1323610764),new ee(1426881987,3590304994),new ee(1925078388,4068182383),new ee(2162078206,991336113),new ee(2614888103,633803317),new ee(3248222580,3479774868),new ee(3835390401,2666613458),new ee(4022224774,944711139),new ee(264347078,2341262773),new ee(604807628,2007800933),new ee(770255983,1495990901),new ee(1249150122,1856431235),new ee(1555081692,3175218132),new ee(1996064986,2198950837),new ee(2554220882,3999719339),new ee(2821834349,766784016),new ee(2952996808,2566594879),new ee(3210313671,3203337956),new ee(3336571891,1034457026),new ee(3584528711,2466948901),new ee(113926993,3758326383),new ee(338241895,168717936),new ee(666307205,1188179964),new ee(773529912,1546045734),new ee(1294757372,1522805485),new ee(1396182291,2643833823),new ee(1695183700,2343527390),new ee(1986661051,1014477480),new ee(2177026350,1206759142),new ee(2456956037,344077627),new ee(2730485921,1290863460),new ee(2820302411,3158454273),new ee(3259730800,3505952657),new ee(3345764771,106217008),new ee(3516065817,3606008344),new ee(3600352804,1432725776),new ee(4094571909,1467031594),new ee(275423344,851169720),new ee(430227734,3100823752),new ee(506948616,1363258195),new ee(659060556,3750685593),new ee(883997877,3785050280),new ee(958139571,3318307427),new ee(1322822218,3812723403),new ee(1537002063,2003034995),new ee(1747873779,3602036899),new ee(1955562222,1575990012),new ee(2024104815,1125592928),new ee(2227730452,2716904306),new ee(2361852424,442776044),new ee(2428436474,593698344),new ee(2756734187,3733110249),new ee(3204031479,2999351573),new ee(3329325298,3815920427),new ee(3391569614,3928383900),new ee(3515267271,566280711),new ee(3940187606,3454069534),new ee(4118630271,4000239992),new ee(116418474,1914138554),new ee(174292421,2731055270),new ee(289380356,3203993006),new ee(460393269,320620315),new ee(685471733,587496836),new ee(852142971,1086792851),new ee(1017036298,365543100),new ee(1126000580,2618297676),new ee(1288033470,3409855158),new ee(1501505948,4234509866),new ee(1607167915,987167468),new ee(1816402316,1246189591)],function(e,t,r,a){for(var n,i,o,s,c,l,u,h,f,d=(a=!!a)?(n=new ee(3418070365,3238371032),i=new ee(1654270250,914150663),o=new ee(2438529370,812702999),s=new ee(355462360,4144912697),c=new ee(1731405415,4290775857),l=new ee(2394180231,1750603025),u=new ee(3675008525,1694076839),new ee(1203062813,3204075428)):(n=new ee(1779033703,4089235720),i=new ee(3144134277,2227873595),o=new ee(1013904242,4271175723),s=new ee(2773480762,1595750129),c=new ee(1359893119,2917565137),l=new ee(2600822924,725511199),u=new ee(528734635,4215389547),new ee(1541459225,327033209)),p=128*Math.ceil((r+17)/128),g=new Uint8Array(p),m=0;m>>29&255,g[m++]=r>>21&255,g[m++]=r>>13&255,g[m++]=r>>5&255,g[m++]=r<<3&255;var v=new Array(80);for(m=0;m<80;m++)v[m]=new ee(0,0);var b,y,w,k,S,x,C,A,I,T,O,E,P,F,R,_,B,M,L,D,N,U,j,q,z=new ee(0,0),G=new ee(0,0),H=new ee(0,0),W=new ee(0,0),X=new ee(0,0),V=new ee(0,0),Y=new ee(0,0),K=new ee(0,0),J=new ee(0,0),Z=new ee(0,0),Q=new ee(0,0),$=new ee(0,0);for(m=0;m>>8^d<<24^p>>>16^p<<16^g>>>24^g<<8;n[h]=m>>>24&255,n[h+1]=m>>16&255,n[h+2]=m>>8&255,n[h+3]=255&m}}m=n[13],n[13]=n[9],n[9]=n[5],n[5]=n[1],n[1]=m,m=n[14],r=n[10],n[14]=n[6],n[10]=n[2],n[6]=m,n[2]=r,m=n[15],r=n[11],a=n[7],n[15]=n[3],n[11]=m,n[7]=r,n[3]=a;for(var v=0;v<16;++v)n[v]=this._inv_s[n[v]],n[v]^=t[v];return n}},{key:"_encrypt",value:function(e,t){var r,a,n=this._s,i=new Uint8Array(16);i.set(e);for(var o=0;o<16;++o)i[o]^=t[o];for(var s=1;si-32;){for(var o=e.length+a.length+r.length,s=new Uint8Array(64*o),c=I(e,a),c=I(c,r),l=0,u=0;l<64;l++,u+=o)s.set(c,u);for(var n=new w(a.subarray(0,16)).encrypt(s,a.subarray(16,32)),h=0,f=0;f<16;f++)h*=1,h%=3,h+=(n[f]>>>0)%3,h%=3;0===h?a=p(n,0,n.length):1===h?a=m(n,0,n.length):2===h&&(a=g(n,0,n.length)),i++}return a.subarray(0,32)}function O(){}function E(e,t){if(e.length!==t.length)return!1;for(var r=0;r>8&255,u[h++]=n>>16&255,u[h++]=n>>>24&255,b=0,c=e.length;b>3;if(3<=i)for(b=0;b<50;++b)f=q(f,0,d);var p,g=f.subarray(0,d);if(3<=i){for(h=0;h<32;++h)u[h]=H[h];for(b=0,c=e.length;b>3;if(3<=r)for(f=0;f<50;++f)c=q(c,0,c.length);if(3<=r){s=t;for(var u,h=new Uint8Array(l),f=19;0<=f;f--){for(u=0;u>8&255,n[i++]=e>>16&255,n[i++]=255&t,n[i++]=t>>8&255,a&&(n[i++]=115,n[i++]=65,n[i++]=108,n[i++]=84),q(n,0,i).subarray(0,Math.min(r.length+5,16))}function D(e,t,r,a,n){if(!(0,U.isName)(t))throw new N.FormatError("Invalid crypt filter name.");var i,o=e.get(t.name);if(null!=o&&(i=o.get("CFM")),!i||"None"===i.name)return function(){return new v};if("V2"===i.name)return function(){return new j(B(r,a,n,!1))};if("AESV2"===i.name)return function(){return new w(B(r,a,n,!0))};if("AESV3"===i.name)return function(){return new k(n)};throw new N.FormatError("Unknown crypto method")}t.CipherTransformFactory=R},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var y=r(5),w=r(198);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(i){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t,r,a,n=c(i);return t=o?(e=c(this).constructor,Reflect.construct(n,arguments,e)):n.apply(this,arguments),r=this,!(a=t)||"object"!==s(a)&&"function"!=typeof a?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(r):a}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;ra.amax||a.bmin>a.bmax)&&((0,y.info)("Invalid Range, falling back to defaults"),a.amin=-100,a.amax=100,a.bmin=-100,a.bmax=100),a}return u(i,[{key:"getRgbItem",value:function(e,t,r,a){j(this,e,t,!1,r,a)}},{key:"getRgbBuffer",value:function(e,t,r,a,n,i,o){for(var s=(1<e.amax?s=e.amax:se.bmax?c=e.bmax:c=a.MAX_IMAGES_TO_CACHE)}},{key:"addPageIndex",value:function(e,t){var r=this._refCache.get(e);r||(r=new Set,this._refCache.put(e,r)),r.add(t)}},{key:"getData",value:function(e,t){if(!this._refCache.has(e))return null;var r=this._refCache.get(e);return!(r.size=a.MAX_IMAGES_TO_CACHE?(0,n.info)("GlobalImageCache.setData - ignoring image above MAX_IMAGES_TO_CACHE."):this._imageCache.put(e,t))}},{key:"clear",value:function(e){0=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],a=!0,n=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){n=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(n)throw i}}return r}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);rt[2]||lt[3])return null;a[n].push({x:c,y:l})}}return a}t.AnnotationFactory=C;var I=function(){function r(e){k(this,r);var t=e.dict;this.setContents(t.get("Contents")),this.setModificationDate(t.get("M")),this.setFlags(t.get("F")),this.setRectangle(t.getArray("Rect")),this.setColor(t.getArray("C")),this.setBorderStyle(t),this.setAppearance(t),this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,contents:this.contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype}}return x(r,[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,u.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,u.AnnotationFlag.HIDDEN)&&!this._hasFlag(e,u.AnnotationFlag.NOVIEW)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,u.AnnotationFlag.PRINT)&&!this._hasFlag(e,u.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,u.AnnotationFlag.HIDDEN)}},{key:"setContents",value:function(e){this.contents=(0,u.stringToPDFString)(e||"")}},{key:"setModificationDate",value:function(e){this.modificationDate=(0,u.isString)(e)?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&0=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r>3,b=r.getBytes(v*m,!0),y=c.getArray("Decode","D"),(d=F.PDFImage.createMask({imgArray:b,width:g,height:m,imageIsFromDecodeStream:r instanceof P.DecodeStream,inverseDecode:!!y&&0F.fakeMultiSpaceMax)||(F.height+=f)):(f=(h=-h)*S.textHScale,S.translateTextMatrix(f,0),(d=F.textRunBreakAllowed&&h>F.fakeMultiSpaceMax)||(F.width+=f)),d?q():0=O.desiredSize){n=!0;break}}n?e(H):(q(),z(),r())}).catch(function(e){if(!(e instanceof W.AbortException)){if(t.options.ignoreErrors)return(0,W.warn)('getTextContent - ignoring errors during "'.concat(x.name,'" ')+'task: "'.concat(e,'".')),q(),void z();throw e}})},extractDataStructures:function(e,t,r){var a,n,i,o=this,s=this.xref,c=e.get("ToUnicode")||t.get("ToUnicode"),l=c?this.readToUnicode(c):Promise.resolve(void 0);r.composite&&(n=e.get("CIDSystemInfo"),(0,X.isDict)(n)&&(r.cidSystemInfo={registry:(0,W.stringToPDFString)(n.get("Registry")),ordering:(0,W.stringToPDFString)(n.get("Ordering")),supplement:n.get("Supplement")}),i=e.get("CIDToGIDMap"),(0,X.isStream)(i)&&(a=i.getBytes()));var u,h,f,d=[],p=null;if(e.has("Encoding")){if(f=e.get("Encoding"),(0,X.isDict)(f)){if(p=f.get("BaseEncoding"),p=(0,X.isName)(p)?p.name:null,f.has("Differences"))for(var g=f.get("Differences"),m=0,v=0,b=g.length;v>1;0==i&&!t.has(o)||(r[o]=i)}return r},extractWidths:function(e,t,r){var a,n,i,o,s,c=this.xref,l=[],u=0,h=[];if(r.composite){if(u=e.has("DW")?e.get("DW"):1e3,v=e.get("W"))for(a=0,n=v.length;a=W.OPS.moveTo&&i<=W.OPS.endPath&&20<++this._numInvalidPathOPS)throw new W.FormatError("Invalid ".concat(l));(0,W.warn)("Skipping ".concat(l)),null!==t&&(t.length=0);continue}}return this.preprocessCommand(i,t),e.fn=i,e.args=t,!0}if(r===X.EOF)return!1;if(null!==r&&(null===t&&(t=[]),t.push(r),33>>0;for(var s=n[i],c=0,l=s.length;c=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new h.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t},readSigned:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1},readHex:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1},readHexNumber:function(e,t){var r,a=this.tmpBuf,n=0;do{var i=this.readByte();if(i<0)throw new h.FormatError("unexpected EOF in bcmap");r=!(128&i),a[n++]=127&i}while(!r);for(var o=t,s=0,c=0;0<=o;){for(;c<8&&0>=8,c-=8}},readHexSigned:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,a=0,n=0;n<=t;n++)a=(1&a)<<8|e[n],e[n]=a>>1^r},readString:function(){for(var e=this.readNumber(),t="",r=0;r>5;if(7!=f){var d=!!(16&i),p=15&i;if(16<1+p)throw new Error("processBinaryCMap: Invalid dataSize.");var g,m=r.readNumber();switch(f){case 0:for(r.readHex(s,p),r.readHexNumber(c,p),I(c,s,p),b.addCodespaceRange(1+p,C(s,p),C(c,p)),g=1;g>>0}function A(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function I(e,t,r){for(var a=0,n=r;0<=n;n--)a+=e[n]+t[n],e[n]=255&a,a>>=8}function T(e,t){for(var r=1,a=t;0<=a&&0>=8}function O(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(S)}function E(){}var P={create:function(o){return s=c.default.mark(function e(){var t,r,a,n,i;return c.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.encoding,r=o.fetchBuiltInCMap,a=o.useCMap,(0,f.isName)(t))return e.abrupt("return",L(t.name,r));e.next=7;break;case 7:if((0,f.isStream)(t))return n=new w,i=new l.Lexer(t),e.abrupt("return",B(n,i,r,a).then(function(e){return e.isIdentityCMap?L(e.name,r):e}));e.next=11;break;case 11:throw new Error("Encoding required.");case 12:case"end":return e.stop()}},e)}),function(){var e=this,o=arguments;return new Promise(function(t,r){var a=s.apply(e,o);function n(e){u(a,t,r,n,i,"next",e)}function i(e){u(a,t,r,n,i,"throw",e)}n(void 0)})}();var s}};function F(e){for(var t=0,r=0;r>>0}function R(e){if(!(0,h.isString)(e))throw new h.FormatError("Malformed CMap: expected string.")}function _(e){if(!Number.isInteger(e))throw new h.FormatError("Malformed CMap: expected int.")}function B(e,t,r,a){var n,i,o,s,c,l;e:for(;;)try{var u=t.getObj();if((0,f.isEOF)(u))break;if((0,f.isName)(u))"WMode"===u.name?(c=e,l=void 0,l=t.getObj(),Number.isInteger(l)&&(c.vertical=!!l)):"CMapName"===u.name&&(o=e,s=t.getObj(),(0,f.isName)(s)&&(0,h.isString)(s.name)&&(o.name=s.name)),n=u;else if((0,f.isCmd)(u))switch(u.cmd){case"endcmap":break e;case"usecmap":(0,f.isName)(n)&&(i=n.name);break;case"begincodespacerange":!function(e,t){for(;;){var r=t.getObj();if((0,f.isEOF)(r))break;if((0,f.isCmd)(r,"endcodespacerange"))return;if(!(0,h.isString)(r))break;var a=F(r),r=t.getObj();if(!(0,h.isString)(r))break;var n=F(r);e.addCodespaceRange(r.length,a,n)}throw new h.FormatError("Invalid codespace range.")}(e,t);break;case"beginbfchar":!function(e,t){for(;;){var r=t.getObj();if((0,f.isEOF)(r))break;if((0,f.isCmd)(r,"endbfchar"))return;R(r);var a=F(r);R(r=t.getObj()),e.mapOne(a,r)}}(e,t);break;case"begincidchar":!function(e,t){for(;;){var r=t.getObj();if((0,f.isEOF)(r))break;if((0,f.isCmd)(r,"endcidchar"))return;R(r);var a=F(r);_(r=t.getObj()),e.mapOne(a,r)}}(e,t);break;case"beginbfrange":!function(e,t){for(;;){var r=t.getObj();if((0,f.isEOF)(r))break;if((0,f.isCmd)(r,"endbfrange"))return;R(r);var a=F(r);R(r=t.getObj());var n=F(r);if(r=t.getObj(),Number.isInteger(r)||(0,h.isString)(r)){var i=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(a,n,i)}else{if(!(0,f.isCmd)(r,"["))break;r=t.getObj();for(var o=[];!(0,f.isCmd)(r,"]")&&!(0,f.isEOF)(r);)o.push(r),r=t.getObj();e.mapBfRangeToArray(a,n,o)}}throw new h.FormatError("Invalid bf range.")}(e,t);break;case"begincidrange":!function(e,t){for(;;){var r=t.getObj();if((0,f.isEOF)(r))break;if((0,f.isCmd)(r,"endcidrange"))return;R(r);var a=F(r);R(r=t.getObj());var n=F(r);_(r=t.getObj()),e.mapCidRange(a,n,r)}}(e,t)}}catch(e){if(e instanceof d.MissingDataException)throw e;(0,h.warn)("Invalid cMap data: "+e);continue}return!a&&i&&(a=i),a?M(e,r,a):Promise.resolve(e)}function M(a,e,t){return L(t,e).then(function(e){if(a.useCMap=e,0===a.numCodespaceRanges){for(var t=a.useCMap.codespaceRanges,r=0;re.length)&&(t=e.length);for(var r=0,a=new Array(t);r=this.firstChar&&e<=this.lastChar?e:-1},amend:function(){(0,pe.unreachable)("Should not call amend()")}},d);function d(e,t){this.firstChar=e,this.lastChar=t}t.IdentityToUnicodeMap=E;var m,xe=function(){function p(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function g(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function m(e){this.sfnt=e,this.tables=Object.create(null)}m.getSearchParams=function(e,t){for(var r=1,a=0;r<(r^e);)r<<=1,a++;var n=r*t;return{range:n,entry:a,rangeShift:t*e-n}};return m.prototype={toArray:function(){var e=this.sfnt,t=this.tables,r=Object.keys(t);r.sort();for(var a,n,i=r.length,o=12+16*i,s=[o],c=0;c>>0,s.push(o)}var l=new Uint8Array(o);for(c=0;c>>0;g(l,o+4,h),g(l,o+8,s[c]),g(l,o+12,t[n].length),o+=16}return l},addTable:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}},m}(),b=(S.getFontID=(m=1,function(){return String(m++)}),S.prototype={name:null,font:null,mimetype:null,disableFontFace:!1,get renderer(){var e=a.FontRendererFactory.create(this,!0);return(0,pe.shadow)(this,"renderer",e)},exportData:function(e){var t,r,a,n=0=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(n);try{for(o.s();!(a=o.n()).done;)void 0!==(r=this[t=a.value])&&(i[t]=r)}catch(e){o.e(e)}finally{o.f()}return i},fallbackToSystemFont:function(){var n=this;this.missingFile=!0;var e=this.name,t=this.type,r=this.subtype,a=e.replace(/[,_]/g,"-").replace(/\s/g,""),i=(0,y.getStdFontMap)(),o=(0,y.getNonStdFontMap)(),s=!!i[a]||!(!o[a]||!i[o[a]]),a=i[a]||o[a]||a;if(this.bold=-1!==a.search(/bold/gi),this.italic=-1!==a.search(/oblique/gi)||-1!==a.search(/italic/gi),this.black=-1!==e.search(/Black/g),this.remeasure=0>>0,a=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.pos;e.pos=e.start?e.start:0,e.skip(a);var o=e.getBytes(n);return e.pos=i,"head"===t&&(o[8]=o[9]=o[10]=o[11]=0,o[17]|=32),{tag:t,checksum:r,length:n,offset:a,data:o}}(e);i.includes(n.tag)&&0!==n.length&&(r[n.tag]=n)}return r}function g(e){return{version:(0,pe.bytesToString)(e.getBytes(4)),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function m(e){var t=(v.start?v.start:0)+e.offset;v.pos=t;var r=[[],[]],a=e.length,n=t+a;if(0!==v.getUint16()||a<6)return r;for(var i,o=v.getUint16(),s=v.getUint16(),c=[],l=0;ln)){v.pos=f;var d=h.name;if(h.encoding){for(var p="",g=0,m=h.length;gs.length&&x.push(new Uint8Array(c-s.length)),l>>0,i=[],o=0;o>>0);var s={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:n,offsetTable:i};switch(r){case 1:return s;case 2:return s.dsigTag=e.getInt32()>>>0,s.dsigLength=e.getInt32()>>>0,s.dsigOffset=e.getInt32()>>>0,s}throw new pe.FormatError("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),a=r.numFonts,n=r.offsetTable,i=0;i>8,n.maxp.data[5]=255&h;var y,w,k,S,x,A,I,T,O,E,P,F,R,_,B=(y=n.fpgm,w=n.prep,k=n["cvt "],S=d,A={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0},y&&o(y,A),w&&o(w,A),y&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,pe.warn)("TT: more functions defined than expected"),e.hintsValid=!1;for(var r=0,a=e.functionsUsed.length;r>8,T.data[35]=255&F),0<(R=E-F-(O.length-4*F>>1))&&((_=new Uint8Array(O.length+2*R)).set(O.data),P&&(_[O.length]=O.data[2],_[O.length+1]=O.data[3]),O.data=_)):O&&(O.data=null),!n.head)throw new pe.FormatError('Required "head" table is not found');!function(e,t,r){var a=e.data,n=(a[0]<<24)+(a[1]<<16)+(a[2]<<8)+a[3];n>>16!=1&&((0,pe.info)("Attempting to fix invalid version in head table: "+n),a[0]=0,a[1]=1,a[2]=0,a[3]=0);var i=Ce(a[50],a[51]);if(i<0||1>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(s=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255}),u=i?r+1:r,h=s*(1+u),f=new Uint8Array(h);f.set(e.data.subarray(0,h)),e.data=f;var d,p=t.data,g=p.length,m=new Uint8Array(g),v=c(f,0),b=0,y=Object.create(null);for(l(f,0,b),C=0,A=s;C>>8,a.set(u,n),o.length=u.length,o;for(var f=10,d=0,p=0;pu.length||(!i&&0o&&(o=k.sizeOfInstructions),l(f,A,b+=S),v=w}if(0===b){for(var x=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]),C=0,A=s;Cd+b?t.data=m.subarray(0,d+b):(t.data=new Uint8Array(d+b),t.data.set(m.subarray(0,b))),t.data.set(m.subarray(0,d),b),l(e.data,f.length-s,b+d)):t.data=m.subarray(0,b);return{missingGlyphs:y,maxSizeOfInstructions:o}}(n.loca,n.glyf,u,M,B,f,b),D=L.missingGlyphs,65536<=l&&22<=n.maxp.length&&(n.maxp.data[26]=L.maxSizeOfInstructions>>8,n.maxp.data[27]=255&L.maxSizeOfInstructions)),!n.hhea)throw new pe.FormatError('Required "hhea" table is not found');0===n.hhea.data[10]&&0===n.hhea.data[11]&&(n.hhea.data[10]=255,n.hhea.data[11]=255);var N={unitsPerEm:Ce(n.head.data[18],n.head.data[19]),yMax:Ce(n.head.data[42],n.head.data[43]),yMin:Ae(n.head.data[38],n.head.data[39]),ascent:Ce(n.hhea.data[4],n.hhea.data[5]),descent:Ae(n.hhea.data[6],n.hhea.data[7])};this.ascent=N.ascent/N.unitsPerEm,this.descent=N.descent/N.unitsPerEm,n.post&&function(e,t,r){var a,n=(v.start?v.start:0)+e.offset,i=(v.pos=n)+e.length,o=v.getInt32();v.skip(28);var s=!0;switch(o){case 65536:a=we;break;case 131072:var c=v.getUint16();if(c!==r){s=!1;break}for(var l=[],u=0;u>>0,d=!1;if((!o||o.platformId!==u||o.encodingId!==h)&&(0===u&&0===h||1===u&&0===h?d=!0:3!==u||1!==h||!a&&o?r&&3===u&&0===h&&(c=d=!0):(d=!0,r||(c=!0)),d&&(o={platformId:u,encodingId:h,offset:f}),c))break}if(o&&(t.pos=i+o.offset),!o||-1===t.peekByte())return(0,pe.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p=t.getUint16();t.skip(4);var g,m=!1,v=[];if(0===p){for(O=0;O<256;O++){var b=t.getByte();b&&v.push({charCode:O,glyphId:b})}m=!0}else if(4===p){var y=t.getUint16()>>1;t.skip(6);for(var w=[],k=0;k>1)-(y-k),n.offsetIndex=T,S=Math.max(S,T+n.end-n.start+1)):n.offsetIndex=-1}var C=[];for(O=0;O>8&255,255&e)}function F(e){return 32767>8&255,255&e)}function Ie(e){var t=e.peekBytes(4);return"ttcf"===(0,pe.bytesToString)(t)}function x(e,t,r){for(var a,n=[],i=0,o=e.length;i=t||r.push({fontCharCode:0|a,glyphId:e[a]});0===r.length&&r.push({fontCharCode:0,glyphId:0}),r.sort(function(e,t){return e.fontCharCode-t.fontCharCode});for(var n=[],i=r.length,o=0;o 123 are reserved for internal usage");o|=1<=this.numGlyphs)&&(0===e||0>4,i=15&a;if(15==n)break;if(e+=t[n],15==i)break;e+=t[i]}return parseFloat(e)}():28===e?e=((e=o[s++])<<24|o[s++]<<16)>>16:29===e?e=(e=(e=(e=o[s++])<<8|o[s++])<<8|o[s++])<<8|o[s++]:32<=e&&e<=246?e-139:247<=e&&e<=250?256*(e-247)+o[s++]+108:251<=e&&e<=254?-256*(e-251)-o[s++]-108:((0,k.warn)('CFFParser_parseDict: "'+e+'" is a reserved command.'),NaN)}for(var t=[],r=[],s=0,a=o.length;s>16,s+=2,n++;else if(14===c){if(4<=n&&(n-=4,this.seacAnalysisEnabled))return e.seac=i.slice(n,n+4),!1;l=p[c]}else if(32<=c&&c<=246)i[n]=c-139,n++;else if(247<=c&&c<=254)i[n]=c<251?(c-247<<8)+t[s]+108:-(c-251<<8)-t[s]-108,s++,n++;else if(255===c)i[n]=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])/65536,s+=4,n++;else if(19===c||20===c)e.hints+=n>>1,s+=e.hints+7>>3,n%=2,l=p[c];else{if(10===c||29===c){var h=10===c?r:a;if(!h)return l=p[c],(0,k.warn)("Missing subrsIndex for "+l.id),!1;var f=32768;h.count<1240?f=107:h.count<33900&&(f=1131);var d=i[--n]+f;if(d<0||d>=h.count||isNaN(d))return l=p[c],(0,k.warn)("Out of bounds subrIndex for "+l.id),!1;if(e.stackSize=n,e.callDepth++,!this.parseCharString(e,h.get(d),r,a))return!1;e.callDepth--,n=e.stackSize;continue}if(11===c)return e.stackSize=n,!0;l=p[c]}if(l){if(l.stem&&(e.hints+=n>>1,3===c||23===c?e.hasVStems=!0:!e.hasVStems||1!==c&&18!==c||((0,k.warn)("CFF stem hints are in wrong order"),t[s-1]=1===c?3:23)),"min"in l&&!e.undefStack&&n=i.length&&((0,k.warn)("Invalid fd index for glyph index."),m=!1),m&&(v=(b=i[h].privateDict).subrsIndex)):r&&(v=r),m=m&&this.parseCharString(g,p,v,a),null!==g.width?(f=b.getByName("nominalWidthX"),c[u]=f+g.width):(d=b.getByName("defaultWidthX"),c[u]=d),null!==g.seac&&(s[u]=g.seac),m||t.set(u,new Uint8Array([14]))}return{charStrings:t,seacs:s,widths:c}},emptyPrivateDictionary:function(e){var t=this.createDict(I,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t},parsePrivateDict:function(e){var t,r,a,n,i,o,s,c,l,u;e.hasName("Private")?(t=e.getByName("Private"),Array.isArray(t)&&2===t.length?(r=t[0],a=t[1],0===r||a>=this.bytes.length?this.emptyPrivateDictionary(e):(n=a+r,i=this.bytes.subarray(a,n),o=this.parseDict(i),s=this.createDict(I,o,e.strings),(e.privateDict=s).getByName("Subrs")&&(l=a+(c=s.getByName("Subrs")),0===c||l>=this.bytes.length?this.emptyPrivateDictionary(e):(u=this.parseIndex(l),s.subrsIndex=u.obj)))):e.removeByName("Private")):this.emptyPrivateDictionary(e)},parseCharsets:function(e,t,r,a){if(0===e)return new E(!0,O.ISO_ADOBE,f.ISOAdobeCharset);if(1===e)return new E(!0,O.EXPERT,f.ExpertCharset);if(2===e)return new E(!0,O.EXPERT_SUBSET,f.ExpertSubsetCharset);var n,i,o,s=this.bytes,c=e,l=s[e++],u=[a?0:".notdef"];switch(--t,l){case 0:for(o=0;o=this.charStrings.count)&&0=this.fdSelect.length?-1:this.fdSelect[e]}},R);function R(e,t){this.format=e,this.fdSelect=t}t.CFFFDSelect=F;var _=(B.prototype={isTracking:function(e){return e in this.offsets},track:function(e,t){if(e in this.offsets)throw new k.FormatError("Already tracking location of ".concat(e));this.offsets[e]=t},offset:function(e){for(var t in this.offsets)this.offsets[t]+=e},setEntryLocation:function(e,t,r){if(!(e in this.offsets))throw new k.FormatError("Not tracking location of ".concat(e));for(var a=r.data,n=this.offsets[e],i=0,o=t.length;i>24&255,a[l]=f>>16&255,a[u]=f>>8&255,a[h]=255&f}}},B);function B(){this.offsets=Object.create(null)}var M=(L.prototype={compile:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var a=this.compileNameIndex(e.names);if(t.add(a),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var i=0,o=e.fdArray.length;i>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e];return t},compileHeader:function(e){return[e.major,e.minor,e.hdrSize,e.offSize]},compileNameIndex:function(e){for(var t=new m,r=0,a=e.length;r"===c||"/"===c||"%"===c)&&(c="_"),o[s]=c}""===(o=o.join(""))&&(o="Bad_Font_Name"),t.add((0,k.stringToBytes)(o))}return this.compileIndex(t)},compileTopDicts:function(e,t,r){for(var a=[],n=new m,i=0,o=e.length;i>8&255,255&n]);else for(var i,o=(i=new Uint8Array(1+2*n))[0]=0,s=e.charset.length,c=!1,l=1;l>8&255,i[l+1]=255&h}return this.compileTypedArray(i)},compileEncoding:function(e){return this.compileTypedArray(e.raw)},compileFDSelect:function(e){var t,r=e.format;switch(r){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=r,i=0;i>8&255,255&i,o),a=o)}var s=(n.length-3)/3;n[1]=s>>8&255,n[2]=255&s,n.push(i>>8&255,255&i),t=new Uint8Array(n)}return this.compileTypedArray(t)},compileTypedArray:function(e){for(var t=[],r=0,a=e.length;r>8&255,255&a],o=1,s=0;s>8&255,255&c):3===n?i.push(c>>16&255,c>>8&255,255&c):i.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[s]&&(c+=r[s].length);for(s=0;s=r.begin&&t=(r=o[11]).begin&&t=a.begin&&e>16,h=0,f=0;if(O+=10,u<0)do{i=t[O]<<8|t[O+1];var d,p,g=t[O+2]<<8|t[O+3];O+=4,1&i?(d=(t[O]<<24|t[O+1]<<16)>>16,p=(t[O+2]<<24|t[O+3]<<16)>>16,O+=4):(d=t[O++],p=t[O++]),f=2&i?(h=d,p):h=0;var m=1,v=1,b=0,y=0;8&i?(m=v=(t[O]<<24|t[O+1]<<16)/1073741824,O+=2):64&i?(m=(t[O]<<24|t[O+1]<<16)/1073741824,v=(t[O+2]<<24|t[O+3]<<16)/1073741824,O+=4):128&i&&(m=(t[O]<<24|t[O+1]<<16)/1073741824,b=(t[O+2]<<24|t[O+3]<<16)/1073741824,y=(t[O+4]<<24|t[O+5]<<16)/1073741824,v=(t[O+6]<<24|t[O+7]<<16)/1073741824,O+=8);var w=r.glyphs[g];w&&(n.push({cmd:"save"}),n.push({cmd:"transform",args:[m,b,y,v,h,f]}),e(w,n,r),n.push({cmd:"restore"}))}while(32&i);else{for(var k,S=[],x=0;x>16,O+=2;break;case 2:h-=t[O++];break;case 18:h+=t[O++]}A[x].x=h}for(x=0;x>16,O+=2;break;case 4:f-=t[O++];break;case 36:f+=t[O++]}A[x].y=f}for(var T=0,O=0;O>1,i=t+r+14,o=[],s=0;s>1;r>1,c=!0;break;case 4:E+=T.pop(),C(O,E),c=!0;break;case 5:for(;0Math.abs(E-m)?O+=T.shift():E+=T.shift(),I(v,b,y,w,O,E);break;default:throw new F.FormatError("unknown operator: 12 ".concat(l))}break;case 14:return void(4<=T.length&&(i=T.pop(),o=T.pop(),E=T.pop(),O=T.pop(),k.push({cmd:"save"}),k.push({cmd:"translate",args:[O,E]}),s=B(S.cmap,String.fromCharCode(S.glyphNameMap[R.StandardEncoding[i]])),M(S.glyphs[s.glyphId],k,S,s.glyphId),k.push({cmd:"restore"}),s=B(S.cmap,String.fromCharCode(S.glyphNameMap[R.StandardEncoding[o]])),M(S.glyphs[s.glyphId],k,S,s.glyphId)));case 18:P+=T.length>>1,c=!0;break;case 19:case 20:r+=(P+=T.length>>1)+7>>3,c=!0;break;case 21:E+=T.pop(),C(O+=T.pop(),E),c=!0;break;case 22:C(O+=T.pop(),E),c=!0;break;case 23:P+=T.length>>1,c=!0;break;case 24:for(;2>16),r+=2;break;case 29:d=T.pop()+S.gsubrsBias,(p=S.gsubrs[d])&&e(p);break;case 30:for(;0>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return this.output.push.apply(this.output,t),r?this.stack.splice(n,e):this.stack.length=0,!1}},a);function a(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}var n=(l.prototype={readNumberArray:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e},readNumber:function(){var e=this.getToken();return parseFloat(e||0)},readInt:function(){var e=this.getToken();return 0|parseInt(e||0,10)},readBoolean:function(){return"true"===this.getToken()?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,i.isWhiteSpace)(t))break;t=this.nextChar()}if(c(t))return this.nextChar(),String.fromCharCode(t);for(var r="";r+=String.fromCharCode(t),0<=(t=this.nextChar())&&!(0,i.isWhiteSpace)(t)&&!c(t););return r},readCharStrings:function(e,t){return-1===t?e:s(e,4330,t)},extractFontProgram:function(e){var t=this.stream,r=[],a=[],n=Object.create(null);n.lenIV=4;for(var i,o,s,c,l,u,h={subrs:[],charstrings:[],properties:{privateData:n}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)"/"===i&&(l=this.getToken(),u=this.readInt(),this.getToken(),o=0=e.firstChar&&b<=e.lastChar&&(e.widths[b]=g.width)}return h},extractFontHeader:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var a,n=this.getToken();if(/^\d+$/.test(n)){a=[];var i=0|parseInt(n,10);this.getToken();for(var o=0;o=e.length)return new Uint8Array(0);for(var a,n=0|t,i=0;i>8,n=52845*(c+n)+22719&65535}return s}function c(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}function l(e,t,r){var a,n;t&&(n=!((h((a=e.getBytes())[0])||(0,i.isWhiteSpace)(a[0]))&&h(a[1])&&h(a[2])&&h(a[3])&&h(a[4])&&h(a[5])&&h(a[6])&&h(a[7])),e=new o.Stream((n?s:function(e,t,r){for(var a=0|t,n=e.length,i=new Uint8Array(n>>>1),o=0,s=0;o>8,a=52845*(l+a)+22719&65535)}}return i.slice(r,s)})(a,55665,4))),this.seacAnalysisEnabled=!!r,this.stream=e,this.nextChar()}t.Type1Parser=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTilingPatternIR=function(e,t,r){var a=t.getArray("Matrix"),n=N.Util.normalizeRect(t.getArray("BBox")),i=t.get("XStep"),o=t.get("YStep"),s=t.get("PaintType"),c=t.get("TilingType");if(n[2]-n[0]!=0&&n[3]-n[1]!=0)return["TilingPattern",r,e,a,n,i,o,s,c];throw new N.FormatError("Invalid getTilingPatternIR /BBox array: [".concat(n,"]."))},t.Pattern=void 0;var N=r(5),P=r(216),v=r(198),c=r(201),l=2,F=3,b=4,y=5,w=6,k=7,a=(n.prototype={getPattern:function(e){(0,N.unreachable)("Should not call Pattern.getStyle: ".concat(e))}},n.parseShading=function(e,t,r,a,n,i){var o=(0,v.isStream)(e)?e.dict:e,s=o.get("ShadingType");try{switch(s){case l:case F:return new R.RadialAxial(o,t,r,a,i);case b:case y:case w:case k:return new R.Mesh(e,t,r,a,i);default:throw new N.FormatError("Unsupported ShadingType: "+s)}}catch(e){if(e instanceof c.MissingDataException)throw e;return n.send("UnsupportedFeature",{featureId:N.UNSUPPORTED_FEATURES.shadingPattern}),(0,N.warn)(e),new R.Dummy}},n);function n(){(0,N.unreachable)("should not call Pattern constructor")}t.Pattern=a;var R={};function i(e,t,r,a,n){this.matrix=t,this.coordsArr=e.getArray("Coords"),this.shadingType=e.get("ShadingType"),this.type="Pattern";var i=e.get("ColorSpace","CS"),i=P.ColorSpace.parse(i,r,a,n);this.cs=i;var o=e.getArray("BBox");Array.isArray(o)&&4===o.length?this.bbox=N.Util.normalizeRect(o):this.bbox=null;var s,c=0,l=1;e.has("Domain")&&(c=(s=e.getArray("Domain"))[0],l=s[1]);var u,h,f,d,p,g,m,v,b=!1,y=!1;e.has("Extend")&&(b=(u=e.getArray("Extend"))[0],y=u[1]),this.shadingType!==F||b&&y||(h=this.coordsArr[0],f=this.coordsArr[1],d=this.coordsArr[2],p=this.coordsArr[3],g=this.coordsArr[4],d<=(m=this.coordsArr[5])+(v=Math.sqrt((h-p)*(h-p)+(f-g)*(f-g)))&&m<=d+v&&(0,N.warn)("Unsupported radial gradient.")),this.extendStart=b,this.extendEnd=y;var w=e.get("Function"),k=n.createFromArray(w),S=(l-c)/10,x=this.colorStops=[];if(l<=c||S<=0)(0,N.info)("Bad shading domain.");else{for(var C,A=new Float32Array(i.numComps),I=new Float32Array(1),T=0;T<=10;T++){I[0]=c+T*S,k(I,0,A,0),C=i.getRgb(A,0);var O=N.Util.makeCssRgb(C[0],C[1],C[2]);x.push([T/10,O])}var E="transparent";e.has("Background")&&(C=i.getRgb(e.get("Background"),0),E=N.Util.makeCssRgb(C[0],C[1],C[2])),b||(x.unshift([0,E]),x[1][0]+=R.SMALL_NUMBER),y||(x[x.length-1][0]-=R.SMALL_NUMBER,x.push([1,E])),this.colorStops=x}}function o(){this.type="Pattern"}R.SMALL_NUMBER=1e-6,R.RadialAxial=(i.prototype={getIR:function(){var e,t,r,a=this.coordsArr,n=this.shadingType;n===l?(o=[a[0],a[1]],s=[a[2],a[3]],r=t=null,e="axial"):n===F?(o=[a[0],a[1]],s=[a[3],a[4]],t=a[2],r=a[5],e="radial"):(0,N.unreachable)("getPattern type unknown: ".concat(n));var i,o,s,c=this.matrix;return c&&(o=N.Util.applyTransform(o,c),s=N.Util.applyTransform(s,c),n===F&&(t*=(i=N.Util.singularValueDecompose2dScale(c))[0],r*=i[1])),["RadialAxial",e,this.bbox,this.colorStops,o,s,t,r]}},i),R.Mesh=function(){function g(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;var r=t.numComps;this.tmpCompsBuf=new Float32Array(r);var a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}g.prototype={get hasData(){if(this.stream.end)return this.stream.pos>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var a=this.stream.getByte();return this.buffer=a&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),a=this.context.decode,n=e<32?1/((1<"!==C||(F[i]="")}return P(F.join(""),a)};var A=r(5),I=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],T=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function O(e){return 0!=(1&e)}function E(e,t,r){for(var a=t,n=r-1;a>c)*u,l&=(1<>1,g=a.length>>1,m=new h(n),v=Object.create(null),b=8192,y=new Float32Array(g);return function(e,t,r,a){var n,i="",o=y;for(h=0;h>a);break;case"ceiling":r=n.pop(),n.push(Math.ceil(r));break;case"copy":r=n.pop(),n.copy(r);break;case"cos":r=n.pop(),n.push(Math.cos(r));break;case"cvi":r=0|n.pop(),n.push(r);break;case"cvr":break;case"div":a=n.pop(),r=n.pop(),n.push(r/a);break;case"dup":n.copy(1);break;case"eq":a=n.pop(),r=n.pop(),n.push(r===a);break;case"exch":n.roll(2,1);break;case"exp":a=n.pop(),r=n.pop(),n.push(Math.pow(r,a));break;case"false":n.push(!1);break;case"floor":r=n.pop(),n.push(Math.floor(r));break;case"ge":a=n.pop(),r=n.pop(),n.push(a<=r);break;case"gt":a=n.pop(),r=n.pop(),n.push(a>1,p=o.length>>1,g=0,m=0;m=b?new A(b):v.max<=b?v:new T(v,b))),k+=6;break}if("literal"===(s=h[h.length-1]).type||"var"===s.type){h.push(s);break}l=new O(g++,s.min,s.max),h[h.length-1]=l,h.push(l),f.push(new E(l,s));break;case"roll":if(h.length<2)return null;if(i=h.pop(),n=h.pop(),"literal"!==i.type||"literal"!==n.type)return null;if(a=i.number,(r=n.number)<=0||!Number.isInteger(r)||!Number.isInteger(a)||h.lengthe.min&&(i.unshift("Math.max(",a,", "),i.push(")")),n>>8,t[r++]=255&i)}}else{if(!(0,m.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");r=(t=e).byteLength}for(var o=r>>2,s=r-4*o,c=new Uint32Array(t.buffer,0,o),l=0,u=0,h=this.h1,f=this.h2,d=3432918353,p=461845907,g=0;g>>17)*p&v|13715*l&b)<<13|h>>>19)+3864292196:f=5*(f=(f^=u=(u=(u=(u=c[g])*d&v|11601*u&b)<<15|u>>>17)*p&v|13715*u&b)<<13|f>>>19)+3864292196;switch(l=0,s){case 3:l^=t[4*o+2]<<16;case 2:l^=t[4*o+1]<<8;case 1:l=(l=(l=(l^=t[4*o])*d&v|11601*l&b)<<15|l>>>17)*p&v|13715*l&b,1&o?h^=l:f^=l}this.h1=h,this.h2=f}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2,e=3981806797*(e^=t>>>1)&v|36045*e&b;e=444984403*(e^=(t=4283543511*t&v|(2950163797*(t<<16|e>>>16)&v)>>>16)>>>1)&v|60499*e&b;var r=((e^=(t=3301882366*t&v|(3120437893*(t<<16|e>>>16)&v)>>>16)>>>1)>>>0).toString(16),a=(t>>>0).toString(16);return r.padStart(8,"0")+a.padStart(8,"0")}}])&&n(e.prototype,r),a&&n(e,a),t}();t.MurmurHash3_64=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var T=r(5),O=r(198),E=r(216),k=r(205),S=r(211),P=r(214),a=(F.buildImage=function(e){var t=e.xref,r=e.res,a=e.image,n=e.isInline,i=void 0!==n&&n,o=e.pdfFunctionFactory,s=a,c=null,l=null,u=a.dict.get("SMask"),h=a.dict.get("Mask");return u?c=u:h&&((0,O.isStream)(h)||Array.isArray(h)?l=h:(0,T.warn)("Unsupported mask format.")),Promise.resolve(new F({xref:t,res:r,image:s,isInline:i,smask:c,mask:l,pdfFunctionFactory:o}))},F.createMask=function(e){var t,r,a=e.imgArray,n=e.width,i=e.height,o=e.imageIsFromDecodeStream,s=e.inverseDecode,c=(n+7>>3)*i,l=a.byteLength;if(!o||s&&c!==l)if(s)for((t=new Uint8ClampedArray(c)).set(a),r=l;r>7&1,s[u+1]=m>>6&1,s[u+2]=m>>5&1,s[u+3]=m>>4&1,s[u+4]=m>>3&1,s[u+5]=m>>2&1,s[u+6]=m>>1&1,s[u+7]=1&m,u+=8;if(u>=1}else for(var g=0,m=0,u=0,v=i;u>b;y<0?y=0:ll[1+v]){d=255;break}}i[h]=d}}if(i)for(h=0,g=3,f=t*a;h>3;if(!n){if("DeviceGray"===this.colorSpace.name&&1===h?r=T.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==h||this.needsDecode||(r=T.ImageKind.RGB_24BPP),r&&!this.smask&&!this.mask&&i===l&&o===u){if(s.kind=r,t=this.getImageBytes(u*f),this.image instanceof k.DecodeStream?s.data=t:((a=new Uint8ClampedArray(t.length)).set(t),s.data=a),this.needsDecode){(0,T.assert)(r===T.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var d=s.data,p=0,g=d.length;p>3,s=this.getImageBytes(n*o),c=this.getComponents(s);if(1!==i){this.needsDecode&&this.decodeBuffer(c),r=a*n;for(var l=255/((1<