0){for(;m>p-f;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;\"\"===y&&0===i||(y=i+y),m--}\"\"!==y&&(y=\".\"+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||\"0\",n=e[0-d]||\"0\";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,\"\")}return\".\"===y[0]&&(y=\"0\"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(5),i=r(6),o=r(33),s=r(49);function a(t,e,{format:r=\"string\",max_decimal_digits:a=100,ellipsis:u=!1}={}){\"0\"===t[0]&&(t=t.substring(1)),\"0\"===e[0]&&(e=e.substring(1));const c=t.indexOf(\".\"),l=e.indexOf(\".\"),f=-1===c?t.length:c,h=-1===l?0:e.length-1-l;let d=!1;t=t.replace(/\\./,\"\"),e=e.replace(/\\./,\"\");const p=t.length;let y,g=\"\",m=\"\",b=-1*h,v=0;for(let r=0;r\"===y){let t=1,r=i(e,e),s=e;for(;\">\"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),\"\"!==m)for(let e=t.length;e<=v;e++)m+=\"0\";m+=t,g=o(g,s),v=0}else{if(\"<\"===y){\"\"===m&&b++,v++;continue}if(\"=\"===y){if(\"\"!==m)for(let t=0;t3){m+=\"...\",d=!0;break}}else t[g]=1;const r=n(g,e);if(\">\"===r){let t=1,r=i(e,e),s=e;for(;\">\"!==n(r,g);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=v;e++)m+=\"0\";if(m+=t,g=o(g,s),\"0\"===g)break;v=0}else{if(\"<\"===r){v++;continue}if(\"=\"===r){for(let t=0;tx){for(let t=x;t0&&(m=s(m.substring(0,m.length-S+1))),\".\"===m[0]&&(m=\"0\"+m),\"object\"===r?{quotient:m,extra_decimals:S}:m}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(0),i=r(5),o=r(15),s=r(9),a=r(31);function u(t,e,{infinity_minus_infinity:r=\"NaN\"}={}){t=n(t),e=n(e);const u=!(\"-\"===t[0]),c=!(\"-\"===e[0]),l=o(t),f=o(e);if(l&&f){if(u===c)return r;if(u)return\"Infinity\";if(c)return\"-Infinity\"}else{if(l)return t;if(f)return c?\"-Infinity\":\"Infinity\"}if(u){if(c){const r=i(t,e);return\">\"===r?a(t,e):\"<\"===r?\"-\"+a(e,t):\"0\"}return s(t,e.substring(1))}if(c)return\"-\"+s(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return\">\"===r?\"-\"+a(t,e):\"<\"===r?a(e,t):\"0\"}}t.exports=u,t.exports.default=u},function(t,e,r){\"use strict\";const n=r(0),i=r(5);function o(t,e){t=n(t),e=n(e);const r=\"-\"!==t[0],o=\"-\"!==e[0];return r?o?i(t,e):\">\":o?\"<\":i(e.substring(1),t.substring(1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(1),s=r(77),a=r(16),u=r(52),c=r(78),l=r(11),f=r(53),h=r(54),d=r(81),p=r(37),y=r(36),g=r(22),m=r(85);function b(t,e,{zero_to_the_power_of_zero:r=\"1\",ellipsis:b=!1,imaginary:v=!0,max_decimal_digits:w=100,fraction:x=!1}={}){t=i(t),e=i(e);const _=v&&u(t);_&&(t=t.replace(/i$/,\"\"));const S=l(t),A=l(e);if(S&&A)return r;if(A)return\"1\";const E=g(e);if(S){if(\"+\"===E)return\"0\";if(\"-\"===E)return\"Infinity\"}const k=a(e);if(\"+\"===E&&k){let r=h(t,e);return\"number\"==typeof w&&(r=y(r,{digits:w})),_&&c(e)&&(r+=\"i\"),r}if(\"-\"===E&&k){const r=\"1\",i=h(t,n(e));return o(r,i,{ellipsis:b,max_decimal_digits:w})}if(!k){e=n(e);let[r,i]=e.includes(\"/\")?e.split(\"/\"):s(e);[r,i]=m(r,i);let o=p(t,i,{imaginary:v}),a=f(r,o);return\"number\"==typeof w&&(a=y(a,{digits:w})),\"-\"===E&&(a=d(a,{fraction:x,max_decimal_digits:w})),a}}t.exports=b,t.exports.default=b},function(t,e,r){\"use strict\";const n=r(52),i=r(164);function o(t,{digits:e=0}={}){return n(t)?i(t.substring(0,t.length-1),{digits:e})+\"i\":i(t,{digits:e})}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(5),s=r(82),a=r(16),u=r(80),c=r(54),l=r(83);function f(t,e,{imaginary:r=!0,max_decimal_digits:f=100}={}){if(t=i(t),\"1\"===(e=i(e)))return t;if(\"1\"===t)return\"1\";if(!a(e))throw new Error(\"[preciso] can't find fractional roots\");if(u(e))throw new Error(\"[preciso] can't find root of negative indexes\");const h=n(t),d=u(t),p=s(e),y=d&&p;if(y&&!r)throw new Error(\"[preciso] root has an imaginary number\");const g=d&&!p?\"-\":\"\",m=l(h,e),b=[\"9\",\"8\",\"7\",\"6\",\"5\",\"4\",\"3\",\"2\",\"1\",\"0\"];let v=\"\";for(let t=0;to)return\">\";if(n\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),c=[\"'\"].concat(u),l=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(c),f=[\"/\",\"?\",\"#\"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,\"javascript:\":!0},y={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},m=r(142);function b(t,e,r){if(t&&\"object\"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(\"string\"!=typeof t)throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),s=-1!==i&&i127?R+=\"x\":R+=I[j];if(!R.match(h)){var L=C.slice(0,k),F=C.slice(k+1),N=I.match(d);N&&(L.push(N[1]),F.unshift(N[2])),F.length&&(b=\"/\"+F.join(\".\")+b),this.hostname=L.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?\":\"+this.port:\"\",U=this.hostname||\"\";this.host=U+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==b[0]&&(b=\"/\"+b))}if(!p[x])for(k=0,P=c.length;k0)&&r.host.split(\"@\"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,k=0,T=_.length;T>=0;T--)\".\"===(A=_[T])?_.splice(T,1):\"..\"===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!w&&!x)for(;k--;k)_.unshift(\"..\");!w||\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0)||_.unshift(\"\"),E&&\"/\"!==_.join(\"/\").substr(-1)&&_.push(\"\");var O,C=\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0);S&&(r.hostname=C?\"\":_.length?_.shift():\"\",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!C&&_.unshift(\"\"),_.length>0?r.pathname=_.join(\"/\"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return\"string\"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},function(t,e,r){(function(t){var n=r(136),i=r(70),o=r(138),s=r(139),a=r(39),u=e;u.request=function(e,r){e=\"string\"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?\"http:\":\"\",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||\"/\";u&&-1!==u.indexOf(\":\")&&(u=\"[\"+u+\"]\"),e.url=(u?s+\"//\"+u:\"\")+(c?\":\"+c:\"\")+l,e.method=(e.method||\"GET\").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on(\"response\",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=[\"CHECKOUT\",\"CONNECT\",\"COPY\",\"DELETE\",\"GET\",\"HEAD\",\"LOCK\",\"M-SEARCH\",\"MERGE\",\"MKACTIVITY\",\"MKCOL\",\"MOVE\",\"NOTIFY\",\"OPTIONS\",\"PATCH\",\"POST\",\"PROPFIND\",\"PROPPATCH\",\"PURGE\",\"PUT\",\"REPORT\",\"SEARCH\",\"SUBSCRIBE\",\"TRACE\",\"UNLOCK\",\"UNSUBSCRIBE\"]}).call(this,r(3))},,function(t,e,r){(e=t.exports=r(61)).Stream=e,e.Readable=e,e.Writable=r(65),e.Duplex=r(14),e.Transform=r(67),e.PassThrough=r(122)},function(t,e,r){var n=r(7),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},s.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},s.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},function(t,e,r){\"use strict\";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('\"use strict\"; return ('+t+\").constructor;\")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},\"\")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return u}catch(t){try{return a(arguments,\"callee\").get}catch(t){return u}}}():u,l=r(145)(),f=r(147)(),h=Object.getPrototypeOf||(f?function(t){return t.__proto__}:null),d={},p=\"undefined\"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={\"%AggregateError%\":\"undefined\"==typeof AggregateError?void 0:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?void 0:ArrayBuffer,\"%ArrayIteratorPrototype%\":l&&h?h([][Symbol.iterator]()):void 0,\"%AsyncFromSyncIteratorPrototype%\":void 0,\"%AsyncFunction%\":d,\"%AsyncGenerator%\":d,\"%AsyncGeneratorFunction%\":d,\"%AsyncIteratorPrototype%\":d,\"%Atomics%\":\"undefined\"==typeof Atomics?void 0:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?void 0:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?void 0:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?void 0:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?void 0:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":Error,\"%eval%\":eval,\"%EvalError%\":EvalError,\"%Float32Array%\":\"undefined\"==typeof Float32Array?void 0:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?void 0:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?void 0:FinalizationRegistry,\"%Function%\":i,\"%GeneratorFunction%\":d,\"%Int8Array%\":\"undefined\"==typeof Int8Array?void 0:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?void 0:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?void 0:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":l&&h?h(h([][Symbol.iterator]())):void 0,\"%JSON%\":\"object\"==typeof JSON?JSON:void 0,\"%Map%\":\"undefined\"==typeof Map?void 0:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&l&&h?h((new Map)[Symbol.iterator]()):void 0,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?void 0:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?void 0:Proxy,\"%RangeError%\":RangeError,\"%ReferenceError%\":ReferenceError,\"%Reflect%\":\"undefined\"==typeof Reflect?void 0:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?void 0:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&l&&h?h((new Set)[Symbol.iterator]()):void 0,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":l&&h?h(\"\"[Symbol.iterator]()):void 0,\"%Symbol%\":l?Symbol:void 0,\"%SyntaxError%\":n,\"%ThrowTypeError%\":c,\"%TypedArray%\":p,\"%TypeError%\":o,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?void 0:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?void 0:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?void 0:Uint32Array,\"%URIError%\":URIError,\"%WeakMap%\":\"undefined\"==typeof WeakMap?void 0:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?void 0:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y[\"%Error.prototype%\"]=g}var m={\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},b=r(45),v=r(149),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,k=/\\\\(\\\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if(\"%\"===e&&\"%\"!==r)throw new n(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===r&&\"%\"!==e)throw new n(\"invalid intrinsic syntax, expected opening `%`\");var i=[];return _(t,E,(function(t,e,r,n){i[i.length]=r?_(n,k,\"$1\"):e||t})),i},O=function(t,e){var r,i=t;if(v(m,i)&&(i=\"%\"+(r=m[i])[0]+\"%\"),v(y,i)){var a=y[i];if(a===d&&(a=function t(e){var r;if(\"%AsyncFunction%\"===e)r=s(\"async function () {}\");else if(\"%GeneratorFunction%\"===e)r=s(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===e)r=s(\"async function* () {}\");else if(\"%AsyncGenerator%\"===e){var n=t(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(\"%AsyncIteratorPrototype%\"===e){var i=t(\"%AsyncGenerator%\");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:r,name:i,value:a}}throw new n(\"intrinsic \"+t+\" does not exist!\")};t.exports=function(t,e){if(\"string\"!=typeof t||0===t.length)throw new o(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof e)throw new o('\"allowMissing\" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,t))throw new n(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var r=T(t),i=r.length>0?r[0]:\"\",s=O(\"%\"+i+\"%\",e),u=s.name,c=s.value,l=!1,f=s.alias;f&&(i=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h=r.length){var b=a(c,p);c=(d=!!b)&&\"get\"in b&&!(\"originalValue\"in b.get)?b.get:c[p]}else d=v(c,p),c=c[p];d&&!l&&(y[u]=c)}}return c}},function(t,e,r){\"use strict\";var n=r(148);t.exports=Function.prototype.bind||n},function(t,e,r){\"use strict\";var n=String.prototype.replace,i=/%20/g,o=\"RFC1738\",s=\"RFC3986\";t.exports={default:s,formatters:{RFC1738:function(t){return n.call(t,i,\"+\")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},function(t,e,r){\"use strict\";const n=r(5),i=r(11),o=r(48),s=r(9);function a(t,e,r=\"1\"){if(i(t))return\"0\";let a=t,u=t;for(;\"<\"===n(u,e);)u=s(u,r),a=o(a,u);return a}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const{MAX_SAFE_INTEGER_LENGTH:n}=r(30);function i(t,e){if(\"0\"===t||\"0\"===e)return\"0\";const r=t.indexOf(\".\"),i=e.indexOf(\".\"),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o=\"\";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m=\"\",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,\"\");else{const t=m.length-s;m=m.substring(0,t)+\".\"+m.substring(t),m=m.replace(/^0+/,\"\"),m=m.replace(/\\.?0+$/,\"\"),\".\"===m[0]&&(m=\"0\"+m)}return m}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(6),i=r(160),o=[\"5\",\"6\",\"7\",\"8\",\"9\"];function s(t){if(t.match(/\\.9+$/))return n(i(t),\"1\");\"+\"===t[0]&&(t=t.substring(1));const e=t.length;let r=\"\";const s=t[t.length-1];if(o.includes(s)){let n;for(n=e-2;n>=0;n--){const e=t[n];if(\".\"===e||\"-\"===e)continue;const i=Number(e)+1;if(10!==i){r=i+r;break}r=\"0\"+r}n>0&&(r=t.substring(0,n)+r)}else r=t.substring(0,e-1);return\".\"===r[r.length-1]&&(r=r.substring(0,r.length-1)),r.indexOf(\".\")>-1&&(r=r.replace(/0+$/,\"\")),r}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";function n(t){return\"-\"===t[0]?\"-\":\"+\"}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";const n=r(0);function i(t){const e=(t=n(t)).indexOf(\".\");return-1===e?\"0\":(t.length-e-1).toString()}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";function n(t){return t.includes(\"i\")}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";const n=r(79);function i(){const t=Array.from(arguments),e=\"object\"==typeof t[t.length-1]?t[t.length-1]:void 0,r=Array.isArray(t[0])?t[0]:e?t.slice(0,t.length-1):t;return n(r,e)}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(17);function i(t,e){const r=Number(e);let i=t;for(let e=1;et.type===c.a.internalError).map(t=>t.error);return Object.assign(t,{[u.a]:i,[u.b]:r,[u.c]:n,[u.e]:e})}function m(t,e){return f(this,void 0,void 0,(function*(){d(\"Initializing new thread\");const r=e&&e.timeout?e.timeout:y,n=(yield function(t,e,r){return f(this,void 0,void 0,(function*(){let n;const i=new Promise((t,i)=>{n=setTimeout(()=>i(Error(r)),e)}),o=yield Promise.race([t,i]);return clearTimeout(n),o}))}(function(t){return new Promise((e,r)=>{const n=i=>{var o;h(\"Message from worker before finishing initialization:\",i.data),(o=i.data)&&\"init\"===o.type?(t.removeEventListener(\"message\",n),e(i.data)):(t=>t&&\"uncaughtError\"===t.type)(i.data)&&(t.removeEventListener(\"message\",n),r(Object(s.a)(i.data.error)))};t.addEventListener(\"message\",n)})}(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)).exposed,{termination:i,terminate:u}=function(t){const[e,r]=Object(a.a)();return{terminate:()=>f(this,void 0,void 0,(function*(){p(\"Terminating worker\"),yield t.terminate(),r()})),termination:e}}(t),m=function(t,e){return new o.a(r=>{const n=t=>{const e={type:c.a.message,data:t.data};r.next(e)},i=t=>{p(\"Unhandled promise rejection event in thread:\",t);const e={type:c.a.internalError,error:Error(t.reason)};r.next(e)};t.addEventListener(\"message\",n),t.addEventListener(\"unhandledrejection\",i),e.then(()=>{const e={type:c.a.termination};t.removeEventListener(\"message\",n),t.removeEventListener(\"unhandledrejection\",i),r.next(e),r.complete()})})}(t,i);if(\"function\"===n.type){return g(Object(l.a)(t),t,m,u)}if(\"module\"===n.type){return g(Object(l.b)(t,n.methods),t,m,u)}{const t=n.type;throw Error(\"Worker init message states unexpected type of expose(): \"+t)}}))}}).call(this,r(8))},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return g}));var n=r(12),i=r.n(n),o=r(103),s=r(201),a=r(26);function u(t){return Promise.all(t.map(t=>{const e=t=>({status:\"fulfilled\",value:t}),r=t=>({status:\"rejected\",reason:t}),n=Promise.resolve(t);try{return n.then(e,r)}catch(t){return Promise.reject(t)}}))}var c,l=r(19);!function(t){t.initialized=\"initialized\",t.taskCanceled=\"taskCanceled\",t.taskCompleted=\"taskCompleted\",t.taskFailed=\"taskFailed\",t.taskQueued=\"taskQueued\",t.taskQueueDrained=\"taskQueueDrained\",t.taskStart=\"taskStart\",t.terminated=\"terminated\"}(c||(c={}));var f=r(24),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};let d=1;class p{constructor(t,e){this.eventSubject=new o.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const r=\"number\"==typeof e?{size:e}:e||{},{size:n=l.a}=r;this.debug=i()(\"threads:pool:\"+(r.name||String(d++)).replace(/\\W/g,\" \").trim().replace(/\\s+/g,\"-\")),this.options=r,this.workers=function(t,e){return function(t){const e=[];for(let r=0;r({init:t(),runningTasks:[]}))}(t,n),this.eventObservable=Object(s.a)(a.a.from(this.eventSubject)),Promise.all(this.workers.map(t=>t.init)).then(()=>this.eventSubject.next({type:c.initialized,size:this.workers.length}),t=>{this.debug(\"Error while initializing pool worker:\",t),this.eventSubject.error(t),this.initErrors.push(t)})}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find(e=>e.runningTasks.lengthh(this,void 0,void 0,(function*(){var n;yield(n=0,new Promise(t=>setTimeout(t,n)));try{yield this.runPoolTask(t,e)}finally{t.runningTasks=t.runningTasks.filter(t=>t!==r),this.isClosing||this.scheduleWork()}})))();t.runningTasks.push(r)}))}scheduleWork(){this.debug(\"Attempt de-queueing a task in order to run it...\");const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e)return this.debug(\"Task queue is empty\"),void this.eventSubject.next({type:c.taskQueueDrained});this.run(t,e)}taskCompletion(t){return new Promise((e,r)=>{const n=this.events().subscribe(i=>{i.type===c.taskCompleted&&i.taskID===t?(n.unsubscribe(),e(i.returnValue)):i.type===c.taskFailed&&i.taskID===t?(n.unsubscribe(),r(i.error)):i.type===c.terminated&&(n.unsubscribe(),r(Error(\"Pool has been terminated before task was run.\")))})})}settled(t=!1){return h(this,void 0,void 0,(function*(){const e=()=>{return t=this.workers,e=t=>t.runningTasks,t.reduce((t,r)=>[...t,...e(r)],[]);var t,e},r=[],n=this.eventObservable.subscribe(t=>{t.type===c.taskFailed&&r.push(t.error)});return this.initErrors.length>0?Promise.reject(this.initErrors[0]):t&&0===this.taskQueue.length?(yield u(e()),r):(yield new Promise((t,e)=>{const r=this.eventObservable.subscribe({next(e){e.type===c.taskQueueDrained&&(r.unsubscribe(),t(void 0))},error:e})}),yield u(e()),n.unsubscribe(),r)}))}completed(t=!1){return h(this,void 0,void 0,(function*(){const e=this.settled(t),r=new Promise((t,r)=>{const n=this.eventObservable.subscribe({next(i){i.type===c.taskQueueDrained?(n.unsubscribe(),t(e)):i.type===c.taskFailed&&(n.unsubscribe(),r(i.error))},error:r})}),n=yield Promise.race([e,r]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=1/0}=this.options;if(this.isClosing)throw Error(\"Cannot schedule pool tasks after terminate() has been called.\");if(this.initErrors.length>0)throw this.initErrors[0];const r=this.nextTaskID++,n=this.taskCompletion(r);n.catch(t=>{this.debug(`Task #${r} errored:`,t)});const i={id:r,run:t,cancel:()=>{-1!==this.taskQueue.indexOf(i)&&(this.taskQueue=this.taskQueue.filter(t=>t!==i),this.eventSubject.next({type:c.taskCanceled,taskID:i.id}))},then:n.then.bind(n)};if(this.taskQueue.length>=e)throw Error(\"Maximum number of pool tasks queued. Refusing to queue another one.\\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.\");return this.debug(`Queueing task #${i.id}...`),this.taskQueue.push(i),this.eventSubject.next({type:c.taskQueued,taskID:i.id}),this.scheduleWork(),i}terminate(t){return h(this,void 0,void 0,(function*(){this.isClosing=!0,t||(yield this.completed(!0)),this.eventSubject.next({type:c.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map(t=>h(this,void 0,void 0,(function*(){return f.a.terminate(yield t.init)}))))}))}}function y(t,e){return new p(t,e)}p.EventType=c,y.EventType=c;const g=y},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return b})),r.d(e,\"b\",(function(){return v}));var n=r(12),i=r.n(n),o=r(26),s=r(201),a=r(13);const u=()=>{},c=t=>t,l=t=>Promise.resolve().then(t);function f(t){throw t}class h extends o.a{constructor(t){super(e=>{const r=this,n=Object.assign(Object.assign({},e),{complete(){e.complete(),r.onCompletion()},error(t){e.error(t),r.onError(t)},next(t){e.next(t),r.onNext(t)}});try{return this.initHasRun=!0,t(n)}catch(t){n.error(t)}}),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state=\"pending\"}onNext(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}onError(t){this.state=\"rejected\",this.rejection=t;for(const e of this.rejectionCallbacks)l(()=>e(t))}onCompletion(){this.state=\"fulfilled\";for(const t of this.fulfillmentCallbacks)l(()=>t(this.firstValue))}then(t,e){const r=t||c,n=e||f;let i=!1;return new Promise((t,e)=>{const o=r=>{if(!i){i=!0;try{t(n(r))}catch(t){e(t)}}};return this.initHasRun||this.subscribe({error:o}),\"fulfilled\"===this.state?t(r(this.firstValue)):\"rejected\"===this.state?(i=!0,t(n(this.rejection))):(this.fulfillmentCallbacks.push(e=>{try{t(r(e))}catch(t){o(t)}}),void this.rejectionCallbacks.push(o))})}catch(t){return this.then(void 0,t)}finally(t){const e=t||u;return this.then(t=>(e(),t),()=>e())}static from(t){return function(t){return t&&\"function\"==typeof t.then}(t)?new h(e=>{t.then(t=>{e.next(t),e.complete()},t=>{e.error(t)})}):super.from(t)}}var d=r(105),p=r(20);const y=i()(\"threads:master:messages\");let g=1;function m(t,e){return new o.a(r=>{let n;const i=o=>{var s;if(y(\"Message from worker:\",o.data),o.data&&o.data.uid===e)if((s=o.data)&&s.type===p.b.running)n=o.data.resultType;else if((t=>t&&t.type===p.b.result)(o.data))\"promise\"===n?(void 0!==o.data.payload&&r.next(Object(a.a)(o.data.payload)),r.complete(),t.removeEventListener(\"message\",i)):(o.data.payload&&r.next(Object(a.a)(o.data.payload)),o.data.complete&&(r.complete(),t.removeEventListener(\"message\",i)));else if((t=>t&&t.type===p.b.error)(o.data)){const e=Object(a.a)(o.data.error);r.error(e),t.removeEventListener(\"message\",i)}};return t.addEventListener(\"message\",i),()=>{if(\"observable\"===n||!n){const r={type:p.a.cancel,uid:e};t.postMessage(r)}t.removeEventListener(\"message\",i)}})}function b(t,e){return(...r)=>{const n=g++,{args:i,transferables:o}=function(t){if(0===t.length)return{args:[],transferables:[]};const e=[],r=[];for(const n of t)Object(d.a)(n)?(e.push(Object(a.b)(n.send)),r.push(...n.transferables)):e.push(Object(a.b)(n));return{args:e,transferables:0===r.length?r:(n=r,Array.from(new Set(n)))};var n}(r),u={type:p.a.run,uid:n,method:e,args:i};y(\"Sending command to run function to worker:\",u);try{t.postMessage(u,o)}catch(t){return h.from(Promise.reject(t))}return h.from(Object(s.a)(m(t,n)))}}function v(t,e){const r={};for(const n of e)r[n]=b(t,n);return r}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},function(t,e,r){\"use strict\";(function(e,n){var i=r(28);t.exports=v;var o,s=r(60);v.ReadableState=b;r(62).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(63),c=r(43).Buffer,l=(void 0!==e?e:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(21));f.inherits=r(10);var h=r(115),d=void 0;d=h&&h.debuglog?h.debuglog(\"stream\"):function(){};var p,y=r(116),g=r(64);f.inherits(v,u);var m=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(14));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(66).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(14),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||\"string\"==typeof e||void 0===e||t.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\"));var n;return r}(s,e)),o?t.emit(\"error\",o):s.objectMode||e&&e.length>0?(\"string\"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit(\"error\",new Error(\"stream.unshift() after end event\")):x(t,s,e,!0):s.ended?t.emit(\"error\",new Error(\"stream.push() after EOF\")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?x(t,s,e,!1):E(t,s)):x(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d(\"emit readable\"),t.emit(\"readable\"),C(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('\"endReadable()\" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"))}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?I(this):S(this),null;if(0===(t=_(t,e))&&e.ended)return 0===e.length&&I(this),null;var n,i=e.needReadable;return d(\"need readable\",i),(0===e.length||e.length-t0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit(\"data\",n),n},v.prototype._read=function(t){this.emit(\"error\",new Error(\"_read() is not implemented\"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d(\"pipe count=%d opts=%j\",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:v;function c(e,n){d(\"onunpipe\"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d(\"cleanup\"),t.removeListener(\"close\",m),t.removeListener(\"finish\",b),t.removeListener(\"drain\",f),t.removeListener(\"error\",g),t.removeListener(\"unpipe\",c),r.removeListener(\"end\",l),r.removeListener(\"end\",v),r.removeListener(\"data\",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){d(\"onend\"),t.end()}o.endEmitted?i.nextTick(u):r.once(\"end\",u),t.on(\"unpipe\",c);var f=function(t){return function(){var e=t._readableState;d(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,C(t))}}(r);t.on(\"drain\",f);var h=!1;var p=!1;function y(e){d(\"ondata\"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(d(\"false write response, pause\",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function g(e){d(\"onerror\",e),v(),t.removeListener(\"error\",g),0===a(t,\"error\")&&t.emit(\"error\",e)}function m(){t.removeListener(\"finish\",b),v()}function b(){d(\"onfinish\"),t.removeListener(\"close\",m),v()}function v(){d(\"unpipe\"),r.unpipe(t)}return r.on(\"data\",y),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",g),t.once(\"close\",m),t.once(\"finish\",b),t.emit(\"pipe\",r),o.flowing||(d(\"pipe resume\"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error(\"Unhandled error.\"+(s?\" (\"+s.message+\")\":\"\"));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if(\"function\"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return\"function\"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){t.exports=r(62).EventEmitter},function(t,e,r){\"use strict\";var n=r(28);function i(t,e){t.emit(\"error\",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){\"use strict\";(function(e,n,i){var o=r(28);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=b;var a,u=!e.browser&&[\"v0.10\",\"v0.9.\"].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=m;var c=Object.create(r(21));c.inherits=r(10);var l={deprecate:r(120)},f=r(63),h=r(43).Buffer,d=(void 0!==i?i:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var p,y=r(64);function g(){}function m(t,e){a=a||r(14),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit(\"error\",n)):(i(n),t._writableState.errorEmitted=!0,t.emit(\"error\",n),A(t,e))}(t,r,n,e,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||r(14),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),A(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(t,e,!0,e.length,i,\"\",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit(\"error\",r),e.prefinished=!0,t.emit(\"prefinish\"),A(t,e)}))}function A(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||(\"function\"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"))),r}c.inherits(b,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,\"buffer\",{get:l.deprecate((function(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),\"function\"==typeof e&&(r=e,e=null),a?e=\"buffer\":e||(e=i.defaultEncoding),\"function\"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error(\"write after end\");t.emit(\"error\",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError(\"May not write null values to stream\"):\"string\"==typeof r||void 0===r||e.objectMode||(s=new TypeError(\"Invalid non-string/buffer chunk\")),s&&(t.emit(\"error\",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i=\"buffer\",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError(\"Unknown encoding: \"+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error(\"_write() is not implemented\"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;\"function\"==typeof t?(r=t,t=null,e=null):\"function\"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once(\"finish\",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(118).setImmediate,r(3))},function(t,e,r){\"use strict\";var n=r(121).Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=u,this.end=c,e=4;break;case\"utf8\":this.fillLast=a,e=4;break;case\"base64\":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"�\".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):\"\"}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){\"use strict\";t.exports=s;var n=r(14),i=Object.create(r(21));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit(\"error\",new Error(\"write callback called multiple times\"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.lengthObject(o.a)(r),e)}async decode(t,e){return new Promise((r,n)=>{this.pool.queue(async i=>{try{const n=await i(t,e);r(n)}catch(t){n(t)}})})}destroy(){this.pool.terminate(!0)}}}).call(this,r(133))},function(t,e,r){(function(t){e.fetch=a(t.fetch)&&a(t.ReadableStream),e.writableStream=a(t.WritableStream),e.abortController=a(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open(\"GET\",t.XDomainRequest?\"/\":\"https://example.com\")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,s=o&&a(t.ArrayBuffer.prototype.slice);function a(t){return\"function\"==typeof t}e.arraybuffer=e.fetch||o&&i(\"arraybuffer\"),e.msstream=!e.fetch&&s&&i(\"ms-stream\"),e.mozchunkedarraybuffer=!e.fetch&&o&&i(\"moz-chunked-arraybuffer\"),e.overrideMimeType=e.fetch||!!n()&&a(n().overrideMimeType),e.vbArray=a(t.VBArray),r=null}).call(this,r(3))},function(t,e,r){(function(t,n,i){var o=r(69),s=r(10),a=r(42),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on(\"end\",(function(){t.nextTick((function(){c.emit(\"close\")}))})),\"fetch\"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){c._destroyed?r():c.push(new n(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit(\"error\",t)}});try{return void r.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit(\"error\",t)}))}catch(t){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new n(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit(\"error\",t)}))}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\\r?\\n/).forEach((function(t){var e=t.match(/^([^:]+):\\s*(.*)/);if(e){var r=e[1].toLowerCase();\"set-cookie\"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(e[2])):void 0!==c.headers[r]?c.headers[r]+=\", \"+e[2]:c.headers[r]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset=\"x-user-defined\",!o.overrideMimeType){var h=c.rawHeaders[\"mime-type\"];if(h){var d=h.match(/;\\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset=\"utf-8\")}}};s(c,a.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case\"text:vbarray\":if(e.readyState!==u.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case\"text\":try{r=e.responseText}catch(e){t._mode=\"text:vbarray\";break}if(r.length>t._pos){var o=r.substr(t._pos);if(\"x-user-defined\"===t._charset){for(var s=new n(o.length),a=0;at._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&\"ms-stream\"!==t._mode&&t.push(null)}}).call(this,r(8),r(7).Buffer,r(3))},function(t,e,r){\"use strict\";var n=r(46),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push(\"%\"+((e<16?\"0\":\"\")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(t){return!(!t||\"object\"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return\"[object RegExp]\"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;ne++t.next());return e.every(({done:t})=>t)?{done:!0}:{done:!1,value:e.map(({value:t})=>t)}}))}}},function(t,e,r){\"use strict\";function n(t){\"+\"===t[0]&&(t=t.substring(1));const e=\"-\"===t[0]?\"-\":\"\";\"-\"===e&&(t=t.substring(1));const r=t.indexOf(\"e\");if(-1===r)return e+t;let n=t.indexOf(\".\");-1===n&&(n=r);const i=Number(t.substring(r+1)),o=t.substring(0,r).replace(\".\",\"\"),s=n+i,a=o.length;if(s>=a){const t=s-a;let r=o;for(let e=0;es;e--)t+=\"0\";return t+=o,e+t}return e+o.substring(0,s)+\".\"+o.substring(s)}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";t.exports={MAX_SAFE_INTEGER:9007199254740991}},function(t,e,r){\"use strict\";const n=r(47);function i(t){return\"0\"===t?\"1\":n(\"1\",t)}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(9),s=r(22);function a(t){if(-1===(t=i(t)).indexOf(\".\"))return t;const e=s(t);return t=n(t).split(\".\")[0],\"+\"===e?o(t,\"1\"):\"-\"===e?\"0\"===t||\"\"===t?\"0\":\"-\"+t:void 0}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(51);function i(t){const e=n(t);return[t.replace(/\\./g,\"\").replace(/^0/,\"\"),1+\"0\".repeat(e)]}t.exports=i,t.exports.default=i},function(t,e,r){const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error(\"can't call is_odd on decimal\");return[\"1\",\"3\",\"5\",\"7\",\"9\"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(52),i=r(15),o=r(78),s=r(11),a=r(17),u=r(50);function c(t,{max_decimal_digits:e,infinity_times_zero:r=\"NaN\"}={}){const c=t.some(t=>i(t)),l=t.some(t=>s(t));if(c&&l)return r;if(c){return t.filter(t=>\"-\"===u(t)).length%2==0?\"Infinity\":\"-Infinity\"}if(l)return\"0\";const f=o(t.filter(t=>n(t)).length.toString());let h=a(t.map(t=>t.replace(/i$/,\"\")),{max_decimal_digits:e});return f&&(h+=\"i\"),h}t.exports=c,t.exports.default=c},function(t,e,r){\"use strict\";const n=r(0);function i(t){return\"-\"===(t=n(t))[0]}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(1),i=r(165),o=r(166);function s(t,{max_decimal_digits:e=100,fraction:r=!1}={}){if(i(t)){const[i,s]=o(t);return r?s+\"/\"+i:n(s,i,{max_decimal_digits:e})}return r?\"1/\"+t:n(\"1\",t,{max_decimal_digits:e})}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error(\"can't call is_even on decimal\");return[\"0\",\"2\",\"4\",\"6\",\"8\"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(76),i=r(84),o=r(1);function s(t,e){const r=i(t);return\"0\"===r?\"0\":n(o(r,e,{max_decimal_digits:1}))}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";const n=r(4),i=r(0);function o(t){const e=(t=n(i(t))).indexOf(\".\");return(-1===e?t.length:e).toString()}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(1),i=r(82),o=r(86),s=r(87);function a(t,e){const r=s(\"2\",o([\"1000\",e,e]));for(;t.endsWith(\"0\")&&e.endsWith(\"0\");)t=t.substring(0,t.length-1),e=e.substring(0,e.length-1);for(;i(t)&&i(e);)t=n(t,\"2\"),e=n(e,\"2\");let a=!0;for(;a;){a=!1;for(let i=0;i\"<\"!==n(r,t)&&\">\"!==n(r,e));let a=\"13\";for(;\">\"!==n(a,e);)/^\\d+5/.test(a)||/^(\\d)\\1+/.test(a)||[\"9\",\"7\",\"3\"].every(t=>!o(i(a,t)))&&r.push(a),a=s(a,\"2\");return r}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(6),i=r(1);function o({max_decimal_digits:t=100,steps:e=100}={}){let r=\"1\",o=\"1\";for(let s=1;s\":return\"-\"+s(t,e)}else if(r&&!a)switch(e=e.substring(1),n(t,e)){case\"=\":return\"0\";case\"<\":return\"-\"+s(e,t);case\">\":return s(t,e)}}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf(\".\"),s=e.indexOf(\".\"),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,\"\"===y&&0===i||(y=i+y),m--}y&&(y=\".\"+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),\".\"===y[0]&&(y=\"0\"+y),y}},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf(\".\"),s=e.indexOf(\".\"),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;\"\"===y&&0===i||(y=i+y),m--}\"\"!==y&&(y=\".\"+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||\"0\",n=e[0-d]||\"0\";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,\"\")}return\".\"===y[0]&&(y=\"0\"+y),y}},function(t,e,r){const n=r(18);function i(t){return\"-\"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";t.exports={countIn1D:function(t){return t.reduce((function(t,e){return void 0===t[e]?t[e]=1:t[e]++,t}),{})},countIn2D:function(t){return t.reduce((function(t,e){return e.forEach((function(e){void 0===t[e]?t[e]=1:t[e]++})),t}),{})},unflatten:function(t,e){for(var r=e.height,n=e.width,i=[],o=0;o>24)/500+a,c=a-(t[e+2]<<24>>24)/200;u=.95047*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),c=1.08883*(c*c*c>.008856?c*c*c:(c-16/116)/7.787),i=3.2406*u+-1.5372*a+-.4986*c,o=-.9689*u+1.8758*a+.0415*c,s=.0557*u+-.204*a+1.057*c,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n[r]=255*Math.max(0,Math.min(1,i)),n[r+1]=255*Math.max(0,Math.min(1,o)),n[r+2]=255*Math.max(0,Math.min(1,s))}return n}function S(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function A(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let e=0;e=t.byteLength);++o){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,o*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,o*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,o*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}S(n,a)}else 3===e&&(n=new Uint8Array(t,o*a*r*s,a*r*s),A(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}class k extends E{decodeBlock(t){return t}}function T(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}function O(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let t=0;t<=257;t++)e[t]=4096,r[t]=t;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const u=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return console.warn(\"ran off the end of the buffer before finding EOI_CODE (end on input code)\"),257;let c=t[i]&2**(8-n)-1;c<<=r-o;let l=c;if(i+1>>a;e<<=Math.max(0,r-u),l+=e}if(s>8&&i+2>>n}return l}(t,o,i);return o+=i,e}function u(t,i){return r[n]=i,e[n]=t,n++,n-1}function c(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const l=[];s();const f=new Uint8Array(t);let h,d=a(f);for(;257!==d;){if(256===d){for(s(),d=a(f);256===d;)d=a(f);if(257===d)break;if(d>256)throw new Error(\"corrupted code at scanline \"+d);T(l,c(d)),h=d}else if(d=2**i&&(12===i?h=void 0:i++),d=a(f)}return new Uint8Array(l)}class C extends E{decodeBlock(t){return O(t).buffer}}const P=new Int32Array([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]);function I(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+10)return p--,d>>p&1;if(d=t[h++],255===d){const e=t[h++];if(e)throw new Error(\"unexpected marker: \"+(d<<8|e).toString(16))}return p=7,d>>>7}function g(t){let e,r=t;for(;null!==(e=y());){if(r=r[e],\"number\"==typeof r)return r;if(\"object\"!=typeof r)throw new Error(\"invalid huffman sequence\")}return null}function m(t){let e=t,r=0;for(;e>0;){const t=y();if(null===t)return;r=r<<1|t,--e}return r}function b(t){const e=m(t);return e>=1<0)return void v--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){v=m(o)+(1<>4,0===r)i<15?(v=m(i)+(1<>4;if(0===n){if(o<15)break;i+=16}else{i+=o;e[P[i]]=b(n),i++}}};let R,j,M=0;j=1===A?n[0].blocksPerLine*n[0].blocksPerColumn:c*r.mcusPerColumn;const L=i||j;for(;M=65488&&R<=65495))break;h+=2}return h-f}function j(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function u(t,r,n){const i=e.quantizationTable;let o,s,a,u,c,l,f,h,d;const p=n;let y;for(y=0;y<64;y++)p[y]=t[y]*i[y];for(y=0;y<8;++y){const t=8*y;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],u=p[6+t],c=2896*(p[1+t]-p[7+t])+128>>8,h=2896*(p[1+t]+p[7+t])+128>>8,l=p[3+t]<<4,f=p[5+t]<<4,d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+128>>8,a=1567*a-3784*u+128>>8,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[7+t]=o-h,p[1+t]=s+f,p[6+t]=s-f,p[2+t]=a+l,p[5+t]=a-l,p[3+t]=u+c,p[4+t]=u-c):(d=5793*p[0+t]+512>>10,p[0+t]=d,p[1+t]=d,p[2+t]=d,p[3+t]=d,p[4+t]=d,p[5+t]=d,p[6+t]=d,p[7+t]=d)}for(y=0;y<8;++y){const t=y;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],u=p[48+t],c=2896*(p[8+t]-p[56+t])+2048>>12,h=2896*(p[8+t]+p[56+t])+2048>>12,l=p[24+t],f=p[40+t],d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+2048>>12,a=1567*a-3784*u+2048>>12,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[56+t]=o-h,p[8+t]=s+f,p[48+t]=s-f,p[16+t]=a+l,p[40+t]=a-l,p[24+t]=u+c,p[32+t]=u-c):(d=5793*n[y+0]+8192>>14,p[0+t]=d,p[8+t]=d,p[16+t]=d,p[24+t]=d,p[32+t]=d,p[40+t]=d,p[48+t]=d,p[56+t]=d)}for(y=0;y<64;++y){const t=128+(p[y]+8>>4);r[y]=t<0?0:t>255?255:t}}for(let t=0;t>4==0)for(let r=0;r<64;r++){i[P[r]]=t[e++]}else{if(n>>4!=1)throw new Error(\"DQT: invalid table spec\");for(let t=0;t<64;t++){i[P[t]]=r()}}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r>4==0?this.huffmanTablesDC[15&n]=I(i,s):this.huffmanTablesAC[15&n]=I(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],u=t[e++],c=R(t,e,o,i,this.resetInterval,s,a,u>>4,15&u);e+=c;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error(\"unknown JPEG marker \"+o.toString(16))}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error(\"no frames were decoded\");this.frames.length>1&&console.warn(\"more than one frame is not supported\");for(let t=0;t{const a=B(t,n,i);for(let u=0;u{const a=B(t,n,i);for(let u=0;u=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);const e=this.fileDirectory.BitsPerSample[t];if(e%8!=0)throw new Error(`Sample bit-width of ${e} is not supported.`);return e/8}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,r=this.fileDirectory.BitsPerSample[t];switch(e){case 1:switch(r){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(r){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(r){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error(\"Unsupported data format/bitsPerSample\")}getArrayForSample(t,e){return W(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,this.fileDirectory.BitsPerSample[t],e)}async getTileOrStrip(t,e,r,n){const i=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let s;const{tiles:a}=this;let u,c;1===this.planarConfiguration?s=e*i+t:2===this.planarConfiguration&&(s=r*i*o+e*i+t),this.isTiled?(u=this.fileDirectory.TileOffsets[s],c=this.fileDirectory.TileByteCounts[s]):(u=this.fileDirectory.StripOffsets[s],c=this.fileDirectory.StripByteCounts[s]);const l=await this.source.fetch(u,c);let f;return null===a?f=n.decode(this.fileDirectory,l):a[s]||(f=n.decode(this.fileDirectory,l),a[s]=f),{x:t,y:e,sample:r,data:await f}}async _readRaster(t,e,r,n,i,o,s,a){const u=this.getTileWidth(),c=this.getTileHeight(),l=Math.max(Math.floor(t[0]/u),0),f=Math.min(Math.ceil(t[2]/u),Math.ceil(this.getWidth()/this.getTileWidth())),h=Math.max(Math.floor(t[1]/c),0),d=Math.min(Math.ceil(t[3]/c),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0];let y=this.getBytesPerPixel();const g=[],m=[];for(let t=0;t{const o=i.data,s=new DataView(o),a=i.y*c,f=i.x*u,h=(i.y+1)*c,d=(i.x+1)*u,b=m[l],w=Math.min(c,c-(h-t[3])),x=Math.min(u,u-(d-t[2]));for(let i=Math.max(0,t[1]-a);iu[2]||u[1]>u[3])throw new Error(\"Invalid subsets\");const c=(u[2]-u[0])*(u[3]-u[1]);if(e&&e.length){for(let t=0;t=this.fileDirectory.SamplesPerPixel)return Promise.reject(new RangeError(`Invalid sample index '${e[t]}'.`))}else for(let t=0;ts[2]||s[1]>s[3])throw new Error(\"Invalid subsets\");const a=this.fileDirectory.PhotometricInterpretation;if(a===d.RGB){let i=[0,1,2];if(this.fileDirectory.ExtraSamples!==p.Unspecified&&o){i=[];for(let t=0;t\"Item\"===t.tagName);t&&(o=o.filter(e=>Number(e.attributes.sample)===t));for(let t=0;t0;let i=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(t+(e?o:7-o));n&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),r+=s*256**o}return n&&(r=-r),r}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class K{constructor(t,e,r,n){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),r=this.readUint32(t+4);let n;if(this._littleEndian){if(n=e+2**32*r,!Number.isSafeInteger(n))throw new Error(n+\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\");return n}if(n=2**32*e+r,!Number.isSafeInteger(n))throw new Error(n+\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\");return n}readInt64(t){let e=0;const r=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let i=0;i<8;i++){let o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));r&&(n?0!==o&&(o=255&~(o-1),n=!1):o=255&~o),e+=o*256**i}return r&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}var Y=r(68),Z=r(7),X=r(25),Q=r(40),J=r.n(Q),tt=r(106),et=r.n(tt),rt=r(39),nt=r.n(rt);class it{constructor(t,{blockSize:e=65536}={}){this.retrievalFunction=t,this.blockSize=e,this.blockRequests=new Map,this.blocks=new Map,this.blockIdsAwaitingRequest=null}async fetch(t,e,r=!1){const n=t+e,i=[],o=[],s=[];for(let e=Math.floor(t/this.blockSize)*this.blockSize;esetTimeout(e,t))}(),this.blockIdsAwaitingRequest){const t=function(t){if(0===t.length)return[];const e=[];let r=[];e.push(r);for(let n=0;n