@gmod/cram 1.7.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -2
- package/README.md +343 -24
- package/dist/cram-bundle.js +1 -1
- package/dist/cram-bundle.js.LICENSE.txt +6 -0
- package/dist/cramFile/container/index.js.map +1 -1
- package/dist/cramFile/file.d.ts +2 -2
- package/dist/cramFile/file.js +56 -50
- package/dist/cramFile/file.js.map +1 -1
- package/dist/rans/constants.d.ts +4 -3
- package/dist/rans/constants.js.map +1 -1
- package/dist/rans/d04.js +1 -0
- package/dist/rans/d04.js.map +1 -1
- package/dist/rans/d14.js +1 -0
- package/dist/rans/d14.js.map +1 -1
- package/dist/rans/decoding.d.ts +16 -19
- package/dist/rans/decoding.js +1 -0
- package/dist/rans/decoding.js.map +1 -1
- package/dist/rans/frequencies.d.ts +2 -2
- package/dist/rans/frequencies.js +1 -0
- package/dist/rans/frequencies.js.map +1 -1
- package/dist/rans/index.js +1 -0
- package/dist/rans/index.js.map +1 -1
- package/esm/cramFile/container/index.js.map +1 -1
- package/esm/cramFile/file.d.ts +2 -2
- package/esm/cramFile/file.js +17 -13
- package/esm/cramFile/file.js.map +1 -1
- package/esm/rans/constants.d.ts +4 -3
- package/esm/rans/constants.js.map +1 -1
- package/esm/rans/d04.js +1 -0
- package/esm/rans/d04.js.map +1 -1
- package/esm/rans/d14.js +1 -0
- package/esm/rans/d14.js.map +1 -1
- package/esm/rans/decoding.d.ts +16 -19
- package/esm/rans/decoding.js +1 -0
- package/esm/rans/decoding.js.map +1 -1
- package/esm/rans/frequencies.d.ts +2 -2
- package/esm/rans/frequencies.js +1 -0
- package/esm/rans/frequencies.js.map +1 -1
- package/esm/rans/index.js +1 -0
- package/esm/rans/index.js.map +1 -1
- package/package.json +11 -10
- package/src/cramFile/container/index.ts +4 -1
- package/src/cramFile/file.ts +23 -19
- package/src/rans/{d04.js → d04.ts} +1 -0
- package/src/rans/{d14.js → d14.ts} +1 -0
- package/src/rans/{decoding.js → decoding.ts} +1 -0
- package/src/rans/{frequencies.js → frequencies.ts} +1 -0
- package/src/rans/{index.js → index.ts} +1 -0
- /package/src/rans/{constants.js → constants.ts} +0 -0
package/dist/cram-bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see cram-bundle.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={368:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(r(4105)),a=o(r(1269)),s=r(597),f=r(3427),l=r(8577);function u(e,t){if(t.some((e=>void 0===e)))throw new l.CramMalformedError("invalid .crai index file");const[r,n,o,i,a,s]=t;e[r]||(e[r]=[]),e[r].push({start:n,span:o,containerStart:i,sliceStart:a,sliceBytes:s})}t.default=class{constructor(e){this.filehandle=(0,f.open)(e.url,e.path,e.filehandle),this._parseCache=new i.default({cache:new a.default({maxSize:1}),fill:(e,t)=>this.parseIndex()})}parseIndex(){const e={};return this.filehandle.readFile().then((e=>31===e[0]&&139===e[1]?(0,s.unzip)(e):e)).then((t=>{if(t.length>4&&21578050===t.readUInt32LE(0))throw new l.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let r=[],n="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i>=48&&i<=57||!n&&45===i)n+=String.fromCharCode(i);else if(9===i)r.push(Number.parseInt(n,10)),n="";else if(10===i)r.push(Number.parseInt(n,10)),n="",u(e,r),r=[];else if(13!==i&&32!==i)throw new l.CramMalformedError("invalid .crai index file")}return n&&r.push(Number.parseInt(n,10)),6===r.length&&u(e,r),Object.entries(e).forEach((([t,r])=>{e[t]=r.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(e={}){return this._parseCache.get("index",null,e.signal)}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const o=e=>{const n=e.start,o=e.start+e.span;return n>r?-1:o<=t?1:0},i=[];for(let e=0;e<n.length;e+=1)0===o(n[e])&&i.push(n[e]);return i}))}}},1050:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},4863:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,a.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=s},1738:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9488),i=n(r(1050));class a extends i.default{constructor(e,t,r){if(super(e,t),this.instantiateCodec=r,"byteArray"!==t)throw new TypeError(`byteArrayLength does not support data type ${t}`)}decode(e,t,r,n){const o=this._getLengthCodec().decode(e,t,r,n),i=this._getDataCodec(),a=new Uint8Array(o);for(let s=0;s<o;s+=1)a[s]=i.decode(e,t,r,n);return a}_getLengthCodec(){const e=this.parameters.lengthsEncoding;return this.instantiateCodec(e,"int")}_getDataCodec(){const e=this.parameters.valuesEncoding;return this.instantiateCodec(e,"byte")}}t.default=a,"_getLengthCodec _getDataCodec".split(" ").forEach((e=>(0,o.tinyMemoize)(a,e)))},1405:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"byteArray"!==t)throw new TypeError(`byteArrayStop codec does not support data type ${t}`)}decode(e,t,r,n){const{blockContentId:i}=this.parameters,a=r[i];if(!a)throw new o.CramMalformedError(`no block found with content ID ${i}`);const s=n.externalBlocks.getCursor(i);return this._decodeByteArray(a,s)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,o=t.bytePosition;let i=t.bytePosition;for(;r[i]!==n&&i<r.length;){if(i===r.length)throw new a.CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");i+=1}return t.bytePosition=i+1,r.subarray(o,i)}}t.default=s},5844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(9488),s=r(1074);class f extends i.default{constructor(e,t){if(super(e,t),"int"===this.dataType)this._decodeData=this._decodeInt;else{if("byte"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by EXTERNAL codec`);this._decodeData=this._decodeByte}}decode(e,t,r,n){const{blockContentId:i}=this.parameters,a=r[i];if(!a)throw new o.CramMalformedError(`no block found with content ID ${i}`);const s=n.externalBlocks.getCursor(i);return this._decodeData(a,s)}_decodeInt(e,t){const[r,n]=(0,a.parseItf8)(e.content,t.bytePosition);return t.bytePosition=t.bytePosition+n,r}_decodeByte(e,t){if(t.bytePosition>=e.content.length)throw new s.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=f},4229:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let o=1;for(;0===(0,a.getBits)(t.content,n.coreBlock,1);)o+=1;return((0,a.getBits)(t.content,n.coreBlock,o-1)|1<<o-1)-this.parameters.offset}}t.default=s},1074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBits=t.CramBufferOverrunError=void 0;class r extends Error{}t.CramBufferOverrunError=r,t.getBits=function(e,t,n){let o=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)o<<=1,o|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return o}},2082:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedByValue=[],this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;t<this.parameters.numCodes;t+=1)e[t]={symbol:this.parameters.symbols[t],bitLength:this.parameters.bitLengths[t]};e=e.sort(((e,t)=>e.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const i=parseInt(r,10);n.forEach((r=>{const n={bitLength:i,value:r,bitCode:0};t+=1;const a=i-e;if(t<<=a,n.bitCode=t,e+=a,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>i)throw new o.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedByValue=Object.values(this.codes).sort(((e,t)=>e.value-t.value)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e<this.sortedBitCodes.length;e+=1)this.bitCodeToValue[this.sortedCodes[e].bitCode]=e}decode(e,t,r,n){return this._decode(e,t,n.coreBlock)}_decodeZeroLengthCode(){return this.sortedCodes[0].value}_decode(e,t,r){const n=t.content;let i=0,s=0;for(let e=0;e<this.sortedCodes.length;e+=1){const t=this.sortedCodes[e].bitLength;s<<=t-i,s|=(0,a.getBits)(n,r,t-i),i=t;{const r=this.bitCodeToValue[s];if(r>-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r<this.sortedCodes.length;r+=1)e+=1}}throw new o.CramMalformedError("Huffman symbol not found.")}}t.default=s},8772:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.instantiateCodec=void 0;const o=r(8577),i=n(r(2082)),a=n(r(5844)),s=n(r(1405)),f=n(r(1738)),l=n(r(4863)),u=n(r(4229)),c=n(r(8821)),h={1:a.default,3:i.default,4:f.default,5:s.default,6:l.default,7:c.default,9:u.default};t.instantiateCodec=function e(t,r){const n=(i="ignore"===r?0:t.codecId,h[i]);var i;if(!n)throw new o.CramUnimplementedError(`no codec implemented for codec ID ${t.codecId}`);return new n(t.parameters,r,e)}},8821:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by SUBEXP codec`)}decode(e,t,r,n){let o,i,s=0;for(;(0,a.getBits)(t.content,n.coreBlock,1);)s+=1;return 0===s?(o=this.parameters.K,i=(0,a.getBits)(t.content,n.coreBlock,o)):(o=s+this.parameters.K-1,i=1<<o|(0,a.getBits)(t.content,n.coreBlock,o)),i-this.parameters.offset}}t.default=s},2615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},8543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8772),o=r(8577),i={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][e[0]>>0&3]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][e[1]>>0&3]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][e[2]>>0&3]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][e[3]>>0&3]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][e[4]>>0&3]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding,this.preservation=e.preservation,this._size=e._size,this._endPosition=e._endPosition}getCodecForTag(e){if(!this.tagCodecCache[e]){const t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=(0,n.instantiateCodec)(t,"byteArray"))}return this.tagCodecCache[e]}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const a=i[e];if(!a)throw new o.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,a),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{/Cache$/.test(t)||(e[t]=this[t])})),e}}},6284:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=r(9488),s=o(r(6601)),f=o(r(8543));class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return n(this,void 0,void 0,(function*(){if(!(yield this.getHeader()).numRecords)return null;const e=yield this.file.getSectionParsers(),t=yield this.getFirstBlock();if(void 0===t)return;if("COMPRESSION_HEADER"!==t.contentType)throw new i.CramMalformedError(`invalid content type ${t.contentType} in what is supposed to be the compression header block`);const r=(0,a.parseItem)(t.content,e.cramCompressionHeader.parser,0,t.contentPosition);return Object.assign(Object.assign({},t),{parsedContent:r})}))}getFirstBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return n(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new s.default(this,e,t)}_readContainerHeader(e){return n(this,void 0,void 0,(function*(){const t=yield this.file.getSectionParsers(),{cramContainerHeader1:r,cramContainerHeader2:n}=t,{size:o}=yield this.file.stat();if(e>=o)return;const i=Buffer.allocUnsafe(r.maxLength);yield this.file.read(i,0,r.maxLength,e);const s=(0,a.parseItem)(i,r.parser),f=(0,a.itf8Size)(s.numLandmarks);if(e+s.length>=o)return void console.warn(`${this.file}: container header at ${e} indicates that the container has length ${s.length}, which extends beyond the length of the file. Skipping this container.`);const l=Buffer.allocUnsafe(n.maxLength(s.numLandmarks));yield this.file.read(l,0,n.maxLength(s.numLandmarks),e+s._size-f);const u=(0,a.parseItem)(l,n.parser);return this.file.validateChecksums&&void 0!==u.crc32&&(yield this.file.checkCrc32(e,s._size+u._size-f-4,u.crc32,`container header beginning at position ${e}`)),Object.assign(s,u,{_size:s._size+u._size-f,_endPosition:s._size+u._size-f+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>(0,a.tinyMemoize)(l,e)))},5457:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(597),a=o(r(2779)),s=o(r(1269)),f=o(r(4693)),l=r(8577),u=o(r(9675)),c=r(6141),h=o(r(3498)),d=o(r(6284)),p=r(3427),g=r(9488),y=r(7578);class m{constructor(e){var t;if(this.file=(0,p.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new s.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return n(this,void 0,void 0,(function*(){const e=Buffer.allocUnsafe(c.cramFileDefinition.maxLength);yield this.file.read(e,0,c.cramFileDefinition.maxLength,0);const t=c.cramFileDefinition.parser.parse(e).result;if(2!==t.majorVersion&&3!==t.majorVersion)throw new l.CramUnimplementedError(`CRAM version ${t.majorVersion} not supported`);return t}))}getSamHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new l.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,y.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),o=r.toString("utf8",4,4+n);return this.header=o,(0,y.parseHeaderText)(o)}))}getHeaderText(){return n(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getSectionParsers(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.getDefinition();return(0,c.getSectionParsers)(e)}))}getContainerById(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSectionParsers();let r=t.cramFileDefinition.maxLength;const{size:n}=yield this.file.stat(),{cramContainerHeader1:o}=t;let i;for(let t=0;t<=e;t+=1){if(r+o.maxLength+8>=n)return;i=this.getContainerAtPosition(r);const a=yield i.getHeader();if(!a)throw new l.CramMalformedError(`container ${e} not found in file`);if(0===t){r=a._endPosition;for(let e=0;e<a.numBlocks;e+=1){const e=yield this.readBlock(r);if(void 0===e)return;r=e._endPosition}}else r+=a._size+a.length}return i}))}checkCrc32(e,t,r,o){return n(this,void 0,void 0,(function*(){const n=Buffer.allocUnsafe(t);yield this.file.read(n,0,t,e);const i=a.default.unsigned(n);if(i!==r)throw new l.CramMalformedError(`crc mismatch in ${o}: recorded CRC32 = ${r}, but calculated CRC32 = ${i}`)}))}containerCount(){return n(this,void 0,void 0,(function*(){const e=yield this.getSectionParsers(),{size:t}=yield this.file.stat(),{cramContainerHeader1:r}=e;let n=0,o=e.cramFileDefinition.maxLength;for(;o+r.maxLength+8<t;){const e=yield this.getContainerAtPosition(o).getHeader();if(!e)break;if(0===n){o=e._endPosition;for(let t=0;t<e.numBlocks;t+=1){const e=yield this.readBlock(o);if(void 0===e)return;o=e._endPosition}}else o+=e._size+e.length;n+=1}return n}))}getContainerAtPosition(e){return new d.default(this,e)}readBlockHeader(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSectionParsers(),{cramBlockHeader:r}=t,{size:n}=yield this.file.stat();if(e+r.maxLength>=n)return;const o=Buffer.allocUnsafe(r.maxLength);return yield this.file.read(o,0,r.maxLength,e),(0,g.parseItem)(o,r.parser,0,e)}))}_parseSection(e,t,r=e.maxLength,o=void 0){return n(this,void 0,void 0,(function*(){let n;if(o)n=o;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;n=Buffer.allocUnsafe(r),yield this.file.read(n,0,r,t)}const i=(0,g.parseItem)(n,e.parser,0,t);if(i._size!==r)throw new l.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${i._size}`);return i}))}_uncompress(e,t,r){if("gzip"===e)(0,i.unzip)(t).copy(r);else if("bzip2"===e){const e=f.default.array(t);let n,o=f.default.header(e),i=0;do{n=f.default.decompress(e,o),-1!=n&&(Buffer.from(n).copy(r,i),i+=n.length,o-=n.length)}while(-1!=n)}else if("rans"===e)(0,u.default)(t,r);else if("rans4x16"===e)h.default.r4x16_uncompress(t,r);else if("arith"===e)h.default.arith_uncompress(t,r);else if("fqzcomp"===e)h.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new l.CramUnimplementedError(`${e} decompression not yet implemented`);h.default.tok3_uncompress(t,r)}}readBlock(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=yield this.getSectionParsers(),n=yield this.readBlockHeader(e);if(void 0===n)return;const o=n._endPosition,i=Buffer.allocUnsafe(n.uncompressedSize),a=Object.assign(Object.assign({},n),{_endPosition:o,contentPosition:o,content:i});if("raw"!==n.compressionMethod){const e=Buffer.allocUnsafe(n.compressedSize);yield this.read(e,0,n.compressedSize,o),this._uncompress(n.compressionMethod,e,i)}else yield this.read(i,0,n.uncompressedSize,o);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,o+n.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=o+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>(0,g.tinyMemoize)(m,e)))},8222:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CramRecord=void 0;const o=n(r(5457));var i=r(8631);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}}),t.default=o.default},8631:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const o=n(r(2615)),i={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function a(e){const t={};for(const[r,n]of e)t["is"+n]=e=>!!(e&r),t["set"+n]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=a(t.BamFlags),t.CramFlagsDecoder=a(t.CramFlags),t.MateFlagsDecoder=a(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:o,qualityScores:i,mateRecordNumber:a,readBases:s,readFeatures:f,mateToUse:l,readGroupId:u,readName:c,sequenceId:h,uniqueId:d,templateSize:p,alignmentStart:g,tags:y}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=o,this.qualityScores=i,s&&(this.readBases=s),this.readGroupId=u,this.readName=c,this.sequenceId=h,this.uniqueId=d,this.templateSize=p,this.alignmentStart=g,this.tags=y,f&&(this.readFeatures=f),l&&(this.mate={flags:l.mateFlags,readName:l.mateReadName,sequenceId:l.mateSequenceId,alignmentStart:l.mateAlignmentStart}),a&&(this.mateRecordNumber=a)}isPaired(){return!!(this.flags&o.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&o.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&o.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&o.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&o.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&o.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&o.default.BAM_FREAD1)}isRead2(){return!!(this.flags&o.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&o.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&o.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&o.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&o.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&o.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&o.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&o.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&o.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.substr(r,e.lengthOnRef).toUpperCase();let n="",o=r,i=0;for(;n.length<e.readLength;)if(i<e.readFeatures.length){const r=e.readFeatures[i];if("Q"===r.code||"q"===r.code)i+=1;else if(r.pos===n.length+1)if(i+=1,"b"===r.code){const e=r.data;n+=e,o+=e.length}else"B"===r.code?(n+=r.data[0],o+=1):"X"===r.code?(n+=r.sub,o+=1):"I"===r.code?n+=r.data:"D"===r.code?o+=r.data:"i"===r.code?n+=r.data:"N"===r.code?o+=r.data:"S"===r.code?n+=r.data:"P"===r.code||r.code;else if(i<e.readFeatures.length){const r=t.seq.substr(o,e.readFeatures[i].pos-n.length-1);n+=r,o+=r.length}}else{const r=t.seq.substr(o,e.readLength-n.length);n+=r,o+=r.length}return n.toUpperCase()}(this,this._refRegion);e&&(this.readBases=e)}return this.readBases}getPairOrientation(){if(!this.isSegmentUnmapped()&&this.isPaired()&&!this.isMateUnmapped()&&this.mate&&this.sequenceId===this.mate.sequenceId){const e=this.isReverseComplemented()?"R":"F",t=this.isMateReverseComplemented()?"R":"F";let r=" ",n=" ";this.isRead1()?(r="1",n="2"):this.isRead2()&&(r="2",n="1");const o=[];let i=this.templateLength||this.templateSize;if(void 0===i)throw new Error("One of templateSize and templateLength must be set");return this.alignmentStart>this.mate.alignmentStart&&i>0&&(i=-i),i>0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){if(!t)return;const o=n.refPos-t.start,a=t.seq.charAt(o);a&&(n.ref=a);let s=i[a];void 0===s&&(s=4);const f=r.substitutionMatrix[s][n.data];f&&(n.sub=f)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{"_"!==t.charAt(0)&&(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},6141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSectionParsers=t.cramFileDefinition=t.isMappedSliceHeader=void 0;const n=r(9996),o=(new n.Parser).itf8(),i={parser:(new n.Parser).string("magic",{length:4}).uint8("majorVersion").uint8("minorVersion").string("fileId",{length:20,stripNull:!0}),maxLength:26};t.cramFileDefinition=i;const a={parser:(new n.Parser).uint8("compressionMethod",{formatter:e=>{const t=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][e];if(!t)throw new Error(`compression method number ${e} not implemented`);return t}}).uint8("contentType",{formatter:e=>{const t=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][e];if(!t)throw new Error(`invalid block content type id ${e}`);return t}}).itf8("contentId").itf8("compressedSize").itf8("uncompressedSize"),maxLength:17},s={parser:(new n.Parser).uint32("crc32"),maxLength:4},f=(new n.Parser).itf8("size").buffer("ents",{length:"size",formatter:e=>{function t(t,r){const n=e.toString("utf8",t,r),o=[];for(let e=0;e<n.length;e+=3)o.push(n.substr(e,3));return o}var r,n=[],o=0;for(r=0;r<e.length;r+=1)e[r]||(n.push(t(o,r)),o=r+1);return r>o&&n.push(t(o,r)),n}}),l=(new n.Parser).uint8(null,{formatter:e=>!!e}),u=(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).string("key",{length:2,stripNull:!1}).choice("value",{tag:"key",choices:{MI:l,UI:l,PI:l,RN:l,AP:l,RR:l,SM:(new n.Parser).array(null,{type:"uint8",length:5}),TD:(new n.Parser).nest(null,{type:f,formatter:e=>e.ents})}})});function c(e){const t={};for(let r=0;r<e.ents.length;r+=1){const{key:n,value:o}=e.ents[r];t[n]&&console.warn(`duplicate key ${n} in map`),t[n]=o}return t}const h={cramFileDefinition:i,cramBlockHeader:a,cramBlockCrc32:s};t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId};const d={cramUnmappedSliceHeader(e){let t=0,r=(new n.Parser).itf8("numRecords");return t+=5,e>=3?(r=r.ltf8("recordCounter"),t+=9):2===e&&(r=r.itf8("recordCounter"),t+=5),r=r.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:o,length:"numContentIds"}),t+=10,e>=2&&(r=r.array("md5",{type:"uint8",length:16}),t+=16),{parser:r,maxLength:e=>t+5*e}},cramMappedSliceHeader(e){let t=(new n.Parser).itf8("refSeqId").itf8("refSeqStart").itf8("refSeqSpan").itf8("numRecords"),r=20;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),t=t.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:o,length:"numContentIds"}).itf8("refBaseBlockId"),r+=15,e>=2&&(t=t.array("md5",{type:"uint8",length:16}),r+=16),{parser:t,maxLength:e=>r+5*e}},cramEncoding:e=>({parser:(new n.Parser).namely("cramEncoding").itf8("codecId").itf8("parametersBytes").choice("parameters",{tag:"codecId",choices:{0:new n.Parser,1:(new n.Parser).itf8("blockContentId"),2:(new n.Parser).itf8("offset").itf8("M"),3:n.Parser.start().itf8("numCodes").array("symbols",{length:"numCodes",type:o}).itf8("numLengths").array("bitLengths",{length:"numLengths",type:o}),4:n.Parser.start().nest("lengthsEncoding",{type:"cramEncoding"}).nest("valuesEncoding",{type:"cramEncoding"}),5:(new n.Parser).uint8("stopByte").itf8("blockContentId"),6:(new n.Parser).itf8("offset").itf8("length"),7:(new n.Parser).itf8("offset").itf8("K"),8:(new n.Parser).itf8("offset").itf8("log2m"),9:(new n.Parser).itf8("offset")}})}),cramDataSeriesEncodingMap(e){return(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).string("key",{length:2,stripNull:!1}).nest("value",{type:this.cramEncoding(e).parser})})},cramTagEncodingMap(e){return(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).itf8("key",{formatter:e=>String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}).nest("value",{type:this.cramEncoding(e).parser})})},cramCompressionHeader(e){let t=new n.Parser;return t=t.nest("preservation",{type:u,formatter:c}).nest("dataSeriesEncoding",{type:this.cramDataSeriesEncodingMap(e),formatter:c}).nest("tagEncoding",{type:this.cramTagEncodingMap(e),formatter:c}),{parser:t}},cramContainerHeader1(e){let t=(new n.Parser).int32("length").itf8("refSeqId").itf8("refSeqStart").itf8("alignmentSpan").itf8("numRecords"),r=24;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),e>1&&(t=t.ltf8("numBases"),r+=9),t=t.itf8("numBlocks").itf8("numLandmarks"),r+=10,{parser:t,maxLength:r}},cramContainerHeader2(e){let t=(new n.Parser).itf8("numLandmarks").array("landmarks",{type:(new n.Parser).itf8(),length:"numLandmarks"}),r=0;return e>=3&&(t=t.uint32("crc32"),r=4),{parser:t,maxLength:e=>5+5*e+r}}};t.getSectionParsers=function(e){const t=Object.assign({},h);return Object.keys(d).forEach((r=>{t[r]=d[r](e)})),t}},3757:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3720)),i=r(8577),a=r(8631),s=r(6141);function f(e){let t="";for(let r=0;r<e.length&&0!==e[r];r++)t+=String.fromCharCode(e[r]);return t}function l(e,t){if("Z"===e)return f(t);if("A"===e)return String.fromCharCode(t[0]);if("I"===e)return o.default.fromBytesLE(t).toNumber();if("i"===e)return new Int32Array(t.buffer)[0];if("s"===e)return new Int16Array(t.buffer)[0];if("S"===e)return new Uint16Array(t.buffer)[0];if("c"===e)return new Int8Array(t.buffer)[0];if("C"===e)return t[0];if("f"===e)return new Float32Array(t.buffer)[0];if("H"===e)return Number.parseInt(f(t).replace(/^0x/,""),16);if("B"===e)return function(e){const t=String.fromCharCode(e[0]),r=Int32Array.from(e.slice(1))[0],n=new Array(r);if(e=e.slice(5),"c"===t){const t=new Int8Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("C"===t){const t=new Uint8Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("s"===t){const t=new Int16Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("S"===t){const t=new Uint16Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("i"===t){const t=new Int32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("I"===t){const t=new Uint32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else{if("f"!==t)throw new Error("unknown type: "+t);{const t=new Float32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}}return n}(t);throw new i.CramMalformedError(`Unrecognized tag type ${e}`)}t.default=function(e,t,r,n,o,u,c,h,d){let p=t("BF");const g=t("CF");if(!(0,s.isMappedSliceHeader)(n.parsedContent))throw new Error;let y;y=h>1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId;const m=t("RL");let b=t("AP");r.APdelta&&(b+=c.lastAlignmentStart),c.lastAlignmentStart=b;const v=t("RG");let w,_,S,A;if(r.readNamesIncluded&&(w=f(t("RN"))),a.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=f(t("RN")),w=n);const o=t("NS"),i=t("NP");(e||o>-1)&&(_={mateFlags:e,mateSequenceId:o,mateAlignmentStart:i,mateReadName:n}),S=t("TS"),a.MateFlagsDecoder.isUnmapped(e)&&(p=a.BamFlagsDecoder.setMateUnmapped(p)),a.MateFlagsDecoder.isOnNegativeStrand(e)&&(p=a.BamFlagsDecoder.setMateReverseComplemented(p))}else a.CramFlagsDecoder.isWithMateDownstream(g)&&(A=t("NF")+d+1);const E=t("TL");if(E<0)throw new i.CramMalformedError("invalid TL index");const B={},C=r.getTagNames(E),R=C.length;for(let t=0;t<R;t+=1){const n=C[t],a=n.substr(0,2),s=n.substr(2,1),f=r.getCodecForTag(n);if(!f)throw new i.CramMalformedError(`no codec defined for auxiliary tag ${n}`);const h=f.decode(e,o,u,c);B[a]=l(s,h)}let k,x,I,M,O;if(a.BamFlagsDecoder.isSegmentUnmapped(p))if(a.CramFlagsDecoder.isDecodeSequenceAsStar(g))O=null,M=null;else{const e=new Array(m);for(let r=0;r<e.length;r+=1)e[r]=t("BA");if(O=String.fromCharCode(...e),a.CramFlagsDecoder.isPreservingQualityScores(g)){M=new Array(m);for(let r=0;r<e.length;r+=1)M[r]=t("QS")}}else{const e=t("FN");if(e&&(k=function(e,t,r,n,o){let a=0,s=e-1;const f=new Array(t);function l([e,t]){const n=r(t);if("character"===e)return String.fromCharCode(n);if("string"===e){let e="";for(let t=0;t<n.byteLength;t++)e+=String.fromCharCode(n[t]);return e}return"numArray"===e?n.toArray():n}for(let e=0;e<t;e+=1){const t=String.fromCharCode(r("FC")),n=r("FP"),u={B:["character","BA"],S:["string",o>1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!u)throw new i.CramMalformedError(`invalid read feature code "${t}"`);let c=l(u);const h={B:["number","QS"]}[t];h&&(c=[c,l(h)]),a+=n;const d=a;s+=n;const p=s;"D"===t||"N"===t?s+=c:"I"===t||"S"===t?s-=c.length:"i"===t&&(s-=1),f[e]={code:t,pos:d,refPos:p,data:c}}return f}(b,e,t,0,h)),x=m,k)for(const{code:e,data:t}of k)"D"===e||"N"===e?x+=t:"I"===e||"S"===e?x-=t.length:"i"===e&&(x-=1);if(Number.isNaN(x)&&(console.warn(`${w||`${y}:${b}`} record has invalid read features`),x=m),I=t("MQ"),a.CramFlagsDecoder.isPreservingQualityScores(g)){M=new Array(m);for(let e=0;e<M.length;e++)M[e]=t("QS")}}return{readLength:m,sequenceId:y,cramFlags:g,flags:p,alignmentStart:b,readGroupId:v,readName:w,mateToUse:_,templateSize:S,mateRecordNumber:A,readFeatures:k,lengthOnRef:x,mappingQuality:I,qualityScores:M,readBases:O,tags:B}}},6601:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=r(9488),s=o(r(2615)),f=o(r(3757)),l=o(r(8631)),u=r(6141),c=r(1074);function h(e,t,r,n){if(!n)throw new i.CramMalformedError("could not resolve intra-slice mate pairs, file seems truncated or malformed");const o=!!(n.mate||void 0!==n.mateRecordNumber&&n.mateRecordNumber!==t);r.readName||(r.readName=String(r.uniqueId),n.readName=r.readName),r.mate={sequenceId:n.sequenceId,alignmentStart:n.alignmentStart,uniqueId:n.uniqueId},n.readName&&(r.mate.readName=n.readName),n.mate||void 0!==n.mateRecordNumber||(n.mate={sequenceId:r.sequenceId,alignmentStart:r.alignmentStart,uniqueId:r.uniqueId},r.readName&&(n.mate.readName=r.readName)),r.flags|=s.default.BAM_FPAIRED,n.flags&s.default.BAM_FUNMAP&&(r.flags|=s.default.BAM_FMUNMAP),r.flags&s.default.BAM_FUNMAP&&(n.flags|=s.default.BAM_FMUNMAP),n.flags&s.default.BAM_FREVERSE&&(r.flags|=s.default.BAM_FMREVERSE),r.flags&s.default.BAM_FREVERSE&&(n.flags|=s.default.BAM_FMREVERSE),void 0===r.templateLength&&(o?function(e,t,r){const n=function t(r){const n=[r];if(void 0!==r.mateRecordNumber&&r.mateRecordNumber>=0){const o=e[r.mateRecordNumber];if(!o)throw new i.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(o))}return n}(r),o=n.map((e=>e.alignmentStart)),a=n.map((e=>e.alignmentStart+e.readLength-1)),s=Math.max(...a)-Math.min(...o)+1;s>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new i.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=s}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}class d{constructor(e,t,r){this.container=e,this.containerPosition=t,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.file.getSectionParsers(),t=yield this.container.getHeader(),r=yield this.file.readBlock(t._endPosition+this.containerPosition);if(void 0===r)throw new Error;if("MAPPED_SLICE_HEADER"===r.contentType){const n=(0,a.parseItem)(r.content,e.cramMappedSliceHeader.parser,0,t._endPosition);return Object.assign(Object.assign({},r),{parsedContent:n})}if("UNMAPPED_SLICE_HEADER"===r.contentType){const n=(0,a.parseItem)(r.content,e.cramUnmappedSliceHeader.parser,0,t._endPosition);return Object.assign(Object.assign({},r),{parsedContent:n})}throw new i.CramMalformedError(`error reading slice header block, invalid content type ${r.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e<r.length;e+=1){const n=yield this.file.readBlock(t);if(void 0===n)throw new Error;r[e]=n,t=r[e]._endPosition}return r}))}getCoreDataBlock(){return n(this,void 0,void 0,(function*(){return(yield this.getBlocks())[0]}))}_getBlocksContentIdIndex(){return n(this,void 0,void 0,(function*(){const e=yield this.getBlocks(),t={};return e.forEach((e=>{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,u.isMappedSliceHeader)(e))throw new Error;if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error;if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new i.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new i.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error;const r=yield this.getHeader();if(void 0===r)throw new Error;const n=yield this._getBlocksContentIdIndex();if(e>1&&this.file.options.checkSequenceMD5&&(0,u.isMappedSliceHeader)(r.parsedContent)&&r.parsedContent.refSeqId>=0&&"0000000000000000"!==r.parsedContent.md5.join("")){const e=yield this.getReferenceRegion();if(e){const{seq:t,start:n,end:o}=e,s=(0,a.sequenceMD5)(t),f=r.parsedContent.md5.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(s!==f)throw new i.CramMalformedError(`MD5 checksum reference mismatch for ref ${r.parsedContent.refSeqId} pos ${n}..${o}. recorded MD5: ${f}, calculated MD5: ${s}`)}}const o=yield this.getCoreDataBlock(),s={lastAlignmentStart:(0,u.isMappedSliceHeader)(r.parsedContent)?r.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},d=e=>{const r=t.getCodecForDataSeries(e);if(!r)throw new i.CramMalformedError(`no codec defined for ${e} data series`);return r.decode(this,o,n,s)};let p=new Array(r.parsedContent.numRecords);for(let i=0;i<p.length;i+=1)try{const a=(0,f.default)(this,d,t,r,o,n,s,e,i);p[i]=new l.default(Object.assign(Object.assign({},a),{uniqueId:r.contentPosition+r.parsedContent.recordCounter+i+1}))}catch(e){if(e instanceof c.CramBufferOverrunError){console.warn("read attempted beyond end of buffer, file seems truncated."),p=p.filter((e=>!!e));break}throw e}for(let e=0;e<p.length;e+=1){const{mateRecordNumber:t}=p[e];void 0!==t&&t>=0&&h(p,e,p[e],p[t])}return p}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const o=(yield r).filter(e);if(o.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,u.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error;const i={};for(let e=0;e<o.length;e+=1){const r=void 0!==t?t:o[e].sequenceId;let n=i[r];n||(n={id:r,start:o[e].alignmentStart,end:-1/0,seq:null},i[r]=n);const a=o[e].alignmentStart+(o[e].lengthOnRef||o[e].readLength)-1;a>n.end&&(n.end=a),o[e].alignmentStart<n.start&&(n.start=o[e].alignmentStart)}yield Promise.all(Object.values(i).map((e=>n(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(let e=0;e<o.length;e+=1){const n=i[void 0!==t?t:o[e].sequenceId];if(n&&n.seq){const t=n.seq;o[e].addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return o}))}}t.default=d,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>(0,a.tinyMemoize)(d,e)))},9488:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceMD5=t.tinyMemoize=t.parseItem=t.parseItf8=t.itf8Size=void 0;const o=n(r(2568)),i=r(1074);t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let o;if(n<128?(o=n,r+=1):n<192?(o=16383&(n<<8|e[r+1]),r+=2):n<224?(o=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(o=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(o=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new i.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[o,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:o,result:i}=t.parse(e);return Object.assign(Object.assign({},i),{_endPosition:o+n,_size:o-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,o.default)(e.toUpperCase().replace(/[^\x21-\x7e]/g,""))}},8577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},5590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CramRecord=t.CraiIndex=t.IndexedCramFile=t.CramFile=void 0;const s=i(r(8222));t.CramFile=s.default,Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return s.CramRecord}});const f=a(r(946));t.IndexedCramFile=f.default;const l=a(r(368));t.CraiIndex=l.default},946:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=o(r(8222));t.default=class{constructor(e){if(e.cram?this.cram=e.cram:this.cram=new a.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof a.default))throw new Error("invalid arguments: no cramfile");if(this.index=e.index,!this.index.getEntriesForRange)throw new Error("invalid arguments: not an index");this.fetchSizeLimit=e.fetchSizeLimit||3e6}getRecordsForRange(e,t,r,o={}){return n(this,void 0,void 0,(function*(){if(o.viewAsPairs=o.viewAsPairs||!1,o.pairAcrossChr=o.pairAcrossChr||!1,o.maxInsertSize=o.maxInsertSize||2e5,"string"==typeof e)throw new i.CramUnimplementedError("string sequence names not yet supported");const n=e,a=yield this.index.getEntriesForRange(n,t,r),s=a.map((e=>e.sliceBytes)).reduce(((e,t)=>e+t),0);if(s>this.fetchSizeLimit)throw new i.CramSizeLimitError(`data size of ${s.toLocaleString()} bytes exceeded fetch size limit of ${this.fetchSizeLimit.toLocaleString()} bytes`);const f=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,l=yield Promise.all(a.map((e=>this.getRecordsInSlice(e,f))));let u=Array.prototype.concat(...l);if(o.viewAsPairs){const e={},t={};for(let r=0;r<u.length;r+=1){const n=u[r].readName;if(void 0===n)throw new Error;const o=u[r].uniqueId;e[n]||(e[n]=0),e[n]+=1,t[o]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const i=[];for(let e=0;e<u.length;e+=1){const t=u[e],a=t.readName;if(void 0===a)throw new Error;if(r[a]&&t.mate&&(t.mate.sequenceId===n||o.pairAcrossChr)&&Math.abs(t.alignmentStart-t.mate.alignmentStart)<o.maxInsertSize){const e=this.index.getEntriesForRange(t.mate.sequenceId,t.mate.alignmentStart,t.mate.alignmentStart+1);i.push(e)}}const a=yield Promise.all(i);let s=[];for(let e=0;e<a.length;e+=1)s.push(...a[e]);s=s.sort(((e,t)=>e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const f=[],l=[],c=s.map((e=>e.sliceBytes)).reduce(((e,t)=>e+t),0);if(c>this.fetchSizeLimit)throw new Error(`mate data size of ${c.toLocaleString()} bytes exceeded fetch size limit of ${this.fetchSizeLimit.toLocaleString()} bytes`);s.forEach((e=>{let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),f.push(n);const o=n.then((e=>{const n=[];for(let o=0;o<e.length;o+=1){const i=e[o];if(void 0===i.readName)throw new Error;r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));l.push(o)}));const h=yield Promise.all(l);if(h.length){const e=h.reduce(((e,t)=>e.concat(t)));u=u.concat(e)}}return u}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},3427:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.fromUrl=t.RemoteFile=t.LocalFile=void 0;const o=n(r(8575)),i=r(4319),a=r(2949);function s(e){const{protocol:t,pathname:r}=o.default.parse(e);return"file:"===t?new a.LocalFile(unescape((0,i.ensureNotNullish)(r))):new a.RemoteFile(e)}Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return a.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return a.RemoteFile}}),t.fromUrl=s,t.open=function(e,t,r){if(r)return r;if(e)return s(e);if(t)return new a.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")}},5702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},6484:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=r(5702),a=n(r(7634));t.default=function(e,t,r,n){let s=e.getInt(),f=e.getInt(),l=e.getInt(),u=e.getInt();const c=n.remaining(),h=-4&c;for(let o=0;o<h;o+=4){const c=t.R[a.default.get(s,i.TF_SHIFT)],h=t.R[a.default.get(f,i.TF_SHIFT)],d=t.R[a.default.get(l,i.TF_SHIFT)],p=t.R[a.default.get(u,i.TF_SHIFT)];n.putAt(o,c),n.putAt(o+1,h),n.putAt(o+2,d),n.putAt(o+3,p),s=a.default.advanceSymbolStep(s,r[255&c],i.TF_SHIFT),f=a.default.advanceSymbolStep(f,r[255&h],i.TF_SHIFT),l=a.default.advanceSymbolStep(l,r[255&d],i.TF_SHIFT),u=a.default.advanceSymbolStep(u,r[255&p],i.TF_SHIFT),s=a.default.renormalize(s,e),f=a.default.renormalize(f,e),l=a.default.renormalize(l,e),u=a.default.renormalize(u,e)}let d;switch(n.setPosition(h),3&c){case 0:break;case 1:d=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&d],i.TF_SHIFT),n.put(d);break;case 2:d=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&d],i.TF_SHIFT),n.put(d),d=t.R[a.default.get(f,i.TF_SHIFT)],a.default.advanceSymbol(f,e,r[255&d],i.TF_SHIFT),n.put(d);break;case 3:d=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&d],i.TF_SHIFT),n.put(d),d=t.R[a.default.get(f,i.TF_SHIFT)],a.default.advanceSymbol(f,e,r[255&d],i.TF_SHIFT),n.put(d),d=t.R[a.default.get(l,i.TF_SHIFT)],a.default.advanceSymbol(l,e,r[255&d],i.TF_SHIFT),n.put(d);break;default:throw new o.CramMalformedError("invalid output size encountered during rANS decoding")}n.setPosition(0)}},7121:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(5702),i=n(r(7634));t.default=function(e,t,r,n){const a=t.remaining();let s=e.getInt(),f=e.getInt(),l=e.getInt(),u=e.getInt();const c=a>>2;let h=0,d=c,p=2*c,g=3*c,y=0,m=0,b=0,v=0;for(;h<c;h+=1,d+=1,p+=1,g+=1){const a=255&r[y].R[i.default.get(s,o.TF_SHIFT)],c=255&r[m].R[i.default.get(f,o.TF_SHIFT)],w=255&r[b].R[i.default.get(l,o.TF_SHIFT)],_=255&r[v].R[i.default.get(u,o.TF_SHIFT)];t.putAt(h,a),t.putAt(d,c),t.putAt(p,w),t.putAt(g,_),s=i.default.advanceSymbolStep(s,n[y][a],o.TF_SHIFT),f=i.default.advanceSymbolStep(f,n[m][c],o.TF_SHIFT),l=i.default.advanceSymbolStep(l,n[b][w],o.TF_SHIFT),u=i.default.advanceSymbolStep(u,n[v][_],o.TF_SHIFT),s=i.default.renormalize(s,e),f=i.default.renormalize(f,e),l=i.default.renormalize(l,e),u=i.default.renormalize(u,e),y=a,m=c,b=w,v=_}for(;g<a;g+=1){const a=255&r[v].R[i.default.get(u,o.TF_SHIFT)];t.putAt(g,a),u=i.default.advanceSymbol(u,e,n[v][a],o.TF_SHIFT),v=a}}},7634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8577),o=r(5702);class i{constructor(){this.F=void 0,this.C=void 0}}function a(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}const s={FC:i,AriDecoder:class{constructor(){this.fc=new Array(256);for(let e=0;e<this.fc.length;e+=1)this.fc[e]=new i;this.R=null}},Symbol:class{constructor(){this.start=void 0,this.freq=void 0}},symbolInit:function(e,t,r){if(!(t<=65536))throw new n.CramMalformedError("assertion failed: start <= 1<<16");if(!(r<=65536-t))throw new n.CramMalformedError("assertion failed: freq <= 1<<16");e.start=t,e.freq=r},advanceStep:a,advanceSymbolStep:function(e,t,r){return a(e,t.start,t.freq,r)},get:function(e,t){return e&(1<<t)-1},advanceSymbol:function(e,t,r,n){return function(e,t,r,n,i){if((e=n*(e>>i)+(e&(1<<i)-1)-r)<o.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<o.RANS_BYTE_L);return e}(e,t,r.start,r.freq,n)},renormalize:function(e,t){if(e<o.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<o.RANS_BYTE_L);return e}};t.default=s},696:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.readStatsO1=t.readStatsO0=void 0;const o=r(8577),i=r(5702),a=n(r(7634));function s(e){if(!e)throw new o.CramMalformedError("assertion failed")}t.readStatsO0=function(e,t,r){let n=0,o=0,f=255&e.get();do{null==t.fc[f]&&(t.fc[f]=new a.default.FC),t.fc[f].F=255&e.get(),t.fc[f].F>=128&&(t.fc[f].F&=-129,t.fc[f].F=(127&t.fc[f].F)<<8|255&e.get()),t.fc[f].C=o,a.default.symbolInit(r[f],t.fc[f].C,t.fc[f].F),t.R||(t.R=new Array(i.TOTFREQ)),t.R.fill(f,o,o+t.fc[f].F),o+=t.fc[f].F,0===n&&f+1===(255&e.getByteAt(e.position()))?(f=255&e.get(),n=255&e.get()):0!==n?(n-=1,f+=1):f=255&e.get()}while(0!==f);s(o<i.TOTFREQ)},t.readStatsO1=function(e,t,r){let n=0,o=255&e.get();do{let f=0,l=0,u=255&e.get();null==t[o]&&(t[o]=new a.default.AriDecoder);do{null==t[o].fc[u]&&(t[o].fc[u]=new a.default.FC),t[o].fc[u].F=255&e.get(),t[o].fc[u].F>=128&&(t[o].fc[u].F&=-129,t[o].fc[u].F=(127&t[o].fc[u].F)<<8|255&e.get()),t[o].fc[u].C=l,0===t[o].fc[u].F&&(t[o].fc[u].F=i.TOTFREQ),null==r[o][u]&&(r[o][u]=new a.default.RansDecSymbol),a.default.symbolInit(r[o][u],t[o].fc[u].C,t[o].fc[u].F),null==t[o].R&&(t[o].R=new Array(i.TOTFREQ)),t[o].R.fill(u,l,l+t[o].fc[u].F),l+=t[o].fc[u].F,s(l<=i.TOTFREQ),0===f&&u+1===(255&e.getByteAt(e.position()))?(u=255&e.get(),f=255&e.get()):0!==f?(f-=1,u+=1):u=255&e.get()}while(0!==u);0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o)}},9675:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(7634)),a=r(696),s=n(r(6484)),f=n(r(7121));class l{constructor(e,t=0){this._buffer=e,this._position=t,this.length=e.length}get(){const e=this._buffer[this._position];return this._position+=1,e}getByte(){return this.get()}getByteAt(e){return this._buffer[e]}position(){return this._position}put(e){return this._buffer[this._position]=e,this._position+=1,e}putAt(e,t){return this._buffer[e]=t,t}setPosition(e){return this._position=e,e}getInt(){const e=this._buffer.readInt32LE(this._position);return this._position+=4,e}remaining(){return this._buffer.length-this._position}}t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),u=n.get();if(0!==u&&1!==u)throw new o.CramMalformedError(`Invalid rANS order ${u}`);if(n.getInt()!==n.remaining()-4)throw new o.CramMalformedError("Incorrect input length.");const c=n.getInt(),h=new l(t||Buffer.allocUnsafe(c));if(h.length<c)throw new o.CramMalformedError(`Output buffer too small to fit ${c} bytes.`);switch(u){case 0:return function(e,t){const r=new i.default.AriDecoder,n=new Array(256);for(let e=0;e<n.length;e+=1)n[e]=new i.default.Symbol;return(0,a.readStatsO0)(e,r,n),(0,s.default)(e,r,n,t),t}(n,h);case 1:return function(e,t){const r=new Array(256);for(let e=0;e<r.length;e+=1)r[e]=new i.default.AriDecoder;const n=new Array(256);for(let e=0;e<n.length;e+=1){n[e]=new Array(256);for(let t=0;t<n[e].length;t+=1)n[e][t]=new i.default.Symbol}return(0,a.readStatsO1)(e,r,n),(0,f.default)(e,t,r,n),t}(n,h);default:throw new o.CramMalformedError(`Invalid rANS order: ${u}`)}}},7578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=void 0,t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];return t.forEach((e=>{const[t,...n]=e.split(/\t/),o=n.map((e=>{const[t,r]=e.split(":",2);return{tag:t,value:r}}));t&&r.push({tag:t.substr(1),data:o})})),r}},4319:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNotNullish=void 0,t.ensureNotNullish=function(e){if(null==e)throw new Error("Value must not be nullish.");return e}},597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=void 0;const n=r(9591);t.unzip=function(e){return Buffer.from((0,n.inflate)(e))}},9996:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=r(8764).Buffer,i=r(22),a=r(2961)._,s=r(3720);"undefined"!=typeof window&&(window.Buffer=o),"undefined"!=typeof self&&(self.Buffer=o);var f={UInt8:1,UInt16LE:2,UInt16BE:2,UInt32LE:4,UInt32BE:4,Int8:1,Int16LE:2,Int16BE:2,Int32LE:4,Int32BE:4,FloatLE:4,FloatBE:4,DoubleLE:8,DoubleBE:8,UInt64:8,Int64:8},l={},u="___parser_",c=[];!function(){var e;for(e=1;e<=32;e++)c.push(e)}();var h={};Object.keys(f).concat(Object.keys({String:null,Buffer:null,Array:null,Skip:null,Choice:null,Nest:null,Bit:null,Itf8:null,Ltf8:null})).forEach((function(e){h[e.toLowerCase()]=e}));var d=function(){this.varName="",this.type="",this.options={},this.next=null,this.head=null,this.compiled=null,this.endian="le",this.constructorFn=null,this.alias=null};d.start=function(){return new d},Object.keys(f).forEach((function(e){d.prototype[e.toLowerCase()]=function(t,r){return this.setNextParser(e.toLowerCase(),t,r)};var t=e.replace(/BE|LE/,"").toLowerCase();t in d.prototype||(d.prototype[t]=function(e,r){return this[t+this.endian](e,r)})})),c.forEach((function(e){d.prototype["bit".concat(e.toString())]=function(t,r){return r||(r={}),r.length=e,this.setNextParser("bit",t,r)}})),d.prototype.namely=function(e){return l[e]=this,this.alias=e,this},d.prototype.skip=function(e,t){if(t&&t.assert)throw new Error("assert option on skip is not allowed.");return this.setNextParser("skip","",{length:e})},d.prototype.string=function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("Neither length, zeroTerminated, nor greedy is defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("Length or greedy must be defined if stripNull is defined.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)},d.prototype.buffer=function(e,t){if(!t.length&&!t.readUntil)throw new Error("Length nor readUntil is defined in buffer parser");return this.setNextParser("buffer",e,t)},d.prototype.array=function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("Length option of array is not defined.");if(!t.type)throw new Error("Type option of array is not defined.");if("string"==typeof t.type&&!l[t.type]&&Object.keys(f).indexOf(h[t.type])<0)throw new Error('Specified primitive type "'.concat(t.type,'" is not supported.'));return this.setNextParser("array",e,t)},d.prototype.choice=function(e,t){if(1===arguments.length&&"object"===n(e)&&(t=e,e=null),!t.tag)throw new Error("Tag option of array is not defined.");if(!t.choices)throw new Error("Choices option of array is not defined.");return Object.keys(t.choices).forEach((function(r){if(!t.choices[r])throw new Error("Choice Case ".concat(r," of ").concat(e," is not valid."));if("string"==typeof t.choices[r]&&!l[t.choices[r]]&&Object.keys(f).indexOf(h[t.choices[r]])<0)throw new Error('Specified primitive type "'.concat(t.choices[r],'" is not supported.'))}),this),this.setNextParser("choice",e,t)},d.prototype.nest=function(e,t){if(1===arguments.length&&"object"===n(e)&&(t=e,e=null),!t.type)throw new Error("Type option of nest is not defined.");if(!(t.type instanceof d||l[t.type]))throw new Error("Type option of nest must be a Parser object.");if(!(t.type instanceof d||e))throw new Error("options.type must be a object if variable name is omitted.");return this.setNextParser("nest",e,t)},d.prototype.endianess=function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error("Invalid endianess: ".concat(e))}return this},d.prototype.create=function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this},d.prototype.getCode=function(){var e=new a;return e.pushCode("if (!Buffer.isBuffer(buffer)) {"),e.generateError('"argument buffer is not a Buffer object"'),e.pushCode("}"),this.alias?this.addAliasedCode(e):this.addRawCode(e),this.alias?e.pushCode("return {0}(0)",u+this.alias):e.pushCode("return { offset: offset, result: vars };"),e.code},d.prototype.addRawCode=function(e){e.pushCode("var offset = 0;"),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };")},d.prototype.addAliasedCode=function(e){return e.pushCode("function {0}(offset) {",u+this.alias),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e},d.prototype.resolveReferences=function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){l[t].addAliasedCode(e)}))},d.prototype.compile=function(){var e="(function(buffer, constructorFn, Long) { ".concat(this.getCode()," })");this.compiled=i.runInThisContext(e)},d.prototype.sizeOf=function(){var e=NaN;if(Object.keys(f).indexOf(this.type)>=0)e=f[this.type];else if("String"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Array"===this.type&&"number"==typeof this.options.length){var t=NaN;"string"==typeof this.options.type?t=f[h[this.options.type]]:this.options.type instanceof d&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"Skip"===this.type?e=this.options.length:"Nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e},d.prototype.parse=function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn,s)},d.prototype.setNextParser=function(e,t,r){var n=new d;return n.type=h[e],n.varName=t,n.options=r||n.options,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this},d.prototype.generate=function(e){this.type&&(this["generate".concat(this.type)](e),this.generateAssert(e));var t=e.generateVariable(this.varName);return this.options.formatter&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)},d.prototype.generateAssert=function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(n(this.options.assert)){case"function":e.pushCode("if (!({0}).call(vars, {1})) {",this.options.assert,t);break;case"number":e.pushCode("if ({0} !== {1}) {",this.options.assert,t);break;case"string":e.pushCode('if ("{0}" !== {1}) {',this.options.assert,t);break;default:throw new Error("Assert option supports only strings, numbers and assert functions.")}e.generateError('"Assert error: {0} is " + {0}',t),e.pushCode("}")}},d.prototype.generateNext=function(e){return this.next&&(e=this.next.generate(e)),e},Object.keys(f).forEach((function(e){d.prototype["generate".concat(e)]=function(t){"UInt64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), true, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):"Int64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), false, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):t.pushCode("{0} = buffer.read{1}(offset);",t.generateVariable(this.varName),e),t.pushCode("offset += {0};",f[e])}})),d.prototype.generateBit=function(e){var t=JSON.parse(JSON.stringify(this));if(t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["Bit","Nest"].indexOf(this.next.type)<0){var r=0;e.bitFields.forEach((function(e){r+=e.options.length}));var n=e.generateTmpVariable();if(r<=8)e.pushCode("var {0} = buffer.readUInt8(offset);",n),r=8;else if(r<=16)e.pushCode("var {0} = buffer.readUInt16BE(offset);",n),r=16;else if(r<=24){var o=e.generateTmpVariable(),i=e.generateTmpVariable();e.pushCode("var {0} = buffer.readUInt16BE(offset);",o),e.pushCode("var {0} = buffer.readUInt8(offset + 2);",i),e.pushCode("var {2} = ({0} << 8) | {1};",o,i,n),r=24}else{if(!(r<=32))throw new Error("Currently, bit field sequence longer than 4-bytes is not supported.");e.pushCode("var {0} = buffer.readUInt32BE(offset);",n),r=32}e.pushCode("offset += {0};",r/8);var a=0,s="be"===this.endian;e.bitFields.forEach((function(t){e.pushCode("{0} = {1} >> {2} & {3};",t.varName,n,s?r-a-t.options.length:a,(1<<t.options.length)-1),a+=t.options.length})),e.bitFields=[]}},d.prototype.generateSkip=function(e){var t=e.generateOption(this.options.length);e.pushCode("offset += {0};",t)},d.prototype.generateString=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();this.options.length&&this.options.zeroTerminated?(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.readUInt8(offset++) !== 0 && offset - {0} < {1});",r,this.options.length),e.pushCode("{0} = buffer.toString('{1}', {2}, offset - {2} < {3} ? offset - 1 : offset);",t,this.options.encoding,r,this.options.length)):this.options.length?(e.pushCode("{0} = buffer.toString('{1}', offset, offset + {2});",t,this.options.encoding,e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))):this.options.zeroTerminated?(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.readUInt8(offset++) !== 0);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset - 1);",t,this.options.encoding,r)):this.options.greedy&&(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.length > offset++);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset);",t,this.options.encoding,r)),this.options.stripNull&&e.pushCode("{0} = {0}.replace(/\\x00+$/g, '')",t)},d.prototype.generateBuffer=function(e){"eof"===this.options.readUntil?e.pushCode("{0} = buffer.slice(offset);",e.generateVariable(this.varName)):(e.pushCode("{0} = buffer.slice(offset, offset + {1});",e.generateVariable(this.varName),e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))),this.options.clone&&e.pushCode("{0} = Buffer.from({0});",e.generateVariable(this.varName))},d.prototype.generateArray=function(e){var t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),a=e.generateTmpVariable(),s=this.options.key,c="string"==typeof s;if(c?e.pushCode("{0} = {};",i):e.pushCode("{0} = [];",i),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode("for (var {0} = 0; offset < buffer.length; {0}++) {",o):void 0!==r?e.pushCode("for (var {0} = offset; offset - {0} < {1}; ) {",o,r):e.pushCode("for (var {0} = 0; {0} < {1}; {0}++) {",o,t),"string"==typeof n)if(l[n]){var p=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",p,u+n),e.pushCode("var {0} = {1}.result; offset = {1}.offset;",a,p),n!==this.alias&&e.addReference(n)}else e.pushCode("var {0} = buffer.read{1}(offset);",a,h[n]),e.pushCode("offset += {0};",f[h[n]]);else n instanceof d&&(e.pushCode("var {0} = {};",a),e.pushScope(a),n.generate(e),e.popScope());c?e.pushCode("{0}[{2}.{1}] = {2};",i,s,a):e.pushCode("{0}.push({1});",i,a),e.pushCode("}"),"function"==typeof this.options.readUntil&&e.pushCode(" while (!({0}).call(this, {1}, buffer.slice(offset)));",this.options.readUntil,a)},d.prototype.generateChoiceCase=function(e,t,r){if("string"==typeof r)if(l[r]){var n=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",n,u+r),e.pushCode("{0} = {1}.result; offset = {1}.offset;",e.generateVariable(this.varName),n),r!==this.alias&&e.addReference(r)}else e.pushCode("{0} = buffer.read{1}(offset);",e.generateVariable(this.varName),h[r]),e.pushCode("offset += {0};",f[h[r]]);else r instanceof d&&(e.pushPath(t),r.generate(e),e.popPath(t))},d.prototype.generateChoice=function(e){var t=e.generateOption(this.options.tag);this.varName&&e.pushCode("{0} = {};",e.generateVariable(this.varName)),e.pushCode("switch({0}) {",t),Object.keys(this.options.choices).forEach((function(t){var r=this.options.choices[t];Number.isNaN(parseInt(t,10))?e.pushCode("case '{0}':",t):e.pushCode("case {0}:",t),this.generateChoiceCase(e,this.varName,r),e.pushCode("break;")}),this),e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + {0} + " at choice"',t),e.pushCode("}")},d.prototype.generateNest=function(e){var t=e.generateVariable(this.varName);if(this.options.type instanceof d)this.varName&&e.pushCode("{0} = {};",t),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(l[this.options.type]){var r=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",r,u+this.options.type),e.pushCode("{0} = {1}.result; offset = {1}.offset;",t,r),this.options.type!==this.alias&&e.addReference(this.options.type)}},d.prototype.generateFormatter=function(e,t,r){"function"==typeof r&&e.pushCode("{0} = ({1}).call(this, {0});",t,r)},d.prototype.isInteger=function(){return!!this.type.match(/U?Int[8|16|32][BE|LE]?|Bit\d+/)},d.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},d.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},d.prototype.generateItf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((").concat(r,"<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((").concat(r,"<<16) | (buffer[offset+1]<< 8) | buffer[offset+2]) & 0x1fffff;\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((").concat(r,"<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4\n } else {\n ").concat(t," = ((").concat(r," & 0x0f)<<28) | (buffer[offset+1]<<20) | (buffer[offset+2]<<12) | (buffer[offset+3]<<4) | (buffer[offset+4] & 0x0f);\n // x=((0xff & 0x0f)<<28) | (0xff<<20) | (0xff<<12) | (0xff<<4) | (0x0f & 0x0f);\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5\n }\n "))},d.prototype.ltf8=function(e,t){return this.setNextParser("ltf8",e,t)},d.prototype.generateLtf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((buffer[offset]<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((buffer[offset]<<16) | (buffer[offset+1]<<8) | buffer[offset+2]) & 0x1fffff;\n ").concat(t," = (((").concat(r," & 63) << 16) | buffer.readUInt16LE(offset + 1));\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((buffer[offset]<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4;\n } else if (").concat(r," < 0xf8) {\n ").concat(t," = (((buffer[offset] & 15) * Math.pow(2,32))) +\n (buffer[offset+1]<<24) | (buffer[offset+2]<<16 | buffer[offset+3]<<8 | buffer[offset+4])\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5;\n } else if (").concat(r," < 0xfc) {\n ").concat(t," = ((((buffer[offset] & 7) << 8) | buffer[offset+1] )) * Math.pow(2,32) +\n (buffer[offset+2]<<24) | (buffer[offset+3]<<16 | buffer[offset+4]<<8 | buffer[offset+5])\n offset += 6;\n } else if (").concat(r," < 0xfe) {\n ").concat(t," = ((((buffer[offset] & 3) << 16) | buffer[offset+1]<<8 | buffer[offset+2])) * Math.pow(2,32) +\n (buffer[offset+3]<<24) | (buffer[offset+4]<<16 | buffer[offset+5]<<8 | buffer[offset+6])\n offset += 7;\n } else if (").concat(r," < 0xff) {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+8));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 8;\n } else {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+9));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 9;\n }\n "))},t.Parser=d},2961:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n=function(){this.code="",this.scopes=[["vars"]],this.isAsync=!1,this.bitFields=[],this.tmpVariableCount=0,this.references={}};n.prototype.generateVariable=function(e){var t=[];for(Array.prototype.push.apply(t,this.scopes[this.scopes.length-1]);/^\$parent\./.test(e);)t.pop(),e=e.replace(/^\$parent\./,"");return e&&t.push(e),t.join(".")},n.prototype.generateOption=function(e){switch(r(e)){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"(".concat(e,").call(").concat(this.generateVariable(),", vars)");default:return}},n.prototype.generateError=function(){var e=Array.prototype.slice.call(arguments),t=n.interpolate.apply(this,e);this.isAsync?this.pushCode("return process.nextTick(function() { callback(new Error(".concat(t,"), vars); });")):this.pushCode("throw new Error(".concat(t,");"))},n.prototype.generateTmpVariable=function(){return"$tmp".concat(this.tmpVariableCount++)},n.prototype.pushCode=function(){var e=Array.prototype.slice.call(arguments);this.code+="".concat(n.interpolate.apply(this,e),"\n")},n.prototype.pushPath=function(e){e&&this.scopes[this.scopes.length-1].push(e)},n.prototype.popPath=function(e){e&&this.scopes[this.scopes.length-1].pop()},n.prototype.pushScope=function(e){this.scopes.push([e])},n.prototype.popScope=function(){this.scopes.pop()},n.prototype.addReference=function(e){this.references[e]||(this.references[e]={resolved:!1,requested:!1})},n.prototype.markResolved=function(e){this.references[e].resolved=!0},n.prototype.markRequested=function(e){e.forEach(function(e){this.references[e].requested=!0}.bind(this))},n.prototype.getUnresolvedReferences=function(){var e=this.references;return Object.keys(this.references).filter((function(t){return!e[t].resolved&&!e[t].requested}))},n.interpolate=function(e){var t=e.match(/{\d+}/g),r=Array.prototype.slice.call(arguments,1);return t&&t.forEach((function(t){var n=parseInt(t.substr(1,t.length-2),10);e=e.replace(t,r[n].toString())})),e},t._=n},22:e=>{e.exports.runInThisContext=function(e){return new Function("code","return eval(code);").call(globalThis,e)}},445:(e,t,r)=>{const n=r(7381),o=r(9260),i=r(576),a=r(4693),s=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,o=t,i=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&s&&([n,o]=this.decodePackMeta(this.stream)),32&r)var a=this.decodeCat(this.stream,o);else a=4&r?this.decodeExt(this.stream,o):64&r?i?this.decodeRLE1(this.stream,o):this.decodeRLE0(this.stream,o):i?this.decode1(this.stream,o):this.decode0(this.stream,o);return r&s&&(a=this.decodePack(a,n,t)),a}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return Buffer.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,n=1&t,i=e.length;return t&s&&([r,e,i]=this.encodePack(e)),t&s&&this.stream.WriteStream(r),64&t?n?this.encodeRLE1(e,i,this.stream):this.encodeRLE0(e,i,this.stream):n?this.encode1(e,i,this.stream):this.encode0(e,i,this.stream)}decode0(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new i(o),s=new n(e);s.RangeStartDecode(e);for(var f=0;f<t;f++)r[f]=a.ModelDecode(e,s);return r}encode0(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new i(o);r.WriteByte(o);var f=new n(r);for(a=0;a<t;a++)s.ModelEncode(r,f,e[a]);return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decode1(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),s=0;s<o;s++)a[s]=new i(o);var f=new n(e);f.RangeStartDecode(e);var l=0;for(s=0;s<t;s++)r[s]=a[l].ModelDecode(e,f),l=r[s];return r}encode1(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new Array(o);for(a=0;a<o;a++)s[a]=new i(o);r.WriteByte(o);var f=new n(r),l=0;for(a=0;a<t;a++)s[l].ModelEncode(r,f,e[a]),l=e[a];return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeExt(e,t){var r=new Buffer.allocUnsafe(t),n=a.array(e.buf.slice(e.pos)),o=a.header(n),i=0;do{var s=a.decompress(n,o);-1!=s&&(Buffer.from(s).copy(r,i),i+=s.length,o-=s.length)}while(-1!=s);return r}encodeExt(e,t){}decodeRLE0(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new i(o),s=new Array(258),f=0;f<=257;f++)s[f]=new i(4);var l=new n(e);for(l.RangeStartDecode(e),f=0;f<t;){r[f]=a.ModelDecode(e,l);for(var u=s[r[f]].ModelDecode(e,l),c=u,h=256;3==u;)u=s[h].ModelDecode(e,l),h=257,c+=u;for(var d=1;d<=c;d++)r[f+d]=r[f];f+=c+1}return r}encodeRLE0(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new i(o),f=new Array(258);for(a=0;a<=257;a++)f[a]=new i(4);r.WriteByte(o);var l=new n(r);for(a=0;a<t;){s.ModelEncode(r,l,e[a]);for(var u=1;a+u<t&&e[a+u]==e[a];)u++;u--;var c=e[a];e[a],a+=u+1;var h=u>=3?3:u;for(f[c].ModelEncode(r,l,h),u-=h,c=256;3==h;)h=u>=3?3:u,f[c].ModelEncode(r,l,h),c=257,u-=h}return l.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),s=0;s<o;s++)a[s]=new i(o);var f=new Array(258);for(s=0;s<=257;s++)f[s]=new i(4);var l=new n(e);l.RangeStartDecode(e);var u=0;for(s=0;s<t;){r[s]=a[u].ModelDecode(e,l),u=r[s];for(var c=f[r[s]].ModelDecode(e,l),h=c,d=256;3==c;)c=f[d].ModelDecode(e,l),d=257,h+=c;for(var p=1;p<=h;p++)r[s+p]=r[s];s+=h+1}return r}encodeRLE1(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new Array(o);for(a=0;a<o;a++)s[a]=new i(o);var f=new Array(258);for(a=0;a<=257;a++)f[a]=new i(4);r.WriteByte(o);for(var l=new n(r),u=(a=0,0);a<t;){s[u].ModelEncode(r,l,e[a]);for(var c=1;a+c<t&&e[a+c]==e[a];)c++;c--;var h=e[a];u=e[a],a+=c+1;var d=c>=3?3:c;for(f[h].ModelEncode(r,l,d),c-=d,h=256;3==d;)d=c>=3?3:c,f[h].ModelEncode(r,l,d),h=257,c-=d}return l.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r<this.nsym;r++)t[r]=e.ReadByte();return[t,e.ReadUint7()]}decodePack(e,t,r){var n=new Buffer.allocUnsafe(r);if(this.nsym<=1)for(var o=0;o<r;o++)n[o]=t[0];else if(this.nsym<=2){o=0;for(var i=0;o<r;o++){if(o%8==0)var a=e[i++];n[o]=t[1&a],a>>=1}}else if(this.nsym<=4)for(o=0,i=0;o<r;o++)o%4==0&&(a=e[i++]),n[o]=t[3&a],a>>=2;else{if(!(this.nsym<=16))return e;for(o=0,i=0;o<r;o++)o%2==0&&(a=e[i++]),n[o]=t[15&a],a>>=4}return n}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;n<e.length;n++)r[e[n]]=1;var i=0;for(n=0;n<256;n++)r[n]&&(r[n]=++i);for(t.WriteByte(i),n=0;n<256;n++)r[n]&&(t.WriteByte(n),r[n]--);return[t,r,i]}encodePack(e){var t,r,n;[t,r,n]=this.packMeta(e);var o=e.length,i=0;if(n<=1)return t.WriteUint7(0),[t,new Buffer.allocUnsafe(0),0];if(n<=2){for(var a=new Buffer.allocUnsafe(Math.floor((o+7)/8)),s=(i=0,0);i<(-8&o);i+=8,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<1)+(r[e[i+2]]<<2)+(r[e[i+3]]<<3)+(r[e[i+4]]<<4)+(r[e[i+5]]<<5)+(r[e[i+6]]<<6)+(r[e[i+7]]<<7);if(i<o){a[s]=0;for(var f=0;i<o;)a[s]|=r[e[i++]]<<f,f++;s++}return t.WriteUint7(s),[t,a,a.length]}if(n<=4){for(a=new Buffer.allocUnsafe(Math.floor((o+3)/4)),i=0,s=0;i<(-4&o);i+=4,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<2)+(r[e[i+2]]<<4)+(r[e[i+3]]<<6);if(i<o){for(a[s]=0,f=0;i<o;)a[s]|=r[e[i++]]<<f,f+=2;s++}return t.WriteUint7(s),[t,a,a.length]}if(n<=16){for(a=new Buffer.allocUnsafe(Math.floor((o+1)/2)),i=0,s=0;i<(-2&o);i+=2,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<4);return i<o&&(a[s++]=r[e[i++]]),t.WriteUint7(s),[t,a,a.length]}return t.WriteUint7(e.length),[t,e,e.length]}encodeStripe(e,t,r){0==r&&(r=4);for(var n=new Array(r),i=new Array(r),a=0;a<r;a++)i[a]=Math.floor(t.length/r)+(t.length%r>a),n[a]=new Array(i[a]);for(var s=0,f=0;f<t.length;f+=r,s++)for(var l=0;l<r;l++)s<n[l].length&&(n[l][s]=t[f+l]);var u=new Array(r),c=0;for(a=0;a<r;a++){var h=this.encode(n[a],0),d=this.encode(n[a],1);u[a]=d.length<h.length?d:h,c+=u[a].length}var p=new o("",0,c+5*r+1);for(p.WriteByte(r),a=0;a<r;a++)p.WriteUint7(u[a].length);for(a=0;a<r;a++)p.WriteData(u[a],u[a].length);return p.buf.slice(0,p.buf.pos)}decodeStripe(e,t){for(var r=e.ReadByte(),n=new Array(r),o=new Array(r),i=0;i<r;i++)n[i]=e.ReadUint7();var a=new Array(r);for(i=0;i<r;i++)o[i]=Math.floor(t/r)+(t%r>i),a[i]=this.decodeStream(e,o[i]);var s=new Buffer.allocUnsafe(t);for(i=0;i<r;i++)for(var f=0;f<o[i];f++)s[f*r+i]=a[i][f];return s}decodeCat(e,t){for(var r=new Buffer.allocUnsafe(t),n=0;n<t;n++)r[n]=e.ReadByte();return r}}},7381:e=>{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var o=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low<o&&(0!=this.carry&&console.log("ERROR: Multiple carry"),this.carry=1);this.range<1<<24;)this.range*=256,this.RangeShiftLow(e)}RangeFinishEncode(e){for(var t=0;t<5;t++)this.RangeShiftLow(e)}}},576:e=>{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,o=0;n+this.F[o]<=r;)n+=this.F[o++];t.RangeDecode(e,n,this.F[o],this.total_freq),this.F[o]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var i=this.S[o];if(o>0&&this.F[o]>this.F[o-1]){var a=this.F[o];this.F[o]=this.F[o-1],this.F[o-1]=a,a=this.S[o],this.S[o]=this.S[o-1],this.S[o-1]=a}return i}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,o=0;this.S[o]!=r;o++)n+=this.F[o];if(t.RangeEncode(e,n,this.F[o],this.total_freq),this.F[o]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[o],o>0&&this.F[o]>this.F[o-1]){var i=this.F[o];this.F[o]=this.F[o-1],this.F[o-1]=i,i=this.S[o],this.S[o]=this.S[o-1],this.S[o-1]=i}}}},5260:(e,t,r)=>{const n=r(9260),o=r(576),i=r(7381);function a(e,t,r){for(var n=0,o=0,i=-1,a=new Array(1024);o<r;){var s=e.ReadByte();if(a[n++]=s,o+=s,s==i){var f=e.ReadByte();for(o+=s*f;f--;)a[n++]=s}i=s}var l=0;for(n=0,o=0;o<r;){var u=0;do{var c=a[n++];u+=c}while(255==c);for(;u--;)t[o++]=l;l++}}const s=2,f=4,l=8,u=16,c=32,h=64,d=128;function p(e,t,r){var n=e.context;return t.qctx=(t.qctx<<e.qshift)+e.qtab[r],n+=(t.qctx&(1<<e.qbits)-1)<<e.qloc,e.do_pos&&(n+=e.ptab[Math.min(t.p,1023)]<<e.ploc),e.do_delta&&(n+=e.dtab[Math.min(t.delta,255)]<<e.dloc,t.delta+=t.prevq!=r?1:0,t.prevq=r),e.do_sel&&(n+=t.s<<e.sloc),t.p--,65535&n}function g(e){var t={};t.context=e.ReadUint16(),t.pflags=e.ReadByte(),t.do_dedup=t.pflags&s,t.fixed_len=t.pflags&f,t.do_sel=t.pflags&l,t.do_qmap=t.pflags&u,t.do_pos=t.pflags&c,t.do_delta=t.pflags&h,t.do_qtab=t.pflags&d,t.max_sym=e.ReadByte();var r=e.ReadByte();if(t.qbits=r>>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&u)for(var n=0;n<t.max_sym;n++)t.qmap[n]=e.ReadByte();else for(n=0;n<256;n++)t.qmap[n]=n;if(t.qtab=new Array(1024),t.qbits>0&&t.pflags&d)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&c&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&h&&a(e,t.dtab,256),t}function y(e,t,r,n,o,i){r.max_sel>0?o.s=n.sel.ModelDecode(e,t):o.s=0,o.x=r.stab[o.s];var a=r.params[o.x];if(a.fixed_len>=0){var f=n.len[0].ModelDecode(e,t);f|=n.len[1].ModelDecode(e,t)<<8,f|=n.len[2].ModelDecode(e,t)<<16,f|=n.len[3].ModelDecode(e,t)<<24,a.fixed_len>0&&(a.fixed_len=-f)}else f=-a.fixed_len;o.len=f,r.do_rev&&(i[o.rec]=n.rev.ModelDecode(e,t)),o.is_dup=0,a.pflags&s&&n.dup.ModelDecode(e,t)&&(o.is_dup=1),o.p=f,o.delta=0,o.qctx=0,o.prevq=0,o.rec++}function m(e,t,r){for(var n=0,o=0,i=new Array(2*r),a=0;n<r;){for(var s=n;n<r&&t[n]==o;)n++;var f=n-s;do{var l=Math.min(255,f);i[a++]=l,f-=l}while(255==l);o++}var u=-1,c=new Array(2*r),h=0;for(n=0;n<a;){var d=i[n++];if(c[h++]=d,d==u){for(s=n;n<a&&i[n]==u&&n-s<255;)n++;c[h++]=n-s}else u=d}e.WriteData(c,h)}e.exports={decode:function(e,t){return function(e,t){var r=e.ReadUint7(),n=function(e){var t={max_sym:0};if(5==e.ReadByte()){var r=e.ReadByte(),n=1&r?e.ReadByte():1,o=r.nparam>1?r.nparam-1:0,i=new Array(256);if(2&r)o=e.ReadByte(),a(e,i,256);else{for(var s=0;s<n;s++)i[s]=s;for(;s<256;s++)i[s]=n-1}t.do_rev=4&r,t.stab=i,t.max_sel=o,t.params=new Array(t.nparam);for(var f=0;f<n;f++)t.params[f]=g(e),t.max_sym<t.params[f].max_sym&&(t.max_sym=t.params[f].max_sym);return t}console.error("Invalid FQZComp version number")}(e);if(n){var s=n.params,f=new Array(t.length),l=function(e){var t={};t.qual=new Array(65536);for(var r=0;r<65536;r++)t.qual[r]=new o(e.max_sym+1);for(t.len=new Array(4),r=0;r<4;r++)t.len[r]=new o(256);return t.rev=new o(2),t.dup=new o(2),e.max_sel>0&&(t.sel=new o(e.max_sel+1)),t}(n),u=new i(e);u.RangeStartDecode(e);for(var c=new Buffer.allocUnsafe(r),h={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},d=0;d<r;){if(0==h.p){if(y(e,u,n,l,h,f),h.is_dup>0&&l.dup.ModelDecode(e,u)){for(var m=0;m<len;m++)c[d+m]=c[d+m-h.len];d+=h.len,h.p=0;continue}t.push(h.len);var b=(s=n.params[h.x]).context}var v=l.qual[b].ModelDecode(e,u);c[d++]=s.qmap[v],b=p(s,h,v)}return n.do_rev&&function(e,t,r,n){for(var o=0,i=0;i<t;){if(r[o])for(var a=0,s=n[o]-1;a<s;){var f=e[i+a];e[i+a]=e[i+s],e[i+s]=f,a++,s--}i+=n[o++]}}(c,r,f,t),c}}(new n(e),t)},encode:function(e,t,r){for(var a=new Array(2),p=new Array(2),g=new Array(2),y=new Array(2),b=new Array(256),v=0;v<2;v++)a[v]=new Array(256),p[v]=new Array(256),g[v]=new Array(1024),y[v]=new Array(256);(_=new n("",0,1.1*e.length+100)).WriteUint7(e.length);var w=function(e,t,r,n){for(var o=r[0],i=0;i<r.length&&r[i]==o;i++);var a=i==r.length?1:0,s=0,f=0;for(i=0;i<256;i++)n[0][i]=0;var l=0,u=0;for(i=0;i<e.length;i++)0==u&&(u=t[l<t.length-1?l++:l]),n[0][e[i]]++,u--;for(i=0;i<256;i++)n[0][i]&&(f<i&&(f=i),s++);var c=5,h=0;return s<=16&&(h=1,c=s<=2?1:s<=4?2:s<=8?3:4),[{qbits:8+(c>4),qshift:c,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:c>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:f,nsym:s,do_qmap:h,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:c<=4?1:0,do_qtab:0,qbits:8+(c>4)-(0==a),sbits:1,sloc:15-(c<=4),do_stab:1,do_sel:1}]}(e,t,r,a),_=function(e,t,r,n,o,i,a){for(var p=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g<t.length;g++)a[g]=g;for(;g<256;g++)a[g]=t.length-1;e.WriteByte(5);var y=(t.length>1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(y),1&y&&e.WriteByte(t.length),2&y){var b=1<<t[0].sbits;b>0&&b--,e.WriteByte(b),m(e,a,256)}for(var v=0;v<t.length;v++){if(e.WriteUint16(t[v].context),e.WriteByte((t[v].do_qtab?d:0)|(t[v].do_delta?h:0)|(t[v].do_pos?c:0)|(t[v].do_qmap?u:0)|(t[v].do_sel?l:0)|(t[v].fixed_len?f:0)|(t[v].do_dedup?s:0)),t[v].do_qmap?e.WriteByte(t[v].nsym):e.WriteByte(t[v].max_sym),e.WriteByte(t[v].qbits<<4|t[v].qshift),e.WriteByte(t[v].qloc<<4|t[v].sloc),e.WriteByte(t[v].ploc<<4|t[v].dloc),t[v].do_qmap){t[v].max_sym=t[v].nsym;var w=0;for(g=0;g<256;g++)r[v][g]&&(e.WriteByte(g),r[v][g]=w++);for(;w<t[v].nsym;w++)e.WriteByte(0)}else for(g=0;g<256;g++)r[v][g]=g;if(t[v].qbits>0){for(g=0;g<256;g++)n[v][g]=g;t[v].do_qtab&&m(e,n[v],256)}if(t[v].pbits>0){for(g=0;g<1024;g++)o[v][g]=Math.min((1<<t[v].pbits)-1,g>>t[v].pshift);m(e,o[v],1024)}if(t[v].dbits>0){for(g=0;g<256;g++)p[g]>(1<<t[v].dbits)-1&&(p[g]=(1<<t[v].dbits)-1);for(g=0;g<256;g++)i[v][g]=p[Math.min(p.length-1,g>>t[v].dshift)];m(e,i[v],256)}}return e}(_,w,a,p,g,y,b);return function(e,t,r,n,a,s,f,l,u,c){var h=1<<a[0].sbits;h>0&&h--;for(var d=t.length,p=0,g=0;g<a.length;g++)p<a[g].max_sym&&(p=a[g].max_sym);for(var y=new Array(65536),m=0;m<65536;m++)y[m]=new o(p+1);var b=new Array(4);for(m=0;m<4;m++)b[m]=new o(256);new o(2),new o(2);for(var v=new o(h+1),w=new i(t),_=(g=0,m=0,0);m<d;){if(0==g){var S=n[_];a[0].sbits>0&&v.ModelEncode(e,w,S);var A=c[S],E=r[Math.min(r.length-1,_++)];a[A].fixed_len?a[A].fixed_len>0&&(b[0].ModelEncode(e,w,255&E),b[1].ModelEncode(e,w,E>>8&255),b[2].ModelEncode(e,w,E>>16&255),b[3].ModelEncode(e,w,E>>24&255),a[A].fixed_len=-1):(b[0].ModelEncode(e,w,255&E),b[1].ModelEncode(e,w,E>>8&255),b[2].ModelEncode(e,w,E>>16&255),b[3].ModelEncode(e,w,E>>24&255)),a[A].do_dedup&&process.exit(1),g=E;var B=0,C=a[A].context,R=0,k=0}var x=t[m++],I=s[A][x];y[C].ModelEncode(e,w,I),R=(R<<a[A].qshift)+f[A][I],C=a[A].context,C+=(R&(1<<a[A].qbits)-1)<<a[A].qloc,a[A].pbits>0&&(C+=l[A][Math.min(g,1023)]<<a[A].ploc),a[A].dbits>0&&(C+=u[A][Math.min(B,255)]<<a[A].dloc,B+=k!=I?1:0,k=I),a[A].do_sel&&(C+=S<<a[A].sloc),C&=65535,g--}return w.RangeFinishEncode(e),e.buf.slice(0,e.pos)}(_,e,t,r,w,a,p,g,y,b)}}},3498:(e,t,r)=>{"use strict";var n=r(4459),o=r(594),i=r(445),a=r(5260),s=r(2881);e.exports={r4x8_uncompress:function(e,t){n.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){i.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=s.decode(e,0,"\0");Buffer.from(r,"binary").copy(t,0,0)}}},9260:e=>{e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=Buffer.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(this.buf[this.pos+2]<<0),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(this.buf[this.pos+1]<<0),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t<e.length;t++)this.buf[this.pos++]=e.charCodeAt(t);this.buf[this.pos++]=0}WriteData(e,t){for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]}WriteStream(e){this.WriteData(e.buf,e.pos)}WriteUint16(e){this.WriteByte(255&e),this.WriteByte(e>>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},4459:(e,t,r)=>{const n=r(9260);function o(e){return 4095&e}function i(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function s(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function l(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(e>>0&255)}function u(e,t,r,n,o){return e=function(e,t,r,n){for(var o=(1<<23>>n<<8)*r;e>=o;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,o),(Math.floor(e/n)<<o)+e%n+r}function c(e,t,r){for(var n=0;n<256;n++)t[n]=0;var o=e.ReadByte(),i=o,a=0;do{var s=e.ReadITF8();t[o]=s,a>0?(a--,o++):(o=e.ReadByte())==i+1&&(a=e.ReadByte()),i=o}while(0!=o);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function h(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var o=n/t;do{var i=0,a=0,s=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(i<e[r]&&(i=e[r],a=r),e[r]=Math.floor(e[r]*o),0==e[r]&&(e[r]=1),t+=e[r]);t<n?e[a]+=n-t:t-n<e[a]/2&&e[a]>2?e[a]-=t-n:t!=n&&(o*=.99,s=1)}while(s)}function d(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new n(e),r=t.ReadByte(),l=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),n=new Array(256);c(e,r,n);for(var i=a(n),l=new Array(4),u=0;u<4;u++)l[u]=e.ReadUint32();var h=new Buffer.allocUnsafe(t);for(u=0;u<t;u++){var d=u%4,p=i[o(l[d])];h[u]=p,l[d]=s(l[d],n[p],r[p]),l[d]=f(e,l[d])}return h}(t,l):function(e,t){var r=new Array(256),n=new Array(256);!function(e,t,r){for(var n=0;n<256;n++){t[n]=new Array(256),r[n]=new Array(256);for(var o=0;o<256;o++)t[n][o]=0}var i=e.ReadByte(),a=i,s=0;do{c(e,t[i],r[i]),s>0?(s--,i++):(i=e.ReadByte())==a+1&&(s=e.ReadByte()),a=i}while(0!=i)}(e,r,n);for(var l=new Array(256),u=0;u<256;u++)l[u]=a(n[u]);for(var h=new Array(4),d=new Array(4),p=0;p<4;p++)h[p]=e.ReadUint32(),d[p]=0;var g=new Buffer.allocUnsafe(t),y=Math.floor(t/4);for(u=0;u<y;u++)for(p=0;p<4;p++){var m=o(h[p]),b=l[d[p]][m];g[u+p*y]=b,h[p]=s(h[p],n[d[p]][b],r[d[p]][b]),h[p]=f(e,h[p]),d[p]=b}for(u*=4;u<t;)m=o(h[3]),b=i(n[d[3]],m),g[u++]=b,h[3]=s(h[3],n[d[3]][b],r[d[3]][b]),h[3]=f(e,h[3]),d[3]=b;return g}(t,l)},encode:function(e,t){return 0==t?function(e){const t=e.length;var r=new n("",0,780);r.WriteByte(0),r.WriteUint32(0),r.WriteUint32(0);var o=new Array(256);(function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++})(e,o),h(o),d(r,o);var i=new Array(256);i[0]=0;for(var a=1;a<256;a++)i[a]=i[a-1]+o[a-1];var s=new Array(4);for(a=0;a<4;a++)s[a]=1<<23;var f=Math.floor(1.05*t+100),c=new n("",f,f);for(a=t-1;a>=0;a--)s[a%4]=u(s[a%4],c,i[e[a]],o[e[a]],12);for(a=3;a>=0;a--)l(s[a],c);var p=r.pos;return r.buf.writeInt32LE(p-9+(c.length-c.pos),1),r.buf.writeInt32LE(t,5),Buffer.concat([r.buf.slice(0,r.pos),c.buf.slice(c.pos,c.length)],r.pos+c.length-c.pos)}(e):function(e){const t=e.length;var r=new n("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),i=new Array(256),a=new Array(256),s=0;s<256;s++)i[s]=new Array(256),a[s]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var o=0;o<256;o++)t[n][o]=0}var i=0;for(n=0;n<e.length;n++)r[e[n]]++,t[i][e[n]]++,i=e[n];t[0][e[1*(e.length>>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,i,o),function(e,t){for(var r=0;r<256;r++)t[r]&&h(e[r])}(i,o),function(e,t,r){for(var n=0,o=0;o<256;o++)if(r[o]){if(n>0)n--;else if(e.WriteByte(o),o>0&&r[o-1]>0){for(n=o+1;n<256&&r[n];n++);n-=o+1,e.WriteByte(n)}d(e,t[o])}e.WriteByte(0)}(r,i,o),s=0;s<256;s++)if(o[s]){a[s][0]=0;for(var f=1;f<256;f++)a[s][f]=a[s][f-1]+i[s][f-1]}var c=new Array(4),p=new Array(4);for(f=0;f<4;f++)c[f]=1<<23,p[f]=0;var g=new n("",t,t),y=Math.floor(t/4),m=new Array(4),b=new Array(4);for(f=0;f<4;f++)m[f]=(f+1)*y-2,b[f]=e[m[f]+1];for(b[3]=e[t-1],s=t-2;s>4*y-2;s--)c[3]=u(c[3],g,a[e[s]][b[3]],i[e[s]][b[3]],12),b[3]=e[s];for(;m[0]>=0;)for(f=3;f>=0;f--){var v=e[m[f]];c[f]=u(c[f],g,a[v][b[f]],i[v][b[f]],12),b[f]=v,m[f]--}for(f=3;f>=0;f--)c[f]=u(c[f],g,a[0][b[f]],i[0][b[f]],12);for(s=3;s>=0;s--)l(c[s],g);var w=r.pos;return r.buf.writeInt32LE(w-9+(g.length-g.pos),1),r.buf.writeInt32LE(t,5),Buffer.concat([r.buf.slice(0,r.pos),g.buf.slice(g.pos,g.length)],r.pos+g.length-g.pos)}(e)}}},594:(e,t,r)=>{const n=r(9260);function o(e,t){return e&(1<<t)-1}function i(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e,t){for(var r=1<<t,n=new Array(r),o=0,i=0;i<r;i++){for(;i>=e[o+1];)o++;n[i]=o}return n}function s(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}function f(e,t){return t<32768&&(t=(t<<16)+e.ReadUint16()),t}function l(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(e>>0&255)}function u(e,t,r,n,o){return e=function(e,t,r,n){for(var o=(1<<31-n)*r;e>=o;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,o),(Math.floor(e/n)<<o)+e%n+r}function c(e,t,r){0==r&&(r=4);for(var o=new Array(r),i=new Array(r),a=0;a<r;a++)i[a]=Math.floor(t.length/r)+(t.length%r>a),o[a]=new Array(i[a]);for(var s=0,f=0;f<t.length;f+=r,s++)for(var l=0;l<r;l++)s<o[l].length&&(o[l][s]=t[f+l]);var u=new Array(r),c=0;for(a=0;a<r;a++){var h=d(o[a],0),p=d(o[a],1);u[a]=p.length<h.length?p:h,c+=u[a].length}var g=new n("",0,c+5*r+1);for(g.WriteByte(r),a=0;a<r;a++)g.WriteUint7(u[a].length);for(a=0;a<r;a++)g.WriteData(u[a],u[a].length);return g.buf.slice(0,g.buf.pos)}function h(e,t){var r=e.ReadByte(),l=1&r,u=8&r,c=32&r,d=64&r,y=128&r;if(16&r||(t=e.ReadUint7()),u)return function(e,t){for(var r=e.ReadByte(),n=new Array(r),o=new Array(r),i=0;i<r;i++)n[i]=e.ReadUint7();var a=new Array(r);for(i=0;i<r;i++)o[i]=Math.floor(t/r)+(t%r>i),a[i]=h(e,o[i]);var s=new Buffer.allocUnsafe(t);for(i=0;i<r;i++)for(var f=0;f<o[i];f++)s[f*r+i]=a[i][f];return s}(e,t);if(y)var b=t,[v,w,t]=function(e){for(var t=e.ReadByte(),r=new Array(t),n=0;n<t;n++)r[n]=e.ReadByte();return[r,t,e.ReadUint7()]}(e);if(d)var _=t,[S,A,t]=function(e){var t=e.ReadUint7(),r=e.ReadUint7();if(1&t)var o=e.ReadData((t-1)/2);else{var i=e.ReadUint7();o=e.ReadData(i),o=g(new n(o),t/2)}o=new n(o);var a=new Array(256),s=o.ReadByte();0==s&&(s=256);for(var f=0;f<s;f++)a[o.ReadByte()]=1;return[a,o,r]}(e);if(c)var E=e.ReadData(t);else E=0==l?g(e,t):function(e,t){var r=(h=e.ReadByte())>>4,l=e;if(1&h){var u=e.ReadUint7(),c=e.ReadUint7(),h=new n(e.ReadData(c));l=new n(g(h,u))}var d=new Array(256),y=new Array(256);!function(e,t,r,n){for(var o=0;o<256;o++){t[o]=new Array(256),r[o]=new Array(256);for(var i=0;i<256;i++)t[o][i]=0}var a=p(e);for(o=0;o<256;o++)if(a[o]){var s=0;for(i=0;i<256;i++)a[i]&&(s>0?s--:(t[o][i]=e.ReadUint7(),0==t[o][i]&&(s=e.ReadByte())));for(m(t[o],n),r[o][0]=0,i=0;i<256;i++)r[o][i+1]=r[o][i]+t[o][i]}}(l,d,y,r);for(var b=new Array(256),v=0;v<256;v++)b[v]=a(y[v],r);for(var w=new Array(4),_=new Array(4),S=0;S<4;S++)w[S]=e.ReadUint32(),_[S]=0;var A=new Buffer.allocUnsafe(t),E=Math.floor(t/4);for(v=0;v<E;v++)for(S=0;S<4;S++){var B=o(w[S],r),C=b[_[S]][B];A[v+S*E]=C,w[S]=s(w[S],y[_[S]][C],d[_[S]][C],r),w[S]=f(e,w[S]),_[S]=C}for(v*=4;v<t;)B=o(w[3],r),C=i(y[_[3]],B),A[v++]=C,w[3]=s(w[3],y[_[3]][C],d[_[3]][C],r),w[3]=f(e,w[3]),_[3]=C;return A}(e,t);return d&&(E=function(e,t,r,o){new n(e);for(var i=new Buffer.allocUnsafe(o),a=0,s=0;a<o;s++){var f=e[s];if(t[f])for(var l=r.ReadUint7(),u=0;u<=l;u++)i[a++]=f;else i[a++]=f}return i}(E,S,A,_)),y&&(E=function(e,t,r,n){var o=new Buffer.allocUnsafe(n),i=0;if(r<=1)for(var a=0;a<n;a++)o[a]=t[0];else if(r<=2)for(a=0;a<n;a++){if(a%8==0)var s=e[i++];o[a]=t[1&s],s>>=1}else if(r<=4)for(a=0;a<n;a++)a%4==0&&(s=e[i++]),o[a]=t[3&s],s>>=2;else if(r<=16)for(a=0;a<n;a++)a%2==0&&(s=e[i++]),o[a]=t[15&s],s>>=4;return o}(E,v,w,b)),E}function d(e,t){var r=new n("",0,10);r.WriteByte(t);var o=1&t,i=8&t,a=32&t,s=64&t,f=128&t,h=t>>8;if(16&t||r.WriteUint7(e.length),i)return Buffer.concat([r.buf.slice(0,r.pos),c(0,e,h)]);var d=new Buffer.alloc(0);f&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++;var o=new Array(256),i=0;for(r=0;r<256;r++)t[r]>0&&(o[r]=i++);if(!(i>16)){if(i<=1)var a=new Buffer.allocUnsafe(0);else if(i<=2){a=new Buffer.allocUnsafe(Math.ceil(e.length/8));var s=-1;for(r=0;r<e.length;r++)r%8==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%8}else if(i<=4)for(a=new Buffer.allocUnsafe(Math.ceil(e.length/4)),s=-1,r=0;r<e.length;r++)r%4==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%4*2;else for(a=new Buffer.allocUnsafe(Math.ceil(e.length/2)),s=-1,r=0;r<e.length;r++)r%2==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%2*4;var f=new n("",0,i+5);for(f.WriteByte(i),s=0,r=0;r<256;r++)t[r]>0&&(t[r]=s++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var p=new Buffer.alloc(0);if(s&&([p,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r<e.length;r++)t[e[r]]+=e[r]==o?1:-1,o=e[r];var i=0;for(r=0;r<256;r++)t[r]>0&&i++;for(i||(i=1,t[0]=1),(l=new n("",0,i+1+e.length)).WriteByte(i),r=0;r<256;r++)t[r]>0&&l.WriteByte(r);var a=new Buffer.allocUnsafe(e.length),s=0;for(r=0;r<e.length;r++)if(a[s++]=e[r],t[e[r]]>0){o=e[r];for(var f=0;r+f+1<e.length&&e[r+f+1]==o;)f++;l.WriteUint7(f),r+=f}var l,u=v(l.buf.slice(0,l.pos)),c=new n("",0,16);return c.WriteUint7(2*l.pos),c.WriteUint7(s),c.WriteUint7(u.length),[l=Buffer.concat([c.buf.slice(0,c.pos),u]),a.slice(0,s)]}(e)),e.length<4&&1==o&&(o=0,r.buf[0]&=-2),a)var g=e;else g=0==o?v(e):function(e){const t=e.length;for(var r=new n("",0,198156),o=new Array(256),i=new Array(256),a=new Array(256),s=0;s<256;s++)i[s]=new Array(256),a[s]=new Array(256);var f=12;(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var o=0;o<256;o++)t[n][o]=0}var i=0;for(n=0;n<e.length;n++)r[i]++,t[i][e[n]]++,i=e[n];r[i]++,t[0][e[1*(e.length>>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,i,o),function(e,t,r){for(var n=0;n<256;n++)if(t[n]){var o=Math.ceil(Math.log2(t[n]));o>12&&(o=12),y(e[n],o)}}(i,o);var c=new n("",0,198156);!function(e,t,r){b(e,r);for(var n=0;n<256;n++)if(r[n])for(var o=0,i=0;i<256;i++)if(r[i])if(o)o--;else if(e.WriteUint7(t[n][i]),!t[n][i]){for(var a=i+1;a<256;a++)if(r[a]){if(0!=t[n][a])break;o++}e.WriteByte(o)}}(c,i,o);var h=v(c.buf.slice(0,c.pos));for(h.length<c.pos?(r.WriteByte(193),r.WriteUint7(c.pos),r.WriteUint7(h.length),r.WriteData(h,h.length)):(r.WriteByte(192),r.WriteData(c.buf,c.pos)),function(e,t,r){for(var n=0;n<256;n++)t[n]&&m(e[n],12)}(i,o),s=0;s<256;s++)if(o[s]){a[s][0]=0;for(var d=1;d<256;d++)a[s][d]=a[s][d-1]+i[s][d-1]}var p=new Array(4),g=new Array(4);for(d=0;d<4;d++)p[d]=32768,g[d]=0;var w=new n("",1.05*t+100>>0,1.05*t+100>>0),_=Math.floor(t/4),S=new Array(4),A=new Array(4);for(d=0;d<4;d++)S[d]=(d+1)*_-2,A[d]=e[S[d]+1];for(A[3]=e[t-1],s=t-2;s>4*_-2;s--)p[3]=u(p[3],w,a[e[s]][A[3]],i[e[s]][A[3]],f),A[3]=e[s];for(;S[0]>=0;)for(d=3;d>=0;d--){var E=e[S[d]];p[d]=u(p[d],w,a[E][A[d]],i[E][A[d]],f),A[d]=E,S[d]--}for(d=3;d>=0;d--)p[d]=u(p[d],w,a[0][A[d]],i[0][A[d]],f);for(s=3;s>=0;s--)l(p[s],w);return Buffer.concat([r.buf.slice(0,r.pos),w.buf.slice(w.pos,w.length)],r.pos+w.length-w.pos)}(e);return Buffer.concat([r.buf.slice(0,r.pos),d,p,g])}function p(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,o=e.ReadByte(),i=o;do{t[o]=1,n>0?(n--,o++):(o=e.ReadByte())==i+1&&(n=e.ReadByte()),i=o}while(0!=o);return t}function g(e,t){var r=new Array(256),n=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var o=p(e);for(n=0;n<256;n++)o[n]>0&&(t[n]=e.ReadUint7());for(m(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,n);for(var i=a(n,12),l=new Array(4),u=0;u<4;u++)l[u]=e.ReadUint32();var c=new Buffer.allocUnsafe(t);for(u=0;u<t;u++){var h=u%4,d=i[o(l[h],12)];c[u]=d,l[h]=s(l[h],n[d],r[d],12),l[h]=f(e,l[h])}return c}function y(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];const o=1<<t;var i=o/r;do{var a=0,s=0,f=0;for(r=0,n=0;n<256;n++)0!=e[n]&&(a<e[n]&&(a=e[n],s=n),e[n]=Math.floor(e[n]*i),0==e[n]&&(e[n]=1),r+=e[n]);r<o?e[s]+=o-r:r-o<e[s]/2&&e[s]>2?e[s]-=r-o:r!=o&&(i=o/r,f=1)}while(f)}function m(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<<t){for(var o=0;r<1<<t;)r*=2,o++;for(n=0;n<256;n++)e[n]<<=o}}function b(e,t){for(var r=0,n=0;n<256;n++)if(t[n])if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function v(e){const t=e.length;var r=new n("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++}(e,o);var i=Math.ceil(Math.log2(t));i>12&&(i=12),y(o,i),function(e,t){b(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),y(o,12);var a=new Array(256);a[0]=0;for(var s=1;s<256;s++)a[s]=a[s-1]+o[s-1];var f=new Array(4);for(s=0;s<4;s++)f[s]=32768;var c=new n("",1.05*t+100>>0,1.05*t+100>>0);for(s=t-1;s>=0;s--)f[s%4]=u(f[s%4],c,a[e[s]],o[e[s]],12);for(s=3;s>=0;s--)l(f[s],c);return Buffer.concat([r.buf.slice(0,r.pos),c.buf.slice(c.pos,c.length)],r.pos+c.length-c.pos)}e.exports={decode:function(e){return h(new n(e),0)},encode:d}},2881:(e,t,r)=>{const n=r(9260),o=r(594);var i=new(r(445));function a(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r}function s(e,t,r,n){var o=e[0][0].ReadByte(),i=n-e[0][o].ReadUint32();if(5==o)return t[n]=t[i],r[n]=r[i],t[n];var s=1;t[n]="",r[n]=new Array(256);do{switch(o=e[s][0].ReadByte()){case 2:r[n][s]=e[s][2].ReadChar();break;case 1:r[n][s]=e[s][1].ReadString();break;case 7:r[n][s]=e[s][7].ReadUint32();break;case 3:var f=e[s][3].ReadUint32(),l=e[s][4].ReadByte();r[n][s]=a(f,l);break;case 8:r[n][s]=(r[i][s]>>0)+e[s][8].ReadByte();break;case 9:f=(r[i][s]>>0)+e[s][9].ReadByte(),l=r[i][s].length,r[n][s]=a(f,l);break;case 10:r[n][s]=r[i][s];break;default:r[n][s]=""}t[n]+=r[n][s++]}while(12!=o);return t[n]}function f(e,t,r,n,o,i){for(var a=0;a<n.length;a++)if(!(r>0&&5==t[a][0].type)&&t[a][r])switch(e[0].WriteByte(t[a][r].type),t[a][r].type){case 6:e[6].WriteUint32(t[a][r].val);break;case 5:e[5].WriteUint32(t[a][r].val);break;case 1:e[1].WriteString(t[a][r].val);break;case 2:e[2].WriteChar(t[a][r].val);break;case 7:e[7].WriteUint32(t[a][r].val);break;case 3:e[3].WriteUint32(t[a][r].val),e[4].WriteByte(t[a][r].val.length);break;case 8:case 9:e[t[a][r].type].WriteByte(t[a][r].val)}}function l(e,t,r,n){for(var o=0;o<=12;o++)if(!(e[o].pos<=0)){n.WriteByte(o+(0==o?128:0)),e[o]=e[o].buf.slice(0,e[o].pos);var i=u(e[o],r);n.WriteUint7(i.length),n.WriteData(i,i.length)}}function u(e,t){var r,n=1<<30,a=[0,1,64,65,128,129,201];for(var s in a){var f=a[s];if(!(1&f&&e.length<100||8&f&&e.length%4!=0)){try{var l=t?i.encode(e,f):o.encode(e,f)}catch(e){l=0}l&&n>l.length&&(n=l.length,r=l)}}return r}function c(e,t,r,n,o){var i=0,a=o-1;e[o]=new Array(256),t[n]?e[o][0]={type:5,val:o-t[n]}:e[o][0]={type:6,val:0==o?0:1},t[n]=o;for(var s=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),f=0;f<s.length;f++){var l=f+1,u=1,c=s[f];if(s[f].match(/^0+[0-9]*$/g)?u=3:s[f].match(/^[0-9]+$/g)?u=7:1==s[f].length&&(u=2),a>=0&&e[a][l])if(e[a][l].str==s[f])u=10,c="";else if(7==e[a][l].type||8==e[a][l].type){var h=c-e[a][l].str;r[l]++,h>=0&&h<256&&r[l]>o/2&&(u=8,c=h)}else 3!=e[a][l].type&&9!=e[a][l].type||e[a][l].str.length!=c.length||(h=c-e[a][l].str,r[l]++,h>=0&&h<256&&r[l]>o/2&&(u=9,c=h));e[o][l]={str:s[f],val:c,type:u},i<e[o][l].val.length+3&&(i=e[o][l].val.length+3)}return e[o][++l]={type:12},[l+1,i]}e.exports={encode:function(e,t){var r=e.toString();"\n"==r[r.length-1]&&(r=r.substring(0,r.length-1));var o=r.split("\n"),i=new n("",0,2*r.length+1e4);i.WriteUint32(r.length),i.WriteUint32(o.length),i.WriteByte(t);for(var a=new Array(o.length),s={},u=new Array(256).fill(0),h=0,d=0,p=0;p<o.length;p++){var[g,y]=c(a,s,u,o[p],p);h<g&&(h=g),d<y&&(d=y)}for(var m=0;m<h;m++){for(var b=new Array(13),v=0;v<=12;v++)b[v]=new n("",0,o.length*d);f(b,a,m,o),l(b,0,t,i)}return i.buf.slice(0,i.pos)},decode:function(e,t,r){(e=new n(e)).ReadUint32();var a=e.ReadUint32(),f=e.ReadByte(),l=function(e,t,r,a){for(var s=-1,f=new Array(256);!e.EOF();){var l=e.ReadByte(),u=128&l,c=64&l,h=63&l;if(u&&(f[++s]=new Array(13)),0!=h&&u){var d=new Array(a-1).fill(10);f[s][0]=new n(Buffer.from([h].concat(d)))}if(c){var p=e.ReadByte(),g=e.ReadByte();f[s][h]=new n(f[p][g].buf)}else{var y=e.ReadUint7(),m=e.ReadData(y);f[s][h]=r?i.decode(m):o.decode(m),f[s][h]=new n(f[s][h])}}return f}(e,0,f,a),u=new Array(a),c=new Array(a),h="";void 0===r&&(r="\n");for(var d=0;d<a;d++)h+=s(l,u,c,d)+r;return h}}},1422:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8904),i=n(r(9049)),a=n(r(450));class s{constructor({fill:e,cache:t}){if("function"!=typeof e)throw new TypeError("must pass a fill function");if("object"!=typeof t)throw new TypeError("must pass a cache object");if("function"!=typeof t.get||"function"!=typeof t.set||"function"!=typeof t.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=t,this.fillCallback=e}static isAbortException(e){return"AbortError"===e.name||"ERR_ABORTED"===e.code||"AbortError: aborted"===e.message||"Error: aborted"===e.message}evict(e,t){this.cache.get(e)===t&&this.cache.delete(e)}fill(e,t,r,n){const o=new i.default,s=new a.default;s.addCallback(n);const f={aborter:o,promise:this.fillCallback(t,o.signal,(e=>{s.callback(e)})),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};f.aborter.addSignal(r),f.aborter.signal.addEventListener("abort",(()=>{f.settled||this.evict(e,f)})),f.promise.then((()=>{f.settled=!0}),(()=>{f.settled=!0,this.evict(e,f)})).catch((e=>{throw console.error(e),e})),this.cache.set(e,f)}static checkSinglePromise(e,t){function r(){if(t&&t.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then((e=>(r(),e)),(e=>{throw r(),e}))}has(e){return this.cache.has(e)}get(e,t,r,n){if(!r&&t instanceof o.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,t,r,n)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(n),s.checkSinglePromise(i.promise,r)):(this.fill(e,t,r,n),s.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const t=this.cache.get(e);t&&(t.settled||t.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let t=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),t+=1;return t}}t.default=s},9049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8904);class o{}t.default=class{constructor(){this.signals=new Set,this.abortController=new n.AbortController}addSignal(e=new o){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):"function"==typeof e.addEventListener&&e.addEventListener("abort",(()=>{this.handleAborted(e)}))}handleAborted(e){this.signals.delete(e),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}},450:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.callbacks=new Set}addCallback(e=(()=>{})){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e,this.callbacks.forEach((t=>{t(e)}))}}},8904:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbortSignal=t.AbortController=void 0;const n=r(5988);var o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")};let i=void 0===o().AbortController?n.AbortController:o().AbortController;t.AbortController=i;let a=void 0===o().AbortController?n.AbortSignal:o().AbortSignal;t.AbortSignal=a},4105:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1422));t.default=o.default},5988:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(){r(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return o(e,[{key:"addEventListener",value:function(e,t,r){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:r})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var r=this.listeners[e],n=0,o=r.length;n<o;n++)if(r[n].callback===t)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(e){if(e.type in this.listeners){for(var t=this.listeners[e.type].slice(),r=0,n=t.length;r<n;r++){var o=t[r];try{o.callback.call(this,e)}catch(e){Promise.resolve().then((function(){throw e}))}o.options&&o.options.once&&this.removeEventListener(e.type,o.callback)}return!e.defaultPrevented}}}]),e}(),u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(c,e);var t,n,u=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=i(t);if(n){var o=i(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}(this,e)});function c(){var e;return r(this,c),(e=u.call(this)).listeners||l.call(s(e)),Object.defineProperty(s(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(e),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(s(e),"reason",{value:void 0,writable:!0,configurable:!0}),e}return o(c,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),f(i(c.prototype),"dispatchEvent",this).call(this,e)}}]),c}(l),c=function(){function e(){r(this,e),Object.defineProperty(this,"signal",{value:new u,writable:!0,configurable:!0})}return o(e,[{key:"abort",value:function(e){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}var r=e;if(void 0===r)if("undefined"==typeof document)(r=new Error("This operation was aborted")).name="AbortError";else try{r=new DOMException("signal is aborted without reason")}catch(e){(r=new Error("This operation was aborted")).name="AbortError"}this.signal.reason=r,this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(c.prototype[Symbol.toStringTag]="AbortController",u.prototype[Symbol.toStringTag]="AbortSignal"),t.AbortController=c,t.AbortSignal=u,t.abortableFetch=function(e){"function"==typeof e&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=void 0===n?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=void 0!==a&&a;if(!function(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||s)&&((f=function(e,t){var r;t&&t.signal&&(r=t.signal,delete t.signal);var n=new o(e,t);return r&&Object.defineProperty(n,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),n}).prototype=o.prototype);var l=r;return{fetch:function(e,t){var r=f&&f.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(r){var n;try{n=new DOMException("Aborted","AbortError")}catch(e){(n=new Error("Aborted")).name="AbortError"}if(r.aborted)return Promise.reject(n);var o=new Promise((function(e,t){r.addEventListener("abort",(function(){return t(n)}),{once:!0})}));return t&&t.signal&&delete t.signal,Promise.race([o,l(e,t)])}return l(e,t)},Request:f}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],f=i[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,f)),u=0,c=f>0?a-4:a;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===f&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===f&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,l=n-o;s<l;s+=a)i.push(f(e,s,s+a>l?l:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2779:(e,t,r)=>{var n=r(8764).Buffer,o=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function i(e){if(n.isBuffer(e))return e;var t="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof e)return t?n.alloc(e):new n(e);if("string"==typeof e)return t?n.from(e):new n(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function a(e,t){e=i(e),n.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,a=0;a<e.length;a++)r=o[255&(r^e[a])]^r>>>8;return-1^r}function s(){return e=a.apply(null,arguments),(t=i(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(o=new Int32Array(o)),s.signed=function(){return a.apply(null,arguments)},s.unsigned=function(){return a.apply(null,arguments)>>>0},e.exports=s},8764:(e,t,r)=>{"use strict";const n=r(9742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=function(e){return+e!=e&&(e=0),f.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,f.prototype),t}function f(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return f.from(n,t,r);const o=function(e){if(f.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return f.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,f.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(e).length;default:if(o)return n?-1:V(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!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))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){let i,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(l(e,i)===l(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===f)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+f>s&&(r=s-f),i=r;i>=0;i--){let r=!0;for(let n=0;n<f;n++)if(l(e,i+n)!==l(t,n)){r=!1;break}if(r)return i}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Y(n))return a;e[r+a]=n}return a}function _(e,t,r,n){return G(V(t,e.length-r),e,r,n)}function S(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return G(Z(t),e,r,n)}function E(e,t,r,n){return G(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function B(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,f;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(f=(31&t)<<6|63&r,f>127&&(i=f));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(f=(15&t)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(i=f));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(f=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,f>65535&&f<1114112&&(i=f))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.kMaxLength=a,f.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},f.allocUnsafe=function(e){return c(e)},f.allocUnsafeSlow=function(e){return c(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if(Q(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),Q(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=f.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Q(t,Uint8Array))o+t.length>n.length?(f.isBuffer(t)||(t=f.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!f.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},f.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},f.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},f.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):y.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(e,t,r,n,o){if(Q(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),l=this.slice(n,o),u=e.slice(t,r);for(let e=0;e<s;++e)if(l[e]!==u[e]){i=l[e],a=u[e];break}return i<a?-1:a<i?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},f.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function k(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function x(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=K[e[n]];return o}function M(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,r,n,o,i){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n,o){q(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function T(e,t,r,n,o){q(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function U(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,8),o.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUintLE=f.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},f.prototype.readUintBE=f.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readBigUInt64LE=X((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),f.prototype.readBigUInt64BE=X((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),f.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},f.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readBigInt64LE=X((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),f.prototype.readBigInt64BE=X((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),f.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),o.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),o.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),o.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),o.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigUInt64LE=X((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeBigUInt64BE=X((function(e,t=0){return T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);F(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);F(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigInt64LE=X((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeBigInt64BE=X((function(e,t=0){return T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},f.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=f.isBuffer(e)?e:f.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const j={};function z(e,t,r){j[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new j.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,o,i)}function W(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new j.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=D(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=D(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},4693:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(o){for(var i=0;o>0;){var a=8-t;o>=a?(i<<=a,i|=n[a]&e[r++],t=0,o-=a):(i<<=o,i|=(e[r]&n[o]<<8-o-t)>>8-o-t,t+=o,o=0)}return i}},simple:function(e){var r,n,o=t.header(e),i=[],a=0;do{-1!=(n=t.decompress(e,o))&&(i.push(n),a+=n.byteLength)}while(-1!=n);r=new Uint8Array(a),a=0;for(var s=0;s<i.length;++s)n=i[s],r.set(n,a),a+=n.byteLength;return r},header:function(e){if(4348520!=e(24))throw"No magic number found";var t=e(8)-48;if(t<1||t>9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,o="",i=0;i<6;i++)o+=e(8).toString(16);if("177245385090"==o)return-1;if("314159265359"!=o)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var a=e(24);if(a>n)throw"Initial position larger than buffer size";var s=e(16),f=new Uint8Array(256),l=0;for(i=0;i<16;i++)if(s&1<<15-i){var u=e(16);for(g=0;g<16;g++)u&1<<15-g&&(f[l++]=16*i+g)}var c=e(3);if(c<2||c>6)throw"another error";var h=e(15);if(0==h)throw"meh";var d=[];for(i=0;i<c;i++)d[i]=i;var p=new Uint8Array(32768);for(i=0;i<h;i++){for(var g=0;e(1);g++)if(g>=c)throw"whoops another error";var y=d[g];d.splice(g,1),d.splice(0,0,y),p[i]=y}var m=l+2,b=[];for(g=0;g<c;g++){var v,w,_,S=new Uint8Array(258),A=new Uint8Array(21);for(s=e(5),i=0;i<m;i++){for(;;){if(s<1||s>20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?s--:s++}S[i]=s}for(v=w=S[0],i=1;i<m;i++)S[i]>w?w=S[i]:S[i]<v&&(v=S[i]);(_=b[g]={}).permute=new Uint32Array(258),_.limit=new Uint32Array(21),_.base=new Uint32Array(21),_.minLen=v,_.maxLen=w;var E=_.base.subarray(1),B=_.limit.subarray(1),C=0;for(i=v;i<=w;i++)for(s=0;s<m;s++)S[s]==i&&(_.permute[C++]=s);for(i=v;i<=w;i++)A[i]=B[i]=0;for(i=0;i<m;i++)A[S[i]]++;for(C=s=0,i=v;i<w;i++)C+=A[i],B[i]=C-1,C<<=1,E[i+1]=C-(s+=A[i]);B[w]=C+A[w]-1,E[v]=0}var R,k,x,I=new Uint32Array(256);for(i=0;i<256;i++)d[i]=i;R=k=m=x=0;for(var M=new Uint32Array(n);;){if(!m--){if(m=49,x>=h)throw"meow i'm a kitty, that's an error";E=(_=b[p[x++]]).base.subarray(1),B=_.limit.subarray(1)}for(g=e(i=_.minLen);;){if(i>_.maxLen)throw"rawr i'm a dinosaur";if(g<=B[i])break;i++,g=g<<1|e(1)}if((g-=E[i])<0||g>=258)throw"moo i'm a cow";var O=_.permute[g];if(0!=O&&1!=O){if(R){if(R=0,k+s>=n)throw"Boom.";for(I[y=f[d[0]]]+=s;s--;)M[k++]=y}if(O>l)break;if(k>=n)throw"I can't think of anything. Error";y=d[i=O-1],d.splice(i,1),d.splice(0,0,y),I[y=f[y]]++,M[k++]=y}else R||(R=1,s=0),s+=0==O?R:2*R,R<<=1}if(a<0||a>=k)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,i=0;i<256;i++)u=g+I[i],I[i]=g,g=u;for(i=0;i<k;i++)M[I[y=255&M[i]]]|=i<<8,I[y]++;var F=0,P=0,T=0;k&&(P=255&(F=M[a]),F>>=8,T=-1);var U,N,L,j=new Uint8Array(n),z=0;for(r||(r=1/0);k;){for(k--,N=P,P=255&(F=M[F]),F>>=8,3==T++?(U=P,L=N,P=-1):(U=1,L=P);U--;)if(j[z++]=L,!--r)return j;P!=N&&(T=0)}return j.subarray(0,z)}};e.exports=t},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),f=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(n,a,arguments);return f&&l&&f(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var c=function(){return s(n,i,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},1012:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],i=0;i<4;i++)8*n+6*i<=8*e.length?r.push(t.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}},e.exports=r},7648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),s=[],f=0;f<a;f++)s.push("$"+f);if(o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},2949:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>l,LocalFile:()=>o(),RemoteFile:()=>s,fromUrl:()=>u,open:()=>c});var n=r(7067),o=r.n(n),i=r(8764);const a="undefined"!=typeof window?window:"undefined"!=typeof self?self:{fetch:void 0};class s{async getBufferFromResponse(e){if("function"==typeof e.buffer)return e.buffer();if("function"==typeof e.arrayBuffer){const t=await e.arrayBuffer();return i.Buffer.from(t)}throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method")}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||a.fetch&&a.fetch.bind(a);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw n;console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(e,{...t,cache:"reload"})}return r}async read(e,t=0,r,n=0,o={}){const{headers:i={},signal:a,overrides:s={}}=o;r<1/0?i.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(i.range=`bytes=${n}-`);const f={...this.baseOverrides,...s,headers:{...i,...s.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a},l=await this.fetch(this.url,f);if(!l.ok)throw new Error(`HTTP ${l.status} ${l.statusText} ${this.url}`);if(200===l.status&&0===n||206===l.status){const n=await this.getBufferFromResponse(l),o=n.copy(e,t,0,Math.min(r,n.length)),i=l.headers.get("content-range"),a=/\/(\d+)$/.exec(i||"");return a&&a[1]&&(this._stat={size:parseInt(a[1],10)}),{bytesRead:o,buffer:e}}if(200===l.status)throw new Error("${this.url} fetch returned status 200, expected 206");throw new Error(`HTTP ${l.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:o,overrides:i={}}=r,a={headers:n,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...i},s=await this.fetch(this.url,a);if(!s)throw new Error("generic-filehandle failed to fetch");if(200!==s.status)throw Object.assign(new Error(`HTTP ${s.status} fetching ${this.url}`),{status:s.status});if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=i.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function f(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class l{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const o=n,a=o+r,s=await f(this.blob.slice(o,a)),l=i.Buffer.from(s);return{bytesRead:l.copy(e,t),buffer:l}}async readFile(e){let t;if(t="string"==typeof e?e:e&&e.encoding,"utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await f(this.blob);return i.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function u(e,t={}){return new s(e,t)}function c(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return u(e,n);if(void 0!==t)return new(o())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var l=function(){throw new a},u=f?function(){try{return l}catch(e){try{return f(arguments,"callee").get}catch(e){return l}}}():l,c=r(5295)(),h=r(8185)(),d=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),p={},g="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":c&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&d?d(""[Symbol.iterator]()):n,"%Symbol%":c?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));y["%Error.prototype%"]=m}var b=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&d&&(r=d(o.prototype))}return y[t]=r,r},v={"%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"]},w=r(8612),_=r(7642),S=w.call(Function.call,Array.prototype.concat),A=w.call(Function.apply,Array.prototype.splice),E=w.call(Function.call,String.prototype.replace),B=w.call(Function.call,String.prototype.slice),C=w.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,x=function(e,t){var r,n=e;if(_(v,n)&&(n="%"+(r=v[n])[0]+"%"),_(y,n)){var i=y[n];if(i===p&&(i=b(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=B(e,0,1),r=B(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,R,(function(e,t,r,o){n[n.length]=r?E(o,k,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=x("%"+n+"%",t),s=i.name,l=i.value,u=!1,c=i.alias;c&&(n=c[0],A(r,S([0,1],c)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],g=B(p,0,1),m=B(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===m||"'"===m||"`"===m)&&g!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==p&&d||(u=!0),_(y,s="%"+(n+="."+p)+"%"))l=y[s];else if(null!=l){if(!(p in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&h+1>=r.length){var b=f(l,p);l=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[p]}else d=_(l,p),l=l[p];d&&!u&&(y[s]=l)}}return l}},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},5295:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,f=(1<<s)-1,l=f>>1,u=-7,c=r?o-1:0,h=r?-1:1,d=e[t+c];for(c+=h,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+c],c+=h,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===i)i=1-l;else{if(i===f)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=l}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,f,l=8*i-o-1,u=(1<<l)-1,c=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(t*f-1)*Math.pow(2,o),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*g}},3720:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var o={},i={};function a(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=i[e])?n:(r=f(e,(0|e)<0?-1:0,!0),a&&(i[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=f(e,e<0?-1:0,!1),a&&(o[e]=r),r)}function s(e,t){if(isNaN(e))return t?m:y;if(t){if(e<0)return m;if(e>=d)return S}else{if(e<=-p)return A;if(e+1>=p)return _}return e<0?s(-e,t).neg():f(e%h|0,e/h|0,t)}function f(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=f;var l=Math.pow;function u(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return y;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(e.substring(1),t,r).neg();for(var o=s(l(r,8)),i=y,a=0;a<e.length;a+=8){var f=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+f),r);if(f<8){var h=s(l(r,f));i=i.mul(h).add(s(c))}else i=(i=i.mul(o)).add(s(c))}return i.unsigned=t,i}function c(e,t){return"number"==typeof e?s(e,t):"string"==typeof e?u(e,t):f(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=u,r.fromValue=c;var h=4294967296,d=h*h,p=d/2,g=a(1<<24),y=a(0);r.ZERO=y;var m=a(0,!0);r.UZERO=m;var b=a(1);r.ONE=b;var v=a(1,!0);r.UONE=v;var w=a(-1);r.NEG_ONE=w;var _=f(-1,2147483647,!1);r.MAX_VALUE=_;var S=f(-1,-1,!0);r.MAX_UNSIGNED_VALUE=S;var A=f(0,-2147483648,!1);r.MIN_VALUE=A;var E=r.prototype;E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(A)){var t=s(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=s(l(e,6),this.unsigned),i=this,a="";;){var f=i.div(o),u=(i.sub(f.mul(o)).toInt()>>>0).toString(e);if((i=f).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(A)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},E.isZero=function(){return 0===this.high&&0===this.low},E.eqz=E.isZero,E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(e){return n(e)||(e=c(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(n(e)||(e=c(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(A)?A:this.not().add(b)},E.neg=E.negate,E.add=function(e){n(e)||(e=c(e));var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,l=e.low>>>16,u=0,h=0,d=0,p=0;return d+=(p+=i+(65535&e.low))>>>16,h+=(d+=o+l)>>>16,u+=(h+=r+s)>>>16,u+=t+a,f((d&=65535)<<16|(p&=65535),(u&=65535)<<16|(h&=65535),this.unsigned)},E.subtract=function(e){return n(e)||(e=c(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return y;if(n(e)||(e=c(e)),t)return f(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(A))return e.isOdd()?A:y;if(e.eq(A))return this.isOdd()?A:y;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return s(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,l=e.high>>>16,u=65535&e.high,h=e.low>>>16,d=65535&e.low,p=0,m=0,b=0,v=0;return b+=(v+=a*d)>>>16,m+=(b+=i*d)>>>16,b&=65535,m+=(b+=a*h)>>>16,p+=(m+=o*d)>>>16,m&=65535,p+=(m+=i*h)>>>16,m&=65535,p+=(m+=a*u)>>>16,p+=r*d+o*h+i*u+a*l,f((b&=65535)<<16|(v&=65535),(p&=65535)<<16|(m&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(n(e)||(e=c(e)),e.isZero())throw Error("division by zero");var r,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?f((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:y;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return v;i=m}else{if(this.eq(A))return e.eq(b)||e.eq(w)?A:e.eq(A)?b:(r=this.shr(1).div(e).shl(1)).eq(y)?e.isNegative()?b:w:(o=this.sub(e.mul(r)),i=r.add(o.div(e)));if(e.eq(A))return this.unsigned?m:y;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=y}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:l(2,a-48),h=s(r),d=h.mul(e);d.isNegative()||d.gt(o);)d=(h=s(r-=u,this.unsigned)).mul(e);h.isZero()&&(h=b),i=i.add(h),o=o.sub(d)}return i},E.div=E.divide,E.modulo=function(e){return n(e)||(e=c(e)),t?f((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return f(~this.low,~this.high,this.unsigned)},E.and=function(e){return n(e)||(e=c(e)),f(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return n(e)||(e=c(e)),f(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return n(e)||(e=c(e)),f(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?f(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):f(0,this.low<<e-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?f(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):f(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?f(this.low>>>e|t<<32-e,t>>>e,this.unsigned):f(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?f(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:f(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},2568:(e,t,r)=>{var n,o,i,a,s;n=r(1012),o=r(487).utf8,i=r(76),a=r(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),f=8*e.length,l=1732584193,u=-271733879,c=-1732584194,h=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[f>>>5]|=128<<f%32,r[14+(f+64>>>9<<4)]=f;var p=s._ff,g=s._gg,y=s._hh,m=s._ii;for(d=0;d<r.length;d+=16){var b=l,v=u,w=c,_=h;l=p(l,u,c,h,r[d+0],7,-680876936),h=p(h,l,u,c,r[d+1],12,-389564586),c=p(c,h,l,u,r[d+2],17,606105819),u=p(u,c,h,l,r[d+3],22,-1044525330),l=p(l,u,c,h,r[d+4],7,-176418897),h=p(h,l,u,c,r[d+5],12,1200080426),c=p(c,h,l,u,r[d+6],17,-1473231341),u=p(u,c,h,l,r[d+7],22,-45705983),l=p(l,u,c,h,r[d+8],7,1770035416),h=p(h,l,u,c,r[d+9],12,-1958414417),c=p(c,h,l,u,r[d+10],17,-42063),u=p(u,c,h,l,r[d+11],22,-1990404162),l=p(l,u,c,h,r[d+12],7,1804603682),h=p(h,l,u,c,r[d+13],12,-40341101),c=p(c,h,l,u,r[d+14],17,-1502002290),l=g(l,u=p(u,c,h,l,r[d+15],22,1236535329),c,h,r[d+1],5,-165796510),h=g(h,l,u,c,r[d+6],9,-1069501632),c=g(c,h,l,u,r[d+11],14,643717713),u=g(u,c,h,l,r[d+0],20,-373897302),l=g(l,u,c,h,r[d+5],5,-701558691),h=g(h,l,u,c,r[d+10],9,38016083),c=g(c,h,l,u,r[d+15],14,-660478335),u=g(u,c,h,l,r[d+4],20,-405537848),l=g(l,u,c,h,r[d+9],5,568446438),h=g(h,l,u,c,r[d+14],9,-1019803690),c=g(c,h,l,u,r[d+3],14,-187363961),u=g(u,c,h,l,r[d+8],20,1163531501),l=g(l,u,c,h,r[d+13],5,-1444681467),h=g(h,l,u,c,r[d+2],9,-51403784),c=g(c,h,l,u,r[d+7],14,1735328473),l=y(l,u=g(u,c,h,l,r[d+12],20,-1926607734),c,h,r[d+5],4,-378558),h=y(h,l,u,c,r[d+8],11,-2022574463),c=y(c,h,l,u,r[d+11],16,1839030562),u=y(u,c,h,l,r[d+14],23,-35309556),l=y(l,u,c,h,r[d+1],4,-1530992060),h=y(h,l,u,c,r[d+4],11,1272893353),c=y(c,h,l,u,r[d+7],16,-155497632),u=y(u,c,h,l,r[d+10],23,-1094730640),l=y(l,u,c,h,r[d+13],4,681279174),h=y(h,l,u,c,r[d+0],11,-358537222),c=y(c,h,l,u,r[d+3],16,-722521979),u=y(u,c,h,l,r[d+6],23,76029189),l=y(l,u,c,h,r[d+9],4,-640364487),h=y(h,l,u,c,r[d+12],11,-421815835),c=y(c,h,l,u,r[d+15],16,530742520),l=m(l,u=y(u,c,h,l,r[d+2],23,-995338651),c,h,r[d+0],6,-198630844),h=m(h,l,u,c,r[d+7],10,1126891415),c=m(c,h,l,u,r[d+14],15,-1416354905),u=m(u,c,h,l,r[d+5],21,-57434055),l=m(l,u,c,h,r[d+12],6,1700485571),h=m(h,l,u,c,r[d+3],10,-1894986606),c=m(c,h,l,u,r[d+10],15,-1051523),u=m(u,c,h,l,r[d+1],21,-2054922799),l=m(l,u,c,h,r[d+8],6,1873313359),h=m(h,l,u,c,r[d+15],10,-30611744),c=m(c,h,l,u,r[d+6],15,-1560198380),u=m(u,c,h,l,r[d+13],21,1309151649),l=m(l,u,c,h,r[d+4],6,-145523070),h=m(h,l,u,c,r[d+11],10,-1120210379),c=m(c,h,l,u,r[d+2],15,718787259),u=m(u,c,h,l,r[d+9],21,-343485551),l=l+b>>>0,u=u+v>>>0,c=c+w>>>0,h=h+_>>>0}return n.endian([l,u,c,h])})._ff=function(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._gg=function(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._hh=function(e,t,r,n,o,i,a){var s=e+(t^r^n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._ii=function(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},76:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,f=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&f&&"function"==typeof f.get?f.get:null,u=s&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,S=RegExp.prototype.test,A=Array.prototype.concat,E=Array.prototype.join,B=Array.prototype.slice,C=Math.floor,R="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function P(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-C(-e):C(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var T=r(4654),U=T.custom,N=q(U)?U:null;function L(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function j(e){return v.call(String(e),/"/g,""")}function z(e){return!("[object Array]"!==$(e)||M&&"object"==typeof e&&M in e)}function D(e){return!("[object RegExp]"!==$(e)||M&&"object"==typeof e&&M in e)}function q(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Z(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return g?P(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return g?P(t,S):S}var C=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=C&&C>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var k,U=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(V(o,t)>=0)return"[Circular]";function W(t,r,i){if(r&&(o=B.call(o)).push(r),i){var a={depth:s.depth};return H(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t&&!D(t)){var G=function(e){if(e.name)return e.name;var t=m.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=J(t,W);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(ee.length>0?" { "+E.call(ee,", ")+" }":"")}if(q(t)){var te=I?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!=typeof t||I?te:Q(te)}if((k=t)&&"object"==typeof k&&("undefined"!=typeof HTMLElement&&k instanceof HTMLElement||"string"==typeof k.nodeName&&"function"==typeof k.getAttribute)){for(var re="<"+_.call(String(t.nodeName)),ne=t.attributes||[],oe=0;oe<ne.length;oe++)re+=" "+ne[oe].name+"="+L(j(ne[oe].value),"double",s);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+_.call(String(t.nodeName))+">"}if(z(t)){if(0===t.length)return"[]";var ie=J(t,W);return U&&!function(e){for(var t=0;t<e.length;t++)if(V(e[t],"\n")>=0)return!1;return!0}(ie)?"["+X(ie,U)+"]":"[ "+E.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==$(e)||M&&"object"==typeof e&&M in e)}(t)){var ae=J(t,W);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ae,", ")+" }":"{ ["+String(t)+"] "+E.call(A.call("[cause]: "+W(t.cause),ae),", ")+" }"}if("object"==typeof t&&f){if(N&&"function"==typeof t[N]&&T)return T(t,{depth:C-n});if("symbol"!==f&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,r){se.push(W(r,t,!0)+" => "+W(e,t))})),K("Map",i.call(t),se,U)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var fe=[];return u&&u.call(t,(function(e){fe.push(W(e,t))})),K("Set",l.call(t),fe,U)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==$(e)||M&&"object"==typeof e&&M in e)}(t))return Q(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}(t))return Q(W(R.call(t)));if(function(e){return!("[object Boolean]"!==$(e)||M&&"object"==typeof e&&M in e)}(t))return Q(p.call(t));if(function(e){return!("[object String]"!==$(e)||M&&"object"==typeof e&&M in e)}(t))return Q(W(String(t)));if(!function(e){return!("[object Date]"!==$(e)||M&&"object"==typeof e&&M in e)}(t)&&!D(t)){var le=J(t,W),ue=F?F(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",he=!ue&&M&&Object(t)===t&&M in t?b.call($(t),8,-1):ce?"Object":"",de=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||ce?"["+E.call(A.call([],he||[],ce||[]),": ")+"] ":"");return 0===le.length?de+"{}":U?de+"{"+X(le,U)+"}":de+"{ "+E.call(le,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return W.call(e,t)}function $(e){return g.call(e)}function V(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Z(b.call(e,0,t.maxStringLength),t)+n}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G),"single",t)}function G(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function K(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):E.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function J(e,t){var r=z(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=H(e,o)?t(e[o],e):""}var i,a="function"==typeof k?k(e):[];if(I){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var f in e)H(e,f)&&(r&&String(Number(f))===f&&f<e.length||I&&i["$"+f]instanceof Symbol||(S.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if("function"==typeof k)for(var l=0;l<a.length;l++)O.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}},9591:(e,t,r)=>{"use strict";var n={};(0,r(4236).assign)(n,r(4555),r(8843),r(1619)),e.exports=n},4555:(e,t,r)=>{"use strict";var n=r(405),o=r(4236),i=r(9373),a=r(8898),s=r(2292),f=Object.prototype.toString,l=0,u=-1,c=0,h=8;function d(e){if(!(this instanceof d))return new d(e);this.options=o.assign({level:u,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===f.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==l)throw new Error(a[r]);this._dict_set=!0}}function p(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}d.prototype.push=function(e,t){var r,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=i.string2buf(e):"[object ArrayBuffer]"===f.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new o.Buf8(u),s.next_out=0,s.avail_out=u),1!==(r=n.deflate(s,a))&&r!==l)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(s.output,s.next_out))):this.onData(o.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==a||(this.onEnd(l),s.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=d,t.deflate=p,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},8843:(e,t,r)=>{"use strict";var n=r(7948),o=r(4236),i=r(9373),a=r(1619),s=r(8898),f=r(2292),l=r(2401),u=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,f,l,c,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new o.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===g&&(r=a.Z_OK,g=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(f=i.utf8border(h.output,h.next_out),l=h.next_out-f,c=i.buf2string(h.output,f),h.next_out=l,h.avail_out=d-l,l&&o.arraySet(h.output,h.output,f,l,0),this.onData(c)):this.onData(o.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=c,t.inflate=h,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.ungzip=h},4236:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(e[o]=r[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},9373:(e,t,r)=>{"use strict";var n=r(4236),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function f(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,t.string2buf=function(e){var t,r,o,i,a,s=e.length,f=0;for(i=0;i<s;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),f+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(f),a=0,i=0;a<f;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return f(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,o,i,s=t||e.length,l=new Array(2*s);for(n=0,r=0;r<s;)if((o=e[r++])<128)l[n++]=o;else if((i=a[o])>4)l[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r<s;)o=o<<6|63&e[r++],i--;i>1?l[n++]=65533:o<65536?l[n++]=o:(o-=65536,l[n++]=55296|o>>10&1023,l[n++]=56320|1023&o)}return f(l,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},6069:e=>{"use strict";e.exports=function(e,t,r,n){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{i=i+(o=o+t[n++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,o){var i=t,a=o+n;e^=-1;for(var s=o;s<a;s++)e=e>>>8^i[255&(e^r[s])];return-1^e}},405:(e,t,r)=>{"use strict";var n,o=r(4236),i=r(342),a=r(6069),s=r(2869),f=r(8898),l=0,u=0,c=-2,h=2,d=8,p=286,g=30,y=19,m=2*p+1,b=15,v=3,w=258,_=w+v+1,S=42,A=103,E=113,B=666;function C(e,t){return e.msg=f[t],t}function R(e){return(e<<1)-(e>4?9:0)}function k(e){for(var t=e.length;--t>=0;)e[t]=0}function x(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function I(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,x(e.strm)}function M(e,t){e.pending_buf[e.pending++]=t}function O(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function F(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,o.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=a(e.adler,t,i,r):2===e.state.wrap&&(e.adler=s(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function P(e,t){var r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-_?e.strstart-(e.w_size-_):0,l=e.window,u=e.w_mask,c=e.prev,h=e.strstart+w,d=l[i+a-1],p=l[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(r=t)+a]===p&&l[r+a-1]===d&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&i<h);if(n=w-(h-i),i=h-w,n>a){if(e.match_start=t,a=n,n>=s)break;d=l[i+a-1],p=l[i+a]}}}while((t=c[t&u])>f&&0!=--o);return a<=e.lookahead?a:e.lookahead}function T(e){var t,r,n,i,a,s=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-_)){o.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=s?n-s:0}while(--r);t=r=s;do{n=e.prev[--t],e.prev[t]=n>=s?n-s:0}while(--r);i+=s}if(0===e.strm.avail_in)break;if(r=F(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=v)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+v-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<v)););}while(e.lookahead<_&&0!==e.strm.avail_in)}function U(e,t){for(var r,n;;){if(e.lookahead<_){if(T(e),e.lookahead<_&&t===l)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=v&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-_&&(e.match_length=P(e,r)),e.match_length>=v)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-v),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=v){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(I(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<v-1?e.strstart:v-1,4===t?(I(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(I(e,!1),0===e.strm.avail_out)?1:2}function N(e,t){for(var r,n,o;;){if(e.lookahead<_){if(T(e),e.lookahead<_&&t===l)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=v&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=v-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-_&&(e.match_length=P(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===v&&e.strstart-e.match_start>4096)&&(e.match_length=v-1)),e.prev_length>=v&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-v,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-v),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+v-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=v-1,e.strstart++,n&&(I(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&I(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<v-1?e.strstart:v-1,4===t?(I(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(I(e,!1),0===e.strm.avail_out)?1:2}function L(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=d,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*m),this.dyn_dtree=new o.Buf16(2*(2*g+1)),this.bl_tree=new o.Buf16(2*(2*y+1)),k(this.dyn_ltree),k(this.dyn_dtree),k(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(b+1),this.heap=new o.Buf16(2*p+1),k(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*p+1),k(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=h,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?S:E,e.adler=2===t.wrap?0:1,t.last_flush=l,i._tr_init(t),u):C(e,c)}function D(e){var t,r=z(e);return r===u&&((t=e.state).window_size=2*t.w_size,k(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=v-1,t.match_available=0,t.ins_h=0),r}function q(e,t,r,n,i,a){if(!e)return c;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||r!==d||n<8||n>15||t<0||t>9||a<0||a>4)return C(e,c);8===n&&(n=9);var f=new j;return e.state=f,f.strm=e,f.wrap=s,f.gzhead=null,f.w_bits=n,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=i+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+v-1)/v),f.window=new o.Buf8(2*f.w_size),f.head=new o.Buf16(f.hash_size),f.prev=new o.Buf16(f.w_size),f.lit_bufsize=1<<i+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new o.Buf8(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=t,f.strategy=a,f.method=r,D(e)}n=[new L(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(T(e),0===e.lookahead&&t===l)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,I(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-_&&(I(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(I(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),1)})),new L(4,4,8,4,U),new L(4,5,16,8,U),new L(4,6,32,32,U),new L(4,4,16,16,N),new L(8,16,32,32,N),new L(8,16,128,128,N),new L(8,32,128,256,N),new L(32,128,258,1024,N),new L(32,258,258,4096,N)],t.deflateInit=function(e,t){return q(e,t,d,15,8,0)},t.deflateInit2=q,t.deflateReset=D,t.deflateResetKeep=z,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,u):c},t.deflate=function(e,t){var r,o,a,f;if(!e||!e.state||t>5||t<0)return e?C(e,c):c;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===B&&4!==t)return C(e,0===e.avail_out?-5:c);if(o.strm=e,r=o.last_flush,o.last_flush=t,o.status===S)if(2===o.wrap)e.adler=0,M(o,31),M(o,139),M(o,8),o.gzhead?(M(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),M(o,255&o.gzhead.time),M(o,o.gzhead.time>>8&255),M(o,o.gzhead.time>>16&255),M(o,o.gzhead.time>>24&255),M(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),M(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(M(o,255&o.gzhead.extra.length),M(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(M(o,0),M(o,0),M(o,0),M(o,0),M(o,0),M(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),M(o,3),o.status=E);else{var h=d+(o.w_bits-8<<4)<<8;h|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(h|=32),h+=31-h%31,o.status=E,O(o,h),0!==o.strstart&&(O(o,e.adler>>>16),O(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),x(e),a=o.pending,o.pending!==o.pending_buf_size));)M(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),x(e),a=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,M(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===f&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),x(e),a=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,M(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===f&&(o.status=A)}else o.status=A;if(o.status===A&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&x(e),o.pending+2<=o.pending_buf_size&&(M(o,255&e.adler),M(o,e.adler>>8&255),e.adler=0,o.status=E)):o.status=E),0!==o.pending){if(x(e),0===e.avail_out)return o.last_flush=-1,u}else if(0===e.avail_in&&R(t)<=R(r)&&4!==t)return C(e,-5);if(o.status===B&&0!==e.avail_in)return C(e,-5);if(0!==e.avail_in||0!==o.lookahead||t!==l&&o.status!==B){var p=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(T(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(I(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(I(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(I(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,a,s=e.window;;){if(e.lookahead<=w){if(T(e),e.lookahead<=w&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=v&&e.strstart>0&&(n=s[o=e.strstart-1])===s[++o]&&n===s[++o]&&n===s[++o]){a=e.strstart+w;do{}while(n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&o<a);e.match_length=w-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=v?(r=i._tr_tally(e,1,e.match_length-v),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(I(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(I(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(I(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==p&&4!==p||(o.status=B),1===p||3===p)return 0===e.avail_out&&(o.last_flush=-1),u;if(2===p&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(k(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),x(e),0===e.avail_out))return o.last_flush=-1,u}return 4!==t?u:o.wrap<=0?1:(2===o.wrap?(M(o,255&e.adler),M(o,e.adler>>8&255),M(o,e.adler>>16&255),M(o,e.adler>>24&255),M(o,255&e.total_in),M(o,e.total_in>>8&255),M(o,e.total_in>>16&255),M(o,e.total_in>>24&255)):(O(o,e.adler>>>16),O(o,65535&e.adler)),x(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?u:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==S&&69!==t&&73!==t&&91!==t&&t!==A&&t!==E&&t!==B?C(e,c):(e.state=null,t===E?C(e,-3):u):c},t.deflateSetDictionary=function(e,t){var r,n,i,s,f,l,h,d,p=t.length;if(!e||!e.state)return c;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==S||r.lookahead)return c;for(1===s&&(e.adler=a(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===s&&(k(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new o.Buf8(r.w_size),o.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),f=e.avail_in,l=e.next_in,h=e.input,e.avail_in=p,e.next_in=0,e.input=t,T(r);r.lookahead>=v;){n=r.strstart,i=r.lookahead-(v-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+v-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--i);r.strstart=n,r.lookahead=v-1,T(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=v-1,r.match_available=0,e.next_in=l,e.input=h,e.avail_in=f,r.wrap=s,u},t.deflateInfo="pako deflate (from Nodeca project)"},2401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){var r,n,o,i,a,s,f,l,u,c,h,d,p,g,y,m,b,v,w,_,S,A,E,B,C;r=e.state,n=e.next_in,B=e.input,o=n+(e.avail_in-5),i=e.next_out,C=e.output,a=i-(t-e.avail_out),s=i+(e.avail_out-257),f=r.dmax,l=r.wsize,u=r.whave,c=r.wnext,h=r.window,d=r.hold,p=r.bits,g=r.lencode,y=r.distcode,m=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),v=g[d&m];t:for(;;){if(d>>>=w=v>>>24,p-=w,0==(w=v>>>16&255))C[i++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=g[(65535&v)+(d&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}_=65535&v,(w&=15)&&(p<w&&(d+=B[n++]<<p,p+=8),_+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),v=y[d&b];r:for(;;){if(d>>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=y[(65535&v)+(d&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(S=65535&v,p<(w&=15)&&(d+=B[n++]<<p,(p+=8)<w&&(d+=B[n++]<<p,p+=8)),(S+=d&(1<<w)-1)>f){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=w,p-=w,S>(w=i-a)){if((w=S-w)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(A=0,E=h,0===c){if(A+=l-w,w<_){_-=w;do{C[i++]=h[A++]}while(--w);A=i-S,E=C}}else if(c<w){if(A+=l+c-w,(w-=c)<_){_-=w;do{C[i++]=h[A++]}while(--w);if(A=0,c<_){_-=w=c;do{C[i++]=h[A++]}while(--w);A=i-S,E=C}}}else if(A+=c-w,w<_){_-=w;do{C[i++]=h[A++]}while(--w);A=i-S,E=C}for(;_>2;)C[i++]=E[A++],C[i++]=E[A++],C[i++]=E[A++],_-=3;_&&(C[i++]=E[A++],_>1&&(C[i++]=E[A++]))}else{A=i-S;do{C[i++]=C[A++],C[i++]=C[A++],C[i++]=C[A++],_-=3}while(_>2);_&&(C[i++]=C[A++],_>1&&(C[i++]=C[A++]))}break}}break}}while(n<o&&i<s);n-=_=p>>3,d&=(1<<(p-=_<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<s?s-i+257:257-(i-s),r.hold=d,r.bits=p}},7948:(e,t,r)=>{"use strict";var n=r(4236),o=r(6069),i=r(2869),a=r(4264),s=r(9241),f=0,l=-2,u=1,c=12,h=30,d=852,p=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=u,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(d),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,f):l}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,m(e)):l}function v(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,b(e))):l}function w(e,t){var r,n;return e?(n=new y,e.state=n,n.window=null,(r=v(e,t))!==f&&(e.state=null),r):l}var _,S,A=!0;function E(e){if(A){var t;for(_=new n.Buf32(512),S=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,S,0,e.work,{bits:5}),A=!1}e.lencode=_,e.lenbits=9,e.distcode=S,e.distbits=5}function B(e,t,r,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),o>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),n.arraySet(a.window,t,r-o,i,a.wnext),(o-=i)?(n.arraySet(a.window,t,r-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=b,t.inflateReset2=v,t.inflateResetKeep=m,t.inflateInit=function(e){return w(e,15)},t.inflateInit2=w,t.inflate=function(e,t){var r,d,p,y,m,b,v,w,_,S,A,C,R,k,x,I,M,O,F,P,T,U,N,L,j=0,z=new n.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;(r=e.state).mode===c&&(r.mode=13),m=e.next_out,p=e.output,v=e.avail_out,y=e.next_in,d=e.input,b=e.avail_in,w=r.hold,_=r.bits,S=b,A=v,U=f;e:for(;;)switch(r.mode){case u:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(2&r.wrap&&35615===w){r.check=0,z[0]=255&w,z[1]=w>>>8&255,r.check=i(r.check,z,2,0),w=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",r.mode=h;break}if(8!=(15&w)){e.msg="unknown compression method",r.mode=h;break}if(_-=4,T=8+(15&(w>>>=4)),0===r.wbits)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=h;break}r.dmax=1<<T,e.adler=r.check=1,r.mode=512&w?10:c,w=0,_=0;break;case 2:for(;_<16;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(r.flags=w,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=h;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=h;break}r.head&&(r.head.text=w>>8&1),512&r.flags&&(z[0]=255&w,z[1]=w>>>8&255,r.check=i(r.check,z,2,0)),w=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.head&&(r.head.time=w),512&r.flags&&(z[0]=255&w,z[1]=w>>>8&255,z[2]=w>>>16&255,z[3]=w>>>24&255,r.check=i(r.check,z,4,0)),w=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.head&&(r.head.xflags=255&w,r.head.os=w>>8),512&r.flags&&(z[0]=255&w,z[1]=w>>>8&255,r.check=i(r.check,z,2,0)),w=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.length=w,r.head&&(r.head.extra_len=w),512&r.flags&&(z[0]=255&w,z[1]=w>>>8&255,r.check=i(r.check,z,2,0)),w=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((C=r.length)>b&&(C=b),C&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,y,C,T)),512&r.flags&&(r.check=i(r.check,d,C,y)),b-=C,y+=C,r.length-=C),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break e;C=0;do{T=d[y+C++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T))}while(T&&C<b);if(512&r.flags&&(r.check=i(r.check,d,C,y)),b-=C,y+=C,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===b)break e;C=0;do{T=d[y+C++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T))}while(T&&C<b);if(512&r.flags&&(r.check=i(r.check,d,C,y)),b-=C,y+=C,T)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(w!==(65535&r.check)){e.msg="header crc mismatch",r.mode=h;break}w=0,_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;_<32;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}e.adler=r.check=g(w),w=0,_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=v,e.next_in=y,e.avail_in=b,r.hold=w,r.bits=_,2;e.adler=r.check=1,r.mode=c;case c:if(5===t||6===t)break e;case 13:if(r.last){w>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}switch(r.last=1&w,_-=1,3&(w>>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6===t){w>>>=2,_-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=h}w>>>=2,_-=2;break;case 14:for(w>>>=7&_,_-=7&_;_<32;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",r.mode=h;break}if(r.length=65535&w,w=0,_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(C=r.length){if(C>b&&(C=b),C>v&&(C=v),0===C)break e;n.arraySet(p,d,y,C,m),b-=C,y+=C,v-=C,m+=C,r.length-=C;break}r.mode=c;break;case 17:for(;_<14;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(r.nlen=257+(31&w),w>>>=5,_-=5,r.ndist=1+(31&w),w>>>=5,_-=5,r.ncode=4+(15&w),w>>>=4,_-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=h;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.lens[D[r.have++]]=7&w,w>>>=3,_-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},U=s(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,U){e.msg="invalid code lengths set",r.mode=h;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;I=(j=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,M=65535&j,!((x=j>>>24)<=_);){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(M<16)w>>>=x,_-=x,r.lens[r.have++]=M;else{if(16===M){for(L=x+2;_<L;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(w>>>=x,_-=x,0===r.have){e.msg="invalid bit length repeat",r.mode=h;break}T=r.lens[r.have-1],C=3+(3&w),w>>>=2,_-=2}else if(17===M){for(L=x+3;_<L;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}_-=x,T=0,C=3+(7&(w>>>=x)),w>>>=3,_-=3}else{for(L=x+7;_<L;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}_-=x,T=0,C=11+(127&(w>>>=x)),w>>>=7,_-=7}if(r.have+C>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=h;break}for(;C--;)r.lens[r.have++]=T}}if(r.mode===h)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=h;break}if(r.lenbits=9,N={bits:r.lenbits},U=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,U){e.msg="invalid literal/lengths set",r.mode=h;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},U=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,U){e.msg="invalid distances set",r.mode=h;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(b>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=y,e.avail_in=b,r.hold=w,r.bits=_,a(e,A),m=e.next_out,p=e.output,v=e.avail_out,y=e.next_in,d=e.input,b=e.avail_in,w=r.hold,_=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;I=(j=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,M=65535&j,!((x=j>>>24)<=_);){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(I&&0==(240&I)){for(O=x,F=I,P=M;I=(j=r.lencode[P+((w&(1<<O+F)-1)>>O)])>>>16&255,M=65535&j,!(O+(x=j>>>24)<=_);){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}w>>>=O,_-=O,r.back+=O}if(w>>>=x,_-=x,r.back+=x,r.length=M,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=c;break}if(64&I){e.msg="invalid literal/length code",r.mode=h;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(L=r.extra;_<L;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.length+=w&(1<<r.extra)-1,w>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;I=(j=r.distcode[w&(1<<r.distbits)-1])>>>16&255,M=65535&j,!((x=j>>>24)<=_);){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(0==(240&I)){for(O=x,F=I,P=M;I=(j=r.distcode[P+((w&(1<<O+F)-1)>>O)])>>>16&255,M=65535&j,!(O+(x=j>>>24)<=_);){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}w>>>=O,_-=O,r.back+=O}if(w>>>=x,_-=x,r.back+=x,64&I){e.msg="invalid distance code",r.mode=h;break}r.offset=M,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(L=r.extra;_<L;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}r.offset+=w&(1<<r.extra)-1,w>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=h;break}r.mode=25;case 25:if(0===v)break e;if(C=A-v,r.offset>C){if((C=r.offset-C)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=h;break}C>r.wnext?(C-=r.wnext,R=r.wsize-C):R=r.wnext-C,C>r.length&&(C=r.length),k=r.window}else k=p,R=m-r.offset,C=r.length;C>v&&(C=v),v-=C,r.length-=C;do{p[m++]=k[R++]}while(--C);0===r.length&&(r.mode=21);break;case 26:if(0===v)break e;p[m++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===b)break e;b--,w|=d[y++]<<_,_+=8}if(A-=v,e.total_out+=A,r.total+=A,A&&(e.adler=r.check=r.flags?i(r.check,p,A,m-A):o(r.check,p,A,m-A)),A=v,(r.flags?w:g(w))!==r.check){e.msg="incorrect data check",r.mode=h;break}w=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===b)break e;b--,w+=d[y++]<<_,_+=8}if(w!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=h;break}w=0,_=0}r.mode=29;case 29:U=1;break e;case h:U=-3;break e;case 31:return-4;default:return l}return e.next_out=m,e.avail_out=v,e.next_in=y,e.avail_in=b,r.hold=w,r.bits=_,(r.wsize||A!==e.avail_out&&r.mode<h&&(r.mode<27||4!==t))&&B(e,e.output,e.next_out,A-e.avail_out)?(r.mode=31,-4):(S-=e.avail_in,A-=e.avail_out,e.total_in+=S,e.total_out+=A,r.total+=A,r.wrap&&A&&(e.adler=r.check=r.flags?i(r.check,p,A,e.next_out-A):o(r.check,p,A,e.next_out-A)),e.data_type=r.bits+(r.last?64:0)+(r.mode===c?128:0)+(20===r.mode||15===r.mode?256:0),(0===S&&0===A||4===t)&&U===f&&(U=-5),U)},t.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,f},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?l:(r.head=t,t.done=!1,f):l},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:B(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,f):l},t.inflateInfo="pako inflate (from Nodeca project)"},9241:(e,t,r)=>{"use strict";var n=r(4236),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,f,l,u,c,h){var d,p,g,y,m,b,v,w,_,S=h.bits,A=0,E=0,B=0,C=0,R=0,k=0,x=0,I=0,M=0,O=0,F=null,P=0,T=new n.Buf16(16),U=new n.Buf16(16),N=null,L=0;for(A=0;A<=15;A++)T[A]=0;for(E=0;E<f;E++)T[t[r+E]]++;for(R=S,C=15;C>=1&&0===T[C];C--);if(R>C&&(R=C),0===C)return l[u++]=20971520,l[u++]=20971520,h.bits=1,0;for(B=1;B<C&&0===T[B];B++);for(R<B&&(R=B),I=1,A=1;A<=15;A++)if(I<<=1,(I-=T[A])<0)return-1;if(I>0&&(0===e||1!==C))return-1;for(U[1]=0,A=1;A<15;A++)U[A+1]=U[A]+T[A];for(E=0;E<f;E++)0!==t[r+E]&&(c[U[t[r+E]]++]=E);if(0===e?(F=N=c,b=19):1===e?(F=o,P-=257,N=i,L-=257,b=256):(F=a,N=s,b=-1),O=0,E=0,A=B,m=u,k=R,x=0,g=-1,y=(M=1<<R)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){v=A-x,c[E]<b?(w=0,_=c[E]):c[E]>b?(w=N[L+c[E]],_=F[P+c[E]]):(w=96,_=0),d=1<<A-x,B=p=1<<k;do{l[m+(O>>x)+(p-=d)]=v<<24|w<<16|_|0}while(0!==p);for(d=1<<A-1;O&d;)d>>=1;if(0!==d?(O&=d-1,O+=d):O=0,E++,0==--T[A]){if(A===C)break;A=t[r+c[E]]}if(A>R&&(O&y)!==g){for(0===x&&(x=R),m+=B,I=1<<(k=A-x);k+x<C&&!((I-=T[k+x])<=0);)k++,I<<=1;if(M+=1<<k,1===e&&M>852||2===e&&M>592)return 1;l[g=O&y]=R<<24|k<<16|m-u|0}}return 0!==O&&(l[m+O]=A-x<<24|64<<16|0),h.bits=R,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(e,t,r)=>{"use strict";var n=r(4236);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,s=30,f=15,l=16,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var g=new Array(60);o(g);var y=new Array(512);o(y);var m=new Array(256);o(m);var b=new Array(29);o(b);var v,w,_,S=new Array(s);function A(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B(e){return e<256?y[e]:y[256+(e>>>7)]}function C(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,r){e.bi_valid>l-r?(e.bi_buf|=t<<e.bi_valid&65535,C(e,e.bi_buf),e.bi_buf=t>>l-e.bi_valid,e.bi_valid+=r-l):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function k(e,t,r){R(e,r[2*t],r[2*t+1])}function x(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function I(e,t,r){var n,o,i=new Array(f+1),a=0;for(n=1;n<=f;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=x(i[s]++,s))}}function M(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?C(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function F(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function P(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&F(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!F(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function T(e,t,r){var n,o,a,s,f=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*f]<<8|e.pending_buf[e.d_buf+2*f+1],o=e.pending_buf[e.l_buf+f],f++,0===n?k(e,o,t):(k(e,(a=m[o])+i+1,t),0!==(s=u[a])&&R(e,o-=b[a],s),k(e,a=B(--n),r),0!==(s=c[a])&&R(e,n-=S[a],s))}while(f<e.last_lit);k(e,256,t)}function U(e,t){var r,n,o,i=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,s&&(e.static_len-=a[2*o+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)P(e,i,r);o=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,P(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,y=0;for(i=0;i<=f;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=l[2*l[2*(n=e.heap[r])+1]+1]+1)>g&&(i=g,y++),l[2*n+1]=i,n>u||(e.bl_count[i]++,a=0,n>=p&&(a=d[n-p]),s=l[2*n],e.opt_len+=s*(i+a),h&&(e.static_len+=s*(c[2*n+1]+a)));if(0!==y){do{for(i=g-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[g]--,y-=2}while(y>0);for(i=g;0!==i;i--)for(n=e.bl_count[i];0!==n;)(o=e.heap[--r])>u||(l[2*o+1]!==i&&(e.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(e,t),I(i,u,e.bl_count)}function N(e,t,r){var n,o,i=-1,a=t[1],s=0,f=7,l=4;for(0===a&&(f=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++s<f&&o===a||(s<l?e.bl_tree[2*o]+=s:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,i=o,0===a?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))}function L(e,t,r){var n,o,i=-1,a=t[1],s=0,f=7,l=4;for(0===a&&(f=138,l=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++s<f&&o===a)){if(s<l)do{k(e,o,e.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(k(e,o,e.bl_tree),s--),k(e,16,e.bl_tree),R(e,s-3,2)):s<=10?(k(e,17,e.bl_tree),R(e,s-3,3)):(k(e,18,e.bl_tree),R(e,s-11,7));s=0,i=o,0===a?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}}o(S);var j=!1;function z(e,t,r,o){R(e,0+(o?1:0),3),function(e,t,r,o){O(e),C(e,r),C(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){j||(function(){var e,t,r,n,o,i=new Array(f+1);for(r=0,n=0;n<28;n++)for(b[n]=r,e=0;e<1<<u[n];e++)m[r++]=n;for(m[r-1]=n,o=0,n=0;n<16;n++)for(S[n]=o,e=0;e<1<<c[n];e++)y[o++]=n;for(o>>=7;n<s;n++)for(S[n]=o<<7,e=0;e<1<<c[n]-7;e++)y[256+o++]=n;for(t=0;t<=f;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(I(p,287,i),e=0;e<s;e++)g[2*e+1]=5,g[2*e]=x(e,5);v=new A(p,u,257,a,f),w=new A(g,c,0,s,f),_=new A(new Array(0),h,0,19,7)}(),j=!0),e.l_desc=new E(e.dyn_ltree,v),e.d_desc=new E(e.dyn_dtree,w),e.bl_desc=new E(e.bl_tree,_),e.bi_buf=0,e.bi_valid=0,M(e)},t._tr_stored_block=z,t._tr_flush_block=function(e,t,r,n){var o,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),U(e,e.l_desc),U(e,e.d_desc),s=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),U(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?z(e,t,r,n):4===e.strategy||a===o?(R(e,2+(n?1:0),3),T(e,p,g)):(R(e,4+(n?1:0),3),function(e,t,r,n){var o;for(R(e,t-257,5),R(e,r-1,5),R(e,n-4,4),o=0;o<n;o++)R(e,e.bl_tree[2*d[o]+1],3);L(e,e.dyn_ltree,t-1),L(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),T(e,e.dyn_ltree,e.dyn_dtree)),M(e),n&&O(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(m[r]+i+1)]++,e.dyn_dtree[2*B(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){R(e,2,3),k(e,256,p),function(e){16===e.bi_valid?(C(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4971:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,f=36,l=26,u=38,c=700,h=/^xn--/,d=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=f-1,m=Math.floor,b=String.fromCharCode;function v(e){throw new RangeError(g[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function _(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(p,".")).split("."),t).join(".")}function S(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function A(e){return w(e,(function(e){var t="";return e>65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function B(e,t,r){var n=0;for(e=r?m(e/c):e>>1,e+=m(e/t);e>y*l>>1;n+=f)e=m(e/y);return m(n+(y+1)*e/(e+u))}function C(e){var t,r,n,o,i,a,u,c,h,d,p,g=[],y=e.length,b=0,w=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(i=b,a=1,u=f;o>=y&&v("invalid-input"),((c=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:f)>=f||c>m((s-b)/a))&&v("overflow"),b+=c*a,!(c<(h=u<=_?1:u>=_+l?l:u-_));u+=f)a>m(s/(d=f-h))&&v("overflow"),a*=d;_=B(b-i,t=g.length+1,0==i),m(b/t)>s-w&&v("overflow"),w+=m(b/t),b%=t,g.splice(b++,0,w)}return A(g)}function R(e){var t,r,n,o,i,a,u,c,h,d,p,g,y,w,_,A=[];for(g=(e=S(e)).length,t=128,r=0,i=72,a=0;a<g;++a)(p=e[a])<128&&A.push(b(p));for(n=o=A.length,o&&A.push("-");n<g;){for(u=s,a=0;a<g;++a)(p=e[a])>=t&&p<u&&(u=p);for(u-t>m((s-r)/(y=n+1))&&v("overflow"),r+=(u-t)*y,t=u,a=0;a<g;++a)if((p=e[a])<t&&++r>s&&v("overflow"),p==t){for(c=r,h=f;!(c<(d=h<=i?1:h>=i+l?l:h-i));h+=f)_=c-d,w=f-d,A.push(b(E(d+_%w,0))),c=m(_/w);A.push(b(E(c,0))),i=B(r,y,n==o),r=0,++n}++r,++t}return A.join("")}a={version:"1.4.1",ucs2:{decode:S,encode:A},decode:C,encode:R,toASCII:function(e){return _(e,(function(e){return d.test(e)?"xn--"+R(e):e}))},toUnicode:function(e){return _(e,(function(e){return h.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},129:(e,t,r)=>{"use strict";var n=r(8261),o=r(5235),i=r(5798);e.exports={formats:i,parse:o,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},f=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!r.plainObjects&&o.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var c=0;r.depth>0&&null!==(s=a.exec(i))&&c<r.depth;){if(c+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:f(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);r.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,l={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,c),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<h.length;++r)0===h[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[r]?p="utf-8":"utf8=%26%2310003%3B"===h[r]&&(p="iso-8859-1"),d=r,r=h.length);for(r=0;r<h.length;++r)if(r!==d){var g,y,m=h[r],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;-1===v?(g=t.decoder(m,a.decoder,p,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(m.slice(0,v),a.decoder,p,"key"),y=n.maybeMap(f(m.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=s(y)),m.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(l,g)?l[g]=n.combine(l[g],y):l[g]=y}return l}(e,r):e,c=r.plainObjects?Object.create(null):{},h=Object.keys(u),d=0;d<h.length;++d){var p=h[d],g=l(p,u[p],r,"string"==typeof e);c=n.merge(c,g,r)}return!0===r.allowSparse?c:n.compact(c)}},8261:(e,t,r)=>{"use strict";var n=r(7478),o=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},f=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,f(t)?t:[t])},c=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},p={},g=function e(t,r,i,a,s,l,c,h,g,y,m,b,v,w,_,S){for(var A,E=t,B=S,C=0,R=!1;void 0!==(B=B.get(p))&&!R;){var k=B.get(t);if(C+=1,void 0!==k){if(k===C)throw new RangeError("Cyclic object value");R=!0}void 0===B.get(p)&&(C=0)}if("function"==typeof h?E=h(r,E):E instanceof Date?E=m(E):"comma"===i&&f(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?m(e):e}))),null===E){if(s)return c&&!w?c(r,d.encoder,_,"key",b):r;E=""}if("string"==typeof(A=E)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||o.isBuffer(E))return c?[v(w?r:c(r,d.encoder,_,"key",b))+"="+v(c(E,d.encoder,_,"value",b))]:[v(r)+"="+v(String(E))];var x,I=[];if(void 0===E)return I;if("comma"===i&&f(E))w&&c&&(E=o.maybeMap(E,c)),x=[{value:E.length>0?E.join(",")||null:void 0}];else if(f(h))x=h;else{var M=Object.keys(E);x=g?M.sort(g):M}for(var O=a&&f(E)&&1===E.length?r+"[]":r,F=0;F<x.length;++F){var P=x[F],T="object"==typeof P&&void 0!==P.value?P.value:E[P];if(!l||null!==T){var U=f(E)?"function"==typeof i?i(O,P):O:O+(y?"."+P:"["+P+"]");S.set(t,C);var N=n();N.set(p,S),u(I,e(T,U,i,a,s,l,"comma"===i&&w&&f(E)?null:c,h,g,y,m,b,v,w,_,N))}}return I};e.exports=function(e,t){var r,o=e,l=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=d.filter;return("function"==typeof e.filter||f(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):f(l.filter)&&(r=l.filter);var c,h=[];if("object"!=typeof o||null===o)return"";c=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=s[c];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===p&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),l.sort&&r.sort(l.sort);for(var m=n(),b=0;b<r.length;++b){var v=r[b];l.skipNulls&&null===o[v]||u(h,g(o[v],v,p,y,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,m))}var w=h.join(l.delimiter),_=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),f=0;f<s.length;++f){var l=s[f],u=a[l];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:l}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var f="",l=0;l<s.length;++l){var u=s.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===n.RFC1738&&(40===u||41===u)?f+=s.charAt(l):u<128?f+=a[u]:u<2048?f+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?f+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),f+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return f},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},1269:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},7478:(e,t,r)=>{"use strict";var n=r(210),o=r(1924),i=r(631),a=n("%TypeError%"),s=n("%WeakMap%",!0),f=n("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),c=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),p=o("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(f){if(t)return h(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(f){if(t)return p(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),u(e,n,o)):f?(t||(t=new f),d(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},8575:(e,t,r)=>{"use strict";var n=r(4971);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(f),u=["%","/","?",";","#"].concat(l),c=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(129);function b(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",f=e.split(a);f[0]=f[0].replace(/\\/g,"/");var b=e=f.join(a);if(b=b.trim(),!r&&1===e.split("#").length){var v=s.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=i.exec(b);if(w){var _=(w=w[0]).toLowerCase();this.protocol=_,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@/]+@[^@/]+/)){var S="//"===b.substr(0,2);!S||w&&g[w]||(b=b.substr(2),this.slashes=!0)}if(!g[w]&&(S||w&&!y[w])){for(var A,E,B=-1,C=0;C<c.length;C++)-1!==(R=b.indexOf(c[C]))&&(-1===B||R<B)&&(B=R);for(-1!==(E=-1===B?b.lastIndexOf("@"):b.lastIndexOf("@",B))&&(A=b.slice(0,E),b=b.slice(E+1),this.auth=decodeURIComponent(A)),B=-1,C=0;C<u.length;C++){var R;-1!==(R=b.indexOf(u[C]))&&(-1===B||R<B)&&(B=R)}-1===B&&(B=b.length),this.host=b.slice(0,B),b=b.slice(B),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var x=this.hostname.split(/\./),I=(C=0,x.length);C<I;C++){var M=x[C];if(M&&!M.match(h)){for(var O="",F=0,P=M.length;F<P;F++)M.charCodeAt(F)>127?O+="x":O+=M[F];if(!O.match(h)){var T=x.slice(0,C),U=x.slice(C+1),N=M.match(d);N&&(T.push(N[1]),U.unshift(N[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=n.toASCII(this.hostname));var L=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+L,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!p[_])for(C=0,I=l.length;C<I;C++){var z=l[C];if(-1!==b.indexOf(z)){var D=encodeURIComponent(z);D===z&&(D=escape(z)),b=b.split(z).join(D)}}var q=b.indexOf("#");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var W=b.indexOf("?");if(-1!==W?(this.search=b.substr(W),this.query=b.substr(W+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,W)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var H=this.search||"";this.path=L+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),f=0;f<s.length;f++){var l=s[f];"protocol"!==l&&(r[l]=e[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var u=Object.keys(e),c=0;c<u.length;c++){var h=u[c];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",m=r.search||"";r.path=p+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=v||b||r.host&&e.pathname,_=w,S=r.pathname&&r.pathname.split("/")||[],A=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),w=w&&(""===d[0]||""===S[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,S=d;else if(d.length)S||(S=[]),S.pop(),S=S.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search)return A&&(r.host=S.shift(),r.hostname=r.host,(k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=k.shift(),r.hostname=k.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],B=(r.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,C=0,R=S.length;R>=0;R--)"."===(E=S[R])?S.splice(R,1):".."===E?(S.splice(R,1),C++):C&&(S.splice(R,1),C--);if(!w&&!_)for(;C--;C)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),B&&"/"!==S.join("/").substr(-1)&&S.push("");var k,x=""===S[0]||S[0]&&"/"===S[0].charAt(0);return A&&(r.hostname=x?"":S.length?S.shift():"",r.host=r.hostname,(k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=k.shift(),r.hostname=k.shift(),r.host=r.hostname)),(w=w||r.host&&S.length)&&!x&&S.unshift(""),S.length>0?r.pathname=S.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=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},7067:()=>{},4654:()=>{}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(5590);window.gmodCRAM=n})();
|
|
2
|
+
(()=>{var e={368:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(r(4105)),a=o(r(1269)),s=r(597),f=r(3427),l=r(8577);function u(e,t){if(t.some((e=>void 0===e)))throw new l.CramMalformedError("invalid .crai index file");const[r,n,o,i,a,s]=t;e[r]||(e[r]=[]),e[r].push({start:n,span:o,containerStart:i,sliceStart:a,sliceBytes:s})}t.default=class{constructor(e){this.filehandle=(0,f.open)(e.url,e.path,e.filehandle),this._parseCache=new i.default({cache:new a.default({maxSize:1}),fill:(e,t)=>this.parseIndex()})}parseIndex(){const e={};return this.filehandle.readFile().then((e=>31===e[0]&&139===e[1]?(0,s.unzip)(e):e)).then((t=>{if(t.length>4&&21578050===t.readUInt32LE(0))throw new l.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let r=[],n="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i>=48&&i<=57||!n&&45===i)n+=String.fromCharCode(i);else if(9===i)r.push(Number.parseInt(n,10)),n="";else if(10===i)r.push(Number.parseInt(n,10)),n="",u(e,r),r=[];else if(13!==i&&32!==i)throw new l.CramMalformedError("invalid .crai index file")}return n&&r.push(Number.parseInt(n,10)),6===r.length&&u(e,r),Object.entries(e).forEach((([t,r])=>{e[t]=r.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(e={}){return this._parseCache.get("index",null,e.signal)}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const o=e=>{const n=e.start,o=e.start+e.span;return n>r?-1:o<=t?1:0},i=[];for(let e=0;e<n.length;e+=1)0===o(n[e])&&i.push(n[e]);return i}))}}},1050:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},4863:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,a.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=s},1738:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9488),i=n(r(1050));class a extends i.default{constructor(e,t,r){if(super(e,t),this.instantiateCodec=r,"byteArray"!==t)throw new TypeError(`byteArrayLength does not support data type ${t}`)}decode(e,t,r,n){const o=this._getLengthCodec().decode(e,t,r,n),i=this._getDataCodec(),a=new Uint8Array(o);for(let s=0;s<o;s+=1)a[s]=i.decode(e,t,r,n);return a}_getLengthCodec(){const e=this.parameters.lengthsEncoding;return this.instantiateCodec(e,"int")}_getDataCodec(){const e=this.parameters.valuesEncoding;return this.instantiateCodec(e,"byte")}}t.default=a,"_getLengthCodec _getDataCodec".split(" ").forEach((e=>(0,o.tinyMemoize)(a,e)))},1405:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"byteArray"!==t)throw new TypeError(`byteArrayStop codec does not support data type ${t}`)}decode(e,t,r,n){const{blockContentId:i}=this.parameters,a=r[i];if(!a)throw new o.CramMalformedError(`no block found with content ID ${i}`);const s=n.externalBlocks.getCursor(i);return this._decodeByteArray(a,s)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,o=t.bytePosition;let i=t.bytePosition;for(;r[i]!==n&&i<r.length;){if(i===r.length)throw new a.CramBufferOverrunError("byteArrayStop reading beyond length of data buffer?");i+=1}return t.bytePosition=i+1,r.subarray(o,i)}}t.default=s},5844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(9488),s=r(1074);class f extends i.default{constructor(e,t){if(super(e,t),"int"===this.dataType)this._decodeData=this._decodeInt;else{if("byte"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by EXTERNAL codec`);this._decodeData=this._decodeByte}}decode(e,t,r,n){const{blockContentId:i}=this.parameters,a=r[i];if(!a)throw new o.CramMalformedError(`no block found with content ID ${i}`);const s=n.externalBlocks.getCursor(i);return this._decodeData(a,s)}_decodeInt(e,t){const[r,n]=(0,a.parseItf8)(e.content,t.bytePosition);return t.bytePosition=t.bytePosition+n,r}_decodeByte(e,t){if(t.bytePosition>=e.content.length)throw new s.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=f},4229:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let o=1;for(;0===(0,a.getBits)(t.content,n.coreBlock,1);)o+=1;return((0,a.getBits)(t.content,n.coreBlock,o-1)|1<<o-1)-this.parameters.offset}}t.default=s},1074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBits=t.CramBufferOverrunError=void 0;class r extends Error{}t.CramBufferOverrunError=r,t.getBits=function(e,t,n){let o=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)o<<=1,o|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return o}},2082:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedByValue=[],this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;t<this.parameters.numCodes;t+=1)e[t]={symbol:this.parameters.symbols[t],bitLength:this.parameters.bitLengths[t]};e=e.sort(((e,t)=>e.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const i=parseInt(r,10);n.forEach((r=>{const n={bitLength:i,value:r,bitCode:0};t+=1;const a=i-e;if(t<<=a,n.bitCode=t,e+=a,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>i)throw new o.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedByValue=Object.values(this.codes).sort(((e,t)=>e.value-t.value)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e<this.sortedBitCodes.length;e+=1)this.bitCodeToValue[this.sortedCodes[e].bitCode]=e}decode(e,t,r,n){return this._decode(e,t,n.coreBlock)}_decodeZeroLengthCode(){return this.sortedCodes[0].value}_decode(e,t,r){const n=t.content;let i=0,s=0;for(let e=0;e<this.sortedCodes.length;e+=1){const t=this.sortedCodes[e].bitLength;s<<=t-i,s|=(0,a.getBits)(n,r,t-i),i=t;{const r=this.bitCodeToValue[s];if(r>-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r<this.sortedCodes.length;r+=1)e+=1}}throw new o.CramMalformedError("Huffman symbol not found.")}}t.default=s},8772:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.instantiateCodec=void 0;const o=r(8577),i=n(r(2082)),a=n(r(5844)),s=n(r(1405)),f=n(r(1738)),l=n(r(4863)),u=n(r(4229)),A=n(r(8821)),c={1:a.default,3:i.default,4:f.default,5:s.default,6:l.default,7:A.default,9:u.default};t.instantiateCodec=function e(t,r){const n=(i="ignore"===r?0:t.codecId,c[i]);var i;if(!n)throw new o.CramUnimplementedError(`no codec implemented for codec ID ${t.codecId}`);return new n(t.parameters,r,e)}},8821:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(1050)),a=r(1074);class s extends i.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new o.CramUnimplementedError(`${this.dataType} decoding not yet implemented by SUBEXP codec`)}decode(e,t,r,n){let o,i,s=0;for(;(0,a.getBits)(t.content,n.coreBlock,1);)s+=1;return 0===s?(o=this.parameters.K,i=(0,a.getBits)(t.content,n.coreBlock,o)):(o=s+this.parameters.K-1,i=1<<o|(0,a.getBits)(t.content,n.coreBlock,o)),i-this.parameters.offset}}t.default=s},2615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},8543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8772),o=r(8577),i={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][e[0]>>0&3]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][e[1]>>0&3]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][e[2]>>0&3]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][e[3]>>0&3]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][e[4]>>0&3]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding,this.preservation=e.preservation,this._size=e._size,this._endPosition=e._endPosition}getCodecForTag(e){if(!this.tagCodecCache[e]){const t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=(0,n.instantiateCodec)(t,"byteArray"))}return this.tagCodecCache[e]}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const a=i[e];if(!a)throw new o.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,a),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{/Cache$/.test(t)||(e[t]=this[t])})),e}}},6284:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=r(9488),s=o(r(6601)),f=o(r(8543));class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return n(this,void 0,void 0,(function*(){if(!(yield this.getHeader()).numRecords)return null;const e=yield this.file.getSectionParsers(),t=yield this.getFirstBlock();if(void 0===t)return;if("COMPRESSION_HEADER"!==t.contentType)throw new i.CramMalformedError(`invalid content type ${t.contentType} in what is supposed to be the compression header block`);const r=(0,a.parseItem)(t.content,e.cramCompressionHeader.parser,0,t.contentPosition);return Object.assign(Object.assign({},t),{parsedContent:r})}))}getFirstBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return n(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new s.default(this,e,t)}_readContainerHeader(e){return n(this,void 0,void 0,(function*(){const t=yield this.file.getSectionParsers(),{cramContainerHeader1:r,cramContainerHeader2:n}=t,{size:o}=yield this.file.stat();if(e>=o)return;const i=Buffer.allocUnsafe(r.maxLength);yield this.file.read(i,0,r.maxLength,e);const s=(0,a.parseItem)(i,r.parser),f=(0,a.itf8Size)(s.numLandmarks);if(e+s.length>=o)return void console.warn(`${this.file}: container header at ${e} indicates that the container has length ${s.length}, which extends beyond the length of the file. Skipping this container.`);const l=Buffer.allocUnsafe(n.maxLength(s.numLandmarks));yield this.file.read(l,0,n.maxLength(s.numLandmarks),e+s._size-f);const u=(0,a.parseItem)(l,n.parser);return this.file.validateChecksums&&void 0!==u.crc32&&(yield this.file.checkCrc32(e,s._size+u._size-f-4,u.crc32,`container header beginning at position ${e}`)),Object.assign(s,u,{_size:s._size+u._size-f,_endPosition:s._size+u._size-f+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>(0,a.tinyMemoize)(l,e)))},5457:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(597),a=o(r(2779)),s=o(r(1269)),f=o(r(3498)),l=o(r(4693)),u=r(1289),A=r(8577),c=o(r(9675)),h=r(6141),d=o(r(6284)),g=r(3427),p=r(9488),y=r(7578);class m{constructor(e){var t;if(this.file=(0,g.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new s.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return n(this,void 0,void 0,(function*(){const e=Buffer.allocUnsafe(h.cramFileDefinition.maxLength);yield this.file.read(e,0,h.cramFileDefinition.maxLength,0);const t=h.cramFileDefinition.parser.parse(e).result;if(2!==t.majorVersion&&3!==t.majorVersion)throw new A.CramUnimplementedError(`CRAM version ${t.majorVersion} not supported`);return t}))}getSamHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new A.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,y.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),o=r.toString("utf8",4,4+n);return this.header=o,(0,y.parseHeaderText)(o)}))}getHeaderText(){return n(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getSectionParsers(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.getDefinition();return(0,h.getSectionParsers)(e)}))}getContainerById(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSectionParsers();let r=t.cramFileDefinition.maxLength;const{size:n}=yield this.file.stat(),{cramContainerHeader1:o}=t;let i;for(let t=0;t<=e;t+=1){if(r+o.maxLength+8>=n)return;i=this.getContainerAtPosition(r);const a=yield i.getHeader();if(!a)throw new A.CramMalformedError(`container ${e} not found in file`);if(0===t){r=a._endPosition;for(let e=0;e<a.numBlocks;e+=1){const e=yield this.readBlock(r);if(void 0===e)return;r=e._endPosition}}else r+=a._size+a.length}return i}))}checkCrc32(e,t,r,o){return n(this,void 0,void 0,(function*(){const n=Buffer.allocUnsafe(t);yield this.file.read(n,0,t,e);const i=a.default.unsigned(n);if(i!==r)throw new A.CramMalformedError(`crc mismatch in ${o}: recorded CRC32 = ${r}, but calculated CRC32 = ${i}`)}))}containerCount(){return n(this,void 0,void 0,(function*(){const e=yield this.getSectionParsers(),{size:t}=yield this.file.stat(),{cramContainerHeader1:r}=e;let n=0,o=e.cramFileDefinition.maxLength;for(;o+r.maxLength+8<t;){const e=yield this.getContainerAtPosition(o).getHeader();if(!e)break;if(0===n){o=e._endPosition;for(let t=0;t<e.numBlocks;t+=1){const e=yield this.readBlock(o);if(void 0===e)return;o=e._endPosition}}else o+=e._size+e.length;n+=1}return n}))}getContainerAtPosition(e){return new d.default(this,e)}readBlockHeader(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSectionParsers(),{cramBlockHeader:r}=t,{size:n}=yield this.file.stat();if(e+r.maxLength>=n)return;const o=Buffer.allocUnsafe(r.maxLength);return yield this.file.read(o,0,r.maxLength,e),(0,p.parseItem)(o,r.parser,0,e)}))}_parseSection(e,t,r=e.maxLength,o=void 0){return n(this,void 0,void 0,(function*(){let n;if(o)n=o;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;n=Buffer.allocUnsafe(r),yield this.file.read(n,0,r,t)}const i=(0,p.parseItem)(n,e.parser,0,t);if(i._size!==r)throw new A.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${i._size}`);return i}))}_uncompress(e,t,r){return n(this,void 0,void 0,(function*(){if("gzip"===e)(0,i.unzip)(t).copy(r);else if("bzip2"===e){const e=l.default.array(t);let n,o=l.default.header(e),i=0;do{n=l.default.decompress(e,o),-1!=n&&(Buffer.from(n).copy(r,i),i+=n.length,o-=n.length)}while(-1!=n)}else if("lzma"===e){const e=new Response(new u.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));Buffer.from(yield e.arrayBuffer()).copy(r)}else if("rans"===e)(0,c.default)(t,r);else if("rans4x16"===e)f.default.r4x16_uncompress(t,r);else if("arith"===e)f.default.arith_uncompress(t,r);else if("fqzcomp"===e)f.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new A.CramUnimplementedError(`${e} decompression not yet implemented`);f.default.tok3_uncompress(t,r)}var n}))}readBlock(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=yield this.getSectionParsers(),n=yield this.readBlockHeader(e);if(void 0===n)return;const o=n._endPosition,i=Buffer.allocUnsafe(n.uncompressedSize),a=Object.assign(Object.assign({},n),{_endPosition:o,contentPosition:o,content:i});if("raw"!==n.compressionMethod){const e=Buffer.allocUnsafe(n.compressedSize);yield this.read(e,0,n.compressedSize,o),yield this._uncompress(n.compressionMethod,e,i)}else yield this.read(i,0,n.uncompressedSize,o);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,o+n.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=o+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>(0,p.tinyMemoize)(m,e)))},8222:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CramRecord=void 0;const o=n(r(5457));var i=r(8631);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}}),t.default=o.default},8631:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const o=n(r(2615)),i={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function a(e){const t={};for(const[r,n]of e)t["is"+n]=e=>!!(e&r),t["set"+n]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=a(t.BamFlags),t.CramFlagsDecoder=a(t.CramFlags),t.MateFlagsDecoder=a(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:o,qualityScores:i,mateRecordNumber:a,readBases:s,readFeatures:f,mateToUse:l,readGroupId:u,readName:A,sequenceId:c,uniqueId:h,templateSize:d,alignmentStart:g,tags:p}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=o,this.qualityScores=i,s&&(this.readBases=s),this.readGroupId=u,this.readName=A,this.sequenceId=c,this.uniqueId=h,this.templateSize=d,this.alignmentStart=g,this.tags=p,f&&(this.readFeatures=f),l&&(this.mate={flags:l.mateFlags,readName:l.mateReadName,sequenceId:l.mateSequenceId,alignmentStart:l.mateAlignmentStart}),a&&(this.mateRecordNumber=a)}isPaired(){return!!(this.flags&o.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&o.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&o.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&o.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&o.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&o.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&o.default.BAM_FREAD1)}isRead2(){return!!(this.flags&o.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&o.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&o.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&o.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&o.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&o.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&o.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&o.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&o.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.substr(r,e.lengthOnRef).toUpperCase();let n="",o=r,i=0;for(;n.length<e.readLength;)if(i<e.readFeatures.length){const r=e.readFeatures[i];if("Q"===r.code||"q"===r.code)i+=1;else if(r.pos===n.length+1)if(i+=1,"b"===r.code){const e=r.data;n+=e,o+=e.length}else"B"===r.code?(n+=r.data[0],o+=1):"X"===r.code?(n+=r.sub,o+=1):"I"===r.code?n+=r.data:"D"===r.code?o+=r.data:"i"===r.code?n+=r.data:"N"===r.code?o+=r.data:"S"===r.code?n+=r.data:"P"===r.code||r.code;else if(i<e.readFeatures.length){const r=t.seq.substr(o,e.readFeatures[i].pos-n.length-1);n+=r,o+=r.length}}else{const r=t.seq.substr(o,e.readLength-n.length);n+=r,o+=r.length}return n.toUpperCase()}(this,this._refRegion);e&&(this.readBases=e)}return this.readBases}getPairOrientation(){if(!this.isSegmentUnmapped()&&this.isPaired()&&!this.isMateUnmapped()&&this.mate&&this.sequenceId===this.mate.sequenceId){const e=this.isReverseComplemented()?"R":"F",t=this.isMateReverseComplemented()?"R":"F";let r=" ",n=" ";this.isRead1()?(r="1",n="2"):this.isRead2()&&(r="2",n="1");const o=[];let i=this.templateLength||this.templateSize;if(void 0===i)throw new Error("One of templateSize and templateLength must be set");return this.alignmentStart>this.mate.alignmentStart&&i>0&&(i=-i),i>0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){if(!t)return;const o=n.refPos-t.start,a=t.seq.charAt(o);a&&(n.ref=a);let s=i[a];void 0===s&&(s=4);const f=r.substitutionMatrix[s][n.data];f&&(n.sub=f)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{"_"!==t.charAt(0)&&(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},6141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSectionParsers=t.cramFileDefinition=t.isMappedSliceHeader=void 0;const n=r(9996),o=(new n.Parser).itf8(),i={parser:(new n.Parser).string("magic",{length:4}).uint8("majorVersion").uint8("minorVersion").string("fileId",{length:20,stripNull:!0}),maxLength:26};t.cramFileDefinition=i;const a={parser:(new n.Parser).uint8("compressionMethod",{formatter:e=>{const t=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][e];if(!t)throw new Error(`compression method number ${e} not implemented`);return t}}).uint8("contentType",{formatter:e=>{const t=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][e];if(!t)throw new Error(`invalid block content type id ${e}`);return t}}).itf8("contentId").itf8("compressedSize").itf8("uncompressedSize"),maxLength:17},s={parser:(new n.Parser).uint32("crc32"),maxLength:4},f=(new n.Parser).itf8("size").buffer("ents",{length:"size",formatter:e=>{function t(t,r){const n=e.toString("utf8",t,r),o=[];for(let e=0;e<n.length;e+=3)o.push(n.substr(e,3));return o}var r,n=[],o=0;for(r=0;r<e.length;r+=1)e[r]||(n.push(t(o,r)),o=r+1);return r>o&&n.push(t(o,r)),n}}),l=(new n.Parser).uint8(null,{formatter:e=>!!e}),u=(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).string("key",{length:2,stripNull:!1}).choice("value",{tag:"key",choices:{MI:l,UI:l,PI:l,RN:l,AP:l,RR:l,SM:(new n.Parser).array(null,{type:"uint8",length:5}),TD:(new n.Parser).nest(null,{type:f,formatter:e=>e.ents})}})});function A(e){const t={};for(let r=0;r<e.ents.length;r+=1){const{key:n,value:o}=e.ents[r];t[n]&&console.warn(`duplicate key ${n} in map`),t[n]=o}return t}const c={cramFileDefinition:i,cramBlockHeader:a,cramBlockCrc32:s};t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId};const h={cramUnmappedSliceHeader(e){let t=0,r=(new n.Parser).itf8("numRecords");return t+=5,e>=3?(r=r.ltf8("recordCounter"),t+=9):2===e&&(r=r.itf8("recordCounter"),t+=5),r=r.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:o,length:"numContentIds"}),t+=10,e>=2&&(r=r.array("md5",{type:"uint8",length:16}),t+=16),{parser:r,maxLength:e=>t+5*e}},cramMappedSliceHeader(e){let t=(new n.Parser).itf8("refSeqId").itf8("refSeqStart").itf8("refSeqSpan").itf8("numRecords"),r=20;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),t=t.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:o,length:"numContentIds"}).itf8("refBaseBlockId"),r+=15,e>=2&&(t=t.array("md5",{type:"uint8",length:16}),r+=16),{parser:t,maxLength:e=>r+5*e}},cramEncoding:e=>({parser:(new n.Parser).namely("cramEncoding").itf8("codecId").itf8("parametersBytes").choice("parameters",{tag:"codecId",choices:{0:new n.Parser,1:(new n.Parser).itf8("blockContentId"),2:(new n.Parser).itf8("offset").itf8("M"),3:n.Parser.start().itf8("numCodes").array("symbols",{length:"numCodes",type:o}).itf8("numLengths").array("bitLengths",{length:"numLengths",type:o}),4:n.Parser.start().nest("lengthsEncoding",{type:"cramEncoding"}).nest("valuesEncoding",{type:"cramEncoding"}),5:(new n.Parser).uint8("stopByte").itf8("blockContentId"),6:(new n.Parser).itf8("offset").itf8("length"),7:(new n.Parser).itf8("offset").itf8("K"),8:(new n.Parser).itf8("offset").itf8("log2m"),9:(new n.Parser).itf8("offset")}})}),cramDataSeriesEncodingMap(e){return(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).string("key",{length:2,stripNull:!1}).nest("value",{type:this.cramEncoding(e).parser})})},cramTagEncodingMap(e){return(new n.Parser).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new n.Parser).itf8("key",{formatter:e=>String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}).nest("value",{type:this.cramEncoding(e).parser})})},cramCompressionHeader(e){let t=new n.Parser;return t=t.nest("preservation",{type:u,formatter:A}).nest("dataSeriesEncoding",{type:this.cramDataSeriesEncodingMap(e),formatter:A}).nest("tagEncoding",{type:this.cramTagEncodingMap(e),formatter:A}),{parser:t}},cramContainerHeader1(e){let t=(new n.Parser).int32("length").itf8("refSeqId").itf8("refSeqStart").itf8("alignmentSpan").itf8("numRecords"),r=24;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),e>1&&(t=t.ltf8("numBases"),r+=9),t=t.itf8("numBlocks").itf8("numLandmarks"),r+=10,{parser:t,maxLength:r}},cramContainerHeader2(e){let t=(new n.Parser).itf8("numLandmarks").array("landmarks",{type:(new n.Parser).itf8(),length:"numLandmarks"}),r=0;return e>=3&&(t=t.uint32("crc32"),r=4),{parser:t,maxLength:e=>5+5*e+r}}};t.getSectionParsers=function(e){const t=Object.assign({},c);return Object.keys(h).forEach((r=>{t[r]=h[r](e)})),t}},3757:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3720)),i=r(8577),a=r(8631),s=r(6141);function f(e){let t="";for(let r=0;r<e.length&&0!==e[r];r++)t+=String.fromCharCode(e[r]);return t}function l(e,t){if("Z"===e)return f(t);if("A"===e)return String.fromCharCode(t[0]);if("I"===e)return o.default.fromBytesLE(t).toNumber();if("i"===e)return new Int32Array(t.buffer)[0];if("s"===e)return new Int16Array(t.buffer)[0];if("S"===e)return new Uint16Array(t.buffer)[0];if("c"===e)return new Int8Array(t.buffer)[0];if("C"===e)return t[0];if("f"===e)return new Float32Array(t.buffer)[0];if("H"===e)return Number.parseInt(f(t).replace(/^0x/,""),16);if("B"===e)return function(e){const t=String.fromCharCode(e[0]),r=Int32Array.from(e.slice(1))[0],n=new Array(r);if(e=e.slice(5),"c"===t){const t=new Int8Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("C"===t){const t=new Uint8Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("s"===t){const t=new Int16Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("S"===t){const t=new Uint16Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("i"===t){const t=new Int32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else if("I"===t){const t=new Uint32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}else{if("f"!==t)throw new Error("unknown type: "+t);{const t=new Float32Array(e.buffer);for(let e=0;e<r;e+=1)n[e]=t[e]}}return n}(t);throw new i.CramMalformedError(`Unrecognized tag type ${e}`)}t.default=function(e,t,r,n,o,u,A,c,h){let d=t("BF");const g=t("CF");if(!(0,s.isMappedSliceHeader)(n.parsedContent))throw new Error;let p;p=c>1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId;const y=t("RL");let m=t("AP");r.APdelta&&(m+=A.lastAlignmentStart),A.lastAlignmentStart=m;const C=t("RG");let I,b,w,v;if(r.readNamesIncluded&&(I=f(t("RN"))),a.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=f(t("RN")),I=n);const o=t("NS"),i=t("NP");(e||o>-1)&&(b={mateFlags:e,mateSequenceId:o,mateAlignmentStart:i,mateReadName:n}),w=t("TS"),a.MateFlagsDecoder.isUnmapped(e)&&(d=a.BamFlagsDecoder.setMateUnmapped(d)),a.MateFlagsDecoder.isOnNegativeStrand(e)&&(d=a.BamFlagsDecoder.setMateReverseComplemented(d))}else a.CramFlagsDecoder.isWithMateDownstream(g)&&(v=t("NF")+h+1);const B=t("TL");if(B<0)throw new i.CramMalformedError("invalid TL index");const E={},_=r.getTagNames(B),Q=_.length;for(let t=0;t<Q;t+=1){const n=_[t],a=n.substr(0,2),s=n.substr(2,1),f=r.getCodecForTag(n);if(!f)throw new i.CramMalformedError(`no codec defined for auxiliary tag ${n}`);const c=f.decode(e,o,u,A);E[a]=l(s,c)}let S,k,R,D,N;if(a.BamFlagsDecoder.isSegmentUnmapped(d))if(a.CramFlagsDecoder.isDecodeSequenceAsStar(g))N=null,D=null;else{const e=new Array(y);for(let r=0;r<e.length;r+=1)e[r]=t("BA");if(N=String.fromCharCode(...e),a.CramFlagsDecoder.isPreservingQualityScores(g)){D=new Array(y);for(let r=0;r<e.length;r+=1)D[r]=t("QS")}}else{const e=t("FN");if(e&&(S=function(e,t,r,n,o){let a=0,s=e-1;const f=new Array(t);function l([e,t]){const n=r(t);if("character"===e)return String.fromCharCode(n);if("string"===e){let e="";for(let t=0;t<n.byteLength;t++)e+=String.fromCharCode(n[t]);return e}return"numArray"===e?n.toArray():n}for(let e=0;e<t;e+=1){const t=String.fromCharCode(r("FC")),n=r("FP"),u={B:["character","BA"],S:["string",o>1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!u)throw new i.CramMalformedError(`invalid read feature code "${t}"`);let A=l(u);const c={B:["number","QS"]}[t];c&&(A=[A,l(c)]),a+=n;const h=a;s+=n;const d=s;"D"===t||"N"===t?s+=A:"I"===t||"S"===t?s-=A.length:"i"===t&&(s-=1),f[e]={code:t,pos:h,refPos:d,data:A}}return f}(m,e,t,0,c)),k=y,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${I||`${p}:${m}`} record has invalid read features`),k=y),R=t("MQ"),a.CramFlagsDecoder.isPreservingQualityScores(g)){D=new Array(y);for(let e=0;e<D.length;e++)D[e]=t("QS")}}return{readLength:y,sequenceId:p,cramFlags:g,flags:d,alignmentStart:m,readGroupId:C,readName:I,mateToUse:b,templateSize:w,mateRecordNumber:v,readFeatures:S,lengthOnRef:k,mappingQuality:R,qualityScores:D,readBases:N,tags:E}}},6601:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=r(9488),s=o(r(2615)),f=o(r(3757)),l=o(r(8631)),u=r(6141),A=r(1074);function c(e,t,r,n){if(!n)throw new i.CramMalformedError("could not resolve intra-slice mate pairs, file seems truncated or malformed");const o=!!(n.mate||void 0!==n.mateRecordNumber&&n.mateRecordNumber!==t);r.readName||(r.readName=String(r.uniqueId),n.readName=r.readName),r.mate={sequenceId:n.sequenceId,alignmentStart:n.alignmentStart,uniqueId:n.uniqueId},n.readName&&(r.mate.readName=n.readName),n.mate||void 0!==n.mateRecordNumber||(n.mate={sequenceId:r.sequenceId,alignmentStart:r.alignmentStart,uniqueId:r.uniqueId},r.readName&&(n.mate.readName=r.readName)),r.flags|=s.default.BAM_FPAIRED,n.flags&s.default.BAM_FUNMAP&&(r.flags|=s.default.BAM_FMUNMAP),r.flags&s.default.BAM_FUNMAP&&(n.flags|=s.default.BAM_FMUNMAP),n.flags&s.default.BAM_FREVERSE&&(r.flags|=s.default.BAM_FMREVERSE),r.flags&s.default.BAM_FREVERSE&&(n.flags|=s.default.BAM_FMREVERSE),void 0===r.templateLength&&(o?function(e,t,r){const n=function t(r){const n=[r];if(void 0!==r.mateRecordNumber&&r.mateRecordNumber>=0){const o=e[r.mateRecordNumber];if(!o)throw new i.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(o))}return n}(r),o=n.map((e=>e.alignmentStart)),a=n.map((e=>e.alignmentStart+e.readLength-1)),s=Math.max(...a)-Math.min(...o)+1;s>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new i.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=s}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}class h{constructor(e,t,r){this.container=e,this.containerPosition=t,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.file.getSectionParsers(),t=yield this.container.getHeader(),r=yield this.file.readBlock(t._endPosition+this.containerPosition);if(void 0===r)throw new Error;if("MAPPED_SLICE_HEADER"===r.contentType){const n=(0,a.parseItem)(r.content,e.cramMappedSliceHeader.parser,0,t._endPosition);return Object.assign(Object.assign({},r),{parsedContent:n})}if("UNMAPPED_SLICE_HEADER"===r.contentType){const n=(0,a.parseItem)(r.content,e.cramUnmappedSliceHeader.parser,0,t._endPosition);return Object.assign(Object.assign({},r),{parsedContent:n})}throw new i.CramMalformedError(`error reading slice header block, invalid content type ${r.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e<r.length;e+=1){const n=yield this.file.readBlock(t);if(void 0===n)throw new Error;r[e]=n,t=r[e]._endPosition}return r}))}getCoreDataBlock(){return n(this,void 0,void 0,(function*(){return(yield this.getBlocks())[0]}))}_getBlocksContentIdIndex(){return n(this,void 0,void 0,(function*(){const e=yield this.getBlocks(),t={};return e.forEach((e=>{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,u.isMappedSliceHeader)(e))throw new Error;if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error;if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new i.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new i.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error;const r=yield this.getHeader();if(void 0===r)throw new Error;const n=yield this._getBlocksContentIdIndex();if(e>1&&this.file.options.checkSequenceMD5&&(0,u.isMappedSliceHeader)(r.parsedContent)&&r.parsedContent.refSeqId>=0&&"0000000000000000"!==r.parsedContent.md5.join("")){const e=yield this.getReferenceRegion();if(e){const{seq:t,start:n,end:o}=e,s=(0,a.sequenceMD5)(t),f=r.parsedContent.md5.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(s!==f)throw new i.CramMalformedError(`MD5 checksum reference mismatch for ref ${r.parsedContent.refSeqId} pos ${n}..${o}. recorded MD5: ${f}, calculated MD5: ${s}`)}}const o=yield this.getCoreDataBlock(),s={lastAlignmentStart:(0,u.isMappedSliceHeader)(r.parsedContent)?r.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},h=e=>{const r=t.getCodecForDataSeries(e);if(!r)throw new i.CramMalformedError(`no codec defined for ${e} data series`);return r.decode(this,o,n,s)};let d=new Array(r.parsedContent.numRecords);for(let i=0;i<d.length;i+=1)try{const a=(0,f.default)(this,h,t,r,o,n,s,e,i);d[i]=new l.default(Object.assign(Object.assign({},a),{uniqueId:r.contentPosition+r.parsedContent.recordCounter+i+1}))}catch(e){if(e instanceof A.CramBufferOverrunError){console.warn("read attempted beyond end of buffer, file seems truncated."),d=d.filter((e=>!!e));break}throw e}for(let e=0;e<d.length;e+=1){const{mateRecordNumber:t}=d[e];void 0!==t&&t>=0&&c(d,e,d[e],d[t])}return d}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const o=(yield r).filter(e);if(o.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,u.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error;const i={};for(let e=0;e<o.length;e+=1){const r=void 0!==t?t:o[e].sequenceId;let n=i[r];n||(n={id:r,start:o[e].alignmentStart,end:-1/0,seq:null},i[r]=n);const a=o[e].alignmentStart+(o[e].lengthOnRef||o[e].readLength)-1;a>n.end&&(n.end=a),o[e].alignmentStart<n.start&&(n.start=o[e].alignmentStart)}yield Promise.all(Object.values(i).map((e=>n(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(let e=0;e<o.length;e+=1){const n=i[void 0!==t?t:o[e].sequenceId];if(n&&n.seq){const t=n.seq;o[e].addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return o}))}}t.default=h,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>(0,a.tinyMemoize)(h,e)))},9488:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceMD5=t.tinyMemoize=t.parseItem=t.parseItf8=t.itf8Size=void 0;const o=n(r(2568)),i=r(1074);t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let o;if(n<128?(o=n,r+=1):n<192?(o=16383&(n<<8|e[r+1]),r+=2):n<224?(o=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(o=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(o=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new i.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[o,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:o,result:i}=t.parse(e);return Object.assign(Object.assign({},i),{_endPosition:o+n,_size:o-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,o.default)(e.toUpperCase().replace(/[^\x21-\x7e]/g,""))}},8577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},5590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CramRecord=t.CraiIndex=t.IndexedCramFile=t.CramFile=void 0;const s=i(r(8222));t.CramFile=s.default,Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return s.CramRecord}});const f=a(r(946));t.IndexedCramFile=f.default;const l=a(r(368));t.CraiIndex=l.default},946:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{f(n.next(e))}catch(e){i(e)}}function s(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8577),a=o(r(8222));t.default=class{constructor(e){if(e.cram?this.cram=e.cram:this.cram=new a.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof a.default))throw new Error("invalid arguments: no cramfile");if(this.index=e.index,!this.index.getEntriesForRange)throw new Error("invalid arguments: not an index");this.fetchSizeLimit=e.fetchSizeLimit||3e6}getRecordsForRange(e,t,r,o={}){return n(this,void 0,void 0,(function*(){if(o.viewAsPairs=o.viewAsPairs||!1,o.pairAcrossChr=o.pairAcrossChr||!1,o.maxInsertSize=o.maxInsertSize||2e5,"string"==typeof e)throw new i.CramUnimplementedError("string sequence names not yet supported");const n=e,a=yield this.index.getEntriesForRange(n,t,r),s=a.map((e=>e.sliceBytes)).reduce(((e,t)=>e+t),0);if(s>this.fetchSizeLimit)throw new i.CramSizeLimitError(`data size of ${s.toLocaleString()} bytes exceeded fetch size limit of ${this.fetchSizeLimit.toLocaleString()} bytes`);const f=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,l=yield Promise.all(a.map((e=>this.getRecordsInSlice(e,f))));let u=Array.prototype.concat(...l);if(o.viewAsPairs){const e={},t={};for(let r=0;r<u.length;r+=1){const n=u[r].readName;if(void 0===n)throw new Error;const o=u[r].uniqueId;e[n]||(e[n]=0),e[n]+=1,t[o]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const i=[];for(let e=0;e<u.length;e+=1){const t=u[e],a=t.readName;if(void 0===a)throw new Error;if(r[a]&&t.mate&&(t.mate.sequenceId===n||o.pairAcrossChr)&&Math.abs(t.alignmentStart-t.mate.alignmentStart)<o.maxInsertSize){const e=this.index.getEntriesForRange(t.mate.sequenceId,t.mate.alignmentStart,t.mate.alignmentStart+1);i.push(e)}}const a=yield Promise.all(i);let s=[];for(let e=0;e<a.length;e+=1)s.push(...a[e]);s=s.sort(((e,t)=>e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const f=[],l=[],A=s.map((e=>e.sliceBytes)).reduce(((e,t)=>e+t),0);if(A>this.fetchSizeLimit)throw new Error(`mate data size of ${A.toLocaleString()} bytes exceeded fetch size limit of ${this.fetchSizeLimit.toLocaleString()} bytes`);s.forEach((e=>{let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),f.push(n);const o=n.then((e=>{const n=[];for(let o=0;o<e.length;o+=1){const i=e[o];if(void 0===i.readName)throw new Error;r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));l.push(o)}));const c=yield Promise.all(l);if(c.length){const e=c.reduce(((e,t)=>e.concat(t)));u=u.concat(e)}}return u}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},3427:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.open=t.fromUrl=t.RemoteFile=t.LocalFile=void 0;const o=n(r(8575)),i=r(4319),a=r(2949);function s(e){const{protocol:t,pathname:r}=o.default.parse(e);return"file:"===t?new a.LocalFile(unescape((0,i.ensureNotNullish)(r))):new a.RemoteFile(e)}Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return a.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return a.RemoteFile}}),t.fromUrl=s,t.open=function(e,t,r){if(r)return r;if(e)return s(e);if(t)return new a.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")}},5702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},6484:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=r(5702),a=n(r(7634));t.default=function(e,t,r,n){let s=e.getInt(),f=e.getInt(),l=e.getInt(),u=e.getInt();const A=n.remaining(),c=-4&A;for(let o=0;o<c;o+=4){const A=t.R[a.default.get(s,i.TF_SHIFT)],c=t.R[a.default.get(f,i.TF_SHIFT)],h=t.R[a.default.get(l,i.TF_SHIFT)],d=t.R[a.default.get(u,i.TF_SHIFT)];n.putAt(o,A),n.putAt(o+1,c),n.putAt(o+2,h),n.putAt(o+3,d),s=a.default.advanceSymbolStep(s,r[255&A],i.TF_SHIFT),f=a.default.advanceSymbolStep(f,r[255&c],i.TF_SHIFT),l=a.default.advanceSymbolStep(l,r[255&h],i.TF_SHIFT),u=a.default.advanceSymbolStep(u,r[255&d],i.TF_SHIFT),s=a.default.renormalize(s,e),f=a.default.renormalize(f,e),l=a.default.renormalize(l,e),u=a.default.renormalize(u,e)}let h;switch(n.setPosition(c),3&A){case 0:break;case 1:h=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&h],i.TF_SHIFT),n.put(h);break;case 2:h=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&h],i.TF_SHIFT),n.put(h),h=t.R[a.default.get(f,i.TF_SHIFT)],a.default.advanceSymbol(f,e,r[255&h],i.TF_SHIFT),n.put(h);break;case 3:h=t.R[a.default.get(s,i.TF_SHIFT)],a.default.advanceSymbol(s,e,r[255&h],i.TF_SHIFT),n.put(h),h=t.R[a.default.get(f,i.TF_SHIFT)],a.default.advanceSymbol(f,e,r[255&h],i.TF_SHIFT),n.put(h),h=t.R[a.default.get(l,i.TF_SHIFT)],a.default.advanceSymbol(l,e,r[255&h],i.TF_SHIFT),n.put(h);break;default:throw new o.CramMalformedError("invalid output size encountered during rANS decoding")}n.setPosition(0)}},7121:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(5702),i=n(r(7634));t.default=function(e,t,r,n){const a=t.remaining();let s=e.getInt(),f=e.getInt(),l=e.getInt(),u=e.getInt();const A=a>>2;let c=0,h=A,d=2*A,g=3*A,p=0,y=0,m=0,C=0;for(;c<A;c+=1,h+=1,d+=1,g+=1){const a=255&r[p].R[i.default.get(s,o.TF_SHIFT)],A=255&r[y].R[i.default.get(f,o.TF_SHIFT)],I=255&r[m].R[i.default.get(l,o.TF_SHIFT)],b=255&r[C].R[i.default.get(u,o.TF_SHIFT)];t.putAt(c,a),t.putAt(h,A),t.putAt(d,I),t.putAt(g,b),s=i.default.advanceSymbolStep(s,n[p][a],o.TF_SHIFT),f=i.default.advanceSymbolStep(f,n[y][A],o.TF_SHIFT),l=i.default.advanceSymbolStep(l,n[m][I],o.TF_SHIFT),u=i.default.advanceSymbolStep(u,n[C][b],o.TF_SHIFT),s=i.default.renormalize(s,e),f=i.default.renormalize(f,e),l=i.default.renormalize(l,e),u=i.default.renormalize(u,e),p=a,y=A,m=I,C=b}for(;g<a;g+=1){const a=255&r[C].R[i.default.get(u,o.TF_SHIFT)];t.putAt(g,a),u=i.default.advanceSymbol(u,e,n[C][a],o.TF_SHIFT),C=a}}},7634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8577),o=r(5702);class i{constructor(){this.F=void 0,this.C=void 0}}function a(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}const s={FC:i,AriDecoder:class{constructor(){this.fc=new Array(256);for(let e=0;e<this.fc.length;e+=1)this.fc[e]=new i;this.R=null}},Symbol:class{constructor(){this.start=void 0,this.freq=void 0}},symbolInit:function(e,t,r){if(!(t<=65536))throw new n.CramMalformedError("assertion failed: start <= 1<<16");if(!(r<=65536-t))throw new n.CramMalformedError("assertion failed: freq <= 1<<16");e.start=t,e.freq=r},advanceStep:a,advanceSymbolStep:function(e,t,r){return a(e,t.start,t.freq,r)},get:function(e,t){return e&(1<<t)-1},advanceSymbol:function(e,t,r,n){return function(e,t,r,n,i){if((e=n*(e>>i)+(e&(1<<i)-1)-r)<o.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<o.RANS_BYTE_L);return e}(e,t,r.start,r.freq,n)},renormalize:function(e,t){if(e<o.RANS_BYTE_L)do{e=e<<8|255&t.get()}while(e<o.RANS_BYTE_L);return e}};t.default=s},696:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.readStatsO1=t.readStatsO0=void 0;const o=r(8577),i=r(5702),a=n(r(7634));function s(e){if(!e)throw new o.CramMalformedError("assertion failed")}t.readStatsO0=function(e,t,r){let n=0,o=0,f=255&e.get();do{null==t.fc[f]&&(t.fc[f]=new a.default.FC),t.fc[f].F=255&e.get(),t.fc[f].F>=128&&(t.fc[f].F&=-129,t.fc[f].F=(127&t.fc[f].F)<<8|255&e.get()),t.fc[f].C=o,a.default.symbolInit(r[f],t.fc[f].C,t.fc[f].F),t.R||(t.R=new Array(i.TOTFREQ)),t.R.fill(f,o,o+t.fc[f].F),o+=t.fc[f].F,0===n&&f+1===(255&e.getByteAt(e.position()))?(f=255&e.get(),n=255&e.get()):0!==n?(n-=1,f+=1):f=255&e.get()}while(0!==f);s(o<i.TOTFREQ)},t.readStatsO1=function(e,t,r){let n=0,o=255&e.get();do{let f=0,l=0,u=255&e.get();null==t[o]&&(t[o]=new a.default.AriDecoder);do{null==t[o].fc[u]&&(t[o].fc[u]=new a.default.FC),t[o].fc[u].F=255&e.get(),t[o].fc[u].F>=128&&(t[o].fc[u].F&=-129,t[o].fc[u].F=(127&t[o].fc[u].F)<<8|255&e.get()),t[o].fc[u].C=l,0===t[o].fc[u].F&&(t[o].fc[u].F=i.TOTFREQ),null==r[o][u]&&(r[o][u]=new a.default.RansDecSymbol),a.default.symbolInit(r[o][u],t[o].fc[u].C,t[o].fc[u].F),null==t[o].R&&(t[o].R=new Array(i.TOTFREQ)),t[o].R.fill(u,l,l+t[o].fc[u].F),l+=t[o].fc[u].F,s(l<=i.TOTFREQ),0===f&&u+1===(255&e.getByteAt(e.position()))?(u=255&e.get(),f=255&e.get()):0!==f?(f-=1,u+=1):u=255&e.get()}while(0!==u);0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o)}},9675:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8577),i=n(r(7634)),a=r(696),s=n(r(6484)),f=n(r(7121));class l{constructor(e,t=0){this._buffer=e,this._position=t,this.length=e.length}get(){const e=this._buffer[this._position];return this._position+=1,e}getByte(){return this.get()}getByteAt(e){return this._buffer[e]}position(){return this._position}put(e){return this._buffer[this._position]=e,this._position+=1,e}putAt(e,t){return this._buffer[e]=t,t}setPosition(e){return this._position=e,e}getInt(){const e=this._buffer.readInt32LE(this._position);return this._position+=4,e}remaining(){return this._buffer.length-this._position}}t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),u=n.get();if(0!==u&&1!==u)throw new o.CramMalformedError(`Invalid rANS order ${u}`);if(n.getInt()!==n.remaining()-4)throw new o.CramMalformedError("Incorrect input length.");const A=n.getInt(),c=new l(t||Buffer.allocUnsafe(A));if(c.length<A)throw new o.CramMalformedError(`Output buffer too small to fit ${A} bytes.`);switch(u){case 0:return function(e,t){const r=new i.default.AriDecoder,n=new Array(256);for(let e=0;e<n.length;e+=1)n[e]=new i.default.Symbol;return(0,a.readStatsO0)(e,r,n),(0,s.default)(e,r,n,t),t}(n,c);case 1:return function(e,t){const r=new Array(256);for(let e=0;e<r.length;e+=1)r[e]=new i.default.AriDecoder;const n=new Array(256);for(let e=0;e<n.length;e+=1){n[e]=new Array(256);for(let t=0;t<n[e].length;t+=1)n[e][t]=new i.default.Symbol}return(0,a.readStatsO1)(e,r,n),(0,f.default)(e,t,r,n),t}(n,c);default:throw new o.CramMalformedError(`Invalid rANS order: ${u}`)}}},7578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=void 0,t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];return t.forEach((e=>{const[t,...n]=e.split(/\t/),o=n.map((e=>{const[t,r]=e.split(":",2);return{tag:t,value:r}}));t&&r.push({tag:t.substr(1),data:o})})),r}},4319:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNotNullish=void 0,t.ensureNotNullish=function(e){if(null==e)throw new Error("Value must not be nullish.");return e}},597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=void 0;const n=r(9591);t.unzip=function(e){return Buffer.from((0,n.inflate)(e))}},9996:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=r(8764).Buffer,i=r(22),a=r(2961)._,s=r(3720);"undefined"!=typeof window&&(window.Buffer=o),"undefined"!=typeof self&&(self.Buffer=o);var f={UInt8:1,UInt16LE:2,UInt16BE:2,UInt32LE:4,UInt32BE:4,Int8:1,Int16LE:2,Int16BE:2,Int32LE:4,Int32BE:4,FloatLE:4,FloatBE:4,DoubleLE:8,DoubleBE:8,UInt64:8,Int64:8},l={},u="___parser_",A=[];!function(){var e;for(e=1;e<=32;e++)A.push(e)}();var c={};Object.keys(f).concat(Object.keys({String:null,Buffer:null,Array:null,Skip:null,Choice:null,Nest:null,Bit:null,Itf8:null,Ltf8:null})).forEach((function(e){c[e.toLowerCase()]=e}));var h=function(){this.varName="",this.type="",this.options={},this.next=null,this.head=null,this.compiled=null,this.endian="le",this.constructorFn=null,this.alias=null};h.start=function(){return new h},Object.keys(f).forEach((function(e){h.prototype[e.toLowerCase()]=function(t,r){return this.setNextParser(e.toLowerCase(),t,r)};var t=e.replace(/BE|LE/,"").toLowerCase();t in h.prototype||(h.prototype[t]=function(e,r){return this[t+this.endian](e,r)})})),A.forEach((function(e){h.prototype["bit".concat(e.toString())]=function(t,r){return r||(r={}),r.length=e,this.setNextParser("bit",t,r)}})),h.prototype.namely=function(e){return l[e]=this,this.alias=e,this},h.prototype.skip=function(e,t){if(t&&t.assert)throw new Error("assert option on skip is not allowed.");return this.setNextParser("skip","",{length:e})},h.prototype.string=function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("Neither length, zeroTerminated, nor greedy is defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("Length or greedy must be defined if stripNull is defined.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)},h.prototype.buffer=function(e,t){if(!t.length&&!t.readUntil)throw new Error("Length nor readUntil is defined in buffer parser");return this.setNextParser("buffer",e,t)},h.prototype.array=function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("Length option of array is not defined.");if(!t.type)throw new Error("Type option of array is not defined.");if("string"==typeof t.type&&!l[t.type]&&Object.keys(f).indexOf(c[t.type])<0)throw new Error('Specified primitive type "'.concat(t.type,'" is not supported.'));return this.setNextParser("array",e,t)},h.prototype.choice=function(e,t){if(1===arguments.length&&"object"===n(e)&&(t=e,e=null),!t.tag)throw new Error("Tag option of array is not defined.");if(!t.choices)throw new Error("Choices option of array is not defined.");return Object.keys(t.choices).forEach((function(r){if(!t.choices[r])throw new Error("Choice Case ".concat(r," of ").concat(e," is not valid."));if("string"==typeof t.choices[r]&&!l[t.choices[r]]&&Object.keys(f).indexOf(c[t.choices[r]])<0)throw new Error('Specified primitive type "'.concat(t.choices[r],'" is not supported.'))}),this),this.setNextParser("choice",e,t)},h.prototype.nest=function(e,t){if(1===arguments.length&&"object"===n(e)&&(t=e,e=null),!t.type)throw new Error("Type option of nest is not defined.");if(!(t.type instanceof h||l[t.type]))throw new Error("Type option of nest must be a Parser object.");if(!(t.type instanceof h||e))throw new Error("options.type must be a object if variable name is omitted.");return this.setNextParser("nest",e,t)},h.prototype.endianess=function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error("Invalid endianess: ".concat(e))}return this},h.prototype.create=function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this},h.prototype.getCode=function(){var e=new a;return e.pushCode("if (!Buffer.isBuffer(buffer)) {"),e.generateError('"argument buffer is not a Buffer object"'),e.pushCode("}"),this.alias?this.addAliasedCode(e):this.addRawCode(e),this.alias?e.pushCode("return {0}(0)",u+this.alias):e.pushCode("return { offset: offset, result: vars };"),e.code},h.prototype.addRawCode=function(e){e.pushCode("var offset = 0;"),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };")},h.prototype.addAliasedCode=function(e){return e.pushCode("function {0}(offset) {",u+this.alias),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e},h.prototype.resolveReferences=function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){l[t].addAliasedCode(e)}))},h.prototype.compile=function(){var e="(function(buffer, constructorFn, Long) { ".concat(this.getCode()," })");this.compiled=i.runInThisContext(e)},h.prototype.sizeOf=function(){var e=NaN;if(Object.keys(f).indexOf(this.type)>=0)e=f[this.type];else if("String"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Array"===this.type&&"number"==typeof this.options.length){var t=NaN;"string"==typeof this.options.type?t=f[c[this.options.type]]:this.options.type instanceof h&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"Skip"===this.type?e=this.options.length:"Nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e},h.prototype.parse=function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn,s)},h.prototype.setNextParser=function(e,t,r){var n=new h;return n.type=c[e],n.varName=t,n.options=r||n.options,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this},h.prototype.generate=function(e){this.type&&(this["generate".concat(this.type)](e),this.generateAssert(e));var t=e.generateVariable(this.varName);return this.options.formatter&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)},h.prototype.generateAssert=function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(n(this.options.assert)){case"function":e.pushCode("if (!({0}).call(vars, {1})) {",this.options.assert,t);break;case"number":e.pushCode("if ({0} !== {1}) {",this.options.assert,t);break;case"string":e.pushCode('if ("{0}" !== {1}) {',this.options.assert,t);break;default:throw new Error("Assert option supports only strings, numbers and assert functions.")}e.generateError('"Assert error: {0} is " + {0}',t),e.pushCode("}")}},h.prototype.generateNext=function(e){return this.next&&(e=this.next.generate(e)),e},Object.keys(f).forEach((function(e){h.prototype["generate".concat(e)]=function(t){"UInt64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), true, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):"Int64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), false, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):t.pushCode("{0} = buffer.read{1}(offset);",t.generateVariable(this.varName),e),t.pushCode("offset += {0};",f[e])}})),h.prototype.generateBit=function(e){var t=JSON.parse(JSON.stringify(this));if(t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["Bit","Nest"].indexOf(this.next.type)<0){var r=0;e.bitFields.forEach((function(e){r+=e.options.length}));var n=e.generateTmpVariable();if(r<=8)e.pushCode("var {0} = buffer.readUInt8(offset);",n),r=8;else if(r<=16)e.pushCode("var {0} = buffer.readUInt16BE(offset);",n),r=16;else if(r<=24){var o=e.generateTmpVariable(),i=e.generateTmpVariable();e.pushCode("var {0} = buffer.readUInt16BE(offset);",o),e.pushCode("var {0} = buffer.readUInt8(offset + 2);",i),e.pushCode("var {2} = ({0} << 8) | {1};",o,i,n),r=24}else{if(!(r<=32))throw new Error("Currently, bit field sequence longer than 4-bytes is not supported.");e.pushCode("var {0} = buffer.readUInt32BE(offset);",n),r=32}e.pushCode("offset += {0};",r/8);var a=0,s="be"===this.endian;e.bitFields.forEach((function(t){e.pushCode("{0} = {1} >> {2} & {3};",t.varName,n,s?r-a-t.options.length:a,(1<<t.options.length)-1),a+=t.options.length})),e.bitFields=[]}},h.prototype.generateSkip=function(e){var t=e.generateOption(this.options.length);e.pushCode("offset += {0};",t)},h.prototype.generateString=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();this.options.length&&this.options.zeroTerminated?(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.readUInt8(offset++) !== 0 && offset - {0} < {1});",r,this.options.length),e.pushCode("{0} = buffer.toString('{1}', {2}, offset - {2} < {3} ? offset - 1 : offset);",t,this.options.encoding,r,this.options.length)):this.options.length?(e.pushCode("{0} = buffer.toString('{1}', offset, offset + {2});",t,this.options.encoding,e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))):this.options.zeroTerminated?(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.readUInt8(offset++) !== 0);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset - 1);",t,this.options.encoding,r)):this.options.greedy&&(e.pushCode("var {0} = offset;",r),e.pushCode("while(buffer.length > offset++);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset);",t,this.options.encoding,r)),this.options.stripNull&&e.pushCode("{0} = {0}.replace(/\\x00+$/g, '')",t)},h.prototype.generateBuffer=function(e){"eof"===this.options.readUntil?e.pushCode("{0} = buffer.slice(offset);",e.generateVariable(this.varName)):(e.pushCode("{0} = buffer.slice(offset, offset + {1});",e.generateVariable(this.varName),e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))),this.options.clone&&e.pushCode("{0} = Buffer.from({0});",e.generateVariable(this.varName))},h.prototype.generateArray=function(e){var t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),a=e.generateTmpVariable(),s=this.options.key,A="string"==typeof s;if(A?e.pushCode("{0} = {};",i):e.pushCode("{0} = [];",i),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode("for (var {0} = 0; offset < buffer.length; {0}++) {",o):void 0!==r?e.pushCode("for (var {0} = offset; offset - {0} < {1}; ) {",o,r):e.pushCode("for (var {0} = 0; {0} < {1}; {0}++) {",o,t),"string"==typeof n)if(l[n]){var d=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",d,u+n),e.pushCode("var {0} = {1}.result; offset = {1}.offset;",a,d),n!==this.alias&&e.addReference(n)}else e.pushCode("var {0} = buffer.read{1}(offset);",a,c[n]),e.pushCode("offset += {0};",f[c[n]]);else n instanceof h&&(e.pushCode("var {0} = {};",a),e.pushScope(a),n.generate(e),e.popScope());A?e.pushCode("{0}[{2}.{1}] = {2};",i,s,a):e.pushCode("{0}.push({1});",i,a),e.pushCode("}"),"function"==typeof this.options.readUntil&&e.pushCode(" while (!({0}).call(this, {1}, buffer.slice(offset)));",this.options.readUntil,a)},h.prototype.generateChoiceCase=function(e,t,r){if("string"==typeof r)if(l[r]){var n=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",n,u+r),e.pushCode("{0} = {1}.result; offset = {1}.offset;",e.generateVariable(this.varName),n),r!==this.alias&&e.addReference(r)}else e.pushCode("{0} = buffer.read{1}(offset);",e.generateVariable(this.varName),c[r]),e.pushCode("offset += {0};",f[c[r]]);else r instanceof h&&(e.pushPath(t),r.generate(e),e.popPath(t))},h.prototype.generateChoice=function(e){var t=e.generateOption(this.options.tag);this.varName&&e.pushCode("{0} = {};",e.generateVariable(this.varName)),e.pushCode("switch({0}) {",t),Object.keys(this.options.choices).forEach((function(t){var r=this.options.choices[t];Number.isNaN(parseInt(t,10))?e.pushCode("case '{0}':",t):e.pushCode("case {0}:",t),this.generateChoiceCase(e,this.varName,r),e.pushCode("break;")}),this),e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + {0} + " at choice"',t),e.pushCode("}")},h.prototype.generateNest=function(e){var t=e.generateVariable(this.varName);if(this.options.type instanceof h)this.varName&&e.pushCode("{0} = {};",t),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(l[this.options.type]){var r=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",r,u+this.options.type),e.pushCode("{0} = {1}.result; offset = {1}.offset;",t,r),this.options.type!==this.alias&&e.addReference(this.options.type)}},h.prototype.generateFormatter=function(e,t,r){"function"==typeof r&&e.pushCode("{0} = ({1}).call(this, {0});",t,r)},h.prototype.isInteger=function(){return!!this.type.match(/U?Int[8|16|32][BE|LE]?|Bit\d+/)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.generateItf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((").concat(r,"<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((").concat(r,"<<16) | (buffer[offset+1]<< 8) | buffer[offset+2]) & 0x1fffff;\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((").concat(r,"<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4\n } else {\n ").concat(t," = ((").concat(r," & 0x0f)<<28) | (buffer[offset+1]<<20) | (buffer[offset+2]<<12) | (buffer[offset+3]<<4) | (buffer[offset+4] & 0x0f);\n // x=((0xff & 0x0f)<<28) | (0xff<<20) | (0xff<<12) | (0xff<<4) | (0x0f & 0x0f);\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5\n }\n "))},h.prototype.ltf8=function(e,t){return this.setNextParser("ltf8",e,t)},h.prototype.generateLtf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((buffer[offset]<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((buffer[offset]<<16) | (buffer[offset+1]<<8) | buffer[offset+2]) & 0x1fffff;\n ").concat(t," = (((").concat(r," & 63) << 16) | buffer.readUInt16LE(offset + 1));\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((buffer[offset]<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4;\n } else if (").concat(r," < 0xf8) {\n ").concat(t," = (((buffer[offset] & 15) * Math.pow(2,32))) +\n (buffer[offset+1]<<24) | (buffer[offset+2]<<16 | buffer[offset+3]<<8 | buffer[offset+4])\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5;\n } else if (").concat(r," < 0xfc) {\n ").concat(t," = ((((buffer[offset] & 7) << 8) | buffer[offset+1] )) * Math.pow(2,32) +\n (buffer[offset+2]<<24) | (buffer[offset+3]<<16 | buffer[offset+4]<<8 | buffer[offset+5])\n offset += 6;\n } else if (").concat(r," < 0xfe) {\n ").concat(t," = ((((buffer[offset] & 3) << 16) | buffer[offset+1]<<8 | buffer[offset+2])) * Math.pow(2,32) +\n (buffer[offset+3]<<24) | (buffer[offset+4]<<16 | buffer[offset+5]<<8 | buffer[offset+6])\n offset += 7;\n } else if (").concat(r," < 0xff) {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+8));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 8;\n } else {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+9));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 9;\n }\n "))},t.Parser=h},2961:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n=function(){this.code="",this.scopes=[["vars"]],this.isAsync=!1,this.bitFields=[],this.tmpVariableCount=0,this.references={}};n.prototype.generateVariable=function(e){var t=[];for(Array.prototype.push.apply(t,this.scopes[this.scopes.length-1]);/^\$parent\./.test(e);)t.pop(),e=e.replace(/^\$parent\./,"");return e&&t.push(e),t.join(".")},n.prototype.generateOption=function(e){switch(r(e)){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"(".concat(e,").call(").concat(this.generateVariable(),", vars)");default:return}},n.prototype.generateError=function(){var e=Array.prototype.slice.call(arguments),t=n.interpolate.apply(this,e);this.isAsync?this.pushCode("return process.nextTick(function() { callback(new Error(".concat(t,"), vars); });")):this.pushCode("throw new Error(".concat(t,");"))},n.prototype.generateTmpVariable=function(){return"$tmp".concat(this.tmpVariableCount++)},n.prototype.pushCode=function(){var e=Array.prototype.slice.call(arguments);this.code+="".concat(n.interpolate.apply(this,e),"\n")},n.prototype.pushPath=function(e){e&&this.scopes[this.scopes.length-1].push(e)},n.prototype.popPath=function(e){e&&this.scopes[this.scopes.length-1].pop()},n.prototype.pushScope=function(e){this.scopes.push([e])},n.prototype.popScope=function(){this.scopes.pop()},n.prototype.addReference=function(e){this.references[e]||(this.references[e]={resolved:!1,requested:!1})},n.prototype.markResolved=function(e){this.references[e].resolved=!0},n.prototype.markRequested=function(e){e.forEach(function(e){this.references[e].requested=!0}.bind(this))},n.prototype.getUnresolvedReferences=function(){var e=this.references;return Object.keys(this.references).filter((function(t){return!e[t].resolved&&!e[t].requested}))},n.interpolate=function(e){var t=e.match(/{\d+}/g),r=Array.prototype.slice.call(arguments,1);return t&&t.forEach((function(t){var n=parseInt(t.substr(1,t.length-2),10);e=e.replace(t,r[n].toString())})),e},t._=n},22:e=>{e.exports.runInThisContext=function(e){return new Function("code","return eval(code);").call(globalThis,e)}},445:(e,t,r)=>{const n=r(7381),o=r(9260),i=r(576),a=r(4693),s=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,o=t,i=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&s&&([n,o]=this.decodePackMeta(this.stream)),32&r)var a=this.decodeCat(this.stream,o);else a=4&r?this.decodeExt(this.stream,o):64&r?i?this.decodeRLE1(this.stream,o):this.decodeRLE0(this.stream,o):i?this.decode1(this.stream,o):this.decode0(this.stream,o);return r&s&&(a=this.decodePack(a,n,t)),a}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return Buffer.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,n=1&t,i=e.length;return t&s&&([r,e,i]=this.encodePack(e)),t&s&&this.stream.WriteStream(r),64&t?n?this.encodeRLE1(e,i,this.stream):this.encodeRLE0(e,i,this.stream):n?this.encode1(e,i,this.stream):this.encode0(e,i,this.stream)}decode0(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new i(o),s=new n(e);s.RangeStartDecode(e);for(var f=0;f<t;f++)r[f]=a.ModelDecode(e,s);return r}encode0(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new i(o);r.WriteByte(o);var f=new n(r);for(a=0;a<t;a++)s.ModelEncode(r,f,e[a]);return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decode1(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),s=0;s<o;s++)a[s]=new i(o);var f=new n(e);f.RangeStartDecode(e);var l=0;for(s=0;s<t;s++)r[s]=a[l].ModelDecode(e,f),l=r[s];return r}encode1(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new Array(o);for(a=0;a<o;a++)s[a]=new i(o);r.WriteByte(o);var f=new n(r),l=0;for(a=0;a<t;a++)s[l].ModelEncode(r,f,e[a]),l=e[a];return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeExt(e,t){var r=new Buffer.allocUnsafe(t),n=a.array(e.buf.slice(e.pos)),o=a.header(n),i=0;do{var s=a.decompress(n,o);-1!=s&&(Buffer.from(s).copy(r,i),i+=s.length,o-=s.length)}while(-1!=s);return r}encodeExt(e,t){}decodeRLE0(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new i(o),s=new Array(258),f=0;f<=257;f++)s[f]=new i(4);var l=new n(e);for(l.RangeStartDecode(e),f=0;f<t;){r[f]=a.ModelDecode(e,l);for(var u=s[r[f]].ModelDecode(e,l),A=u,c=256;3==u;)u=s[c].ModelDecode(e,l),c=257,A+=u;for(var h=1;h<=A;h++)r[f+h]=r[f];f+=A+1}return r}encodeRLE0(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new i(o),f=new Array(258);for(a=0;a<=257;a++)f[a]=new i(4);r.WriteByte(o);var l=new n(r);for(a=0;a<t;){s.ModelEncode(r,l,e[a]);for(var u=1;a+u<t&&e[a+u]==e[a];)u++;u--;var A=e[a];e[a],a+=u+1;var c=u>=3?3:u;for(f[A].ModelEncode(r,l,c),u-=c,A=256;3==c;)c=u>=3?3:u,f[A].ModelEncode(r,l,c),A=257,u-=c}return l.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new Buffer.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),s=0;s<o;s++)a[s]=new i(o);var f=new Array(258);for(s=0;s<=257;s++)f[s]=new i(4);var l=new n(e);l.RangeStartDecode(e);var u=0;for(s=0;s<t;){r[s]=a[u].ModelDecode(e,l),u=r[s];for(var A=f[r[s]].ModelDecode(e,l),c=A,h=256;3==A;)A=f[h].ModelDecode(e,l),h=257,c+=A;for(var d=1;d<=c;d++)r[s+d]=r[s];s+=c+1}return r}encodeRLE1(e,t,r){for(var o=0,a=0;a<t;a++)o<e[a]&&(o=e[a]);o++;var s=new Array(o);for(a=0;a<o;a++)s[a]=new i(o);var f=new Array(258);for(a=0;a<=257;a++)f[a]=new i(4);r.WriteByte(o);for(var l=new n(r),u=(a=0,0);a<t;){s[u].ModelEncode(r,l,e[a]);for(var A=1;a+A<t&&e[a+A]==e[a];)A++;A--;var c=e[a];u=e[a],a+=A+1;var h=A>=3?3:A;for(f[c].ModelEncode(r,l,h),A-=h,c=256;3==h;)h=A>=3?3:A,f[c].ModelEncode(r,l,h),c=257,A-=h}return l.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r<this.nsym;r++)t[r]=e.ReadByte();return[t,e.ReadUint7()]}decodePack(e,t,r){var n=new Buffer.allocUnsafe(r);if(this.nsym<=1)for(var o=0;o<r;o++)n[o]=t[0];else if(this.nsym<=2){o=0;for(var i=0;o<r;o++){if(o%8==0)var a=e[i++];n[o]=t[1&a],a>>=1}}else if(this.nsym<=4)for(o=0,i=0;o<r;o++)o%4==0&&(a=e[i++]),n[o]=t[3&a],a>>=2;else{if(!(this.nsym<=16))return e;for(o=0,i=0;o<r;o++)o%2==0&&(a=e[i++]),n[o]=t[15&a],a>>=4}return n}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;n<e.length;n++)r[e[n]]=1;var i=0;for(n=0;n<256;n++)r[n]&&(r[n]=++i);for(t.WriteByte(i),n=0;n<256;n++)r[n]&&(t.WriteByte(n),r[n]--);return[t,r,i]}encodePack(e){var t,r,n;[t,r,n]=this.packMeta(e);var o=e.length,i=0;if(n<=1)return t.WriteUint7(0),[t,new Buffer.allocUnsafe(0),0];if(n<=2){for(var a=new Buffer.allocUnsafe(Math.floor((o+7)/8)),s=(i=0,0);i<(-8&o);i+=8,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<1)+(r[e[i+2]]<<2)+(r[e[i+3]]<<3)+(r[e[i+4]]<<4)+(r[e[i+5]]<<5)+(r[e[i+6]]<<6)+(r[e[i+7]]<<7);if(i<o){a[s]=0;for(var f=0;i<o;)a[s]|=r[e[i++]]<<f,f++;s++}return t.WriteUint7(s),[t,a,a.length]}if(n<=4){for(a=new Buffer.allocUnsafe(Math.floor((o+3)/4)),i=0,s=0;i<(-4&o);i+=4,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<2)+(r[e[i+2]]<<4)+(r[e[i+3]]<<6);if(i<o){for(a[s]=0,f=0;i<o;)a[s]|=r[e[i++]]<<f,f+=2;s++}return t.WriteUint7(s),[t,a,a.length]}if(n<=16){for(a=new Buffer.allocUnsafe(Math.floor((o+1)/2)),i=0,s=0;i<(-2&o);i+=2,s++)a[s]=(r[e[i+0]]<<0)+(r[e[i+1]]<<4);return i<o&&(a[s++]=r[e[i++]]),t.WriteUint7(s),[t,a,a.length]}return t.WriteUint7(e.length),[t,e,e.length]}encodeStripe(e,t,r){0==r&&(r=4);for(var n=new Array(r),i=new Array(r),a=0;a<r;a++)i[a]=Math.floor(t.length/r)+(t.length%r>a),n[a]=new Array(i[a]);for(var s=0,f=0;f<t.length;f+=r,s++)for(var l=0;l<r;l++)s<n[l].length&&(n[l][s]=t[f+l]);var u=new Array(r),A=0;for(a=0;a<r;a++){var c=this.encode(n[a],0),h=this.encode(n[a],1);u[a]=h.length<c.length?h:c,A+=u[a].length}var d=new o("",0,A+5*r+1);for(d.WriteByte(r),a=0;a<r;a++)d.WriteUint7(u[a].length);for(a=0;a<r;a++)d.WriteData(u[a],u[a].length);return d.buf.slice(0,d.buf.pos)}decodeStripe(e,t){for(var r=e.ReadByte(),n=new Array(r),o=new Array(r),i=0;i<r;i++)n[i]=e.ReadUint7();var a=new Array(r);for(i=0;i<r;i++)o[i]=Math.floor(t/r)+(t%r>i),a[i]=this.decodeStream(e,o[i]);var s=new Buffer.allocUnsafe(t);for(i=0;i<r;i++)for(var f=0;f<o[i];f++)s[f*r+i]=a[i][f];return s}decodeCat(e,t){for(var r=new Buffer.allocUnsafe(t),n=0;n<t;n++)r[n]=e.ReadByte();return r}}},7381:e=>{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var o=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low<o&&(0!=this.carry&&console.log("ERROR: Multiple carry"),this.carry=1);this.range<1<<24;)this.range*=256,this.RangeShiftLow(e)}RangeFinishEncode(e){for(var t=0;t<5;t++)this.RangeShiftLow(e)}}},576:e=>{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,o=0;n+this.F[o]<=r;)n+=this.F[o++];t.RangeDecode(e,n,this.F[o],this.total_freq),this.F[o]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var i=this.S[o];if(o>0&&this.F[o]>this.F[o-1]){var a=this.F[o];this.F[o]=this.F[o-1],this.F[o-1]=a,a=this.S[o],this.S[o]=this.S[o-1],this.S[o-1]=a}return i}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,o=0;this.S[o]!=r;o++)n+=this.F[o];if(t.RangeEncode(e,n,this.F[o],this.total_freq),this.F[o]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[o],o>0&&this.F[o]>this.F[o-1]){var i=this.F[o];this.F[o]=this.F[o-1],this.F[o-1]=i,i=this.S[o],this.S[o]=this.S[o-1],this.S[o-1]=i}}}},5260:(e,t,r)=>{const n=r(9260),o=r(576),i=r(7381);function a(e,t,r){for(var n=0,o=0,i=-1,a=new Array(1024);o<r;){var s=e.ReadByte();if(a[n++]=s,o+=s,s==i){var f=e.ReadByte();for(o+=s*f;f--;)a[n++]=s}i=s}var l=0;for(n=0,o=0;o<r;){var u=0;do{var A=a[n++];u+=A}while(255==A);for(;u--;)t[o++]=l;l++}}const s=2,f=4,l=8,u=16,A=32,c=64,h=128;function d(e,t,r){var n=e.context;return t.qctx=(t.qctx<<e.qshift)+e.qtab[r],n+=(t.qctx&(1<<e.qbits)-1)<<e.qloc,e.do_pos&&(n+=e.ptab[Math.min(t.p,1023)]<<e.ploc),e.do_delta&&(n+=e.dtab[Math.min(t.delta,255)]<<e.dloc,t.delta+=t.prevq!=r?1:0,t.prevq=r),e.do_sel&&(n+=t.s<<e.sloc),t.p--,65535&n}function g(e){var t={};t.context=e.ReadUint16(),t.pflags=e.ReadByte(),t.do_dedup=t.pflags&s,t.fixed_len=t.pflags&f,t.do_sel=t.pflags&l,t.do_qmap=t.pflags&u,t.do_pos=t.pflags&A,t.do_delta=t.pflags&c,t.do_qtab=t.pflags&h,t.max_sym=e.ReadByte();var r=e.ReadByte();if(t.qbits=r>>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&u)for(var n=0;n<t.max_sym;n++)t.qmap[n]=e.ReadByte();else for(n=0;n<256;n++)t.qmap[n]=n;if(t.qtab=new Array(1024),t.qbits>0&&t.pflags&h)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&A&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&c&&a(e,t.dtab,256),t}function p(e,t,r,n,o,i){r.max_sel>0?o.s=n.sel.ModelDecode(e,t):o.s=0,o.x=r.stab[o.s];var a=r.params[o.x];if(a.fixed_len>=0){var f=n.len[0].ModelDecode(e,t);f|=n.len[1].ModelDecode(e,t)<<8,f|=n.len[2].ModelDecode(e,t)<<16,f|=n.len[3].ModelDecode(e,t)<<24,a.fixed_len>0&&(a.fixed_len=-f)}else f=-a.fixed_len;o.len=f,r.do_rev&&(i[o.rec]=n.rev.ModelDecode(e,t)),o.is_dup=0,a.pflags&s&&n.dup.ModelDecode(e,t)&&(o.is_dup=1),o.p=f,o.delta=0,o.qctx=0,o.prevq=0,o.rec++}function y(e,t,r){for(var n=0,o=0,i=new Array(2*r),a=0;n<r;){for(var s=n;n<r&&t[n]==o;)n++;var f=n-s;do{var l=Math.min(255,f);i[a++]=l,f-=l}while(255==l);o++}var u=-1,A=new Array(2*r),c=0;for(n=0;n<a;){var h=i[n++];if(A[c++]=h,h==u){for(s=n;n<a&&i[n]==u&&n-s<255;)n++;A[c++]=n-s}else u=h}e.WriteData(A,c)}e.exports={decode:function(e,t){return function(e,t){var r=e.ReadUint7(),n=function(e){var t={max_sym:0};if(5==e.ReadByte()){var r=e.ReadByte(),n=1&r?e.ReadByte():1,o=r.nparam>1?r.nparam-1:0,i=new Array(256);if(2&r)o=e.ReadByte(),a(e,i,256);else{for(var s=0;s<n;s++)i[s]=s;for(;s<256;s++)i[s]=n-1}t.do_rev=4&r,t.stab=i,t.max_sel=o,t.params=new Array(t.nparam);for(var f=0;f<n;f++)t.params[f]=g(e),t.max_sym<t.params[f].max_sym&&(t.max_sym=t.params[f].max_sym);return t}console.error("Invalid FQZComp version number")}(e);if(n){var s=n.params,f=new Array(t.length),l=function(e){var t={};t.qual=new Array(65536);for(var r=0;r<65536;r++)t.qual[r]=new o(e.max_sym+1);for(t.len=new Array(4),r=0;r<4;r++)t.len[r]=new o(256);return t.rev=new o(2),t.dup=new o(2),e.max_sel>0&&(t.sel=new o(e.max_sel+1)),t}(n),u=new i(e);u.RangeStartDecode(e);for(var A=new Buffer.allocUnsafe(r),c={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},h=0;h<r;){if(0==c.p){if(p(e,u,n,l,c,f),c.is_dup>0&&l.dup.ModelDecode(e,u)){for(var y=0;y<len;y++)A[h+y]=A[h+y-c.len];h+=c.len,c.p=0;continue}t.push(c.len);var m=(s=n.params[c.x]).context}var C=l.qual[m].ModelDecode(e,u);A[h++]=s.qmap[C],m=d(s,c,C)}return n.do_rev&&function(e,t,r,n){for(var o=0,i=0;i<t;){if(r[o])for(var a=0,s=n[o]-1;a<s;){var f=e[i+a];e[i+a]=e[i+s],e[i+s]=f,a++,s--}i+=n[o++]}}(A,r,f,t),A}}(new n(e),t)},encode:function(e,t,r){for(var a=new Array(2),d=new Array(2),g=new Array(2),p=new Array(2),m=new Array(256),C=0;C<2;C++)a[C]=new Array(256),d[C]=new Array(256),g[C]=new Array(1024),p[C]=new Array(256);(b=new n("",0,1.1*e.length+100)).WriteUint7(e.length);var I=function(e,t,r,n){for(var o=r[0],i=0;i<r.length&&r[i]==o;i++);var a=i==r.length?1:0,s=0,f=0;for(i=0;i<256;i++)n[0][i]=0;var l=0,u=0;for(i=0;i<e.length;i++)0==u&&(u=t[l<t.length-1?l++:l]),n[0][e[i]]++,u--;for(i=0;i<256;i++)n[0][i]&&(f<i&&(f=i),s++);var A=5,c=0;return s<=16&&(c=1,A=s<=2?1:s<=4?2:s<=8?3:4),[{qbits:8+(A>4),qshift:A,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:A>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:f,nsym:s,do_qmap:c,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:A<=4?1:0,do_qtab:0,qbits:8+(A>4)-(0==a),sbits:1,sloc:15-(A<=4),do_stab:1,do_sel:1}]}(e,t,r,a),b=function(e,t,r,n,o,i,a){for(var d=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g<t.length;g++)a[g]=g;for(;g<256;g++)a[g]=t.length-1;e.WriteByte(5);var p=(t.length>1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(p),1&p&&e.WriteByte(t.length),2&p){var m=1<<t[0].sbits;m>0&&m--,e.WriteByte(m),y(e,a,256)}for(var C=0;C<t.length;C++){if(e.WriteUint16(t[C].context),e.WriteByte((t[C].do_qtab?h:0)|(t[C].do_delta?c:0)|(t[C].do_pos?A:0)|(t[C].do_qmap?u:0)|(t[C].do_sel?l:0)|(t[C].fixed_len?f:0)|(t[C].do_dedup?s:0)),t[C].do_qmap?e.WriteByte(t[C].nsym):e.WriteByte(t[C].max_sym),e.WriteByte(t[C].qbits<<4|t[C].qshift),e.WriteByte(t[C].qloc<<4|t[C].sloc),e.WriteByte(t[C].ploc<<4|t[C].dloc),t[C].do_qmap){t[C].max_sym=t[C].nsym;var I=0;for(g=0;g<256;g++)r[C][g]&&(e.WriteByte(g),r[C][g]=I++);for(;I<t[C].nsym;I++)e.WriteByte(0)}else for(g=0;g<256;g++)r[C][g]=g;if(t[C].qbits>0){for(g=0;g<256;g++)n[C][g]=g;t[C].do_qtab&&y(e,n[C],256)}if(t[C].pbits>0){for(g=0;g<1024;g++)o[C][g]=Math.min((1<<t[C].pbits)-1,g>>t[C].pshift);y(e,o[C],1024)}if(t[C].dbits>0){for(g=0;g<256;g++)d[g]>(1<<t[C].dbits)-1&&(d[g]=(1<<t[C].dbits)-1);for(g=0;g<256;g++)i[C][g]=d[Math.min(d.length-1,g>>t[C].dshift)];y(e,i[C],256)}}return e}(b,I,a,d,g,p,m);return function(e,t,r,n,a,s,f,l,u,A){var c=1<<a[0].sbits;c>0&&c--;for(var h=t.length,d=0,g=0;g<a.length;g++)d<a[g].max_sym&&(d=a[g].max_sym);for(var p=new Array(65536),y=0;y<65536;y++)p[y]=new o(d+1);var m=new Array(4);for(y=0;y<4;y++)m[y]=new o(256);new o(2),new o(2);for(var C=new o(c+1),I=new i(t),b=(g=0,y=0,0);y<h;){if(0==g){var w=n[b];a[0].sbits>0&&C.ModelEncode(e,I,w);var v=A[w],B=r[Math.min(r.length-1,b++)];a[v].fixed_len?a[v].fixed_len>0&&(m[0].ModelEncode(e,I,255&B),m[1].ModelEncode(e,I,B>>8&255),m[2].ModelEncode(e,I,B>>16&255),m[3].ModelEncode(e,I,B>>24&255),a[v].fixed_len=-1):(m[0].ModelEncode(e,I,255&B),m[1].ModelEncode(e,I,B>>8&255),m[2].ModelEncode(e,I,B>>16&255),m[3].ModelEncode(e,I,B>>24&255)),a[v].do_dedup&&process.exit(1),g=B;var E=0,_=a[v].context,Q=0,S=0}var k=t[y++],R=s[v][k];p[_].ModelEncode(e,I,R),Q=(Q<<a[v].qshift)+f[v][R],_=a[v].context,_+=(Q&(1<<a[v].qbits)-1)<<a[v].qloc,a[v].pbits>0&&(_+=l[v][Math.min(g,1023)]<<a[v].ploc),a[v].dbits>0&&(_+=u[v][Math.min(E,255)]<<a[v].dloc,E+=S!=R?1:0,S=R),a[v].do_sel&&(_+=w<<a[v].sloc),_&=65535,g--}return I.RangeFinishEncode(e),e.buf.slice(0,e.pos)}(b,e,t,r,I,a,d,g,p,m)}}},3498:(e,t,r)=>{"use strict";var n=r(4459),o=r(594),i=r(445),a=r(5260),s=r(2881);e.exports={r4x8_uncompress:function(e,t){n.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){i.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=s.decode(e,0,"\0");Buffer.from(r,"binary").copy(t,0,0)}}},9260:e=>{e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=Buffer.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(this.buf[this.pos+2]<<0),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(this.buf[this.pos+1]<<0),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t<e.length;t++)this.buf[this.pos++]=e.charCodeAt(t);this.buf[this.pos++]=0}WriteData(e,t){for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]}WriteStream(e){this.WriteData(e.buf,e.pos)}WriteUint16(e){this.WriteByte(255&e),this.WriteByte(e>>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},4459:(e,t,r)=>{const n=r(9260);function o(e){return 4095&e}function i(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function s(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function l(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(e>>0&255)}function u(e,t,r,n,o){return e=function(e,t,r,n){for(var o=(1<<23>>n<<8)*r;e>=o;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,o),(Math.floor(e/n)<<o)+e%n+r}function A(e,t,r){for(var n=0;n<256;n++)t[n]=0;var o=e.ReadByte(),i=o,a=0;do{var s=e.ReadITF8();t[o]=s,a>0?(a--,o++):(o=e.ReadByte())==i+1&&(a=e.ReadByte()),i=o}while(0!=o);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function c(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var o=n/t;do{var i=0,a=0,s=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(i<e[r]&&(i=e[r],a=r),e[r]=Math.floor(e[r]*o),0==e[r]&&(e[r]=1),t+=e[r]);t<n?e[a]+=n-t:t-n<e[a]/2&&e[a]>2?e[a]-=t-n:t!=n&&(o*=.99,s=1)}while(s)}function h(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new n(e),r=t.ReadByte(),l=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),n=new Array(256);A(e,r,n);for(var i=a(n),l=new Array(4),u=0;u<4;u++)l[u]=e.ReadUint32();var c=new Buffer.allocUnsafe(t);for(u=0;u<t;u++){var h=u%4,d=i[o(l[h])];c[u]=d,l[h]=s(l[h],n[d],r[d]),l[h]=f(e,l[h])}return c}(t,l):function(e,t){var r=new Array(256),n=new Array(256);!function(e,t,r){for(var n=0;n<256;n++){t[n]=new Array(256),r[n]=new Array(256);for(var o=0;o<256;o++)t[n][o]=0}var i=e.ReadByte(),a=i,s=0;do{A(e,t[i],r[i]),s>0?(s--,i++):(i=e.ReadByte())==a+1&&(s=e.ReadByte()),a=i}while(0!=i)}(e,r,n);for(var l=new Array(256),u=0;u<256;u++)l[u]=a(n[u]);for(var c=new Array(4),h=new Array(4),d=0;d<4;d++)c[d]=e.ReadUint32(),h[d]=0;var g=new Buffer.allocUnsafe(t),p=Math.floor(t/4);for(u=0;u<p;u++)for(d=0;d<4;d++){var y=o(c[d]),m=l[h[d]][y];g[u+d*p]=m,c[d]=s(c[d],n[h[d]][m],r[h[d]][m]),c[d]=f(e,c[d]),h[d]=m}for(u*=4;u<t;)y=o(c[3]),m=i(n[h[3]],y),g[u++]=m,c[3]=s(c[3],n[h[3]][m],r[h[3]][m]),c[3]=f(e,c[3]),h[3]=m;return g}(t,l)},encode:function(e,t){return 0==t?function(e){const t=e.length;var r=new n("",0,780);r.WriteByte(0),r.WriteUint32(0),r.WriteUint32(0);var o=new Array(256);(function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++})(e,o),c(o),h(r,o);var i=new Array(256);i[0]=0;for(var a=1;a<256;a++)i[a]=i[a-1]+o[a-1];var s=new Array(4);for(a=0;a<4;a++)s[a]=1<<23;var f=Math.floor(1.05*t+100),A=new n("",f,f);for(a=t-1;a>=0;a--)s[a%4]=u(s[a%4],A,i[e[a]],o[e[a]],12);for(a=3;a>=0;a--)l(s[a],A);var d=r.pos;return r.buf.writeInt32LE(d-9+(A.length-A.pos),1),r.buf.writeInt32LE(t,5),Buffer.concat([r.buf.slice(0,r.pos),A.buf.slice(A.pos,A.length)],r.pos+A.length-A.pos)}(e):function(e){const t=e.length;var r=new n("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),i=new Array(256),a=new Array(256),s=0;s<256;s++)i[s]=new Array(256),a[s]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var o=0;o<256;o++)t[n][o]=0}var i=0;for(n=0;n<e.length;n++)r[e[n]]++,t[i][e[n]]++,i=e[n];t[0][e[1*(e.length>>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,i,o),function(e,t){for(var r=0;r<256;r++)t[r]&&c(e[r])}(i,o),function(e,t,r){for(var n=0,o=0;o<256;o++)if(r[o]){if(n>0)n--;else if(e.WriteByte(o),o>0&&r[o-1]>0){for(n=o+1;n<256&&r[n];n++);n-=o+1,e.WriteByte(n)}h(e,t[o])}e.WriteByte(0)}(r,i,o),s=0;s<256;s++)if(o[s]){a[s][0]=0;for(var f=1;f<256;f++)a[s][f]=a[s][f-1]+i[s][f-1]}var A=new Array(4),d=new Array(4);for(f=0;f<4;f++)A[f]=1<<23,d[f]=0;var g=new n("",t,t),p=Math.floor(t/4),y=new Array(4),m=new Array(4);for(f=0;f<4;f++)y[f]=(f+1)*p-2,m[f]=e[y[f]+1];for(m[3]=e[t-1],s=t-2;s>4*p-2;s--)A[3]=u(A[3],g,a[e[s]][m[3]],i[e[s]][m[3]],12),m[3]=e[s];for(;y[0]>=0;)for(f=3;f>=0;f--){var C=e[y[f]];A[f]=u(A[f],g,a[C][m[f]],i[C][m[f]],12),m[f]=C,y[f]--}for(f=3;f>=0;f--)A[f]=u(A[f],g,a[0][m[f]],i[0][m[f]],12);for(s=3;s>=0;s--)l(A[s],g);var I=r.pos;return r.buf.writeInt32LE(I-9+(g.length-g.pos),1),r.buf.writeInt32LE(t,5),Buffer.concat([r.buf.slice(0,r.pos),g.buf.slice(g.pos,g.length)],r.pos+g.length-g.pos)}(e)}}},594:(e,t,r)=>{const n=r(9260);function o(e,t){return e&(1<<t)-1}function i(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e,t){for(var r=1<<t,n=new Array(r),o=0,i=0;i<r;i++){for(;i>=e[o+1];)o++;n[i]=o}return n}function s(e,t,r,n){return r*(e>>n)+(e&(1<<n)-1)-t}function f(e,t){return t<32768&&(t=(t<<16)+e.ReadUint16()),t}function l(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(e>>0&255)}function u(e,t,r,n,o){return e=function(e,t,r,n){for(var o=(1<<31-n)*r;e>=o;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,o),(Math.floor(e/n)<<o)+e%n+r}function A(e,t,r){0==r&&(r=4);for(var o=new Array(r),i=new Array(r),a=0;a<r;a++)i[a]=Math.floor(t.length/r)+(t.length%r>a),o[a]=new Array(i[a]);for(var s=0,f=0;f<t.length;f+=r,s++)for(var l=0;l<r;l++)s<o[l].length&&(o[l][s]=t[f+l]);var u=new Array(r),A=0;for(a=0;a<r;a++){var c=h(o[a],0),d=h(o[a],1);u[a]=d.length<c.length?d:c,A+=u[a].length}var g=new n("",0,A+5*r+1);for(g.WriteByte(r),a=0;a<r;a++)g.WriteUint7(u[a].length);for(a=0;a<r;a++)g.WriteData(u[a],u[a].length);return g.buf.slice(0,g.buf.pos)}function c(e,t){var r=e.ReadByte(),l=1&r,u=8&r,A=32&r,h=64&r,p=128&r;if(16&r||(t=e.ReadUint7()),u)return function(e,t){for(var r=e.ReadByte(),n=new Array(r),o=new Array(r),i=0;i<r;i++)n[i]=e.ReadUint7();var a=new Array(r);for(i=0;i<r;i++)o[i]=Math.floor(t/r)+(t%r>i),a[i]=c(e,o[i]);var s=new Buffer.allocUnsafe(t);for(i=0;i<r;i++)for(var f=0;f<o[i];f++)s[f*r+i]=a[i][f];return s}(e,t);if(p)var m=t,[C,I,t]=function(e){for(var t=e.ReadByte(),r=new Array(t),n=0;n<t;n++)r[n]=e.ReadByte();return[r,t,e.ReadUint7()]}(e);if(h)var b=t,[w,v,t]=function(e){var t=e.ReadUint7(),r=e.ReadUint7();if(1&t)var o=e.ReadData((t-1)/2);else{var i=e.ReadUint7();o=e.ReadData(i),o=g(new n(o),t/2)}o=new n(o);var a=new Array(256),s=o.ReadByte();0==s&&(s=256);for(var f=0;f<s;f++)a[o.ReadByte()]=1;return[a,o,r]}(e);if(A)var B=e.ReadData(t);else B=0==l?g(e,t):function(e,t){var r=(c=e.ReadByte())>>4,l=e;if(1&c){var u=e.ReadUint7(),A=e.ReadUint7(),c=new n(e.ReadData(A));l=new n(g(c,u))}var h=new Array(256),p=new Array(256);!function(e,t,r,n){for(var o=0;o<256;o++){t[o]=new Array(256),r[o]=new Array(256);for(var i=0;i<256;i++)t[o][i]=0}var a=d(e);for(o=0;o<256;o++)if(a[o]){var s=0;for(i=0;i<256;i++)a[i]&&(s>0?s--:(t[o][i]=e.ReadUint7(),0==t[o][i]&&(s=e.ReadByte())));for(y(t[o],n),r[o][0]=0,i=0;i<256;i++)r[o][i+1]=r[o][i]+t[o][i]}}(l,h,p,r);for(var m=new Array(256),C=0;C<256;C++)m[C]=a(p[C],r);for(var I=new Array(4),b=new Array(4),w=0;w<4;w++)I[w]=e.ReadUint32(),b[w]=0;var v=new Buffer.allocUnsafe(t),B=Math.floor(t/4);for(C=0;C<B;C++)for(w=0;w<4;w++){var E=o(I[w],r),_=m[b[w]][E];v[C+w*B]=_,I[w]=s(I[w],p[b[w]][_],h[b[w]][_],r),I[w]=f(e,I[w]),b[w]=_}for(C*=4;C<t;)E=o(I[3],r),_=i(p[b[3]],E),v[C++]=_,I[3]=s(I[3],p[b[3]][_],h[b[3]][_],r),I[3]=f(e,I[3]),b[3]=_;return v}(e,t);return h&&(B=function(e,t,r,o){new n(e);for(var i=new Buffer.allocUnsafe(o),a=0,s=0;a<o;s++){var f=e[s];if(t[f])for(var l=r.ReadUint7(),u=0;u<=l;u++)i[a++]=f;else i[a++]=f}return i}(B,w,v,b)),p&&(B=function(e,t,r,n){var o=new Buffer.allocUnsafe(n),i=0;if(r<=1)for(var a=0;a<n;a++)o[a]=t[0];else if(r<=2)for(a=0;a<n;a++){if(a%8==0)var s=e[i++];o[a]=t[1&s],s>>=1}else if(r<=4)for(a=0;a<n;a++)a%4==0&&(s=e[i++]),o[a]=t[3&s],s>>=2;else if(r<=16)for(a=0;a<n;a++)a%2==0&&(s=e[i++]),o[a]=t[15&s],s>>=4;return o}(B,C,I,m)),B}function h(e,t){var r=new n("",0,10);r.WriteByte(t);var o=1&t,i=8&t,a=32&t,s=64&t,f=128&t,c=t>>8;if(16&t||r.WriteUint7(e.length),i)return Buffer.concat([r.buf.slice(0,r.pos),A(0,e,c)]);var h=new Buffer.alloc(0);f&&([h,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++;var o=new Array(256),i=0;for(r=0;r<256;r++)t[r]>0&&(o[r]=i++);if(!(i>16)){if(i<=1)var a=new Buffer.allocUnsafe(0);else if(i<=2){a=new Buffer.allocUnsafe(Math.ceil(e.length/8));var s=-1;for(r=0;r<e.length;r++)r%8==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%8}else if(i<=4)for(a=new Buffer.allocUnsafe(Math.ceil(e.length/4)),s=-1,r=0;r<e.length;r++)r%4==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%4*2;else for(a=new Buffer.allocUnsafe(Math.ceil(e.length/2)),s=-1,r=0;r<e.length;r++)r%2==0&&(a[++s]=0),a[s]+=o[e[r]]<<r%2*4;var f=new n("",0,i+5);for(f.WriteByte(i),s=0,r=0;r<256;r++)t[r]>0&&(t[r]=s++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var d=new Buffer.alloc(0);if(s&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r<e.length;r++)t[e[r]]+=e[r]==o?1:-1,o=e[r];var i=0;for(r=0;r<256;r++)t[r]>0&&i++;for(i||(i=1,t[0]=1),(l=new n("",0,i+1+e.length)).WriteByte(i),r=0;r<256;r++)t[r]>0&&l.WriteByte(r);var a=new Buffer.allocUnsafe(e.length),s=0;for(r=0;r<e.length;r++)if(a[s++]=e[r],t[e[r]]>0){o=e[r];for(var f=0;r+f+1<e.length&&e[r+f+1]==o;)f++;l.WriteUint7(f),r+=f}var l,u=C(l.buf.slice(0,l.pos)),A=new n("",0,16);return A.WriteUint7(2*l.pos),A.WriteUint7(s),A.WriteUint7(u.length),[l=Buffer.concat([A.buf.slice(0,A.pos),u]),a.slice(0,s)]}(e)),e.length<4&&1==o&&(o=0,r.buf[0]&=-2),a)var g=e;else g=0==o?C(e):function(e){const t=e.length;for(var r=new n("",0,198156),o=new Array(256),i=new Array(256),a=new Array(256),s=0;s<256;s++)i[s]=new Array(256),a[s]=new Array(256);var f=12;(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var o=0;o<256;o++)t[n][o]=0}var i=0;for(n=0;n<e.length;n++)r[i]++,t[i][e[n]]++,i=e[n];r[i]++,t[0][e[1*(e.length>>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,i,o),function(e,t,r){for(var n=0;n<256;n++)if(t[n]){var o=Math.ceil(Math.log2(t[n]));o>12&&(o=12),p(e[n],o)}}(i,o);var A=new n("",0,198156);!function(e,t,r){m(e,r);for(var n=0;n<256;n++)if(r[n])for(var o=0,i=0;i<256;i++)if(r[i])if(o)o--;else if(e.WriteUint7(t[n][i]),!t[n][i]){for(var a=i+1;a<256;a++)if(r[a]){if(0!=t[n][a])break;o++}e.WriteByte(o)}}(A,i,o);var c=C(A.buf.slice(0,A.pos));for(c.length<A.pos?(r.WriteByte(193),r.WriteUint7(A.pos),r.WriteUint7(c.length),r.WriteData(c,c.length)):(r.WriteByte(192),r.WriteData(A.buf,A.pos)),function(e,t,r){for(var n=0;n<256;n++)t[n]&&y(e[n],12)}(i,o),s=0;s<256;s++)if(o[s]){a[s][0]=0;for(var h=1;h<256;h++)a[s][h]=a[s][h-1]+i[s][h-1]}var d=new Array(4),g=new Array(4);for(h=0;h<4;h++)d[h]=32768,g[h]=0;var I=new n("",1.05*t+100>>0,1.05*t+100>>0),b=Math.floor(t/4),w=new Array(4),v=new Array(4);for(h=0;h<4;h++)w[h]=(h+1)*b-2,v[h]=e[w[h]+1];for(v[3]=e[t-1],s=t-2;s>4*b-2;s--)d[3]=u(d[3],I,a[e[s]][v[3]],i[e[s]][v[3]],f),v[3]=e[s];for(;w[0]>=0;)for(h=3;h>=0;h--){var B=e[w[h]];d[h]=u(d[h],I,a[B][v[h]],i[B][v[h]],f),v[h]=B,w[h]--}for(h=3;h>=0;h--)d[h]=u(d[h],I,a[0][v[h]],i[0][v[h]],f);for(s=3;s>=0;s--)l(d[s],I);return Buffer.concat([r.buf.slice(0,r.pos),I.buf.slice(I.pos,I.length)],r.pos+I.length-I.pos)}(e);return Buffer.concat([r.buf.slice(0,r.pos),h,d,g])}function d(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,o=e.ReadByte(),i=o;do{t[o]=1,n>0?(n--,o++):(o=e.ReadByte())==i+1&&(n=e.ReadByte()),i=o}while(0!=o);return t}function g(e,t){var r=new Array(256),n=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var o=d(e);for(n=0;n<256;n++)o[n]>0&&(t[n]=e.ReadUint7());for(y(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,n);for(var i=a(n,12),l=new Array(4),u=0;u<4;u++)l[u]=e.ReadUint32();var A=new Buffer.allocUnsafe(t);for(u=0;u<t;u++){var c=u%4,h=i[o(l[c],12)];A[u]=h,l[c]=s(l[c],n[h],r[h],12),l[c]=f(e,l[c])}return A}function p(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];const o=1<<t;var i=o/r;do{var a=0,s=0,f=0;for(r=0,n=0;n<256;n++)0!=e[n]&&(a<e[n]&&(a=e[n],s=n),e[n]=Math.floor(e[n]*i),0==e[n]&&(e[n]=1),r+=e[n]);r<o?e[s]+=o-r:r-o<e[s]/2&&e[s]>2?e[s]-=r-o:r!=o&&(i=o/r,f=1)}while(f)}function y(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<<t){for(var o=0;r<1<<t;)r*=2,o++;for(n=0;n<256;n++)e[n]<<=o}}function m(e,t){for(var r=0,n=0;n<256;n++)if(t[n])if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function C(e){const t=e.length;var r=new n("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r<e.length;r++)t[e[r]]++}(e,o);var i=Math.ceil(Math.log2(t));i>12&&(i=12),p(o,i),function(e,t){m(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),p(o,12);var a=new Array(256);a[0]=0;for(var s=1;s<256;s++)a[s]=a[s-1]+o[s-1];var f=new Array(4);for(s=0;s<4;s++)f[s]=32768;var A=new n("",1.05*t+100>>0,1.05*t+100>>0);for(s=t-1;s>=0;s--)f[s%4]=u(f[s%4],A,a[e[s]],o[e[s]],12);for(s=3;s>=0;s--)l(f[s],A);return Buffer.concat([r.buf.slice(0,r.pos),A.buf.slice(A.pos,A.length)],r.pos+A.length-A.pos)}e.exports={decode:function(e){return c(new n(e),0)},encode:h}},2881:(e,t,r)=>{const n=r(9260),o=r(594);var i=new(r(445));function a(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r}function s(e,t,r,n){var o=e[0][0].ReadByte(),i=n-e[0][o].ReadUint32();if(5==o)return t[n]=t[i],r[n]=r[i],t[n];var s=1;t[n]="",r[n]=new Array(256);do{switch(o=e[s][0].ReadByte()){case 2:r[n][s]=e[s][2].ReadChar();break;case 1:r[n][s]=e[s][1].ReadString();break;case 7:r[n][s]=e[s][7].ReadUint32();break;case 3:var f=e[s][3].ReadUint32(),l=e[s][4].ReadByte();r[n][s]=a(f,l);break;case 8:r[n][s]=(r[i][s]>>0)+e[s][8].ReadByte();break;case 9:f=(r[i][s]>>0)+e[s][9].ReadByte(),l=r[i][s].length,r[n][s]=a(f,l);break;case 10:r[n][s]=r[i][s];break;default:r[n][s]=""}t[n]+=r[n][s++]}while(12!=o);return t[n]}function f(e,t,r,n,o,i){for(var a=0;a<n.length;a++)if(!(r>0&&5==t[a][0].type)&&t[a][r])switch(e[0].WriteByte(t[a][r].type),t[a][r].type){case 6:e[6].WriteUint32(t[a][r].val);break;case 5:e[5].WriteUint32(t[a][r].val);break;case 1:e[1].WriteString(t[a][r].val);break;case 2:e[2].WriteChar(t[a][r].val);break;case 7:e[7].WriteUint32(t[a][r].val);break;case 3:e[3].WriteUint32(t[a][r].val),e[4].WriteByte(t[a][r].val.length);break;case 8:case 9:e[t[a][r].type].WriteByte(t[a][r].val)}}function l(e,t,r,n){for(var o=0;o<=12;o++)if(!(e[o].pos<=0)){n.WriteByte(o+(0==o?128:0)),e[o]=e[o].buf.slice(0,e[o].pos);var i=u(e[o],r);n.WriteUint7(i.length),n.WriteData(i,i.length)}}function u(e,t){var r,n=1<<30,a=[0,1,64,65,128,129,201];for(var s in a){var f=a[s];if(!(1&f&&e.length<100||8&f&&e.length%4!=0)){try{var l=t?i.encode(e,f):o.encode(e,f)}catch(e){l=0}l&&n>l.length&&(n=l.length,r=l)}}return r}function A(e,t,r,n,o){var i=0,a=o-1;e[o]=new Array(256),t[n]?e[o][0]={type:5,val:o-t[n]}:e[o][0]={type:6,val:0==o?0:1},t[n]=o;for(var s=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),f=0;f<s.length;f++){var l=f+1,u=1,A=s[f];if(s[f].match(/^0+[0-9]*$/g)?u=3:s[f].match(/^[0-9]+$/g)?u=7:1==s[f].length&&(u=2),a>=0&&e[a][l])if(e[a][l].str==s[f])u=10,A="";else if(7==e[a][l].type||8==e[a][l].type){var c=A-e[a][l].str;r[l]++,c>=0&&c<256&&r[l]>o/2&&(u=8,A=c)}else 3!=e[a][l].type&&9!=e[a][l].type||e[a][l].str.length!=A.length||(c=A-e[a][l].str,r[l]++,c>=0&&c<256&&r[l]>o/2&&(u=9,A=c));e[o][l]={str:s[f],val:A,type:u},i<e[o][l].val.length+3&&(i=e[o][l].val.length+3)}return e[o][++l]={type:12},[l+1,i]}e.exports={encode:function(e,t){var r=e.toString();"\n"==r[r.length-1]&&(r=r.substring(0,r.length-1));var o=r.split("\n"),i=new n("",0,2*r.length+1e4);i.WriteUint32(r.length),i.WriteUint32(o.length),i.WriteByte(t);for(var a=new Array(o.length),s={},u=new Array(256).fill(0),c=0,h=0,d=0;d<o.length;d++){var[g,p]=A(a,s,u,o[d],d);c<g&&(c=g),h<p&&(h=p)}for(var y=0;y<c;y++){for(var m=new Array(13),C=0;C<=12;C++)m[C]=new n("",0,o.length*h);f(m,a,y,o),l(m,0,t,i)}return i.buf.slice(0,i.pos)},decode:function(e,t,r){(e=new n(e)).ReadUint32();var a=e.ReadUint32(),f=e.ReadByte(),l=function(e,t,r,a){for(var s=-1,f=new Array(256);!e.EOF();){var l=e.ReadByte(),u=128&l,A=64&l,c=63&l;if(u&&(f[++s]=new Array(13)),0!=c&&u){var h=new Array(a-1).fill(10);f[s][0]=new n(Buffer.from([c].concat(h)))}if(A){var d=e.ReadByte(),g=e.ReadByte();f[s][c]=new n(f[d][g].buf)}else{var p=e.ReadUint7(),y=e.ReadData(p);f[s][c]=r?i.decode(y):o.decode(y),f[s][c]=new n(f[s][c])}}return f}(e,0,f,a),u=new Array(a),A=new Array(a),c="";void 0===r&&(r="\n");for(var h=0;h<a;h++)c+=s(l,u,A,h)+r;return c}}},1422:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8904),i=n(r(9049)),a=n(r(450));class s{constructor({fill:e,cache:t}){if("function"!=typeof e)throw new TypeError("must pass a fill function");if("object"!=typeof t)throw new TypeError("must pass a cache object");if("function"!=typeof t.get||"function"!=typeof t.set||"function"!=typeof t.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=t,this.fillCallback=e}static isAbortException(e){return"AbortError"===e.name||"ERR_ABORTED"===e.code||"AbortError: aborted"===e.message||"Error: aborted"===e.message}evict(e,t){this.cache.get(e)===t&&this.cache.delete(e)}fill(e,t,r,n){const o=new i.default,s=new a.default;s.addCallback(n);const f={aborter:o,promise:this.fillCallback(t,o.signal,(e=>{s.callback(e)})),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};f.aborter.addSignal(r),f.aborter.signal.addEventListener("abort",(()=>{f.settled||this.evict(e,f)})),f.promise.then((()=>{f.settled=!0}),(()=>{f.settled=!0,this.evict(e,f)})).catch((e=>{throw console.error(e),e})),this.cache.set(e,f)}static checkSinglePromise(e,t){function r(){if(t&&t.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then((e=>(r(),e)),(e=>{throw r(),e}))}has(e){return this.cache.has(e)}get(e,t,r,n){if(!r&&t instanceof o.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,t,r,n)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(n),s.checkSinglePromise(i.promise,r)):(this.fill(e,t,r,n),s.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const t=this.cache.get(e);t&&(t.settled||t.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let t=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),t+=1;return t}}t.default=s},9049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8904);class o{}t.default=class{constructor(){this.signals=new Set,this.abortController=new n.AbortController}addSignal(e=new o){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):"function"==typeof e.addEventListener&&e.addEventListener("abort",(()=>{this.handleAborted(e)}))}handleAborted(e){this.signals.delete(e),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}},450:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.callbacks=new Set}addCallback(e=(()=>{})){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e,this.callbacks.forEach((t=>{t(e)}))}}},8904:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbortSignal=t.AbortController=void 0;const n=r(5988);var o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")};let i=void 0===o().AbortController?n.AbortController:o().AbortController;t.AbortController=i;let a=void 0===o().AbortController?n.AbortSignal:o().AbortSignal;t.AbortSignal=a},4105:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1422));t.default=o.default},5988:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(){r(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return o(e,[{key:"addEventListener",value:function(e,t,r){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:r})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var r=this.listeners[e],n=0,o=r.length;n<o;n++)if(r[n].callback===t)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(e){if(e.type in this.listeners){for(var t=this.listeners[e.type].slice(),r=0,n=t.length;r<n;r++){var o=t[r];try{o.callback.call(this,e)}catch(e){Promise.resolve().then((function(){throw e}))}o.options&&o.options.once&&this.removeEventListener(e.type,o.callback)}return!e.defaultPrevented}}}]),e}(),u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(A,e);var t,n,u=(t=A,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=i(t);if(n){var o=i(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}(this,e)});function A(){var e;return r(this,A),(e=u.call(this)).listeners||l.call(s(e)),Object.defineProperty(s(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(e),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(s(e),"reason",{value:void 0,writable:!0,configurable:!0}),e}return o(A,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),f(i(A.prototype),"dispatchEvent",this).call(this,e)}}]),A}(l),A=function(){function e(){r(this,e),Object.defineProperty(this,"signal",{value:new u,writable:!0,configurable:!0})}return o(e,[{key:"abort",value:function(e){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}var r=e;if(void 0===r)if("undefined"==typeof document)(r=new Error("This operation was aborted")).name="AbortError";else try{r=new DOMException("signal is aborted without reason")}catch(e){(r=new Error("This operation was aborted")).name="AbortError"}this.signal.reason=r,this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(A.prototype[Symbol.toStringTag]="AbortController",u.prototype[Symbol.toStringTag]="AbortSignal"),t.AbortController=A,t.AbortSignal=u,t.abortableFetch=function(e){"function"==typeof e&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=void 0===n?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=void 0!==a&&a;if(!function(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||s)&&((f=function(e,t){var r;t&&t.signal&&(r=t.signal,delete t.signal);var n=new o(e,t);return r&&Object.defineProperty(n,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),n}).prototype=o.prototype);var l=r;return{fetch:function(e,t){var r=f&&f.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(r){var n;try{n=new DOMException("Aborted","AbortError")}catch(e){(n=new Error("Aborted")).name="AbortError"}if(r.aborted)return Promise.reject(n);var o=new Promise((function(e,t){r.addEventListener("abort",(function(){return t(n)}),{once:!0})}));return t&&t.signal&&delete t.signal,Promise.race([o,l(e,t)])}return l(e,t)},Request:f}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],f=i[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,f)),u=0,A=f>0?a-4:a;for(r=0;r<A;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===f&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===f&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,l=n-o;s<l;s+=a)i.push(f(e,s,s+a>l?l:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2779:(e,t,r)=>{var n=r(8764).Buffer,o=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function i(e){if(n.isBuffer(e))return e;var t="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof e)return t?n.alloc(e):new n(e);if("string"==typeof e)return t?n.from(e):new n(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function a(e,t){e=i(e),n.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,a=0;a<e.length;a++)r=o[255&(r^e[a])]^r>>>8;return-1^r}function s(){return e=a.apply(null,arguments),(t=i(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(o=new Int32Array(o)),s.signed=function(){return a.apply(null,arguments)},s.unsigned=function(){return a.apply(null,arguments)>>>0},e.exports=s},8764:(e,t,r)=>{"use strict";const n=r(9742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=function(e){return+e!=e&&(e=0),f.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,f.prototype),t}function f(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return A(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return f.from(n,t,r);const o=function(e){if(f.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?s(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return f.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function A(e){return u(e),s(e<0?0:0|d(e))}function c(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,f.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":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 W(e).length;default:if(o)return n?-1:J(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,r){let n=!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))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:C(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):C(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function C(e,t,r,n,o){let i,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(l(e,i)===l(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===f)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+f>s&&(r=s-f),i=r;i>=0;i--){let r=!0;for(let n=0;n<f;n++)if(l(e,i+n)!==l(t,n)){r=!1;break}if(r)return i}return-1}function I(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(V(n))return a;e[r+a]=n}return a}function b(e,t,r,n){return Y(J(t,e.length-r),e,r,n)}function w(e,t,r,n){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return Y(W(t),e,r,n)}function B(e,t,r,n){return Y(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,f;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(f=(31&t)<<6|63&r,f>127&&(i=f));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(f=(15&t)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(i=f));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(f=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,f>65535&&f<1114112&&(i=f))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Q));return r}(n)}t.kMaxLength=a,f.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},f.allocUnsafe=function(e){return A(e)},f.allocUnsafeSlow=function(e){return A(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if(K(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=f.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))o+t.length>n.length?(f.isBuffer(t)||(t=f.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!f.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},f.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},f.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},f.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):p.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(e,t,r,n,o){if(K(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),l=this.slice(n,o),u=e.slice(t,r);for(let e=0;e<s;++e)if(l[e]!==u[e]){i=l[e],a=u[e];break}return i<a?-1:a<i?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},f.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return I(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":case"latin1":case"binary":return w(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function R(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=$[e[n]];return o}function D(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,o,i){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function F(e,t,r,n,o){j(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,o){j(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function O(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,i){return t=+t,r>>>=0,i||O(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,i){return t=+t,r>>>=0,i||O(e,0,r,8),o.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUintLE=f.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},f.prototype.readUintBE=f.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readBigUInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),f.prototype.readBigUInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),f.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},f.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readBigInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),f.prototype.readBigInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),f.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),o.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),o.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigUInt64LE=Z((function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeBigUInt64BE=Z((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigInt64LE=Z((function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeBigInt64BE=Z((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},f.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=f.isBuffer(e)?e:f.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const U={};function T(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,o,i)}function z(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw z(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}T("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),T("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),T("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function J(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Z(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},4693:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(o){for(var i=0;o>0;){var a=8-t;o>=a?(i<<=a,i|=n[a]&e[r++],t=0,o-=a):(i<<=o,i|=(e[r]&n[o]<<8-o-t)>>8-o-t,t+=o,o=0)}return i}},simple:function(e){var r,n,o=t.header(e),i=[],a=0;do{-1!=(n=t.decompress(e,o))&&(i.push(n),a+=n.byteLength)}while(-1!=n);r=new Uint8Array(a),a=0;for(var s=0;s<i.length;++s)n=i[s],r.set(n,a),a+=n.byteLength;return r},header:function(e){if(4348520!=e(24))throw"No magic number found";var t=e(8)-48;if(t<1||t>9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,o="",i=0;i<6;i++)o+=e(8).toString(16);if("177245385090"==o)return-1;if("314159265359"!=o)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var a=e(24);if(a>n)throw"Initial position larger than buffer size";var s=e(16),f=new Uint8Array(256),l=0;for(i=0;i<16;i++)if(s&1<<15-i){var u=e(16);for(g=0;g<16;g++)u&1<<15-g&&(f[l++]=16*i+g)}var A=e(3);if(A<2||A>6)throw"another error";var c=e(15);if(0==c)throw"meh";var h=[];for(i=0;i<A;i++)h[i]=i;var d=new Uint8Array(32768);for(i=0;i<c;i++){for(var g=0;e(1);g++)if(g>=A)throw"whoops another error";var p=h[g];h.splice(g,1),h.splice(0,0,p),d[i]=p}var y=l+2,m=[];for(g=0;g<A;g++){var C,I,b,w=new Uint8Array(258),v=new Uint8Array(21);for(s=e(5),i=0;i<y;i++){for(;;){if(s<1||s>20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?s--:s++}w[i]=s}for(C=I=w[0],i=1;i<y;i++)w[i]>I?I=w[i]:w[i]<C&&(C=w[i]);(b=m[g]={}).permute=new Uint32Array(258),b.limit=new Uint32Array(21),b.base=new Uint32Array(21),b.minLen=C,b.maxLen=I;var B=b.base.subarray(1),E=b.limit.subarray(1),_=0;for(i=C;i<=I;i++)for(s=0;s<y;s++)w[s]==i&&(b.permute[_++]=s);for(i=C;i<=I;i++)v[i]=E[i]=0;for(i=0;i<y;i++)v[w[i]]++;for(_=s=0,i=C;i<I;i++)_+=v[i],E[i]=_-1,_<<=1,B[i+1]=_-(s+=v[i]);E[I]=_+v[I]-1,B[C]=0}var Q,S,k,R=new Uint32Array(256);for(i=0;i<256;i++)h[i]=i;Q=S=y=k=0;for(var D=new Uint32Array(n);;){if(!y--){if(y=49,k>=c)throw"meow i'm a kitty, that's an error";B=(b=m[d[k++]]).base.subarray(1),E=b.limit.subarray(1)}for(g=e(i=b.minLen);;){if(i>b.maxLen)throw"rawr i'm a dinosaur";if(g<=E[i])break;i++,g=g<<1|e(1)}if((g-=B[i])<0||g>=258)throw"moo i'm a cow";var N=b.permute[g];if(0!=N&&1!=N){if(Q){if(Q=0,S+s>=n)throw"Boom.";for(R[p=f[h[0]]]+=s;s--;)D[S++]=p}if(N>l)break;if(S>=n)throw"I can't think of anything. Error";p=h[i=N-1],h.splice(i,1),h.splice(0,0,p),R[p=f[p]]++,D[S++]=p}else Q||(Q=1,s=0),s+=0==N?Q:2*Q,Q<<=1}if(a<0||a>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,i=0;i<256;i++)u=g+R[i],R[i]=g,g=u;for(i=0;i<S;i++)D[R[p=255&D[i]]]|=i<<8,R[p]++;var x=0,F=0,M=0;S&&(F=255&(x=D[a]),x>>=8,M=-1);var O,L,P,U=new Uint8Array(n),T=0;for(r||(r=1/0);S;){for(S--,L=F,F=255&(x=D[x]),x>>=8,3==M++?(O=F,P=L,F=-1):(O=1,P=F);O--;)if(U[T++]=P,! --r)return U;F!=L&&(M=0)}return U.subarray(0,T)}};e.exports=t},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=r(7771),a=o("%TypeError%"),s=o("%Function.prototype.apply%"),f=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||n.call(f,s),u=o("%Object.defineProperty%",!0),A=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(n,f,arguments);return i(t,1+A(0,e.length-(arguments.length-1)),!0)};var c=function(){return l(n,s,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c},487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},1012:e=>{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],i=0;i<4;i++)8*n+6*i<=8*e.length?r.push(t.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}},e.exports=r},2296:(e,t,r)=>{"use strict";var n=r(1044)(),o=r(210),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=o("%SyntaxError%"),s=o("%TypeError%"),f=r(7296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],A=!!f&&f(e,t);if(i)i(e,t,{configurable:null===l&&A?A.configurable:!l,enumerable:null===n&&A?A.enumerable:!n,value:r,writable:null===o&&A?A.writable:!o});else{if(!u&&(n||o||l))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},7648:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=1,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments),s=r(0,o.length-a.length),f=[],l=0;l<s;l++)f[l]="$"+l;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=",");return r}(f)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},2949:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>f,LocalFile:()=>o(),RemoteFile:()=>a,fromUrl:()=>l,open:()=>u});var n=r(7067),o=r.n(n),i=r(8764);class a{async getBufferFromResponse(e){if("function"==typeof e.buffer)return e.buffer();if("function"==typeof e.arrayBuffer){const t=await e.arrayBuffer();return i.Buffer.from(t)}throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method")}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw n;console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(e,{...t,cache:"reload"})}return r}async read(e,t=0,r,n=0,o={}){const{headers:i={},signal:a,overrides:s={}}=o;r<1/0?i.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(i.range=`bytes=${n}-`);const f={...this.baseOverrides,...s,headers:{...i,...s.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a},l=await this.fetch(this.url,f);if(!l.ok)throw new Error(`HTTP ${l.status} ${l.statusText} ${this.url}`);if(200===l.status&&0===n||206===l.status){const n=await this.getBufferFromResponse(l),o=n.copy(e,t,0,Math.min(r,n.length)),i=l.headers.get("content-range"),a=/\/(\d+)$/.exec(i||"");return a&&a[1]&&(this._stat={size:parseInt(a[1],10)}),{bytesRead:o,buffer:e}}if(200===l.status)throw new Error("${this.url} fetch returned status 200, expected 206");throw new Error(`HTTP ${l.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:o,overrides:i={}}=r,a={headers:n,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...i},s=await this.fetch(this.url,a);if(!s)throw new Error("generic-filehandle failed to fetch");if(200!==s.status)throw Object.assign(new Error(`HTTP ${s.status} fetching ${this.url}`),{status:s.status});if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=i.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function s(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class f{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const o=n,a=o+r,f=await s(this.blob.slice(o,a)),l=i.Buffer.from(f);return{bytesRead:l.copy(e,t),buffer:l}}async readFile(e){let t;if(t="string"==typeof e?e:e&&e.encoding,"utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await s(this.blob);return i.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function l(e,t={}){return new a(e,t)}function u(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return l(e,n);if(void 0!==t)return new(o())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var l=function(){throw new a},u=f?function(){try{return l}catch(e){try{return f(arguments,"callee").get}catch(e){return l}}}():l,A=r(5295)(),c=r(8185)(),h=Object.getPrototypeOf||(c?function(e){return e.__proto__}:null),d={},g="undefined"!=typeof Uint8Array&&h?h(Uint8Array):n,p={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&h?h(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(e){var y=h(h(e));p["%Error.prototype%"]=y}var m=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&h&&(r=h(o.prototype))}return p[t]=r,r},C={"%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"]},I=r(8612),b=r(8824),w=I.call(Function.call,Array.prototype.concat),v=I.call(Function.apply,Array.prototype.splice),B=I.call(Function.call,String.prototype.replace),E=I.call(Function.call,String.prototype.slice),_=I.call(Function.call,RegExp.prototype.exec),Q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,k=function(e,t){var r,n=e;if(b(C,n)&&(n="%"+(r=C[n])[0]+"%"),b(p,n)){var i=p[n];if(i===d&&(i=m(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=E(e,0,1),r=E(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return B(e,Q,(function(e,t,r,o){n[n.length]=r?B(o,S,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=k("%"+n+"%",t),s=i.name,l=i.value,u=!1,A=i.alias;A&&(n=A[0],v(r,w([0,1],A)));for(var c=1,h=!0;c<r.length;c+=1){var d=r[c],g=E(d,0,1),y=E(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&h||(u=!0),b(p,s="%"+(n+="."+d)+"%"))l=p[s];else if(null!=l){if(!(d in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(f&&c+1>=r.length){var m=f(l,d);l=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:l[d]}else h=b(l,d),l=l[d];h&&!u&&(p[s]=l)}}return l}},7296:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1044:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},5295:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8824:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(8612);e.exports=i.call(n,o)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,f=(1<<s)-1,l=f>>1,u=-7,A=r?o-1:0,c=r?-1:1,h=e[t+A];for(A+=c,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+A],A+=c,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=256*a+e[t+A],A+=c,u-=8);if(0===i)i=1-l;else{if(i===f)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=l}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,f,l=8*i-o-1,u=(1<<l)-1,A=u>>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+A>=1?c/f:c*Math.pow(2,1-A))*f>=2&&(a++,f/=2),a+A>=u?(s=0,a=u):a+A>=1?(s=(t*f-1)*Math.pow(2,o),a+=A):(s=t*Math.pow(2,A-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[r+h]=255&a,h+=d,a/=256,l-=8);e[r+h-d]|=128*g}},3720:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var o={},i={};function a(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=i[e])?n:(r=f(e,(0|e)<0?-1:0,!0),a&&(i[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=f(e,e<0?-1:0,!1),a&&(o[e]=r),r)}function s(e,t){if(isNaN(e))return t?y:p;if(t){if(e<0)return y;if(e>=h)return w}else{if(e<=-d)return v;if(e+1>=d)return b}return e<0?s(-e,t).neg():f(e%c|0,e/c|0,t)}function f(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=f;var l=Math.pow;function u(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return p;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(e.substring(1),t,r).neg();for(var o=s(l(r,8)),i=p,a=0;a<e.length;a+=8){var f=Math.min(8,e.length-a),A=parseInt(e.substring(a,a+f),r);if(f<8){var c=s(l(r,f));i=i.mul(c).add(s(A))}else i=(i=i.mul(o)).add(s(A))}return i.unsigned=t,i}function A(e,t){return"number"==typeof e?s(e,t):"string"==typeof e?u(e,t):f(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=u,r.fromValue=A;var c=4294967296,h=c*c,d=h/2,g=a(1<<24),p=a(0);r.ZERO=p;var y=a(0,!0);r.UZERO=y;var m=a(1);r.ONE=m;var C=a(1,!0);r.UONE=C;var I=a(-1);r.NEG_ONE=I;var b=f(-1,2147483647,!1);r.MAX_VALUE=b;var w=f(-1,-1,!0);r.MAX_UNSIGNED_VALUE=w;var v=f(0,-2147483648,!1);r.MIN_VALUE=v;var B=r.prototype;B.toInt=function(){return this.unsigned?this.low>>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},B.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(v)){var t=s(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=s(l(e,6),this.unsigned),i=this,a="";;){var f=i.div(o),u=(i.sub(f.mul(o)).toInt()>>>0).toString(e);if((i=f).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},B.isZero=function(){return 0===this.high&&0===this.low},B.eqz=B.isZero,B.isNegative=function(){return!this.unsigned&&this.high<0},B.isPositive=function(){return this.unsigned||this.high>=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(e){return n(e)||(e=A(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},B.eq=B.equals,B.notEquals=function(e){return!this.eq(e)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(e){return this.comp(e)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(e){return this.comp(e)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(e){return this.comp(e)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(e){return this.comp(e)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(e){if(n(e)||(e=A(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(m)},B.neg=B.negate,B.add=function(e){n(e)||(e=A(e));var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,l=e.low>>>16,u=0,c=0,h=0,d=0;return h+=(d+=i+(65535&e.low))>>>16,c+=(h+=o+l)>>>16,u+=(c+=r+s)>>>16,u+=t+a,f((h&=65535)<<16|(d&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},B.subtract=function(e){return n(e)||(e=A(e)),this.add(e.neg())},B.sub=B.subtract,B.multiply=function(e){if(this.isZero())return p;if(n(e)||(e=A(e)),t)return f(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return p;if(this.eq(v))return e.isOdd()?v:p;if(e.eq(v))return this.isOdd()?v:p;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return s(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,l=e.high>>>16,u=65535&e.high,c=e.low>>>16,h=65535&e.low,d=0,y=0,m=0,C=0;return m+=(C+=a*h)>>>16,y+=(m+=i*h)>>>16,m&=65535,y+=(m+=a*c)>>>16,d+=(y+=o*h)>>>16,y&=65535,d+=(y+=i*c)>>>16,y&=65535,d+=(y+=a*u)>>>16,d+=r*h+o*c+i*u+a*l,f((m&=65535)<<16|(C&=65535),(d&=65535)<<16|(y&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(e){if(n(e)||(e=A(e)),e.isZero())throw Error("division by zero");var r,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?f((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:p;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return C;i=y}else{if(this.eq(v))return e.eq(m)||e.eq(I)?v:e.eq(v)?m:(r=this.shr(1).div(e).shl(1)).eq(p)?e.isNegative()?m:I:(o=this.sub(e.mul(r)),i=r.add(o.div(e)));if(e.eq(v))return this.unsigned?y:p;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=p}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:l(2,a-48),c=s(r),h=c.mul(e);h.isNegative()||h.gt(o);)h=(c=s(r-=u,this.unsigned)).mul(e);c.isZero()&&(c=m),i=i.add(c),o=o.sub(h)}return i},B.div=B.divide,B.modulo=function(e){return n(e)||(e=A(e)),t?f((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return f(~this.low,~this.high,this.unsigned)},B.and=function(e){return n(e)||(e=A(e)),f(this.low&e.low,this.high&e.high,this.unsigned)},B.or=function(e){return n(e)||(e=A(e)),f(this.low|e.low,this.high|e.high,this.unsigned)},B.xor=function(e){return n(e)||(e=A(e)),f(this.low^e.low,this.high^e.high,this.unsigned)},B.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?f(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):f(0,this.low<<e-32,this.unsigned)},B.shl=B.shiftLeft,B.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?f(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):f(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?f(this.low>>>e|t<<32-e,t>>>e,this.unsigned):f(32===e?t:t>>>e-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.toSigned=function(){return this.unsigned?f(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:f(this.low,this.high,!0)},B.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},B.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},2568:(e,t,r)=>{var n,o,i,a,s;n=r(1012),o=r(487).utf8,i=r(76),a=r(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),f=8*e.length,l=1732584193,u=-271733879,A=-1732584194,c=271733878,h=0;h<r.length;h++)r[h]=16711935&(r[h]<<8|r[h]>>>24)|4278255360&(r[h]<<24|r[h]>>>8);r[f>>>5]|=128<<f%32,r[14+(f+64>>>9<<4)]=f;var d=s._ff,g=s._gg,p=s._hh,y=s._ii;for(h=0;h<r.length;h+=16){var m=l,C=u,I=A,b=c;l=d(l,u,A,c,r[h+0],7,-680876936),c=d(c,l,u,A,r[h+1],12,-389564586),A=d(A,c,l,u,r[h+2],17,606105819),u=d(u,A,c,l,r[h+3],22,-1044525330),l=d(l,u,A,c,r[h+4],7,-176418897),c=d(c,l,u,A,r[h+5],12,1200080426),A=d(A,c,l,u,r[h+6],17,-1473231341),u=d(u,A,c,l,r[h+7],22,-45705983),l=d(l,u,A,c,r[h+8],7,1770035416),c=d(c,l,u,A,r[h+9],12,-1958414417),A=d(A,c,l,u,r[h+10],17,-42063),u=d(u,A,c,l,r[h+11],22,-1990404162),l=d(l,u,A,c,r[h+12],7,1804603682),c=d(c,l,u,A,r[h+13],12,-40341101),A=d(A,c,l,u,r[h+14],17,-1502002290),l=g(l,u=d(u,A,c,l,r[h+15],22,1236535329),A,c,r[h+1],5,-165796510),c=g(c,l,u,A,r[h+6],9,-1069501632),A=g(A,c,l,u,r[h+11],14,643717713),u=g(u,A,c,l,r[h+0],20,-373897302),l=g(l,u,A,c,r[h+5],5,-701558691),c=g(c,l,u,A,r[h+10],9,38016083),A=g(A,c,l,u,r[h+15],14,-660478335),u=g(u,A,c,l,r[h+4],20,-405537848),l=g(l,u,A,c,r[h+9],5,568446438),c=g(c,l,u,A,r[h+14],9,-1019803690),A=g(A,c,l,u,r[h+3],14,-187363961),u=g(u,A,c,l,r[h+8],20,1163531501),l=g(l,u,A,c,r[h+13],5,-1444681467),c=g(c,l,u,A,r[h+2],9,-51403784),A=g(A,c,l,u,r[h+7],14,1735328473),l=p(l,u=g(u,A,c,l,r[h+12],20,-1926607734),A,c,r[h+5],4,-378558),c=p(c,l,u,A,r[h+8],11,-2022574463),A=p(A,c,l,u,r[h+11],16,1839030562),u=p(u,A,c,l,r[h+14],23,-35309556),l=p(l,u,A,c,r[h+1],4,-1530992060),c=p(c,l,u,A,r[h+4],11,1272893353),A=p(A,c,l,u,r[h+7],16,-155497632),u=p(u,A,c,l,r[h+10],23,-1094730640),l=p(l,u,A,c,r[h+13],4,681279174),c=p(c,l,u,A,r[h+0],11,-358537222),A=p(A,c,l,u,r[h+3],16,-722521979),u=p(u,A,c,l,r[h+6],23,76029189),l=p(l,u,A,c,r[h+9],4,-640364487),c=p(c,l,u,A,r[h+12],11,-421815835),A=p(A,c,l,u,r[h+15],16,530742520),l=y(l,u=p(u,A,c,l,r[h+2],23,-995338651),A,c,r[h+0],6,-198630844),c=y(c,l,u,A,r[h+7],10,1126891415),A=y(A,c,l,u,r[h+14],15,-1416354905),u=y(u,A,c,l,r[h+5],21,-57434055),l=y(l,u,A,c,r[h+12],6,1700485571),c=y(c,l,u,A,r[h+3],10,-1894986606),A=y(A,c,l,u,r[h+10],15,-1051523),u=y(u,A,c,l,r[h+1],21,-2054922799),l=y(l,u,A,c,r[h+8],6,1873313359),c=y(c,l,u,A,r[h+15],10,-30611744),A=y(A,c,l,u,r[h+6],15,-1560198380),u=y(u,A,c,l,r[h+13],21,1309151649),l=y(l,u,A,c,r[h+4],6,-145523070),c=y(c,l,u,A,r[h+11],10,-1120210379),A=y(A,c,l,u,r[h+2],15,718787259),u=y(u,A,c,l,r[h+9],21,-343485551),l=l+m>>>0,u=u+C>>>0,A=A+I>>>0,c=c+b>>>0}return n.endian([l,u,A,c])})._ff=function(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._gg=function(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._hh=function(e,t,r,n,o,i,a){var s=e+(t^r^n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._ii=function(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},76:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,f=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&f&&"function"==typeof f.get?f.get:null,u=s&&Set.prototype.forEach,A="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,c="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,y=String.prototype.match,m=String.prototype.slice,C=String.prototype.replace,I=String.prototype.toUpperCase,b=String.prototype.toLowerCase,w=RegExp.prototype.test,v=Array.prototype.concat,B=Array.prototype.join,E=Array.prototype.slice,_=Math.floor,Q="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,x=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-_(-e):_(e);if(n!==e){var o=String(n),i=m.call(t,o.length+1);return C.call(o,r,"$&_")+"."+C.call(C.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return C.call(t,r,"$&_")}var M=r(4654),O=M.custom,L=j(O)?O:null;function P(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function U(e){return C.call(String(e),/"/g,""")}function T(e){return!("[object Array]"!==G(e)||D&&"object"==typeof e&&D in e)}function q(e){return!("[object RegExp]"!==G(e)||D&&"object"==typeof e&&D in e)}function j(e){if(R)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,s){var f=n||{};if(H(f,"quoteStyle")&&"single"!==f.quoteStyle&&"double"!==f.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(f,"maxStringLength")&&("number"==typeof f.maxStringLength?f.maxStringLength<0&&f.maxStringLength!==1/0:null!==f.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!H(f,"customInspect")||f.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(f,"indent")&&null!==f.indent&&"\t"!==f.indent&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(f,"numericSeparator")&&"boolean"!=typeof f.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var I=f.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return W(t,f);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return I?F(t,w):w}if("bigint"==typeof t){var _=String(t)+"n";return I?F(t,_):_}var S=void 0===f.depth?5:f.depth;if(void 0===o&&(o=0),o>=S&&S>0&&"object"==typeof t)return T(t)?"[Array]":"[Object]";var O,z=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=B.call(Array(e.indent+1)," ")}return{base:r,prev:B.call(Array(t+1),r)}}(f,o);if(void 0===s)s=[];else if(J(s,t)>=0)return"[Circular]";function Y(t,r,n){if(r&&(s=E.call(s)).push(r),n){var i={depth:f.depth};return H(f,"quoteStyle")&&(i.quoteStyle=f.quoteStyle),e(t,i,o+1,s)}return e(t,f,o+1,s)}if("function"==typeof t&&!q(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(p.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=X(t,Y);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+B.call(te,", ")+" }":"")}if(j(t)){var re=R?C.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||R?re:K(re)}if((O=t)&&"object"==typeof O&&("undefined"!=typeof HTMLElement&&O instanceof HTMLElement||"string"==typeof O.nodeName&&"function"==typeof O.getAttribute)){for(var ne="<"+b.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie<oe.length;ie++)ne+=" "+oe[ie].name+"="+P(U(oe[ie].value),"double",f);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+b.call(String(t.nodeName))+">"}if(T(t)){if(0===t.length)return"[]";var ae=X(t,Y);return z&&!function(e){for(var t=0;t<e.length;t++)if(J(e[t],"\n")>=0)return!1;return!0}(ae)?"["+Z(ae,z)+"]":"[ "+B.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||D&&"object"==typeof e&&D in e)}(t)){var se=X(t,Y);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+B.call(se,", ")+" }":"{ ["+String(t)+"] "+B.call(v.call("[cause]: "+Y(t.cause),se),", ")+" }"}if("object"==typeof t&&g){if(L&&"function"==typeof t[L]&&M)return M(t,{depth:S-o});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var fe=[];return a&&a.call(t,(function(e,r){fe.push(Y(r,t,!0)+" => "+Y(e,t))})),$("Map",i.call(t),fe,z)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(Y(e,t))})),$("Set",l.call(t),le,z)}if(function(e){if(!A||!e||"object"!=typeof e)return!1;try{A.call(e,A);try{c.call(e,c)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return V("WeakMap");if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{A.call(e,A)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return V("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return V("WeakRef");if(function(e){return!("[object Number]"!==G(e)||D&&"object"==typeof e&&D in e)}(t))return K(Y(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Q)return!1;try{return Q.call(e),!0}catch(e){}return!1}(t))return K(Y(Q.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||D&&"object"==typeof e&&D in e)}(t))return K(d.call(t));if(function(e){return!("[object String]"!==G(e)||D&&"object"==typeof e&&D in e)}(t))return K(Y(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==G(e)||D&&"object"==typeof e&&D in e)}(t)&&!q(t)){var ue=X(t,Y),Ae=x?x(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",he=!Ae&&D&&Object(t)===t&&D in t?m.call(G(t),8,-1):ce?"Object":"",de=(Ae||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||ce?"["+B.call(v.call([],he||[],ce||[]),": ")+"] ":"");return 0===ue.length?de+"{}":z?de+"{"+Z(ue,z)+"}":de+"{ "+B.call(ue,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return z.call(e,t)}function G(e){return g.call(e)}function J(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function W(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return W(m.call(e,0,t.maxStringLength),t)+n}return P(C.call(C.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+I.call(t.toString(16))}function K(e){return"Object("+e+")"}function V(e){return e+" { ? }"}function $(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):B.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+B.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=T(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=H(e,o)?t(e[o],e):""}var i,a="function"==typeof S?S(e):[];if(R){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var f in e)H(e,f)&&(r&&String(Number(f))===f&&f<e.length||R&&i["$"+f]instanceof Symbol||(w.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if("function"==typeof S)for(var l=0;l<a.length;l++)N.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}},9591:(e,t,r)=>{"use strict";var n={};(0,r(4236).assign)(n,r(4555),r(8843),r(1619)),e.exports=n},4555:(e,t,r)=>{"use strict";var n=r(405),o=r(4236),i=r(9373),a=r(8898),s=r(2292),f=Object.prototype.toString,l=0,u=-1,A=0,c=8;function h(e){if(!(this instanceof h))return new h(e);this.options=o.assign({level:u,method:c,chunkSize:16384,windowBits:15,memLevel:8,strategy:A,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===f.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==l)throw new Error(a[r]);this._dict_set=!0}}function d(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(e,t){var r,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=i.string2buf(e):"[object ArrayBuffer]"===f.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new o.Buf8(u),s.next_out=0,s.avail_out=u),1!==(r=n.deflate(s,a))&&r!==l)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(s.output,s.next_out))):this.onData(o.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==a||(this.onEnd(l),s.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=h,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},8843:(e,t,r)=>{"use strict";var n=r(7948),o=r(4236),i=r(9373),a=r(1619),s=r(8898),f=r(2292),l=r(2401),u=Object.prototype.toString;function A(e){if(!(this instanceof A))return new A(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[r])}function c(e,t){var r=new A(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}A.prototype.push=function(e,t){var r,s,f,l,A,c=this.strm,h=this.options.chunkSize,d=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?c.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new o.Buf8(h),c.next_out=0,c.avail_out=h),(r=n.inflate(c,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&d&&(r=n.inflateSetDictionary(this.strm,d)),r===a.Z_BUF_ERROR&&!0===g&&(r=a.Z_OK,g=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==a.Z_STREAM_END&&(0!==c.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(f=i.utf8border(c.output,c.next_out),l=c.next_out-f,A=i.buf2string(c.output,f),c.next_out=l,c.avail_out=h-l,l&&o.arraySet(c.output,c.output,f,l,0),this.onData(A)):this.onData(o.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(g=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),c.avail_out=0,!0)},A.prototype.onData=function(e){this.chunks.push(e)},A.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=A,t.inflate=c,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.ungzip=c},4236:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(e[o]=r[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},9373:(e,t,r)=>{"use strict";var n=r(4236),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function f(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,t.string2buf=function(e){var t,r,o,i,a,s=e.length,f=0;for(i=0;i<s;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),f+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(f),a=0,i=0;a<f;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(o=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(o-56320),i++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return f(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,o=t.length;r<o;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,o,i,s=t||e.length,l=new Array(2*s);for(n=0,r=0;r<s;)if((o=e[r++])<128)l[n++]=o;else if((i=a[o])>4)l[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r<s;)o=o<<6|63&e[r++],i--;i>1?l[n++]=65533:o<65536?l[n++]=o:(o-=65536,l[n++]=55296|o>>10&1023,l[n++]=56320|1023&o)}return f(l,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},6069:e=>{"use strict";e.exports=function(e,t,r,n){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{i=i+(o=o+t[n++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,o){var i=t,a=o+n;e^=-1;for(var s=o;s<a;s++)e=e>>>8^i[255&(e^r[s])];return-1^e}},405:(e,t,r)=>{"use strict";var n,o=r(4236),i=r(342),a=r(6069),s=r(2869),f=r(8898),l=0,u=0,A=-2,c=2,h=8,d=286,g=30,p=19,y=2*d+1,m=15,C=3,I=258,b=I+C+1,w=42,v=103,B=113,E=666;function _(e,t){return e.msg=f[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function S(e){for(var t=e.length;--t>=0;)e[t]=0}function k(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function R(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,k(e.strm)}function D(e,t){e.pending_buf[e.pending++]=t}function N(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,o.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=a(e.adler,t,i,r):2===e.state.wrap&&(e.adler=s(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function F(e,t){var r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-b?e.strstart-(e.w_size-b):0,l=e.window,u=e.w_mask,A=e.prev,c=e.strstart+I,h=l[i+a-1],d=l[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(r=t)+a]===d&&l[r+a-1]===h&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&i<c);if(n=I-(c-i),i=c-I,n>a){if(e.match_start=t,a=n,n>=s)break;h=l[i+a-1],d=l[i+a]}}}while((t=A[t&u])>f&&0!=--o);return a<=e.lookahead?a:e.lookahead}function M(e){var t,r,n,i,a,s=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-b)){o.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=s?n-s:0}while(--r);t=r=s;do{n=e.prev[--t],e.prev[t]=n>=s?n-s:0}while(--r);i+=s}if(0===e.strm.avail_in)break;if(r=x(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=C)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+C-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<b&&0!==e.strm.avail_in)}function O(e,t){for(var r,n;;){if(e.lookahead<b){if(M(e),e.lookahead<b&&t===l)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-b&&(e.match_length=F(e,r)),e.match_length>=C)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(R(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<C-1?e.strstart:C-1,4===t?(R(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?1:2}function L(e,t){for(var r,n,o;;){if(e.lookahead<b){if(M(e),e.lookahead<b&&t===l)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=C-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-b&&(e.match_length=F(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===C&&e.strstart-e.match_start>4096)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-C,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=C-1,e.strstart++,n&&(R(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&R(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<C-1?e.strstart:C-1,4===t?(R(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?1:2}function P(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function U(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=h,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*y),this.dyn_dtree=new o.Buf16(2*(2*g+1)),this.bl_tree=new o.Buf16(2*(2*p+1)),S(this.dyn_ltree),S(this.dyn_dtree),S(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(m+1),this.heap=new o.Buf16(2*d+1),S(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*d+1),S(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function T(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=c,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?w:B,e.adler=2===t.wrap?0:1,t.last_flush=l,i._tr_init(t),u):_(e,A)}function q(e){var t,r=T(e);return r===u&&((t=e.state).window_size=2*t.w_size,S(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=C-1,t.match_available=0,t.ins_h=0),r}function j(e,t,r,n,i,a){if(!e)return A;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||r!==h||n<8||n>15||t<0||t>9||a<0||a>4)return _(e,A);8===n&&(n=9);var f=new U;return e.state=f,f.strm=e,f.wrap=s,f.gzhead=null,f.w_bits=n,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=i+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+C-1)/C),f.window=new o.Buf8(2*f.w_size),f.head=new o.Buf16(f.hash_size),f.prev=new o.Buf16(f.w_size),f.lit_bufsize=1<<i+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new o.Buf8(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=t,f.strategy=a,f.method=r,q(e)}n=[new P(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(M(e),0===e.lookahead&&t===l)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,R(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-b&&(R(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(R(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(R(e,!1),e.strm.avail_out),1)})),new P(4,4,8,4,O),new P(4,5,16,8,O),new P(4,6,32,32,O),new P(4,4,16,16,L),new P(8,16,32,32,L),new P(8,16,128,128,L),new P(8,32,128,256,L),new P(32,128,258,1024,L),new P(32,258,258,4096,L)],t.deflateInit=function(e,t){return j(e,t,h,15,8,0)},t.deflateInit2=j,t.deflateReset=q,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?A:(e.state.gzhead=t,u):A},t.deflate=function(e,t){var r,o,a,f;if(!e||!e.state||t>5||t<0)return e?_(e,A):A;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===E&&4!==t)return _(e,0===e.avail_out?-5:A);if(o.strm=e,r=o.last_flush,o.last_flush=t,o.status===w)if(2===o.wrap)e.adler=0,D(o,31),D(o,139),D(o,8),o.gzhead?(D(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),D(o,255&o.gzhead.time),D(o,o.gzhead.time>>8&255),D(o,o.gzhead.time>>16&255),D(o,o.gzhead.time>>24&255),D(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),D(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(D(o,255&o.gzhead.extra.length),D(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(D(o,0),D(o,0),D(o,0),D(o,0),D(o,0),D(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),D(o,3),o.status=B);else{var c=h+(o.w_bits-8<<4)<<8;c|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(c|=32),c+=31-c%31,o.status=B,N(o,c),0!==o.strstart&&(N(o,e.adler>>>16),N(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),k(e),a=o.pending,o.pending!==o.pending_buf_size));)D(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),k(e),a=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,D(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===f&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),k(e),a=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,D(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===f&&(o.status=v)}else o.status=v;if(o.status===v&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&k(e),o.pending+2<=o.pending_buf_size&&(D(o,255&e.adler),D(o,e.adler>>8&255),e.adler=0,o.status=B)):o.status=B),0!==o.pending){if(k(e),0===e.avail_out)return o.last_flush=-1,u}else if(0===e.avail_in&&Q(t)<=Q(r)&&4!==t)return _(e,-5);if(o.status===E&&0!==e.avail_in)return _(e,-5);if(0!==e.avail_in||0!==o.lookahead||t!==l&&o.status!==E){var d=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(M(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(R(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(R(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,a,s=e.window;;){if(e.lookahead<=I){if(M(e),e.lookahead<=I&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&e.strstart>0&&(n=s[o=e.strstart-1])===s[++o]&&n===s[++o]&&n===s[++o]){a=e.strstart+I;do{}while(n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&o<a);e.match_length=I-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(r=i._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(R(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(R(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(R(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==d&&4!==d||(o.status=E),1===d||3===d)return 0===e.avail_out&&(o.last_flush=-1),u;if(2===d&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(S(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),k(e),0===e.avail_out))return o.last_flush=-1,u}return 4!==t?u:o.wrap<=0?1:(2===o.wrap?(D(o,255&e.adler),D(o,e.adler>>8&255),D(o,e.adler>>16&255),D(o,e.adler>>24&255),D(o,255&e.total_in),D(o,e.total_in>>8&255),D(o,e.total_in>>16&255),D(o,e.total_in>>24&255)):(N(o,e.adler>>>16),N(o,65535&e.adler)),k(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?u:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==w&&69!==t&&73!==t&&91!==t&&t!==v&&t!==B&&t!==E?_(e,A):(e.state=null,t===B?_(e,-3):u):A},t.deflateSetDictionary=function(e,t){var r,n,i,s,f,l,c,h,d=t.length;if(!e||!e.state)return A;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==w||r.lookahead)return A;for(1===s&&(e.adler=a(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new o.Buf8(r.w_size),o.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),f=e.avail_in,l=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,M(r);r.lookahead>=C;){n=r.strstart,i=r.lookahead-(C-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+C-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--i);r.strstart=n,r.lookahead=C-1,M(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=C-1,r.match_available=0,e.next_in=l,e.input=c,e.avail_in=f,r.wrap=s,u},t.deflateInfo="pako deflate (from Nodeca project)"},2401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){var r,n,o,i,a,s,f,l,u,A,c,h,d,g,p,y,m,C,I,b,w,v,B,E,_;r=e.state,n=e.next_in,E=e.input,o=n+(e.avail_in-5),i=e.next_out,_=e.output,a=i-(t-e.avail_out),s=i+(e.avail_out-257),f=r.dmax,l=r.wsize,u=r.whave,A=r.wnext,c=r.window,h=r.hold,d=r.bits,g=r.lencode,p=r.distcode,y=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;e:do{d<15&&(h+=E[n++]<<d,d+=8,h+=E[n++]<<d,d+=8),C=g[h&y];t:for(;;){if(h>>>=I=C>>>24,d-=I,0==(I=C>>>16&255))_[i++]=65535&C;else{if(!(16&I)){if(0==(64&I)){C=g[(65535&C)+(h&(1<<I)-1)];continue t}if(32&I){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}b=65535&C,(I&=15)&&(d<I&&(h+=E[n++]<<d,d+=8),b+=h&(1<<I)-1,h>>>=I,d-=I),d<15&&(h+=E[n++]<<d,d+=8,h+=E[n++]<<d,d+=8),C=p[h&m];r:for(;;){if(h>>>=I=C>>>24,d-=I,!(16&(I=C>>>16&255))){if(0==(64&I)){C=p[(65535&C)+(h&(1<<I)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(w=65535&C,d<(I&=15)&&(h+=E[n++]<<d,(d+=8)<I&&(h+=E[n++]<<d,d+=8)),(w+=h&(1<<I)-1)>f){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=I,d-=I,w>(I=i-a)){if((I=w-I)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(v=0,B=c,0===A){if(v+=l-I,I<b){b-=I;do{_[i++]=c[v++]}while(--I);v=i-w,B=_}}else if(A<I){if(v+=l+A-I,(I-=A)<b){b-=I;do{_[i++]=c[v++]}while(--I);if(v=0,A<b){b-=I=A;do{_[i++]=c[v++]}while(--I);v=i-w,B=_}}}else if(v+=A-I,I<b){b-=I;do{_[i++]=c[v++]}while(--I);v=i-w,B=_}for(;b>2;)_[i++]=B[v++],_[i++]=B[v++],_[i++]=B[v++],b-=3;b&&(_[i++]=B[v++],b>1&&(_[i++]=B[v++]))}else{v=i-w;do{_[i++]=_[v++],_[i++]=_[v++],_[i++]=_[v++],b-=3}while(b>2);b&&(_[i++]=_[v++],b>1&&(_[i++]=_[v++]))}break}}break}}while(n<o&&i<s);n-=b=d>>3,h&=(1<<(d-=b<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<s?s-i+257:257-(i-s),r.hold=h,r.bits=d}},7948:(e,t,r)=>{"use strict";var n=r(4236),o=r(6069),i=r(2869),a=r(4264),s=r(9241),f=0,l=-2,u=1,A=12,c=30,h=852,d=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=u,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(h),t.distcode=t.distdyn=new n.Buf32(d),t.sane=1,t.back=-1,f):l}function m(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):l}function C(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,m(e))):l}function I(e,t){var r,n;return e?(n=new p,e.state=n,n.window=null,(r=C(e,t))!==f&&(e.state=null),r):l}var b,w,v=!0;function B(e){if(v){var t;for(b=new n.Buf32(512),w=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,w,0,e.work,{bits:5}),v=!1}e.lencode=b,e.lenbits=9,e.distcode=w,e.distbits=5}function E(e,t,r,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),o>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),n.arraySet(a.window,t,r-o,i,a.wnext),(o-=i)?(n.arraySet(a.window,t,r-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=m,t.inflateReset2=C,t.inflateResetKeep=y,t.inflateInit=function(e){return I(e,15)},t.inflateInit2=I,t.inflate=function(e,t){var r,h,d,p,y,m,C,I,b,w,v,_,Q,S,k,R,D,N,x,F,M,O,L,P,U=0,T=new n.Buf8(4),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;(r=e.state).mode===A&&(r.mode=13),y=e.next_out,d=e.output,C=e.avail_out,p=e.next_in,h=e.input,m=e.avail_in,I=r.hold,b=r.bits,w=m,v=C,O=f;e:for(;;)switch(r.mode){case u:if(0===r.wrap){r.mode=13;break}for(;b<16;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(2&r.wrap&&35615===I){r.check=0,T[0]=255&I,T[1]=I>>>8&255,r.check=i(r.check,T,2,0),I=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&I)<<8)+(I>>8))%31){e.msg="incorrect header check",r.mode=c;break}if(8!=(15&I)){e.msg="unknown compression method",r.mode=c;break}if(b-=4,M=8+(15&(I>>>=4)),0===r.wbits)r.wbits=M;else if(M>r.wbits){e.msg="invalid window size",r.mode=c;break}r.dmax=1<<M,e.adler=r.check=1,r.mode=512&I?10:A,I=0,b=0;break;case 2:for(;b<16;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(r.flags=I,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=c;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=c;break}r.head&&(r.head.text=I>>8&1),512&r.flags&&(T[0]=255&I,T[1]=I>>>8&255,r.check=i(r.check,T,2,0)),I=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.head&&(r.head.time=I),512&r.flags&&(T[0]=255&I,T[1]=I>>>8&255,T[2]=I>>>16&255,T[3]=I>>>24&255,r.check=i(r.check,T,4,0)),I=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.head&&(r.head.xflags=255&I,r.head.os=I>>8),512&r.flags&&(T[0]=255&I,T[1]=I>>>8&255,r.check=i(r.check,T,2,0)),I=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.length=I,r.head&&(r.head.extra_len=I),512&r.flags&&(T[0]=255&I,T[1]=I>>>8&255,r.check=i(r.check,T,2,0)),I=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((_=r.length)>m&&(_=m),_&&(r.head&&(M=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,_,M)),512&r.flags&&(r.check=i(r.check,h,_,p)),m-=_,p+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;_=0;do{M=h[p+_++],r.head&&M&&r.length<65536&&(r.head.name+=String.fromCharCode(M))}while(M&&_<m);if(512&r.flags&&(r.check=i(r.check,h,_,p)),m-=_,p+=_,M)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===m)break e;_=0;do{M=h[p+_++],r.head&&M&&r.length<65536&&(r.head.comment+=String.fromCharCode(M))}while(M&&_<m);if(512&r.flags&&(r.check=i(r.check,h,_,p)),m-=_,p+=_,M)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;b<16;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(I!==(65535&r.check)){e.msg="header crc mismatch",r.mode=c;break}I=0,b=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=A;break;case 10:for(;b<32;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}e.adler=r.check=g(I),I=0,b=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=y,e.avail_out=C,e.next_in=p,e.avail_in=m,r.hold=I,r.bits=b,2;e.adler=r.check=1,r.mode=A;case A:if(5===t||6===t)break e;case 13:if(r.last){I>>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}switch(r.last=1&I,b-=1,3&(I>>>=1)){case 0:r.mode=14;break;case 1:if(B(r),r.mode=20,6===t){I>>>=2,b-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=c}I>>>=2,b-=2;break;case 14:for(I>>>=7&b,b-=7&b;b<32;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if((65535&I)!=(I>>>16^65535)){e.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&I,I=0,b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(_>m&&(_=m),_>C&&(_=C),0===_)break e;n.arraySet(d,h,p,_,y),m-=_,p+=_,C-=_,y+=_,r.length-=_;break}r.mode=A;break;case 17:for(;b<14;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(r.nlen=257+(31&I),I>>>=5,b-=5,r.ndist=1+(31&I),I>>>=5,b-=5,r.ncode=4+(15&I),I>>>=4,b-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;b<3;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.lens[q[r.have++]]=7&I,I>>>=3,b-=3}for(;r.have<19;)r.lens[q[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},O=s(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,O){e.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;R=(U=r.lencode[I&(1<<r.lenbits)-1])>>>16&255,D=65535&U,!((k=U>>>24)<=b);){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(D<16)I>>>=k,b-=k,r.lens[r.have++]=D;else{if(16===D){for(P=k+2;b<P;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(I>>>=k,b-=k,0===r.have){e.msg="invalid bit length repeat",r.mode=c;break}M=r.lens[r.have-1],_=3+(3&I),I>>>=2,b-=2}else if(17===D){for(P=k+3;b<P;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}b-=k,M=0,_=3+(7&(I>>>=k)),I>>>=3,b-=3}else{for(P=k+7;b<P;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}b-=k,M=0,_=11+(127&(I>>>=k)),I>>>=7,b-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=c;break}for(;_--;)r.lens[r.have++]=M}}if(r.mode===c)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,L={bits:r.lenbits},O=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,O){e.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},O=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,O){e.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(m>=6&&C>=258){e.next_out=y,e.avail_out=C,e.next_in=p,e.avail_in=m,r.hold=I,r.bits=b,a(e,v),y=e.next_out,d=e.output,C=e.avail_out,p=e.next_in,h=e.input,m=e.avail_in,I=r.hold,b=r.bits,r.mode===A&&(r.back=-1);break}for(r.back=0;R=(U=r.lencode[I&(1<<r.lenbits)-1])>>>16&255,D=65535&U,!((k=U>>>24)<=b);){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(R&&0==(240&R)){for(N=k,x=R,F=D;R=(U=r.lencode[F+((I&(1<<N+x)-1)>>N)])>>>16&255,D=65535&U,!(N+(k=U>>>24)<=b);){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}I>>>=N,b-=N,r.back+=N}if(I>>>=k,b-=k,r.back+=k,r.length=D,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=A;break}if(64&R){e.msg="invalid literal/length code",r.mode=c;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(P=r.extra;b<P;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.length+=I&(1<<r.extra)-1,I>>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(U=r.distcode[I&(1<<r.distbits)-1])>>>16&255,D=65535&U,!((k=U>>>24)<=b);){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(0==(240&R)){for(N=k,x=R,F=D;R=(U=r.distcode[F+((I&(1<<N+x)-1)>>N)])>>>16&255,D=65535&U,!(N+(k=U>>>24)<=b);){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}I>>>=N,b-=N,r.back+=N}if(I>>>=k,b-=k,r.back+=k,64&R){e.msg="invalid distance code",r.mode=c;break}r.offset=D,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(P=r.extra;b<P;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}r.offset+=I&(1<<r.extra)-1,I>>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===C)break e;if(_=v-C,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=c;break}_>r.wnext?(_-=r.wnext,Q=r.wsize-_):Q=r.wnext-_,_>r.length&&(_=r.length),S=r.window}else S=d,Q=y-r.offset,_=r.length;_>C&&(_=C),C-=_,r.length-=_;do{d[y++]=S[Q++]}while(--_);0===r.length&&(r.mode=21);break;case 26:if(0===C)break e;d[y++]=r.length,C--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===m)break e;m--,I|=h[p++]<<b,b+=8}if(v-=C,e.total_out+=v,r.total+=v,v&&(e.adler=r.check=r.flags?i(r.check,d,v,y-v):o(r.check,d,v,y-v)),v=C,(r.flags?I:g(I))!==r.check){e.msg="incorrect data check",r.mode=c;break}I=0,b=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;b<32;){if(0===m)break e;m--,I+=h[p++]<<b,b+=8}if(I!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=c;break}I=0,b=0}r.mode=29;case 29:O=1;break e;case c:O=-3;break e;case 31:return-4;default:return l}return e.next_out=y,e.avail_out=C,e.next_in=p,e.avail_in=m,r.hold=I,r.bits=b,(r.wsize||v!==e.avail_out&&r.mode<c&&(r.mode<27||4!==t))&&E(e,e.output,e.next_out,v-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,v-=e.avail_out,e.total_in+=w,e.total_out+=v,r.total+=v,r.wrap&&v&&(e.adler=r.check=r.flags?i(r.check,d,v,e.next_out-v):o(r.check,d,v,e.next_out-v)),e.data_type=r.bits+(r.last?64:0)+(r.mode===A?128:0)+(20===r.mode||15===r.mode?256:0),(0===w&&0===v||4===t)&&O===f&&(O=-5),O)},t.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,f},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?l:(r.head=t,t.done=!1,f):l},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&o(1,t,n,0)!==r.check?-3:E(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,f):l},t.inflateInfo="pako inflate (from Nodeca project)"},9241:(e,t,r)=>{"use strict";var n=r(4236),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,f,l,u,A,c){var h,d,g,p,y,m,C,I,b,w=c.bits,v=0,B=0,E=0,_=0,Q=0,S=0,k=0,R=0,D=0,N=0,x=null,F=0,M=new n.Buf16(16),O=new n.Buf16(16),L=null,P=0;for(v=0;v<=15;v++)M[v]=0;for(B=0;B<f;B++)M[t[r+B]]++;for(Q=w,_=15;_>=1&&0===M[_];_--);if(Q>_&&(Q=_),0===_)return l[u++]=20971520,l[u++]=20971520,c.bits=1,0;for(E=1;E<_&&0===M[E];E++);for(Q<E&&(Q=E),R=1,v=1;v<=15;v++)if(R<<=1,(R-=M[v])<0)return-1;if(R>0&&(0===e||1!==_))return-1;for(O[1]=0,v=1;v<15;v++)O[v+1]=O[v]+M[v];for(B=0;B<f;B++)0!==t[r+B]&&(A[O[t[r+B]]++]=B);if(0===e?(x=L=A,m=19):1===e?(x=o,F-=257,L=i,P-=257,m=256):(x=a,L=s,m=-1),N=0,B=0,v=E,y=u,S=Q,k=0,g=-1,p=(D=1<<Q)-1,1===e&&D>852||2===e&&D>592)return 1;for(;;){C=v-k,A[B]<m?(I=0,b=A[B]):A[B]>m?(I=L[P+A[B]],b=x[F+A[B]]):(I=96,b=0),h=1<<v-k,E=d=1<<S;do{l[y+(N>>k)+(d-=h)]=C<<24|I<<16|b|0}while(0!==d);for(h=1<<v-1;N&h;)h>>=1;if(0!==h?(N&=h-1,N+=h):N=0,B++,0==--M[v]){if(v===_)break;v=t[r+A[B]]}if(v>Q&&(N&p)!==g){for(0===k&&(k=Q),y+=E,R=1<<(S=v-k);S+k<_&&!((R-=M[S+k])<=0);)S++,R<<=1;if(D+=1<<S,1===e&&D>852||2===e&&D>592)return 1;l[g=N&p]=Q<<24|S<<16|y-u|0}}return 0!==N&&(l[y+N]=v-k<<24|64<<16|0),c.bits=Q,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(e,t,r)=>{"use strict";var n=r(4236);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,s=30,f=15,l=16,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);o(d);var g=new Array(60);o(g);var p=new Array(512);o(p);var y=new Array(256);o(y);var m=new Array(29);o(m);var C,I,b,w=new Array(s);function v(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function B(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?p[e]:p[256+(e>>>7)]}function _(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Q(e,t,r){e.bi_valid>l-r?(e.bi_buf|=t<<e.bi_valid&65535,_(e,e.bi_buf),e.bi_buf=t>>l-e.bi_valid,e.bi_valid+=r-l):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function S(e,t,r){Q(e,r[2*t],r[2*t+1])}function k(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function R(e,t,r){var n,o,i=new Array(f+1),a=0;for(n=1;n<=f;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=k(i[s]++,s))}}function D(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function N(e){e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function x(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function F(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&x(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!x(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function M(e,t,r){var n,o,a,s,f=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*f]<<8|e.pending_buf[e.d_buf+2*f+1],o=e.pending_buf[e.l_buf+f],f++,0===n?S(e,o,t):(S(e,(a=y[o])+i+1,t),0!==(s=u[a])&&Q(e,o-=m[a],s),S(e,a=E(--n),r),0!==(s=A[a])&&Q(e,n-=w[a],s))}while(f<e.last_lit);S(e,256,t)}function O(e,t){var r,n,o,i=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,s&&(e.static_len-=a[2*o+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)F(e,i,r);o=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,F(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,a,s,l=t.dyn_tree,u=t.max_code,A=t.stat_desc.static_tree,c=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,g=t.stat_desc.max_length,p=0;for(i=0;i<=f;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=l[2*l[2*(n=e.heap[r])+1]+1]+1)>g&&(i=g,p++),l[2*n+1]=i,n>u||(e.bl_count[i]++,a=0,n>=d&&(a=h[n-d]),s=l[2*n],e.opt_len+=s*(i+a),c&&(e.static_len+=s*(A[2*n+1]+a)));if(0!==p){do{for(i=g-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[g]--,p-=2}while(p>0);for(i=g;0!==i;i--)for(n=e.bl_count[i];0!==n;)(o=e.heap[--r])>u||(l[2*o+1]!==i&&(e.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(e,t),R(i,u,e.bl_count)}function L(e,t,r){var n,o,i=-1,a=t[1],s=0,f=7,l=4;for(0===a&&(f=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++s<f&&o===a||(s<l?e.bl_tree[2*o]+=s:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,i=o,0===a?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))}function P(e,t,r){var n,o,i=-1,a=t[1],s=0,f=7,l=4;for(0===a&&(f=138,l=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++s<f&&o===a)){if(s<l)do{S(e,o,e.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(S(e,o,e.bl_tree),s--),S(e,16,e.bl_tree),Q(e,s-3,2)):s<=10?(S(e,17,e.bl_tree),Q(e,s-3,3)):(S(e,18,e.bl_tree),Q(e,s-11,7));s=0,i=o,0===a?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}}o(w);var U=!1;function T(e,t,r,o){Q(e,0+(o?1:0),3),function(e,t,r,o){N(e),_(e,r),_(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){U||(function(){var e,t,r,n,o,i=new Array(f+1);for(r=0,n=0;n<28;n++)for(m[n]=r,e=0;e<1<<u[n];e++)y[r++]=n;for(y[r-1]=n,o=0,n=0;n<16;n++)for(w[n]=o,e=0;e<1<<A[n];e++)p[o++]=n;for(o>>=7;n<s;n++)for(w[n]=o<<7,e=0;e<1<<A[n]-7;e++)p[256+o++]=n;for(t=0;t<=f;t++)i[t]=0;for(e=0;e<=143;)d[2*e+1]=8,e++,i[8]++;for(;e<=255;)d[2*e+1]=9,e++,i[9]++;for(;e<=279;)d[2*e+1]=7,e++,i[7]++;for(;e<=287;)d[2*e+1]=8,e++,i[8]++;for(R(d,287,i),e=0;e<s;e++)g[2*e+1]=5,g[2*e]=k(e,5);C=new v(d,u,257,a,f),I=new v(g,A,0,s,f),b=new v(new Array(0),c,0,19,7)}(),U=!0),e.l_desc=new B(e.dyn_ltree,C),e.d_desc=new B(e.dyn_dtree,I),e.bl_desc=new B(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,D(e)},t._tr_stored_block=T,t._tr_flush_block=function(e,t,r,n){var o,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),O(e,e.l_desc),O(e,e.d_desc),s=function(e){var t;for(L(e,e.dyn_ltree,e.l_desc.max_code),L(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?T(e,t,r,n):4===e.strategy||a===o?(Q(e,2+(n?1:0),3),M(e,d,g)):(Q(e,4+(n?1:0),3),function(e,t,r,n){var o;for(Q(e,t-257,5),Q(e,r-1,5),Q(e,n-4,4),o=0;o<n;o++)Q(e,e.bl_tree[2*h[o]+1],3);P(e,e.dyn_ltree,t-1),P(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),D(e),n&&N(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(y[r]+i+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){Q(e,2,3),S(e,256,d),function(e){16===e.bi_valid?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4971:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,f=36,l=26,u=38,A=700,c=/^xn--/,h=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=f-1,y=Math.floor,m=String.fromCharCode;function C(e){throw new RangeError(g[e])}function I(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+I((e=e.replace(d,".")).split("."),t).join(".")}function w(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function v(e){return I(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+m(e)})).join("")}function B(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?y(e/A):e>>1,e+=y(e/t);e>p*l>>1;n+=f)e=y(e/p);return y(n+(p+1)*e/(e+u))}function _(e){var t,r,n,o,i,a,u,A,c,h,d,g=[],p=e.length,m=0,I=128,b=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),g.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<p;){for(i=m,a=1,u=f;o>=p&&C("invalid-input"),((A=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:f)>=f||A>y((s-m)/a))&&C("overflow"),m+=A*a,!(A<(c=u<=b?1:u>=b+l?l:u-b));u+=f)a>y(s/(h=f-c))&&C("overflow"),a*=h;b=E(m-i,t=g.length+1,0==i),y(m/t)>s-I&&C("overflow"),I+=y(m/t),m%=t,g.splice(m++,0,I)}return v(g)}function Q(e){var t,r,n,o,i,a,u,A,c,h,d,g,p,I,b,v=[];for(g=(e=w(e)).length,t=128,r=0,i=72,a=0;a<g;++a)(d=e[a])<128&&v.push(m(d));for(n=o=v.length,o&&v.push("-");n<g;){for(u=s,a=0;a<g;++a)(d=e[a])>=t&&d<u&&(u=d);for(u-t>y((s-r)/(p=n+1))&&C("overflow"),r+=(u-t)*p,t=u,a=0;a<g;++a)if((d=e[a])<t&&++r>s&&C("overflow"),d==t){for(A=r,c=f;!(A<(h=c<=i?1:c>=i+l?l:c-i));c+=f)b=A-h,I=f-h,v.push(m(B(h+b%I,0))),A=y(b/I);v.push(m(B(A,0))),i=E(r,p,n==o),r=0,++n}++r,++t}return v.join("")}a={version:"1.4.1",ucs2:{decode:w,encode:v},decode:_,encode:Q,toASCII:function(e){return b(e,(function(e){return h.test(e)?"xn--"+Q(e):e}))},toUnicode:function(e){return b(e,(function(e){return c.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},129:(e,t,r)=>{"use strict";var n=r(8261),o=r(5235),i=r(5798);e.exports={formats:i,parse:o,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},f=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!r.plainObjects&&o.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var A=0;r.depth>0&&null!==(s=a.exec(i))&&A<r.depth;){if(A+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:f(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);r.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,l={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,A=t.parameterLimit===1/0?void 0:t.parameterLimit,c=u.split(t.delimiter,A),h=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<c.length;++r)0===c[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===c[r]?d="utf-8":"utf8=%26%2310003%3B"===c[r]&&(d="iso-8859-1"),h=r,r=c.length);for(r=0;r<c.length;++r)if(r!==h){var g,p,y=c[r],m=y.indexOf("]="),C=-1===m?y.indexOf("="):m+1;-1===C?(g=t.decoder(y,a.decoder,d,"key"),p=t.strictNullHandling?null:""):(g=t.decoder(y.slice(0,C),a.decoder,d,"key"),p=n.maybeMap(f(y.slice(C+1),t),(function(e){return t.decoder(e,a.decoder,d,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===d&&(p=s(p)),y.indexOf("[]=")>-1&&(p=i(p)?[p]:p),o.call(l,g)?l[g]=n.combine(l[g],p):l[g]=p}return l}(e,r):e,A=r.plainObjects?Object.create(null):{},c=Object.keys(u),h=0;h<c.length;++h){var d=c[h],g=l(d,u[d],r,"string"==typeof e);A=n.merge(A,g,r)}return!0===r.allowSparse?A:n.compact(A)}},8261:(e,t,r)=>{"use strict";var n=r(7478),o=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},f=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,f(t)?t:[t])},A=Date.prototype.toISOString,c=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:c,formatter:i.formatters[c],indices:!1,serializeDate:function(e){return A.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,a,s,l,A,c,g,p,y,m,C,I,b,w){for(var v,B=t,E=w,_=0,Q=!1;void 0!==(E=E.get(d))&&!Q;){var S=E.get(t);if(_+=1,void 0!==S){if(S===_)throw new RangeError("Cyclic object value");Q=!0}void 0===E.get(d)&&(_=0)}if("function"==typeof c?B=c(r,B):B instanceof Date?B=y(B):"comma"===i&&f(B)&&(B=o.maybeMap(B,(function(e){return e instanceof Date?y(e):e}))),null===B){if(s)return A&&!I?A(r,h.encoder,b,"key",m):r;B=""}if("string"==typeof(v=B)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||o.isBuffer(B))return A?[C(I?r:A(r,h.encoder,b,"key",m))+"="+C(A(B,h.encoder,b,"value",m))]:[C(r)+"="+C(String(B))];var k,R=[];if(void 0===B)return R;if("comma"===i&&f(B))I&&A&&(B=o.maybeMap(B,A)),k=[{value:B.length>0?B.join(",")||null:void 0}];else if(f(c))k=c;else{var D=Object.keys(B);k=g?D.sort(g):D}for(var N=a&&f(B)&&1===B.length?r+"[]":r,x=0;x<k.length;++x){var F=k[x],M="object"==typeof F&&void 0!==F.value?F.value:B[F];if(!l||null!==M){var O=f(B)?"function"==typeof i?i(N,F):N:N+(p?"."+F:"["+F+"]");w.set(t,_);var L=n();L.set(d,w),u(R,e(M,O,i,a,s,l,"comma"===i&&I&&f(B)?null:A,c,g,p,y,m,C,I,b,L))}}return R};e.exports=function(e,t){var r,o=e,l=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=h.filter;return("function"==typeof e.filter||f(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):f(l.filter)&&(r=l.filter);var A,c=[];if("object"!=typeof o||null===o)return"";A=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=s[A];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),l.sort&&r.sort(l.sort);for(var y=n(),m=0;m<r.length;++m){var C=r[m];l.skipNulls&&null===o[C]||u(c,g(o[C],C,d,p,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,y))}var I=c.join(l.delimiter),b=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),I.length>0?b+I:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),f=0;f<s.length;++f){var l=s[f],u=a[l];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:l}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var f="",l=0;l<s.length;++l){var u=s.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===n.RFC1738&&(40===u||41===u)?f+=s.charAt(l):u<128?f+=a[u]:u<2048?f+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?f+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),f+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return f},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},1269:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},7771:(e,t,r)=>{"use strict";var n=r(210),o=r(2296),i=r(1044)(),a=r(7296),s=n("%TypeError%"),f=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||f(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,l=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(n=!1),u&&!u.writable&&(l=!1)}return(n||l||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},7478:(e,t,r)=>{"use strict";var n=r(210),o=r(1924),i=r(631),a=n("%TypeError%"),s=n("%WeakMap%",!0),f=n("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),A=o("WeakMap.prototype.has",!0),c=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(f){if(t)return c(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return A(e,n)}else if(f){if(t)return d(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),u(e,n,o)):f?(t||(t=new f),h(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},8575:(e,t,r)=>{"use strict";var n=r(4971);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(f),u=["%","/","?",";","#"].concat(l),A=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(129);function m(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",f=e.split(a);f[0]=f[0].replace(/\\/g,"/");var m=e=f.join(a);if(m=m.trim(),!r&&1===e.split("#").length){var C=s.exec(m);if(C)return this.path=m,this.href=m,this.pathname=C[1],C[2]?(this.search=C[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var I=i.exec(m);if(I){var b=(I=I[0]).toLowerCase();this.protocol=b,m=m.substr(I.length)}if(r||I||m.match(/^\/\/[^@/]+@[^@/]+/)){var w="//"===m.substr(0,2);!w||I&&g[I]||(m=m.substr(2),this.slashes=!0)}if(!g[I]&&(w||I&&!p[I])){for(var v,B,E=-1,_=0;_<A.length;_++)-1!==(Q=m.indexOf(A[_]))&&(-1===E||Q<E)&&(E=Q);for(-1!==(B=-1===E?m.lastIndexOf("@"):m.lastIndexOf("@",E))&&(v=m.slice(0,B),m=m.slice(B+1),this.auth=decodeURIComponent(v)),E=-1,_=0;_<u.length;_++){var Q;-1!==(Q=m.indexOf(u[_]))&&(-1===E||Q<E)&&(E=Q)}-1===E&&(E=m.length),this.host=m.slice(0,E),m=m.slice(E),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var k=this.hostname.split(/\./),R=(_=0,k.length);_<R;_++){var D=k[_];if(D&&!D.match(c)){for(var N="",x=0,F=D.length;x<F;x++)D.charCodeAt(x)>127?N+="x":N+=D[x];if(!N.match(c)){var M=k.slice(0,_),O=k.slice(_+1),L=D.match(h);L&&(M.push(L[1]),O.unshift(L[2])),O.length&&(m="/"+O.join(".")+m),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=n.toASCII(this.hostname));var P=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+P,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!d[b])for(_=0,R=l.length;_<R;_++){var T=l[_];if(-1!==m.indexOf(T)){var q=encodeURIComponent(T);q===T&&(q=escape(T)),m=m.split(T).join(q)}}var j=m.indexOf("#");-1!==j&&(this.hash=m.substr(j),m=m.slice(0,j));var z=m.indexOf("?");if(-1!==z?(this.search=m.substr(z),this.query=m.substr(z+1),t&&(this.query=y.parse(this.query)),m=m.slice(0,z)):t&&(this.search="",this.query={}),m&&(this.pathname=m),p[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){P=this.pathname||"";var H=this.search||"";this.path=P+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||p[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(m(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),f=0;f<s.length;f++){var l=s[f];"protocol"!==l&&(r[l]=e[l])}return p[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!p[e.protocol]){for(var u=Object.keys(e),A=0;A<u.length;A++){var c=u[A];r[c]=e[c]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",y=r.search||"";r.path=d+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),C=e.host||e.pathname&&"/"===e.pathname.charAt(0),I=C||m||r.host&&e.pathname,b=I,w=r.pathname&&r.pathname.split("/")||[],v=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!p[r.protocol]);if(v&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),I=I&&(""===h[0]||""===w[0])),C)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=h;else if(h.length)w||(w=[]),w.pop(),w=w.concat(h),r.search=e.search,r.query=e.query;else if(null!=e.search)return v&&(r.host=w.shift(),r.hostname=r.host,(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=w.slice(-1)[0],E=(r.host||e.host||w.length>1)&&("."===B||".."===B)||""===B,_=0,Q=w.length;Q>=0;Q--)"."===(B=w[Q])?w.splice(Q,1):".."===B?(w.splice(Q,1),_++):_&&(w.splice(Q,1),_--);if(!I&&!b)for(;_--;_)w.unshift("..");!I||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var S,k=""===w[0]||w[0]&&"/"===w[0].charAt(0);return v&&(r.hostname=k?"":w.length?w.shift():"",r.host=r.hostname,(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)),(I=I||r.host&&w.length)&&!k&&w.unshift(""),w.length>0?r.pathname=w.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=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=m,t.resolve=function(e,t){return m(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?m(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=m(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},1289:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,AGFzbQEAAAABOApgAX8Bf2ABfwBgAABgA39/fwF/YAABf2ACf38AYAN/f34BfmACf38Bf2AEf39/fwF/YAN/f38AAyEgAAABAgMDAwMEAQUAAgMCBgcIBwUDAAMHAQcABwcBAwkFAwEAAgYIAX8BQfCgBAsHTgUGbWVtb3J5AgAOY3JlYXRlX2NvbnRleHQACA9kZXN0cm95X2NvbnRleHQACQxzdXBwbHlfaW5wdXQACg9nZXRfbmV4dF9vdXRwdXQACwqNYCDfAgEFf0EAIQECQCAAQQdqIgJBEEkNAEEBIQEgAkEDdiIDQQJGDQBBAiEBIAJBIEkNAEEDIQEgA0EERg0AQQQhASACQTBJDQBBBSEBIANBBkYNAEEGIQEgAkHIAEkNAEEHIQEgAkHYAEkNAEEIIQEgAkGIAUkNAEEJIQEgAkGIAkkNACAAEIGAgIAAIgBBCGpBACAAGw8LAkACQCABQQJ0QcCIgIAAaiIEKAIAIgANAEEAIQACQAJAQQAoAuSIgIAAIgJFDQBBACACKAIANgLkiICAAAwBC0EAEIGAgIAAIgJFDQILIAJBgIB8cSIAIAJBCHZB/wFxIgJyIAE6AAAgAkEIdCAAckGAAmohAEEAIQJBACABQQJ0QYCIgIAAaigCACIDayEFIAMhAQNAIAAgBWoiACACNgIAIAAhAiABIANqIgFBgQJJDQALIAQgADYCAAsgBCAAKAIANgIACyAAC+4HAQd/AkACQAJAAkACQEEALQC0iICAAEUNAEEAQQA6ALSIgIAAQQAoArCIgIAAIgFFDQFBsIiAgAAhAgNAAkACQCABQQhqIgMgASgCBCIEaiIFQQh2Qf8BcSIGDQAgASECDAELAkADQCAFQYCAfHEgBmotAABB/gFHDQFBsIiAgAAhBgNAIAYiBygCACIGIAVHDQALIAcgBSgCADYCACABIAQgBSgCBGpBCGoiBDYCBCAHIAIgAiAFRhshAiADIARqIgVBCHZB/wFxIgYNAAsLIAIoAgAhAgsgAigCACIBDQALC0EAKAKwiICAACIFRQ0AIABBhwJqQYB+cSEDQX8hAkGwiICAACEEQQAhAUGwiICAACEGA0AgBiEHAkAgBSIGKAIEIgUgAEkNACAFIAJPDQAgBSECIAchBCAGIQEgBUEIaiADRw0AIAchBCAFIQIgBiEBDAQLIAYoAgAiBQ0ACyABDQIMAQtBsIiAgAAhBAs/AEEQdCEBIABBiAJqIQdBACEDAkACQEEAKAK4iICAACICRQ0AQQAhBSABIQYMAQtBACABQfCghIAAQf//A2pBgIB8cSIGayICNgK4iICAACACIQULAkAgByAFTQ0AIAcgBWsiByACQQF2IgIgAiAHSRtB//8DaiIHQRB2QABBf0YNAkEAQQAoAriIgIAAIAdBgIB8cSIDajYCuIiAgAALIAZFDQEgBkH/AToAASAGQQAoArCIgIAANgKAAiAGQYQCaiADIAVqQYCAfHFB+H1qIgI2AgAgBkGAAmohAQsgAUGAgHxxIgYgAUEIdkH/AXFyQf8BOgAAIAQgASgCADYCAAJAIAIgAGtBgH5xIgUNACABDwsgASEDAkAgBiABQQhqIgQgAmoiByAFQX9zakGAgHxxRg0AIARB//8DcSEFAkAgAEH3/QNLDQAgBiAEQQh2Qf8BcWpB/gE6AAAgAUEAKAKwiICAADYCACABQYCABCAFayIFNgIEQQAgATYCsIiAgAAQg4CAgAAgBkGEggRqIAIgBWtB+H1qIgU2AgAgBkGBgARqQf8BOgAAIAZBgIIEaiEDIAUgAGtBgH5xIQUMAQsgAiAFaiAAIAVqQX9qQYCAfHFrQYCAfGohBSABIQMLIAMgAygCBCAFazYCBCAFQfgBaiEGIAcgBWtBCHZB/wFxIQUCQANAIAYiB0GAfmohBiAFIgQNAUEBIQUgB0H4AUcNAAsLAkAgB0H4AUYNACACIAFqIAZrQYCAfHEiBSAEakH+AToAACAFIARBCHRqIgVBACgCsIiAgAA2AgAgBSAGNgIEQQAgBTYCsIiAgAAQg4CAgAALIAMPC0EAC3wBAn8CQCAARQ0AAkAgAEGAgHxxIABBCHZB/wFxciIBLQAAIgJB/wFHDQAgAEF4aiIAQQAoArCIgIAANgIAQQAgADYCsIiAgAAgAUH+AToAAEEAQQE6ALSIgIAADwsgACACQQJ0QcCIgIAAaiICKAIANgIAIAIgADYCAAsLawECfwJAQQAoArCIgIAAIgAoAgRB/wFLDQAgAEGAgHxxIgEgAEEIdkH/AXEiAHJBCToAAEEAQQAoArCIgIAAKAIANgKwiICAACABIABBCHRyIgBBACgC5IiAgAA2AgBBACAANgLkiICAAAsLTgECfwJAIAAgAUYNACACRQ0AA0ACQCAALQAAIgMgAS0AACIERg0AQQFBfyADIARLGw8LIAFBAWohASAAQQFqIQAgAkF/aiICDQALC0EAC3gBAX8CQAJAIAAgAU8NACACRQ0BIAAhAwNAIAMgAS0AADoAACABQQFqIQEgA0EBaiEDIAJBf2oiAg0ADAILCyAAIAFNDQAgAkUNACABQX9qIQEgAEF/aiEDA0AgAyACaiABIAJqLQAAOgAAIAJBf2oiAg0ACwsgAAssAQF/AkAgAkUNACAAIQMDQCADIAE6AAAgA0EBaiEDIAJBf2oiAg0ACwsgAAuCAQEBfwJAAkAgAEEDcQ0AIAEgAnJBA3ENACACQQRJDQEgAkECdiECIAAhAwNAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIAJBf2oiAg0ADAILCyACRQ0AIAAhAwNAIAMgAS0AADoAACABQQFqIQEgA0EBaiEDIAJBf2oiAg0ACwsgAAuIAQECfwJAQQAtAOiIgIAADQBBAEEBOgDoiICAABCMgICAABCOgICAAAtBoIAIEICAgIAAIgBBgIAENgIAQQJBgICAIBCXgICAACEBIABBFGpCgICAgICAwAA3AgAgAEEQaiAAQaCABGo2AgAgAEEIakIANwMAIAAgAEEgajYCBCAAIAE2AhwgAAsVACAAKAIcEJiAgIAAIAAQgoCAgAALFgAgAEEMaiABNgIAIABBCGpBADYCAAsbACAAKAIcIABBBGogAEEMaigCAEUQloCAgAALVAEDf0EAIQADQEEIIQEgACECA0BBACACQQFxa0GghuLtfnEgAkEBdnMhAiABQX9qIgENAAsgAEECdEHwiICAAGogAjYCACAAQQFqIgBBgAJHDQALC0oAIAJBf3MhAgJAIAFFDQADQCACQf8BcSAALQAAc0ECdEHwiICAAGooAgAgAkEIdnMhAiAAQQFqIQAgAUF/aiIBDQALCyACQX9zC10DAX4BfwF+QgAhAANAQQghASAAIQIDQEIAIAJCAYN9QsKenLzd8pW2SYMgAkIBiIUhAiABQX9qIgENAAsgAKdBA3RB8JCAgABqIAI3AwAgAEIBfCIAQoACUg0ACwtLACACQn+FIQICQCABRQ0AA0AgAkL/AYMgADEAAIWnQQN0QfCQgIAAaikDACACQgiIhSECIABBAWohACABQX9qIgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3FFDRELIAEoAgQiDCABKAIIIg1GDQ4CQCABKAIAIgogDGotAAAiCw0AIAAgDDYCECABIAxBAWo2AgRBBiECDAwLQQAhAiAAQQA2AqgBIABBAjYCACAAIAtBAnRBBGoiCzYCrAEgACALNgJACyAIIAJqQQhqIAogDGogDSAMayIMIAsgAmsiAiAMIAJJGyICEIeAgIAAGiABIAIgASgCBGo2AgRBACEMIABBACAAKAKoASACaiICIAIgACgCrAEiC0YbNgKoASACIAtHDQ8gACACQXxqIgI2AqwBQQchDCAEIAJBABCNgICAACAAIAAoAqwBIgtqQbABaigAAEcNDyAAQQI2AqgBIAAtALEBIgJBP3ENDAJAAkAgAkHAAHFFDQAgACAEIAggCxCRgICAAEEBRw0RIAAgACkDCDcDMCAALQCxASECDAELIABCfzcDMAtCfyEOAkAgAkEYdEEYdUF/Sg0AIAAgBCAIIAAoAqwBEJGAgIAAQQFHDRAgACkDCCEOCyAAIA43AzggACgCrAEiDSAAKAKoASICa0ECSQ0PIAAgAkEBaiIKNgKoASAIIAJqQQhqLQAAQSFHDQwgACACQQJqIgs2AqgBIAggCmpBCGotAABBAUcNDCANIAtGDQ8gACACQQNqNgKoASAAKAKwCSAIIAtqQQhqLQAAEJyAgIAAIgwNDyAAKAKoASIMIAAoAqwBIgIgDCACSxshDQJAA0AgDSAMRg0BIAggDEEBaiICNgIAIAQgDGohCyACIQwgCy0AAA0ODAALCyAGQgA3AwAgAEEANgKoASAAQQM2AgAgBkEIakIANwMACyAAIAEoAgQ2AhAgACABKAIQNgIUIAAoArAJIAEQmYCAgAAhDCAAIAApA0ggASgCBCAAKAIQa618Ig43A0ggACAAKQNQIAEoAhAgACgCFCICayILrXwiDzcDUCAOIAApAzBWDQ0gDyAAKQM4Vg0NAkACQAJAAkAgACgCIEF/ag4EAAMDAQMLIAEoAgwgAmogCyAAKAIYEI2AgIAArSEODAELIAEoAgwgAmogCyAAKQMYEI+AgIAAIQ4LIAAgDjcDGAsgDEEBRw0OAkAgACkDMCIOQn9RDQAgDiAGKQMAUg0OCwJAIAApAzgiDkJ/UQ0AQQchDCAOIAApA1BSDQ8LIAAgACkDSCAANQJAfCAAKQNgfCIPNwNgQgQhDgJAAkACQCAAKAIgQX9qDgQBAgIAAgtCCCEOCyAFIA4gD3w3AwALIAAgACkDaCAAKQNQfDcDaCAAIAVBGCAAKAJwEI2AgIAANgJwIABBBDYCACAAIAApA1hCAXw3A1gLAkAgBikDACIOQgODUA0AIA5CAXwhDiABKAIEIQwgASgCCCELA0AgCyAMRg0NIAEgDEEBaiICNgIEIAEoAgAgDGotAAANDiAGIA43AwAgDkIDgyEPIA5CAXwhDiACIQwgD0IAUg0ACwsgAEEFNgIAC0EBIQIgACgCIEF/ag4EBgcHBQcLIAAgARCSgICAACIMQQFHDQsgAEEHNgIAC0EAIAAoAhBrIQggAEGAAWopAwAhDiABKAIEIQwCQANAIA4gCCAMaq18QgODUA0BAkAgDCABKAIIRw0AIAAgARCTgICAAAwLCyABIAxBAWoiAjYCBCABKAIAIAxqIQsgAiEMIAstAAANCwwACwsgACABEJOAgIAAQQchDCAFIABBkAFqQRgQhICAgAANCiAAQQg2AgALIAAgAUEgEJSAgIAAIgxBAUcNCSAAQQk2AgBBDCELIABBDDYCrAEMAQsgACgCrAEhCwsgAEGoAWogACgCqAEiDGpBCGogASgCACABKAIEIgJqIAEoAgggAmsiAiALIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0HIAAQlYCAgAAhDAwHC0EBIQIgACABQcAAEJSAgIAAIgxBAUcNBgwBC0EBIQIgACABQSAQlICAgAAiDEEBRw0FCyAAIAI2AgAMAAsLQQYhDAwCC0EAIQwMAQtBByEMCwJAAkAgACgCJA0AAkACQCAMDgIAAwELQQdBCCABKAIEIAEoAghGGyEMCyABIAk2AhAgASADNgIEIAwPCwJAIAwNACADIAEoAgRHDQAgCSABKAIQRw0AIAAtACghASAAQQE6ACggAUEDdA8LIABBADoAKAsgDAuaAQEDfwJAIAAoAgQiBA0AIABCADcDCAsgAigCACEFA0ACQCAFIANJDQBBAA8LIAEgBWotAAAhBiACIAVBAWoiBTYCACAAIAZB/wBxrSAErYYgACkDCIQ3AwgCQAJAIAZBgAFxDQACQCAGDQBBByEGIAQNAgsgAEEANgIEQQEPC0EHIQYgACAEQQdqIgQ2AgQgBEE/Rw0BCwsgBguhAgIDfwF+IABBkAFqIQIgAUEEaiEDA0ACQCAAIAEoAgAgAyABKAIIEJGAgIAAIgRBAUYNACAAQYABaiIDIAMpAwAgASgCBCAAKAIQIgNrIgKtfDcDACAAIAMgASgCAGogAiAAKAIYEI2AgIAArTcDGCAEDwsCQAJAAkACQAJAIAAoAngOAwACAQMLIAAgACkDCCIFNwOIAQJAIAUgACkDWFENAEEHDwsgAEEBNgJ4DAMLIAAgACkDmAEgACkDCHw3A5gBIAAgAkEYIAAoAqABEI2AgIAANgKgASAAQQE2AnggACAAKQOIAUJ/fCIFNwOIAQwCCyAAQQI2AnggACAAKQOQASAAKQMIfDcDkAELIAApA4gBIQULIAVCAFINAAtBAQtAAQJ/IABBgAFqIgIgAikDACABKAIEIAAoAhAiAmsiA618NwMAIAAgAiABKAIAaiADIAAoAhgQjYCAgACtNwMYC3wBBH8gASgCBCEDIAEoAgghBANAAkAgBCADRw0AQQAPCyABIANBAWoiBTYCBAJAIAEoAgAgA2otAAAgACkDGCAAKAIEIgOtiKdB/wFxRg0AQQcPCyAAIANBCGoiBjYCBCAFIQMgBiACSQ0ACyAAQQA2AgQgAEIANwMYQQELbwEBf0EHIQECQCAAQboBai8AAEHZtAFHDQAgAEG0AWpBBkEAEI2AgIAAIABBsAFqKAAARw0AIABBgAFqKQMAQgKIIAA1ALQBUg0AIABBuAFqLQAADQBBAUEHIAAoAiAgAEG5AWotAABGGyEBCyABC7QCAQR/AkACQCAAKAIkRQ0AIAAoAgAhAwwBC0EAIQMgAEEAOgAoIABCADcDACAAQgA3AxggAEHIAGpBAEHkABCGgICAABogAEGsAWpBDDYCAEEBIQILIABByABqIQQCQAJAA0ACQCADQQpHDQAgASgCBCIDIAEoAggiBUYNAiABKAIAIQYCQANAIAYgA2otAAANASABIANBAWoiAzYCBCAAIAAoAgRBAWpBA3E2AgQgBSADRg0EDAALCwJAIAAoAgRFDQBBBw8LIAAoAiRFDQAgAEEAOgAoIABCADcDACAAQgA3AxggBEEAQeQAEIaAgIAAGiAAQQw2AqwBCyAAIAEQkICAgAAiA0EBRw0CQQohAyAAQQo2AgAMAAsLAkAgAg0AQQAPC0EHQQEgACgCBBshAwsgAwt1AQF/AkBBuAkQgICAgAAiAkUNACACIAA2AiQgAiAAIAEQm4CAgAAiADYCsAkCQCAARQ0AIAJBADoAKCACQgA3AwAgAkIANwMYIAJByABqQQBB5AAQhoCAgAAaIAJBrAFqQQw2AgAgAg8LIAIQgoCAgAALQQALHgACQCAARQ0AIAAoArAJEJ2AgIAAIAAQgoCAgAALC4ARAQx/IABB6N0BaiECIABB1ABqIQMgAEEcaiIEQQhqIQUCQAJAA0AgACgCQCEGAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgASgCBCIHIAEoAggiCEkNACAGQQdGDQEMEgsgBg4JAQIDBAUGBwAJDwsgACgCTCEGDAcLQQEhCSABIAdBAWo2AgQgASgCACAHai0AACIHRQ0IAkACQCAHQd8BSw0AIAdBAUcNAQsgAEGAAjsBUAJAIAAoAjwNACAAIAEoAgwgASgCECIGajYCGCAAIAEoAhQgBms2AiwLIARCADcCACAFQgA3AgAMCwsgAC0AUEUNCgwOCyABIAdBAWo2AgQgASgCACAHai0AACEHIABBAjYCQCAAIAdBCHQgACgCSGo2AkgMDAsgASAHQQFqNgIEIAEoAgAgB2otAAAhByAAQQM2AkAgACAHIAAoAkhqQQFqNgJIDAsLIAEgB0EBajYCBCABKAIAIAdqLQAAIQcgAEEENgJAIAAgB0EIdDYCTAwKCyABIAdBAWo2AgQgASgCACAHai0AACEHIAAgACgCRDYCQCAAIAcgACgCTGpBAWo2AkwMCQsgASAHQQFqNgIEQQchCSABKAIAIAdqLQAAIgdB4AFLDQNBACEGAkACQCAHQS1PDQBBACEIDAELIAdBU2oiByAHQf8BcUEtbiIIQS1sayEHIAhBAWohCAsgAEF/IAh0QX9zNgJ0AkAgB0H/AXFBCUkNACAHQXdqIgcgB0H/AXFBCW4iBkEJbGshByAGQQFqIQYLIAAgBjYCcCAAIAdB/wFxIgc2AmwgBiAHakEESw0DIANCADcCACADQQhqQgA3AgAgA0EQakEANgIAIABBfyAGdEF/czYCcEH4ACEHA0AgACAHakGACDsBACAHQQJqIgdB5N0BRw0ACyAAQQY2AkAgAEEFNgIIIABC/////w83AgALIAAoAkwiCUEFSQ0IAkAgACgCCCIHRQ0AIAdBf2ohBiABKAIEIQcgASgCCCEKA0AgCiAHRg0LIAEgB0EBaiIINgIEIAEoAgAgB2otAAAhByAAIAY2AgggACAHIAAoAgRBCHRyNgIEIAghByAGQX9qIgZBf0cNAAsLIABBBzYCQCAAIAlBe2oiBjYCTAsgACAAKAIgIgcgASgCFCABKAIQayIIIAAoAkgiCiAIIApJGyIIaiAAKAIsIgogCiAHayAISxs2AiggASgCCCIJIAEoAgQiCGshBwJAAkACQCAAKALk3QEiCg0AIAYNAUEAIQYLIABB5N0BaiILIApqQQRqIAEoAgAgCGogByAGIAprIgZBKiAKayIIIAggBksbIgYgBiAHSxsiBxCHgICAABoCQAJAIAcgACgC5N0BIghqIgYgACgCTEcNACALIAhqIAdqQQRqQQBBPyAGaxCGgICAABogACgC5N0BIAdqIQYMAQsCQCAGQRRLDQAgACAGNgLk3QEgASABKAIEIAdqNgIEDAMLIAZBa2ohBgsgAEEANgIQIAAgAjYCDCAAIAY2AhRBByEJIAAQmoCAgABFDQMgACgCECIIIAAoAuTdASIKIAdqSw0DIAAgACgCTCAIayIGNgJMAkAgCiAITQ0AIAAgCiAIayIHNgLk3QEgAiALIAhqQQRqIAcQhYCAgAAaDAILIABBADYC5N0BIAEgASgCBCAIIApraiIINgIEIAEoAggiCSAIayEHCwJAIAdBFUkNACAAIAg2AhAgACABKAIANgIMIAAgCUFraiAIIAZqIAcgBkEVakkbNgIUQQchCSAAEJqAgIAARQ0DIAAoAkwiByAAKAIQIgggASgCBGsiBkkNAyABIAg2AgQgACAHIAZrIgY2AkwgASgCCCAIayIHQRRLDQELIAIgASgCACAIaiAGIAcgByAGSxsiBxCHgICAABogACAHNgLk3QEgASABKAIEIAdqNgIECyAAKAIgIgYgACgCHCIIayEHAkAgACgCPEUNAAJAIAYgACgCLEcNACAAQQA2AiALIAEoAgwgASgCEGogACgCGCAIaiAHEIeAgIAAGiAAKAIgIQYLIAAgBjYCHCABIAEoAhAgB2oiBjYCECAAIAAoAkggB2siBzYCSAJAIAcNAEEHIQkgACgCTA0CIAAoAmgNAiAAKAIEDQIgAEEANgJADAULQQAhCSAGIAEoAhRGDQEgASgCBCABKAIIRw0GIAAoAuTdASAAKAJMTw0GDAELIAAoAkwiCkUNAUEAIQkgCCAHTQ0AA0AgASgCFCIGIAEoAhAiC00NASAAIAogCiAAKAIsIAAoAiAiDGsiDSAIIAdrIgggBiALayIGIAggBkkbIgYgBiANSxsiBiAGIApLGyIGazYCTCAMIAAoAhhqIAEoAgAgB2ogBhCFgICAABogACAAKAIgIAZqIgc2AiACQCAAKAIkIAdPDQAgACAHNgIkCwJAIAAoAjxFDQACQCAHIAAoAixHDQAgAEEANgIgCyABKAIMIAEoAhBqIAEoAgAgASgCBGogBhCFgICAABogACgCICEHCyAAIAc2AhwgASABKAIQIAZqNgIQIAEgASgCBCAGaiIHNgIEIAAoAkwiCkUNAiABKAIIIgggB0sNAAsLIAkPCyAAQQA2AkAMAwsgB0EYdEEYdUF/Sg0BIABBATYCQCAAIAdBEHRBgID8AHE2AkgCQCAHQcABSQ0AIABBBTYCRCAAQQA6AFEMAwsgAC0AUQ0DIABBBjYCRCAHQaABSQ0CIANCADcCACADQRBqQQA2AgAgA0EIakIANwIAQfgAIQcDQCAAIAdqQYAIOwEAIAdBAmoiB0Hk3QFHDQALCyAAQQU2AgggAEL/////DzcCAAwBCyAHQQJLDQEgAEKDgICAgAE3AkAMAAsLQQcPC0EAC/8XARJ/IABBGGohAQJAIABBIGooAgAiAiAAQShqKAIAIgNPDQAgAEHoAGoiBCgCAEUNACABIAQgACgCVBCegICAABogACgCKCEDIAAoAiAhAgsCQCACIANPDQAgAEHcDWohBSAAQegAaiEGIABB4BVqIQcgAEHUAGohCANAIAAoAhAiCSAAKAIUSw0BIAAgACgCZCIKQQV0aiAAKAJ0IAJxIgtBAXRqIgxB+ABqIQ0CQAJAIAAoAgAiBEGAgIAISQ0AIAAoAgQhDgwBCyAAIARBCHQiBDYCACAAIAlBAWoiAzYCECAAIAAoAgRBCHQgACgCDCAJai0AAHIiDjYCBCADIQkLAkACQCAOIARBC3YgDS8BACIPbCIDTw0AIAAgAzYCACANIA9BgBAgD2tBBXZqOwEAIAJBf2ohBAJAIAINACAAKAIsIARqIQQLAkACQCAAKAIkIg8NAEEAIQQMAQsgACgCGCAEai0AACEECyAAKAJwIAJxIAAoAmwiDXQgBEEIIA1rdmohDAJAAkAgCkEGSw0AQQEhBANAIAAgDEGADGxqIARBAXQiBGpB5B1qIQ0CQAJAIANB////B00NACADIQoMAQsgACADQQh0Igo2AgAgACAJQQFqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiAKQQt2IA0vAQAiD2wiA0kNACAAIA4gA2siDjYCBCAAIAogA2siAzYCACANIA8gD0EFdms7AQAgBEEBciEEDAELIAAgAzYCACANIA9BgBAgD2tBBXZqOwEACyAEQYACSQ0ADAILCyACIAAoAlQiDUF/c2ohBAJAIAIgDUsNACAAKAIsIARqIQQLAkACQCAPDQBBACEQDAELIAAoAhggBGotAAAhEAtBASEEQYACIQ0DQCAAIAxBgAxsaiAQQQF0IhAgDXEiESANaiAEakEBdGpB5B1qIQ8CQAJAIANB////B00NACADIQsMAQsgACADQQh0Igs2AgAgACAJQQFqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiALQQt2IA8vAQAiCmwiA08iEg0AIAAgAzYCACAKQYAQIAprQQV2aiEKDAELIAAgDiADayIONgIEIAAgCyADayIDNgIAIAogCkEFdmshCkEAIQ0LIA8gCjsBACANIBFzIQ0gBEEBdCASciIEQYACSQ0ACwsgACACQQFqNgIgIAAoAhggAmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC3YgDS8BACIEbCIJTw0AIAAgCTYCACANIARBgBAgBGtBBXZqOwEAIAAoAlghAwwBCyAAIA4gCWsiDjYCBCANIAQgBEEFdms7AQAgD0HABGohBAJAIAMgCWsiA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgCkEBajYCECAAIA5BCHQgACgCDCAKai0AAHIiDjYCBAsCQAJAIA4gA0ELdiAELwEAIg1sIglPDQAgACAJNgIAIAQgDUGAECANa0EFdmo7AQAgACgCXCEDDAELIAAgDiAJazYCBCAAIAMgCWs2AgAgACgCYCEDIAAgACgCXDYCYCAEIA0gDUEFdms7AQALIAAgACgCWDYCXAsgACAAKAJUNgJYIAAgAzYCVAsgAEEIQQsgACgCZEEHSRs2AmQgACAHIAsQn4CAgAAMAQsgBCANQYAQIA1rQQV2ajsBACAAIAk2AgAgACAAKAJcNgJgIAAgACkCVDcCWCAAQQdBCiAAKAJkQQdJGzYCZCAAIAUgCxCfgICAACAAKAJoIgNBfmpBAyADQQZJGyEKIAAoAgAhA0EBIQ4DQCAAIApBB3RqIA5BAXQiDmpB2AdqIQ0CQAJAIANBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgRBAWo2AhAgACAAKAIEQQh0IAQgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgDS8BACIJbCIPSQ0AIAAgBCAPayIENgIEIAAgAyAPayIDNgIAIA0gCSAJQQV2azsBACAOQQFyIQ4MAQsgACAPNgIAIA0gCUGAECAJa0EFdmo7AQAgDyEDCyAOQcAASQ0ACwJAIA5BQGoiCUEDSw0AIAAgCTYCVAwBCyAAIA5BAXFBAnIiDTYCVCAJQQF2IQ8CQCAJQQ1LDQAgACANIA9Bf2oiDHQiCzYCVEEBIQ0gCCALQQF0akGEC2ohEEE/IA5rIRFBACEPA0AgECARIA1qQQF0aiEOAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA4vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACAOIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDUEBdEEBciENDAELIAAgAzYCACAOIAlBgBAgCWtBBXZqOwEAIA1BAXQhDQsgDCAPQQFqIg9HDQAMAgsLIA9Be2ohDgNAAkAgA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgACgCECIJQQFqNgIQIARBCHQgCSAAKAIMai0AAHIhBAsgACADQQF2IgM2AgAgACAEIANrIgRBH3UiCSANQQF0akEBaiINNgJUIAAgCSADcSAEaiIENgIEIA5Bf2oiDg0ACyAAIA1BBHQiCzYCVEEAIQ9BASEOA0AgACAOQQF0Ig5qQbwNaiENAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA0vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACANIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDkEBciEODAELIAAgAzYCACANIAlBgBAgCWtBBXZqOwEACyAPQQFqIg9BBEcNAAsLAkAgASAGIAAoAlQQnoCAgAANAEEADwsgACgCICECCyACIAAoAihJDQALC0EBIQMCQCAAKAIAIgRB////B0sNACAAIARBCHQ2AgBBASEDIAAgACgCECIEQQFqNgIQIAAgACgCBEEIdCAEIAAoAgxqLQAAcjYCBAsgAwtwAQF/AkBBqN4BEICAgIAAIgJFDQAgAkE0aiABNgIAIAJBPGogADYCAAJAAkACQCAAQX9qDgIAAQILIAIgARCAgICAACIANgIYIAANASACEIKAgIAADAILIAJBADYCGCACQThqQQA2AgALIAIPC0EAC9IBAQJ/QQYhAgJAIAFBJ0sNACAAQTBqIAFBAXFBAnIgAUEBdkELanQiATYCAAJAAkAgAEE8aigCACIDRQ0AQQQhAiABIABBNGooAgBLDQIgAEEsaiABNgIAIANBAkcNACAAQThqIgMoAgAgAU8NACAAIAE2AjggACgCGBCCgICAACAAIAAoAjAQgICAgAAiATYCGCABDQBBAyECDAELQQAhAiAAQQA2AkAgAEHQAGpBAToAACAAQegAakEANgIAIABB5N0BaiEDCyADQQA2AgALIAILIwACQCAAQTxqKAIARQ0AIAAoAhgQgoCAgAALIAAQgoCAgAAL9QEBBH9BACEDAkAgACgCDCACTQ0AIAAoAhggAk0NACABIAEoAgAiBCAAKAIQIAAoAggiBWsiBiAEIAYgBEkbIgRrNgIAIAUgAkF/c2ohAQJAIAUgAksNACAAKAIUIAFqIQELIAAoAgAiAiABai0AACEGQQEhAyAAIAVBAWo2AgggAiAFaiAGOgAAAkAgBEF/aiICRQ0AA0AgACgCACIFQQAgAUEBaiIBIAEgACgCFEYbIgFqLQAAIQQgACAAKAIIIgZBAWo2AgggBSAGaiAEOgAAIAJBf2oiAg0ACwsgACgCDCAAKAIIIgFPDQAgACABNgIMCyADC8gEAQd/AkACQCAAKAIAIgNBgICACEkNACAAKAIEIQQMAQsgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAAKAIEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIANBC3YgAS8BACIGbCIFTw0AIAEgBkGAECAGa0EFdmo7AQAgASACQQR0akEEaiEHQQghCEECIQkMAQsgACAEIAVrIgQ2AgQgASAGIAZBBXZrOwEAAkAgAyAFayIDQf///wdLDQAgACADQQh0IgM2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkAgBCADQQt2IAEvAQIiBmwiBU8NACABIAZBgBAgBmtBBXZqOwECIAEgAkEEdGpBhAJqIQdBCCEIQQohCQwBCyAAIAQgBWsiBDYCBCABIAYgBkEFdms7AQIgAUGEBGohByADIAVrIQVBgAIhCEESIQkLIABB6ABqIAk2AgBBASEBA0AgByABQQF0IgFqIQMCQAJAIAVB////B00NACAFIQIMAQsgACAFQQh0IgI2AgAgACAAKAIQIgVBAWo2AhAgACAEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIAJBC3YgAy8BACIGbCIFSQ0AIAAgBCAFayIENgIEIAAgAiAFayIFNgIAIAMgBiAGQQV2azsBACABQQFyIQEMAQsgACAFNgIAIAMgBkGAECAGa0EFdmo7AQALIAEgCEkNAAsgAEHoAGogASAIayAJajYCAAsLNQEAQYAICy4IAAAAEAAAABgAAAAgAAAAKAAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{XzReadableStream:()=>i});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class i extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});i._moduleInstance=n.instance}constructor(e){let t,n=null;const o=e.getReader();super({async start(e){i._moduleInstance||await(i._moduleInstancePromise||(i._moduleInstancePromise=i._getModuleInstance())),t=new r(i._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await o.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),o.cancel())})}}})(),o})(),e.exports=n(r(3534))},7067:()=>{},4654:()=>{},3534:()=>{}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(5590);window.gmodCRAM=n})();
|