@zip.js/zip.js
Advanced tools
Comparing version 2.2.22 to 2.2.23
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let s=e;for(let t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;t[e]=s}class e{constructor(t){this.crc=t||-1}append(e){let s=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)s=s>>>8^t[255&(s^e[n])];this.crc=s}get(){return~this.crc}}const s={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=s.getPartial(n);return 32===r?t.concat(e):s._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+s.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=s.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,s)=>32===t?e:(s?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let s=0;s<t.length;s++)r.push(n|t[s]>>>e),n=t[s]<<32-e;const i=t.length?t[t.length-1]:0,a=s.getPartial(i);return r.push(s.partial(e+a&31,e+a>32?n:r.pop(),1)),r}},n={bytes:{fromBits(t){const e=s.bitLength(t)/8,n=new Uint8Array(e);let r;for(let s=0;s<e;s++)0==(3&s)&&(r=t[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(s.partial(8*(3&n),r)),e}}},r={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const s=e._tables[0][4],n=e._tables[1],r=t.length;let i,a,h,c=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[a=t.slice(0),h=[]],i=r;i<4*r+28;i++){let t=a[i-1];(i%r==0||8===r&&i%r==4)&&(t=s[t>>>24]<<24^s[t>>16&255]<<16^s[t>>8&255]<<8^s[255&t],i%r==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-r]^t}for(let t=0;i;t++,i--){const e=a[3&t?i:i-4];h[t]=i<=4||t<4?e:n[0][s[e>>>24]]^n[1][s[e>>16&255]]^n[2][s[e>>8&255]]^n[3][s[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],s=t[4],n=e[4],r=[],i=[];let a,h,c,o;for(let t=0;t<256;t++)i[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=a=0;!s[l];l^=h||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,s[l]=i,n[i]=l,o=r[c=r[h=r[l]]];let p=16843009*o^65537*c^257*h^16843008*l,d=257*r[i]^16843008*i;for(let s=0;s<4;s++)t[s][l]=d=d<<24^d>>>8,e[s][i]=p=p<<24^p>>>8}for(let s=0;s<5;s++)t[s]=t[s].slice(0),e[s]=e[s].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const s=this._key[e],n=s.length/4-2,r=[0,0,0,0],i=this._tables[e],a=i[0],h=i[1],c=i[2],o=i[3],l=i[4];let p,d,u,y=t[0]^s[0],g=t[e?3:1]^s[1],f=t[2]^s[2],w=t[e?1:3]^s[3],b=4;for(let t=0;t<n;t++)p=a[y>>>24]^h[g>>16&255]^c[f>>8&255]^o[255&w]^s[b],d=a[g>>>24]^h[f>>16&255]^c[w>>8&255]^o[255&y]^s[b+1],u=a[f>>>24]^h[w>>16&255]^c[y>>8&255]^o[255&g]^s[b+2],w=a[w>>>24]^h[y>>16&255]^c[g>>8&255]^o[255&f]^s[b+3],b+=4,y=p,g=d,f=u;for(let t=0;t<4;t++)r[e?3&-t:t]=l[y>>>24]<<24^l[g>>16&255]<<16^l[f>>8&255]<<8^l[255&w]^s[b++],p=y,y=g,g=f,f=w,w=p;return r}}},i={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,s=t>>8&255,n=255&t;255===e?(e=0,255===s?(s=0,255===n?n=0:++n):++s):++e,t=0,t+=e<<16,t+=s<<8,t+=n}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=s.bitLength(e);for(let s=0;s<r;s+=4){this.incCounter(n);const r=t.encrypt(n);e[s]^=r[0],e[s+1]^=r[1],e[s+2]^=r[2],e[s+3]^=r[3]}return s.clamp(e,i)}}},a="Invalid pasword",h=16,c={name:"PBKDF2"},o={name:"HMAC"},l="SHA-1",p=Object.assign({hash:o},c),d=Object.assign({iterations:1e3,hash:{name:l}},c),u=Object.assign({hash:l},o),y=["deriveBits"],g=["sign"],f=[8,12,16],w=[16,24,32],b=10,m=[0,0,0,0],A=crypto.subtle;class U{constructor(t,e,s){this.password=t,this.signed=e,this.strength=s-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,f[this.strength]+2);await async function(t,e,s){await C(t,s,e.subarray(0,f[t.strength]));const n=e.subarray(f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=n[0]||r[1]!=n[1])throw new Error(a)}(this,e,this.password),this.password=null,this.aesCtrGladman=new i.ctrGladman(new r.aes(this.keys.key),Array.from(m)),t=t.subarray(f[this.strength]+2)}let e,s=new Uint8Array(t.length-b-(t.length-b)%h),c=t;for(this.pendingInput.length&&(c=_(this.pendingInput,t),s=v(s,c.length-b-(c.length-b)%h)),e=0;e<=c.length-b-h;e+=h){const t=c.subarray(e,e+h),r=n.bytes.toBits(t),i=this.aesCtrGladman.update(r);s.set(n.bytes.fromBits(i),e)}return this.pendingInput=c.subarray(e),this.signed&&(this.input=_(this.input,t)),s}async flush(){const t=this.pendingInput,e=this.keys,s=t.subarray(0,t.length-b),r=t.subarray(t.length-b);let i=new Uint8Array(0);if(s.length){const t=this.aesCtrGladman.update(n.bytes.toBits(s));i=n.bytes.fromBits(t)}let a=!0;if(this.signed){const t=await A.sign(o,e.authentication,this.input.subarray(0,this.input.length-b)),s=new Uint8Array(t).subarray(0,b);this.input=null;for(let t=0;t<b;t++)s[t]!=r[t]&&(a=!1)}return{valid:a,data:i}}}class k{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const s=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await C(t,e,s),_(s,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new i.ctrGladman(new r.aes(this.keys.key),Array.from(m)));let s,a=new Uint8Array(e.length+t.length-t.length%h);for(a.set(e,0),this.pendingInput.length&&(a=v(a,(t=_(this.pendingInput,t)).length-t.length%h)),s=0;s<=t.length-h;s+=h){const r=n.bytes.toBits(t.subarray(s,s+h)),i=this.aesCtrGladman.update(r);a.set(n.bytes.fromBits(i),s+e.length)}return this.pendingInput=t.subarray(s),this.output=_(this.output,a),a}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update(n.bytes.toBits(this.pendingInput));t=n.bytes.fromBits(e),this.output=_(this.output,t)}const e=await A.sign(o,this.keys.authentication,this.output.subarray(f[this.strength]+2));this.output=null;const s=new Uint8Array(e).subarray(0,b);return{data:_(t,s),signature:s}}}async function C(t,e,s){const r=(new TextEncoder).encode(e),i=await A.importKey("raw",r,p,!1,y),a=await A.deriveBits(Object.assign({salt:s},d),i,8*(2*w[t.strength]+2)),h=new Uint8Array(a);t.keys={key:n.bytes.toBits(h.subarray(0,w[t.strength])),authentication:await A.importKey("raw",h.subarray(w[t.strength],2*w[t.strength]),u,!1,g),passwordVerification:h.subarray(2*w[t.strength])}}function _(t,e){let s=t;return t.length+e.length&&(s=new Uint8Array(t.length+e.length),s.set(t,0),s.set(e,t.length)),s}function v(t,e){if(e&&e>t.length){const s=t;(t=new Uint8Array(e)).set(s,0)}return t}const I=12;class D{constructor(t,e){this.password=t,this.passwordVerification=e,G(this,t)}async append(t){if(this.password){const e=z(this,t.subarray(0,I));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(a);t=t.subarray(I)}return z(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class B{constructor(t,e){this.passwordVerification=e,this.password=t,G(this,t)}async append(t){let e,s;if(this.password){this.password=null;const n=crypto.getRandomValues(new Uint8Array(I));n[11]=this.passwordVerification,e=new Uint8Array(t.length+n.length),e.set(V(this,n),0),s=I}else e=new Uint8Array(t.length),s=0;return e.set(V(this,t),s),e}async flush(){return{data:new Uint8Array(0)}}}function z(t,e){const s=new Uint8Array(e.length);for(let n=0;n<e.length;n++)s[n]=M(t)^e[n],K(t,s[n]);return s}function V(t,e){const s=new Uint8Array(e.length);for(let n=0;n<e.length;n++)s[n]=M(t)^e[n],K(t,e[n]);return s}function G(t,s){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<s.length;e++)K(t,s.charCodeAt(e))}function K(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=W(t.keys[1]+E(t.keys[0])),t.keys[1]=W(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function M(t){const e=2|t.keys[2];return E(Math.imul(e,1^e)>>>8)}function E(t){return 255&t}function W(t){return 4294967295&t}const j="deflate",O="inflate",P="Invalid signature";class T{constructor(t,s){this.signature=s.signature,this.encrypted=Boolean(s.password),this.signed=s.signed,this.compressed=s.compressed,this.inflate=s.compressed&&new t,this.crc32=s.signed&&new e,this.zipCrypto=s.zipCrypto,this.decrypt=this.encrypted&&s.zipCrypto?new D(s.password,s.passwordVerification):new U(s.password,s.signed,s.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(P);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(P)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class L{constructor(t,s){this.encrypted=s.encrypted,this.signed=s.signed,this.compressed=s.compressed,this.deflate=s.compressed&&new t({level:s.level||5}),this.crc32=s.signed&&new e,this.zipCrypto=s.zipCrypto,this.encrypt=this.encrypted&&s.zipCrypto?new B(s.password,s.passwordVerification):new k(s.password,s.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const s=await this.encrypt.flush();t=s.signature;const n=new Uint8Array(e.length+s.data.length);n.set(e,0),n.set(s.data,e.length),e=n}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const R={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let s;self.initCodec&&self.initCodec(),e.codecType.startsWith(j)?s=self.Deflate:e.codecType.startsWith(O)&&(s=self.Inflate),S=function(t,e){return e.codecType.startsWith(j)?new L(t,e):e.codecType.startsWith(O)?new T(t,e):void 0}(s,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;addEventListener("message",(async t=>{const e=t.data,s=e.type,n=R[s];if(n)try{e.data&&(e.data=new Uint8Array(e.data));const t=await n(e)||{};if(t.type=s,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:s,error:{message:t.message,stack:t.stack}})}}));function H(t,e,s){return class{constructor(n){this.codec=new t(Object.assign({},e,n)),s(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},s)=>({Deflate:H(t.Deflate,e.deflate,s),Inflate:H(t.Inflate,e.inflate,s)}))(fflate,void 0,((t,e)=>t.ondata=e));self.Deflate=t,self.Inflate=e}}(); | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;s<r;s++)n=n>>>8^t[255&(n^e[s])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const s=t[t.length-1],r=n.getPartial(s);return 32===r?t.concat(e):n._shiftRight(e,r,0|s,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const s=t[e-1];return 32*(e-1)+n.getPartial(s)},clamp(t,e){if(32*t.length<e)return t;const s=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,s>0&&e&&(t[s-1]=n.partial(e,t[s-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,s,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(s),s=0;if(0===e)return r.concat(t);for(let n=0;n<t.length;n++)r.push(s|t[n]>>>e),s=t[n]<<32-e;const a=t.length?t[t.length-1]:0,i=n.getPartial(a);return r.push(n.partial(e+i&31,e+i>32?s:r.pop(),1)),r}},s={bytes:{fromBits(t){const e=n.bitLength(t)/8,s=new Uint8Array(e);let r;for(let n=0;n<e;n++)0==(3&n)&&(r=t[n/4]),s[n]=r>>>24,r<<=8;return s},toBits(t){const e=[];let s,r=0;for(s=0;s<t.length;s++)r=r<<8|t[s],3==(3&s)&&(e.push(r),r=0);return 3&s&&e.push(n.partial(8*(3&s),r)),e}}},r={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};r.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=s.utf8String.toBits(t));const r=e._buffer=n.concat(e._buffer,t),a=e._length,i=e._length=a+n.bitLength(t);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const c=new Uint32Array(r);let o=0;for(let t=e.blockSize+a-(e.blockSize+a&e.blockSize-1);t<=i;t+=e.blockSize)e._block(c.subarray(16*o,16*(o+1))),o+=1;return r.splice(0,16*o),e},finalize:function(){const t=this;let e=t._buffer;const s=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,s){return t<=19?e&n|~e&s:t<=39?e^n^s:t<=59?e&n|e&s|n&s:t<=79?e^n^s:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){const e=this,n=e._h,s=Array(80);for(let e=0;e<16;e++)s[e]=t[e];let r=n[0],a=n[1],i=n[2],c=n[3],o=n[4];for(let t=0;t<=79;t++){t>=16&&(s[t]=e._S(1,s[t-3]^s[t-8]^s[t-14]^s[t-16]));const n=e._S(5,r)+e._f(t,a,i,c)+o+s[t]+e._key[Math.floor(t/20)]|0;o=c,c=i,i=e._S(30,a),a=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+c|0,n[4]=n[4]+o|0}};const a={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,i,c,o=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[i=t.slice(0),c=[]],a=r;a<4*r+28;a++){let t=i[a-1];(a%r==0||8===r&&a%r==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),i[a]=i[a-r]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];c[t]=a<=4||t<4?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let i,c,o,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let h=i=0;!n[h];h^=c||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[o=r[c=r[h]]];let p=16843009*l^65537*o^257*c^16843008*h,d=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][h]=d=d<<24^d>>>8,e[n][a]=p=p<<24^p>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],i=a[0],c=a[1],o=a[2],l=a[3],h=a[4];let p,d,u,f=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],w=t[e?1:3]^n[3],_=4;for(let t=0;t<s;t++)p=i[f>>>24]^c[g>>16&255]^o[y>>8&255]^l[255&w]^n[_],d=i[g>>>24]^c[y>>16&255]^o[w>>8&255]^l[255&f]^n[_+1],u=i[y>>>24]^c[w>>16&255]^o[f>>8&255]^l[255&g]^n[_+2],w=i[w>>>24]^c[f>>16&255]^o[g>>8&255]^l[255&y]^n[_+3],_+=4,f=p,g=d,y=u;for(let t=0;t<4;t++)r[e?3&-t:t]=h[f>>>24]<<24^h[g>>16&255]<<16^h[y>>8&255]<<8^h[255&w]^n[_++],p=f,f=g,g=y,y=w,w=p;return r}}},i={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,s){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;n<r;n+=4){this.incCounter(s);const r=t.encrypt(s);e[n]^=r[0],e[n+1]^=r[1],e[n+2]^=r[2],e[n+3]^=r[3]}return n.clamp(e,a)}}},c={hmacSha1:class{constructor(t){const e=this,n=e._hash=r.sha1,s=[[],[]],a=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>a&&(t=n.hash(t));for(let e=0;e<a;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}}},o="Invalid pasword",l=16,h={name:"PBKDF2"},p=Object.assign({hash:{name:"HMAC"}},h),d=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},h),u=["deriveBits"],f=[8,12,16],g=[16,24,32],y=10,w=[0,0,0,0],_=crypto.subtle,b=s.bytes,m=a.aes,k=i.ctrGladman,A=c.hmacSha1;class U{constructor(t,e,n){Object.assign(this,{password:t,signed:e,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const n=I(t,0,f[e.strength]+2);await async function(t,e,n){await z(t,n,I(e,0,f[t.strength]));const s=I(e,f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=s[0]||r[1]!=s[1])throw new Error(o)}(e,n,e.password),e.password=null,e.aesCtrGladman=new k(new m(e.keys.key),Array.from(w)),e.hmac=new A(e.keys.authentication),t=I(t,f[e.strength]+2)}return C(e,t,new Uint8Array(t.length-y-(t.length-y)%l),0,y,!0)}async flush(){const t=this,e=t.pendingInput,n=I(e,0,e.length-y),s=I(e,e.length-y);let r=new Uint8Array(0);if(n.length){const e=b.toBits(n);t.hmac.update(e);const s=t.aesCtrGladman.update(e);r=b.fromBits(s)}let a=!0;if(t.signed){const e=I(b.fromBits(t.hmac.digest()),0,y);for(let t=0;t<y;t++)e[t]!=s[t]&&(a=!1)}return{valid:a,data:r}}}class v{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let n=new Uint8Array(0);e.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await z(t,e,n),B(n,t.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new k(new m(e.keys.key),Array.from(w)),e.hmac=new A(e.keys.authentication));const s=new Uint8Array(n.length+t.length-t.length%l);return s.set(n,0),C(e,t,s,n.length,0)}async flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(b.toBits(t.pendingInput));t.hmac.update(n),e=b.fromBits(n)}const n=I(b.fromBits(t.hmac.digest()),0,y);return{data:B(e,n),signature:n}}}function C(t,e,n,s,r,a){const i=e.length-r;let c;for(t.pendingInput.length&&(e=B(t.pendingInput,e),n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,i-i%l)),c=0;c<=i-l;c+=l){const r=b.toBits(I(e,c,c+l));a&&t.hmac.update(r);const i=t.aesCtrGladman.update(r);a||t.hmac.update(i),n.set(b.fromBits(i),c+s)}return t.pendingInput=I(e,c),n}async function z(t,e,n){const s=(new TextEncoder).encode(e),r=await _.importKey("raw",s,p,!1,u),a=await _.deriveBits(Object.assign({salt:n},d),r,8*(2*g[t.strength]+2)),i=new Uint8Array(a);t.keys={key:b.toBits(I(i,0,g[t.strength])),authentication:b.toBits(I(i,g[t.strength],2*g[t.strength])),passwordVerification:I(i,2*g[t.strength])}}function B(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function I(t,e,n){return t.subarray(e,n)}const S=12;class D{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),j(this,t)}async append(t){const e=this;if(e.password){const n=V(e,t.subarray(0,S));if(e.password=null,n[11]!=e.passwordVerification)throw new Error(o);t=t.subarray(S)}return V(e,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class H{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),j(this,t)}async append(t){const e=this;let n,s;if(e.password){e.password=null;const r=crypto.getRandomValues(new Uint8Array(S));r[11]=e.passwordVerification,n=new Uint8Array(t.length+r.length),n.set(M(e,r),0),s=S}else n=new Uint8Array(t.length),s=0;return n.set(M(e,t),s),n}async flush(){return{data:new Uint8Array(0)}}}function V(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=E(t)^e[s],O(t,n[s]);return n}function M(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=E(t)^e[s],O(t,e[s]);return n}function j(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)O(t,n.charCodeAt(e))}function O(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=G(t.keys[1]+K(t.keys[0])),t.keys[1]=G(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return K(Math.imul(e,1^e)>>>8)}function K(t){return 255&t}function G(t){return 4294967295&t}const W="deflate",L="inflate",P="Invalid signature";class T{constructor(t,{signature:n,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:c,encryptionStrength:o}){const l=Boolean(s);Object.assign(this,{signature:n,encrypted:l,signed:r,compressed:a,inflate:a&&new t,crc32:r&&new e,zipCrypto:i,decrypt:l&&i?new D(s,c):new U(s,r,o)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=await t.decrypt.flush();if(!e.valid)throw new Error(P);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.cipher!=n.getUint32(0,!1))throw new Error(P)}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class R{constructor(t,{encrypted:n,signed:s,compressed:r,level:a,zipCrypto:i,password:c,passwordVerification:o,encryptionStrength:l}){Object.assign(this,{encrypted:n,signed:s,compressed:r,deflate:r&&new t({level:a||5}),crc32:s&&new e,zipCrypto:i,encrypt:n&&i?new H(c,o):new v(c,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const s=await t.encrypt.flush();e=s.signature;const r=new Uint8Array(n.length+s.data.length);r.set(n,0),r.set(s.data,n.length),n=r}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const x={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(W)?n=self.Deflate:e.codecType.startsWith(L)&&(n=self.Inflate),F=function(t,e){return e.codecType.startsWith(W)?new R(t,e):e.codecType.startsWith(L)?new T(t,e):void 0}(n,e)},append:async t=>({data:await F.append(t.data)}),flush:()=>F.flush()};let F;addEventListener("message",(async t=>{const e=t.data,n=e.type,s=x[n];if(s)try{e.data&&(e.data=new Uint8Array(e.data));const t=await s(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));function q(t,e,n){return class{constructor(s){const r=this;r.codec=new t(Object.assign({},e,s)),n(r.codec,(t=>{if(r.pendingData){const e=r.pendingData;r.pendingData=new Uint8Array(e.length+t.length),r.pendingData.set(e,0),r.pendingData.set(t,e.length)}else r.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),s(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),s(this)}};function s(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},n)=>({Deflate:q(t.Deflate,e.deflate,n),Inflate:q(t.Inflate,e.inflate,n)}))(fflate,void 0,((t,e)=>t.ondata=e));self.Deflate=t,self.Inflate=e}}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let s=e;for(let t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;t[e]=s}class e{constructor(t){this.crc=t||-1}append(e){let s=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)s=s>>>8^t[255&(s^e[n])];this.crc=s}get(){return~this.crc}}const s={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=s.getPartial(n);return 32===r?t.concat(e):s._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+s.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=s.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,s)=>32===t?e:(s?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let s=0;s<t.length;s++)r.push(n|t[s]>>>e),n=t[s]<<32-e;const i=t.length?t[t.length-1]:0,a=s.getPartial(i);return r.push(s.partial(e+a&31,e+a>32?n:r.pop(),1)),r}},n={bytes:{fromBits(t){const e=s.bitLength(t)/8,n=new Uint8Array(e);let r;for(let s=0;s<e;s++)0==(3&s)&&(r=t[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(s.partial(8*(3&n),r)),e}}},r={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const s=e._tables[0][4],n=e._tables[1],r=t.length;let i,a,h,c=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[a=t.slice(0),h=[]],i=r;i<4*r+28;i++){let t=a[i-1];(i%r==0||8===r&&i%r==4)&&(t=s[t>>>24]<<24^s[t>>16&255]<<16^s[t>>8&255]<<8^s[255&t],i%r==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-r]^t}for(let t=0;i;t++,i--){const e=a[3&t?i:i-4];h[t]=i<=4||t<4?e:n[0][s[e>>>24]]^n[1][s[e>>16&255]]^n[2][s[e>>8&255]]^n[3][s[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],s=t[4],n=e[4],r=[],i=[];let a,h,c,o;for(let t=0;t<256;t++)i[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=a=0;!s[l];l^=h||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,s[l]=i,n[i]=l,o=r[c=r[h=r[l]]];let p=16843009*o^65537*c^257*h^16843008*l,d=257*r[i]^16843008*i;for(let s=0;s<4;s++)t[s][l]=d=d<<24^d>>>8,e[s][i]=p=p<<24^p>>>8}for(let s=0;s<5;s++)t[s]=t[s].slice(0),e[s]=e[s].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const s=this._key[e],n=s.length/4-2,r=[0,0,0,0],i=this._tables[e],a=i[0],h=i[1],c=i[2],o=i[3],l=i[4];let p,d,u,y=t[0]^s[0],g=t[e?3:1]^s[1],f=t[2]^s[2],w=t[e?1:3]^s[3],b=4;for(let t=0;t<n;t++)p=a[y>>>24]^h[g>>16&255]^c[f>>8&255]^o[255&w]^s[b],d=a[g>>>24]^h[f>>16&255]^c[w>>8&255]^o[255&y]^s[b+1],u=a[f>>>24]^h[w>>16&255]^c[y>>8&255]^o[255&g]^s[b+2],w=a[w>>>24]^h[y>>16&255]^c[g>>8&255]^o[255&f]^s[b+3],b+=4,y=p,g=d,f=u;for(let t=0;t<4;t++)r[e?3&-t:t]=l[y>>>24]<<24^l[g>>16&255]<<16^l[f>>8&255]<<8^l[255&w]^s[b++],p=y,y=g,g=f,f=w,w=p;return r}}},i={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,s=t>>8&255,n=255&t;255===e?(e=0,255===s?(s=0,255===n?n=0:++n):++s):++e,t=0,t+=e<<16,t+=s<<8,t+=n}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=s.bitLength(e);for(let s=0;s<r;s+=4){this.incCounter(n);const r=t.encrypt(n);e[s]^=r[0],e[s+1]^=r[1],e[s+2]^=r[2],e[s+3]^=r[3]}return s.clamp(e,i)}}},a="Invalid pasword",h=16,c={name:"PBKDF2"},o={name:"HMAC"},l="SHA-1",p=Object.assign({hash:o},c),d=Object.assign({iterations:1e3,hash:{name:l}},c),u=Object.assign({hash:l},o),y=["deriveBits"],g=["sign"],f=[8,12,16],w=[16,24,32],b=10,m=[0,0,0,0],A=crypto.subtle;class U{constructor(t,e,s){this.password=t,this.signed=e,this.strength=s-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,f[this.strength]+2);await async function(t,e,s){await C(t,s,e.subarray(0,f[t.strength]));const n=e.subarray(f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=n[0]||r[1]!=n[1])throw new Error(a)}(this,e,this.password),this.password=null,this.aesCtrGladman=new i.ctrGladman(new r.aes(this.keys.key),Array.from(m)),t=t.subarray(f[this.strength]+2)}let e,s=new Uint8Array(t.length-b-(t.length-b)%h),c=t;for(this.pendingInput.length&&(c=_(this.pendingInput,t),s=v(s,c.length-b-(c.length-b)%h)),e=0;e<=c.length-b-h;e+=h){const t=c.subarray(e,e+h),r=n.bytes.toBits(t),i=this.aesCtrGladman.update(r);s.set(n.bytes.fromBits(i),e)}return this.pendingInput=c.subarray(e),this.signed&&(this.input=_(this.input,t)),s}async flush(){const t=this.pendingInput,e=this.keys,s=t.subarray(0,t.length-b),r=t.subarray(t.length-b);let i=new Uint8Array(0);if(s.length){const t=this.aesCtrGladman.update(n.bytes.toBits(s));i=n.bytes.fromBits(t)}let a=!0;if(this.signed){const t=await A.sign(o,e.authentication,this.input.subarray(0,this.input.length-b)),s=new Uint8Array(t).subarray(0,b);this.input=null;for(let t=0;t<b;t++)s[t]!=r[t]&&(a=!1)}return{valid:a,data:i}}}class k{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const s=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await C(t,e,s),_(s,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new i.ctrGladman(new r.aes(this.keys.key),Array.from(m)));let s,a=new Uint8Array(e.length+t.length-t.length%h);for(a.set(e,0),this.pendingInput.length&&(a=v(a,(t=_(this.pendingInput,t)).length-t.length%h)),s=0;s<=t.length-h;s+=h){const r=n.bytes.toBits(t.subarray(s,s+h)),i=this.aesCtrGladman.update(r);a.set(n.bytes.fromBits(i),s+e.length)}return this.pendingInput=t.subarray(s),this.output=_(this.output,a),a}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update(n.bytes.toBits(this.pendingInput));t=n.bytes.fromBits(e),this.output=_(this.output,t)}const e=await A.sign(o,this.keys.authentication,this.output.subarray(f[this.strength]+2));this.output=null;const s=new Uint8Array(e).subarray(0,b);return{data:_(t,s),signature:s}}}async function C(t,e,s){const r=(new TextEncoder).encode(e),i=await A.importKey("raw",r,p,!1,y),a=await A.deriveBits(Object.assign({salt:s},d),i,8*(2*w[t.strength]+2)),h=new Uint8Array(a);t.keys={key:n.bytes.toBits(h.subarray(0,w[t.strength])),authentication:await A.importKey("raw",h.subarray(w[t.strength],2*w[t.strength]),u,!1,g),passwordVerification:h.subarray(2*w[t.strength])}}function _(t,e){let s=t;return t.length+e.length&&(s=new Uint8Array(t.length+e.length),s.set(t,0),s.set(e,t.length)),s}function v(t,e){if(e&&e>t.length){const s=t;(t=new Uint8Array(e)).set(s,0)}return t}const I=12;class D{constructor(t,e){this.password=t,this.passwordVerification=e,G(this,t)}async append(t){if(this.password){const e=z(this,t.subarray(0,I));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(a);t=t.subarray(I)}return z(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class B{constructor(t,e){this.passwordVerification=e,this.password=t,G(this,t)}async append(t){let e,s;if(this.password){this.password=null;const n=crypto.getRandomValues(new Uint8Array(I));n[11]=this.passwordVerification,e=new Uint8Array(t.length+n.length),e.set(V(this,n),0),s=I}else e=new Uint8Array(t.length),s=0;return e.set(V(this,t),s),e}async flush(){return{data:new Uint8Array(0)}}}function z(t,e){const s=new Uint8Array(e.length);for(let n=0;n<e.length;n++)s[n]=M(t)^e[n],K(t,s[n]);return s}function V(t,e){const s=new Uint8Array(e.length);for(let n=0;n<e.length;n++)s[n]=M(t)^e[n],K(t,e[n]);return s}function G(t,s){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<s.length;e++)K(t,s.charCodeAt(e))}function K(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=W(t.keys[1]+E(t.keys[0])),t.keys[1]=W(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function M(t){const e=2|t.keys[2];return E(Math.imul(e,1^e)>>>8)}function E(t){return 255&t}function W(t){return 4294967295&t}const j="deflate",O="inflate",P="Invalid signature";class T{constructor(t,s){this.signature=s.signature,this.encrypted=Boolean(s.password),this.signed=s.signed,this.compressed=s.compressed,this.inflate=s.compressed&&new t,this.crc32=s.signed&&new e,this.zipCrypto=s.zipCrypto,this.decrypt=this.encrypted&&s.zipCrypto?new D(s.password,s.passwordVerification):new U(s.password,s.signed,s.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(P);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(P)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class L{constructor(t,s){this.encrypted=s.encrypted,this.signed=s.signed,this.compressed=s.compressed,this.deflate=s.compressed&&new t({level:s.level||5}),this.crc32=s.signed&&new e,this.zipCrypto=s.zipCrypto,this.encrypt=this.encrypted&&s.zipCrypto?new B(s.password,s.passwordVerification):new k(s.password,s.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const s=await this.encrypt.flush();t=s.signature;const n=new Uint8Array(e.length+s.data.length);n.set(e,0),n.set(s.data,e.length),e=n}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const R={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let s;self.initCodec&&self.initCodec(),e.codecType.startsWith(j)?s=self.Deflate:e.codecType.startsWith(O)&&(s=self.Inflate),S=function(t,e){return e.codecType.startsWith(j)?new L(t,e):e.codecType.startsWith(O)?new T(t,e):void 0}(s,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;addEventListener("message",(async t=>{const e=t.data,s=e.type,n=R[s];if(n)try{e.data&&(e.data=new Uint8Array(e.data));const t=await n(e)||{};if(t.type=s,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:s,error:{message:t.message,stack:t.stack}})}}));function H(t,e,s){return class{constructor(n){this.codec=new t(Object.assign({},e,n)),s(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},s)=>({Deflate:H(t.Deflate,e.deflate,s),Inflate:H(t.Inflate,e.inflate,s)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((t,e)=>t.onData=e));self.Deflate=t,self.Inflate=e}}(); | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;s<r;s++)n=n>>>8^t[255&(n^e[s])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const s=t[t.length-1],r=n.getPartial(s);return 32===r?t.concat(e):n._shiftRight(e,r,0|s,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const s=t[e-1];return 32*(e-1)+n.getPartial(s)},clamp(t,e){if(32*t.length<e)return t;const s=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,s>0&&e&&(t[s-1]=n.partial(e,t[s-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,s,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(s),s=0;if(0===e)return r.concat(t);for(let n=0;n<t.length;n++)r.push(s|t[n]>>>e),s=t[n]<<32-e;const a=t.length?t[t.length-1]:0,i=n.getPartial(a);return r.push(n.partial(e+i&31,e+i>32?s:r.pop(),1)),r}},s={bytes:{fromBits(t){const e=n.bitLength(t)/8,s=new Uint8Array(e);let r;for(let n=0;n<e;n++)0==(3&n)&&(r=t[n/4]),s[n]=r>>>24,r<<=8;return s},toBits(t){const e=[];let s,r=0;for(s=0;s<t.length;s++)r=r<<8|t[s],3==(3&s)&&(e.push(r),r=0);return 3&s&&e.push(n.partial(8*(3&s),r)),e}}},r={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};r.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=s.utf8String.toBits(t));const r=e._buffer=n.concat(e._buffer,t),a=e._length,i=e._length=a+n.bitLength(t);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const c=new Uint32Array(r);let o=0;for(let t=e.blockSize+a-(e.blockSize+a&e.blockSize-1);t<=i;t+=e.blockSize)e._block(c.subarray(16*o,16*(o+1))),o+=1;return r.splice(0,16*o),e},finalize:function(){const t=this;let e=t._buffer;const s=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,s){return t<=19?e&n|~e&s:t<=39?e^n^s:t<=59?e&n|e&s|n&s:t<=79?e^n^s:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){const e=this,n=e._h,s=Array(80);for(let e=0;e<16;e++)s[e]=t[e];let r=n[0],a=n[1],i=n[2],c=n[3],o=n[4];for(let t=0;t<=79;t++){t>=16&&(s[t]=e._S(1,s[t-3]^s[t-8]^s[t-14]^s[t-16]));const n=e._S(5,r)+e._f(t,a,i,c)+o+s[t]+e._key[Math.floor(t/20)]|0;o=c,c=i,i=e._S(30,a),a=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+c|0,n[4]=n[4]+o|0}};const a={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,i,c,o=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[i=t.slice(0),c=[]],a=r;a<4*r+28;a++){let t=i[a-1];(a%r==0||8===r&&a%r==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),i[a]=i[a-r]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];c[t]=a<=4||t<4?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let i,c,o,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let h=i=0;!n[h];h^=c||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[o=r[c=r[h]]];let p=16843009*l^65537*o^257*c^16843008*h,d=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][h]=d=d<<24^d>>>8,e[n][a]=p=p<<24^p>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],i=a[0],c=a[1],o=a[2],l=a[3],h=a[4];let p,d,u,f=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],w=t[e?1:3]^n[3],_=4;for(let t=0;t<s;t++)p=i[f>>>24]^c[g>>16&255]^o[y>>8&255]^l[255&w]^n[_],d=i[g>>>24]^c[y>>16&255]^o[w>>8&255]^l[255&f]^n[_+1],u=i[y>>>24]^c[w>>16&255]^o[f>>8&255]^l[255&g]^n[_+2],w=i[w>>>24]^c[f>>16&255]^o[g>>8&255]^l[255&y]^n[_+3],_+=4,f=p,g=d,y=u;for(let t=0;t<4;t++)r[e?3&-t:t]=h[f>>>24]<<24^h[g>>16&255]<<16^h[y>>8&255]<<8^h[255&w]^n[_++],p=f,f=g,g=y,y=w,w=p;return r}}},i={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,s){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;n<r;n+=4){this.incCounter(s);const r=t.encrypt(s);e[n]^=r[0],e[n+1]^=r[1],e[n+2]^=r[2],e[n+3]^=r[3]}return n.clamp(e,a)}}},c={hmacSha1:class{constructor(t){const e=this,n=e._hash=r.sha1,s=[[],[]],a=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>a&&(t=n.hash(t));for(let e=0;e<a;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}}},o="Invalid pasword",l=16,h={name:"PBKDF2"},p=Object.assign({hash:{name:"HMAC"}},h),d=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},h),u=["deriveBits"],f=[8,12,16],g=[16,24,32],y=10,w=[0,0,0,0],_=crypto.subtle,b=s.bytes,m=a.aes,k=i.ctrGladman,A=c.hmacSha1;class U{constructor(t,e,n){Object.assign(this,{password:t,signed:e,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const n=D(t,0,f[e.strength]+2);await async function(t,e,n){await z(t,n,D(e,0,f[t.strength]));const s=D(e,f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=s[0]||r[1]!=s[1])throw new Error(o)}(e,n,e.password),e.password=null,e.aesCtrGladman=new k(new m(e.keys.key),Array.from(w)),e.hmac=new A(e.keys.authentication),t=D(t,f[e.strength]+2)}return C(e,t,new Uint8Array(t.length-y-(t.length-y)%l),0,y,!0)}async flush(){const t=this,e=t.pendingInput,n=D(e,0,e.length-y),s=D(e,e.length-y);let r=new Uint8Array(0);if(n.length){const e=b.toBits(n);t.hmac.update(e);const s=t.aesCtrGladman.update(e);r=b.fromBits(s)}let a=!0;if(t.signed){const e=D(b.fromBits(t.hmac.digest()),0,y);for(let t=0;t<y;t++)e[t]!=s[t]&&(a=!1)}return{valid:a,data:r}}}class v{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let n=new Uint8Array(0);e.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await z(t,e,n),B(n,t.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new k(new m(e.keys.key),Array.from(w)),e.hmac=new A(e.keys.authentication));const s=new Uint8Array(n.length+t.length-t.length%l);return s.set(n,0),C(e,t,s,n.length,0)}async flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(b.toBits(t.pendingInput));t.hmac.update(n),e=b.fromBits(n)}const n=D(b.fromBits(t.hmac.digest()),0,y);return{data:B(e,n),signature:n}}}function C(t,e,n,s,r,a){const i=e.length-r;let c;for(t.pendingInput.length&&(e=B(t.pendingInput,e),n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,i-i%l)),c=0;c<=i-l;c+=l){const r=b.toBits(D(e,c,c+l));a&&t.hmac.update(r);const i=t.aesCtrGladman.update(r);a||t.hmac.update(i),n.set(b.fromBits(i),c+s)}return t.pendingInput=D(e,c),n}async function z(t,e,n){const s=(new TextEncoder).encode(e),r=await _.importKey("raw",s,p,!1,u),a=await _.deriveBits(Object.assign({salt:n},d),r,8*(2*g[t.strength]+2)),i=new Uint8Array(a);t.keys={key:b.toBits(D(i,0,g[t.strength])),authentication:b.toBits(D(i,g[t.strength],2*g[t.strength])),passwordVerification:D(i,2*g[t.strength])}}function B(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function D(t,e,n){return t.subarray(e,n)}const I=12;class S{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),j(this,t)}async append(t){const e=this;if(e.password){const n=V(e,t.subarray(0,I));if(e.password=null,n[11]!=e.passwordVerification)throw new Error(o);t=t.subarray(I)}return V(e,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class H{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),j(this,t)}async append(t){const e=this;let n,s;if(e.password){e.password=null;const r=crypto.getRandomValues(new Uint8Array(I));r[11]=e.passwordVerification,n=new Uint8Array(t.length+r.length),n.set(M(e,r),0),s=I}else n=new Uint8Array(t.length),s=0;return n.set(M(e,t),s),n}async flush(){return{data:new Uint8Array(0)}}}function V(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=E(t)^e[s],O(t,n[s]);return n}function M(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=E(t)^e[s],O(t,e[s]);return n}function j(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)O(t,n.charCodeAt(e))}function O(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=G(t.keys[1]+K(t.keys[0])),t.keys[1]=G(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return K(Math.imul(e,1^e)>>>8)}function K(t){return 255&t}function G(t){return 4294967295&t}const W="deflate",L="inflate",P="Invalid signature";class T{constructor(t,{signature:n,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:c,encryptionStrength:o}){const l=Boolean(s);Object.assign(this,{signature:n,encrypted:l,signed:r,compressed:a,inflate:a&&new t,crc32:r&&new e,zipCrypto:i,decrypt:l&&i?new S(s,c):new U(s,r,o)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=await t.decrypt.flush();if(!e.valid)throw new Error(P);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.cipher!=n.getUint32(0,!1))throw new Error(P)}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class R{constructor(t,{encrypted:n,signed:s,compressed:r,level:a,zipCrypto:i,password:c,passwordVerification:o,encryptionStrength:l}){Object.assign(this,{encrypted:n,signed:s,compressed:r,deflate:r&&new t({level:a||5}),crc32:s&&new e,zipCrypto:i,encrypt:n&&i?new H(c,o):new v(c,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const s=await t.encrypt.flush();e=s.signature;const r=new Uint8Array(n.length+s.data.length);r.set(n,0),r.set(s.data,n.length),n=r}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const x={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(W)?n=self.Deflate:e.codecType.startsWith(L)&&(n=self.Inflate),F=function(t,e){return e.codecType.startsWith(W)?new R(t,e):e.codecType.startsWith(L)?new T(t,e):void 0}(n,e)},append:async t=>({data:await F.append(t.data)}),flush:()=>F.flush()};let F;addEventListener("message",(async t=>{const e=t.data,n=e.type,s=x[n];if(s)try{e.data&&(e.data=new Uint8Array(e.data));const t=await s(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));function q(t,e,n){return class{constructor(s){const r=this;r.codec=new t(Object.assign({},e,s)),n(r.codec,(t=>{if(r.pendingData){const e=r.pendingData;r.pendingData=new Uint8Array(e.length+t.length),r.pendingData.set(e,0),r.pendingData.set(t,e.length)}else r.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),s(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),s(this)}};function s(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},n)=>({Deflate:q(t.Deflate,e.deflate,n),Inflate:q(t.Inflate,e.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((t,e)=>t.onData=e));self.Deflate=t,self.Inflate=e}}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i<a;i++)n=n>>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length<e)return t;const i=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,i>0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n<t.length;n++)a.push(i|t[n]>>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n<e;n++)0==(3&n)&&(a=t[n/4]),i[n]=a>>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i<t.length;i++)a=a<<8|t[i],3==(3&i)&&(e.push(a),a=0);return 3&i&&e.push(n.partial(8*(3&i),a)),e}}},a={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],a=t.length;let r,s,l,o=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),l=[]],r=a;r<4*a+28;r++){let t=s[r-1];(r%a==0||8===a&&r%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,_;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[o=a[l=a[d]]];let u=16843009*_^65537*o^257*l^16843008*d,c=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][d]=c=c<<24^c>>>8,e[n][r]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],_=r[3],d=r[4];let u,c,f,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t<i;t++)u=s[h>>>24]^l[b>>16&255]^o[p>>8&255]^_[255&w]^n[x],c=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^_[255&h]^n[x+1],f=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^_[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^_[255&p]^n[x+3],x+=4,h=u,b=c,p=f;for(let t=0;t<4;t++)a[e?3&-t:t]=d[h>>>24]<<24^d[b>>16&255]<<16^d[p>>8&255]<<8^d[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}}},r={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let a;if(!(a=e.length))return[];const r=n.bitLength(e);for(let n=0;n<a;n+=4){this.incCounter(i);const a=t.encrypt(i);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return n.clamp(e,r)}}},s="Invalid pasword",l=16,o={name:"PBKDF2"},_={name:"HMAC"},d="SHA-1",u=Object.assign({hash:_},o),c=Object.assign({iterations:1e3,hash:{name:d}},o),f=Object.assign({hash:d},_),h=["deriveBits"],b=["sign"],p=[8,12,16],w=[16,24,32],x=10,y=[0,0,0,0],g=crypto.subtle;class m{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,p[this.strength]+2);await async function(t,e,n){await k(t,n,e.subarray(0,p[t.strength]));const i=e.subarray(p[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error(s)}(this,e,this.password),this.password=null,this.aesCtrGladman=new r.ctrGladman(new a.aes(this.keys.key),Array.from(y)),t=t.subarray(p[this.strength]+2)}let e,n=new Uint8Array(t.length-x-(t.length-x)%l),o=t;for(this.pendingInput.length&&(o=A(this.pendingInput,t),n=U(n,o.length-x-(o.length-x)%l)),e=0;e<=o.length-x-l;e+=l){const t=o.subarray(e,e+l),a=i.bytes.toBits(t),r=this.aesCtrGladman.update(a);n.set(i.bytes.fromBits(r),e)}return this.pendingInput=o.subarray(e),this.signed&&(this.input=A(this.input,t)),n}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-x),a=t.subarray(t.length-x);let r=new Uint8Array(0);if(n.length){const t=this.aesCtrGladman.update(i.bytes.toBits(n));r=i.bytes.fromBits(t)}let s=!0;if(this.signed){const t=await g.sign(_,e.authentication,this.input.subarray(0,this.input.length-x)),n=new Uint8Array(t).subarray(0,x);this.input=null;for(let t=0;t<x;t++)n[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class v{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(p[t.strength]));return await k(t,e,n),A(n,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new r.ctrGladman(new a.aes(this.keys.key),Array.from(y)));let n,s=new Uint8Array(e.length+t.length-t.length%l);for(s.set(e,0),this.pendingInput.length&&(s=U(s,(t=A(this.pendingInput,t)).length-t.length%l)),n=0;n<=t.length-l;n+=l){const a=i.bytes.toBits(t.subarray(n,n+l)),r=this.aesCtrGladman.update(a);s.set(i.bytes.fromBits(r),n+e.length)}return this.pendingInput=t.subarray(n),this.output=A(this.output,s),s}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update(i.bytes.toBits(this.pendingInput));t=i.bytes.fromBits(e),this.output=A(this.output,t)}const e=await g.sign(_,this.keys.authentication,this.output.subarray(p[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,x);return{data:A(t,n),signature:n}}}async function k(t,e,n){const a=(new TextEncoder).encode(e),r=await g.importKey("raw",a,u,!1,h),s=await g.deriveBits(Object.assign({salt:n},c),r,8*(2*w[t.strength]+2)),l=new Uint8Array(s);t.keys={key:i.bytes.toBits(l.subarray(0,w[t.strength])),authentication:await g.importKey("raw",l.subarray(w[t.strength],2*w[t.strength]),f,!1,b),passwordVerification:l.subarray(2*w[t.strength])}}function A(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function U(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const I=12;class E{constructor(t,e){this.password=t,this.passwordVerification=e,M(this,t)}async append(t){if(this.password){const e=z(this,t.subarray(0,I));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(s);t=t.subarray(I)}return z(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class C{constructor(t,e){this.passwordVerification=e,this.password=t,M(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(I));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(B(this,i),0),n=I}else e=new Uint8Array(t.length),n=0;return e.set(B(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function z(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=V(t)^e[i],S(t,n[i]);return n}function B(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=V(t)^e[i],S(t,e[i]);return n}function M(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)S(t,n.charCodeAt(e))}function S(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=G(t.keys[1]+D(t.keys[0])),t.keys[1]=G(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function V(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function G(t){return 4294967295&t}const K="deflate",P="inflate",W="Invalid signature";class T{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new E(n.password,n.passwordVerification):new m(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(W);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(W)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new C(n.password,n.passwordVerification):new v(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const q={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(K)?n=self.Deflate:e.codecType.startsWith(P)&&(n=self.Inflate),L=function(t,e){return e.codecType.startsWith(K)?new j(t,e):e.codecType.startsWith(P)?new T(t,e):void 0}(n,e)},append:async t=>({data:await L.append(t.data)}),flush:()=>L.flush()};let L;addEventListener("message",(async t=>{const e=t.data,n=e.type,i=q[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const O=256,R=256,H=-2,F=-5;function J(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const N=[0,1,2,3].concat(...J([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Q(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)o=n.heap[++n.heap_len]=_<2?++_:0,i[2*o]=1,n.depth[o]=0,n.opt_len--,a&&(n.static_len-=a[2*o+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,_,d,u,c,f=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,f++),n[2*o+1]=d,o>t.max_code||(e.bl_count[d]++,u=0,o>=r&&(u=a[o-r]),c=n[2*o],e.opt_len+=c*(d+u),i&&(e.static_len+=c*(i[2*o+1]+u)));if(0!==f){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(o=e.bl_count[d];0!==o;)_=e.heap[--l],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l))}(i,t.max_code,n.bl_count)}}function X(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}Q._length_code=[0,1,2,3,4,5,6,7].concat(...J([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Q.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Q.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Q.d_code=function(t){return t<256?N[t]:N[256+(t>>>7)]},Q.extra_lbits=[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],Q.extra_dbits=[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],Q.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],X.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],X.static_l_desc=new X(X.static_ltree,Q.extra_lbits,257,286,15),X.static_d_desc=new X(X.static_dtree,Q.extra_dbits,0,30,15),X.static_bl_desc=new X(null,Q.extra_blbits,0,19,7);function Y(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}const Z=[new Y(0,0,0,0,0),new Y(4,4,8,4,1),new Y(4,5,16,8,1),new Y(4,6,32,32,1),new Y(4,4,16,16,2),new Y(8,16,32,32,2),new Y(8,16,128,128,2),new Y(8,32,128,256,2),new Y(32,128,258,1024,2),new Y(32,258,258,4096,2)],$=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],tt=113,et=666,nt=258,it=262;function at(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function rt(){const t=this;let e,n,i,a,r,s,l,o,_,d,u,c,f,h,b,p,w,x,y,g,m,v,k,A,U,I,E,C,z,B,M,S,V;const D=new Q,G=new Q,K=new Q;let P,W,T,j,q,L,J,N;function Y(){let e;for(e=0;e<286;e++)M[2*e]=0;for(e=0;e<30;e++)S[2*e]=0;for(e=0;e<19;e++)V[2*e]=0;M[512]=1,t.opt_len=t.static_len=0,T=q=0}function rt(t,e){let n,i=-1,a=t[1],r=0,s=7,l=4;0===a&&(s=138,l=3),t[2*(e+1)+1]=65535;for(let o=0;o<=e;o++)n=a,a=t[2*(o+1)+1],++r<s&&n==a||(r<l?V[2*n]+=r:0!==n?(n!=i&&V[2*n]++,V[32]++):r<=10?V[34]++:V[36]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function st(e){t.pending_buf[t.pending++]=e}function lt(t){st(255&t),st(t>>>8&255)}function ot(t,e){let n;const i=e;N>16-i?(n=t,J|=n<<N&65535,lt(J),J=n>>>16-N,N+=i-16):(J|=t<<N&65535,N+=i)}function _t(t,e){const n=2*t;ot(65535&e[n],65535&e[n+1])}function dt(t,e){let n,i,a=-1,r=t[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<l&&i==r)){if(s<o)do{_t(i,V)}while(0!=--s);else 0!==i?(i!=a&&(_t(i,V),s--),_t(16,V),ot(s-3,2)):s<=10?(_t(17,V),ot(s-3,3)):(_t(18,V),ot(s-11,7));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function ut(){16==N?(lt(J),J=0,N=0):N>=8&&(st(255&J),J>>>=8,N-=8)}function ct(e,n){let i,a,r;if(t.pending_buf[j+2*T]=e>>>8&255,t.pending_buf[j+2*T+1]=255&e,t.pending_buf[P+T]=255&n,T++,0===e?M[2*n]++:(q++,e--,M[2*(Q._length_code[n]+O+1)]++,S[2*Q.d_code(e)]++),0==(8191&T)&&E>2){for(i=8*T,a=m-w,r=0;r<30;r++)i+=S[2*r]*(5+Q.extra_dbits[r]);if(i>>>=3,q<Math.floor(T/2)&&i<Math.floor(a/2))return!0}return T==W-1}function ft(e,n){let i,a,r,s,l=0;if(0!==T)do{i=t.pending_buf[j+2*l]<<8&65280|255&t.pending_buf[j+2*l+1],a=255&t.pending_buf[P+l],l++,0===i?_t(a,e):(r=Q._length_code[a],_t(r+O+1,e),s=Q.extra_lbits[r],0!==s&&(a-=Q.base_length[r],ot(a,s)),i--,r=Q.d_code(i),_t(r,n),s=Q.extra_dbits[r],0!==s&&(i-=Q.base_dist[r],ot(i,s)))}while(l<T);_t(R,e),L=e[513]}function ht(){N>8?lt(J):N>0&&st(255&J),J=0,N=0}function bt(e,n,i){ot(0+(i?1:0),3),function(e,n,i){ht(),L=8,i&&(lt(n),lt(~n)),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),G.build_tree(t),s=function(){let e;for(rt(M,D.max_code),rt(S,G.max_code),K.build_tree(t),e=18;e>=3&&0===V[2*Q.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?bt(e,n,i):r==a?(ot(2+(i?1:0),3),ft(X.static_ltree,X.static_dtree)):(ot(4+(i?1:0),3),function(t,e,n){let i;for(ot(t-257,5),ot(e-1,5),ot(n-4,4),i=0;i<n;i++)ot(V[2*Q.bl_order[i]+1],3);dt(M,t-1),dt(S,e-1)}(D.max_code+1,G.max_code+1,s+1),ft(M,S)),Y(),i&&ht()}function wt(t){pt(w>=0?w:-1,m-w,t),w=m,e.flush_pending()}function xt(){let t,n,i,a;do{if(a=_-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-it){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=f,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(c=255&o[m],c=(c<<p^255&o[m+1])&b)}while(k<it&&0!==e.avail_in)}function yt(t){let e,n,i=U,a=m,s=A;const _=m>r-it?m-(r-it):0;let u=B;const c=l,f=m+nt;let h=o[a+s-1],b=o[a+s];A>=z&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&a<f);if(n=nt-(f-a),a=f-nt,n>s){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s]}}}while((t=65535&d[t&c])>_&&0!=--i);return s<=k?s:k}function gt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=tt,a=0,D.dyn_tree=M,D.stat_desc=X.static_l_desc,G.dyn_tree=S,G.stat_desc=X.static_d_desc,K.dyn_tree=V,K.stat_desc=X.static_bl_desc,J=0,N=0,L=8,Y(),function(){_=2*r,u[f-1]=0;for(let t=0;t<f-1;t++)u[t]=0;I=Z[E].max_lazy,z=Z[E].good_length,B=Z[E].nice_length,U=Z[E].max_chain,m=0,w=0,k=0,x=A=2,g=0,c=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],M=[],S=[],V=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&at(e,i[r+1],i[r],t.depth)&&r++,!at(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,c,w){return _||(_=8),c||(c=8),w||(w=0),e.msg=null,-1==n&&(n=6),c<1||c>9||8!=_||a<9||a>15||n<0||n>9||w<0||w>2?H:(e.dstate=t,s=a,r=1<<s,l=r-1,h=c+7,f=1<<h,b=f-1,p=Math.floor((h+3-1)/3),o=new Uint8Array(2*r),d=[],u=[],W=1<<c+6,t.pending_buf=new Uint8Array(4*W),i=4*W,j=Math.floor(W/2),P=3*W,E=n,C=w,gt(e))},t.deflateEnd=function(){return 42!=n&&n!=tt&&n!=et?H:(t.pending_buf=null,u=null,d=null,o=null,t.dstate=null,n==tt?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?H:(Z[E].func!=Z[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=Z[E].max_lazy,z=Z[E].good_length,B=Z[E].nice_length,U=Z[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return H;if(s<3)return 0;for(s>r-it&&(s=r-it,_=i-s),o.set(e.subarray(_,_+s),0),m=s,w=s,c=255&o[0],c=(c<<p^255&o[1])&b,a=0;a<=s-3;a++)c=(c<<p^255&o[a+2])&b,d[a&l]=u[c],u[c]=a;return 0},t.deflate=function(_,h){let U,z,B,M,S;if(h>4||h<0)return H;if(!_.next_out||!_.next_in&&0!==_.avail_in||n==et&&4!=h)return _.msg=$[4],H;if(0===_.avail_out)return _.msg=$[7],F;var V;if(e=_,M=a,a=h,42==n&&(z=8+(s-8<<4)<<8,B=(E-1&255)>>1,B>3&&(B=3),z|=B<<6,0!==m&&(z|=32),z+=31-z%31,n=tt,st((V=z)>>8&255),st(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=M&&4!=h)return e.msg=$[7],F;if(n==et&&0!==e.avail_in)return _.msg=$[7],F;if(0!==e.avail_in||0!==k||0!=h&&n!=et){switch(S=-1,Z[E].func){case 0:S=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(xt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,wt(!1),0===e.avail_out))return 0;if(m-w>=r-it&&(wt(!1),0===e.avail_out))return 0}return wt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<it){if(xt(),k<it&&0==t)return 0;if(0===k)break}if(k>=3&&(c=(c<<p^255&o[m+2])&b,i=65535&u[c],d[m&l]=u[c],u[c]=m),0!==i&&(m-i&65535)<=r-it&&2!=C&&(x=yt(i)),x>=3)if(n=ct(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,c=(c<<p^255&o[m+2])&b,i=65535&u[c],d[m&l]=u[c],u[c]=m}while(0!=--x);m++}else m+=x,x=0,c=255&o[m],c=(c<<p^255&o[m+1])&b;else n=ct(0,255&o[m]),k--,m++;if(n&&(wt(!1),0===e.avail_out))return 0}return wt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:S=function(t){let n,i,a=0;for(;;){if(k<it){if(xt(),k<it&&0==t)return 0;if(0===k)break}if(k>=3&&(c=(c<<p^255&o[m+2])&b,a=65535&u[c],d[m&l]=u[c],u[c]=m),A=x,y=v,x=2,0!==a&&A<I&&(m-a&65535)<=r-it&&(2!=C&&(x=yt(a)),x<=5&&(1==C||3==x&&m-v>4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=ct(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(c=(c<<p^255&o[m+2])&b,a=65535&u[c],d[m&l]=u[c],u[c]=m)}while(0!=--A);if(g=0,x=2,m++,n&&(wt(!1),0===e.avail_out))return 0}else if(0!==g){if(n=ct(0,255&o[m-1]),n&&wt(!1),m++,k--,0===e.avail_out)return 0}else g=1,m++,k--}return 0!==g&&(n=ct(0,255&o[m-1]),g=0),wt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=S&&3!=S||(n=et),0==S||2==S)return 0===e.avail_out&&(a=-1),0;if(1==S){if(1==h)ot(2,3),_t(R,X.static_ltree),ut(),1+L+10-N<9&&(ot(2,3),_t(R,X.static_ltree),ut()),L=7;else if(bt(0,0,!1),3==h)for(U=0;U<f;U++)u[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function st(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function lt(t){const e=new st,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,l=0,o=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,o),o+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length})),a}}st.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new rt,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):H},deflateEnd:function(){const t=this;if(!t.dstate)return H;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):H},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):H},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const ot=-2,_t=-3,dt=-5,ut=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ht=[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],bt=[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,112,112],pt=[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],wt=[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],xt=15;function yt(){let t,e,n,i,a,r;function s(t,e,s,l,o,_,d,u,c,f,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,z;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=xt&&0===n[g];g++);for(m=g,v<g&&(v=g),y=xt;0!==y&&0===n[y];y--);for(w=y,v>y&&(v=y),u[0]=v,C=1<<g;g<y;g++,C<<=1)if((C-=n[g])<0)return _t;if((C-=n[y])<0)return _t;for(n[y]+=C,r[1]=g=0,A=1,E=2;0!=--y;)r[E]=g+=n[A],E++,A++;y=0,A=0;do{0!==(g=t[e+A])&&(h[r[g]++]=y),A++}while(++y<s);for(s=r[w],r[0]=y=0,A=0,x=-1,I=-v,a[0]=0,U=0,z=0;m<=w;m++)for(b=n[m];0!=b--;){for(;m>I+v;){if(x++,I+=v,z=w-I,z=z>v?v:z,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g<z))for(;++g<z&&!((p<<=1)<=n[++E]);)p-=n[E];if(z=1<<g,f[0]+z>1440)return _t;a[x]=U=f[0],f[0]+=z,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,c.set(i,3*(a[x-1]+g))):d[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]<l?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-l]+16+64,i[2]=o[h[A++]-l]),p=1<<m-I,g=y>>>I;g<z;g+=p)c.set(i,3*(U+g));for(g=1<<m-1;0!=(y&g);g>>>=1)y^=g;for(y^=g,k=(1<<I)-1;(y&k)!=r[x];)x--,I-=v,k=(1<<I)-1}return 0!==C&&1!=w?dt:0}function l(s){let l;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(xt),r=new Int32Array(16)),e.length<s&&(e=[]),l=0;l<s;l++)e[l]=0;for(l=0;l<16;l++)n[l]=0;for(l=0;l<3;l++)i[l]=0;a.set(n.subarray(0,xt),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,o){let _;return l(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),_==_t?o.msg="oversubscribed dynamic bit lengths tree":_!=dt&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=_t),_},this.inflate_trees_dynamic=function(n,i,a,r,o,_,d,u,c){let f;return l(288),t[0]=0,f=s(a,0,n,257,ht,bt,_,r,u,t,e),0!=f||0===r[0]?(f==_t?c.msg="oversubscribed literal/length tree":-4!=f&&(c.msg="incomplete literal/length tree",f=_t),f):(l(288),f=s(a,n,i,0,pt,wt,d,o,u,t,e),0!=f||0===o[0]&&n>257?(f==_t?c.msg="oversubscribed distance tree":f==dt?(c.msg="incomplete distance tree",f=_t):-4!=f&&(c.msg="empty distance tree with lengths",f=_t),f):0)}}yt.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=ct,i[0]=ft,0};function gt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,u=0,c=0,f=0,h=0;function b(t,e,n,i,a,r,s,l){let o,_,d,u,c,f,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,c=s.bitb,f=s.bitk,p=s.write,w=p<s.read?s.read-p-1:s.end-p,x=ut[t],y=ut[e];do{for(;f<20;)b--,c|=(255&l.read_byte(h++))<<f,f+=8;if(o=c&x,_=n,d=i,k=3*(d+o),0!==(u=_[k]))for(;;){if(c>>=_[k+1],f-=_[k+1],0!=(16&u)){for(u&=15,g=_[k+2]+(c&ut[u]),c>>=u,f-=u;f<15;)b--,c|=(255&l.read_byte(h++))<<f,f+=8;for(o=c&y,_=a,d=r,k=3*(d+o),u=_[k];;){if(c>>=_[k+1],f-=_[k+1],0!=(16&u)){for(u&=15;f<u;)b--,c|=(255&l.read_byte(h++))<<f,f+=8;if(m=_[k+2]+(c&ut[u]),c>>=u,f-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++]}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=f>>3<g?f>>3:g,b+=g,h-=g,f-=g<<3,s.bitb=c,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,_t;o+=_[k+2],o+=c&ut[u],k=3*(d+o),u=_[k]}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=f>>3<g?f>>3:g,b+=g,h-=g,f-=g<<3,s.bitb=c,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=f>>3<g?f>>3:g,b+=g,h-=g,f-=g<<3,s.bitb=c,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,_t);if(o+=_[k+2],o+=c&ut[u],k=3*(d+o),0===(u=_[k])){c>>=_[k+1],f-=_[k+1],s.window[p++]=_[k+2],w--;break}}else c>>=_[k+1],f-=_[k+1],s.window[p++]=_[k+2],w--}while(w>=258&&b>=10);return g=l.avail_in-b,g=f>>3<g?f>>3:g,b+=g,h-=g,f-=g<<3,s.bitb=c,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,_){e=0,u=t,c=r,i=s,f=l,a=o,h=_,n=null},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v;;)switch(e){case 0:if(k>=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,c,i,f,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v,0!=w)){e=1==w?7:9;break}l=u,n=i,s=f,e=1;case 1:for(x=l;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}if(y=3*(s+(U&ut[x])),U>>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){_=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=_t,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=_;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}r+=U&ut[x],U>>=x,I-=x,l=c,n=a,s=h,e=3;case 3:for(x=l;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}if(y=3*(s+(U&ut[x])),U>>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){_=15&g,d=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=_t,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=_;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}d+=U&ut[x],U>>=x,I-=x,e=5;case 5:for(A=v-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);t.window[v++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,t.window[v++]=o,k--,e=0;break;case 7:if(I>7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,t.read!=t.write)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);e=8;case 8:return w=1,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 9:return w=_t,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);default:return w=ot,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w)}},t.free=function(){}}const mt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function vt(t,e){const n=this;let i,a=0,r=0,s=0,l=0;const o=[0],_=[0],d=new gt;let u=0,c=new Int32Array(4320);const f=new yt;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&e==dt&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&e==dt&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y;;){let v,k,A,U,I,E,C,z;switch(a){case 0:for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],yt.inflate_trees_fixed(v,k,A,U),d.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=_t,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=_t,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g&&(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g)))return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(e=0,h=r,h>x&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=_t,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(m=0;m<h;m++)i[m]=0;b>>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}i[mt[l++]]=7&b,b>>>=3,p-=3}for(;l<19;)i[mt[l++]]=0;if(o[0]=7,h=f.inflate_trees_bits(i,o,_,c,t),0!=h)return(e=h)==_t&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,d;for(h=o[0];p<h;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(h=c[3*(_[0]+(b&ut[h]))+1],d=c[3*(_[0]+(b&ut[h]))+2],d<16)b>>>=h,p-=h,i[l++]=d;else{for(m=18==d?7:d-14,r=18==d?11:3;p<h+m;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(b>>>=h,p-=h,r+=b&ut[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==d&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=_t,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--r);l=m}}if(_[0]=-1,I=[],E=[],C=[],z=[],I[0]=9,E[0]=6,h=s,h=f.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,z,c,t),0!=h)return h==_t&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);d.init(I[0],E[0],c,C[0],c,z[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y,0===u){a=0;break}a=7;case 7:if(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);case 9:return e=_t,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);default:return e=ot,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,c=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const kt=13,At=[0,0,255,255];function Ut(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):ot}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),ot):(t.wbits=i,n.istate.blocks=new vt(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return ot;const a=t.istate;for(e=4==e?dt:0,n=dt;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=kt,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=kt,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=kt,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=kt,t.msg="need dictionary",a.marker=0,ot;case 7:if(n=a.blocks.proc(t,n),n==_t){a.mode=kt,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case kt:return _t;default:return ot}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return ot;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return ot;const l=t.istate;if(l.mode!=kt&&(l.mode=kt,l.marker=0),0===(n=t.avail_in))return dt;for(i=t.next_in_index,a=l.marker;0!==n&&a<4;)t.read_byte(i)==At[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,l.marker=a,4!=a?_t:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,l.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():ot}}function It(){}function Et(){const t=new It,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,l,o=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===dt){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(d),r.forEach((function(t){l.set(t,_),_+=t.length})),l}},this.flush=function(){t.inflateEnd()}}It.prototype={inflateInit:function(t){const e=this;return e.istate=new Ut,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):ot},inflateEnd:function(){const t=this;if(!t.istate)return ot;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):ot},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):ot},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=lt,self.Inflate=Et}}(); | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i<a;i++)n=n>>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length<e)return t;const i=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,i>0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n<t.length;n++)a.push(i|t[n]>>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n<e;n++)0==(3&n)&&(a=t[n/4]),i[n]=a>>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i<t.length;i++)a=a<<8|t[i],3==(3&i)&&(e.push(a),a=0);return 3&i&&e.push(n.partial(8*(3&i),a)),e}}},a={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};a.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=i.utf8String.toBits(t));const a=e._buffer=n.concat(e._buffer,t),r=e._length,s=e._length=r+n.bitLength(t);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(a);let l=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);t<=s;t+=e.blockSize)e._block(o.subarray(16*l,16*(l+1))),l+=1;return a.splice(0,16*l),e},finalize:function(){const t=this;let e=t._buffer;const i=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,i){return t<=19?e&n|~e&i:t<=39?e^n^i:t<=59?e&n|e&i|n&i:t<=79?e^n^i:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){const e=this,n=e._h,i=Array(80);for(let e=0;e<16;e++)i[e]=t[e];let a=n[0],r=n[1],s=n[2],o=n[3],l=n[4];for(let t=0;t<=79;t++){t>=16&&(i[t]=e._S(1,i[t-3]^i[t-8]^i[t-14]^i[t-16]));const n=e._S(5,a)+e._f(t,r,s,o)+l+i[t]+e._key[Math.floor(t/20)]|0;l=o,o=s,s=e._S(30,r),r=a,a=n}n[0]=n[0]+a|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const r={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],a=t.length;let r,s,o,l=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),o=[]],r=a;r<4*a+28;r++){let t=s[r-1];(r%a==0||8===a&&r%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-a]^t}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];o[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,o,l,_;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[l=a[o=a[d]]];let c=16843009*_^65537*l^257*o^16843008*d,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][d]=f=f<<24^f>>>8,e[n][r]=c=c<<24^c>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],o=r[1],l=r[2],_=r[3],d=r[4];let c,f,u,h=t[0]^n[0],b=t[e?3:1]^n[1],w=t[2]^n[2],p=t[e?1:3]^n[3],x=4;for(let t=0;t<i;t++)c=s[h>>>24]^o[b>>16&255]^l[w>>8&255]^_[255&p]^n[x],f=s[b>>>24]^o[w>>16&255]^l[p>>8&255]^_[255&h]^n[x+1],u=s[w>>>24]^o[p>>16&255]^l[h>>8&255]^_[255&b]^n[x+2],p=s[p>>>24]^o[h>>16&255]^l[b>>8&255]^_[255&w]^n[x+3],x+=4,h=c,b=f,w=u;for(let t=0;t<4;t++)a[e?3&-t:t]=d[h>>>24]<<24^d[b>>16&255]<<16^d[w>>8&255]<<8^d[255&p]^n[x++],c=h,h=b,b=w,w=p,p=c;return a}}},s={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let a;if(!(a=e.length))return[];const r=n.bitLength(e);for(let n=0;n<a;n+=4){this.incCounter(i);const a=t.encrypt(i);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return n.clamp(e,r)}}},o={hmacSha1:class{constructor(t){const e=this,n=e._hash=a.sha1,i=[[],[]],r=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>r&&(t=n.hash(t));for(let e=0;e<r;e++)i[0][e]=909522486^t[e],i[1][e]=1549556828^t[e];e._baseHash[0].update(i[0]),e._baseHash[1].update(i[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}}},l="Invalid pasword",_=16,d={name:"PBKDF2"},c=Object.assign({hash:{name:"HMAC"}},d),f=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},d),u=["deriveBits"],h=[8,12,16],b=[16,24,32],w=10,p=[0,0,0,0],x=crypto.subtle,g=i.bytes,y=r.aes,m=s.ctrGladman,v=o.hmacSha1;class k{constructor(t,e,n){Object.assign(this,{password:t,signed:e,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const n=I(t,0,h[e.strength]+2);await async function(t,e,n){await S(t,n,I(e,0,h[t.strength]));const i=I(e,h[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error(l)}(e,n,e.password),e.password=null,e.aesCtrGladman=new m(new y(e.keys.key),Array.from(p)),e.hmac=new v(e.keys.authentication),t=I(t,h[e.strength]+2)}return U(e,t,new Uint8Array(t.length-w-(t.length-w)%_),0,w,!0)}async flush(){const t=this,e=t.pendingInput,n=I(e,0,e.length-w),i=I(e,e.length-w);let a=new Uint8Array(0);if(n.length){const e=g.toBits(n);t.hmac.update(e);const i=t.aesCtrGladman.update(e);a=g.fromBits(i)}let r=!0;if(t.signed){const e=I(g.fromBits(t.hmac.digest()),0,w);for(let t=0;t<w;t++)e[t]!=i[t]&&(r=!1)}return{valid:r,data:a}}}class A{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let n=new Uint8Array(0);e.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(h[t.strength]));return await S(t,e,n),E(n,t.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new m(new y(e.keys.key),Array.from(p)),e.hmac=new v(e.keys.authentication));const i=new Uint8Array(n.length+t.length-t.length%_);return i.set(n,0),U(e,t,i,n.length,0)}async flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(g.toBits(t.pendingInput));t.hmac.update(n),e=g.fromBits(n)}const n=I(g.fromBits(t.hmac.digest()),0,w);return{data:E(e,n),signature:n}}}function U(t,e,n,i,a,r){const s=e.length-a;let o;for(t.pendingInput.length&&(e=E(t.pendingInput,e),n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,s-s%_)),o=0;o<=s-_;o+=_){const a=g.toBits(I(e,o,o+_));r&&t.hmac.update(a);const s=t.aesCtrGladman.update(a);r||t.hmac.update(s),n.set(g.fromBits(s),o+i)}return t.pendingInput=I(e,o),n}async function S(t,e,n){const i=(new TextEncoder).encode(e),a=await x.importKey("raw",i,c,!1,u),r=await x.deriveBits(Object.assign({salt:n},f),a,8*(2*b[t.strength]+2)),s=new Uint8Array(r);t.keys={key:g.toBits(I(s,0,b[t.strength])),authentication:g.toBits(I(s,b[t.strength],2*b[t.strength])),passwordVerification:I(s,2*b[t.strength])}}function E(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function I(t,e,n){return t.subarray(e,n)}const z=12;class C{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),V(this,t)}async append(t){const e=this;if(e.password){const n=M(e,t.subarray(0,z));if(e.password=null,n[11]!=e.passwordVerification)throw new Error(l);t=t.subarray(z)}return M(e,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class B{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),V(this,t)}async append(t){const e=this;let n,i;if(e.password){e.password=null;const a=crypto.getRandomValues(new Uint8Array(z));a[11]=e.passwordVerification,n=new Uint8Array(t.length+a.length),n.set(H(e,a),0),i=z}else n=new Uint8Array(t.length),i=0;return n.set(H(e,t),i),n}async flush(){return{data:new Uint8Array(0)}}}function M(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=j(t)^e[i],D(t,n[i]);return n}function H(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=j(t)^e[i],D(t,e[i]);return n}function V(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)D(t,n.charCodeAt(e))}function D(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=P(t.keys[1]+O(t.keys[0])),t.keys[1]=P(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function j(t){const e=2|t.keys[2];return O(Math.imul(e,1^e)>>>8)}function O(t){return 255&t}function P(t){return 4294967295&t}const K="deflate",G="inflate",W="Invalid signature";class L{constructor(t,{signature:n,password:i,signed:a,compressed:r,zipCrypto:s,passwordVerification:o,encryptionStrength:l}){const _=Boolean(i);Object.assign(this,{signature:n,encrypted:_,signed:a,compressed:r,inflate:r&&new t,crc32:a&&new e,zipCrypto:s,decrypt:_&&s?new C(i,o):new k(i,a,l)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=await t.decrypt.flush();if(!e.valid)throw new Error(W);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.cipher!=n.getUint32(0,!1))throw new Error(W)}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class T{constructor(t,{encrypted:n,signed:i,compressed:a,level:r,zipCrypto:s,password:o,passwordVerification:l,encryptionStrength:_}){Object.assign(this,{encrypted:n,signed:i,compressed:a,deflate:a&&new t({level:r||5}),crc32:i&&new e,zipCrypto:s,encrypt:n&&s?new B(o,l):new A(o,_)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const i=await t.encrypt.flush();e=i.signature;const a=new Uint8Array(n.length+i.data.length);a.set(n,0),a.set(i.data,n.length),n=a}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const q={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(K)?n=self.Deflate:e.codecType.startsWith(G)&&(n=self.Inflate),R=function(t,e){return e.codecType.startsWith(K)?new T(t,e):e.codecType.startsWith(G)?new L(t,e):void 0}(n,e)},append:async t=>({data:await R.append(t.data)}),flush:()=>R.flush()};let R;addEventListener("message",(async t=>{const e=t.data,n=e.type,i=q[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const F=256,J=256,N=-2,Q=-5;function X(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const Y=[0,1,2,3].concat(...X([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Z(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=_<2?++_:0,i[2*l]=1,n.depth[l]=0,n.opt_len--,a&&(n.static_len-=a[2*l+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,_,d,c,f,u=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,u++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,c=0,l>=r&&(c=a[l-r]),f=n[2*l],e.opt_len+=f*(d+c),i&&(e.static_len+=f*(i[2*l+1]+c)));if(0!==u){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,u-=2}while(u>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)_=e.heap[--o],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),l--)}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o))}(i,t.max_code,n.bl_count)}}function $(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}Z._length_code=[0,1,2,3,4,5,6,7].concat(...X([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Z.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Z.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Z.d_code=function(t){return t<256?Y[t]:Y[256+(t>>>7)]},Z.extra_lbits=[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],Z.extra_dbits=[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],Z.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],$.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],$.static_l_desc=new $($.static_ltree,Z.extra_lbits,257,286,15),$.static_d_desc=new $($.static_dtree,Z.extra_dbits,0,30,15),$.static_bl_desc=new $(null,Z.extra_blbits,0,19,7);function tt(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}const et=[new tt(0,0,0,0,0),new tt(4,4,8,4,1),new tt(4,5,16,8,1),new tt(4,6,32,32,1),new tt(4,4,16,16,2),new tt(8,16,32,32,2),new tt(8,16,128,128,2),new tt(8,32,128,256,2),new tt(32,128,258,1024,2),new tt(32,258,258,4096,2)],nt=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],it=113,at=666,rt=258,st=262;function ot(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function lt(){const t=this;let e,n,i,a,r,s,o,l,_,d,c,f,u,h,b,w,p,x,g,y,m,v,k,A,U,S,E,I,z,C,B,M,H;const V=new Z,D=new Z,j=new Z;let O,P,K,G,W,L,T,q;function R(){let e;for(e=0;e<286;e++)B[2*e]=0;for(e=0;e<30;e++)M[2*e]=0;for(e=0;e<19;e++)H[2*e]=0;B[512]=1,t.opt_len=t.static_len=0,K=W=0}function X(t,e){let n,i=-1,a=t[1],r=0,s=7,o=4;0===a&&(s=138,o=3),t[2*(e+1)+1]=65535;for(let l=0;l<=e;l++)n=a,a=t[2*(l+1)+1],++r<s&&n==a||(r<o?H[2*n]+=r:0!==n?(n!=i&&H[2*n]++,H[32]++):r<=10?H[34]++:H[36]++,r=0,i=n,0===a?(s=138,o=3):n==a?(s=6,o=3):(s=7,o=4))}function Y(e){t.pending_buf[t.pending++]=e}function tt(t){Y(255&t),Y(t>>>8&255)}function lt(t,e){let n;const i=e;q>16-i?(n=t,T|=n<<q&65535,tt(T),T=n>>>16-q,q+=i-16):(T|=t<<q&65535,q+=i)}function _t(t,e){const n=2*t;lt(65535&e[n],65535&e[n+1])}function dt(t,e){let n,i,a=-1,r=t[1],s=0,o=7,l=4;for(0===r&&(o=138,l=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<o&&i==r)){if(s<l)do{_t(i,H)}while(0!=--s);else 0!==i?(i!=a&&(_t(i,H),s--),_t(16,H),lt(s-3,2)):s<=10?(_t(17,H),lt(s-3,3)):(_t(18,H),lt(s-11,7));s=0,a=i,0===r?(o=138,l=3):i==r?(o=6,l=3):(o=7,l=4)}}function ct(){16==q?(tt(T),T=0,q=0):q>=8&&(Y(255&T),T>>>=8,q-=8)}function ft(e,n){let i,a,r;if(t.pending_buf[G+2*K]=e>>>8&255,t.pending_buf[G+2*K+1]=255&e,t.pending_buf[O+K]=255&n,K++,0===e?B[2*n]++:(W++,e--,B[2*(Z._length_code[n]+F+1)]++,M[2*Z.d_code(e)]++),0==(8191&K)&&E>2){for(i=8*K,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+Z.extra_dbits[r]);if(i>>>=3,W<Math.floor(K/2)&&i<Math.floor(a/2))return!0}return K==P-1}function ut(e,n){let i,a,r,s,o=0;if(0!==K)do{i=t.pending_buf[G+2*o]<<8&65280|255&t.pending_buf[G+2*o+1],a=255&t.pending_buf[O+o],o++,0===i?_t(a,e):(r=Z._length_code[a],_t(r+F+1,e),s=Z.extra_lbits[r],0!==s&&(a-=Z.base_length[r],lt(a,s)),i--,r=Z.d_code(i),_t(r,n),s=Z.extra_dbits[r],0!==s&&(i-=Z.base_dist[r],lt(i,s)))}while(o<K);_t(J,e),L=e[513]}function ht(){q>8?tt(T):q>0&&Y(255&T),T=0,q=0}function bt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){ht(),L=8,i&&(tt(n),tt(~n)),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function wt(e,n,i){let a,r,s=0;E>0?(V.build_tree(t),D.build_tree(t),s=function(){let e;for(X(B,V.max_code),X(M,D.max_code),j.build_tree(t),e=18;e>=3&&0===H[2*Z.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?bt(e,n,i):r==a?(lt(2+(i?1:0),3),ut($.static_ltree,$.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i<n;i++)lt(H[2*Z.bl_order[i]+1],3);dt(B,t-1),dt(M,e-1)}(V.max_code+1,D.max_code+1,s+1),ut(B,M)),R(),i&&ht()}function pt(t){wt(p>=0?p:-1,m-p,t),p=m,e.flush_pending()}function xt(){let t,n,i,a;do{if(a=_-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-st){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=u,i=t;do{n=65535&c[--i],c[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<<w^255&l[m+1])&b)}while(k<st&&0!==e.avail_in)}function gt(t){let e,n,i=U,a=m,s=A;const _=m>r-st?m-(r-st):0;let c=C;const f=o,u=m+rt;let h=l[a+s-1],b=l[a+s];A>=z&&(i>>=2),c>k&&(c=k);do{if(e=t,l[e+s]==b&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&a<u);if(n=rt-(u-a),a=u-rt,n>s){if(v=t,s=n,n>=c)break;h=l[a+s-1],b=l[a+s]}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=k?s:k}function yt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=it,a=0,V.dyn_tree=B,V.stat_desc=$.static_l_desc,D.dyn_tree=M,D.stat_desc=$.static_d_desc,j.dyn_tree=H,j.stat_desc=$.static_bl_desc,T=0,q=0,L=8,R(),function(){_=2*r,c[u-1]=0;for(let t=0;t<u-1;t++)c[t]=0;S=et[E].max_lazy,z=et[E].good_length,C=et[E].nice_length,U=et[E].max_chain,m=0,p=0,k=0,x=A=2,y=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],B=[],M=[],H=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&ot(e,i[r+1],i[r],t.depth)&&r++,!ot(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,f,p){return _||(_=8),f||(f=8),p||(p=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||p<0||p>2?N:(e.dstate=t,s=a,r=1<<s,o=r-1,h=f+7,u=1<<h,b=u-1,w=Math.floor((h+3-1)/3),l=new Uint8Array(2*r),d=[],c=[],P=1<<f+6,t.pending_buf=new Uint8Array(4*P),i=4*P,G=Math.floor(P/2),O=3*P,E=n,I=p,yt(e))},t.deflateEnd=function(){return 42!=n&&n!=it&&n!=at?N:(t.pending_buf=null,c=null,d=null,l=null,t.dstate=null,n==it?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?N:(et[E].func!=et[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,S=et[E].max_lazy,z=et[E].good_length,C=et[E].nice_length,U=et[E].max_chain),I=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return N;if(s<3)return 0;for(s>r-st&&(s=r-st,_=i-s),l.set(e.subarray(_,_+s),0),m=s,p=s,f=255&l[0],f=(f<<w^255&l[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&l[a+2])&b,d[a&o]=c[f],c[f]=a;return 0},t.deflate=function(_,h){let U,z,C,B,M;if(h>4||h<0)return N;if(!_.next_out||!_.next_in&&0!==_.avail_in||n==at&&4!=h)return _.msg=nt[4],N;if(0===_.avail_out)return _.msg=nt[7],Q;var H;if(e=_,B=a,a=h,42==n&&(z=8+(s-8<<4)<<8,C=(E-1&255)>>1,C>3&&(C=3),z|=C<<6,0!==m&&(z|=32),z+=31-z%31,n=it,Y((H=z)>>8&255),Y(255&H)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=nt[7],Q;if(n==at&&0!==e.avail_in)return _.msg=nt[7],Q;if(0!==e.avail_in||0!==k||0!=h&&n!=at){switch(M=-1,et[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(xt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,pt(!1),0===e.avail_out))return 0;if(m-p>=r-st&&(pt(!1),0===e.avail_out))return 0}return pt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<st){if(xt(),k<st&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[m+2])&b,i=65535&c[f],d[m&o]=c[f],c[f]=m),0!==i&&(m-i&65535)<=r-st&&2!=I&&(x=gt(i)),x>=3)if(n=ft(m-v,x-3),k-=x,x<=S&&k>=3){x--;do{m++,f=(f<<w^255&l[m+2])&b,i=65535&c[f],d[m&o]=c[f],c[f]=m}while(0!=--x);m++}else m+=x,x=0,f=255&l[m],f=(f<<w^255&l[m+1])&b;else n=ft(0,255&l[m]),k--,m++;if(n&&(pt(!1),0===e.avail_out))return 0}return pt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:M=function(t){let n,i,a=0;for(;;){if(k<st){if(xt(),k<st&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[m+2])&b,a=65535&c[f],d[m&o]=c[f],c[f]=m),A=x,g=v,x=2,0!==a&&A<S&&(m-a&65535)<=r-st&&(2!=I&&(x=gt(a)),x<=5&&(1==I||3==x&&m-v>4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=ft(m-1-g,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<<w^255&l[m+2])&b,a=65535&c[f],d[m&o]=c[f],c[f]=m)}while(0!=--A);if(y=0,x=2,m++,n&&(pt(!1),0===e.avail_out))return 0}else if(0!==y){if(n=ft(0,255&l[m-1]),n&&pt(!1),m++,k--,0===e.avail_out)return 0}else y=1,m++,k--}return 0!==y&&(n=ft(0,255&l[m-1]),y=0),pt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=M&&3!=M||(n=at),0==M||2==M)return 0===e.avail_out&&(a=-1),0;if(1==M){if(1==h)lt(2,3),_t(J,$.static_ltree),ct(),1+L+10-q<9&&(lt(2,3),_t(J,$.static_ltree),ct()),L=7;else if(bt(0,0,!1),3==h)for(U=0;U<u;U++)c[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function _t(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function dt(t){const e=new _t,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,o=0,l=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length})),a}}_t.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new lt,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):N},deflateEnd:function(){const t=this;if(!t.dstate)return N;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):N},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):N},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const ct=-2,ft=-3,ut=-5,ht=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],bt=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],wt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],pt=[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],xt=[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,112,112],gt=[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],yt=[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],mt=15;function vt(){let t,e,n,i,a,r;function s(t,e,s,o,l,_,d,c,f,u,h){let b,w,p,x,g,y,m,v,k,A,U,S,E,I,z;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(v=c[0],y=1;y<=mt&&0===n[y];y++);for(m=y,v<y&&(v=y),g=mt;0!==g&&0===n[g];g--);for(p=g,v>g&&(v=g),c[0]=v,I=1<<y;y<g;y++,I<<=1)if((I-=n[y])<0)return ft;if((I-=n[g])<0)return ft;for(n[g]+=I,r[1]=y=0,A=1,E=2;0!=--g;)r[E]=y+=n[A],E++,A++;g=0,A=0;do{0!==(y=t[e+A])&&(h[r[y]++]=g),A++}while(++g<s);for(s=r[p],r[0]=g=0,A=0,x=-1,S=-v,a[0]=0,U=0,z=0;m<=p;m++)for(b=n[m];0!=b--;){for(;m>S+v;){if(x++,S+=v,z=p-S,z=z>v?v:z,(w=1<<(y=m-S))>b+1&&(w-=b+1,E=m,y<z))for(;++y<z&&!((w<<=1)<=n[++E]);)w-=n[E];if(z=1<<y,u[0]+z>1440)return ft;a[x]=U=u[0],u[0]+=z,0!==x?(r[x]=g,i[0]=y,i[1]=v,y=g>>>S-v,i[2]=U-a[x-1]-y,f.set(i,3*(a[x-1]+y))):d[0]=U}for(i[1]=m-S,A>=s?i[0]=192:h[A]<o?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-o]+16+64,i[2]=l[h[A++]-o]),w=1<<m-S,y=g>>>S;y<z;y+=w)f.set(i,3*(U+y));for(y=1<<m-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<S)-1;(g&k)!=r[x];)x--,S-=v,k=(1<<S)-1}return 0!==I&&1!=p?ut:0}function o(s){let o;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(mt),r=new Int32Array(16)),e.length<s&&(e=[]),o=0;o<s;o++)e[o]=0;for(o=0;o<16;o++)n[o]=0;for(o=0;o<3;o++)i[o]=0;a.set(n.subarray(0,mt),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,l){let _;return o(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),_==ft?l.msg="oversubscribed dynamic bit lengths tree":_!=ut&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",_=ft),_},this.inflate_trees_dynamic=function(n,i,a,r,l,_,d,c,f){let u;return o(288),t[0]=0,u=s(a,0,n,257,pt,xt,_,r,c,t,e),0!=u||0===r[0]?(u==ft?f.msg="oversubscribed literal/length tree":-4!=u&&(f.msg="incomplete literal/length tree",u=ft),u):(o(288),u=s(a,n,i,0,gt,yt,d,l,c,t,e),0!=u||0===l[0]&&n>257?(u==ft?f.msg="oversubscribed distance tree":u==ut?(f.msg="incomplete distance tree",u=ft):-4!=u&&(f.msg="empty distance tree with lengths",u=ft),u):0)}}vt.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=bt,i[0]=wt,0};function kt(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,_=0,d=0,c=0,f=0,u=0,h=0;function b(t,e,n,i,a,r,s,o){let l,_,d,c,f,u,h,b,w,p,x,g,y,m,v,k;h=o.next_in_index,b=o.avail_in,f=s.bitb,u=s.bitk,w=s.write,p=w<s.read?s.read-w-1:s.end-w,x=ht[t],g=ht[e];do{for(;u<20;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;if(l=f&x,_=n,d=i,k=3*(d+l),0!==(c=_[k]))for(;;){if(f>>=_[k+1],u-=_[k+1],0!=(16&c)){for(c&=15,y=_[k+2]+(f&ht[c]),f>>=c,u-=c;u<15;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;for(l=f&g,_=a,d=r,k=3*(d+l),c=_[k];;){if(f>>=_[k+1],u-=_[k+1],0!=(16&c)){for(c&=15;u<c;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;if(m=_[k+2]+(f&ht[c]),f>>=c,u-=c,p-=y,w>=m)v=w-m,w-v>0&&2>w-v?(s.window[w++]=s.window[v++],s.window[w++]=s.window[v++],y-=2):(s.window.set(s.window.subarray(v,v+2),w),w+=2,v+=2,y-=2);else{v=w-m;do{v+=s.end}while(v<0);if(c=s.end-v,y>c){if(y-=c,w-v>0&&c>w-v)do{s.window[w++]=s.window[v++]}while(0!=--c);else s.window.set(s.window.subarray(v,v+c),w),w+=c,v+=c,c=0;v=0}}if(w-v>0&&y>w-v)do{s.window[w++]=s.window[v++]}while(0!=--y);else s.window.set(s.window.subarray(v,v+y),w),w+=y,v+=y,y=0;break}if(0!=(64&c))return o.msg="invalid distance code",y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,ft;l+=_[k+2],l+=f&ht[c],k=3*(d+l),c=_[k]}break}if(0!=(64&c))return 0!=(32&c)?(y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,1):(o.msg="invalid literal/length code",y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,ft);if(l+=_[k+2],l+=f&ht[c],k=3*(d+l),0===(c=_[k])){f>>=_[k+1],u-=_[k+1],s.window[w++]=_[k+2],p--;break}}else f>>=_[k+1],u-=_[k+1],s.window[w++]=_[k+2],p--}while(p>=258&&b>=10);return y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,0}t.init=function(t,r,s,o,l,_){e=0,c=t,f=r,i=s,u=o,a=l,h=_,n=null},t.proc=function(t,w,p){let x,g,y,m,v,k,A,U=0,S=0,E=0;for(E=w.next_in_index,m=w.avail_in,U=t.bitb,S=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v;;)switch(e){case 0:if(k>=258&&m>=10&&(t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,p=b(c,f,i,u,a,h,t,w),E=w.next_in_index,m=w.avail_in,U=t.bitb,S=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v,0!=p)){e=1==p?7:9;break}o=c,n=i,s=u,e=1;case 1:for(x=o;S<x;){if(0===m)return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(E++))<<S,S+=8}if(g=3*(s+(U&ht[x])),U>>>=n[g+1],S-=n[g+1],y=n[g],0===y){l=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",p=ft,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);case 2:for(x=_;S<x;){if(0===m)return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(E++))<<S,S+=8}r+=U&ht[x],U>>=x,S-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;S<x;){if(0===m)return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(E++))<<S,S+=8}if(g=3*(s+(U&ht[x])),U>>=n[g+1],S-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",p=ft,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);case 4:for(x=_;S<x;){if(0===m)return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(E++))<<S,S+=8}d+=U&ht[x],U>>=x,S-=x,e=5;case 5:for(A=v-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);t.window[v++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);p=0,t.window[v++]=l,k--,e=0;break;case 7:if(S>7&&(S-=8,m++,E--),t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,t.read!=t.write)return t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);e=8;case 8:return p=1,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);case 9:return p=ft,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p);default:return p=ct,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,p)}},t.free=function(){}}const At=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ut(t,e){const n=this;let i,a=0,r=0,s=0,o=0;const l=[0],_=[0],d=new kt;let c=0,f=new Int32Array(4320);const u=new vt;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&e==ut&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&e==ut&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,p,x,g,y,m;for(p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let v,k,A,U,S,E,I,z;switch(a){case 0:for(;w<3;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}switch(h=7&b,c=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],vt.inflate_trees_fixed(v,k,A,U),d.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=ft,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=ft,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==c?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y&&(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y)))return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(e=0,h=r,h>x&&(h=x),h>y&&(h=y),n.window.set(t.read_buf(p,h),g),p+=h,x-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==c?7:0;break;case 3:for(;w<14;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=ft,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(m=0;m<h;m++)i[m]=0;b>>>=14,w-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;w<3;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}i[At[o++]]=7&b,b>>>=3,w-=3}for(;o<19;)i[At[o++]]=0;if(l[0]=7,h=u.inflate_trees_bits(i,l,_,f,t),0!=h)return(e=h)==ft&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,d;for(h=l[0];w<h;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(h=f[3*(_[0]+(b&ht[h]))+1],d=f[3*(_[0]+(b&ht[h]))+2],d<16)b>>>=h,w-=h,i[o++]=d;else{for(m=18==d?7:d-14,r=18==d?11:3;w<h+m;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(b>>>=h,w-=h,r+=b&ht[m],b>>>=m,w-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==d&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=ft,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--r);o=m}}if(_[0]=-1,S=[],E=[],I=[],z=[],S[0]=9,E[0]=6,h=s,h=u.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,S,E,I,z,f,t),0!=h)return h==ft&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d.init(S[0],E[0],f,I[0],f,z[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===c){a=0;break}a=7;case 7:if(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);case 9:return e=ft,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);default:return e=ct,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const St=13,Et=[0,0,255,255];function It(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):ct}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),ct):(t.wbits=i,n.istate.blocks=new Ut(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return ct;const a=t.istate;for(e=4==e?ut:0,n=ut;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=St,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=St,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=St,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=St,t.msg="need dictionary",a.marker=0,ct;case 7:if(n=a.blocks.proc(t,n),n==ft){a.mode=St,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case St:return ft;default:return ct}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return ct;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return ct;const o=t.istate;if(o.mode!=St&&(o.mode=St,o.marker=0),0===(n=t.avail_in))return ut;for(i=t.next_in_index,a=o.marker;0!==n&&a<4;)t.read_byte(i)==Et[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,o.marker=a,4!=a?ft:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,o.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():ct}}function zt(){}function Ct(){const t=new zt,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,o,l=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===ut){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),r.forEach((function(t){o.set(t,_),_+=t.length})),o}},this.flush=function(){t.inflateEnd()}}zt.prototype={inflateInit:function(t){const e=this;return e.istate=new It,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):ct},inflateEnd:function(){const t=this;if(!t.istate)return ct;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):ct},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):ct},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=dt,self.Inflate=Ct}}(); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,r=-2,i=-5;function s(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const a=[0,1,2,3].concat(...s([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a<s;a++)0!==r[2*a]?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):r[2*a+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(t.max_code=l,a=Math.floor(n.heap_len/2);a>=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length;let o,c,l,h,d,u,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],h=n[2*n[2*c+1]+1]+1,h>a&&(h=a,f++),n[2*c+1]=h,c>t.max_code||(e.bl_count[h]++,d=0,c>=s&&(d=i[c-s]),u=n[2*c],e.opt_len+=u*(h+d),r&&(e.static_len+=u*(r[2*c+1]+d)));if(0!==f){do{for(h=a-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[a]--,f-=2}while(f>0);for(h=a;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=h&&(e.opt_len+=(h-n[2*l+1])*n[2*l],n[2*l+1]=h),c--)}}(n),function(t,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=t[2*a+1],0!==o&&(t[2*a]=e(i[o]++,o))}(r,t.max_code,n.bl_count)}}function c(t,e,n,r,i){const s=this;s.static_tree=t,s.extra_bits=e,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?a[t]:a[256+(t>>>7)]},o.extra_lbits=[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],o.extra_dbits=[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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(t,e,n,r,i){const s=this;s.good_length=t,s.max_lazy=e,s.nice_length=n,s.max_chain=r,s.func=i}const h=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],d=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,f=666,p=258,w=262;function g(t,e,n,r){const i=t[2*e],s=t[2*n];return i<s||i==s&&r[e]<=r[n]}function y(){const t=this;let s,a,l,y,_,b,m,x,A,U,v,E,k,R,z,D,I,S,F,C,T,W,B,M,H,V,P,O,L,q,N,j,G;const K=new o,Z=new o,X=new o;let Y,J,Q,$,tt,et,nt,rt;function it(){let e;for(e=0;e<286;e++)N[2*e]=0;for(e=0;e<30;e++)j[2*e]=0;for(e=0;e<19;e++)G[2*e]=0;N[512]=1,t.opt_len=t.static_len=0,Q=tt=0}function st(t,e){let n,r=-1,i=t[1],s=0,a=7,o=4;0===i&&(a=138,o=3),t[2*(e+1)+1]=65535;for(let c=0;c<=e;c++)n=i,i=t[2*(c+1)+1],++s<a&&n==i||(s<o?G[2*n]+=s:0!==n?(n!=r&&G[2*n]++,G[32]++):s<=10?G[34]++:G[36]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function at(e){t.pending_buf[t.pending++]=e}function ot(t){at(255&t),at(t>>>8&255)}function ct(t,e){let n;const r=e;rt>16-r?(n=t,nt|=n<<rt&65535,ot(nt),nt=n>>>16-rt,rt+=r-16):(nt|=t<<rt&65535,rt+=r)}function lt(t,e){const n=2*t;ct(65535&e[n],65535&e[n+1])}function ht(t,e){let n,r,i=-1,s=t[1],a=0,o=7,c=4;for(0===s&&(o=138,c=3),n=0;n<=e;n++)if(r=s,s=t[2*(n+1)+1],!(++a<o&&r==s)){if(a<c)do{lt(r,G)}while(0!=--a);else 0!==r?(r!=i&&(lt(r,G),a--),lt(16,G),ct(a-3,2)):a<=10?(lt(17,G),ct(a-3,3)):(lt(18,G),ct(a-11,7));a=0,i=r,0===s?(o=138,c=3):r==s?(o=6,c=3):(o=7,c=4)}}function dt(){16==rt?(ot(nt),nt=0,rt=0):rt>=8&&(at(255&nt),nt>>>=8,rt-=8)}function ut(n,r){let i,s,a;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[Y+Q]=255&r,Q++,0===n?N[2*r]++:(tt++,n--,N[2*(o._length_code[r]+e+1)]++,j[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=T-I,a=0;a<30;a++)i+=j[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,tt<Math.floor(Q/2)&&i<Math.floor(s/2))return!0}return Q==J-1}function ft(r,i){let s,a,c,l,h=0;if(0!==Q)do{s=t.pending_buf[$+2*h]<<8&65280|255&t.pending_buf[$+2*h+1],a=255&t.pending_buf[Y+h],h++,0===s?lt(a,r):(c=o._length_code[a],lt(c+e+1,r),l=o.extra_lbits[c],0!==l&&(a-=o.base_length[c],ct(a,l)),s--,c=o.d_code(s),lt(c,i),l=o.extra_dbits[c],0!==l&&(s-=o.base_dist[c],ct(s,l)))}while(h<Q);lt(n,r),et=r[513]}function pt(){rt>8?ot(nt):rt>0&&at(255&nt),nt=0,rt=0}function wt(e,n,r){ct(0+(r?1:0),3),function(e,n,r){pt(),et=8,r&&(ot(n),ot(~n)),t.pending_buf.set(x.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function gt(e,n,r){let i,s,a=0;P>0?(K.build_tree(t),Z.build_tree(t),a=function(){let e;for(st(N,K.max_code),st(j,Z.max_code),X.build_tree(t),e=18;e>=3&&0===G[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=e?wt(e,n,r):s==i?(ct(2+(r?1:0),3),ft(c.static_ltree,c.static_dtree)):(ct(4+(r?1:0),3),function(t,e,n){let r;for(ct(t-257,5),ct(e-1,5),ct(n-4,4),r=0;r<n;r++)ct(G[2*o.bl_order[r]+1],3);ht(N,t-1),ht(j,e-1)}(K.max_code+1,Z.max_code+1,a+1),ft(N,j)),it(),r&&pt()}function yt(t){gt(I>=0?I:-1,T-I,t),I=T,s.flush_pending()}function _t(){let t,e,n,r;do{if(r=A-B-T,0===r&&0===T&&0===B)r=_;else if(-1==r)r--;else if(T>=_+_-w){x.set(x.subarray(_,_+_),0),W-=_,T-=_,I-=_,t=k,n=t;do{e=65535&v[--n],v[n]=e>=_?e-_:0}while(0!=--t);t=_,n=t;do{e=65535&U[--n],U[n]=e>=_?e-_:0}while(0!=--t);r+=_}if(0===s.avail_in)return;t=s.read_buf(x,T+B,r),B+=t,B>=3&&(E=255&x[T],E=(E<<D^255&x[T+1])&z)}while(B<w&&0!==s.avail_in)}function bt(t){let e,n,r=H,i=T,s=M;const a=T>_-w?T-(_-w):0;let o=q;const c=m,l=T+p;let h=x[i+s-1],d=x[i+s];M>=L&&(r>>=2),o>B&&(o=B);do{if(e=t,x[e+s]==d&&x[e+s-1]==h&&x[e]==x[i]&&x[++e]==x[i+1]){i+=2,e++;do{}while(x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&i<l);if(n=p-(l-i),i=l-p,n>s){if(W=t,s=n,n>=o)break;h=x[i+s-1],d=x[i+s]}}}while((t=65535&U[t&c])>a&&0!=--r);return s<=B?s:B}function mt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,a=u,y=0,K.dyn_tree=N,K.stat_desc=c.static_l_desc,Z.dyn_tree=j,Z.stat_desc=c.static_d_desc,X.dyn_tree=G,X.stat_desc=c.static_bl_desc,nt=0,rt=0,et=8,it(),function(){A=2*_,v[k-1]=0;for(let t=0;t<k-1;t++)v[t]=0;V=h[P].max_lazy,L=h[P].good_length,q=h[P].nice_length,H=h[P].max_chain,T=0,I=0,B=0,S=M=2,C=0,E=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],N=[],j=[],G=[],t.pqdownheap=function(e,n){const r=t.heap,i=r[n];let s=n<<1;for(;s<=t.heap_len&&(s<t.heap_len&&g(e,r[s+1],r[s],t.depth)&&s++,!g(e,i,r[s],t.depth));)r[n]=r[s],n=s,s<<=1;r[n]=i},t.deflateInit=function(e,n,i,s,a,o){return s||(s=8),a||(a=8),o||(o=0),e.msg=null,-1==n&&(n=6),a<1||a>9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(e.dstate=t,b=i,_=1<<b,m=_-1,R=a+7,k=1<<R,z=k-1,D=Math.floor((R+3-1)/3),x=new Uint8Array(2*_),U=[],v=[],J=1<<a+6,t.pending_buf=new Uint8Array(4*J),l=4*J,$=Math.floor(J/2),Y=3*J,P=n,O=o,mt(e))},t.deflateEnd=function(){return 42!=a&&a!=u&&a!=f?r:(t.pending_buf=null,v=null,U=null,x=null,t.dstate=null,a==u?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?r:(h[P].func!=h[e].func&&0!==t.total_in&&(i=t.deflate(1)),P!=e&&(P=e,V=h[P].max_lazy,L=h[P].good_length,q=h[P].nice_length,H=h[P].max_chain),O=n,i)},t.deflateSetDictionary=function(t,e,n){let i,s=n,o=0;if(!e||42!=a)return r;if(s<3)return 0;for(s>_-w&&(s=_-w,o=n-s),x.set(e.subarray(o,o+s),0),T=s,I=s,E=255&x[0],E=(E<<D^255&x[1])&z,i=0;i<=s-3;i++)E=(E<<D^255&x[i+2])&z,U[i&m]=v[E],v[E]=i;return 0},t.deflate=function(e,o){let p,g,A,R,H;if(o>4||o<0)return r;if(!e.next_out||!e.next_in&&0!==e.avail_in||a==f&&4!=o)return e.msg=d[4],r;if(0===e.avail_out)return e.msg=d[7],i;var L;if(s=e,R=y,y=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==T&&(g|=32),g+=31-g%31,a=u,at((L=g)>>8&255),at(255&L)),0!==t.pending){if(s.flush_pending(),0===s.avail_out)return y=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=d[7],i;if(a==f&&0!==s.avail_in)return e.msg=d[7],i;if(0!==s.avail_in||0!==B||0!=o&&a!=f){switch(H=-1,h[P].func){case 0:H=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(B<=1){if(_t(),0===B&&0==t)return 0;if(0===B)break}if(T+=B,B=0,e=I+n,(0===T||T>=e)&&(B=T-e,T=e,yt(!1),0===s.avail_out))return 0;if(T-I>=_-w&&(yt(!1),0===s.avail_out))return 0}return yt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:H=function(t){let e,n=0;for(;;){if(B<w){if(_t(),B<w&&0==t)return 0;if(0===B)break}if(B>=3&&(E=(E<<D^255&x[T+2])&z,n=65535&v[E],U[T&m]=v[E],v[E]=T),0!==n&&(T-n&65535)<=_-w&&2!=O&&(S=bt(n)),S>=3)if(e=ut(T-W,S-3),B-=S,S<=V&&B>=3){S--;do{T++,E=(E<<D^255&x[T+2])&z,n=65535&v[E],U[T&m]=v[E],v[E]=T}while(0!=--S);T++}else T+=S,S=0,E=255&x[T],E=(E<<D^255&x[T+1])&z;else e=ut(0,255&x[T]),B--,T++;if(e&&(yt(!1),0===s.avail_out))return 0}return yt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 2:H=function(t){let e,n,r=0;for(;;){if(B<w){if(_t(),B<w&&0==t)return 0;if(0===B)break}if(B>=3&&(E=(E<<D^255&x[T+2])&z,r=65535&v[E],U[T&m]=v[E],v[E]=T),M=S,F=W,S=2,0!==r&&M<V&&(T-r&65535)<=_-w&&(2!=O&&(S=bt(r)),S<=5&&(1==O||3==S&&T-W>4096)&&(S=2)),M>=3&&S<=M){n=T+B-3,e=ut(T-1-F,M-3),B-=M-1,M-=2;do{++T<=n&&(E=(E<<D^255&x[T+2])&z,r=65535&v[E],U[T&m]=v[E],v[E]=T)}while(0!=--M);if(C=0,S=2,T++,e&&(yt(!1),0===s.avail_out))return 0}else if(0!==C){if(e=ut(0,255&x[T-1]),e&&yt(!1),T++,B--,0===s.avail_out)return 0}else C=1,T++,B--}return 0!==C&&(e=ut(0,255&x[T-1]),C=0),yt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o)}if(2!=H&&3!=H||(a=f),0==H||2==H)return 0===s.avail_out&&(y=-1),0;if(1==H){if(1==o)ct(2,3),lt(n,c.static_ltree),dt(),1+et+10-rt<9&&(ct(2,3),lt(n,c.static_ltree),dt()),et=7;else if(wt(0,0,!1),3==o)for(p=0;p<k;p++)v[p]=0;if(s.flush_pending(),0===s.avail_out)return y=-1,0}}return 4!=o?0:1}}function _(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}_.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new y,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):r},deflateEnd:function(){const t=this;if(!t.dstate)return r;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):r},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):r},read_buf:function(t,e,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),e),r.next_in_index+=i,r.total_in+=i,i)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const A="HTTP error ",U="HTTP Range not supported",v="text/plain",E="Content-Length",k="Accept-Ranges",R="HEAD",z="GET",D="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class S extends I{}class F extends I{writeUint8Array(t){this.size+=t.length}}class C extends S{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((r,i)=>{n.onload=t=>r(new Uint8Array(t.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class T extends F{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class W extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest){const t=await M(R,this.url,this.options);if(this.size=Number(t.headers.get(E)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(k)!=D)throw new Error(U);void 0===this.size&&await B(this,this.options)}else await B(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await M(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(U);return new Uint8Array(await n.arrayBuffer())}return this.data||await B(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function B(t,e){const n=await M(z,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function M(t,e,n,r){r=Object.assign({},n.headers,r);const i=await fetch(e,Object.assign({},n,{method:t,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(E)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(k)==D?t():e(new Error(U)):void 0===this.size?V(this,this.url).then((()=>t())).catch(e):t()}),e)));await V(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await V(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,r)=>P(z,this.url,(t=>n(new Uint8Array(t.response))),r,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(U)}}function V(t,e){return new Promise(((n,r)=>P(z,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),r)))}function P(t,e,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(t,e),i.forEach((t=>s.setRequestHeader(t[0],t[1]))),s.responseType="arraybuffer",s.send(),s}class O extends S{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new H(t,e):this.reader=new W(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function L(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const q=4294967295,N=65535,j=67324752,G=134695760,K=new Date(2107,11,31),Z=new Date(1980,0,1),X=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;X[t]=e}class Y{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;n<r;n++)e=e>>>8^X[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const J={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=J.getPartial(n);return 32===r?t.concat(e):J._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+J.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=J.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i<t.length;i++)r.push(n|t[i]>>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,s=J.getPartial(i);return r.push(J.partial(e+s&31,e+s>32?n:r.pop(),1)),r}},Q={bytes:{fromBits(t){const e=J.bitLength(t)/8,n=new Uint8Array(e);let r;for(let i=0;i<e;i++)0==(3&i)&&(r=t[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(J.partial(8*(3&n),r)),e}}},$={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],i=t.length;let s,a,o,c=1;if(4!==i&&6!==i&&8!==i)throw new Error("invalid aes key size");for(e._key=[a=t.slice(0),o=[]],s=i;s<4*i+28;s++){let t=a[s-1];(s%i==0||8===i&&s%i==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],s%i==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^t}for(let t=0;s;t++,s--){const e=a[3&t?s:s-4];o[t]=s<=4||t<4?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],i=[],s=[];let a,o,c,l;for(let t=0;t<256;t++)s[(i[t]=t<<1^283*(t>>7))^t]=t;for(let h=a=0;!n[h];h^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[h]=s,r[s]=h,l=i[c=i[o=i[h]]];let d=16843009*l^65537*c^257*o^16843008*h,u=257*i[s]^16843008*s;for(let n=0;n<4;n++)t[n][h]=u=u<<24^u>>>8,e[n][s]=d=d<<24^d>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,i=[0,0,0,0],s=this._tables[e],a=s[0],o=s[1],c=s[2],l=s[3],h=s[4];let d,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],g=t[2]^n[2],y=t[e?1:3]^n[3],_=4;for(let t=0;t<r;t++)d=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&y]^n[_],u=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^l[255&p]^n[_+1],f=a[g>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&w]^n[_+2],y=a[y>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[_+3],_+=4,p=d,w=u,g=f;for(let t=0;t<4;t++)i[e?3&-t:t]=h[p>>>24]<<24^h[w>>16&255]<<16^h[g>>8&255]<<8^h[255&y]^n[_++],d=p,p=w,w=g,g=y,y=d;return i}}},tt={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=J.bitLength(e);for(let i=0;i<r;i+=4){this.incCounter(n);const r=t.encrypt(n);e[i]^=r[0],e[i+1]^=r[1],e[i+2]^=r[2],e[i+3]^=r[3]}return J.clamp(e,i)}}},et="Invalid pasword",nt=16,rt={name:"PBKDF2"},it={name:"HMAC"},st="SHA-1",at=Object.assign({hash:it},rt),ot=Object.assign({iterations:1e3,hash:{name:st}},rt),ct=Object.assign({hash:st},it),lt=["deriveBits"],ht=["sign"],dt=[8,12,16],ut=[16,24,32],ft=10,pt=[0,0,0,0],wt=crypto.subtle;class gt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,dt[this.strength]+2);await async function(t,e,n){await _t(t,n,e.subarray(0,dt[t.strength]));const r=e.subarray(dt[t.strength]),i=t.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(et)}(this,e,this.password),this.password=null,this.aesCtrGladman=new tt.ctrGladman(new $.aes(this.keys.key),Array.from(pt)),t=t.subarray(dt[this.strength]+2)}let e,n=new Uint8Array(t.length-ft-(t.length-ft)%nt),r=t;for(this.pendingInput.length&&(r=bt(this.pendingInput,t),n=mt(n,r.length-ft-(r.length-ft)%nt)),e=0;e<=r.length-ft-nt;e+=nt){const t=r.subarray(e,e+nt),i=Q.bytes.toBits(t),s=this.aesCtrGladman.update(i);n.set(Q.bytes.fromBits(s),e)}return this.pendingInput=r.subarray(e),this.signed&&(this.input=bt(this.input,t)),n}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-ft),r=t.subarray(t.length-ft);let i=new Uint8Array(0);if(n.length){const t=this.aesCtrGladman.update(Q.bytes.toBits(n));i=Q.bytes.fromBits(t)}let s=!0;if(this.signed){const t=await wt.sign(it,e.authentication,this.input.subarray(0,this.input.length-ft)),n=new Uint8Array(t).subarray(0,ft);this.input=null;for(let t=0;t<ft;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:i}}}class yt{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(dt[t.strength]));return await _t(t,e,n),bt(n,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new tt.ctrGladman(new $.aes(this.keys.key),Array.from(pt)));let n,r=new Uint8Array(e.length+t.length-t.length%nt);for(r.set(e,0),this.pendingInput.length&&(r=mt(r,(t=bt(this.pendingInput,t)).length-t.length%nt)),n=0;n<=t.length-nt;n+=nt){const i=Q.bytes.toBits(t.subarray(n,n+nt)),s=this.aesCtrGladman.update(i);r.set(Q.bytes.fromBits(s),n+e.length)}return this.pendingInput=t.subarray(n),this.output=bt(this.output,r),r}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update(Q.bytes.toBits(this.pendingInput));t=Q.bytes.fromBits(e),this.output=bt(this.output,t)}const e=await wt.sign(it,this.keys.authentication,this.output.subarray(dt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,ft);return{data:bt(t,n),signature:n}}}async function _t(t,e,n){const r=(new TextEncoder).encode(e),i=await wt.importKey("raw",r,at,!1,lt),s=await wt.deriveBits(Object.assign({salt:n},ot),i,8*(2*ut[t.strength]+2)),a=new Uint8Array(s);t.keys={key:Q.bytes.toBits(a.subarray(0,ut[t.strength])),authentication:await wt.importKey("raw",a.subarray(ut[t.strength],2*ut[t.strength]),ct,!1,ht),passwordVerification:a.subarray(2*ut[t.strength])}}function bt(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function mt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class At{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=vt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(et);t=t.subarray(xt)}return vt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ut{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const r=crypto.getRandomValues(new Uint8Array(xt));r[11]=this.passwordVerification,e=new Uint8Array(t.length+r.length),e.set(Et(this,r),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(Et(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function vt(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=zt(t)^e[r],Rt(t,n[r]);return n}function Et(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=zt(t)^e[r],Rt(t,e[r]);return n}function kt(t,e){t.keys=[305419896,591751049,878082192],t.crcKey0=new Y(t.keys[0]),t.crcKey2=new Y(t.keys[2]);for(let n=0;n<e.length;n++)Rt(t,e.charCodeAt(n))}function Rt(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=It(t.keys[1]+Dt(t.keys[0])),t.keys[1]=It(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function zt(t){const e=2|t.keys[2];return Dt(Math.imul(e,1^e)>>>8)}function Dt(t){return 255&t}function It(t){return 4294967295&t}const St="deflate",Ft="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new gt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ft);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ft)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new Ut(e.password,e.passwordVerification):new yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const r=new Uint8Array(e.length+n.data.length);r.set(e,0),r.set(n.data,e.length),e=r}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Wt="init",Bt="append",Mt="flush",Ht="message";var Vt=(t,e,n,r,i,s)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=s,t.webWorker=i,t.onTaskFinished=()=>{t.busy=!1;r(t)&&t.worker&&t.worker.terminate()},i?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),t.worker.addEventListener(Ht,i,!1),t.interface={append:t=>n({type:Bt,data:t}),flush:()=>n({type:Mt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await r({scripts:n,type:Wt,options:e})}return r(n)}function r(n){const r=t.worker,i=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(t){r.postMessage(n)}else r.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return i}function i(n){const r=n.data;if(e){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,e.reject(r),e=null,t.onTaskFinished()}else if(i==Wt||i==Mt||i==Bt){const n=r.data;i==Mt?(e.resolve({data:new Uint8Array(n),signature:r.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(St)?new Tt(t,e):e.codecType.startsWith("inflate")?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Pt=[],Ot=[];function Lt(t){const e=!Ot.length;if(e)Pt=Pt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:r,webWorker:i,scripts:s}]=Ot.splice(0,1);e(Vt(t,n,r,Lt,i,s))}return e}function qt(t){if(t&&t.aborted)throw new Error("Abort error")}async function Nt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const jt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Gt{constructor(t){jt.forEach((e=>this[e]=t[e]))}}const Kt="File already exists",Zt="Zip file comment exceeds 64KB",Xt="File entry comment exceeds 64KB",Yt="File entry name exceeds 64KB",Jt="Version exceeds 65535",Qt="The modification date must be between 1/1/1980 and 12/31/2107",$t="The strength must equal 1, 2, or 3",te="Extra field type exceeds 65535",ee="Extra field data exceeds 64KB",ne=new Uint8Array([7,0,2,0,65,69,3,0,0]);function re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ie(t,e,n){t.setUint8(e,n)}function se(t,e,n){t.setUint16(e,n,!0)}function ae(t,e,n){t.setUint32(e,n,!0)}function oe(t,e,n){t.setBigUint64(e,n,!0)}x({Deflate:function(t){const e=new _,n=512,r=new Uint8Array(n);let i=t?t.level:-1;void 0===i&&(i=-1),e.deflateInit(i),e.next_out=r,this.append=function(t,i){let s,a,o=0,c=0,l=0;const h=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,s=e.deflate(0),0!=s)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?h.push(new Uint8Array(r)):h.push(new Uint8Array(r.subarray(0,e.next_out_index)))),l+=e.next_out_index,i&&e.next_in_index>0&&e.next_in_index!=o&&(i(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return a=new Uint8Array(l),h.forEach((function(t){a.set(t,c),c+=t.length})),a}},this.flush=function(){let t,i,s=0,a=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(r.subarray(0,e.next_out_index))),a+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(a),o.forEach((function(t){i.set(t,s),s+=t.length})),i}}}),t.BlobReader=C,t.BlobWriter=T,t.Data64URIReader=class extends S{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),r=4*Math.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),s=t-3*Math.floor(r/4);for(let t=s;t<s+e;t++)n[t-s]=i.charCodeAt(t);return n}},t.Data64URIWriter=class extends F{constructor(t){super(),this.data="data:"+(t||"")+";base64,",this.pending=[]}async writeUint8Array(t){super.writeUint8Array(t);let e=0,n=this.pending;const r=this.pending.length;for(this.pending="",e=0;e<3*Math.floor((r+t.length)/3)-r;e++)n+=String.fromCharCode(t[e]);for(;e<t.length;e++)this.pending+=String.fromCharCode(t[e]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_DUPLICATED_NAME=Kt,t.ERR_HTTP_RANGE=U,t.ERR_INVALID_COMMENT=Zt,t.ERR_INVALID_DATE=Qt,t.ERR_INVALID_ENCRYPTION_STRENGTH=$t,t.ERR_INVALID_ENTRY_COMMENT=Xt,t.ERR_INVALID_ENTRY_NAME=Yt,t.ERR_INVALID_EXTRAFIELD_DATA=ee,t.ERR_INVALID_EXTRAFIELD_TYPE=te,t.ERR_INVALID_VERSION=Jt,t.HttpRangeReader=class extends O{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=O,t.Reader=S,t.TextReader=class extends S{constructor(t){super(),this.blobReader=new C(new Blob([t],{type:v}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends F{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:v})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:v})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends S{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends F{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=F,t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=m,this.files=new Map,this.offset=t.size,this.maxOutputSize=0}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/"),this.files.has(t))throw new Error(Kt);const r=(new TextEncoder).encode(t);if(r.length>N)throw new Error(Yt);const i=n.comment||"",s=(new TextEncoder).encode(i);if(s.length>N)throw new Error(Xt);const a=this.options.version||n.version||0;if(a>N)throw new Error(Jt);const o=n.lastModDate||new Date;if(o<Z||o>K)throw new Error(Qt);const c=re(this,n,"password"),l=re(this,n,"encryptionStrength")||3,h=re(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error($t);e&&!e.initialized&&await e.init();let d=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),d=new Uint8Array(t),u.forEach(((t,n)=>{if(n>N)throw new Error(te);if(t.length>N)throw new Error(ee);d.set(new Uint16Array([n]),e),d.set(new Uint16Array([t.length]),e+2),d.set(t,e+4),e+=4+t.length}))}const f=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=f,await Promise.resolve();const p=n.zip64||this.options.zip64||this.offset>=q||f>=q||this.offset+this.maxOutputSize>=q,w=re(this,n,"level"),g=re(this,n,"useWebWorkers"),y=re(this,n,"bufferedWrite");let _=re(this,n,"keepOrder"),b=re(this,n,"dataDescriptor");const m=re(this,n,"signal");void 0===b&&(b=!0),void 0===_&&(_=!0);const x=await async function(t,e,n,r){const i=t.files,s=t.writer;let a,o,c;i.set(e,null);try{let l,h;try{r.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),r.bufferedWrite||t.lockWrite||!r.dataDescriptor?(l=new T,await l.init()):(t.lockWrite=new Promise((t=>a=t)),s.initialized||await s.init(),l=s),h=await async function(t,e,n,r){const i=r.rawFilename,s=r.lastModDate,a=r.password,o=Boolean(a&&a.length),c=r.level,l=0!==c&&!r.directory,h=r.zip64;let d,u;if(o&&!r.zipCrypto){d=new Uint8Array(ne.length+2);const t=new DataView(d.buffer);se(t,0,39169),d.set(ne,2),u=r.encryptionStrength,ie(t,8,u)}else d=new Uint8Array(0);const f={version:r.version||20,zip64:h,directory:Boolean(r.directory),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:r.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:d,rawExtraField:r.rawExtraField};let p=2048;r.dataDescriptor&&(p|=8);let w=0;l&&(w=8);h&&(f.version=f.version>45?f.version:45);o&&(p|=1,r.zipCrypto||(f.version=f.version>51?f.version:51,w=99,l&&(f.rawExtraFieldAES[9]=8)));const g=f.headerArray=new Uint8Array(26),y=new DataView(g.buffer);se(y,0,f.version),se(y,2,p),se(y,4,w);const _=new Uint32Array(1),b=new DataView(_.buffer);se(b,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),se(b,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const m=_[0];ae(y,6,m),se(y,22,i.length),se(y,24,0),se(y,24,d.length+f.rawExtraField.length);const x=new Uint8Array(30+i.length+d.length+f.rawExtraField.length);let A;ae(new DataView(x.buffer),0,j),x.set(g,4),x.set(i,30),x.set(d,30+i.length),x.set(f.rawExtraField,30+i.length+d.length);let U=0,v=0;if(t){U=t.size;const i=await function(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Pt.length<n.maxWorkers){const n={};return Pt.push(n),Vt(n,t,e,Lt,r,i)}{const n=Pt.find((t=>!t.busy));return n?Vt(n,t,e,Lt,r,i):new Promise((n=>Ot.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:St,level:c,password:a,encryptionStrength:u,zipCrypto:o&&r.zipCrypto,passwordVerification:o&&r.zipCrypto&&m>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:r.useWebWorkers},n);await e.writeUint8Array(x),A=await async function(t,e,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const h=a.signal;if(c<i){qt(h);const d=await e.readUint8Array(c+r,Math.min(o,i-c)),u=d.length;qt(h);const f=await t.append(d);if(qt(h),l+=await Nt(n,f),a.onprogress)try{a.onprogress(c+u,i)}catch(t){}return s(c+o,l)}{const e=await t.flush();return l+=await Nt(n,e.data),{signature:e.signature,length:l}}}()}(i,t,e,0,U,n,{onprogress:r.onprogress,signal:r.signal}),v=A.length}else await e.writeUint8Array(x);let E,k=new Uint8Array(0);r.dataDescriptor&&(k=new Uint8Array(h?24:16),E=new DataView(k.buffer),ae(E,0,G));if(t)if(o&&!r.zipCrypto||void 0===A.signature||(ae(y,10,A.signature),f.signature=A.signature,r.dataDescriptor&&ae(E,4,A.signature)),h){const t=new DataView(f.rawExtraFieldZip64.buffer);se(t,0,1),se(t,2,24),ae(y,14,q),oe(t,12,BigInt(v)),ae(y,18,q),oe(t,4,BigInt(U)),r.dataDescriptor&&(oe(E,8,BigInt(v)),oe(E,16,BigInt(U)))}else ae(y,14,v),ae(y,18,U),r.dataDescriptor&&(ae(E,8,v),ae(E,12,U));r.dataDescriptor&&await e.writeUint8Array(k);const R=x.length+(A?A.length:0)+k.length;return Object.assign(f,{compressedSize:v,uncompressedSize:U,lastModDate:s,rawLastModDate:m,encrypted:o,length:R}),f}(n,l,t.config,r)}catch(t){throw i.delete(e),t}if(i.set(e,h),l!=s){const e=l.getData(),n=new FileReader,i=new Promise(((t,r)=>{n.onload=e=>t(e.target.result),n.onerror=r,n.readAsArrayBuffer(e)})),[a]=await Promise.all([i,t.lockWrite,o]);if(!r.dataDescriptor){const t=new DataView(a);h.encrypted&&!r.zipCrypto||ae(t,14,h.signature),h.zip64?(ae(t,18,q),ae(t,22,q)):(ae(t,18,h.compressedSize),ae(t,22,h.uncompressedSize))}await s.writeUint8Array(new Uint8Array(a))}if(h.offset=t.offset,h.zip64){oe(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),a&&a()}}(this,t,e,Object.assign({},n,{rawFilename:r,rawComment:s,version:a,lastModDate:o,rawExtraField:d,zip64:p,password:c,level:w,useWebWorkers:g,encryptionStrength:l,zipCrypto:h,bufferedWrite:y,keepOrder:_,dataDescriptor:b,signal:m}));return this.maxOutputSize-=f,Object.assign(x,{name:t,comment:i,extraField:u}),new Gt(x)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let r=0,i=0,s=this.offset,a=n.size;for(const[,t]of n)i+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||s>=q||i>=q||a>=N,c=new Uint8Array(i+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=N))throw new Error(Zt);se(l,r+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,i=t.rawExtraFieldAES,s=n.length+i.length+t.rawExtraField.length;ae(l,r,33639248),se(l,r+4,t.version),c.set(t.headerArray,r+6),se(l,r+30,s),se(l,r+32,t.rawComment.length),t.directory&&ie(l,r+38,16),t.zip64?ae(l,r+42,q):ae(l,r+42,t.offset),c.set(e,r+46),c.set(n,r+46+e.length),c.set(i,r+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+i.length),c.set(t.rawComment,r+46+e.length+s),r+=46+e.length+s+t.rawComment.length}return o&&(ae(l,r,101075792),oe(l,r+4,BigInt(44)),se(l,r+12,45),se(l,r+14,45),oe(l,r+24,BigInt(a)),oe(l,r+32,BigInt(a)),oe(l,r+40,BigInt(i)),oe(l,r+48,BigInt(s)),ae(l,r+56,117853008),oe(l,r+64,BigInt(s)+BigInt(i)),ae(l,r+72,1),a=N,s=q,i=q,r+=76),ae(l,r,101010256),se(l,r+8,a),se(l,r+10,a),ae(l,r+12,i),ae(l,r+16,s),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=x,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})}(this,(function(e){"use strict";const t=256,n=256,r=-2,i=-5;function s(e){return e.map((([e,t])=>new Array(e).fill(t,0,e))).flat()}const a=[0,1,2,3].concat(...s([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=function(n){const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a<s;a++)0!==r[2*a]?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):r[2*a+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=l,a=Math.floor(n.heap_len/2);a>=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(t){const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,c,l,d,u,h,f=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<573;o++)c=t.heap[o],d=n[2*n[2*c+1]+1]+1,d>a&&(d=a,f++),n[2*c+1]=d,c>e.max_code||(t.bl_count[d]++,u=0,c>=s&&(u=i[c-s]),h=n[2*c],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*c+1]+u)));if(0!==f){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,f-=2}while(f>0);for(d=a;0!==d;d--)for(c=t.bl_count[d];0!==c;)l=t.heap[--o],l>e.max_code||(n[2*l+1]!=d&&(t.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(e,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))}(r,e.max_code,n.bl_count)}}function c(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(e){return e<256?a[e]:a[256+(e>>>7)]},o.extra_lbits=[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],o.extra_dbits=[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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const d=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],h=113,f=666,p=258,w=262;function g(e,t,n,r){const i=e[2*t],s=e[2*n];return i<s||i==s&&r[t]<=r[n]}function _(){const e=this;let s,a,l,_,y,b,m,x,A,U,v,k,E,R,z,S,I,F,D,T,W,B,C,H,M,O,P,j,L,V,q,N,K;const G=new o,Z=new o,X=new o;let Y,J,Q,$,ee,te,ne,re;function ie(){let t;for(t=0;t<286;t++)q[2*t]=0;for(t=0;t<30;t++)N[2*t]=0;for(t=0;t<19;t++)K[2*t]=0;q[512]=1,e.opt_len=e.static_len=0,Q=ee=0}function se(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let c=0;c<=t;c++)n=i,i=e[2*(c+1)+1],++s<a&&n==i||(s<o?K[2*n]+=s:0!==n?(n!=r&&K[2*n]++,K[32]++):s<=10?K[34]++:K[36]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function ae(t){e.pending_buf[e.pending++]=t}function oe(e){ae(255&e),ae(e>>>8&255)}function ce(e,t){let n;const r=t;re>16-r?(n=e,ne|=n<<re&65535,oe(ne),ne=n>>>16-re,re+=r-16):(ne|=e<<re&65535,re+=r)}function le(e,t){const n=2*e;ce(65535&t[n],65535&t[n+1])}function de(e,t){let n,r,i=-1,s=e[1],a=0,o=7,c=4;for(0===s&&(o=138,c=3),n=0;n<=t;n++)if(r=s,s=e[2*(n+1)+1],!(++a<o&&r==s)){if(a<c)do{le(r,K)}while(0!=--a);else 0!==r?(r!=i&&(le(r,K),a--),le(16,K),ce(a-3,2)):a<=10?(le(17,K),ce(a-3,3)):(le(18,K),ce(a-11,7));a=0,i=r,0===s?(o=138,c=3):r==s?(o=6,c=3):(o=7,c=4)}}function ue(){16==re?(oe(ne),ne=0,re=0):re>=8&&(ae(255&ne),ne>>>=8,re-=8)}function he(n,r){let i,s,a;if(e.pending_buf[$+2*Q]=n>>>8&255,e.pending_buf[$+2*Q+1]=255&n,e.pending_buf[Y+Q]=255&r,Q++,0===n?q[2*r]++:(ee++,n--,q[2*(o._length_code[r]+t+1)]++,N[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=W-I,a=0;a<30;a++)i+=N[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,ee<Math.floor(Q/2)&&i<Math.floor(s/2))return!0}return Q==J-1}function fe(r,i){let s,a,c,l,d=0;if(0!==Q)do{s=e.pending_buf[$+2*d]<<8&65280|255&e.pending_buf[$+2*d+1],a=255&e.pending_buf[Y+d],d++,0===s?le(a,r):(c=o._length_code[a],le(c+t+1,r),l=o.extra_lbits[c],0!==l&&(a-=o.base_length[c],ce(a,l)),s--,c=o.d_code(s),le(c,i),l=o.extra_dbits[c],0!==l&&(s-=o.base_dist[c],ce(s,l)))}while(d<Q);le(n,r),te=r[513]}function pe(){re>8?oe(ne):re>0&&ae(255&ne),ne=0,re=0}function we(t,n,r){ce(0+(r?1:0),3),function(t,n,r){pe(),te=8,r&&(oe(n),oe(~n)),e.pending_buf.set(x.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function ge(t,n,r){let i,s,a=0;P>0?(G.build_tree(e),Z.build_tree(e),a=function(){let t;for(se(q,G.max_code),se(N,Z.max_code),X.build_tree(e),t=18;t>=3&&0===K[2*o.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=t?we(t,n,r):s==i?(ce(2+(r?1:0),3),fe(c.static_ltree,c.static_dtree)):(ce(4+(r?1:0),3),function(e,t,n){let r;for(ce(e-257,5),ce(t-1,5),ce(n-4,4),r=0;r<n;r++)ce(K[2*o.bl_order[r]+1],3);de(q,e-1),de(N,t-1)}(G.max_code+1,Z.max_code+1,a+1),fe(q,N)),ie(),r&&pe()}function _e(e){ge(I>=0?I:-1,W-I,e),I=W,s.flush_pending()}function ye(){let e,t,n,r;do{if(r=A-C-W,0===r&&0===W&&0===C)r=y;else if(-1==r)r--;else if(W>=y+y-w){x.set(x.subarray(y,y+y),0),B-=y,W-=y,I-=y,e=E,n=e;do{t=65535&v[--n],v[n]=t>=y?t-y:0}while(0!=--e);e=y,n=e;do{t=65535&U[--n],U[n]=t>=y?t-y:0}while(0!=--e);r+=y}if(0===s.avail_in)return;e=s.read_buf(x,W+C,r),C+=e,C>=3&&(k=255&x[W],k=(k<<S^255&x[W+1])&z)}while(C<w&&0!==s.avail_in)}function be(e){let t,n,r=M,i=W,s=H;const a=W>y-w?W-(y-w):0;let o=V;const c=m,l=W+p;let d=x[i+s-1],u=x[i+s];H>=L&&(r>>=2),o>C&&(o=C);do{if(t=e,x[t+s]==u&&x[t+s-1]==d&&x[t]==x[i]&&x[++t]==x[i+1]){i+=2,t++;do{}while(x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&i<l);if(n=p-(l-i),i=l-p,n>s){if(B=e,s=n,n>=o)break;d=x[i+s-1],u=x[i+s]}}}while((e=65535&U[e&c])>a&&0!=--r);return s<=C?s:C}function me(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,a=h,_=0,G.dyn_tree=q,G.stat_desc=c.static_l_desc,Z.dyn_tree=N,Z.stat_desc=c.static_d_desc,X.dyn_tree=K,X.stat_desc=c.static_bl_desc,ne=0,re=0,te=8,ie(),function(){A=2*y,v[E-1]=0;for(let e=0;e<E-1;e++)v[e]=0;O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,M=d[P].max_chain,W=0,I=0,C=0,F=H=2,T=0,k=0}(),0}e.depth=[],e.bl_count=[],e.heap=[],q=[],N=[],K=[],e.pqdownheap=function(t,n){const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s<e.heap_len&&g(t,r[s+1],r[s],e.depth)&&s++,!g(t,i,r[s],e.depth));)r[n]=r[s],n=s,s<<=1;r[n]=i},e.deflateInit=function(t,n,i,s,a,o){return s||(s=8),a||(a=8),o||(o=0),t.msg=null,-1==n&&(n=6),a<1||a>9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(t.dstate=e,b=i,y=1<<b,m=y-1,R=a+7,E=1<<R,z=E-1,S=Math.floor((R+3-1)/3),x=new Uint8Array(2*y),U=[],v=[],J=1<<a+6,e.pending_buf=new Uint8Array(4*J),l=4*J,$=Math.floor(J/2),Y=3*J,P=n,j=o,me(t))},e.deflateEnd=function(){return 42!=a&&a!=h&&a!=f?r:(e.pending_buf=null,v=null,U=null,x=null,e.dstate=null,a==h?-3:0)},e.deflateParams=function(e,t,n){let i=0;return-1==t&&(t=6),t<0||t>9||n<0||n>2?r:(d[P].func!=d[t].func&&0!==e.total_in&&(i=e.deflate(1)),P!=t&&(P=t,O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,M=d[P].max_chain),j=n,i)},e.deflateSetDictionary=function(e,t,n){let i,s=n,o=0;if(!t||42!=a)return r;if(s<3)return 0;for(s>y-w&&(s=y-w,o=n-s),x.set(t.subarray(o,o+s),0),W=s,I=s,k=255&x[0],k=(k<<S^255&x[1])&z,i=0;i<=s-3;i++)k=(k<<S^255&x[i+2])&z,U[i&m]=v[k],v[k]=i;return 0},e.deflate=function(t,o){let p,g,A,R,M;if(o>4||o<0)return r;if(!t.next_out||!t.next_in&&0!==t.avail_in||a==f&&4!=o)return t.msg=u[4],r;if(0===t.avail_out)return t.msg=u[7],i;var L;if(s=t,R=_,_=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==W&&(g|=32),g+=31-g%31,a=h,ae((L=g)>>8&255),ae(255&L)),0!==e.pending){if(s.flush_pending(),0===s.avail_out)return _=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=u[7],i;if(a==f&&0!==s.avail_in)return t.msg=u[7],i;if(0!==s.avail_in||0!==C||0!=o&&a!=f){switch(M=-1,d[P].func){case 0:M=function(e){let t,n=65535;for(n>l-5&&(n=l-5);;){if(C<=1){if(ye(),0===C&&0==e)return 0;if(0===C)break}if(W+=C,C=0,t=I+n,(0===W||W>=t)&&(C=W-t,W=t,_e(!1),0===s.avail_out))return 0;if(W-I>=y-w&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 1:M=function(e){let t,n=0;for(;;){if(C<w){if(ye(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(k=(k<<S^255&x[W+2])&z,n=65535&v[k],U[W&m]=v[k],v[k]=W),0!==n&&(W-n&65535)<=y-w&&2!=j&&(F=be(n)),F>=3)if(t=he(W-B,F-3),C-=F,F<=O&&C>=3){F--;do{W++,k=(k<<S^255&x[W+2])&z,n=65535&v[k],U[W&m]=v[k],v[k]=W}while(0!=--F);W++}else W+=F,F=0,k=255&x[W],k=(k<<S^255&x[W+1])&z;else t=he(0,255&x[W]),C--,W++;if(t&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 2:M=function(e){let t,n,r=0;for(;;){if(C<w){if(ye(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(k=(k<<S^255&x[W+2])&z,r=65535&v[k],U[W&m]=v[k],v[k]=W),H=F,D=B,F=2,0!==r&&H<O&&(W-r&65535)<=y-w&&(2!=j&&(F=be(r)),F<=5&&(1==j||3==F&&W-B>4096)&&(F=2)),H>=3&&F<=H){n=W+C-3,t=he(W-1-D,H-3),C-=H-1,H-=2;do{++W<=n&&(k=(k<<S^255&x[W+2])&z,r=65535&v[k],U[W&m]=v[k],v[k]=W)}while(0!=--H);if(T=0,F=2,W++,t&&(_e(!1),0===s.avail_out))return 0}else if(0!==T){if(t=he(0,255&x[W-1]),t&&_e(!1),W++,C--,0===s.avail_out)return 0}else T=1,W++,C--}return 0!==T&&(t=he(0,255&x[W-1]),T=0),_e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o)}if(2!=M&&3!=M||(a=f),0==M||2==M)return 0===s.avail_out&&(_=-1),0;if(1==M){if(1==o)ce(2,3),le(n,c.static_ltree),ue(),1+te+10-re<9&&(ce(2,3),le(n,c.static_ltree),ue()),te=7;else if(we(0,0,!1),3==o)for(p=0;p<E;p++)v[p]=0;if(s.flush_pending(),0===s.avail_out)return _=-1,0}}return 4!=o?0:1}}function y(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}y.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new _,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):r},deflateEnd:function(){const e=this;if(!e.dstate)return r;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams:function(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):r},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):r},read_buf:function(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending:function(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(e){if(void 0!==e.chunkSize&&(m.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(m.maxWorkers=e.maxWorkers),void 0!==e.useWebWorkers&&(m.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(m.Deflate=e.Deflate),void 0!==e.Inflate&&(m.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=e.workerScripts.inflate}}}const A="HTTP error ",U="HTTP Range not supported",v="text/plain",k="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",S="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class F extends I{}class D extends I{writeUint8Array(e){this.size+=e.length}}class T extends F{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){const n=new FileReader;return new Promise(((r,i)=>{n.onload=e=>r(new Uint8Array(e.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}class W extends D{constructor(e){super(),this.offset=0,this.contentType=e,this.blob=new Blob([],{type:e})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class B extends F{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest){const e=await H(R,this.url,this.options);if(this.size=Number(e.headers.get(k)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(E)!=S)throw new Error(U);void 0===this.size&&await C(this,this.options)}else await C(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await H(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+e+"-"+(e+t-1)}));if(206!=n.status)throw new Error(U);return new Uint8Array(await n.arrayBuffer())}return this.data||await C(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function C(e,t){const n=await H(z,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function H(e,t,n,r){r=Object.assign({},n.headers,r);const i=await fetch(t,Object.assign({},n,{method:e,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class M extends F{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest)return new Promise(((e,t)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(k)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(E)==S?e():t(new Error(U)):void 0===this.size?O(this,this.url).then((()=>e())).catch(t):e()}),t)));await O(this,this.url)}async readUint8Array(e,t){if(!this.useRangeHeader)return this.data||await O(this,this.url),new Uint8Array(this.data.subarray(e,e+t));if(206!=(await new Promise(((n,r)=>P(z,this.url,(e=>n(new Uint8Array(e.response))),r,[["Range","bytes="+e+"-"+(e+t-1)]])))).status)throw new Error(U)}}function O(e,t){return new Promise(((n,r)=>P(z,t,(t=>{e.data=new Uint8Array(t.response),e.size||(e.size=e.data.length),n()}),r)))}function P(e,t,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(e,t),i.forEach((e=>s.setRequestHeader(e[0],e[1]))),s.responseType="arraybuffer",s.send(),s}class j extends F{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new M(e,t):this.reader=new B(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}function L(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}const V=4294967295,q=65535,N=67324752,K=134695760,G=new Date(2107,11,31),Z=new Date(1980,0,1),X=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;X[e]=t}class Y{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)t=t>>>8^X[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const J={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=J.getPartial(n);return 32===r?e.concat(t):J._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+J.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=J.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=J.getPartial(i);return r.push(J.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Q={bytes:{fromBits(e){const t=J.bitLength(e)/8,n=new Uint8Array(t);let r;for(let i=0;i<t;i++)0==(3&i)&&(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(J.partial(8*(3&n),r)),t}}},$={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};$.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;"string"==typeof e&&(e=Q.utf8String.toBits(e));const n=t._buffer=J.concat(t._buffer,e),r=t._length,i=t._length=r+J.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize:function(){const e=this;let t=e._buffer;const n=e._h;t=J.concat(t,[J.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,r){return e<=19?t&n|~t&r:e<=39?t^n^r:e<=59?t&n|t&r|n&r:e<=79?t^n^r:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],s=n[1],a=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const n=t._S(5,i)+t._f(e,s,a,o)+c+r[e]+t._key[Math.floor(e/20)]|0;c=o,o=a,a=t._S(30,s),s=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}};const ee={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,c=1;if(4!==i&&6!==i&&8!==i)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=s<=4||e<4?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,c,l;for(let e=0;e<256;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,r[s]=d,l=i[c=i[o=i[d]]];let u=16843009*l^65537*c^257*o^16843008*d,h=257*i[s]^16843008*s;for(let n=0;n<4;n++)e[n][d]=h=h<<24^h>>>8,t[n][s]=u=u<<24^u>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],c=s[2],l=s[3],d=s[4];let u,h,f,p=e[0]^n[0],w=e[t?3:1]^n[1],g=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;e<r;e++)u=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&_]^n[y],h=a[w>>>24]^o[g>>16&255]^c[_>>8&255]^l[255&p]^n[y+1],f=a[g>>>24]^o[_>>16&255]^c[p>>8&255]^l[255&w]^n[y+2],_=a[_>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[y+3],y+=4,p=u,w=h,g=f;for(let e=0;e<4;e++)i[t?3&-e:e]=d[p>>>24]<<24^d[w>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^n[y++],u=p,p=w,w=g,g=_,_=u;return i}}},te={ctrGladman:class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=J.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return J.clamp(t,i)}}},ne={hmacSha1:class{constructor(e){const t=this,n=t._hash=$.sha1,r=[[],[]],i=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>i&&(e=n.hash(e));for(let t=0;t<i;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}}},re="Invalid pasword",ie=16,se={name:"PBKDF2"},ae=Object.assign({hash:{name:"HMAC"}},se),oe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},se),ce=["deriveBits"],le=[8,12,16],de=[16,24,32],ue=10,he=[0,0,0,0],fe=crypto.subtle,pe=Q.bytes,we=ee.aes,ge=te.ctrGladman,_e=ne.hmacSha1;class ye{constructor(e,t,n){Object.assign(this,{password:e,signed:t,strength:n-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;if(t.password){const n=Ue(e,0,le[t.strength]+2);await async function(e,t,n){await xe(e,n,Ue(t,0,le[e.strength]));const r=Ue(t,le[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(re)}(t,n,t.password),t.password=null,t.aesCtrGladman=new ge(new we(t.keys.key),Array.from(he)),t.hmac=new _e(t.keys.authentication),e=Ue(e,le[t.strength]+2)}return me(t,e,new Uint8Array(e.length-ue-(e.length-ue)%ie),0,ue,!0)}async flush(){const e=this,t=e.pendingInput,n=Ue(t,0,t.length-ue),r=Ue(t,t.length-ue);let i=new Uint8Array(0);if(n.length){const t=pe.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);i=pe.fromBits(r)}let s=!0;if(e.signed){const t=Ue(pe.fromBits(e.hmac.digest()),0,ue);for(let e=0;e<ue;e++)t[e]!=r[e]&&(s=!1)}return{valid:s,data:i}}}class be{constructor(e,t){Object.assign(this,{password:e,strength:t-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;let n=new Uint8Array(0);t.password&&(n=await async function(e,t){const n=crypto.getRandomValues(new Uint8Array(le[e.strength]));return await xe(e,t,n),Ae(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new ge(new we(t.keys.key),Array.from(he)),t.hmac=new _e(t.keys.authentication));const r=new Uint8Array(n.length+e.length-e.length%ie);return r.set(n,0),me(t,e,r,n.length,0)}async flush(){const e=this;let t=new Uint8Array(0);if(e.pendingInput.length){const n=e.aesCtrGladman.update(pe.toBits(e.pendingInput));e.hmac.update(n),t=pe.fromBits(n)}const n=Ue(pe.fromBits(e.hmac.digest()),0,ue);return{data:Ae(t,n),signature:n}}}function me(e,t,n,r,i,s){const a=t.length-i;let o;for(e.pendingInput.length&&(t=Ae(e.pendingInput,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,a-a%ie)),o=0;o<=a-ie;o+=ie){const i=pe.toBits(Ue(t,o,o+ie));s&&e.hmac.update(i);const a=e.aesCtrGladman.update(i);s||e.hmac.update(a),n.set(pe.fromBits(a),o+r)}return e.pendingInput=Ue(t,o),n}async function xe(e,t,n){const r=(new TextEncoder).encode(t),i=await fe.importKey("raw",r,ae,!1,ce),s=await fe.deriveBits(Object.assign({salt:n},oe),i,8*(2*de[e.strength]+2)),a=new Uint8Array(s);e.keys={key:pe.toBits(Ue(a,0,de[e.strength])),authentication:pe.toBits(Ue(a,de[e.strength],2*de[e.strength])),passwordVerification:Ue(a,2*de[e.strength])}}function Ae(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ue(e,t,n){return e.subarray(t,n)}const ve=12;class ke{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Se(this,e)}async append(e){const t=this;if(t.password){const n=Re(t,e.subarray(0,ve));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(re);e=e.subarray(ve)}return Re(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ee{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Se(this,e)}async append(e){const t=this;let n,r;if(t.password){t.password=null;const i=crypto.getRandomValues(new Uint8Array(ve));i[11]=t.passwordVerification,n=new Uint8Array(e.length+i.length),n.set(ze(t,i),0),r=ve}else n=new Uint8Array(e.length),r=0;return n.set(ze(t,e),r),n}async flush(){return{data:new Uint8Array(0)}}}function Re(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Fe(e)^t[r],Ie(e,n[r]);return n}function ze(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Fe(e)^t[r],Ie(e,t[r]);return n}function Se(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new Y(e.keys[0]),e.crcKey2=new Y(e.keys[2]);for(let n=0;n<t.length;n++)Ie(e,t.charCodeAt(n))}function Ie(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Te(e.keys[1]+De(e.keys[0])),e.keys[1]=Te(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function Fe(e){const t=2|e.keys[2];return De(Math.imul(t,1^t)>>>8)}function De(e){return 255&e}function Te(e){return 4294967295&e}const We="deflate",Be="Invalid signature";class Ce{constructor(e,{signature:t,password:n,signed:r,compressed:i,zipCrypto:s,passwordVerification:a,encryptionStrength:o}){const c=Boolean(n);Object.assign(this,{signature:t,encrypted:c,signed:r,compressed:i,inflate:i&&new e,crc32:r&&new Y,zipCrypto:s,decrypt:c&&s?new ke(n,a):new ye(n,r,o)})}async append(e){const t=this;return t.encrypted&&e.length&&(e=await t.decrypt.append(e)),t.compressed&&e.length&&(e=await t.inflate.append(e)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),e}async flush(){const e=this;let t,n=new Uint8Array(0);if(e.encrypted){const t=await e.decrypt.flush();if(!t.valid)throw new Error(Be);n=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const n=new DataView(new Uint8Array(4).buffer);if(t=e.crc32.get(),n.setUint32(0,t),e.cipher!=n.getUint32(0,!1))throw new Error(Be)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class He{constructor(e,{encrypted:t,signed:n,compressed:r,level:i,zipCrypto:s,password:a,passwordVerification:o,encryptionStrength:c}){Object.assign(this,{encrypted:t,signed:n,compressed:r,deflate:r&&new e({level:i||5}),crc32:n&&new Y,zipCrypto:s,encrypt:t&&s?new Ee(a,o):new be(a,c)})}async append(e){const t=this;let n=e;return t.compressed&&e.length&&(n=await t.deflate.append(e)),t.encrypted&&n.length&&(n=await t.encrypt.append(n)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),n}async flush(){const e=this;let t,n=new Uint8Array(0);if(e.compressed&&(n=await e.deflate.flush()||new Uint8Array(0)),e.encrypted){n=await e.encrypt.append(n);const r=await e.encrypt.flush();t=r.signature;const i=new Uint8Array(n.length+r.data.length);i.set(n,0),i.set(r.data,n.length),n=i}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:n,signature:t}}}const Me="init",Oe="append",Pe="flush",je="message";var Le=(e,t,n,r,i,s)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:s,webWorker:i,onTaskFinished(){e.busy=!1;r(e)&&e.worker&&e.worker.terminate()}}),i?function(e){let t;e.interface||(e.worker=new Worker(new URL(e.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),e.worker.addEventListener(je,i,!1),e.interface={append:e=>n({type:Oe,data:e}),flush:()=>n({type:Pe})});return e.interface;async function n(n){if(!t){const t=e.options,n=e.scripts.slice(1);await r({scripts:n,type:Me,options:t})}return r(n)}function r(n){const r=e.worker,i=new Promise(((e,n)=>t={resolve:e,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(e){r.postMessage(n)}else r.postMessage(n)}catch(n){t.reject(n),t=null,e.onTaskFinished()}return i}function i(n){const r=n.data;if(t){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,t.reject(r),t=null,e.onTaskFinished()}else if(i==Me||i==Pe||i==Oe){const n=r.data;i==Pe?(t.resolve({data:new Uint8Array(n),signature:r.signature}),t=null,e.onTaskFinished()):t.resolve(n&&new Uint8Array(n))}}}}(e):function(e){const t=function(e,t){return t.codecType.startsWith(We)?new He(e,t):t.codecType.startsWith("inflate")?new Ce(e,t):void 0}(e.codecConstructor,e.options);return{async append(n){try{return await t.append(n)}catch(t){throw e.onTaskFinished(),t}},async flush(){try{return await t.flush()}finally{e.onTaskFinished()}}}}(e));let Ve=[],qe=[];function Ne(e){const t=!qe.length;if(t)Ve=Ve.filter((t=>t!=e));else{const[{resolve:t,codecConstructor:n,options:r,webWorker:i,scripts:s}]=qe.splice(0,1);t(Le(e,n,r,Ne,i,s))}return t}function Ke(e){if(e&&e.aborted)throw new Error("Abort error")}async function Ge(e,t){return t.length&&await e.writeUint8Array(t),t.length}const Ze=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Xe{constructor(e){Ze.forEach((t=>this[t]=e[t]))}}const Ye="File already exists",Je="Zip file comment exceeds 64KB",Qe="File entry comment exceeds 64KB",$e="File entry name exceeds 64KB",et="Version exceeds 65535",tt="The modification date must be between 1/1/1980 and 12/31/2107",nt="The strength must equal 1, 2, or 3",rt="Extra field type exceeds 65535",it="Extra field data exceeds 64KB",st=new Uint8Array([7,0,2,0,65,69,3,0,0]);function at(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function ot(e,t,n){e.setUint8(t,n)}function ct(e,t,n){e.setUint16(t,n,!0)}function lt(e,t,n){e.setUint32(t,n,!0)}function dt(e,t,n){e.setBigUint64(t,n,!0)}function ut(e,t,n){e.set(t,n)}function ht(e){return new DataView(e.buffer)}x({Deflate:function(e){const t=new y,n=512,r=new Uint8Array(n);let i=e?e.level:-1;void 0===i&&(i=-1),t.deflateInit(i),t.next_out=r,this.append=function(e,i){let s,a,o=0,c=0,l=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,s=t.deflate(0),0!=s)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new Uint8Array(r)):d.push(new Uint8Array(r.subarray(0,t.next_out_index)))),l+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=o&&(i(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a=new Uint8Array(l),d.forEach((function(e){a.set(e,c),c+=e.length})),a}},this.flush=function(){let e,i,s=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(new Uint8Array(r.subarray(0,t.next_out_index))),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new Uint8Array(a),o.forEach((function(e){i.set(e,s),s+=e.length})),i}}}),e.BlobReader=T,e.BlobWriter=W,e.Data64URIReader=class extends F{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new Uint8Array(t),r=4*Math.floor(e/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),s=e-3*Math.floor(r/4);for(let e=s;e<s+t;e++)n[e-s]=i.charCodeAt(e);return n}},e.Data64URIWriter=class extends D{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}async writeUint8Array(e){super.writeUint8Array(e);let t=0,n=this.pending;const r=this.pending.length;for(this.pending="",t=0;t<3*Math.floor((r+e.length)/3)-r;t++)n+=String.fromCharCode(e[t]);for(;t<e.length;t++)this.pending+=String.fromCharCode(e[t]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},e.ERR_DUPLICATED_NAME=Ye,e.ERR_HTTP_RANGE=U,e.ERR_INVALID_COMMENT=Je,e.ERR_INVALID_DATE=tt,e.ERR_INVALID_ENCRYPTION_STRENGTH=nt,e.ERR_INVALID_ENTRY_COMMENT=Qe,e.ERR_INVALID_ENTRY_NAME=$e,e.ERR_INVALID_EXTRAFIELD_DATA=it,e.ERR_INVALID_EXTRAFIELD_TYPE=rt,e.ERR_INVALID_VERSION=et,e.HttpRangeReader=class extends j{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=j,e.Reader=F,e.TextReader=class extends F{constructor(e){super(),this.blobReader=new T(new Blob([e],{type:v}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends D{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:v})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:v})}getData(){const e=new FileReader;return new Promise(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=n,e.readAsText(this.blob,this.encoding)}))}},e.Uint8ArrayReader=class extends F{constructor(e){super(),this.array=e,this.size=e.length}async readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends D{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.Writer=D,e.ZipWriter=class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:m,files:new Map,offset:e.size,pendingOutputSize:0})}async add(e="",t,n={}){const r=this;if(e=e.trim(),n.directory&&!e.endsWith("/")?e+="/":n.directory=e.endsWith("/"),r.files.has(e))throw new Error(Ye);const i=(new TextEncoder).encode(e);if(i.length>q)throw new Error($e);const s=n.comment||"",a=(new TextEncoder).encode(s);if(a.length>q)throw new Error(Qe);const o=r.options.version||n.version||0;if(o>q)throw new Error(et);const c=n.lastModDate||new Date;if(c<Z||c>G)throw new Error(tt);const l=at(r,n,"password"),d=at(r,n,"encryptionStrength")||3,u=at(r,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(nt);t&&!t.initialized&&await t.init();let h=new Uint8Array(0);const f=n.extraField;if(f){let e=0,t=0;f.forEach((t=>e+=4+t.length)),h=new Uint8Array(e),f.forEach(((e,n)=>{if(n>q)throw new Error(rt);if(e.length>q)throw new Error(it);ut(h,new Uint16Array([n]),t),ut(h,new Uint16Array([e.length]),t+2),ut(h,e,t+4),t+=4+e.length}))}const p=t?Math.floor(1.05*t.size):0;r.pendingOutputSize+=p,await Promise.resolve();const w=n.zip64||r.options.zip64||r.offset>=V||p>=V||r.offset+r.pendingOutputSize>=V,g=at(r,n,"level"),_=at(r,n,"useWebWorkers"),y=at(r,n,"bufferedWrite");let b=at(r,n,"keepOrder"),m=at(r,n,"dataDescriptor");const x=at(r,n,"signal");void 0===m&&(m=!0),void 0===b&&(b=!0);const A=await async function(e,t,n,r){const i=e.files,s=e.writer;let a,o;i.set(t,null);try{let c,l,d;try{r.keepOrder&&(c=e.lockPreviousFile,e.lockPreviousFile=new Promise((e=>o=e))),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(l=new W,l.init()):(e.lockWrite=new Promise((e=>a=e)),s.initialized||await s.init(),l=s),d=await async function(e,t,n,r){const{rawFilename:i,lastModDate:s,password:a,level:o,zip64:c,zipCrypto:l,dataDescriptor:d,directory:u,version:h,rawComment:f,rawExtraField:p,useWebWorkers:w,onprogress:g,signal:_,encryptionStrength:y}=r,b=Boolean(a&&a.length),m=0!==o&&!u;let x;if(b&&!l){x=new Uint8Array(st.length+2);const e=ht(x);ct(e,0,39169),ut(x,st,2),ot(e,8,y)}else x=new Uint8Array(0);const A={version:h||20,zip64:c,directory:Boolean(u),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:f,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:x,rawExtraField:p};let U=2048;d&&(U|=8);let v=0;m&&(v=8);c&&(A.version=A.version>45?A.version:45);b&&(U|=1,l||(A.version=A.version>51?A.version:51,v=99,m&&(A.rawExtraFieldAES[9]=8)));const k=A.headerArray=new Uint8Array(26),E=ht(k);ct(E,0,A.version),ct(E,2,U),ct(E,4,v);const R=new Uint32Array(1),z=ht(R);ct(z,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),ct(z,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const S=R[0];lt(E,6,S),ct(E,22,i.length),ct(E,24,0),ct(E,24,x.length+A.rawExtraField.length);const I=new Uint8Array(30+i.length+x.length+A.rawExtraField.length);let F;lt(ht(I),0,N),ut(I,k,4),ut(I,i,30),ut(I,x,30+i.length),ut(I,A.rawExtraField,30+i.length+x.length);let D=0,T=0;if(e){D=e.size;const r=await function(e,t,n){const r=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[t.codecType]:[];if(Ve.length<n.maxWorkers){const n={};return Ve.push(n),Le(n,e,t,Ne,r,i)}{const n=Ve.find((e=>!e.busy));return n?Le(n,e,t,Ne,r,i):new Promise((n=>qe.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:We,level:o,password:a,encryptionStrength:y,zipCrypto:b&&l,passwordVerification:b&&l&&S>>8&255,signed:!0,compressed:m,encrypted:b,useWebWorkers:w},n);await t.writeUint8Array(I),F=await async function(e,t,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const d=a.signal;if(c<i){Ke(d);const u=await t.readUint8Array(c+r,Math.min(o,i-c)),h=u.length;Ke(d);const f=await e.append(u);if(Ke(d),l+=await Ge(n,f),a.onprogress)try{a.onprogress(c+h,i)}catch(e){}return s(c+o,l)}{const t=await e.flush();return l+=await Ge(n,t.data),{signature:t.signature,length:l}}}()}(r,e,t,0,D,n,{onprogress:g,signal:_}),T=F.length}else await t.writeUint8Array(I);let W,B=new Uint8Array(0);d&&(B=new Uint8Array(c?24:16),W=ht(B),lt(W,0,K));if(e){const e=F.signature;if(b&&!l||void 0===e||(lt(E,10,e),A.signature=e,d&<(W,4,e)),c){const e=ht(A.rawExtraFieldZip64);ct(e,0,1),ct(e,2,24),lt(E,14,V),dt(e,12,BigInt(T)),lt(E,18,V),dt(e,4,BigInt(D)),d&&(dt(W,8,BigInt(T)),dt(W,16,BigInt(D)))}else lt(E,14,T),lt(E,18,D),d&&(lt(W,8,T),lt(W,12,D))}d&&await t.writeUint8Array(B);const C=I.length+T+B.length;return Object.assign(A,{compressedSize:T,uncompressedSize:D,lastModDate:s,rawLastModDate:S,encrypted:b,length:C}),A}(n,l,e.config,r)}catch(e){throw i.delete(t),e}if(i.set(t,d),l!=s){const t=l.getData(),n=new FileReader,i=new Promise(((e,r)=>{n.onload=t=>e(t.target.result),n.onerror=r,n.readAsArrayBuffer(t)})),[a]=await Promise.all([i,e.lockWrite,c]);if(!r.dataDescriptor){const e=new DataView(a);d.encrypted&&!r.zipCrypto||lt(e,14,d.signature),d.zip64?(lt(e,18,V),lt(e,22,V)):(lt(e,18,d.compressedSize),lt(e,22,d.uncompressedSize))}await s.writeUint8Array(new Uint8Array(a))}if(d.offset=e.offset,d.zip64){dt(ht(d.rawExtraFieldZip64),20,BigInt(d.offset))}return e.offset+=d.length,d}finally{o&&o(),a&&a()}}(r,e,t,Object.assign({},n,{rawFilename:i,rawComment:a,version:o,lastModDate:c,rawExtraField:h,zip64:w,password:l,level:g,useWebWorkers:_,encryptionStrength:d,zipCrypto:u,bufferedWrite:y,keepOrder:b,dataDescriptor:m,signal:x}));return r.pendingOutputSize-=p,Object.assign(A,{name:e,comment:s,extraField:f}),new Xe(A)}async close(e=new Uint8Array(0)){const t=this,n=t.writer,r=t.files;let i=0,s=0,a=t.offset,o=r.size;for(const[,e]of r)s+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const c=t.options.zip64||a>=V||s>=V||o>=q,l=new Uint8Array(s+(c?98:22)),d=ht(l);if(e.length){if(!(e.length<=q))throw new Error(Je);ct(d,i+20,e.length)}for(const[,e]of r){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawExtraField:s,rawComment:a,version:o,headerArray:c,directory:u,zip64:h}=e,f=n.length+r.length+s.length;lt(d,i,33639248),ct(d,i+4,o),ut(l,c,i+6),ct(d,i+30,f),ct(d,i+32,a.length),u&&ot(d,i+38,16),lt(d,i+42,h?V:e.offset),ut(l,t,i+46),ut(l,n,i+46+t.length),ut(l,r,i+46+t.length+n.length),ut(l,s,46+t.length+n.length+r.length),ut(l,a,i+46+t.length+f),i+=46+t.length+f+a.length}return c&&(lt(d,i,101075792),dt(d,i+4,BigInt(44)),ct(d,i+12,45),ct(d,i+14,45),dt(d,i+24,BigInt(o)),dt(d,i+32,BigInt(o)),dt(d,i+40,BigInt(s)),dt(d,i+48,BigInt(a)),lt(d,i+56,117853008),dt(d,i+64,BigInt(a)+BigInt(s)),lt(d,i+72,1),o=q,a=V,s=V,i+=76),lt(d,i,101010256),ct(d,i+8,o),ct(d,i+10,o),lt(d,i+12,s),lt(d,i+16,a),await n.writeUint8Array(l),e.length&&await n.writeUint8Array(e),n.getData()}},e.configure=x,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=-2,n=-3,i=-5,r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],s=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],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],l=[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,112,112],d=[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],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],u=15;function h(){let t,e,r,a,s,h;function f(t,e,o,l,d,c,f,w,_,p,b){let y,g,x,m,k,v,A,R,U,E,F,D,z,S,T;E=0,k=o;do{r[t[e+E]]++,E++,k--}while(0!==k);if(r[0]==o)return f[0]=-1,w[0]=0,0;for(R=w[0],v=1;v<=u&&0===r[v];v++);for(A=v,R<v&&(R=v),k=u;0!==k&&0===r[k];k--);for(x=k,R>k&&(R=k),w[0]=R,S=1<<v;v<k;v++,S<<=1)if((S-=r[v])<0)return n;if((S-=r[k])<0)return n;for(r[k]+=S,h[1]=v=0,E=1,z=2;0!=--k;)h[z]=v+=r[E],z++,E++;k=0,E=0;do{0!==(v=t[e+E])&&(b[h[v]++]=k),E++}while(++k<o);for(o=h[x],h[0]=k=0,E=0,m=-1,D=-R,s[0]=0,F=0,T=0;A<=x;A++)for(y=r[A];0!=y--;){for(;A>D+R;){if(m++,D+=R,T=x-D,T=T>R?R:T,(g=1<<(v=A-D))>y+1&&(g-=y+1,z=A,v<T))for(;++v<T&&!((g<<=1)<=r[++z]);)g-=r[z];if(T=1<<v,p[0]+T>1440)return n;s[m]=F=p[0],p[0]+=T,0!==m?(h[m]=k,a[0]=v,a[1]=R,v=k>>>D-R,a[2]=F-s[m-1]-v,_.set(a,3*(s[m-1]+v))):f[0]=F}for(a[1]=A-D,E>=o?a[0]=192:b[E]<l?(a[0]=b[E]<256?0:96,a[2]=b[E++]):(a[0]=c[b[E]-l]+16+64,a[2]=d[b[E++]-l]),g=1<<A-D,v=k>>>D;v<T;v+=g)_.set(a,3*(F+v));for(v=1<<A-1;0!=(k&v);v>>>=1)k^=v;for(k^=v,U=(1<<D)-1;(k&U)!=h[m];)m--,D-=R,U=(1<<D)-1}return 0!==S&&1!=x?i:0}function w(n){let i;for(t||(t=[],e=[],r=new Int32Array(16),a=[],s=new Int32Array(u),h=new Int32Array(16)),e.length<n&&(e=[]),i=0;i<n;i++)e[i]=0;for(i=0;i<16;i++)r[i]=0;for(i=0;i<3;i++)a[i]=0;s.set(r.subarray(0,u),0),h.set(r.subarray(0,16),0)}this.inflate_trees_bits=function(r,a,s,o,l){let d;return w(19),t[0]=0,d=f(r,0,19,19,null,null,s,a,o,t,e),d==n?l.msg="oversubscribed dynamic bit lengths tree":d!=i&&0!==a[0]||(l.msg="incomplete dynamic bit lengths tree",d=n),d},this.inflate_trees_dynamic=function(r,a,s,u,h,_,p,b,y){let g;return w(288),t[0]=0,g=f(s,0,r,257,o,l,_,u,b,t,e),0!=g||0===u[0]?(g==n?y.msg="oversubscribed literal/length tree":-4!=g&&(y.msg="incomplete literal/length tree",g=n),g):(w(288),g=f(s,r,a,0,d,c,p,h,b,t,e),0!=g||0===h[0]&&r>257?(g==n?y.msg="oversubscribed distance tree":g==i?(y.msg="incomplete distance tree",g=n):-4!=g&&(y.msg="empty distance tree with lengths",g=n),g):0)}}h.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=a,i[0]=s,0};function f(){const t=this;let i,a,s,o,l=0,d=0,c=0,u=0,h=0,f=0,w=0,_=0,p=0,b=0;function y(t,e,i,a,s,o,l,d){let c,u,h,f,w,_,p,b,y,g,x,m,k,v,A,R;p=d.next_in_index,b=d.avail_in,w=l.bitb,_=l.bitk,y=l.write,g=y<l.read?l.read-y-1:l.end-y,x=r[t],m=r[e];do{for(;_<20;)b--,w|=(255&d.read_byte(p++))<<_,_+=8;if(c=w&x,u=i,h=a,R=3*(h+c),0!==(f=u[R]))for(;;){if(w>>=u[R+1],_-=u[R+1],0!=(16&f)){for(f&=15,k=u[R+2]+(w&r[f]),w>>=f,_-=f;_<15;)b--,w|=(255&d.read_byte(p++))<<_,_+=8;for(c=w&m,u=s,h=o,R=3*(h+c),f=u[R];;){if(w>>=u[R+1],_-=u[R+1],0!=(16&f)){for(f&=15;_<f;)b--,w|=(255&d.read_byte(p++))<<_,_+=8;if(v=u[R+2]+(w&r[f]),w>>=f,_-=f,g-=k,y>=v)A=y-v,y-A>0&&2>y-A?(l.window[y++]=l.window[A++],l.window[y++]=l.window[A++],k-=2):(l.window.set(l.window.subarray(A,A+2),y),y+=2,A+=2,k-=2);else{A=y-v;do{A+=l.end}while(A<0);if(f=l.end-A,k>f){if(k-=f,y-A>0&&f>y-A)do{l.window[y++]=l.window[A++]}while(0!=--f);else l.window.set(l.window.subarray(A,A+f),y),y+=f,A+=f,f=0;A=0}}if(y-A>0&&k>y-A)do{l.window[y++]=l.window[A++]}while(0!=--k);else l.window.set(l.window.subarray(A,A+k),y),y+=k,A+=k,k=0;break}if(0!=(64&f))return d.msg="invalid distance code",k=d.avail_in-b,k=_>>3<k?_>>3:k,b+=k,p-=k,_-=k<<3,l.bitb=w,l.bitk=_,d.avail_in=b,d.total_in+=p-d.next_in_index,d.next_in_index=p,l.write=y,n;c+=u[R+2],c+=w&r[f],R=3*(h+c),f=u[R]}break}if(0!=(64&f))return 0!=(32&f)?(k=d.avail_in-b,k=_>>3<k?_>>3:k,b+=k,p-=k,_-=k<<3,l.bitb=w,l.bitk=_,d.avail_in=b,d.total_in+=p-d.next_in_index,d.next_in_index=p,l.write=y,1):(d.msg="invalid literal/length code",k=d.avail_in-b,k=_>>3<k?_>>3:k,b+=k,p-=k,_-=k<<3,l.bitb=w,l.bitk=_,d.avail_in=b,d.total_in+=p-d.next_in_index,d.next_in_index=p,l.write=y,n);if(c+=u[R+2],c+=w&r[f],R=3*(h+c),0===(f=u[R])){w>>=u[R+1],_-=u[R+1],l.window[y++]=u[R+2],g--;break}}else w>>=u[R+1],_-=u[R+1],l.window[y++]=u[R+2],g--}while(g>=258&&b>=10);return k=d.avail_in-b,k=_>>3<k?_>>3:k,b+=k,p-=k,_-=k<<3,l.bitb=w,l.bitk=_,d.avail_in=b,d.total_in+=p-d.next_in_index,d.next_in_index=p,l.write=y,0}t.init=function(t,e,n,r,l,d){i=0,w=t,_=e,s=n,p=r,o=l,b=d,a=null},t.proc=function(t,g,x){let m,k,v,A,R,U,E,F=0,D=0,z=0;for(z=g.next_in_index,A=g.avail_in,F=t.bitb,D=t.bitk,R=t.write,U=R<t.read?t.read-R-1:t.end-R;;)switch(i){case 0:if(U>=258&&A>=10&&(t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,x=y(w,_,s,p,o,b,t,g),z=g.next_in_index,A=g.avail_in,F=t.bitb,D=t.bitk,R=t.write,U=R<t.read?t.read-R-1:t.end-R,0!=x)){i=1==x?7:9;break}c=w,a=s,d=p,i=1;case 1:for(m=c;D<m;){if(0===A)return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);x=0,A--,F|=(255&g.read_byte(z++))<<D,D+=8}if(k=3*(d+(F&r[m])),F>>>=a[k+1],D-=a[k+1],v=a[k],0===v){u=a[k+2],i=6;break}if(0!=(16&v)){h=15&v,l=a[k+2],i=2;break}if(0==(64&v)){c=v,d=k/3+a[k+2];break}if(0!=(32&v)){i=7;break}return i=9,g.msg="invalid literal/length code",x=n,t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);case 2:for(m=h;D<m;){if(0===A)return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);x=0,A--,F|=(255&g.read_byte(z++))<<D,D+=8}l+=F&r[m],F>>=m,D-=m,c=_,a=o,d=b,i=3;case 3:for(m=c;D<m;){if(0===A)return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);x=0,A--,F|=(255&g.read_byte(z++))<<D,D+=8}if(k=3*(d+(F&r[m])),F>>=a[k+1],D-=a[k+1],v=a[k],0!=(16&v)){h=15&v,f=a[k+2],i=4;break}if(0==(64&v)){c=v,d=k/3+a[k+2];break}return i=9,g.msg="invalid distance code",x=n,t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);case 4:for(m=h;D<m;){if(0===A)return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);x=0,A--,F|=(255&g.read_byte(z++))<<D,D+=8}f+=F&r[m],F>>=m,D-=m,i=5;case 5:for(E=R-f;E<0;)E+=t.end;for(;0!==l;){if(0===U&&(R==t.end&&0!==t.read&&(R=0,U=R<t.read?t.read-R-1:t.end-R),0===U&&(t.write=R,x=t.inflate_flush(g,x),R=t.write,U=R<t.read?t.read-R-1:t.end-R,R==t.end&&0!==t.read&&(R=0,U=R<t.read?t.read-R-1:t.end-R),0===U)))return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);t.window[R++]=t.window[E++],U--,E==t.end&&(E=0),l--}i=0;break;case 6:if(0===U&&(R==t.end&&0!==t.read&&(R=0,U=R<t.read?t.read-R-1:t.end-R),0===U&&(t.write=R,x=t.inflate_flush(g,x),R=t.write,U=R<t.read?t.read-R-1:t.end-R,R==t.end&&0!==t.read&&(R=0,U=R<t.read?t.read-R-1:t.end-R),0===U)))return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);x=0,t.window[R++]=u,U--,i=0;break;case 7:if(D>7&&(D-=8,A++,z--),t.write=R,x=t.inflate_flush(g,x),R=t.write,U=R<t.read?t.read-R-1:t.end-R,t.read!=t.write)return t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);i=8;case 8:return x=1,t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);case 9:return x=n,t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x);default:return x=e,t.bitb=F,t.bitk=D,g.avail_in=A,g.total_in+=z-g.next_in_index,g.next_in_index=z,t.write=R,t.inflate_flush(g,x)}},t.free=function(){}}const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function _(t,a){const s=this;let o,l=0,d=0,c=0,u=0;const _=[0],p=[0],b=new f;let y=0,g=new Int32Array(4320);const x=new h;s.bitk=0,s.bitb=0,s.window=new Uint8Array(a),s.end=a,s.read=0,s.write=0,s.reset=function(t,e){e&&(e[0]=0),6==l&&b.free(t),l=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(t,null),s.inflate_flush=function(t,e){let n,r,a;return r=t.next_out_index,a=s.read,n=(a<=s.write?s.write:s.end)-a,n>t.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n,a==s.end&&(a=0,s.write==s.end&&(s.write=0),n=s.write-a,n>t.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n),t.next_out_index=r,s.read=a,e},s.proc=function(t,i){let a,f,m,k,v,A,R,U;for(k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,R=A<s.read?s.read-A-1:s.end-A;;){let E,F,D,z,S,T,C,I;switch(l){case 0:for(;m<3;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}switch(a=7&f,y=1&a,a>>>1){case 0:f>>>=3,m-=3,a=7&m,f>>>=a,m-=a,l=1;break;case 1:E=[],F=[],D=[[]],z=[[]],h.inflate_trees_fixed(E,F,D,z),b.init(E[0],F[0],D[0],0,z[0],0),f>>>=3,m-=3,l=6;break;case 2:f>>>=3,m-=3,l=3;break;case 3:return f>>>=3,m-=3,l=9,t.msg="invalid block type",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i)}break;case 1:for(;m<32;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}if((~f>>>16&65535)!=(65535&f))return l=9,t.msg="invalid stored block lengths",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);d=65535&f,f=m=0,l=0!==d?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(0===R&&(A==s.end&&0!==s.read&&(A=0,R=A<s.read?s.read-A-1:s.end-A),0===R&&(s.write=A,i=s.inflate_flush(t,i),A=s.write,R=A<s.read?s.read-A-1:s.end-A,A==s.end&&0!==s.read&&(A=0,R=A<s.read?s.read-A-1:s.end-A),0===R)))return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(i=0,a=d,a>v&&(a=v),a>R&&(a=R),s.window.set(t.read_buf(k,a),A),k+=a,v-=a,A+=a,R-=a,0!=(d-=a))break;l=0!==y?7:0;break;case 3:for(;m<14;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}if(c=a=16383&f,(31&a)>29||(a>>5&31)>29)return l=9,t.msg="too many length or distance symbols",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(U=0;U<a;U++)o[U]=0;f>>>=14,m-=14,u=0,l=4;case 4:for(;u<4+(c>>>10);){for(;m<3;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}o[w[u++]]=7&f,f>>>=3,m-=3}for(;u<19;)o[w[u++]]=0;if(_[0]=7,a=x.inflate_trees_bits(o,_,p,g,t),0!=a)return(i=a)==n&&(o=null,l=9),s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);u=0,l=5;case 5:for(;a=c,!(u>=258+(31&a)+(a>>5&31));){let e,d;for(a=_[0];m<a;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}if(a=g[3*(p[0]+(f&r[a]))+1],d=g[3*(p[0]+(f&r[a]))+2],d<16)f>>>=a,m-=a,o[u++]=d;else{for(U=18==d?7:d-14,e=18==d?11:3;m<a+U;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<<m,m+=8}if(f>>>=a,m-=a,e+=f&r[U],f>>>=U,m-=U,U=u,a=c,U+e>258+(31&a)+(a>>5&31)||16==d&&U<1)return o=null,l=9,t.msg="invalid bit length repeat",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);d=16==d?o[U-1]:0;do{o[U++]=d}while(0!=--e);u=U}}if(p[0]=-1,S=[],T=[],C=[],I=[],S[0]=9,T[0]=6,a=c,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,S,T,C,I,g,t),0!=a)return a==n&&(o=null,l=9),i=a,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);b.init(S[0],T[0],g,C[0],g,I[0]),l=6;case 6:if(s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,1!=(i=b.proc(s,t,i)))return s.inflate_flush(t,i);if(i=0,b.free(t),k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,R=A<s.read?s.read-A-1:s.end-A,0===y){l=0;break}l=7;case 7:if(s.write=A,i=s.inflate_flush(t,i),A=s.write,R=A<s.read?s.read-A-1:s.end-A,s.read!=s.write)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);l=8;case 8:return i=1,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);case 9:return i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);default:return i=e,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i)}}},s.free=function(t){s.reset(t,null),s.window=null,g=null},s.set_dictionary=function(t,e,n){s.window.set(t.subarray(e,e+n),0),s.read=s.write=n},s.sync_point=function(){return 1==l?1:0}}const p=13,b=[0,0,255,255];function y(){const t=this;function r(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),e):(t.wbits=i,n.istate.blocks=new _(n,1<<i),r(n),0)},t.inflate=function(t,r){let a,s;if(!t||!t.istate||!t.next_in)return e;const o=t.istate;for(r=4==r?i:0,a=i;;)switch(o.mode){case 0:if(0===t.avail_in)return a;if(a=r,t.avail_in--,t.total_in++,8!=(15&(o.method=t.read_byte(t.next_in_index++)))){o.mode=p,t.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=p,t.msg="invalid window size",o.marker=5;break}o.mode=1;case 1:if(0===t.avail_in)return a;if(a=r,t.avail_in--,t.total_in++,s=255&t.read_byte(t.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=p,t.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===t.avail_in?a:(a=r,t.avail_in--,t.total_in++,o.need+=255&t.read_byte(t.next_in_index++),o.mode=6,2);case 6:return o.mode=p,t.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(t,a),a==n){o.mode=p,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(t,o.was),o.mode=12;case 12:return 1;case p:return n;default:return e}},t.inflateSetDictionary=function(t,n,i){let r=0,a=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return a>=1<<s.wbits&&(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},t.inflateSync=function(t){let a,s,o,l,d;if(!t||!t.istate)return e;const c=t.istate;if(c.mode!=p&&(c.mode=p,c.marker=0),0===(a=t.avail_in))return i;for(s=t.next_in_index,o=c.marker;0!==a&&o<4;)t.read_byte(s)==b[o]?o++:o=0!==t.read_byte(s)?0:4-o,s++,a--;return t.total_in+=s-t.next_in_index,t.next_in_index=s,t.avail_in=a,c.marker=o,4!=o?n:(l=t.total_in,d=t.total_out,r(t),t.total_in=l,t.total_out=d,c.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}}function g(){}g.prototype={inflateInit:function(t){const e=this;return e.istate=new y,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd:function(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary:function(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}};const x={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},x);function k(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const v="Abort error";function A(t){if(t&&t.aborted)throw new Error(v)}async function R(t,e){return e.length&&await t.writeUint8Array(e),e.length}const U="HTTP error ",E="HTTP Range not supported",F="text/plain",D="Content-Length",z="Accept-Ranges",S="HEAD",T="GET",C="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class L extends I{}class O extends I{writeUint8Array(t){this.size+=t.length}}class W extends L{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class M extends L{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),j(this.url)&&!this.preventHeadRequest){const t=await B(S,this.url,this.options);if(this.size=Number(t.headers.get(D)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(z)!=C)throw new Error(E);void 0===this.size&&await H(this,this.options)}else await H(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await B(T,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(E);return new Uint8Array(await n.arrayBuffer())}return this.data||await H(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function H(t,e){const n=await B(T,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function B(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(U+(r.statusText||r.status))}class P extends L{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),j(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>N(S,this.url,(n=>{this.size=Number(n.getResponseHeader(D)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(z)==C?t():e(new Error(E)):void 0===this.size?V(this,this.url).then((()=>t())).catch(e):t()}),e)));await V(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await V(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>N(T,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(E)}}function V(t,e){return new Promise(((n,i)=>N(T,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function N(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(U+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class q extends L{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new P(t,e):this.reader=new M(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function j(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const G=4294967295,K=33639248,Z=101075792,X="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Y=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Y[t]=e}class J{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n<i;n++)e=e>>>8^Y[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Q={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Q.getPartial(n);return 32===i?t.concat(e):Q._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Q.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=Q.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r<t.length;r++)i.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Q.getPartial(r);return i.push(Q.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},$={bytes:{fromBits(t){const e=Q.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r<e;r++)0==(3&r)&&(i=t[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n<t.length;n++)i=i<<8|t[n],3==(3&n)&&(e.push(i),i=0);return 3&n&&e.push(Q.partial(8*(3&n),i)),e}}},tt={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],r=t.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),o=[]],a=r;a<4*r+28;a++){let t=s[a-1];(a%r==0||8===r&&a%r==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,h=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=h=h<<24^h>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,h,f,w=t[0]^n[0],_=t[e?3:1]^n[1],p=t[2]^n[2],b=t[e?1:3]^n[3],y=4;for(let t=0;t<i;t++)u=s[w>>>24]^o[_>>16&255]^l[p>>8&255]^d[255&b]^n[y],h=s[_>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&w]^n[y+1],f=s[p>>>24]^o[b>>16&255]^l[w>>8&255]^d[255&_]^n[y+2],b=s[b>>>24]^o[w>>16&255]^l[_>>8&255]^d[255&p]^n[y+3],y+=4,w=u,_=h,p=f;for(let t=0;t<4;t++)r[e?3&-t:t]=c[w>>>24]<<24^c[_>>16&255]<<16^c[p>>8&255]<<8^c[255&b]^n[y++],u=w,w=_,_=p,p=b,b=u;return r}}},et={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Q.bitLength(e);for(let r=0;r<i;r+=4){this.incCounter(n);const i=t.encrypt(n);e[r]^=i[0],e[r+1]^=i[1],e[r+2]^=i[2],e[r+3]^=i[3]}return Q.clamp(e,r)}}},nt="Invalid pasword",it=16,rt={name:"PBKDF2"},at={name:"HMAC"},st="SHA-1",ot=Object.assign({hash:at},rt),lt=Object.assign({iterations:1e3,hash:{name:st}},rt),dt=Object.assign({hash:st},at),ct=["deriveBits"],ut=["sign"],ht=[8,12,16],ft=[16,24,32],wt=10,_t=[0,0,0,0],pt=crypto.subtle;class bt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,ht[this.strength]+2);await async function(t,e,n){await gt(t,n,e.subarray(0,ht[t.strength]));const i=e.subarray(ht[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(nt)}(this,e,this.password),this.password=null,this.aesCtrGladman=new et.ctrGladman(new tt.aes(this.keys.key),Array.from(_t)),t=t.subarray(ht[this.strength]+2)}let e,n=new Uint8Array(t.length-wt-(t.length-wt)%it),i=t;for(this.pendingInput.length&&(i=xt(this.pendingInput,t),n=mt(n,i.length-wt-(i.length-wt)%it)),e=0;e<=i.length-wt-it;e+=it){const t=i.subarray(e,e+it),r=$.bytes.toBits(t),a=this.aesCtrGladman.update(r);n.set($.bytes.fromBits(a),e)}return this.pendingInput=i.subarray(e),this.signed&&(this.input=xt(this.input,t)),n}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-wt),i=t.subarray(t.length-wt);let r=new Uint8Array(0);if(n.length){const t=this.aesCtrGladman.update($.bytes.toBits(n));r=$.bytes.fromBits(t)}let a=!0;if(this.signed){const t=await pt.sign(at,e.authentication,this.input.subarray(0,this.input.length-wt)),n=new Uint8Array(t).subarray(0,wt);this.input=null;for(let t=0;t<wt;t++)n[t]!=i[t]&&(a=!1)}return{valid:a,data:r}}}class yt{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(ht[t.strength]));return await gt(t,e,n),xt(n,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new et.ctrGladman(new tt.aes(this.keys.key),Array.from(_t)));let n,i=new Uint8Array(e.length+t.length-t.length%it);for(i.set(e,0),this.pendingInput.length&&(i=mt(i,(t=xt(this.pendingInput,t)).length-t.length%it)),n=0;n<=t.length-it;n+=it){const r=$.bytes.toBits(t.subarray(n,n+it)),a=this.aesCtrGladman.update(r);i.set($.bytes.fromBits(a),n+e.length)}return this.pendingInput=t.subarray(n),this.output=xt(this.output,i),i}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update($.bytes.toBits(this.pendingInput));t=$.bytes.fromBits(e),this.output=xt(this.output,t)}const e=await pt.sign(at,this.keys.authentication,this.output.subarray(ht[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,wt);return{data:xt(t,n),signature:n}}}async function gt(t,e,n){const i=(new TextEncoder).encode(e),r=await pt.importKey("raw",i,ot,!1,ct),a=await pt.deriveBits(Object.assign({salt:n},lt),r,8*(2*ft[t.strength]+2)),s=new Uint8Array(a);t.keys={key:$.bytes.toBits(s.subarray(0,ft[t.strength])),authentication:await pt.importKey("raw",s.subarray(ft[t.strength],2*ft[t.strength]),dt,!1,ut),passwordVerification:s.subarray(2*ft[t.strength])}}function xt(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function mt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const kt=12;class vt{constructor(t,e){this.password=t,this.passwordVerification=e,Et(this,t)}async append(t){if(this.password){const e=Rt(this,t.subarray(0,kt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(nt);t=t.subarray(kt)}return Rt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class At{constructor(t,e){this.passwordVerification=e,this.password=t,Et(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(kt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(Ut(this,i),0),n=kt}else e=new Uint8Array(t.length),n=0;return e.set(Ut(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function Rt(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=Dt(t)^e[i],Ft(t,n[i]);return n}function Ut(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=Dt(t)^e[i],Ft(t,e[i]);return n}function Et(t,e){t.keys=[305419896,591751049,878082192],t.crcKey0=new J(t.keys[0]),t.crcKey2=new J(t.keys[2]);for(let n=0;n<e.length;n++)Ft(t,e.charCodeAt(n))}function Ft(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=St(t.keys[1]+zt(t.keys[0])),t.keys[1]=St(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function Dt(t){const e=2|t.keys[2];return zt(Math.imul(e,1^e)>>>8)}function zt(t){return 255&t}function St(t){return 4294967295&t}const Tt="inflate",Ct="Invalid signature";class It{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new J,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new vt(e.password,e.passwordVerification):new bt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ct);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ct)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Lt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new J,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ot="init",Wt="append",Mt="flush",Ht="message";var Bt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-inflate.min.js",document.baseURI).href)),t.worker.addEventListener(Ht,r,!1),t.interface={append:t=>n({type:Wt,data:t}),flush:()=>n({type:Mt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ot,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ot||r==Mt||r==Wt){const n=i.data;r==Mt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith("deflate")?new Lt(t,e):e.codecType.startsWith(Tt)?new It(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Pt=[],Vt=[];function Nt(t){const e=!Vt.length;if(e)Pt=Pt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Vt.splice(0,1);e(Bt(t,n,i,Nt,r,a))}return e}const qt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class jt{constructor(t){qt.forEach((e=>this[e]=t[e]))}}const Gt="File format is not recognized",Kt="End of central directory not found",Zt="End of Zip64 central directory not found",Xt="End of Zip64 central directory locator not found",Yt="Central directory header not found",Jt="Local file header not found",Qt="Zip64 extra field not found",$t="File contains encrypted entry",te="Encryption method not supported",ee="Compression method not supported",ne="utf-8",ie=["uncompressedSize","compressedSize","offset"];class re{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,d=this.bitFlag,c=this.signature;let u=le(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(ee);if(0!=o&&8!=o)throw new Error(ee);if(67324752!=he(a,0))throw new Error(Jt);const h=this.localDirectory={};ae(h,a,4),h.rawExtraField=r.subarray(i+30+h.filenameLength,i+30+h.filenameLength+h.extraFieldLength),se(this,h,a,4);const f=i+30+h.filenameLength+h.extraFieldLength,w=d.encrypted&&h.bitFlag.encrypted,_=w&&!s;if(w){if(!_&&void 0===s.strength)throw new Error(te);if(!u)throw new Error($t)}const p=await function(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Pt.length<n.maxWorkers){const n={};return Pt.push(n),Bt(n,t,e,Nt,i,r)}{const n=Pt.find((t=>!t.busy));return n?Bt(n,t,e,Nt,i,r):new Promise((n=>Vt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}(l.Inflate,{codecType:Tt,password:u,zipCrypto:_,encryptionStrength:s&&s.strength,signed:le(this,e,"checkSignature"),passwordVerification:_&&(d.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:w,useWebWorkers:le(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await async function(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){const c=s.signal;if(l<r){A(c);const u=await e.readUint8Array(l+i,Math.min(o,r-l)),h=u.length;A(c);const f=await t.append(u);if(A(c),d+=await R(n,f),s.onprogress)try{s.onprogress(l+h,r)}catch(t){}return a(l+o,d)}{const e=await t.flush();return d+=await R(n,e.data),{signature:e.signature,length:d}}}()}(p,n,t,f,this.compressedSize,l,{onprogress:e.onprogress,signal:le(this,e,"signal")}),t.getData()}}function ae(t,e,n){t.version=ue(e,n);const i=t.rawBitFlag=ue(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=he(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=ue(e,n+22),t.extraFieldLength=ue(e,n+24)}function se(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;o<r.length;){const t=ue(s,o),e=ue(s,o+2);a.set(t,{type:t,data:r.slice(o+4,o+4+e)}),o+=4+e}}catch(t){}const l=ue(n,i+4);e.signature=he(n,i+10),e.uncompressedSize=he(n,i+18),e.compressedSize=he(n,i+14);const d=e.extraFieldZip64=a.get(1);d&&function(t,e){e.zip64=!0;const n=new DataView(t.data.buffer);t.values=[];for(let e=0;e<Math.floor(t.data.length/8);e++)t.values.push(fe(n,0+8*e));const i=ie.filter((t=>e[t]==G));for(let e=0;e<i.length;e++)t[i[e]]=t.values[e];ie.forEach((n=>{if(e[n]==G){if(!t||void 0===t[n])throw new Error(Qt);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&oe(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&oe(u,"comment","rawComment",e,t);const h=e.extraFieldAES=a.get(39169);h?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=ce(i,0),t.vendorId=ce(i,2);const r=ce(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=ue(i,5)}else e.compressionMethod=n}(h,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function oe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=ce(a,0),t.signature=he(a,1);const s=new J;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==he(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function le(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function de(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n<t.length;n++)e+=X[t[n]];return e})(t)}function ce(t,e){return t.getUint8(e)}function ue(t,e){return t.getUint16(e,!0)}function he(t,e){return t.getUint32(e,!0)}function fe(t,e){return Number(t.getBigUint64(e,!0))}k({Inflate:function(){const t=new g,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(r,a){const s=[];let o,l,d=0,c=0,u=0;if(0!==r.length){t.next_in_index=0,t.next_in=r,t.avail_in=r.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),o=t.inflate(0),n&&o===i){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==o&&1!==o)throw new Error("inflating: "+t.msg);if((n||1===o)&&t.avail_in===r.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?s.push(new Uint8Array(e)):s.push(new Uint8Array(e.subarray(0,t.next_out_index)))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=d&&(a(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(u),s.forEach((function(t){l.set(t,c),c+=t.length})),l}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=W,t.BlobWriter=class extends O{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends L{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t<a+e;t++)n[t-a]=r.charCodeAt(t);return n}},t.Data64URIWriter=class extends O{constructor(t){super(),this.data="data:"+(t||"")+";base64,",this.pending=[]}async writeUint8Array(t){super.writeUint8Array(t);let e=0,n=this.pending;const i=this.pending.length;for(this.pending="",e=0;e<3*Math.floor((i+t.length)/3)-i;e++)n+=String.fromCharCode(t[e]);for(;e<t.length;e++)this.pending+=String.fromCharCode(t[e]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=v,t.ERR_BAD_FORMAT=Gt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Yt,t.ERR_ENCRYPTED=$t,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Xt,t.ERR_EOCDR_NOT_FOUND=Kt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Zt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Qt,t.ERR_HTTP_RANGE=E,t.ERR_INVALID_PASSWORD=nt,t.ERR_INVALID_SIGNATURE=Ct,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Jt,t.ERR_UNSUPPORTED_COMPRESSION=ee,t.ERR_UNSUPPORTED_ENCRYPTION=te,t.HttpRangeReader=class extends q{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=q,t.Reader=L,t.TextReader=class extends L{constructor(t){super(),this.blobReader=new W(new Blob([t],{type:F}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends O{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:F})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:F})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends L{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends O{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=O,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=m}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Gt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,101010256,22,1048560);if(!n)throw new Error(Kt);const i=new DataView(n.buffer);let r=he(i,12),a=he(i,16),s=ue(i,8),o=0;if(a==G||r==G||65535==s){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(117853008!=he(i,0))throw new Error(Zt);a=fe(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(he(d,0)!=Z&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(he(d,0)!=Z)throw new Error(Xt);s=fe(d,24),r=fe(i,4),a-=fe(d,40)}if(a<0||a>=e.size)throw new Error(Gt);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(he(c,l)!=K&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Gt);const h=[];for(let e=0;e<s;e++){const e=new re(this.reader,this.config,this.options);if(he(c,l)!=K)throw new Error(Yt);e.compressedSize=0,e.uncompressedSize=0,ae(e,c,l+6),e.commentLength=ue(c,l+32),e.directory=16==(16&ce(c,l+38)),e.offset=he(c,l+42)+o,e.rawFilename=d.subarray(l+46,l+46+e.filenameLength);const n=le(this,t,"filenameEncoding");e.filenameUTF8=e.commentUTF8=Boolean(e.bitFlag.languageEncodingFlag),e.filename=de(e.rawFilename,e.filenameUTF8?ne:n),!e.directory&&e.filename.endsWith("/")&&(e.directory=!0),e.rawExtraField=d.subarray(l+46+e.filenameLength,l+46+e.filenameLength+e.extraFieldLength),e.rawComment=d.subarray(l+46+e.filenameLength+e.extraFieldLength,l+46+e.filenameLength+e.extraFieldLength+e.commentLength);const i=le(this,t,"commentEncoding");e.comment=de(e.rawComment,e.commentUTF8?ne:i),se(e,e,c,l+6);const r=new jt(e);r.getData=(t,n)=>e.getData(t,n),h.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return h}async close(){}},t.configure=k,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})}(this,(function(e){"use strict";const t=-2,n=-3,i=-5,r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],s=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],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],c=[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,112,112],l=[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],d=[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],u=15;function f(){let e,t,r,a,s,f;function h(e,t,o,c,l,d,h,_,w,p,b){let y,g,x,m,k,v,R,A,U,E,S,z,F,T,D;E=0,k=o;do{r[e[t+E]]++,E++,k--}while(0!==k);if(r[0]==o)return h[0]=-1,_[0]=0,0;for(A=_[0],v=1;v<=u&&0===r[v];v++);for(R=v,A<v&&(A=v),k=u;0!==k&&0===r[k];k--);for(x=k,A>k&&(A=k),_[0]=A,T=1<<v;v<k;v++,T<<=1)if((T-=r[v])<0)return n;if((T-=r[k])<0)return n;for(r[k]+=T,f[1]=v=0,E=1,F=2;0!=--k;)f[F]=v+=r[E],F++,E++;k=0,E=0;do{0!==(v=e[t+E])&&(b[f[v]++]=k),E++}while(++k<o);for(o=f[x],f[0]=k=0,E=0,m=-1,z=-A,s[0]=0,S=0,D=0;R<=x;R++)for(y=r[R];0!=y--;){for(;R>z+A;){if(m++,z+=A,D=x-z,D=D>A?A:D,(g=1<<(v=R-z))>y+1&&(g-=y+1,F=R,v<D))for(;++v<D&&!((g<<=1)<=r[++F]);)g-=r[F];if(D=1<<v,p[0]+D>1440)return n;s[m]=S=p[0],p[0]+=D,0!==m?(f[m]=k,a[0]=v,a[1]=A,v=k>>>z-A,a[2]=S-s[m-1]-v,w.set(a,3*(s[m-1]+v))):h[0]=S}for(a[1]=R-z,E>=o?a[0]=192:b[E]<c?(a[0]=b[E]<256?0:96,a[2]=b[E++]):(a[0]=d[b[E]-c]+16+64,a[2]=l[b[E++]-c]),g=1<<R-z,v=k>>>z;v<D;v+=g)w.set(a,3*(S+v));for(v=1<<R-1;0!=(k&v);v>>>=1)k^=v;for(k^=v,U=(1<<z)-1;(k&U)!=f[m];)m--,z-=A,U=(1<<z)-1}return 0!==T&&1!=x?i:0}function _(n){let i;for(e||(e=[],t=[],r=new Int32Array(16),a=[],s=new Int32Array(u),f=new Int32Array(16)),t.length<n&&(t=[]),i=0;i<n;i++)t[i]=0;for(i=0;i<16;i++)r[i]=0;for(i=0;i<3;i++)a[i]=0;s.set(r.subarray(0,u),0),f.set(r.subarray(0,16),0)}this.inflate_trees_bits=function(r,a,s,o,c){let l;return _(19),e[0]=0,l=h(r,0,19,19,null,null,s,a,o,e,t),l==n?c.msg="oversubscribed dynamic bit lengths tree":l!=i&&0!==a[0]||(c.msg="incomplete dynamic bit lengths tree",l=n),l},this.inflate_trees_dynamic=function(r,a,s,u,f,w,p,b,y){let g;return _(288),e[0]=0,g=h(s,0,r,257,o,c,w,u,b,e,t),0!=g||0===u[0]?(g==n?y.msg="oversubscribed literal/length tree":-4!=g&&(y.msg="incomplete literal/length tree",g=n),g):(_(288),g=h(s,r,a,0,l,d,p,f,b,e,t),0!=g||0===f[0]&&r>257?(g==n?y.msg="oversubscribed distance tree":g==i?(y.msg="incomplete distance tree",g=n):-4!=g&&(y.msg="empty distance tree with lengths",g=n),g):0)}}f.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=a,i[0]=s,0};function h(){const e=this;let i,a,s,o,c=0,l=0,d=0,u=0,f=0,h=0,_=0,w=0,p=0,b=0;function y(e,t,i,a,s,o,c,l){let d,u,f,h,_,w,p,b,y,g,x,m,k,v,R,A;p=l.next_in_index,b=l.avail_in,_=c.bitb,w=c.bitk,y=c.write,g=y<c.read?c.read-y-1:c.end-y,x=r[e],m=r[t];do{for(;w<20;)b--,_|=(255&l.read_byte(p++))<<w,w+=8;if(d=_&x,u=i,f=a,A=3*(f+d),0!==(h=u[A]))for(;;){if(_>>=u[A+1],w-=u[A+1],0!=(16&h)){for(h&=15,k=u[A+2]+(_&r[h]),_>>=h,w-=h;w<15;)b--,_|=(255&l.read_byte(p++))<<w,w+=8;for(d=_&m,u=s,f=o,A=3*(f+d),h=u[A];;){if(_>>=u[A+1],w-=u[A+1],0!=(16&h)){for(h&=15;w<h;)b--,_|=(255&l.read_byte(p++))<<w,w+=8;if(v=u[A+2]+(_&r[h]),_>>=h,w-=h,g-=k,y>=v)R=y-v,y-R>0&&2>y-R?(c.window[y++]=c.window[R++],c.window[y++]=c.window[R++],k-=2):(c.window.set(c.window.subarray(R,R+2),y),y+=2,R+=2,k-=2);else{R=y-v;do{R+=c.end}while(R<0);if(h=c.end-R,k>h){if(k-=h,y-R>0&&h>y-R)do{c.window[y++]=c.window[R++]}while(0!=--h);else c.window.set(c.window.subarray(R,R+h),y),y+=h,R+=h,h=0;R=0}}if(y-R>0&&k>y-R)do{c.window[y++]=c.window[R++]}while(0!=--k);else c.window.set(c.window.subarray(R,R+k),y),y+=k,R+=k,k=0;break}if(0!=(64&h))return l.msg="invalid distance code",k=l.avail_in-b,k=w>>3<k?w>>3:k,b+=k,p-=k,w-=k<<3,c.bitb=_,c.bitk=w,l.avail_in=b,l.total_in+=p-l.next_in_index,l.next_in_index=p,c.write=y,n;d+=u[A+2],d+=_&r[h],A=3*(f+d),h=u[A]}break}if(0!=(64&h))return 0!=(32&h)?(k=l.avail_in-b,k=w>>3<k?w>>3:k,b+=k,p-=k,w-=k<<3,c.bitb=_,c.bitk=w,l.avail_in=b,l.total_in+=p-l.next_in_index,l.next_in_index=p,c.write=y,1):(l.msg="invalid literal/length code",k=l.avail_in-b,k=w>>3<k?w>>3:k,b+=k,p-=k,w-=k<<3,c.bitb=_,c.bitk=w,l.avail_in=b,l.total_in+=p-l.next_in_index,l.next_in_index=p,c.write=y,n);if(d+=u[A+2],d+=_&r[h],A=3*(f+d),0===(h=u[A])){_>>=u[A+1],w-=u[A+1],c.window[y++]=u[A+2],g--;break}}else _>>=u[A+1],w-=u[A+1],c.window[y++]=u[A+2],g--}while(g>=258&&b>=10);return k=l.avail_in-b,k=w>>3<k?w>>3:k,b+=k,p-=k,w-=k<<3,c.bitb=_,c.bitk=w,l.avail_in=b,l.total_in+=p-l.next_in_index,l.next_in_index=p,c.write=y,0}e.init=function(e,t,n,r,c,l){i=0,_=e,w=t,s=n,p=r,o=c,b=l,a=null},e.proc=function(e,g,x){let m,k,v,R,A,U,E,S=0,z=0,F=0;for(F=g.next_in_index,R=g.avail_in,S=e.bitb,z=e.bitk,A=e.write,U=A<e.read?e.read-A-1:e.end-A;;)switch(i){case 0:if(U>=258&&R>=10&&(e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,x=y(_,w,s,p,o,b,e,g),F=g.next_in_index,R=g.avail_in,S=e.bitb,z=e.bitk,A=e.write,U=A<e.read?e.read-A-1:e.end-A,0!=x)){i=1==x?7:9;break}d=_,a=s,l=p,i=1;case 1:for(m=d;z<m;){if(0===R)return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);x=0,R--,S|=(255&g.read_byte(F++))<<z,z+=8}if(k=3*(l+(S&r[m])),S>>>=a[k+1],z-=a[k+1],v=a[k],0===v){u=a[k+2],i=6;break}if(0!=(16&v)){f=15&v,c=a[k+2],i=2;break}if(0==(64&v)){d=v,l=k/3+a[k+2];break}if(0!=(32&v)){i=7;break}return i=9,g.msg="invalid literal/length code",x=n,e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);case 2:for(m=f;z<m;){if(0===R)return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);x=0,R--,S|=(255&g.read_byte(F++))<<z,z+=8}c+=S&r[m],S>>=m,z-=m,d=w,a=o,l=b,i=3;case 3:for(m=d;z<m;){if(0===R)return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);x=0,R--,S|=(255&g.read_byte(F++))<<z,z+=8}if(k=3*(l+(S&r[m])),S>>=a[k+1],z-=a[k+1],v=a[k],0!=(16&v)){f=15&v,h=a[k+2],i=4;break}if(0==(64&v)){d=v,l=k/3+a[k+2];break}return i=9,g.msg="invalid distance code",x=n,e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);case 4:for(m=f;z<m;){if(0===R)return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);x=0,R--,S|=(255&g.read_byte(F++))<<z,z+=8}h+=S&r[m],S>>=m,z-=m,i=5;case 5:for(E=A-h;E<0;)E+=e.end;for(;0!==c;){if(0===U&&(A==e.end&&0!==e.read&&(A=0,U=A<e.read?e.read-A-1:e.end-A),0===U&&(e.write=A,x=e.inflate_flush(g,x),A=e.write,U=A<e.read?e.read-A-1:e.end-A,A==e.end&&0!==e.read&&(A=0,U=A<e.read?e.read-A-1:e.end-A),0===U)))return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);e.window[A++]=e.window[E++],U--,E==e.end&&(E=0),c--}i=0;break;case 6:if(0===U&&(A==e.end&&0!==e.read&&(A=0,U=A<e.read?e.read-A-1:e.end-A),0===U&&(e.write=A,x=e.inflate_flush(g,x),A=e.write,U=A<e.read?e.read-A-1:e.end-A,A==e.end&&0!==e.read&&(A=0,U=A<e.read?e.read-A-1:e.end-A),0===U)))return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);x=0,e.window[A++]=u,U--,i=0;break;case 7:if(z>7&&(z-=8,R++,F--),e.write=A,x=e.inflate_flush(g,x),A=e.write,U=A<e.read?e.read-A-1:e.end-A,e.read!=e.write)return e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);i=8;case 8:return x=1,e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);case 9:return x=n,e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x);default:return x=t,e.bitb=S,e.bitk=z,g.avail_in=R,g.total_in+=F-g.next_in_index,g.next_in_index=F,e.write=A,e.inflate_flush(g,x)}},e.free=function(){}}const _=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function w(e,a){const s=this;let o,c=0,l=0,d=0,u=0;const w=[0],p=[0],b=new h;let y=0,g=new Int32Array(4320);const x=new f;s.bitk=0,s.bitb=0,s.window=new Uint8Array(a),s.end=a,s.read=0,s.write=0,s.reset=function(e,t){t&&(t[0]=0),6==c&&b.free(e),c=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(e,null),s.inflate_flush=function(e,t){let n,r,a;return r=e.next_out_index,a=s.read,n=(a<=s.write?s.write:s.end)-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==i&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n,a==s.end&&(a=0,s.write==s.end&&(s.write=0),n=s.write-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==i&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n),e.next_out_index=r,s.read=a,t},s.proc=function(e,i){let a,h,m,k,v,R,A,U;for(k=e.next_in_index,v=e.avail_in,h=s.bitb,m=s.bitk,R=s.write,A=R<s.read?s.read-R-1:s.end-R;;){let E,S,z,F,T,D,C,O;switch(c){case 0:for(;m<3;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}switch(a=7&h,y=1&a,a>>>1){case 0:h>>>=3,m-=3,a=7&m,h>>>=a,m-=a,c=1;break;case 1:E=[],S=[],z=[[]],F=[[]],f.inflate_trees_fixed(E,S,z,F),b.init(E[0],S[0],z[0],0,F[0],0),h>>>=3,m-=3,c=6;break;case 2:h>>>=3,m-=3,c=3;break;case 3:return h>>>=3,m-=3,c=9,e.msg="invalid block type",i=n,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i)}break;case 1:for(;m<32;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}if((~h>>>16&65535)!=(65535&h))return c=9,e.msg="invalid stored block lengths",i=n,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);l=65535&h,h=m=0,c=0!==l?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);if(0===A&&(R==s.end&&0!==s.read&&(R=0,A=R<s.read?s.read-R-1:s.end-R),0===A&&(s.write=R,i=s.inflate_flush(e,i),R=s.write,A=R<s.read?s.read-R-1:s.end-R,R==s.end&&0!==s.read&&(R=0,A=R<s.read?s.read-R-1:s.end-R),0===A)))return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);if(i=0,a=l,a>v&&(a=v),a>A&&(a=A),s.window.set(e.read_buf(k,a),R),k+=a,v-=a,R+=a,A-=a,0!=(l-=a))break;c=0!==y?7:0;break;case 3:for(;m<14;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}if(d=a=16383&h,(31&a)>29||(a>>5&31)>29)return c=9,e.msg="too many length or distance symbols",i=n,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(U=0;U<a;U++)o[U]=0;h>>>=14,m-=14,u=0,c=4;case 4:for(;u<4+(d>>>10);){for(;m<3;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}o[_[u++]]=7&h,h>>>=3,m-=3}for(;u<19;)o[_[u++]]=0;if(w[0]=7,a=x.inflate_trees_bits(o,w,p,g,e),0!=a)return(i=a)==n&&(o=null,c=9),s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);u=0,c=5;case 5:for(;a=d,!(u>=258+(31&a)+(a>>5&31));){let t,l;for(a=w[0];m<a;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}if(a=g[3*(p[0]+(h&r[a]))+1],l=g[3*(p[0]+(h&r[a]))+2],l<16)h>>>=a,m-=a,o[u++]=l;else{for(U=18==l?7:l-14,t=18==l?11:3;m<a+U;){if(0===v)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);i=0,v--,h|=(255&e.read_byte(k++))<<m,m+=8}if(h>>>=a,m-=a,t+=h&r[U],h>>>=U,m-=U,U=u,a=d,U+t>258+(31&a)+(a>>5&31)||16==l&&U<1)return o=null,c=9,e.msg="invalid bit length repeat",i=n,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);l=16==l?o[U-1]:0;do{o[U++]=l}while(0!=--t);u=U}}if(p[0]=-1,T=[],D=[],C=[],O=[],T[0]=9,D[0]=6,a=d,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,T,D,C,O,g,e),0!=a)return a==n&&(o=null,c=9),i=a,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);b.init(T[0],D[0],g,C[0],g,O[0]),c=6;case 6:if(s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,1!=(i=b.proc(s,e,i)))return s.inflate_flush(e,i);if(i=0,b.free(e),k=e.next_in_index,v=e.avail_in,h=s.bitb,m=s.bitk,R=s.write,A=R<s.read?s.read-R-1:s.end-R,0===y){c=0;break}c=7;case 7:if(s.write=R,i=s.inflate_flush(e,i),R=s.write,A=R<s.read?s.read-R-1:s.end-R,s.read!=s.write)return s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);c=8;case 8:return i=1,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);case 9:return i=n,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i);default:return i=t,s.bitb=h,s.bitk=m,e.avail_in=v,e.total_in+=k-e.next_in_index,e.next_in_index=k,s.write=R,s.inflate_flush(e,i)}}},s.free=function(e){s.reset(e,null),s.window=null,g=null},s.set_dictionary=function(e,t,n){s.window.set(e.subarray(t,t+n),0),s.read=s.write=n},s.sync_point=function(){return 1==c?1:0}}const p=13,b=[0,0,255,255];function y(){const e=this;function r(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):t}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,0},e.inflateInit=function(n,i){return n.msg=null,e.blocks=null,i<8||i>15?(e.inflateEnd(n),t):(e.wbits=i,n.istate.blocks=new w(n,1<<i),r(n),0)},e.inflate=function(e,r){let a,s;if(!e||!e.istate||!e.next_in)return t;const o=e.istate;for(r=4==r?i:0,a=i;;)switch(o.mode){case 0:if(0===e.avail_in)return a;if(a=r,e.avail_in--,e.total_in++,8!=(15&(o.method=e.read_byte(e.next_in_index++)))){o.mode=p,e.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=p,e.msg="invalid window size",o.marker=5;break}o.mode=1;case 1:if(0===e.avail_in)return a;if(a=r,e.avail_in--,e.total_in++,s=255&e.read_byte(e.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=p,e.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===e.avail_in)return a;a=r,e.avail_in--,e.total_in++,o.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===e.avail_in)return a;a=r,e.avail_in--,e.total_in++,o.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===e.avail_in)return a;a=r,e.avail_in--,e.total_in++,o.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===e.avail_in?a:(a=r,e.avail_in--,e.total_in++,o.need+=255&e.read_byte(e.next_in_index++),o.mode=6,2);case 6:return o.mode=p,e.msg="need dictionary",o.marker=0,t;case 7:if(a=o.blocks.proc(e,a),a==n){o.mode=p,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(e,o.was),o.mode=12;case 12:return 1;case p:return n;default:return t}},e.inflateSetDictionary=function(e,n,i){let r=0,a=i;if(!e||!e.istate||6!=e.istate.mode)return t;const s=e.istate;return a>=1<<s.wbits&&(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},e.inflateSync=function(e){let a,s,o,c,l;if(!e||!e.istate)return t;const d=e.istate;if(d.mode!=p&&(d.mode=p,d.marker=0),0===(a=e.avail_in))return i;for(s=e.next_in_index,o=d.marker;0!==a&&o<4;)e.read_byte(s)==b[o]?o++:o=0!==e.read_byte(s)?0:4-o,s++,a--;return e.total_in+=s-e.next_in_index,e.next_in_index=s,e.avail_in=a,d.marker=o,4!=o?n:(c=e.total_in,l=e.total_out,r(e),e.total_in=c,e.total_out=l,d.mode=7,0)},e.inflateSyncPoint=function(e){return e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():t}}function g(){}g.prototype={inflateInit:function(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate:function(e){const n=this;return n.istate?n.istate.inflate(n,e):t},inflateEnd:function(){const e=this;if(!e.istate)return t;const n=e.istate.inflateEnd(e);return e.istate=null,n},inflateSync:function(){const e=this;return e.istate?e.istate.inflateSync(e):t},inflateSetDictionary:function(e,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,e,n):t},read_byte:function(e){return this.next_in.subarray(e,e+1)[0]},read_buf:function(e,t){return this.next_in.subarray(e,e+t)}};const x={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},x);function k(e){if(void 0!==e.chunkSize&&(m.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(m.maxWorkers=e.maxWorkers),void 0!==e.useWebWorkers&&(m.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(m.Deflate=e.Deflate),void 0!==e.Inflate&&(m.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=e.workerScripts.inflate}}}const v="Abort error";function R(e){if(e&&e.aborted)throw new Error(v)}async function A(e,t){return t.length&&await e.writeUint8Array(t),t.length}const U="HTTP error ",E="HTTP Range not supported",S="text/plain",z="Content-Length",F="Accept-Ranges",T="HEAD",D="GET",C="bytes";class O{constructor(){this.size=0}init(){this.initialized=!0}}class I extends O{}class H extends O{writeUint8Array(e){this.size+=e.length}}class W extends I{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){const n=new FileReader;return new Promise(((i,r)=>{n.onload=e=>i(new Uint8Array(e.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}class M extends I{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),V(this.url)&&!this.preventHeadRequest){const e=await B(T,this.url,this.options);if(this.size=Number(e.headers.get(z)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(F)!=C)throw new Error(E);void 0===this.size&&await L(this,this.options)}else await L(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await B(D,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+e+"-"+(e+t-1)}));if(206!=n.status)throw new Error(E);return new Uint8Array(await n.arrayBuffer())}return this.data||await L(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function L(e,t){const n=await B(D,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function B(e,t,n,i){i=Object.assign({},n.headers,i);const r=await fetch(t,Object.assign({},n,{method:e,headers:i}));if(r.status<400)return r;throw new Error(U+(r.statusText||r.status))}class P extends I{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests}async init(){if(super.init(),V(this.url)&&!this.preventHeadRequest)return new Promise(((e,t)=>j(T,this.url,(n=>{this.size=Number(n.getResponseHeader(z)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(F)==C?e():t(new Error(E)):void 0===this.size?N(this,this.url).then((()=>e())).catch(t):e()}),t)));await N(this,this.url)}async readUint8Array(e,t){if(!this.useRangeHeader)return this.data||await N(this,this.url),new Uint8Array(this.data.subarray(e,e+t));if(206!=(await new Promise(((n,i)=>j(D,this.url,(e=>n(new Uint8Array(e.response))),i,[["Range","bytes="+e+"-"+(e+t-1)]])))).status)throw new Error(E)}}function N(e,t){return new Promise(((n,i)=>j(D,t,(t=>{e.data=new Uint8Array(t.response),e.size||(e.size=e.data.length),n()}),i)))}function j(e,t,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(U+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(e,t),r.forEach((e=>a.setRequestHeader(e[0],e[1]))),a.responseType="arraybuffer",a.send(),a}class q extends I{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new P(e,t):this.reader=new M(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}function V(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}const G=4294967295,Z=33639248,K=101075792,X="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Y=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;Y[e]=t}class J{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;n<i;n++)t=t>>>8^Y[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const Q={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=Q.getPartial(n);return 32===i?e.concat(t):Q._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+Q.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=Q.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r<e.length;r++)i.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=Q.getPartial(r);return i.push(Q.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},$={bytes:{fromBits(e){const t=Q.bitLength(e)/8,n=new Uint8Array(t);let i;for(let r=0;r<t;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(Q.partial(8*(3&n),i)),t}}},ee={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};ee.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;"string"==typeof e&&(e=$.utf8String.toBits(e));const n=t._buffer=Q.concat(t._buffer,e),i=t._length,r=t._length=i+Q.bitLength(e);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);e<=r;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize:function(){const e=this;let t=e._buffer;const n=e._h;t=Q.concat(t,[Q.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,i=Array(80);for(let t=0;t<16;t++)i[t]=e[t];let r=n[0],a=n[1],s=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(i[e]=t._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const n=t._S(5,r)+t._f(e,a,s,o)+c+i[e]+t._key[Math.floor(e/20)]|0;c=o,o=s,s=t._S(30,a),a=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}};const te={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,c=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;a<4*r+28;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=a<=4||e<4?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,c,l;for(let e=0;e<256;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,l=r[c=r[o=r[d]]];let u=16843009*l^65537*c^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],c=a[2],l=a[3],d=a[4];let u,f,h,_=e[0]^n[0],w=e[t?3:1]^n[1],p=e[2]^n[2],b=e[t?1:3]^n[3],y=4;for(let e=0;e<i;e++)u=s[_>>>24]^o[w>>16&255]^c[p>>8&255]^l[255&b]^n[y],f=s[w>>>24]^o[p>>16&255]^c[b>>8&255]^l[255&_]^n[y+1],h=s[p>>>24]^o[b>>16&255]^c[_>>8&255]^l[255&w]^n[y+2],b=s[b>>>24]^o[_>>16&255]^c[w>>8&255]^l[255&p]^n[y+3],y+=4,_=u,w=f,p=h;for(let e=0;e<4;e++)r[t?3&-e:e]=d[_>>>24]<<24^d[w>>16&255]<<16^d[p>>8&255]<<8^d[255&b]^n[y++],u=_,_=w,w=p,p=b,b=u;return r}}},ne={ctrGladman:class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=Q.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return Q.clamp(t,r)}}},ie={hmacSha1:class{constructor(e){const t=this,n=t._hash=ee.sha1,i=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;t<r;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}}},re="Invalid pasword",ae=16,se={name:"PBKDF2"},oe=Object.assign({hash:{name:"HMAC"}},se),ce=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},se),le=["deriveBits"],de=[8,12,16],ue=[16,24,32],fe=10,he=[0,0,0,0],_e=crypto.subtle,we=$.bytes,pe=te.aes,be=ne.ctrGladman,ye=ie.hmacSha1;class ge{constructor(e,t,n){Object.assign(this,{password:e,signed:t,strength:n-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;if(t.password){const n=Re(e,0,de[t.strength]+2);await async function(e,t,n){await ke(e,n,Re(t,0,de[e.strength]));const i=Re(t,de[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(re)}(t,n,t.password),t.password=null,t.aesCtrGladman=new be(new pe(t.keys.key),Array.from(he)),t.hmac=new ye(t.keys.authentication),e=Re(e,de[t.strength]+2)}return me(t,e,new Uint8Array(e.length-fe-(e.length-fe)%ae),0,fe,!0)}async flush(){const e=this,t=e.pendingInput,n=Re(t,0,t.length-fe),i=Re(t,t.length-fe);let r=new Uint8Array(0);if(n.length){const t=we.toBits(n);e.hmac.update(t);const i=e.aesCtrGladman.update(t);r=we.fromBits(i)}let a=!0;if(e.signed){const t=Re(we.fromBits(e.hmac.digest()),0,fe);for(let e=0;e<fe;e++)t[e]!=i[e]&&(a=!1)}return{valid:a,data:r}}}class xe{constructor(e,t){Object.assign(this,{password:e,strength:t-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;let n=new Uint8Array(0);t.password&&(n=await async function(e,t){const n=crypto.getRandomValues(new Uint8Array(de[e.strength]));return await ke(e,t,n),ve(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new be(new pe(t.keys.key),Array.from(he)),t.hmac=new ye(t.keys.authentication));const i=new Uint8Array(n.length+e.length-e.length%ae);return i.set(n,0),me(t,e,i,n.length,0)}async flush(){const e=this;let t=new Uint8Array(0);if(e.pendingInput.length){const n=e.aesCtrGladman.update(we.toBits(e.pendingInput));e.hmac.update(n),t=we.fromBits(n)}const n=Re(we.fromBits(e.hmac.digest()),0,fe);return{data:ve(t,n),signature:n}}}function me(e,t,n,i,r,a){const s=t.length-r;let o;for(e.pendingInput.length&&(t=ve(e.pendingInput,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,s-s%ae)),o=0;o<=s-ae;o+=ae){const r=we.toBits(Re(t,o,o+ae));a&&e.hmac.update(r);const s=e.aesCtrGladman.update(r);a||e.hmac.update(s),n.set(we.fromBits(s),o+i)}return e.pendingInput=Re(t,o),n}async function ke(e,t,n){const i=(new TextEncoder).encode(t),r=await _e.importKey("raw",i,oe,!1,le),a=await _e.deriveBits(Object.assign({salt:n},ce),r,8*(2*ue[e.strength]+2)),s=new Uint8Array(a);e.keys={key:we.toBits(Re(s,0,ue[e.strength])),authentication:we.toBits(Re(s,ue[e.strength],2*ue[e.strength])),passwordVerification:Re(s,2*ue[e.strength])}}function ve(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Re(e,t,n){return e.subarray(t,n)}const Ae=12;class Ue{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;if(t.password){const n=Se(t,e.subarray(0,Ae));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(re);e=e.subarray(Ae)}return Se(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ee{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;let n,i;if(t.password){t.password=null;const r=crypto.getRandomValues(new Uint8Array(Ae));r[11]=t.passwordVerification,n=new Uint8Array(e.length+r.length),n.set(ze(t,r),0),i=Ae}else n=new Uint8Array(e.length),i=0;return n.set(ze(t,e),i),n}async flush(){return{data:new Uint8Array(0)}}}function Se(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=De(e)^t[i],Te(e,n[i]);return n}function ze(e,t){const n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=De(e)^t[i],Te(e,t[i]);return n}function Fe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new J(e.keys[0]),e.crcKey2=new J(e.keys[2]);for(let n=0;n<t.length;n++)Te(e,t.charCodeAt(n))}function Te(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Oe(e.keys[1]+Ce(e.keys[0])),e.keys[1]=Oe(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function De(e){const t=2|e.keys[2];return Ce(Math.imul(t,1^t)>>>8)}function Ce(e){return 255&e}function Oe(e){return 4294967295&e}const Ie="inflate",He="Invalid signature";class We{constructor(e,{signature:t,password:n,signed:i,compressed:r,zipCrypto:a,passwordVerification:s,encryptionStrength:o}){const c=Boolean(n);Object.assign(this,{signature:t,encrypted:c,signed:i,compressed:r,inflate:r&&new e,crc32:i&&new J,zipCrypto:a,decrypt:c&&a?new Ue(n,s):new ge(n,i,o)})}async append(e){const t=this;return t.encrypted&&e.length&&(e=await t.decrypt.append(e)),t.compressed&&e.length&&(e=await t.inflate.append(e)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),e}async flush(){const e=this;let t,n=new Uint8Array(0);if(e.encrypted){const t=await e.decrypt.flush();if(!t.valid)throw new Error(He);n=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const n=new DataView(new Uint8Array(4).buffer);if(t=e.crc32.get(),n.setUint32(0,t),e.cipher!=n.getUint32(0,!1))throw new Error(He)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class Me{constructor(e,{encrypted:t,signed:n,compressed:i,level:r,zipCrypto:a,password:s,passwordVerification:o,encryptionStrength:c}){Object.assign(this,{encrypted:t,signed:n,compressed:i,deflate:i&&new e({level:r||5}),crc32:n&&new J,zipCrypto:a,encrypt:t&&a?new Ee(s,o):new xe(s,c)})}async append(e){const t=this;let n=e;return t.compressed&&e.length&&(n=await t.deflate.append(e)),t.encrypted&&n.length&&(n=await t.encrypt.append(n)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),n}async flush(){const e=this;let t,n=new Uint8Array(0);if(e.compressed&&(n=await e.deflate.flush()||new Uint8Array(0)),e.encrypted){n=await e.encrypt.append(n);const i=await e.encrypt.flush();t=i.signature;const r=new Uint8Array(n.length+i.data.length);r.set(n,0),r.set(i.data,n.length),n=r}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:n,signature:t}}}const Le="init",Be="append",Pe="flush",Ne="message";var je=(e,t,n,i,r,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,webWorker:r,onTaskFinished(){e.busy=!1;i(e)&&e.worker&&e.worker.terminate()}}),r?function(e){let t;e.interface||(e.worker=new Worker(new URL(e.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-inflate.min.js",document.baseURI).href)),e.worker.addEventListener(Ne,r,!1),e.interface={append:e=>n({type:Be,data:e}),flush:()=>n({type:Pe})});return e.interface;async function n(n){if(!t){const t=e.options,n=e.scripts.slice(1);await i({scripts:n,type:Le,options:t})}return i(n)}function i(n){const i=e.worker,r=new Promise(((e,n)=>t={resolve:e,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(e){i.postMessage(n)}else i.postMessage(n)}catch(n){t.reject(n),t=null,e.onTaskFinished()}return r}function r(n){const i=n.data;if(t){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,t.reject(i),t=null,e.onTaskFinished()}else if(r==Le||r==Pe||r==Be){const n=i.data;r==Pe?(t.resolve({data:new Uint8Array(n),signature:i.signature}),t=null,e.onTaskFinished()):t.resolve(n&&new Uint8Array(n))}}}}(e):function(e){const t=function(e,t){return t.codecType.startsWith("deflate")?new Me(e,t):t.codecType.startsWith(Ie)?new We(e,t):void 0}(e.codecConstructor,e.options);return{async append(n){try{return await t.append(n)}catch(t){throw e.onTaskFinished(),t}},async flush(){try{return await t.flush()}finally{e.onTaskFinished()}}}}(e));let qe=[],Ve=[];function Ge(e){const t=!Ve.length;if(t)qe=qe.filter((t=>t!=e));else{const[{resolve:t,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Ve.splice(0,1);t(je(e,n,i,Ge,r,a))}return t}const Ze=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Ke{constructor(e){Ze.forEach((t=>this[t]=e[t]))}}const Xe="File format is not recognized",Ye="End of central directory not found",Je="End of Zip64 central directory not found",Qe="End of Zip64 central directory locator not found",$e="Central directory header not found",et="Local file header not found",tt="Zip64 extra field not found",nt="File contains encrypted entry",it="Encryption method not supported",rt="Compression method not supported",at="utf-8",st=["uncompressedSize","compressedSize","offset"];class ot{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t={}){const n=this,{reader:i,offset:r,extraFieldAES:a,compressionMethod:s,config:o,bitFlag:c,signature:l,rawLastModDate:d,compressedSize:u,onprogress:f}=n,h=n.localDirectory={};i.initialized||await i.init();const _=await gt(i,r,30),w=yt(_);let p=ut(n,t,"password");if(p=p&&p.length&&p,a&&99!=a.originalCompressionMethod)throw new Error(rt);if(0!=s&&8!=s)throw new Error(rt);if(67324752!=pt(w,0))throw new Error(et);ct(h,w,4);const b=r+30+h.filenameLength,y=b+h.extraFieldLength;h.rawExtraField=_.subarray(b,y),lt(n,h,w,4);const g=n.encrypted&&h.encrypted,x=g&&!a;if(g){if(!x&&void 0===a.strength)throw new Error(it);if(!p)throw new Error(nt)}const m=await function(e,t,n){const i=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[t.codecType]:[];if(qe.length<n.maxWorkers){const n={};return qe.push(n),je(n,e,t,Ge,i,r)}{const n=qe.find((e=>!e.busy));return n?je(n,e,t,Ge,i,r):new Promise((n=>Ve.push({resolve:n,codecConstructor:e,options:t,webWorker:i,scripts:r})))}}(o.Inflate,{codecType:Ie,password:p,zipCrypto:x,encryptionStrength:a&&a.strength,signed:ut(n,t,"checkSignature"),passwordVerification:x&&(c.dataDescriptor?d>>>8&255:l>>>24&255),signature:l,compressed:0!=s,encrypted:g,useWebWorkers:ut(n,t,"useWebWorkers")},o);e.initialized||await e.init();const k=ut(n,t,"signal");return await async function(e,t,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(c=0,l=0){const d=s.signal;if(c<r){R(d);const u=await t.readUint8Array(c+i,Math.min(o,r-c)),f=u.length;R(d);const h=await e.append(u);if(R(d),l+=await A(n,h),s.onprogress)try{s.onprogress(c+f,r)}catch(e){}return a(c+o,l)}{const t=await e.flush();return l+=await A(n,t.data),{signature:t.signature,length:l}}}()}(m,i,e,y,u,o,{onprogress:f,signal:k}),e.getData()}}function ct(e,t,n){const i=e.rawBitFlag=wt(t,n+2),r=1==(1&i);Object.assign(e,{encrypted:r,version:wt(t,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},rawLastModDate:pt(t,n+6),lastModDate:ht(e.rawLastModDate),filenameLength:wt(t,n+22),extraFieldLength:wt(t,n+24)})}function lt(e,t,n,i){const r=t.rawExtraField,a=t.extraField=new Map,s=yt(new Uint8Array(r));let o=0;try{for(;o<r.length;){const e=wt(s,o),t=wt(s,o+2);a.set(e,{type:e,data:r.slice(o+4,o+4+t)}),o+=4+t}}catch(e){}const c=wt(n,i+4);t.signature=pt(n,i+10),t.uncompressedSize=pt(n,i+18),t.compressedSize=pt(n,i+14);const l=t.extraFieldZip64=a.get(1);l&&function(e,t){t.zip64=!0;const n=yt(e.data);e.values=[];for(let t=0;t<Math.floor(e.data.length/8);t++)e.values.push(bt(n,0+8*t));const i=st.filter((e=>t[e]==G));for(let t=0;t<i.length;t++)e[i[t]]=e.values[t];st.forEach((n=>{if(t[n]==G){if(!e||void 0===e[n])throw new Error(tt);t[n]=e[n]}}))}(l,t);const d=t.extraFieldUnicodePath=a.get(28789);d&&dt(d,"filename","rawFilename",t,e);const u=t.extraFieldUnicodeComment=a.get(25461);u&&dt(u,"comment","rawComment",t,e);const f=t.extraFieldAES=a.get(39169);f?function(e,t,n){if(e){const i=yt(e.data);e.vendorVersion=_t(i,0),e.vendorId=_t(i,2);const r=_t(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=wt(i,5)}else t.compressionMethod=n}(f,t,c):t.compressionMethod=c}function dt(e,t,n,i,r){const a=yt(e.data);e.version=_t(a,0),e.signature=pt(a,1);const s=new J;s.append(r[n]);const o=yt(new Uint8Array(4));o.setUint32(0,s.get(),!0),e[t]=(new TextDecoder).decode(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==pt(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function ut(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function ft(e,t){return t&&"cp437"!=t.trim().toLowerCase()?new TextDecoder(t).decode(e):(e=>{let t="";for(let n=0;n<e.length;n++)t+=X[e[n]];return t})(e)}function ht(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function _t(e,t){return e.getUint8(t)}function wt(e,t){return e.getUint16(t,!0)}function pt(e,t){return e.getUint32(t,!0)}function bt(e,t){return Number(e.getBigUint64(t,!0))}function yt(e){return new DataView(e.buffer)}function gt(e,t,n){return e.readUint8Array(t,n)}k({Inflate:function(){const e=new g,t=new Uint8Array(512);let n=!1;e.inflateInit(),e.next_out=t,this.append=function(r,a){const s=[];let o,c,l=0,d=0,u=0;if(0!==r.length){e.next_in_index=0,e.next_in=r,e.avail_in=r.length;do{if(e.next_out_index=0,e.avail_out=512,0!==e.avail_in||n||(e.next_in_index=0,n=!0),o=e.inflate(0),n&&o===i){if(0!==e.avail_in)throw new Error("inflating: bad input")}else if(0!==o&&1!==o)throw new Error("inflating: "+e.msg);if((n||1===o)&&e.avail_in===r.length)throw new Error("inflating: bad input");e.next_out_index&&(512===e.next_out_index?s.push(new Uint8Array(t)):s.push(new Uint8Array(t.subarray(0,e.next_out_index)))),u+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return c=new Uint8Array(u),s.forEach((function(e){c.set(e,d),d+=e.length})),c}},this.flush=function(){e.inflateEnd()}}}),e.BlobReader=W,e.BlobWriter=class extends H{constructor(e){super(),this.offset=0,this.contentType=e,this.blob=new Blob([],{type:e})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},e.Data64URIReader=class extends I{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new Uint8Array(t),i=4*Math.floor(e/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),a=e-3*Math.floor(i/4);for(let e=a;e<a+t;e++)n[e-a]=r.charCodeAt(e);return n}},e.Data64URIWriter=class extends H{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}async writeUint8Array(e){super.writeUint8Array(e);let t=0,n=this.pending;const i=this.pending.length;for(this.pending="",t=0;t<3*Math.floor((i+e.length)/3)-i;t++)n+=String.fromCharCode(e[t]);for(;t<e.length;t++)this.pending+=String.fromCharCode(e[t]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},e.ERR_ABORT=v,e.ERR_BAD_FORMAT=Xe,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=$e,e.ERR_ENCRYPTED=nt,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Qe,e.ERR_EOCDR_NOT_FOUND=Ye,e.ERR_EOCDR_ZIP64_NOT_FOUND=Je,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=tt,e.ERR_HTTP_RANGE=E,e.ERR_INVALID_PASSWORD=re,e.ERR_INVALID_SIGNATURE=He,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=et,e.ERR_UNSUPPORTED_COMPRESSION=rt,e.ERR_UNSUPPORTED_ENCRYPTION=it,e.HttpRangeReader=class extends q{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=q,e.Reader=I,e.TextReader=class extends I{constructor(e){super(),this.blobReader=new W(new Blob([e],{type:S}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends H{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:S})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:S})}getData(){const e=new FileReader;return new Promise(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=n,e.readAsText(this.blob,this.encoding)}))}},e.Uint8ArrayReader=class extends I{constructor(e){super(),this.array=e,this.size=e.length}async readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends H{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.Writer=H,e.ZipReader=class{constructor(e,t={}){Object.assign(this,{reader:e,options:t,config:m})}async getEntries(e={}){const t=this,n=t.reader;if(n.initialized||await n.init(),n.size<22)throw new Error(Xe);const i=await async function(e,t,n,i,r){const a=new Uint8Array(4);!function(e,t,n){e.setUint32(t,n,!0)}(yt(a),0,t);const s=i+r;return await o(i)||await o(Math.min(s,n));async function o(t){const r=n-t,s=await gt(e,r,t);for(let e=s.length-i;e>=0;e--)if(s[e]==a[0]&&s[e+1]==a[1]&&s[e+2]==a[2]&&s[e+3]==a[3])return{offset:r+e,buffer:s.slice(e,e+i).buffer}}}(n,101010256,n.size,22,1048560);if(!i)throw new Error(Ye);const r=yt(i);let a=pt(r,12),s=pt(r,16),o=wt(r,8),c=0;if(s==G||65535==o){const e=yt(await gt(n,i.offset-20,20));if(117853008!=pt(e,0))throw new Error(Je);s=bt(e,8);let t=await gt(n,s,56),r=yt(t);const l=i.offset-20-56;if(pt(r,0)!=K&&s!=l){const e=s;s=l,c=s-e,t=await gt(n,s,56),r=yt(t)}if(pt(r,0)!=K)throw new Error(Qe);o=bt(r,24),a=pt(e,4),s-=bt(r,40)}if(s<0||s>=n.size)throw new Error(Xe);let l=0,d=await gt(n,s,n.size-s),u=yt(d);const f=i.offset-a;if(pt(u,l)!=Z&&s!=f){const e=s;s=f,c=s-e,d=await gt(n,s,n.size-s),u=yt(d)}if(s<0||s>=n.size)throw new Error(Xe);const h=[];for(let i=0;i<o;i++){const i=new ot(n,t.config,t.options);if(pt(u,l)!=Z)throw new Error($e);ct(i,u,l+6);const r=Boolean(i.bitFlag.languageEncodingFlag),a=l+46,s=a+i.filenameLength,o=s+i.extraFieldLength;Object.assign(i,{compressedSize:0,uncompressedSize:0,commentLength:wt(u,l+32),directory:16==(16&_t(u,l+38)),offset:pt(u,l+42)+c,rawFilename:d.subarray(a,s),filenameUTF8:r,commentUTF8:r,rawExtraField:d.subarray(s,o)});const f=o+i.commentLength;i.rawComment=d.subarray(o,f),i.filename=ft(i.rawFilename,i.filenameUTF8?at:ut(t,e,"filenameEncoding")),i.comment=ft(i.rawComment,i.commentUTF8?at:ut(t,e,"commentEncoding")),!i.directory&&i.filename.endsWith("/")&&(i.directory=!0),lt(i,i,u,l+6);const _=new Ke(i);_.getData=(e,t)=>i.getData(e,t),h.push(_),l=f}return h}async close(){}},e.configure=k,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -33,3 +33,3 @@ /* | ||
import { cipher, mode, codec } from "./sjcl.js"; | ||
import { cipher, codec, misc, mode } from "./sjcl.js"; | ||
@@ -40,9 +40,7 @@ const ERR_INVALID_PASSWORD = "Invalid pasword"; | ||
const PBKDF2_ALGORITHM = { name: "PBKDF2" }; | ||
const SIGNATURE_ALGORITHM = { name: "HMAC" }; | ||
const HASH_ALGORITHM = { name: "HMAC" }; | ||
const HASH_FUNCTION = "SHA-1"; | ||
const BASE_KEY_ALGORITHM = Object.assign({ hash: SIGNATURE_ALGORITHM }, PBKDF2_ALGORITHM); | ||
const BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM); | ||
const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM); | ||
const AUTHENTICATION_ALGORITHM = Object.assign({ hash: HASH_FUNCTION }, SIGNATURE_ALGORITHM); | ||
const DERIVED_BITS_USAGE = ["deriveBits"]; | ||
const SIGN_USAGE = ["sign"]; | ||
const SALT_LENGTH = [8, 12, 16]; | ||
@@ -53,58 +51,48 @@ const KEY_LENGTH = [16, 24, 32]; | ||
const subtle = crypto.subtle; | ||
const codecBytes = codec.bytes; | ||
const Aes = cipher.aes; | ||
const CtrGladman = mode.ctrGladman; | ||
const HmacSha1 = misc.hmacSha1; | ||
class AESDecrypt { | ||
constructor(password, signed, strength) { | ||
this.password = password; | ||
this.signed = signed; | ||
this.strength = strength - 1; | ||
this.input = signed && new Uint8Array(0); | ||
this.pendingInput = new Uint8Array(0); | ||
Object.assign(this, { | ||
password, | ||
signed, | ||
strength: strength - 1, | ||
pendingInput: new Uint8Array(0) | ||
}); | ||
} | ||
async append(input) { | ||
if (this.password) { | ||
const preambule = input.subarray(0, SALT_LENGTH[this.strength] + 2); | ||
await createDecryptionKeys(this, preambule, this.password); | ||
this.password = null; | ||
this.aesCtrGladman = new mode.ctrGladman(new cipher.aes(this.keys.key), Array.from(COUNTER_DEFAULT_VALUE)); | ||
input = input.subarray(SALT_LENGTH[this.strength] + 2); | ||
const aesCrypto = this; | ||
if (aesCrypto.password) { | ||
const preamble = subarray(input, 0, SALT_LENGTH[aesCrypto.strength] + 2); | ||
await createDecryptionKeys(aesCrypto, preamble, aesCrypto.password); | ||
aesCrypto.password = null; | ||
aesCrypto.aesCtrGladman = new CtrGladman(new Aes(aesCrypto.keys.key), Array.from(COUNTER_DEFAULT_VALUE)); | ||
aesCrypto.hmac = new HmacSha1(aesCrypto.keys.authentication); | ||
input = subarray(input, SALT_LENGTH[aesCrypto.strength] + 2); | ||
} | ||
let output = new Uint8Array(input.length - SIGNATURE_LENGTH - ((input.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); | ||
let bufferedInput = input; | ||
if (this.pendingInput.length) { | ||
bufferedInput = concat(this.pendingInput, input); | ||
output = expand(output, bufferedInput.length - SIGNATURE_LENGTH - ((bufferedInput.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); | ||
} | ||
let offset; | ||
for (offset = 0; offset <= bufferedInput.length - SIGNATURE_LENGTH - BLOCK_LENGTH; offset += BLOCK_LENGTH) { | ||
const inputChunk = bufferedInput.subarray(offset, offset + BLOCK_LENGTH); | ||
const chunkToDecrypt = codec.bytes.toBits(inputChunk); | ||
const outputChunk = this.aesCtrGladman.update(chunkToDecrypt); | ||
output.set(codec.bytes.fromBits(outputChunk), offset); | ||
} | ||
this.pendingInput = bufferedInput.subarray(offset); | ||
if (this.signed) { | ||
this.input = concat(this.input, input); | ||
} | ||
return output; | ||
const output = new Uint8Array(input.length - SIGNATURE_LENGTH - ((input.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); | ||
return append(aesCrypto, input, output, 0, SIGNATURE_LENGTH, true); | ||
} | ||
async flush() { | ||
const pendingInput = this.pendingInput; | ||
const keys = this.keys; | ||
const chunkToDecrypt = pendingInput.subarray(0, pendingInput.length - SIGNATURE_LENGTH); | ||
const originalSignatureArray = pendingInput.subarray(pendingInput.length - SIGNATURE_LENGTH); | ||
const aesCrypto = this; | ||
const pendingInput = aesCrypto.pendingInput; | ||
const chunkToDecrypt = subarray(pendingInput, 0, pendingInput.length - SIGNATURE_LENGTH); | ||
const originalSignature = subarray(pendingInput, pendingInput.length - SIGNATURE_LENGTH); | ||
let decryptedChunkArray = new Uint8Array(0); | ||
if (chunkToDecrypt.length) { | ||
const decryptedChunk = this.aesCtrGladman.update(codec.bytes.toBits(chunkToDecrypt)); | ||
decryptedChunkArray = codec.bytes.fromBits(decryptedChunk); | ||
const encryptedChunk = codecBytes.toBits(chunkToDecrypt); | ||
aesCrypto.hmac.update(encryptedChunk); | ||
const decryptedChunk = aesCrypto.aesCtrGladman.update(encryptedChunk); | ||
decryptedChunkArray = codecBytes.fromBits(decryptedChunk); | ||
} | ||
let valid = true; | ||
if (this.signed) { | ||
const signature = await subtle.sign(SIGNATURE_ALGORITHM, keys.authentication, this.input.subarray(0, this.input.length - SIGNATURE_LENGTH)); | ||
const signatureArray = new Uint8Array(signature).subarray(0, SIGNATURE_LENGTH); | ||
this.input = null; | ||
if (aesCrypto.signed) { | ||
const signature = subarray(codecBytes.fromBits(aesCrypto.hmac.digest()), 0, SIGNATURE_LENGTH); | ||
for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) { | ||
if (signatureArray[indexSignature] != originalSignatureArray[indexSignature]) { | ||
if (signature[indexSignature] != originalSignature[indexSignature]) { | ||
valid = false; | ||
@@ -119,3 +107,2 @@ } | ||
} | ||
} | ||
@@ -126,45 +113,35 @@ | ||
constructor(password, strength) { | ||
this.password = password; | ||
this.strength = strength - 1; | ||
this.output = new Uint8Array(0); | ||
this.pendingInput = new Uint8Array(0); | ||
Object.assign(this, { | ||
password, | ||
strength: strength - 1, | ||
pendingInput: new Uint8Array(0) | ||
}); | ||
} | ||
async append(input) { | ||
let preambule = new Uint8Array(0); | ||
if (this.password) { | ||
preambule = await createEncryptionKeys(this, this.password); | ||
this.password = null; | ||
this.aesCtrGladman = new mode.ctrGladman(new cipher.aes(this.keys.key), Array.from(COUNTER_DEFAULT_VALUE)); | ||
const aesCrypto = this; | ||
let preamble = new Uint8Array(0); | ||
if (aesCrypto.password) { | ||
preamble = await createEncryptionKeys(aesCrypto, aesCrypto.password); | ||
aesCrypto.password = null; | ||
aesCrypto.aesCtrGladman = new CtrGladman(new Aes(aesCrypto.keys.key), Array.from(COUNTER_DEFAULT_VALUE)); | ||
aesCrypto.hmac = new HmacSha1(aesCrypto.keys.authentication); | ||
} | ||
let output = new Uint8Array(preambule.length + input.length - (input.length % BLOCK_LENGTH)); | ||
output.set(preambule, 0); | ||
if (this.pendingInput.length) { | ||
input = concat(this.pendingInput, input); | ||
output = expand(output, input.length - (input.length % BLOCK_LENGTH)); | ||
} | ||
let offset; | ||
for (offset = 0; offset <= input.length - BLOCK_LENGTH; offset += BLOCK_LENGTH) { | ||
const chunkToEncrypt = codec.bytes.toBits(input.subarray(offset, offset + BLOCK_LENGTH)); | ||
const outputChunk = this.aesCtrGladman.update(chunkToEncrypt); | ||
output.set(codec.bytes.fromBits(outputChunk), offset + preambule.length); | ||
} | ||
this.pendingInput = input.subarray(offset); | ||
this.output = concat(this.output, output); | ||
return output; | ||
const output = new Uint8Array(preamble.length + input.length - (input.length % BLOCK_LENGTH)); | ||
output.set(preamble, 0); | ||
return append(aesCrypto, input, output, preamble.length, 0); | ||
} | ||
async flush() { | ||
const aesCrypto = this; | ||
let encryptedChunkArray = new Uint8Array(0); | ||
if (this.pendingInput.length) { | ||
const encryptedChunk = this.aesCtrGladman.update(codec.bytes.toBits(this.pendingInput)); | ||
encryptedChunkArray = codec.bytes.fromBits(encryptedChunk); | ||
this.output = concat(this.output, encryptedChunkArray); | ||
if (aesCrypto.pendingInput.length) { | ||
const encryptedChunk = aesCrypto.aesCtrGladman.update(codecBytes.toBits(aesCrypto.pendingInput)); | ||
aesCrypto.hmac.update(encryptedChunk); | ||
encryptedChunkArray = codecBytes.fromBits(encryptedChunk); | ||
} | ||
const signature = await subtle.sign(SIGNATURE_ALGORITHM, this.keys.authentication, this.output.subarray(SALT_LENGTH[this.strength] + 2)); | ||
this.output = null; | ||
const signatureArray = new Uint8Array(signature).subarray(0, SIGNATURE_LENGTH); | ||
const signature = subarray(codecBytes.fromBits(aesCrypto.hmac.digest()), 0, SIGNATURE_LENGTH); | ||
return { | ||
data: concat(encryptedChunkArray, signatureArray), | ||
signature: signatureArray | ||
data: concat(encryptedChunkArray, signature), | ||
signature | ||
}; | ||
@@ -180,5 +157,27 @@ } | ||
async function createDecryptionKeys(decrypt, preambuleArray, password) { | ||
await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); | ||
const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]); | ||
function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) { | ||
const inputLength = input.length - paddingEnd; | ||
if (aesCrypto.pendingInput.length) { | ||
input = concat(aesCrypto.pendingInput, input); | ||
output = expand(output, inputLength - (inputLength % BLOCK_LENGTH)); | ||
} | ||
let offset; | ||
for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) { | ||
const inputChunk = codecBytes.toBits(subarray(input, offset, offset + BLOCK_LENGTH)); | ||
if (verifySignature) { | ||
aesCrypto.hmac.update(inputChunk); | ||
} | ||
const outputChunk = aesCrypto.aesCtrGladman.update(inputChunk); | ||
if (!verifySignature) { | ||
aesCrypto.hmac.update(outputChunk); | ||
} | ||
output.set(codecBytes.fromBits(outputChunk), offset + paddingStart); | ||
} | ||
aesCrypto.pendingInput = subarray(input, offset); | ||
return output; | ||
} | ||
async function createDecryptionKeys(decrypt, preambleArray, password) { | ||
await createKeys(decrypt, password, subarray(preambleArray, 0, SALT_LENGTH[decrypt.strength])); | ||
const passwordVerification = subarray(preambleArray, SALT_LENGTH[decrypt.strength]); | ||
const passwordVerificationKey = decrypt.keys.passwordVerification; | ||
@@ -202,5 +201,5 @@ if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { | ||
target.keys = { | ||
key: codec.bytes.toBits(compositeKey.subarray(0, KEY_LENGTH[target.strength])), | ||
authentication: await subtle.importKey(RAW_FORMAT, compositeKey.subarray(KEY_LENGTH[target.strength], KEY_LENGTH[target.strength] * 2), AUTHENTICATION_ALGORITHM, false, SIGN_USAGE), | ||
passwordVerification: compositeKey.subarray(KEY_LENGTH[target.strength] * 2) | ||
key: codecBytes.toBits(subarray(compositeKey, 0, KEY_LENGTH[target.strength])), | ||
authentication: codecBytes.toBits(subarray(compositeKey, KEY_LENGTH[target.strength], KEY_LENGTH[target.strength] * 2)), | ||
passwordVerification: subarray(compositeKey, KEY_LENGTH[target.strength] * 2) | ||
}; | ||
@@ -226,2 +225,6 @@ } | ||
return inputArray; | ||
} | ||
function subarray(array, begin, end) { | ||
return array.subarray(begin, end); | ||
} |
@@ -41,14 +41,16 @@ /* | ||
export default (workerData, codecConstructor, options, onTaskFinished, webWorker, scripts) => { | ||
workerData.busy = true; | ||
workerData.codecConstructor = codecConstructor; | ||
workerData.options = Object.assign({}, options); | ||
workerData.scripts = scripts; | ||
workerData.webWorker = webWorker; | ||
workerData.onTaskFinished = () => { | ||
workerData.busy = false; | ||
const terminateWorker = onTaskFinished(workerData); | ||
if (terminateWorker && workerData.worker) { | ||
workerData.worker.terminate(); | ||
Object.assign(workerData, { | ||
busy: true, | ||
codecConstructor, | ||
options: Object.assign({}, options), | ||
scripts, | ||
webWorker, | ||
onTaskFinished() { | ||
workerData.busy = false; | ||
const terminateWorker = onTaskFinished(workerData); | ||
if (terminateWorker && workerData.worker) { | ||
workerData.worker.terminate(); | ||
} | ||
} | ||
}; | ||
}); | ||
return webWorker ? createWebWorkerInterface(workerData) : createWorkerInterface(workerData); | ||
@@ -55,0 +57,0 @@ }; |
@@ -41,25 +41,36 @@ /* | ||
constructor(codecConstructor, options) { | ||
this.signature = options.signature; | ||
this.encrypted = Boolean(options.password); | ||
this.signed = options.signed; | ||
this.compressed = options.compressed; | ||
this.inflate = options.compressed && new codecConstructor(); | ||
this.crc32 = options.signed && new Crc32(); | ||
this.zipCrypto = options.zipCrypto; | ||
this.decrypt = this.encrypted && options.zipCrypto ? | ||
new ZipCryptoDecrypt(options.password, options.passwordVerification) : | ||
new AESDecrypt(options.password, options.signed, options.encryptionStrength); | ||
constructor(codecConstructor, { | ||
signature, | ||
password, | ||
signed, | ||
compressed, | ||
zipCrypto, | ||
passwordVerification, | ||
encryptionStrength | ||
}) { | ||
const encrypted = Boolean(password); | ||
Object.assign(this, { | ||
signature, | ||
encrypted, | ||
signed, | ||
compressed, | ||
inflate: compressed && new codecConstructor(), | ||
crc32: signed && new Crc32(), | ||
zipCrypto, | ||
decrypt: encrypted && zipCrypto ? | ||
new ZipCryptoDecrypt(password, passwordVerification) : | ||
new AESDecrypt(password, signed, encryptionStrength) | ||
}); | ||
} | ||
async append(data) { | ||
if (this.encrypted && data.length) { | ||
data = await this.decrypt.append(data); | ||
const codec = this; | ||
if (codec.encrypted && data.length) { | ||
data = await codec.decrypt.append(data); | ||
} | ||
if (this.compressed && data.length) { | ||
data = await this.inflate.append(data); | ||
if (codec.compressed && data.length) { | ||
data = await codec.inflate.append(data); | ||
} | ||
if ((!this.encrypted || this.zipCrypto) && this.signed && data.length) { | ||
this.crc32.append(data); | ||
if ((!codec.encrypted || codec.zipCrypto) && codec.signed && data.length) { | ||
codec.crc32.append(data); | ||
} | ||
@@ -70,6 +81,7 @@ return data; | ||
async flush() { | ||
const codec = this; | ||
let signature; | ||
let data = new Uint8Array(0); | ||
if (this.encrypted) { | ||
const result = await this.decrypt.flush(); | ||
if (codec.encrypted) { | ||
const result = await codec.decrypt.flush(); | ||
if (!result.valid) { | ||
@@ -80,13 +92,13 @@ throw new Error(ERR_INVALID_SIGNATURE); | ||
} | ||
if ((!this.encrypted || this.zipCrypto) && this.signed) { | ||
if ((!codec.encrypted || codec.zipCrypto) && codec.signed) { | ||
const dataViewSignature = new DataView(new Uint8Array(4).buffer); | ||
signature = this.crc32.get(); | ||
signature = codec.crc32.get(); | ||
dataViewSignature.setUint32(0, signature); | ||
if (this.signature != dataViewSignature.getUint32(0, false)) { | ||
if (codec.cipher != dataViewSignature.getUint32(0, false)) { | ||
throw new Error(ERR_INVALID_SIGNATURE); | ||
} | ||
} | ||
if (this.compressed) { | ||
data = (await this.inflate.append(data)) || new Uint8Array(0); | ||
await this.inflate.flush(); | ||
if (codec.compressed) { | ||
data = (await codec.inflate.append(data)) || new Uint8Array(0); | ||
await codec.inflate.flush(); | ||
} | ||
@@ -99,24 +111,36 @@ return { data, signature }; | ||
constructor(codecConstructor, options) { | ||
this.encrypted = options.encrypted; | ||
this.signed = options.signed; | ||
this.compressed = options.compressed; | ||
this.deflate = options.compressed && new codecConstructor({ level: options.level || 5 }); | ||
this.crc32 = options.signed && new Crc32(); | ||
this.zipCrypto = options.zipCrypto; | ||
this.encrypt = this.encrypted && options.zipCrypto ? | ||
new ZipCryptoEncrypt(options.password, options.passwordVerification) : | ||
new AESEncrypt(options.password, options.encryptionStrength); | ||
constructor(codecConstructor, { | ||
encrypted, | ||
signed, | ||
compressed, | ||
level, | ||
zipCrypto, | ||
password, | ||
passwordVerification, | ||
encryptionStrength | ||
}) { | ||
Object.assign(this, { | ||
encrypted, | ||
signed, | ||
compressed, | ||
deflate: compressed && new codecConstructor({ level: level || 5 }), | ||
crc32: signed && new Crc32(), | ||
zipCrypto, | ||
encrypt: encrypted && zipCrypto ? | ||
new ZipCryptoEncrypt(password, passwordVerification) : | ||
new AESEncrypt(password, encryptionStrength) | ||
}); | ||
} | ||
async append(inputData) { | ||
const codec = this; | ||
let data = inputData; | ||
if (this.compressed && inputData.length) { | ||
data = await this.deflate.append(inputData); | ||
if (codec.compressed && inputData.length) { | ||
data = await codec.deflate.append(inputData); | ||
} | ||
if (this.encrypted && data.length) { | ||
data = await this.encrypt.append(data); | ||
if (codec.encrypted && data.length) { | ||
data = await codec.encrypt.append(data); | ||
} | ||
if ((!this.encrypted || this.zipCrypto) && this.signed && inputData.length) { | ||
this.crc32.append(inputData); | ||
if ((!codec.encrypted || codec.zipCrypto) && codec.signed && inputData.length) { | ||
codec.crc32.append(inputData); | ||
} | ||
@@ -127,10 +151,11 @@ return data; | ||
async flush() { | ||
const codec = this; | ||
let signature; | ||
let data = new Uint8Array(0); | ||
if (this.compressed) { | ||
data = (await this.deflate.flush()) || new Uint8Array(0); | ||
if (codec.compressed) { | ||
data = (await codec.deflate.flush()) || new Uint8Array(0); | ||
} | ||
if (this.encrypted) { | ||
data = await this.encrypt.append(data); | ||
const result = await this.encrypt.flush(); | ||
if (codec.encrypted) { | ||
data = await codec.encrypt.append(data); | ||
const result = await codec.encrypt.flush(); | ||
signature = result.signature; | ||
@@ -142,4 +167,4 @@ const newData = new Uint8Array(data.length + result.data.length); | ||
} | ||
if ((!this.encrypted || this.zipCrypto) && this.signed) { | ||
signature = this.crc32.get(); | ||
if ((!codec.encrypted || codec.zipCrypto) && codec.signed) { | ||
signature = codec.crc32.get(); | ||
} | ||
@@ -146,0 +171,0 @@ return { data, signature }; |
@@ -202,2 +202,173 @@ // Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js | ||
const hash = {}; | ||
/** | ||
* Context for a SHA-1 operation in progress. | ||
* @constructor | ||
*/ | ||
hash.sha1 = function (hash) { | ||
if (hash) { | ||
this._h = hash._h.slice(0); | ||
this._buffer = hash._buffer.slice(0); | ||
this._length = hash._length; | ||
} else { | ||
this.reset(); | ||
} | ||
}; | ||
hash.sha1.prototype = { | ||
/** | ||
* The hash's block size, in bits. | ||
* @constant | ||
*/ | ||
blockSize: 512, | ||
/** | ||
* Reset the hash state. | ||
* @return this | ||
*/ | ||
reset: function () { | ||
const sha1 = this; | ||
sha1._h = this._init.slice(0); | ||
sha1._buffer = []; | ||
sha1._length = 0; | ||
return sha1; | ||
}, | ||
/** | ||
* Input several words to the hash. | ||
* @param {bitArray|String} data the data to hash. | ||
* @return this | ||
*/ | ||
update: function (data) { | ||
const sha1 = this; | ||
if (typeof data === "string") { | ||
data = codec.utf8String.toBits(data); | ||
} | ||
const b = sha1._buffer = bitArray.concat(sha1._buffer, data); | ||
const ol = sha1._length; | ||
const nl = sha1._length = ol + bitArray.bitLength(data); | ||
if (nl > 9007199254740991) { | ||
throw new Error("Cannot hash more than 2^53 - 1 bits"); | ||
} | ||
const c = new Uint32Array(b); | ||
let j = 0; | ||
for (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl; | ||
i += sha1.blockSize) { | ||
sha1._block(c.subarray(16 * j, 16 * (j + 1))); | ||
j += 1; | ||
} | ||
b.splice(0, 16 * j); | ||
return sha1; | ||
}, | ||
/** | ||
* Complete hashing and output the hash value. | ||
* @return {bitArray} The hash value, an array of 5 big-endian words. TODO | ||
*/ | ||
finalize: function () { | ||
const sha1 = this; | ||
let b = sha1._buffer; | ||
const h = sha1._h; | ||
// Round out and push the buffer | ||
b = bitArray.concat(b, [bitArray.partial(1, 1)]); | ||
// Round out the buffer to a multiple of 16 words, less the 2 length words. | ||
for (let i = b.length + 2; i & 15; i++) { | ||
b.push(0); | ||
} | ||
// append the length | ||
b.push(Math.floor(sha1._length / 0x100000000)); | ||
b.push(sha1._length | 0); | ||
while (b.length) { | ||
sha1._block(b.splice(0, 16)); | ||
} | ||
sha1.reset(); | ||
return h; | ||
}, | ||
/** | ||
* The SHA-1 initialization vector. | ||
* @private | ||
*/ | ||
_init: [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0], | ||
/** | ||
* The SHA-1 hash key. | ||
* @private | ||
*/ | ||
_key: [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6], | ||
/** | ||
* The SHA-1 logical functions f(0), f(1), ..., f(79). | ||
* @private | ||
*/ | ||
_f: function (t, b, c, d) { | ||
if (t <= 19) { | ||
return (b & c) | (~b & d); | ||
} else if (t <= 39) { | ||
return b ^ c ^ d; | ||
} else if (t <= 59) { | ||
return (b & c) | (b & d) | (c & d); | ||
} else if (t <= 79) { | ||
return b ^ c ^ d; | ||
} | ||
}, | ||
/** | ||
* Circular left-shift operator. | ||
* @private | ||
*/ | ||
_S: function (n, x) { | ||
return (x << n) | (x >>> 32 - n); | ||
}, | ||
/** | ||
* Perform one cycle of SHA-1. | ||
* @param {Uint32Array|bitArray} words one block of words. | ||
* @private | ||
*/ | ||
_block: function (words) { | ||
const sha1 = this; | ||
const h = sha1._h; | ||
// When words is passed to _block, it has 16 elements. SHA1 _block | ||
// function extends words with new elements (at the end there are 80 elements). | ||
// The problem is that if we use Uint32Array instead of Array, | ||
// the length of Uint32Array cannot be changed. Thus, we replace words with a | ||
// normal Array here. | ||
const w = Array(80); // do not use Uint32Array here as the instantiation is slower | ||
for (let j = 0; j < 16; j++) { | ||
w[j] = words[j]; | ||
} | ||
let a = h[0]; | ||
let b = h[1]; | ||
let c = h[2]; | ||
let d = h[3]; | ||
let e = h[4]; | ||
for (let t = 0; t <= 79; t++) { | ||
if (t >= 16) { | ||
w[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]); | ||
} | ||
const tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] + | ||
sha1._key[Math.floor(t / 20)]) | 0; | ||
e = d; | ||
d = c; | ||
c = sha1._S(30, b); | ||
b = a; | ||
a = tmp; | ||
} | ||
h[0] = (h[0] + a) | 0; | ||
h[1] = (h[1] + b) | 0; | ||
h[2] = (h[2] + c) | 0; | ||
h[3] = (h[3] + d) | 0; | ||
h[4] = (h[4] + e) | 0; | ||
} | ||
}; | ||
/** @fileOverview Low-level AES implementation. | ||
@@ -517,6 +688,67 @@ * | ||
const misc = {}; | ||
/** @fileOverview HMAC implementation. | ||
* | ||
* @author Emily Stark | ||
* @author Mike Hamburg | ||
* @author Dan Boneh | ||
*/ | ||
/** HMAC with the specified hash function. | ||
* @constructor | ||
* @param {bitArray} key the key for HMAC. | ||
* @param {Object} [Hash=hash.sha1] The hash function to use. | ||
*/ | ||
misc.hmacSha1 = class { | ||
constructor(key) { | ||
const hmac = this; | ||
const Hash = hmac._hash = hash.sha1; | ||
const exKey = [[], []]; | ||
const bs = Hash.prototype.blockSize / 32; | ||
hmac._baseHash = [new Hash(), new Hash()]; | ||
if (key.length > bs) { | ||
key = Hash.hash(key); | ||
} | ||
for (let i = 0; i < bs; i++) { | ||
exKey[0][i] = key[i] ^ 0x36363636; | ||
exKey[1][i] = key[i] ^ 0x5C5C5C5C; | ||
} | ||
hmac._baseHash[0].update(exKey[0]); | ||
hmac._baseHash[1].update(exKey[1]); | ||
hmac._resultHash = new Hash(hmac._baseHash[0]); | ||
} | ||
reset() { | ||
const hmac = this; | ||
hmac._resultHash = new hmac._hash(hmac._baseHash[0]); | ||
hmac._updated = false; | ||
} | ||
update(data) { | ||
const hmac = this; | ||
hmac._updated = true; | ||
hmac._resultHash.update(data); | ||
} | ||
digest() { | ||
const hmac = this; | ||
const w = hmac._resultHash.finalize(); | ||
const result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize(); | ||
hmac.reset(); | ||
return result; | ||
} | ||
}; | ||
export { | ||
cipher, | ||
codec, | ||
misc, | ||
mode | ||
}; |
@@ -41,12 +41,16 @@ /* | ||
constructor(password, passwordVerification) { | ||
this.password = password; | ||
this.passwordVerification = passwordVerification; | ||
createKeys(this, password); | ||
const zipCrypto = this; | ||
Object.assign(zipCrypto, { | ||
password, | ||
passwordVerification | ||
}); | ||
createKeys(zipCrypto, password); | ||
} | ||
async append(input) { | ||
if (this.password) { | ||
const decryptedHeader = decrypt(this, input.subarray(0, HEADER_LENGTH)); | ||
this.password = null; | ||
if (decryptedHeader[HEADER_LENGTH - 1] != this.passwordVerification) { | ||
const zipCrypto = this; | ||
if (zipCrypto.password) { | ||
const decryptedHeader = decrypt(zipCrypto, input.subarray(0, HEADER_LENGTH)); | ||
zipCrypto.password = null; | ||
if (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) { | ||
throw new Error(ERR_INVALID_PASSWORD); | ||
@@ -56,3 +60,3 @@ } | ||
} | ||
return decrypt(this, input); | ||
return decrypt(zipCrypto, input); | ||
} | ||
@@ -71,16 +75,20 @@ | ||
constructor(password, passwordVerification) { | ||
this.passwordVerification = passwordVerification; | ||
this.password = password; | ||
createKeys(this, password); | ||
const zipCrypto = this; | ||
Object.assign(zipCrypto, { | ||
password, | ||
passwordVerification | ||
}); | ||
createKeys(zipCrypto, password); | ||
} | ||
async append(input) { | ||
const zipCrypto = this; | ||
let output; | ||
let offset; | ||
if (this.password) { | ||
this.password = null; | ||
if (zipCrypto.password) { | ||
zipCrypto.password = null; | ||
const header = crypto.getRandomValues(new Uint8Array(HEADER_LENGTH)); | ||
header[HEADER_LENGTH - 1] = this.passwordVerification; | ||
header[HEADER_LENGTH - 1] = zipCrypto.passwordVerification; | ||
output = new Uint8Array(input.length + header.length); | ||
output.set(encrypt(this, header), 0); | ||
output.set(encrypt(zipCrypto, header), 0); | ||
offset = HEADER_LENGTH; | ||
@@ -91,3 +99,3 @@ } else { | ||
} | ||
output.set(encrypt(this, input), offset); | ||
output.set(encrypt(zipCrypto, input), offset); | ||
return output; | ||
@@ -94,0 +102,0 @@ } |
@@ -58,3 +58,2 @@ /* | ||
const BITFLAG_DATA_DESCRIPTOR = 0x0008; | ||
const BITFLAG_ENHANCED_DEFLATING = 0x0010; | ||
const BITFLAG_LANG_ENCODING_FLAG = 0x0800; | ||
@@ -96,3 +95,2 @@ const FILE_ATTR_MSDOS_DIR_MASK = 0x10; | ||
BITFLAG_DATA_DESCRIPTOR, | ||
BITFLAG_ENHANCED_DEFLATING, | ||
BITFLAG_LANG_ENCODING_FLAG, | ||
@@ -99,0 +97,0 @@ FILE_ATTR_MSDOS_DIR_MASK, |
@@ -43,14 +43,15 @@ | ||
constructor(options) { | ||
const codecAdapter = this; | ||
const onData = data => { | ||
if (this.pendingData) { | ||
const pendingData = this.pendingData; | ||
this.pendingData = new Uint8Array(pendingData.length + data.length); | ||
this.pendingData.set(pendingData, 0); | ||
this.pendingData.set(data, pendingData.length); | ||
if (codecAdapter.pendingData) { | ||
const pendingData = codecAdapter.pendingData; | ||
codecAdapter.pendingData = new Uint8Array(pendingData.length + data.length); | ||
codecAdapter.pendingData.set(pendingData, 0); | ||
codecAdapter.pendingData.set(data, pendingData.length); | ||
} else { | ||
this.pendingData = new Uint8Array(data); | ||
codecAdapter.pendingData = new Uint8Array(data); | ||
} | ||
}; | ||
this.codec = new constructor(Object.assign({}, constructorOptions, options)); | ||
registerDataHandler(this.codec, onData); | ||
codecAdapter.codec = new constructor(Object.assign({}, constructorOptions, options)); | ||
registerDataHandler(codecAdapter.codec, onData); | ||
} | ||
@@ -57,0 +58,0 @@ async append(data) { |
@@ -52,2 +52,3 @@ /* | ||
constructor(fs, name, params, parent) { | ||
const zipEntry = this; | ||
if (fs.root && parent && parent.getChildByName(name)) { | ||
@@ -59,12 +60,14 @@ throw new Error("Entry filename already exists"); | ||
} | ||
this.fs = fs; | ||
this.name = name; | ||
this.data = params.data; | ||
this.id = fs.entries.length; | ||
this.parent = parent; | ||
this.children = []; | ||
this.uncompressedSize = 0; | ||
fs.entries.push(this); | ||
Object.assign(zipEntry, { | ||
fs, | ||
name, | ||
data: params.data, | ||
id: fs.entries.length, | ||
parent, | ||
children: [], | ||
uncompressedSize: 0 | ||
}); | ||
fs.entries.push(zipEntry); | ||
if (parent) { | ||
this.parent.children.push(this); | ||
zipEntry.parent.children.push(zipEntry); | ||
} | ||
@@ -75,3 +78,4 @@ } | ||
// deprecated | ||
this.fs.move(this, target); | ||
const zipEntry = this; | ||
zipEntry.fs.move(zipEntry, target); | ||
} | ||
@@ -84,4 +88,5 @@ | ||
getRelativeName(ancestor = this.fs.root) { | ||
let relativeName = this.name; | ||
let entry = this.parent; | ||
const zipEntry = this; | ||
let relativeName = zipEntry.name; | ||
let entry = zipEntry.parent; | ||
while (entry && entry != ancestor) { | ||
@@ -107,6 +112,7 @@ relativeName = (entry.name ? entry.name + "/" : "") + relativeName; | ||
super(fs, name, params, parent); | ||
this.Reader = params.Reader; | ||
this.Writer = params.Writer; | ||
const zipEntry = this; | ||
zipEntry.Reader = params.Reader; | ||
zipEntry.Writer = params.Writer; | ||
if (params.getData) { | ||
this.getData = params.getData; | ||
zipEntry.getData = params.getData; | ||
} | ||
@@ -116,12 +122,13 @@ } | ||
async getData(writer, options = {}) { | ||
if (!writer || (writer.constructor == this.Writer && this.data)) { | ||
return this.data; | ||
const zipEntry = this; | ||
if (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data)) { | ||
return zipEntry.data; | ||
} else { | ||
this.reader = new this.Reader(this.data, options); | ||
await this.reader.init(); | ||
zipEntry.reader = new zipEntry.Reader(zipEntry.data, options); | ||
await zipEntry.reader.init(); | ||
if (!writer.initialized) { | ||
await writer.init(); | ||
} | ||
this.uncompressedSize = this.reader.size; | ||
return pipe(this.reader, writer); | ||
zipEntry.uncompressedSize = zipEntry.reader.size; | ||
return pipe(zipEntry.reader, writer); | ||
} | ||
@@ -147,27 +154,35 @@ } | ||
replaceBlob(blob) { | ||
this.data = blob; | ||
this.Reader = BlobReader; | ||
this.Writer = BlobWriter; | ||
this.reader = null; | ||
Object.assign(this, { | ||
data: blob, | ||
Reader: BlobReader, | ||
Writer: BlobWriter, | ||
reader: null | ||
}); | ||
} | ||
replaceText(text) { | ||
this.data = text; | ||
this.Reader = TextReader; | ||
this.Writer = TextWriter; | ||
this.reader = null; | ||
Object.assign(this, { | ||
data: text, | ||
Reader: TextReader, | ||
Writer: TextWriter, | ||
reader: null | ||
}); | ||
} | ||
replaceData64URI(dataURI) { | ||
this.data = dataURI; | ||
this.Reader = Data64URIReader; | ||
this.Writer = Data64URIWriter; | ||
this.reader = null; | ||
Object.assign(this, { | ||
data: dataURI, | ||
Reader: Data64URIReader, | ||
Writer: Data64URIWriter, | ||
reader: null | ||
}); | ||
} | ||
replaceUint8Array(array) { | ||
this.data = array; | ||
this.Reader = Uint8ArrayReader; | ||
this.Writer = Uint8ArrayWriter; | ||
this.reader = null; | ||
Object.assign(this, { | ||
data: array, | ||
Reader: Uint8ArrayReader, | ||
Writer: Uint8ArrayWriter, | ||
reader: null | ||
}); | ||
} | ||
@@ -287,6 +302,7 @@ } | ||
async exportZip(writer, options) { | ||
await initReaders(this); | ||
const zipEntry = this; | ||
await initReaders(zipEntry); | ||
await writer.init(); | ||
const zipWriter = new ZipWriter(writer, options); | ||
await exportZip(zipWriter, this, getTotalSize([this], "uncompressedSize"), options); | ||
await exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], "uncompressedSize"), options); | ||
await zipWriter.close(); | ||
@@ -297,4 +313,5 @@ return writer.getData(); | ||
getChildByName(name) { | ||
for (let childIndex = 0; childIndex < this.children.length; childIndex++) { | ||
const child = this.children[childIndex]; | ||
const children = this.children; | ||
for (let childIndex = 0; childIndex < children.length; childIndex++) { | ||
const child = children[childIndex]; | ||
if (child.name == name) { | ||
@@ -441,6 +458,7 @@ return child; | ||
async init() { | ||
this.size = this.entry.uncompressedSize; | ||
const data = await this.entry.getData(new BlobWriter(), Object.assign({}, this.options, options)); | ||
this.data = data; | ||
this.blobReader = new BlobReader(data); | ||
const zipBlobReader = this; | ||
zipBlobReader.size = zipBlobReader.entry.uncompressedSize; | ||
const data = await zipBlobReader.entry.getData(new BlobWriter(), Object.assign({}, zipBlobReader.options, options)); | ||
zipBlobReader.data = data; | ||
zipBlobReader.blobReader = new BlobReader(data); | ||
} | ||
@@ -447,0 +465,0 @@ |
@@ -54,3 +54,2 @@ /* | ||
BITFLAG_DATA_DESCRIPTOR, | ||
BITFLAG_ENHANCED_DEFLATING, | ||
BITFLAG_LANG_ENCODING_FLAG, | ||
@@ -83,9 +82,12 @@ FILE_ATTR_MSDOS_DIR_MASK, | ||
constructor(reader, options = {}) { | ||
this.reader = reader; | ||
this.options = options; | ||
this.config = getConfiguration(); | ||
Object.assign(this, { | ||
reader, | ||
options, | ||
config: getConfiguration() | ||
}); | ||
} | ||
async getEntries(options = {}) { | ||
const reader = this.reader; | ||
const zipReader = this; | ||
const reader = zipReader.reader; | ||
if (!reader.initialized) { | ||
@@ -97,14 +99,14 @@ await reader.init(); | ||
} | ||
const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16); | ||
const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16); | ||
if (!endOfDirectoryInfo) { | ||
throw new Error(ERR_EOCDR_NOT_FOUND); | ||
} | ||
const endOfDirectoryView = new DataView(endOfDirectoryInfo.buffer); | ||
const endOfDirectoryView = getDataView(endOfDirectoryInfo); | ||
let directoryDataLength = getUint32(endOfDirectoryView, 12); | ||
let directoryDataOffset = getUint32(endOfDirectoryView, 16); | ||
let filesLength = getUint16(endOfDirectoryView, 8); | ||
let prependedBytesLength = 0; | ||
if (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS) { | ||
const endOfDirectoryLocatorArray = await reader.readUint8Array(endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH); | ||
const endOfDirectoryLocatorView = new DataView(endOfDirectoryLocatorArray.buffer); | ||
let prependedDataLength = 0; | ||
if (directoryDataOffset == MAX_32_BITS || filesLength == MAX_16_BITS) { | ||
const endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH); | ||
const endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray); | ||
if (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) { | ||
@@ -114,11 +116,11 @@ throw new Error(ERR_EOCDR_ZIP64_NOT_FOUND); | ||
directoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8); | ||
let endOfDirectoryArray = await reader.readUint8Array(directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH); | ||
let endOfDirectoryView = new DataView(endOfDirectoryArray.buffer); | ||
const computedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH; | ||
if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != computedDirectoryDataOffset) { | ||
let endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH); | ||
let endOfDirectoryView = getDataView(endOfDirectoryArray); | ||
const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH; | ||
if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { | ||
const originalDirectoryDataOffset = directoryDataOffset; | ||
directoryDataOffset = computedDirectoryDataOffset; | ||
prependedBytesLength = directoryDataOffset - originalDirectoryDataOffset; | ||
endOfDirectoryArray = await reader.readUint8Array(directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH); | ||
endOfDirectoryView = new DataView(endOfDirectoryArray.buffer); | ||
directoryDataOffset = expectedDirectoryDataOffset; | ||
prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; | ||
endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH); | ||
endOfDirectoryView = getDataView(endOfDirectoryArray); | ||
} | ||
@@ -129,3 +131,3 @@ if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) { | ||
filesLength = getBigUint64(endOfDirectoryView, 24); | ||
directoryDataLength = getBigUint64(endOfDirectoryLocatorView, 4); | ||
directoryDataLength = getUint32(endOfDirectoryLocatorView, 4); | ||
directoryDataOffset -= getBigUint64(endOfDirectoryView, 40); | ||
@@ -137,11 +139,11 @@ } | ||
let offset = 0; | ||
let directoryArray = await reader.readUint8Array(directoryDataOffset, reader.size - directoryDataOffset); | ||
let directoryView = new DataView(directoryArray.buffer); | ||
const computedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength; | ||
if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != computedDirectoryDataOffset) { | ||
let directoryArray = await readUint8Array(reader, directoryDataOffset, reader.size - directoryDataOffset); | ||
let directoryView = getDataView(directoryArray); | ||
const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength; | ||
if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { | ||
const originalDirectoryDataOffset = directoryDataOffset; | ||
directoryDataOffset = computedDirectoryDataOffset; | ||
prependedBytesLength = directoryDataOffset - originalDirectoryDataOffset; | ||
directoryArray = await reader.readUint8Array(directoryDataOffset, reader.size - directoryDataOffset); | ||
directoryView = new DataView(directoryArray.buffer); | ||
directoryDataOffset = expectedDirectoryDataOffset; | ||
prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; | ||
directoryArray = await readUint8Array(reader, directoryDataOffset, reader.size - directoryDataOffset); | ||
directoryView = getDataView(directoryArray); | ||
} | ||
@@ -153,24 +155,29 @@ if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { | ||
for (let indexFile = 0; indexFile < filesLength; indexFile++) { | ||
const fileEntry = new ZipEntry(this.reader, this.config, this.options); | ||
const fileEntry = new ZipEntry(reader, zipReader.config, zipReader.options); | ||
if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { | ||
throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); | ||
} | ||
fileEntry.compressedSize = 0; | ||
fileEntry.uncompressedSize = 0; | ||
readCommonHeader(fileEntry, directoryView, offset + 6); | ||
fileEntry.commentLength = getUint16(directoryView, offset + 32); | ||
fileEntry.directory = (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK; | ||
fileEntry.offset = getUint32(directoryView, offset + 42) + prependedBytesLength; | ||
fileEntry.rawFilename = directoryArray.subarray(offset + 46, offset + 46 + fileEntry.filenameLength); | ||
const filenameEncoding = getOptionValue(this, options, "filenameEncoding"); | ||
fileEntry.filenameUTF8 = fileEntry.commentUTF8 = Boolean(fileEntry.bitFlag.languageEncodingFlag); | ||
fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : filenameEncoding); | ||
const languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag); | ||
const filenameOffset = offset + 46; | ||
const extraFieldOffset = filenameOffset + fileEntry.filenameLength; | ||
const commentOffset = extraFieldOffset + fileEntry.extraFieldLength; | ||
Object.assign(fileEntry, { | ||
compressedSize: 0, | ||
uncompressedSize: 0, | ||
commentLength: getUint16(directoryView, offset + 32), | ||
directory: (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK, | ||
offset: getUint32(directoryView, offset + 42) + prependedDataLength, | ||
rawFilename: directoryArray.subarray(filenameOffset, extraFieldOffset), | ||
filenameUTF8: languageEncodingFlag, | ||
commentUTF8: languageEncodingFlag, | ||
rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) | ||
}); | ||
const endOffset = commentOffset + fileEntry.commentLength; | ||
fileEntry.rawComment = directoryArray.subarray(commentOffset, endOffset); | ||
fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : getOptionValue(zipReader, options, "filenameEncoding")); | ||
fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : getOptionValue(zipReader, options, "commentEncoding")); | ||
if (!fileEntry.directory && fileEntry.filename.endsWith(DIRECTORY_SIGNATURE)) { | ||
fileEntry.directory = true; | ||
} | ||
fileEntry.rawExtraField = directoryArray.subarray(offset + 46 + fileEntry.filenameLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength); | ||
fileEntry.rawComment = directoryArray.subarray(offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength, offset + 46 | ||
+ fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength); | ||
const commentEncoding = getOptionValue(this, options, "commentEncoding"); | ||
fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : commentEncoding); | ||
readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); | ||
@@ -180,3 +187,3 @@ const entry = new Entry(fileEntry); | ||
entries.push(entry); | ||
offset += 46 + fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength; | ||
offset = endOffset; | ||
} | ||
@@ -209,21 +216,30 @@ return entries; | ||
constructor(reader, config, options) { | ||
this.reader = reader; | ||
this.config = config; | ||
this.options = options; | ||
Object.assign(this, { | ||
reader, | ||
config, | ||
options | ||
}); | ||
} | ||
async getData(writer, options = {}) { | ||
const reader = this.reader; | ||
const zipEntry = this; | ||
const { | ||
reader, | ||
offset, | ||
extraFieldAES, | ||
compressionMethod, | ||
config, | ||
bitFlag, | ||
signature, | ||
rawLastModDate, | ||
compressedSize, | ||
onprogress | ||
} = zipEntry; | ||
const localDirectory = zipEntry.localDirectory = {}; | ||
if (!reader.initialized) { | ||
await reader.init(); | ||
} | ||
const offset = this.offset; | ||
const dataArray = await reader.readUint8Array(offset, 30); | ||
const dataView = new DataView(dataArray.buffer); | ||
const extraFieldAES = this.extraFieldAES; | ||
const compressionMethod = this.compressionMethod; | ||
const config = this.config; | ||
const bitFlag = this.bitFlag; | ||
const signature = this.signature; | ||
let password = getOptionValue(this, options, "password"); | ||
const dataArray = await readUint8Array(reader, offset, 30); | ||
const dataView = getDataView(dataArray); | ||
let password = getOptionValue(zipEntry, options, "password"); | ||
password = password && password.length && password; | ||
@@ -241,8 +257,8 @@ if (extraFieldAES) { | ||
} | ||
const localDirectory = this.localDirectory = {}; | ||
readCommonHeader(localDirectory, dataView, 4); | ||
localDirectory.rawExtraField = dataArray.subarray(offset + 30 + localDirectory.filenameLength, offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength); | ||
readCommonFooter(this, localDirectory, dataView, 4); | ||
const dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength; | ||
const encrypted = bitFlag.encrypted && localDirectory.bitFlag.encrypted; | ||
const extraFieldOffset = offset + 30 + localDirectory.filenameLength; | ||
const dataOffset = extraFieldOffset + localDirectory.extraFieldLength; | ||
localDirectory.rawExtraField = dataArray.subarray(extraFieldOffset, dataOffset); | ||
readCommonFooter(zipEntry, localDirectory, dataView, 4); | ||
const encrypted = zipEntry.encrypted && localDirectory.encrypted; | ||
const zipCrypto = encrypted && !extraFieldAES; | ||
@@ -261,8 +277,8 @@ if (encrypted) { | ||
encryptionStrength: extraFieldAES && extraFieldAES.strength, | ||
signed: getOptionValue(this, options, "checkSignature"), | ||
passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((this.rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), | ||
signed: getOptionValue(zipEntry, options, "checkSignature"), | ||
passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), | ||
signature, | ||
compressed: compressionMethod != 0, | ||
encrypted, | ||
useWebWorkers: getOptionValue(this, options, "useWebWorkers") | ||
useWebWorkers: getOptionValue(zipEntry, options, "useWebWorkers") | ||
}, config); | ||
@@ -272,3 +288,4 @@ if (!writer.initialized) { | ||
} | ||
await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue(this, options, "signal") }); | ||
const signal = getOptionValue(zipEntry, options, "signal"); | ||
await processData(codec, reader, writer, dataOffset, compressedSize, config, { onprogress, signal }); | ||
return writer.getData(); | ||
@@ -279,15 +296,17 @@ } | ||
function readCommonHeader(directory, dataView, offset) { | ||
directory.version = getUint16(dataView, offset); | ||
const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); | ||
directory.bitFlag = { | ||
encrypted: (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED, | ||
level: (rawBitFlag & BITFLAG_LEVEL) >> 1, | ||
dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, | ||
languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG | ||
}; | ||
directory.encrypted = directory.bitFlag.encrypted; | ||
directory.rawLastModDate = getUint32(dataView, offset + 6); | ||
directory.lastModDate = getDate(directory.rawLastModDate); | ||
directory.filenameLength = getUint16(dataView, offset + 22); | ||
directory.extraFieldLength = getUint16(dataView, offset + 24); | ||
const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; | ||
Object.assign(directory, { | ||
encrypted, | ||
version: getUint16(dataView, offset), | ||
bitFlag: { | ||
level: (rawBitFlag & BITFLAG_LEVEL) >> 1, | ||
dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, | ||
languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG | ||
}, | ||
rawLastModDate: getUint32(dataView, offset + 6), | ||
lastModDate: getDate(directory.rawLastModDate), | ||
filenameLength: getUint16(dataView, offset + 22), | ||
extraFieldLength: getUint16(dataView, offset + 24) | ||
}); | ||
} | ||
@@ -298,3 +317,3 @@ | ||
const extraField = directory.extraField = new Map(); | ||
const rawExtraFieldView = new DataView(new Uint8Array(rawExtraField).buffer); | ||
const rawExtraFieldView = getDataView(new Uint8Array(rawExtraField)); | ||
let offsetExtraField = 0; | ||
@@ -336,5 +355,2 @@ try { | ||
} | ||
if (directory.compressionMethod == COMPRESSION_METHOD_DEFLATE) { | ||
directory.bitFlag.enhancedDeflating = (directory.rawBitFlag & BITFLAG_ENHANCED_DEFLATING) != BITFLAG_ENHANCED_DEFLATING; | ||
} | ||
} | ||
@@ -344,3 +360,3 @@ | ||
directory.zip64 = true; | ||
const extraFieldView = new DataView(extraFieldZip64.data.buffer); | ||
const extraFieldView = getDataView(extraFieldZip64.data); | ||
extraFieldZip64.values = []; | ||
@@ -366,3 +382,3 @@ for (let indexValue = 0; indexValue < Math.floor(extraFieldZip64.data.length / 8); indexValue++) { | ||
function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) { | ||
const extraFieldView = new DataView(extraFieldUnicode.data.buffer); | ||
const extraFieldView = getDataView(extraFieldUnicode.data); | ||
extraFieldUnicode.version = getUint8(extraFieldView, 0); | ||
@@ -372,3 +388,3 @@ extraFieldUnicode.signature = getUint32(extraFieldView, 1); | ||
crc32.append(fileEntry[rawPropertyName]); | ||
const dataViewSignature = new DataView(new Uint8Array(4).buffer); | ||
const dataViewSignature = getDataView(new Uint8Array(4)); | ||
dataViewSignature.setUint32(0, crc32.get(), true); | ||
@@ -385,3 +401,3 @@ extraFieldUnicode[propertyName] = (new TextDecoder()).decode(extraFieldUnicode.data.subarray(5)); | ||
if (extraFieldAES) { | ||
const extraFieldView = new DataView(extraFieldAES.data.buffer); | ||
const extraFieldView = getDataView(extraFieldAES.data); | ||
extraFieldAES.vendorVersion = getUint8(extraFieldView, 0); | ||
@@ -398,12 +414,12 @@ extraFieldAES.vendorId = getUint8(extraFieldView, 2); | ||
async function seekSignature(reader, signature, minimumBytes, maximumLength) { | ||
async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) { | ||
const signatureArray = new Uint8Array(4); | ||
const signatureView = new DataView(signatureArray.buffer); | ||
const signatureView = getDataView(signatureArray); | ||
setUint32(signatureView, 0, signature); | ||
const maximumBytes = minimumBytes + maximumLength; | ||
return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, reader.size)); | ||
return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset)); | ||
async function seek(length) { | ||
const offset = reader.size - length; | ||
const bytes = await reader.readUint8Array(offset, length); | ||
const offset = startOffset - length; | ||
const bytes = await readUint8Array(reader, offset, length); | ||
for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) { | ||
@@ -460,2 +476,10 @@ if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] && | ||
view.setUint32(offset, value, true); | ||
} | ||
function getDataView(array) { | ||
return new DataView(array.buffer); | ||
} | ||
function readUint8Array(reader, offset, size) { | ||
return reader.readUint8Array(offset, size); | ||
} |
@@ -83,11 +83,14 @@ /* | ||
constructor(writer, options = {}) { | ||
this.writer = writer; | ||
this.options = options; | ||
this.config = getConfiguration(); | ||
this.files = new Map(); | ||
this.offset = writer.size; | ||
this.maxOutputSize = 0; | ||
Object.assign(this, { | ||
writer, | ||
options, | ||
config: getConfiguration(), | ||
files: new Map(), | ||
offset: writer.size, | ||
pendingOutputSize: 0 | ||
}); | ||
} | ||
async add(name = "", reader, options = {}) { | ||
const zipWriter = this; | ||
name = name.trim(); | ||
@@ -99,3 +102,3 @@ if (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) { | ||
} | ||
if (this.files.has(name)) { | ||
if (zipWriter.files.has(name)) { | ||
throw new Error(ERR_DUPLICATED_NAME); | ||
@@ -112,3 +115,3 @@ } | ||
} | ||
const version = this.options.version || options.version || 0; | ||
const version = zipWriter.options.version || options.version || 0; | ||
if (version > MAX_16_BITS) { | ||
@@ -121,5 +124,5 @@ throw new Error(ERR_INVALID_VERSION); | ||
} | ||
const password = getOptionValue(this, options, "password"); | ||
const encryptionStrength = getOptionValue(this, options, "encryptionStrength") || 3; | ||
const zipCrypto = getOptionValue(this, options, "zipCrypto"); | ||
const password = getOptionValue(zipWriter, options, "password"); | ||
const encryptionStrength = getOptionValue(zipWriter, options, "encryptionStrength") || 3; | ||
const zipCrypto = getOptionValue(zipWriter, options, "zipCrypto"); | ||
if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) { | ||
@@ -145,5 +148,5 @@ throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); | ||
} | ||
rawExtraField.set(new Uint16Array([type]), offset); | ||
rawExtraField.set(new Uint16Array([data.length]), offset + 2); | ||
rawExtraField.set(data, offset + 4); | ||
arraySet(rawExtraField, new Uint16Array([type]), offset); | ||
arraySet(rawExtraField, new Uint16Array([data.length]), offset + 2); | ||
arraySet(rawExtraField, data, offset + 4); | ||
offset += 4 + data.length; | ||
@@ -153,11 +156,11 @@ }); | ||
const outputSize = reader ? Math.floor(reader.size * 1.05) : 0; | ||
this.maxOutputSize += outputSize; | ||
zipWriter.pendingOutputSize += outputSize; | ||
await Promise.resolve(); | ||
const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + this.maxOutputSize >= MAX_32_BITS; | ||
const level = getOptionValue(this, options, "level"); | ||
const useWebWorkers = getOptionValue(this, options, "useWebWorkers"); | ||
const bufferedWrite = getOptionValue(this, options, "bufferedWrite"); | ||
let keepOrder = getOptionValue(this, options, "keepOrder"); | ||
let dataDescriptor = getOptionValue(this, options, "dataDescriptor"); | ||
const signal = getOptionValue(this, options, "signal"); | ||
const zip64 = options.zip64 || zipWriter.options.zip64 || zipWriter.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || zipWriter.offset + zipWriter.pendingOutputSize >= MAX_32_BITS; | ||
const level = getOptionValue(zipWriter, options, "level"); | ||
const useWebWorkers = getOptionValue(zipWriter, options, "useWebWorkers"); | ||
const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite"); | ||
let keepOrder = getOptionValue(zipWriter, options, "keepOrder"); | ||
let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor"); | ||
const signal = getOptionValue(zipWriter, options, "signal"); | ||
if (dataDescriptor === undefined) { | ||
@@ -169,3 +172,3 @@ dataDescriptor = true; | ||
} | ||
const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { | ||
const fileEntry = await addFile(zipWriter, name, reader, Object.assign({}, options, { | ||
rawFilename, | ||
@@ -187,3 +190,3 @@ rawComment, | ||
})); | ||
this.maxOutputSize -= outputSize; | ||
zipWriter.pendingOutputSize -= outputSize; | ||
Object.assign(fileEntry, { name, comment, extraField }); | ||
@@ -194,7 +197,8 @@ return new Entry(fileEntry); | ||
async close(comment = new Uint8Array(0)) { | ||
const writer = this.writer; | ||
const files = this.files; | ||
const zipWriter = this; | ||
const writer = zipWriter.writer; | ||
const files = zipWriter.files; | ||
let offset = 0; | ||
let directoryDataLength = 0; | ||
let directoryOffset = this.offset; | ||
let directoryOffset = zipWriter.offset; | ||
let filesLength = files.size; | ||
@@ -209,5 +213,5 @@ for (const [, fileEntry] of files) { | ||
} | ||
const zip64 = this.options.zip64 || directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS; | ||
const zip64 = zipWriter.options.zip64 || directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS; | ||
const directoryArray = new Uint8Array(directoryDataLength + (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH)); | ||
const directoryView = new DataView(directoryArray.buffer); | ||
const directoryView = getDataView(directoryArray); | ||
if (comment.length) { | ||
@@ -221,15 +225,23 @@ if (comment.length <= MAX_16_BITS) { | ||
for (const [, fileEntry] of files) { | ||
const rawFilename = fileEntry.rawFilename; | ||
const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64; | ||
const rawExtraFieldAES = fileEntry.rawExtraFieldAES; | ||
const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length; | ||
const { | ||
rawFilename, | ||
rawExtraFieldZip64, | ||
rawExtraFieldAES, | ||
rawExtraField, | ||
rawComment, | ||
version, | ||
headerArray, | ||
directory, | ||
zip64 | ||
} = fileEntry; | ||
const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + rawExtraField.length; | ||
setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); | ||
setUint16(directoryView, offset + 4, fileEntry.version); | ||
directoryArray.set(fileEntry.headerArray, offset + 6); | ||
setUint16(directoryView, offset + 4, version); | ||
arraySet(directoryArray, headerArray, offset + 6); | ||
setUint16(directoryView, offset + 30, extraFieldLength); | ||
setUint16(directoryView, offset + 32, fileEntry.rawComment.length); | ||
if (fileEntry.directory) { | ||
setUint16(directoryView, offset + 32, rawComment.length); | ||
if (directory) { | ||
setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); | ||
} | ||
if (fileEntry.zip64) { | ||
if (zip64) { | ||
setUint32(directoryView, offset + 42, MAX_32_BITS); | ||
@@ -239,8 +251,8 @@ } else { | ||
} | ||
directoryArray.set(rawFilename, offset + 46); | ||
directoryArray.set(rawExtraFieldZip64, offset + 46 + rawFilename.length); | ||
directoryArray.set(rawExtraFieldAES, offset + 46 + rawFilename.length + rawExtraFieldZip64.length); | ||
directoryArray.set(fileEntry.rawExtraField, 46 + rawFilename.length + rawExtraFieldZip64.length + rawExtraFieldAES.length); | ||
directoryArray.set(fileEntry.rawComment, offset + 46 + rawFilename.length + extraFieldLength); | ||
offset += 46 + rawFilename.length + extraFieldLength + fileEntry.rawComment.length; | ||
arraySet(directoryArray, rawFilename, offset + 46); | ||
arraySet(directoryArray, rawExtraFieldZip64, offset + 46 + rawFilename.length); | ||
arraySet(directoryArray, rawExtraFieldAES, offset + 46 + rawFilename.length + rawExtraFieldZip64.length); | ||
arraySet(directoryArray, rawExtraField, 46 + rawFilename.length + rawExtraFieldZip64.length + rawExtraFieldAES.length); | ||
arraySet(directoryArray, rawComment, offset + 46 + rawFilename.length + extraFieldLength); | ||
offset += 46 + rawFilename.length + extraFieldLength + rawComment.length; | ||
} | ||
@@ -295,5 +307,5 @@ if (zip64) { | ||
let resolveLockWrite; | ||
let lockPreviousFile; | ||
let resolveLockPreviousFile; | ||
try { | ||
let lockPreviousFile; | ||
let fileWriter; | ||
@@ -308,3 +320,3 @@ let fileEntry; | ||
fileWriter = new BlobWriter(); | ||
await fileWriter.init(); | ||
fileWriter.init(); | ||
} else { | ||
@@ -349,3 +361,3 @@ zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve); | ||
if (fileEntry.zip64) { | ||
const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); | ||
const rawExtraFieldZip64View = getDataView(fileEntry.rawExtraFieldZip64); | ||
setBigUint64(rawExtraFieldZip64View, 20, BigInt(fileEntry.offset)); | ||
@@ -366,17 +378,27 @@ } | ||
async function createFileEntry(reader, writer, config, options) { | ||
const rawFilename = options.rawFilename; | ||
const lastModDate = options.lastModDate; | ||
const password = options.password; | ||
const { | ||
rawFilename, | ||
lastModDate, | ||
password, | ||
level, | ||
zip64, | ||
zipCrypto, | ||
dataDescriptor, | ||
directory, | ||
version, | ||
rawComment, | ||
rawExtraField, | ||
useWebWorkers, | ||
onprogress, | ||
signal, | ||
encryptionStrength | ||
} = options; | ||
const encrypted = Boolean(password && password.length); | ||
const level = options.level; | ||
const compressed = level !== 0 && !options.directory; | ||
const zip64 = options.zip64; | ||
const compressed = level !== 0 && !directory; | ||
let rawExtraFieldAES; | ||
let encryptionStrength; | ||
if (encrypted && !options.zipCrypto) { | ||
if (encrypted && !zipCrypto) { | ||
rawExtraFieldAES = new Uint8Array(EXTRAFIELD_DATA_AES.length + 2); | ||
const extraFieldAESView = new DataView(rawExtraFieldAES.buffer); | ||
const extraFieldAESView = getDataView(rawExtraFieldAES); | ||
setUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES); | ||
rawExtraFieldAES.set(EXTRAFIELD_DATA_AES, 2); | ||
encryptionStrength = options.encryptionStrength; | ||
arraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2); | ||
setUint8(extraFieldAESView, 8, encryptionStrength); | ||
@@ -387,15 +409,15 @@ } else { | ||
const fileEntry = { | ||
version: options.version || VERSION_DEFLATE, | ||
version: version || VERSION_DEFLATE, | ||
zip64, | ||
directory: Boolean(options.directory), | ||
directory: Boolean(directory), | ||
filenameUTF8: true, | ||
rawFilename, | ||
commentUTF8: true, | ||
rawComment: options.rawComment, | ||
rawComment, | ||
rawExtraFieldZip64: zip64 ? new Uint8Array(EXTRAFIELD_LENGTH_ZIP64 + 4) : new Uint8Array(0), | ||
rawExtraFieldAES: rawExtraFieldAES, | ||
rawExtraField: options.rawExtraField | ||
rawExtraFieldAES, | ||
rawExtraField | ||
}; | ||
let bitFlag = BITFLAG_LANG_ENCODING_FLAG; | ||
if (options.dataDescriptor) { | ||
if (dataDescriptor) { | ||
bitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR; | ||
@@ -412,3 +434,3 @@ } | ||
bitFlag = bitFlag | BITFLAG_ENCRYPTED; | ||
if (!options.zipCrypto) { | ||
if (!zipCrypto) { | ||
fileEntry.version = fileEntry.version > VERSION_AES ? fileEntry.version : VERSION_AES; | ||
@@ -422,3 +444,3 @@ compressionMethod = COMPRESSION_METHOD_AES; | ||
const headerArray = fileEntry.headerArray = new Uint8Array(26); | ||
const headerView = new DataView(headerArray.buffer); | ||
const headerView = getDataView(headerArray); | ||
setUint16(headerView, 0, fileEntry.version); | ||
@@ -428,3 +450,3 @@ setUint16(headerView, 2, bitFlag); | ||
const dateArray = new Uint32Array(1); | ||
const dateView = new DataView(dateArray.buffer); | ||
const dateView = getDataView(dateArray); | ||
setUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2); | ||
@@ -437,9 +459,9 @@ setUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate()); | ||
setUint16(headerView, 24, rawExtraFieldAES.length + fileEntry.rawExtraField.length); | ||
const footerArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); | ||
const footerView = new DataView(footerArray.buffer); | ||
setUint32(footerView, 0, LOCAL_FILE_HEADER_SIGNATURE); | ||
footerArray.set(headerArray, 4); | ||
footerArray.set(rawFilename, 30); | ||
footerArray.set(rawExtraFieldAES, 30 + rawFilename.length); | ||
footerArray.set(fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); | ||
const localHeaderArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); | ||
const localHeaderView = getDataView(localHeaderArray); | ||
setUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE); | ||
arraySet(localHeaderArray, headerArray, 4); | ||
arraySet(localHeaderArray, rawFilename, 30); | ||
arraySet(localHeaderArray, rawExtraFieldAES, 30 + rawFilename.length); | ||
arraySet(localHeaderArray, fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); | ||
let result; | ||
@@ -455,32 +477,33 @@ let uncompressedSize = 0; | ||
encryptionStrength, | ||
zipCrypto: encrypted && options.zipCrypto, | ||
passwordVerification: encrypted && options.zipCrypto && (rawLastModDate >> 8) & 0xFF, | ||
zipCrypto: encrypted && zipCrypto, | ||
passwordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF, | ||
signed: true, | ||
compressed, | ||
encrypted, | ||
useWebWorkers: options.useWebWorkers | ||
useWebWorkers | ||
}, config); | ||
await writer.writeUint8Array(footerArray); | ||
result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress: options.onprogress, signal: options.signal }); | ||
await writer.writeUint8Array(localHeaderArray); | ||
result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress, signal }); | ||
compressedSize = result.length; | ||
} else { | ||
await writer.writeUint8Array(footerArray); | ||
await writer.writeUint8Array(localHeaderArray); | ||
} | ||
let dataDescriptorArray = new Uint8Array(0); | ||
let dataDescriptorView; | ||
if (options.dataDescriptor) { | ||
if (dataDescriptor) { | ||
dataDescriptorArray = new Uint8Array(zip64 ? 24 : 16); | ||
dataDescriptorView = new DataView(dataDescriptorArray.buffer); | ||
dataDescriptorView = getDataView(dataDescriptorArray); | ||
setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); | ||
} | ||
if (reader) { | ||
if ((!encrypted || options.zipCrypto) && result.signature !== undefined) { | ||
setUint32(headerView, 10, result.signature); | ||
fileEntry.signature = result.signature; | ||
if (options.dataDescriptor) { | ||
setUint32(dataDescriptorView, 4, result.signature); | ||
const signature = result.signature; | ||
if ((!encrypted || zipCrypto) && signature !== undefined) { | ||
setUint32(headerView, 10, signature); | ||
fileEntry.signature = signature; | ||
if (dataDescriptor) { | ||
setUint32(dataDescriptorView, 4, signature); | ||
} | ||
} | ||
if (zip64) { | ||
const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); | ||
const rawExtraFieldZip64View = getDataView(fileEntry.rawExtraFieldZip64); | ||
setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); | ||
@@ -492,3 +515,3 @@ setUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64); | ||
setBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize)); | ||
if (options.dataDescriptor) { | ||
if (dataDescriptor) { | ||
setBigUint64(dataDescriptorView, 8, BigInt(compressedSize)); | ||
@@ -500,3 +523,3 @@ setBigUint64(dataDescriptorView, 16, BigInt(uncompressedSize)); | ||
setUint32(headerView, 18, uncompressedSize); | ||
if (options.dataDescriptor) { | ||
if (dataDescriptor) { | ||
setUint32(dataDescriptorView, 8, compressedSize); | ||
@@ -507,6 +530,6 @@ setUint32(dataDescriptorView, 12, uncompressedSize); | ||
} | ||
if (options.dataDescriptor) { | ||
if (dataDescriptor) { | ||
await writer.writeUint8Array(dataDescriptorArray); | ||
} | ||
const length = footerArray.length + (result ? result.length : 0) + dataDescriptorArray.length; | ||
const length = localHeaderArray.length + compressedSize + dataDescriptorArray.length; | ||
Object.assign(fileEntry, { compressedSize, uncompressedSize, lastModDate, rawLastModDate, encrypted, length }); | ||
@@ -534,2 +557,10 @@ return fileEntry; | ||
view.setBigUint64(offset, value, true); | ||
} | ||
function arraySet(array, typedArray, offset) { | ||
array.set(typedArray, offset); | ||
} | ||
function getDataView(array) { | ||
return new DataView(array.buffer); | ||
} |
@@ -1,2 +0,1 @@ | ||
/* | ||
@@ -30,11 +29,10 @@ Copyright (c) 2021 Gildas Lormeau. All rights reserved. | ||
/* global self, fflate */ | ||
/* global self */ | ||
import "./core/z-worker-core.js"; | ||
import initShimAsyncCodec from "./core/util/stream-codec-shim.js"; | ||
import { Deflate, Inflate } from "fflate"; | ||
self.initCodec = () => { | ||
const { Deflate, Inflate } = initShimAsyncCodec(fflate, undefined, (codec, onData) => codec.ondata = onData); | ||
self.Deflate = Deflate; | ||
self.Inflate = Inflate; | ||
}; |
@@ -1,1 +0,1 @@ | ||
import{configure as t}from"./core/configuration.js";export default()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i<a;i++)n=n>>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length<e)return t;const i=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,i>0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n<t.length;n++)a.push(i|t[n]>>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n<e;n++)0==(3&n)&&(a=t[n/4]),i[n]=a>>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i<t.length;i++)a=a<<8|t[i],3==(3&i)&&(e.push(a),a=0);return 3&i&&e.push(n.partial(8*(3&i),a)),e}}},a=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],a=t.length;let r,s,l,o=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),l=[]],r=a;r<4*a+28;r++){let t=s[r-1];(r%a==0||8===a&&r%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t<i;t++)u=s[h>>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let a;if(!(a=e.length))return[];const r=n.bitLength(e);for(let n=0;n<a;n+=4){this.incCounter(i);const a=t.encrypt(i);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return n.clamp(e,r)}},s={name:"PBKDF2"},l={name:"HMAC"},o=Object.assign({hash:l},s),d=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},s),_=Object.assign({hash:"SHA-1"},l),u=["deriveBits"],f=["sign"],c=[8,12,16],h=[16,24,32],b=[0,0,0,0],p=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){if(this.password){const e=t.subarray(0,c[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,c[t.strength]));const i=e.subarray(c[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,this.aesCtrGladman=new r(new a(this.keys.key),Array.from(b)),t=t.subarray(c[this.strength]+2)}let e,n=new Uint8Array(t.length-10-(t.length-10)%16),s=t;for(this.pendingInput.length&&(s=g(this.pendingInput,t),n=m(n,s.length-10-(s.length-10)%16)),e=0;e<=s.length-10-16;e+=16){const t=s.subarray(e,e+16),a=i.bytes.toBits(t),r=this.aesCtrGladman.update(a);n.set(i.bytes.fromBits(r),e)}return this.pendingInput=s.subarray(e),this.signed&&(this.input=g(this.input,t)),n}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=this.aesCtrGladman.update(i.bytes.toBits(n));r=i.bytes.fromBits(t)}let s=!0;if(this.signed){const t=await p.sign(l,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t).subarray(0,10);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class x{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){let e=new Uint8Array(0);this.password&&(e=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(c[t.strength]));return await y(t,e,n),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null,this.aesCtrGladman=new r(new a(this.keys.key),Array.from(b)));let n,s=new Uint8Array(e.length+t.length-t.length%16);for(s.set(e,0),this.pendingInput.length&&(s=m(s,(t=g(this.pendingInput,t)).length-t.length%16)),n=0;n<=t.length-16;n+=16){const a=i.bytes.toBits(t.subarray(n,n+16)),r=this.aesCtrGladman.update(a);s.set(i.bytes.fromBits(r),n+e.length)}return this.pendingInput=t.subarray(n),this.output=g(this.output,s),s}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=this.aesCtrGladman.update(i.bytes.toBits(this.pendingInput));t=i.bytes.fromBits(e),this.output=g(this.output,t)}const e=await p.sign(l,this.keys.authentication,this.output.subarray(c[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function y(t,e,n){const a=(new TextEncoder).encode(e),r=await p.importKey("raw",a,o,!1,u),s=await p.deriveBits(Object.assign({salt:n},d),r,8*(2*h[t.strength]+2)),l=new Uint8Array(s);t.keys={key:i.bytes.toBits(l.subarray(0,h[t.strength])),authentication:await p.importKey("raw",l.subarray(h[t.strength],2*h[t.strength]),_,!1,f),passwordVerification:l.subarray(2*h[t.strength])}}function g(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function m(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=C(t)^e[i],E(t,n[i]);return n}function U(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=C(t)^e[i],E(t,e[i]);return n}function I(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)E(t,n.charCodeAt(e))}function E(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=z(t.keys[1]+S(t.keys[0])),t.keys[1]=z(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e)},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=d=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)o=n.heap[++n.heap_len]=d<2?++d:0,i[2*o]=1,n.depth[o]=0,n.opt_len--,a&&(n.static_len-=a[2*o+1]);for(t.max_code=d,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--)}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l))}(i,t.max_code,n.bl_count)}}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[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],j.extra_dbits=[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],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function T(){const t=this;let e,n,i,a,r,s,l,o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k,A,U,I,E,C,S,z,B,M,V;const D=new j,K=new j,P=new j;let R,T,q,H,F,J,N,Q;function X(){let e;for(e=0;e<286;e++)B[2*e]=0;for(e=0;e<30;e++)M[2*e]=0;for(e=0;e<19;e++)V[2*e]=0;B[512]=1,t.opt_len=t.static_len=0,q=F=0}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,l=4;0===a&&(s=138,l=3),t[2*(e+1)+1]=65535;for(let o=0;o<=e;o++)n=a,a=t[2*(o+1)+1],++r<s&&n==a||(r<l?V[2*n]+=r:0!==n?(n!=i&&V[2*n]++,V[32]++):r<=10?V[34]++:V[36]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function Z(e){t.pending_buf[t.pending++]=e}function $(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i)}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1])}function nt(t,e){let n,i,a=-1,r=t[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<l&&i==r)){if(s<o)do{et(i,V)}while(0!=--s);else 0!==i?(i!=a&&(et(i,V),s--),et(16,V),tt(s-3,2)):s<=10?(et(17,V),tt(s-3,3)):(et(18,V),tt(s-11,7));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F<Math.floor(q/2)&&i<Math.floor(a/2))return!0}return q==T-1}function rt(e,n){let i,a,r,s,l=0;if(0!==q)do{i=t.pending_buf[H+2*l]<<8&65280|255&t.pending_buf[H+2*l+1],a=255&t.pending_buf[R+l],l++,0===i?et(a,e):(r=j._length_code[a],et(r+256+1,e),s=j.extra_lbits[r],0!==s&&(a-=j.base_length[r],tt(a,s)),i--,r=j.d_code(i),et(r,n),s=j.extra_dbits[r],0!==s&&(i-=j.base_dist[r],tt(i,s)))}while(l<q);et(256,e),J=e[513]}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(V[2*j.bl_order[i]+1],3);nt(B,t-1),nt(M,e-1)}(D.max_code+1,K.max_code+1,s+1),rt(B,M)),X(),i&&st()}function dt(t){ot(w>=0?w:-1,m-w,t),w=m,e.flush_pending()}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<<p^255&o[m+1])&b)}while(k<262&&0!==e.avail_in)}function ut(t){let e,n,i=U,a=m,s=A;const d=m>r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&a<c);if(n=258-(c-a),a=c-258,n>s){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s]}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t<c-1;t++)u[t]=0;I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain,m=0,w=0,k=0,x=A=2,g=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],B=[],M=[],V=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&O(e,i[r+1],i[r],t.depth)&&r++,!O(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,d,f,w){return d||(d=8),f||(f=8),w||(w=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<<s,l=r-1,h=f+7,c=1<<h,b=c-1,p=Math.floor((h+3-1)/3),o=new Uint8Array(2*r),_=[],u=[],T=1<<f+6,t.pending_buf=new Uint8Array(4*T),i=4*T,H=Math.floor(T/2),R=3*T,E=n,C=w,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,u=null,_=null,o=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<<p^255&o[1])&b,a=0;a<=s-3;a++)f=(f<<p^255&o[a+2])&b,_[a&l]=u[f],u[f]=a;return 0},t.deflate=function(d,h){let U,S,z,B,M;if(h>4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<p^255&o[m+2])&b,i=65535&u[f],_[m&l]=u[f],u[f]=m),0!==i&&(m-i&65535)<=r-262&&2!=C&&(x=ut(i)),x>=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<<p^255&o[m+2])&b,i=65535&u[f],_[m&l]=u[f],u[f]=m}while(0!=--x);m++}else m+=x,x=0,f=255&o[m],f=(f<<p^255&o[m+1])&b;else n=at(0,255&o[m]),k--,m++;if(n&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:M=function(t){let n,i,a=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<p^255&o[m+2])&b,a=65535&u[f],_[m&l]=u[f],u[f]=m),A=x,y=v,x=2,0!==a&&A<I&&(m-a&65535)<=r-262&&(2!=C&&(x=ut(a)),x<=5&&(1==C||3==x&&m-v>4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<<p^255&o[m+2])&b,a=65535&u[f],_[m&l]=u[f],u[f]=m)}while(0!=--A);if(g=0,x=2,m++,n&&(dt(!1),0===e.avail_out))return 0}else if(0!==g){if(n=at(0,255&o[m-1]),n&&dt(!1),m++,k--,0===e.avail_out)return 0}else g=1,m++,k--}return 0!==g&&(n=at(0,255&o[m-1]),g=0),dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=M&&3!=M||(n=666),0==M||2==M)return 0===e.avail_out&&(a=-1),0;if(1==M){if(1==h)tt(2,3),et(256,L.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,L.static_ltree),it()),J=7;else if(lt(0,0,!1),3==h)for(U=0;U<c;U++)u[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function q(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function H(t){const e=new q,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,l=0,o=0,d=0;const _=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?_.push(new Uint8Array(i)):_.push(new Uint8Array(i.subarray(0,e.next_out_index)))),d+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length})),a}}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[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,112,112],Y=[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],Z=[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];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,v<g&&(v=g),y=15;0!==y&&0===n[y];y--);for(w=y,v>y&&(v=y),u[0]=v,C=1<<g;g<y;g++,C<<=1)if((C-=n[g])<0)return-3;if((C-=n[y])<0)return-3;for(n[y]+=C,r[1]=g=0,A=1,E=2;0!=--y;)r[E]=g+=n[A],E++,A++;y=0,A=0;do{0!==(g=t[e+A])&&(h[r[g]++]=y),A++}while(++y<s);for(s=r[w],r[0]=y=0,A=0,x=-1,I=-v,a[0]=0,U=0,S=0;m<=w;m++)for(b=n[m];0!=b--;){for(;m>I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g<S))for(;++g<S&&!((p<<=1)<=n[++E]);)p-=n[E];if(S=1<<g,c[0]+S>1440)return-3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]<l?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=d[h[A]-l]+16+64,i[2]=o[h[A++]-l]),p=1<<m-I,g=y>>>I;g<S;g+=p)f.set(i,3*(U+g));for(g=1<<m-1;0!=(y&g);g>>>=1)y^=g;for(y^=g,k=(1<<I)-1;(y&k)!=r[x];)x--,I-=v,k=(1<<I)-1}return 0!==C&&1!=w?-5:0}function l(s){let l;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),l=0;l<s;l++)e[l]=0;for(l=0;l<16;l++)n[l]=0;for(l=0;l<3;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,o){let d;return l(19),t[0]=0,d=s(n,0,19,19,null,null,a,i,r,t,e),-3==d?o.msg="oversubscribed dynamic bit lengths tree":-5!=d&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",d=-3),d},this.inflate_trees_dynamic=function(n,i,a,r,o,d,_,u,f){let c;return l(288),t[0]=0,c=s(a,0,n,257,Q,X,d,r,u,t,e),0!=c||0===r[0]?(-3==c?f.msg="oversubscribed literal/length tree":-4!=c&&(f.msg="incomplete literal/length tree",c=-3),c):(l(288),c=s(a,n,i,0,Y,Z,_,o,u,t,e),0!=c||0===o[0]&&n>257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p<s.read?s.read-p-1:s.end-p,x=F[t],y=F[e];do{for(;c<20;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(o=f&x,d=n,_=i,k=3*(_+o),0!==(u=d[k]))for(;;){if(f>>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;for(o=f&y,d=a,_=r,k=3*(_+o),u=d[k];;){if(f>>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c<u;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(m=d[k+2]+(f&F[u]),f>>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++]}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v;;)switch(e){case 0:if(k>=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v,0!=w)){e=1==w?7:9;break}l=u,n=i,s=c,e=1;case 1:for(x=l;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}if(y=3*(s+(U&F[x])),U>>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}r+=U&F[x],U>>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}if(y=3*(s+(U&F[x])),U>>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I<x;){if(0===m)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,m--,U|=(255&p.read_byte(E++))<<I,I+=8}_+=U&F[x],U>>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);t.window[v++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);w=0,t.window[v++]=o,k--,e=0;break;case 7:if(I>7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=v<t.read?t.read-v-1:t.end-v,t.read!=t.write)return t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);e=8;case 8:return w=1,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 9:return w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);default:return w=-2,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w)}},t.free=function(){}}$.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=J,i[0]=N,0};const et=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function nt(t,e){const n=this;let i,a=0,r=0,s=0,l=0;const o=[0],d=[0],_=new tt;let u=0,f=new Int32Array(4320);const c=new $;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&_.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y;;){let v,k,A,U,I,E,C,S;switch(a){case 0:for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g&&(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g)))return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(e=0,h=r,h>x&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(m=0;m<h;m++)i[m]=0;b>>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}i[et[l++]]=7&b,b>>>=3,p-=3}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p<h;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(h=f[3*(d[0]+(b&F[h]))+1],_=f[3*(d[0]+(b&F[h]))+2],_<16)b>>>=h,p-=h,i[l++]=_;else{for(m=18==_?7:_-14,r=18==_?11:3;p<h+m;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<<p,p+=8}if(b>>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_}while(0!=--r);l=m}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y,0===u){a=0;break}a=7;case 7:if(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const it=[0,0,255,255];function at(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return-2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return-2;const l=t.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(n=t.avail_in))return-5;for(i=t.next_in_index,a=l.marker;0!==n&&a<4;)t.read_byte(i)==it[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,l.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,l.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2}}function rt(){}function st(){const t=new rt,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,l,o=0,d=0,_=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),_+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length})),l}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st}}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));t({workerScripts:{inflate:[n],deflate:[n]}})}}; | ||
import{configure as t}from"./core/configuration.js";export default()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i<a;i++)n=n>>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length<e)return t;const i=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,i>0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n<t.length;n++)a.push(i|t[n]>>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n<e;n++)0==(3&n)&&(a=t[n/4]),i[n]=a>>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i<t.length;i++)a=a<<8|t[i],3==(3&i)&&(e.push(a),a=0);return 3&i&&e.push(n.partial(8*(3&i),a)),e}}},a={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};a.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=i.utf8String.toBits(t));const a=e._buffer=n.concat(e._buffer,t),r=e._length,s=e._length=r+n.bitLength(t);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(a);let l=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);t<=s;t+=e.blockSize)e._block(o.subarray(16*l,16*(l+1))),l+=1;return a.splice(0,16*l),e},finalize:function(){const t=this;let e=t._buffer;const i=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,i){return t<=19?e&n|~e&i:t<=39?e^n^i:t<=59?e&n|e&i|n&i:t<=79?e^n^i:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){const e=this,n=e._h,i=Array(80);for(let e=0;e<16;e++)i[e]=t[e];let a=n[0],r=n[1],s=n[2],o=n[3],l=n[4];for(let t=0;t<=79;t++){t>=16&&(i[t]=e._S(1,i[t-3]^i[t-8]^i[t-14]^i[t-16]));const n=e._S(5,a)+e._f(t,r,s,o)+l+i[t]+e._key[Math.floor(t/20)]|0;l=o,o=s,s=e._S(30,r),r=a,a=n}n[0]=n[0]+a|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const r=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],a=t.length;let r,s,o,l=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),o=[]],r=a;r<4*a+28;r++){let t=s[r-1];(r%a==0||8===a&&r%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-a]^t}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];o[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,o,l,_;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[l=a[o=a[d]]];let c=16843009*_^65537*l^257*o^16843008*d,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][d]=f=f<<24^f>>>8,e[n][r]=c=c<<24^c>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],o=r[1],l=r[2],_=r[3],d=r[4];let c,f,u,h=t[0]^n[0],b=t[e?3:1]^n[1],w=t[2]^n[2],p=t[e?1:3]^n[3],x=4;for(let t=0;t<i;t++)c=s[h>>>24]^o[b>>16&255]^l[w>>8&255]^_[255&p]^n[x],f=s[b>>>24]^o[w>>16&255]^l[p>>8&255]^_[255&h]^n[x+1],u=s[w>>>24]^o[p>>16&255]^l[h>>8&255]^_[255&b]^n[x+2],p=s[p>>>24]^o[h>>16&255]^l[b>>8&255]^_[255&w]^n[x+3],x+=4,h=c,b=f,w=u;for(let t=0;t<4;t++)a[e?3&-t:t]=d[h>>>24]<<24^d[b>>16&255]<<16^d[w>>8&255]<<8^d[255&p]^n[x++],c=h,h=b,b=w,w=p,p=c;return a}},s=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let a;if(!(a=e.length))return[];const r=n.bitLength(e);for(let n=0;n<a;n+=4){this.incCounter(i);const a=t.encrypt(i);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return n.clamp(e,r)}},o=class{constructor(t){const e=this,n=e._hash=a.sha1,i=[[],[]],r=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>r&&(t=n.hash(t));for(let e=0;e<r;e++)i[0][e]=909522486^t[e],i[1][e]=1549556828^t[e];e._baseHash[0].update(i[0]),e._baseHash[1].update(i[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}},l={name:"PBKDF2"},_=Object.assign({hash:{name:"HMAC"}},l),d=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},l),c=["deriveBits"],f=[8,12,16],u=[16,24,32],h=[0,0,0,0],b=crypto.subtle,w=i.bytes,p=r,x=s,g=o;class y{constructor(t,e,n){Object.assign(this,{password:t,signed:e,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const n=U(t,0,f[e.strength]+2);await async function(t,e,n){await k(t,n,U(e,0,f[t.strength]));const i=U(e,f[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(e,n,e.password),e.password=null,e.aesCtrGladman=new x(new p(e.keys.key),Array.from(h)),e.hmac=new g(e.keys.authentication),t=U(t,f[e.strength]+2)}return v(e,t,new Uint8Array(t.length-10-(t.length-10)%16),0,10,!0)}async flush(){const t=this,e=t.pendingInput,n=U(e,0,e.length-10),i=U(e,e.length-10);let a=new Uint8Array(0);if(n.length){const e=w.toBits(n);t.hmac.update(e);const i=t.aesCtrGladman.update(e);a=w.fromBits(i)}let r=!0;if(t.signed){const e=U(w.fromBits(t.hmac.digest()),0,10);for(let t=0;t<10;t++)e[t]!=i[t]&&(r=!1)}return{valid:r,data:a}}}class m{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let n=new Uint8Array(0);e.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await k(t,e,n),A(n,t.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new x(new p(e.keys.key),Array.from(h)),e.hmac=new g(e.keys.authentication));const i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),v(e,t,i,n.length,0)}async flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(w.toBits(t.pendingInput));t.hmac.update(n),e=w.fromBits(n)}const n=U(w.fromBits(t.hmac.digest()),0,10);return{data:A(e,n),signature:n}}}function v(t,e,n,i,a,r){const s=e.length-a;let o;for(t.pendingInput.length&&(e=A(t.pendingInput,e),n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,s-s%16)),o=0;o<=s-16;o+=16){const a=w.toBits(U(e,o,o+16));r&&t.hmac.update(a);const s=t.aesCtrGladman.update(a);r||t.hmac.update(s),n.set(w.fromBits(s),o+i)}return t.pendingInput=U(e,o),n}async function k(t,e,n){const i=(new TextEncoder).encode(e),a=await b.importKey("raw",i,_,!1,c),r=await b.deriveBits(Object.assign({salt:n},d),a,8*(2*u[t.strength]+2)),s=new Uint8Array(r);t.keys={key:w.toBits(U(s,0,u[t.strength])),authentication:w.toBits(U(s,u[t.strength],2*u[t.strength])),passwordVerification:U(s,2*u[t.strength])}}function A(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function U(t,e,n){return t.subarray(e,n)}class I{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),C(this,t)}async append(t){const e=this;if(e.password){const n=E(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return E(e,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class S{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),C(this,t)}async append(t){const e=this;let n,i;if(e.password){e.password=null;const a=crypto.getRandomValues(new Uint8Array(12));a[11]=e.passwordVerification,n=new Uint8Array(t.length+a.length),n.set(z(e,a),0),i=12}else n=new Uint8Array(t.length),i=0;return n.set(z(e,t),i),n}async flush(){return{data:new Uint8Array(0)}}}function E(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=M(t)^e[i],B(t,n[i]);return n}function z(t,e){const n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=M(t)^e[i],B(t,e[i]);return n}function C(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)B(t,n.charCodeAt(e))}function B(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=H(t.keys[1]+j(t.keys[0])),t.keys[1]=H(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function M(t){const e=2|t.keys[2];return j(Math.imul(e,1^e)>>>8)}function j(t){return 255&t}function H(t){return 4294967295&t}class V{constructor(t,{signature:n,password:i,signed:a,compressed:r,zipCrypto:s,passwordVerification:o,encryptionStrength:l}){const _=Boolean(i);Object.assign(this,{signature:n,encrypted:_,signed:a,compressed:r,inflate:r&&new t,crc32:a&&new e,zipCrypto:s,decrypt:_&&s?new I(i,o):new y(i,a,l)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=await t.decrypt.flush();if(!e.valid)throw new Error("Invalid signature");n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.cipher!=n.getUint32(0,!1))throw new Error("Invalid signature")}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class O{constructor(t,{encrypted:n,signed:i,compressed:a,level:r,zipCrypto:s,password:o,passwordVerification:l,encryptionStrength:_}){Object.assign(this,{encrypted:n,signed:i,compressed:a,deflate:a&&new t({level:r||5}),crc32:i&&new e,zipCrypto:s,encrypt:n&&s?new S(o,l):new m(o,_)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const i=await t.encrypt.flush();e=i.signature;const a=new Uint8Array(n.length+i.data.length);a.set(n,0),a.set(i.data,n.length),n=a}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const D={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),L=function(t,e){return e.codecType.startsWith("deflate")?new O(t,e):e.codecType.startsWith("inflate")?new V(t,e):void 0}(n,e)},append:async t=>({data:await L.append(t.data)}),flush:()=>L.flush()};let L;function P(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=D[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const K=[0,1,2,3].concat(...P([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function R(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=_<2?++_:0,i[2*l]=1,n.depth[l]=0,n.opt_len--,a&&(n.static_len-=a[2*l+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,_,d,c,f,u=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,u++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,c=0,l>=r&&(c=a[l-r]),f=n[2*l],e.opt_len+=f*(d+c),i&&(e.static_len+=f*(i[2*l+1]+c)));if(0!==u){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,u-=2}while(u>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)_=e.heap[--o],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),l--)}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o))}(i,t.max_code,n.bl_count)}}function W(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function G(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}R._length_code=[0,1,2,3,4,5,6,7].concat(...P([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),R.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],R.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],R.d_code=function(t){return t<256?K[t]:K[256+(t>>>7)]},R.extra_lbits=[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],R.extra_dbits=[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],R.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],W.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],W.static_l_desc=new W(W.static_ltree,R.extra_lbits,257,286,15),W.static_d_desc=new W(W.static_dtree,R.extra_dbits,0,30,15),W.static_bl_desc=new W(null,R.extra_blbits,0,19,7);const T=[new G(0,0,0,0,0),new G(4,4,8,4,1),new G(4,5,16,8,1),new G(4,6,32,32,1),new G(4,4,16,16,2),new G(8,16,32,32,2),new G(8,16,128,128,2),new G(8,32,128,256,2),new G(32,128,258,1024,2),new G(32,258,258,4096,2)],q=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function F(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function J(){const t=this;let e,n,i,a,r,s,o,l,_,d,c,f,u,h,b,w,p,x,g,y,m,v,k,A,U,I,S,E,z,C,B,M,j;const H=new R,V=new R,O=new R;let D,L,P,K,G,J,N,Q;function X(){let e;for(e=0;e<286;e++)B[2*e]=0;for(e=0;e<30;e++)M[2*e]=0;for(e=0;e<19;e++)j[2*e]=0;B[512]=1,t.opt_len=t.static_len=0,P=G=0}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,o=4;0===a&&(s=138,o=3),t[2*(e+1)+1]=65535;for(let l=0;l<=e;l++)n=a,a=t[2*(l+1)+1],++r<s&&n==a||(r<o?j[2*n]+=r:0!==n?(n!=i&&j[2*n]++,j[32]++):r<=10?j[34]++:j[36]++,r=0,i=n,0===a?(s=138,o=3):n==a?(s=6,o=3):(s=7,o=4))}function Z(e){t.pending_buf[t.pending++]=e}function $(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i)}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1])}function nt(t,e){let n,i,a=-1,r=t[1],s=0,o=7,l=4;for(0===r&&(o=138,l=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<o&&i==r)){if(s<l)do{et(i,j)}while(0!=--s);else 0!==i?(i!=a&&(et(i,j),s--),et(16,j),tt(s-3,2)):s<=10?(et(17,j),tt(s-3,3)):(et(18,j),tt(s-11,7));s=0,a=i,0===r?(o=138,l=3):i==r?(o=6,l=3):(o=7,l=4)}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[K+2*P]=e>>>8&255,t.pending_buf[K+2*P+1]=255&e,t.pending_buf[D+P]=255&n,P++,0===e?B[2*n]++:(G++,e--,B[2*(R._length_code[n]+256+1)]++,M[2*R.d_code(e)]++),0==(8191&P)&&S>2){for(i=8*P,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+R.extra_dbits[r]);if(i>>>=3,G<Math.floor(P/2)&&i<Math.floor(a/2))return!0}return P==L-1}function rt(e,n){let i,a,r,s,o=0;if(0!==P)do{i=t.pending_buf[K+2*o]<<8&65280|255&t.pending_buf[K+2*o+1],a=255&t.pending_buf[D+o],o++,0===i?et(a,e):(r=R._length_code[a],et(r+256+1,e),s=R.extra_lbits[r],0!==s&&(a-=R.base_length[r],tt(a,s)),i--,r=R.d_code(i),et(r,n),s=R.extra_dbits[r],0!==s&&(i-=R.base_dist[r],tt(i,s)))}while(o<P);et(256,e),J=e[513]}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let a,r,s=0;S>0?(H.build_tree(t),V.build_tree(t),s=function(){let e;for(Y(B,H.max_code),Y(M,V.max_code),O.build_tree(t),e=18;e>=3&&0===j[2*R.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(W.static_ltree,W.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(j[2*R.bl_order[i]+1],3);nt(B,t-1),nt(M,e-1)}(H.max_code+1,V.max_code+1,s+1),rt(B,M)),X(),i&&st()}function _t(t){lt(p>=0?p:-1,m-p,t),p=m,e.flush_pending()}function dt(){let t,n,i,a;do{if(a=_-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=u,i=t;do{n=65535&c[--i],c[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<<w^255&l[m+1])&b)}while(k<262&&0!==e.avail_in)}function ct(t){let e,n,i=U,a=m,s=A;const _=m>r-262?m-(r-262):0;let c=C;const f=o,u=m+258;let h=l[a+s-1],b=l[a+s];A>=z&&(i>>=2),c>k&&(c=k);do{if(e=t,l[e+s]==b&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&a<u);if(n=258-(u-a),a=u-258,n>s){if(v=t,s=n,n>=c)break;h=l[a+s-1],b=l[a+s]}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,H.dyn_tree=B,H.stat_desc=W.static_l_desc,V.dyn_tree=M,V.stat_desc=W.static_d_desc,O.dyn_tree=j,O.stat_desc=W.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,c[u-1]=0;for(let t=0;t<u-1;t++)c[t]=0;I=T[S].max_lazy,z=T[S].good_length,C=T[S].nice_length,U=T[S].max_chain,m=0,p=0,k=0,x=A=2,y=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],B=[],M=[],j=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&F(e,i[r+1],i[r],t.depth)&&r++,!F(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,f,p){return _||(_=8),f||(f=8),p||(p=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<<s,o=r-1,h=f+7,u=1<<h,b=u-1,w=Math.floor((h+3-1)/3),l=new Uint8Array(2*r),d=[],c=[],L=1<<f+6,t.pending_buf=new Uint8Array(4*L),i=4*L,K=Math.floor(L/2),D=3*L,S=n,E=p,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,c=null,d=null,l=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(T[S].func!=T[e].func&&0!==t.total_in&&(i=t.deflate(1)),S!=e&&(S=e,I=T[S].max_lazy,z=T[S].good_length,C=T[S].nice_length,U=T[S].max_chain),E=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),l.set(e.subarray(_,_+s),0),m=s,p=s,f=255&l[0],f=(f<<w^255&l[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&l[a+2])&b,d[a&o]=c[f],c[f]=a;return 0},t.deflate=function(_,h){let U,z,C,B,M;if(h>4||h<0)return-2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=q[4],-2;if(0===_.avail_out)return _.msg=q[7],-5;var j;if(e=_,B=a,a=h,42==n&&(z=8+(s-8<<4)<<8,C=(S-1&255)>>1,C>3&&(C=3),z|=C<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Z((j=z)>>8&255),Z(255&j)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=q[7],-5;if(666==n&&0!==e.avail_in)return _.msg=q[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,T[S].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(dt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,_t(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[m+2])&b,i=65535&c[f],d[m&o]=c[f],c[f]=m),0!==i&&(m-i&65535)<=r-262&&2!=E&&(x=ct(i)),x>=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<<w^255&l[m+2])&b,i=65535&c[f],d[m&o]=c[f],c[f]=m}while(0!=--x);m++}else m+=x,x=0,f=255&l[m],f=(f<<w^255&l[m+1])&b;else n=at(0,255&l[m]),k--,m++;if(n&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:M=function(t){let n,i,a=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[m+2])&b,a=65535&c[f],d[m&o]=c[f],c[f]=m),A=x,g=v,x=2,0!==a&&A<I&&(m-a&65535)<=r-262&&(2!=E&&(x=ct(a)),x<=5&&(1==E||3==x&&m-v>4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-g,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<<w^255&l[m+2])&b,a=65535&c[f],d[m&o]=c[f],c[f]=m)}while(0!=--A);if(y=0,x=2,m++,n&&(_t(!1),0===e.avail_out))return 0}else if(0!==y){if(n=at(0,255&l[m-1]),n&&_t(!1),m++,k--,0===e.avail_out)return 0}else y=1,m++,k--}return 0!==y&&(n=at(0,255&l[m-1]),y=0),_t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=M&&3!=M||(n=666),0==M||2==M)return 0===e.avail_out&&(a=-1),0;if(1==M){if(1==h)tt(2,3),et(256,W.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,W.static_ltree),it()),J=7;else if(ot(0,0,!1),3==h)for(U=0;U<u;U++)c[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function N(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function Q(t){const e=new N,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,o=0,l=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length})),a}}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new J,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const X=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Y=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],$=[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],tt=[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,112,112],et=[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],nt=[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];function it(){let t,e,n,i,a,r;function s(t,e,s,o,l,_,d,c,f,u,h){let b,w,p,x,g,y,m,v,k,A,U,I,S,E,z;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(v=c[0],y=1;y<=15&&0===n[y];y++);for(m=y,v<y&&(v=y),g=15;0!==g&&0===n[g];g--);for(p=g,v>g&&(v=g),c[0]=v,E=1<<y;y<g;y++,E<<=1)if((E-=n[y])<0)return-3;if((E-=n[g])<0)return-3;for(n[g]+=E,r[1]=y=0,A=1,S=2;0!=--g;)r[S]=y+=n[A],S++,A++;g=0,A=0;do{0!==(y=t[e+A])&&(h[r[y]++]=g),A++}while(++g<s);for(s=r[p],r[0]=g=0,A=0,x=-1,I=-v,a[0]=0,U=0,z=0;m<=p;m++)for(b=n[m];0!=b--;){for(;m>I+v;){if(x++,I+=v,z=p-I,z=z>v?v:z,(w=1<<(y=m-I))>b+1&&(w-=b+1,S=m,y<z))for(;++y<z&&!((w<<=1)<=n[++S]);)w-=n[S];if(z=1<<y,u[0]+z>1440)return-3;a[x]=U=u[0],u[0]+=z,0!==x?(r[x]=g,i[0]=y,i[1]=v,y=g>>>I-v,i[2]=U-a[x-1]-y,f.set(i,3*(a[x-1]+y))):d[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]<o?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-o]+16+64,i[2]=l[h[A++]-o]),w=1<<m-I,y=g>>>I;y<z;y+=w)f.set(i,3*(U+y));for(y=1<<m-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<I)-1;(g&k)!=r[x];)x--,I-=v,k=(1<<I)-1}return 0!==E&&1!=p?-5:0}function o(s){let o;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),o=0;o<s;o++)e[o]=0;for(o=0;o<16;o++)n[o]=0;for(o=0;o<3;o++)i[o]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,l){let _;return o(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),-3==_?l.msg="oversubscribed dynamic bit lengths tree":-5!=_&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",_=-3),_},this.inflate_trees_dynamic=function(n,i,a,r,l,_,d,c,f){let u;return o(288),t[0]=0,u=s(a,0,n,257,$,tt,_,r,c,t,e),0!=u||0===r[0]?(-3==u?f.msg="oversubscribed literal/length tree":-4!=u&&(f.msg="incomplete literal/length tree",u=-3),u):(o(288),u=s(a,n,i,0,et,nt,d,l,c,t,e),0!=u||0===l[0]&&n>257?(-3==u?f.msg="oversubscribed distance tree":-5==u?(f.msg="incomplete distance tree",u=-3):-4!=u&&(f.msg="empty distance tree with lengths",u=-3),u):0)}}function at(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,_=0,d=0,c=0,f=0,u=0,h=0;function b(t,e,n,i,a,r,s,o){let l,_,d,c,f,u,h,b,w,p,x,g,y,m,v,k;h=o.next_in_index,b=o.avail_in,f=s.bitb,u=s.bitk,w=s.write,p=w<s.read?s.read-w-1:s.end-w,x=X[t],g=X[e];do{for(;u<20;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;if(l=f&x,_=n,d=i,k=3*(d+l),0!==(c=_[k]))for(;;){if(f>>=_[k+1],u-=_[k+1],0!=(16&c)){for(c&=15,y=_[k+2]+(f&X[c]),f>>=c,u-=c;u<15;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;for(l=f&g,_=a,d=r,k=3*(d+l),c=_[k];;){if(f>>=_[k+1],u-=_[k+1],0!=(16&c)){for(c&=15;u<c;)b--,f|=(255&o.read_byte(h++))<<u,u+=8;if(m=_[k+2]+(f&X[c]),f>>=c,u-=c,p-=y,w>=m)v=w-m,w-v>0&&2>w-v?(s.window[w++]=s.window[v++],s.window[w++]=s.window[v++],y-=2):(s.window.set(s.window.subarray(v,v+2),w),w+=2,v+=2,y-=2);else{v=w-m;do{v+=s.end}while(v<0);if(c=s.end-v,y>c){if(y-=c,w-v>0&&c>w-v)do{s.window[w++]=s.window[v++]}while(0!=--c);else s.window.set(s.window.subarray(v,v+c),w),w+=c,v+=c,c=0;v=0}}if(w-v>0&&y>w-v)do{s.window[w++]=s.window[v++]}while(0!=--y);else s.window.set(s.window.subarray(v,v+y),w),w+=y,v+=y,y=0;break}if(0!=(64&c))return o.msg="invalid distance code",y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3;l+=_[k+2],l+=f&X[c],k=3*(d+l),c=_[k]}break}if(0!=(64&c))return 0!=(32&c)?(y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,1):(o.msg="invalid literal/length code",y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3);if(l+=_[k+2],l+=f&X[c],k=3*(d+l),0===(c=_[k])){f>>=_[k+1],u-=_[k+1],s.window[w++]=_[k+2],p--;break}}else f>>=_[k+1],u-=_[k+1],s.window[w++]=_[k+2],p--}while(p>=258&&b>=10);return y=o.avail_in-b,y=u>>3<y?u>>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,0}t.init=function(t,r,s,o,l,_){e=0,c=t,f=r,i=s,u=o,a=l,h=_,n=null},t.proc=function(t,w,p){let x,g,y,m,v,k,A,U=0,I=0,S=0;for(S=w.next_in_index,m=w.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v;;)switch(e){case 0:if(k>=258&&m>=10&&(t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,p=b(c,f,i,u,a,h,t,w),S=w.next_in_index,m=w.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v,0!=p)){e=1==p?7:9;break}o=c,n=i,s=u,e=1;case 1:for(x=o;I<x;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(S++))<<I,I+=8}if(g=3*(s+(U&X[x])),U>>>=n[g+1],I-=n[g+1],y=n[g],0===y){l=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);case 2:for(x=_;I<x;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(S++))<<I,I+=8}r+=U&X[x],U>>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I<x;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(S++))<<I,I+=8}if(g=3*(s+(U&X[x])),U>>=n[g+1],I-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);case 4:for(x=_;I<x;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);p=0,m--,U|=(255&w.read_byte(S++))<<I,I+=8}d+=U&X[x],U>>=x,I-=x,e=5;case 5:for(A=v-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);t.window[v++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);p=0,t.window[v++]=l,k--,e=0;break;case 7:if(I>7&&(I-=8,m++,S--),t.write=v,p=t.inflate_flush(w,p),v=t.write,k=v<t.read?t.read-v-1:t.end-v,t.read!=t.write)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);e=8;case 8:return p=1,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);case 9:return p=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p);default:return p=-2,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=S-w.next_in_index,w.next_in_index=S,t.write=v,t.inflate_flush(w,p)}},t.free=function(){}}it.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=Y,i[0]=Z,0};const rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function st(t,e){const n=this;let i,a=0,r=0,s=0,o=0;const l=[0],_=[0],d=new at;let c=0,f=new Int32Array(4320);const u=new it;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,p,x,g,y,m;for(p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let v,k,A,U,I,S,E,z;switch(a){case 0:for(;w<3;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}switch(h=7&b,c=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],it.inflate_trees_fixed(v,k,A,U),d.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==c?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y&&(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y)))return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(e=0,h=r,h>x&&(h=x),h>y&&(h=y),n.window.set(t.read_buf(p,h),g),p+=h,x-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==c?7:0;break;case 3:for(;w<14;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(m=0;m<h;m++)i[m]=0;b>>>=14,w-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;w<3;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}i[rt[o++]]=7&b,b>>>=3,w-=3}for(;o<19;)i[rt[o++]]=0;if(l[0]=7,h=u.inflate_trees_bits(i,l,_,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,d;for(h=l[0];w<h;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(h=f[3*(_[0]+(b&X[h]))+1],d=f[3*(_[0]+(b&X[h]))+2],d<16)b>>>=h,w-=h,i[o++]=d;else{for(m=18==d?7:d-14,r=18==d?11:3;w<h+m;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<<w,w+=8}if(b>>>=h,w-=h,r+=b&X[m],b>>>=m,w-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==d&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--r);o=m}}if(_[0]=-1,I=[],S=[],E=[],z=[],I[0]=9,S[0]=6,h=s,h=u.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,S,E,z,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d.init(I[0],S[0],f,E[0],f,z[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===c){a=0;break}a=7;case 7:if(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const ot=[0,0,255,255];function lt(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new st(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return-2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return-2;const o=t.istate;if(13!=o.mode&&(o.mode=13,o.marker=0),0===(n=t.avail_in))return-5;for(i=t.next_in_index,a=o.marker;0!==n&&a<4;)t.read_byte(i)==ot[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,o.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,o.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2}}function _t(){}function dt(){const t=new _t,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,o,l=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),r.forEach((function(t){o.set(t,_),_+=t.length})),o}},this.flush=function(){t.inflateEnd()}}_t.prototype={inflateInit:function(t){const e=this;return e.istate=new lt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=Q,self.Inflate=dt}}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));t({workerScripts:{inflate:[n],deflate:[n]}})}}; |
@@ -6,3 +6,3 @@ { | ||
"license": "BSD-3-Clause", | ||
"version": "2.2.22", | ||
"version": "2.2.23", | ||
"type": "module", | ||
@@ -38,5 +38,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"rollup": "^2.40.0", | ||
"rollup-plugin-terser": "^7.0.2" | ||
} | ||
} | ||
} |
export default [{ | ||
input: "lib/z-worker.js", | ||
output: [{ | ||
file: "lib/z-worker-inline.js", | ||
format: "es" | ||
}] | ||
}, { | ||
input: "lib/z-worker-inline.js", | ||
output: [{ | ||
intro: | ||
` | ||
import { configure } from "./core/configuration.js"; | ||
export default () => { | ||
if (typeof URL.createObjectURL == "function") { | ||
const code = (() => { | ||
`, | ||
file: "lib/z-worker-inline.js", | ||
outro: | ||
` }).toString(); | ||
const uri = URL.createObjectURL(new Blob(["(" + code + ")()"], { type : "text/javascript" })); | ||
configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); | ||
} | ||
};`, | ||
format: "esm" | ||
}] | ||
}, { | ||
input: ["lib/zip.js"], | ||
@@ -11,4 +36,3 @@ output: [{ | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -25,4 +49,3 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -34,4 +57,3 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -43,4 +65,3 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -52,4 +73,3 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -61,9 +81,7 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}, { | ||
file: "dist/zip-fs.js", | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
@@ -75,23 +93,19 @@ }, { | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}, { | ||
file: "dist/zip-fs-full.min.js", | ||
format: "umd", | ||
name: "zip", | ||
plugins: [] | ||
name: "zip" | ||
}] | ||
}, { | ||
input: "lib/z-worker-pako.js", | ||
input: "lib/z-worker-bootstrap-pako.js", | ||
output: [{ | ||
file: "dist/z-worker-pako.js", | ||
format: "iife", | ||
plugins: [] | ||
format: "iife" | ||
}] | ||
}, { | ||
input: "lib/z-worker-fflate.js", | ||
input: "lib/z-worker-bootstrap-fflate.js", | ||
output: [{ | ||
file: "dist/z-worker-fflate.js", | ||
format: "iife", | ||
plugins: [] | ||
format: "iife" | ||
}] | ||
@@ -102,5 +116,4 @@ }, { | ||
file: "dist/z-worker.js", | ||
format: "iife", | ||
plugins: [] | ||
format: "iife" | ||
}] | ||
}]; |
import { terser } from "rollup-plugin-terser"; | ||
export default [{ | ||
input: "lib/z-worker.js", | ||
output: [{ | ||
file: "lib/z-worker-inline.js", | ||
format: "es" | ||
}], | ||
plugins: [terser()] | ||
}, { | ||
input: "lib/z-worker-inline.js", | ||
output: [{ | ||
intro: | ||
` | ||
import { configure } from "./core/configuration.js"; | ||
export default () => { | ||
if (typeof URL.createObjectURL == "function") { | ||
const code = (() => { | ||
`, | ||
file: "lib/z-worker-inline.js", | ||
outro: | ||
` }).toString(); | ||
const uri = URL.createObjectURL(new Blob(["(" + code + ")()"], { type : "text/javascript" })); | ||
configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); | ||
} | ||
};`, | ||
format: "esm" | ||
}], | ||
plugins: [terser()] | ||
}, { | ||
input: ["lib/zip.js"], | ||
@@ -80,3 +107,3 @@ output: [{ | ||
}, { | ||
input: "lib/z-worker-pako.js", | ||
input: "lib/z-worker-bootstrap-pako.js", | ||
output: [{ | ||
@@ -88,3 +115,3 @@ file: "dist/z-worker-pako.js", | ||
}, { | ||
input: "lib/z-worker-fflate.js", | ||
input: "lib/z-worker-bootstrap-fflate.js", | ||
output: [{ | ||
@@ -91,0 +118,0 @@ file: "dist/z-worker-fflate.js", |
@@ -33,3 +33,3 @@ /* eslint-disable no-console */ | ||
if (error.message == zip.ERR_INVALID_PASSWORD) { | ||
data = await entries[0].getData(dataBlobWriter, { password: "password" }); | ||
data = await entries[0].getData(dataBlobWriter, { password: "password", checkSignature: true }); | ||
} | ||
@@ -36,0 +36,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2273869
147
36005
3