@zip.js/zip.js
Advanced tools
Comparing version 2.7.24 to 2.7.25
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self;class b{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^v[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends g{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=z.getPartial(n);return 32===s?e.concat(t):z._shiftRight(t,s,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)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.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=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=z.getPartial(r);return s.push(z.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(z.partial(8*(3&n),s)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),s=t._length,a=t._length=s+z.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},I={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},A={importKey:e=>new A.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=z;for(t=D.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[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}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=void 0!==p&&"function"==typeof p.getRandomValues,H="Invalid password",q="Invalid signature",B="zipjs-abort-check-password";function K(e){return R?p.getRandomValues(e):I.getRandomValues(e)}const V=16,P={name:"PBKDF2"},x=t.assign({hash:{name:"HMAC"}},P),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},P),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",L="function",F=typeof p!=O,j=F&&p.subtle,G=F&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[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],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Q=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,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}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 s;if(!(s=t.length))return[];const r=z.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return z.clamp(t,r)}},Y=A.hmacSha1;let Z=F&&G&&typeof j.importKey==L,$=F&&G&&typeof j.deriveBits==L;class ee extends g{constructor({password:e,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,signed:n,strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:i,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await se(e,t,n,ae(s,0,U[t])),o=ae(s,U[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(H)})(n,i,s,ae(e,0,U[i]+2)),e=ae(e,U[i]+2),o?t.error(new r(B)):c()):await l;const u=new a(e.length-M-(e.length-M)%V);t.enqueue(ne(n,e,u,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;await i;const c=ae(o,0,o.length-M),l=ae(o,o.length-M);let u=new a;if(c.length){const e=ie(X,c);s.update(e);const t=n.update(e);u=oe(X,t)}if(t){const e=ae(oe(X,s.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=l[t])throw new r(q)}e.enqueue(u)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let s;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=K(new a(U[t]));return re(s,await se(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%V);l.set(c,0),t.enqueue(ne(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:o}=this;await o;let i=new a;if(r.length){const e=t.update(ie(X,r));n.update(e),i=oe(X,e)}s.signature=oe(X,n.digest()).slice(0,M),e.enqueue(re(i,s.signature))}}),s=this}}function ne(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=re(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%V)),h=0;u-V>=h;h+=V){const e=ie(X,ae(t,h,h+V));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(oe(X,r),h+s)}return e.pending=ae(t,h),n}async function se(n,s,r,o){n.password=null;const i=(e=>{if(void 0===f){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(r),c=await(async(e,t,n,s,r)=>{if(!Z)return A.importKey(t);try{return await j.importKey("raw",t,n,!1,r)}catch(e){return Z=!1,A.importKey(t)}})(0,i,x,0,E),l=await(async(e,t,n)=>{if(!$)return A.pbkdf2(t,e.salt,T.iterations,n);try{return await j.deriveBits(e,t,n)}catch(s){return $=!1,A.pbkdf2(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*W[s]+2)),u=new a(l),h=ie(X,ae(u,0,W[s])),p=ie(X,ae(u,W[s],2*W[s])),d=ae(u,2*W[s]);return t.assign(n,{keys:{key:h,authentication:p,passwordVerification:d},ctr:new Q(new J(h),e.from(N)),hmac:new Y(p)}),d}function re(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.fromBits(t)}function ie(e,t){return e.toBits(t)}class ce extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;if(n.password){const t=ue(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(H);e=e.subarray(12)}s?t.error(new r(B)):t.enqueue(ue(n,e))}})}}class le extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=K(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(he(n,t),0),r=12}else s=new a(e.length),r=0;s.set(he(n,e),r),t.enqueue(s)}})}}function ue(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,n[s]);return n}function he(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,t[s]);return n}function fe(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new S(s[0]),crcKey2:new S(s[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=we(s.imul(we(r+ge(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function de(e){const t=2|e.keys[2];return ge(s.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ye="deflate-raw";class me extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=be(super.readable);a&&!i||!c||(f=new k,d=ke(d,f)),r&&(d=Se(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=ke(d,new le(e)):(p=new te(e),d=ke(d,p))),ve(h,d,(async()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class _e extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=be(super.readable);o&&(a?d=ke(d,new ce(e)):(p=new ee(e),d=ke(d,p))),l&&(d=Se(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new k,d=ke(d,f)),ve(this,d,(async()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(q)}}))}}function be(e){return ke(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,s){n=ke(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,s,r){try{e=ke(e,new(t&&s?s:r)(ye,n))}catch(s){if(!t)throw s;e=ke(e,new r(ye,n))}return e}function ke(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=me:r.startsWith("inflate")&&(a=_e);let o=0;const i=new a(e,n),c=super.readable,l=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=i;t.assign(s,{signature:e,size:o})}});t.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(l)})}}const Ce=new l,Ie=new l;let Ae=0;async function Re(e){try{const{options:t,scripts:s,config:r}=e;s&&s.length&&importScripts.apply(void 0,s),self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new b(self.Deflate)),self.Inflate&&(r.DecompressionStream=new b(self.Inflate));const a={highWaterMark:1,size:()=>r.chunkSize},o=e.readable||new w({async pull(e){const t=new h((e=>Ce.set(Ae,e)));He({type:"pull",messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));Ie.set(Ae,t),He({type:ze,value:e,messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new De(t,r);await o.pipeThrough(c).pipeTo(i,{preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch(e){}const{signature:l,size:u}=c;He({type:"close",result:{signature:l,size:u}})}catch(e){qe(e)}}function He(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function qe(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Be(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",("function"==typeof t.hasOwn?t.hasOwn(i,c):i.hasOwnProperty(c))&&void 0===r.level&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Re(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){qe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Be(e.Deflate,t.deflate,n),Inflate:Be(e.Inflate,t.inflate,n)}))(fflate,void 0,((e,t)=>e.ondata=t));self.Deflate=e,self.Inflate=t}}(); | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self;class b{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^v[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends g{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=z.getPartial(n);return 32===s?e.concat(t):z._shiftRight(t,s,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)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.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=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=z.getPartial(r);return s.push(z.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(z.partial(8*(3&n),s)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),s=t._length,a=t._length=s+z.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},I={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},A={importKey:e=>new A.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=z;for(t=D.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[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}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=void 0!==p&&"function"==typeof p.getRandomValues,H="Invalid password",q="Invalid signature",B="zipjs-abort-check-password";function K(e){return R?p.getRandomValues(e):I.getRandomValues(e)}const V=16,P={name:"PBKDF2"},x=t.assign({hash:{name:"HMAC"}},P),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},P),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",L="function",F=typeof p!=O,j=F&&p.subtle,G=F&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[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],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Q=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,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}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 s;if(!(s=t.length))return[];const r=z.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return z.clamp(t,r)}},Y=A.hmacSha1;let Z=F&&G&&typeof j.importKey==L,$=F&&G&&typeof j.deriveBits==L;class ee extends g{constructor({password:e,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,signed:n,strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:i,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await se(e,t,n,ae(s,0,U[t])),o=ae(s,U[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(H)})(n,i,s,ae(e,0,U[i]+2)),e=ae(e,U[i]+2),o?t.error(new r(B)):c()):await l;const u=new a(e.length-M-(e.length-M)%V);t.enqueue(ne(n,e,u,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;await i;const c=ae(o,0,o.length-M),l=ae(o,o.length-M);let u=new a;if(c.length){const e=ie(X,c);s.update(e);const t=n.update(e);u=oe(X,t)}if(t){const e=ae(oe(X,s.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=l[t])throw new r(q)}e.enqueue(u)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let s;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=K(new a(U[t]));return re(s,await se(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%V);l.set(c,0),t.enqueue(ne(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:o}=this;await o;let i=new a;if(r.length){const e=t.update(ie(X,r));n.update(e),i=oe(X,e)}s.signature=oe(X,n.digest()).slice(0,M),e.enqueue(re(i,s.signature))}}),s=this}}function ne(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=re(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%V)),h=0;u-V>=h;h+=V){const e=ie(X,ae(t,h,h+V));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(oe(X,r),h+s)}return e.pending=ae(t,h),n}async function se(n,s,r,o){n.password=null;const i=(e=>{if(void 0===f){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(r),c=await(async(e,t,n,s,r)=>{if(!Z)return A.importKey(t);try{return await j.importKey("raw",t,n,!1,r)}catch(e){return Z=!1,A.importKey(t)}})(0,i,x,0,E),l=await(async(e,t,n)=>{if(!$)return A.pbkdf2(t,e.salt,T.iterations,n);try{return await j.deriveBits(e,t,n)}catch(s){return $=!1,A.pbkdf2(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*W[s]+2)),u=new a(l),h=ie(X,ae(u,0,W[s])),p=ie(X,ae(u,W[s],2*W[s])),d=ae(u,2*W[s]);return t.assign(n,{keys:{key:h,authentication:p,passwordVerification:d},ctr:new Q(new J(h),e.from(N)),hmac:new Y(p)}),d}function re(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.fromBits(t)}function ie(e,t){return e.toBits(t)}class ce extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;if(n.password){const t=ue(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(H);e=e.subarray(12)}s?t.error(new r(B)):t.enqueue(ue(n,e))}})}}class le extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=K(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(he(n,t),0),r=12}else s=new a(e.length),r=0;s.set(he(n,e),r),t.enqueue(s)}})}}function ue(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,n[s]);return n}function he(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,t[s]);return n}function fe(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new S(s[0]),crcKey2:new S(s[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=we(s.imul(we(r+ge(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function de(e){const t=2|e.keys[2];return ge(s.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ye="deflate-raw";class me extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=be(super.readable);a&&!i||!c||(f=new k,d=ke(d,f)),r&&(d=Se(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=ke(d,new le(e)):(p=new te(e),d=ke(d,p))),ve(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class _e extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=be(super.readable);o&&(a?d=ke(d,new ce(e)):(p=new ee(e),d=ke(d,p))),l&&(d=Se(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new k,d=ke(d,f)),ve(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(q)}}))}}function be(e){return ke(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,s){n=ke(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,s,r){try{e=ke(e,new(t&&s?s:r)(ye,n))}catch(s){if(!t)throw s;e=ke(e,new r(ye,n))}return e}function ke(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=me:r.startsWith("inflate")&&(a=_e);let o=0;const i=new a(e,n),c=super.readable,l=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=i;t.assign(s,{signature:e,size:o})}});t.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(l)})}}const Ce=new l,Ie=new l;let Ae=0;async function Re(e){try{const{options:t,scripts:s,config:r}=e;s&&s.length&&importScripts.apply(void 0,s),self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new b(self.Deflate)),self.Inflate&&(r.DecompressionStream=new b(self.Inflate));const a={highWaterMark:1,size:()=>r.chunkSize},o=e.readable||new w({async pull(e){const t=new h((e=>Ce.set(Ae,e)));He({type:"pull",messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));Ie.set(Ae,t),He({type:ze,value:e,messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new De(t,r);await o.pipeThrough(c).pipeTo(i,{preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch(e){}const{signature:l,size:u}=c;He({type:"close",result:{signature:l,size:u}})}catch(e){qe(e)}}function He(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function qe(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Be(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",("function"==typeof t.hasOwn?t.hasOwn(i,c):i.hasOwnProperty(c))&&void 0===r.level&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Re(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){qe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Be(e.Deflate,t.deflate,n),Inflate:Be(e.Inflate,t.inflate,n)}))(fflate,void 0,((e,t)=>e.ondata=t));self.Deflate=e,self.Inflate=t}}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self;class b{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^v[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends g{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=z.getPartial(n);return 32===s?e.concat(t):z._shiftRight(t,s,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)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.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=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=z.getPartial(r);return s.push(z.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(z.partial(8*(3&n),s)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),s=t._length,a=t._length=s+z.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},I={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},A={importKey:e=>new A.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=z;for(t=D.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[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}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=void 0!==p&&"function"==typeof p.getRandomValues,H="Invalid password",q="Invalid signature",B="zipjs-abort-check-password";function K(e){return R?p.getRandomValues(e):I.getRandomValues(e)}const V=16,P={name:"PBKDF2"},x=t.assign({hash:{name:"HMAC"}},P),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},P),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",L="function",F=typeof p!=O,j=F&&p.subtle,G=F&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[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],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Q=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,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}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 s;if(!(s=t.length))return[];const r=z.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return z.clamp(t,r)}},Y=A.hmacSha1;let Z=F&&G&&typeof j.importKey==L,$=F&&G&&typeof j.deriveBits==L;class ee extends g{constructor({password:e,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,signed:n,strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:i,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await se(e,t,n,ae(s,0,U[t])),o=ae(s,U[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(H)})(n,i,s,ae(e,0,U[i]+2)),e=ae(e,U[i]+2),o?t.error(new r(B)):c()):await l;const u=new a(e.length-M-(e.length-M)%V);t.enqueue(ne(n,e,u,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;await i;const c=ae(o,0,o.length-M),l=ae(o,o.length-M);let u=new a;if(c.length){const e=ie(X,c);s.update(e);const t=n.update(e);u=oe(X,t)}if(t){const e=ae(oe(X,s.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=l[t])throw new r(q)}e.enqueue(u)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let s;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=K(new a(U[t]));return re(s,await se(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%V);l.set(c,0),t.enqueue(ne(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:o}=this;await o;let i=new a;if(r.length){const e=t.update(ie(X,r));n.update(e),i=oe(X,e)}s.signature=oe(X,n.digest()).slice(0,M),e.enqueue(re(i,s.signature))}}),s=this}}function ne(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=re(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%V)),h=0;u-V>=h;h+=V){const e=ie(X,ae(t,h,h+V));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(oe(X,r),h+s)}return e.pending=ae(t,h),n}async function se(n,s,r,o){n.password=null;const i=(e=>{if(void 0===f){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(r),c=await(async(e,t,n,s,r)=>{if(!Z)return A.importKey(t);try{return await j.importKey("raw",t,n,!1,r)}catch(e){return Z=!1,A.importKey(t)}})(0,i,x,0,E),l=await(async(e,t,n)=>{if(!$)return A.pbkdf2(t,e.salt,T.iterations,n);try{return await j.deriveBits(e,t,n)}catch(s){return $=!1,A.pbkdf2(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*W[s]+2)),u=new a(l),h=ie(X,ae(u,0,W[s])),p=ie(X,ae(u,W[s],2*W[s])),d=ae(u,2*W[s]);return t.assign(n,{keys:{key:h,authentication:p,passwordVerification:d},ctr:new Q(new J(h),e.from(N)),hmac:new Y(p)}),d}function re(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.fromBits(t)}function ie(e,t){return e.toBits(t)}class ce extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;if(n.password){const t=ue(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(H);e=e.subarray(12)}s?t.error(new r(B)):t.enqueue(ue(n,e))}})}}class le extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=K(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(he(n,t),0),r=12}else s=new a(e.length),r=0;s.set(he(n,e),r),t.enqueue(s)}})}}function ue(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,n[s]);return n}function he(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,t[s]);return n}function fe(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new S(s[0]),crcKey2:new S(s[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=we(s.imul(we(r+ge(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function de(e){const t=2|e.keys[2];return ge(s.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ye="deflate-raw";class me extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=be(super.readable);a&&!i||!c||(f=new k,d=ke(d,f)),r&&(d=Se(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=ke(d,new le(e)):(p=new te(e),d=ke(d,p))),ve(h,d,(async()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class _e extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=be(super.readable);o&&(a?d=ke(d,new ce(e)):(p=new ee(e),d=ke(d,p))),l&&(d=Se(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new k,d=ke(d,f)),ve(this,d,(async()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(q)}}))}}function be(e){return ke(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,s){n=ke(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,s,r){try{e=ke(e,new(t&&s?s:r)(ye,n))}catch(s){if(!t)throw s;e=ke(e,new r(ye,n))}return e}function ke(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=me:r.startsWith("inflate")&&(a=_e);let o=0;const i=new a(e,n),c=super.readable,l=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=i;t.assign(s,{signature:e,size:o})}});t.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(l)})}}const Ce=new l,Ie=new l;let Ae=0;async function Re(e){try{const{options:t,scripts:s,config:r}=e;s&&s.length&&importScripts.apply(void 0,s),self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new b(self.Deflate)),self.Inflate&&(r.DecompressionStream=new b(self.Inflate));const a={highWaterMark:1,size:()=>r.chunkSize},o=e.readable||new w({async pull(e){const t=new h((e=>Ce.set(Ae,e)));He({type:"pull",messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));Ie.set(Ae,t),He({type:ze,value:e,messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new De(t,r);await o.pipeThrough(c).pipeTo(i,{preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch(e){}const{signature:l,size:u}=c;He({type:"close",result:{signature:l,size:u}})}catch(e){qe(e)}}function He(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function qe(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Be(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",("function"==typeof t.hasOwn?t.hasOwn(i,c):i.hasOwnProperty(c))&&void 0===r.level&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Re(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){qe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Be(e.Deflate,t.deflate,n),Inflate:Be(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}(); | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self;class b{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^v[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends g{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new u(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=z.getPartial(n);return 32===s?e.concat(t):z._shiftRight(t,s,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)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.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=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=z.getPartial(r);return s.push(z.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(z.partial(8*(3&n),s)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),s=t._length,a=t._length=s+z.bitLength(e);if(a>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},I={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||s.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},A={importKey:e=>new A.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=z;for(t=D.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(c=0;(a||1)>d&&c<o.length;c++)p.setInt32(d,o[c]),d+=4}return f.slice(0,s/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,s=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[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}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=void 0!==p&&"function"==typeof p.getRandomValues,H="Invalid password",q="Invalid signature",B="zipjs-abort-check-password";function K(e){return R?p.getRandomValues(e):I.getRandomValues(e)}const V=16,P={name:"PBKDF2"},x=t.assign({hash:{name:"HMAC"}},P),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},P),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",L="function",F=typeof p!=O,j=F&&p.subtle,G=F&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[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],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Q=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,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}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 s;if(!(s=t.length))return[];const r=z.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return z.clamp(t,r)}},Y=A.hmacSha1;let Z=F&&G&&typeof j.importKey==L,$=F&&G&&typeof j.deriveBits==L;class ee extends g{constructor({password:e,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,signed:n,strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:i,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await se(e,t,n,ae(s,0,U[t])),o=ae(s,U[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(H)})(n,i,s,ae(e,0,U[i]+2)),e=ae(e,U[i]+2),o?t.error(new r(B)):c()):await l;const u=new a(e.length-M-(e.length-M)%V);t.enqueue(ne(n,e,u,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;await i;const c=ae(o,0,o.length-M),l=ae(o,o.length-M);let u=new a;if(c.length){const e=ie(X,c);s.update(e);const t=n.update(e);u=oe(X,t)}if(t){const e=ae(oe(X,s.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=l[t])throw new r(q)}e.enqueue(u)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let s;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=K(new a(U[t]));return re(s,await se(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%V);l.set(c,0),t.enqueue(ne(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:o}=this;await o;let i=new a;if(r.length){const e=t.update(ie(X,r));n.update(e),i=oe(X,e)}s.signature=oe(X,n.digest()).slice(0,M),e.enqueue(re(i,s.signature))}}),s=this}}function ne(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=re(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%V)),h=0;u-V>=h;h+=V){const e=ie(X,ae(t,h,h+V));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(oe(X,r),h+s)}return e.pending=ae(t,h),n}async function se(n,s,r,o){n.password=null;const i=(e=>{if(void 0===f){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new f).encode(e)})(r),c=await(async(e,t,n,s,r)=>{if(!Z)return A.importKey(t);try{return await j.importKey("raw",t,n,!1,r)}catch(e){return Z=!1,A.importKey(t)}})(0,i,x,0,E),l=await(async(e,t,n)=>{if(!$)return A.pbkdf2(t,e.salt,T.iterations,n);try{return await j.deriveBits(e,t,n)}catch(s){return $=!1,A.pbkdf2(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*W[s]+2)),u=new a(l),h=ie(X,ae(u,0,W[s])),p=ie(X,ae(u,W[s],2*W[s])),d=ae(u,2*W[s]);return t.assign(n,{keys:{key:h,authentication:p,passwordVerification:d},ctr:new Q(new J(h),e.from(N)),hmac:new Y(p)}),d}function re(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.fromBits(t)}function ie(e,t){return e.toBits(t)}class ce extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;if(n.password){const t=ue(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(H);e=e.subarray(12)}s?t.error(new r(B)):t.enqueue(ue(n,e))}})}}class le extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=K(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(he(n,t),0),r=12}else s=new a(e.length),r=0;s.set(he(n,e),r),t.enqueue(s)}})}}function ue(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,n[s]);return n}function he(e,t){const n=new a(t.length);for(let s=0;s<t.length;s++)n[s]=de(e)^t[s],pe(e,t[s]);return n}function fe(e,n){const s=[305419896,591751049,878082192];t.assign(e,{keys:s,crcKey0:new S(s[0]),crcKey2:new S(s[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=we(s.imul(we(r+ge(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function de(e){const t=2|e.keys[2];return ge(s.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ye="deflate-raw";class me extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=be(super.readable);a&&!i||!c||(f=new k,d=ke(d,f)),r&&(d=Se(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=ke(d,new le(e)):(p=new te(e),d=ke(d,p))),ve(h,d,(()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=new u(f.value.buffer).getUint32(0)),h.signature=e}))}}class _e extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=be(super.readable);o&&(a?d=ke(d,new ce(e)):(p=new ee(e),d=ke(d,p))),l&&(d=Se(d,h,{chunkSize:t},s,n)),o&&!a||!i||(f=new k,d=ke(d,f)),ve(this,d,(()=>{if((!o||a)&&i){const e=new u(f.value.buffer);if(c!=e.getUint32(0,!1))throw new r(q)}}))}}function be(e){return ke(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,s){n=ke(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,s,r){try{e=ke(e,new(t&&s?s:r)(ye,n))}catch(s){if(!t)throw s;e=ke(e,new r(ye,n))}return e}function ke(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=me:r.startsWith("inflate")&&(a=_e);let o=0;const i=new a(e,n),c=super.readable,l=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=i;t.assign(s,{signature:e,size:o})}});t.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(l)})}}const Ce=new l,Ie=new l;let Ae=0;async function Re(e){try{const{options:t,scripts:s,config:r}=e;s&&s.length&&importScripts.apply(void 0,s),self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new b(self.Deflate)),self.Inflate&&(r.DecompressionStream=new b(self.Inflate));const a={highWaterMark:1,size:()=>r.chunkSize},o=e.readable||new w({async pull(e){const t=new h((e=>Ce.set(Ae,e)));He({type:"pull",messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));Ie.set(Ae,t),He({type:ze,value:e,messageId:Ae}),Ae=(Ae+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new De(t,r);await o.pipeThrough(c).pipeTo(i,{preventClose:!0,preventAbort:!0});try{await i.getWriter().close()}catch(e){}const{signature:l,size:u}=c;He({type:"close",result:{signature:l,size:u}})}catch(e){qe(e)}}function He(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function qe(e=new r("Unknown error")){const{message:t,stack:n,code:s,name:a}=e;d({error:{message:t,stack:n,code:s,name:a}})}function Be(e,n,s){return class{constructor(r){const o=this;var i,c;i=r,c="level",("function"==typeof t.hasOwn?t.hasOwn(i,c):i.hasOwnProperty(c))&&void 0===r.level&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Re(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){qe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Be(e.Deflate,t.deflate,n),Inflate:Be(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}(); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:i,Error:a,Uint8Array:r,Uint16Array:s,Uint32Array:l,Int32Array:o,Map:_,DataView:d,Promise:c,TextEncoder:u,crypto:f,postMessage:h,TransformStream:b,ReadableStream:w,WritableStream:x,CompressionStream:p,DecompressionStream:g}=self;class m{constructor(e){return class extends b{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}const y=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;y[e]=t}class v{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^y[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends b{constructor(){let e;const t=new v;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new r(4);new d(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const S={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=S.getPartial(n);return 32===i?e.concat(t):S._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)+S.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=S.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=>i.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 a=0;a<e.length;a++)i.push(n|e[a]>>>t),n=e[a]<<32-t;const a=e.length?e[e.length-1]:0,r=S.getPartial(a);return i.push(S.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},z={bytes:{fromBits(e){const t=S.bitLength(e)/8,n=new r(t);let i;for(let a=0;t>a;a++)0==(3&a)&&(i=e[a/4]),n[a]=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(S.partial(8*(3&n),i)),t}}},I=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=z.utf8String.toBits(e));const n=t._buffer=S.concat(t._buffer,e),i=t._length,r=t._length=i+S.bitLength(e);if(r>9007199254740991)throw new a("Cannot hash more than 2^53 - 1 bits");const s=new l(n);let o=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(s.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=S.concat(t,[S.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,a=n._h,r=e(80);for(let e=0;16>e;e++)r[e]=t[e];let s=a[0],l=a[1],o=a[2],_=a[3],d=a[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,l,o,_)+d+r[e]+n._key[i.floor(e/20)]|0;d=_,_=o,o=n._S(30,l),l=s,s=t}a[0]=a[0]+s|0,a[1]=a[1]+l|0,a[2]=a[2]+o|0,a[3]=a[3]+_|0,a[4]=a[4]+d|0}},C={getRandomValues(e){const t=new l(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let a,r=0;r<e.length;r+=4){const e=n(4294967296*(a||i.random()));a=987654071*e(),t[r/4]=4294967296*e()|0}return e}},E={importKey:e=>new E.hmacSha1(z.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new a("invalid params to pbkdf2");const r=1+(i>>5)<<2;let s,l,o,_,c;const u=new ArrayBuffer(r),f=new d(u);let h=0;const b=S;for(t=z.bytes.toBits(t),c=1;(r||1)>h;c++){for(s=l=e.encrypt(b.concat(t,[c])),o=1;n>o;o++)for(l=e.encrypt(l),_=0;_<l.length;_++)s[_]^=l[_];for(o=0;(r||1)>h&&o<s.length;o++)f.setInt32(h,s[o]),h+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=I,i=[[],[]];t._baseHash=[new n,new n];const a=t._baseHash[0].blockSize/32;e.length>a&&(e=(new n).update(e).finalize());for(let t=0;a>t;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}encrypt(e){if(this._updated)throw new a("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==f&&"function"==typeof f.getRandomValues,q="Invalid password",A="Invalid signature",P="zipjs-abort-check-password";function R(e){return D?f.getRandomValues(e):C.getRandomValues(e)}const H=16,B={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},B),V=t.assign({iterations:1e3,hash:{name:"SHA-1"}},B),T=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],L="undefined",F="function",O=typeof f!=L,j=O&&f.subtle,G=O&&typeof j!=L,X=z.bytes,J=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 s,l,o,_=1;if(4!==r&&6!==r&&8!==r)throw new a("invalid aes key size");for(t._key=[l=e.slice(0),o=[]],s=r;4*r+28>s;s++){let e=l[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^_<<24,_=_<<1^283*(_>>7))),l[s]=l[s-r]^e}for(let e=0;s;e++,s--){const t=l[3&e?s:s-4];o[e]=4>=s||4>e?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],a=[],r=[];let s,l,o,_;for(let e=0;256>e;e++)r[(a[e]=e<<1^283*(e>>7))^e]=e;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 c=16843009*_^65537*o^257*l^16843008*d,u=257*a[r]^16843008*r;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][r]=c=c<<24^c>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new a("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],s=this._tables[t],l=s[0],o=s[1],_=s[2],d=s[3],c=s[4];let u,f,h,b=e[0]^n[0],w=e[t?3:1]^n[1],x=e[2]^n[2],p=e[t?1:3]^n[3],g=4;for(let e=0;i>e;e++)u=l[b>>>24]^o[w>>16&255]^_[x>>8&255]^d[255&p]^n[g],f=l[w>>>24]^o[x>>16&255]^_[p>>8&255]^d[255&b]^n[g+1],h=l[x>>>24]^o[p>>16&255]^_[b>>8&255]^d[255&w]^n[g+2],p=l[p>>>24]^o[b>>16&255]^_[w>>8&255]^d[255&x]^n[g+3],g+=4,b=u,w=f,x=h;for(let e=0;4>e;e++)r[t?3&-e:e]=c[b>>>24]<<24^c[w>>16&255]<<16^c[x>>8&255]<<8^c[255&p]^n[g++],u=b,b=w,w=x,x=p,p=u;return r}},Q=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 a=S.bitLength(t);for(let a=0;i>a;a+=4){this.incCounter(n);const i=e.encrypt(n);t[a]^=i[0],t[a+1]^=i[1],t[a+2]^=i[2],t[a+3]^=i[3]}return S.clamp(t,a)}},Y=E.hmacSha1;let Z=O&&G&&typeof j.importKey==F,$=O&&G&&typeof j.deriveBits==F;class ee extends b{constructor({password:e,signed:n,encryptionStrength:i,checkPasswordOnly:s}){super({start(){t.assign(this,{ready:new c((e=>this.resolveReady=e)),password:e,signed:n,strength:i-1,pending:new r})},async transform(e,t){const n=this,{password:i,strength:l,resolveReady:o,ready:_}=n;i?(await(async(e,t,n,i)=>{const r=await ie(e,t,n,re(i,0,U[t])),s=re(i,U[t]);if(r[0]!=s[0]||r[1]!=s[1])throw new a(q)})(n,l,i,re(e,0,U[l]+2)),e=re(e,U[l]+2),s?t.error(new a(P)):o()):await _;const d=new r(e.length-M-(e.length-M)%H);t.enqueue(ne(n,e,d,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:s,ready:l}=this;await l;const o=re(s,0,s.length-M),_=re(s,s.length-M);let d=new r;if(o.length){const e=le(X,o);i.update(e);const t=n.update(e);d=se(X,t)}if(t){const e=re(se(X,i.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=_[t])throw new a(A)}e.enqueue(d)}})}}class te extends b{constructor({password:e,encryptionStrength:n}){let i;super({start(){t.assign(this,{ready:new c((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new r})},async transform(e,t){const n=this,{password:i,strength:a,resolveReady:s,ready:l}=n;let o=new r;i?(o=await(async(e,t,n)=>{const i=R(new r(U[t]));return ae(i,await ie(e,t,n,i))})(n,a,i),s()):await l;const _=new r(o.length+e.length-e.length%H);_.set(o,0),t.enqueue(ne(n,e,_,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:a,ready:s}=this;await s;let l=new r;if(a.length){const e=t.update(le(X,a));n.update(e),l=se(X,e)}i.signature=se(X,n.digest()).slice(0,M),e.enqueue(ae(l,i.signature))}}),i=this}}function ne(e,t,n,i,a,s){const{ctr:l,hmac:o,pending:_}=e,d=t.length-a;let c;for(_.length&&(t=ae(_,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,d-d%H)),c=0;d-H>=c;c+=H){const e=le(X,re(t,c,c+H));s&&o.update(e);const a=l.update(e);s||o.update(a),n.set(se(X,a),c+i)}return e.pending=re(t,c),n}async function ie(n,i,a,s){n.password=null;const l=(e=>{if(void 0===u){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new u).encode(e)})(a),o=await(async(e,t,n,i,a)=>{if(!Z)return E.importKey(t);try{return await j.importKey("raw",t,n,!1,a)}catch(e){return Z=!1,E.importKey(t)}})(0,l,K,0,T),_=await(async(e,t,n)=>{if(!$)return E.pbkdf2(t,e.salt,V.iterations,n);try{return await j.deriveBits(e,t,n)}catch(i){return $=!1,E.pbkdf2(t,e.salt,V.iterations,n)}})(t.assign({salt:s},V),o,8*(2*W[i]+2)),d=new r(_),c=le(X,re(d,0,W[i])),f=le(X,re(d,W[i],2*W[i])),h=re(d,2*W[i]);return t.assign(n,{keys:{key:c,authentication:f,passwordVerification:h},ctr:new Q(new J(c),e.from(N)),hmac:new Y(f)}),h}function ae(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function re(e,t,n){return e.subarray(t,n)}function se(e,t){return e.fromBits(t)}function le(e,t){return e.toBits(t)}class oe extends b{constructor({password:e,passwordVerification:n,checkPasswordOnly:i}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;if(n.password){const t=de(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new a(q);e=e.subarray(12)}i?t.error(new a(P)):t.enqueue(de(n,e))}})}}class _e extends b{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;let i,a;if(n.password){n.password=null;const t=R(new r(12));t[11]=n.passwordVerification,i=new r(e.length+t.length),i.set(ce(n,t),0),a=12}else i=new r(e.length),a=0;i.set(ce(n,e),a),t.enqueue(i)}})}}function de(e,t){const n=new r(t.length);for(let i=0;i<t.length;i++)n[i]=he(e)^t[i],fe(e,n[i]);return n}function ce(e,t){const n=new r(t.length);for(let i=0;i<t.length;i++)n[i]=he(e)^t[i],fe(e,t[i]);return n}function ue(e,n){const i=[305419896,591751049,878082192];t.assign(e,{keys:i,crcKey0:new v(i[0]),crcKey2:new v(i[2])});for(let t=0;t<n.length;t++)fe(e,n.charCodeAt(t))}function fe(e,t){let[n,a,r]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),a=we(i.imul(we(a+be(n)),134775813)+1),e.crcKey2.append([a>>>24]),r=~e.crcKey2.get(),e.keys=[n,a,r]}function he(e){const t=2|e.keys[2];return be(i.imul(t,1^t)>>>8)}function be(e){return 255&e}function we(e){return 4294967295&e}const xe="deflate-raw";class pe extends b{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:a,encrypted:r,useCompressionStream:s,zipCrypto:l,signed:o,level:_}=e,c=this;let u,f,h=me(super.readable);r&&!l||!o||(u=new k,h=ke(h,u)),a&&(h=ve(h,s,{level:_,chunkSize:t},i,n)),r&&(l?h=ke(h,new _e(e)):(f=new te(e),h=ke(h,f))),ye(c,h,(async()=>{let e;r&&!l&&(e=f.signature),r&&!l||!o||(e=new d(u.value.buffer).getUint32(0)),c.signature=e}))}}class ge extends b{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:s,signed:l,signature:o,compressed:_,useCompressionStream:c}=e;let u,f,h=me(super.readable);s&&(r?h=ke(h,new oe(e)):(f=new ee(e),h=ke(h,f))),_&&(h=ve(h,c,{chunkSize:t},i,n)),s&&!r||!l||(u=new k,h=ke(h,u)),ye(this,h,(async()=>{if((!s||r)&&l){const e=new d(u.value.buffer);if(o!=e.getUint32(0,!1))throw new a(A)}}))}}function me(e){return ke(e,new b({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ye(e,n,i){n=ke(n,new b({flush:i})),t.defineProperty(e,"readable",{get:()=>n})}function ve(e,t,n,i,a){try{e=ke(e,new(t&&i?i:a)(xe,n))}catch(i){if(!t)throw i;e=ke(e,new a(xe,n))}return e}function ke(e,t){return e.pipeThrough(t)}const Se="data";class ze extends b{constructor(e,n){super({});const i=this,{codecType:a}=e;let r;a.startsWith("deflate")?r=pe:a.startsWith("inflate")&&(r=ge);let s=0;const l=new r(e,n),o=super.readable,_=new b({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;t.assign(i,{signature:e,size:s})}});t.defineProperty(i,"readable",{get:()=>o.pipeThrough(l).pipeThrough(_)})}}const Ie=new _,Ce=new _;let Ee=0;async function De(e){try{const{options:t,scripts:i,config:a}=e;i&&i.length&&importScripts.apply(void 0,i),self.initCodec&&self.initCodec(),a.CompressionStreamNative=self.CompressionStream,a.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(a.CompressionStream=new m(self.Deflate)),self.Inflate&&(a.DecompressionStream=new m(self.Inflate));const r={highWaterMark:1,size:()=>a.chunkSize},s=e.readable||new w({async pull(e){const t=new c((e=>Ie.set(Ee,e)));qe({type:"pull",messageId:Ee}),Ee=(Ee+1)%n.MAX_SAFE_INTEGER;const{value:i,done:a}=await t;e.enqueue(i),a&&e.close()}},r),l=e.writable||new x({async write(e){let t;const i=new c((e=>t=e));Ce.set(Ee,t),qe({type:Se,value:e,messageId:Ee}),Ee=(Ee+1)%n.MAX_SAFE_INTEGER,await i}},r),o=new ze(t,a);await s.pipeThrough(o).pipeTo(l,{preventClose:!0,preventAbort:!0});try{await l.getWriter().close()}catch(e){}const{signature:_,size:d}=o;qe({type:"close",result:{signature:_,size:d}})}catch(e){Ae(e)}}function qe(e){let{value:t}=e;if(t)if(t.length)try{t=new r(t),e.value=t.buffer,h(e,[e.value])}catch(t){h(e)}else h(e);else h(e)}function Ae(e=new a("Unknown error")){const{message:t,stack:n,code:i,name:r}=e;h({error:{message:t,stack:n,code:i,name:r}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:i,done:a}=e;try{if("start"==t&&De(e),t==Se){const e=Ie.get(n);Ie.delete(n),e({value:new r(i),done:a})}if("ack"==t){const e=Ce.get(n);Ce.delete(n),e()}}catch(e){Ae(e)}}));const Pe=-2;function Re(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Be=[0,1,2,3].concat(...Re([[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 Ke(){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=n=>{const a=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let l,o,_,d=-1;for(n.heap_len=0,n.heap_max=573,l=0;s>l;l++)0!==a[2*l]?(n.heap[++n.heap_len]=d=l,n.depth[l]=0):a[2*l+1]=0;for(;2>n.heap_len;)_=n.heap[++n.heap_len]=2>d?++d:0,a[2*_]=1,n.depth[_]=0,n.opt_len--,r&&(n.static_len-=r[2*_+1]);for(e.max_code=d,l=i.floor(n.heap_len/2);l>=1;l--)n.pqdownheap(a,l);_=s;do{l=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(a,1),o=n.heap[1],n.heap[--n.heap_max]=l,n.heap[--n.heap_max]=o,a[2*_]=a[2*l]+a[2*o],n.depth[_]=i.max(n.depth[l],n.depth[o])+1,a[2*l+1]=a[2*o+1]=_,n.heap[1]=_++,n.pqdownheap(a,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,r=e.stat_desc.extra_base,s=e.stat_desc.max_length;let l,o,_,d,c,u,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;573>l;l++)o=t.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,f++),n[2*o+1]=d,o>e.max_code||(t.bl_count[d]++,c=0,r>o||(c=a[o-r]),u=n[2*o],t.opt_len+=u*(d+c),i&&(t.static_len+=u*(i[2*o+1]+c)));if(0!==f){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(o=t.bl_count[d];0!==o;)_=t.heap[--l],_>e.max_code||(n[2*_+1]!=d&&(t.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}})(n),((e,n,i)=>{const a=[];let r,s,l,o=0;for(r=1;15>=r;r++)a[r]=o=o+i[r-1]<<1;for(s=0;n>=s;s++)l=e[2*s+1],0!==l&&(e[2*s]=t(a[l]++,l))})(a,e.max_code,n.bl_count)}}function Ve(e,t,n,i,a){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=a}Ke._length_code=[0,1,2,3,4,5,6,7].concat(...Re([[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]])),Ke.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],Ke.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],Ke.d_code=e=>256>e?Be[e]:Be[256+(e>>>7)],Ke.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],Ke.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],Ke.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Te=Re([[144,8],[112,9],[24,7],[8,8]]);Ve.static_ltree=He([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Te[t]])));const Ue=Re([[30,5]]);function We(e,t,n,i,a){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=a}Ve.static_dtree=He([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Ue[t]]))),Ve.static_l_desc=new Ve(Ve.static_ltree,Ke.extra_lbits,257,286,15),Ve.static_d_desc=new Ve(Ve.static_dtree,Ke.extra_dbits,0,30,15),Ve.static_bl_desc=new Ve(null,Ke.extra_blbits,0,19,7);const Me=[new We(0,0,0,0,0),new We(4,4,8,4,1),new We(4,5,16,8,1),new We(4,6,32,32,1),new We(4,4,16,16,2),new We(8,16,32,32,2),new We(8,16,128,128,2),new We(8,32,128,256,2),new We(32,128,258,1024,2),new We(32,258,258,4096,2)],Ne=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Le=113,Fe=666,Oe=262;function je(e,t,n,i){const a=e[2*t],r=e[2*n];return r>a||a==r&&i[t]<=i[n]}function Ge(){const e=this;let t,n,a,l,o,_,d,c,u,f,h,b,w,x,p,g,m,y,v,k,S,z,I,C,E,D,q,A,P,R,H,B,K;const V=new Ke,T=new Ke,U=new Ke;let W,M,N,L,F,O;function j(){let t;for(t=0;286>t;t++)H[2*t]=0;for(t=0;30>t;t++)B[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;H[512]=1,e.opt_len=e.static_len=0,M=N=0}function G(e,t){let n,i=-1,a=e[1],r=0,s=7,l=4;0===a&&(s=138,l=3),e[2*(t+1)+1]=65535;for(let o=0;t>=o;o++)n=a,a=e[2*(o+1)+1],++r<s&&n==a||(l>r?K[2*n]+=r:0!==n?(n!=i&&K[2*n]++,K[32]++):r>10?K[36]++:K[34]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function X(t){e.pending_buf[e.pending++]=t}function J(e){X(255&e),X(e>>>8&255)}function Q(e,t){let n;const i=t;O>16-i?(n=e,F|=n<<O&65535,J(F),F=n>>>16-O,O+=i-16):(F|=e<<O&65535,O+=i)}function Y(e,t){const n=2*e;Q(65535&t[n],65535&t[n+1])}function Z(e,t){let n,i,a=-1,r=e[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;t>=n;n++)if(i=r,r=e[2*(n+1)+1],++s>=l||i!=r){if(o>s)do{Y(i,K)}while(0!=--s);else 0!==i?(i!=a&&(Y(i,K),s--),Y(16,K),Q(s-3,2)):s>10?(Y(18,K),Q(s-11,7)):(Y(17,K),Q(s-3,3));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function $(){16==O?(J(F),F=0,O=0):8>O||(X(255&F),F>>>=8,O-=8)}function ee(t,n){let a,r,s;if(e.dist_buf[M]=t,e.lc_buf[M]=255&n,M++,0===t?H[2*n]++:(N++,t--,H[2*(Ke._length_code[n]+256+1)]++,B[2*Ke.d_code(t)]++),0==(8191&M)&&q>2){for(a=8*M,r=S-m,s=0;30>s;s++)a+=B[2*s]*(5+Ke.extra_dbits[s]);if(a>>>=3,N<i.floor(M/2)&&a<i.floor(r/2))return!0}return M==W-1}function te(t,n){let i,a,r,s,l=0;if(0!==M)do{i=e.dist_buf[l],a=e.lc_buf[l],l++,0===i?Y(a,t):(r=Ke._length_code[a],Y(r+256+1,t),s=Ke.extra_lbits[r],0!==s&&(a-=Ke.base_length[r],Q(a,s)),i--,r=Ke.d_code(i),Y(r,n),s=Ke.extra_dbits[r],0!==s&&(i-=Ke.base_dist[r],Q(i,s)))}while(M>l);Y(256,t),L=t[513]}function ne(){O>8?J(F):O>0&&X(255&F),F=0,O=0}function ie(t,n,i){Q(0+(i?1:0),3),((t,n)=>{ne(),L=8,J(n),J(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function ae(n){((t,n,i)=>{let a,r,s=0;q>0?(V.build_tree(e),T.build_tree(e),s=(()=>{let t;for(G(H,V.max_code),G(B,T.max_code),U.build_tree(e),t=18;t>=3&&0===K[2*Ke.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r>a||(a=r)):a=r=n+5,n+4>a||-1==t?r==a?(Q(2+(i?1:0),3),te(Ve.static_ltree,Ve.static_dtree)):(Q(4+(i?1:0),3),((e,t,n)=>{let i;for(Q(e-257,5),Q(t-1,5),Q(n-4,4),i=0;n>i;i++)Q(K[2*Ke.bl_order[i]+1],3);Z(H,e-1),Z(B,t-1)})(V.max_code+1,T.max_code+1,s+1),te(H,B)):ie(t,n,i),j(),i&&ne()})(0>m?-1:m,S-m,n),m=S,t.flush_pending()}function re(){let e,n,i,a;do{if(a=u-I-S,0===a&&0===S&&0===I)a=o;else if(-1==a)a--;else if(S>=o+o-Oe){c.set(c.subarray(o,o+o),0),z-=o,S-=o,m-=o,e=w,i=e;do{n=65535&h[--i],h[i]=o>n?0:n-o}while(0!=--e);e=o,i=e;do{n=65535&f[--i],f[i]=o>n?0:n-o}while(0!=--e);a+=o}if(0===t.avail_in)return;e=t.read_buf(c,S+I,a),I+=e,3>I||(b=255&c[S],b=(b<<g^255&c[S+1])&p)}while(Oe>I&&0!==t.avail_in)}function se(e){let t,n,i=E,a=S,r=C;const s=S>o-Oe?S-(o-Oe):0;let l=R;const _=d,u=S+258;let h=c[a+r-1],b=c[a+r];P>C||(i>>=2),l>I&&(l=I);do{if(t=e,c[t+r]==b&&c[t+r-1]==h&&c[t]==c[a]&&c[++t]==c[a+1]){a+=2,t++;do{}while(c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&u>a);if(n=258-(u-a),a=u-258,n>r){if(z=e,r=n,n>=l)break;h=c[a+r-1],b=c[a+r]}}}while((e=65535&f[e&_])>s&&0!=--i);return r>I?I:r}e.depth=[],e.bl_count=[],e.heap=[],H=[],B=[],K=[],e.pqdownheap=(t,n)=>{const i=e.heap,a=i[n];let r=n<<1;for(;r<=e.heap_len&&(r<e.heap_len&&je(t,i[r+1],i[r],e.depth)&&r++,!je(t,a,i[r],e.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},e.deflateInit=(t,v,z,M,N,G)=>(M||(M=8),N||(N=8),G||(G=0),t.msg=null,-1==v&&(v=6),1>N||N>9||8!=M||9>z||z>15||0>v||v>9||0>G||G>2?Pe:(t.dstate=e,_=z,o=1<<_,d=o-1,x=N+7,w=1<<x,p=w-1,g=i.floor((x+3-1)/3),c=new r(2*o),f=[],h=[],W=1<<N+6,e.pending_buf=new r(4*W),a=4*W,e.dist_buf=new s(W),e.lc_buf=new r(W),q=v,A=G,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=Le,l=0,V.dyn_tree=H,V.stat_desc=Ve.static_l_desc,T.dyn_tree=B,T.stat_desc=Ve.static_d_desc,U.dyn_tree=K,U.stat_desc=Ve.static_bl_desc,F=0,O=0,L=8,j(),(()=>{u=2*o,h[w-1]=0;for(let e=0;w-1>e;e++)h[e]=0;D=Me[q].max_lazy,P=Me[q].good_length,R=Me[q].nice_length,E=Me[q].max_chain,S=0,m=0,I=0,y=C=2,k=0,b=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=Le&&n!=Fe?Pe:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,f=null,c=null,e.dstate=null,n==Le?-3:0),e.deflateParams=(e,t,n)=>{let i=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Pe:(Me[q].func!=Me[t].func&&0!==e.total_in&&(i=e.deflate(1)),q!=t&&(q=t,D=Me[q].max_lazy,P=Me[q].good_length,R=Me[q].nice_length,E=Me[q].max_chain),A=n,i)},e.deflateSetDictionary=(e,t,i)=>{let a,r=i,s=0;if(!t||42!=n)return Pe;if(3>r)return 0;for(r>o-Oe&&(r=o-Oe,s=i-r),c.set(t.subarray(s,s+r),0),S=r,m=r,b=255&c[0],b=(b<<g^255&c[1])&p,a=0;r-3>=a;a++)b=(b<<g^255&c[a+2])&p,f[a&d]=h[b],h[b]=a;return 0},e.deflate=(i,r)=>{let s,u,x,E,P;if(r>4||0>r)return Pe;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==Fe&&4!=r)return i.msg=Ne[4],Pe;if(0===i.avail_out)return i.msg=Ne[7],-5;var R;if(t=i,E=l,l=r,42==n&&(u=8+(_-8<<4)<<8,x=(q-1&255)>>1,x>3&&(x=3),u|=x<<6,0!==S&&(u|=32),u+=31-u%31,n=Le,X((R=u)>>8&255),X(255&R)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return l=-1,0}else if(0===t.avail_in&&E>=r&&4!=r)return t.msg=Ne[7],-5;if(n==Fe&&0!==t.avail_in)return i.msg=Ne[7],-5;if(0!==t.avail_in||0!==I||0!=r&&n!=Fe){switch(P=-1,Me[q].func){case 0:P=(e=>{let n,i=65535;for(i>a-5&&(i=a-5);;){if(1>=I){if(re(),0===I&&0==e)return 0;if(0===I)break}if(S+=I,I=0,n=m+i,(0===S||S>=n)&&(I=S-n,S=n,ae(!1),0===t.avail_out))return 0;if(S-m>=o-Oe&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r);break;case 1:P=(e=>{let n,i=0;for(;;){if(Oe>I){if(re(),Oe>I&&0==e)return 0;if(0===I)break}if(3>I||(b=(b<<g^255&c[S+2])&p,i=65535&h[b],f[S&d]=h[b],h[b]=S),0===i||(S-i&65535)>o-Oe||2!=A&&(y=se(i)),3>y)n=ee(0,255&c[S]),I--,S++;else if(n=ee(S-z,y-3),I-=y,y>D||3>I)S+=y,y=0,b=255&c[S],b=(b<<g^255&c[S+1])&p;else{y--;do{S++,b=(b<<g^255&c[S+2])&p,i=65535&h[b],f[S&d]=h[b],h[b]=S}while(0!=--y);S++}if(n&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r);break;case 2:P=(e=>{let n,i,a=0;for(;;){if(Oe>I){if(re(),Oe>I&&0==e)return 0;if(0===I)break}if(3>I||(b=(b<<g^255&c[S+2])&p,a=65535&h[b],f[S&d]=h[b],h[b]=S),C=y,v=z,y=2,0!==a&&D>C&&o-Oe>=(S-a&65535)&&(2!=A&&(y=se(a)),5>=y&&(1==A||3==y&&S-z>4096)&&(y=2)),3>C||y>C)if(0!==k){if(n=ee(0,255&c[S-1]),n&&ae(!1),S++,I--,0===t.avail_out)return 0}else k=1,S++,I--;else{i=S+I-3,n=ee(S-1-v,C-3),I-=C-1,C-=2;do{++S>i||(b=(b<<g^255&c[S+2])&p,a=65535&h[b],f[S&d]=h[b],h[b]=S)}while(0!=--C);if(k=0,y=2,S++,n&&(ae(!1),0===t.avail_out))return 0}}return 0!==k&&(n=ee(0,255&c[S-1]),k=0),ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r)}if(2!=P&&3!=P||(n=Fe),0==P||2==P)return 0===t.avail_out&&(l=-1),0;if(1==P){if(1==r)Q(2,3),Y(256,Ve.static_ltree),$(),9>1+L+10-O&&(Q(2,3),Y(256,Ve.static_ltree),$()),L=7;else if(ie(0,0,!1),3==r)for(s=0;w>s;s++)h[s]=0;if(t.flush_pending(),0===t.avail_out)return l=-1,0}}return 4!=r?0:1}}function Xe(){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}function Je(e){const t=new Xe,n=(s=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(s/16383)+1);var s;const l=new r(n);let o=e?e.level:-1;void 0===o&&(o=-1),t.deflateInit(o),t.next_out=l,this.append=(e,i)=>{let s,o,_=0,d=0,c=0;const u=[];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 a("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?u.push(new r(l)):u.push(l.subarray(0,t.next_out_index))),c+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=_&&(i(t.next_in_index),_=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(o=new r(c),u.forEach((e=>{o.set(e,d),d+=e.length}))):o=u[0]?new r(u[0]):new r,o}},this.flush=()=>{let e,i,s=0,o=0;const _=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new a("deflating: "+t.msg);n-t.avail_out>0&&_.push(l.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new r(o),_.forEach((e=>{i.set(e,s),s+=e.length})),i}}Xe.prototype={deflateInit(e,t){const n=this;return n.dstate=new Ge,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):Pe},deflateEnd(){const e=this;if(!e.dstate)return Pe;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):Pe},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):Pe},read_buf(e,t,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),t),i.next_in_index+=a,i.total_in+=a,a)},flush_pending(){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 Qe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],it=[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],at=[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],rt=[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 st(){let e,t,n,i,a,r;function s(e,t,s,l,o,_,d,c,u,f,h){let b,w,x,p,g,m,y,v,k,S,z,I,C,E,D;S=0,g=s;do{n[e[t+S]]++,S++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(v=c[0],m=1;15>=m&&0===n[m];m++);for(y=m,m>v&&(v=m),g=15;0!==g&&0===n[g];g--);for(x=g,v>g&&(v=g),c[0]=v,E=1<<m;g>m;m++,E<<=1)if(0>(E-=n[m]))return Ye;if(0>(E-=n[g]))return Ye;for(n[g]+=E,r[1]=m=0,S=1,C=2;0!=--g;)r[C]=m+=n[S],C++,S++;g=0,S=0;do{0!==(m=e[t+S])&&(h[r[m]++]=g),S++}while(++g<s);for(s=r[x],r[0]=g=0,S=0,p=-1,I=-v,a[0]=0,z=0,D=0;x>=y;y++)for(b=n[y];0!=b--;){for(;y>I+v;){if(p++,I+=v,D=x-I,D=D>v?v:D,(w=1<<(m=y-I))>b+1&&(w-=b+1,C=y,D>m))for(;++m<D&&(w<<=1)>n[++C];)w-=n[C];if(D=1<<m,f[0]+D>1440)return Ye;a[p]=z=f[0],f[0]+=D,0!==p?(r[p]=g,i[0]=m,i[1]=v,m=g>>>I-v,i[2]=z-a[p-1]-m,u.set(i,3*(a[p-1]+m))):d[0]=z}for(i[1]=y-I,s>S?h[S]<l?(i[0]=256>h[S]?0:96,i[2]=h[S++]):(i[0]=_[h[S]-l]+16+64,i[2]=o[h[S++]-l]):i[0]=192,w=1<<y-I,m=g>>>I;D>m;m+=w)u.set(i,3*(z+m));for(m=1<<y-1;0!=(g&m);m>>>=1)g^=m;for(g^=m,k=(1<<I)-1;(g&k)!=r[p];)p--,I-=v,k=(1<<I)-1}return 0!==E&&1!=x?Ze:0}function l(s){let l;for(e||(e=[],t=[],n=new o(16),i=[],a=new o(15),r=new o(16)),t.length<s&&(t=[]),l=0;s>l;l++)t[l]=0;for(l=0;16>l;l++)n[l]=0;for(l=0;3>l;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,a,r,o)=>{let _;return l(19),e[0]=0,_=s(n,0,19,19,null,null,a,i,r,e,t),_==Ye?o.msg="oversubscribed dynamic bit lengths tree":_!=Ze&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=Ye),_},this.inflate_trees_dynamic=(n,i,a,r,o,_,d,c,u)=>{let f;return l(288),e[0]=0,f=s(a,0,n,257,nt,it,_,r,c,e,t),0!=f||0===r[0]?(f==Ye?u.msg="oversubscribed literal/length tree":-4!=f&&(u.msg="incomplete literal/length tree",f=Ye),f):(l(288),f=s(a,n,i,0,at,rt,d,o,c,e,t),0!=f||0===o[0]&&n>257?(f==Ye?u.msg="oversubscribed distance tree":f==Ze?(u.msg="incomplete distance tree",f=Ye):-4!=f&&(u.msg="empty distance tree with lengths",f=Ye),f):0)}}function lt(){const e=this;let t,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,c=0,u=0,f=0,h=0;function b(e,t,n,i,a,r,s,l){let o,_,d,c,u,f,h,b,w,x,p,g,m,y,v,k;h=l.next_in_index,b=l.avail_in,u=s.bitb,f=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=$e[e],g=$e[t];do{for(;20>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(o=u&p,_=n,d=i,k=3*(d+o),0!==(c=_[k]))for(;;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15,m=_[k+2]+(u&$e[c]),u>>=c,f-=c;15>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;for(o=u&g,_=a,d=r,k=3*(d+o),c=_[k];;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15;c>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(y=_[k+2]+(u&$e[c]),u>>=c,f-=c,x-=m,y>w){v=w-y;do{v+=s.end}while(0>v);if(c=s.end-v,m>c){if(m-=c,w-v>0&&c>w-v)do{s.win[w++]=s.win[v++]}while(0!=--c);else s.win.set(s.win.subarray(v,v+c),w),w+=c,v+=c,c=0;v=0}}else v=w-y,w-v>0&&2>w-v?(s.win[w++]=s.win[v++],s.win[w++]=s.win[v++],m-=2):(s.win.set(s.win.subarray(v,v+2),w),w+=2,v+=2,m-=2);if(w-v>0&&m>w-v)do{s.win[w++]=s.win[v++]}while(0!=--m);else s.win.set(s.win.subarray(v,v+m),w),w+=m,v+=m,m=0;break}if(0!=(64&c))return l.msg="invalid distance code",m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,Ye;o+=_[k+2],o+=u&$e[c],k=3*(d+o),c=_[k]}break}if(0!=(64&c))return 0!=(32&c)?(m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,1):(l.msg="invalid literal/length code",m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,Ye);if(o+=_[k+2],o+=u&$e[c],k=3*(d+o),0===(c=_[k])){u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],x--;break}}else u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],x--}while(x>=258&&b>=10);return m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}e.init=(e,r,s,l,o,_)=>{t=0,c=e,u=r,i=s,f=l,a=o,h=_,n=null},e.proc=(e,w,x)=>{let p,g,m,y,v,k,S,z=0,I=0,C=0;for(C=w.next_in_index,y=w.avail_in,z=e.bitb,I=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v;;)switch(t){case 0:if(k>=258&&y>=10&&(e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,x=b(c,u,i,f,a,h,e,w),C=w.next_in_index,y=w.avail_in,z=e.bitb,I=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v,0!=x)){t=1==x?7:9;break}l=c,n=i,s=f,t=1;case 1:for(p=l;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}if(g=3*(s+(z&$e[p])),z>>>=n[g+1],I-=n[g+1],m=n[g],0===m){o=n[g+2],t=6;break}if(0!=(16&m)){_=15&m,r=n[g+2],t=2;break}if(0==(64&m)){l=m,s=g/3+n[g+2];break}if(0!=(32&m)){t=7;break}return t=9,w.msg="invalid literal/length code",x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 2:for(p=_;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}r+=z&$e[p],z>>=p,I-=p,l=u,n=a,s=h,t=3;case 3:for(p=l;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}if(g=3*(s+(z&$e[p])),z>>=n[g+1],I-=n[g+1],m=n[g],0!=(16&m)){_=15&m,d=n[g+2],t=4;break}if(0==(64&m)){l=m,s=g/3+n[g+2];break}return t=9,w.msg="invalid distance code",x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 4:for(p=_;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}d+=z&$e[p],z>>=p,I-=p,t=5;case 5:for(S=v-d;0>S;)S+=e.end;for(;0!==r;){if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);e.win[v++]=e.win[S++],k--,S==e.end&&(S=0),r--}t=0;break;case 6:if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,e.win[v++]=o,k--,t=0;break;case 7:if(I>7&&(I-=8,y++,C--),e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,e.read!=e.write)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);t=8;case 8:return x=1,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 9:return x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);default:return x=Qe,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x)}},e.free=()=>{}}st.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=et,i[0]=tt,0);const ot=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function _t(e,t){const n=this;let i,a=0,s=0,l=0,_=0;const d=[0],c=[0],u=new lt;let f=0,h=new o(4320);const b=new st;n.bitk=0,n.bitb=0,n.win=new r(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==a&&u.free(e),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,a,r;return a=e.next_out_index,r=n.read,i=(r>n.write?n.end:n.write)-r,i>e.avail_out&&(i=e.avail_out),0!==i&&t==Ze&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.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>e.avail_out&&(i=e.avail_out),0!==i&&t==Ze&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(r,r+i),a),a+=i,r+=i),e.next_out_index=a,n.read=r,t},n.proc=(e,t)=>{let r,o,w,x,p,g,m,y;for(x=e.next_in_index,p=e.avail_in,o=n.bitb,w=n.bitk,g=n.write,m=g<n.read?n.read-g-1:n.end-g;;){let v,k,S,z,I,C,E,D;switch(a){case 0:for(;3>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}switch(r=7&o,f=1&r,r>>>1){case 0:o>>>=3,w-=3,r=7&w,o>>>=r,w-=r,a=1;break;case 1:v=[],k=[],S=[[]],z=[[]],st.inflate_trees_fixed(v,k,S,z),u.init(v[0],k[0],S[0],0,z[0],0),o>>>=3,w-=3,a=6;break;case 2:o>>>=3,w-=3,a=3;break;case 3:return o>>>=3,w-=3,a=9,e.msg="invalid block type",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t)}break;case 1:for(;32>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if((~o>>>16&65535)!=(65535&o))return a=9,e.msg="invalid stored block lengths",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);s=65535&o,o=w=0,a=0!==s?2:0!==f?7:0;break;case 2:if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(0===m&&(g==n.end&&0!==n.read&&(g=0,m=g<n.read?n.read-g-1:n.end-g),0===m&&(n.write=g,t=n.inflate_flush(e,t),g=n.write,m=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,m=g<n.read?n.read-g-1:n.end-g),0===m)))return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(t=0,r=s,r>p&&(r=p),r>m&&(r=m),n.win.set(e.read_buf(x,r),g),x+=r,p-=r,g+=r,m-=r,0!=(s-=r))break;a=0!==f?7:0;break;case 3:for(;14>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(l=r=16383&o,(31&r)>29||(r>>5&31)>29)return a=9,e.msg="too many length or distance symbols",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(r=258+(31&r)+(r>>5&31),!i||i.length<r)i=[];else for(y=0;r>y;y++)i[y]=0;o>>>=14,w-=14,_=0,a=4;case 4:for(;4+(l>>>10)>_;){for(;3>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}i[ot[_++]]=7&o,o>>>=3,w-=3}for(;19>_;)i[ot[_++]]=0;if(d[0]=7,r=b.inflate_trees_bits(i,d,c,h,e),0!=r)return(t=r)==Ye&&(i=null,a=9),n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);_=0,a=5;case 5:for(;r=l,258+(31&r)+(r>>5&31)>_;){let s,u;for(r=d[0];r>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(r=h[3*(c[0]+(o&$e[r]))+1],u=h[3*(c[0]+(o&$e[r]))+2],16>u)o>>>=r,w-=r,i[_++]=u;else{for(y=18==u?7:u-14,s=18==u?11:3;r+y>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(o>>>=r,w-=r,s+=o&$e[y],o>>>=y,w-=y,y=_,r=l,y+s>258+(31&r)+(r>>5&31)||16==u&&1>y)return i=null,a=9,e.msg="invalid bit length repeat",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);u=16==u?i[y-1]:0;do{i[y++]=u}while(0!=--s);_=y}}if(c[0]=-1,I=[],C=[],E=[],D=[],I[0]=9,C[0]=6,r=l,r=b.inflate_trees_dynamic(257+(31&r),1+(r>>5&31),i,I,C,E,D,h,e),0!=r)return r==Ye&&(i=null,a=9),t=r,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);u.init(I[0],C[0],h,E[0],h,D[0]),a=6;case 6:if(n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),x=e.next_in_index,p=e.avail_in,o=n.bitb,w=n.bitk,g=n.write,m=g<n.read?n.read-g-1:n.end-g,0===f){a=0;break}a=7;case 7:if(n.write=g,t=n.inflate_flush(e,t),g=n.write,m=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);a=8;case 8:return t=1,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);case 9:return t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);default:return t=Qe,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t)}}},n.free=e=>{n.reset(e,null),n.win=null,h=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==a?1:0}const dt=13,ct=[0,0,255,255];function ut(){const e=this;function t(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):Qe}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),Qe):(e.wbits=i,n.istate.blocks=new _t(n,1<<i),t(n),0)),e.inflate=(e,t)=>{let n,i;if(!e||!e.istate||!e.next_in)return Qe;const a=e.istate;for(t=4==t?Ze:0,n=Ze;;)switch(a.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(a.method=e.read_byte(e.next_in_index++)))){a.mode=dt,e.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=dt,e.msg="invalid win size",a.marker=5;break}a.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=dt,e.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,a.need+=255&e.read_byte(e.next_in_index++),a.mode=6,2);case 6:return a.mode=dt,e.msg="need dictionary",a.marker=0,Qe;case 7:if(n=a.blocks.proc(e,n),n==Ye){a.mode=dt,a.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,a.blocks.reset(e,a.was),a.mode=12;case 12:return e.avail_in=0,1;case dt:return Ye;default:return Qe}},e.inflateSetDictionary=(e,t,n)=>{let i=0,a=n;if(!e||!e.istate||6!=e.istate.mode)return Qe;const r=e.istate;return a<1<<r.wbits||(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(t,i,a),r.mode=7,0},e.inflateSync=e=>{let n,i,a,r,s;if(!e||!e.istate)return Qe;const l=e.istate;if(l.mode!=dt&&(l.mode=dt,l.marker=0),0===(n=e.avail_in))return Ze;for(i=e.next_in_index,a=l.marker;0!==n&&4>a;)e.read_byte(i)==ct[a]?a++:a=0!==e.read_byte(i)?0:4-a,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,l.marker=a,4!=a?Ye:(r=e.total_in,s=e.total_out,t(e),e.total_in=r,e.total_out=s,l.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():Qe}function ft(){}function ht(e){const t=new ft,n=e&&e.chunkSize?i.floor(2*e.chunkSize):131072,s=new r(n);let l=!1;t.inflateInit(),t.next_out=s,this.append=(e,i)=>{const o=[];let _,d,c=0,u=0,f=0;if(0!==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,0!==t.avail_in||l||(t.next_in_index=0,l=!0),_=t.inflate(0),l&&_===Ze){if(0!==t.avail_in)throw new a("inflating: bad input")}else if(0!==_&&1!==_)throw new a("inflating: "+t.msg);if((l||1===_)&&t.avail_in===e.length)throw new a("inflating: bad input");t.next_out_index&&(t.next_out_index===n?o.push(new r(s)):o.push(s.subarray(0,t.next_out_index))),f+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=c&&(i(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(d=new r(f),o.forEach((e=>{d.set(e,u),u+=e.length}))):d=o[0]?new r(o[0]):new r,d}},this.flush=()=>{t.inflateEnd()}}ft.prototype={inflateInit(e){const t=this;return t.istate=new ut,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):Qe},inflateEnd(){const e=this;if(!e.istate)return Qe;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Qe},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):Qe},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Je,self.Inflate=ht}}(); | ||
!function(){"use strict";const{Array:e,Object:t,Number:n,Math:i,Error:a,Uint8Array:r,Uint16Array:s,Uint32Array:l,Int32Array:o,Map:_,DataView:d,Promise:c,TextEncoder:u,crypto:f,postMessage:h,TransformStream:b,ReadableStream:w,WritableStream:x,CompressionStream:p,DecompressionStream:g}=self;class m{constructor(e){return class extends b{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}const y=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;y[e]=t}class v{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^y[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends b{constructor(){let e;const t=new v;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new r(4);new d(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const S={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=S.getPartial(n);return 32===i?e.concat(t):S._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)+S.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=S.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=>i.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 a=0;a<e.length;a++)i.push(n|e[a]>>>t),n=e[a]<<32-t;const a=e.length?e[e.length-1]:0,r=S.getPartial(a);return i.push(S.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},z={bytes:{fromBits(e){const t=S.bitLength(e)/8,n=new r(t);let i;for(let a=0;t>a;a++)0==(3&a)&&(i=e[a/4]),n[a]=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(S.partial(8*(3&n),i)),t}}},I=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=z.utf8String.toBits(e));const n=t._buffer=S.concat(t._buffer,e),i=t._length,r=t._length=i+S.bitLength(e);if(r>9007199254740991)throw new a("Cannot hash more than 2^53 - 1 bits");const s=new l(n);let o=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(s.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=S.concat(t,[S.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,a=n._h,r=e(80);for(let e=0;16>e;e++)r[e]=t[e];let s=a[0],l=a[1],o=a[2],_=a[3],d=a[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,l,o,_)+d+r[e]+n._key[i.floor(e/20)]|0;d=_,_=o,o=n._S(30,l),l=s,s=t}a[0]=a[0]+s|0,a[1]=a[1]+l|0,a[2]=a[2]+o|0,a[3]=a[3]+_|0,a[4]=a[4]+d|0}},C={getRandomValues(e){const t=new l(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let a,r=0;r<e.length;r+=4){const e=n(4294967296*(a||i.random()));a=987654071*e(),t[r/4]=4294967296*e()|0}return e}},E={importKey:e=>new E.hmacSha1(z.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new a("invalid params to pbkdf2");const r=1+(i>>5)<<2;let s,l,o,_,c;const u=new ArrayBuffer(r),f=new d(u);let h=0;const b=S;for(t=z.bytes.toBits(t),c=1;(r||1)>h;c++){for(s=l=e.encrypt(b.concat(t,[c])),o=1;n>o;o++)for(l=e.encrypt(l),_=0;_<l.length;_++)s[_]^=l[_];for(o=0;(r||1)>h&&o<s.length;o++)f.setInt32(h,s[o]),h+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=I,i=[[],[]];t._baseHash=[new n,new n];const a=t._baseHash[0].blockSize/32;e.length>a&&(e=(new n).update(e).finalize());for(let t=0;a>t;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}encrypt(e){if(this._updated)throw new a("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==f&&"function"==typeof f.getRandomValues,q="Invalid password",A="Invalid signature",P="zipjs-abort-check-password";function R(e){return D?f.getRandomValues(e):C.getRandomValues(e)}const H=16,B={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},B),V=t.assign({iterations:1e3,hash:{name:"SHA-1"}},B),T=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],L="undefined",F="function",O=typeof f!=L,j=O&&f.subtle,G=O&&typeof j!=L,X=z.bytes,J=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 s,l,o,_=1;if(4!==r&&6!==r&&8!==r)throw new a("invalid aes key size");for(t._key=[l=e.slice(0),o=[]],s=r;4*r+28>s;s++){let e=l[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^_<<24,_=_<<1^283*(_>>7))),l[s]=l[s-r]^e}for(let e=0;s;e++,s--){const t=l[3&e?s:s-4];o[e]=4>=s||4>e?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],a=[],r=[];let s,l,o,_;for(let e=0;256>e;e++)r[(a[e]=e<<1^283*(e>>7))^e]=e;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 c=16843009*_^65537*o^257*l^16843008*d,u=257*a[r]^16843008*r;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][r]=c=c<<24^c>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new a("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],s=this._tables[t],l=s[0],o=s[1],_=s[2],d=s[3],c=s[4];let u,f,h,b=e[0]^n[0],w=e[t?3:1]^n[1],x=e[2]^n[2],p=e[t?1:3]^n[3],g=4;for(let e=0;i>e;e++)u=l[b>>>24]^o[w>>16&255]^_[x>>8&255]^d[255&p]^n[g],f=l[w>>>24]^o[x>>16&255]^_[p>>8&255]^d[255&b]^n[g+1],h=l[x>>>24]^o[p>>16&255]^_[b>>8&255]^d[255&w]^n[g+2],p=l[p>>>24]^o[b>>16&255]^_[w>>8&255]^d[255&x]^n[g+3],g+=4,b=u,w=f,x=h;for(let e=0;4>e;e++)r[t?3&-e:e]=c[b>>>24]<<24^c[w>>16&255]<<16^c[x>>8&255]<<8^c[255&p]^n[g++],u=b,b=w,w=x,x=p,p=u;return r}},Q=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 a=S.bitLength(t);for(let a=0;i>a;a+=4){this.incCounter(n);const i=e.encrypt(n);t[a]^=i[0],t[a+1]^=i[1],t[a+2]^=i[2],t[a+3]^=i[3]}return S.clamp(t,a)}},Y=E.hmacSha1;let Z=O&&G&&typeof j.importKey==F,$=O&&G&&typeof j.deriveBits==F;class ee extends b{constructor({password:e,signed:n,encryptionStrength:i,checkPasswordOnly:s}){super({start(){t.assign(this,{ready:new c((e=>this.resolveReady=e)),password:e,signed:n,strength:i-1,pending:new r})},async transform(e,t){const n=this,{password:i,strength:l,resolveReady:o,ready:_}=n;i?(await(async(e,t,n,i)=>{const r=await ie(e,t,n,re(i,0,U[t])),s=re(i,U[t]);if(r[0]!=s[0]||r[1]!=s[1])throw new a(q)})(n,l,i,re(e,0,U[l]+2)),e=re(e,U[l]+2),s?t.error(new a(P)):o()):await _;const d=new r(e.length-M-(e.length-M)%H);t.enqueue(ne(n,e,d,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:s,ready:l}=this;await l;const o=re(s,0,s.length-M),_=re(s,s.length-M);let d=new r;if(o.length){const e=le(X,o);i.update(e);const t=n.update(e);d=se(X,t)}if(t){const e=re(se(X,i.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=_[t])throw new a(A)}e.enqueue(d)}})}}class te extends b{constructor({password:e,encryptionStrength:n}){let i;super({start(){t.assign(this,{ready:new c((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new r})},async transform(e,t){const n=this,{password:i,strength:a,resolveReady:s,ready:l}=n;let o=new r;i?(o=await(async(e,t,n)=>{const i=R(new r(U[t]));return ae(i,await ie(e,t,n,i))})(n,a,i),s()):await l;const _=new r(o.length+e.length-e.length%H);_.set(o,0),t.enqueue(ne(n,e,_,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:a,ready:s}=this;await s;let l=new r;if(a.length){const e=t.update(le(X,a));n.update(e),l=se(X,e)}i.signature=se(X,n.digest()).slice(0,M),e.enqueue(ae(l,i.signature))}}),i=this}}function ne(e,t,n,i,a,s){const{ctr:l,hmac:o,pending:_}=e,d=t.length-a;let c;for(_.length&&(t=ae(_,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,d-d%H)),c=0;d-H>=c;c+=H){const e=le(X,re(t,c,c+H));s&&o.update(e);const a=l.update(e);s||o.update(a),n.set(se(X,a),c+i)}return e.pending=re(t,c),n}async function ie(n,i,a,s){n.password=null;const l=(e=>{if(void 0===u){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new u).encode(e)})(a),o=await(async(e,t,n,i,a)=>{if(!Z)return E.importKey(t);try{return await j.importKey("raw",t,n,!1,a)}catch(e){return Z=!1,E.importKey(t)}})(0,l,K,0,T),_=await(async(e,t,n)=>{if(!$)return E.pbkdf2(t,e.salt,V.iterations,n);try{return await j.deriveBits(e,t,n)}catch(i){return $=!1,E.pbkdf2(t,e.salt,V.iterations,n)}})(t.assign({salt:s},V),o,8*(2*W[i]+2)),d=new r(_),c=le(X,re(d,0,W[i])),f=le(X,re(d,W[i],2*W[i])),h=re(d,2*W[i]);return t.assign(n,{keys:{key:c,authentication:f,passwordVerification:h},ctr:new Q(new J(c),e.from(N)),hmac:new Y(f)}),h}function ae(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function re(e,t,n){return e.subarray(t,n)}function se(e,t){return e.fromBits(t)}function le(e,t){return e.toBits(t)}class oe extends b{constructor({password:e,passwordVerification:n,checkPasswordOnly:i}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;if(n.password){const t=de(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new a(q);e=e.subarray(12)}i?t.error(new a(P)):t.enqueue(de(n,e))}})}}class _e extends b{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;let i,a;if(n.password){n.password=null;const t=R(new r(12));t[11]=n.passwordVerification,i=new r(e.length+t.length),i.set(ce(n,t),0),a=12}else i=new r(e.length),a=0;i.set(ce(n,e),a),t.enqueue(i)}})}}function de(e,t){const n=new r(t.length);for(let i=0;i<t.length;i++)n[i]=he(e)^t[i],fe(e,n[i]);return n}function ce(e,t){const n=new r(t.length);for(let i=0;i<t.length;i++)n[i]=he(e)^t[i],fe(e,t[i]);return n}function ue(e,n){const i=[305419896,591751049,878082192];t.assign(e,{keys:i,crcKey0:new v(i[0]),crcKey2:new v(i[2])});for(let t=0;t<n.length;t++)fe(e,n.charCodeAt(t))}function fe(e,t){let[n,a,r]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),a=we(i.imul(we(a+be(n)),134775813)+1),e.crcKey2.append([a>>>24]),r=~e.crcKey2.get(),e.keys=[n,a,r]}function he(e){const t=2|e.keys[2];return be(i.imul(t,1^t)>>>8)}function be(e){return 255&e}function we(e){return 4294967295&e}const xe="deflate-raw";class pe extends b{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:a,encrypted:r,useCompressionStream:s,zipCrypto:l,signed:o,level:_}=e,c=this;let u,f,h=me(super.readable);r&&!l||!o||(u=new k,h=ke(h,u)),a&&(h=ve(h,s,{level:_,chunkSize:t},i,n)),r&&(l?h=ke(h,new _e(e)):(f=new te(e),h=ke(h,f))),ye(c,h,(()=>{let e;r&&!l&&(e=f.signature),r&&!l||!o||(e=new d(u.value.buffer).getUint32(0)),c.signature=e}))}}class ge extends b{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:s,signed:l,signature:o,compressed:_,useCompressionStream:c}=e;let u,f,h=me(super.readable);s&&(r?h=ke(h,new oe(e)):(f=new ee(e),h=ke(h,f))),_&&(h=ve(h,c,{chunkSize:t},i,n)),s&&!r||!l||(u=new k,h=ke(h,u)),ye(this,h,(()=>{if((!s||r)&&l){const e=new d(u.value.buffer);if(o!=e.getUint32(0,!1))throw new a(A)}}))}}function me(e){return ke(e,new b({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ye(e,n,i){n=ke(n,new b({flush:i})),t.defineProperty(e,"readable",{get:()=>n})}function ve(e,t,n,i,a){try{e=ke(e,new(t&&i?i:a)(xe,n))}catch(i){if(!t)throw i;e=ke(e,new a(xe,n))}return e}function ke(e,t){return e.pipeThrough(t)}const Se="data";class ze extends b{constructor(e,n){super({});const i=this,{codecType:a}=e;let r;a.startsWith("deflate")?r=pe:a.startsWith("inflate")&&(r=ge);let s=0;const l=new r(e,n),o=super.readable,_=new b({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;t.assign(i,{signature:e,size:s})}});t.defineProperty(i,"readable",{get:()=>o.pipeThrough(l).pipeThrough(_)})}}const Ie=new _,Ce=new _;let Ee=0;async function De(e){try{const{options:t,scripts:i,config:a}=e;i&&i.length&&importScripts.apply(void 0,i),self.initCodec&&self.initCodec(),a.CompressionStreamNative=self.CompressionStream,a.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(a.CompressionStream=new m(self.Deflate)),self.Inflate&&(a.DecompressionStream=new m(self.Inflate));const r={highWaterMark:1,size:()=>a.chunkSize},s=e.readable||new w({async pull(e){const t=new c((e=>Ie.set(Ee,e)));qe({type:"pull",messageId:Ee}),Ee=(Ee+1)%n.MAX_SAFE_INTEGER;const{value:i,done:a}=await t;e.enqueue(i),a&&e.close()}},r),l=e.writable||new x({async write(e){let t;const i=new c((e=>t=e));Ce.set(Ee,t),qe({type:Se,value:e,messageId:Ee}),Ee=(Ee+1)%n.MAX_SAFE_INTEGER,await i}},r),o=new ze(t,a);await s.pipeThrough(o).pipeTo(l,{preventClose:!0,preventAbort:!0});try{await l.getWriter().close()}catch(e){}const{signature:_,size:d}=o;qe({type:"close",result:{signature:_,size:d}})}catch(e){Ae(e)}}function qe(e){let{value:t}=e;if(t)if(t.length)try{t=new r(t),e.value=t.buffer,h(e,[e.value])}catch(t){h(e)}else h(e);else h(e)}function Ae(e=new a("Unknown error")){const{message:t,stack:n,code:i,name:r}=e;h({error:{message:t,stack:n,code:i,name:r}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:i,done:a}=e;try{if("start"==t&&De(e),t==Se){const e=Ie.get(n);Ie.delete(n),e({value:new r(i),done:a})}if("ack"==t){const e=Ce.get(n);Ce.delete(n),e()}}catch(e){Ae(e)}}));const Pe=-2;function Re(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Be=[0,1,2,3].concat(...Re([[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 Ke(){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=n=>{const a=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let l,o,_,d=-1;for(n.heap_len=0,n.heap_max=573,l=0;s>l;l++)0!==a[2*l]?(n.heap[++n.heap_len]=d=l,n.depth[l]=0):a[2*l+1]=0;for(;2>n.heap_len;)_=n.heap[++n.heap_len]=2>d?++d:0,a[2*_]=1,n.depth[_]=0,n.opt_len--,r&&(n.static_len-=r[2*_+1]);for(e.max_code=d,l=i.floor(n.heap_len/2);l>=1;l--)n.pqdownheap(a,l);_=s;do{l=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(a,1),o=n.heap[1],n.heap[--n.heap_max]=l,n.heap[--n.heap_max]=o,a[2*_]=a[2*l]+a[2*o],n.depth[_]=i.max(n.depth[l],n.depth[o])+1,a[2*l+1]=a[2*o+1]=_,n.heap[1]=_++,n.pqdownheap(a,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,r=e.stat_desc.extra_base,s=e.stat_desc.max_length;let l,o,_,d,c,u,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;573>l;l++)o=t.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,f++),n[2*o+1]=d,o>e.max_code||(t.bl_count[d]++,c=0,r>o||(c=a[o-r]),u=n[2*o],t.opt_len+=u*(d+c),i&&(t.static_len+=u*(i[2*o+1]+c)));if(0!==f){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(o=t.bl_count[d];0!==o;)_=t.heap[--l],_>e.max_code||(n[2*_+1]!=d&&(t.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}})(n),((e,n,i)=>{const a=[];let r,s,l,o=0;for(r=1;15>=r;r++)a[r]=o=o+i[r-1]<<1;for(s=0;n>=s;s++)l=e[2*s+1],0!==l&&(e[2*s]=t(a[l]++,l))})(a,e.max_code,n.bl_count)}}function Ve(e,t,n,i,a){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=a}Ke._length_code=[0,1,2,3,4,5,6,7].concat(...Re([[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]])),Ke.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],Ke.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],Ke.d_code=e=>256>e?Be[e]:Be[256+(e>>>7)],Ke.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],Ke.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],Ke.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Te=Re([[144,8],[112,9],[24,7],[8,8]]);Ve.static_ltree=He([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Te[t]])));const Ue=Re([[30,5]]);function We(e,t,n,i,a){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=a}Ve.static_dtree=He([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Ue[t]]))),Ve.static_l_desc=new Ve(Ve.static_ltree,Ke.extra_lbits,257,286,15),Ve.static_d_desc=new Ve(Ve.static_dtree,Ke.extra_dbits,0,30,15),Ve.static_bl_desc=new Ve(null,Ke.extra_blbits,0,19,7);const Me=[new We(0,0,0,0,0),new We(4,4,8,4,1),new We(4,5,16,8,1),new We(4,6,32,32,1),new We(4,4,16,16,2),new We(8,16,32,32,2),new We(8,16,128,128,2),new We(8,32,128,256,2),new We(32,128,258,1024,2),new We(32,258,258,4096,2)],Ne=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Le=113,Fe=666,Oe=262;function je(e,t,n,i){const a=e[2*t],r=e[2*n];return r>a||a==r&&i[t]<=i[n]}function Ge(){const e=this;let t,n,a,l,o,_,d,c,u,f,h,b,w,x,p,g,m,y,v,k,S,z,I,C,E,D,q,A,P,R,H,B,K;const V=new Ke,T=new Ke,U=new Ke;let W,M,N,L,F,O;function j(){let t;for(t=0;286>t;t++)H[2*t]=0;for(t=0;30>t;t++)B[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;H[512]=1,e.opt_len=e.static_len=0,M=N=0}function G(e,t){let n,i=-1,a=e[1],r=0,s=7,l=4;0===a&&(s=138,l=3),e[2*(t+1)+1]=65535;for(let o=0;t>=o;o++)n=a,a=e[2*(o+1)+1],++r<s&&n==a||(l>r?K[2*n]+=r:0!==n?(n!=i&&K[2*n]++,K[32]++):r>10?K[36]++:K[34]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function X(t){e.pending_buf[e.pending++]=t}function J(e){X(255&e),X(e>>>8&255)}function Q(e,t){let n;const i=t;O>16-i?(n=e,F|=n<<O&65535,J(F),F=n>>>16-O,O+=i-16):(F|=e<<O&65535,O+=i)}function Y(e,t){const n=2*e;Q(65535&t[n],65535&t[n+1])}function Z(e,t){let n,i,a=-1,r=e[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;t>=n;n++)if(i=r,r=e[2*(n+1)+1],++s>=l||i!=r){if(o>s)do{Y(i,K)}while(0!=--s);else 0!==i?(i!=a&&(Y(i,K),s--),Y(16,K),Q(s-3,2)):s>10?(Y(18,K),Q(s-11,7)):(Y(17,K),Q(s-3,3));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function $(){16==O?(J(F),F=0,O=0):8>O||(X(255&F),F>>>=8,O-=8)}function ee(t,n){let a,r,s;if(e.dist_buf[M]=t,e.lc_buf[M]=255&n,M++,0===t?H[2*n]++:(N++,t--,H[2*(Ke._length_code[n]+256+1)]++,B[2*Ke.d_code(t)]++),0==(8191&M)&&q>2){for(a=8*M,r=S-m,s=0;30>s;s++)a+=B[2*s]*(5+Ke.extra_dbits[s]);if(a>>>=3,N<i.floor(M/2)&&a<i.floor(r/2))return!0}return M==W-1}function te(t,n){let i,a,r,s,l=0;if(0!==M)do{i=e.dist_buf[l],a=e.lc_buf[l],l++,0===i?Y(a,t):(r=Ke._length_code[a],Y(r+256+1,t),s=Ke.extra_lbits[r],0!==s&&(a-=Ke.base_length[r],Q(a,s)),i--,r=Ke.d_code(i),Y(r,n),s=Ke.extra_dbits[r],0!==s&&(i-=Ke.base_dist[r],Q(i,s)))}while(M>l);Y(256,t),L=t[513]}function ne(){O>8?J(F):O>0&&X(255&F),F=0,O=0}function ie(t,n,i){Q(0+(i?1:0),3),((t,n)=>{ne(),L=8,J(n),J(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function ae(n){((t,n,i)=>{let a,r,s=0;q>0?(V.build_tree(e),T.build_tree(e),s=(()=>{let t;for(G(H,V.max_code),G(B,T.max_code),U.build_tree(e),t=18;t>=3&&0===K[2*Ke.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r>a||(a=r)):a=r=n+5,n+4>a||-1==t?r==a?(Q(2+(i?1:0),3),te(Ve.static_ltree,Ve.static_dtree)):(Q(4+(i?1:0),3),((e,t,n)=>{let i;for(Q(e-257,5),Q(t-1,5),Q(n-4,4),i=0;n>i;i++)Q(K[2*Ke.bl_order[i]+1],3);Z(H,e-1),Z(B,t-1)})(V.max_code+1,T.max_code+1,s+1),te(H,B)):ie(t,n,i),j(),i&&ne()})(0>m?-1:m,S-m,n),m=S,t.flush_pending()}function re(){let e,n,i,a;do{if(a=u-I-S,0===a&&0===S&&0===I)a=o;else if(-1==a)a--;else if(S>=o+o-Oe){c.set(c.subarray(o,o+o),0),z-=o,S-=o,m-=o,e=w,i=e;do{n=65535&h[--i],h[i]=o>n?0:n-o}while(0!=--e);e=o,i=e;do{n=65535&f[--i],f[i]=o>n?0:n-o}while(0!=--e);a+=o}if(0===t.avail_in)return;e=t.read_buf(c,S+I,a),I+=e,3>I||(b=255&c[S],b=(b<<g^255&c[S+1])&p)}while(Oe>I&&0!==t.avail_in)}function se(e){let t,n,i=E,a=S,r=C;const s=S>o-Oe?S-(o-Oe):0;let l=R;const _=d,u=S+258;let h=c[a+r-1],b=c[a+r];P>C||(i>>=2),l>I&&(l=I);do{if(t=e,c[t+r]==b&&c[t+r-1]==h&&c[t]==c[a]&&c[++t]==c[a+1]){a+=2,t++;do{}while(c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&u>a);if(n=258-(u-a),a=u-258,n>r){if(z=e,r=n,n>=l)break;h=c[a+r-1],b=c[a+r]}}}while((e=65535&f[e&_])>s&&0!=--i);return r>I?I:r}e.depth=[],e.bl_count=[],e.heap=[],H=[],B=[],K=[],e.pqdownheap=(t,n)=>{const i=e.heap,a=i[n];let r=n<<1;for(;r<=e.heap_len&&(r<e.heap_len&&je(t,i[r+1],i[r],e.depth)&&r++,!je(t,a,i[r],e.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},e.deflateInit=(t,v,z,M,N,G)=>(M||(M=8),N||(N=8),G||(G=0),t.msg=null,-1==v&&(v=6),1>N||N>9||8!=M||9>z||z>15||0>v||v>9||0>G||G>2?Pe:(t.dstate=e,_=z,o=1<<_,d=o-1,x=N+7,w=1<<x,p=w-1,g=i.floor((x+3-1)/3),c=new r(2*o),f=[],h=[],W=1<<N+6,e.pending_buf=new r(4*W),a=4*W,e.dist_buf=new s(W),e.lc_buf=new r(W),q=v,A=G,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=Le,l=0,V.dyn_tree=H,V.stat_desc=Ve.static_l_desc,T.dyn_tree=B,T.stat_desc=Ve.static_d_desc,U.dyn_tree=K,U.stat_desc=Ve.static_bl_desc,F=0,O=0,L=8,j(),(()=>{u=2*o,h[w-1]=0;for(let e=0;w-1>e;e++)h[e]=0;D=Me[q].max_lazy,P=Me[q].good_length,R=Me[q].nice_length,E=Me[q].max_chain,S=0,m=0,I=0,y=C=2,k=0,b=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=Le&&n!=Fe?Pe:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,f=null,c=null,e.dstate=null,n==Le?-3:0),e.deflateParams=(e,t,n)=>{let i=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Pe:(Me[q].func!=Me[t].func&&0!==e.total_in&&(i=e.deflate(1)),q!=t&&(q=t,D=Me[q].max_lazy,P=Me[q].good_length,R=Me[q].nice_length,E=Me[q].max_chain),A=n,i)},e.deflateSetDictionary=(e,t,i)=>{let a,r=i,s=0;if(!t||42!=n)return Pe;if(3>r)return 0;for(r>o-Oe&&(r=o-Oe,s=i-r),c.set(t.subarray(s,s+r),0),S=r,m=r,b=255&c[0],b=(b<<g^255&c[1])&p,a=0;r-3>=a;a++)b=(b<<g^255&c[a+2])&p,f[a&d]=h[b],h[b]=a;return 0},e.deflate=(i,r)=>{let s,u,x,E,P;if(r>4||0>r)return Pe;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==Fe&&4!=r)return i.msg=Ne[4],Pe;if(0===i.avail_out)return i.msg=Ne[7],-5;var R;if(t=i,E=l,l=r,42==n&&(u=8+(_-8<<4)<<8,x=(q-1&255)>>1,x>3&&(x=3),u|=x<<6,0!==S&&(u|=32),u+=31-u%31,n=Le,X((R=u)>>8&255),X(255&R)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return l=-1,0}else if(0===t.avail_in&&E>=r&&4!=r)return t.msg=Ne[7],-5;if(n==Fe&&0!==t.avail_in)return i.msg=Ne[7],-5;if(0!==t.avail_in||0!==I||0!=r&&n!=Fe){switch(P=-1,Me[q].func){case 0:P=(e=>{let n,i=65535;for(i>a-5&&(i=a-5);;){if(1>=I){if(re(),0===I&&0==e)return 0;if(0===I)break}if(S+=I,I=0,n=m+i,(0===S||S>=n)&&(I=S-n,S=n,ae(!1),0===t.avail_out))return 0;if(S-m>=o-Oe&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r);break;case 1:P=(e=>{let n,i=0;for(;;){if(Oe>I){if(re(),Oe>I&&0==e)return 0;if(0===I)break}if(3>I||(b=(b<<g^255&c[S+2])&p,i=65535&h[b],f[S&d]=h[b],h[b]=S),0===i||(S-i&65535)>o-Oe||2!=A&&(y=se(i)),3>y)n=ee(0,255&c[S]),I--,S++;else if(n=ee(S-z,y-3),I-=y,y>D||3>I)S+=y,y=0,b=255&c[S],b=(b<<g^255&c[S+1])&p;else{y--;do{S++,b=(b<<g^255&c[S+2])&p,i=65535&h[b],f[S&d]=h[b],h[b]=S}while(0!=--y);S++}if(n&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r);break;case 2:P=(e=>{let n,i,a=0;for(;;){if(Oe>I){if(re(),Oe>I&&0==e)return 0;if(0===I)break}if(3>I||(b=(b<<g^255&c[S+2])&p,a=65535&h[b],f[S&d]=h[b],h[b]=S),C=y,v=z,y=2,0!==a&&D>C&&o-Oe>=(S-a&65535)&&(2!=A&&(y=se(a)),5>=y&&(1==A||3==y&&S-z>4096)&&(y=2)),3>C||y>C)if(0!==k){if(n=ee(0,255&c[S-1]),n&&ae(!1),S++,I--,0===t.avail_out)return 0}else k=1,S++,I--;else{i=S+I-3,n=ee(S-1-v,C-3),I-=C-1,C-=2;do{++S>i||(b=(b<<g^255&c[S+2])&p,a=65535&h[b],f[S&d]=h[b],h[b]=S)}while(0!=--C);if(k=0,y=2,S++,n&&(ae(!1),0===t.avail_out))return 0}}return 0!==k&&(n=ee(0,255&c[S-1]),k=0),ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(r)}if(2!=P&&3!=P||(n=Fe),0==P||2==P)return 0===t.avail_out&&(l=-1),0;if(1==P){if(1==r)Q(2,3),Y(256,Ve.static_ltree),$(),9>1+L+10-O&&(Q(2,3),Y(256,Ve.static_ltree),$()),L=7;else if(ie(0,0,!1),3==r)for(s=0;w>s;s++)h[s]=0;if(t.flush_pending(),0===t.avail_out)return l=-1,0}}return 4!=r?0:1}}function Xe(){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}function Je(e){const t=new Xe,n=(s=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(s/16383)+1);var s;const l=new r(n);let o=e?e.level:-1;void 0===o&&(o=-1),t.deflateInit(o),t.next_out=l,this.append=(e,i)=>{let s,o,_=0,d=0,c=0;const u=[];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 a("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?u.push(new r(l)):u.push(l.subarray(0,t.next_out_index))),c+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=_&&(i(t.next_in_index),_=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(o=new r(c),u.forEach((e=>{o.set(e,d),d+=e.length}))):o=u[0]?new r(u[0]):new r,o}},this.flush=()=>{let e,i,s=0,o=0;const _=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new a("deflating: "+t.msg);n-t.avail_out>0&&_.push(l.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new r(o),_.forEach((e=>{i.set(e,s),s+=e.length})),i}}Xe.prototype={deflateInit(e,t){const n=this;return n.dstate=new Ge,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):Pe},deflateEnd(){const e=this;if(!e.dstate)return Pe;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):Pe},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):Pe},read_buf(e,t,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),t),i.next_in_index+=a,i.total_in+=a,a)},flush_pending(){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 Qe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],it=[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],at=[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],rt=[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 st(){let e,t,n,i,a,r;function s(e,t,s,l,o,_,d,c,u,f,h){let b,w,x,p,g,m,y,v,k,S,z,I,C,E,D;S=0,g=s;do{n[e[t+S]]++,S++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(v=c[0],m=1;15>=m&&0===n[m];m++);for(y=m,m>v&&(v=m),g=15;0!==g&&0===n[g];g--);for(x=g,v>g&&(v=g),c[0]=v,E=1<<m;g>m;m++,E<<=1)if(0>(E-=n[m]))return Ye;if(0>(E-=n[g]))return Ye;for(n[g]+=E,r[1]=m=0,S=1,C=2;0!=--g;)r[C]=m+=n[S],C++,S++;g=0,S=0;do{0!==(m=e[t+S])&&(h[r[m]++]=g),S++}while(++g<s);for(s=r[x],r[0]=g=0,S=0,p=-1,I=-v,a[0]=0,z=0,D=0;x>=y;y++)for(b=n[y];0!=b--;){for(;y>I+v;){if(p++,I+=v,D=x-I,D=D>v?v:D,(w=1<<(m=y-I))>b+1&&(w-=b+1,C=y,D>m))for(;++m<D&&(w<<=1)>n[++C];)w-=n[C];if(D=1<<m,f[0]+D>1440)return Ye;a[p]=z=f[0],f[0]+=D,0!==p?(r[p]=g,i[0]=m,i[1]=v,m=g>>>I-v,i[2]=z-a[p-1]-m,u.set(i,3*(a[p-1]+m))):d[0]=z}for(i[1]=y-I,s>S?h[S]<l?(i[0]=256>h[S]?0:96,i[2]=h[S++]):(i[0]=_[h[S]-l]+16+64,i[2]=o[h[S++]-l]):i[0]=192,w=1<<y-I,m=g>>>I;D>m;m+=w)u.set(i,3*(z+m));for(m=1<<y-1;0!=(g&m);m>>>=1)g^=m;for(g^=m,k=(1<<I)-1;(g&k)!=r[p];)p--,I-=v,k=(1<<I)-1}return 0!==E&&1!=x?Ze:0}function l(s){let l;for(e||(e=[],t=[],n=new o(16),i=[],a=new o(15),r=new o(16)),t.length<s&&(t=[]),l=0;s>l;l++)t[l]=0;for(l=0;16>l;l++)n[l]=0;for(l=0;3>l;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,a,r,o)=>{let _;return l(19),e[0]=0,_=s(n,0,19,19,null,null,a,i,r,e,t),_==Ye?o.msg="oversubscribed dynamic bit lengths tree":_!=Ze&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=Ye),_},this.inflate_trees_dynamic=(n,i,a,r,o,_,d,c,u)=>{let f;return l(288),e[0]=0,f=s(a,0,n,257,nt,it,_,r,c,e,t),0!=f||0===r[0]?(f==Ye?u.msg="oversubscribed literal/length tree":-4!=f&&(u.msg="incomplete literal/length tree",f=Ye),f):(l(288),f=s(a,n,i,0,at,rt,d,o,c,e,t),0!=f||0===o[0]&&n>257?(f==Ye?u.msg="oversubscribed distance tree":f==Ze?(u.msg="incomplete distance tree",f=Ye):-4!=f&&(u.msg="empty distance tree with lengths",f=Ye),f):0)}}function lt(){const e=this;let t,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,c=0,u=0,f=0,h=0;function b(e,t,n,i,a,r,s,l){let o,_,d,c,u,f,h,b,w,x,p,g,m,y,v,k;h=l.next_in_index,b=l.avail_in,u=s.bitb,f=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=$e[e],g=$e[t];do{for(;20>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(o=u&p,_=n,d=i,k=3*(d+o),0!==(c=_[k]))for(;;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15,m=_[k+2]+(u&$e[c]),u>>=c,f-=c;15>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;for(o=u&g,_=a,d=r,k=3*(d+o),c=_[k];;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15;c>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(y=_[k+2]+(u&$e[c]),u>>=c,f-=c,x-=m,y>w){v=w-y;do{v+=s.end}while(0>v);if(c=s.end-v,m>c){if(m-=c,w-v>0&&c>w-v)do{s.win[w++]=s.win[v++]}while(0!=--c);else s.win.set(s.win.subarray(v,v+c),w),w+=c,v+=c,c=0;v=0}}else v=w-y,w-v>0&&2>w-v?(s.win[w++]=s.win[v++],s.win[w++]=s.win[v++],m-=2):(s.win.set(s.win.subarray(v,v+2),w),w+=2,v+=2,m-=2);if(w-v>0&&m>w-v)do{s.win[w++]=s.win[v++]}while(0!=--m);else s.win.set(s.win.subarray(v,v+m),w),w+=m,v+=m,m=0;break}if(0!=(64&c))return l.msg="invalid distance code",m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,Ye;o+=_[k+2],o+=u&$e[c],k=3*(d+o),c=_[k]}break}if(0!=(64&c))return 0!=(32&c)?(m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,1):(l.msg="invalid literal/length code",m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,Ye);if(o+=_[k+2],o+=u&$e[c],k=3*(d+o),0===(c=_[k])){u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],x--;break}}else u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],x--}while(x>=258&&b>=10);return m=l.avail_in-b,m=m>f>>3?f>>3:m,b+=m,h-=m,f-=m<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}e.init=(e,r,s,l,o,_)=>{t=0,c=e,u=r,i=s,f=l,a=o,h=_,n=null},e.proc=(e,w,x)=>{let p,g,m,y,v,k,S,z=0,I=0,C=0;for(C=w.next_in_index,y=w.avail_in,z=e.bitb,I=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v;;)switch(t){case 0:if(k>=258&&y>=10&&(e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,x=b(c,u,i,f,a,h,e,w),C=w.next_in_index,y=w.avail_in,z=e.bitb,I=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v,0!=x)){t=1==x?7:9;break}l=c,n=i,s=f,t=1;case 1:for(p=l;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}if(g=3*(s+(z&$e[p])),z>>>=n[g+1],I-=n[g+1],m=n[g],0===m){o=n[g+2],t=6;break}if(0!=(16&m)){_=15&m,r=n[g+2],t=2;break}if(0==(64&m)){l=m,s=g/3+n[g+2];break}if(0!=(32&m)){t=7;break}return t=9,w.msg="invalid literal/length code",x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 2:for(p=_;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}r+=z&$e[p],z>>=p,I-=p,l=u,n=a,s=h,t=3;case 3:for(p=l;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}if(g=3*(s+(z&$e[p])),z>>=n[g+1],I-=n[g+1],m=n[g],0!=(16&m)){_=15&m,d=n[g+2],t=4;break}if(0==(64&m)){l=m,s=g/3+n[g+2];break}return t=9,w.msg="invalid distance code",x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 4:for(p=_;p>I;){if(0===y)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,y--,z|=(255&w.read_byte(C++))<<I,I+=8}d+=z&$e[p],z>>=p,I-=p,t=5;case 5:for(S=v-d;0>S;)S+=e.end;for(;0!==r;){if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);e.win[v++]=e.win[S++],k--,S==e.end&&(S=0),r--}t=0;break;case 6:if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);x=0,e.win[v++]=o,k--,t=0;break;case 7:if(I>7&&(I-=8,y++,C--),e.write=v,x=e.inflate_flush(w,x),v=e.write,k=v<e.read?e.read-v-1:e.end-v,e.read!=e.write)return e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);t=8;case 8:return x=1,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);case 9:return x=Ye,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x);default:return x=Qe,e.bitb=z,e.bitk=I,w.avail_in=y,w.total_in+=C-w.next_in_index,w.next_in_index=C,e.write=v,e.inflate_flush(w,x)}},e.free=()=>{}}st.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=et,i[0]=tt,0);const ot=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function _t(e,t){const n=this;let i,a=0,s=0,l=0,_=0;const d=[0],c=[0],u=new lt;let f=0,h=new o(4320);const b=new st;n.bitk=0,n.bitb=0,n.win=new r(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==a&&u.free(e),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,a,r;return a=e.next_out_index,r=n.read,i=(r>n.write?n.end:n.write)-r,i>e.avail_out&&(i=e.avail_out),0!==i&&t==Ze&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.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>e.avail_out&&(i=e.avail_out),0!==i&&t==Ze&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(r,r+i),a),a+=i,r+=i),e.next_out_index=a,n.read=r,t},n.proc=(e,t)=>{let r,o,w,x,p,g,m,y;for(x=e.next_in_index,p=e.avail_in,o=n.bitb,w=n.bitk,g=n.write,m=g<n.read?n.read-g-1:n.end-g;;){let v,k,S,z,I,C,E,D;switch(a){case 0:for(;3>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}switch(r=7&o,f=1&r,r>>>1){case 0:o>>>=3,w-=3,r=7&w,o>>>=r,w-=r,a=1;break;case 1:v=[],k=[],S=[[]],z=[[]],st.inflate_trees_fixed(v,k,S,z),u.init(v[0],k[0],S[0],0,z[0],0),o>>>=3,w-=3,a=6;break;case 2:o>>>=3,w-=3,a=3;break;case 3:return o>>>=3,w-=3,a=9,e.msg="invalid block type",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t)}break;case 1:for(;32>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if((~o>>>16&65535)!=(65535&o))return a=9,e.msg="invalid stored block lengths",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);s=65535&o,o=w=0,a=0!==s?2:0!==f?7:0;break;case 2:if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(0===m&&(g==n.end&&0!==n.read&&(g=0,m=g<n.read?n.read-g-1:n.end-g),0===m&&(n.write=g,t=n.inflate_flush(e,t),g=n.write,m=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,m=g<n.read?n.read-g-1:n.end-g),0===m)))return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(t=0,r=s,r>p&&(r=p),r>m&&(r=m),n.win.set(e.read_buf(x,r),g),x+=r,p-=r,g+=r,m-=r,0!=(s-=r))break;a=0!==f?7:0;break;case 3:for(;14>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(l=r=16383&o,(31&r)>29||(r>>5&31)>29)return a=9,e.msg="too many length or distance symbols",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);if(r=258+(31&r)+(r>>5&31),!i||i.length<r)i=[];else for(y=0;r>y;y++)i[y]=0;o>>>=14,w-=14,_=0,a=4;case 4:for(;4+(l>>>10)>_;){for(;3>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}i[ot[_++]]=7&o,o>>>=3,w-=3}for(;19>_;)i[ot[_++]]=0;if(d[0]=7,r=b.inflate_trees_bits(i,d,c,h,e),0!=r)return(t=r)==Ye&&(i=null,a=9),n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);_=0,a=5;case 5:for(;r=l,258+(31&r)+(r>>5&31)>_;){let s,u;for(r=d[0];r>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(r=h[3*(c[0]+(o&$e[r]))+1],u=h[3*(c[0]+(o&$e[r]))+2],16>u)o>>>=r,w-=r,i[_++]=u;else{for(y=18==u?7:u-14,s=18==u?11:3;r+y>w;){if(0===p)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);t=0,p--,o|=(255&e.read_byte(x++))<<w,w+=8}if(o>>>=r,w-=r,s+=o&$e[y],o>>>=y,w-=y,y=_,r=l,y+s>258+(31&r)+(r>>5&31)||16==u&&1>y)return i=null,a=9,e.msg="invalid bit length repeat",t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);u=16==u?i[y-1]:0;do{i[y++]=u}while(0!=--s);_=y}}if(c[0]=-1,I=[],C=[],E=[],D=[],I[0]=9,C[0]=6,r=l,r=b.inflate_trees_dynamic(257+(31&r),1+(r>>5&31),i,I,C,E,D,h,e),0!=r)return r==Ye&&(i=null,a=9),t=r,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);u.init(I[0],C[0],h,E[0],h,D[0]),a=6;case 6:if(n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),x=e.next_in_index,p=e.avail_in,o=n.bitb,w=n.bitk,g=n.write,m=g<n.read?n.read-g-1:n.end-g,0===f){a=0;break}a=7;case 7:if(n.write=g,t=n.inflate_flush(e,t),g=n.write,m=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);a=8;case 8:return t=1,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);case 9:return t=Ye,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t);default:return t=Qe,n.bitb=o,n.bitk=w,e.avail_in=p,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=g,n.inflate_flush(e,t)}}},n.free=e=>{n.reset(e,null),n.win=null,h=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==a?1:0}const dt=13,ct=[0,0,255,255];function ut(){const e=this;function t(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):Qe}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),Qe):(e.wbits=i,n.istate.blocks=new _t(n,1<<i),t(n),0)),e.inflate=(e,t)=>{let n,i;if(!e||!e.istate||!e.next_in)return Qe;const a=e.istate;for(t=4==t?Ze:0,n=Ze;;)switch(a.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(a.method=e.read_byte(e.next_in_index++)))){a.mode=dt,e.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=dt,e.msg="invalid win size",a.marker=5;break}a.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=dt,e.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,a.need+=255&e.read_byte(e.next_in_index++),a.mode=6,2);case 6:return a.mode=dt,e.msg="need dictionary",a.marker=0,Qe;case 7:if(n=a.blocks.proc(e,n),n==Ye){a.mode=dt,a.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,a.blocks.reset(e,a.was),a.mode=12;case 12:return e.avail_in=0,1;case dt:return Ye;default:return Qe}},e.inflateSetDictionary=(e,t,n)=>{let i=0,a=n;if(!e||!e.istate||6!=e.istate.mode)return Qe;const r=e.istate;return a<1<<r.wbits||(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(t,i,a),r.mode=7,0},e.inflateSync=e=>{let n,i,a,r,s;if(!e||!e.istate)return Qe;const l=e.istate;if(l.mode!=dt&&(l.mode=dt,l.marker=0),0===(n=e.avail_in))return Ze;for(i=e.next_in_index,a=l.marker;0!==n&&4>a;)e.read_byte(i)==ct[a]?a++:a=0!==e.read_byte(i)?0:4-a,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,l.marker=a,4!=a?Ye:(r=e.total_in,s=e.total_out,t(e),e.total_in=r,e.total_out=s,l.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():Qe}function ft(){}function ht(e){const t=new ft,n=e&&e.chunkSize?i.floor(2*e.chunkSize):131072,s=new r(n);let l=!1;t.inflateInit(),t.next_out=s,this.append=(e,i)=>{const o=[];let _,d,c=0,u=0,f=0;if(0!==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,0!==t.avail_in||l||(t.next_in_index=0,l=!0),_=t.inflate(0),l&&_===Ze){if(0!==t.avail_in)throw new a("inflating: bad input")}else if(0!==_&&1!==_)throw new a("inflating: "+t.msg);if((l||1===_)&&t.avail_in===e.length)throw new a("inflating: bad input");t.next_out_index&&(t.next_out_index===n?o.push(new r(s)):o.push(s.subarray(0,t.next_out_index))),f+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=c&&(i(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(d=new r(f),o.forEach((e=>{d.set(e,u),u+=e.length}))):d=o[0]?new r(o[0]):new r,d}},this.flush=()=>{t.inflateEnd()}}ft.prototype={inflateInit(e){const t=this;return t.istate=new ut,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):Qe},inflateEnd(){const e=this;if(!e.istate)return Qe;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Qe},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):Qe},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Je,self.Inflate=ht}}(); |
@@ -1,1 +0,1 @@ | ||
((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{Array:t,Object:n,String:r,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:m,Blob:g,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[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 U(){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=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=d,o=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=i.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,f,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>i&&(d=i,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=n[2*l],t.opt_len+=f*(d+u),r&&(t.static_len+=f*(r[2*l+1]+u)));if(0!==p){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,p-=2}while(p>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+r[a-1]<<1;for(i=0;n>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function I(e,t,n,r,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=r,a.max_length=s}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[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]])),U.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],U.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],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.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],U.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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,O[t]])));const M=C([[30,5]]);function H(e,t,n,r,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=r,a.func=s}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,M[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const L=[new H(0,0,0,0,0),new H(4,4,8,4,1),new H(4,5,16,8,1),new H(4,6,32,32,1),new H(4,4,16,16,2),new H(8,16,32,32,2),new H(8,16,128,128,2),new H(8,32,128,256,2),new H(32,128,258,1024,2),new H(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,P=666,V=262;function Z(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function K(){const e=this;let t,n,r,s,a,o,l,c,d,u,f,w,m,g,_,y,b,x,S,z,k,v,E,D,R,T,F,C,W,N,O,M,H;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)H[2*t]=0;O[512]=1,e.opt_len=e.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++a<i&&n==s||(o>a?H[2*n]+=a:0!==n?(n!=r&&H[2*n]++,H[32]++):a>10?H[36]++:H[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function se(e){re(255&e),re(e>>>8&255)}function ae(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ie(e,t){const n=2*e;ae(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,a=e[1],i=0,o=7,l=4;for(0===a&&(o=138,l=3),n=0;t>=n;n++)if(r=a,a=e[2*(n+1)+1],++i>=o||r!=a){if(l>i)do{ie(r,H)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,H),i--),ie(16,H),ae(i-3,2)):i>10?(ie(18,H),ae(i-11,7)):(ie(17,H),ae(i-3,3));i=0,s=r,0===a?(o=138,l=3):r==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&n,G++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,M[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(r=8*G,s=k-b,a=0;30>a;a++)r+=M[2*a]*(5+U.extra_dbits[a]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function de(t,n){let r,s,a,i,o=0;if(0!==G)do{r=e.dist_buf[o],s=e.lc_buf[o],o++,0===r?ie(s,t):(a=U._length_code[s],ie(a+256+1,t),i=U.extra_lbits[a],0!==i&&(s-=U.base_length[a],ae(s,i)),r--,a=U.d_code(r),ie(a,n),i=U.extra_dbits[a],0!==i&&(r-=U.base_dist[a],ae(r,i)))}while(G>o);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function fe(t,n,r){ae(0+(r?1:0),3),((t,n)=>{ue(),Q=8,se(n),se(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(ne(O,K.max_code),ne(M,j.max_code),X.build_tree(e),t=18;t>=3&&0===H[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==t?a==s?(ae(2+(r?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(r?1:0),3),((e,t,n)=>{let r;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),r=0;n>r;r++)ae(H[2*U.bl_order[r]+1],3);oe(O,e-1),oe(M,t-1)})(K.max_code+1,j.max_code+1,i+1),de(O,M)):fe(t,n,r),te(),r&&ue()})(0>b?-1:b,k-b,n),b=k,t.flush_pending()}function he(){let e,n,r,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=m,r=e;do{n=65535&f[--r],f[r]=a>n?0:n-a}while(0!=--e);e=a,r=e;do{n=65535&u[--r],u[r]=a>n?0:n-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<<y^255&c[k+1])&_)}while(V>E&&0!==t.avail_in)}function we(e){let t,n,r=R,s=k,i=D;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>D||(r>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(n=258-(p-s),s=p-258,n>i){if(v=e,i=n,n>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--r);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],O=[],M=[],H=[],e.pqdownheap=(t,n)=>{const r=e.heap,s=r[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Z(t,r[a+1],r[a],e.depth)&&a++,!Z(t,s,r[a],e.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},e.deflateInit=(t,S,v,U,B,P)=>(U||(U=8),B||(B=8),P||(P=0),t.msg=null,-1==S&&(S=6),1>B||B>9||8!=U||9>v||v>15||0>S||S>9||0>P||P>2?A:(t.dstate=e,o=v,a=1<<o,l=a-1,g=B+7,m=1<<g,_=m-1,y=i.floor((g+3-1)/3),c=new p(2*a),u=[],f=[],Y=1<<B+6,e.pending_buf=new p(4*Y),r=4*Y,e.dist_buf=new h(Y),e.lc_buf=new p(Y),F=S,C=P,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=q,s=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,j.dyn_tree=M,j.stat_desc=I.static_d_desc,X.dyn_tree=H,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[m-1]=0;for(let e=0;m-1>e;e++)f[e]=0;T=L[F].max_lazy,W=L[F].good_length,N=L[F].nice_length,R=L[F].max_chain,k=0,b=0,E=0,x=D=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=q&&n!=P?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==q?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(L[F].func!=L[t].func&&0!==e.total_in&&(r=e.deflate(1)),F!=t&&(F=t,T=L[F].max_lazy,W=L[F].good_length,N=L[F].nice_length,R=L[F].max_chain),C=n,r)},e.deflateSetDictionary=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=r-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<<y^255&c[1])&_,s=0;i-3>=s;s++)w=(w<<y^255&c[s+2])&_,u[s&l]=f[w],f[w]=s;return 0},e.deflate=(i,d)=>{let p,h,g,R,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==P&&4!=d)return i.msg=B[4],A;if(0===i.avail_out)return i.msg=B[7],-5;var N;if(t=i,R=s,s=d,42==n&&(h=8+(o-8<<4)<<8,g=(F-1&255)>>1,g>3&&(g=3),h|=g<<6,0!==k&&(h|=32),h+=31-h%31,n=q,re((N=h)>>8&255),re(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=B[7],-5;if(n==P&&0!==t.avail_in)return i.msg=B[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=P){switch(W=-1,L[F].func){case 0:W=(e=>{let n,s=65535;for(s>r-5&&(s=r-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,n=b+s,(0===k||k>=n)&&(E=k-n,k=n,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,r=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k),0===r||(k-r&65535)>a-V||2!=C&&(x=we(r)),3>x)n=ce(0,255&c[k]),E--,k++;else if(n=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<<y^255&c[k+1])&_;else{x--;do{k++,w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k}while(0!=--x);k++}if(n&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 2:W=(e=>{let n,r,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k),D=x,S=v,x=2,0!==s&&T>D&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>D||x>D)if(0!==z){if(n=ce(0,255&c[k-1]),n&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{r=k+E-3,n=ce(k-1-S,D-3),E-=D-1,D-=2;do{++k>r||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k)}while(0!=--D);if(z=0,x=2,k++,n&&(pe(!1),0===t.avail_out))return 0}}return 0!==z&&(n=ce(0,255&c[k-1]),z=0),pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d)}if(2!=W&&3!=W||(n=P),0==W||2==W)return 0===t.avail_out&&(s=-1),0;if(1==W){if(1==d)ae(2,3),ie(256,I.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;m>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){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}j.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){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 X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let ne=2;try{typeof T!=$&&T.hardwareConcurrency&&(ne=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ne,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof D!=$&&D,DecompressionStreamNative:typeof R!=$&&R},se=n.assign({},re);function ae(){return se}function ie(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",n),oe("chunkSize",r),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:n}=p;if((e||n)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=n}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;le[e]=t}class ce{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^le[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new m(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ue(e){if(void 0===y){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new y).encode(e)}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=fe.getPartial(n);return 32===r?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>i.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 s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=fe.getPartial(s);return r.push(fe.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new p(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=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(fe.partial(8*(3&n),r)),t}}},he=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=pe.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),r=t._length,s=t._length=r+fe.bitLength(e);if(s>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(n);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<<e|t>>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+s[e]+n._key[i.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},me={importKey:e=>new me.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new m(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),o=1;n>o;o++)for(i=e.encrypt(i),l=0;l<i.length;l++)a[l]^=i[l];for(o=0;(s||1)>p&&o<a.length;o++)u.setInt32(p,a[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=he,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());for(let t=0;s>t;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}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},ge=void 0!==S&&"function"==typeof S.getRandomValues,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return ge?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=n.assign({hash:{name:"HMAC"}},ze),ve=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],De=[8,12,16],Re=[16,24,32],Te=10,Fe=[0,0,0,0],Ae="undefined",Ce="function",We=typeof S!=Ae,Ne=We&&S.subtle,Ue=We&&typeof Ne!=Ae,Ie=pe.bytes,Oe=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],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?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],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!n[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[d]=a,r[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,p,h,w=e[0]^n[0],m=e[t?3:1]^n[1],g=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)u=i[w>>>24]^o[m>>16&255]^l[g>>8&255]^c[255&_]^n[y],p=i[m>>>24]^o[g>>16&255]^l[_>>8&255]^c[255&w]^n[y+1],h=i[g>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&m]^n[y+2],_=i[_>>>24]^o[w>>16&255]^l[m>>8&255]^c[255&g]^n[y+3],y+=4,w=u,m=p,g=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[m>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^n[y++],u=w,w=m,m=g,g=_,_=u;return s}},Me=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 s=fe.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return fe.clamp(t,s)}},He=me.hmacSha1;let Le=We&&Ue&&typeof Ne.importKey==Ce,Be=We&&Ue&&typeof Ne.deriveBits==Ce;class qe extends k{constructor({password:e,signed:t,encryptionStrength:r,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:a,resolveReady:i,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ze(e,t,n,je(r,0,De[t])),a=je(r,De[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(n,a,r,je(e,0,De[a]+2)),e=je(e,De[a]+2),s?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:a}=this;await a;const i=je(s,0,s.length-Te),o=je(s,s.length-Te);let l=new p;if(i.length){const e=Ye(Ie,i);r.update(e);const t=n.update(e);l=Xe(Ie,t)}if(t){const e=je(Xe(Ie,r.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}})}}class Pe extends k{constructor({password:e,encryptionStrength:t}){let r;super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:i}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=xe(new p(De[t]));return Ke(r,await Ze(e,t,n,r))})(n,s,r),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:a}=this;await a;let i=new p;if(s.length){const e=t.update(Ye(Ie,s));n.update(e),i=Xe(Ie,e)}r.signature=Xe(Ie,n.digest()).slice(0,Te),e.enqueue(Ke(i,r.signature))}}),r=this}}function Ve(e,t,n,r,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ke(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Ye(Ie,je(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),n.set(Xe(Ie,s),d+r)}return e.pending=je(t,d),n}async function Ze(e,r,s,a){e.password=null;const i=ue(s),o=await(async(e,t,n,r,s)=>{if(!Le)return me.importKey(t);try{return await Ne.importKey("raw",t,n,!1,s)}catch(e){return Le=!1,me.importKey(t)}})(0,i,ke,0,Ee),l=await(async(e,t,n)=>{if(!Be)return me.pbkdf2(t,e.salt,ve.iterations,n);try{return await Ne.deriveBits(e,t,n)}catch(r){return Be=!1,me.pbkdf2(t,e.salt,ve.iterations,n)}})(n.assign({salt:a},ve),o,8*(2*Re[r]+2)),c=new p(l),d=Ye(Ie,je(c,0,Re[r])),u=Ye(Ie,je(c,Re[r],2*Re[r])),f=je(c,2*Re[r]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new Me(new Oe(d),t.from(Fe)),hmac:new He(u)}),f}function Ke(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Xe(e,t){return e.fromBits(t)}function Ye(e,t){return e.toBits(t)}class Ge extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(_e);e=e.subarray(12)}r?t.error(new f(be)):t.enqueue(Qe(n,e))}})}}class Je extends k{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=xe(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set($e(n,t),0),s=12}else r=new p(e.length),s=0;r.set($e(n,e),s),t.enqueue(r)}})}}function Qe(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,n[r]);return n}function $e(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,t[r]);return n}function et(e,t){const r=[305419896,591751049,878082192];n.assign(e,{keys:r,crcKey0:new ce(r[0]),crcKey2:new ce(r[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,r,s]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=st(i.imul(st(r+rt(n)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function nt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function st(e){return 4294967295&e}const at="deflate-raw";class it extends k{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=lt(super.readable);a&&!o||!l||(u=new de,p=ut(p,u)),s&&(p=dt(p,i,{level:c,chunkSize:t},r,n)),a&&(o?p=ut(p,new Je(e)):(f=new Pe(e),p=ut(p,f))),ct(d,p,(async()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new m(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends k{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=lt(super.readable);a&&(s?p=ut(p,new Ge(e)):(u=new qe(e),p=ut(p,u))),l&&(p=dt(p,c,{chunkSize:t},r,n)),a&&!s||!i||(d=new de,p=ut(p,d)),ct(this,p,(async()=>{if((!a||s)&&i){const e=new m(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function lt(e){return ut(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,r){t=ut(t,new k({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,r,s){try{e=ut(e,new(t&&r?r:s)(at,n))}catch(r){if(!t)throw r;e=ut(e,new s(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",pt="deflate";class ht extends k{constructor(e,t){super({});const r=this,{codecType:s}=e;let a;s.startsWith(pt)?a=it:s.startsWith("inflate")&&(a=ot);let i=0;const o=new a(e,t),l=super.readable,c=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(r,{signature:e,size:i})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof F!=$;class mt{constructor(e,{readable:t,writable:r},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return n.assign(e,{busy:!0,readable:t.pipeThrough(new gt(t,i,a),{signal:u}),writable:r,options:n.assign({},s),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?bt:yt)(e,a)}}class gt extends k{constructor(e,{onstart:t,onprogress:n,size:r,onend:s},{chunkSize:a}){let i=0;super({start(){t&&_t(t,r)},async transform(e,t){i+=e.length,n&&await _t(n,i,r),t.enqueue(e)},flush(){e.size=i,s&&_t(s,i)}},{highWaterMark:1,size:()=>a})}}async function _t(e,...t){try{await e(...t)}catch(e){}}function yt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{const a=new ht(e,s);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:s}=a;return{signature:e,size:s}}finally{r()}})(e,t)}}function bt(e,{baseURL:t,chunkSize:r}){return e.interface||n.assign(e,{worker:zt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let r,s;const a=new _(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const r=new _((e=>n=e));return{writable:new E({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:r}})(e.writable);kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e)||n.assign(e,{reader:i.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:r})}}),e.interface}let xt=!0,St=!0;function zt(e,t,r){const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{i=new F(a)}catch(e){xt=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,a=new f(e);n.assign(a,{stack:t,code:r,name:s}),w(a)}else{if("pull"==r){const{value:e,done:n}=await l.read();kt({type:ft,value:e,done:n,messageId:a},t)}r==ft&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),"close"==r&&w(null,i)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,r))),i}function kt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:a}=e;const i=[];if(n&&(e.value=n.buffer,i.push(e.value)),s&&St?(r&&i.push(r),a&&i.push(a)):e.readable=e.writable=null,i.length)try{return t.postMessage(e,i),!0}catch(n){St=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}let vt=[];const Et=[];let Dt=0;function Rt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",Ft="HTTP Range not supported",At="Writer iterator completed too soon",Ct="GET",Wt="bytes",Nt=65536,Ut="writable";class It{constructor(){this.size=0}init(){this.initialized=!0}}class Ot extends It{get readable(){const e=this,{chunkSize:t=Nt}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await on(e,s+l,i.min(t,a-l),o)),l+t>a?r.close():this.chunkOffset+=t}});return n}}class Mt extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Ht extends Ot{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||r<n.size?n.blob.slice(e,r):n.blob;let a=await s.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,r)),new p(a)}}class Lt extends It{constructor(e){super();const t=new k,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Bt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Pt(e,t,r){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i})}async function Vt(e,t,n){const{url:r,useRangeHeader:a,forceRangeRequests:i}=e;if((e=>{const{baseURL:t}=ae(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(r)&&(a||i)){const{headers:r}=await t(Ct,e,Kt(e));if(!i&&r.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;const i=r.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Zt(e,t,n,r,s){const{useRangeHeader:a,forceRangeRequests:i,options:o}=e;if(a||i){const s=await r(Ct,e,Kt(e,t,n));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new p(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},jt(e),{Range:Wt+"="+t+"-"+(t+r-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const n=await t(Ct,e,jt(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,jt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(e,{options:t,url:r},s){const a=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},r){return new _(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),i.open(e,t),r)for(const e of n.entries(r))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class en extends Ot{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Bt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Ot{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let a,o=n;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await on(c,l,s)),a.set(await r.readUint8Array(e+s,t-s,n),s)}else a=await on(c,l,t);return r.lastDiskNumber=i.max(o,r.lastDiskNumber),a}}class nn extends It{constructor(e,t=4294967295){super();const r=this;let s,a,i;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=r;if(i)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),r.diskOffset+=s.size,r.diskNumber++,i=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(At);s=n,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await rn(s),a=n.writable,i=a.getWriter(),await this.write(t)}},async close(){await i.ready,await c()}});async function l(e){const t=e.length;t&&(await i.ready,await i.write(e),s.size+=t,r.size+=t,r.availableSize-=t)}async function c(){a.size=s.size,await i.close()}n.defineProperty(r,Ut,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function sn(e){return t.isArray(e)&&(e=new tn(e)),e instanceof v&&(e={readable:e}),e}function an(e){e.writable===Q&&typeof e.next==ee&&(e=new nn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,r){return e.readUint8Array(t,n,r)}const ln=tn,cn=nn,dn="diskNumberStart",un="lastModDate",fn="lastAccessDate",pn="creationDate",hn="internalFileAttribute",wn="externalFileAttribute",mn="msDosCompatible",gn="zip64",_n=["filename","rawFilename","compressedSize","uncompressedSize",un,"rawLastModDate","comment","rawComment",fn,pn,"offset",dn,dn,hn,wn,mn,gn,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class yn{constructor(e){_n.forEach((t=>this[t]=e[t]))}}const bn="File already exists",xn="Zip file comment exceeds 64KB",Sn="File entry comment exceeds 64KB",zn="File entry name exceeds 64KB",kn="Version exceeds 65535",vn="The strength must equal 1, 2, or 3",En="Extra field type exceeds 65535",Dn="Extra field data exceeds 64KB",Rn="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Tn=new p([7,0,2,0,65,69,3,0,0]);let Fn=0;const An=[];async function Cn(e,t){const n=e.getWriter();await n.ready,e.size+=Bn(t),await n.write(t),n.releaseLock()}function Wn(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nn(e,t,n,r){const s=t[n]===Q?e.options[n]:t[n];return s===Q?r:s}function Un(e,t,n){e.setUint8(t,n)}function In(e,t,n){e.setUint16(t,n,!0)}function On(e,t,n){e.setUint32(t,n,!0)}function Mn(e,t,n){e.setBigUint64(t,n,!0)}function Hn(e,t,n){e.set(t,n)}function Ln(e){return new m(e.buffer)}function Bn(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new p(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,c=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,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,i}},this.flush=()=>{let e,r,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new p(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}}),e.BlobReader=Ht,e.BlobWriter=Lt,e.Data64URIReader=class extends Ot{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:i.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new p(t),a=4*i.floor(e/3),o=atob(r.substring(a+n,4*i.ceil((e+t)/3)+n)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Mt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=bn,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=xn,e.ERR_INVALID_ENCRYPTION_STRENGTH=vn,e.ERR_INVALID_ENTRY_COMMENT=Sn,e.ERR_INVALID_ENTRY_NAME=zn,e.ERR_INVALID_EXTRAFIELD_DATA=Dn,e.ERR_INVALID_EXTRAFIELD_TYPE=En,e.ERR_INVALID_VERSION=kn,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Rn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Ot,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Ht{constructor(e){super(new g([e],{type:"text/plain"}))}},e.TextWriter=class extends Lt{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new _(((s,a)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Ot{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Mt{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Mt,e.ZipWriter=class{constructor(e,t={}){e=an(e),n.assign(this,{writer:e,addSplitZipSignature:e instanceof nn,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,l={}){const c=this,{pendingAddFileCalls:d,config:u}=c;let g;Fn<u.maxWorkers?Fn++:await new _((e=>An.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(bn);return c.filenames.add(e),g=(async(e,r,l,c)=>{r=r.trim(),c.directory&&!r.endsWith("/")?r+="/":c.directory=r.endsWith("/");const d=ue(r);if(Bn(d)>Y)throw new f(zn);const u=c.comment||"",g=ue(u);if(Bn(g)>Y)throw new f(Sn);const y=Nn(e,c,"version",20);if(y>Y)throw new f(kn);const b=Nn(e,c,"versionMadeBy",20);if(b>Y)throw new f(kn);const x=Nn(e,c,un,new o),S=Nn(e,c,fn),z=Nn(e,c,pn),k=Nn(e,c,mn,!0),v=Nn(e,c,hn,0),E=Nn(e,c,wn,0),D=Nn(e,c,"password"),R=Nn(e,c,"encryptionStrength",3),T=Nn(e,c,"zipCrypto"),F=Nn(e,c,"extendedTimestamp",!0),A=Nn(e,c,"keepOrder",!0),C=Nn(e,c,"level"),W=Nn(e,c,"useWebWorkers"),N=Nn(e,c,"bufferedWrite"),U=Nn(e,c,"dataDescriptorSignature",!1),I=Nn(e,c,"signal"),O=Nn(e,c,"useCompressionStream");let M=Nn(e,c,"dataDescriptor",!0),H=Nn(e,c,gn);if(D!==Q&&R!==Q&&(1>R||R>3))throw new f(vn);let L=new p;const{extraField:B}=c;if(B){let e=0,t=0;B.forEach((t=>e+=4+Bn(t))),L=new p(e),B.forEach(((e,n)=>{if(n>Y)throw new f(En);if(Bn(e)>Y)throw new f(Dn);Hn(L,new h([n]),t),Hn(L,new h([Bn(e)]),t+2),Hn(L,e,t+4),t+=4+Bn(e)}))}let q=0,P=0,V=0;const Z=!0===H;l&&(l=sn(l),await rn(l),l.size===Q?(M=!0,(H||H===Q)&&(H=!0,V=q=X)):(V=l.size,q=(e=>e+5*(i.floor(e/16383)+1))(V)));const{diskOffset:K,diskNumber:j,maxSize:$}=e.writer,ee=Z||V>=X,te=Z||q>=X,ne=Z||e.offset+e.pendingEntriesSize-K>=X,re=Nn(e,c,"supportZip64SplitFile",!0)&&Z||j+i.ceil(e.pendingEntriesSize/$)>=Y;if(ne||ee||te||re){if(!1===H||!A)throw new f(Rn);H=!0}H=H||!1;const se=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,password:a,level:o,zip64:l,zipCrypto:c,dataDescriptor:d,directory:u,rawExtraField:f,encryptionStrength:h,extendedTimestamp:m}=e,g=0!==o&&!u,_=!(!a||!Bn(a));let y,b,x,S,z=e.version;if(_&&!c){y=new p(Bn(Tn)+2);const e=Ln(y);In(e,0,39169),Hn(y,Tn,2),Un(e,8,h)}else y=new p;if(m){x=new p(9+(r?4:0)+(s?4:0));const e=Ln(x);In(e,0,21589),In(e,2,Bn(x)-4),S=1+(r?2:0)+(s?4:0),Un(e,4,S);let t=5;On(e,t,i.floor(n.getTime()/1e3)),t+=4,r&&(On(e,t,i.floor(r.getTime()/1e3)),t+=4),s&&On(e,t,i.floor(s.getTime()/1e3));try{b=new p(36);const e=Ln(b),t=Wn(n);In(e,0,10),In(e,2,32),In(e,8,1),In(e,10,24),Mn(e,12,t),Mn(e,20,Wn(r)||t),Mn(e,28,Wn(s)||t)}catch(e){b=new p}}else b=x=new p;let k=2048;d&&(k|=8);let v=0;g&&(v=8),l&&(z=z>45?z:45),_&&(k|=1,c||(z=z>51?z:51,v=99,g&&(y[9]=8)));const E=new p(26),D=Ln(E);In(D,0,z),In(D,2,k),In(D,4,v);const R=new w(1),T=Ln(R);let F;F=J>n?J:n>G?G:n,In(T,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),In(T,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const A=R[0];On(D,6,A),In(D,22,Bn(t));const C=Bn(y,x,b,f);In(D,24,C);const W=new p(30+Bn(t)+C);return On(Ln(W),0,67324752),Hn(W,E,4),Hn(W,t,30),Hn(W,y,30+Bn(t)),Hn(W,x,30+Bn(t,y)),Hn(W,b,30+Bn(t,y,x)),Hn(W,f,30+Bn(t,y,x,b)),{localHeaderArray:W,headerArray:E,headerView:D,lastModDate:n,rawLastModDate:A,encrypted:_,compressed:g,version:z,compressionMethod:v,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y}})(c=n.assign({},c,{rawFilename:d,rawComment:g,version:y,versionMadeBy:b,lastModDate:x,lastAccessDate:S,creationDate:z,rawExtraField:L,zip64:H,zip64UncompressedSize:ee,zip64CompressedSize:te,zip64Offset:ne,zip64DiskNumberStart:re,password:D,level:C,useWebWorkers:W,encryptionStrength:R,extendedTimestamp:F,zipCrypto:T,bufferedWrite:N,keepOrder:A,dataDescriptor:M,dataDescriptorSignature:U,signal:I,msDosCompatible:k,internalFileAttribute:v,externalFileAttribute:E,useCompressionStream:O})),ae=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new p,i=0;return n&&(a=new p(t?r?24:20:r?16:12),s=Ln(a),r&&(i=4,On(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),ie=Bn(se.localHeaderArray,ae.dataDescriptorArray);let oe;P=ie+q,e.pendingEntriesSize+=P;try{oe=await(async(e,r,o,l,c)=>{const{files:d,writer:u}=e,{keepOrder:h,dataDescriptor:w,signal:g}=c,{headerInfo:y}=l,b=t.from(d.values()).pop();let x,S,z,k,v,E,D={};d.set(r,D);try{let t;h&&(t=b&&b.lock,D.lock=new _((e=>z=e))),c.bufferedWrite||e.writerLocked||e.bufferedWrites&&h||!w?(E=new Lt,E.writable.size=0,x=!0,e.bufferedWrites++,await rn(u)):(E=u,await R()),await rn(E);const{writable:y}=u;let{diskOffset:F}=u;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);On(Ln(t),0,134695760),await Cn(y,t),e.offset+=4}x||(await t,await T(y));const{diskNumber:A}=u;if(v=!0,D.diskNumberStart=A,D=await(async(e,t,{diskNumberStart:r,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:m,lastModDate:g,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:D}=u,{dataDescriptorArray:R}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,level:W,zip64:N,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:M,zipCrypto:H,dataDescriptor:L,directory:B,versionMadeBy:q,rawComment:P,rawExtraField:V,useWebWorkers:Z,onstart:K,onprogress:j,onend:Y,signal:G,encryptionStrength:J,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,useCompressionStream:re}=d,se={lock:o,versionMadeBy:q,zip64:N,directory:!!B,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:P,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:D,rawExtraField:V,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,diskNumberStart:r};let ae,ie=0,oe=0;const{writable:le}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cn(le,w);const t=e.readable,n=t.size=e.size,r={options:{codecType:pt,level:W,password:C,encryptionStrength:J,zipCrypto:b&&H,passwordVerification:b&&H&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:Z,useCompressionStream:re,transferStreams:!1},config:c,streamOptions:{signal:G,size:n,onstart:K,onprogress:j,onend:Y}},a=await(async(e,t)=>{const{options:n,config:r}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:p,terminateWorkerTimeout:h}=r;t.transferStreams=a||a===Q;const w=!(c||d||u||t.transferStreams);let m;t.useWebWorkers=!w&&(i||i===Q&&r.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===Q&&r.useCompressionStream;const g=vt.find((e=>!e.busy));if(g)Rt(g),m=new mt(g,e,t,y);else if(vt.length<p){const n={indexWorker:Dt};Dt++,vt.push(n),m=new mt(n,e,t,y)}else m=await new _((n=>Et.push({resolve:n,stream:e,workerOptions:t})));return m.run();function y(e){if(Et.length){const[{resolve:t,stream:n,workerOptions:r}]=Et.splice(0,1);t(new mt(e,n,r,y))}else e.worker?(Rt(e),s.isFinite(h)&&h>=0&&(e.terminateTimeout=setTimeout((()=>{vt=vt.filter((t=>t!=e)),e.terminate()}),h))):vt=vt.filter((t=>t!=e))}})({readable:t,writable:le},r);le.size+=a.size,ae=a.signature,oe=e.size=t.size,ie=a.size}else await Cn(le,w);let ce;if(N){let e=4;U&&(e+=8),I&&(e+=8),O&&(e+=8),M&&(e+=4),ce=new p(e)}else ce=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:m,dataDescriptor:g}=t;if(d&&!m||n===Q||(On(c,10,n),g&&On(u,f,n)),p){const e=Ln(r);In(e,0,1),In(e,2,r.length-4);let t=4;h&&(On(c,18,X),Mn(e,t,a(i)),t+=8),w&&(On(c,14,X),Mn(e,t,a(s))),g&&(Mn(u,f+4,a(s)),Mn(u,f+12,a(i)))}else On(c,14,s),On(c,18,i),g&&(On(u,f+4,s),On(u,f+8,i))})({signature:ae,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:oe,headerInfo:u,dataDescriptorInfo:f},d),L&&await Cn(le,R),n.assign(se,{uncompressedSize:oe,compressedSize:ie,lastModDate:g,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,length:h+ie,compressionMethod:z,version:S,headerArray:m,signature:ae,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:M}),se})(o,E,D,l,e.config,c),v=!1,d.set(r,D),D.filename=r,x){await E.writable.getWriter().close();let e=await E.getData();await t,await R(),k=!0,w||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new m(s);return e.encrypted&&!r||On(a,14,e.signature),e.zip64?(On(a,18,X),On(a,22,X)):(On(a,18,e.compressedSize),On(a,22,e.uncompressedSize)),await Cn(n,new p(s)),t.slice(s.byteLength)})(D,e,y,c)),await T(y),D.diskNumberStart=u.diskNumber,F=u.diskOffset,await e.stream().pipeTo(y,{preventClose:!0,preventAbort:!0,signal:g}),y.size+=e.size,k=!1}if(D.offset=e.offset-F,D.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Ln(n);let u=4;i&&(u+=8),o&&(u+=8),l&&(Mn(d,u,a(r)),u+=8),c&&On(d,u,s)})(D,c);else if(D.offset>=X)throw new f(Rn);return e.offset+=D.length,D}catch(t){if(x&&k||!x&&v){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}x?e.offset+=E.writable.size:e.offset=E.writable.size}throw d.delete(r),t}finally{x&&e.bufferedWrites--,z&&z(),S&&S()}async function R(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>S=()=>{e.writerLocked=!1,t()})),await t}async function T(e){y.localHeaderArray.length>u.availableSize&&(u.availableSize=0,await Cn(e,new p))}})(e,r,l,{headerInfo:se,dataDescriptorInfo:ae,metadataSize:ie},c)}finally{e.pendingEntriesSize-=P}return n.assign(oe,{name:r,comment:u,extraField:B}),new yn(oe)})(c,e,r,l),d.add(g),await g}catch(t){throw c.filenames.delete(e),t}finally{d.delete(g);const e=An.shift();e?e():Fn--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await _.all(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,m=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Ln(u);In(e,0,21589),In(e,2,5),Un(e,4,c),On(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Bn(t,s,n,r,a,u,o)}const g=new p(h),_=Ln(g);await rn(o);let y=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:m,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=n,C=Bn(i,l,d,f,p);On(_,u,33639248),In(_,u+4,w);const W=Ln(m);S||On(W,18,F),z||On(W,14,A),Hn(g,m,u+6),In(_,u+30,C),In(_,u+32,Bn(h)),In(_,u+34,x&&k?Y:T),In(_,u+36,D),R?On(_,u+38,R):b&&E&&Un(_,u+38,16),On(_,u+42,x&&v?X:t),Hn(g,a,u+46),Hn(g,i,u+46+Bn(a)),Hn(g,l,u+46+Bn(a,i)),Hn(g,d,u+46+Bn(a,i,l)),Hn(g,f,u+46+Bn(a,i,l,d)),Hn(g,p,u+46+Bn(a,i,l,d,f)),Hn(g,h,u+46+Bn(a)+C);const N=46+Bn(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cn(c,g.slice(y,u)),y=u),u+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new yn(n))}catch(e){}}await Cn(c,y?g.slice(y):g);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nn(e,r,"zip64");if(!(X>w&&X>h&&Y>m&&Y>b)){if(!1===S)throw new f(Rn);S=!0}const z=new p(S?98:22),k=Ln(z);u=0,S&&(On(k,0,101075792),Mn(k,4,a(44)),In(k,12,45),In(k,14,45),On(k,16,b),On(k,20,d),Mn(k,24,a(m)),Mn(k,32,a(m)),Mn(k,40,a(h)),Mn(k,48,a(w)),On(k,56,117853008),Mn(k,64,a(w)+a(h)),On(k,72,b+1),Nn(e,r,"supportZip64SplitFile",!0)&&(b=Y,d=Y),m=Y,w=X,h=X,u+=76),On(k,u,101010256),In(k,u+4,b),In(k,u+6,d),In(k,u+8,m),In(k,u+10,m),On(k,u+12,h),On(k,u+16,w);const v=Bn(n);if(v){if(v>Y)throw new f(xn);In(k,u+20,v)}await Cn(c,z),v&&await Cn(c,n)})(this,e,n),Nn(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sn,e.initStream=rn,e.initWriter=an,e.readUint8Array=on,e.terminateWorkers=()=>{vt.forEach((e=>{Rt(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})})); | ||
((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{Array:t,Object:n,String:r,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:g,Blob:m,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[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 U(){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=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=d,o=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=i.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,f,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>i&&(d=i,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=n[2*l],t.opt_len+=f*(d+u),r&&(t.static_len+=f*(r[2*l+1]+u)));if(0!==p){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,p-=2}while(p>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+r[a-1]<<1;for(i=0;n>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function I(e,t,n,r,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=r,a.max_length=s}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[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]])),U.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],U.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],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.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],U.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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,O[t]])));const H=C([[30,5]]);function L(e,t,n,r,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=r,a.func=s}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,H[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const M=[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)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,P=666,V=262;function Z(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function K(){const e=this;let t,n,r,s,a,o,l,c,d,u,f,w,g,m,_,y,b,x,S,z,k,v,E,D,R,T,F,C,W,N,O,H,L;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)H[2*t]=0;for(t=0;19>t;t++)L[2*t]=0;O[512]=1,e.opt_len=e.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++a<i&&n==s||(o>a?L[2*n]+=a:0!==n?(n!=r&&L[2*n]++,L[32]++):a>10?L[36]++:L[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function se(e){re(255&e),re(e>>>8&255)}function ae(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ie(e,t){const n=2*e;ae(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,a=e[1],i=0,o=7,l=4;for(0===a&&(o=138,l=3),n=0;t>=n;n++)if(r=a,a=e[2*(n+1)+1],++i>=o||r!=a){if(l>i)do{ie(r,L)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,L),i--),ie(16,L),ae(i-3,2)):i>10?(ie(18,L),ae(i-11,7)):(ie(17,L),ae(i-3,3));i=0,s=r,0===a?(o=138,l=3):r==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&n,G++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,H[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(r=8*G,s=k-b,a=0;30>a;a++)r+=H[2*a]*(5+U.extra_dbits[a]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function de(t,n){let r,s,a,i,o=0;if(0!==G)do{r=e.dist_buf[o],s=e.lc_buf[o],o++,0===r?ie(s,t):(a=U._length_code[s],ie(a+256+1,t),i=U.extra_lbits[a],0!==i&&(s-=U.base_length[a],ae(s,i)),r--,a=U.d_code(r),ie(a,n),i=U.extra_dbits[a],0!==i&&(r-=U.base_dist[a],ae(r,i)))}while(G>o);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function fe(t,n,r){ae(0+(r?1:0),3),((t,n)=>{ue(),Q=8,se(n),se(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(ne(O,K.max_code),ne(H,j.max_code),X.build_tree(e),t=18;t>=3&&0===L[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==t?a==s?(ae(2+(r?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(r?1:0),3),((e,t,n)=>{let r;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),r=0;n>r;r++)ae(L[2*U.bl_order[r]+1],3);oe(O,e-1),oe(H,t-1)})(K.max_code+1,j.max_code+1,i+1),de(O,H)):fe(t,n,r),te(),r&&ue()})(0>b?-1:b,k-b,n),b=k,t.flush_pending()}function he(){let e,n,r,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=g,r=e;do{n=65535&f[--r],f[r]=a>n?0:n-a}while(0!=--e);e=a,r=e;do{n=65535&u[--r],u[r]=a>n?0:n-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<<y^255&c[k+1])&_)}while(V>E&&0!==t.avail_in)}function we(e){let t,n,r=R,s=k,i=D;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>D||(r>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(n=258-(p-s),s=p-258,n>i){if(v=e,i=n,n>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--r);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],O=[],H=[],L=[],e.pqdownheap=(t,n)=>{const r=e.heap,s=r[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Z(t,r[a+1],r[a],e.depth)&&a++,!Z(t,s,r[a],e.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},e.deflateInit=(t,S,v,U,B,P)=>(U||(U=8),B||(B=8),P||(P=0),t.msg=null,-1==S&&(S=6),1>B||B>9||8!=U||9>v||v>15||0>S||S>9||0>P||P>2?A:(t.dstate=e,o=v,a=1<<o,l=a-1,m=B+7,g=1<<m,_=g-1,y=i.floor((m+3-1)/3),c=new p(2*a),u=[],f=[],Y=1<<B+6,e.pending_buf=new p(4*Y),r=4*Y,e.dist_buf=new h(Y),e.lc_buf=new p(Y),F=S,C=P,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=q,s=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,j.dyn_tree=H,j.stat_desc=I.static_d_desc,X.dyn_tree=L,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[g-1]=0;for(let e=0;g-1>e;e++)f[e]=0;T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain,k=0,b=0,E=0,x=D=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=q&&n!=P?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==q?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(M[F].func!=M[t].func&&0!==e.total_in&&(r=e.deflate(1)),F!=t&&(F=t,T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain),C=n,r)},e.deflateSetDictionary=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=r-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<<y^255&c[1])&_,s=0;i-3>=s;s++)w=(w<<y^255&c[s+2])&_,u[s&l]=f[w],f[w]=s;return 0},e.deflate=(i,d)=>{let p,h,m,R,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==P&&4!=d)return i.msg=B[4],A;if(0===i.avail_out)return i.msg=B[7],-5;var N;if(t=i,R=s,s=d,42==n&&(h=8+(o-8<<4)<<8,m=(F-1&255)>>1,m>3&&(m=3),h|=m<<6,0!==k&&(h|=32),h+=31-h%31,n=q,re((N=h)>>8&255),re(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=B[7],-5;if(n==P&&0!==t.avail_in)return i.msg=B[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=P){switch(W=-1,M[F].func){case 0:W=(e=>{let n,s=65535;for(s>r-5&&(s=r-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,n=b+s,(0===k||k>=n)&&(E=k-n,k=n,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,r=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k),0===r||(k-r&65535)>a-V||2!=C&&(x=we(r)),3>x)n=ce(0,255&c[k]),E--,k++;else if(n=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<<y^255&c[k+1])&_;else{x--;do{k++,w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k}while(0!=--x);k++}if(n&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 2:W=(e=>{let n,r,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k),D=x,S=v,x=2,0!==s&&T>D&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>D||x>D)if(0!==z){if(n=ce(0,255&c[k-1]),n&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{r=k+E-3,n=ce(k-1-S,D-3),E-=D-1,D-=2;do{++k>r||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k)}while(0!=--D);if(z=0,x=2,k++,n&&(pe(!1),0===t.avail_out))return 0}}return 0!==z&&(n=ce(0,255&c[k-1]),z=0),pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d)}if(2!=W&&3!=W||(n=P),0==W||2==W)return 0===t.avail_out&&(s=-1),0;if(1==W){if(1==d)ae(2,3),ie(256,I.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;g>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){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}j.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){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 X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let ne=2;try{typeof T!=$&&T.hardwareConcurrency&&(ne=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ne,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof D!=$&&D,DecompressionStreamNative:typeof R!=$&&R},se=n.assign({},re);function ae(){return se}function ie(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",n),oe("chunkSize",r),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:n}=p;if((e||n)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=n}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;le[e]=t}class ce{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^le[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ue(e){if(void 0===y){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new y).encode(e)}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=fe.getPartial(n);return 32===r?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>i.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 s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=fe.getPartial(s);return r.push(fe.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new p(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=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(fe.partial(8*(3&n),r)),t}}},he=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=pe.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),r=t._length,s=t._length=r+fe.bitLength(e);if(s>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(n);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<<e|t>>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+s[e]+n._key[i.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},ge={importKey:e=>new ge.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new g(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),o=1;n>o;o++)for(i=e.encrypt(i),l=0;l<i.length;l++)a[l]^=i[l];for(o=0;(s||1)>p&&o<a.length;o++)u.setInt32(p,a[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=he,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());for(let t=0;s>t;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}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},me=void 0!==S&&"function"==typeof S.getRandomValues,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return me?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=n.assign({hash:{name:"HMAC"}},ze),ve=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],De=[8,12,16],Re=[16,24,32],Te=10,Fe=[0,0,0,0],Ae="undefined",Ce="function",We=typeof S!=Ae,Ne=We&&S.subtle,Ue=We&&typeof Ne!=Ae,Ie=pe.bytes,Oe=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],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?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],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!n[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[d]=a,r[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,p,h,w=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)u=i[w>>>24]^o[g>>16&255]^l[m>>8&255]^c[255&_]^n[y],p=i[g>>>24]^o[m>>16&255]^l[_>>8&255]^c[255&w]^n[y+1],h=i[m>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&g]^n[y+2],_=i[_>>>24]^o[w>>16&255]^l[g>>8&255]^c[255&m]^n[y+3],y+=4,w=u,g=p,m=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[g>>16&255]<<16^d[m>>8&255]<<8^d[255&_]^n[y++],u=w,w=g,g=m,m=_,_=u;return s}},He=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 s=fe.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return fe.clamp(t,s)}},Le=ge.hmacSha1;let Me=We&&Ue&&typeof Ne.importKey==Ce,Be=We&&Ue&&typeof Ne.deriveBits==Ce;class qe extends k{constructor({password:e,signed:t,encryptionStrength:r,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:a,resolveReady:i,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ze(e,t,n,je(r,0,De[t])),a=je(r,De[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(n,a,r,je(e,0,De[a]+2)),e=je(e,De[a]+2),s?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:a}=this;await a;const i=je(s,0,s.length-Te),o=je(s,s.length-Te);let l=new p;if(i.length){const e=Ye(Ie,i);r.update(e);const t=n.update(e);l=Xe(Ie,t)}if(t){const e=je(Xe(Ie,r.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}})}}class Pe extends k{constructor({password:e,encryptionStrength:t}){let r;super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:i}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=xe(new p(De[t]));return Ke(r,await Ze(e,t,n,r))})(n,s,r),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:a}=this;await a;let i=new p;if(s.length){const e=t.update(Ye(Ie,s));n.update(e),i=Xe(Ie,e)}r.signature=Xe(Ie,n.digest()).slice(0,Te),e.enqueue(Ke(i,r.signature))}}),r=this}}function Ve(e,t,n,r,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ke(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Ye(Ie,je(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),n.set(Xe(Ie,s),d+r)}return e.pending=je(t,d),n}async function Ze(e,r,s,a){e.password=null;const i=ue(s),o=await(async(e,t,n,r,s)=>{if(!Me)return ge.importKey(t);try{return await Ne.importKey("raw",t,n,!1,s)}catch(e){return Me=!1,ge.importKey(t)}})(0,i,ke,0,Ee),l=await(async(e,t,n)=>{if(!Be)return ge.pbkdf2(t,e.salt,ve.iterations,n);try{return await Ne.deriveBits(e,t,n)}catch(r){return Be=!1,ge.pbkdf2(t,e.salt,ve.iterations,n)}})(n.assign({salt:a},ve),o,8*(2*Re[r]+2)),c=new p(l),d=Ye(Ie,je(c,0,Re[r])),u=Ye(Ie,je(c,Re[r],2*Re[r])),f=je(c,2*Re[r]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new He(new Oe(d),t.from(Fe)),hmac:new Le(u)}),f}function Ke(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Xe(e,t){return e.fromBits(t)}function Ye(e,t){return e.toBits(t)}class Ge extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(_e);e=e.subarray(12)}r?t.error(new f(be)):t.enqueue(Qe(n,e))}})}}class Je extends k{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=xe(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set($e(n,t),0),s=12}else r=new p(e.length),s=0;r.set($e(n,e),s),t.enqueue(r)}})}}function Qe(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,n[r]);return n}function $e(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,t[r]);return n}function et(e,t){const r=[305419896,591751049,878082192];n.assign(e,{keys:r,crcKey0:new ce(r[0]),crcKey2:new ce(r[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,r,s]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=st(i.imul(st(r+rt(n)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function nt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function st(e){return 4294967295&e}const at="deflate-raw";class it extends k{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=lt(super.readable);a&&!o||!l||(u=new de,p=ut(p,u)),s&&(p=dt(p,i,{level:c,chunkSize:t},r,n)),a&&(o?p=ut(p,new Je(e)):(f=new Pe(e),p=ut(p,f))),ct(d,p,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new g(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends k{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=lt(super.readable);a&&(s?p=ut(p,new Ge(e)):(u=new qe(e),p=ut(p,u))),l&&(p=dt(p,c,{chunkSize:t},r,n)),a&&!s||!i||(d=new de,p=ut(p,d)),ct(this,p,(()=>{if((!a||s)&&i){const e=new g(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function lt(e){return ut(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,r){t=ut(t,new k({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,r,s){try{e=ut(e,new(t&&r?r:s)(at,n))}catch(r){if(!t)throw r;e=ut(e,new s(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",pt="deflate";class ht extends k{constructor(e,t){super({});const r=this,{codecType:s}=e;let a;s.startsWith(pt)?a=it:s.startsWith("inflate")&&(a=ot);let i=0;const o=new a(e,t),l=super.readable,c=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(r,{signature:e,size:i})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof F!=$;class gt{constructor(e,{readable:t,writable:r},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return n.assign(e,{busy:!0,readable:t.pipeThrough(new mt(t,i,a),{signal:u}),writable:r,options:n.assign({},s),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?bt:yt)(e,a)}}class mt extends k{constructor(e,{onstart:t,onprogress:n,size:r,onend:s},{chunkSize:a}){let i=0;super({start(){t&&_t(t,r)},async transform(e,t){i+=e.length,n&&await _t(n,i,r),t.enqueue(e)},flush(){e.size=i,s&&_t(s,i)}},{highWaterMark:1,size:()=>a})}}async function _t(e,...t){try{await e(...t)}catch(e){}}function yt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{const a=new ht(e,s);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:s}=a;return{signature:e,size:s}}finally{r()}})(e,t)}}function bt(e,{baseURL:t,chunkSize:r}){return e.interface||n.assign(e,{worker:zt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let r,s;const a=new _(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const r=new _((e=>n=e));return{writable:new E({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:r}})(e.writable);kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e)||n.assign(e,{reader:i.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:r})}}),e.interface}let xt=!0,St=!0;function zt(e,t,r){const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{i=new F(a)}catch(e){xt=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,a=new f(e);n.assign(a,{stack:t,code:r,name:s}),w(a)}else{if("pull"==r){const{value:e,done:n}=await l.read();kt({type:ft,value:e,done:n,messageId:a},t)}r==ft&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),"close"==r&&w(null,i)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,r))),i}function kt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:a}=e;const i=[];if(n&&(e.value=n.buffer,i.push(e.value)),s&&St?(r&&i.push(r),a&&i.push(a)):e.readable=e.writable=null,i.length)try{return t.postMessage(e,i),!0}catch(n){St=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}let vt=[];const Et=[];let Dt=0;function Rt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",Ft="HTTP Range not supported",At="Writer iterator completed too soon",Ct="GET",Wt="bytes",Nt=65536,Ut="writable";class It{constructor(){this.size=0}init(){this.initialized=!0}}class Ot extends It{get readable(){const e=this,{chunkSize:t=Nt}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await on(e,s+l,i.min(t,a-l),o)),l+t>a?r.close():this.chunkOffset+=t}});return n}}class Ht extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Lt extends Ot{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||r<n.size?n.blob.slice(e,r):n.blob;let a=await s.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,r)),new p(a)}}class Mt extends It{constructor(e){super();const t=new k,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Bt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Pt(e,t,r){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i})}async function Vt(e,t,n){const{url:r,useRangeHeader:a,forceRangeRequests:i}=e;if((e=>{const{baseURL:t}=ae(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(r)&&(a||i)){const{headers:r}=await t(Ct,e,Kt(e));if(!i&&r.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;const i=r.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Zt(e,t,n,r,s){const{useRangeHeader:a,forceRangeRequests:i,options:o}=e;if(a||i){const s=await r(Ct,e,Kt(e,t,n));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new p(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},jt(e),{Range:Wt+"="+t+"-"+(t+r-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const n=await t(Ct,e,jt(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,jt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(e,{options:t,url:r},s){const a=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},r){return new _(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),i.open(e,t),r)for(const e of n.entries(r))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class en extends Ot{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Bt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Ot{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let a,o=n;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await on(c,l,s)),a.set(await r.readUint8Array(e+s,t-s,n),s)}else a=await on(c,l,t);return r.lastDiskNumber=i.max(o,r.lastDiskNumber),a}}class nn extends It{constructor(e,t=4294967295){super();const r=this;let s,a,i;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=r;if(i)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),r.diskOffset+=s.size,r.diskNumber++,i=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(At);s=n,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await rn(s),a=n.writable,i=a.getWriter(),await this.write(t)}},async close(){await i.ready,await c()}});async function l(e){const t=e.length;t&&(await i.ready,await i.write(e),s.size+=t,r.size+=t,r.availableSize-=t)}async function c(){a.size=s.size,await i.close()}n.defineProperty(r,Ut,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function sn(e){return t.isArray(e)&&(e=new tn(e)),e instanceof v&&(e={readable:e}),e}function an(e){e.writable===Q&&typeof e.next==ee&&(e=new nn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,r){return e.readUint8Array(t,n,r)}const ln=tn,cn=nn,dn="diskNumberStart",un="lastModDate",fn="lastAccessDate",pn="creationDate",hn="internalFileAttribute",wn="externalFileAttribute",gn="msDosCompatible",mn="zip64",_n=["filename","rawFilename","compressedSize","uncompressedSize",un,"rawLastModDate","comment","rawComment",fn,pn,"offset",dn,dn,hn,wn,gn,mn,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class yn{constructor(e){_n.forEach((t=>this[t]=e[t]))}}const bn="File already exists",xn="Zip file comment exceeds 64KB",Sn="File entry comment exceeds 64KB",zn="File entry name exceeds 64KB",kn="Version exceeds 65535",vn="The strength must equal 1, 2, or 3",En="Extra field type exceeds 65535",Dn="Extra field data exceeds 64KB",Rn="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Tn=new p([7,0,2,0,65,69,3,0,0]);let Fn=0;const An=[];async function Cn(e,t){const n=e.getWriter();await n.ready,e.size+=Bn(t),await n.write(t),n.releaseLock()}function Wn(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nn(e,t,n,r){const s=t[n]===Q?e.options[n]:t[n];return s===Q?r:s}function Un(e,t,n){e.setUint8(t,n)}function In(e,t,n){e.setUint16(t,n,!0)}function On(e,t,n){e.setUint32(t,n,!0)}function Hn(e,t,n){e.setBigUint64(t,n,!0)}function Ln(e,t,n){e.set(t,n)}function Mn(e){return new g(e.buffer)}function Bn(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new p(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,c=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,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,i}},this.flush=()=>{let e,r,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new p(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}}),e.BlobReader=Lt,e.BlobWriter=Mt,e.Data64URIReader=class extends Ot{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:i.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new p(t),a=4*i.floor(e/3),o=atob(r.substring(a+n,4*i.ceil((e+t)/3)+n)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Ht{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=bn,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=xn,e.ERR_INVALID_ENCRYPTION_STRENGTH=vn,e.ERR_INVALID_ENTRY_COMMENT=Sn,e.ERR_INVALID_ENTRY_NAME=zn,e.ERR_INVALID_EXTRAFIELD_DATA=Dn,e.ERR_INVALID_EXTRAFIELD_TYPE=En,e.ERR_INVALID_VERSION=kn,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Rn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Ot,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Lt{constructor(e){super(new m([e],{type:"text/plain"}))}},e.TextWriter=class extends Mt{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new _(((s,a)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Ot{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Ht{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Ht,e.ZipWriter=class{constructor(e,t={}){e=an(e),n.assign(this,{writer:e,addSplitZipSignature:e instanceof nn,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,l={}){const c=this,{pendingAddFileCalls:d,config:u}=c;let m;Fn<u.maxWorkers?Fn++:await new _((e=>An.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(bn);return c.filenames.add(e),m=(async(e,r,l,c)=>{r=r.trim(),c.directory&&!r.endsWith("/")?r+="/":c.directory=r.endsWith("/");const d=ue(r);if(Bn(d)>Y)throw new f(zn);const u=c.comment||"",m=ue(u);if(Bn(m)>Y)throw new f(Sn);const y=Nn(e,c,"version",20);if(y>Y)throw new f(kn);const b=Nn(e,c,"versionMadeBy",20);if(b>Y)throw new f(kn);const x=Nn(e,c,un,new o),S=Nn(e,c,fn),z=Nn(e,c,pn),k=Nn(e,c,gn,!0),v=Nn(e,c,hn,0),E=Nn(e,c,wn,0),D=Nn(e,c,"password"),R=Nn(e,c,"encryptionStrength",3),T=Nn(e,c,"zipCrypto"),F=Nn(e,c,"extendedTimestamp",!0),A=Nn(e,c,"keepOrder",!0),C=Nn(e,c,"level"),W=Nn(e,c,"useWebWorkers"),N=Nn(e,c,"bufferedWrite"),U=Nn(e,c,"dataDescriptorSignature",!1),I=Nn(e,c,"signal"),O=Nn(e,c,"useCompressionStream");let H=Nn(e,c,"dataDescriptor",!0),L=Nn(e,c,mn);if(D!==Q&&R!==Q&&(1>R||R>3))throw new f(vn);let M=new p;const{extraField:B}=c;if(B){let e=0,t=0;B.forEach((t=>e+=4+Bn(t))),M=new p(e),B.forEach(((e,n)=>{if(n>Y)throw new f(En);if(Bn(e)>Y)throw new f(Dn);Ln(M,new h([n]),t),Ln(M,new h([Bn(e)]),t+2),Ln(M,e,t+4),t+=4+Bn(e)}))}let q=0,P=0,V=0;const Z=!0===L;l&&(l=sn(l),await rn(l),l.size===Q?(H=!0,(L||L===Q)&&(L=!0,V=q=X)):(V=l.size,q=(e=>e+5*(i.floor(e/16383)+1))(V)));const{diskOffset:K,diskNumber:j,maxSize:$}=e.writer,ee=Z||V>=X,te=Z||q>=X,ne=Z||e.offset+e.pendingEntriesSize-K>=X,re=Nn(e,c,"supportZip64SplitFile",!0)&&Z||j+i.ceil(e.pendingEntriesSize/$)>=Y;if(ne||ee||te||re){if(!1===L||!A)throw new f(Rn);L=!0}L=L||!1;const se=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,password:a,level:o,zip64:l,zipCrypto:c,dataDescriptor:d,directory:u,rawExtraField:f,encryptionStrength:h,extendedTimestamp:g}=e,m=0!==o&&!u,_=!(!a||!Bn(a));let y,b,x,S,z=e.version;if(_&&!c){y=new p(Bn(Tn)+2);const e=Mn(y);In(e,0,39169),Ln(y,Tn,2),Un(e,8,h)}else y=new p;if(g){x=new p(9+(r?4:0)+(s?4:0));const e=Mn(x);In(e,0,21589),In(e,2,Bn(x)-4),S=1+(r?2:0)+(s?4:0),Un(e,4,S);let t=5;On(e,t,i.floor(n.getTime()/1e3)),t+=4,r&&(On(e,t,i.floor(r.getTime()/1e3)),t+=4),s&&On(e,t,i.floor(s.getTime()/1e3));try{b=new p(36);const e=Mn(b),t=Wn(n);In(e,0,10),In(e,2,32),In(e,8,1),In(e,10,24),Hn(e,12,t),Hn(e,20,Wn(r)||t),Hn(e,28,Wn(s)||t)}catch(e){b=new p}}else b=x=new p;let k=2048;d&&(k|=8);let v=0;m&&(v=8),l&&(z=z>45?z:45),_&&(k|=1,c||(z=z>51?z:51,v=99,m&&(y[9]=8)));const E=new p(26),D=Mn(E);In(D,0,z),In(D,2,k),In(D,4,v);const R=new w(1),T=Mn(R);let F;F=J>n?J:n>G?G:n,In(T,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),In(T,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const A=R[0];On(D,6,A),In(D,22,Bn(t));const C=Bn(y,x,b,f);In(D,24,C);const W=new p(30+Bn(t)+C);return On(Mn(W),0,67324752),Ln(W,E,4),Ln(W,t,30),Ln(W,y,30+Bn(t)),Ln(W,x,30+Bn(t,y)),Ln(W,b,30+Bn(t,y,x)),Ln(W,f,30+Bn(t,y,x,b)),{localHeaderArray:W,headerArray:E,headerView:D,lastModDate:n,rawLastModDate:A,encrypted:_,compressed:m,version:z,compressionMethod:v,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y,extraFieldLength:C}})(c=n.assign({},c,{rawFilename:d,rawComment:m,version:y,versionMadeBy:b,lastModDate:x,lastAccessDate:S,creationDate:z,rawExtraField:M,zip64:L,zip64UncompressedSize:ee,zip64CompressedSize:te,zip64Offset:ne,zip64DiskNumberStart:re,password:D,level:C,useWebWorkers:W,encryptionStrength:R,extendedTimestamp:F,zipCrypto:T,bufferedWrite:N,keepOrder:A,dataDescriptor:H,dataDescriptorSignature:U,signal:I,msDosCompatible:k,internalFileAttribute:v,externalFileAttribute:E,useCompressionStream:O})),ae=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new p,i=0;return n&&(a=new p(t?r?24:20:r?16:12),s=Mn(a),r&&(i=4,On(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),ie=Bn(se.localHeaderArray,ae.dataDescriptorArray);let oe;P=ie+q,e.options.usdz&&(P+=P+64),e.pendingEntriesSize+=P;try{oe=await(async(e,r,o,l,c)=>{const{files:d,writer:u}=e,{keepOrder:h,dataDescriptor:w,signal:m}=c,{headerInfo:y}=l,{usdz:b}=e.options,x=t.from(d.values()).pop();let S,z,k,v,E,D,R={};d.set(r,R);try{let t;h&&(t=x&&x.lock,R.lock=new _((e=>k=e))),!(c.bufferedWrite||e.writerLocked||e.bufferedWrites&&h)&&w||b?(D=u,await T()):(D=new Mt,D.writable.size=0,S=!0,e.bufferedWrites++,await rn(u)),await rn(D);const{writable:y}=u;let{diskOffset:A}=u;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);On(Mn(t),0,134695760),await Cn(y,t),e.offset+=4}S||(await t,await F(y));const{diskNumber:C}=u;if(E=!0,R.diskNumberStart=C,b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,a=Mn(r),i=64-(t+r.length)%64;4>i&&(i+=64);const o=new p(i),l=Mn(o);In(l,0,6534),In(l,2,i-2);const c=r;n.localHeaderArray=r=new p(c.length+i),Ln(r,c),Ln(r,o,c.length),a=Mn(r),In(a,28,s+i),e.metadataSize+=i})(l,e.offset),R=await(async(e,t,{diskNumberStart:r,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:g,lastModDate:m,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:D}=u,{dataDescriptorArray:R}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,level:W,zip64:N,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H,zipCrypto:L,dataDescriptor:M,directory:B,versionMadeBy:q,rawComment:P,rawExtraField:V,useWebWorkers:Z,onstart:K,onprogress:j,onend:Y,signal:G,encryptionStrength:J,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,useCompressionStream:re}=d,se={lock:o,versionMadeBy:q,zip64:N,directory:!!B,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:P,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:D,rawExtraField:V,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,diskNumberStart:r};let ae,ie=0,oe=0;const{writable:le}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cn(le,w);const t=e.readable,n=t.size=e.size,r={options:{codecType:pt,level:W,password:C,encryptionStrength:J,zipCrypto:b&&L,passwordVerification:b&&L&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:Z,useCompressionStream:re,transferStreams:!1},config:c,streamOptions:{signal:G,size:n,onstart:K,onprogress:j,onend:Y}},a=await(async(e,t)=>{const{options:n,config:r}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:p,terminateWorkerTimeout:h}=r;t.transferStreams=a||a===Q;const w=!(c||d||u||t.transferStreams);let g;t.useWebWorkers=!w&&(i||i===Q&&r.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===Q&&r.useCompressionStream;const m=vt.find((e=>!e.busy));if(m)Rt(m),g=new gt(m,e,t,y);else if(vt.length<p){const n={indexWorker:Dt};Dt++,vt.push(n),g=new gt(n,e,t,y)}else g=await new _((n=>Et.push({resolve:n,stream:e,workerOptions:t})));return g.run();function y(e){if(Et.length){const[{resolve:t,stream:n,workerOptions:r}]=Et.splice(0,1);t(new gt(e,n,r,y))}else e.worker?(Rt(e),s.isFinite(h)&&h>=0&&(e.terminateTimeout=setTimeout((()=>{vt=vt.filter((t=>t!=e)),e.terminate()}),h))):vt=vt.filter((t=>t!=e))}})({readable:t,writable:le},r);le.size+=a.size,ae=a.signature,oe=e.size=t.size,ie=a.size}else await Cn(le,w);let ce;if(N){let e=4;U&&(e+=8),I&&(e+=8),O&&(e+=8),H&&(e+=4),ce=new p(e)}else ce=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:g,dataDescriptor:m}=t;if(d&&!g||n===Q||(On(c,10,n),m&&On(u,f,n)),p){const e=Mn(r);In(e,0,1),In(e,2,r.length-4);let t=4;h&&(On(c,18,X),Hn(e,t,a(i)),t+=8),w&&(On(c,14,X),Hn(e,t,a(s))),m&&(Hn(u,f+4,a(s)),Hn(u,f+12,a(i)))}else On(c,14,s),On(c,18,i),m&&(On(u,f+4,s),On(u,f+8,i))})({signature:ae,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:oe,headerInfo:u,dataDescriptorInfo:f},d),M&&await Cn(le,R),n.assign(se,{uncompressedSize:oe,compressedSize:ie,lastModDate:m,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,length:h+ie,compressionMethod:z,version:S,headerArray:g,signature:ae,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H}),se})(o,D,R,l,e.config,c),E=!1,d.set(r,R),R.filename=r,S){await D.writable.getWriter().close();let e=await D.getData();await t,await T(),v=!0,w||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new g(s);return e.encrypted&&!r||On(a,14,e.signature),e.zip64?(On(a,18,X),On(a,22,X)):(On(a,18,e.compressedSize),On(a,22,e.uncompressedSize)),await Cn(n,new p(s)),t.slice(s.byteLength)})(R,e,y,c)),await F(y),R.diskNumberStart=u.diskNumber,A=u.diskOffset,await e.stream().pipeTo(y,{preventClose:!0,preventAbort:!0,signal:m}),y.size+=e.size,v=!1}if(R.offset=e.offset-A,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Mn(n);let u=4;i&&(u+=8),o&&(u+=8),l&&(Hn(d,u,a(r)),u+=8),c&&On(d,u,s)})(R,c);else if(R.offset>=X)throw new f(Rn);return e.offset+=R.length,R}catch(t){if(S&&v||!S&&E){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}S?e.offset+=D.writable.size:e.offset=D.writable.size}throw d.delete(r),t}finally{S&&e.bufferedWrites--,k&&k(),z&&z()}async function T(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function F(e){y.localHeaderArray.length>u.availableSize&&(u.availableSize=0,await Cn(e,new p))}})(e,r,l,{headerInfo:se,dataDescriptorInfo:ae,metadataSize:ie},c)}finally{e.pendingEntriesSize-=P}return n.assign(oe,{name:r,comment:u,extraField:B}),new yn(oe)})(c,e,r,l),d.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{d.delete(m);const e=An.shift();e?e():Fn--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await _.all(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Mn(u);In(e,0,21589),In(e,2,5),Un(e,4,c),On(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Bn(t,s,n,r,a,u,o)}const m=new p(h),_=Mn(m);await rn(o);let y=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:g,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=n,C=Bn(i,l,d,f,p);On(_,u,33639248),In(_,u+4,w);const W=Mn(g);S||On(W,18,F),z||On(W,14,A),Ln(m,g,u+6),In(_,u+30,C),In(_,u+32,Bn(h)),In(_,u+34,x&&k?Y:T),In(_,u+36,D),R?On(_,u+38,R):b&&E&&Un(_,u+38,16),On(_,u+42,x&&v?X:t),Ln(m,a,u+46),Ln(m,i,u+46+Bn(a)),Ln(m,l,u+46+Bn(a,i)),Ln(m,d,u+46+Bn(a,i,l)),Ln(m,f,u+46+Bn(a,i,l,d)),Ln(m,p,u+46+Bn(a,i,l,d,f)),Ln(m,h,u+46+Bn(a)+C);const N=46+Bn(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cn(c,m.slice(y,u)),y=u),u+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new yn(n))}catch(e){}}await Cn(c,y?m.slice(y):m);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nn(e,r,"zip64");if(!(X>w&&X>h&&Y>g&&Y>b)){if(!1===S)throw new f(Rn);S=!0}const z=new p(S?98:22),k=Mn(z);u=0,S&&(On(k,0,101075792),Hn(k,4,a(44)),In(k,12,45),In(k,14,45),On(k,16,b),On(k,20,d),Hn(k,24,a(g)),Hn(k,32,a(g)),Hn(k,40,a(h)),Hn(k,48,a(w)),On(k,56,117853008),Hn(k,64,a(w)+a(h)),On(k,72,b+1),Nn(e,r,"supportZip64SplitFile",!0)&&(b=Y,d=Y),g=Y,w=X,h=X,u+=76),On(k,u,101010256),In(k,u+4,b),In(k,u+6,d),In(k,u+8,g),In(k,u+10,g),On(k,u+12,h),On(k,u+16,w);const v=Bn(n);if(v){if(v>Y)throw new f(xn);In(k,u+20,v)}await Cn(c,z),v&&await Cn(c,n)})(this,e,n),Nn(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sn,e.initStream=rn,e.initWriter=an,e.readUint8Array=on,e.terminateWorkers=()=>{vt.forEach((e=>{Rt(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})})); |
@@ -1,1 +0,1 @@ | ||
((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{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:h,Uint16Array:_,Uint32Array:w,DataView:p,Blob:b,Promise:g,TextEncoder:m,TextDecoder:y,document:x,crypto:k,btoa:v,TransformStream:S,ReadableStream:R,WritableStream:z,CompressionStream:D,DecompressionStream:E,navigator:T,Worker:A}="undefined"!=typeof globalThis?globalThis:this||self,C=-2,F=-3,U=-5,W=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],O=[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],L=[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],N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],I=[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],P=[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],H=[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 M(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,d,u,f,h,_){let w,p,b,g,m,y,x,k,v,S,R,z,D,E,T;S=0,m=s;do{n[e[t+S]]++,S++,m--}while(0!==m);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),u[0]=k,E=1<<y;m>y;y++,E<<=1)if(0>(E-=n[y]))return F;if(0>(E-=n[m]))return F;for(n[m]+=E,a[1]=y=0,S=1,D=2;0!=--m;)a[D]=y+=n[S],D++,S++;m=0,S=0;do{0!==(y=e[t+S])&&(_[a[y]++]=m),S++}while(++m<s);for(s=a[b],a[0]=m=0,S=0,g=-1,z=-k,r[0]=0,R=0,T=0;b>=x;x++)for(w=n[x];0!=w--;){for(;x>z+k;){if(g++,z+=k,T=b-z,T=T>k?k:T,(p=1<<(y=x-z))>w+1&&(p-=w+1,D=x,T>y))for(;++y<T&&(p<<=1)>n[++D];)p-=n[D];if(T=1<<y,h[0]+T>1440)return F;r[g]=R=h[0],h[0]+=T,0!==g?(a[g]=m,i[0]=y,i[1]=k,y=m>>>z-k,i[2]=R-r[g-1]-y,f.set(i,3*(r[g-1]+y))):d[0]=R}for(i[1]=x-z,s>S?_[S]<o?(i[0]=256>_[S]?0:96,i[2]=_[S++]):(i[0]=c[_[S]-o]+16+64,i[2]=l[_[S++]-o]):i[0]=192,p=1<<x-z,y=m>>>z;T>y;y+=p)f.set(i,3*(R+y));for(y=1<<x-1;0!=(m&y);y>>>=1)m^=y;for(m^=y,v=(1<<z)-1;(m&v)!=a[g];)g--,z-=k,v=(1<<z)-1}return 0!==E&&1!=b?U:0}function o(s){let o;for(e||(e=[],t=[],n=new Int32Array(16),i=[],r=new Int32Array(15),a=new Int32Array(16)),t.length<s&&(t=[]),o=0;s>o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==F?l.msg="oversubscribed dynamic bit lengths tree":c!=U&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=F),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,d,u,f)=>{let h;return o(288),e[0]=0,h=s(r,0,n,257,N,I,c,a,u,e,t),0!=h||0===a[0]?(h==F?f.msg="oversubscribed literal/length tree":-4!=h&&(f.msg="incomplete literal/length tree",h=F),h):(o(288),h=s(r,n,i,0,P,H,d,l,u,e,t),0!=h||0===l[0]&&n>257?(h==F?f.msg="oversubscribed distance tree":h==U?(f.msg="incomplete distance tree",h=F):-4!=h&&(f.msg="empty distance tree with lengths",h=F),h):0)}}function B(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,f=0,h=0,_=0;function w(e,t,n,i,r,a,s,o){let l,c,d,u,f,h,_,w,p,b,g,m,y,x,k,v;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,b=p<s.read?s.read-p-1:s.end-p,g=W[e],m=W[t];do{for(;20>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;if(l=f&g,c=n,d=i,v=3*(d+l),0!==(u=c[v]))for(;;){if(f>>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15,y=c[v+2]+(f&W[u]),f>>=u,h-=u;15>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;for(l=f&m,c=r,d=a,v=3*(d+l),u=c[v];;){if(f>>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15;u>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;if(x=c[v+2]+(f&W[u]),f>>=u,h-=u,b-=y,x>p){k=p-x;do{k+=s.end}while(0>k);if(u=s.end-k,y>u){if(y-=u,p-k>0&&u>p-k)do{s.win[p++]=s.win[k++]}while(0!=--u);else s.win.set(s.win.subarray(k,k+u),p),p+=u,k+=u,u=0;k=0}}else k=p-x,p-k>0&&2>p-k?(s.win[p++]=s.win[k++],s.win[p++]=s.win[k++],y-=2):(s.win.set(s.win.subarray(k,k+2),p),p+=2,k+=2,y-=2);if(p-k>0&&y>p-k)do{s.win[p++]=s.win[k++]}while(0!=--y);else s.win.set(s.win.subarray(k,k+y),p),p+=y,k+=y,y=0;break}if(0!=(64&u))return o.msg="invalid distance code",y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,F;l+=c[v+2],l+=f&W[u],v=3*(d+l),u=c[v]}break}if(0!=(64&u))return 0!=(32&u)?(y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,F);if(l+=c[v+2],l+=f&W[u],v=3*(d+l),0===(u=c[v])){f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--;break}}else f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--}while(b>=258&&w>=10);return y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}e.init=(e,a,s,o,l,c)=>{t=0,u=e,f=a,i=s,h=o,r=l,_=c,n=null},e.proc=(e,p,b)=>{let g,m,y,x,k,v,S,R=0,z=0,D=0;for(D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k<e.read?e.read-k-1:e.end-k;;)switch(t){case 0:if(v>=258&&x>=10&&(e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,b=w(u,f,i,h,r,_,e,p),D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k<e.read?e.read-k-1:e.end-k,0!=b)){t=1==b?7:9;break}o=u,n=i,s=h,t=1;case 1:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}if(m=3*(s+(R&W[g])),R>>>=n[m+1],z-=n[m+1],y=n[m],0===y){l=n[m+2],t=6;break}if(0!=(16&y)){c=15&y,a=n[m+2],t=2;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}if(0!=(32&y)){t=7;break}return t=9,p.msg="invalid literal/length code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 2:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}a+=R&W[g],R>>=g,z-=g,o=f,n=r,s=_,t=3;case 3:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}if(m=3*(s+(R&W[g])),R>>=n[m+1],z-=n[m+1],y=n[m],0!=(16&y)){c=15&y,d=n[m+2],t=4;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}return t=9,p.msg="invalid distance code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 4:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}d+=R&W[g],R>>=g,z-=g,t=5;case 5:for(S=k-d;0>S;)S+=e.end;for(;0!==a;){if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v&&(e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v)))return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);e.win[k++]=e.win[S++],v--,S==e.end&&(S=0),a--}t=0;break;case 6:if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v&&(e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v)))return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,e.win[k++]=l,v--,t=0;break;case 7:if(z>7&&(z-=8,x++,D--),e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,e.read!=e.write)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);t=8;case 8:return b=1,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 9:return b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);default:return b=C,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b)}},e.free=()=>{}}M.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=O,i[0]=L,0);const q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function V(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],d=new B;let u=0,f=new Int32Array(4320);const _=new M;n.bitk=0,n.bitb=0,n.win=new h(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&d.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let h,w,p,b,g,m,y,x;for(b=e.next_in_index,g=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,y=m<n.read?n.read-m-1:n.end-m;;){let k,v,S,R,z,D,E,T;switch(r){case 0:for(;3>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}switch(h=7&w,u=1&h,h>>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:k=[],v=[],S=[[]],R=[[]],M.inflate_trees_fixed(k,v,S,R),d.init(k[0],v[0],S[0],0,R[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,e.msg="invalid block type",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if((~w>>>16&65535)!=(65535&w))return r=9,e.msg="invalid stored block lengths",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===y&&(m==n.end&&0!==n.read&&(m=0,y=m<n.read?n.read-m-1:n.end-m),0===y&&(n.write=m,t=n.inflate_flush(e,t),m=n.write,y=m<n.read?n.read-m-1:n.end-m,m==n.end&&0!==n.read&&(m=0,y=m<n.read?n.read-m-1:n.end-m),0===y)))return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(t=0,h=a,h>g&&(h=g),h>y&&(h=y),n.win.set(e.read_buf(b,h),m),b+=h,g-=h,m+=h,y-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;14>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(s=h=16383&w,(31&h)>29||(h>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(x=0;h>x;x++)i[x]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}i[q[o++]]=7&w,w>>>=3,p-=3}for(;19>o;)i[q[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,c,f,e),0!=h)return(t=h)==F&&(i=null,r=9),n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;h=s,258+(31&h)+(h>>5&31)>o;){let a,d;for(h=l[0];h>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(h=f[3*(c[0]+(w&W[h]))+1],d=f[3*(c[0]+(w&W[h]))+2],16>d)w>>>=h,p-=h,i[o++]=d;else{for(x=18==d?7:d-14,a=18==d?11:3;h+x>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(w>>>=h,p-=h,a+=w&W[x],w>>>=x,p-=x,x=o,h=s,x+a>258+(31&h)+(h>>5&31)||16==d&&1>x)return i=null,r=9,e.msg="invalid bit length repeat",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d=16==d?i[x-1]:0;do{i[x++]=d}while(0!=--a);o=x}}if(c[0]=-1,z=[],D=[],E=[],T=[],z[0]=9,D[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,D,E,T,f,e),0!=h)return h==F&&(i=null,r=9),t=h,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d.init(z[0],D[0],f,E[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),b=e.next_in_index,g=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,y=m<n.read?n.read-m-1:n.end-m,0===u){r=0;break}r=7;case 7:if(n.write=m,t=n.inflate_flush(e,t),m=n.write,y=m<n.read?n.read-m-1:n.end-m,n.read!=n.write)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);r=8;case 8:return t=1,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);case 9:return t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);default:return t=C,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}}},n.free=e=>{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const K=13,Z=[0,0,255,255];function j(){const e=this;function t(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):C}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),C):(e.wbits=i,n.istate.blocks=new V(n,1<<i),t(n),0)),e.inflate=(e,t)=>{let n,i;if(!e||!e.istate||!e.next_in)return C;const r=e.istate;for(t=4==t?U:0,n=U;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=K,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=K,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=K,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=K,e.msg="need dictionary",r.marker=0,C;case 7:if(n=r.blocks.proc(e,n),n==F){r.mode=K,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case K:return F;default:return C}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return C;const a=e.istate;return r<1<<a.wbits||(r=(1<<a.wbits)-1,i=n-r),a.blocks.set_dictionary(t,i,r),a.mode=7,0},e.inflateSync=e=>{let n,i,r,a,s;if(!e||!e.istate)return C;const o=e.istate;if(o.mode!=K&&(o.mode=K,o.marker=0),0===(n=e.avail_in))return U;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==Z[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?F:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():C}function G(){}G.prototype={inflateInit(e){const t=this;return t.istate=new j,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):C},inflateEnd(){const e=this;if(!e.istate)return C;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):C},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):C},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const X=4294967295,Y=65535,J=33639248,Q=101075792,$=void 0,ee="undefined",te="function";class ne{constructor(e){return class extends S{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let ie=2;try{typeof T!=ee&&T.hardwareConcurrency&&(ie=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ie,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof D!=ee&&D,DecompressionStreamNative:typeof E!=ee&&E},ae=n.assign({},re);function se(){return ae}function oe(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:h}=e;if(le("baseURL",n),le("chunkSize",i),le("maxWorkers",r),le("terminateWorkerTimeout",a),le("useCompressionStream",s),le("useWebWorkers",o),l&&(ae.CompressionStream=new ne(l)),c&&(ae.DecompressionStream=new ne(c)),le("CompressionStream",d),le("DecompressionStream",u),h!==$){const{deflate:e,inflate:n}=h;if((e||n)&&(ae.workerScripts||(ae.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");ae.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");ae.workerScripts.inflate=n}}}function le(e,t){t!==$&&(ae[e]=t)}const ce=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ce[e]=t}class de{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^ce[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class ue extends S{constructor(){let e;const t=new de;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new h(4);new p(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=fe.getPartial(n);return 32===i?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>s.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=fe.getPartial(r);return i.push(fe.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},he={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new h(t);let i;for(let r=0;t>r;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(fe.partial(8*(3&n),i)),t}}},_e=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=he.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),i=t._length,r=t._length=i+fe.bitLength(e);if(r>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<<e|t>>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+r[e]+n._key[s.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||s.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},pe={importKey:e=>new pe.hmacSha1(he.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const d=new ArrayBuffer(r),u=new p(d);let h=0;const _=fe;for(t=he.bytes.toBits(t),c=1;(r||1)>h;c++){for(a=s=e.encrypt(_.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>h&&o<a.length;o++)u.setInt32(h,a[o]),h+=4}return d.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=_e,i=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;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}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},be=void 0!==k&&"function"==typeof k.getRandomValues,ge="Invalid password",me="Invalid signature",ye="zipjs-abort-check-password";function xe(e){return be?k.getRandomValues(e):we.getRandomValues(e)}const ke=16,ve={name:"PBKDF2"},Se=n.assign({hash:{name:"HMAC"}},ve),Re=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ve),ze=["deriveBits"],De=[8,12,16],Ee=[16,24,32],Te=10,Ae=[0,0,0,0],Ce="undefined",Fe="function",Ue=typeof k!=Ce,We=Ue&&k.subtle,Oe=Ue&&typeof We!=Ce,Le=he.bytes,Ne=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,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;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^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?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,l,c;for(let e=0;256>e;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,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("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],l=a[2],c=a[3],d=a[4];let u,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)u=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^c[255&g]^n[m],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&w]^n[m+1],_=s[b>>>24]^o[g>>16&255]^l[w>>8&255]^c[255&p]^n[m+2],g=s[g>>>24]^o[w>>16&255]^l[p>>8&255]^c[255&b]^n[m+3],m+=4,w=u,p=h,b=_;for(let e=0;4>e;e++)r[t?3&-e:e]=d[w>>>24]<<24^d[p>>16&255]<<16^d[b>>8&255]<<8^d[255&g]^n[m++],u=w,w=p,p=b,b=g,g=u;return r}},Ie=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=fe.bitLength(t);for(let r=0;i>r;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 fe.clamp(t,r)}},Pe=pe.hmacSha1;let He=Ue&&Oe&&typeof We.importKey==Fe,Me=Ue&&Oe&&typeof We.deriveBits==Fe;class Be extends S{constructor({password:e,signed:t,encryptionStrength:i,checkPasswordOnly:r}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,signed:t,strength:i-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:a,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await Ke(e,t,n,je(i,0,De[t])),a=je(i,De[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(ge)})(n,a,i,je(e,0,De[a]+2)),e=je(e,De[a]+2),r?t.error(new f(ye)):s()):await o;const l=new h(e.length-Te-(e.length-Te)%ke);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;await a;const s=je(r,0,r.length-Te),o=je(r,r.length-Te);let l=new h;if(s.length){const e=Xe(Le,s);i.update(e);const t=n.update(e);l=Ge(Le,t)}if(t){const e=je(Ge(Le,i.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(me)}e.enqueue(l)}})}}class qe extends S{constructor({password:e,encryptionStrength:t}){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new h;i?(o=await(async(e,t,n)=>{const i=xe(new h(De[t]));return Ze(i,await Ke(e,t,n,i))})(n,r,i),a()):await s;const l=new h(o.length+e.length-e.length%ke);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:a}=this;await a;let s=new h;if(r.length){const e=t.update(Xe(Le,r));n.update(e),s=Ge(Le,e)}i.signature=Ge(Le,n.digest()).slice(0,Te),e.enqueue(Ze(s,i.signature))}}),i=this}}function Ve(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let d;for(l.length&&(t=Ze(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new h(t)).set(n,0)}return e})(n,c-c%ke)),d=0;c-ke>=d;d+=ke){const e=Xe(Le,je(t,d,d+ke));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(Ge(Le,r),d+i)}return e.pending=je(t,d),n}async function Ke(e,i,r,a){e.password=null;const s=(e=>{if(void 0===m){const t=new h((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new m).encode(e)})(r),o=await(async(e,t,n,i,r)=>{if(!He)return pe.importKey(t);try{return await We.importKey("raw",t,n,!1,r)}catch(e){return He=!1,pe.importKey(t)}})(0,s,Se,0,ze),l=await(async(e,t,n)=>{if(!Me)return pe.pbkdf2(t,e.salt,Re.iterations,n);try{return await We.deriveBits(e,t,n)}catch(i){return Me=!1,pe.pbkdf2(t,e.salt,Re.iterations,n)}})(n.assign({salt:a},Re),o,8*(2*Ee[i]+2)),c=new h(l),d=Xe(Le,je(c,0,Ee[i])),u=Xe(Le,je(c,Ee[i],2*Ee[i])),f=je(c,2*Ee[i]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new Ie(new Ne(d),t.from(Ae)),hmac:new Pe(u)}),f}function Ze(e,t){let n=e;return e.length+t.length&&(n=new h(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Ge(e,t){return e.fromBits(t)}function Xe(e,t){return e.toBits(t)}class Ye extends S{constructor({password:e,passwordVerification:t,checkPasswordOnly:i}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(ge);e=e.subarray(12)}i?t.error(new f(ye)):t.enqueue(Qe(n,e))}})}}class Je extends S{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=xe(new h(12));t[11]=n.passwordVerification,i=new h(e.length+t.length),i.set($e(n,t),0),r=12}else i=new h(e.length),r=0;i.set($e(n,e),r),t.enqueue(i)}})}}function Qe(e,t){const n=new h(t.length);for(let i=0;i<t.length;i++)n[i]=nt(e)^t[i],tt(e,n[i]);return n}function $e(e,t){const n=new h(t.length);for(let i=0;i<t.length;i++)n[i]=nt(e)^t[i],tt(e,t[i]);return n}function et(e,t){const i=[305419896,591751049,878082192];n.assign(e,{keys:i,crcKey0:new de(i[0]),crcKey2:new de(i[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,i,r]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=rt(s.imul(rt(i+it(n)),134775813)+1),e.crcKey2.append([i>>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function nt(e){const t=2|e.keys[2];return it(s.imul(t,1^t)>>>8)}function it(e){return 255&e}function rt(e){return 4294967295&e}const at="deflate-raw";class st extends S{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,h=lt(super.readable);a&&!o||!l||(u=new ue,h=ut(h,u)),r&&(h=dt(h,s,{level:c,chunkSize:t},i,n)),a&&(o?h=ut(h,new Je(e)):(f=new qe(e),h=ut(h,f))),ct(d,h,(async()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new p(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends S{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,h=lt(super.readable);a&&(r?h=ut(h,new Ye(e)):(u=new Be(e),h=ut(h,u))),l&&(h=dt(h,c,{chunkSize:t},i,n)),a&&!r||!s||(d=new ue,h=ut(h,d)),ct(this,h,(async()=>{if((!a||r)&&s){const e=new p(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(me)}}))}}function lt(e){return ut(e,new S({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,i){t=ut(t,new S({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,i,r){try{e=ut(e,new(t&&i?i:r)(at,n))}catch(i){if(!t)throw i;e=ut(e,new r(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",ht="inflate";class _t extends S{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=st:r.startsWith(ht)&&(a=ot);let s=0;const o=new a(e,t),l=super.readable,c=new S({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(i,{signature:e,size:s})}});n.defineProperty(i,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof A!=ee;class pt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new bt(t,s,a),{signal:u}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?yt:mt)(e,a)}}class bt extends S{constructor(e,{onstart:t,onprogress:n,size:i,onend:r},{chunkSize:a}){let s=0;super({start(){t&>(t,i)},async transform(e,t){s+=e.length,n&&await gt(n,s,i),t.enqueue(e)},flush(){e.size=s,r&>(r,s)}},{highWaterMark:1,size:()=>a})}}async function gt(e,...t){try{await e(...t)}catch(e){}}function mt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{const a=new _t(e,r);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:r}=a;return{signature:e,size:r}}finally{i()}})(e,t)}}function yt(e,{baseURL:t,chunkSize:i}){return e.interface||n.assign(e,{worker:vt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const i=new g((e=>n=e));return{writable:new z({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:i}})(e.writable);St({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e)||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:i})}}),e.interface}let xt=!0,kt=!0;function vt(e,t,i){const r={type:"module"};let a,s;typeof e==te&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{s=new A(a)}catch(e){xt=!1,s=new A(a,r)}else s=new A(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:_}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),w(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();St({type:ft,value:e,done:n,messageId:a},t)}i==ft&&(await c.ready,await c.write(new h(r)),St({type:"ack",messageId:a},t)),"close"==i&&w(null,s)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),_()}})(e,i))),s}function St(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(e.value=n.buffer,s.push(e.value)),r&&kt?(i&&s.push(i),a&&s.push(a)):e.readable=e.writable=null,s.length)try{return t.postMessage(e,s),!0}catch(n){kt=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),i(),e}}let Rt=[];const zt=[];let Dt=0;function Et(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",At="HTTP Range not supported",Ct="Writer iterator completed too soon",Ft="GET",Ut="bytes",Wt=65536,Ot="writable";class Lt{constructor(){this.size=0}init(){this.initialized=!0}}class Nt extends Lt{get readable(){const e=this,{chunkSize:t=Wt}=e,n=new R({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;i.enqueue(await on(e,r+l,s.min(t,a-l),o)),l+t>a?i.close():this.chunkOffset+=t}});return n}}class It extends Lt{constructor(){super();const e=this,t=new z({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ot,{get:()=>t})}writeUint8Array(){}}class Pt extends Nt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||i<n.size?n.blob.slice(e,i):n.blob;let a=await r.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,i)),new h(a)}}class Ht extends Lt{constructor(e){super();const t=new S,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,Ot,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:i}).blob()}getData(){return this.blob}}class Mt extends Nt{constructor(e,t){super(),qt(this,e,t)}async init(){await Vt(this,Qt,Gt),super.init()}readUint8Array(e,t){return Kt(this,e,t,Qt,Gt)}}class Bt extends Nt{constructor(e,t){super(),qt(this,e,t)}async init(){await Vt(this,$t,Xt),super.init()}readUint8Array(e,t){return Kt(this,e,t,$t,Xt)}}function qt(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s})}async function Vt(e,t,n){const{url:i,useRangeHeader:a,forceRangeRequests:s}=e;if((e=>{const{baseURL:t}=se(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(i)&&(a||s)){const{headers:i}=await t(Ft,e,Zt(e));if(!s&&i.get("Accept-Ranges")!=Ut)throw new f(At);{let a;const s=i.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===$?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Kt(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,options:o}=e;if(a||s){const r=await i(Ft,e,Zt(e,t,n));if(206!=r.status)throw new f(At);return new h(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,o),new h(e.data.subarray(t,t+n))}}function Zt(e,t=0,i=1){return n.assign({},jt(e),{Range:Ut+"="+t+"-"+(t+i-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Gt(e){await Yt(e,Qt)}async function Xt(e){await Yt(e,$t)}async function Yt(e,t){const n=await t(Ft,e,jt(e));e.data=new h(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,jt(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function Qt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(At):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(At):new f(Tt+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class en extends Nt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Bt(e,t):new Mt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Nt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],d=c.size;if(l+t>d){const r=d-l;a=new h(t),a.set(await on(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await on(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class nn extends Lt{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new z({async write(t){const{availableSize:n}=i;if(s)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),i.diskOffset+=r.size,i.diskNumber++,s=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(Ct);r=n,r.size=0,r.maxSize&&(i.maxSize=r.maxSize),i.availableSize=i.maxSize,await rn(r),a=n.writable,s=a.getWriter(),await this.write(t)}},async close(){await s.ready,await c()}});async function l(e){const t=e.length;t&&(await s.ready,await s.write(e),r.size+=t,i.size+=t,i.availableSize-=t)}async function c(){a.size=r.size,await s.close()}n.defineProperty(i,Ot,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function an(e){return t.isArray(e)&&(e=new tn(e)),e instanceof R&&(e={readable:e}),e}function sn(e){e.writable===$&&typeof e.next==te&&(e=new nn(e)),e instanceof z&&(e={writable:e});const{writable:t}=e;return t.size===$&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,i){return e.readUint8Array(t,n,i)}const ln=tn,cn=nn,dn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function un(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;n<e.length;n++)t+=dn[e[n]];return t}})(e):new y(t).decode(e)}const fn="filename",hn="rawFilename",_n="comment",wn="rawComment",pn="uncompressedSize",bn="compressedSize",gn="offset",mn="diskNumberStart",yn="lastModDate",xn="rawLastModDate",kn="lastAccessDate",vn="creationDate",Sn=[fn,hn,bn,pn,yn,xn,_n,wn,kn,vn,gn,mn,mn,"internalFileAttribute","externalFileAttribute","msDosCompatible","zip64","directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Rn{constructor(e){Sn.forEach((t=>this[t]=e[t]))}}const zn="File format is not recognized",Dn="End of central directory not found",En="End of Zip64 central directory not found",Tn="End of Zip64 central directory locator not found",An="Central directory header not found",Cn="Local file header not found",Fn="Zip64 extra field not found",Un="File contains encrypted entry",Wn="Encryption method not supported",On="Compression method not supported",Ln="Split zip file",Nn="utf-8",In="cp437",Pn=[[pn,X],[bn,X],[gn,X],[mn,Y]],Hn={[Y]:{getValue:Yn,bytes:4},[X]:{getValue:Jn,bytes:8}};class Mn{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,i={}){const a=this,{reader:s,offset:o,diskNumberStart:l,extraFieldAES:c,compressionMethod:d,config:u,bitFlag:_,signature:w,rawLastModDate:p,uncompressedSize:b,compressedSize:m}=a,y=a.localDirectory={},x=Qn(await on(s,o,30,l));let k=Kn(a,i,"password");if(k=k&&k.length&&k,c&&99!=c.originalCompressionMethod)throw new f(On);if(0!=d&&8!=d)throw new f(On);if(67324752!=Yn(x,0))throw new f(Cn);Bn(y,x,4),y.rawExtraField=y.extraFieldLength?await on(s,o+30+y.filenameLength,y.extraFieldLength,l):new h,await qn(a,y,x,4,!0),n.assign(t,{lastAccessDate:y.lastAccessDate,creationDate:y.creationDate});const v=a.encrypted&&y.encrypted,S=v&&!c;if(v){if(!S&&c.strength===$)throw new f(Wn);if(!k)throw new f(Un)}const R=o+30+y.filenameLength+y.extraFieldLength,D=m,E=s.readable;n.assign(E,{diskNumberStart:l,offset:R,size:D});const T=Kn(a,i,"signal"),A=Kn(a,i,"checkPasswordOnly");A&&(e=new z),e=sn(e),await rn(e,b);const{writable:C}=e,{onstart:F,onprogress:U,onend:W}=i,O={options:{codecType:ht,password:k,zipCrypto:S,encryptionStrength:c&&c.strength,signed:Kn(a,i,"checkSignature"),passwordVerification:S&&(_.dataDescriptor?p>>>8&255:w>>>24&255),signature:w,compressed:0!=d,encrypted:v,useWebWorkers:Kn(a,i,"useWebWorkers"),useCompressionStream:Kn(a,i,"useCompressionStream"),transferStreams:Kn(a,i,"transferStreams"),checkPasswordOnly:A},config:u,streamOptions:{signal:T,size:D,onstart:F,onprogress:U,onend:W}};let L=0;try{({outputSize:L}=await(async(e,t)=>{const{options:n,config:i}=t,{transferStreams:a,useWebWorkers:s,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:h,terminateWorkerTimeout:_}=i;t.transferStreams=a||a===$;const w=!(c||d||u||t.transferStreams);let p;t.useWebWorkers=!w&&(s||s===$&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===$&&i.useCompressionStream;const b=Rt.find((e=>!e.busy));if(b)Et(b),p=new pt(b,e,t,m);else if(Rt.length<h){const n={indexWorker:Dt};Dt++,Rt.push(n),p=new pt(n,e,t,m)}else p=await new g((n=>zt.push({resolve:n,stream:e,workerOptions:t})));return p.run();function m(e){if(zt.length){const[{resolve:t,stream:n,workerOptions:i}]=zt.splice(0,1);t(new pt(e,n,i,m))}else e.worker?(Et(e),r.isFinite(_)&&_>=0&&(e.terminateTimeout=setTimeout((()=>{Rt=Rt.filter((t=>t!=e)),e.terminate()}),_))):Rt=Rt.filter((t=>t!=e))}})({readable:E,writable:C},O))}catch(e){if(!A||e.message!=ye)throw e}finally{const e=Kn(a,i,"preventClose");C.size+=L,e||C.locked||await C.getWriter().close()}return A?void 0:e.getData?e.getData():C}}function Bn(e,t,i){const r=e.rawBitFlag=Xn(t,i+2),a=1==(1&r),s=Yn(t,i+6);n.assign(e,{encrypted:a,version:Xn(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Zn(s),filenameLength:Xn(t,i+22),extraFieldLength:Xn(t,i+24)})}async function qn(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,d=Qn(new h(s));let u=0;try{for(;u<s.length;){const e=Xn(d,u),t=Xn(d,u+2);c.set(e,{type:e,data:s.slice(u+4,u+4+t)}),u+=4+t}}catch(e){}const _=Xn(i,r+4);n.assign(t,{signature:Yn(i,r+10),uncompressedSize:Yn(i,r+18),compressedSize:Yn(i,r+14)});const w=c.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Qn(e.data),i=Pn.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r<i.length;r++){const[s,o]=i[r];if(t[s]==o){const i=Hn[o];t[s]=e[s]=i.getValue(n,a),a+=i.bytes}else if(e[s])throw new f(Fn)}})(w,t),t.extraFieldZip64=w);const p=c.get(28789);p&&(await Vn(p,fn,hn,t,e),t.extraFieldUnicodePath=p);const b=c.get(25461);b&&(await Vn(b,_n,wn,t,e),t.extraFieldUnicodeComment=b);const g=c.get(39169);g?(((e,t,i)=>{const r=Qn(e.data),a=Gn(r,4);n.assign(e,{vendorVersion:Gn(r,0),vendorId:Gn(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Xn(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const m=c.get(10);m&&(((e,t)=>{const i=Qn(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=Xn(i,a),n=Xn(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Qn(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:jn(a),lastAccessDate:jn(s),creationDate:jn(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(m,t),t.extraFieldNTFS=m);const y=c.get(21589);y&&(((e,t,n)=>{const i=Qn(e.data),r=Gn(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(yn),s.push(xn)),2==(2&r)&&(a.push(kn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push(vn),s.push("rawCreationDate"))):5>e.data.length||(a.push(yn),s.push(xn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Yn(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(y,t,a),t.extraFieldExtendedTimestamp=y)}async function Vn(e,t,i,r,a){const s=Qn(e.data),o=new de;o.append(a[i]);const l=Qn(new h(4));l.setUint32(0,o.get(),!0);const c=Yn(s,1);n.assign(e,{version:Gn(s,0),[t]:un(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Yn(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Kn(e,t,n){return t[n]===$?e.options[n]:t[n]}function Zn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function jn(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Gn(e,t){return e.getUint8(t)}function Xn(e,t){return e.getUint16(t,!0)}function Yn(e,t){return e.getUint32(t,!0)}function Jn(e,t){return r(e.getBigUint64(t,!0))}function Qn(e){return new p(e.buffer)}oe({Inflate:function(e){const t=new G,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new h(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,d=0,u=0;if(0!==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,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===U){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new h(i)):s.push(i.subarray(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new h(u),s.forEach((e=>{l.set(e,d),d+=e.length}))):l=s[0]?new h(s[0]):new h,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=Pt,e.BlobWriter=Ht,e.Data64URIReader=class extends Nt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new h(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends It{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=v(r):t.pending=r}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=zn,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=An,e.ERR_ENCRYPTED=Un,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Tn,e.ERR_EOCDR_NOT_FOUND=Dn,e.ERR_EOCDR_ZIP64_NOT_FOUND=En,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Fn,e.ERR_HTTP_RANGE=At,e.ERR_INVALID_PASSWORD=ge,e.ERR_INVALID_SIGNATURE=me,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Cn,e.ERR_SPLIT_ZIP_FILE=Ln,e.ERR_UNSUPPORTED_COMPRESSION=On,e.ERR_UNSUPPORTED_ENCRYPTION=Wn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Nt,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Pt{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends Ht{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends Nt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends It{init(e=0){n.assign(this,{offset:0,array:new h(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new h(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=It,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:an(e),options:t,config:se()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await rn(i),i.size!==$&&i.readUint8Array||(i=new Pt(await new d(i.readable).blob()),await rn(i)),22>i.size)throw new f(zn);i.chunkSize=(e=>s.max(e.chunkSize,64))(r);const a=await(async(e,t,n)=>{const i=new h(4);return Qn(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await on(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw 134695760==Yn(Qn(await on(i,0,4)))?new f(Ln):new f(Dn);const o=Qn(a);let l=Yn(o,12),c=Yn(o,16);const u=a.offset,_=Xn(o,20),w=u+22+_;let p=Xn(o,4);const b=i.lastDiskNumber||0;let m=Xn(o,6),y=Xn(o,8),x=0,k=0;if(c==X||l==X||y==Y||m==Y){const e=Qn(await on(i,a.offset-20,20));if(117853008!=Yn(e,0))throw new f(En);c=Jn(e,8);let t=await on(i,c,56,-1),n=Qn(t);const r=a.offset-20-56;if(Yn(n,0)!=Q&&c!=r){const e=c;c=r,x=c-e,t=await on(i,c,56,-1),n=Qn(t)}if(Yn(n,0)!=Q)throw new f(Tn);p==Y&&(p=Yn(n,16)),m==Y&&(m=Yn(n,20)),y==Y&&(y=Jn(n,32)),l==X&&(l=Jn(n,40)),c-=l}if(b!=p)throw new f(Ln);if(0>c||c>=i.size)throw new f(zn);let v=0,S=await on(i,c,l,m),R=Qn(S);if(l){const e=a.offset-l;if(Yn(R,v)!=J&&c!=e){const t=c;c=e,x=c-t,S=await on(i,c,l,m),R=Qn(S)}}const z=a.offset-c-(i.lastDiskOffset||0);if(l==z||0>z||(l=z,S=await on(i,c,l,m),R=Qn(S)),0>c||c>=i.size)throw new f(zn);const D=Kn(t,e,"filenameEncoding"),E=Kn(t,e,"commentEncoding");for(let a=0;y>a;a++){const o=new Mn(i,r,t.options);if(Yn(R,v)!=J)throw new f(An);Bn(o,R,v+6);const l=!!o.bitFlag.languageEncodingFlag,c=v+46,d=c+o.filenameLength,u=d+o.extraFieldLength,h=Xn(R,v+4),_=0==(0&h),w=S.subarray(c,d),p=Xn(R,v+32),b=u+p,m=S.subarray(u,b),z=l,T=l,A=_&&16==(16&Gn(R,v+38)),C=Yn(R,v+42)+x;n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:p,directory:A,offset:C,diskNumberStart:Xn(R,v+34),internalFileAttribute:Xn(R,v+36),externalFileAttribute:Yn(R,v+38),rawFilename:w,filenameUTF8:z,commentUTF8:T,rawExtraField:S.subarray(d,u)});const[F,U]=await g.all([un(w,z?Nn:D||In),un(m,T?Nn:E||In)]);n.assign(o,{rawComment:m,filename:F,comment:U,directory:A||F.endsWith("/")}),k=s.max(C,k),await qn(o,o,R,v+6);const W=new Rn(o);W.getData=(e,t)=>o.getData(e,W,t),v=b;const{onprogress:O}=e;if(O)try{await O(a+1,y,new Rn(o))}catch(e){}yield W}const T=Kn(t,e,"extractPrependedData"),A=Kn(t,e,"extractAppendedData");return T&&(t.prependedData=k>0?await on(i,0,k):new h),t.comment=_?await on(i,u+22,_):new h,A&&(t.appendedData=w<i.size?await on(i,w,i.size-w):new h),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=oe,e.getMimeType=()=>"application/octet-stream",e.initReader=an,e.initStream=rn,e.initWriter=sn,e.readUint8Array=on,e.terminateWorkers=()=>{Rt.forEach((e=>{Et(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})})); | ||
((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{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:h,Uint16Array:_,Uint32Array:w,DataView:p,Blob:b,Promise:g,TextEncoder:m,TextDecoder:y,document:x,crypto:k,btoa:v,TransformStream:S,ReadableStream:R,WritableStream:z,CompressionStream:D,DecompressionStream:E,navigator:T,Worker:A}="undefined"!=typeof globalThis?globalThis:this||self,C=-2,F=-3,U=-5,W=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],O=[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],L=[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],N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],I=[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],P=[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],H=[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 M(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,d,u,f,h,_){let w,p,b,g,m,y,x,k,v,S,R,z,D,E,T;S=0,m=s;do{n[e[t+S]]++,S++,m--}while(0!==m);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),u[0]=k,E=1<<y;m>y;y++,E<<=1)if(0>(E-=n[y]))return F;if(0>(E-=n[m]))return F;for(n[m]+=E,a[1]=y=0,S=1,D=2;0!=--m;)a[D]=y+=n[S],D++,S++;m=0,S=0;do{0!==(y=e[t+S])&&(_[a[y]++]=m),S++}while(++m<s);for(s=a[b],a[0]=m=0,S=0,g=-1,z=-k,r[0]=0,R=0,T=0;b>=x;x++)for(w=n[x];0!=w--;){for(;x>z+k;){if(g++,z+=k,T=b-z,T=T>k?k:T,(p=1<<(y=x-z))>w+1&&(p-=w+1,D=x,T>y))for(;++y<T&&(p<<=1)>n[++D];)p-=n[D];if(T=1<<y,h[0]+T>1440)return F;r[g]=R=h[0],h[0]+=T,0!==g?(a[g]=m,i[0]=y,i[1]=k,y=m>>>z-k,i[2]=R-r[g-1]-y,f.set(i,3*(r[g-1]+y))):d[0]=R}for(i[1]=x-z,s>S?_[S]<o?(i[0]=256>_[S]?0:96,i[2]=_[S++]):(i[0]=c[_[S]-o]+16+64,i[2]=l[_[S++]-o]):i[0]=192,p=1<<x-z,y=m>>>z;T>y;y+=p)f.set(i,3*(R+y));for(y=1<<x-1;0!=(m&y);y>>>=1)m^=y;for(m^=y,v=(1<<z)-1;(m&v)!=a[g];)g--,z-=k,v=(1<<z)-1}return 0!==E&&1!=b?U:0}function o(s){let o;for(e||(e=[],t=[],n=new Int32Array(16),i=[],r=new Int32Array(15),a=new Int32Array(16)),t.length<s&&(t=[]),o=0;s>o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==F?l.msg="oversubscribed dynamic bit lengths tree":c!=U&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=F),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,d,u,f)=>{let h;return o(288),e[0]=0,h=s(r,0,n,257,N,I,c,a,u,e,t),0!=h||0===a[0]?(h==F?f.msg="oversubscribed literal/length tree":-4!=h&&(f.msg="incomplete literal/length tree",h=F),h):(o(288),h=s(r,n,i,0,P,H,d,l,u,e,t),0!=h||0===l[0]&&n>257?(h==F?f.msg="oversubscribed distance tree":h==U?(f.msg="incomplete distance tree",h=F):-4!=h&&(f.msg="empty distance tree with lengths",h=F),h):0)}}function B(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,f=0,h=0,_=0;function w(e,t,n,i,r,a,s,o){let l,c,d,u,f,h,_,w,p,b,g,m,y,x,k,v;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,b=p<s.read?s.read-p-1:s.end-p,g=W[e],m=W[t];do{for(;20>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;if(l=f&g,c=n,d=i,v=3*(d+l),0!==(u=c[v]))for(;;){if(f>>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15,y=c[v+2]+(f&W[u]),f>>=u,h-=u;15>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;for(l=f&m,c=r,d=a,v=3*(d+l),u=c[v];;){if(f>>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15;u>h;)w--,f|=(255&o.read_byte(_++))<<h,h+=8;if(x=c[v+2]+(f&W[u]),f>>=u,h-=u,b-=y,x>p){k=p-x;do{k+=s.end}while(0>k);if(u=s.end-k,y>u){if(y-=u,p-k>0&&u>p-k)do{s.win[p++]=s.win[k++]}while(0!=--u);else s.win.set(s.win.subarray(k,k+u),p),p+=u,k+=u,u=0;k=0}}else k=p-x,p-k>0&&2>p-k?(s.win[p++]=s.win[k++],s.win[p++]=s.win[k++],y-=2):(s.win.set(s.win.subarray(k,k+2),p),p+=2,k+=2,y-=2);if(p-k>0&&y>p-k)do{s.win[p++]=s.win[k++]}while(0!=--y);else s.win.set(s.win.subarray(k,k+y),p),p+=y,k+=y,y=0;break}if(0!=(64&u))return o.msg="invalid distance code",y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,F;l+=c[v+2],l+=f&W[u],v=3*(d+l),u=c[v]}break}if(0!=(64&u))return 0!=(32&u)?(y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,F);if(l+=c[v+2],l+=f&W[u],v=3*(d+l),0===(u=c[v])){f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--;break}}else f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--}while(b>=258&&w>=10);return y=o.avail_in-w,y=y>h>>3?h>>3:y,w+=y,_-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}e.init=(e,a,s,o,l,c)=>{t=0,u=e,f=a,i=s,h=o,r=l,_=c,n=null},e.proc=(e,p,b)=>{let g,m,y,x,k,v,S,R=0,z=0,D=0;for(D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k<e.read?e.read-k-1:e.end-k;;)switch(t){case 0:if(v>=258&&x>=10&&(e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,b=w(u,f,i,h,r,_,e,p),D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k<e.read?e.read-k-1:e.end-k,0!=b)){t=1==b?7:9;break}o=u,n=i,s=h,t=1;case 1:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}if(m=3*(s+(R&W[g])),R>>>=n[m+1],z-=n[m+1],y=n[m],0===y){l=n[m+2],t=6;break}if(0!=(16&y)){c=15&y,a=n[m+2],t=2;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}if(0!=(32&y)){t=7;break}return t=9,p.msg="invalid literal/length code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 2:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}a+=R&W[g],R>>=g,z-=g,o=f,n=r,s=_,t=3;case 3:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}if(m=3*(s+(R&W[g])),R>>=n[m+1],z-=n[m+1],y=n[m],0!=(16&y)){c=15&y,d=n[m+2],t=4;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}return t=9,p.msg="invalid distance code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 4:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<<z,z+=8}d+=R&W[g],R>>=g,z-=g,t=5;case 5:for(S=k-d;0>S;)S+=e.end;for(;0!==a;){if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v&&(e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v)))return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);e.win[k++]=e.win[S++],v--,S==e.end&&(S=0),a--}t=0;break;case 6:if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v&&(e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,k==e.end&&0!==e.read&&(k=0,v=k<e.read?e.read-k-1:e.end-k),0===v)))return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,e.win[k++]=l,v--,t=0;break;case 7:if(z>7&&(z-=8,x++,D--),e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k<e.read?e.read-k-1:e.end-k,e.read!=e.write)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);t=8;case 8:return b=1,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 9:return b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);default:return b=C,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b)}},e.free=()=>{}}M.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=O,i[0]=L,0);const q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function V(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],d=new B;let u=0,f=new Int32Array(4320);const _=new M;n.bitk=0,n.bitb=0,n.win=new h(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&d.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let h,w,p,b,g,m,y,x;for(b=e.next_in_index,g=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,y=m<n.read?n.read-m-1:n.end-m;;){let k,v,S,R,z,D,E,T;switch(r){case 0:for(;3>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}switch(h=7&w,u=1&h,h>>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:k=[],v=[],S=[[]],R=[[]],M.inflate_trees_fixed(k,v,S,R),d.init(k[0],v[0],S[0],0,R[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,e.msg="invalid block type",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if((~w>>>16&65535)!=(65535&w))return r=9,e.msg="invalid stored block lengths",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===y&&(m==n.end&&0!==n.read&&(m=0,y=m<n.read?n.read-m-1:n.end-m),0===y&&(n.write=m,t=n.inflate_flush(e,t),m=n.write,y=m<n.read?n.read-m-1:n.end-m,m==n.end&&0!==n.read&&(m=0,y=m<n.read?n.read-m-1:n.end-m),0===y)))return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(t=0,h=a,h>g&&(h=g),h>y&&(h=y),n.win.set(e.read_buf(b,h),m),b+=h,g-=h,m+=h,y-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;14>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(s=h=16383&w,(31&h)>29||(h>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(x=0;h>x;x++)i[x]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}i[q[o++]]=7&w,w>>>=3,p-=3}for(;19>o;)i[q[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,c,f,e),0!=h)return(t=h)==F&&(i=null,r=9),n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;h=s,258+(31&h)+(h>>5&31)>o;){let a,d;for(h=l[0];h>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(h=f[3*(c[0]+(w&W[h]))+1],d=f[3*(c[0]+(w&W[h]))+2],16>d)w>>>=h,p-=h,i[o++]=d;else{for(x=18==d?7:d-14,a=18==d?11:3;h+x>p;){if(0===g)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,w|=(255&e.read_byte(b++))<<p,p+=8}if(w>>>=h,p-=h,a+=w&W[x],w>>>=x,p-=x,x=o,h=s,x+a>258+(31&h)+(h>>5&31)||16==d&&1>x)return i=null,r=9,e.msg="invalid bit length repeat",t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d=16==d?i[x-1]:0;do{i[x++]=d}while(0!=--a);o=x}}if(c[0]=-1,z=[],D=[],E=[],T=[],z[0]=9,D[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,D,E,T,f,e),0!=h)return h==F&&(i=null,r=9),t=h,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d.init(z[0],D[0],f,E[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),b=e.next_in_index,g=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,y=m<n.read?n.read-m-1:n.end-m,0===u){r=0;break}r=7;case 7:if(n.write=m,t=n.inflate_flush(e,t),m=n.write,y=m<n.read?n.read-m-1:n.end-m,n.read!=n.write)return n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);r=8;case 8:return t=1,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);case 9:return t=F,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);default:return t=C,n.bitb=w,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}}},n.free=e=>{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const K=13,Z=[0,0,255,255];function j(){const e=this;function t(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):C}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),C):(e.wbits=i,n.istate.blocks=new V(n,1<<i),t(n),0)),e.inflate=(e,t)=>{let n,i;if(!e||!e.istate||!e.next_in)return C;const r=e.istate;for(t=4==t?U:0,n=U;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=K,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=K,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=K,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=K,e.msg="need dictionary",r.marker=0,C;case 7:if(n=r.blocks.proc(e,n),n==F){r.mode=K,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case K:return F;default:return C}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return C;const a=e.istate;return r<1<<a.wbits||(r=(1<<a.wbits)-1,i=n-r),a.blocks.set_dictionary(t,i,r),a.mode=7,0},e.inflateSync=e=>{let n,i,r,a,s;if(!e||!e.istate)return C;const o=e.istate;if(o.mode!=K&&(o.mode=K,o.marker=0),0===(n=e.avail_in))return U;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==Z[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?F:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():C}function G(){}G.prototype={inflateInit(e){const t=this;return t.istate=new j,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):C},inflateEnd(){const e=this;if(!e.istate)return C;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):C},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):C},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const X=4294967295,Y=65535,J=33639248,Q=101075792,$=void 0,ee="undefined",te="function";class ne{constructor(e){return class extends S{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let ie=2;try{typeof T!=ee&&T.hardwareConcurrency&&(ie=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ie,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof D!=ee&&D,DecompressionStreamNative:typeof E!=ee&&E},ae=n.assign({},re);function se(){return ae}function oe(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:h}=e;if(le("baseURL",n),le("chunkSize",i),le("maxWorkers",r),le("terminateWorkerTimeout",a),le("useCompressionStream",s),le("useWebWorkers",o),l&&(ae.CompressionStream=new ne(l)),c&&(ae.DecompressionStream=new ne(c)),le("CompressionStream",d),le("DecompressionStream",u),h!==$){const{deflate:e,inflate:n}=h;if((e||n)&&(ae.workerScripts||(ae.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");ae.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");ae.workerScripts.inflate=n}}}function le(e,t){t!==$&&(ae[e]=t)}const ce=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ce[e]=t}class de{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^ce[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class ue extends S{constructor(){let e;const t=new de;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new h(4);new p(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=fe.getPartial(n);return 32===i?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,s.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>s.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=fe.getPartial(r);return i.push(fe.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},he={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new h(t);let i;for(let r=0;t>r;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(fe.partial(8*(3&n),i)),t}}},_e=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=he.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),i=t._length,r=t._length=i+fe.bitLength(e);if(r>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<<e|t>>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+r[e]+n._key[s.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||s.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},pe={importKey:e=>new pe.hmacSha1(he.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const d=new ArrayBuffer(r),u=new p(d);let h=0;const _=fe;for(t=he.bytes.toBits(t),c=1;(r||1)>h;c++){for(a=s=e.encrypt(_.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>h&&o<a.length;o++)u.setInt32(h,a[o]),h+=4}return d.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=_e,i=[[],[]];t._baseHash=[new n,new n];const r=t._baseHash[0].blockSize/32;e.length>r&&(e=(new n).update(e).finalize());for(let t=0;r>t;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}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},be=void 0!==k&&"function"==typeof k.getRandomValues,ge="Invalid password",me="Invalid signature",ye="zipjs-abort-check-password";function xe(e){return be?k.getRandomValues(e):we.getRandomValues(e)}const ke=16,ve={name:"PBKDF2"},Se=n.assign({hash:{name:"HMAC"}},ve),Re=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ve),ze=["deriveBits"],De=[8,12,16],Ee=[16,24,32],Te=10,Ae=[0,0,0,0],Ce="undefined",Fe="function",Ue=typeof k!=Ce,We=Ue&&k.subtle,Oe=Ue&&typeof We!=Ce,Le=he.bytes,Ne=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,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;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^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?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,l,c;for(let e=0;256>e;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,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("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],l=a[2],c=a[3],d=a[4];let u,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)u=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^c[255&g]^n[m],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&w]^n[m+1],_=s[b>>>24]^o[g>>16&255]^l[w>>8&255]^c[255&p]^n[m+2],g=s[g>>>24]^o[w>>16&255]^l[p>>8&255]^c[255&b]^n[m+3],m+=4,w=u,p=h,b=_;for(let e=0;4>e;e++)r[t?3&-e:e]=d[w>>>24]<<24^d[p>>16&255]<<16^d[b>>8&255]<<8^d[255&g]^n[m++],u=w,w=p,p=b,b=g,g=u;return r}},Ie=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=fe.bitLength(t);for(let r=0;i>r;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 fe.clamp(t,r)}},Pe=pe.hmacSha1;let He=Ue&&Oe&&typeof We.importKey==Fe,Me=Ue&&Oe&&typeof We.deriveBits==Fe;class Be extends S{constructor({password:e,signed:t,encryptionStrength:i,checkPasswordOnly:r}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,signed:t,strength:i-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:a,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await Ke(e,t,n,je(i,0,De[t])),a=je(i,De[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(ge)})(n,a,i,je(e,0,De[a]+2)),e=je(e,De[a]+2),r?t.error(new f(ye)):s()):await o;const l=new h(e.length-Te-(e.length-Te)%ke);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;await a;const s=je(r,0,r.length-Te),o=je(r,r.length-Te);let l=new h;if(s.length){const e=Xe(Le,s);i.update(e);const t=n.update(e);l=Ge(Le,t)}if(t){const e=je(Ge(Le,i.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(me)}e.enqueue(l)}})}}class qe extends S{constructor({password:e,encryptionStrength:t}){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new h;i?(o=await(async(e,t,n)=>{const i=xe(new h(De[t]));return Ze(i,await Ke(e,t,n,i))})(n,r,i),a()):await s;const l=new h(o.length+e.length-e.length%ke);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:a}=this;await a;let s=new h;if(r.length){const e=t.update(Xe(Le,r));n.update(e),s=Ge(Le,e)}i.signature=Ge(Le,n.digest()).slice(0,Te),e.enqueue(Ze(s,i.signature))}}),i=this}}function Ve(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let d;for(l.length&&(t=Ze(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new h(t)).set(n,0)}return e})(n,c-c%ke)),d=0;c-ke>=d;d+=ke){const e=Xe(Le,je(t,d,d+ke));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(Ge(Le,r),d+i)}return e.pending=je(t,d),n}async function Ke(e,i,r,a){e.password=null;const s=(e=>{if(void 0===m){const t=new h((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new m).encode(e)})(r),o=await(async(e,t,n,i,r)=>{if(!He)return pe.importKey(t);try{return await We.importKey("raw",t,n,!1,r)}catch(e){return He=!1,pe.importKey(t)}})(0,s,Se,0,ze),l=await(async(e,t,n)=>{if(!Me)return pe.pbkdf2(t,e.salt,Re.iterations,n);try{return await We.deriveBits(e,t,n)}catch(i){return Me=!1,pe.pbkdf2(t,e.salt,Re.iterations,n)}})(n.assign({salt:a},Re),o,8*(2*Ee[i]+2)),c=new h(l),d=Xe(Le,je(c,0,Ee[i])),u=Xe(Le,je(c,Ee[i],2*Ee[i])),f=je(c,2*Ee[i]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new Ie(new Ne(d),t.from(Ae)),hmac:new Pe(u)}),f}function Ze(e,t){let n=e;return e.length+t.length&&(n=new h(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Ge(e,t){return e.fromBits(t)}function Xe(e,t){return e.toBits(t)}class Ye extends S{constructor({password:e,passwordVerification:t,checkPasswordOnly:i}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(ge);e=e.subarray(12)}i?t.error(new f(ye)):t.enqueue(Qe(n,e))}})}}class Je extends S{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=xe(new h(12));t[11]=n.passwordVerification,i=new h(e.length+t.length),i.set($e(n,t),0),r=12}else i=new h(e.length),r=0;i.set($e(n,e),r),t.enqueue(i)}})}}function Qe(e,t){const n=new h(t.length);for(let i=0;i<t.length;i++)n[i]=nt(e)^t[i],tt(e,n[i]);return n}function $e(e,t){const n=new h(t.length);for(let i=0;i<t.length;i++)n[i]=nt(e)^t[i],tt(e,t[i]);return n}function et(e,t){const i=[305419896,591751049,878082192];n.assign(e,{keys:i,crcKey0:new de(i[0]),crcKey2:new de(i[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,i,r]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=rt(s.imul(rt(i+it(n)),134775813)+1),e.crcKey2.append([i>>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function nt(e){const t=2|e.keys[2];return it(s.imul(t,1^t)>>>8)}function it(e){return 255&e}function rt(e){return 4294967295&e}const at="deflate-raw";class st extends S{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,h=lt(super.readable);a&&!o||!l||(u=new ue,h=ut(h,u)),r&&(h=dt(h,s,{level:c,chunkSize:t},i,n)),a&&(o?h=ut(h,new Je(e)):(f=new qe(e),h=ut(h,f))),ct(d,h,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new p(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends S{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,h=lt(super.readable);a&&(r?h=ut(h,new Ye(e)):(u=new Be(e),h=ut(h,u))),l&&(h=dt(h,c,{chunkSize:t},i,n)),a&&!r||!s||(d=new ue,h=ut(h,d)),ct(this,h,(()=>{if((!a||r)&&s){const e=new p(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(me)}}))}}function lt(e){return ut(e,new S({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,i){t=ut(t,new S({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,i,r){try{e=ut(e,new(t&&i?i:r)(at,n))}catch(i){if(!t)throw i;e=ut(e,new r(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",ht="inflate";class _t extends S{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=st:r.startsWith(ht)&&(a=ot);let s=0;const o=new a(e,t),l=super.readable,c=new S({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(i,{signature:e,size:s})}});n.defineProperty(i,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof A!=ee;class pt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new bt(t,s,a),{signal:u}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?yt:mt)(e,a)}}class bt extends S{constructor(e,{onstart:t,onprogress:n,size:i,onend:r},{chunkSize:a}){let s=0;super({start(){t&>(t,i)},async transform(e,t){s+=e.length,n&&await gt(n,s,i),t.enqueue(e)},flush(){e.size=s,r&>(r,s)}},{highWaterMark:1,size:()=>a})}}async function gt(e,...t){try{await e(...t)}catch(e){}}function mt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{const a=new _t(e,r);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:r}=a;return{signature:e,size:r}}finally{i()}})(e,t)}}function yt(e,{baseURL:t,chunkSize:i}){return e.interface||n.assign(e,{worker:vt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const i=new g((e=>n=e));return{writable:new z({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:i}})(e.writable);St({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e)||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:i})}}),e.interface}let xt=!0,kt=!0;function vt(e,t,i){const r={type:"module"};let a,s;typeof e==te&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{s=new A(a)}catch(e){xt=!1,s=new A(a,r)}else s=new A(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:_}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),w(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();St({type:ft,value:e,done:n,messageId:a},t)}i==ft&&(await c.ready,await c.write(new h(r)),St({type:"ack",messageId:a},t)),"close"==i&&w(null,s)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),_()}})(e,i))),s}function St(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(e.value=n.buffer,s.push(e.value)),r&&kt?(i&&s.push(i),a&&s.push(a)):e.readable=e.writable=null,s.length)try{return t.postMessage(e,s),!0}catch(n){kt=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),i(),e}}let Rt=[];const zt=[];let Dt=0;function Et(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",At="HTTP Range not supported",Ct="Writer iterator completed too soon",Ft="GET",Ut="bytes",Wt=65536,Ot="writable";class Lt{constructor(){this.size=0}init(){this.initialized=!0}}class Nt extends Lt{get readable(){const e=this,{chunkSize:t=Wt}=e,n=new R({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;i.enqueue(await on(e,r+l,s.min(t,a-l),o)),l+t>a?i.close():this.chunkOffset+=t}});return n}}class It extends Lt{constructor(){super();const e=this,t=new z({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ot,{get:()=>t})}writeUint8Array(){}}class Pt extends Nt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||i<n.size?n.blob.slice(e,i):n.blob;let a=await r.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,i)),new h(a)}}class Ht extends Lt{constructor(e){super();const t=new S,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,Ot,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:i}).blob()}getData(){return this.blob}}class Mt extends Nt{constructor(e,t){super(),qt(this,e,t)}async init(){await Vt(this,Qt,Gt),super.init()}readUint8Array(e,t){return Kt(this,e,t,Qt,Gt)}}class Bt extends Nt{constructor(e,t){super(),qt(this,e,t)}async init(){await Vt(this,$t,Xt),super.init()}readUint8Array(e,t){return Kt(this,e,t,$t,Xt)}}function qt(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s})}async function Vt(e,t,n){const{url:i,useRangeHeader:a,forceRangeRequests:s}=e;if((e=>{const{baseURL:t}=se(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(i)&&(a||s)){const{headers:i}=await t(Ft,e,Zt(e));if(!s&&i.get("Accept-Ranges")!=Ut)throw new f(At);{let a;const s=i.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===$?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Kt(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,options:o}=e;if(a||s){const r=await i(Ft,e,Zt(e,t,n));if(206!=r.status)throw new f(At);return new h(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,o),new h(e.data.subarray(t,t+n))}}function Zt(e,t=0,i=1){return n.assign({},jt(e),{Range:Ut+"="+t+"-"+(t+i-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Gt(e){await Yt(e,Qt)}async function Xt(e){await Yt(e,$t)}async function Yt(e,t){const n=await t(Ft,e,jt(e));e.data=new h(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,jt(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function Qt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(At):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(At):new f(Tt+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class en extends Nt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Bt(e,t):new Mt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Nt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],d=c.size;if(l+t>d){const r=d-l;a=new h(t),a.set(await on(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await on(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class nn extends Lt{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new z({async write(t){const{availableSize:n}=i;if(s)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),i.diskOffset+=r.size,i.diskNumber++,s=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(Ct);r=n,r.size=0,r.maxSize&&(i.maxSize=r.maxSize),i.availableSize=i.maxSize,await rn(r),a=n.writable,s=a.getWriter(),await this.write(t)}},async close(){await s.ready,await c()}});async function l(e){const t=e.length;t&&(await s.ready,await s.write(e),r.size+=t,i.size+=t,i.availableSize-=t)}async function c(){a.size=r.size,await s.close()}n.defineProperty(i,Ot,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function an(e){return t.isArray(e)&&(e=new tn(e)),e instanceof R&&(e={readable:e}),e}function sn(e){e.writable===$&&typeof e.next==te&&(e=new nn(e)),e instanceof z&&(e={writable:e});const{writable:t}=e;return t.size===$&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,i){return e.readUint8Array(t,n,i)}const ln=tn,cn=nn,dn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function un(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;n<e.length;n++)t+=dn[e[n]];return t}})(e):new y(t).decode(e)}const fn="filename",hn="rawFilename",_n="comment",wn="rawComment",pn="uncompressedSize",bn="compressedSize",gn="offset",mn="diskNumberStart",yn="lastModDate",xn="rawLastModDate",kn="lastAccessDate",vn="creationDate",Sn=[fn,hn,bn,pn,yn,xn,_n,wn,kn,vn,gn,mn,mn,"internalFileAttribute","externalFileAttribute","msDosCompatible","zip64","directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Rn{constructor(e){Sn.forEach((t=>this[t]=e[t]))}}const zn="File format is not recognized",Dn="End of central directory not found",En="End of Zip64 central directory not found",Tn="End of Zip64 central directory locator not found",An="Central directory header not found",Cn="Local file header not found",Fn="Zip64 extra field not found",Un="File contains encrypted entry",Wn="Encryption method not supported",On="Compression method not supported",Ln="Split zip file",Nn="utf-8",In="cp437",Pn=[[pn,X],[bn,X],[gn,X],[mn,Y]],Hn={[Y]:{getValue:Yn,bytes:4},[X]:{getValue:Jn,bytes:8}};class Mn{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,i={}){const a=this,{reader:s,offset:o,diskNumberStart:l,extraFieldAES:c,compressionMethod:d,config:u,bitFlag:_,signature:w,rawLastModDate:p,uncompressedSize:b,compressedSize:m}=a,y=t.localDirectory={},x=Qn(await on(s,o,30,l));let k=Kn(a,i,"password");if(k=k&&k.length&&k,c&&99!=c.originalCompressionMethod)throw new f(On);if(0!=d&&8!=d)throw new f(On);if(67324752!=Yn(x,0))throw new f(Cn);Bn(y,x,4),y.rawExtraField=y.extraFieldLength?await on(s,o+30+y.filenameLength,y.extraFieldLength,l):new h,await qn(a,y,x,4,!0),n.assign(t,{lastAccessDate:y.lastAccessDate,creationDate:y.creationDate});const v=a.encrypted&&y.encrypted,S=v&&!c;if(v){if(!S&&c.strength===$)throw new f(Wn);if(!k)throw new f(Un)}const R=o+30+y.filenameLength+y.extraFieldLength,D=m,E=s.readable;n.assign(E,{diskNumberStart:l,offset:R,size:D});const T=Kn(a,i,"signal"),A=Kn(a,i,"checkPasswordOnly");A&&(e=new z),e=sn(e),await rn(e,b);const{writable:C}=e,{onstart:F,onprogress:U,onend:W}=i,O={options:{codecType:ht,password:k,zipCrypto:S,encryptionStrength:c&&c.strength,signed:Kn(a,i,"checkSignature"),passwordVerification:S&&(_.dataDescriptor?p>>>8&255:w>>>24&255),signature:w,compressed:0!=d,encrypted:v,useWebWorkers:Kn(a,i,"useWebWorkers"),useCompressionStream:Kn(a,i,"useCompressionStream"),transferStreams:Kn(a,i,"transferStreams"),checkPasswordOnly:A},config:u,streamOptions:{signal:T,size:D,onstart:F,onprogress:U,onend:W}};let L=0;try{({outputSize:L}=await(async(e,t)=>{const{options:n,config:i}=t,{transferStreams:a,useWebWorkers:s,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:h,terminateWorkerTimeout:_}=i;t.transferStreams=a||a===$;const w=!(c||d||u||t.transferStreams);let p;t.useWebWorkers=!w&&(s||s===$&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===$&&i.useCompressionStream;const b=Rt.find((e=>!e.busy));if(b)Et(b),p=new pt(b,e,t,m);else if(Rt.length<h){const n={indexWorker:Dt};Dt++,Rt.push(n),p=new pt(n,e,t,m)}else p=await new g((n=>zt.push({resolve:n,stream:e,workerOptions:t})));return p.run();function m(e){if(zt.length){const[{resolve:t,stream:n,workerOptions:i}]=zt.splice(0,1);t(new pt(e,n,i,m))}else e.worker?(Et(e),r.isFinite(_)&&_>=0&&(e.terminateTimeout=setTimeout((()=>{Rt=Rt.filter((t=>t!=e)),e.terminate()}),_))):Rt=Rt.filter((t=>t!=e))}})({readable:E,writable:C},O))}catch(e){if(!A||e.message!=ye)throw e}finally{const e=Kn(a,i,"preventClose");C.size+=L,e||C.locked||await C.getWriter().close()}return A?void 0:e.getData?e.getData():C}}function Bn(e,t,i){const r=e.rawBitFlag=Xn(t,i+2),a=1==(1&r),s=Yn(t,i+6);n.assign(e,{encrypted:a,version:Xn(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Zn(s),filenameLength:Xn(t,i+22),extraFieldLength:Xn(t,i+24)})}async function qn(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,d=Qn(new h(s));let u=0;try{for(;u<s.length;){const e=Xn(d,u),t=Xn(d,u+2);c.set(e,{type:e,data:s.slice(u+4,u+4+t)}),u+=4+t}}catch(e){}const _=Xn(i,r+4);n.assign(t,{signature:Yn(i,r+10),uncompressedSize:Yn(i,r+18),compressedSize:Yn(i,r+14)});const w=c.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Qn(e.data),i=Pn.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r<i.length;r++){const[s,o]=i[r];if(t[s]==o){const i=Hn[o];t[s]=e[s]=i.getValue(n,a),a+=i.bytes}else if(e[s])throw new f(Fn)}})(w,t),t.extraFieldZip64=w);const p=c.get(28789);p&&(await Vn(p,fn,hn,t,e),t.extraFieldUnicodePath=p);const b=c.get(25461);b&&(await Vn(b,_n,wn,t,e),t.extraFieldUnicodeComment=b);const g=c.get(39169);g?(((e,t,i)=>{const r=Qn(e.data),a=Gn(r,4);n.assign(e,{vendorVersion:Gn(r,0),vendorId:Gn(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Xn(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const m=c.get(10);m&&(((e,t)=>{const i=Qn(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=Xn(i,a),n=Xn(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Qn(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:jn(a),lastAccessDate:jn(s),creationDate:jn(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(m,t),t.extraFieldNTFS=m);const y=c.get(21589);y&&(((e,t,n)=>{const i=Qn(e.data),r=Gn(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(yn),s.push(xn)),2==(2&r)&&(a.push(kn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push(vn),s.push("rawCreationDate"))):5>e.data.length||(a.push(yn),s.push(xn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Yn(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(y,t,a),t.extraFieldExtendedTimestamp=y)}async function Vn(e,t,i,r,a){const s=Qn(e.data),o=new de;o.append(a[i]);const l=Qn(new h(4));l.setUint32(0,o.get(),!0);const c=Yn(s,1);n.assign(e,{version:Gn(s,0),[t]:un(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Yn(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Kn(e,t,n){return t[n]===$?e.options[n]:t[n]}function Zn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function jn(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Gn(e,t){return e.getUint8(t)}function Xn(e,t){return e.getUint16(t,!0)}function Yn(e,t){return e.getUint32(t,!0)}function Jn(e,t){return r(e.getBigUint64(t,!0))}function Qn(e){return new p(e.buffer)}oe({Inflate:function(e){const t=new G,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new h(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,d=0,u=0;if(0!==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,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===U){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new h(i)):s.push(i.subarray(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new h(u),s.forEach((e=>{l.set(e,d),d+=e.length}))):l=s[0]?new h(s[0]):new h,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=Pt,e.BlobWriter=Ht,e.Data64URIReader=class extends Nt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new h(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends It{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=v(r):t.pending=r}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=zn,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=An,e.ERR_ENCRYPTED=Un,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Tn,e.ERR_EOCDR_NOT_FOUND=Dn,e.ERR_EOCDR_ZIP64_NOT_FOUND=En,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Fn,e.ERR_HTTP_RANGE=At,e.ERR_INVALID_PASSWORD=ge,e.ERR_INVALID_SIGNATURE=me,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Cn,e.ERR_SPLIT_ZIP_FILE=Ln,e.ERR_UNSUPPORTED_COMPRESSION=On,e.ERR_UNSUPPORTED_ENCRYPTION=Wn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Nt,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Pt{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends Ht{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends Nt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends It{init(e=0){n.assign(this,{offset:0,array:new h(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new h(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=It,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:an(e),options:t,config:se()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await rn(i),i.size!==$&&i.readUint8Array||(i=new Pt(await new d(i.readable).blob()),await rn(i)),22>i.size)throw new f(zn);i.chunkSize=(e=>s.max(e.chunkSize,64))(r);const a=await(async(e,t,n)=>{const i=new h(4);return Qn(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await on(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw 134695760==Yn(Qn(await on(i,0,4)))?new f(Ln):new f(Dn);const o=Qn(a);let l=Yn(o,12),c=Yn(o,16);const u=a.offset,_=Xn(o,20),w=u+22+_;let p=Xn(o,4);const b=i.lastDiskNumber||0;let m=Xn(o,6),y=Xn(o,8),x=0,k=0;if(c==X||l==X||y==Y||m==Y){const e=Qn(await on(i,a.offset-20,20));if(117853008!=Yn(e,0))throw new f(En);c=Jn(e,8);let t=await on(i,c,56,-1),n=Qn(t);const r=a.offset-20-56;if(Yn(n,0)!=Q&&c!=r){const e=c;c=r,x=c-e,t=await on(i,c,56,-1),n=Qn(t)}if(Yn(n,0)!=Q)throw new f(Tn);p==Y&&(p=Yn(n,16)),m==Y&&(m=Yn(n,20)),y==Y&&(y=Jn(n,32)),l==X&&(l=Jn(n,40)),c-=l}if(b!=p)throw new f(Ln);if(0>c||c>=i.size)throw new f(zn);let v=0,S=await on(i,c,l,m),R=Qn(S);if(l){const e=a.offset-l;if(Yn(R,v)!=J&&c!=e){const t=c;c=e,x=c-t,S=await on(i,c,l,m),R=Qn(S)}}const z=a.offset-c-(i.lastDiskOffset||0);if(l==z||0>z||(l=z,S=await on(i,c,l,m),R=Qn(S)),0>c||c>=i.size)throw new f(zn);const D=Kn(t,e,"filenameEncoding"),E=Kn(t,e,"commentEncoding");for(let a=0;y>a;a++){const o=new Mn(i,r,t.options);if(Yn(R,v)!=J)throw new f(An);Bn(o,R,v+6);const l=!!o.bitFlag.languageEncodingFlag,c=v+46,d=c+o.filenameLength,u=d+o.extraFieldLength,h=Xn(R,v+4),_=0==(0&h),w=S.subarray(c,d),p=Xn(R,v+32),b=u+p,m=S.subarray(u,b),z=l,T=l,A=_&&16==(16&Gn(R,v+38)),C=Yn(R,v+42)+x;n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:p,directory:A,offset:C,diskNumberStart:Xn(R,v+34),internalFileAttribute:Xn(R,v+36),externalFileAttribute:Yn(R,v+38),rawFilename:w,filenameUTF8:z,commentUTF8:T,rawExtraField:S.subarray(d,u)});const[F,U]=await g.all([un(w,z?Nn:D||In),un(m,T?Nn:E||In)]);n.assign(o,{rawComment:m,filename:F,comment:U,directory:A||F.endsWith("/")}),k=s.max(C,k),await qn(o,o,R,v+6);const W=new Rn(o);W.getData=(e,t)=>o.getData(e,W,t),v=b;const{onprogress:O}=e;if(O)try{await O(a+1,y,new Rn(o))}catch(e){}yield W}const T=Kn(t,e,"extractPrependedData"),A=Kn(t,e,"extractAppendedData");return T&&(t.prependedData=k>0?await on(i,0,k):new h),t.comment=_?await on(i,u+22,_):new h,A&&(t.appendedData=w<i.size?await on(i,w,i.size-w):new h),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=oe,e.getMimeType=()=>"application/octet-stream",e.initReader=an,e.initStream=rn,e.initWriter=sn,e.readUint8Array=on,e.terminateWorkers=()=>{Rt.forEach((e=>{Et(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})})); |
@@ -1202,2 +1202,8 @@ /** | ||
supportZip64SplitFile?: boolean; | ||
/** | ||
* `true`to produce zip files compatible with the USDZ specification. | ||
* | ||
* @defaultValue false | ||
*/ | ||
usdz?: boolean; | ||
} | ||
@@ -1204,0 +1210,0 @@ |
@@ -54,2 +54,3 @@ /* | ||
const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375; | ||
const EXTRAFIELD_TYPE_USDZ = 0x1986; | ||
@@ -95,2 +96,3 @@ const BITFLAG_ENCRYPTED = 0x01; | ||
EXTRAFIELD_TYPE_UNICODE_COMMENT, | ||
EXTRAFIELD_TYPE_USDZ, | ||
END_OF_CENTRAL_DIR_LENGTH, | ||
@@ -97,0 +99,0 @@ ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, |
@@ -72,3 +72,3 @@ /* | ||
} | ||
setReadable(stream, readable, async () => { | ||
setReadable(stream, readable, () => { | ||
let signature; | ||
@@ -108,3 +108,3 @@ if (encrypted && !zipCrypto) { | ||
} | ||
setReadable(this, readable, async () => { | ||
setReadable(this, readable, () => { | ||
if ((!encrypted || zipCrypto) && signed) { | ||
@@ -111,0 +111,0 @@ const dataViewSignature = new DataView(crc32Stream.value.buffer); |
@@ -366,3 +366,3 @@ /* | ||
} = zipEntry; | ||
const localDirectory = zipEntry.localDirectory = {}; | ||
const localDirectory = fileEntry.localDirectory = {}; | ||
const dataArray = await readUint8Array(reader, offset, 30, diskNumberStart); | ||
@@ -623,3 +623,3 @@ const dataView = getDataView(dataArray); | ||
const timeRawProperties = []; | ||
if (localDirectory) { | ||
if (localDirectory) { | ||
if ((flags & 0x1) == 0x1) { | ||
@@ -626,0 +626,0 @@ timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE); |
@@ -50,2 +50,3 @@ /* | ||
EXTRAFIELD_TYPE_NTFS_TAG1, | ||
EXTRAFIELD_TYPE_USDZ, | ||
END_OF_CENTRAL_DIR_LENGTH, | ||
@@ -323,2 +324,5 @@ ZIP64_END_OF_CENTRAL_DIR_LENGTH, | ||
maximumEntrySize = metadataSize + maximumCompressedSize; | ||
if (zipWriter.options.usdz) { | ||
maximumEntrySize += maximumEntrySize + 64; | ||
} | ||
zipWriter.pendingEntriesSize += maximumEntrySize; | ||
@@ -348,2 +352,3 @@ let fileEntry; | ||
} = entryInfo; | ||
const { usdz } = zipWriter.options; | ||
const previousFileEntry = Array.from(files.values()).pop(); | ||
@@ -364,3 +369,3 @@ let fileEntry = {}; | ||
} | ||
if (options.bufferedWrite || zipWriter.writerLocked || (zipWriter.bufferedWrites && keepOrder) || !dataDescriptor) { | ||
if ((options.bufferedWrite || zipWriter.writerLocked || (zipWriter.bufferedWrites && keepOrder) || !dataDescriptor) && !usdz) { | ||
fileWriter = new BlobWriter(); | ||
@@ -393,2 +398,5 @@ fileWriter.writable.size = 0; | ||
fileEntry.diskNumberStart = diskNumber; | ||
if (usdz) { | ||
appendExtraFieldUSDZ(entryInfo, zipWriter.offset); | ||
} | ||
fileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options); | ||
@@ -762,6 +770,28 @@ writingEntryData = false; | ||
rawExtraFieldNTFS, | ||
rawExtraFieldAES | ||
rawExtraFieldAES, | ||
extraFieldLength | ||
}; | ||
} | ||
function appendExtraFieldUSDZ(entryInfo, zipWriterOffset) { | ||
const { headerInfo } = entryInfo; | ||
let { localHeaderArray, extraFieldLength } = headerInfo; | ||
let localHeaderArrayView = getDataView(localHeaderArray); | ||
let extraBytesLength = 64 - ((zipWriterOffset + localHeaderArray.length) % 64); | ||
if (extraBytesLength < 4) { | ||
extraBytesLength += 64; | ||
} | ||
const rawExtraFieldUSDZ = new Uint8Array(extraBytesLength); | ||
const extraFieldUSDZView = getDataView(rawExtraFieldUSDZ); | ||
setUint16(extraFieldUSDZView, 0, EXTRAFIELD_TYPE_USDZ); | ||
setUint16(extraFieldUSDZView, 2, extraBytesLength - 2); | ||
const previousLocalHeaderArray = localHeaderArray; | ||
headerInfo.localHeaderArray = localHeaderArray = new Uint8Array(previousLocalHeaderArray.length + extraBytesLength); | ||
arraySet(localHeaderArray, previousLocalHeaderArray); | ||
arraySet(localHeaderArray, rawExtraFieldUSDZ, previousLocalHeaderArray.length); | ||
localHeaderArrayView = getDataView(localHeaderArray); | ||
setUint16(localHeaderArrayView, 28, extraFieldLength + extraBytesLength); | ||
entryInfo.metadataSize += extraBytesLength; | ||
} | ||
function getDataDescriptorInfo(options) { | ||
@@ -768,0 +798,0 @@ const { |
@@ -1,1 +0,1 @@ | ||
function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(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 s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(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(C.h(8*(3&n),r)),t}}},_=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=x.A.g(e));const n=t.C=C.concat(t.C,e),r=t._,i=t._=r+C.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<<e|t>>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},I={importKey:e=>new I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=_,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.D(),n=new e.M(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},M),K=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?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.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(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}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(s),f=await(async(e,t,n,r,s)=>{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,U,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,K.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,K.iterations,n)}})(t.assign({salt:o},K),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],he(e,n[r]);return n}function ue(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],he(e,t[r]);return n}function we(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new S(r[0]),te:new S(r[2])});for(let t=0;t<n.length;t++)he(e,n.charCodeAt(t))}function he(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=ye(r.imul(ye(s+pe(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||(w=new z,d=ze(d,w)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new z,d=ze(d,w)),ve(this,d,(async()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.getWriter().close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[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 Ue(){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.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ke(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ue.ge=[0,1,2,3,4,5,6,7].concat(...Be([[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]])),Ue.ke=[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],Ue.ve=[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],Ue.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ue.ze=[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],Ue.Ce=[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],Ue.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ue._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ke.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ke.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ke.Ee=new Ke(Ke.Ae,Ue.ze,257,286,15),Ke.Me=new Ke(Ke.Be,Ue.Ce,0,30,15),Ke.Ue=new Ke(null,Ue.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,U;const K=new Ue,N=new Ue,O=new Ue;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ue.ge[n]+256+1)]++,M[2*Ue.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ue.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=Ue.ge[s],Y(i+256+1,t),o=Ue.ze[i],0!==o&&(s-=Ue.ke[i],X(s,o)),r--,i=Ue.Se(r),Y(i,n),o=Ue.Ce[i],0!==o&&(r-=Ue.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*Ue._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ke.Ae,Ke.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*Ue._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Fe>_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&qe(t,r[i+1],r[i],e.le)&&i++,!qe(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),V=S,P=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,K.re=E,K.ie=Ke.Ee,N.re=M,N.ie=Ke.Me,O.re=U,O.ie=Ke.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),A=v,S=x,v=2,0!==s&&D>A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--A);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Le),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Ke.Ae),$(),9>1+H+10-F&&(X(2,3),Y(256,Ke.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,_=-S,s[0]=0,x=0,D=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++k<D&&(y<<=1)>n[++A];)y-=n[A];if(D=1<<k,h[0]+D>1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-_,k=g>>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;0!=(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=$e[e],g=$e[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&$e[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(_>7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 9:return m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);default:return m=Xe,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m)}},e.ht=()=>{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,_,A,I,D;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[ft[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&$e[i]))+1],w=d[3*(u[0]+(f&$e[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=Xe,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<<r),t(n),0)),e._t=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.It=e=>{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker}; | ||
function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(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 s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(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(C.h(8*(3&n),r)),t}}},_=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=x.A.g(e));const n=t.C=C.concat(t.C,e),r=t._,i=t._=r+C.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<<e|t>>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},I={importKey:e=>new I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=_,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.D(),n=new e.M(e.U[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},U=t.assign({hash:{name:"HMAC"}},M),K=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?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.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(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}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(s),f=await(async(e,t,n,r,s)=>{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,U,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,K.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,K.iterations,n)}})(t.assign({salt:o},K),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],he(e,n[r]);return n}function ue(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],he(e,t[r]);return n}function we(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new S(r[0]),te:new S(r[2])});for(let t=0;t<n.length;t++)he(e,n.charCodeAt(t))}function he(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=ye(r.imul(ye(s+pe(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||(w=new z,d=ze(d,w)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new z,d=ze(d,w)),ve(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.getWriter().close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[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 Ue(){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.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ke(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ue.ge=[0,1,2,3,4,5,6,7].concat(...Be([[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]])),Ue.ke=[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],Ue.ve=[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],Ue.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ue.ze=[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],Ue.Ce=[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],Ue.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ue._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ke.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ke.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ke.Ee=new Ke(Ke.Ae,Ue.ze,257,286,15),Ke.Me=new Ke(Ke.Be,Ue.Ce,0,30,15),Ke.Ue=new Ke(null,Ue.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,U;const K=new Ue,N=new Ue,O=new Ue;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ue.ge[n]+256+1)]++,M[2*Ue.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ue.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=Ue.ge[s],Y(i+256+1,t),o=Ue.ze[i],0!==o&&(s-=Ue.ke[i],X(s,o)),r--,i=Ue.Se(r),Y(i,n),o=Ue.Ce[i],0!==o&&(r-=Ue.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*Ue._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ke.Ae,Ke.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*Ue._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Fe>_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&qe(t,r[i+1],r[i],e.le)&&i++,!qe(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),V=S,P=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,K.re=E,K.ie=Ke.Ee,N.re=M,N.ie=Ke.Me,O.re=U,O.ie=Ke.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),A=v,S=x,v=2,0!==s&&D>A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--A);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Le),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Ke.Ae),$(),9>1+H+10-F&&(X(2,3),Y(256,Ke.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,_=-S,s[0]=0,x=0,D=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++k<D&&(y<<=1)>n[++A];)y-=n[A];if(D=1<<k,h[0]+D>1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-_,k=g>>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;0!=(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=$e[e],g=$e[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&$e[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(_>7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 9:return m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);default:return m=Xe,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m)}},e.ht=()=>{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,_,A,I,D;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[ft[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&$e[i]))+1],w=d[3*(u[0]+(f&$e[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=Xe,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<<r),t(n),0)),e._t=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.It=e=>{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker}; |
@@ -6,3 +6,3 @@ { | ||
"license": "BSD-3-Clause", | ||
"version": "2.7.24", | ||
"version": "2.7.25", | ||
"type": "module", | ||
@@ -27,3 +27,4 @@ "keywords": [ | ||
"multi-core", | ||
"split-zip" | ||
"split-zip", | ||
"usdz" | ||
], | ||
@@ -30,0 +31,0 @@ "engines": { |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
3014302
67
57196