(function(e){var t={};function r(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(a,i,function(t){return e[t]}.bind(null,i));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="1a01")})({"1a01":function(e,t,r){(function(t,r,a){(function(t,r){e.exports=r()})(0,function(){return function(e){var t={};function r(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(a,i,function(t){return e[t]}.bind(null,i));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";var a=r(1);t.WorkerMessageHandler=a.WorkerMessageHandler},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageHandler=t.WorkerTask=void 0;var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){var r=[],a=!0,i=!1,n=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0)if(r.push(o.value),t&&r.length===t)break}catch(c){i=!0,n=c}finally{try{!a&&s["return"]&&s["return"]()}finally{if(i)throw n}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=r(2),o=r(130),s=r(5),c=h(s),l=r(172),u=r(138);function h(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(e){this.name=e,this.terminated=!1,this._capability=(0,n.createPromiseCapability)()}return e.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}},e}(),d=function(){function e(e){this._msgHandler=e,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}function t(e){var t=this;this._msgHandler=e,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;var r=this._msgHandler.sendWithStream("GetReader");this._reader=r.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(function(e){t._isStreamingSupported=e.isStreamingSupported,t._isRangeSupported=e.isRangeSupported,t._contentLength=e.contentLength})}function r(e,t,r){this._msgHandler=r,this.onProgress=null;var a=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=a.getReader()}return e.prototype={getFullReader:function(){return(0,n.assert)(!this._fullRequestReader),this._fullRequestReader=new t(this._msgHandler),this._fullRequestReader},getRangeReader:function(e,t){var a=new r(e,t,this._msgHandler);return this._rangeRequestReaders.push(a),a},cancelAllRequests:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t=this._rangeRequestReaders.slice(0);t.forEach(function(t){t.cancel(e)})}},t.prototype={get headersReady(){return this._headersReady},get contentLength(){return this._contentLength},get isStreamingSupported(){return this._isStreamingSupported},get isRangeSupported(){return this._isRangeSupported},read:function(){return this._reader.read().then(function(e){var t=e.value,r=e.done;return r?{value:void 0,done:!0}:{value:t.buffer,done:!1}})},cancel:function(e){this._reader.cancel(e)}},r.prototype={get isStreamingSupported(){return!1},read:function(){return this._reader.read().then(function(e){var t=e.value,r=e.done;return r?{value:void 0,done:!0}:{value:t.buffer,done:!1}})},cancel:function(e){this._reader.cancel(e)}},e}(),g={setup:function(e,t){var r=!1;e.on("test",function(t){if(!r)if(r=!0,t instanceof Uint8Array){var a=255===t[0];e.postMessageTransfers=a;var i=new XMLHttpRequest,n="response"in i;try{i.responseType}catch(o){n=!1}n?e.send("test",{supportTypedArray:!0,supportTransfers:a}):e.send("test",!1)}else e.send("test",!1)}),e.on("configure",function(e){(0,n.setVerbosityLevel)(e.verbosity)}),e.on("GetDocRequest",function(e){return g.createDocumentHandler(e,t)})},createDocumentHandler:function(e,t){var r,s=!1,c=null,h=[],g=e.apiVersion,p="2.0.943";if(g!==p)throw new Error('The API version "'+g+'" does not match the Worker version "'+p+'".');var m=e.docId,v=e.docBaseUrl,b=e.docId+"_worker",y=new l.MessageHandler(b,m,t);function w(){if(s)throw new Error("Worker was terminated")}function k(e){h.push(e)}function S(e){e.finish();var t=h.indexOf(e);h.splice(t,1)}function C(e){var t=(0,n.createPromiseCapability)(),a=function(){Promise.all([r.ensureDoc("numPages"),r.ensureDoc("fingerprint")]).then(function(e){var r=i(e,2),a=r[0],n=r[1];t.resolve({numPages:a,fingerprint:n})},o)},o=function(e){t.reject(e)};return r.ensureDoc("checkHeader",[]).then(function(){r.ensureDoc("parseStartXRef",[]).then(function(){r.ensureDoc("parse",[e]).then(a,o)},o)},o),t.promise}function x(e,t){var r,a=(0,n.createPromiseCapability)(),i=e.source;if(i.data){try{r=new o.LocalPdfManager(m,i.data,i.password,t,v),a.resolve(r)}catch(p){a.reject(p)}return a.promise}var s,l=[];try{s=new d(y)}catch(p){return a.reject(p),a.promise}var u=s.getFullReader();u.headersReady.then(function(){if(u.isRangeSupported){var e=i.disableAutoFetch||u.isStreamingSupported;r=new o.NetworkPdfManager(m,s,{msgHandler:y,url:i.url,password:i.password,length:u.contentLength,disableAutoFetch:e,rangeChunkSize:i.rangeChunkSize},t,v);for(var n=0;n=b.INFOS&&console.log("Info: "+e)}function P(e){C>=b.WARNINGS&&console.log("Warning: "+e)}function I(e){console.log("Deprecated API usage: "+e)}function O(e){throw new Error(e)}function T(e,t){e||O(t)}function E(e,t){try{var r=new n.URL(e);if(!r.origin||"null"===r.origin)return!1}catch(i){return!1}var a=new n.URL(t,r);return r.origin===a.origin}function F(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function R(e,t){if(!e)return null;try{var r=t?new n.URL(e,t):new n.URL(e);if(F(r))return r}catch(a){}return null}function B(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}function D(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}var M=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}(),L=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}(),N=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),U=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),q=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}(),j=function(){function e(e,t){this.begin=e,this.end=t,this.message="Missing data ["+e+", "+t+")"}return e.prototype=new Error,e.prototype.name="MissingDataException",e.constructor=e,e}(),z=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="XRefParseException",e.constructor=e,e}(),H=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}(),G=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),W=/\x00/g;function X(e){return"string"!==typeof e?(P("The argument for removeNullCharacters must be a string."),e):e.replace(W,"")}function Y(e){T(null!==e&&"object"===("undefined"===typeof e?"undefined":a(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function Q(e){return e<=0?0:Math.ceil(Math.log2(e))}function $(e,t){return e[t]<<24>>24}function ee(e,t){return e[t]<<8|e[t+1]}function te(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function re(){var e=new Uint8Array(4);e[0]=1;var t=new Uint32Array(e.buffer,0,1);return 1===t[0]}function ae(){try{return new Function(""),!0}catch(e){return!1}}function ie(e){var t=e.dict,r=e.key,a=e.getArray,i=void 0!==a&&a,n=e.stopWhenFound,o=void 0===n||n,s=100,c=0,l=void 0;while(t){var u=i?t.getArray(r):t.get(r);if(void 0!==u){if(o)return u;l||(l=[]),l.push(u)}if(++c>s){P('getInheritableProperty: maximum loop count exceeded for "'+r+'"');break}t=t.get("Parent")}return l}var ne=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];return e.makeCssRgb=function(e,r,a){return t[1]=e,t[3]=r,t[5]=a,t.join("")},e.transform=function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]},e.applyTransform=function(e,t){var r=e[0]*t[0]+e[1]*t[2]+t[4],a=e[0]*t[1]+e[1]*t[3]+t[5];return[r,a]},e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2],a=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,i=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r;return[a,i]},e.getAxialAlignedBoundingBox=function(t,r){var a=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),n=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(a[0],i[0],n[0],o[0]),Math.min(a[1],i[1],n[1],o[1]),Math.max(a[0],i[0],n[0],o[0]),Math.max(a[1],i[1],n[1],o[1])]},e.inverseTransform=function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]},e.apply3dTransform=function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]},e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],a=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],o=(r+n)/2,s=Math.sqrt((r+n)*(r+n)-4*(r*n-i*a))/2,c=o+s||1,l=o-s||1;return[Math.sqrt(c),Math.sqrt(l)]},e.normalizeRect=function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},e.intersect=function(t,r){function a(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(a),n=[t[1],t[3],r[1],r[3]].sort(a),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0])&&(o[0]=i[1],o[2]=i[2],(n[0]===t[1]&&n[1]===r[1]||n[0]===r[1]&&n[1]===t[1])&&(o[1]=n[1],o[3]=n[2],o))},e}(),oe=["","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 se(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];T(Number.isInteger(e)&&e>0,"The number should be a positive integer.");var r=void 0,a=[];while(e>=1e3)e-=1e3,a.push("M");r=e/100|0,e%=100,a.push(oe[r]),r=e/10|0,e%=10,a.push(oe[10+r]),a.push(oe[20+e]);var i=a.join("");return t?i.toLowerCase():i}var ce=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function le(e){var t,r=e.length,a=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t2&&void 0!==arguments[2]&&arguments[2];if(!a&&n.URL.createObjectURL){var i=new Blob([t],{type:r});return n.URL.createObjectURL(i)}for(var o="data:"+r+";base64,",s=0,c=t.length;s>2,d=(3&l)<<4|u>>4,g=s+1>6:64,p=s+21){var r=!!arguments[1];return this[r?"add":"remove"](e),r}return t(e)}}}}(),function(){String.prototype.includes||a(6)}(),function(){Array.prototype.includes||a(34)}(),function(){Object.assign||a(43)}(),function(){Math.log2||(Math.log2=a(53))}(),function(){Number.isNaN||(Number.isNaN=a(55))}(),function(){Number.isInteger||(Number.isInteger=a(57))}(),function(){n.Promise||(n.Promise=a(60))}(),function(){n.WeakMap||(n.WeakMap=a(95))}(),function(){String.codePointAt||(String.codePointAt=a(112))}(),function(){String.fromCodePoint||(String.fromCodePoint=a(114))}(),function(){n.Symbol||a(116)}(),function(){Object.values||(Object.values=a(123))}()}},function(e,t,a){"use strict";e.exports="undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof r&&r.Math===Math?r:"undefined"!==typeof self&&self.Math===Math?self:{}},function(e,t,r){"use strict";var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(){return"object"===("undefined"===typeof a?"undefined":i(a))&&a+""==="[object process]"}},function(e,t,r){"use strict";r(7),e.exports=r(10).String.includes},function(e,t,r){"use strict";var a=r(8),i=r(26),n="includes";a(a.P+a.F*r(33)(n),"String",{includes:function(e){return!!~i(this,e,n).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){"use strict";var a=r(9),i=r(10),n=r(11),o=r(21),s=r(24),c="prototype",l=function e(t,r,l){var u,h,f,d,g=t&e.F,p=t&e.G,m=t&e.S,v=t&e.P,b=t&e.B,y=p?a:m?a[r]||(a[r]={}):(a[r]||{})[c],w=p?i:i[r]||(i[r]={}),k=w[c]||(w[c]={});for(u in p&&(l=r),l)h=!g&&y&&void 0!==y[u],f=(h?y:l)[u],d=b&&h?s(f,a):v&&"function"==typeof f?s(Function.call,f):f,y&&o(y,u,f,t&e.U),w[u]!=f&&n(w,u,d),v&&k[u]!=f&&(k[u]=f)};a.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,r){"use strict";var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(e,t,r){"use strict";var a=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=a)},function(e,t,r){"use strict";var a=r(12),i=r(20);e.exports=r(16)?function(e,t,r){return a.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";var a=r(13),i=r(15),n=r(19),o=Object.defineProperty;t.f=r(16)?Object.defineProperty:function(e,t,r){if(a(e),t=n(t,!0),a(r),i)try{return o(e,t,r)}catch(s){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";var a=r(14);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===("undefined"===typeof e?"undefined":a(e))?null!==e:"function"===typeof e}},function(e,t,r){"use strict";e.exports=!r(16)&&!r(17)(function(){return 7!=Object.defineProperty(r(18)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=!r(17)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){"use strict";var a=r(14),i=r(9).document,n=a(i)&&a(i.createElement);e.exports=function(e){return n?i.createElement(e):{}}},function(e,t,r){"use strict";var a=r(14);e.exports=function(e,t){if(!a(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!a(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!a(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!a(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var a=r(9),i=r(11),n=r(22),o=r(23)("src"),s="toString",c=Function[s],l=(""+c).split(s);r(10).inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,r,s){var c="function"==typeof r;c&&(n(r,"name")||i(r,"name",t)),e[t]!==r&&(c&&(n(r,o)||i(r,o,e[t]?""+e[t]:l.join(String(t)))),e===a?e[t]=r:s?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,s,function(){return"function"==typeof this&&this[o]||c.call(this)})},function(e,t,r){"use strict";var a={}.hasOwnProperty;e.exports=function(e,t){return a.call(e,t)}},function(e,t,r){"use strict";var a=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++a+i).toString(36))}},function(e,t,r){"use strict";var a=r(25);e.exports=function(e,t,r){if(a(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,a){return e.call(t,r,a)};case 3:return function(r,a,i){return e.call(t,r,a,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var a=r(27),i=r(32);e.exports=function(e,t,r){if(a(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(e))}},function(e,t,r){"use strict";var a=r(14),i=r(28),n=r(29)("match");e.exports=function(e){var t;return a(e)&&(void 0!==(t=e[n])?!!t:"RegExp"==i(e))}},function(e,t,r){"use strict";var a={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},function(e,t,r){"use strict";var a=r(30)("wks"),i=r(23),n=r(9).Symbol,o="function"==typeof n,s=e.exports=function(e){return a[e]||(a[e]=o&&n[e]||(o?n:i)("Symbol."+e))};s.store=a},function(e,t,r){"use strict";var a=r(10),i=r(9),n="__core-js_shared__",o=i[n]||(i[n]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:a.version,mode:r(31)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t,r){"use strict";e.exports=!1},function(e,t,r){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var a=r(29)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[a]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,r){"use strict";r(35),e.exports=r(10).Array.includes},function(e,t,r){"use strict";var a=r(8),i=r(36)(!0);a(a.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(42)("includes")},function(e,t,r){"use strict";var a=r(37),i=r(39),n=r(41);e.exports=function(e){return function(t,r,o){var s,c=a(t),l=i(c.length),u=n(o,l);if(e&&r!=r){while(l>u)if(s=c[u++],s!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}}},function(e,t,r){"use strict";var a=r(38),i=r(32);e.exports=function(e){return a(i(e))}},function(e,t,r){"use strict";var a=r(28);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var a=r(40),i=Math.min;e.exports=function(e){return e>0?i(a(e),9007199254740991):0}},function(e,t,r){"use strict";var a=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:a)(e)}},function(e,t,r){"use strict";var a=r(40),i=Math.max,n=Math.min;e.exports=function(e,t){return e=a(e),e<0?i(e+t,0):n(e,t)}},function(e,t,r){"use strict";var a=r(29)("unscopables"),i=Array.prototype;void 0==i[a]&&r(11)(i,a,{}),e.exports=function(e){i[a][e]=!0}},function(e,t,r){"use strict";r(44),e.exports=r(10).Object.assign},function(e,t,r){"use strict";var a=r(8);a(a.S+a.F,"Object",{assign:r(45)})},function(e,t,r){"use strict";var a=r(46),i=r(50),n=r(51),o=r(52),s=r(38),c=Object.assign;e.exports=!c||r(17)(function(){var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach(function(e){t[e]=e}),7!=c({},e)[r]||Object.keys(c({},t)).join("")!=a})?function(e,t){var r=o(e),c=arguments.length,l=1,u=i.f,h=n.f;while(c>l){var f,d=s(arguments[l++]),g=u?a(d).concat(u(d)):a(d),p=g.length,m=0;while(p>m)h.call(d,f=g[m++])&&(r[f]=d[f])}return r}:c},function(e,t,r){"use strict";var a=r(47),i=r(49);e.exports=Object.keys||function(e){return a(e,i)}},function(e,t,r){"use strict";var a=r(22),i=r(37),n=r(36)(!1),o=r(48)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),c=0,l=[];for(r in s)r!=o&&a(s,r)&&l.push(r);while(t.length>c)a(s,r=t[c++])&&(~n(l,r)||l.push(r));return l}},function(e,t,r){"use strict";var a=r(30)("keys"),i=r(23);e.exports=function(e){return a[e]||(a[e]=i(e))}},function(e,t,r){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,r){"use strict";t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";var a=r(32);e.exports=function(e){return Object(a(e))}},function(e,t,r){"use strict";r(54),e.exports=r(10).Math.log2},function(e,t,r){"use strict";var a=r(8);a(a.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,r){"use strict";r(56),e.exports=r(10).Number.isNaN},function(e,t,r){"use strict";var a=r(8);a(a.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,r){"use strict";r(58),e.exports=r(10).Number.isInteger},function(e,t,r){"use strict";var a=r(8);a(a.S,"Number",{isInteger:r(59)})},function(e,t,r){"use strict";var a=r(14),i=Math.floor;e.exports=function(e){return!a(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){"use strict";r(61),r(63),r(73),r(76),r(93),r(94),e.exports=r(10).Promise},function(e,t,r){"use strict";var a=r(62),i={};i[r(29)("toStringTag")]="z",i+""!="[object z]"&&r(21)(Object.prototype,"toString",function(){return"[object "+a(this)+"]"},!0)},function(e,t,r){"use strict";var a=r(28),i=r(29)("toStringTag"),n="Arguments"==a(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(r){}};e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=o(t=Object(e),i))?r:n?a(t):"Object"==(s=a(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){"use strict";var a=r(64)(!0);r(65)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=a(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var a=r(40),i=r(32);e.exports=function(e){return function(t,r){var n,o,s=String(i(t)),c=a(r),l=s.length;return c<0||c>=l?e?"":void 0:(n=s.charCodeAt(c),n<55296||n>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):n:e?s.slice(c,c+2):o-56320+(n-55296<<10)+65536)}}},function(e,t,r){"use strict";var a=r(31),i=r(8),n=r(21),o=r(11),s=r(66),c=r(67),l=r(71),u=r(72),h=r(29)("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",g="keys",p="values",m=function(){return this};e.exports=function(e,t,r,v,b,y,w){c(r,t,v);var k,S,C,x=function(e){if(!f&&e in I)return I[e];switch(e){case g:return function(){return new r(this,e)};case p:return function(){return new r(this,e)}}return function(){return new r(this,e)}},_=t+" Iterator",A=b==p,P=!1,I=e.prototype,O=I[h]||I[d]||b&&I[b],T=O||x(b),E=b?A?x("entries"):T:void 0,F="Array"==t&&I.entries||O;if(F&&(C=u(F.call(new e)),C!==Object.prototype&&C.next&&(l(C,_,!0),a||"function"==typeof C[h]||o(C,h,m))),A&&O&&O.name!==p&&(P=!0,T=function(){return O.call(this)}),a&&!w||!f&&!P&&I[h]||o(I,h,T),s[t]=T,s[_]=m,b)if(k={values:A?T:x(p),keys:y?T:x(g),entries:E},w)for(S in k)S in I||n(I,S,k[S]);else i(i.P+i.F*(f||P),t,k);return k}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";var a=r(68),i=r(20),n=r(71),o={};r(11)(o,r(29)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=a(o,{next:i(1,r)}),n(e,t+" Iterator")}},function(e,t,r){"use strict";var a=r(13),i=r(69),n=r(49),o=r(48)("IE_PROTO"),s=function(){},c="prototype",l=function(){var e,t=r(18)("iframe"),a=n.length,i="<",o=">";t.style.display="none",r(70).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+o+"document.F=Object"+i+"/script"+o),e.close(),l=e.F;while(a--)delete l[c][n[a]];return l()};e.exports=Object.create||function(e,t){var r;return null!==e?(s[c]=a(e),r=new s,s[c]=null,r[o]=e):r=l(),void 0===t?r:i(r,t)}},function(e,t,r){"use strict";var a=r(12),i=r(13),n=r(46);e.exports=r(16)?Object.defineProperties:function(e,t){i(e);var r,o=n(t),s=o.length,c=0;while(s>c)a.f(e,r=o[c++],t[r]);return e}},function(e,t,r){"use strict";var a=r(9).document;e.exports=a&&a.documentElement},function(e,t,r){"use strict";var a=r(12).f,i=r(22),n=r(29)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,n)&&a(e,n,{configurable:!0,value:t})}},function(e,t,r){"use strict";var a=r(22),i=r(52),n=r(48)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),a(e,n)?e[n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,r){"use strict";for(var a=r(74),i=r(46),n=r(21),o=r(9),s=r(11),c=r(66),l=r(29),u=l("iterator"),h=l("toStringTag"),f=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},g=i(d),p=0;p=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),n.Arguments=n.Array,a("keys"),a("values"),a("entries")},function(e,t,r){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var a,i,n,o,s=r(31),c=r(9),l=r(24),u=r(62),h=r(8),f=r(14),d=r(25),g=r(77),p=r(78),m=r(82),v=r(83).set,b=r(85)(),y=r(86),w=r(87),k=r(88),S=r(89),C="Promise",x=c.TypeError,_=c.process,A=_&&_.versions,P=A&&A.v8||"",I=c[C],O="process"==u(_),T=function(){},E=i=y.f,F=!!function(){try{var e=I.resolve(1),t=(e.constructor={})[r(29)("species")]=function(e){e(T,T)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(T)instanceof t&&0!==P.indexOf("6.6")&&-1===k.indexOf("Chrome/66")}catch(a){}}(),R=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},B=function(e,t){if(!e._n){e._n=!0;var r=e._c;b(function(){var a=e._v,i=1==e._s,n=0,o=function(t){var r,n,o,s=i?t.ok:t.fail,c=t.resolve,l=t.reject,u=t.domain;try{s?(i||(2==e._h&&L(e),e._h=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),o=!0)),r===t.promise?l(x("Promise-chain cycle")):(n=R(r))?n.call(r,c,l):c(r)):l(a)}catch(h){u&&!o&&u.exit(),l(h)}};while(r.length>n)o(r[n++]);e._c=[],e._n=!1,t&&!e._h&&D(e)})}},D=function(e){v.call(c,function(){var t,r,a,i=e._v,n=M(e);if(n&&(t=w(function(){O?_.emit("unhandledRejection",i,e):(r=c.onunhandledrejection)?r({promise:e,reason:i}):(a=c.console)&&a.error&&a.error("Unhandled promise rejection",i)}),e._h=O||M(e)?2:1),e._a=void 0,n&&t.e)throw t.v})},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},L=function(e){v.call(c,function(){var t;O?_.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),B(t,!0))},U=function e(t){var r,a=this;if(!a._d){a._d=!0,a=a._w||a;try{if(a===t)throw x("Promise can't be resolved itself");(r=R(t))?b(function(){var i={_w:a,_d:!1};try{r.call(t,l(e,i,1),l(N,i,1))}catch(n){N.call(i,n)}}):(a._v=t,a._s=1,B(a,!1))}catch(i){N.call({_w:a,_d:!1},i)}}};F||(I=function(e){g(this,I,C,"_h"),d(e),a.call(this);try{e(l(U,this,1),l(N,this,1))}catch(t){N.call(this,t)}},a=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},a.prototype=r(90)(I.prototype,{then:function(e,t){var r=E(m(this,I));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=O?_.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&B(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),n=function(){var e=new a;this.promise=e,this.resolve=l(U,e,1),this.reject=l(N,e,1)},y.f=E=function(e){return e===I||e===o?new n(e):i(e)}),h(h.G+h.W+h.F*!F,{Promise:I}),r(71)(I,C),r(91)(C),o=r(10)[C],h(h.S+h.F*!F,C,{reject:function(e){var t=E(this),r=t.reject;return r(e),t.promise}}),h(h.S+h.F*(s||!F),C,{resolve:function(e){return S(s&&this===o?I:this,e)}}),h(h.S+h.F*!(F&&r(92)(function(e){I.all(e)["catch"](T)})),C,{all:function(e){var t=this,r=E(t),a=r.resolve,i=r.reject,n=w(function(){var r=[],n=0,o=1;p(e,!1,function(e){var s=n++,c=!1;r.push(void 0),o++,t.resolve(e).then(function(e){c||(c=!0,r[s]=e,--o||a(r))},i)}),--o||a(r)});return n.e&&i(n.v),r.promise},race:function(e){var t=this,r=E(t),a=r.reject,i=w(function(){p(e,!1,function(e){t.resolve(e).then(r.resolve,a)})});return i.e&&a(i.v),r.promise}})},function(e,t,r){"use strict";e.exports=function(e,t,r,a){if(!(e instanceof t)||void 0!==a&&a in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var a=r(24),i=r(79),n=r(80),o=r(13),s=r(39),c=r(81),l={},u={},h=e.exports=function(e,t,r,h,f){var d,g,p,m,v=f?function(){return e}:c(e),b=a(r,h,t?2:1),y=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(n(v)){for(d=s(e.length);d>y;y++)if(m=t?b(o(g=e[y])[0],g[1]):b(e[y]),m===l||m===u)return m}else for(p=v.call(e);!(g=p.next()).done;)if(m=i(p,b,g.value,t),m===l||m===u)return m};h.BREAK=l,h.RETURN=u},function(e,t,r){"use strict";var a=r(13);e.exports=function(e,t,r,i){try{return i?t(a(r)[0],r[1]):t(r)}catch(o){var n=e["return"];throw void 0!==n&&a(n.call(e)),o}}},function(e,t,r){"use strict";var a=r(66),i=r(29)("iterator"),n=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||n[i]===e)}},function(e,t,r){"use strict";var a=r(62),i=r(29)("iterator"),n=r(66);e.exports=r(10).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||n[a(e)]}},function(e,t,r){"use strict";var a=r(13),i=r(25),n=r(29)("species");e.exports=function(e,t){var r,o=a(e).constructor;return void 0===o||void 0==(r=a(o)[n])?t:i(r)}},function(e,t,r){"use strict";var a,i,n,o=r(24),s=r(84),c=r(70),l=r(18),u=r(9),h=u.process,f=u.setImmediate,d=u.clearImmediate,g=u.MessageChannel,p=u.Dispatch,m=0,v={},b="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},w=function(e){y.call(e.data)};f&&d||(f=function(e){var t=[],r=1;while(arguments.length>r)t.push(arguments[r++]);return v[++m]=function(){s("function"==typeof e?e:Function(e),t)},a(m),m},d=function(e){delete v[e]},"process"==r(28)(h)?a=function(e){h.nextTick(o(y,e,1))}:p&&p.now?a=function(e){p.now(o(y,e,1))}:g?(i=new g,n=i.port2,i.port1.onmessage=w,a=o(n.postMessage,n,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(a=function(e){u.postMessage(e+"","*")},u.addEventListener("message",w,!1)):a=b in l("script")?function(e){c.appendChild(l("script"))[b]=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,r){"use strict";e.exports=function(e,t,r){var a=void 0===r;switch(t.length){case 0:return a?e():e.call(r);case 1:return a?e(t[0]):e.call(r,t[0]);case 2:return a?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return a?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return a?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){"use strict";var a=r(9),i=r(83).set,n=a.MutationObserver||a.WebKitMutationObserver,o=a.process,s=a.Promise,c="process"==r(28)(o);e.exports=function(){var e,t,r,l=function(){var a,i;c&&(a=o.domain)&&a.exit();while(e){i=e.fn,e=e.next;try{i()}catch(n){throw e?r():t=void 0,n}}t=void 0,a&&a.enter()};if(c)r=function(){o.nextTick(l)};else if(!n||a.navigator&&a.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);r=function(){u.then(l)}}else r=function(){i.call(a,l)};else{var h=!0,f=document.createTextNode("");new n(l).observe(f,{characterData:!0}),r=function(){f.data=h=!h}}return function(a){var i={fn:a,next:void 0};t&&(t.next=i),e||(e=i,r()),t=i}}},function(e,t,r){"use strict";var a=r(25);function i(e){var t,r;this.promise=new e(function(e,a){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=a}),this.resolve=a(t),this.reject=a(r)}e.exports.f=function(e){return new i(e)}},function(e,t,r){"use strict";e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},function(e,t,r){"use strict";var a=r(9),i=a.navigator;e.exports=i&&i.userAgent||""},function(e,t,r){"use strict";var a=r(13),i=r(14),n=r(86);e.exports=function(e,t){if(a(e),i(t)&&t.constructor===e)return t;var r=n.f(e),o=r.resolve;return o(t),r.promise}},function(e,t,r){"use strict";var a=r(21);e.exports=function(e,t,r){for(var i in t)a(e,i,t[i],r);return e}},function(e,t,r){"use strict";var a=r(9),i=r(12),n=r(16),o=r(29)("species");e.exports=function(e){var t=a[e];n&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var a=r(29)("iterator"),i=!1;try{var n=[7][a]();n["return"]=function(){i=!0},Array.from(n,function(){throw 2})}catch(o){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var n=[7],s=n[a]();s.next=function(){return{done:r=!0}},n[a]=function(){return s},e(n)}catch(o){}return r}},function(e,t,r){"use strict";var a=r(8),i=r(10),n=r(9),o=r(82),s=r(89);a(a.P+a.R,"Promise",{finally:function(e){var t=o(this,i.Promise||n.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){"use strict";var a=r(8),i=r(86),n=r(87);a(a.S,"Promise",{try:function(e){var t=i.f(this),r=n(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},function(e,t,r){"use strict";r(61),r(73),r(96),r(108),r(110),e.exports=r(10).WeakMap},function(e,t,r){"use strict";var a,i=r(97)(0),n=r(21),o=r(101),s=r(45),c=r(102),l=r(14),u=r(17),h=r(103),f="WeakMap",d=o.getWeak,g=Object.isExtensible,p=c.ufstore,m={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(e){if(l(e)){var t=d(e);return!0===t?p(h(this,f)).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(h(this,f),e,t)}},y=e.exports=r(104)(f,v,b,c,!0,!0);u(function(){return 7!=(new y).set((Object.freeze||Object)(m),7).get(m)})&&(a=c.getConstructor(v,f),s(a.prototype,b),o.NEED=!0,i(["delete","has","get","set"],function(e){var t=y.prototype,r=t[e];n(t,e,function(t,i){if(l(t)&&!g(t)){this._f||(this._f=new a);var n=this._f[e](t,i);return"set"==e?this:n}return r.call(this,t,i)})}))},function(e,t,r){"use strict";var a=r(24),i=r(38),n=r(52),o=r(39),s=r(98);e.exports=function(e,t){var r=1==e,c=2==e,l=3==e,u=4==e,h=6==e,f=5==e||h,d=t||s;return function(t,s,g){for(var p,m,v=n(t),b=i(v),y=a(s,g,3),w=o(b.length),k=0,S=r?d(t,w):c?d(t,0):void 0;w>k;k++)if((f||k in b)&&(p=b[k],m=y(p,k,v),e))if(r)S[k]=m;else if(m)switch(e){case 3:return!0;case 5:return p;case 6:return k;case 2:S.push(p)}else if(u)return!1;return h?-1:l||u?u:S}}},function(e,t,r){"use strict";var a=r(99);e.exports=function(e,t){return new(a(e))(t)}},function(e,t,r){"use strict";var a=r(14),i=r(100),n=r(29)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),a(t)&&(t=t[n],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,r){"use strict";var a=r(28);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(23)("meta"),n=r(14),o=r(22),s=r(12).f,c=0,l=Object.isExtensible||function(){return!0},u=!r(17)(function(){return l(Object.preventExtensions({}))}),h=function(e){s(e,i,{value:{i:"O"+ ++c,w:{}}})},f=function(e,t){if(!n(e))return"symbol"==("undefined"===typeof e?"undefined":a(e))?e:("string"==typeof e?"S":"P")+e;if(!o(e,i)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[i].i},d=function(e,t){if(!o(e,i)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[i].w},g=function(e){return u&&p.NEED&&l(e)&&!o(e,i)&&h(e),e},p=e.exports={KEY:i,NEED:!1,fastKey:f,getWeak:d,onFreeze:g}},function(e,t,r){"use strict";var a=r(90),i=r(101).getWeak,n=r(13),o=r(14),s=r(77),c=r(78),l=r(97),u=r(22),h=r(103),f=l(5),d=l(6),g=0,p=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},v=function(e,t){return f(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var r=v(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var l=e(function(e,a){s(e,l,t,"_i"),e._t=t,e._i=g++,e._l=void 0,void 0!=a&&c(a,r,e[n],e)});return a(l.prototype,{delete:function(e){if(!o(e))return!1;var r=i(e);return!0===r?p(h(this,t))["delete"](e):r&&u(r,this._i)&&delete r[this._i]},has:function(e){if(!o(e))return!1;var r=i(e);return!0===r?p(h(this,t)).has(e):r&&u(r,this._i)}}),l},def:function(e,t,r){var a=i(n(t),!0);return!0===a?p(e).set(t,r):a[e._i]=r,e},ufstore:p}},function(e,t,r){"use strict";var a=r(14);e.exports=function(e,t){if(!a(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){"use strict";var a=r(9),i=r(8),n=r(21),o=r(90),s=r(101),c=r(78),l=r(77),u=r(14),h=r(17),f=r(92),d=r(71),g=r(105);e.exports=function(e,t,r,p,m,v){var b=a[e],y=b,w=m?"set":"add",k=y&&y.prototype,S={},C=function(e){var t=k[e];n(k,e,"delete"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,r){return t.call(this,0===e?0:e,r),this})};if("function"==typeof y&&(v||k.forEach&&!h(function(){(new y).entries().next()}))){var x=new y,_=x[w](v?{}:-0,1)!=x,A=h(function(){x.has(1)}),P=f(function(e){new y(e)}),I=!v&&h(function(){var e=new y,t=5;while(t--)e[w](t,t);return!e.has(-0)});P||(y=t(function(t,r){l(t,y,e);var a=g(new b,t,y);return void 0!=r&&c(r,m,a[w],a),a}),y.prototype=k,k.constructor=y),(A||I)&&(C("delete"),C("has"),m&&C("get")),(I||_)&&C(w),v&&k.clear&&delete k.clear}else y=p.getConstructor(t,e,m,w),o(y.prototype,r),s.NEED=!0;return d(y,e),S[e]=y,i(i.G+i.W+i.F*(y!=b),S),v||p.setStrong(y,e,m),y}},function(e,t,r){"use strict";var a=r(14),i=r(106).set;e.exports=function(e,t,r){var n,o=t.constructor;return o!==r&&"function"==typeof o&&(n=o.prototype)!==r.prototype&&a(n)&&i&&i(e,n),e}},function(e,t,r){"use strict";var a=r(14),i=r(13),n=function(e,t){if(i(e),!a(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,a){try{a=r(24)(Function.call,r(107).f(Object.prototype,"__proto__").set,2),a(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,r){return n(e,r),t?e.__proto__=r:a(e,r),e}}({},!1):void 0),check:n}},function(e,t,r){"use strict";var a=r(51),i=r(20),n=r(37),o=r(19),s=r(22),c=r(15),l=Object.getOwnPropertyDescriptor;t.f=r(16)?l:function(e,t){if(e=n(e),t=o(t,!0),c)try{return l(e,t)}catch(r){}if(s(e,t))return i(!a.f.call(e,t),e[t])}},function(e,t,r){"use strict";r(109)("WeakMap")},function(e,t,r){"use strict";var a=r(8);e.exports=function(e){a(a.S,e,{of:function(){var e=arguments.length,t=new Array(e);while(e--)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";r(111)("WeakMap")},function(e,t,r){"use strict";var a=r(8),i=r(25),n=r(24),o=r(78);e.exports=function(e){a(a.S,e,{from:function(e){var t,r,a,s,c=arguments[1];return i(this),t=void 0!==c,t&&i(c),void 0==e?new this:(r=[],t?(a=0,s=n(c,arguments[2],2),o(e,!1,function(e){r.push(s(e,a++))})):o(e,!1,r.push,r),new this(r))}})}},function(e,t,r){"use strict";r(113),e.exports=r(10).String.codePointAt},function(e,t,r){"use strict";var a=r(8),i=r(64)(!1);a(a.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,r){"use strict";r(115),e.exports=r(10).String.fromCodePoint},function(e,t,r){"use strict";var a=r(8),i=r(41),n=String.fromCharCode,o=String.fromCodePoint;a(a.S+a.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){var t,r=[],a=arguments.length,o=0;while(a>o){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?n(t):n(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){"use strict";r(117),r(61),e.exports=r(10).Symbol},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(9),n=r(22),o=r(16),s=r(8),c=r(21),l=r(101).KEY,u=r(17),h=r(30),f=r(71),d=r(23),g=r(29),p=r(118),m=r(119),v=r(120),b=r(100),y=r(13),w=r(14),k=r(37),S=r(19),C=r(20),x=r(68),_=r(121),A=r(107),P=r(12),I=r(46),O=A.f,T=P.f,E=_.f,F=i.Symbol,R=i.JSON,B=R&&R.stringify,D="prototype",M=g("_hidden"),L=g("toPrimitive"),N={}.propertyIsEnumerable,U=h("symbol-registry"),q=h("symbols"),j=h("op-symbols"),z=Object[D],H="function"==typeof F,G=i.QObject,W=!G||!G[D]||!G[D].findChild,X=o&&u(function(){return 7!=x(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,r){var a=O(z,t);a&&delete z[t],T(e,t,r),a&&e!==z&&T(z,t,a)}:T,Y=function(e){var t=q[e]=x(F[D]);return t._k=e,t},V=H&&"symbol"==a(F.iterator)?function(e){return"symbol"==("undefined"===typeof e?"undefined":a(e))}:function(e){return e instanceof F},K=function(e,t,r){return e===z&&K(j,t,r),y(e),t=S(t,!0),y(r),n(q,t)?(r.enumerable?(n(e,M)&&e[M][t]&&(e[M][t]=!1),r=x(r,{enumerable:C(0,!1)})):(n(e,M)||T(e,M,C(1,{})),e[M][t]=!0),X(e,t,r)):T(e,t,r)},J=function(e,t){y(e);var r,a=v(t=k(t)),i=0,n=a.length;while(n>i)K(e,r=a[i++],t[r]);return e},Z=function(e,t){return void 0===t?x(e):J(x(e),t)},Q=function(e){var t=N.call(this,e=S(e,!0));return!(this===z&&n(q,e)&&!n(j,e))&&(!(t||!n(this,e)||!n(q,e)||n(this,M)&&this[M][e])||t)},$=function(e,t){if(e=k(e),t=S(t,!0),e!==z||!n(q,t)||n(j,t)){var r=O(e,t);return!r||!n(q,t)||n(e,M)&&e[M][t]||(r.enumerable=!0),r}},ee=function(e){var t,r=E(k(e)),a=[],i=0;while(r.length>i)n(q,t=r[i++])||t==M||t==l||a.push(t);return a},te=function(e){var t,r=e===z,a=E(r?j:k(e)),i=[],o=0;while(a.length>o)!n(q,t=a[o++])||r&&!n(z,t)||i.push(q[t]);return i};H||(F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function t(r){this===z&&t.call(j,r),n(this,M)&&n(this[M],e)&&(this[M][e]=!1),X(this,e,C(1,r))};return o&&W&&X(z,e,{configurable:!0,set:t}),Y(e)},c(F[D],"toString",function(){return this._k}),A.f=$,P.f=K,r(122).f=_.f=ee,r(51).f=Q,r(50).f=te,o&&!r(31)&&c(z,"propertyIsEnumerable",Q,!0),p.f=function(e){return Y(g(e))}),s(s.G+s.W+s.F*!H,{Symbol:F});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ae=0;re.length>ae;)g(re[ae++]);for(var ie=I(g.store),ne=0;ie.length>ne;)m(ie[ne++]);s(s.S+s.F*!H,"Symbol",{for:function(e){return n(U,e+="")?U[e]:U[e]=F(e)},keyFor:function(e){if(!V(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!H,"Object",{create:Z,defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:ee,getOwnPropertySymbols:te}),R&&s(s.S+s.F*(!H||u(function(){var e=F();return"[null]"!=B([e])||"{}"!=B({a:e})||"{}"!=B(Object(e))})),"JSON",{stringify:function(e){var t,r,a=[e],i=1;while(arguments.length>i)a.push(arguments[i++]);if(r=t=a[1],(w(t)||void 0!==e)&&!V(e))return b(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!V(t))return t}),a[1]=t,B.apply(R,a)}}),F[D][L]||r(11)(F[D],L,F[D].valueOf),f(F,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(e,t,r){"use strict";t.f=r(29)},function(e,t,r){"use strict";var a=r(9),i=r(10),n=r(31),o=r(118),s=r(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=n?{}:a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,r){"use strict";var a=r(46),i=r(50),n=r(51);e.exports=function(e){var t=a(e),r=i.f;if(r){var o,s=r(e),c=n.f,l=0;while(s.length>l)c.call(e,o=s[l++])&&t.push(o)}return t}},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(37),n=r(122).f,o={}.toString,s="object"==("undefined"===typeof window?"undefined":a(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return n(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?c(e):n(i(e))}},function(e,t,r){"use strict";var a=r(47),i=r(49).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,i)}},function(e,t,r){"use strict";r(124),e.exports=r(10).Object.values},function(e,t,r){"use strict";var a=r(8),i=r(125)(!1);a(a.S,"Object",{values:function(e){return i(e)}})},function(e,t,r){"use strict";var a=r(46),i=r(37),n=r(51).f;e.exports=function(e){return function(t){var r,o=i(t),s=a(o),c=s.length,l=0,u=[];while(c>l)n.call(o,r=s[l++])&&u.push(e?[r,o[r]]:o[r]);return u}}},function(e,t,r){"use strict";var a=!1;if("undefined"!==typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),a=!0}catch(i){}t.ReadableStream=a?ReadableStream:r(127).ReadableStream},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(e,t){for(var r in t)e[r]=t[r]})(t,function(e){var t={};function r(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}([function(e,t,r){var i="function"===typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return"undefined"===typeof e?"undefined":a(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"===typeof e?"undefined":a(e)},n=r(1),o=n.assert;function s(e){return"string"===typeof e||"symbol"===("undefined"===typeof e?"undefined":i(e))}function c(e,t,r){if("function"!==typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}t.typeIsObject=function(e){return"object"===("undefined"===typeof e?"undefined":i(e))&&null!==e||"function"===typeof e},t.createDataProperty=function(e,r,a){o(t.typeIsObject(e)),Object.defineProperty(e,r,{value:a,writable:!0,enumerable:!0,configurable:!0})},t.createArrayFromList=function(e){return e.slice()},t.ArrayBufferCopy=function(e,t,r,a,i){new Uint8Array(e).set(new Uint8Array(r,a,i),t)},t.CreateIterResultObject=function(e,t){o("boolean"===typeof t);var r={};return Object.defineProperty(r,"value",{value:e,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(r,"done",{value:t,enumerable:!0,writable:!0,configurable:!0}),r},t.IsFiniteNonNegativeNumber=function(e){return!Number.isNaN(e)&&(e!==1/0&&!(e<0))},t.InvokeOrNoop=function(e,t,r){o(void 0!==e),o(s(t)),o(Array.isArray(r));var a=e[t];if(void 0!==a)return c(a,e,r)},t.PromiseInvokeOrNoop=function(e,r,a){o(void 0!==e),o(s(r)),o(Array.isArray(a));try{return Promise.resolve(t.InvokeOrNoop(e,r,a))}catch(i){return Promise.reject(i)}},t.PromiseInvokeOrPerformFallback=function(e,t,r,a,i){o(void 0!==e),o(s(t)),o(Array.isArray(r)),o(Array.isArray(i));var n=void 0;try{n=e[t]}catch(l){return Promise.reject(l)}if(void 0===n)return a.apply(null,i);try{return Promise.resolve(c(n,e,r))}catch(u){return Promise.reject(u)}},t.TransferArrayBuffer=function(e){return e.slice()},t.ValidateAndNormalizeHighWaterMark=function(e){if(e=Number(e),Number.isNaN(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e},t.ValidateAndNormalizeQueuingStrategy=function(e,r){if(void 0!==e&&"function"!==typeof e)throw new TypeError("size property of a queuing strategy must be a function");return r=t.ValidateAndNormalizeHighWaterMark(r),{size:e,highWaterMark:r}}},function(e,t,r){function a(e){e&&e.constructor===i&&setTimeout(function(){throw e},0)}function i(e){this.name="AssertionError",this.message=e||"",this.stack=(new Error).stack}function n(e,t){if(!e)throw new i(t)}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,e.exports={rethrowAssertionErrorRejection:a,AssertionError:i,assert:n}},function(e,t,r){var a=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.size,n=r.highWaterMark,o=void 0===n?1:n;i(this,e),this._state="writable",this._storedError=void 0,this._writer=void 0,this._writableStreamController=void 0,this._writeRequests=[],this._inFlightWriteRequest=void 0,this._closeRequest=void 0,this._inFlightCloseRequest=void 0,this._pendingAbortRequest=void 0,this._backpressure=!1;var s=t.type;if(void 0!==s)throw new RangeError("Invalid type is specified");this._writableStreamController=new Y(this,t,a,o),this._writableStreamController.__startSteps()}return a(e,[{key:"abort",value:function(e){return!1===w(this)?Promise.reject(ne("abort")):!0===k(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):S(this,e)}},{key:"getWriter",value:function(){if(!1===w(this))throw ne("getWriter");return y(this)}},{key:"locked",get:function(){if(!1===w(this))throw ne("locked");return k(this)}}]),e}();function y(e){return new L(e)}function w(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function k(e){return h(!0===w(e),"IsWritableStreamLocked should only be used on known writable streams"),void 0!==e._writer}function S(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var a=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(a);h("writable"===r||"erroring"===r,"state must be writable or erroring");var i=!1;"erroring"===r&&(i=!0,t=void 0);var n=new Promise(function(r,a){e._pendingAbortRequest={_resolve:r,_reject:a,_reason:t,_wasAlreadyErroring:i}});return!1===i&&_(e,a),n}function C(e){h(!0===k(e)),h("writable"===e._state);var t=new Promise(function(t,r){var a={_resolve:t,_reject:r};e._writeRequests.push(a)});return t}function x(e,t){var r=e._state;"writable"!==r?(h("erroring"===r),A(e)):_(e,t)}function _(e,t){h(void 0===e._storedError,"stream._storedError === undefined"),h("writable"===e._state,"state must be writable");var r=e._writableStreamController;h(void 0!==r,"controller must not be undefined"),e._state="erroring",e._storedError=t;var a=e._writer;void 0!==a&&H(a,t),!1===F(e)&&!0===r._started&&A(e)}function A(e){h("erroring"===e._state,"stream._state === erroring"),h(!1===F(e),"WritableStreamHasOperationMarkedInFlight(stream) === false"),e._state="errored",e._writableStreamController.__errorSteps();for(var t=e._storedError,r=0;r0,"Spec-level failure: should never dequeue from an empty queue.");var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]]."),r=Number(r),!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},t.PeekQueueValue=function(e){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),o(e._queue.length>0,"Spec-level failure: should never peek at an empty queue.");var t=e._queue[0];return t.value},t.ResetQueue=function(e){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){var a=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.size,n=r.highWaterMark;i(this,e),this._state="readable",this._reader=void 0,this._storedError=void 0,this._disturbed=!1,this._readableStreamController=void 0;var o=t.type,s=String(o);if("bytes"===s)void 0===n&&(n=0),this._readableStreamController=new we(this,t,n);else{if(void 0!==o)throw new RangeError("Invalid type is specified");void 0===n&&(n=1),this._readableStreamController=new ue(this,t,a,n)}}return a(e,[{key:"cancel",value:function(e){return!1===L(this)?Promise.reject(We("cancel")):!0===U(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):X(this,e)}},{key:"getReader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mode;if(!1===L(this))throw We("getReader");if(void 0===t)return M(this);if(t=String(t),"byob"===t)return D(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,a=e.readable,i=this.pipeTo(r,t);return it(i),a}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.preventClose,i=r.preventAbort,n=r.preventCancel;if(!1===L(this))return Promise.reject(We("pipeTo"));if(!1===P(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(a=Boolean(a),i=Boolean(i),n=Boolean(n),!0===U(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===I(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var o=M(this),s=A(e),c=!1,l=Promise.resolve();return new Promise(function(r,u){function h(){return l=Promise.resolve(),!0===c?Promise.resolve():s._readyPromise.then(function(){return le(o).then(function(e){var t=e.value,r=e.done;!0!==r&&(l=F(s,t).catch(function(){}))})}).then(h)}if(g(t,o._closedPromise,function(t){!1===i?m(function(){return O(e,t)},!0,t):v(!0,t)}),g(e,s._closedPromise,function(e){!1===n?m(function(){return X(t,e)},!0,e):v(!0,e)}),p(t,o._closedPromise,function(){!1===a?m(function(){return T(s)}):v()}),!0===R(e)||"closed"===e._state){var f=new TypeError("the destination writable stream closed before all data could be piped to it");!1===n?m(function(){return X(t,f)},!0,f):v(!0,f)}function d(){var e=l;return l.then(function(){return e!==l?d():void 0})}function g(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(w)}function p(e,t,r){"closed"===e._state?r():t.then(r).catch(w)}function m(t,r,a){function i(){t().then(function(){return b(r,a)},function(e){return b(!0,e)}).catch(w)}!0!==c&&(c=!0,"writable"===e._state&&!1===R(e)?d().then(i):i())}function v(t,r){!0!==c&&(c=!0,"writable"===e._state&&!1===R(e)?d().then(function(){return b(t,r)}).catch(w):b(t,r))}function b(e,t){E(s),se(o),e?u(t):r(void 0)}h().catch(function(e){l=Promise.resolve(),w(e)})})}},{key:"tee",value:function(){if(!1===L(this))throw We("tee");var e=q(this,!1);return p(e)}},{key:"locked",get:function(){if(!1===L(this))throw We("locked");return U(this)}}]),e}();function D(e){return new re(e)}function M(e){return new te(e)}function L(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function N(e){return y(!0===L(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed}function U(e){return y(!0===L(e),"IsReadableStreamLocked should only be used on known readable streams"),void 0!==e._reader}function q(e,t){y(!0===L(e)),y("boolean"===typeof t);var r=M(e),a={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void 0,reason2:void 0};a.promise=new Promise(function(e){a._resolve=e});var i=j();i._reader=r,i._teeState=a,i._cloneForBranch2=t;var n=z();n._stream=e,n._teeState=a;var o=H();o._stream=e,o._teeState=a;var s=Object.create(Object.prototype);m(s,"pull",i),m(s,"cancel",n);var c=new B(s),l=Object.create(Object.prototype);m(l,"pull",i),m(l,"cancel",o);var u=new B(l);return i._branch1=c._readableStreamController,i._branch2=u._readableStreamController,r._closedPromise.catch(function(e){!0!==a.closedOrErrored&&(me(i._branch1,e),me(i._branch2,e),a.closedOrErrored=!0)}),[c,u]}function j(){function e(){var t=e._reader,r=e._branch1,a=e._branch2,i=e._teeState;return le(t).then(function(e){y(v(e));var t=e.value,n=e.done;if(y("boolean"===typeof n),!0===n&&!1===i.closedOrErrored&&(!1===i.canceled1&&ge(r),!1===i.canceled2&&ge(a),i.closedOrErrored=!0),!0!==i.closedOrErrored){var o=t,s=t;!1===i.canceled1&&pe(r,o),!1===i.canceled2&&pe(a,s)}})}return e}function z(){function e(t){var r=e._stream,a=e._teeState;if(a.canceled1=!0,a.reason1=t,!0===a.canceled2){var i=p([a.reason1,a.reason2]),n=X(r,i);a._resolve(n)}return a.promise}return e}function H(){function e(t){var r=e._stream,a=e._teeState;if(a.canceled2=!0,a.reason2=t,!0===a.canceled1){var i=p([a.reason1,a.reason2]),n=X(r,i);a._resolve(n)}return a.promise}return e}function G(e){y(!0===ae(e._reader)),y("readable"===e._state||"closed"===e._state);var t=new Promise(function(t,r){var a={_resolve:t,_reject:r};e._reader._readIntoRequests.push(a)});return t}function W(e){y(!0===ie(e._reader)),y("readable"===e._state);var t=new Promise(function(t,r){var a={_resolve:t,_reject:r};e._reader._readRequests.push(a)});return t}function X(e,t){if(e._disturbed=!0,"closed"===e._state)return Promise.resolve(void 0);if("errored"===e._state)return Promise.reject(e._storedError);Y(e);var r=e._readableStreamController.__cancelSteps(t);return r.then(function(){})}function Y(e){y("readable"===e._state),e._state="closed";var t=e._reader;if(void 0!==t){if(!0===ie(t)){for(var r=0;r0);var i=a._readIntoRequests.shift();i._resolve(s(t,r))}function J(e,t,r){var a=e._reader;y(a._readRequests.length>0);var i=a._readRequests.shift();i._resolve(s(t,r))}function Z(e){return e._reader._readIntoRequests.length}function Q(e){return e._reader._readRequests.length}function $(e){var t=e._reader;return void 0!==t&&!1!==ae(t)}function ee(e){var t=e._reader;return void 0!==t&&!1!==ie(t)}e.exports={ReadableStream:B,IsReadableStreamDisturbed:N,ReadableStreamDefaultControllerClose:ge,ReadableStreamDefaultControllerEnqueue:pe,ReadableStreamDefaultControllerError:me,ReadableStreamDefaultControllerGetDesiredSize:be};var te=function(){function e(t){if(i(this,e),!1===L(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===U(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ne(this,t),this._readRequests=[]}return a(e,[{key:"cancel",value:function(e){return!1===ie(this)?Promise.reject(Ye("cancel")):void 0===this._ownerReadableStream?Promise.reject(Xe("cancel")):oe(this,e)}},{key:"read",value:function(){return!1===ie(this)?Promise.reject(Ye("read")):void 0===this._ownerReadableStream?Promise.reject(Xe("read from")):le(this)}},{key:"releaseLock",value:function(){if(!1===ie(this))throw Ye("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");se(this)}}},{key:"closed",get:function(){return!1===ie(this)?Promise.reject(Ye("closed")):this._closedPromise}}]),e}(),re=function(){function e(t){if(i(this,e),!L(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===ke(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(U(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ne(this,t),this._readIntoRequests=[]}return a(e,[{key:"cancel",value:function(e){return ae(this)?void 0===this._ownerReadableStream?Promise.reject(Xe("cancel")):oe(this,e):Promise.reject(et("cancel"))}},{key:"read",value:function(e){return ae(this)?void 0===this._ownerReadableStream?Promise.reject(Xe("read from")):ArrayBuffer.isView(e)?0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):ce(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(et("read"))}},{key:"releaseLock",value:function(){if(!ae(this))throw et("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");se(this)}}},{key:"closed",get:function(){return ae(this)?this._closedPromise:Promise.reject(et("closed"))}}]),e}();function ae(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function ie(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function ne(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?Ve(e):"closed"===t._state?Je(e):(y("errored"===t._state,"state must be errored"),Ke(e,t._storedError),e._closedPromise.catch(function(){}))}function oe(e,t){var r=e._ownerReadableStream;return y(void 0!==r),X(r,t)}function se(e){y(void 0!==e._ownerReadableStream),y(e._ownerReadableStream._reader===e),"readable"===e._ownerReadableStream._state?Ze(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Qe(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch(function(){}),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function ce(e,t){var r=e._ownerReadableStream;return y(void 0!==r),r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):Re(r._readableStreamController,t)}function le(e){var t=e._ownerReadableStream;return y(void 0!==t),t._disturbed=!0,"closed"===t._state?Promise.resolve(s(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):(y("readable"===t._state),t._readableStreamController.__pullSteps())}var ue=function(){function e(t,r,a,n){if(i(this,e),!1===L(t))throw new TypeError("ReadableStreamDefaultController can only be constructed with a ReadableStream instance");if(void 0!==t._readableStreamController)throw new TypeError("ReadableStreamDefaultController instances can only be created by the ReadableStream constructor");this._controlledReadableStream=t,this._underlyingSource=r,this._queue=void 0,this._queueTotalSize=void 0,x(this),this._started=!1,this._closeRequested=!1,this._pullAgain=!1,this._pulling=!1;var o=f(a,n);this._strategySize=o.size,this._strategyHWM=o.highWaterMark;var s=this,c=l(r,"start",[this]);Promise.resolve(c).then(function(){s._started=!0,y(!1===s._pulling),y(!1===s._pullAgain),fe(s)},function(e){ve(s,e)}).catch(w)}return a(e,[{key:"close",value:function(){if(!1===he(this))throw tt("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");ge(this)}},{key:"enqueue",value:function(e){if(!1===he(this))throw tt("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");return pe(this,e)}},{key:"error",value:function(e){if(!1===he(this))throw tt("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");me(this,e)}},{key:"__cancelSteps",value:function(e){return x(this),u(this._underlyingSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=S(this);return!0===this._closeRequested&&0===this._queue.length?Y(e):fe(this),Promise.resolve(s(t,!1))}var r=W(e);return fe(this),r}},{key:"desiredSize",get:function(){if(!1===he(this))throw tt("desiredSize");return be(this)}}]),e}();function he(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function fe(e){var t=de(e);if(!1!==t)if(!0!==e._pulling){y(!1===e._pullAgain),e._pulling=!0;var r=u(e._underlyingSource,"pull",[e]);r.then(function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,fe(e)},function(t){ve(e,t)}).catch(w)}else e._pullAgain=!0}function de(e){var t=e._controlledReadableStream;if("closed"===t._state||"errored"===t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===U(t)&&Q(t)>0)return!0;var r=be(e);return r>0}function ge(e){var t=e._controlledReadableStream;y(!1===e._closeRequested),y("readable"===t._state),e._closeRequested=!0,0===e._queue.length&&Y(t)}function pe(e,t){var r=e._controlledReadableStream;if(y(!1===e._closeRequested),y("readable"===r._state),!0===U(r)&&Q(r)>0)J(r,t,!1);else{var a=1;if(void 0!==e._strategySize){var i=e._strategySize;try{a=i(t)}catch(n){throw ve(e,n),n}}try{C(e,t,a)}catch(o){throw ve(e,o),o}}fe(e)}function me(e,t){var r=e._controlledReadableStream;y("readable"===r._state),x(e),V(r,t)}function ve(e,t){"readable"===e._controlledReadableStream._state&&me(e,t)}function be(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}var ye=function(){function e(t,r){i(this,e),this._associatedReadableByteStreamController=t,this._view=r}return a(e,[{key:"respond",value:function(e){if(!1===Se(this))throw rt("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");He(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===Se(this))throw rt("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");Ge(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){return this._view}}]),e}(),we=function(){function e(t,r,a){if(i(this,e),!1===L(t))throw new TypeError("ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source");if(void 0!==t._readableStreamController)throw new TypeError("ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source");this._controlledReadableStream=t,this._underlyingByteSource=r,this._pullAgain=!1,this._pulling=!1,xe(this),this._queue=this._queueTotalSize=void 0,x(this),this._closeRequested=!1,this._started=!1,this._strategyHWM=d(a);var n=r.autoAllocateChunkSize;if(void 0!==n&&(!1===Number.isInteger(n)||n<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");this._autoAllocateChunkSize=n,this._pendingPullIntos=[];var o=this,s=l(r,"start",[this]);Promise.resolve(s).then(function(){o._started=!0,y(!1===o._pulling),y(!1===o._pullAgain),Ce(o)},function(e){"readable"===t._state&&je(o,e)}).catch(w)}return a(e,[{key:"close",value:function(){if(!1===ke(this))throw at("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");Ue(this)}},{key:"enqueue",value:function(e){if(!1===ke(this))throw at("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");qe(this,e)}},{key:"error",value:function(e){if(!1===ke(this))throw at("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");je(this,e)}},{key:"__cancelSteps",value:function(e){if(this._pendingPullIntos.length>0){var t=this._pendingPullIntos[0];t.bytesFilled=0}return x(this),u(this._underlyingByteSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(y(!0===ee(e)),this._queueTotalSize>0){y(0===Q(e));var t=this._queue.shift();this._queueTotalSize-=t.byteLength,Te(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(c){return Promise.reject(c)}return Promise.resolve(s(r,!1))}var a=this._autoAllocateChunkSize;if(void 0!==a){var i=void 0;try{i=new ArrayBuffer(a)}catch(l){return Promise.reject(l)}var n={buffer:i,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(n)}var o=W(e);return Ce(this),o}},{key:"byobRequest",get:function(){if(!1===ke(this))throw at("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);this._byobRequest=new ye(this,t)}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===ke(this))throw at("desiredSize");return ze(this)}}]),e}();function ke(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingByteSource")}function Se(e){return!!v(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function Ce(e){var t=Ne(e);if(!1!==t)if(!0!==e._pulling){y(!1===e._pullAgain),e._pulling=!0;var r=u(e._underlyingByteSource,"pull",[e]);r.then(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,Ce(e))},function(t){"readable"===e._controlledReadableStream._state&&je(e,t)}).catch(w)}else e._pullAgain=!0}function xe(e){Ee(e),e._pendingPullIntos=[]}function _e(e,t){y("errored"!==e._state,"state must not be errored");var r=!1;"closed"===e._state&&(y(0===t.bytesFilled),r=!0);var a=Ae(t);"default"===t.readerType?J(e,a,r):(y("byob"===t.readerType),K(e,a,r))}function Ae(e){var t=e.bytesFilled,r=e.elementSize;return y(t<=e.byteLength),y(t%r===0),new e.ctor(e.buffer,e.byteOffset,t/r)}function Pe(e,t,r,a){e._queue.push({buffer:t,byteOffset:r,byteLength:a}),e._queueTotalSize+=a}function Ie(e,t){var r=t.elementSize,a=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+i,s=n-n%r,c=i,l=!1;s>a&&(c=s-t.bytesFilled,l=!0);var u=e._queue;while(c>0){var h=u[0],f=Math.min(c,h.byteLength),d=t.byteOffset+t.bytesFilled;o(t.buffer,d,h.buffer,h.byteOffset,f),h.byteLength===f?u.shift():(h.byteOffset+=f,h.byteLength-=f),e._queueTotalSize-=f,Oe(e,f,t),c-=f}return!1===l&&(y(0===e._queueTotalSize,"queue must be empty"),y(t.bytesFilled>0),y(t.bytesFilled0){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===Ie(e,t)&&(Le(e),_e(e._controlledReadableStream,t))}}function Re(e,t){var r=e._controlledReadableStream,a=1;t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,n={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return n.buffer=h(n.buffer),e._pendingPullIntos.push(n),G(r);if("closed"===r._state){var o=new t.constructor(n.buffer,n.byteOffset,0);return Promise.resolve(s(o,!0))}if(e._queueTotalSize>0){if(!0===Ie(e,n)){var c=Ae(n);return Te(e),Promise.resolve(s(c,!1))}if(!0===e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return je(e,l),Promise.reject(l)}}n.buffer=h(n.buffer),e._pendingPullIntos.push(n);var u=G(r);return Ce(e),u}function Be(e,t){t.buffer=h(t.buffer),y(0===t.bytesFilled,"bytesFilled must be 0");var r=e._controlledReadableStream;if(!0===$(r))while(Z(r)>0){var a=Le(e);_e(r,a)}}function De(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Oe(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,n=r.buffer.slice(i-a,i);Pe(e,n,0,n.byteLength)}r.buffer=h(r.buffer),r.bytesFilled-=a,_e(e._controlledReadableStream,r),Fe(e)}}function Me(e,t){var r=e._pendingPullIntos[0],a=e._controlledReadableStream;if("closed"===a._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");Be(e,r)}else y("readable"===a._state),De(e,t,r)}function Le(e){var t=e._pendingPullIntos.shift();return Ee(e),t}function Ne(e){var t=e._controlledReadableStream;return"readable"===t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===ee(t)&&Q(t)>0||(!0===$(t)&&Z(t)>0||ze(e)>0))))}function Ue(e){var t=e._controlledReadableStream;if(y(!1===e._closeRequested),y("readable"===t._state),e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos[0];if(r.bytesFilled>0){var a=new TypeError("Insufficient bytes to fill elements in the given buffer");throw je(e,a),a}}Y(t)}}function qe(e,t){var r=e._controlledReadableStream;y(!1===e._closeRequested),y("readable"===r._state);var a=t.buffer,i=t.byteOffset,n=t.byteLength,o=h(a);if(!0===ee(r))if(0===Q(r))Pe(e,o,i,n);else{y(0===e._queue.length);var s=new Uint8Array(o,i,n);J(r,s,!1)}else!0===$(r)?(Pe(e,o,i,n),Fe(e)):(y(!1===U(r),"stream must not be locked"),Pe(e,o,i,n))}function je(e,t){var r=e._controlledReadableStream;y("readable"===r._state),xe(e),x(e),V(r,t)}function ze(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function He(e,t){if(t=Number(t),!1===c(t))throw new RangeError("bytesWritten must be a finite");y(e._pendingPullIntos.length>0),Me(e,t)}function Ge(e,t){y(e._pendingPullIntos.length>0);var r=e._pendingPullIntos[0];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,Me(e,t.byteLength)}function We(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Xe(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Ye(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function Ve(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function Ke(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Je(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Ze(e,t){y(void 0!==e._closedPromise_resolve),y(void 0!==e._closedPromise_reject),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Qe(e,t){y(void 0===e._closedPromise_resolve),y(void 0===e._closedPromise_reject),e._closedPromise=Promise.reject(t)}function $e(e){y(void 0!==e._closedPromise_resolve),y(void 0!==e._closedPromise_reject),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function et(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function tt(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function rt(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function at(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function it(e){try{Promise.prototype.then.call(e,void 0,function(){})}catch(t){}}},function(e,t,r){var a=r(6),i=r(4),n=r(2);t.TransformStream=a.TransformStream,t.ReadableStream=i.ReadableStream,t.IsReadableStreamDisturbed=i.IsReadableStreamDisturbed,t.ReadableStreamDefaultControllerClose=i.ReadableStreamDefaultControllerClose,t.ReadableStreamDefaultControllerEnqueue=i.ReadableStreamDefaultControllerEnqueue,t.ReadableStreamDefaultControllerError=i.ReadableStreamDefaultControllerError,t.ReadableStreamDefaultControllerGetDesiredSize=i.ReadableStreamDefaultControllerGetDesiredSize,t.AcquireWritableStreamDefaultWriter=n.AcquireWritableStreamDefaultWriter,t.IsWritableStream=n.IsWritableStream,t.IsWritableStreamLocked=n.IsWritableStreamLocked,t.WritableStream=n.WritableStream,t.WritableStreamAbort=n.WritableStreamAbort,t.WritableStreamDefaultControllerError=n.WritableStreamDefaultControllerError,t.WritableStreamDefaultWriterCloseWithErrorPropagation=n.WritableStreamDefaultWriterCloseWithErrorPropagation,t.WritableStreamDefaultWriterRelease=n.WritableStreamDefaultWriterRelease,t.WritableStreamDefaultWriterWrite=n.WritableStreamDefaultWriterWrite},function(e,t,r){var a=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this._transformer=t;var r=t.readableStrategy,a=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void 0,this._writableController=void 0,this._readableController=void 0,this._transformStreamController=void 0,this._writableDone=!1,this._readableClosed=!1,this._backpressure=void 0,this._backpressureChangePromise=void 0,this._backpressureChangePromise_resolve=void 0,this._transformStreamController=new D(this);var n=void 0,s=new Promise(function(e){n=e}),l=new B(this,s);this._readable=new d(l,r);var u=new R(this,s);this._writable=new y(u,a),o(void 0!==this._writableController),o(void 0!==this._readableController);var h=v(this._readableController);I(this,h<=0);var f=this,g=c(t,"start",[f._transformStreamController]);n(g),s.catch(function(e){!1===f._errored&&(f._errored=!0,f._storedError=e)})}return a(e,[{key:"readable",get:function(){if(!1===F(this))throw N("readable");return this._readable}},{key:"writable",get:function(){if(!1===F(this))throw N("writable");return this._writable}}]),e}();function L(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function N(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.exports={TransformStream:M}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=!1;try{if("function"===typeof URL&&"object"===a(URL.prototype)&&"origin"in URL.prototype){var n=new URL("b","http://a");n.pathname="c%20d",i="http://a/c%20d"===n.href}}catch(c){}if(i)t.URL=URL;else{var o=r(129).URL,s=r(4).URL;s&&(o.createObjectURL=function(e){return s.createObjectURL.apply(s,arguments)},o.revokeObjectURL=function(e){s.revokeObjectURL(e)}),t.URL=o}},function(e,t,r){"use strict";(function(){var e=Object.create(null);e["ftp"]=21,e["file"]=0,e["gopher"]=70,e["http"]=80,e["https"]=443,e["ws"]=80,e["wss"]=443;var r=Object.create(null);function a(t){return void 0!==e[t]}function i(){f.call(this),this._isInvalid=!0}function n(e){return""===e&&i.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function s(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}r["%2e"]=".",r[".%2e"]="..",r["%2e."]="..",r["%2e%2e"]="..";var c,l=/[a-zA-Z]/,u=/[a-zA-Z0-9\+\-\.]/;function h(t,h,f){function d(e){y.push(e)}var g=h||"scheme start",p=0,m="",v=!1,b=!1,y=[];e:while((t[p-1]!==c||0===p)&&!this._isInvalid){var w=t[p];switch(g){case"scheme start":if(!w||!l.test(w)){if(h){d("Invalid scheme.");break e}m="",g="no scheme";continue}m+=w.toLowerCase(),g="scheme";break;case"scheme":if(w&&u.test(w))m+=w.toLowerCase();else{if(":"!==w){if(h){if(w===c)break e;d("Code point not allowed in scheme: "+w);break e}m="",p=0,g="no scheme";continue}if(this._scheme=m,m="",h)break e;a(this._scheme)&&(this._isRelative=!0),g="file"===this._scheme?"relative":this._isRelative&&f&&f._scheme===this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"===w?(this._query="?",g="query"):"#"===w?(this._fragment="#",g="fragment"):w!==c&&"\t"!==w&&"\n"!==w&&"\r"!==w&&(this._schemeData+=o(w));break;case"no scheme":if(f&&a(f._scheme)){g="relative";continue}d("Missing scheme."),i.call(this);break;case"relative or authority":if("/"!==w||"/"!==t[p+1]){d("Expected /, got: "+w),g="relative";continue}g="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!==this._scheme&&(this._scheme=f._scheme),w===c){this._host=f._host,this._port=f._port,this._path=f._path.slice(),this._query=f._query,this._username=f._username,this._password=f._password;break e}if("/"===w||"\\"===w)"\\"===w&&d("\\ is an invalid code point."),g="relative slash";else if("?"===w)this._host=f._host,this._port=f._port,this._path=f._path.slice(),this._query="?",this._username=f._username,this._password=f._password,g="query";else{if("#"!==w){var k=t[p+1],S=t[p+2];("file"!==this._scheme||!l.test(w)||":"!==k&&"|"!==k||S!==c&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S)&&(this._host=f._host,this._port=f._port,this._username=f._username,this._password=f._password,this._path=f._path.slice(),this._path.pop()),g="relative path";continue}this._host=f._host,this._port=f._port,this._path=f._path.slice(),this._query=f._query,this._fragment="#",this._username=f._username,this._password=f._password,g="fragment"}break;case"relative slash":if("/"!==w&&"\\"!==w){"file"!==this._scheme&&(this._host=f._host,this._port=f._port,this._username=f._username,this._password=f._password),g="relative path";continue}"\\"===w&&d("\\ is an invalid code point."),g="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==w){d("Expected '/', got: "+w),g="authority ignore slashes";continue}g="authority second slash";break;case"authority second slash":if(g="authority ignore slashes","/"!==w){d("Expected '/', got: "+w);continue}break;case"authority ignore slashes":if("/"!==w&&"\\"!==w){g="authority";continue}d("Expected authority, got: "+w);break;case"authority":if("@"===w){v&&(d("@ already seen."),m+="%40"),v=!0;for(var C=0;C=0,n=i&&a.regeneratorRuntime;if(a.regeneratorRuntime=void 0,e.exports=r(133),i)a.regeneratorRuntime=n;else try{delete a.regeneratorRuntime}catch(o){a.regeneratorRuntime=void 0}},function(e,t,r){"use strict";(function(e){var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(r){var a,i=Object.prototype,n=i.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag",u="object"===t(e),h=r.regeneratorRuntime;if(h)u&&(e.exports=h);else{h=r.regeneratorRuntime=u?e.exports:{},h.wrap=k;var f="suspendedStart",d="suspendedYield",g="executing",p="completed",m={},v={};v[s]=function(){return this};var b=Object.getPrototypeOf,y=b&&b(b(R([])));y&&y!==i&&n.call(y,s)&&(v=y);var w=_.prototype=C.prototype=Object.create(v);x.prototype=w.constructor=_,_.constructor=x,_[l]=x.displayName="GeneratorFunction",h.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},h.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(w),e},h.awrap=function(e){return{__await:e}},A(P.prototype),P.prototype[c]=function(){return this},h.AsyncIterator=P,h.async=function(e,t,r,a){var i=new P(k(e,t,r,a));return h.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},A(w),w[l]="Generator",w[s]=function(){return this},w.toString=function(){return"[object Generator]"},h.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){while(t.length){var a=t.pop();if(a in e)return r.value=a,r.done=!1,r}return r.done=!0,r}},h.values=R,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=a)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=a),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var i=a.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:R(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=a),m}}}function k(e,t,r,a){var i=t&&t.prototype instanceof C?t:C,n=Object.create(i.prototype),o=new F(a||[]);return n._invoke=I(e,r,o),n}function S(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(a){return{type:"throw",arg:a}}}function C(){}function x(){}function _(){}function A(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function P(e){function r(a,i,o,s){var c=S(e[a],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"===("undefined"===typeof u?"undefined":t(u))&&n.call(u,"__await")?Promise.resolve(u.__await).then(function(e){r("next",e,o,s)},function(e){r("throw",e,o,s)}):Promise.resolve(u).then(function(e){l.value=e,o(l)},s)}s(c.arg)}var a;function i(e,t){function i(){return new Promise(function(a,i){r(e,t,a,i)})}return a=a?a.then(i,i):i()}this._invoke=i}function I(e,t,r){var a=f;return function(i,n){if(a===g)throw new Error("Generator is already running");if(a===p){if("throw"===i)throw n;return B()}r.method=i,r.arg=n;while(1){var o=r.delegate;if(o){var s=O(o,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=g;var c=S(e,t,r);if("normal"===c.type){if(a=r.done?p:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=p,r.method="throw",r.arg=c.arg)}}}function O(e,t){var r=e.iterator[t.method];if(r===a){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=a,O(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=S(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var n=i.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=a),t.delegate=null,m):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function R(e){if(e){var t=e[s];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){while(++r=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(a=r;a=t)&&!(t<=this.progressiveDataLength))for(var r=this.chunkSize,i=Math.floor(e/r),n=Math.floor((t-1)/r)+1,o=i;o=this.end?-1:(this.ensureByte(e),this.bytes[this.pos++])},getUint16:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){var e=this.getByte(),t=this.getByte(),r=this.getByte(),a=this.getByte();return(e<<24)+(t<<16)+(r<<8)+a},getBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,a=this.pos,i=this.end;if(!e){this.ensureRange(a,i);var n=r.subarray(a,i);return t?new Uint8ClampedArray(n):n}var o=a+e;o>i&&(o=i),this.ensureRange(a,o),this.pos=o;var s=r.subarray(a,o);return t?new Uint8ClampedArray(s):s},peekByte:function(){var e=this.getByte();return this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},getByteRange:function(e,t){return this.ensureRange(e,t),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){function a(){}this.ensureRange(e,e+t),a.prototype=Object.create(this),a.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,a=[],i=t;i=0&&a+1!==n&&(t.push({beginChunk:r,endChunk:a+1}),r=n),i+1===e.length&&t.push({beginChunk:r,endChunk:n+1}),a=n}return t},onProgress:function(e){var t=this.stream.numChunksLoaded*this.chunkSize+e.loaded;this.msgHandler.send("DocProgress",{loaded:t,total:this.length})},onReceiveData:function(e){var t=e.chunk,r=void 0===e.begin,i=r?this.progressiveDataLength:e.begin,n=i+t.byteLength,o=Math.floor(i/this.chunkSize),s=n1&&void 0!==arguments[1]&&arguments[1],r=(0,i.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&(0,o.isDict)(r[0])?o.Dict.merge(this.xref,r):r[0]:r},get content(){return this.pageDict.get("Contents")},get resources(){return(0,i.shadow)(this,"resources",this._getInheritableProperty("Resources")||o.Dict.empty)},get mediaBox(){var e=this._getInheritableProperty("MediaBox",!0);return Array.isArray(e)&&4===e.length?(0,i.shadow)(this,"mediaBox",e):(0,i.shadow)(this,"mediaBox",t)},get cropBox(){var e=this._getInheritableProperty("CropBox",!0);return Array.isArray(e)&&4===e.length?(0,i.shadow)(this,"cropBox",e):(0,i.shadow)(this,"cropBox",this.mediaBox)},get userUnit(){var t=this.pageDict.get("UserUnit");return(!(0,i.isNum)(t)||t<=0)&&(t=e),(0,i.shadow)(this,"userUnit",t)},get view(){var e=this.mediaBox,t=this.cropBox;if(e===t)return(0,i.shadow)(this,"view",e);var r=i.Util.intersect(t,e);return(0,i.shadow)(this,"view",r||e)},get rotate(){var e=this._getInheritableProperty("Rotate")||0;return e%90!==0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),(0,i.shadow)(this,"rotate",e)},getContentStream:function(){var e,t=this.content;if(Array.isArray(t)){var r,a=this.xref,i=t.length,n=[];for(r=0;rn&&(r=n-i);for(var s=0;s0)o-=a-"startxref".length,o<0&&(o=0),e.pos=o,n=c(e,"startxref",a,!0);if(n){var s;e.skip(9);do{s=e.getByte()}while((0,i.isSpace)(s));var l="";while(s>=32&&s<=57)l+=String.fromCharCode(s),s=e.getByte();t=parseInt(l,10),isNaN(t)&&(t=0)}}return(0,i.shadow)(this,"startXRef",t)},checkHeader:function(){var e=this.stream;if(e.reset(),c(e,"%PDF-",1024)){e.moveStart();var t,r=12,a="";while((t=e.getByte())>32){if(a.length>=r)break;a+=String.fromCharCode(t)}this.pdfFormatVersion||(this.pdfFormatVersion=a.substring(5))}else;},parseStartXRef:function(){var e=this.startXRef;this.xref.setStartXRef(e)},setup:function(e){this.xref.parse(e),this.catalog=new n.Catalog(this.pdfManager,this.xref)},get numPages(){var e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,i.shadow)(this,"numPages",t)},get documentInfo(){var e={PDFFormatVersion:this.pdfFormatVersion,IsLinearized:!!this.linearization,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa},t=void 0;try{t=this.xref.trailer.get("Info")}catch(n){if(n instanceof i.MissingDataException)throw n;(0,i.info)("The document information dictionary is invalid.")}if((0,o.isDict)(t))for(var r in h)if(t.has(r)){var a=t.get(r);h[r](a)?e[r]="string"!==typeof a?a:(0,i.stringToPDFString)(a):(0,i.info)('Bad value in document info for "'+r+'"')}return(0,i.shadow)(this,"documentInfo",e)},get fingerprint(){var r,a=this.xref,n="",o=a.trailer.get("ID");Array.isArray(o)&&o[0]&&(0,i.isString)(o[0])&&o[0]!==t?r=(0,i.stringToBytes)(o[0]):(this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(e,this.stream.end)),r=(0,l.calculateMD5)(this.stream.bytes.subarray(0,e),0,e));for(var s=0,c=r.length;s0){var s=a.shift(),u=n.fetchIfRef(s.obj);if(null!==u){if(!u.has("Title"))throw new c.FormatError("Invalid outline item encountered.");var h={url:null,dest:null};e.parseDestDictionary({destDict:u,resultObj:h,docBaseUrl:this.pdfManager.docBaseUrl});var f=u.get("Title"),g=u.get("F")||0,p=u.getArray("C"),m=o;!Array.isArray(p)||3!==p.length||0===p[0]&&0===p[1]&&0===p[2]||(m=d.ColorSpace.singletons.rgb.getRgb(p,0));var v={dest:h.dest,url:h.url,unsafeUrl:h.unsafeUrl,newWindow:h.newWindow,title:(0,c.stringToPDFString)(f),color:m,count:u.get("Count"),bold:!!(2&g),italic:!!(1&g),items:[]};s.parent.items.push(v),t=u.getRaw("First"),(0,l.isRef)(t)&&!i.has(t)&&(a.push({obj:t,parent:v}),i.put(t)),t=u.getRaw("Next"),(0,l.isRef)(t)&&!i.has(t)&&(a.push({obj:t,parent:s.parent}),i.put(t))}}return r.items.length>0?r.items:null}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(0,l.isDict)(e))return null;var t=e.get("P");if(!(0,c.isNum)(t))return null;t+=Math.pow(2,32);var r=[];for(var a in c.PermissionFlag){var i=c.PermissionFlag[a];t&i&&r.push(i)}return r}},{key:"getDestination",value:function(e){var t=this._readDests();return t instanceof C||t instanceof l.Dict?y(t.get(e)||null):null}},{key:"_readDests",value:function(){var e=this.catDict.get("Names");return e&&e.has("Dests")?new C(e.getRaw("Dests"),this.xref):this.catDict.has("Dests")?this.catDict.get("Dests"):void 0}},{key:"_readPageLabels",value:function(){var e=this.catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,a="",i=new x(e,this.xref),n=i.getAll(),o="",s=1,u=0,h=this.numPages;u=1))throw new c.FormatError("Invalid start in PageLabel dictionary.");s=p}else s=1}switch(r){case"D":o=s;break;case"R":case"r":o=(0,c.toRomanNumerals)(s,"r"===r);break;case"A":case"a":for(var m=26,v=65,b=97,y="a"===r?b:v,w=s-1,k=String.fromCharCode(y+w%m),S=[],C=0,_=w/m|0;C<=_;C++)S.push(k);o=S.join("");break;default:if(r)throw new c.FormatError('Invalid style "'+r+'" in PageLabel dictionary.');o=""}t[u]=a+o,s++}return t}},{key:"cleanup",value:function(){var e=this;this.pageKidsCountCache.clear();var t=[];return this.fontCache.forEach(function(e){t.push(e)}),Promise.all(t).then(function(t){for(var r=0,a=t.length;r0&&s+n=0){var h=o.objId;if(h&&!i.has(h)&&i.put(h,n),s+n<=e)return s+=n,"continue"}var f=o.get("Kids");if(!Array.isArray(f))return(0,l.isName)(o.get("Type"),"Page")||!o.has("Type")&&o.has("Contents")?s===e?(t.resolve([o,null]),{v:void 0}):(s++,"continue"):(t.reject(new c.FormatError("Page dictionary kids object is not an array.")),{v:void 0});for(var d=f.length-1;d>=0;d--)r.push(f[d])};while(r.length){var f=h();switch(f){case"continue":continue;default:if("object"===("undefined"===typeof f?"undefined":o(f)))return f.v}}t.reject(new Error("Page index "+e+" not found."))}return u(),t.promise}},{key:"getPageIndex",value:function(e){var t=this.xref;function r(r){var a=0,i=void 0;return t.fetchAsync(r).then(function(t){if((0,l.isRefsEqual)(r,e)&&!(0,l.isDict)(t,"Page")&&(!(0,l.isDict)(t)||t.has("Type")||!t.has("Contents")))throw new c.FormatError("The reference does not point to a /Page dictionary.");if(!t)return null;if(!(0,l.isDict)(t))throw new c.FormatError("Node must be a dictionary.");return i=t.getRaw("Parent"),t.getAsync("Parent")}).then(function(e){if(!e)return null;if(!(0,l.isDict)(e))throw new c.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")}).then(function(e){if(!e)return null;for(var n=[],o=!1,s=0,u=e.length;s0){var u=l[0],h=l[1];if(!Number.isInteger(u)||!Number.isInteger(h))throw new c.FormatError("Invalid XRef range fields: "+u+", "+h);if(!Number.isInteger(n)||!Number.isInteger(o)||!Number.isInteger(s))throw new c.FormatError("Invalid XRef entry fields length: "+u+", "+h);for(t=a.entryNum;t=e.length)break;i+=String.fromCharCode(o),o=e[a]}return i}function s(e,t,r){var a=r.length,i=e.length,n=0;while(t=a)break;t++,n++}return n}var h=/^(\d+)\s+(\d+)\s+obj\b/,f=/\bendobj[\b\s]$/,d=/\s+(\d+\s+\d+\s+obj[\b\s])$/,g=25,p=new Uint8Array([116,114,97,105,108,101,114]),m=new Uint8Array([115,116,97,114,116,120,114,101,102]),v=new Uint8Array([111,98,106]),b=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var y=this.stream;y.pos=0;var w,k,S=y.getBytes(),C=y.start,x=S.length,_=[],A=[];while(C=x)break;P=S[C]}while(P!==t&&P!==r);else++C}for(w=0,k=A.length;w0){var i=t.fetchIfRef(a.shift());if((0,l.isDict)(i))if(i.has("Kids"))for(var n=i.get("Kids"),o=0,s=n.length;oi)return(0,c.warn)('Search depth limit reached for "'+this._type+'" tree.'),null;var n=r.get("Kids");if(!Array.isArray(n))return null;var o=0,s=n.length-1;while(o<=s){var l=o+s>>1,u=t.fetchIfRef(n[l]),h=u.get("Limits");if(et.fetchIfRef(h[1]))){r=t.fetchIfRef(n[l]);break}o=l+1}}if(o>s)return null}var f=r.get(this._type);if(Array.isArray(f)){var d=0,g=f.length-2;while(d<=g){var p=d+g&-2,m=t.fetchIfRef(f[p]);if(em))return t.fetchIfRef(f[p+1]);d=p+2}}}return null}}]),e}(),C=function(e){function t(e,r){return b(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,"Names"))}return m(t,e),t}(S),x=function(e){function t(e,r){return b(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,"Nums"))}return m(t,e),t}(S),_=function(){function e(e,t){e&&(0,l.isDict)(e)&&(this.xref=t,this.root=e,e.has("FS")&&(this.fs=e.get("FS")),this.description=e.has("Desc")?(0,c.stringToPDFString)(e.get("Desc")):"",e.has("RF")&&(0,c.warn)("Related file specifications are not supported"),this.contentAvailable=!0,e.has("EF")||(this.contentAvailable=!1,(0,c.warn)("Non-embedded file specifications are not supported")))}function t(e){return e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null}return e.prototype={get filename(){if(!this._filename&&this.root){var e=t(this.root)||"unnamed";this._filename=(0,c.stringToPDFString)(e).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=t(this.root.get("EF")));var e=null;if(this.contentRef){var r=this.xref,a=r.fetchIfRef(this.contentRef);a&&(0,l.isStream)(a)?e=a.getBytes():(0,c.warn)("Embedded file specification points to non-existing/invalid content")}else(0,c.warn)("Embedded file specification does not have a content");return e},get serializable(){return{filename:this.filename,content:this.content}}},e}(),A=function(){function e(e){return(0,l.isRef)(e)||(0,l.isDict)(e)||Array.isArray(e)||(0,l.isStream)(e)}function t(t,r){if((0,l.isDict)(t)||(0,l.isStream)(t))for(var a=(0,l.isDict)(t)?t:t.dict,i=a.getKeys(),n=0,o=i.length;n>")&&!(0,n.isEOF)(this.buf1))if((0,n.isName)(this.buf1)){var o=this.buf1.name;if(this.shift(),(0,n.isEOF)(this.buf1))break;a.set(o,this.getObj(e))}else(0,i.info)("Malformed dictionary: key must be a name object"),this.shift();if((0,n.isEOF)(this.buf1)){if(!this.recoveryMode)throw new i.FormatError("End of file inside dictionary");return a}return(0,n.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(a,e):a:(this.shift(),a);default:return t}if(Number.isInteger(t)){var s=t;if(Number.isInteger(this.buf1)&&(0,n.isCmd)(this.buf2,"R")){var c=new n.Ref(s,this.buf1);return this.shift(),this.shift(),c}return s}if((0,i.isString)(t)){var l=t;return e&&(l=e.decryptString(l)),l}return t},findDefaultInlineStreamEnd:function(e){var t=69,r=73,a=32,n=10,o=13,s=10,c=0,l=e.pos,u=0,h=void 0,f=void 0;while(-1!==(h=e.getByte()))if(0===u)u=h===t?1:0;else if(1===u)u=h===r?2:0;else if((0,i.assert)(2===u),h===a||h===n||h===o){f=e.pos;for(var d=e.peekBytes(s),g=0,p=d.length;g127)){u=0;break}if(2===u)break}else u=0;return-1===h&&((0,i.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),f&&((0,i.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-f)))),e.pos-4-l},findDCTDecodeInlineStreamEnd:function(e){var t,r,a,n=e.pos,o=!1;while(-1!==(t=e.getByte()))if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:o=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:r=e.getUint16(),r>2?e.skip(r-2):e.skip(-2);break}if(o)break}return a=e.pos-n,-1===t?((0,i.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-a),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),a)},findASCII85DecodeInlineStreamEnd:function(e){var t,r,a=126,n=62,o=e.pos;while(-1!==(t=e.getByte()))if(t===a&&e.peekByte()===n){e.skip();break}return r=e.pos-o,-1===t?((0,i.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-r),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),r)},findASCIIHexDecodeInlineStreamEnd:function(e){var t,r,a=62,n=e.pos;while(-1!==(t=e.getByte()))if(t===a)break;return r=e.pos-n,-1===t?((0,i.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-r),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),r)},inlineStreamSkipEI:function(e){var t,r=69,a=73,i=0;while(-1!==(t=e.getByte()))if(0===i)i=t===r?1:0;else if(1===i)i=t===a?2:0;else if(2===i)break},makeInlineImage:function(e){var t=this.lexer,r=t.stream,a=new n.Dict(this.xref),o=void 0;while(!(0,n.isCmd)(this.buf1,"ID")&&!(0,n.isEOF)(this.buf1)){if(!(0,n.isName)(this.buf1))throw new i.FormatError("Dictionary key must be a name object");var s=this.buf1.name;if(this.shift(),(0,n.isEOF)(this.buf1))break;a.set(s,this.getObj(e))}-1!==t.beginInlineImagePos&&(o=r.pos-t.beginInlineImagePos);var c,l=a.get("Filter","F");if((0,n.isName)(l))c=l.name;else if(Array.isArray(l)){var d=this.xref.fetchIfRef(l[0]);(0,n.isName)(d)&&(c=d.name)}var g=r.pos,p=void 0;p="DCTDecode"===c||"DCT"===c?this.findDCTDecodeInlineStreamEnd(r):"ASCII85Decode"===c||"A85"===c?this.findASCII85DecodeInlineStreamEnd(r):"ASCIIHexDecode"===c||"AHx"===c?this.findASCIIHexDecodeInlineStreamEnd(r):this.findDefaultInlineStreamEnd(r);var m=r.makeSubStream(g,p,a),v=void 0;if(p=i)return r.pos+=s,r.pos-e;s++}r.pos+=o}return-1},makeStream:function(e,t){var r=this.lexer,a=r.stream;r.skipToNextLine();var o=a.pos-1,s=e.get("Length");if(Number.isInteger(s)||((0,i.info)("Bad "+s+" attribute in stream"),s=0),a.pos=o+s,r.nextChar(),this.tryShift()&&(0,n.isCmd)(this.buf2,"endstream"))this.shift();else{var c=new Uint8Array([101,110,100,115,116,114,101,97,109]),l=this._findStreamLength(o,c);if(l<0){for(var u=1,h=1;h<=u;h++){var f=c.length-h,d=c.slice(0,f),g=this._findStreamLength(o,d);if(g>=0){var p=a.peekBytes(f+1)[f];if(!(0,i.isSpace)(p))break;(0,i.info)('Found "'+(0,i.bytesToString)(d)+'" when searching for endstream command.'),l=g;break}}if(l<0)throw new i.FormatError("Missing endstream command.")}s=l,r.nextChar(),this.shift(),this.shift()}return this.shift(),a=a.makeSubStream(o,s,e),t&&(a=t.createStream(a,s)),a=this.filter(a,e,s),a.dict=e,a},filter:function(e,t,r){var a=t.get("Filter","F"),o=t.get("DecodeParms","DP");if((0,n.isName)(a))return Array.isArray(o)&&(0,i.warn)("/DecodeParms should not contain an Array, when /Filter contains a Name."),this.makeFilter(e,a.name,r,o);var s=r;if(Array.isArray(a))for(var c=a,l=o,u=0,h=c.length;u=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}return e.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var e=this.currentChar,t=!1,r=0,a=0;if(45===e?(a=-1,e=this.nextChar(),45===e&&(e=this.nextChar())):43===e&&(a=1,e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){if(10===r&&0===a&&((0,i.isSpace)(e)||-1===e))return(0,i.warn)("Lexer.getNumber - treating a single decimal point as zero."),0;throw new i.FormatError("Invalid number: "+String.fromCharCode(e)+" (charCode "+e+")")}a=a||1;var n=e-48,o=0,s=1;while((e=this.nextChar())>=0)if(48<=e&&e<=57){var c=e-48;t?o=10*o+c:(0!==r&&(r*=10),n=10*n+c)}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,i.warn)("Badly formatted number");else{if(69!==e&&101!==e)break;if(e=this.peekChar(),43===e||45===e)s=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(n/=r),t&&(n*=Math.pow(10,s*o)),a*n},getString:function(){var e=1,t=!1,r=this.strBuf;r.length=0;var a=this.nextChar();while(1){var n=!1;switch(0|a){case-1:(0,i.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0===--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(a=this.nextChar(),a){case-1:(0,i.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(a));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var o=15&a;a=this.nextChar(),n=!0,a>=48&&a<=55&&(o=(o<<3)+(15&a),a=this.nextChar(),a>=48&&a<=55&&(n=!1,o=(o<<3)+(15&a))),r.push(String.fromCharCode(o));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(a));break}break;default:r.push(String.fromCharCode(a));break}if(t)break;n||(a=this.nextChar())}return r.join("")},getName:function(){var e,a,o=this.strBuf;o.length=0;while((e=this.nextChar())>=0&&!t[e])if(35===e){if(e=this.nextChar(),t[e]){(0,i.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),o.push("#");break}var s=r(e);if(-1!==s){a=e,e=this.nextChar();var c=r(e);if(-1===c){if((0,i.warn)("Lexer_getName: Illegal digit ("+String.fromCharCode(e)+") in hexadecimal number."),o.push("#",String.fromCharCode(a)),t[e])break;o.push(String.fromCharCode(e));continue}o.push(String.fromCharCode(s<<4|c))}else o.push("#",String.fromCharCode(e))}else o.push(String.fromCharCode(e));return o.length>127&&(0,i.warn)("name token is longer than allowed by the spec: "+o.length),n.Name.get(o.join(""))},getHexString:function(){var e=this.strBuf;e.length=0;var a,n,o=this.currentChar,s=!0;while(1){if(o<0){(0,i.warn)("Unterminated hex string");break}if(62===o){this.nextChar();break}if(1!==t[o]){if(s){if(a=r(o),-1===a){(0,i.warn)('Ignoring invalid character "'+o+'" in hex string'),o=this.nextChar();continue}}else{if(n=r(o),-1===n){(0,i.warn)('Ignoring invalid character "'+o+'" in hex string'),o=this.nextChar();continue}e.push(String.fromCharCode(a<<4|n))}s=!s,o=this.nextChar()}else o=this.nextChar()}return e.join("")},getObj:function(){var e=!1,r=this.currentChar;while(1){if(r<0)return n.EOF;if(e)10!==r&&13!==r||(e=!1);else if(37===r)e=!0;else if(1!==t[r])break;r=this.nextChar()}switch(0|r){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),n.Cmd.get("[");case 93:return this.nextChar(),n.Cmd.get("]");case 60:return r=this.nextChar(),60===r?(this.nextChar(),n.Cmd.get("<<")):this.getHexString();case 62:return r=this.nextChar(),62===r?(this.nextChar(),n.Cmd.get(">>")):n.Cmd.get(">");case 123:return this.nextChar(),n.Cmd.get("{");case 125:return this.nextChar(),n.Cmd.get("}");case 41:throw this.nextChar(),new i.FormatError("Illegal character: "+r)}var a=String.fromCharCode(r),o=this.knownCommands,s=o&&void 0!==o[a];while((r=this.nextChar())>=0&&!t[r]){var c=a+String.fromCharCode(r);if(s&&void 0===o[c])break;if(128===a.length)throw new i.FormatError("Command token too long: "+a.length);a=c,s=o&&void 0!==o[a]}return"true"===a||"false"!==a&&("null"===a?null:("BI"===a&&(this.beginInlineImagePos=this.stream.pos),n.Cmd.get(a)))},skipToNextLine:function(){var e=this.currentChar;while(e>=0){if(13===e){e=this.nextChar(),10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}},e}(),p={create:function(e){function t(e,t){var r=h.get(e);if(Number.isInteger(r)&&(t?r>=0:r>0))return r;throw new Error('The "'+e+'" parameter in the linearization dictionary is invalid.')}function r(){var e,t,r=h.get("H");if(Array.isArray(r)&&(2===(e=r.length)||4===e)){for(var a=0;a0))throw new Error("Hint ("+a+") in the linearization dictionary is invalid.");return r}throw new Error("Hint array in the linearization dictionary is invalid.")}var a,o,s=new d(new g(e),!1,null),c=s.getObj(),l=s.getObj(),u=s.getObj(),h=s.getObj();if(!(Number.isInteger(c)&&Number.isInteger(l)&&(0,n.isCmd)(u,"obj")&&(0,n.isDict)(h)&&(0,i.isNum)(a=h.get("Linearized"))&&a>0))return null;if((o=t("L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:o,hints:r(),objectNumberFirst:t("O"),endFirst:t("E"),numPages:t("N"),mainXRefEntriesOffset:t("T"),pageFirst:h.has("P")?t("P",!0):0}}};t.Lexer=g,t.Linearization=p,t.Parser=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=t.StringStream=t.StreamsSequenceStream=t.Stream=t.RunLengthStream=t.PredictorStream=t.NullStream=t.FlateStream=t.DecodeStream=t.DecryptStream=t.AsciiHexStream=t.Ascii85Stream=void 0;var a=r(2),i=r(138);function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t=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(){var e=this.getByte(),t=this.getByte(),r=this.getByte(),a=this.getByte();return(e<<24)+(t<<16)+(r<<8)+a},getBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.bytes,a=this.pos,i=this.end;if(!e){var n=r.subarray(a,i);return t?new Uint8ClampedArray(n):n}var o=a+e;o>i&&(o=i),this.pos=o;var s=r.subarray(a,o);return t?new Uint8ClampedArray(s):s},peekByte:function(){var e=this.getByte();return this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(t,r,a){return new e(this.bytes.buffer,t,r,a)}},e}(),s=function(){function e(e){var t=(0,a.stringToBytes)(e);o.call(this,t)}return e.prototype=o.prototype,e}(),c=function(){var e=new Uint8Array(0);function t(t){if(this._rawMinBufferLength=t||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=e,this.minBufferLength=512,t)while(this.minBufferLength1&&void 0!==arguments[1]&&arguments[1],a=this.pos;if(e){this.ensureBuffer(a+e),t=a+e;while(!this.eof&&this.bufferLengthi&&(t=i)}else{while(!this.eof)this.readBlock();t=this.bufferLength}this.pos=t;var n=this.buffer.subarray(a,t);return!r||n instanceof Uint8ClampedArray?n:new Uint8ClampedArray(n)},peekByte:function(){var e=this.getByte();return this.pos--,e},peekBytes:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getBytes(e,t);return this.pos-=r.length,r},makeSubStream:function(e,t,r){var a=e+t;while(this.bufferLength<=a&&!this.eof)this.readBlock();return new o(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},t}(),l=function(){function e(e){this.streams=e;for(var t=0,r=0,a=e.length;r>e,this.codeSize=i-=e,t},o.prototype.getCode=function(e){var t,r=this.str,i=e[0],n=e[1],o=this.codeSize,s=this.codeBuf;while(o>16,u=65535&c;if(l<1||o>l,this.codeSize=o-l,u},o.prototype.generateHuffmanTable=function(e){var t,r=e.length,a=0;for(t=0;ta&&(a=e[t]);for(var i=1<>=1;for(t=u;t>=1,0!==l){var u,h;if(1===l)u=i,h=n;else{if(2!==l)throw new a.FormatError("Unknown block type in flate stream");var f,d=this.getBits(5)+257,g=this.getBits(5)+1,p=this.getBits(4)+4,m=new Uint8Array(e.length);for(f=0;f0)S[f++]=w}u=this.generateHuffmanTable(S.subarray(0,d)),h=this.generateHuffmanTable(S.subarray(d,k))}o=this.buffer;var _=o?o.length:0,A=this.bufferLength;while(1){var P=this.getCode(u);if(P<256)A+1>=_&&(o=this.ensureBuffer(A+1),_=o.length),o[A++]=P;else{if(256===P)return void(this.bufferLength=A);P-=257,P=t[P];var I=P>>16;I>0&&(I=this.getBits(I)),s=(65535&P)+I,P=this.getCode(h),P=r[P],I=P>>16,I>0&&(I=this.getBits(I));var O=(65535&P)+I;A+s>=_&&(o=this.ensureBuffer(A+s),_=o.length);for(var T=0;T15))throw new a.FormatError("Unsupported predictor: "+n);this.readBlock=2===n?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;var o=this.colors=r.get("Colors")||1,s=this.bits=r.get("BitsPerComponent")||8,l=this.columns=r.get("Columns")||1;return this.pixBytes=o*s+7>>3,this.rowBytes=l*o*s+7>>3,c.call(this,t),this}return e.prototype=Object.create(c.prototype),e.prototype.readBlockTiff=function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),a=this.bits,i=this.colors,n=this.str.getBytes(e);if(this.eof=!n.length,!this.eof){var o,s=0,c=0,l=0,u=0,h=t;if(1===a&&1===i)for(o=0;o>1,f^=f>>2,f^=f>>4,s=(1&f)<<7,r[h++]=f}else if(8===a){for(o=0;o>8&255,r[h++]=255&g}}else{var p=new Uint8Array(i+1),m=(1<>l-a)&m,l-=a,c=c<=8&&(r[b++]=c>>u-8&255,u-=8);u>0&&(r[b++]=(c<<8-u)+(s&(1<<8-u)-1))}this.bufferLength+=e}},e.prototype.readBlockPng=function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var n=this.bufferLength,o=this.ensureBuffer(n+e),s=o.subarray(n-e,n);0===s.length&&(s=new Uint8Array(e));var c,l,u,h=n;switch(r){case 0:for(c=0;c>1)+i[c];for(;c>1)+i[c]&255,h++;break;case 4:for(c=0;c0,a=this.decrypt;e=a(e,!r);var i,n=this.bufferLength,o=e.length,s=this.ensureBuffer(n+o);for(i=0;i=0;--s)o[c+s]=255&u,u>>=8}}else this.eof=!0},e}(),g=function(){function e(e,t){this.str=e,this.dict=e.dict,this.firstDigit=-1,t&&(t*=.5),c.call(this,t)}return e.prototype=Object.create(c.prototype),e.prototype.readBlock=function(){var e=8e3,t=this.str.getBytes(e);if(t.length){for(var r=t.length+1>>1,a=this.ensureBuffer(this.bufferLength+r),i=this.bufferLength,n=this.firstDigit,o=0,s=t.length;o=48&&l<=57)c=15&l;else{if(!(l>=65&&l<=70||l>=97&&l<=102)){if(62===l){this.eof=!0;break}continue}c=9+(15&l)}n<0?n=c:(a[i++]=n<<4|c,n=-1)}n>=0&&this.eof&&(a[i++]=n<<4,n=-1),this.firstDigit=n,this.bufferLength=i}else this.eof=!0},e}(),p=function(){function e(e,t){this.str=e,this.dict=e.dict,c.call(this,t)}return e.prototype=Object.create(c.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])this.eof=!0;else{var t,r=this.bufferLength,a=e[0];if(a<128){if(t=this.ensureBuffer(r+a+1),t[r++]=e[1],a>0){var i=this.str.getBytes(a);t.set(i,r),r+=a}}else{a=257-a;var n=e[1];t=this.ensureBuffer(r+a+1);for(var o=0;o>>t&(1<0;if(y<256)g[0]=y,p=1;else{if(!(y>=258)){if(256===y){f=9,c=258,p=0;continue}this.eof=!0,delete this.lzwState;break}if(y=0;t--)g[t]=l[r],r=h[r];else g[p++]=g[0]}if(w&&(h[c]=d,u[c]=u[d]+1,l[c]=g[0],c++,f=c+s&c+s-1?f:0|Math.min(Math.log(c+s)/.6931471805599453+1,12)),d=y,m+=p,i1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!==typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e,this.eof=!1,this.encoding=t["K"]||0,this.eoline=t["EndOfLine"]||!1,this.byteAlign=t["EncodedByteAlign"]||!1,this.columns=t["Columns"]||1728,this.rows=t["Rows"]||0;var r=t["EndOfBlock"];null!==r&&void 0!==r||(r=!0),this.eoblock=r,this.black=t["BlackIs1"]||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;var a=void 0;while(0===(a=this._lookBits(12)))this._eatBits(1);1===a&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}return b.prototype={readNextChar:function(){if(this.eof)return-1;var e=this.refLine,f=this.codingLine,d=this.columns,g=void 0,p=void 0,m=void 0,v=void 0;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;this.err=!1;var b=void 0,y=void 0,w=void 0;if(this.nextLine2D){for(v=0;f[v]=64);do{y+=w=this._getWhiteCode()}while(w>=64)}else{do{b+=w=this._getWhiteCode()}while(w>=64);do{y+=w=this._getBlackCode()}while(w>=64)}this._addPixels(f[this.codingPos]+b,p),f[this.codingPos]0?--g:++g;while(e[g]<=f[this.codingPos]&&e[g]0?--g:++g;while(e[g]<=f[this.codingPos]&&e[g]0?--g:++g;while(e[g]<=f[this.codingPos]&&e[g]=64);else do{b+=w=this._getWhiteCode()}while(w>=64);this._addPixels(f[this.codingPos]+b,p),p^=1}}var k=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(b=this._lookBits(12),this.eoline)while(b!==t&&1!==b)this._eatBits(1),b=this._lookBits(12);else while(0===b)this._eatBits(1),b=this._lookBits(12);1===b?(this._eatBits(12),k=!0):b===t&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&k&&this.byteAlign){if(b=this._lookBits(12),1===b){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(v=0;v<4;++v)b=this._lookBits(12),1!==b&&(0,a.info)("bad rtc code: "+b),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){while(1){if(b=this._lookBits(13),b===t)return this.eof=!0,-1;if(b>>1===1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&b))}f[0]>0?this.outputBits=f[this.codingPos=0]:this.outputBits=f[this.codingPos=1],this.row++}var S=void 0;if(this.outputBits>=8)S=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&f[this.codingPos]m?(S<<=m,1&this.codingPos||(S|=255>>8-m),this.outputBits-=m,m=0):(S<<=this.outputBits,1&this.codingPos||(S|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,f[this.codingPos]0&&(S<<=m,m=0))}while(m)}return this.black&&(S^=255),S},_addPixels:function(e,t){var r=this.codingLine,i=this.codingPos;e>r[i]&&(e>this.columns&&((0,a.info)("row is wrong length"),this.err=!0,e=this.columns),1&i^t&&++i,r[i]=e),this.codingPos=i},_addPixelsNeg:function(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i])e>this.columns&&((0,a.info)("row is wrong length"),this.err=!0,e=this.columns),1&i^t&&++i,r[i]=e;else if(e0&&e=n){var c=a[s-n];if(c[0]===o)return this._eatBits(o),[!0,c[1],!0]}}return[!1,0,!1]},_getTwoDimCode:function(){var e=0,r=void 0;if(this.eoblock){if(e=this._lookBits(7),r=f[e],r&&r[0]>0)return this._eatBits(r[0]),r[1]}else{var i=this._findTableCode(1,7,f);if(i[0]&&i[2])return i[1]}return(0,a.info)("Bad two dim code"),t},_getWhiteCode:function(){var e=0,r=void 0;if(this.eoblock){if(e=this._lookBits(12),e===t)return 1;if(r=e>>5===0?d[e]:g[e>>3],r[0]>0)return this._eatBits(r[0]),r[1]}else{var i=this._findTableCode(1,9,g);if(i[0])return i[1];if(i=this._findTableCode(11,12,d),i[0])return i[1]}return(0,a.info)("bad white code"),this._eatBits(1),1},_getBlackCode:function(){var e=void 0,r=void 0;if(this.eoblock){if(e=this._lookBits(13),e===t)return 1;if(r=e>>7===0?p[e]:e>>9===0&&e>>7!==0?m[(e>>1)-64]:v[e>>7],r[0]>0)return this._eatBits(r[0]),r[1]}else{var i=this._findTableCode(2,6,v);if(i[0])return i[1];if(i=this._findTableCode(7,12,m,64),i[0])return i[1];if(i=this._findTableCode(10,13,p),i[0])return i[1]}return(0,a.info)("bad black code"),this._eatBits(1),1},_lookBits:function(e){var r=void 0;while(this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|r,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e},_eatBits:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}},b}();t.CCITTFaxDecoder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var a=r(138),i=r(140),n=r(144),o=r(2),s=function(){function e(e,t,r,a){this.stream=e,this.maybeLength=t,this.dict=r,this.params=a,i.DecodeStream.call(this,t)}return e.prototype=Object.create(i.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e=new n.Jbig2Image,t=[];if((0,a.isDict)(this.params)){var r=this.params.get("JBIG2Globals");if((0,a.isStream)(r)){var i=r.getBytes();t.push({data:i,start:0,end:i.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});for(var o=e.parseChunks(t),s=o.length,c=0;c>>0}var o=n(1),s=n(1)?n(1)?n(1)?n(1)?n(1)?n(32)+4436:n(12)+340:n(8)+84:n(6)+20:n(4)+4:n(2);return 0===o?s:s>0?-s:null}function s(e,t,r){for(var a=e.getContexts("IAID"),i=1,n=0;n=R&&I=B)for(G=G<<1&w,p=0;p=0&&T=0&&(E=U[O][T],E&&(G|=E<=e?B<<=1:B=B<<1|x[F][R];for(d=0;d=S||R<0||R>=k?B<<=1:B=B<<1|a[F][R];var D=_.readBit(A,B);T[E]=D}}return x}function m(e,t,i,n,c,l,u,h,f,d,m,b){if(e&&t)throw new o("symbol refinement with Huffman is not supported");var y=[],w=0,k=(0,a.log2)(i.length+n),S=m.decoder,C=m.contextCache,x=void 0,_=void 0;e&&(x=B(1),_=[],k=Math.max(k,1));while(y.length1)T=v(e,t,P,w,0,F,1,i.concat(y),k,0,0,1,0,l,f,d,m,0,b);else{var R=s(C,S,k),D=r(C,"IARDX",S),M=r(C,"IARDY",S),L=R1&&(B=e?S.readBits(k):r(I,"IAIT",P));var D=l*O+B,M=e?v.symbolIDTable.decode(S):s(I,P,h),L=t&&(e?S.readBit():r(I,"IARI",P)),N=u[M],U=N[0].length,q=N.length;if(L){var j=r(I,"IARDW",P),z=r(I,"IARDH",P),H=r(I,"IARDX",P),G=r(I,"IARDY",P);U+=j,q+=z,N=p(U,q,b,N,(j>>1)+H,(z>>1)+G,!1,y,w)}var W,X,Y,V=D-(1&g?0:q-1),K=R-(2&g?U-1:0);if(f){for(W=0;W=0;w--)E=e?q(T,u,h,!0):g(!1,u,h,r,!1,b,I,v),O[w]=E;var F=void 0,R=void 0,B=void 0,M=void 0,L=void 0,N=void 0,U=void 0,j=void 0,z=void 0;for(F=0;F=0;k--)B=O[k][F][R]^B,M|=B<>8,U=d+F*p-R*m>>8,N>=0&&N+_<=i&&U>=0&&U+A<=n)for(w=0;w=n))for(z=y[G],j=L[w],k=0;k<_;k++)H=N+k,H>=0&&H>5&7,h=[31&l],f=t+6;if(7===l){u=536870911&(0,a.readUint32)(e,f-1),f+=3;var d=u+7>>3;h[0]=e[f++];while(--d>0)h.push(e[f++])}else if(5===l||6===l)throw new o("invalid referred-to flags");r.retainBits=h;var g,p,m=r.number<=256?1:r.number<=65536?2:4,v=[];for(g=0;g>>24&255,_[3]=y.height>>16&255,_[4]=y.height>>8&255,_[5]=255&y.height,g=f,p=e.length;g>2&3,f.huffmanDWSelector=d>>4&3,f.bitmapSizeSelector=d>>6&1,f.aggregationInstancesSelector=d>>7&1,f.bitmapCodingContextUsed=!!(256&d),f.bitmapCodingContextRetained=!!(512&d),f.template=d>>10&3,f.refinementTemplate=d>>12&1,u+=2,!f.huffman){for(s=0===f.template?4:1,i=[],n=0;n>2&3,g.stripSize=1<>4&3,g.transposed=!!(64&p),g.combinationOperator=p>>7&3,g.defaultPixelValue=p>>9&1,g.dsOffset=p<<17>>27,g.refinementTemplate=p>>15&1,g.huffman){var m=(0,a.readUint16)(l,u);u+=2,g.huffmanFS=3&m,g.huffmanDS=m>>2&3,g.huffmanDT=m>>4&3,g.huffmanRefinementDW=m>>6&3,g.huffmanRefinementDH=m>>8&3,g.huffmanRefinementDX=m>>10&3,g.huffmanRefinementDY=m>>12&3,g.huffmanRefinementSizeSelector=!!(16384&m)}if(g.refinement&&!g.refinementTemplate){for(i=[],n=0;n<2;n++)i.push({x:(0,a.readInt8)(l,u),y:(0,a.readInt8)(l,u+1)}),u+=2;g.refinementAt=i}g.numberOfSymbolInstances=(0,a.readUint32)(l,u),u+=4,r=[g,c.referredTo,l,u,h];break;case 16:var v={},b=l[u++];v.mmr=!!(1&b),v.template=b>>1&3,v.patternWidth=l[u++],v.patternHeight=l[u++],v.maxPatternIndex=(0,a.readUint32)(l,u),u+=4,r=[v,c.number,l,u,h];break;case 22:case 23:var y={};y.info=S(l,u),u+=C;var w=l[u++];y.mmr=!!(1&w),y.template=w>>1&3,y.enableSkip=!!(8&w),y.combinationOperator=w>>4&7,y.defaultPixelValue=w>>7&1,y.gridWidth=(0,a.readUint32)(l,u),u+=4,y.gridHeight=(0,a.readUint32)(l,u),u+=4,y.gridOffsetX=4294967295&(0,a.readUint32)(l,u),u+=4,y.gridOffsetY=4294967295&(0,a.readUint32)(l,u),u+=4,y.gridVectorX=(0,a.readUint16)(l,u),u+=2,y.gridVectorY=(0,a.readUint16)(l,u),u+=2,r=[y,c.referredTo,l,u,h];break;case 38:case 39:var k={};k.info=S(l,u),u+=C;var x=l[u++];if(k.mmr=!!(1&x),k.template=x>>1&3,k.prediction=!!(8&x),!k.mmr){for(s=0===k.template?4:1,i=[],n=0;n>2&1,_.combinationOperator=A>>3&3,_.requiresBuffer=!!(32&A),_.combinationOperatorOverride=!!(64&A),r=[_];break;case 49:break;case 50:break;case 51:break;case 53:r=[c.number,l,u,h];break;case 62:break;default:throw new o("segment type "+c.typeName+"("+c.type+") is not implemented")}var P="on"+c.typeName;P in t&&t[P].apply(t,r)}function _(e,t){for(var r=0,a=e.length;r>=1;return{imgData:d,width:u,height:h}}function I(){}function O(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 T(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 E(e,t){t||this.assignPrefixCodes(e),this.rootNode=new T(null);var r=void 0,a=e.length,i=void 0;for(r=0;r0&&this.rootNode.buildTree(i,i.prefixLength-1)}function F(e,t,r){var i=e[t],n=4294967295&(0,a.readUint32)(e,t+1),o=4294967295&(0,a.readUint32)(e,t+5),s=new D(e,t+9,r),c=1+(i>>1&7),l=1+(i>>4&7),u=[],h=void 0,f=void 0,d=n;do{h=s.readBits(c),f=s.readBits(l),u.push(new O([d,h,f,0])),d+=1<>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var a=0,i=r.length;a>3,h=s.combinationOperatorOverride?e.combinationOperator:s.combinationOperator,f=this.buffer,d=128>>(7&e.x),g=e.y*u+(e.x>>3);switch(h){case 0:for(r=0;r>=1,i||(i=128,n++);g+=u}break;case 2:for(r=0;r>=1,i||(i=128,n++);g+=u}break;default:throw new o("operator "+h+" is not supported")}},onImmediateGenericRegion:function(e,r,a,i){var n=e.info,o=new t(r,a,i),s=g(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(n,s)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,r,a,i,n,o){var s=void 0,c=void 0;e.huffman&&(s=N(e,a,this.customTables),c=new D(i,n,o));var l=this.symbols;l||(this.symbols=l={});for(var u=[],h=0,f=a.length;h>t&1;if(t<=0)this.children[r]=new T(e);else{var a=this.children[r];a||(this.children[r]=a=new T(null)),a.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 o("invalid Huffman data");return r.decodeNode(e)}},E.prototype={decode:function(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function(e){var t=e.length,r=0,a=void 0;for(a=0;a=32){var u=void 0,h=void 0,f=void 0;switch(c){case 32:if(0===s)throw new o("no previous value in symbol ID table");h=i.readBits(2)+3,u=n[s-1].prefixLength;break;case 33:h=i.readBits(3)+3,u=0;break;case 34:h=i.readBits(7)+11,u=0;break;default:throw new o("invalid code length in symbol ID table")}for(f=0;f>f&1,f--;if(a&&!d)for(var g=5,p=0;p=this.end)throw new o("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e},readBits:function(e){var t=0,r=void 0;for(r=e-1;r>=0;r--)t|=this.readBit()<=this.end?-1:this.data[this.position++]}},j.prototype={parseChunks:function(e){return A(e)},parse:function(e){var t=P(e),r=t.imgData,a=t.width,i=t.height;return this.width=a,this.height=i,r}},j}();t.Jbig2Image=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){var e=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function t(e,t,r){this.data=e,this.bp=t,this.dataEnd=r,this.chigh=e[t],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}return t.prototype={byteIn:function(){var e=this.data,t=this.bp;if(255===e[t]){var r=e[t+1];r>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t)}else t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(t,r){var a,i=t[r]>>1,n=1&t[r],o=e[i],s=o.qe,c=this.a-s;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0===(32768&c));return this.a=c,t[r]=i<<1|n,a}},t}();t.ArithmeticDecoder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var a=r(2),i=r(140),n=r(138),o=r(147),s=function(){function e(e,t,r,a){var n=void 0;while(-1!==(n=e.getByte()))if(255===n){e.skip(-1);break}this.stream=e,this.maybeLength=t,this.dict=r,this.params=a,i.DecodeStream.call(this,t)}return e.prototype=Object.create(i.DecodeStream.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){},e.prototype.readBlock=function(){if(!this.eof){var e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(t)){for(var r=this.dict.get("BitsPerComponent")||8,a=t.length,i=new Int32Array(a),s=!1,c=(1<0&&void 0!==arguments[0]&&arguments[0];return(0,a.createObjectURL)(this.bytes,"image/jpeg",e)},e}();t.JpegStream=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JpegImage=void 0;var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(2),n=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}(),o=function(){function e(e,t){this.message=e,this.scanLines=t}return e.prototype=new Error,e.prototype.name="DNLMarkerError",e.constructor=e,e}(),s=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="EOIMarkerError",e.constructor=e,e}(),c=function(){var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,c=3406,l=2276,u=1567,h=3784,f=5793,d=2896;function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.decodeTransform,r=void 0===t?null:t,a=e.colorTransform,i=void 0===a?-1:a;this._decodeTransform=r,this._colorTransform=i}function p(e,t){var r,a,i=0,n=[],o=16;while(o>0&&!e[o-1])o--;n.push({children:[],index:0});var s,c=n[0];for(r=0;r0)c=n.pop();c.index++,n.push(c);while(n.length<=r)n.push(s={children:[],index:0}),c.children[c.index]=s.children,c=s;i++}r+19&&void 0!==arguments[9]&&arguments[9],v=c.mcusPerLine,b=c.progressive,y=r,k=0,S=0;function C(){if(S>0)return S--,k>>S&1;if(k=t[r++],255===k){var e=t[r++];if(e){if(220===e&&p){r+=2;var a=t[r++]<<8|t[r++];if(a>0&&a!==c.scanLines)throw new o("Found DNL marker (0xFFDC) while parsing scan data",a)}else if(217===e)throw new s("Found EOI marker (0xFFD9) while parsing scan data");throw new n("unexpected marker "+(k<<8|e).toString(16))}}return S=7,k>>>7}function x(e){var t=e;while(1){if(t=t[C()],"number"===typeof t)return t;if("object"!==("undefined"===typeof t?"undefined":a(t)))throw new n("invalid huffman sequence")}}function _(e){var t=0;while(e>0)t=t<<1|C(),e--;return t}function A(e){if(1===e)return 1===C()?1:-1;var t=_(e);return t>=1<>4;if(0!==s){n+=c;var l=e[n];t.blockData[r+l]=A(s),n++}else{if(c<15)break;n+=16}}}function I(e,t){var r=x(e.huffmanTableDC),a=0===r?0:A(r)<0)T--;else{var a=h,i=f;while(a<=i){var n=x(t.huffmanTableAC),o=15&n,s=n>>4;if(0!==o){a+=s;var c=e[a];t.blockData[r+c]=A(o)*(1<>4,0===a)c<15?(T=_(c)+(1<=65488&&J<=65495))break;r+=2}return G=w(t,r),G&&G.invalid&&((0,i.warn)("decodeScan - unexpected Scan data, current marker is: "+G.invalid),r=G.offset),r-y}function b(e,a,i){var o,s,g,p,m,v,b,y,w,k,S,C,x,_,A,P,I,O=e.quantizationTable,T=e.blockData;if(!O)throw new n("missing required Quantization Table.");for(var E=0;E<64;E+=8)w=T[a+E],k=T[a+E+1],S=T[a+E+2],C=T[a+E+3],x=T[a+E+4],_=T[a+E+5],A=T[a+E+6],P=T[a+E+7],w*=O[E],0!==(k|S|C|x|_|A|P)?(k*=O[E+1],S*=O[E+2],C*=O[E+3],x*=O[E+4],_*=O[E+5],A*=O[E+6],P*=O[E+7],o=f*w+128>>8,s=f*x+128>>8,g=S,p=A,m=d*(k-P)+128>>8,y=d*(k+P)+128>>8,v=C<<4,b=_<<4,o=o+s+1>>1,s=o-s,I=g*h+p*u+128>>8,g=g*u-p*h+128>>8,p=I,m=m+b+1>>1,b=m-b,y=y+v+1>>1,v=y-v,o=o+p+1>>1,p=o-p,s=s+g+1>>1,g=s-g,I=m*l+y*c+2048>>12,m=m*c-y*l+2048>>12,y=I,I=v*r+b*t+2048>>12,v=v*t-b*r+2048>>12,b=I,i[E]=o+y,i[E+7]=o-y,i[E+1]=s+b,i[E+6]=s-b,i[E+2]=g+v,i[E+5]=g-v,i[E+3]=p+m,i[E+4]=p-m):(I=f*w+512>>10,i[E]=I,i[E+1]=I,i[E+2]=I,i[E+3]=I,i[E+4]=I,i[E+5]=I,i[E+6]=I,i[E+7]=I);for(var F=0;F<8;++F)w=i[F],k=i[F+8],S=i[F+16],C=i[F+24],x=i[F+32],_=i[F+40],A=i[F+48],P=i[F+56],0!==(k|S|C|x|_|A|P)?(o=f*w+2048>>12,s=f*x+2048>>12,g=S,p=A,m=d*(k-P)+2048>>12,y=d*(k+P)+2048>>12,v=C,b=_,o=4112+(o+s+1>>1),s=o-s,I=g*h+p*u+2048>>12,g=g*u-p*h+2048>>12,p=I,m=m+b+1>>1,b=m-b,y=y+v+1>>1,v=y-v,o=o+p+1>>1,p=o-p,s=s+g+1>>1,g=s-g,I=m*l+y*c+2048>>12,m=m*c-y*l+2048>>12,y=I,I=v*r+b*t+2048>>12,v=v*t-b*r+2048>>12,b=I,w=o+y,P=o-y,k=s+b,A=s-b,S=g+v,_=g-v,C=p+m,x=p-m,w=w<16?0:w>=4080?255:w>>4,k=k<16?0:k>=4080?255:k>>4,S=S<16?0:S>=4080?255:S>>4,C=C<16?0:C>=4080?255:C>>4,x=x<16?0:x>=4080?255:x>>4,_=_<16?0:_>=4080?255:_>>4,A=A<16?0:A>=4080?255:A>>4,P=P<16?0:P>=4080?255:P>>4,T[a+F]=w,T[a+F+8]=k,T[a+F+16]=S,T[a+F+24]=C,T[a+F+32]=x,T[a+F+40]=_,T[a+F+48]=A,T[a+F+56]=P):(I=f*w+8192>>14,I=I<-2040?0:I>=2024?255:I+2056>>4,T[a+F]=I,T[a+F+8]=I,T[a+F+16]=I,T[a+F+24]=I,T[a+F+32]=I,T[a+F+40]=I,T[a+F+48]=I,T[a+F+56]=I)}function y(e,t){for(var r=t.blocksPerLine,a=t.blocksPerColumn,i=new Int16Array(64),n=0;n2&&void 0!==arguments[2]?arguments[2]:t;function a(t){return e[t]<<8|e[t+1]}var i=e.length-1,n=r=i)return null;var o=a(t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};var s=a(n);while(!(s>=65472&&s<=65534)){if(++n>=i)return null;s=a(n)}return{invalid:o.toString(16),marker:s,offset:n}}return g.prototype={parse:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.dnlScanLines,c=void 0===a?null:a;function l(){var e=t[g]<<8|t[g+1];return g+=2,e}function u(){var e=l(),r=g+e-2,a=w(t,r,g);a&&a.invalid&&((0,i.warn)("readDataBlock - incorrect length, current marker is: "+a.invalid),r=a.offset);var n=t.subarray(g,r);return g+=n.length,n}function h(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),a=0;a>4===0)for(P=0;P<64;P++)T=e[P],B[T]=t[g++];else{if(R>>4!==1)throw new n("DQT - invalid table spec");for(P=0;P<64;P++)T=e[P],B[T]=l()}S[15&R]=B}break;case 65472:case 65473:case 65474:if(f)throw new n("Only single frame JPEGs supported");l(),f={},f.extended=65473===_,f.progressive=65474===_,f.precision=t[g++];var D=l();f.scanLines=c||D,f.samplesPerLine=l(),f.components=[],f.componentIds={};var M,L=t[g++],N=0,U=0;for(A=0;A>4,j=15&t[g+1];N>4===0?x:C)[15&G]=p(W,Y)}break;case 65501:l(),d=l();break;case 65498:var V=1===++k&&!c;l();var K,J=t[g++],Z=[];for(A=0;A>4],K.huffmanTableAC=C[15&$],Z.push(K)}var ee=t[g++],te=t[g++],re=t[g++];try{var ae=v(t,g,f,Z,d,ee,te,re>>4,15&re,V);g+=ae}catch(oe){if(oe instanceof o)return(0,i.warn)(oe.message+" -- attempting to re-parse the JPEG image."),this.parse(t,{dnlScanLines:oe.scanLines});if(oe instanceof s){(0,i.warn)(oe.message+" -- ignoring the rest of the image data.");break e}throw oe}break;case 65500:g+=4;break;case 65535:255!==t[g]&&g--;break;default:if(255===t[g-3]&&t[g-2]>=192&&t[g-2]<=254){g-=3;break}var ie=w(t,g-2);if(ie&&ie.invalid){(0,i.warn)("JpegImage.parse - unexpected data, current marker is: "+ie.invalid),g=ie.offset;break}throw new n("unknown marker "+_.toString(16))}_=l()}for(this.width=f.samplesPerLine,this.height=f.scanLines,this.jfif=m,this.adobe=b,this.components=[],A=0;A2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,p=this.height/t,m=0,v=this.components.length,b=e*t*v,y=new Uint8ClampedArray(b),w=new Uint32Array(e),k=4294967288;for(c=0;c>8)+S[u+1];return y},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,i=0,n=e.length;i4)throw new n("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&i){for(var l=c.length,u=new Uint8ClampedArray(3*l),h=0,f=0;f0?Math.min(a.xcb,i.PPx-1):Math.min(a.xcb,i.PPx),i.ycb_=r>0?Math.min(a.ycb,i.PPy-1):Math.min(a.ycb,i.PPy),i}function c(e,t,r){var a=1<t.trx0?Math.ceil(t.trx1/a)-Math.floor(t.trx0/a):0,l=t.try1>t.try0?Math.ceil(t.try1/i)-Math.floor(t.try0/i):0,u=c*l;t.precinctParameters={precinctWidth:a,precinctHeight:i,numprecinctswide:c,numprecinctshigh:l,numprecincts:u,precinctWidthInSubband:o,precinctHeightInSubband:s}}function l(e,t,r){var a,i,n,o,s=r.xcb_,c=r.ycb_,l=1<>s,f=t.tby0>>c,d=t.tbx1+l-1>>s,g=t.tby1+u-1>>c,p=t.resolution.precinctParameters,m=[],v=[];for(i=f;iw.cbxMax&&(w.cbxMax=a),iw.cbyMax&&(w.cbyMax=i)):v[o]=w={cbxMin:a,cbyMin:i,cbxMax:a,cbyMax:i},n.precinct=w}}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-h+1,numcodeblockhigh:g-f+1},t.codeblocks=m,t.precincts=v}function u(e,t,r){for(var a=[],i=e.subbands,n=0,o=i.length;ne.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[h],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[l],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){var o=e.resolutions[r],s=o.precinctParameters.numprecincts;if(!(i>=s)){for(;t=0;--m){var v=c.resolutions[m],b=p*v.precinctParameters.precinctWidth,y=p*v.precinctParameters.precinctHeight;h=Math.min(h,b),f=Math.min(f,y),d=Math.max(d,v.precinctParameters.numprecinctswide),g=Math.max(g,v.precinctParameters.numprecinctshigh),u[m]={width:b,height:y},p<<=1}r=Math.min(r,h),a=Math.min(a,f),i=Math.max(i,d),n=Math.max(n,g),o[s]={resolutions:u,minWidth:h,minHeight:f,maxNumWide:d,maxNumHigh:g}}return{components:o,minWidth:r,minHeight:a,maxNumWide:i,maxNumHigh:n}}function b(e){for(var t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],i=t.Csiz,o=0;o>>s&(1<0){var j=S.shift();w=j.codeblock,void 0===w["data"]&&(w.data=[]),w.data.push({data:t,start:r+o,end:r+o+j.dataLength,codingpasses:j.codingpasses}),o+=j.dataLength}}}return o}function w(e,t,r,a,n,o,s,c){for(var l=a.tbx0,u=a.tby0,h=a.tbx1-a.tbx0,f=a.codeblocks,d="H"===a.type.charAt(0)?1:0,g="H"===a.type.charAt(1)?t:0,p=0,m=f.length;p=o?B:B*(1<0?1-v:0));var P=b.subbands[C],T=e[P.type],E=d?1:Math.pow(2,f+T-A)*(1+_/2048),F=u+A-1;w(S,y,k,P,E,F,d,h)}p.push({width:y,height:k,items:S})}var R=g.calculate(p,i.tcx0,i.tcy0);return{left:i.tcx0,top:i.tcy0,width:R.width,height:R.height,items:R.items}}function S(e){for(var t=e.SIZ,r=e.components,a=t.Csiz,i=[],n=0,o=e.tiles.length;n>2);b[w++]=O+m>>u,b[w++]=O>>u,b[w++]=O+p>>u}else for(f=0;f>u,b[w++]=g-.34413*p-.71414*m>>u,b[w++]=g+1.772*p>>u;if(S)for(f=0,w=3;f>u}else for(s=0;s>u,w+=a}i.push(y)}return i}function C(e,t){for(var r=e.SIZ,a=r.Csiz,i=e.tiles[t],n=0;n>24&255,c>>16&255,c>>8&255,255&c);(0,a.warn)("Unsupported header type "+c+" ("+d+")");break}u&&(r+=l)}}else this.parseCodestream(e,0,e.length)},parseImageProperties:function(e){var t=e.getByte();while(t>=0){var r=t;t=e.getByte();var a=r<<8|t;if(65361===a){e.skip(4);var i=e.getInt32()>>>0,o=e.getInt32()>>>0,s=e.getInt32()>>>0,c=e.getInt32()>>>0;e.skip(16);var l=e.getUint16();return this.width=i-s,this.height=o-c,this.componentsCount=l,void(this.bitsPerComponent=8)}}throw new n("No size marker found in JPX stream")},parseCodestream:function(e,t,i){var s={},c=!1;try{var l=t;while(l+1>5,d=[];while(h>3,I.mu=0):(I.epsilon=e[h]>>3,I.mu=(7&e[h])<<8|e[h+1],h+=2),d.push(I)}P.SPqcds=d,s.mainHeader?s.QCD=P:(s.currentTile.QCD=P,s.currentTile.QCC=[]);break;case 65373:v=(0,a.readUint16)(e,l);var O,T={};switch(h=l+2,s.SIZ.Csiz<257?O=e[h++]:(O=(0,a.readUint16)(e,h),h+=2),f=e[h++],31&f){case 0:g=8,p=!0;break;case 1:g=16,p=!1;break;case 2:g=16,p=!0;break;default:throw new Error("Invalid SQcd value "+f)}T.noQuantization=8===g,T.scalarExpounded=p,T.guardBits=f>>5,d=[];while(h>3,I.mu=0):(I.epsilon=e[h]>>3,I.mu=(7&e[h])<<8|e[h+1],h+=2),d.push(I);T.SPqcds=d,s.mainHeader?s.QCC[O]=T:s.currentTile.QCC[O]=T;break;case 65362:v=(0,a.readUint16)(e,l);var E={};h=l+2;var F=e[h++];E.entropyCoderWithCustomPrecincts=!!(1&F),E.sopMarkerUsed=!!(2&F),E.ephMarkerUsed=!!(4&F),E.progressionOrder=e[h++],E.layersCount=(0,a.readUint16)(e,h),h+=2,E.multipleComponentTransform=e[h++],E.decompositionLevelsCount=e[h++],E.xcb=2+(15&e[h++]),E.ycb=2+(15&e[h++]);var R=e[h++];if(E.selectiveArithmeticCodingBypass=!!(1&R),E.resetContextProbabilities=!!(2&R),E.terminationOnEachCodingPass=!!(4&R),E.verticallyStripe=!!(8&R),E.predictableTermination=!!(16&R),E.segmentationSymbolUsed=!!(32&R),E.reversibleTransformation=e[h++],E.entropyCoderWithCustomPrecincts){var B=[];while(h>4})}E.precinctsSizes=B}var M=[];if(E.selectiveArithmeticCodingBypass&&M.push("selectiveArithmeticCodingBypass"),E.resetContextProbabilities&&M.push("resetContextProbabilities"),E.terminationOnEachCodingPass&&M.push("terminationOnEachCodingPass"),E.verticallyStripe&&M.push("verticallyStripe"),E.predictableTermination&&M.push("predictableTermination"),M.length>0)throw c=!0,new Error("Unsupported COD options ("+M.join(", ")+")");s.mainHeader?s.COD=E:(s.currentTile.COD=E,s.currentTile.COC=[]);break;case 65424:v=(0,a.readUint16)(e,l),m={},m.index=(0,a.readUint16)(e,l+2),m.length=(0,a.readUint32)(e,l+4),m.dataEnd=m.length+l-2,m.partIndex=e[l+8],m.partsCount=e[l+9],s.mainHeader=!1,0===m.partIndex&&(m.COD=s.COD,m.COC=s.COC.slice(0),m.QCD=s.QCD,m.QCC=s.QCC.slice(0)),s.currentTile=m;break;case 65427:m=s.currentTile,0===m.partIndex&&(C(s,m.index),b(s)),v=m.dataEnd-l,y(s,e,l,v);break;case 65365:case 65367:case 65368:case 65380:v=(0,a.readUint16)(e,l);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+u.toString(16))}l+=v}}catch(L){if(c||this.failOnCorruptedImage)throw new n(L.message);(0,a.warn)("JPX: Trying to recover from: "+L.message)}this.tiles=S(s),this.width=s.SIZ.Xsiz-s.SIZ.XOsiz,this.height=s.SIZ.Ysiz-s.SIZ.YOsiz,this.componentsCount=s.SIZ.Csiz}};var x=function(){function e(e,t){var r=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var i=0;i>=1,t>>=1,a++}a--,r=this.levels[a],r.items[r.index]=i,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--,e<0?(this.value=r,!1):(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,!0)}},e}(),_=function(){function e(e,t,r){var i=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;nr)return this.currentLevel=a,this.propagateValues(),!1;e>>=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(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];while(--e>=0)t=this.levels[e],t.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--,!(e<0)&&(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,!0)}},e}(),A=function(){var e=17,t=18,r=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),a=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),i=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function o(e,t,n,o,s){this.width=e,this.height=t,this.contextLabelTable="HH"===n?i:"HL"===n?a:r;var c=e*t;this.neighborsSignificance=new Uint8Array(c),this.coefficentsSign=new Uint8Array(c),this.coefficentsMagnitude=s>14?new Uint32Array(c):s>6?new Uint16Array(c):new Uint8Array(c),this.processingFlags=new Uint8Array(c);var l=new Uint8Array(c);if(0!==o)for(var u=0;u0,c=t+10&&(a=r-n,s&&(i[a-1]+=16),c&&(i[a+1]+=16),i[a]+=4),e+1=r)break;if(o[p]&=u,!a[p]&&n[p]){var b=c[n[p]],y=e.readBit(s,b);if(y){var w=this.decodeSignBit(v,g,p);i[p]=w,a[p]=1,this.setNeighborsSignificance(v,g,p),o[p]|=f}l[p]++,o[p]|=h}}},decodeSignBit:function(e,t,r){var a,i,n,o,s,c,l=this.width,u=this.height,h=this.coefficentsMagnitude,f=this.coefficentsSign;o=t>0&&0!==h[r-1],t+10&&0!==h[r-l],e+1=0?(s=9+a,c=this.decoder.readBit(this.contexts,s)):(s=9-a,c=1^this.decoder.readBit(this.contexts,s)),c},runMagnitudeRefinementPass:function(){for(var e,t=this.decoder,r=this.width,a=this.height,i=this.coefficentsMagnitude,n=this.neighborsSignificance,o=this.contexts,s=this.bitsDecoded,c=this.processingFlags,l=1,u=2,h=r*a,f=4*r,d=0;d>1;t|=0;var c=-1.586134342059924,l=-.052980118572961,u=.882911075530934,h=.443506852043971,f=1.230174104914001,d=1/f;for(a=t-3,i=s+4;i--;a+=2)e[a]*=d;for(a=t-2,n=h*e[a-1],i=s+3;i--;a+=2){if(o=h*e[a+1],e[a]=f*e[a]-n-o,!i--)break;a+=2,n=h*e[a+1],e[a]=f*e[a]-n-o}for(a=t-1,n=u*e[a-1],i=s+2;i--;a+=2){if(o=u*e[a+1],e[a]-=n+o,!i--)break;a+=2,n=u*e[a+1],e[a]-=n+o}for(a=t,n=l*e[a-1],i=s+1;i--;a+=2){if(o=l*e[a+1],e[a]-=n+o,!i--)break;a+=2,n=l*e[a+1],e[a]-=n+o}if(0!==s)for(a=t+1,n=c*e[a-1],i=s;i--;a+=2){if(o=c*e[a+1],e[a]-=n+o,!i--)break;a+=2,n=c*e[a+1],e[a]-=n+o}},e}(),O=function(){function e(){P.call(this)}return e.prototype=Object.create(P.prototype),e.prototype.filter=function(e,t,r){var a,i,n=r>>1;for(t|=0,a=t,i=n+1;i--;a+=2)e[a]-=e[a-1]+e[a+1]+2>>2;for(a=t+1,i=n;i--;a+=2)e[a]+=e[a-1]+e[a+1]>>1},e}();return t}();t.JpxImage=o},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 a=function(){function e(e,t){for(var r=0;r>5&255,d[n++]=i>>13&255,d[n++]=i>>21&255,d[n++]=i>>>29&255,d[n++]=0,d[n++]=0,d[n++]=0;var g=new Int32Array(16);for(n=0;n>>32-C)|0,v=k}c=c+v|0,l=l+b|0,u=u+y|0,h=h+w|0}return new Uint8Array([255&c,c>>8&255,c>>16&255,c>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255,255&u,u>>8&255,u>>16&255,u>>>24&255,255&h,h>>8&255,h>>16&255,h>>>24&255])}return r}(),f=function(){function e(e,t){this.high=0|e,this.low=0|t}return e.prototype={and:function(e){this.high&=e.high,this.low&=e.low},xor:function(e){this.high^=e.high,this.low^=e.low},or:function(e){this.high|=e.high,this.low|=e.low},shiftRight:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)},shiftLeft:function(e){e>=32?(this.high=this.low<>>32-e,this.low=this.low<>>e|r<<32-e,this.high=r>>>e|t<<32-e},not:function(){this.high=~this.high,this.low=~this.low},add:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r},copyTo:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low},assign:function(e){this.high=e.high,this.low=e.low}},e}(),d=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function a(t){return e(t,2)^e(t,13)^e(t,22)}function i(t){return e(t,6)^e(t,11)^e(t,25)}function n(t){return e(t,7)^e(t,18)^t>>>3}function o(t){return e(t,17)^e(t,19)^t>>>10}var s=[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 c(e,c,l){var u,h,f,d=1779033703,g=3144134277,p=1013904242,m=2773480762,v=1359893119,b=2600822924,y=528734635,w=1541459225,k=64*Math.ceil((l+9)/64),S=new Uint8Array(k);for(u=0;u>>29&255,S[u++]=l>>21&255,S[u++]=l>>13&255,S[u++]=l>>5&255,S[u++]=l<<3&255;var C=new Uint32Array(64);for(u=0;u>24&255,d>>16&255,d>>8&255,255&d,g>>24&255,g>>16&255,g>>8&255,255&g,p>>24&255,p>>16&255,p>>8&255,255&p,m>>24&255,m>>16&255,m>>8&255,255&m,v>>24&255,v>>16&255,v>>8&255,255&v,b>>24&255,b>>16&255,b>>8&255,255&b,y>>24&255,y>>16&255,y>>8&255,255&y,w>>24&255,w>>16&255,w>>8&255,255&w])}return c}(),g=function(){function e(e,t,r,a,i){e.assign(t),e.and(r),i.assign(t),i.not(),i.and(a),e.xor(i)}function t(e,t,r,a,i){e.assign(t),e.and(r),i.assign(t),i.and(a),e.xor(i),i.assign(r),i.and(a),e.xor(i)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var o=[new f(1116352408,3609767458),new f(1899447441,602891725),new f(3049323471,3964484399),new f(3921009573,2173295548),new f(961987163,4081628472),new f(1508970993,3053834265),new f(2453635748,2937671579),new f(2870763221,3664609560),new f(3624381080,2734883394),new f(310598401,1164996542),new f(607225278,1323610764),new f(1426881987,3590304994),new f(1925078388,4068182383),new f(2162078206,991336113),new f(2614888103,633803317),new f(3248222580,3479774868),new f(3835390401,2666613458),new f(4022224774,944711139),new f(264347078,2341262773),new f(604807628,2007800933),new f(770255983,1495990901),new f(1249150122,1856431235),new f(1555081692,3175218132),new f(1996064986,2198950837),new f(2554220882,3999719339),new f(2821834349,766784016),new f(2952996808,2566594879),new f(3210313671,3203337956),new f(3336571891,1034457026),new f(3584528711,2466948901),new f(113926993,3758326383),new f(338241895,168717936),new f(666307205,1188179964),new f(773529912,1546045734),new f(1294757372,1522805485),new f(1396182291,2643833823),new f(1695183700,2343527390),new f(1986661051,1014477480),new f(2177026350,1206759142),new f(2456956037,344077627),new f(2730485921,1290863460),new f(2820302411,3158454273),new f(3259730800,3505952657),new f(3345764771,106217008),new f(3516065817,3606008344),new f(3600352804,1432725776),new f(4094571909,1467031594),new f(275423344,851169720),new f(430227734,3100823752),new f(506948616,1363258195),new f(659060556,3750685593),new f(883997877,3785050280),new f(958139571,3318307427),new f(1322822218,3812723403),new f(1537002063,2003034995),new f(1747873779,3602036899),new f(1955562222,1575990012),new f(2024104815,1125592928),new f(2227730452,2716904306),new f(2361852424,442776044),new f(2428436474,593698344),new f(2756734187,3733110249),new f(3204031479,2999351573),new f(3329325298,3815920427),new f(3391569614,3928383900),new f(3515267271,566280711),new f(3940187606,3454069534),new f(4118630271,4000239992),new f(116418474,1914138554),new f(174292421,2731055270),new f(289380356,3203993006),new f(460393269,320620315),new f(685471733,587496836),new f(852142971,1086792851),new f(1017036298,365543100),new f(1126000580,2618297676),new f(1288033470,3409855158),new f(1501505948,4234509866),new f(1607167915,987167468),new f(1816402316,1246189591)];function s(s,c,l,u){var h,d,g,p,m,v,b,y;u=!!u,u?(h=new f(3418070365,3238371032),d=new f(1654270250,914150663),g=new f(2438529370,812702999),p=new f(355462360,4144912697),m=new f(1731405415,4290775857),v=new f(2394180231,1750603025),b=new f(3675008525,1694076839),y=new f(1203062813,3204075428)):(h=new f(1779033703,4089235720),d=new f(3144134277,2227873595),g=new f(1013904242,4271175723),p=new f(2773480762,1595750129),m=new f(1359893119,2917565137),v=new f(2600822924,725511199),b=new f(528734635,4215389547),y=new f(1541459225,327033209));var w,k,S,C=128*Math.ceil((l+17)/128),x=new Uint8Array(C);for(w=0;w>>29&255,x[w++]=l>>21&255,x[w++]=l>>13&255,x[w++]=l>>5&255,x[w++]=l<<3&255;var _=new Array(80);for(w=0;w<80;w++)_[w]=new f(0,0);var A,P,I=new f(0,0),O=new f(0,0),T=new f(0,0),E=new f(0,0),F=new f(0,0),R=new f(0,0),B=new f(0,0),D=new f(0,0),M=new f(0,0),L=new f(0,0),N=new f(0,0),U=new f(0,0);for(w=0;w=1;--c){r=n[13],n[13]=n[9],n[9]=n[5],n[5]=n[1],n[1]=r,r=n[14],a=n[10],n[14]=n[6],n[10]=n[2],n[6]=r,n[2]=a,r=n[15],a=n[11],i=n[7],n[15]=n[3],n[11]=r,n[7]=a,n[3]=i;for(var l=0;l<16;++l)n[l]=this._inv_s[n[l]];for(var u=0,h=16*c;u<16;++u,++h)n[u]^=t[h];for(var f=0;f<16;f+=4){var d=this._mix[n[f]],g=this._mix[n[f+1]],p=this._mix[n[f+2]],m=this._mix[n[f+3]];r=d^g>>>8^g<<24^p>>>16^p<<16^m>>>24^m<<8,n[f]=r>>>24&255,n[f+1]=r>>16&255,n[f+2]=r>>8&255,n[f+3]=255&r}}r=n[13],n[13]=n[9],n[9]=n[5],n[5]=n[1],n[1]=r,r=n[14],a=n[10],n[14]=n[6],n[10]=n[2],n[6]=r,n[2]=a,r=n[15],a=n[11],i=n[7],n[15]=n[3],n[11]=r,n[7]=a,n[3]=i;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=this._s,a=void 0,i=void 0,n=void 0,o=new Uint8Array(16);o.set(e);for(var s=0;s<16;++s)o[s]^=t[s];for(var c=1;c=g;--d)if(h[d]!==f){f=0;break}u-=f,n[n.length-1]=h.subarray(0,16-f)}}for(var p=new Uint8Array(u),m=0,v=0,b=n.length;m2&&void 0!==arguments[2]?arguments[2]:null,a=e.length,i=this.buffer,n=this.bufferPosition;if(r)this.iv=r;else{for(var o=0;n<16&&o=256&&(i=255&(27^i)));for(var h=0;h<4;++h)a[l]=n^=a[l-32],l++,a[l]=o^=a[l-32],l++,a[l]=s^=a[l-32],l++,a[l]=c^=a[l-32],l++}return a}}]),t}(v),w=function(){function e(e,t){if(e.length!==t.length)return!1;for(var r=0;ro-32){var s=t.length+i.length+a.length,c=new Uint8Array(64*s),l=e(t,i);l=e(l,a);for(var u=0,h=0;u<64;u++,h+=s)c.set(l,h);var f=new b(i.subarray(0,16));n=f.encrypt(c,i.subarray(16,32));for(var m=0,v=0;v<16;v++)m*=1,m%=3,m+=(n[v]>>>0)%3,m%=3;0===m?i=d(n,0,n.length):1===m?i=p(n,0,n.length):2===m&&(i=g(n,0,n.length)),o++}return i.subarray(0,32)}function r(){}function a(e,t){if(e.length!==t.length)return!1;for(var r=0;r>8&255,g[p++]=n>>16&255,g[p++]=n>>>24&255,l=0,f=t.length;l=4&&!c&&(g[p++]=255,g[p++]=255,g[p++]=255,g[p++]=255);var m=h(g,0,p),v=s>>3;if(o>=3)for(l=0;l<50;++l)m=h(m,0,v);var b,y,w=m.subarray(0,v);if(o>=3){for(p=0;p<32;++p)g[p]=e[p];for(l=0,f=t.length;l>3;if(a>=3)for(n=0;n<50;++n)d=h(d,0,d.length);if(a>=3){f=r;var p,m=new Uint8Array(g);for(n=19;n>=0;n--){for(p=0;p=4){var F=e.get("CF");(0,n.isDict)(F)&&(F.suppressEncryption=!0),this.cf=F,this.stmf=e.get("StmF")||o,this.strf=e.get("StrF")||o,this.eff=e.get("EFF")||this.stmf}}function c(e,t,r,a){var i,n,o=new Uint8Array(r.length+9);for(i=0,n=r.length;i>8&255,o[i++]=e>>16&255,o[i++]=255&t,o[i++]=t>>8&255,a&&(o[i++]=115,o[i++]=65,o[i++]=108,o[i++]=84);var s=h(o,0,i);return s.subarray(0,Math.min(r.length+5,16))}function l(e,t,r,a,o){if(!(0,n.isName)(t))throw new i.FormatError("Invalid crypt filter name.");var s,l=e.get(t.name);if(null!==l&&void 0!==l&&(s=l.get("CFM")),!s||"None"===s.name)return function(){return new m};if("V2"===s.name)return function(){return new u(c(r,a,o,!1))};if("AESV2"===s.name)return function(){return new b(c(r,a,o,!0))};if("AESV3"===s.name)return function(){return new y(o)};throw new i.FormatError("Unknown crypto method")}return s.prototype={createCipherTransform:function(e,t){if(4===this.algorithm||5===this.algorithm)return new S(l(this.cf,this.stmf,e,t,this.encryptionKey),l(this.cf,this.strf,e,t,this.encryptionKey));var r=c(e,t,this.encryptionKey,!1),a=function(){return new u(r)};return new S(a,a)}},s}();t.AES128Cipher=b,t.AES256Cipher=y,t.ARCFourCipher=u,t.CipherTransformFactory=C,t.PDF17=w,t.PDF20=k,t.calculateMD5=h,t.calculateSHA256=d,t.calculateSHA384=p,t.calculateSHA512=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var a=function(){function e(e,t){for(var r=0;rf&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var g=o<=8?new Uint8Array(f):new Uint16Array(f),p=0;p2&&void 0!==arguments[2]?arguments[2]:null,a=arguments[3];if(e=t.fetchIfRef(e),(0,n.isName)(e))switch(e.name){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:if((0,n.isDict)(r)){var o=r.get("ColorSpace");if((0,n.isDict)(o)){var s=o.get(e.name);if(s){if((0,n.isName)(s))return this.parseToIR(s,t,r,a);e=s;break}}}throw new i.FormatError("unrecognized colorspace "+e.name)}if(Array.isArray(e)){var c=t.fetchIfRef(e[0]).name,l=void 0,u=void 0,h=void 0,f=void 0,d=void 0,g=void 0;switch(c){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return u=t.fetchIfRef(e[1]),f=u.getArray("WhitePoint"),d=u.getArray("BlackPoint"),g=u.get("Gamma"),["CalGrayCS",f,d,g];case"CalRGB":u=t.fetchIfRef(e[1]),f=u.getArray("WhitePoint"),d=u.getArray("BlackPoint"),g=u.getArray("Gamma");var p=u.getArray("Matrix");return["CalRGBCS",f,d,g,p];case"ICCBased":var m=t.fetchIfRef(e[1]),v=m.dict;if(l=v.get("N"),h=v.get("Alternate"),h){var b=this.parseToIR(h,t,r,a),y=this.fromIR(b,a);if(y.numComps===l)return b;(0,i.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===l)return"DeviceGrayCS";if(3===l)return"DeviceRgbCS";if(4===l)return"DeviceCmykCS";break;case"Pattern":var w=e[1]||null;return w&&(w=this.parseToIR(w,t,r,a)),["PatternCS",w];case"Indexed":case"I":var k=this.parseToIR(e[1],t,r,a),S=t.fetchIfRef(e[2])+1,C=t.fetchIfRef(e[3]);return(0,n.isStream)(C)&&(C=C.getBytes()),["IndexedCS",k,S,C];case"Separation":case"DeviceN":var x=t.fetchIfRef(e[1]);l=Array.isArray(x)?x.length:1,h=this.parseToIR(e[2],t,r,a);var _=a.create(t.fetchIfRef(e[3]));return["AlternateCS",l,h,_];case"Lab":u=t.fetchIfRef(e[1]),f=u.getArray("WhitePoint"),d=u.getArray("BlackPoint");var A=u.getArray("Range");return["LabCS",f,d,A];default:throw new i.FormatError('unimplemented color space object "'+c+'"')}}throw new i.FormatError('unrecognized color space object: "'+e+'"')}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,i.warn)("The decode map is not the correct length"),!0;for(var r=0,a=e.length;r8?Math.pow((e+16)/116,3):e*d}function w(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var a=y(0),i=a,n=y(e[0]),o=a,s=y(e[1]),c=a,l=y(e[2]),u=(1-i)/(1-n),h=1-u,f=(1-o)/(1-s),d=1-f,g=(1-c)/(1-l),p=1-g;r[0]=t[0]*u+h,r[1]=t[1]*f+d,r[2]=t[2]*g+p}function k(r,a,i){if(1===r[0]&&1===r[2])return i[0]=a[0],i[1]=a[1],void(i[2]=a[2]);var n=i;g(e,a,n);var o=l;p(r,n,o),g(t,o,i)}function S(r,a,i){var n=i;g(e,a,n);var o=l;m(r,n,o),g(t,o,i)}function C(e,t,a,i,o,s){var c=b(0,1,t[a]*s),l=b(0,1,t[a+1]*s),u=b(0,1,t[a+2]*s),d=Math.pow(c,e.GR),p=Math.pow(l,e.GG),m=Math.pow(u,e.GB),y=e.MXA*d+e.MXB*p+e.MXC*m,C=e.MYA*d+e.MYB*p+e.MYC*m,x=e.MZA*d+e.MZB*p+e.MZC*m,_=h;_[0]=y,_[1]=C,_[2]=x;var A=f;k(e.whitePoint,_,A);var P=h;w(e.blackPoint,A,P);var I=f;S(n,P,I);var O=h;g(r,I,O),i[o]=255*v(O[0]),i[o+1]=255*v(O[1]),i[o+2]=255*v(O[2])}var x=function(e){function t(e,r,a,n){c(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"CalRGB",3));if(!e)throw new i.FormatError("WhitePoint missing - required for color space CalRGB");r=r||new Float32Array(3),a=a||new Float32Array([1,1,1]),n=n||new Float32Array([1,0,0,0,1,0,0,0,1]);var l=e[0],u=e[1],h=e[2];s.whitePoint=e;var f=r[0],d=r[1],g=r[2];if(s.blackPoint=r,s.GR=a[0],s.GG=a[1],s.GB=a[2],s.MXA=n[0],s.MYA=n[1],s.MZA=n[2],s.MXB=n[3],s.MYB=n[4],s.MZB=n[5],s.MXC=n[6],s.MYC=n[7],s.MZC=n[8],l<0||h<0||1!==u)throw new i.FormatError("Invalid WhitePoint components for "+s.name+", no fallback available");return(f<0||d<0||g<0)&&((0,i.info)("Invalid BlackPoint for "+s.name+" ["+f+", "+d+", "+g+"], falling back to default."),s.blackPoint=new Float32Array(3)),(s.GR<0||s.GG<0||s.GB<0)&&((0,i.info)("Invalid Gamma ["+s.GR+", "+s.GG+", "+s.GB+"] for "+s.name+", falling back to default."),s.GR=s.GG=s.GB=1),s}return s(t,e),a(t,[{key:"getRgbItem",value:function(e,t,r,a){C(this,e,t,r,a,1)}},{key:"getRgbBuffer",value:function(e,t,r,a,i,n,o){for(var s=1/((1<=6/29?e*e*e:108/841*(e-4/29),t}function t(e,t,r,a){return r+e*(a-r)/t}function r(r,a,i,n,o,s){var c=a[i],l=a[i+1],u=a[i+2];!1!==n&&(c=t(c,n,0,100),l=t(l,n,r.amin,r.amax),u=t(u,n,r.bmin,r.bmax)),l=l>r.amax?r.amax:lr.bmax?r.bmax:un.amax||n.bmin>n.bmax)&&((0,i.info)("Invalid Range, falling back to defaults"),n.amin=-100,n.amax=100,n.bmin=-100,n.bmax=100),n}return s(t,e),a(t,[{key:"getRgbItem",value:function(e,t,a,i){r(this,e,t,!1,a,i)}},{key:"getRgbBuffer",value:function(e,t,a,i,n,o,s){for(var c=(1<0?e:0}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){Array.isArray(e)&&4===e.length?this.rectangle=n.Util.normalizeRect(e):this.rectangle=[0,0,0,0]}},{key:"setColor",value:function(e){var t=new Uint8ClampedArray(3);if(Array.isArray(e))switch(e.length){case 0:this.color=null;break;case 1:c.ColorSpace.singletons.gray.getRgbItem(e,0,t,0),this.color=t;break;case 3:c.ColorSpace.singletons.rgb.getRgbItem(e,0,t,0),this.color=t;break;case 4:c.ColorSpace.singletons.cmyk.getRgbItem(e,0,t,0),this.color=t;break;default:this.color=t;break}else this.color=t}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new v,(0,s.isDict)(e))if(e.has("BS")){var t=e.get("BS"),r=t.get("Type");r&&!(0,s.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W")),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){var a=e.getArray("Border");Array.isArray(a)&&a.length>=3&&(this.borderStyle.setHorizontalCornerRadius(a[0]),this.borderStyle.setVerticalCornerRadius(a[1]),this.borderStyle.setWidth(a[2]),4===a.length&&this.borderStyle.setDashArray(a[3]))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if((0,s.isDict)(t)){var r=t.get("N");if((0,s.isStream)(r))this.appearance=r;else if((0,s.isDict)(r)){var a=e.get("AS");(0,s.isName)(a)&&r.has(a.name)&&(this.appearance=r.get(a.name))}}}},{key:"_preparePopup",value:function(e){e.has("C")||(this.data.color=null),this.data.hasPopup=e.has("Popup"),this.data.title=(0,n.stringToPDFString)(e.get("T")||""),this.data.contents=(0,n.stringToPDFString)(e.get("Contents")||"")}},{key:"loadResources",value:function(e){return this.appearance.dict.getAsync("Resources").then(function(t){if(t){var r=new o.ObjectLoader(t,e,t.xref);return r.load().then(function(){return t})}})}},{key:"getOperatorList",value:function(e,t,r){var a=this;if(!this.appearance)return Promise.resolve(new l.OperatorList);var i=this.data,o=this.appearance.dict,s=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),c=o.getArray("BBox")||[0,0,1,1],u=o.getArray("Matrix")||[1,0,0,1,0,0],h=p(i.rect,c,u);return s.then(function(r){var o=new l.OperatorList;return o.addOp(n.OPS.beginAnnotation,[i.rect,h,u]),e.getOperatorList({stream:a.appearance,task:t,resources:r,operatorList:o}).then(function(){return o.addOp(n.OPS.endAnnotation,[]),a.appearance.reset(),o})})}},{key:"viewable",get:function(){return 0===this.flags||this._isViewable(this.flags)}},{key:"printable",get:function(){return 0!==this.flags&&this._isPrintable(this.flags)}}]),e}(),v=function(){function e(){d(this,e),this.width=1,this.style=n.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return i(e,[{key:"setWidth",value:function(e){Number.isInteger(e)&&(this.width=e)}},{key:"setStyle",value:function(e){if(e)switch(e.name){case"S":this.style=n.AnnotationBorderStyleType.SOLID;break;case"D":this.style=n.AnnotationBorderStyleType.DASHED;break;case"B":this.style=n.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=n.AnnotationBorderStyleType.INSET;break;case"U":this.style=n.AnnotationBorderStyleType.UNDERLINE;break;default:break}}},{key:"setDashArray",value:function(e){if(Array.isArray(e)&&e.length>0){for(var t=!0,r=!0,a=0,i=e.length;a=0;if(!o){t=!1;break}n>0&&(r=!1)}t&&!r?this.dashArray=e:this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}]),e}(),b=function(e){function t(e){d(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),a=e.dict,i=r.data;i.annotationType=n.AnnotationType.WIDGET,i.fieldName=r._constructFieldName(a),i.fieldValue=(0,n.getInheritableProperty)({dict:a,key:"V",getArray:!0}),i.alternativeText=(0,n.stringToPDFString)(a.get("TU")||""),i.defaultAppearance=(0,n.getInheritableProperty)({dict:a,key:"DA"})||"";var o=(0,n.getInheritableProperty)({dict:a,key:"FT"});return i.fieldType=(0,s.isName)(o)?o.name:null,r.fieldResources=(0,n.getInheritableProperty)({dict:a,key:"DR"})||s.Dict.empty,i.fieldFlags=(0,n.getInheritableProperty)({dict:a,key:"Ff"}),(!Number.isInteger(i.fieldFlags)||i.fieldFlags<0)&&(i.fieldFlags=0),i.readOnly=r.hasFieldFlag(n.AnnotationFieldFlag.READONLY),"Sig"===i.fieldType&&r.setFlags(n.AnnotationFlag.HIDDEN),r}return f(t,e),i(t,[{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return(0,n.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,n.stringToPDFString)(e.get("T"));var t=[];e.has("T")&&t.unshift((0,n.stringToPDFString)(e.get("T")));var r=e;while(r.has("Parent")){if(r=r.get("Parent"),!(0,s.isDict)(r))break;r.has("T")&&t.unshift((0,n.stringToPDFString)(r.get("T")))}return t.join(".")}},{key:"hasFieldFlag",value:function(e){return!!(this.data.fieldFlags&e)}},{key:"getOperatorList",value:function(e,r,i){return i?Promise.resolve(new l.OperatorList):a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getOperatorList",this).call(this,e,r,i)}}]),t}(m),y=function(e){function t(e){d(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),a=e.dict;r.data.fieldValue=(0,n.stringToPDFString)(r.data.fieldValue||"");var i=(0,n.getInheritableProperty)({dict:a,key:"Q"});(!Number.isInteger(i)||i<0||i>2)&&(i=null),r.data.textAlignment=i;var o=(0,n.getInheritableProperty)({dict:a,key:"MaxLen"});return(!Number.isInteger(o)||o<0)&&(o=null),r.data.maxLen=o,r.data.multiLine=r.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE),r.data.comb=r.hasFieldFlag(n.AnnotationFieldFlag.COMB)&&!r.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE)&&!r.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD)&&!r.hasFieldFlag(n.AnnotationFieldFlag.FILESELECT)&&null!==r.data.maxLen,r}return f(t,e),i(t,[{key:"getOperatorList",value:function(e,r,i){if(i||this.appearance)return a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getOperatorList",this).call(this,e,r,i);var o=new l.OperatorList;if(!this.data.defaultAppearance)return Promise.resolve(o);var s=new u.Stream((0,n.stringToBytes)(this.data.defaultAppearance));return e.getOperatorList({stream:s,task:r,resources:this.fieldResources,operatorList:o}).then(function(){return o})}}]),t}(b),w=function(e){function t(e){d(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.data.checkBox=!r.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!r.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),r.data.radioButton=r.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!r.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),r.data.pushButton=r.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),r.data.checkBox?r._processCheckBox(e):r.data.radioButton?r._processRadioButton(e):r.data.pushButton?r._processPushButton(e):(0,n.warn)("Invalid field flags for button widget annotation"),r}return f(t,e),i(t,[{key:"_processCheckBox",value:function(e){(0,s.isName)(this.data.fieldValue)&&(this.data.fieldValue=this.data.fieldValue.name);var t=e.dict.get("AP");if((0,s.isDict)(t)){var r=t.get("D");if((0,s.isDict)(r)){var a=r.getKeys(),i=2===a.length;i&&(this.data.exportValue="Off"===a[0]?a[1]:a[0])}}}},{key:"_processRadioButton",value:function(e){this.data.fieldValue=this.data.buttonValue=null;var t=e.dict.get("Parent");if((0,s.isDict)(t)&&t.has("V")){var r=t.get("V");(0,s.isName)(r)&&(this.data.fieldValue=r.name)}var a=e.dict.get("AP");if((0,s.isDict)(a)){var i=a.get("N");if((0,s.isDict)(i))for(var n=i.getKeys(),o=0,c=n.length;on&&(p=Math.max(p,b),y+=v+2*o,b=0,v=0),m.push({transform:w,x:b,y:y,w:k.width,h:k.height}),b+=k.width+2*o,v=Math.max(v,k.height)}var S=Math.max(p,b)+o,C=y+v+o,x=new Uint8ClampedArray(S*C*4),_=S<<2;for(g=0;g=0)A[O-4]=A[O],A[O-3]=A[O+1],A[O-2]=A[O+2],A[O-1]=A[O+3],A[O+P]=A[O+P-4],A[O+P+1]=A[O+P-3],A[O+P+2]=A[O+P-2],A[O+P+3]=A[O+P-1],O-=_}return s.splice(u,4*d,a.OPS.paintInlineImageXObjectGroup),c.splice(u,4*d,[{width:S,height:C,kind:a.ImageKind.RGBA_32BPP,data:x},m]),u+1}),e(r,[a.OPS.save,a.OPS.transform,a.OPS.paintImageMaskXObject,a.OPS.restore],null,function(e,t){var r=e.fnArray,i=e.iCurr-3,n=(t-i)%4;switch(n){case 0:return r[t]===a.OPS.save;case 1:return r[t]===a.OPS.transform;case 2:return r[t]===a.OPS.paintImageMaskXObject;case 3:return r[t]===a.OPS.restore}},function(e,r){var i,n=10,o=100,s=1e3,c=e.fnArray,l=e.argsArray,u=e.iCurr,h=u-3,f=u-2,d=u-1,g=Math.floor((r-h)/4);if(g=t(h,g,c,l),g=4&&i[s-4]===i[c]&&i[s-3]===i[l]&&i[s-2]===i[u]&&i[s-1]===i[h]&&n[s-4][0]===f&&n[s-4][1]===d&&(g++,p-=5);for(var m=p+4,v=1;v=a)break}i=(i||r)[e[t]],i&&!Array.isArray(i)?(o.iCurr=t,t++,!i.checkFn||(0,i.checkFn)(o)?(n=i,i=null):i=null):t++}this.state=i,this.match=n,this.lastProcessed=t}else this.lastProcessed=a},push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()},flush:function(){while(this.match){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}},reset:function(){this.state=null,this.match=null,this.lastProcessed=0}},i}(),n=function(){function e(e){this.queue=e}return e.prototype={push:function(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t)},flush:function(){}},e}(),o=function(){var e=1e3,t=e-5;function r(e){for(var t=[],r=e.fnArray,i=e.argsArray,n=0,o=e.length;n=e?this.flush():this.weight>=t&&(r===a.OPS.restore||r===a.OPS.endText)&&this.flush())},addDependency:function(e){e in this.dependencies||(this.dependencies[e]=!0,this.addOp(a.OPS.dependency,[e]))},addDependencies:function(e){for(var t in e)this.addDependency(t)},addOpList:function(e){Object.assign(this.dependencies,e.dependencies);for(var t=0,r=e.length;t0&&void 0!==arguments[0]?arguments[0]:e,r=Object.create(this);return r.options=t,r},hasBlendModes:function(e){if(!(0,c.isDict)(e))return!1;var t=Object.create(null);e.objId&&(t[e.objId]=!0);var r=[e],a=this.xref;while(r.length){var i,n,o,s=r.shift(),l=s.get("ExtGState");if((0,c.isDict)(l)){var u=l.getKeys();for(n=0,o=u.length;nv)return(0,n.warn)("Image exceeded maximum allowed size and was removed."),Promise.resolve();var b,y,k=g.get("ImageMask","IM")||!1;if(k){var S=g.get("Width","W"),x=g.get("Height","H"),_=S+7>>3,A=i.getBytes(_*x,!0),P=g.getArray("Decode","D");return b=C.PDFImage.createMask({imgArray:A,width:S,height:x,imageIsFromDecodeStream:i instanceof s.DecodeStream,inverseDecode:!!P&&P[0]>0}),b.cached=!0,y=[b],l.addOp(n.OPS.paintImageMaskXObject,y),u&&(h[u]={fn:n.OPS.paintImageMaskXObject,args:y}),Promise.resolve()}var I=g.get("SMask","SM")||!1,O=g.get("Mask")||!1,T=200;if(c&&!I&&!O&&!(i instanceof w.JpegStream)&&p+m0&&r.addOp(n.OPS.setGState,[s])})},loadFont:function(e,t,r){var a=this;function i(){return Promise.resolve(new P("g_font_error",new l.ErrorFont("Font "+e+" is not available"),t))}var o,s=this.xref;if(t){if(!(0,c.isRef)(t))throw new Error('The "font" object should be a reference.');o=t}else{var u=r.get("Font");if(!u)return(0,n.warn)("fontRes not available"),i();o=u.getRaw(e)}if(!o)return(0,n.warn)("fontRef not available"),i();if(this.fontCache.has(o))return this.fontCache.get(o);if(t=s.fetchIfRef(o),!(0,c.isDict)(t))return i();if(t.translated)return t.translated;var h,f,d=(0,n.createPromiseCapability)(),g=this.preEvaluateFont(t),p=g.descriptor,m=(0,c.isRef)(o);if(m&&(h=o.toString()),(0,c.isDict)(p)){p.fontAliases||(p.fontAliases=Object.create(null));var v=p.fontAliases,b=g.hash;if(v[b]){var y=v[b].aliasRef;if(m&&y&&this.fontCache.has(y))return this.fontCache.putAlias(o,y),this.fontCache.get(o)}else v[b]={fontID:l.Font.getFontID()};m&&(v[b].aliasRef=o),h=v[b].fontID}m?this.fontCache.put(o,d.promise):(h||(h=this.idFactory.createObjId()),this.fontCache.put("id_"+h,d.promise)),(0,n.assert)(h,'The "fontID" must be defined.'),t.loadedName="g_"+this.pdfManager.docId+"_f"+h,t.translated=d.promise;try{f=this.translateFont(g)}catch(w){f=Promise.reject(w)}return f.then(function(e){if(void 0!==e.fontType){var r=s.stats.fontTypes;r[e.fontType]=!0}d.resolve(new P(t.loadedName,e,t))}).catch(function(e){a.handler.send("UnsupportedFeature",{featureId:n.UNSUPPORTED_FEATURES.font});try{var r=g.descriptor,i=r&&r.get("FontFile3"),o=i&&i.get("Subtype"),c=(0,l.getFontType)(g.type,o&&o.name),u=s.stats.fontTypes;u[c]=!0}catch(h){}d.resolve(new P(t.loadedName,new l.ErrorFont(e instanceof Error?e.message:e),t))}),d.promise},buildPath:function(e,t,r){var a=e.length-1;if(r||(r=[]),a<0||e.fnArray[a]!==n.OPS.constructPath)e.addOp(n.OPS.constructPath,[[t],r]);else{var i=e.argsArray[a];i[0].push(t),Array.prototype.push.apply(i[1],r)}},handleColorN:function(e,t,r,a,i,n,o){var s,l=r[r.length-1];if((0,c.isName)(l)&&(s=i.get(l.name))){var u=(0,c.isStream)(s)?s.dict:s,h=u.get("PatternType");if(h===R){var f=a.base?a.base.getRgb(r,0):null;return this.handleTilingType(t,f,n,s,u,e,o)}if(h===B){var g=u.get("Shading"),p=u.getArray("Matrix");return s=d.Pattern.parseShading(g,p,this.xref,n,this.handler,this.pdfFunctionFactory),e.addOp(t,s.getIR()),Promise.resolve()}return Promise.reject(new Error("Unknown PatternType: "+h))}return e.addOp(t,r),Promise.resolve()},getOperatorList:function(e){var t=this,r=e.stream,a=e.task,i=e.resources,o=e.operatorList,s=e.initialState,l=void 0===s?null:s;if(i=i||c.Dict.empty,l=l||new T,!o)throw new Error('getOperatorList: missing "operatorList" parameter');var u=this,h=this.xref,f=Object.create(null),g=i.get("XObject")||c.Dict.empty,p=i.get("Pattern")||c.Dict.empty,v=new I(l),b=new E(r,h,v),y=new x;function w(e){for(var t=0,r=b.savedStatesDepth;t0&&(r*=b.fontMatrix[3],t[3]*=r)}var a=n.Util.transform(b.ctm,n.Util.transform(b.textMatrix,t));k.transform=a,e.vertical?(k.width=Math.sqrt(a[0]*a[0]+a[1]*a[1]),k.height=0,k.vertical=!0):(k.width=0,k.height=Math.sqrt(a[2]*a[2]+a[3]*a[3]),k.vertical=!1);var i=b.textLineMatrix[0],o=b.textLineMatrix[1],s=Math.sqrt(i*i+o*o);i=b.ctm[0],o=b.ctm[1];var c=Math.sqrt(i*i+o*o);k.textAdvanceScale=c*s,k.lastAdvanceWidth=0,k.lastAdvanceHeight=0;var l=e.spaceWidth/1e3*b.fontSize;return l?(k.spaceWidth=l,k.fakeSpaceMin=l*S,k.fakeMultiSpaceMin=l*C,k.fakeMultiSpaceMax=l*_,k.textRunBreakAllowed=!e.isMonospace):(k.spaceWidth=0,k.fakeSpaceMin=1/0,k.fakeMultiSpaceMin=1/0,k.fakeMultiSpaceMax=0,k.textRunBreakAllowed=!1),k.initialized=!0,k}function M(e){var t,r=0,a=e.length;while(r=32&&t<=127)r++;return r0&&q(d,r.str)}var g=0,p=0;if(t.vertical){var m=c*b.fontMatrix[0];p=m*b.fontSize+f,i+=p}else{var v=c*b.fontMatrix[0];g=(v*b.fontSize+f)*b.textHScale,a+=g}b.translateTextMatrix(g,p),r.str.push(l)}return t.vertical?(r.lastAdvanceHeight=i,r.height+=Math.abs(i)):(r.lastAdvanceWidth=a,r.width+=a),r}function q(e,t){if(!(e0)t.push(" ")}}function j(){k.initialized&&(k.width*=k.textAdvanceScale,k.height*=k.textAdvanceScale,w.items.push(L(k)),k.initialized=!1,k.str.length=0)}function z(){var e=w.items.length;e>0&&(g.enqueue(w,e),w.items=[],w.styles=Object.create(null))}var H=new x;return new Promise(function e(t,r){var o=function(a){z(),Promise.all([a,g.ready]).then(function(){try{e(t,r)}catch(a){r(a)}},r)};a.ensureNotTerminated(),H.reset();var l,h={},f=[];while(!(l=H.check())){if(f.length=0,h.args=f,!B.read(h))break;b=s.state;var p,m,y=h.fn;switch(f=h.args,0|y){case n.OPS.setFont:var S=f[0].name,C=f[1];if(b.font&&S===b.fontName&&C===b.fontSize)break;return j(),b.fontName=S,b.fontSize=C,void o(N(S,null));case n.OPS.setTextRise:j(),b.textRise=f[0];break;case n.OPS.setHScale:j(),b.textHScale=f[0]/100;break;case n.OPS.setLeading:j(),b.leading=f[0];break;case n.OPS.moveText:var x=!!b.font&&0===(b.font.vertical?f[0]:f[1]);if(p=f[0]-f[1],d&&x&&k.initialized&&p>0&&p<=k.fakeMultiSpaceMax){b.translateTextLineMatrix(f[0],f[1]),k.width+=f[0]-k.lastAdvanceWidth,k.height+=f[1]-k.lastAdvanceHeight,m=f[0]-k.lastAdvanceWidth-(f[1]-k.lastAdvanceHeight),q(m,k.str);break}j(),b.translateTextLineMatrix(f[0],f[1]),b.textMatrix=b.textLineMatrix.slice();break;case n.OPS.setLeadingMoveText:j(),b.leading=-f[1],b.translateTextLineMatrix(f[0],f[1]),b.textMatrix=b.textLineMatrix.slice();break;case n.OPS.nextLine:j(),b.carriageReturn();break;case n.OPS.setTextMatrix:if(p=b.calcTextLineMatrixAdvance(f[0],f[1],f[2],f[3],f[4],f[5]),d&&null!==p&&k.initialized&&p.value>0&&p.value<=k.fakeMultiSpaceMax){b.translateTextLineMatrix(p.width,p.height),k.width+=p.width-k.lastAdvanceWidth,k.height+=p.height-k.lastAdvanceHeight,m=p.width-k.lastAdvanceWidth-(p.height-k.lastAdvanceHeight),q(m,k.str);break}j(),b.setTextMatrix(f[0],f[1],f[2],f[3],f[4],f[5]),b.setTextLineMatrix(f[0],f[1],f[2],f[3],f[4],f[5]);break;case n.OPS.setCharSpacing:b.charSpacing=f[0];break;case n.OPS.setWordSpacing:b.wordSpacing=f[0];break;case n.OPS.beginText:j(),b.textMatrix=n.IDENTITY_MATRIX.slice(),b.textLineMatrix=n.IDENTITY_MATRIX.slice();break;case n.OPS.showSpacedText:for(var _,P=f[0],O=0,E=P.length;Ok.fakeMultiSpaceMax,M||(k.height+=_)):(p=-p,_=p*b.textHScale,b.translateTextMatrix(_,0),M=k.textRunBreakAllowed&&p>k.fakeMultiSpaceMax,M||(k.width+=_)),M?j():p>0&&q(p,k.str)}break;case n.OPS.showText:U(f[0]);break;case n.OPS.nextLineShowText:j(),b.carriageReturn(),U(f[0]);break;case n.OPS.nextLineSetSpacingShowText:j(),b.wordSpacing=f[0],b.charSpacing=f[1],b.carriageReturn(),U(f[2]);break;case n.OPS.paintXObject:j(),T||(T=i.get("XObject")||c.Dict.empty);var L=f[0].name;if(L&&void 0!==R[L])break;return void o(new Promise(function(e,t){if(!L)throw new n.FormatError("XObject must be referred to by name.");var r=T.get(L);if(r){if(!(0,c.isStream)(r))throw new n.FormatError("XObject should be a stream");var o=r.dict.get("Subtype");if(!(0,c.isName)(o))throw new n.FormatError("XObject should have a Name subtype");if("Form"!==o.name)return R[L]=!0,void e();var l=s.state.clone(),h=new I(l),f=r.dict.getArray("Matrix");Array.isArray(f)&&6===f.length&&h.transform(f),z();var p={enqueueInvoked:!1,enqueue:function(e,t){this.enqueueInvoked=!0,g.enqueue(e,t)},get desiredSize(){return g.desiredSize},get ready(){return g.ready}};A.getTextContent({stream:r,task:a,resources:r.dict.get("Resources")||i,stateManager:h,normalizeWhitespace:u,combineTextItems:d,sink:p,seenStyles:v}).then(function(){p.enqueueInvoked||(R[L]=!0),e()},t)}else e()}).catch(function(e){if(!(e instanceof n.AbortException)){if(!A.options.ignoreErrors)throw e;(0,n.warn)('getTextContent - ignoring XObject: "'+e+'".')}}));case n.OPS.setGState:j();var G=f[0],W=i.get("ExtGState");if(!(0,c.isDict)(W)||!(0,c.isName)(G))break;var X=W.get(G.name);if(!(0,c.isDict)(X))break;var Y=X.get("Font");if(Y)return b.fontName=null,b.fontSize=Y[1],void o(N(null,Y[0]));break}if(w.items.length>=g.desiredSize){l=!0;break}}l?o(F):(j(),z(),t())}).catch(function(e){if(!(e instanceof n.AbortException)){if(t.options.ignoreErrors)return(0,n.warn)('getTextContent - ignoring errors during "'+a.name+'" task: "'+e+'".'),j(),void z();throw e}})},extractDataStructures:function(e,t,r){var a=this,i=this.xref,o=e.get("ToUnicode")||t.get("ToUnicode"),s=o?this.readToUnicode(o):Promise.resolve(void 0);if(r.composite){var h=e.get("CIDSystemInfo");(0,c.isDict)(h)&&(r.cidSystemInfo={registry:(0,n.stringToPDFString)(h.get("Registry")),ordering:(0,n.stringToPDFString)(h.get("Ordering")),supplement:h.get("Supplement")});var f=e.get("CIDToGIDMap");(0,c.isStream)(f)&&(r.cidToGidMap=this.readCidToGidMap(f))}var d,g=[],p=null;if(e.has("Encoding")){if(d=e.get("Encoding"),(0,c.isDict)(d)){if(p=d.get("BaseEncoding"),p=(0,c.isName)(p)?p.name:null,d.has("Differences"))for(var m=d.get("Differences"),v=0,b=0,y=m.length;b0,r.dict=e,s.then(function(e){return r.toUnicode=e,a.buildToUnicode(r)}).then(function(e){return r.toUnicode=e,r})},_buildSimpleFontToUnicode:function(e){(0,n.assert)(!e.composite,"Must be a simple font.");var t=[],r=void 0,a=void 0,i=e.defaultEncoding.slice(),o=e.baseEncodingName,s=e.differences;for(r in s)a=s[r],".notdef"!==a&&(i[r]=a);var c=(0,v.getGlyphsUnicode)();for(r in i)if(a=i[r],""!==a)if(void 0!==c[a])t[r]=String.fromCharCode(c[a]);else{var f=0;switch(a[0]){case"G":3===a.length&&(f=parseInt(a.substring(1),16));break;case"g":5===a.length&&(f=parseInt(a.substring(1),16));break;case"C":case"c":a.length>=3&&(f=+a.substring(1));break;default:var d=(0,h.getUnicodeForGlyph)(a,c);-1!==d&&(f=d)}if(f){if(o&&f===+r){var g=(0,u.getEncoding)(o);if(g&&(a=g[r])){t[r]=String.fromCharCode(c[a]);continue}}t[r]=String.fromCharCode(f)}}return new l.ToUnicodeMap(t)},buildToUnicode:function(e){if(e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._buildSimpleFontToUnicode(e)),Promise.resolve(e.toUnicode);if(!e.composite)return Promise.resolve(this._buildSimpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof o.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){var t=e.cidSystemInfo.registry,r=e.cidSystemInfo.ordering,a=c.Name.get(t+"-"+r+"-UCS2");return o.CMapFactory.create({encoding:a,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(t){var r=e.cMap,a=[];return r.forEach(function(e,r){if(r>65535)throw new n.FormatError("Max size of CID is 65,535");var i=t.lookup(r);i&&(a[e]=String.fromCharCode((i.charCodeAt(0)<<8)+i.charCodeAt(1)))}),new l.ToUnicodeMap(a)})}return Promise.resolve(new l.IdentityToUnicodeMap(e.firstChar,e.lastChar))},readToUnicode:function(e){var t=e;return(0,c.isName)(t)?o.CMapFactory.create({encoding:t,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(e){return e instanceof o.IdentityCMap?new l.IdentityToUnicodeMap(0,65535):new l.ToUnicodeMap(e.getMap())}):(0,c.isStream)(t)?o.CMapFactory.create({encoding:t,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(e){if(e instanceof o.IdentityCMap)return new l.IdentityToUnicodeMap(0,65535);var t=new Array(e.length);return e.forEach(function(e,r){for(var a=[],i=0;i>1;r[o]=n}}return r},extractWidths:function(e,t,r){var a,i,n,o,s,u,h,f,d=this.xref,g=[],p=0,m=[];if(r.composite){if(p=e.has("DW")?e.get("DW"):1e3,f=e.get("W"),f)for(i=0,n=f.length;il&&(0,n.info)("Command "+i+": expected [0, "+l+"] args, but received "+u+" args.");else{if(u!==l){var h=this.nonProcessedArgs;while(u>l)h.push(r.shift()),u--;while(u=n.OPS.moveTo&&s<=n.OPS.endPath&&++this._numInvalidPathOPS>t)throw new n.FormatError("Invalid "+f);(0,n.warn)("Skipping "+f),null!==r&&(r.length=0);continue}}return this.preprocessCommand(s,r),e.fn=s,e.args=r,!0}if((0,c.isEOF)(a))return!1;if(null!==a&&(null===r&&(r=[]),r.push(a),r.length>33))throw new n.FormatError("Too many arguments")}},preprocessCommand:function(e,t){switch(0|e){case n.OPS.save:this.stateManager.save();break;case n.OPS.restore:this.stateManager.restore();break;case n.OPS.transform:this.stateManager.transform(t);break}}},r}();t.PartialEvaluator=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CMapFactory=t.IdentityCMap=t.CMap=void 0;var a=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];u(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}return a(e,[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){while(e<=t)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){var a=r.length-1;while(e<=t)this._map[e++]=r,r=r.substring(0,a)+String.fromCharCode(r.charCodeAt(a)+1)}},{key:"mapBfRangeToArray",value:function(e,t,r){var a=0,i=r.length;while(e<=t&&a>>0;for(var s=i[n],c=0,l=s.length;c=u&&a<=h)return r.charcode=a,void(r.length=n+1)}}r.charcode=0,r.length=1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}]),e}(),d=function(e){function t(e,r){u(this,t);var a=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.vertical=e,a.addCodespaceRange(r,0,65535),a}return l(t,e),a(t,[{key:"mapCidRange",value:function(e,t,r){(0,i.unreachable)("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){(0,i.unreachable)("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){(0,i.unreachable)("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){(0,i.unreachable)("should not access .isIdentityCMap")}}]),t}(f),g=function(){function e(e,t){for(var r=0,a=0;a<=t;a++)r=r<<8|e[a];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){for(var a=0,i=r;i>=0;i--)a+=e[i]+t[i],e[i]=255&a,a>>=8}function a(e,t){for(var r=1,a=t;a>=0&&r>0;a--)r+=e[a],e[a]=255&r,r>>=8}var n=16,o=19;function s(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(o)}function c(i,o,c){return new Promise(function(l,u){var h=new s(i),f=h.readByte();o.vertical=!!(1&f);var d,g,p=null,m=new Uint8Array(n),v=new Uint8Array(n),b=new Uint8Array(n),y=new Uint8Array(n),w=new Uint8Array(n);while((g=h.readByte())>=0){var k=g>>5;if(7!==k){var S=!!(16&g),C=15&g;if(C+1>n)throw new Error("processBinaryCMap: Invalid dataSize.");var x,_=1,A=h.readNumber();switch(k){case 0:for(h.readHex(m,C),h.readHexNumber(v,C),r(v,m,C),o.addCodespaceRange(C+1,e(m,C),e(v,C)),x=1;x=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new i.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t},readSigned:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1},readHex:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1},readHexNumber:function(e,t){var r,a=this.tmpBuf,n=0;do{var o=this.readByte();if(o<0)throw new i.FormatError("unexpected EOF in bcmap");r=!(128&o),a[n++]=127&o}while(!r);var s=t,c=0,l=0;while(s>=0){while(l<8&&a.length>0)c=a[--n]<>=8,l-=8}},readHexSigned:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,a=0,i=0;i<=t;i++)a=(1&a)<<8|e[i],e[i]=a>>1^r},readString:function(){for(var e=this.readNumber(),t="",r=0;r>>0}function t(e){if(!(0,i.isString)(e))throw new i.FormatError("Malformed CMap: expected string.")}function r(e){if(!Number.isInteger(e))throw new i.FormatError("Malformed CMap: expected int.")}function a(r,a){while(1){var i=a.getObj();if((0,n.isEOF)(i))break;if((0,n.isCmd)(i,"endbfchar"))return;t(i);var o=e(i);i=a.getObj(),t(i);var s=i;r.mapOne(o,s)}}function c(r,a){while(1){var o=a.getObj();if((0,n.isEOF)(o))break;if((0,n.isCmd)(o,"endbfrange"))return;t(o);var s=e(o);o=a.getObj(),t(o);var c=e(o);if(o=a.getObj(),Number.isInteger(o)||(0,i.isString)(o)){var l=Number.isInteger(o)?String.fromCharCode(o):o;r.mapBfRange(s,c,l)}else{if(!(0,n.isCmd)(o,"["))break;o=a.getObj();var u=[];while(!(0,n.isCmd)(o,"]")&&!(0,n.isEOF)(o))u.push(o),o=a.getObj();r.mapBfRangeToArray(s,c,u)}}throw new i.FormatError("Invalid bf range.")}function l(a,i){while(1){var o=i.getObj();if((0,n.isEOF)(o))break;if((0,n.isCmd)(o,"endcidchar"))return;t(o);var s=e(o);o=i.getObj(),r(o);var c=o;a.mapOne(s,c)}}function u(a,i){while(1){var o=i.getObj();if((0,n.isEOF)(o))break;if((0,n.isCmd)(o,"endcidrange"))return;t(o);var s=e(o);o=i.getObj(),t(o);var c=e(o);o=i.getObj(),r(o);var l=o;a.mapCidRange(s,c,l)}}function p(t,r){while(1){var a=r.getObj();if((0,n.isEOF)(a))break;if((0,n.isCmd)(a,"endcodespacerange"))return;if(!(0,i.isString)(a))break;var o=e(a);if(a=r.getObj(),!(0,i.isString)(a))break;var s=e(a);t.addCodespaceRange(a.length,o,s)}throw new i.FormatError("Invalid codespace range.")}function m(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function v(e,t){var r=t.getObj();(0,n.isName)(r)&&(0,i.isString)(r.name)&&(e.name=r.name)}function b(e,t,r,o){var s,h;e:while(1)try{var f=t.getObj();if((0,n.isEOF)(f))break;if((0,n.isName)(f))"WMode"===f.name?m(e,t):"CMapName"===f.name&&v(e,t),s=f;else if((0,n.isCmd)(f))switch(f.cmd){case"endcmap":break e;case"usecmap":(0,n.isName)(s)&&(h=s.name);break;case"begincodespacerange":p(e,t);break;case"beginbfchar":a(e,t);break;case"begincidchar":l(e,t);break;case"beginbfrange":c(e,t);break;case"begincidrange":u(e,t);break}}catch(d){if(d instanceof i.MissingDataException)throw d;(0,i.warn)("Invalid cMap data: "+d);continue}return!o&&h&&(o=h),o?y(e,r,o):Promise.resolve(e)}function y(e,t,r){return w(r,t).then(function(t){if(e.useCMap=t,0===e.numCodespaceRanges){for(var r=e.useCMap.codespaceRanges,a=0;a0&&void 0!==arguments[0]?arguments[0]:[];this._map=e}return e.prototype={get length(){return this._map.length},forEach:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))},has:function(e){return void 0!==this._map[e]},get:function(e){return this._map[e]},charCodeOf:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1},amend:function(e){for(var t in e)this._map[t]=e[t]}},e}(),_=function(){function e(e,t){this.firstChar=e,this.lastChar=t}return e.prototype={get length(){return this.lastChar+1-this.firstChar},forEach:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)},has:function(e){return this.firstChar<=e&&e<=this.lastChar},get:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)},charCodeOf:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1},amend:function(e){(0,i.unreachable)("Should not call amend()")}},e}(),A=function(){function e(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function t(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function r(e,t,r){var a,i;if(r instanceof Uint8Array)e.set(r,t);else if("string"===typeof r)for(a=0,i=r.length;ar)r<<=1,a++;var i=r*t;return{range:i,entry:a,rangeShift:t*e-i}};var n=12,o=16;return a.prototype={toArray:function(){var s=this.sfnt,c=this.tables,l=Object.keys(c);l.sort();var u,h,f,d,g,p=l.length,m=n+p*o,v=[m];for(u=0;u>>0;m+=b,v.push(m)}var y=new Uint8Array(m);for(u=0;u>>0}t(y,m+4,k),t(y,m+8,v[u]),t(y,m+12,c[g].length),m+=o}return y},addTable:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}},a}(),P=function(){function e(e,t,r){var n;this.name=e,this.loadedName=r.loadedName,this.isType3Font=r.isType3Font,this.sizes=[],this.missingFile=!1,this.glyphCache=Object.create(null),this.isSerifFont=!!(r.flags&v.Serif),this.isSymbolicFont=!!(r.flags&v.Symbolic),this.isMonospace=!!(r.flags&v.FixedPitch);var o=r.type,s=r.subtype;if(this.type=o,this.subtype=s,this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.differences=r.differences,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.composite=r.composite,this.wideChars=r.wideChars,this.cMap=r.cMap,this.ascent=r.ascent/p,this.descent=r.descent/p,this.fontMatrix=r.fontMatrix,this.bbox=r.bbox,this.defaultEncoding=r.defaultEncoding,this.toUnicode=r.toUnicode,this.fallbackToUnicode=r.fallbackToUnicode||new x,this.toFontChar=[],"Type3"!==r.type){if(this.cidEncoding=r.cidEncoding,this.vertical=r.vertical,this.vertical&&(this.vmetrics=r.vmetrics,this.defaultVMetrics=r.defaultVMetrics),!t||t.isEmpty)return t&&(0,i.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")"),void this.fallbackToSystemFont();var c=L(t,r),l=a(c,2);o=l[0],s=l[1],o===this.type&&s===this.subtype||(0,i.info)("Inconsistent font file Type/SubType, expected: "+this.type+"/"+this.subtype+" but found: "+o+"/"+s+".");try{var u;switch(o){case"MMType1":(0,i.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var h="Type1C"===s||"CIDFontType0C"===s?new E(t,r):new T(e,t,r);y(r),u=this.convert(e,h,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",u=this.checkAndRepair(e,t,r),this.isOpenType&&(y(r),o="OpenType");break;default:throw new i.FormatError("Font "+o+" is not supported")}}catch(f){return(0,i.warn)(f),void this.fallbackToSystemFont()}this.data=u,this.fontType=k(o,s),this.fontMatrix=r.fontMatrix,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.toUnicode=r.toUnicode,this.encoding=r.baseEncoding,this.seacMap=r.seacMap}else{for(n=0;n<256;n++)this.toFontChar[n]=this.differences[n]||r.defaultEncoding[n];this.fontType=i.FontType.TYPE3}}function t(e,t){return(e<<8)+t}function r(e,t,r){e[t+1]=r,e[t]=r>>>8}function d(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function P(e,t,r,a){return(e<<24)+(t<<16)+(r<<8)+a}function I(e){return String.fromCharCode(e>>8&255,255&e)}function O(e){return e=e>32767?32767:e<-32768?-32768:e,String.fromCharCode(e>>8&255,255&e)}function F(e){var t=e.peekBytes(4);return 65536===(0,i.readUint32)(t,0)||"true"===(0,i.bytesToString)(t)}function R(e){var t=e.peekBytes(4);return"ttcf"===(0,i.bytesToString)(t)}function B(e){var t=e.peekBytes(4);return"OTTO"===(0,i.bytesToString)(t)}function D(e){var t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}function M(e){var t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}function L(e,t){var r=t.type,a=t.subtype,n=t.composite,o=void 0,s=void 0;return F(e)||R(e)?o=n?"CIDFontType2":"TrueType":B(e)?o=n?"CIDFontType2":"OpenType":D(e)?o=n?"CIDFontType0":"MMType1"===r?"MMType1":"Type1":M(e)?n?(o="CIDFontType0",s="CIDFontType0C"):(o="MMType1"===r?"MMType1":"Type1",s="Type1C"):((0,i.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),o=r,s=a),[o,s]}function N(e,t,r){for(var a,i=[],n=0,o=e.length;nc){if(o++,o>=g.length){(0,i.warn)("Ran out of space in font private use area.");break}s=g[o][0],c=g[o][1]}var h=s++;0===u&&(u=r),a[h]=u,n[l]=h}}return{toFontChar:n,charCodeToGlyphId:a,nextAvailableFontCharCode:s}}function q(e,t){var r=[];for(var a in e)e[a]>=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 i=[],n=r.length,o=0;o65535?2:1,l="\0\0"+I(c)+"\0\0"+(0,i.string32)(4+8*c);for(r=s.length-1;r>=0;--r)if(s[r][0]<=65535)break;var u=r+1;s[r][0]<65535&&65535===s[r][1]&&(s[r][1]=65534);var h,f,d,g,p=s[r][1]<65535?1:0,m=u+p,v=A.getSearchParams(m,2),b="",y="",w="",k="",S="",C=0;for(r=0,a=u;r0&&(y+="ÿÿ",b+="ÿÿ",w+="\0",k+="\0\0");var O="\0\0"+I(2*m)+I(v.range)+I(v.entry)+I(v.rangeShift)+y+"\0\0"+b+w+k+S,T="",E="";if(c>1){for(l+="\0\0\n"+(0,i.string32)(4+8*c+4+O.length),T="",r=0,a=s.length;rn)return!1;t.getBytes(6);var o=t.getUint16();return 0!==o&&(e.data[8]=e.data[9]=0,!0)}function H(e,t,r){r=r||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var a=0,n=0,o=0,s=0,c=null,u=0;if(t){for(var h in t){h|=0,(c>h||!c)&&(c=h),u 123 are reserved for internal usage");s|=1<65535&&(u=65535)}else c=0,u=255;var d=e.bbox||[0,0,0,0],g=r.unitsPerEm||1/(e.fontMatrix||i.FONT_IDENTITY_MATRIX)[0],m=e.ascentScaled?1:g/p,v=r.ascent||Math.round(m*(e.ascent||d[3])),b=r.descent||Math.round(m*(e.descent||d[1]));b>0&&e.descent>0&&d[1]<0&&(b=-b);var y=r.yMax||v,w=-r.yMin||-b;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,i.string32)(a)+(0,i.string32)(n)+(0,i.string32)(o)+(0,i.string32)(s)+"*21*"+I(e.italicAngle?1:0)+I(c||e.firstChar)+I(u||e.lastChar)+I(v)+I(b)+"\0d"+I(y)+I(w)+"\0\0\0\0\0\0\0\0"+I(e.xHeight)+I(e.capHeight)+I(0)+I(c||e.firstChar)+"\0"}function G(e){var t=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+(0,i.string32)(t)+"\0\0\0\0"+(0,i.string32)(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function W(e,t){t||(t=[[],[]]);var r,a,i,n,o,s=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||"",t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],c=[];for(r=0,a=s.length;r0,g&&"CIDFontType2"===n&&0===this.cidEncoding.indexOf("Identity-")){var p=(0,c.getGlyphMapForStandardFonts)(),m=[];for(e in p)m[+e]=p[e];if(/Arial-?Black/i.test(a)){var v=(0,c.getSupplementalGlyphMapForArialBlack)();for(e in v)m[+e]=v[e]}else if(/Calibri/i.test(a)){var b=(0,c.getSupplementalGlyphMapForCalibri)();for(e in b)m[+e]=b[e]}var y=this.toUnicode instanceof _;y||this.toUnicode.forEach(function(e,t){m[+e]=t}),this.toFontChar=m,this.toUnicode=new x(m)}else if(/Symbol/i.test(h))this.toFontChar=N(s.SymbolSetEncoding,(0,o.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(h))/Wingdings/i.test(a)&&(0,i.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats."),this.toFontChar=N(s.ZapfDingbatsEncoding,(0,o.getDingbatsGlyphsUnicode)(),this.differences);else if(g)this.toFontChar=N(this.defaultEncoding,(0,o.getGlyphsUnicode)(),this.differences);else{var w=(0,o.getGlyphsUnicode)();this.toUnicode.forEach(function(e,a){if(!r.composite){var i=r.differences[e]||r.defaultEncoding[e];t=(0,l.getUnicodeForGlyph)(i,w),-1!==t&&(a=t)}r.toFontChar[e]=a})}this.loadedName=h.split("-")[0],this.fontType=k(n,u)},checkAndRepair:function(e,a,c){var l=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function u(e,t){var r=Object.create(null);r["OS/2"]=null,r["cmap"]=null,r["head"]=null,r["hhea"]=null,r["hmtx"]=null,r["maxp"]=null,r["name"]=null,r["post"]=null;for(var i=0;i>>0,a=e.getInt32()>>>0,n=e.getInt32()>>>0,o=e.pos;e.pos=e.start?e.start:0,e.skip(a);var s=e.getBytes(n);return e.pos=o,"head"===t&&(s[8]=s[9]=s[10]=s[11]=0,s[17]|=32),{tag:t,checksum:r,length:n,offset:a,data:s}}function p(e){return{version:(0,i.bytesToString)(e.getBytes(4)),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function v(e){var t=(0,i.bytesToString)(e.getBytes(4));(0,i.assert)("ttcf"===t,"Must be a TrueType Collection font.");for(var r=e.getUint16(),a=e.getUint16(),n=e.getInt32()>>>0,o=[],s=0;s>>0);var c={ttcTag:t,majorVersion:r,minorVersion:a,numFonts:n,offsetTable:o};switch(r){case 1:return c;case 2:return c.dsigTag=e.getInt32()>>>0,c.dsigLength=e.getInt32()>>>0,c.dsigOffset=e.getInt32()>>>0,c}throw new i.FormatError("Invalid TrueType Collection majorVersion: "+r+".")}function w(e,t){for(var r=v(e),a=r.numFonts,n=r.offsetTable,o=0;o>>0,g=!1;if((!s||s.platformId!==h||s.encodingId!==f)&&(0===h&&0===f?g=!0:1===h&&0===f?g=!0:3!==h||1!==f||!a&&s?r&&3===h&&0===f&&(g=!0,l=!0):(g=!0,r||(l=!0)),g&&(s={platformId:h,encodingId:f,offset:d}),l))break}if(s&&(t.pos=o+s.offset),!s||-1===t.peekByte())return(0,i.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p=t.getUint16();t.getUint16(),t.getUint16();var m,v,b=!1,y=[];if(0===p){for(m=0;m<256;m++){var w=t.getByte();w&&y.push({charCode:m,glyphId:w})}b=!0}else if(4===p){var k=t.getUint16()>>1;t.getBytes(6);var S,C=[];for(S=0;S>1)-(k-S);n.offsetIndex=A,x=Math.max(x,A+n.end-n.start+1)}else n.offsetIndex=-1}var P=[];for(m=0;ma&&((0,i.info)("The numOfMetrics ("+n+") should not be greater than the numGlyphs ("+a+")"),n=a,t.data[34]=(65280&n)>>8,t.data[35]=255&n);var o=a-n,s=o-(r.length-4*n>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),r.data=c}}else r&&(r.data=null)}function x(e,t,a,i,n,o){var s={length:0,sizeOfInstructions:0};if(a-t<=12)return s;var c=e.subarray(t,a),l=d(c[0],c[1]);if(l<0)return l=-1,r(c,0,l),i.set(c,n),s.length=c.length,s;var u,h=10,f=0;for(u=0;uc.length?s:!o&&m>0?(i.set(c.subarray(0,p),n),i.set([0,0],n+p),i.set(c.subarray(v,S),n+p+2),S-=m,c.length-S>3&&(S=S+3&-4),s.length=S,s):c.length-S>3?(S=S+3&-4,i.set(c.subarray(0,S),n),s.length=S,s):(i.set(c,n),s.length=c.length,s)}function _(e,r,a){var n=e.data,o=P(n[0],n[1],n[2],n[3]);o>>16!==1&&((0,i.info)("Attempting to fix invalid version in head table: "+o),n[0]=0,n[1]=1,n[2]=0,n[3]=0);var s=t(n[50],n[51]);if(s<0||s>1){(0,i.info)("Attempting to fix invalid indexToLocFormat in head table: "+s);var c=r+1;if(a===c<<1)n[50]=0,n[51]=0;else{if(a!==c<<2)throw new i.FormatError("Could not fix indexToLocFormat: "+s);n[50]=0,n[51]=1}}}function I(e,t,r,a,i,n,o){var s,c,l;a?(s=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},l=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(s=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},l=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var u=n?r+1:r,h=e.data,f=s*(1+u);h=new Uint8Array(f),h.set(e.data.subarray(0,f)),e.data=h;var d,g,p=t.data,m=p.length,v=new Uint8Array(m),b=c(h,0),y=0,w=Object.create(null);for(l(h,0,y),d=0,g=s;dm&&(m+3&-4)===k&&(k=m),k>m&&(b=k);var S=x(p,b,k,v,y,i),C=S.length;0===C&&(w[d]=!0),S.sizeOfInstructions>o&&(o=S.sizeOfInstructions),y+=C,l(h,g,y),b=k}if(0===y){var _=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(d=0,g=s;dA+y?t.data=v.subarray(0,A+y):(t.data=new Uint8Array(A+y),t.data.set(v.subarray(0,y))),t.data.set(v.subarray(0,A),y),l(e.data,h.length-s,y+A)}else t.data=v.subarray(0,y);return{missingGlyphs:w,maxSizeOfInstructions:o}}function O(e,t,r){var n=(a.start?a.start:0)+e.offset;a.pos=n;var o,s=e.length,c=n+s,l=a.getInt32();a.getBytes(28);var u,h=!0;switch(l){case 65536:o=b;break;case 131072:var f=a.getUint16();if(f!==r){h=!1;break}var d=[];for(u=0;u=32768){h=!1;break}d.push(g)}if(!h)break;var p=[],m=[];while(a.poso)){a.pos=v;var b=m.name;if(m.encoding){for(var y="",w=0,k=m.length;w0&&(l+=k-1)}}else(m||b)&&((0,i.warn)("TT: nested FDEFs not allowed"),p=!0),m=!0,h=l,o=f.pop(),t.functionsDefined[o]={data:c,i:l};else if(!m&&!b)if(o=f[f.length-1],isNaN(o))(0,i.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[o]=!0,o in t.functionsStackDeltas){var S=f.length+t.functionsStackDeltas[o];if(S<0)return(0,i.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);f.length=S}else if(o in t.functionsDefined&&!g.includes(o)){if(d.push({data:c,i:l,stackTop:f.length-1}),g.push(o),s=t.functionsDefined[o],!s)return(0,i.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=s.data,l=s.i}if(!m&&!b){var C=w<=142?F[w]:w>=192&&w<=223?-1:w>=224?-2:0;w>=113&&w<=117&&(a=f.pop(),isNaN(a)||(C=2*-a));while(C<0&&f.length>0)f.pop(),C++;while(C>0)f.push(NaN),C--}}t.tooComplexToFollowFunctions=p;var x=[c];l>c.length&&x.push(new Uint8Array(l-c.length)),h>u&&((0,i.warn)("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),M(e,x)}function D(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,i.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,a=e.functionsUsed.length;rt)return(0,i.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,i.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}function M(e,t){if(t.length>1){var r,a,i=0;for(r=0,a=t.length;r0||!(c.cMap instanceof h.IdentityCMap));if("OTTO"===N.version&&!J||!q["head"]||!q["hhea"]||!q["maxp"]||!q["post"])return V=new f.Stream(q["CFF "].data),Y=new E(V,c),y(c),this.convert(e,Y,c);delete q["glyf"],delete q["loca"],delete q["fpgm"],delete q["prep"],delete q["cvt "],this.isOpenType=!0}if(!q["maxp"])throw new i.FormatError('Required "maxp" table is not found');a.pos=(a.start||0)+q["maxp"].offset;var Z=a.getInt32(),Q=a.getUint16(),$=Q+1,ee=!0;$>65535&&(ee=!1,$=Q,(0,i.warn)("Not enough space in glyfs to duplicate first glyph."));var te=0,re=0;if(Z>=65536&&q["maxp"].length>=22){a.pos+=8;var ae=a.getUint16();ae>2&&(q["maxp"].data[14]=0,q["maxp"].data[15]=2),a.pos+=4,te=a.getUint16(),a.pos+=4,re=a.getUint16()}q["maxp"].data[4]=$>>8,q["maxp"].data[5]=255&$;var ie=L(q["fpgm"],q["prep"],q["cvt "],te);if(ie||(delete q["fpgm"],delete q["prep"],delete q["cvt "]),C(a,q["hhea"],q["hmtx"],$),!q["head"])throw new i.FormatError('Required "head" table is not found');_(q["head"],Q,K?q["loca"].length:0);var ne=Object.create(null);if(K){var oe=t(q["head"].data[50],q["head"].data[51]),se=I(q["loca"],q["glyf"],Q,oe,ie,ee,re);ne=se.missingGlyphs,Z>=65536&&q["maxp"].length>=22&&(q["maxp"].data[26]=se.maxSizeOfInstructions>>8,q["maxp"].data[27]=255&se.maxSizeOfInstructions)}if(!q["hhea"])throw new i.FormatError('Required "hhea" table is not found');0===q["hhea"].data[10]&&0===q["hhea"].data[11]&&(q["hhea"].data[10]=255,q["hhea"].data[11]=255);var ce={unitsPerEm:t(q["head"].data[18],q["head"].data[19]),yMax:t(q["head"].data[42],q["head"].data[43]),yMin:d(q["head"].data[38],q["head"].data[39]),ascent:t(q["hhea"].data[4],q["hhea"].data[5]),descent:d(q["hhea"].data[6],q["hhea"].data[7])};this.ascent=ce.ascent/ce.unitsPerEm,this.descent=ce.descent/ce.unitsPerEm,q["post"]&&O(q["post"],c,Q),q["post"]={tag:"post",data:G(c)};var le,ue=[];function he(e){return!ne[e]}if(c.composite){var fe=c.cidToGidMap||[],de=0===fe.length;c.cMap.forEach(function(e,t){if(t>65535)throw new i.FormatError("Max size of CID is 65,535");var r=-1;de?r=t:void 0!==fe[t]&&(r=fe[t]),r>=0&&r0&&he(Ae)&&(ue[le]=Ae)}}}}else if(0===pe&&0===me)for(var Pe=0;Pe=61440&&le<=61695&&(le&=255),ue[le]=ve[Ie].glyphId}0===ue.length&&(ue[0]=0);var Oe=$-1;ee||(Oe=0);var Te=U(ue,he,Oe);if(this.toFontChar=Te.toFontChar,q["cmap"]={tag:"cmap",data:j(Te.charCodeToGlyphId,$)},q["OS/2"]&&z(q["OS/2"])||(q["OS/2"]={tag:"OS/2",data:H(c,Te.charCodeToGlyphId,ce)}),!K)try{V=new f.Stream(q["CFF "].data);var Ee=new n.CFFParser(V,c,m);Y=Ee.parse(),Y.duplicateFirstGlyph();var Fe=new n.CFFCompiler(Y);q["CFF "].data=Fe.compile()}catch(Me){(0,i.warn)("Failed to compile font "+c.loadedName)}if(q["name"]){var Re=T(q["name"]);q["name"].data=W(e,Re)}else q["name"]={tag:"name",data:W(this.name)};var Be=new A(N.version);for(var De in q)Be.addTable(De,q[De].data);return Be.toArray()},convert:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&w(r,r.builtInEncoding);var a=1;t instanceof E&&(a=t.numGlyphs-1);var n=t.getGlyphMapping(r),o=U(n,t.hasGlyphId.bind(t),a);this.toFontChar=o.toFontChar;var c=t.numGlyphs;function l(e,t){var r=null;for(var a in e)t===e[a]&&(r||(r=[]),r.push(0|a));return r}function u(e,t){for(var r in e)if(t===e[r])return 0|r;return o.charCodeToGlyphId[o.nextAvailableFontCharCode]=t,o.nextAvailableFontCharCode++}var h=t.seacs;if(m&&h&&h.length){var f=r.fontMatrix||i.FONT_IDENTITY_MATRIX,d=t.getCharset(),g=Object.create(null);for(var p in h){p|=0;var v=h[p],b=s.StandardEncoding[v[2]],y=s.StandardEncoding[v[3]],k=d.indexOf(b),S=d.indexOf(y);if(!(k<0||S<0)){var C={x:v[0]*f[0]+v[1]*f[2]+f[4],y:v[0]*f[1]+v[1]*f[3]+f[5]},x=l(n,p);if(x)for(var _=0,P=x.length;_=0?a:0;else if(l)for(i in t)c[i]=t[i];else for(n=s.StandardEncoding,i=0;i=0?a:0;var u,h=e.differences;if(h)for(i in h){var f=h[i];if(a=r.indexOf(f),-1===a){u||(u=(0,o.getGlyphsUnicode)());var d=S(f,u);d!==f&&(a=r.indexOf(d))}c[i]=a>=0?a:0}return c}var T=function(){function e(e,t,r){var a,n=e.length,o=t.length,s=n-o,c=r,l=!1;while(c=o){c+=a;while(c=0&&(n[o]=t)}return O(e,n,a)},hasGlyphId:function(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;var t=this.charstrings[e-1];return t.charstring.length>0},getSeacs:function(e){var t,r,a=[];for(t=0,r=e.length;t>8&255,255&d)}o.charset=new n.CFFCharset(!1,0,[],f);var g=new n.CFFIndex;for(g.add([139,14]),l=0;l0;y--)b[y]-=b[y-1];p.setByName(v,b)}}o.topDict.privateDict=p;var w=new n.CFFIndex;for(l=0,u=a.length;l=t)throw new a.FormatError("Invalid CFF header");0!==r&&((0,a.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);var i=e[0],n=e[1],o=e[2],s=e[3],c=new u(i,n,o,s);return{obj:c,endPos:o}},parseDict:function(e){var t=0;function r(){var r=e[t++];return 30===r?i():28===r?(r=e[t++],r=(r<<24|e[t++]<<16)>>16,r):29===r?(r=e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r):r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:((0,a.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)}function i(){var r="",a=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=e.length;while(t>4,c=15&o;if(s===a)break;if(r+=i[s],c===a)break;r+=i[c]}return parseFloat(r)}var n=[],o=[];t=0;var s=e.length;while(to)return!1;for(var c=r.stackSize,l=r.stack,u=i.length,h=0;h>16,h+=2,c++;else if(14===f){if(c>=4&&(c-=4,this.seacAnalysisEnabled))return r.seac=l.slice(c,c+4),!1;d=e[f]}else if(f>=32&&f<=246)l[c]=f-139,c++;else if(f>=247&&f<=254)l[c]=f<251?(f-247<<8)+i[h]+108:-(f-251<<8)-i[h]-108,h++,c++;else if(255===f)l[c]=(i[h]<<24|i[h+1]<<16|i[h+2]<<8|i[h+3])/65536,h+=4,c++;else if(19===f||20===f)r.hints+=c>>1,h+=r.hints+7>>3,c%=2,d=e[f];else{if(10===f||29===f){var p;if(p=10===f?n:s,!p)return d=e[f],(0,a.warn)("Missing subrsIndex for "+d.id),!1;var m=32768;p.count<1240?m=107:p.count<33900&&(m=1131);var v=l[--c]+m;if(v<0||v>=p.count||isNaN(v))return d=e[f],(0,a.warn)("Out of bounds subrIndex for "+d.id),!1;r.stackSize=c,r.callDepth++;var b=this.parseCharString(r,p.get(v),n,s);if(!b)return!1;r.callDepth--,c=r.stackSize;continue}if(11===f)return r.stackSize=c,!0;d=e[f]}if(d){if(d.stem&&(r.hints+=c>>1),"min"in d&&!r.undefStack&&c=2&&d.stem?c%=2:c>1&&(0,a.warn)("Found too many parameters for stack-clearing command"),c>0&&l[c-1]>=0&&(r.width=l[c-1])),"stackDelta"in d?("stackFn"in d&&d.stackFn(l,c),c+=d.stackDelta):d.stackClearing?c=0:d.resetStack?(c=0,r.undefStack=!1):d.undefStack&&(c=0,r.undefStack=!0,r.firstStackClearing=!1)}}return r.stackSize=c,!0},parseCharStrings:function(e){for(var t=e.charStrings,r=e.localSubrIndex,i=e.globalSubrIndex,n=e.fdSelect,o=e.fdArray,s=e.privateDict,c=[],l=[],u=t.count,h=0;h=o.length&&((0,a.warn)("Invalid fd index for glyph index."),g=!1),g&&(m=o[v].privateDict,p=m.subrsIndex)}else r&&(p=r);if(g&&(g=this.parseCharString(d,f,p,i)),null!==d.width){var b=m.getByName("nominalWidthX");l[h]=b+d.width}else{var y=m.getByName("defaultWidthX");l[h]=y}null!==d.seac&&(c[h]=d.seac),g||t.set(h,new Uint8Array([14]))}return{charStrings:t,seacs:c,widths:l}},emptyPrivateDictionary:function(e){var t=this.createDict(p,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t},parsePrivateDict:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],a=t[1];if(0===r||a>=this.bytes.length)this.emptyPrivateDictionary(e);else{var i=a+r,n=this.bytes.subarray(a,i),o=this.parseDict(n),s=this.createDict(p,o,e.strings);if(e.privateDict=s,s.getByName("Subrs")){var c=s.getByName("Subrs"),l=a+c;if(0===c||l>=this.bytes.length)this.emptyPrivateDictionary(e);else{var u=this.parseIndex(l);s.subrsIndex=u.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)},parseCharsets:function(e,t,r,n){if(0===e)return new v(!0,m.ISO_ADOBE,i.ISOAdobeCharset);if(1===e)return new v(!0,m.EXPERT,i.ExpertCharset);if(2===e)return new v(!0,m.EXPERT_SUBSET,i.ExpertSubsetCharset);var o,s,c,l=this.bytes,u=e,h=l[e++],f=[".notdef"];switch(t-=1,h){case 0:for(c=0;c=65535)(0,a.warn)("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}},hasGlyphId:function(e){if(e<0||e>=this.charStrings.count)return!1;var t=this.charStrings.get(e);return t.length>0}},e}(),u=function(){function e(e,t,r,a){this.major=e,this.minor=t,this.hdrSize=r,this.offSize=a}return e}(),h=function(){function e(){this.strings=[]}return e.prototype={get:function(e){return e>=0&&e<=390?s[e]:e-391<=this.strings.length?this.strings[e-391]:s[0]},add:function(e){this.strings.push(e)},get count(){return this.strings.length}},e}(),f=function(){function e(){this.objects=[],this.length=0}return e.prototype={add:function(e){this.length+=e.length,this.objects.push(e)},set:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t},get:function(e){return this.objects[e]},get count(){return this.objects.length}},e}(),d=function(){function e(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}return e.prototype={setByKey:function(e,t){if(!(e in this.keyToNameMap))return!1;var r=t.length;if(0===r)return!0;for(var i=0;i=this.fdSelect.length?-1:this.fdSelect[e]}},e}(),w=function(){function e(){this.offsets=Object.create(null)}return e.prototype={isTracking:function(e){return e in this.offsets},track:function(e,t){if(e in this.offsets)throw new a.FormatError("Already tracking location of "+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 a.FormatError("Not tracking location of "+e);for(var i=r.data,n=this.offsets[e],o=5,s=0,c=t.length;s>24&255,i[h]=g>>16&255,i[f]=g>>8&255,i[d]=255&g}}},e}(),k=function(){function e(e){this.cff=e}return e.prototype={compile:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e),this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var i=this.compileNameIndex(e.names);if(t.add(i),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var o=0,s=e.fdArray.length;o=-107&&e<=107?t=[e+139]:e>=108&&e<=1131?(e-=108,t=[247+(e>>8),255&e]):e>=-1131&&e<=-108?(e=-e-108,t=[251+(e>>8),255&e]):t=e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e],t},compileHeader:function(e){return[e.major,e.minor,e.hdrSize,e.offSize]},compileNameIndex:function(e){for(var t=new f,r=0,i=e.length;r"~"||"["===l||"]"===l||"("===l||")"===l||"{"===l||"}"===l||"<"===l||">"===l||"/"===l||"%"===l)&&(l="_"),s[c]=l}s=s.join(""),""===s&&(s="Bad_Font_Name"),t.add((0,a.stringToBytes)(s))}return this.compileIndex(t)},compileTopDicts:function(e,t,r){for(var a=[],i=new f,n=0,o=e.length;n>8&255,255&i,n];for(a=1;a>8&255,255&a,s),n=s)}var c=(o.length-3)/3;o[1]=c>>8&255,o[2]=255&c,o.push(a>>8&255,255&a),r=new Uint8Array(o);break}return this.compileTypedArray(r)},compileTypedArray:function(e){for(var t=[],r=0,a=e.length;r>8&255,255&a],s=1;for(i=0;i>8&255,255&c):3===n?o.push(c>>16&255,c>>8&255,255&c):o.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[i]&&(c+=r[i].length);for(i=0;i=65520&&e<=65535?0:e>=62976&&e<=63743?i()[e]||e:173===e?45:e}function o(e,t){var r=t[e];if(void 0!==r)return r;if(!e)return-1;if("u"===e[0]){var a,i=e.length;if(7===i&&"n"===e[1]&&"i"===e[2])a=e.substring(3);else{if(!(i>=5&&i<=7))return-1;a=e.substring(1)}if(a===a.toUpperCase()&&(r=parseInt(a,16),r>=0))return r}return-1}var s=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function c(e){for(var t=0,r=s.length;t=a.begin&&e=t.begin&&e=t.begin&&e=0;a--)r+=e[a];return r}t.mapSpecialUnicodeValues=n,t.reverseIfRtl=h,t.getUnicodeRangeFor=c,t.getNormalizedUnicodes=u,t.getUnicodeForGlyph=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var a=function(){function e(e,t){for(var r=0;r>1;for(s=a+l+14,o=[],c=0;c>1;r>16,l=0,u=0;if(s+=10,c<0)do{o=e[s]<<8|e[s+1];var h,f,d=e[s+2]<<8|e[s+3];s+=4,1&o?(h=(e[s]<<24|e[s+1]<<16)>>16,f=(e[s+2]<<24|e[s+3]<<16)>>16,s+=4):(h=e[s++],f=e[s++]),2&o?(l=h,u=f):(l=0,u=0);var g=1,m=1,v=0,b=0;8&o?(g=m=(e[s]<<24|e[s+1]<<16)/1073741824,s+=2):64&o?(g=(e[s]<<24|e[s+1]<<16)/1073741824,m=(e[s+2]<<24|e[s+3]<<16)/1073741824,s+=4):128&o&&(g=(e[s]<<24|e[s+1]<<16)/1073741824,v=(e[s+2]<<24|e[s+3]<<16)/1073741824,b=(e[s+4]<<24|e[s+5]<<16)/1073741824,m=(e[s+6]<<24|e[s+7]<<16)/1073741824,s+=8);var y=r.glyphs[d];y&&(t.push({cmd:"save"}),t.push({cmd:"transform",args:[g,v,b,m,l,u]}),p(y,t,r),t.push({cmd:"restore"}))}while(32&o);else{var w,k,S=[];for(w=0;w0)_.push({flags:o})}for(w=0;w>16,s+=2;break;case 2:l-=e[s++];break;case 18:l+=e[s++];break}_[w].x=l}for(w=0;w>16,s+=2;break;case 4:u-=e[s++];break;case 36:u+=e[s++];break}_[w].y=u}var P=0;for(s=0;s>1,A=!0;break;case 3:l+=n.length>>1,A=!0;break;case 4:c+=n.pop(),u(o,c),A=!0;break;case 5:while(n.length>0)o+=n.shift(),c+=n.shift(),h(o,c);break;case 6:while(n.length>0){if(o+=n.shift(),h(o,c),0===n.length)break;c+=n.shift(),h(o,c)}break;case 7:while(n.length>0){if(c+=n.shift(),h(o,c),0===n.length)break;o+=n.shift(),h(o,c)}break;case 8:while(n.length>0)v=o+n.shift(),y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w+n.shift(),f(v,y,b,w,o,c);break;case 10:if(x=n.pop(),_=null,r.isCFFCIDFont){var I=r.fdSelect.getFDIndex(a);if(I>=0&&IMath.abs(c-R)?o+=n.shift():c+=n.shift(),f(v,y,b,w,o,c);break;default:throw new i.FormatError("unknown operator: 12 "+P)}break;case 14:if(n.length>=4){var B=n.pop(),D=n.pop();c=n.pop(),o=n.pop(),t.push({cmd:"save"}),t.push({cmd:"translate",args:[o,c]});var M=g(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[B]]));m(r.glyphs[M.glyphId],t,r,M.glyphId),t.push({cmd:"restore"}),M=g(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[D]])),m(r.glyphs[M.glyphId],t,r,M.glyphId)}return;case 18:l+=n.length>>1,A=!0;break;case 19:l+=n.length>>1,p+=l+7>>3,A=!0;break;case 20:l+=n.length>>1,p+=l+7>>3,A=!0;break;case 21:c+=n.pop(),o+=n.pop(),u(o,c),A=!0;break;case 22:o+=n.pop(),u(o,c),A=!0;break;case 23:l+=n.length>>1,A=!0;break;case 24:while(n.length>2)v=o+n.shift(),y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w+n.shift(),f(v,y,b,w,o,c);o+=n.shift(),c+=n.shift(),h(o,c);break;case 25:while(n.length>6)o+=n.shift(),c+=n.shift(),h(o,c);v=o+n.shift(),y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w+n.shift(),f(v,y,b,w,o,c);break;case 26:n.length%2&&(o+=n.shift());while(n.length>0)v=o,y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b,c=w+n.shift(),f(v,y,b,w,o,c);break;case 27:n.length%2&&(c+=n.shift());while(n.length>0)v=o+n.shift(),y=c,b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w,f(v,y,b,w,o,c);break;case 28:n.push((e[p]<<24|e[p+1]<<16)>>16),p+=2;break;case 29:x=n.pop()+r.gsubrsBias,_=r.gsubrs[x],_&&d(_);break;case 30:while(n.length>0){if(v=o,y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w+(1===n.length?n.shift():0),f(v,y,b,w,o,c),0===n.length)break;v=o+n.shift(),y=c,b=v+n.shift(),w=y+n.shift(),c=w+n.shift(),o=b+(1===n.length?n.shift():0),f(v,y,b,w,o,c)}break;case 31:while(n.length>0){if(v=o+n.shift(),y=c,b=v+n.shift(),w=y+n.shift(),c=w+n.shift(),o=b+(1===n.length?n.shift():0),f(v,y,b,w,o,c),0===n.length)break;v=o,y=c+n.shift(),b=v+n.shift(),w=y+n.shift(),o=b+n.shift(),c=w+(1===n.length?n.shift():0),f(v,y,b,w,o,c)}break;default:if(P<32)throw new i.FormatError("unknown operator: "+P);P<247?n.push(P-139):P<251?n.push(256*(P-247)+e[p++]+108):P<255?n.push(256*-(P-251)-e[p++]-108):(n.push((e[p]<<24|e[p+1]<<16|e[p+2]<<8|e[p+3])/65536),p+=4);break}A&&(n.length=0)}}d(e)}var v=[],b=function(){function e(t){h(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}return a(e,[{key:"getPathJs",value:function(e){var t=g(this.cmap,e),r=this.compiledGlyphs[t.glyphId];return r||(r=this.compileGlyph(this.glyphs[t.glyphId],t.glyphId),this.compiledGlyphs[t.glyphId]=r),void 0===this.compiledCharCodeToGlyphId[t.charCode]&&(this.compiledCharCodeToGlyphId[t.charCode]=t.glyphId),r}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return v;var r=this.fontMatrix;if(this.isCFFCIDFont){var a=this.fdSelect.getFDIndex(t);if(a>=0&&aa)return!0;for(var i=a-e,n=i;n>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(i,e):this.stack.length=0,!1}},t}(),c=function(){var e=55665,t=4330;function r(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function c(e,t,r){if(r>=e.length)return new Uint8Array(0);var a,i,n=0|t,o=52845,s=22719;for(a=0;a>8,n=(u+n)*o+s&65535}return l}function l(e,t,a){var i,n,o=0|t,s=52845,c=22719,l=e.length,u=l>>>1,h=new Uint8Array(u);for(i=0,n=0;i>8,o=(g+o)*s+c&65535}}}return Array.prototype.slice.call(h,a,n)}function u(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}function h(t,a,i){if(a){var o=t.getBytes(),s=!(r(o[0])&&r(o[1])&&r(o[2])&&r(o[3]));t=new n.Stream(s?c(o,e,4):l(o,e,4))}this.seacAnalysisEnabled=!!i,this.stream=t,this.nextChar()}return h.prototype={readNumberArray:function(){this.getToken();var e=[];while(1){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(){var e=this.getToken();return"true"===e?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){var e=!1,t=this.currentChar;while(1){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isSpace)(t))break;t=this.nextChar()}if(u(t))return this.nextChar(),String.fromCharCode(t);var r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,a.isSpace)(t)&&!u(t));return r},readCharStrings:function(e,r){return-1===r?e:c(e,t,r)},extractFontProgram:function(){var e=this.stream,t=[],r=[],a=Object.create(null);a["lenIV"]=4;var i,n,c,l,u,h={subrs:[],charstrings:[],properties:{privateData:a}};while(null!==(i=this.getToken()))if("/"===i)switch(i=this.getToken(),i){case"CharStrings":this.getToken(),this.getToken(),this.getToken(),this.getToken();while(1){if(i=this.getToken(),null===i||"end"===i)break;if("/"===i){var f=this.getToken();n=this.readInt(),this.getToken(),c=n>0?e.getBytes(n):new Uint8Array(0),l=h.properties.privateData["lenIV"],u=this.readCharStrings(c,l),this.nextChar(),i=this.getToken(),"noaccess"===i&&this.getToken(),r.push({glyph:f,encoded:u})}}break;case"Subrs":this.readInt(),this.getToken();while("dup"===this.getToken()){var d=this.readInt();n=this.readInt(),this.getToken(),c=n>0?e.getBytes(n):new Uint8Array(0),l=h.properties.privateData["lenIV"],u=this.readCharStrings(c,l),this.nextChar(),i=this.getToken(),"noaccess"===i&&this.getToken(),t[d]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var g=this.readNumberArray();g.length>0&&g.length%2===0&&o&&(h.properties.privateData[i]=g);break;case"StemSnapH":case"StemSnapV":h.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":h.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":h.properties.privateData[i]=this.readNumber();break;case"ForceBold":h.properties.privateData[i]=this.readBoolean();break}for(var p=0;p=h||A<=0)(0,a.info)("Bad shading domain.");else{for(var I,O=new Float32Array(l.numComps),T=new Float32Array(1),E=u;E<=h;E+=A){T[0]=E,x(T,0,O,0),I=l.getRgb(O,0);var F=a.Util.makeCssRgb(I[0],I[1],I[2]);P.push([(E-u)/_,F])}var R="transparent";e.has("Background")&&(I=l.getRgb(e.get("Background"),0),R=a.Util.makeCssRgb(I[0],I[1],I[2])),d||(P.unshift([0,R]),P[1][0]+=c.SMALL_NUMBER),g||(P[P.length-1][0]-=c.SMALL_NUMBER,P.push([1,R])),this.colorStops=P}}return e.prototype={getIR:function(){var e,t,r,i,n,s=this.coordsArr,c=this.shadingType;c===o.AXIAL?(t=[s[0],s[1]],r=[s[2],s[3]],i=null,n=null,e="axial"):c===o.RADIAL?(t=[s[0],s[1]],r=[s[3],s[4]],i=s[2],n=s[5],e="radial"):(0,a.unreachable)("getPattern type unknown: "+c);var l=this.matrix;if(l&&(t=a.Util.applyTransform(t,l),r=a.Util.applyTransform(r,l),c===o.RADIAL)){var u=a.Util.singularValueDecompose2dScale(l);i*=u[0],n*=u[1]}return["RadialAxial",e,this.colorStops,t,r,i,n]}},e}(),c.Mesh=function(){function e(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;var r=t.numComps;this.tmpCompsBuf=new Float32Array(r);var a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}function t(e,t){var r=e.coords,i=e.colors,n=[],o=[],s=0;while(t.hasData){var c=t.readFlag(),l=t.readCoordinate(),u=t.readComponents();if(0===s){if(!(0<=c&&c<=2))throw new a.FormatError("Unknown type4 flag");switch(c){case 0:s=3;break;case 1:o.push(o[o.length-2],o[o.length-1]),s=1;break;case 2:o.push(o[o.length-3],o[o.length-1]),s=1;break}n.push(c)}o.push(r.length),r.push(l),i.push(u),s--,t.align()}e.figures.push({type:"triangles",coords:new Int32Array(o),colors:new Int32Array(o)})}function r(e,t,r){var a=e.coords,i=e.colors,n=[];while(t.hasData){var o=t.readCoordinate(),s=t.readComponents();n.push(a.length),a.push(o),i.push(s)}e.figures.push({type:"lattice",coords:new Int32Array(n),colors:new Int32Array(n),verticesPerRow:r})}e.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var e=this.stream.getByte();return!(e<0)&&(this.buffer=e,this.bufferLength=8,!0)},readBits:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var a=this.stream.getByte();return this.buffer=a&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();while(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,i=e<32?1/((1<s?s:t,r=r>c?c:r,a=a=0;--P){if("ET"!==d[P])break;d[P]="EN"}for(P=m+1;P0&&(O=d[m-1]);var T=_;I+1E&&o(E)&&(R=E);for(E=F;E>=R;--E){var B=-1;for(m=0,v=k.length;m=0&&(u(f,B,m),B=-1):B<0&&(B=m);B>=0&&u(f,B,k.length)}for(m=0,v=f.length;m"!==D||(f[m]="")}return h(f.join(""),g)}t.bidi=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=void 0;var a=r(2),i=(0,a.getLookupTableFactory)(function(e){e["Courier"]=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e["Helvetica"]=(0,a.getLookupTableFactory)(function(e){e["space"]=278,e["exclam"]=278,e["quotedbl"]=355,e["numbersign"]=556,e["dollar"]=556,e["percent"]=889,e["ampersand"]=667,e["quoteright"]=222,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=389,e["plus"]=584,e["comma"]=278,e["hyphen"]=333,e["period"]=278,e["slash"]=278,e["zero"]=556,e["one"]=556,e["two"]=556,e["three"]=556,e["four"]=556,e["five"]=556,e["six"]=556,e["seven"]=556,e["eight"]=556,e["nine"]=556,e["colon"]=278,e["semicolon"]=278,e["less"]=584,e["equal"]=584,e["greater"]=584,e["question"]=556,e["at"]=1015,e["A"]=667,e["B"]=667,e["C"]=722,e["D"]=722,e["E"]=667,e["F"]=611,e["G"]=778,e["H"]=722,e["I"]=278,e["J"]=500,e["K"]=667,e["L"]=556,e["M"]=833,e["N"]=722,e["O"]=778,e["P"]=667,e["Q"]=778,e["R"]=722,e["S"]=667,e["T"]=611,e["U"]=722,e["V"]=667,e["W"]=944,e["X"]=667,e["Y"]=667,e["Z"]=611,e["bracketleft"]=278,e["backslash"]=278,e["bracketright"]=278,e["asciicircum"]=469,e["underscore"]=556,e["quoteleft"]=222,e["a"]=556,e["b"]=556,e["c"]=500,e["d"]=556,e["e"]=556,e["f"]=278,e["g"]=556,e["h"]=556,e["i"]=222,e["j"]=222,e["k"]=500,e["l"]=222,e["m"]=833,e["n"]=556,e["o"]=556,e["p"]=556,e["q"]=556,e["r"]=333,e["s"]=500,e["t"]=278,e["u"]=556,e["v"]=500,e["w"]=722,e["x"]=500,e["y"]=500,e["z"]=500,e["braceleft"]=334,e["bar"]=260,e["braceright"]=334,e["asciitilde"]=584,e["exclamdown"]=333,e["cent"]=556,e["sterling"]=556,e["fraction"]=167,e["yen"]=556,e["florin"]=556,e["section"]=556,e["currency"]=556,e["quotesingle"]=191,e["quotedblleft"]=333,e["guillemotleft"]=556,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=500,e["fl"]=500,e["endash"]=556,e["dagger"]=556,e["daggerdbl"]=556,e["periodcentered"]=278,e["paragraph"]=537,e["bullet"]=350,e["quotesinglbase"]=222,e["quotedblbase"]=333,e["quotedblright"]=333,e["guillemotright"]=556,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=611,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=1e3,e["ordfeminine"]=370,e["Lslash"]=556,e["Oslash"]=778,e["OE"]=1e3,e["ordmasculine"]=365,e["ae"]=889,e["dotlessi"]=278,e["lslash"]=222,e["oslash"]=611,e["oe"]=944,e["germandbls"]=611,e["Idieresis"]=278,e["eacute"]=556,e["abreve"]=556,e["uhungarumlaut"]=556,e["ecaron"]=556,e["Ydieresis"]=667,e["divide"]=584,e["Yacute"]=667,e["Acircumflex"]=667,e["aacute"]=556,e["Ucircumflex"]=722,e["yacute"]=500,e["scommaaccent"]=500,e["ecircumflex"]=556,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=556,e["Uacute"]=722,e["uogonek"]=556,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=737,e["Emacron"]=667,e["ccaron"]=500,e["aring"]=556,e["Ncommaaccent"]=722,e["lacute"]=222,e["agrave"]=556,e["Tcommaaccent"]=611,e["Cacute"]=722,e["atilde"]=556,e["Edotaccent"]=667,e["scaron"]=500,e["scedilla"]=500,e["iacute"]=278,e["lozenge"]=471,e["Rcaron"]=722,e["Gcommaaccent"]=778,e["ucircumflex"]=556,e["acircumflex"]=556,e["Amacron"]=667,e["rcaron"]=333,e["ccedilla"]=500,e["Zdotaccent"]=611,e["Thorn"]=667,e["Omacron"]=778,e["Racute"]=722,e["Sacute"]=667,e["dcaron"]=643,e["Umacron"]=722,e["uring"]=556,e["threesuperior"]=333,e["Ograve"]=778,e["Agrave"]=667,e["Abreve"]=667,e["multiply"]=584,e["uacute"]=556,e["Tcaron"]=611,e["partialdiff"]=476,e["ydieresis"]=500,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=556,e["edieresis"]=556,e["cacute"]=500,e["nacute"]=556,e["umacron"]=556,e["Ncaron"]=722,e["Iacute"]=278,e["plusminus"]=584,e["brokenbar"]=260,e["registered"]=737,e["Gbreve"]=778,e["Idotaccent"]=278,e["summation"]=600,e["Egrave"]=667,e["racute"]=333,e["omacron"]=556,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=722,e["lcommaaccent"]=222,e["tcaron"]=317,e["eogonek"]=556,e["Uogonek"]=722,e["Aacute"]=667,e["Adieresis"]=667,e["egrave"]=556,e["zacute"]=500,e["iogonek"]=222,e["Oacute"]=778,e["oacute"]=556,e["amacron"]=556,e["sacute"]=500,e["idieresis"]=278,e["Ocircumflex"]=778,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=556,e["twosuperior"]=333,e["Odieresis"]=778,e["mu"]=556,e["igrave"]=278,e["ohungarumlaut"]=556,e["Eogonek"]=667,e["dcroat"]=556,e["threequarters"]=834,e["Scedilla"]=667,e["lcaron"]=299,e["Kcommaaccent"]=667,e["Lacute"]=556,e["trademark"]=1e3,e["edotaccent"]=556,e["Igrave"]=278,e["Imacron"]=278,e["Lcaron"]=556,e["onehalf"]=834,e["lessequal"]=549,e["ocircumflex"]=556,e["ntilde"]=556,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=556,e["gbreve"]=556,e["onequarter"]=834,e["Scaron"]=667,e["Scommaaccent"]=667,e["Ohungarumlaut"]=778,e["degree"]=400,e["ograve"]=556,e["Ccaron"]=722,e["ugrave"]=556,e["radical"]=453,e["Dcaron"]=722,e["rcommaaccent"]=333,e["Ntilde"]=722,e["otilde"]=556,e["Rcommaaccent"]=722,e["Lcommaaccent"]=556,e["Atilde"]=667,e["Aogonek"]=667,e["Aring"]=667,e["Otilde"]=778,e["zdotaccent"]=500,e["Ecaron"]=667,e["Iogonek"]=278,e["kcommaaccent"]=500,e["minus"]=584,e["Icircumflex"]=278,e["ncaron"]=556,e["tcommaaccent"]=278,e["logicalnot"]=584,e["odieresis"]=556,e["udieresis"]=556,e["notequal"]=549,e["gcommaaccent"]=556,e["eth"]=556,e["zcaron"]=500,e["ncommaaccent"]=556,e["onesuperior"]=333,e["imacron"]=278,e["Euro"]=556}),e["Helvetica-Bold"]=(0,a.getLookupTableFactory)(function(e){e["space"]=278,e["exclam"]=333,e["quotedbl"]=474,e["numbersign"]=556,e["dollar"]=556,e["percent"]=889,e["ampersand"]=722,e["quoteright"]=278,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=389,e["plus"]=584,e["comma"]=278,e["hyphen"]=333,e["period"]=278,e["slash"]=278,e["zero"]=556,e["one"]=556,e["two"]=556,e["three"]=556,e["four"]=556,e["five"]=556,e["six"]=556,e["seven"]=556,e["eight"]=556,e["nine"]=556,e["colon"]=333,e["semicolon"]=333,e["less"]=584,e["equal"]=584,e["greater"]=584,e["question"]=611,e["at"]=975,e["A"]=722,e["B"]=722,e["C"]=722,e["D"]=722,e["E"]=667,e["F"]=611,e["G"]=778,e["H"]=722,e["I"]=278,e["J"]=556,e["K"]=722,e["L"]=611,e["M"]=833,e["N"]=722,e["O"]=778,e["P"]=667,e["Q"]=778,e["R"]=722,e["S"]=667,e["T"]=611,e["U"]=722,e["V"]=667,e["W"]=944,e["X"]=667,e["Y"]=667,e["Z"]=611,e["bracketleft"]=333,e["backslash"]=278,e["bracketright"]=333,e["asciicircum"]=584,e["underscore"]=556,e["quoteleft"]=278,e["a"]=556,e["b"]=611,e["c"]=556,e["d"]=611,e["e"]=556,e["f"]=333,e["g"]=611,e["h"]=611,e["i"]=278,e["j"]=278,e["k"]=556,e["l"]=278,e["m"]=889,e["n"]=611,e["o"]=611,e["p"]=611,e["q"]=611,e["r"]=389,e["s"]=556,e["t"]=333,e["u"]=611,e["v"]=556,e["w"]=778,e["x"]=556,e["y"]=556,e["z"]=500,e["braceleft"]=389,e["bar"]=280,e["braceright"]=389,e["asciitilde"]=584,e["exclamdown"]=333,e["cent"]=556,e["sterling"]=556,e["fraction"]=167,e["yen"]=556,e["florin"]=556,e["section"]=556,e["currency"]=556,e["quotesingle"]=238,e["quotedblleft"]=500,e["guillemotleft"]=556,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=611,e["fl"]=611,e["endash"]=556,e["dagger"]=556,e["daggerdbl"]=556,e["periodcentered"]=278,e["paragraph"]=556,e["bullet"]=350,e["quotesinglbase"]=278,e["quotedblbase"]=500,e["quotedblright"]=500,e["guillemotright"]=556,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=611,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=1e3,e["ordfeminine"]=370,e["Lslash"]=611,e["Oslash"]=778,e["OE"]=1e3,e["ordmasculine"]=365,e["ae"]=889,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=611,e["oe"]=944,e["germandbls"]=611,e["Idieresis"]=278,e["eacute"]=556,e["abreve"]=556,e["uhungarumlaut"]=611,e["ecaron"]=556,e["Ydieresis"]=667,e["divide"]=584,e["Yacute"]=667,e["Acircumflex"]=722,e["aacute"]=556,e["Ucircumflex"]=722,e["yacute"]=556,e["scommaaccent"]=556,e["ecircumflex"]=556,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=556,e["Uacute"]=722,e["uogonek"]=611,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=737,e["Emacron"]=667,e["ccaron"]=556,e["aring"]=556,e["Ncommaaccent"]=722,e["lacute"]=278,e["agrave"]=556,e["Tcommaaccent"]=611,e["Cacute"]=722,e["atilde"]=556,e["Edotaccent"]=667,e["scaron"]=556,e["scedilla"]=556,e["iacute"]=278,e["lozenge"]=494,e["Rcaron"]=722,e["Gcommaaccent"]=778,e["ucircumflex"]=611,e["acircumflex"]=556,e["Amacron"]=722,e["rcaron"]=389,e["ccedilla"]=556,e["Zdotaccent"]=611,e["Thorn"]=667,e["Omacron"]=778,e["Racute"]=722,e["Sacute"]=667,e["dcaron"]=743,e["Umacron"]=722,e["uring"]=611,e["threesuperior"]=333,e["Ograve"]=778,e["Agrave"]=722,e["Abreve"]=722,e["multiply"]=584,e["uacute"]=611,e["Tcaron"]=611,e["partialdiff"]=494,e["ydieresis"]=556,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=556,e["edieresis"]=556,e["cacute"]=556,e["nacute"]=611,e["umacron"]=611,e["Ncaron"]=722,e["Iacute"]=278,e["plusminus"]=584,e["brokenbar"]=280,e["registered"]=737,e["Gbreve"]=778,e["Idotaccent"]=278,e["summation"]=600,e["Egrave"]=667,e["racute"]=389,e["omacron"]=611,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=722,e["lcommaaccent"]=278,e["tcaron"]=389,e["eogonek"]=556,e["Uogonek"]=722,e["Aacute"]=722,e["Adieresis"]=722,e["egrave"]=556,e["zacute"]=500,e["iogonek"]=278,e["Oacute"]=778,e["oacute"]=611,e["amacron"]=556,e["sacute"]=556,e["idieresis"]=278,e["Ocircumflex"]=778,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=611,e["twosuperior"]=333,e["Odieresis"]=778,e["mu"]=611,e["igrave"]=278,e["ohungarumlaut"]=611,e["Eogonek"]=667,e["dcroat"]=611,e["threequarters"]=834,e["Scedilla"]=667,e["lcaron"]=400,e["Kcommaaccent"]=722,e["Lacute"]=611,e["trademark"]=1e3,e["edotaccent"]=556,e["Igrave"]=278,e["Imacron"]=278,e["Lcaron"]=611,e["onehalf"]=834,e["lessequal"]=549,e["ocircumflex"]=611,e["ntilde"]=611,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=556,e["gbreve"]=611,e["onequarter"]=834,e["Scaron"]=667,e["Scommaaccent"]=667,e["Ohungarumlaut"]=778,e["degree"]=400,e["ograve"]=611,e["Ccaron"]=722,e["ugrave"]=611,e["radical"]=549,e["Dcaron"]=722,e["rcommaaccent"]=389,e["Ntilde"]=722,e["otilde"]=611,e["Rcommaaccent"]=722,e["Lcommaaccent"]=611,e["Atilde"]=722,e["Aogonek"]=722,e["Aring"]=722,e["Otilde"]=778,e["zdotaccent"]=500,e["Ecaron"]=667,e["Iogonek"]=278,e["kcommaaccent"]=556,e["minus"]=584,e["Icircumflex"]=278,e["ncaron"]=611,e["tcommaaccent"]=333,e["logicalnot"]=584,e["odieresis"]=611,e["udieresis"]=611,e["notequal"]=549,e["gcommaaccent"]=611,e["eth"]=611,e["zcaron"]=500,e["ncommaaccent"]=611,e["onesuperior"]=333,e["imacron"]=278,e["Euro"]=556}),e["Helvetica-BoldOblique"]=(0,a.getLookupTableFactory)(function(e){e["space"]=278,e["exclam"]=333,e["quotedbl"]=474,e["numbersign"]=556,e["dollar"]=556,e["percent"]=889,e["ampersand"]=722,e["quoteright"]=278,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=389,e["plus"]=584,e["comma"]=278,e["hyphen"]=333,e["period"]=278,e["slash"]=278,e["zero"]=556,e["one"]=556,e["two"]=556,e["three"]=556,e["four"]=556,e["five"]=556,e["six"]=556,e["seven"]=556,e["eight"]=556,e["nine"]=556,e["colon"]=333,e["semicolon"]=333,e["less"]=584,e["equal"]=584,e["greater"]=584,e["question"]=611,e["at"]=975,e["A"]=722,e["B"]=722,e["C"]=722,e["D"]=722,e["E"]=667,e["F"]=611,e["G"]=778,e["H"]=722,e["I"]=278,e["J"]=556,e["K"]=722,e["L"]=611,e["M"]=833,e["N"]=722,e["O"]=778,e["P"]=667,e["Q"]=778,e["R"]=722,e["S"]=667,e["T"]=611,e["U"]=722,e["V"]=667,e["W"]=944,e["X"]=667,e["Y"]=667,e["Z"]=611,e["bracketleft"]=333,e["backslash"]=278,e["bracketright"]=333,e["asciicircum"]=584,e["underscore"]=556,e["quoteleft"]=278,e["a"]=556,e["b"]=611,e["c"]=556,e["d"]=611,e["e"]=556,e["f"]=333,e["g"]=611,e["h"]=611,e["i"]=278,e["j"]=278,e["k"]=556,e["l"]=278,e["m"]=889,e["n"]=611,e["o"]=611,e["p"]=611,e["q"]=611,e["r"]=389,e["s"]=556,e["t"]=333,e["u"]=611,e["v"]=556,e["w"]=778,e["x"]=556,e["y"]=556,e["z"]=500,e["braceleft"]=389,e["bar"]=280,e["braceright"]=389,e["asciitilde"]=584,e["exclamdown"]=333,e["cent"]=556,e["sterling"]=556,e["fraction"]=167,e["yen"]=556,e["florin"]=556,e["section"]=556,e["currency"]=556,e["quotesingle"]=238,e["quotedblleft"]=500,e["guillemotleft"]=556,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=611,e["fl"]=611,e["endash"]=556,e["dagger"]=556,e["daggerdbl"]=556,e["periodcentered"]=278,e["paragraph"]=556,e["bullet"]=350,e["quotesinglbase"]=278,e["quotedblbase"]=500,e["quotedblright"]=500,e["guillemotright"]=556,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=611,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=1e3,e["ordfeminine"]=370,e["Lslash"]=611,e["Oslash"]=778,e["OE"]=1e3,e["ordmasculine"]=365,e["ae"]=889,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=611,e["oe"]=944,e["germandbls"]=611,e["Idieresis"]=278,e["eacute"]=556,e["abreve"]=556,e["uhungarumlaut"]=611,e["ecaron"]=556,e["Ydieresis"]=667,e["divide"]=584,e["Yacute"]=667,e["Acircumflex"]=722,e["aacute"]=556,e["Ucircumflex"]=722,e["yacute"]=556,e["scommaaccent"]=556,e["ecircumflex"]=556,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=556,e["Uacute"]=722,e["uogonek"]=611,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=737,e["Emacron"]=667,e["ccaron"]=556,e["aring"]=556,e["Ncommaaccent"]=722,e["lacute"]=278,e["agrave"]=556,e["Tcommaaccent"]=611,e["Cacute"]=722,e["atilde"]=556,e["Edotaccent"]=667,e["scaron"]=556,e["scedilla"]=556,e["iacute"]=278,e["lozenge"]=494,e["Rcaron"]=722,e["Gcommaaccent"]=778,e["ucircumflex"]=611,e["acircumflex"]=556,e["Amacron"]=722,e["rcaron"]=389,e["ccedilla"]=556,e["Zdotaccent"]=611,e["Thorn"]=667,e["Omacron"]=778,e["Racute"]=722,e["Sacute"]=667,e["dcaron"]=743,e["Umacron"]=722,e["uring"]=611,e["threesuperior"]=333,e["Ograve"]=778,e["Agrave"]=722,e["Abreve"]=722,e["multiply"]=584,e["uacute"]=611,e["Tcaron"]=611,e["partialdiff"]=494,e["ydieresis"]=556,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=556,e["edieresis"]=556,e["cacute"]=556,e["nacute"]=611,e["umacron"]=611,e["Ncaron"]=722,e["Iacute"]=278,e["plusminus"]=584,e["brokenbar"]=280,e["registered"]=737,e["Gbreve"]=778,e["Idotaccent"]=278,e["summation"]=600,e["Egrave"]=667,e["racute"]=389,e["omacron"]=611,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=722,e["lcommaaccent"]=278,e["tcaron"]=389,e["eogonek"]=556,e["Uogonek"]=722,e["Aacute"]=722,e["Adieresis"]=722,e["egrave"]=556,e["zacute"]=500,e["iogonek"]=278,e["Oacute"]=778,e["oacute"]=611,e["amacron"]=556,e["sacute"]=556,e["idieresis"]=278,e["Ocircumflex"]=778,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=611,e["twosuperior"]=333,e["Odieresis"]=778,e["mu"]=611,e["igrave"]=278,e["ohungarumlaut"]=611,e["Eogonek"]=667,e["dcroat"]=611,e["threequarters"]=834,e["Scedilla"]=667,e["lcaron"]=400,e["Kcommaaccent"]=722,e["Lacute"]=611,e["trademark"]=1e3,e["edotaccent"]=556,e["Igrave"]=278,e["Imacron"]=278,e["Lcaron"]=611,e["onehalf"]=834,e["lessequal"]=549,e["ocircumflex"]=611,e["ntilde"]=611,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=556,e["gbreve"]=611,e["onequarter"]=834,e["Scaron"]=667,e["Scommaaccent"]=667,e["Ohungarumlaut"]=778,e["degree"]=400,e["ograve"]=611,e["Ccaron"]=722,e["ugrave"]=611,e["radical"]=549,e["Dcaron"]=722,e["rcommaaccent"]=389,e["Ntilde"]=722,e["otilde"]=611,e["Rcommaaccent"]=722,e["Lcommaaccent"]=611,e["Atilde"]=722,e["Aogonek"]=722,e["Aring"]=722,e["Otilde"]=778,e["zdotaccent"]=500,e["Ecaron"]=667,e["Iogonek"]=278,e["kcommaaccent"]=556,e["minus"]=584,e["Icircumflex"]=278,e["ncaron"]=611,e["tcommaaccent"]=333,e["logicalnot"]=584,e["odieresis"]=611,e["udieresis"]=611,e["notequal"]=549,e["gcommaaccent"]=611,e["eth"]=611,e["zcaron"]=500,e["ncommaaccent"]=611,e["onesuperior"]=333,e["imacron"]=278,e["Euro"]=556}),e["Helvetica-Oblique"]=(0,a.getLookupTableFactory)(function(e){e["space"]=278,e["exclam"]=278,e["quotedbl"]=355,e["numbersign"]=556,e["dollar"]=556,e["percent"]=889,e["ampersand"]=667,e["quoteright"]=222,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=389,e["plus"]=584,e["comma"]=278,e["hyphen"]=333,e["period"]=278,e["slash"]=278,e["zero"]=556,e["one"]=556,e["two"]=556,e["three"]=556,e["four"]=556,e["five"]=556,e["six"]=556,e["seven"]=556,e["eight"]=556,e["nine"]=556,e["colon"]=278,e["semicolon"]=278,e["less"]=584,e["equal"]=584,e["greater"]=584,e["question"]=556,e["at"]=1015,e["A"]=667,e["B"]=667,e["C"]=722,e["D"]=722,e["E"]=667,e["F"]=611,e["G"]=778,e["H"]=722,e["I"]=278,e["J"]=500,e["K"]=667,e["L"]=556,e["M"]=833,e["N"]=722,e["O"]=778,e["P"]=667,e["Q"]=778,e["R"]=722,e["S"]=667,e["T"]=611,e["U"]=722,e["V"]=667,e["W"]=944,e["X"]=667,e["Y"]=667,e["Z"]=611,e["bracketleft"]=278,e["backslash"]=278,e["bracketright"]=278,e["asciicircum"]=469,e["underscore"]=556,e["quoteleft"]=222,e["a"]=556,e["b"]=556,e["c"]=500,e["d"]=556,e["e"]=556,e["f"]=278,e["g"]=556,e["h"]=556,e["i"]=222,e["j"]=222,e["k"]=500,e["l"]=222,e["m"]=833,e["n"]=556,e["o"]=556,e["p"]=556,e["q"]=556,e["r"]=333,e["s"]=500,e["t"]=278,e["u"]=556,e["v"]=500,e["w"]=722,e["x"]=500,e["y"]=500,e["z"]=500,e["braceleft"]=334,e["bar"]=260,e["braceright"]=334,e["asciitilde"]=584,e["exclamdown"]=333,e["cent"]=556,e["sterling"]=556,e["fraction"]=167,e["yen"]=556,e["florin"]=556,e["section"]=556,e["currency"]=556,e["quotesingle"]=191,e["quotedblleft"]=333,e["guillemotleft"]=556,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=500,e["fl"]=500,e["endash"]=556,e["dagger"]=556,e["daggerdbl"]=556,e["periodcentered"]=278,e["paragraph"]=537,e["bullet"]=350,e["quotesinglbase"]=222,e["quotedblbase"]=333,e["quotedblright"]=333,e["guillemotright"]=556,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=611,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=1e3,e["ordfeminine"]=370,e["Lslash"]=556,e["Oslash"]=778,e["OE"]=1e3,e["ordmasculine"]=365,e["ae"]=889,e["dotlessi"]=278,e["lslash"]=222,e["oslash"]=611,e["oe"]=944,e["germandbls"]=611,e["Idieresis"]=278,e["eacute"]=556,e["abreve"]=556,e["uhungarumlaut"]=556,e["ecaron"]=556,e["Ydieresis"]=667,e["divide"]=584,e["Yacute"]=667,e["Acircumflex"]=667,e["aacute"]=556,e["Ucircumflex"]=722,e["yacute"]=500,e["scommaaccent"]=500,e["ecircumflex"]=556,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=556,e["Uacute"]=722,e["uogonek"]=556,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=737,e["Emacron"]=667,e["ccaron"]=500,e["aring"]=556,e["Ncommaaccent"]=722,e["lacute"]=222,e["agrave"]=556,e["Tcommaaccent"]=611,e["Cacute"]=722,e["atilde"]=556,e["Edotaccent"]=667,e["scaron"]=500,e["scedilla"]=500,e["iacute"]=278,e["lozenge"]=471,e["Rcaron"]=722,e["Gcommaaccent"]=778,e["ucircumflex"]=556,e["acircumflex"]=556,e["Amacron"]=667,e["rcaron"]=333,e["ccedilla"]=500,e["Zdotaccent"]=611,e["Thorn"]=667,e["Omacron"]=778,e["Racute"]=722,e["Sacute"]=667,e["dcaron"]=643,e["Umacron"]=722,e["uring"]=556,e["threesuperior"]=333,e["Ograve"]=778,e["Agrave"]=667,e["Abreve"]=667,e["multiply"]=584,e["uacute"]=556,e["Tcaron"]=611,e["partialdiff"]=476,e["ydieresis"]=500,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=556,e["edieresis"]=556,e["cacute"]=500,e["nacute"]=556,e["umacron"]=556,e["Ncaron"]=722,e["Iacute"]=278,e["plusminus"]=584,e["brokenbar"]=260,e["registered"]=737,e["Gbreve"]=778,e["Idotaccent"]=278,e["summation"]=600,e["Egrave"]=667,e["racute"]=333,e["omacron"]=556,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=722,e["lcommaaccent"]=222,e["tcaron"]=317,e["eogonek"]=556,e["Uogonek"]=722,e["Aacute"]=667,e["Adieresis"]=667,e["egrave"]=556,e["zacute"]=500,e["iogonek"]=222,e["Oacute"]=778,e["oacute"]=556,e["amacron"]=556,e["sacute"]=500,e["idieresis"]=278,e["Ocircumflex"]=778,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=556,e["twosuperior"]=333,e["Odieresis"]=778,e["mu"]=556,e["igrave"]=278,e["ohungarumlaut"]=556,e["Eogonek"]=667,e["dcroat"]=556,e["threequarters"]=834,e["Scedilla"]=667,e["lcaron"]=299,e["Kcommaaccent"]=667,e["Lacute"]=556,e["trademark"]=1e3,e["edotaccent"]=556,e["Igrave"]=278,e["Imacron"]=278,e["Lcaron"]=556,e["onehalf"]=834,e["lessequal"]=549,e["ocircumflex"]=556,e["ntilde"]=556,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=556,e["gbreve"]=556,e["onequarter"]=834,e["Scaron"]=667,e["Scommaaccent"]=667,e["Ohungarumlaut"]=778,e["degree"]=400,e["ograve"]=556,e["Ccaron"]=722,e["ugrave"]=556,e["radical"]=453,e["Dcaron"]=722,e["rcommaaccent"]=333,e["Ntilde"]=722,e["otilde"]=556,e["Rcommaaccent"]=722,e["Lcommaaccent"]=556,e["Atilde"]=667,e["Aogonek"]=667,e["Aring"]=667,e["Otilde"]=778,e["zdotaccent"]=500,e["Ecaron"]=667,e["Iogonek"]=278,e["kcommaaccent"]=500,e["minus"]=584,e["Icircumflex"]=278,e["ncaron"]=556,e["tcommaaccent"]=278,e["logicalnot"]=584,e["odieresis"]=556,e["udieresis"]=556,e["notequal"]=549,e["gcommaaccent"]=556,e["eth"]=556,e["zcaron"]=500,e["ncommaaccent"]=556,e["onesuperior"]=333,e["imacron"]=278,e["Euro"]=556}),e["Symbol"]=(0,a.getLookupTableFactory)(function(e){e["space"]=250,e["exclam"]=333,e["universal"]=713,e["numbersign"]=500,e["existential"]=549,e["percent"]=833,e["ampersand"]=778,e["suchthat"]=439,e["parenleft"]=333,e["parenright"]=333,e["asteriskmath"]=500,e["plus"]=549,e["comma"]=250,e["minus"]=549,e["period"]=250,e["slash"]=278,e["zero"]=500,e["one"]=500,e["two"]=500,e["three"]=500,e["four"]=500,e["five"]=500,e["six"]=500,e["seven"]=500,e["eight"]=500,e["nine"]=500,e["colon"]=278,e["semicolon"]=278,e["less"]=549,e["equal"]=549,e["greater"]=549,e["question"]=444,e["congruent"]=549,e["Alpha"]=722,e["Beta"]=667,e["Chi"]=722,e["Delta"]=612,e["Epsilon"]=611,e["Phi"]=763,e["Gamma"]=603,e["Eta"]=722,e["Iota"]=333,e["theta1"]=631,e["Kappa"]=722,e["Lambda"]=686,e["Mu"]=889,e["Nu"]=722,e["Omicron"]=722,e["Pi"]=768,e["Theta"]=741,e["Rho"]=556,e["Sigma"]=592,e["Tau"]=611,e["Upsilon"]=690,e["sigma1"]=439,e["Omega"]=768,e["Xi"]=645,e["Psi"]=795,e["Zeta"]=611,e["bracketleft"]=333,e["therefore"]=863,e["bracketright"]=333,e["perpendicular"]=658,e["underscore"]=500,e["radicalex"]=500,e["alpha"]=631,e["beta"]=549,e["chi"]=549,e["delta"]=494,e["epsilon"]=439,e["phi"]=521,e["gamma"]=411,e["eta"]=603,e["iota"]=329,e["phi1"]=603,e["kappa"]=549,e["lambda"]=549,e["mu"]=576,e["nu"]=521,e["omicron"]=549,e["pi"]=549,e["theta"]=521,e["rho"]=549,e["sigma"]=603,e["tau"]=439,e["upsilon"]=576,e["omega1"]=713,e["omega"]=686,e["xi"]=493,e["psi"]=686,e["zeta"]=494,e["braceleft"]=480,e["bar"]=200,e["braceright"]=480,e["similar"]=549,e["Euro"]=750,e["Upsilon1"]=620,e["minute"]=247,e["lessequal"]=549,e["fraction"]=167,e["infinity"]=713,e["florin"]=500,e["club"]=753,e["diamond"]=753,e["heart"]=753,e["spade"]=753,e["arrowboth"]=1042,e["arrowleft"]=987,e["arrowup"]=603,e["arrowright"]=987,e["arrowdown"]=603,e["degree"]=400,e["plusminus"]=549,e["second"]=411,e["greaterequal"]=549,e["multiply"]=549,e["proportional"]=713,e["partialdiff"]=494,e["bullet"]=460,e["divide"]=549,e["notequal"]=549,e["equivalence"]=549,e["approxequal"]=549,e["ellipsis"]=1e3,e["arrowvertex"]=603,e["arrowhorizex"]=1e3,e["carriagereturn"]=658,e["aleph"]=823,e["Ifraktur"]=686,e["Rfraktur"]=795,e["weierstrass"]=987,e["circlemultiply"]=768,e["circleplus"]=768,e["emptyset"]=823,e["intersection"]=768,e["union"]=768,e["propersuperset"]=713,e["reflexsuperset"]=713,e["notsubset"]=713,e["propersubset"]=713,e["reflexsubset"]=713,e["element"]=713,e["notelement"]=713,e["angle"]=768,e["gradient"]=713,e["registerserif"]=790,e["copyrightserif"]=790,e["trademarkserif"]=890,e["product"]=823,e["radical"]=549,e["dotmath"]=250,e["logicalnot"]=713,e["logicaland"]=603,e["logicalor"]=603,e["arrowdblboth"]=1042,e["arrowdblleft"]=987,e["arrowdblup"]=603,e["arrowdblright"]=987,e["arrowdbldown"]=603,e["lozenge"]=494,e["angleleft"]=329,e["registersans"]=790,e["copyrightsans"]=790,e["trademarksans"]=786,e["summation"]=713,e["parenlefttp"]=384,e["parenleftex"]=384,e["parenleftbt"]=384,e["bracketlefttp"]=384,e["bracketleftex"]=384,e["bracketleftbt"]=384,e["bracelefttp"]=494,e["braceleftmid"]=494,e["braceleftbt"]=494,e["braceex"]=494,e["angleright"]=329,e["integral"]=274,e["integraltp"]=686,e["integralex"]=686,e["integralbt"]=686,e["parenrighttp"]=384,e["parenrightex"]=384,e["parenrightbt"]=384,e["bracketrighttp"]=384,e["bracketrightex"]=384,e["bracketrightbt"]=384,e["bracerighttp"]=494,e["bracerightmid"]=494,e["bracerightbt"]=494,e["apple"]=790}),e["Times-Roman"]=(0,a.getLookupTableFactory)(function(e){e["space"]=250,e["exclam"]=333,e["quotedbl"]=408,e["numbersign"]=500,e["dollar"]=500,e["percent"]=833,e["ampersand"]=778,e["quoteright"]=333,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=500,e["plus"]=564,e["comma"]=250,e["hyphen"]=333,e["period"]=250,e["slash"]=278,e["zero"]=500,e["one"]=500,e["two"]=500,e["three"]=500,e["four"]=500,e["five"]=500,e["six"]=500,e["seven"]=500,e["eight"]=500,e["nine"]=500,e["colon"]=278,e["semicolon"]=278,e["less"]=564,e["equal"]=564,e["greater"]=564,e["question"]=444,e["at"]=921,e["A"]=722,e["B"]=667,e["C"]=667,e["D"]=722,e["E"]=611,e["F"]=556,e["G"]=722,e["H"]=722,e["I"]=333,e["J"]=389,e["K"]=722,e["L"]=611,e["M"]=889,e["N"]=722,e["O"]=722,e["P"]=556,e["Q"]=722,e["R"]=667,e["S"]=556,e["T"]=611,e["U"]=722,e["V"]=722,e["W"]=944,e["X"]=722,e["Y"]=722,e["Z"]=611,e["bracketleft"]=333,e["backslash"]=278,e["bracketright"]=333,e["asciicircum"]=469,e["underscore"]=500,e["quoteleft"]=333,e["a"]=444,e["b"]=500,e["c"]=444,e["d"]=500,e["e"]=444,e["f"]=333,e["g"]=500,e["h"]=500,e["i"]=278,e["j"]=278,e["k"]=500,e["l"]=278,e["m"]=778,e["n"]=500,e["o"]=500,e["p"]=500,e["q"]=500,e["r"]=333,e["s"]=389,e["t"]=278,e["u"]=500,e["v"]=500,e["w"]=722,e["x"]=500,e["y"]=500,e["z"]=444,e["braceleft"]=480,e["bar"]=200,e["braceright"]=480,e["asciitilde"]=541,e["exclamdown"]=333,e["cent"]=500,e["sterling"]=500,e["fraction"]=167,e["yen"]=500,e["florin"]=500,e["section"]=500,e["currency"]=500,e["quotesingle"]=180,e["quotedblleft"]=444,e["guillemotleft"]=500,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=556,e["fl"]=556,e["endash"]=500,e["dagger"]=500,e["daggerdbl"]=500,e["periodcentered"]=250,e["paragraph"]=453,e["bullet"]=350,e["quotesinglbase"]=333,e["quotedblbase"]=444,e["quotedblright"]=444,e["guillemotright"]=500,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=444,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=889,e["ordfeminine"]=276,e["Lslash"]=611,e["Oslash"]=722,e["OE"]=889,e["ordmasculine"]=310,e["ae"]=667,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=500,e["oe"]=722,e["germandbls"]=500,e["Idieresis"]=333,e["eacute"]=444,e["abreve"]=444,e["uhungarumlaut"]=500,e["ecaron"]=444,e["Ydieresis"]=722,e["divide"]=564,e["Yacute"]=722,e["Acircumflex"]=722,e["aacute"]=444,e["Ucircumflex"]=722,e["yacute"]=500,e["scommaaccent"]=389,e["ecircumflex"]=444,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=444,e["Uacute"]=722,e["uogonek"]=500,e["Edieresis"]=611,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=760,e["Emacron"]=611,e["ccaron"]=444,e["aring"]=444,e["Ncommaaccent"]=722,e["lacute"]=278,e["agrave"]=444,e["Tcommaaccent"]=611,e["Cacute"]=667,e["atilde"]=444,e["Edotaccent"]=611,e["scaron"]=389,e["scedilla"]=389,e["iacute"]=278,e["lozenge"]=471,e["Rcaron"]=667,e["Gcommaaccent"]=722,e["ucircumflex"]=500,e["acircumflex"]=444,e["Amacron"]=722,e["rcaron"]=333,e["ccedilla"]=444,e["Zdotaccent"]=611,e["Thorn"]=556,e["Omacron"]=722,e["Racute"]=667,e["Sacute"]=556,e["dcaron"]=588,e["Umacron"]=722,e["uring"]=500,e["threesuperior"]=300,e["Ograve"]=722,e["Agrave"]=722,e["Abreve"]=722,e["multiply"]=564,e["uacute"]=500,e["Tcaron"]=611,e["partialdiff"]=476,e["ydieresis"]=500,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=611,e["adieresis"]=444,e["edieresis"]=444,e["cacute"]=444,e["nacute"]=500,e["umacron"]=500,e["Ncaron"]=722,e["Iacute"]=333,e["plusminus"]=564,e["brokenbar"]=200,e["registered"]=760,e["Gbreve"]=722,e["Idotaccent"]=333,e["summation"]=600,e["Egrave"]=611,e["racute"]=333,e["omacron"]=500,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=667,e["lcommaaccent"]=278,e["tcaron"]=326,e["eogonek"]=444,e["Uogonek"]=722,e["Aacute"]=722,e["Adieresis"]=722,e["egrave"]=444,e["zacute"]=444,e["iogonek"]=278,e["Oacute"]=722,e["oacute"]=500,e["amacron"]=444,e["sacute"]=389,e["idieresis"]=278,e["Ocircumflex"]=722,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=500,e["twosuperior"]=300,e["Odieresis"]=722,e["mu"]=500,e["igrave"]=278,e["ohungarumlaut"]=500,e["Eogonek"]=611,e["dcroat"]=500,e["threequarters"]=750,e["Scedilla"]=556,e["lcaron"]=344,e["Kcommaaccent"]=722,e["Lacute"]=611,e["trademark"]=980,e["edotaccent"]=444,e["Igrave"]=333,e["Imacron"]=333,e["Lcaron"]=611,e["onehalf"]=750,e["lessequal"]=549,e["ocircumflex"]=500,e["ntilde"]=500,e["Uhungarumlaut"]=722,e["Eacute"]=611,e["emacron"]=444,e["gbreve"]=500,e["onequarter"]=750,e["Scaron"]=556,e["Scommaaccent"]=556,e["Ohungarumlaut"]=722,e["degree"]=400,e["ograve"]=500,e["Ccaron"]=667,e["ugrave"]=500,e["radical"]=453,e["Dcaron"]=722,e["rcommaaccent"]=333,e["Ntilde"]=722,e["otilde"]=500,e["Rcommaaccent"]=667,e["Lcommaaccent"]=611,e["Atilde"]=722,e["Aogonek"]=722,e["Aring"]=722,e["Otilde"]=722,e["zdotaccent"]=444,e["Ecaron"]=611,e["Iogonek"]=333,e["kcommaaccent"]=500,e["minus"]=564,e["Icircumflex"]=333,e["ncaron"]=500,e["tcommaaccent"]=278,e["logicalnot"]=564,e["odieresis"]=500,e["udieresis"]=500,e["notequal"]=549,e["gcommaaccent"]=500,e["eth"]=500,e["zcaron"]=444,e["ncommaaccent"]=500,e["onesuperior"]=300,e["imacron"]=278,e["Euro"]=500}),e["Times-Bold"]=(0,a.getLookupTableFactory)(function(e){e["space"]=250,e["exclam"]=333,e["quotedbl"]=555,e["numbersign"]=500,e["dollar"]=500,e["percent"]=1e3,e["ampersand"]=833,e["quoteright"]=333,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=500,e["plus"]=570,e["comma"]=250,e["hyphen"]=333,e["period"]=250,e["slash"]=278,e["zero"]=500,e["one"]=500,e["two"]=500,e["three"]=500,e["four"]=500,e["five"]=500,e["six"]=500,e["seven"]=500,e["eight"]=500,e["nine"]=500,e["colon"]=333,e["semicolon"]=333,e["less"]=570,e["equal"]=570,e["greater"]=570,e["question"]=500,e["at"]=930,e["A"]=722,e["B"]=667,e["C"]=722,e["D"]=722,e["E"]=667,e["F"]=611,e["G"]=778,e["H"]=778,e["I"]=389,e["J"]=500,e["K"]=778,e["L"]=667,e["M"]=944,e["N"]=722,e["O"]=778,e["P"]=611,e["Q"]=778,e["R"]=722,e["S"]=556,e["T"]=667,e["U"]=722,e["V"]=722,e["W"]=1e3,e["X"]=722,e["Y"]=722,e["Z"]=667,e["bracketleft"]=333,e["backslash"]=278,e["bracketright"]=333,e["asciicircum"]=581,e["underscore"]=500,e["quoteleft"]=333,e["a"]=500,e["b"]=556,e["c"]=444,e["d"]=556,e["e"]=444,e["f"]=333,e["g"]=500,e["h"]=556,e["i"]=278,e["j"]=333,e["k"]=556,e["l"]=278,e["m"]=833,e["n"]=556,e["o"]=500,e["p"]=556,e["q"]=556,e["r"]=444,e["s"]=389,e["t"]=333,e["u"]=556,e["v"]=500,e["w"]=722,e["x"]=500,e["y"]=500,e["z"]=444,e["braceleft"]=394,e["bar"]=220,e["braceright"]=394,e["asciitilde"]=520,e["exclamdown"]=333,e["cent"]=500,e["sterling"]=500,e["fraction"]=167,e["yen"]=500,e["florin"]=500,e["section"]=500,e["currency"]=500,e["quotesingle"]=278,e["quotedblleft"]=500,e["guillemotleft"]=500,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=556,e["fl"]=556,e["endash"]=500,e["dagger"]=500,e["daggerdbl"]=500,e["periodcentered"]=250,e["paragraph"]=540,e["bullet"]=350,e["quotesinglbase"]=333,e["quotedblbase"]=500,e["quotedblright"]=500,e["guillemotright"]=500,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=500,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=1e3,e["ordfeminine"]=300,e["Lslash"]=667,e["Oslash"]=778,e["OE"]=1e3,e["ordmasculine"]=330,e["ae"]=722,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=500,e["oe"]=722,e["germandbls"]=556,e["Idieresis"]=389,e["eacute"]=444,e["abreve"]=500,e["uhungarumlaut"]=556,e["ecaron"]=444,e["Ydieresis"]=722,e["divide"]=570,e["Yacute"]=722,e["Acircumflex"]=722,e["aacute"]=500,e["Ucircumflex"]=722,e["yacute"]=500,e["scommaaccent"]=389,e["ecircumflex"]=444,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=500,e["Uacute"]=722,e["uogonek"]=556,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=747,e["Emacron"]=667,e["ccaron"]=444,e["aring"]=500,e["Ncommaaccent"]=722,e["lacute"]=278,e["agrave"]=500,e["Tcommaaccent"]=667,e["Cacute"]=722,e["atilde"]=500,e["Edotaccent"]=667,e["scaron"]=389,e["scedilla"]=389,e["iacute"]=278,e["lozenge"]=494,e["Rcaron"]=722,e["Gcommaaccent"]=778,e["ucircumflex"]=556,e["acircumflex"]=500,e["Amacron"]=722,e["rcaron"]=444,e["ccedilla"]=444,e["Zdotaccent"]=667,e["Thorn"]=611,e["Omacron"]=778,e["Racute"]=722,e["Sacute"]=556,e["dcaron"]=672,e["Umacron"]=722,e["uring"]=556,e["threesuperior"]=300,e["Ograve"]=778,e["Agrave"]=722,e["Abreve"]=722,e["multiply"]=570,e["uacute"]=556,e["Tcaron"]=667,e["partialdiff"]=494,e["ydieresis"]=500,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=500,e["edieresis"]=444,e["cacute"]=444,e["nacute"]=556,e["umacron"]=556,e["Ncaron"]=722,e["Iacute"]=389,e["plusminus"]=570,e["brokenbar"]=220,e["registered"]=747,e["Gbreve"]=778,e["Idotaccent"]=389,e["summation"]=600,e["Egrave"]=667,e["racute"]=444,e["omacron"]=500,e["Zacute"]=667,e["Zcaron"]=667,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=722,e["lcommaaccent"]=278,e["tcaron"]=416,e["eogonek"]=444,e["Uogonek"]=722,e["Aacute"]=722,e["Adieresis"]=722,e["egrave"]=444,e["zacute"]=444,e["iogonek"]=278,e["Oacute"]=778,e["oacute"]=500,e["amacron"]=500,e["sacute"]=389,e["idieresis"]=278,e["Ocircumflex"]=778,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=556,e["twosuperior"]=300,e["Odieresis"]=778,e["mu"]=556,e["igrave"]=278,e["ohungarumlaut"]=500,e["Eogonek"]=667,e["dcroat"]=556,e["threequarters"]=750,e["Scedilla"]=556,e["lcaron"]=394,e["Kcommaaccent"]=778,e["Lacute"]=667,e["trademark"]=1e3,e["edotaccent"]=444,e["Igrave"]=389,e["Imacron"]=389,e["Lcaron"]=667,e["onehalf"]=750,e["lessequal"]=549,e["ocircumflex"]=500,e["ntilde"]=556,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=444,e["gbreve"]=500,e["onequarter"]=750,e["Scaron"]=556,e["Scommaaccent"]=556,e["Ohungarumlaut"]=778,e["degree"]=400,e["ograve"]=500,e["Ccaron"]=722,e["ugrave"]=556,e["radical"]=549,e["Dcaron"]=722,e["rcommaaccent"]=444,e["Ntilde"]=722,e["otilde"]=500,e["Rcommaaccent"]=722,e["Lcommaaccent"]=667,e["Atilde"]=722,e["Aogonek"]=722,e["Aring"]=722,e["Otilde"]=778,e["zdotaccent"]=444,e["Ecaron"]=667,e["Iogonek"]=389,e["kcommaaccent"]=556,e["minus"]=570,e["Icircumflex"]=389,e["ncaron"]=556,e["tcommaaccent"]=333,e["logicalnot"]=570,e["odieresis"]=500,e["udieresis"]=556,e["notequal"]=549,e["gcommaaccent"]=500,e["eth"]=500,e["zcaron"]=444,e["ncommaaccent"]=556,e["onesuperior"]=300,e["imacron"]=278,e["Euro"]=500}),e["Times-BoldItalic"]=(0,a.getLookupTableFactory)(function(e){e["space"]=250,e["exclam"]=389,e["quotedbl"]=555,e["numbersign"]=500,e["dollar"]=500,e["percent"]=833,e["ampersand"]=778,e["quoteright"]=333,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=500,e["plus"]=570,e["comma"]=250,e["hyphen"]=333,e["period"]=250,e["slash"]=278,e["zero"]=500,e["one"]=500,e["two"]=500,e["three"]=500,e["four"]=500,e["five"]=500,e["six"]=500,e["seven"]=500,e["eight"]=500,e["nine"]=500,e["colon"]=333,e["semicolon"]=333,e["less"]=570,e["equal"]=570,e["greater"]=570,e["question"]=500,e["at"]=832,e["A"]=667,e["B"]=667,e["C"]=667,e["D"]=722,e["E"]=667,e["F"]=667,e["G"]=722,e["H"]=778,e["I"]=389,e["J"]=500,e["K"]=667,e["L"]=611,e["M"]=889,e["N"]=722,e["O"]=722,e["P"]=611,e["Q"]=722,e["R"]=667,e["S"]=556,e["T"]=611,e["U"]=722,e["V"]=667,e["W"]=889,e["X"]=667,e["Y"]=611,e["Z"]=611,e["bracketleft"]=333,e["backslash"]=278,e["bracketright"]=333,e["asciicircum"]=570,e["underscore"]=500,e["quoteleft"]=333,e["a"]=500,e["b"]=500,e["c"]=444,e["d"]=500,e["e"]=444,e["f"]=333,e["g"]=500,e["h"]=556,e["i"]=278,e["j"]=278,e["k"]=500,e["l"]=278,e["m"]=778,e["n"]=556,e["o"]=500,e["p"]=500,e["q"]=500,e["r"]=389,e["s"]=389,e["t"]=278,e["u"]=556,e["v"]=444,e["w"]=667,e["x"]=500,e["y"]=444,e["z"]=389,e["braceleft"]=348,e["bar"]=220,e["braceright"]=348,e["asciitilde"]=570,e["exclamdown"]=389,e["cent"]=500,e["sterling"]=500,e["fraction"]=167,e["yen"]=500,e["florin"]=500,e["section"]=500,e["currency"]=500,e["quotesingle"]=278,e["quotedblleft"]=500,e["guillemotleft"]=500,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=556,e["fl"]=556,e["endash"]=500,e["dagger"]=500,e["daggerdbl"]=500,e["periodcentered"]=250,e["paragraph"]=500,e["bullet"]=350,e["quotesinglbase"]=333,e["quotedblbase"]=500,e["quotedblright"]=500,e["guillemotright"]=500,e["ellipsis"]=1e3,e["perthousand"]=1e3,e["questiondown"]=500,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=1e3,e["AE"]=944,e["ordfeminine"]=266,e["Lslash"]=611,e["Oslash"]=722,e["OE"]=944,e["ordmasculine"]=300,e["ae"]=722,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=500,e["oe"]=722,e["germandbls"]=500,e["Idieresis"]=389,e["eacute"]=444,e["abreve"]=500,e["uhungarumlaut"]=556,e["ecaron"]=444,e["Ydieresis"]=611,e["divide"]=570,e["Yacute"]=611,e["Acircumflex"]=667,e["aacute"]=500,e["Ucircumflex"]=722,e["yacute"]=444,e["scommaaccent"]=389,e["ecircumflex"]=444,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=500,e["Uacute"]=722,e["uogonek"]=556,e["Edieresis"]=667,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=747,e["Emacron"]=667,e["ccaron"]=444,e["aring"]=500,e["Ncommaaccent"]=722,e["lacute"]=278,e["agrave"]=500,e["Tcommaaccent"]=611,e["Cacute"]=667,e["atilde"]=500,e["Edotaccent"]=667,e["scaron"]=389,e["scedilla"]=389,e["iacute"]=278,e["lozenge"]=494,e["Rcaron"]=667,e["Gcommaaccent"]=722,e["ucircumflex"]=556,e["acircumflex"]=500,e["Amacron"]=667,e["rcaron"]=389,e["ccedilla"]=444,e["Zdotaccent"]=611,e["Thorn"]=611,e["Omacron"]=722,e["Racute"]=667,e["Sacute"]=556,e["dcaron"]=608,e["Umacron"]=722,e["uring"]=556,e["threesuperior"]=300,e["Ograve"]=722,e["Agrave"]=667,e["Abreve"]=667,e["multiply"]=570,e["uacute"]=556,e["Tcaron"]=611,e["partialdiff"]=494,e["ydieresis"]=444,e["Nacute"]=722,e["icircumflex"]=278,e["Ecircumflex"]=667,e["adieresis"]=500,e["edieresis"]=444,e["cacute"]=444,e["nacute"]=556,e["umacron"]=556,e["Ncaron"]=722,e["Iacute"]=389,e["plusminus"]=570,e["brokenbar"]=220,e["registered"]=747,e["Gbreve"]=722,e["Idotaccent"]=389,e["summation"]=600,e["Egrave"]=667,e["racute"]=389,e["omacron"]=500,e["Zacute"]=611,e["Zcaron"]=611,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=667,e["lcommaaccent"]=278,e["tcaron"]=366,e["eogonek"]=444,e["Uogonek"]=722,e["Aacute"]=667,e["Adieresis"]=667,e["egrave"]=444,e["zacute"]=389,e["iogonek"]=278,e["Oacute"]=722,e["oacute"]=500,e["amacron"]=500,e["sacute"]=389,e["idieresis"]=278,e["Ocircumflex"]=722,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=500,e["twosuperior"]=300,e["Odieresis"]=722,e["mu"]=576,e["igrave"]=278,e["ohungarumlaut"]=500,e["Eogonek"]=667,e["dcroat"]=500,e["threequarters"]=750,e["Scedilla"]=556,e["lcaron"]=382,e["Kcommaaccent"]=667,e["Lacute"]=611,e["trademark"]=1e3,e["edotaccent"]=444,e["Igrave"]=389,e["Imacron"]=389,e["Lcaron"]=611,e["onehalf"]=750,e["lessequal"]=549,e["ocircumflex"]=500,e["ntilde"]=556,e["Uhungarumlaut"]=722,e["Eacute"]=667,e["emacron"]=444,e["gbreve"]=500,e["onequarter"]=750,e["Scaron"]=556,e["Scommaaccent"]=556,e["Ohungarumlaut"]=722,e["degree"]=400,e["ograve"]=500,e["Ccaron"]=667,e["ugrave"]=556,e["radical"]=549,e["Dcaron"]=722,e["rcommaaccent"]=389,e["Ntilde"]=722,e["otilde"]=500,e["Rcommaaccent"]=667,e["Lcommaaccent"]=611,e["Atilde"]=667,e["Aogonek"]=667,e["Aring"]=667,e["Otilde"]=722,e["zdotaccent"]=389,e["Ecaron"]=667,e["Iogonek"]=389,e["kcommaaccent"]=500,e["minus"]=606,e["Icircumflex"]=389,e["ncaron"]=556,e["tcommaaccent"]=278,e["logicalnot"]=606,e["odieresis"]=500,e["udieresis"]=556,e["notequal"]=549,e["gcommaaccent"]=500,e["eth"]=500,e["zcaron"]=389,e["ncommaaccent"]=556,e["onesuperior"]=300,e["imacron"]=278,e["Euro"]=500}),e["Times-Italic"]=(0,a.getLookupTableFactory)(function(e){e["space"]=250,e["exclam"]=333,e["quotedbl"]=420,e["numbersign"]=500,e["dollar"]=500,e["percent"]=833,e["ampersand"]=778,e["quoteright"]=333,e["parenleft"]=333,e["parenright"]=333,e["asterisk"]=500,e["plus"]=675,e["comma"]=250,e["hyphen"]=333,e["period"]=250,e["slash"]=278,e["zero"]=500,e["one"]=500,e["two"]=500,e["three"]=500,e["four"]=500,e["five"]=500,e["six"]=500,e["seven"]=500,e["eight"]=500,e["nine"]=500,e["colon"]=333,e["semicolon"]=333,e["less"]=675,e["equal"]=675,e["greater"]=675,e["question"]=500,e["at"]=920,e["A"]=611,e["B"]=611,e["C"]=667,e["D"]=722,e["E"]=611,e["F"]=611,e["G"]=722,e["H"]=722,e["I"]=333,e["J"]=444,e["K"]=667,e["L"]=556,e["M"]=833,e["N"]=667,e["O"]=722,e["P"]=611,e["Q"]=722,e["R"]=611,e["S"]=500,e["T"]=556,e["U"]=722,e["V"]=611,e["W"]=833,e["X"]=611,e["Y"]=556,e["Z"]=556,e["bracketleft"]=389,e["backslash"]=278,e["bracketright"]=389,e["asciicircum"]=422,e["underscore"]=500,e["quoteleft"]=333,e["a"]=500,e["b"]=500,e["c"]=444,e["d"]=500,e["e"]=444,e["f"]=278,e["g"]=500,e["h"]=500,e["i"]=278,e["j"]=278,e["k"]=444,e["l"]=278,e["m"]=722,e["n"]=500,e["o"]=500,e["p"]=500,e["q"]=500,e["r"]=389,e["s"]=389,e["t"]=278,e["u"]=500,e["v"]=444,e["w"]=667,e["x"]=444,e["y"]=444,e["z"]=389,e["braceleft"]=400,e["bar"]=275,e["braceright"]=400,e["asciitilde"]=541,e["exclamdown"]=389,e["cent"]=500,e["sterling"]=500,e["fraction"]=167,e["yen"]=500,e["florin"]=500,e["section"]=500,e["currency"]=500,e["quotesingle"]=214,e["quotedblleft"]=556,e["guillemotleft"]=500,e["guilsinglleft"]=333,e["guilsinglright"]=333,e["fi"]=500,e["fl"]=500,e["endash"]=500,e["dagger"]=500,e["daggerdbl"]=500,e["periodcentered"]=250,e["paragraph"]=523,e["bullet"]=350,e["quotesinglbase"]=333,e["quotedblbase"]=556,e["quotedblright"]=556,e["guillemotright"]=500,e["ellipsis"]=889,e["perthousand"]=1e3,e["questiondown"]=500,e["grave"]=333,e["acute"]=333,e["circumflex"]=333,e["tilde"]=333,e["macron"]=333,e["breve"]=333,e["dotaccent"]=333,e["dieresis"]=333,e["ring"]=333,e["cedilla"]=333,e["hungarumlaut"]=333,e["ogonek"]=333,e["caron"]=333,e["emdash"]=889,e["AE"]=889,e["ordfeminine"]=276,e["Lslash"]=556,e["Oslash"]=722,e["OE"]=944,e["ordmasculine"]=310,e["ae"]=667,e["dotlessi"]=278,e["lslash"]=278,e["oslash"]=500,e["oe"]=667,e["germandbls"]=500,e["Idieresis"]=333,e["eacute"]=444,e["abreve"]=500,e["uhungarumlaut"]=500,e["ecaron"]=444,e["Ydieresis"]=556,e["divide"]=675,e["Yacute"]=556,e["Acircumflex"]=611,e["aacute"]=500,e["Ucircumflex"]=722,e["yacute"]=444,e["scommaaccent"]=389,e["ecircumflex"]=444,e["Uring"]=722,e["Udieresis"]=722,e["aogonek"]=500,e["Uacute"]=722,e["uogonek"]=500,e["Edieresis"]=611,e["Dcroat"]=722,e["commaaccent"]=250,e["copyright"]=760,e["Emacron"]=611,e["ccaron"]=444,e["aring"]=500,e["Ncommaaccent"]=667,e["lacute"]=278,e["agrave"]=500,e["Tcommaaccent"]=556,e["Cacute"]=667,e["atilde"]=500,e["Edotaccent"]=611,e["scaron"]=389,e["scedilla"]=389,e["iacute"]=278,e["lozenge"]=471,e["Rcaron"]=611,e["Gcommaaccent"]=722,e["ucircumflex"]=500,e["acircumflex"]=500,e["Amacron"]=611,e["rcaron"]=389,e["ccedilla"]=444,e["Zdotaccent"]=556,e["Thorn"]=611,e["Omacron"]=722,e["Racute"]=611,e["Sacute"]=500,e["dcaron"]=544,e["Umacron"]=722,e["uring"]=500,e["threesuperior"]=300,e["Ograve"]=722,e["Agrave"]=611,e["Abreve"]=611,e["multiply"]=675,e["uacute"]=500,e["Tcaron"]=556,e["partialdiff"]=476,e["ydieresis"]=444,e["Nacute"]=667,e["icircumflex"]=278,e["Ecircumflex"]=611,e["adieresis"]=500,e["edieresis"]=444,e["cacute"]=444,e["nacute"]=500,e["umacron"]=500,e["Ncaron"]=667,e["Iacute"]=333,e["plusminus"]=675,e["brokenbar"]=275,e["registered"]=760,e["Gbreve"]=722,e["Idotaccent"]=333,e["summation"]=600,e["Egrave"]=611,e["racute"]=389,e["omacron"]=500,e["Zacute"]=556,e["Zcaron"]=556,e["greaterequal"]=549,e["Eth"]=722,e["Ccedilla"]=667,e["lcommaaccent"]=278,e["tcaron"]=300,e["eogonek"]=444,e["Uogonek"]=722,e["Aacute"]=611,e["Adieresis"]=611,e["egrave"]=444,e["zacute"]=389,e["iogonek"]=278,e["Oacute"]=722,e["oacute"]=500,e["amacron"]=500,e["sacute"]=389,e["idieresis"]=278,e["Ocircumflex"]=722,e["Ugrave"]=722,e["Delta"]=612,e["thorn"]=500,e["twosuperior"]=300,e["Odieresis"]=722,e["mu"]=500,e["igrave"]=278,e["ohungarumlaut"]=500,e["Eogonek"]=611,e["dcroat"]=500,e["threequarters"]=750,e["Scedilla"]=500,e["lcaron"]=300,e["Kcommaaccent"]=667,e["Lacute"]=556,e["trademark"]=980,e["edotaccent"]=444,e["Igrave"]=333,e["Imacron"]=333,e["Lcaron"]=611,e["onehalf"]=750,e["lessequal"]=549,e["ocircumflex"]=500,e["ntilde"]=500,e["Uhungarumlaut"]=722,e["Eacute"]=611,e["emacron"]=444,e["gbreve"]=500,e["onequarter"]=750,e["Scaron"]=500,e["Scommaaccent"]=500,e["Ohungarumlaut"]=722,e["degree"]=400,e["ograve"]=500,e["Ccaron"]=667,e["ugrave"]=500,e["radical"]=453,e["Dcaron"]=722,e["rcommaaccent"]=389,e["Ntilde"]=667,e["otilde"]=500,e["Rcommaaccent"]=611,e["Lcommaaccent"]=556,e["Atilde"]=611,e["Aogonek"]=611,e["Aring"]=611,e["Otilde"]=722,e["zdotaccent"]=389,e["Ecaron"]=611,e["Iogonek"]=333,e["kcommaaccent"]=444,e["minus"]=675,e["Icircumflex"]=333,e["ncaron"]=500,e["tcommaaccent"]=278,e["logicalnot"]=675,e["odieresis"]=500,e["udieresis"]=500,e["notequal"]=549,e["gcommaaccent"]=500,e["eth"]=500,e["zcaron"]=389,e["ncommaaccent"]=500,e["onesuperior"]=300,e["imacron"]=278,e["Euro"]=500}),e["ZapfDingbats"]=(0,a.getLookupTableFactory)(function(e){e["space"]=278,e["a1"]=974,e["a2"]=961,e["a202"]=974,e["a3"]=980,e["a4"]=719,e["a5"]=789,e["a119"]=790,e["a118"]=791,e["a117"]=690,e["a11"]=960,e["a12"]=939,e["a13"]=549,e["a14"]=855,e["a15"]=911,e["a16"]=933,e["a105"]=911,e["a17"]=945,e["a18"]=974,e["a19"]=755,e["a20"]=846,e["a21"]=762,e["a22"]=761,e["a23"]=571,e["a24"]=677,e["a25"]=763,e["a26"]=760,e["a27"]=759,e["a28"]=754,e["a6"]=494,e["a7"]=552,e["a8"]=537,e["a9"]=577,e["a10"]=692,e["a29"]=786,e["a30"]=788,e["a31"]=788,e["a32"]=790,e["a33"]=793,e["a34"]=794,e["a35"]=816,e["a36"]=823,e["a37"]=789,e["a38"]=841,e["a39"]=823,e["a40"]=833,e["a41"]=816,e["a42"]=831,e["a43"]=923,e["a44"]=744,e["a45"]=723,e["a46"]=749,e["a47"]=790,e["a48"]=792,e["a49"]=695,e["a50"]=776,e["a51"]=768,e["a52"]=792,e["a53"]=759,e["a54"]=707,e["a55"]=708,e["a56"]=682,e["a57"]=701,e["a58"]=826,e["a59"]=815,e["a60"]=789,e["a61"]=789,e["a62"]=707,e["a63"]=687,e["a64"]=696,e["a65"]=689,e["a66"]=786,e["a67"]=787,e["a68"]=713,e["a69"]=791,e["a70"]=785,e["a71"]=791,e["a72"]=873,e["a73"]=761,e["a74"]=762,e["a203"]=762,e["a75"]=759,e["a204"]=759,e["a76"]=892,e["a77"]=892,e["a78"]=788,e["a79"]=784,e["a81"]=438,e["a82"]=138,e["a83"]=277,e["a84"]=415,e["a97"]=392,e["a98"]=392,e["a99"]=668,e["a100"]=668,e["a89"]=390,e["a90"]=390,e["a93"]=317,e["a94"]=317,e["a91"]=276,e["a92"]=276,e["a205"]=509,e["a85"]=509,e["a206"]=410,e["a86"]=410,e["a87"]=234,e["a88"]=234,e["a95"]=334,e["a96"]=334,e["a101"]=732,e["a102"]=544,e["a103"]=544,e["a104"]=910,e["a106"]=667,e["a107"]=760,e["a108"]=760,e["a112"]=776,e["a111"]=595,e["a110"]=694,e["a109"]=626,e["a120"]=788,e["a121"]=788,e["a122"]=788,e["a123"]=788,e["a124"]=788,e["a125"]=788,e["a126"]=788,e["a127"]=788,e["a128"]=788,e["a129"]=788,e["a130"]=788,e["a131"]=788,e["a132"]=788,e["a133"]=788,e["a134"]=788,e["a135"]=788,e["a136"]=788,e["a137"]=788,e["a138"]=788,e["a139"]=788,e["a140"]=788,e["a141"]=788,e["a142"]=788,e["a143"]=788,e["a144"]=788,e["a145"]=788,e["a146"]=788,e["a147"]=788,e["a148"]=788,e["a149"]=788,e["a150"]=788,e["a151"]=788,e["a152"]=788,e["a153"]=788,e["a154"]=788,e["a155"]=788,e["a156"]=788,e["a157"]=788,e["a158"]=788,e["a159"]=788,e["a160"]=894,e["a161"]=838,e["a163"]=1016,e["a164"]=458,e["a196"]=748,e["a165"]=924,e["a192"]=748,e["a166"]=918,e["a167"]=927,e["a168"]=928,e["a169"]=928,e["a170"]=834,e["a171"]=873,e["a172"]=828,e["a173"]=924,e["a162"]=924,e["a174"]=917,e["a175"]=930,e["a176"]=931,e["a177"]=463,e["a178"]=883,e["a179"]=836,e["a193"]=836,e["a180"]=867,e["a199"]=867,e["a181"]=696,e["a200"]=696,e["a182"]=874,e["a201"]=874,e["a183"]=760,e["a184"]=946,e["a197"]=771,e["a185"]=865,e["a194"]=771,e["a198"]=888,e["a186"]=967,e["a195"]=888,e["a187"]=831,e["a188"]=873,e["a189"]=927,e["a190"]=970,e["a191"]=918})});t.getMetrics=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptCompiler=t.PostScriptEvaluator=t.PDFFunctionFactory=t.isPDFFunction=void 0;var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r>c)*u,l&=(1<r?e=r:e0&&(d=a[h-1]);var g=r[1];h>1,u=a.length>>1,h=new p(o),f=Object.create(null),d=8192,g=d,v=new Float32Array(u);return function(e,t,r,a){var n,o,s="",l=v;for(n=0;ny&&(o=y)),p[n]=o}g>0&&(g--,f[s]=p),r.set(p,a)}else r.set(d,a)}}}}();function d(e){var t;if("object"!==("undefined"===typeof e?"undefined":a(e)))return!1;if((0,o.isDict)(e))t=e;else{if(!(0,o.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")}var g=function(){var e=100;function t(e){this.stack=e?Array.prototype.slice.call(e,0):[]}return t.prototype={push:function(t){if(this.stack.length>=e)throw new Error("PostScript function stack overflow.");this.stack.push(t)},pop:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()},copy:function(t){if(this.stack.length+t>=e)throw new Error("PostScript function stack overflow.");for(var r=this.stack,a=r.length-t,i=t-1;i>=0;i--,a++)r.push(r[a])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){var r,a,i,n=this.stack,o=n.length-e,s=n.length-1,c=o+(t-Math.floor(t/e)*e);for(r=o,a=s;r0?i.push(r<>a);break;case"ceiling":r=i.pop(),i.push(Math.ceil(r));break;case"copy":r=i.pop(),i.copy(r);break;case"cos":r=i.pop(),i.push(Math.cos(r));break;case"cvi":r=0|i.pop(),i.push(r);break;case"cvr":break;case"div":a=i.pop(),r=i.pop(),i.push(r/a);break;case"dup":i.copy(1);break;case"eq":a=i.pop(),r=i.pop(),i.push(r===a);break;case"exch":i.roll(2,1);break;case"exp":a=i.pop(),r=i.pop(),i.push(Math.pow(r,a));break;case"false":i.push(!1);break;case"floor":r=i.pop(),i.push(Math.floor(r));break;case"ge":a=i.pop(),r=i.pop(),i.push(r>=a);break;case"gt":a=i.pop(),r=i.pop(),i.push(r>a);break;case"idiv":a=i.pop(),r=i.pop(),i.push(r/a|0);break;case"index":r=i.pop(),i.index(r);break;case"le":a=i.pop(),r=i.pop(),i.push(r<=a);break;case"ln":r=i.pop(),i.push(Math.log(r));break;case"log":r=i.pop(),i.push(Math.log(r)/Math.LN10);break;case"lt":a=i.pop(),r=i.pop(),i.push(r=t?new r(t):e.max<=t?e:new i(e,t)}function d(){}return e.prototype.visit=function(e){(0,n.unreachable)("abstract method")},t.prototype=Object.create(e.prototype),t.prototype.visit=function(e){e.visitArgument(this)},r.prototype=Object.create(e.prototype),r.prototype.visit=function(e){e.visitLiteral(this)},a.prototype=Object.create(e.prototype),a.prototype.visit=function(e){e.visitBinaryOperation(this)},i.prototype=Object.create(e.prototype),i.prototype.visit=function(e){e.visitMin(this)},o.prototype=Object.create(e.prototype),o.prototype.visit=function(e){e.visitVariable(this)},s.prototype=Object.create(e.prototype),s.prototype.visit=function(e){e.visitVariableDefinition(this)},c.prototype={visitArgument:function(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")},visitVariable:function(e){this.parts.push("v",e.index)},visitLiteral:function(e){this.parts.push(e.number)},visitBinaryOperation:function(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")},visitMin:function(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")},toString:function(){return this.parts.join("")}},d.prototype={compile:function(e,a,i){var n,d,g,p,m,v,b,y,w,k,S=[],C=[],x=a.length>>1,_=i.length>>1,A=0;for(n=0;ne.min&&(o.unshift("Math.max(",a,", "),o.push(")")),n=0&&(t>=65&&t<=90||t>=97&&t<=122))r.push(String.fromCharCode(t));var n=r.join("");switch(n.toLowerCase()){case"if":return s.IF;case"ifelse":return s.IFELSE;default:return s.getOperator(n)}},getNumber:function(){var e=this.currentChar,t=this.strBuf;t.length=0,t[0]=String.fromCharCode(e);while((e=this.nextChar())>=0){if(!(e>=48&&e<=57||45===e||46===e))break;t.push(String.fromCharCode(e))}var r=parseFloat(t.join(""));if(isNaN(r))throw new a.FormatError("Invalid floating point number: "+r);return r}},e}();t.PostScriptLexer=c,t.PostScriptParser=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var a=r(2),i=function(e){var t=4294901760,r=65535;function i(e){var t=3285377520;this.h1=e?4294967295&e:t,this.h2=e?4294967295&e:t}return i.prototype={update:function(e){var i=void 0,n=void 0;if((0,a.isString)(e)){i=new Uint8Array(2*e.length),n=0;for(var o=0,s=e.length;o>>8,i[n++]=255&c)}}else{if(!(0,a.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");i=e,n=i.byteLength}for(var l=n>>2,u=n-4*l,h=new Uint32Array(i.buffer,0,l),f=0,d=0,g=this.h1,p=this.h2,m=3432918353,v=461845907,b=m&r,y=v&r,w=0;w>>17,f=f*v&t|f*y&r,g^=f,g=g<<13|g>>>19,g=5*g+3864292196):(d=h[w],d=d*m&t|d*b&r,d=d<<15|d>>>17,d=d*v&t|d*y&r,p^=d,p=p<<13|p>>>19,p=5*p+3864292196);switch(f=0,u){case 3:f^=i[4*l+2]<<16;case 2:f^=i[4*l+1]<<8;case 1:f^=i[4*l],f=f*m&t|f*b&r,f=f<<15|f>>>17,f=f*v&t|f*y&r,1&l?g^=f:p^=f}return this.h1=g,this.h2=p,this},hexdigest:function(){var e=this.h1,a=this.h2;e^=a>>>1,e=3981806797*e&t|36045*e&r,a=4283543511*a&t|(2950163797*(a<<16|e>>>16)&t)>>>16,e^=a>>>1,e=444984403*e&t|60499*e&r,a=3301882366*a&t|(3120437893*(a<<16|e>>>16)&t)>>>16,e^=a>>>1;for(var i=0,n=[e,a],o="";i>>0).toString(16);while(s.length<8)s="0"+s;o+=s}return o}},i}();t.MurmurHash3_64=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var a=function(){function e(e,t){var r=[],a=!0,i=!1,n=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0)if(r.push(o.value),t&&r.length===t)break}catch(c){i=!0,n=c}finally{try{!a&&s["return"]&&s["return"]()}finally{if(i)throw n}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=r(2),n=r(138),o=r(151),s=r(140),c=r(146),l=r(149),u=function(){function e(e,t){return t&&t.canDecode(e)?t.decode(e).catch(function(t){return(0,i.warn)("Native image decoding failed -- trying to recover: "+(t&&t.message)),e}):Promise.resolve(e)}function t(e,t,r,a){return e=t+e*r,e<0?0:e>a?a:e}function r(e,t,r,a,i,n){var o,s,c,l,u=i*n,h=t<=8?new Uint8Array(u):t<=16?new Uint16Array(u):new Uint32Array(u),f=r/i,d=a/n,g=0,p=new Uint16Array(i),m=r;for(o=0;o0&&Number.isInteger(a.height)&&a.height>0&&(a.width!==k||a.height!==S)&&((0,i.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),k=a.width,S=a.height),k<1||S<1)throw new i.FormatError("Invalid image width: "+k+" or height: "+S);this.width=k,this.height=S,this.interpolate=b.get("Interpolate","I")||!1,this.imageMask=b.get("ImageMask","IM")||!1,this.matte=b.get("Matte")||!1;var C=a.bitsPerComponent;if(!C&&(C=b.get("BitsPerComponent","BPC"),!C)){if(!this.imageMask)throw new i.FormatError("Bits per component missing in image: "+this.imageMask);C=1}if(this.bpc=C,!this.imageMask){var x=b.get("ColorSpace","CS");if(!x)switch((0,i.info)("JPX images (which do not require color spaces)"),a.numComps){case 1:x=n.Name.get("DeviceGray");break;case 3:x=n.Name.get("DeviceRGB");break;case 4:x=n.Name.get("DeviceCMYK");break;default:throw new Error("JPX images with "+a.numComps+" color components not supported.")}var _=c?r:null;this.colorSpace=o.ColorSpace.parse(x,t,_,v),this.numComps=this.colorSpace.numComps}if(this.decode=b.getArray("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode)||m&&!o.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var A=(1<>3)*n,l=a.byteLength,u=c===l;if(!o||s&&!u)if(s)for(t=new Uint8ClampedArray(c),t.set(a),r=l;r>7&1,l[f+1]=a>>6&1,l[f+2]=a>>5&1,l[f+3]=a>>4&1,l[f+4]=a>>3&1,l[f+5]=a>>2&1,l[f+6]=a>>1&1,l[f+7]=1&a,f+=8;if(f>=1}}else{var v=0;for(a=0,f=0,r=s;f>b;l[f]=y<0?0:y>h?h:y,a&=(1<p[w+1]){v=255;break}}s[h]=v}}if(s)for(h=0,d=3,f=t*n;h0&&void 0!==arguments[0]&&arguments[0],r=this.drawWidth,a=this.drawHeight,n={width:r,height:a,kind:0,data:null},o=this.numComps,l=this.width,u=this.height,h=this.bpc,f=l*o*h+7>>3;if(!t){var d;if("DeviceGray"===this.colorSpace.name&&1===h?d=i.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==h||this.needsDecode||(d=i.ImageKind.RGB_24BPP),d&&!this.smask&&!this.mask&&r===l&&a===u){if(n.kind=d,e=this.getImageBytes(u*f),this.image instanceof s.DecodeStream)n.data=e;else{var g=new Uint8ClampedArray(e.length);g.set(e),n.data=g}if(this.needsDecode){(0,i.assert)(d===i.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");for(var p=n.data,m=0,v=p.length;m>3,l=this.getImageBytes(o*c),u=this.getComponents(l);if(1!==s){this.needsDecode&&this.decodeBuffer(u),a=n*o;var h=255/((1<3&&void 0!==arguments[3]&&arguments[3];return this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGB=!!a,this.image.getBytes(e,!0)}},u}();t.PDFImage=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var a=r(131),i=c(a),n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){var e=l(i.default.mark(function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return i.default.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",t.apply(a,r));case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),s=r(2);function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){function a(i,n){try{var o=t[i](n),s=o.value}catch(c){return void r(c)}if(!o.done)return Promise.resolve(s).then(function(e){a("next",e)},function(e){a("throw",e)});e(s)}return a("next")})}}function u(e){if("object"!==("undefined"===typeof e?"undefined":n(e)))return e;switch(e.name){case"AbortException":return new s.AbortException(e.message);case"MissingPDFException":return new s.MissingPDFException(e.message);case"UnexpectedResponseException":return new s.UnexpectedResponseException(e.message,e.status);default:return new s.UnknownErrorException(e.message,e.details)}}function h(e){return!(e instanceof Error)||e instanceof s.AbortException||e instanceof s.MissingPDFException||e instanceof s.UnexpectedResponseException||e instanceof s.UnknownErrorException?e:new s.UnknownErrorException(e.message,e.toString())}function f(e,t,r){t?e.resolve():e.reject(r)}function d(e){return Promise.resolve(e).catch(function(){})}function g(e,t,r){var a=this;this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null),n=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback "+o);var s=i[o];delete i[o],"error"in t?s.reject(u(t.error)):s.resolve(t.data)}else{if(!(t.action in n))throw new Error("Unknown action from worker: "+t.action);var c=n[t.action];if(t.callbackId){var l=a.sourceName,f=t.sourceName;Promise.resolve().then(function(){return c[0].call(c[1],t.data)}).then(function(e){r.postMessage({sourceName:l,targetName:f,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:l,targetName:f,isReply:!0,callbackId:t.callbackId,error:h(e)})})}else t.streamId?a._createStreamSink(t):c[0].call(c[1],t.data)}},r.addEventListener("message",this._onComObjOnMessage)}g.prototype={on:function(e,t,r){var a=this.actionHandler;if(a[e])throw new Error('There is already an actionName called "'+e+'"');a[e]=[t,r]},send:function(e,t,r){var a={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(a,r)},sendWithPromise:function(e,t,r){var a=this.callbackId++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:a},n=(0,s.createPromiseCapability)();this.callbacksCapabilities[a]=n;try{this.postMessage(i,r)}catch(o){n.reject(o)}return n.promise},sendWithStream:function(e,t,r,a){var i=this,n=this.streamId++,o=this.sourceName,c=this.targetName;return new s.ReadableStream({start:function(r){var a=(0,s.createPromiseCapability)();return i.streamControllers[n]={controller:r,startCall:a,isClosed:!1},i.postMessage({sourceName:o,targetName:c,action:e,streamId:n,data:t,desiredSize:r.desiredSize}),a.promise},pull:function(e){var t=(0,s.createPromiseCapability)();return i.streamControllers[n].pullCall=t,i.postMessage({sourceName:o,targetName:c,stream:"pull",streamId:n,desiredSize:e.desiredSize}),t.promise},cancel:function(e){var t=(0,s.createPromiseCapability)();return i.streamControllers[n].cancelCall=t,i.streamControllers[n].isClosed=!0,i.postMessage({sourceName:o,targetName:c,stream:"cancel",reason:e,streamId:n}),t.promise}},r)},_createStreamSink:function(e){var t=this,r=this,a=this.actionHandler[e.action],i=e.streamId,n=e.desiredSize,c=this.sourceName,l=e.sourceName,u=(0,s.createPromiseCapability)(),h=function(e){var r=e.stream,a=e.chunk,n=e.transfers,o=e.success,s=e.reason;t.postMessage({sourceName:c,targetName:l,stream:r,streamId:i,chunk:a,success:o,reason:s},n)},f={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments[2];if(!this.isCancelled){var a=this.desiredSize;this.desiredSize-=t,a>0&&this.desiredSize<=0&&(this.sinkCapability=(0,s.createPromiseCapability)(),this.ready=this.sinkCapability.promise),h({stream:"enqueue",chunk:e,transfers:r})}},close:function(){this.isCancelled||(this.isCancelled=!0,h({stream:"close"}),delete r.streamSinks[i])},error:function(e){this.isCancelled||(this.isCancelled=!0,h({stream:"error",reason:e}))},sinkCapability:u,onPull:null,onCancel:null,isCancelled:!1,desiredSize:n,ready:null};f.sinkCapability.resolve(),f.ready=f.sinkCapability.promise,this.streamSinks[i]=f,o(a[0],[e.data,f],a[1]).then(function(){h({stream:"start_complete",success:!0})},function(e){h({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,a=e.sourceName,i=e.streamId,n=function(e){var n=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:a,stream:n,success:o,streamId:i,reason:s})},c=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&d(e.promise)})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":f(this.streamControllers[e.streamId].startCall,e.success,u(e.reason));break;case"pull_complete":f(this.streamControllers[e.streamId].pullCall,e.success,u(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){n({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,o(this.streamSinks[e.streamId].onPull).then(function(){n({stream:"pull_complete",success:!0})},function(e){n({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":(0,s.assert)(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if((0,s.assert)(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),c();break;case"error":(0,s.assert)(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(u(e.reason)),c();break;case"cancel_complete":f(this.streamControllers[e.streamId].cancelCall,e.success,u(e.reason)),c();break;case"cancel":if(!this.streamSinks[e.streamId])break;o(this.streamSinks[e.streamId].onCancel,[u(e.reason)]).then(function(){n({stream:"cancel_complete",success:!0})},function(e){n({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(u(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},t.MessageHandler=g}])})}).call(this,r("b639").Buffer,r("c8ba"),r("f28c"))},"1fb5":function(e,t,r){"use strict";t.byteLength=u,t.toByteArray=f,t.fromByteArray=p;for(var a=[],i=[],n="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var a=r===t?0:4-r%4;return[r,a]}function u(e){var t=l(e),r=t[0],a=t[1];return 3*(r+a)/4-a}function h(e,t,r){return 3*(t+r)/4-r}function f(e){for(var t,r=l(e),a=r[0],o=r[1],s=new n(h(e,a,o)),c=0,u=o>0?a-4:a,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===o&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,s[c++]=255&t),1===o&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s}function d(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function g(e,t,r){for(var a,i=[],n=t;nc?c:s+o));return 1===i?(t=e[r-1],n.push(a[t>>2]+a[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],n.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),n.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},9152:function(e,t){t.read=function(e,t,r,a,i){var n,o,s=8*i-a-1,c=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,n=d&(1<<-u)-1,d>>=-u,u+=s;u>0;n=256*n+e[t+h],h+=f,u-=8);for(o=n&(1<<-u)-1,n>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===n)n=1-l;else{if(n===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,a),n-=l}return(d?-1:1)*o*Math.pow(2,n-a)},t.write=function(e,t,r,a,i,n){var o,s,c,l=8*n-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:n-1,g=a?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),t+=o+h>=1?f/c:f*Math.pow(2,1-h),t*c>=2&&(o++,c/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*c-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=g,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=g,o/=256,l-=8);e[r+d-g]|=128*p}},b639:function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var a=r("1fb5"),i=r("9152"),n=r("e3db");function o(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),l.alloc(+e)}function w(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(a)return J(e).length;t=(""+t).toLowerCase(),a=!0}}function k(e,t,r){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return F(this,t,r);case"ascii":return D(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function S(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function C(e,t,r,a,i){if(0===e.length)return-1;if("string"===typeof r?(a=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=l.from(t,a)),l.isBuffer(t))return 0===t.length?-1:x(e,t,r,a,i);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,a,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,a,i){var n,o=1,s=e.length,c=t.length;if(void 0!==a&&(a=String(a).toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(n=r;ns&&(r=s-c),n=r;n>=0;n--){for(var h=!0,f=0;fi&&(a=i)):a=i;var n=t.length;if(n%2!==0)throw new TypeError("Invalid hex string");a>n/2&&(a=n/2);for(var o=0;o239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(u=l);break;case 2:n=e[i+1],128===(192&n)&&(c=(31&l)<<6|63&n,c>127&&(u=c));break;case 3:n=e[i+1],o=e[i+2],128===(192&n)&&128===(192&o)&&(c=(15&l)<<12|(63&n)<<6|63&o,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:n=e[i+1],o=e[i+2],s=e[i+3],128===(192&n)&&128===(192&o)&&128===(192&s)&&(c=(15&l)<<18|(63&n)<<12|(63&o)<<6|63&s,c>65535&&c<1114112&&(u=c))}null===u?(u=65533,h=1):u>65535&&(u-=65536,a.push(u>>>10&1023|55296),u=56320|1023&u),a.push(u),i+=h}return B(a)}t.Buffer=l,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:o(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,r){return u(null,e,t,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,r){return f(null,e,t,r)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,a=t.length,i=0,n=Math.min(r,a);i0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,a,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),t<0||r>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&t>=r)return 0;if(a>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,a>>>=0,i>>>=0,this===e)return 0;for(var n=i-a,o=r-t,s=Math.min(n,o),c=this.slice(a,i),u=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var n=!1;;)switch(a){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return P(this,e,t,r);case"latin1":case"binary":return I(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(n)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),n=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function B(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var r="",a=0;while(aa)&&(r=a);for(var i="",n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,a,i,n){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function j(e,t,r,a){t<0&&(t=65535+t+1);for(var i=0,n=Math.min(e.length-r,2);i>>8*(a?i:1-i)}function z(e,t,r,a){t<0&&(t=4294967295+t+1);for(var i=0,n=Math.min(e.length-r,4);i>>8*(a?i:3-i)&255}function H(e,t,r,a,i,n){if(r+a>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function G(e,t,r,a,n){return n||H(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),i.write(e,t,r,a,23,4),r+4}function W(e,t,r,a,n){return n||H(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),i.write(e,t,r,a,52,8),r+8}l.prototype.slice=function(e,t){var r,a=this.length;if(e=~~e,t=void 0===t?a:~~t,e<0?(e+=a,e<0&&(e=0)):e>a&&(e=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),t0&&(i*=256))a+=this[e+--t]*i;return a},l.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);var a=this[e],i=1,n=0;while(++n=i&&(a-=Math.pow(2,8*t)),a},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);var a=t,i=1,n=this[e+--a];while(a>0&&(i*=256))n+=this[e+--a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,a){if(e=+e,t|=0,r|=0,!a){var i=Math.pow(2,8*r)-1;q(this,e,t,r,i,0)}var n=1,o=0;this[t]=255&e;while(++o=0&&(o*=256))this[t+n]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t|=0,!a){var i=Math.pow(2,8*r-1);q(this,e,t,r,i-1,-i)}var n=0,o=1,s=0;this[t]=255&e;while(++n>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t|=0,!a){var i=Math.pow(2,8*r-1);q(this,e,t,r,i-1,-i)}var n=r-1,o=1,s=0;this[t+n]=255&e;while(--n>=0&&(o*=256))e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return G(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return G(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return W(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return W(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,a){if(r||(r=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(n<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(n=t;n55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(o+1===a){(t-=3)>-1&&n.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&n.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return n}function Z(e){for(var t=[],r=0;r>8,i=r%256,n.push(i),n.push(a)}return n}function $(e){return a.toByteArray(Y(e))}function ee(e,t,r,a){for(var i=0;i=t.length||i>=e.length)break;t[i+r]=e[i]}return i}function te(e){return e!==e}}).call(this,r("c8ba"))},c8ba:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(a){"object"===typeof window&&(r=window)}e.exports=r},e3db:function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},f28c:function(e,t){var r,a,i=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===n||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}function c(e){if(a===clearTimeout)return clearTimeout(e);if((a===o||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{return a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(function(){try{r="function"===typeof setTimeout?setTimeout:n}catch(e){r=n}try{a="function"===typeof clearTimeout?clearTimeout:o}catch(e){a=o}})();var l,u=[],h=!1,f=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):f=-1,u.length&&g())}function g(){if(!h){var e=s(d);h=!0;var t=u.length;while(t){l=u,u=[];while(++f1)for(var r=1;r