@zip.js/zip.js 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/zip-core-external.js +327 -211
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +327 -211
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +327 -211
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +327 -211
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +327 -211
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +327 -211
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +327 -211
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +327 -211
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +327 -211
- package/dist/zip-native.min.js +1 -1
- package/dist/zip.js +327 -211
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +327 -211
- package/index-native.min.js +1 -1
- package/index.cjs +327 -211
- package/index.d.cts +62 -29
- package/index.d.ts +62 -29
- package/index.min.js +1 -1
- package/lib/core/constants.js +7 -0
- package/lib/core/version.js +1 -1
- package/lib/core/zip-reader.js +156 -69
- package/lib/core/zip-writer.js +172 -142
- package/package.json +1 -1
package/dist/zip-fs-core.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,at=1024,st="/",ct=30,ut=new s(2107,11,31,23,59,58),lt=new s(1980,0,1),ft=void 0,dt=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",gt=new w,Et=k.asyncDispose||k(),St="password",bt="rawPassword",Rt="passThrough",xt="signal",zt="useWebWorkers",Ft="useCompressionStream",Dt="preventClose",At="level",It="useUnicodeFileNames",Ct="dataDescriptor",Tt="offset",kt="usdz",vt="maxAppendedDataSize",_t="signCentralDirectory",Nt="entry",Ut="filename",Ot="comment",Mt="strict",Lt="balanced",Bt="tolerant",Wt="compressed",Pt="Invalid option (must be a function)",Zt="Invalid signal (must be an AbortSignal instance)",Ht="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Vt="Invalid passThrough option (must be a boolean or 'compressed')",Gt="The operation was aborted";function jt(t){if(t&&typeof t!=pt)throw new d(Pt);return t}function qt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new d(Zt);return t||ft}function Yt(t){if(t&&t.aborted)throw t.reason===ft?new DOMException(Gt,"AbortError"):t.reason}function Kt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new d(Ht)}function Xt(t){if(t!==ft&&typeof t!=yt&&t!==Wt)throw new d(Vt);return t}function $t(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function Jt(t,e,n){t!==ft&&$t(t,e,n)}function Qt(t){return typeof t==mt&&t.trim()?o(t):t}const te=262144,ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof C!=wt&&C.hardwareConcurrency&&(oe=C.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:te,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof I!=wt&&I},ae="maxWorkers",se="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",ae,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],fe=[se,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],de={...ie};function we(){return de}function pe(t){return he(t.chunkSize)}function he(t){return t=Qt(t),o.isInteger(t)&&t>=1?a.max(t,64):te}function me(t){const e={};for(const n of fe){const r=t[n];r!==ft&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=Qt(e),t==ae&&(!o.isInteger(e)||e<1))throw new d(ee)}else if(le.includes(t))jt(e);else if(t==se){if(e&&typeof e!=mt)throw new d(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new d(re);return e}function ge(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===ft&&r===ft)return t;const o=n.assign({},t);return o.CompressionStreamFallback===ft&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===ft&&(o.DecompressionStreamFallback=r),o}function Ee(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Se(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function be(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Re(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[ze,Fe,De,Ae,Ie,Ce,Te,ke]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=ke[255&t]^Te[t>>>8&255]^Ce[t>>>16&255]^Ie[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^ze[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ze[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends z{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof E==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Ue=64,Oe=20,Me=new w([128]),Le=new w(1),Be=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),We=new w(256),Pe=new Int32Array(256),Ze=new Int32Array(256),He=new Int32Array(256),Ve=new Int32Array(256);let Ge=!1;function je(t){const e=function(){const t=new Int32Array(Be),e=new Int32Array(16),n=new w(Ue),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Me,0,1);56!=i;)c(Le,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Oe),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Be),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Ue;)n[i++]=t[e++];i==Ue&&(u(r,0),i=0)}if(e+Ue<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Ue<=a;e+=Ue)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Ue),r=new w(Ue);t.length>Ue&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Ue;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Ue),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Ue),e.update(t,0,Oe);const o=e.digest();return e.update(n,0,Ue),o}}}function qe(t){return We[t>>>24]<<24|We[t>>>16&255]<<16|We[t>>>8&255]<<8|We[255&t]}function Ye(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Ke(t){return 255&(t<<1^27*(t>>7))}const Xe=typeof R!=wt&&typeof R.getRandomValues==pt,$e="Invalid password",Je="Invalid authentication code",Qe="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new d(tn)}const nn={name:"PBKDF2"},rn=n.assign({hash:{name:"HMAC"}},nn),on=n.assign({iterations:1e3,hash:{name:"SHA-1"}},nn),an=["deriveBits"],sn=[8,12,16],cn=[16,24,32],un=10,ln=typeof R!=wt,fn=ln&&R.subtle;let dn=ln&&typeof fn!=wt&&typeof fn.importKey==pt&&typeof fn.deriveBits==pt;class wn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){hn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await En(t,e,n,bn(r,0,sn[e])),i=bn(r,sn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw gn(t),new d($e)}(i,o,n,bn(t,0,sn[o]+2)),t=bn(t,sn[o]+2),r?(gn(i),e.error(new d(Qe))):a()):await s,i.h)return;const c=new w(t.length-un-(t.length-un)%16);e.enqueue(yn(i,t,c,0,un,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=bn(n,n.length-un),s=new w(bn(n,0,n.length-un));e.process(s,!0);const c=e.digest();let u=n.length<un?1:0;for(let t=0;t<un;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(Je));t.enqueue(s)}}}),mn(this,i)}}class pn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){hn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=gt;if(n?(s=await async function(t,e,n){const r=en(new w(sn[e]));return Ee(r,await En(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(yn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=bn(e.digest(),0,un);t.enqueue(Ee(i,a))}}}),mn(this,r)}}function hn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Sn(e,r),strength:o-1,S:gt,h:!1})}function mn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw gn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(gn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function yn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ee(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=bn(n,r,r+u);t.set(bn(e,0,u)),a.process(t,i)}return t.S=bn(e,u),n}function gn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function En(t,e,r,o){t.password=null;const i=cn[e],s=await async function(t,e,r){if(dn)try{const o=await fn.importKey("raw",t,rn,!1,an);return new w(await fn.deriveBits(n.assign({salt:e},on),o,8*r))}catch{dn=!1}return function(t,e,n,r){const o=je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Oe){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Oe),u=o.digest();for(let t=0;t<Oe;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Oe,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Ge){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),We[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);We[0]=99;for(let t=0;t<256;t++){const e=We[t],n=Ke(e),r=n<<24|e<<16|e<<8|n^e;Pe[t]=r,Ze[t]=r>>>8|r<<24,He[t]=r>>>16|r<<16,Ve[t]=r>>>24|r<<8}Ge=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=qe(r<<8|r>>>24)^i<<24,i=Ke(i)):n>6&&t%n==4&&(r=qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=je(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=Ye(a)^n[0],e=Ye(s)^n[1],i=Ye(c)^n[2],l=Ye(u)^n[3],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[4],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[5],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[6],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[7];t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[8],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[9],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[10],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[11],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[12],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[13],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[14],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[15],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[16],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[17],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[18],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[19],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[20],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[21],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[22],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[23],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[24],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[25],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[26],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[27],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[28],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[29],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[30],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[31],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[32],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[33],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[34],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[35],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[36],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[37],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[38],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[39];let h=40;r>10&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[40],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[41],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[42],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[43],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[44],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[45],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[46],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[47],h=48),r>12&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[48],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[49],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[50],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[51],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[52],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[53],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[54],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[55],h=56),o[0]=(We[f>>>24]<<24|We[d>>>16&255]<<16|We[w>>>8&255]<<8|We[255&p])^n[h],o[1]=(We[d>>>24]<<24|We[w>>>16&255]<<16|We[p>>>8&255]<<8|We[255&f])^n[h+1],o[2]=(We[w>>>24]<<24|We[p>>>16&255]<<16|We[f>>>8&255]<<8|We[255&d])^n[h+2],o[3]=(We[p>>>24]<<24|We[f>>>16&255]<<16|We[d>>>8&255]<<8|We[255&w])^n[h+3]}}(bn(s,0,i),bn(s,i,2*i)),t.h&&gn(t),bn(s,2*i)}function Sn(t,e){return e===ft?Ne(t):e}function bn(t,e,n){return t.subarray(e,n)}class Rn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=Fn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d($e);t=t.subarray(12)}r?e.error(new d(Qe)):e.enqueue(Fn(n,t))}})}}class xn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=en(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Dn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Dn(n,t),o),e.enqueue(r)}})}}function zn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new ve(o[0]),D:new ve(o[2])}),r)for(let e=0;e<r.length;e++)An(t,r[e]);else for(let n=0;n<e.length;n++)An(t,e.charCodeAt(n))}(t,e,r)}function Fn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,n[r]);return n}function Dn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,e[r]);return n}function An(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=Tn(a.imul(Tn(n+Cn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function In(t){const e=2|t.R[2];return Cn(a.imul(e,1^e)>>>8)}function Cn(t){return 255&t}function Tn(t){return 4294967295&t}function kn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function vn(t,e){t=kn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function _n(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Nn="Invalid codec definition",Un="Reserved compression method",On="Invalid codec module",Mn="Compression method not supported",Ln=[0,8,9,99],Bn=new c,Wn=new c;function Pn(t){return Bn.get(t)}function Zn(){return e.from(Bn.values(),t=>n.assign({},t,Wn.get(t.format)))}function Hn(t){return Wn.get(t)}function Vn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new d(On);Wn.set(t,{CompressionStream:n,DecompressionStream:r})}const Gn="Invalid uncompressed size",jn="Invalid compressed data",qn="Codec out of memory",Yn="Invalid CRC32",Kn="deflate-raw",Xn="deflate64-raw",$n="gzip",Jn=[31,139,8];class Qn extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,y,g,E=super.readable;const S=f&&Hn(f),b=sr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new _e,E=ur(E,h)),o)if(S)E=lr(E,ar(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new tr,E=lr(E,new b($n,{level:u,chunkSize:e})),E=ur(E,g);else try{E=cr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw hr(t);let e;try{e=new r($n)}catch{throw hr(t)}E=lr(E,e),E=ur(E,new tr)}i&&(s?E=ur(E,new xn(t)):(y=new pn(t),E=ur(E,y))),ir(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class tr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ee(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ee(n.subarray(0,s),t.subarray(0,i-s))),n=Ee(n.subarray(s),t.subarray(i-s))},flush(){const e=be(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class er extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=ur(x,new Rn(t)):(b=new wn(t),x=ur(x,b))),c){const t=new u,o=p&&Hn(p);let i;if(o)x=lr(x,ar(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=sr(l,r,n);if(a&&!f&&s!==ft&&E!==ft&&o)try{i=new o($n,{chunkSize:e})}catch{i=ft}if(!i)try{x=cr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===ft||!l&&n)throw hr(t);try{i=new r($n)}catch{throw hr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===ft?new ve:ft;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(Jn),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await wr(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=be(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await fr(i,t),await dr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Gn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await dr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw yr(t,Yn);if(l!=n)throw yr(t,Gn);return{done:!0}}throw pr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=ft,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await dr(n,t),pr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new _e,x=ur(x,S)),ir(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(Yn)}})}}const nr=new c;function rr(t,e){if(!t)return!1;let n=nr.get(t);n||(n=new c,nr.set(t,n));let r=n.get(e);if(r===ft){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function or(t){return rr(t,Kn)}function ir(t,e,r){e=ur(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function ar(t,e,n){if(!t)throw new d(Mn);return new t(e,n)}function sr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function cr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?Xn:Kn;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return lr(t,c,i)}function ur(t,e){return kn(t).pipeThrough(e)}function lr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await wr(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await fr(r,t),await dr(o,t)}}(),e.readable}async function fr(t,e){try{await t.abort(e)}catch{}}async function dr(t,e){try{await t.cancel(e)}catch{}}function wr(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function pr(t,e){return e.has(t)?t:yr(t,mr(t)?qn:jn)}function hr(t){return mr(t)?yr(t,qn):t}function mr(t){return Re(t)&&"Z_MEM_ERROR"==t.code}function yr(t,e){const n=new d(e);return n.cause=t,n}const gr="data",Er="deflate",Sr="inflate";class br extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Er)?i=Qn:o.startsWith(Sr)&&(i=er),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==ft&&r.outputSize>t.outputSize))throw new d(Gn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Rr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const xr="Worker startup timeout";let zr,Fr,Dr,Ar=()=>{};async function Ir(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!or(e)&&(r=e,!rr(r,$n)))||!!n&&await Cr();var r}async function Cr(){if(Ar)try{return await void 0,!0}catch{}return!1}function Tr(t){t.createWorker?Fr=!0:zr=!1}class kr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return Fr&&(f=ft),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Rr(pe(s))).pipeThrough(new vr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),zr===ft&&(zr=typeof T!=wt),(u&&Dr&&(zr&&l||f)?Dr:Nr)(t,s)}}class vr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await _r(t,n)},async transform(t,r){o+=t.length,e&&await _r(e,o,n),r.enqueue(t)},async flush(){r&&await _r(r,o)}})}}async function _r(t,...e){try{await t(...e)}catch{}}function Nr(t,e){return{run:()=>Ur(t,e)}}async function Ur({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Er),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!or(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new br(t,i),s=new Rr(pe(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Re(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Cr()),c}}const Or={type:"module"},Mr="error",Lr="abort";let Br,Wr,Pr;var Zr;function Hr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Vr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Gr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Wr===ft||Br!==t){const n=typeof t==pt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===ft&&(o=!1),o&&(u=Or);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Gr(t,e,r,o,!1);if(o)throw i;return Gr(t,e,r,!0,!1)}}else{o===ft&&(o=!0),o&&(u=Or);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return Gr(t,e,r,!1,i);throw n}}Br=t,Wr=c,Pr=u}else s=new T(Wr,Pr);return s.addEventListener("message",t=>{r.M=!0,jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Re(l))try{s!==ft&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Re(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==ft&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Yr({type:gr,value:t,done:n,messageId:i},e)}if(r==gr){const t=new w(o);await l.ready,await l.write(t),y()||Yr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Vr(e),g(s))}function g(t){y()||(p(t),E(),Re(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Mr,t=>qr(t,r)),s.addEventListener("messageerror",t=>qr(t,r)),s}function jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function qr(t,e){t.preventDefault&&t.preventDefault(),jr(e);const{M:r,B:o,writer:i,U:a}=e;Vr(e),r||(e.v=null);let s=t.error||new d(t.message||Mr);r||(s=n.assign(new d(s.message||Mr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function Yr(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=Se(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Zr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==pt&&(s=s());try{c=Gr(t.workerURI,r,t)}catch{return Tr(t),Nr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(xr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Re(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Lr,t);c.addEventListener(Lr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{Yr({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Vr(t),t.v=null,e){const t=new d(xr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Re(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Re(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Tr(t),Hr(t),Ur(t,e);if(n&&n.codecImportFailed){if(t.reader)return Hr(t),Ur(t,e);t.U()}throw n}}}})}return t.N},Dr=Zr;let Kr=[];const Xr=[];let $r,Jr,Qr=0;async function to(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Wn.has(t)&&e&&Vn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===ft||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===ft&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:ft,e.createWorker=e.useWebWorkers&&h?h:ft,n.useCompressionStream=a||a===ft&&r.useCompressionStream,(await async function(){const n=Kr.find(t=>!t.I);if(n)return so(n),new kr(n,t,e,S);if(Kr.length<m){const n={j:Qr};return Qr++,Kr.push(n),new kr(n,t,e,S)}return new g(n=>{Xr.push({resolve:n,stream:t,T:e}),Jr=r.workerStarvationTimeout,eo()})}()).run();function S(t){if(no(),t.O)return t.O=!1,oo();if(Xr.length){const[{resolve:e,stream:n,T:r}]=Xr.splice(0,1);e(new kr(t,n,r,S)),eo()}else t.v?(so(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{Kr=Kr.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Kr=Kr.filter(e=>e!=t)}}function eo(){!$r&&Xr.length&&o.isFinite(Jr)&&Jr>=0&&($r=v(ro,Jr))}function no(){$r&&(_($r),$r=null)}function ro(){if($r=null,Xr.length){const[{resolve:t,stream:e,T:n}]=Xr.splice(0,1);t(new kr({},e,io(n),ao)),eo()}}function oo(){const t=Xr.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new kr({},e,io(n),()=>{ao(),r()}))}));return no(),g.all(t)}function io(t){return n.assign({},t,{useWebWorkers:!1,workerURI:ft,createWorker:ft})}function ao(){no(),eo()}function so(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const co="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function uo(t,e){return fo(t,e,!0)}function lo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function fo(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=co[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const wo="HTTP error ",po="HTTP Range not supported",ho="HTTP resource changed",mo="Writer iterator completed too soon",yo="Writer not initialized",go="Invalid writer (size must be writable)",Eo="Content-Range",So="Range",bo="GET",Ro="bytes",xo=16777216,zo="writable",Fo=k();class Do{constructor(){this.size=0}init(){this.initialized=!0}}class Ao extends Do{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const s=e===ft?n:a.min(n,e-o),c=await di(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==ft&&o>=e||!c.length&&s)&&i.close()}})}}class Io extends Do{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(yo);return t.writeUint8Array(Se(e))}});n.defineProperty(t,zo,{get:()=>e})}writeUint8Array(){}}class Co extends Ao{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class To extends Io{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let ko,vo;class _o extends Ao{constructor(t){super(),n.assign(this,{J:t,size:t.size}),vo||(vo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();ko=1==e}catch{ko=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return kn(e.stream());if(ko)return kn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class No extends Do{constructor(t){super();const e=this,r=new z;n.defineProperty(e,zo,{get:()=>r.writable}),e.contentType=t,e.et=vn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Uo extends _o{constructor(t){super(new y([t],{type:"text/plain"}))}}function Oo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Mo extends No{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return fo(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Lo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ti,Xo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==ft){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(po);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=ft,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ti(bo,t,Yo(t,o,e));if(206!=n.status)throw new d(po);const c=Ho(n);if(c!==ft&&c!=o)throw new d(po);qo(t,n),jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Zo(this,t,e,ti,Xo)}}class Bo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ei,$o),super.init()}readUint8Array(t,e){return Zo(this,t,e,ei,$o)}}function Wo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=xo,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Po(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==wt||o)){const r=await e(bo,t,Yo(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Ro))throw new d(po);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),jo(t,r);const i=Vo(r);i===ft?await Qo(t,e,n):t.size=i,o&&o.length&&Ho(r)===t.size-o.length&&(t.ot=o)}}else await Qo(t,e,n)}async function Zo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return gt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(bo,t,Yo(t,e,n));if(206!=o.status)throw new d(po);const i=Ho(o);if(i!==ft&&i!=e)throw new d(po);qo(t,o),jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(po);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ho(t){const e=t.headers.get(Eo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Vo(t){const e=t.headers.get(Eo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Go({headers:t}){return{it:t.get("Etag")||ft,lastModified:t.get("Last-Modified")||ft}}function jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Go(e))}function qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Vo(e);if(t!==ft&&i!==ft&&t!=i)throw new d(ho);if(o){const t=Go(e);if(n.entries(o).some(([e,n])=>n!==ft&&t[e]!==ft&&n!=t[e]))throw new d(ho)}}}function Yo(t,e=0,r=1){return n.assign({},Ko(t),{[So]:Ro+"="+(e<0?e:e+"-"+(e+r-1))})}function Ko({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function Xo(t){await Jo(t,ti)}async function $o(t){await Jo(t,ei)}async function Jo(t,e){const n=await e(bo,t,Ko(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Qo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Ko(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ti(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(po):new d(wo+(a.statusText||a.status))}function ei(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(po):new d(wo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ni extends Ao{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Bo(t,e):new Lo(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class ri extends Ao{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class oi extends Io{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ii extends Ao{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(fi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===ft?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await di(c,s,e);else{const i=r-s;o=Ee(await di(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.ft=a.max(i,n.ft),o}}class ai extends Do{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===Fo)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(mo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await li(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,zo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Fo)}finally{t.releaseLock()}}}class si{constructor(t){return e.isArray(t)&&(t=new ii(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:kn(t)}),t}}class ci{constructor(t){t.writable===ft&&typeof t.next==pt&&(t=new ai(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:_n(t)});try{t.size=t.size===ft?0:t.size}catch{throw new d(go)}return t}}function ui(t){return Boolean(t&&t.getData)}async function li(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function fi(t){return t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t}function di(t,e,n){return t.readUint8Array(e,n)}function wi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Ao.prototype.createReadable.call(t,e):t.readable}function pi(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==ft&&(r.filename=n),t.push(r)}}const hi="filename",mi="rawFilename",yi="comment",gi="rawComment",Ei="uncompressedSize",Si="compressedSize",bi="offset",Ri="diskNumberStart",xi="lastModDate",zi="rawLastModDate",Fi="lastAccessDate",Di="rawLastAccessDate",Ai="creationDate",Ii="rawCreationDate",Ci="internalFileAttributes",Ti="externalFileAttributes",ki="msdosAttributesRaw",vi="msdosAttributes",_i="msDosCompatible",Ni="zip64",Ui="encrypted",Oi="version",Mi="versionMadeBy",Li="zipCrypto",Bi="directory",Wi="executable",Pi="compressionMethod",Zi="signature",Hi="extraField",Vi="unixMode",Gi="setuid",ji="setgid",qi="sticky",Yi=[hi,mi,Ei,Si,xi,zi,yi,gi,Fi,Di,Ai,Ii,bi,Ri,Ci,Ti,ki,vi,_i,Ni,Ui,Oi,Mi,Li,Bi,Wi,"symlink",Pi,Zi,"crc32",Hi,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Vi,"unixExternalUpper",Gi,ji,qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Ki{constructor(t){Yi.forEach(e=>this[e]=t[e])}}const Xi=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function $i(t,e,n){return t?e?12:16+4*n:0}const Ji="File format is not recognized",Qi="End of central directory not found",ta="End of Zip64 central directory locator not found",ea="Central directory header not found",na="Local file header not found",ra="Zip64 extra field not found",oa="File contains encrypted entry",ia="Encryption method not supported",aa="Split zip file",sa="Overlapping entry found",ca="Entry data out of bounds",ua="Ambiguous archive",la="Encrypted central directory is not supported",fa="Unsafe filename",da="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",wa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",pa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ha="64-bit value exceeds Number.MAX_SAFE_INTEGER",ma="unsorted central directory",ya="unknown version needed to extract",ga="compressed patched data",Ea="malformed extra field",Sa="unknown zip64 extensible data",ba="wrapped entries count",Ra="appended data",xa="prepended data",za="prepended central directory",Fa="trailing central directory data",Da="mismatched central directory offset",Aa="missing zip64 extra field",Ia="duplicate filename",Ca="mismatched zip64 end of central directory record",Ta="multiple end of central directory records",ka="mismatched local file header (filename)",va="mismatched local file header (general purpose bit flag)",_a="mismatched local file header (compression method)",Na="mismatched local file header (crc32 or sizes)",Ua=/^[a-zA-Z]:/,Oa=/(^|[\\/])\.\.([\\/]|$)/,Ma="utf-8",La="cp437",Ba=[[Ei,O],[Si,O],[bi,O],[Ri,M]],Wa={[M]:{yt:Ds,bytes:4},[O]:{yt:As,bytes:8}},Pa=i(o.MAX_SAFE_INTEGER);class Za{constructor(t,e={}){n.assign(this,{reader:new si(t),options:e,gt:{Et:new u,St:[],bt:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await li(r),r.size!==ft&&r.readUint8Array||(r=new _o(await vn(r.readable)),await li(r)),r.size<Y)throw new d(Ji);const o=e.warnings=[],i=us(t,e.options),s=i==Mt,c=i!=Bt,l=ds(Ss(e,t,vt),i),f=function(t,e){if(t===ft)return e;if(!cs(t))throw new d(wa);return t}(Ss(e,t,"filenameValidation"),i),p=Ss(e,t,"normalizeFilename"),{Rt:h,xt:m}=await ws(r,c,l);if(!h)throw await async function(t){return await ss(t)==W}(r)?new d(aa):new d(Qi);c&&m>1&&Es(Ta);const y=be(h);let g=Ds(y,12),E=Ds(y,16);const S=h.offset,b=Fs(y,20),R=S+Y+b,x=r.size-R;x>l&&Es(Ra),x>0&&pi(o,Ra);let F=Fs(y,4);const D=r.ft||0;let A,I,C,T,k,v=Fs(y,6),_=Fs(y,10),N=0,U=X;const P=E==O||g==O||_==M||v==M;if(E!=O&&v!=M&&(E+=as(r,v)),P){const t=h.offset>=K?await di(r,h.offset-K,K):gt,e=be(t);if(t.length==K&&Ds(e,0)==j){E=as(r,Ds(e,4))+As(e,8);let t=await di(r,E,X),i=be(t);const c=h.offset-K-X;if((t.length<X||Ds(i,0)!=G)&&E!=c&&c>=0){const e=E;E=c,E>e&&(N=E-e),t=await di(r,E,X),i=be(t)}if(t.length<X||Ds(i,0)!=G)throw new d(ta);if(C=!0,T=As(i,4)>44,T){const t=a.min(As(i,4)-44,r.size-E-X);t>0&&(U+=t,k=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=be(t),o=Fs(r,26);n.assign(e,{compressionMethod:Fs(r,0),compressedSize:As(r,2),uncompressedSize:As(r,10),encryptionAlgorithm:Fs(r,18),bitLength:Fs(r,20),flags:Fs(r,22),hashAlgorithm:Fs(r,24),hashData:t.subarray(28,28+o)})}return e}(await di(r,E+X,t)))}F==M?F=Ds(i,16):F!=Ds(i,16)&&gs(s,o,Ca),v==M?v=Ds(i,20):v!=Ds(i,20)&&gs(s,o,Ca),_==M?_=As(i,32):_!=As(i,32)&&gs(s,o,Ca),g==O?g=As(i,40):g!=As(i,40)&&gs(s,o,Ca),E=as(r,v)+As(i,48)+N}else if(E==O||g==O||v==M)throw new d(ta)}let V=g;const $=h.offset-(C?U+K:0);if(E>=r.size&&(N=r.size-E-g-Y,E=r.size-g-Y),D!=F)throw new d(aa);if(E<0)throw new d(Ji);let J=0,Q=await di(r,E,g),tt=be(Q);if(g){if(Q.length<4)throw new d(Ji);let t=$-g;if(E!=t&&v==F){const e=Ds(tt,J)==H||Boolean(k&&k.compressedSize)||ja(tt);let n=!e;if(t>=0&&t+4<=r.size){const o=await Ya(r,t);if(e)n=o;else if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await di(t,n,e-n),o=be(r);for(let t=r.length-6;t>=0;t--)if(Ds(o,t)==Z&&t+6+Fs(o,t+4)==r.length)return n+t}(r,$),n=e-g;e!==ft&&n>=0&&await Ya(r,n)&&(t=n)}}if(n){const n=E;if(E=t,Q=await di(r,E,g),tt=be(Q),E>n)N+=E-n,A=e;else{gs(s,o,Da);const t=E-n;if(Q.length>=q){const e=Ds(tt,42);!await Ka(r,e,B)&&await Ka(r,e+t,B)&&(N+=t)}}}}}const et=$-E;if(g!=et&&et>=0&&v==F&&(g=et,Q=await di(r,E,g),tt=be(Q)),E<0||E>=r.size)throw new d(Ji);e.directoryOffset=E,e.directoryLength=V;const nt=bs(e,t,"decryptCentralDirectory");let ct,ut;if(nt&&_&&Q.length>=4&&Ds(tt,0)!=H&&(T||ja(tt))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(k,V,Q.length);ut=Q.subarray(t),Q=await nt(Q.subarray(0,t),k),tt=be(Q),V=Q.length,ct=!0}k&&!ct&&(Q.length<4||Ds(tt,0)==H)&&pi(o,Sa),I=E;const lt=Ss(e,t,"filenameEncoding"),dt=Ss(e,t,"commentEncoding"),wt=new u;let pt,ht=-1;const mt=!s&&!C;!_&&mt&&(_=qa(tt,Q,J),_&&pi(o,ba));for(let i=0;i<_;i++){const c=new Ga(r,e.options);if(J+q>Q.length||Ds(tt,J)!=H){if(0==i&&!ct&&(T||ja(tt)))throw new d(la);throw new d(ea)}$a(c,tt,J+6);const u=Boolean(c.bitFlag.languageEncodingFlag),l=J+q,h=l+c.filenameLength+c.extraFieldLength,m=Fs(tt,J+4),y=!(m>>8),g=m>>8==3,E=Fs(tt,J+32),S=h+E,b=new w(Q.subarray(l,S)),R=b.subarray(0,c.filenameLength),x=b.subarray(c.filenameLength+c.extraFieldLength),F=u||!lt&&lo(R),D=u||!dt&&lo(x),A=Ds(tt,J+38),C=A&L,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=Ds(tt,J+42),U=bs(e,t,"decodeText")||uo,O=F?Ma:lt||La,B=D?Ma:dt||La;let W=U(R,O,Ut);W===ft&&(W=uo(R,O));let P,Z=U(x,B,Ot);Z===ft&&(Z=uo(x,B)),n.assign(c,{index:i,zt:ct,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Ft:E,offset:v,diskNumberStart:Fs(tt,J+34),internalFileAttributes:Fs(tt,J+36),externalFileAttributes:A,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(c.filenameLength,c.filenameLength+c.extraFieldLength),rawComment:x,filename:W,comment:Z});try{P=Ja(c,c,tt,J+6)}catch(t){if(s||t.message!=ra)throw t;c.Dt=!0,pi(o,Aa,c.filename)}if(W=c.filename,p){const t=p(W);t!==ft&&(W=c.filename=t)}if(fs(W,f)){const t=new d(fa);throw t.filename=W,t}P&&pi(o,Ea,W),c.offset+=N;const V=as(r,c.diskNumberStart)+c.offset;I=a.min(V,I),V<ht&&pi(o,ma,W),ht=V,(c.version&L)>63&&pi(o,ya,W),32&~c.rawBitFlag||pi(o,ga,W),wt.has(c.filename)&&(pt=!0),wt.add(c.filename);const G=c.externalFileAttributes>>16&M;c.unixMode===ft&&16877&G&&(c.unixMode=G);const j=Boolean(c.unixMode&it),Y=Boolean(c.unixMode&at),K=Boolean(512&c.unixMode),X=40960==((c.unixMode===ft?G:c.unixMode)&rt),$=c.unixMode!==ft&&(c.unixMode&rt)==ot||(G&rt)==ot||y&&k.directory||c.filename.endsWith(st),et=!X&&!$&&(c.unixMode!==ft?!!(73&c.unixMode):g&&!!(73&G));n.assign(c,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:et,directory:$,zipCrypto:c.encrypted&&!c.extraFieldAES});const nt=new Ki(c);if(nt.getData=(t,n)=>c.getData(t,nt,e.gt,n),nt.arrayBuffer=async t=>{const r=new z,o=vn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await c.getData(r,nt,e.gt,n.assign({},t,{preventClose:!1})),o},J=S,i==_-1&&mt){const t=qa(tt,Q,J);t&&(_+=t,pi(o,ba))}const{onprogress:ut}=t;if(ut)try{await ut(i+1,_,new Ki(c))}catch{}yield nt}let yt=J,Et=Xa(Q.subarray(J))||(ct?Xa(ut):ft);if(!Et&&!ct){const t=E+J,e=a.min($-t,65541);e>=6&&(Et=Xa(await di(r,t,e)))}Et&&(e.digitalSignature=Et,yt=J+6+Et.length),(J!=V&&yt!=V||!ct&&J!=g&&yt!=g)&&gs(s,o,Fa),pt&&gs(s,o,Ia);const St=Ss(e,t,"extractPrependedData"),bt=Ss(e,t,"extractAppendedData"),Rt=(s||St)&&_&&4==I&&await async function(t){const e=await ss(t);return e==W||808471376==e}(r)?4:0;return s&&(N>0||_&&I>Rt)&&Es(xa),(N>0||_&&I>4)&&pi(o,xa),A&&pi(o,za),St&&(e.prependedData=I>Rt?await di(r,Rt,I-Rt):gt),e.comment=b?await di(r,S+Y,b):gt,bt&&(e.appendedData=R<r.size?await di(r,R,r.size-R):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[Et](){return this.close()}}class Ha{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Za(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Va(t,e={}){if(t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t.size<Y)return!1;const n=us(e,{}),r=n!=Bt,o=ds(e[vt],n),{Rt:i,xt:a}=await ws(t,r,o);if(!i||n==Mt&&a>1)return!1;const s=Fs(be(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ga=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this;if(i.Dt)throw new d(ra);const s=we(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:g,rawLastModDate:E,uncompressedSize:S,compressedSize:b}=i,{dataDescriptor:R}=m,x=e.localDirectory={},z=e.warnings=[],F=as(c,f)+l,A=await di(c,F,ct),I=be(A);let C=Ss(i,o,St),T=Ss(i,o,bt);const k=Xt(Ss(i,o,Rt)),v=Boolean(k),_=!0===k;if(Kt(C,T),C=C&&C.length?C:ft,T=T&&T.length?T:ft,w&&99!=w.originalCompressionMethod)throw new d(Mn);if(A.length<ct||Ds(I,0)!=B)throw new d(na);$a(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=Ss(i,o,"checkLocalDirectory"),W=us(o,i.options),P=function(t,e){return t===ft?e!=Bt:Boolean(t)}(M,W),Z=Ss(i,o,"checkLocalFilename"),H=function(t,e){return t===ft?e==Mt:Boolean(t)}(Z===ft?M:Z,W);let V=gt;if(H&&(U||N)){const t=await di(c,F+ct,U+N);V=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await di(c,F+ct+U,N):gt;H&&(x.rawFilename=V),Ja(i,x,I,4,!0)&&pi(z,Ea),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.zt&&!(8192&~e.rawBitFlag);!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||gs(a,o,ka),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&gs(a,o,va),e.compressionMethod!=t.compressionMethod&&gs(a,o,_a),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||gs(a,o,Na)}(i,x,V,H,P?ft:z);const{lastAccessDate:G,creationDate:j,uid:q,gid:Y}=x;G&&(e.lastAccessDate=G),j&&(e.creationDate=j),q!==ft&&e.uid===ft&&(e.uid=q),Y!==ft&&e.gid===ft&&(e.gid=Y);const K=Ss(i,o,"checkPasswordOnly"),X=i.encrypted&&(!_||K),$=X&&!w;if(_||(e.zipCrypto=$),X&&!(64&~i.rawBitFlag))throw new d(ia);const J=v?ft:Pn(h);if(0!=h&&8!=h&&9!=h&&!J&&!v)throw new d(Mn);if(X){if(!$&&(w.strength<1||w.strength>3))throw new d(ia);if(!C&&!T)throw new d(oa)}if(O+b>c.size)throw new d(ca);const Q=b,tt=qt(Ss(i,o,xt));Yt(tt);let et=Ss(i,o,"checkOverlappingEntry");const nt=Ss(i,o,"checkOverlappingEntryOnly");nt&&(et=!0);const{onstart:rt,onprogress:ot,onend:it}=o,at=0!=h&&!v,st=v?b-$i(X,$,w&&w.strength):S,ut=9==h;let lt=Ss(i,o,Ft);ut&&(lt=!1);const dt=Ss(i,o,"checkCrc32"),wt=(dt===ft?Ss(i,o,"checkSignature"):dt)&&!v&&(!X||$||w&&1==w.vendorVersion),pt={options:{codecType:Sr,password:C,rawPassword:T,zipCrypto:$,encryptionStrength:w&&w.strength,checkCrc32:wt,checkAuthenticationCode:Ss(i,o,"checkAuthenticationCode"),passwordVerification:$&&(R?E>>>8&L:g>>>24&L),outputSize:st,crc32:g,compressed:at,encrypted:X,useWebWorkers:Ss(i,o,zt),useCompressionStream:lt,deflate64:ut,format:J?J.format:ft,codecURI:J?J.codecURI:ft,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:K},config:s,A:{signal:tt,size:Q,onstart:rt,onprogress:ot,onend:it}};let ht,mt,yt;et&&await async function({reader:t,At:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=be(await di(t,s+i,24)),c=[[n,!0],[n,!1],[!n,!0],[!n,!1]].map(([t,e])=>os(r,t,e)).filter(t=>t&&t.compressedSize==i&&t.uncompressedSize==a),l=c.find(t=>t.crc32==o)||c[0]||os(r,n,!0)||os(r,n,!1);l?(e.localDirectory.dataDescriptor=l,f=is(l.zip64,l.signature)):f=is(n,!1)}const w={start:r,end:s+i+f,At:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&rs(e,o)?o:i&&rs(e,i)?i:void 0}(h,w)||m.find(t=>rs(w,t));if(t){const e=new d(sa);throw e.overlappingEntry=t.At,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:c,At:e,index:u,offset:F,crc32:g,compressedSize:b,uncompressedSize:S,dataOffset:O,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,gt:r});try{if(!nt){K&&(t=new D),t=new ci(t),await li(t,function(t,e,n){return a.min(t,n?1032*e:e)}(st,b,at)),({writable:ht}=t);const e=kn(c.createReadable({offset:O,size:Q})),{outputSize:r}=await to({readable:e,writable:ht},pt);if(Yt(tt),r!=st)throw n.assign(new d(Gn),{outputSize:r});t.size+=r}}catch(e){const{outputSize:n}=pt;if(n!==ft?t.size+=n:Re(e)&&e.outputSize!==ft&&(t.size+=e.outputSize),!K||!Re(e)||e.message!=Qe)throw mt=e,yt=!0,e}finally{if((ui(t)||!Ss(i,o,Dt))&&ht&&!ht.locked){const t=ht.getWriter();if(yt)try{await t.abort(mt)}catch{}else await t.close()}}return K||nt?ft:t.getData?t.getData():ht}};function ja(t){const e=a.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==Ds(t,n))return!0;return!1}function qa(t,e,n){let r=0;for(;n+q<=e.length&&Ds(t,n)==H;)n+=q+Fs(t,n+28)+Fs(t,n+30)+Fs(t,n+32),r++;return r%65536?0:r}function Ya(t,e){return Ka(t,e,H)}async function Ka(t,e,n){return!(e<0||e+4>t.size)&&Ds(be(await di(t,e,4)),0)==n}function Xa(t){if(t.length>=6){const e=be(t);if(Ds(e,0)==Z){const n=Fs(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function $a(t,e,r){const o=t.rawBitFlag=Fs(e,r+2),i=!(1&~o),a=Ds(e,r+6);n.assign(t,{encrypted:i,version:Fs(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Rs(a),filenameLength:Fs(e,r+22),extraFieldLength:Fs(e,r+24)})}function Ja(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=be(a);let f=0,w=!1;try{for(;f<a.length;){const t=Fs(l,f),e=Fs(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Fs(r,o+4);n.assign(e,{signature:Ds(r,o+10),crc32:Ds(r,o+10),compressedSize:Ds(r,o+14),uncompressedSize:Ds(r,o+18)});const h=u.get(1);if(h)(function(t,e,n){e.zip64=!0;const r=be(t.data),o=Ba.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Wa[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(ra)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Wa[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0})(h,e,i)||(w=!0),e.extraFieldZip64=h;else if(Ba.some(([t,n])=>e[t]==n)){if(!i)throw new d(ra);w=!0}const m=u.get(28789);m&&(Qa(m,hi,mi,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Qa(y,yi,gi,e,t),e.extraFieldUnicodeComment=y);const g=u.get($);g&&(99==p||e.encrypted)&&g.data.length>=7?(function(t,e,r){const o=be(t.data),i=zs(o,4);n.assign(t,{vendorVersion:zs(o,0),vendorId:zs(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Fs(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=ft)}(g,e,p),e.extraFieldAES=g):(g&&(w=!0),e.compressionMethod=p);const E=u.get(13);E&&(ts(E,e),e.extraFieldPkwareUnix=E);const S=u.get(22613);S&&(ts(S,e),e.extraFieldUnixType1=S);const b=u.get(J);b&&(function(t,e,n){if(!t.data.length)return;const r=be(t.data),o=zs(r,0),i=[],a=[];n?(1&~o||(i.push(xi),a.push(zi)),2&~o||(i.push(Fi),a.push(Di)),4&~o||(i.push(Ai),a.push(Ii))):t.data.length>=5&&(i.push(xi),a.push(zi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Ds(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(b,e,i),e.extraFieldExtendedTimestamp=b);const R=u.get(10);R&&(function(t,e){const r=be(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Fs(r,i),n=Fs(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=be(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:xs(i),lastAccessDate:xs(a),creationDate:xs(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(R,e),e.extraFieldNTFS=R);const x=u.get(tt);let z;x&&(z=es(x,e,!0),e.extraFieldInfoZip=x);const F=u.get(et);F&&(es(F,z?{}:e,!1),e.extraFieldUnix=F);const D=u.get(Q);return D&&(e.extraFieldUSDZ=D),w}function Qa(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=be(t.data),s=new ve;s.append(i[r]);const c=be(new w(4));c.setUint32(0,s.get(),!0);const u=Ds(a,1),l=zs(a,0);n.assign(t,{version:l,[e]:uo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Ds(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function ts(t,e){if(t.data.length<8)return;const r=be(t.data),o={lastAccessDate:new s(1e3*(0|Ds(r,0))),lastModDate:new s(1e3*(0|Ds(r,4)))};t.data.length>=12&&(o.uid=Fs(r,8),o.gid=Fs(r,10)),n.assign(t,o),n.assign(e,o)}function es(t,e,r){try{const o=be(t.data);let i,a;if(r){let e=0;const r=zs(o,e++),s=zs(o,e++);i=ns(t.data.subarray(e,e+s)),e+=s;const c=zs(o,e++);a=ns(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Fs(o,0),a=Fs(o,2),n.assign(t,{uid:i,gid:a}));return i!==ft&&(e.uid=i),a!==ft&&(e.gid=a),i!==ft||a!==ft}catch{}}function ns(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function rs(t,e){return t.start<e.end&&e.start<t.end}function os(t,e,n){const r=n?4:0;if(t.byteLength<is(e,n)||n&&Ds(t,0)!=P)return ft;const o=Ds(t,r);let i,a;try{e?(i=As(t,r+4),a=As(t,r+12)):(i=Ds(t,r+4),a=Ds(t,r+8))}catch{return ft}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function is(t,e){return(t?20:12)+(e?4:0)}function as(t,e){return t.ht?t.ht(e):0}async function ss(t){return Ds(be(await di(t,0,4)))}function cs(t){return t===Mt||t===Lt||t===Bt}function us(t,e){return ls(t,ls(e,Lt))}function ls(t,e){const n=t.strictness;if(n!==ft){if(!cs(n))throw new d(da);return n}const r=t.checkAmbiguity;return r===ft?e:r?Mt:e==Bt?Bt:Lt}function fs(t,e){if(e==Bt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Oa.test(t)||t.startsWith("/")||t.startsWith("\\")||Ua.test(t))||e==Mt&&(n.includes(".")||n.includes("")||t.includes("\0"))}function ds(t,e){if(t!==ft){const e=Qt(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(pa);return e}return e==Mt?0:e==Bt?1/0:M}async function ws(t,e,n){const{size:r}=t,o=a.min(r,65557),i={It:64};let s,c,u=0;for await(const[n,a,l,f,d]of ps(t,o)){const o=Fs(n,f+20);if(d+Y+o==r){const o=await ms(t,n,a,f,d,r,i);if(2==o){if(s||(s=hs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=hs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of ps(t,o)){const o=hs(c,u,l);i||(i=o);const f=await ms(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{Rt:s,xt:u}}async function*ps(t,e){const n=t.size-e,r=await di(t,n,e),o=be(r);for(let t=r.length-Y;t>=0;t--)Ds(o,t)==V&&(yield[o,n,r,t,n+t])}function hs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function ms(t,e,n,r,o,i,a){const s=Fs(e,r+10),c=Ds(e,r+12),u=Ds(e,r+16);if(s==M||c==O||u==O)return await ys(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Fs(e,r+6);for(const r of[o-c,as(t,l)+u])if(await ys(t,e,n,r,i,a)==H)return 2;return 0}async function ys(t,e,n,r,o,i){return r<0||r+4>o?ft:r>=n?Ds(e,r-n):i.It>0?(i.It--,Ds(be(await di(t,r,4)),0)):ft}function gs(t,e,n){t?Es(n):pi(e,n)}function Es(t){const e=new d(ua);throw e.reason=t,e}function Ss(t,e,n){return e[n]===ft?t.options[n]:e[n]}function bs(t,e,n){return jt(Ss(t,e,n))}function Rs(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function xs(t){return new s(o(t/i(1e4)-i(116444736e5)))}function zs(t,e){return t.getUint8(e)}function Fs(t,e){return t.getUint16(e,!0)}function Ds(t,e){return t.getUint32(e,!0)}function As(t,e){const n=t.getBigUint64(e,!0);if(n>Pa)throw new d(ha);return o(n)}var Is=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ua,ERR_BAD_FORMAT:Ji,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ea,ERR_CODEC_OUT_OF_MEMORY:qn,ERR_ENCRYPTED:oa,ERR_ENCRYPTED_CENTRAL_DIRECTORY:la,ERR_ENTRY_DATA_OUT_OF_BOUNDS:ca,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ta,ERR_EOCDR_NOT_FOUND:Qi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ra,ERR_INVALID_AUTHENTICATION_CODE:Je,ERR_INVALID_COMPRESSED_DATA:jn,ERR_INVALID_CRC32:Yn,ERR_INVALID_FILENAME_VALIDATION:wa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:pa,ERR_INVALID_PASSWORD:$e,ERR_INVALID_STRICTNESS:da,ERR_INVALID_UNCOMPRESSED_SIZE:Gn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:na,ERR_OVERLAPPING_ENTRY:sa,ERR_SPLIT_ZIP_FILE:aa,ERR_UNSAFE_FILENAME:fa,ERR_UNSUPPORTED_COMPRESSION:Mn,ERR_UNSUPPORTED_ENCRYPTION:ia,ERR_UNSUPPORTED_UINT64:ha,ERR_WORKER_STARTUP_TIMEOUT:xr,WARNING_APPENDED_DATA:Ra,WARNING_COMPRESSED_PATCHED_DATA:ga,WARNING_DUPLICATE_FILENAME:Ia,WARNING_MALFORMED_EXTRA_FIELD:Ea,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:Da,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:va,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:_a,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Na,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ka,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Ca,WARNING_MISSING_ZIP64_EXTRA_FIELD:Aa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ta,WARNING_PREPENDED_CENTRAL_DIRECTORY:za,WARNING_PREPENDED_DATA:xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Fa,WARNING_UNKNOWN_VERSION:ya,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Sa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ma,WARNING_WRAPPED_ENTRIES_COUNT:ba,ZipReader:Za,ZipReaderStream:Ha,isZipFile:Va});const Cs="File already exists",Ts="Zip file comment exceeds 64KB",ks="Invalid zip file comment (must be a Uint8Array)",vs="File entry comment exceeds 64KB",_s="Invalid file entry comment (must be a string)",Ns="Invalid date (must be a valid Date instance)",Us="File entry name exceeds 64KB",Os="Version exceeds 65535",Ms="The strength must equal 1, 2, or 3",Ls="Encryption is not supported in USDZ files",Bs="Split zip files are not supported in USDZ files",Ws="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ps="Invalid extra field (must be a Map)",Zs="Invalid extra field type (must be integer 0..65535)",Hs="Invalid extra field data (must be a Uint8Array)",Vs="Extra field data exceeds 64KB",Gs=-2147483648,js=2147483647,qs=i(0),Ys=i("0x7fffffffffffffff"),Ks="Zip64 is not supported (set the 'zip64' option to 'true')",Xs="Undefined uncompressed size",$s="Undefined compression method",Js="Undefined CRC32",Qs="Undetermined size",tc="Undefined reader",ec="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",nc="Zip file not empty",rc="Invalid uid (must be integer 0..2^32-1)",oc="Invalid gid (must be integer 0..2^32-1)",ic="Invalid UNIX mode (must be integer 0..65535)",ac="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",sc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",cc="Invalid msdosAttributesRaw (must be integer 0..255)",uc="Invalid msdosAttributes (must be an object with boolean flags)",lc="Invalid level (must be integer 0..9)",fc="Signature data exceeds 64KB",dc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",wc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",pc="compression unavailable",hc="clamped last modification date",mc=new w([7,0,2,0,65,69,3,0,0]),yc="infozip",gc="unix",Ec=[8,9,5,3];let Sc=0;const bc=[];class Rc{constructor(t,e={}){t=new ci(t);const{availableSize:r=dt,maxSize:o=dt}=t,i=r>0&&r!==dt&&o>0&&o!==dt;if(i&&e[kt])throw new d(Bs);n.assign(this,{writer:t,Ct:i,options:e,Tt:new c,kt:new u,offset:e[Tt]===ft?t.size||t.writable.size||0:e[Tt],vt:e[Tt]===ft?0:e[Tt]-(t.size||t.writable.size||0),_t:new u,Nt:[],warnings:[],Ut:0,Ot:0,Mt:ft,Lt:!1})}prependZip(t){return Fc(this,async function(t,e){if(t.kt.size)throw new d(nc);await t.Bt(e)}(this,t))}appendZip(t,e={}){return Fc(this,this.Bt(t,e))}async Bt(t,r={}){const o=this,{_t:i,kt:a,Tt:s}=o,l=jt(r.filter);for(;i.size;)await g.allSettled(e.from(i));let f;const w=new g(t=>f=t);i.add(w);const p=[];let h;try{t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t));const{ZipReader:r}=await g.resolve().then(function(){return Is}),i=new r(t),f=await i.getEntries(),w=[];for(const t of f)l&&!await l(t)||w.push(t);await i.close(),await li(o.writer);const{directoryOffset:m}=i;w.forEach(({filename:t})=>{if(a.has(t))throw new d(Cs);a.add(t),p.push(t)}),o.Wt=!0;const{Pt:y}=o;o.Pt=new g(t=>h=()=>{o.Wt=!1,t()}),await y,o.Ct&&(delete o.Ct,await async function(t){return be(await di(t,0,4)).getUint32(0,!0)==W}(t)||(await Xc(o.writer,Yc()),o.offset+=4));const E=await async function(t,n,r,o,i,a){const{writer:s}=t,l=new c;if(s.closeDisk||a){const c=e.from(r).sort((t,e)=>qc(n,t)-qc(n,e)),f=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const r=qc(t,n[e]),a=n[e+1];a&&qc(t,a)>r&&(i=qc(t,a)),o[e]=i}return o}(n,c,i),d=new u(o);let w,p=0;for(let e=0;e<c.length;e++){const r=c[e];if(d.has(r)){const o=qc(n,r);o<p?l.set(r,w):(a||await Gc(t,n,p,o-p),s.closeDisk&&Zc(s,await jc(n,o))&&await s.closeDisk(),w={offset:Hc(t,s),diskNumberStart:Wc(s)},l.set(r,w),await Gc(t,n,o,f[e]-o),p=f[e])}}a||await Gc(t,n,p,i-p)}else{const e=t.offset;await Gc(t,n,0,i),r.forEach(t=>l.set(t,{offset:e+qc(n,t),diskNumberStart:0}))}return l}(o,t,f,w,m,Boolean(l));w.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:a,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:f,rawExtraField:d}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=i;d=Vc(d||gt),t.extraFieldAES&&(f=99);const m=du(d),y=Boolean(l)&&l.uncompressedSize!==ft,g=Boolean(l)&&l.compressedSize!==ft,S=-7&hu(w,p,h,a,f)|w<<1,{Zt:b,Ht:R}=wu({version:e,bitFlag:S,compressionMethod:f,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,Vt:g,Gt:y,extraFieldLength:m}),{crc32:x}=t;x!==ft&&uu(R,10,x);const{offset:z,diskNumberStart:F}=E.get(t);n.assign(t,{jt:!0,Gt:y,Vt:g,offset:z,diskNumberStart:F,qt:!1,Yt:gt,Kt:gt,Xt:gt,$t:gt,Jt:gt,Qt:gt,rawExtraField:d,te:gt,Zt:b,Ht:R}),s.set(t.filename,t)})}catch(t){throw p.forEach(t=>a.delete(t)),t}finally{f(),i.delete(w),h&&h()}}add(t="",e,r={}){const o=this,{_t:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Nt];if(a!==ft){const{ee:e,ne:r}=Ic(a,Xt(eu(t,o,Rt)),eu(t,o,xi));delete o[Nt],o=n.assign(e,r,o)}if(eu(t,o,Bi)&&!e.endsWith(st)&&(e+=st),t.kt.has(e))throw new d(Cs);t.kt.add(e),Sc<we().maxWorkers?Sc++:await new g(t=>bc.push(t));try{return await async function(t,e,r,o){const a=Cc(t,e,o);({name:e}=a);const s=Tc(t,e,o),{comment:c}=s,u=o[Hi];t.Tt.set(e,ft);const l=t.Mt,f={};let w,p;s.re.keepOrder&&(f.oe=new g(t=>w=t)),t.Mt=f;try{const{re:c}=s;0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0,pi(t.warnings,pc,e));const u=await async function(t,e,{re:r},o){if(r.ie&&!e&&!eu(t,o,Bi))throw new d(tc);let i;if(e){if(e=new si(e),await li(e),!e.readUint8Array&&!e.readable)throw new d(ec);({size:i}=e)}return n.assign({reader:e},vc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Pc(t.writer),m=Wc(t.writer);let y=o.crc32===ft?o[Zi]:o.crc32;const E=u.re.encrypted&&!c.zipCrypto;if(c.ie&&!c.ae&&E&&(y=ft),c.ie&&r&&!E&&y===ft)throw new d(Js);const S=Nc(o=n.assign({},o,a.re,s.re,u.re,{signature:o[Zi],crc32:y,offset:t.offset-h,diskNumberStart:m,[kt]:t.options[kt]}));S.se&&pi(t.warnings,hc,e);const b=Mc(o),R=du(S.ce,b.ue);p=await async function(t,e,r,o,a){const{Tt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,le:f,signal:w}=a,{fe:p,At:h,de:m,we:y}=o,E=t.options[kt];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.oe:ft;s.set(e,I);try{a.bufferedWrite||!u||t.Wt||t.Ut||t.Ot||!l&&!f?(S=!0,t.Ut++,A=a.createTempStream?await a.createTempStream():new z(ft,ft,{highWaterMark:dt}),A.size=0,await li(c)):(b=!0,t.Ot++,A=c,await T,await k()),await li(A);const h=Pc(c);t.Ct&&!S&&await Kc(t,c),E&&!S&&Uc(o,t.offset-h);const{ce:m}=p;S||await v();const y=Wc(c),R=Hc(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await Xc(A,m)),I=await async function(t,e,{diskNumberStart:r,oe:o},a,s,c){const{fe:u,pe:l,he:f}=a,{Zt:w,Ht:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,Yt:b,me:R,Xt:x,ye:z,ge:F,$t:D,Jt:A,Qt:I,Kt:C}=u,{ue:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,jt:P,Gt:Z,Vt:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,te:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:dt,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,ie:St,ae:bt,format:Rt,codecURI:xt}=c,zt={oe:o,versionMadeBy:Y,zip64:W,jt:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,Yt:b,me:R,Xt:x,$t:D,Jt:A,Qt:I,Kt:C,rawExtraField:X,te:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(dt),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=kn(wi(t,{size:n})),o={options:{codecType:Er,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await to({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,Yt(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Ks)}catch(t){const{outputSize:n}=o;throw n!==ft?e.size+=n:Re(t)&&t.outputSize!==ft&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,fe:r,pe:o},{zip64:a,zipCrypto:s,ie:c,dataDescriptor:u}){const{Ht:l,encrypted:f}=r,{Ee:d,Se:w}=o;f&&!s&&!c||t===ft||(uu(l,10,t),u&&uu(d,w,t)),a?u&&(lu(d,w+4,i(e)),lu(d,w+12,i(n))):(uu(l,14,e),uu(l,18,n),u&&(uu(d,w+4,e),uu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,fe:u,pe:l},c),G&&await Xc(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,Zt:w,Ht:p,signature:Ft,crc32:!y||V||St?Ft:ft,ye:z,ge:F,Gt:Z,Vt:H}),zt}(r,A,I,o,we(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.Ct&&await Kc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Wc(c),I.offset=Hc(t,c),E){const e=o.he;Uc(o,t.offset-Pc(c)),I.size+=o.he-e}!function({rawFilename:t,encrypted:e,zip64:n,me:r,crc32:o,compressedSize:a,uncompressedSize:s,Gt:c,Vt:u},l,{dataDescriptor:f,ie:d}){if(f||((!e||d&&o!==ft)&&uu(l,14,o),u||uu(l,18,a),c||uu(l,22,s)),n&&r){const e=ct+du(t)+4;lu(l,e,i(s)),lu(l,e+8,i(a))}}(I,p.be,a),await Xc(c,p.ce),await $c(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Ut--,b&&t.Ot--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.Wt=!0;const{Pt:e}=t;t.Pt=new g(e=>R=()=>{t.Wt=!1,e()}),await e}async function v(){Zc(c,du(p.ce))&&await c.closeDisk()}}(t,e,r,{fe:S,pe:b,he:R,At:f,de:l,we:w},o)}catch(n){throw t.Tt.delete(e),n}finally{w&&w(l&&l.oe)}return n.assign(p,{name:e,comment:c,extraField:u}),new Ki(p)}(t,e,r,o)}catch(n){throw t.kt.delete(e),n}finally{const t=bc.shift();t?t():Sc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Fc(o,s)}remove(t){const{kt:e,Tt:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==ft){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=gt,n={}){const r=this,{_t:o,writer:a}=this,{writable:s}=a;if(r.Lt)return zc(a);if(!(t instanceof w))throw new d(ks);if(du(t)>M)throw new d(Ts);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Nt.map(t=>t.Re));const c=r.Nt.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=Lc(t.Tt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{Tt:o,writer:i}=t,a=new w(n);await li(i);let s=0,c=0,u=Wc(i),l=Pc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,Yt:w,Kt:p,Xt:h,$t:m,Qt:y,rawExtraField:g,te:E,rawComment:S,versionMadeBy:b,Zt:R,Ht:x,Gt:z,Vt:F,qt:D,Te:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=du(w,p,h,m,y,g,E),N=q+du(d,S)+_;Zc(i,s+N-c)&&(await Xc(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Wc(i),l=Pc(i)),z||uu(x,18,k),F||uu(x,14,v),(A||D)&&n.version<45&&cu(x,0,45);const U=Bc(N);if(U.ke(H),U.ve(b),U._e(R.subarray(0,24)),U.ve(_),U.ve(du(S)),U.ve(D?M:T),U.ve(I),U.ke(C),U.ke(A?O:e),U._e(d),U._e(w),U._e(p),U._e(h),U._e(m),U._e(y),U._e(g),U._e(E),U._e(S),fu(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new Ki(n))}catch{}}return await Xc(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Wc(i),Ne:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=ru(t,n,_t);if(r){const n=await r(e),o=du(n);if(o>M)throw new d(fc);const i=Bc(6+o);i.ke(Z),i.ve(o),i._e(n);const{writer:a}=t;return Zc(a,du(i.ct))&&await a.closeDisk(),await Xc(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Ue:c,De:u}=r;let{Fe:l}=r,f=t.Tt.size,w=a.diskNumber,p=Hc(t,a);const h=du(e);if(h>M)throw new d(Ts);let m=eu(t,n,Ni),y=Wc(o);if(Zc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Ks);m=!0}else m===ft&&u&&(m=!0);const g=Bc(m?98:Y);Zc(o,du(g.ct)+h)&&await o.closeDisk(),y=Wc(o);let E=y==s.diskNumber?s.Ne:0;m&&(g.ke(G),g.Oe(44),g.ve(45),g.ve(45),g.ke(y),g.ke(w),g.Oe(E),g.Oe(f),g.Oe(l),g.Oe(p),g.ke(j),g.ke(y),g.Oe(i(Hc(t,o))+i(l)+i(c)),g.ke(y+1),eu(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ke(V),g.ve(y),g.ve(w),g.ve(E),g.ve(f),g.ke(l),g.ke(p),g.ve(h),await Xc(o,g.ct),h&&await Xc(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Ue:l,De:a})}(r,t,n),r.Lt=!0,!ui(a)&&eu(r,n,Dt)||await s.getWriter().close(),zc(a)}[Et](){return this.close()}}class xc extends g{then(t,e){const{Me:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function zc(t){return t.getData?t.getData():t.writable}function Fc(t,e){const r=new xc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Me=o,o.Re=g.prototype.then.call(r,ft,t=>n.assign(o,{xe:!0,error:t})),t.Nt.push(o),r}async function Dc(t,e){try{await t.writer.writable.abort(e)}catch{}}function Ac(t,e,n){t._t.add(e),e.catch(t=>{try{n(t)}catch{}})}function Ic(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new d(dc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[It]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{Xi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Hi]=T),A===ft&&I===ft||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?gc:yc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==Wt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:ft}),F&&(k.dataDescriptor=F.dataDescriptor,k[At]=Ec[F.level]),o===ft)k.rawLastModDate=w;else if(r!==Wt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(wc);return{ee:C,ne:k}}function Cc(t,n,r){let o=eu(t,r,_i),i=eu(t,r,Mi,o?20:768);const a=eu(t,r,Wi),s=ou(t,r,"uid"),c=ou(t,r,"gid");let u=ou(t,r,Vi),l=eu(t,r,"unixExtraFieldType"),f=eu(t,r,Gi),w=eu(t,r,ji),p=eu(t,r,qi);if(Jt(s,O,rc),Jt(c,O,oc),Jt(u,M,ic),l!==ft&&l!==yc&&l!==gc)throw new d(ac);if(l===gc&&(s!==ft&&s>M||c!==ft&&c>M))throw new d(sc);l!==ft||s===ft&&c===ft||(l=yc);let h=ou(t,r,ki),m=eu(t,r,vi);const y=h!==ft||m!==ft;if(s!==ft||c!==ft||u!==ft||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),Jt(h,L,cc),m&&(typeof m!==ht||e.isArray(m)))throw new d(uc);if(i>M)throw new d(Os);let g=eu(t,r,Ti);const E=g!==ft;E||(g=0),!r[Bi]&&n.endsWith(st)&&(r[Bi]=!0);const S=eu(t,r,Bi);if(S?(n.endsWith(st)||(n+=st),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==ft||Boolean(f||w||p);u=u===ft?g>>16&M:u&M,f?u|=it:f=Boolean(u&it),w?u|=at:w=Boolean(u&at),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|ot:u&rt||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==ft)t&=L;else if(e!==ft){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===ft&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==ft&&40960==(u&rt);return{name:n,re:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Tc(t,e,n){const r=ru(t,n,"encodeText")||Ne;let i=r(e,Ut);if(i===ft&&(i=Ne(e)),du(i)>M)throw new d(Us);const a=n[yi]||"";if(typeof a!=mt)throw new d(_s);let c=r(a,Ot);if(c===ft&&(c=Ne(a)),du(c)>M)throw new d(vs);const u=eu(t,n,Oi);if(u!==ft&&u>M)throw new d(Os);const l=nu(t,n,xi,new s),f=eu(t,n,zi),w=nu(t,n,Fi),p=nu(t,n,Ai),h=eu(t,n,Ci,0),m=Xt(eu(t,n,Rt)),y=Boolean(m),g=!0===m;let E=eu(t,n,St),S=eu(t,n,bt);Kt(E,S),E=E&&E.length?E:ft,S=S&&S.length?S:ft;const b=ou(t,n,"encryptionStrength",3),R=eu(t,n,Li),x=eu(t,n,"extendedTimestamp",!0),z=eu(t,n,"ntfsTimestamp"),F=eu(t,n,"keepOrder",!0),D=eu(t,n,zt),A=eu(t,n,"bufferedWrite"),I=ru(t,n,"createTempStream"),C=eu(t,n,"dataDescriptorSignature",!0),T=qt(eu(t,n,xt));Yt(T);const k=eu(t,n,It,!pu(i)||!pu(c)),v=eu(t,n,Pi),_=y||v===ft?ft:Pn(v);if(!y&&v!==ft&&0!==v&&8!==v&&!_)throw new d(Mn);let N=ou(t,n,At);if(Jt(N,9,lc),t.options[kt]){if(E!==ft||S!==ft)throw new d(Ls);N===ft&&v===ft&&(N=0)}y&&(N=Qt(n[At]));let U=eu(t,n,Ft),O=eu(t,n,Ct);A&&O===ft&&(O=!1),(O===ft||R&&!g)&&(O=!0),N!==ft&&6!=N&&(U=!1);const L=eu(t,n,Ni);if(!(R||E===ft&&S===ft||o.isInteger(b)&&b>=1&&b<=3))throw new d(Ms);const B=kc(n[Hi]),W=kc(n.localExtraField),P=kc(n.centralExtraField);return{comment:a,re:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,ie:y,ae:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:ft,codecURI:_?_.codecURI:ft,Le:_?_.versionNeeded:ft,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,Be:W,te:P}}}function kc(t){if(!t)return gt;if(!(t instanceof c))throw new d(Ps);let e=0,n=0;t.forEach((t,n)=>{if($t(n,M,Zs),!(t instanceof w))throw new d(Hs);if(du(t)>M)throw new d(Vs);e+=4+du(t)});const r=new w(e),o=be(r);return t.forEach((t,e)=>{cu(o,n,e),cu(o,n+2,du(t)),fu(r,t,n+4),n+=4+du(t)}),r}function vc(t,e,n,r,o){const{ie:i,ae:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ei],y===ft)throw new d(Xs);if(h===ft)throw new d($s)}const E=!0===w,S=eu(t,o,Ui);if(e&&a&&!S&&du(c,u))throw new d(Ws);const b=e&&(Boolean(c&&du(c)||u&&du(u))||a&&S);e||(p=0,h=0);const R=$i(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===ft?iu(y)+R:n+(a?0:R)):n===ft?(f=!0,(w||w===ft)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(au(h,p)?iu(y):y)+R));const x=!(b||e&&(0!==n||i)||au(h,p));x&&eu(t,o,Ct)===ft&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Ks);w=!0}return w=w||!1,{We:m,re:{dataDescriptor:f,le:x,zip64:w,jt:E,Pe:g,Gt:z,Vt:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function _c(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Nc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,Be:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,ie:S,encrypted:b,Gt:R,Vt:x,uncompressedSize:z,Pe:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&au(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Bc(t);if(e.ve(1),e.ve(t-4),T=e.ct,v&&(e.Oe(z),k)){const t=$i(b,l,y);e.Oe(S?0:z+t)}}else T=gt;let N,U,O,L,W;if(b&&!l){const t=Bc(du(mc)+2);t.ve($),t._e(mc),N=t.ct,N[8]=y}else N=gt;if(g){const t=Qc(n),e=(P=t)>=Gs&&P<=js;if(e){const e=9+(o?4:0)+(i?4:0),n=Bc(e);L=1+(o?2:0)+(i?4:0),W=t,n.ve(J),n.ve(e-4),n.Ze(L),n.ke(t),o&&n.ke(tu(Qc(o))),i&&n.ke(tu(Qc(i))),O=n.ct}else O=gt;if(E===ft?!e||Boolean(o||i):E)try{const t=Jc(n),e=Bc(36);e.ve(10),e.ve(32),e.He(4),e.ve(1),e.ve(24),e.Oe(t),e.Oe(o?Jc(o):t),e.Oe(i?Jc(i):t),U=e.ct}catch{U=gt}else U=gt}else U=O=gt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=yc||e===ft&&n===ft)if(r!=gc||e===ft&&n===ft)Z=H=gt;else{const t=Bc(8);t.ve(et),t.ve(4),t.ve((e===ft?0:e)&M),t.ve((n===ft?0:n)&M),Z=t.ct;const r=Bc(4);r.ve(et),r.ve(0),H=r.ct}else{const t=Oc(e===ft?0:e),r=Oc(n===ft?0:n),o=3+t.length+r.length,i=Bc(4+o);i.ve(tt),i.ve(o),i.Ze(1),i.Ze(t.length),i._e(t),i.Ze(r.length),i._e(r),Z=H=i.ct}}catch{Z=H=gt}I===ft&&(I=C?8:0),A===ft&&(A=0!=I||p||b?20:10);const{Le:V}=t;C&&V!==ft&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==ft&&(N[4]=1),cu(be(N),9,I),I=99);const G=_?du(T):0,j=G+du(N,O,U,Z,h,m);if(j+(t[kt]?67:0)>M)throw new d(Vs);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<lt?lt:q>ut?ut:q,K=du(O)?new s(1e3*Qc(n)):du(U)?n:Y,{Zt:X,Ht:Q,rawLastModDate:nt}=wu({version:A,bitFlag:hu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,Vt:x,Gt:R,extraFieldLength:j}),rt=Bc(ct+du(e)+j),ot=rt.ct,it=be(ot);return rt.ke(B),rt._e(X),rt._e(e),_&&rt._e(T),rt._e(N),rt._e(O),rt._e(U),rt._e(Z),rt._e(h),rt._e(m),w&&(x||uu(it,18,0),R||uu(it,22,0)),{ce:ot,be:it,Zt:X,Ht:Q,lastModDate:K,se:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ye:L,ge:W,Yt:gt,me:G,Xt:O,$t:U,Jt:Z,Qt:H,Kt:N,extraFieldLength:j}}function Uc(t,e){const{fe:n}=t;let{ce:r,extraFieldLength:o}=n,i=64-(e+du(r))%64;i<4&&(i+=64);const a=new w(i),s=be(a);cu(s,0,Q),cu(s,2,i-4);const c=r;n.ce=r=new w(du(c)+i),fu(r,c),fu(r,a,du(c));const u=be(r);cu(u,28,o+i),n.be=u,t.he+=i}function Oc(t){const e=new w(4);be(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Mc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=gt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=be(o),n&&(i=4,uu(r,0,P))),{ue:o,Ee:r,Se:i}}function Lc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,Kt:o,rawComment:i,$t:a,Qt:s,rawExtraField:c,te:u,ye:l,ge:f,jt:w,uncompressedSize:p,compressedSize:h}=r;let{Gt:m,Vt:y}=r;w||(m&&p<O&&(m=r.Gt=!1),y&&h<O&&(y=r.Vt=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Bc(t);e.ve(1),e.ve(t-4),m&&e.Oe(p),y&&e.Oe(h),g&&e.Oe(r.offset),E&&e.ke(r.diskNumberStart),S=e.ct}else S=gt;if(r.Yt=S,r.Te=g,r.qt=E,f===ft)b=gt;else{const t=Bc(9);t.ve(J),t.ve(5),t.Ze(l),t.ke(f),b=t.ct}r.Xt=b;const R=du(S,o,a,s,b,c,u);if(R>M)throw new d(Vs);e+=q+du(t,i)+R}return{Fe:e,De:n}}function Bc(t){const e=new w(t),n=be(e);let r=0;return{ct:e,Ze:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},ve:t=>{cu(n,r,t),r+=2},ke:t=>{uu(n,r,t),r+=4},Oe:t=>{lu(n,r,i(t)),r+=8},_e:t=>{fu(e,t,r),r+=du(t)},He:t=>r+=t}}function Wc(t){const{diskNumber:e=0}=t;return e}function Pc(t){const{diskOffset:e=0}=t;return e}function Zc(t,e){const{availableSize:n=dt}=t;return e>n}function Hc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.vt:0)}function Vc(t){const e=be(t);let n=0;for(;n+4<=du(t);){const r=4+su(e,n+2);if(1==su(e,n))return Vc(Ee(t.subarray(0,n),t.subarray(a.min(n+r,du(t)))));n+=r}return t}async function Gc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await $c(wi(e,{offset:n,size:r}),o,ft,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function jc(t,e){const n=await di(t,e,ct);if(du(n)<ct)return ct;const r=be(n);return ct+su(r,26)+su(r,28)}function qc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Yc(){const t=new w(4);return uu(be(t),0,W),t}async function Kc(t,e){delete t.Ct,await Xc(e,Yc()),t.offset+=4}async function Xc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=du(e),await r.write(e)}finally{r.releaseLock()}}async function $c(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(du(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Jc(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<qs?qs:e>Ys?Ys:e}}function Qc(t){return a.floor(t.getTime()/1e3)}function tu(t){return a.min(js,a.max(Gs,t))}function eu(t,e,n,r){const o=e[n]===ft?t.options[n]:e[n];return o===ft?r:o}function nu(t,e,n,r){const i=eu(t,e,n,r);if(null===i)return r;if(i!==ft&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new d(Ns);return i}function ru(t,e,n){return jt(eu(t,e,n))}function ou(t,e,n,r){return Qt(eu(t,e,n,r))}function iu(t){return t+5*(a.floor(t/16383)+1)}function au(t,e){return t===ft?e===ft||e>0:0!==t}function su(t,e){return t.getUint16(e,!0)}function cu(t,e,n){t.setUint16(e,n,!0)}function uu(t,e,n){t.setUint32(e,n,!0)}function lu(t,e,n){t.setBigUint64(e,n,!0)}function fu(t,e,n){t.set(e,n)}function du(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function wu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,Vt:c,Gt:u,extraFieldLength:l}){const f=Bc(26),d=f.ct,w=be(d);if(f.ve(t),f.ve(e),f.ve(n),a===ft){const t=new h(1),e=be(t);cu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),cu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ke(a),f.He(4),c||o!==ft?f.ke(c?O:o):f.He(4),u||r!==ft?f.ke(u?O:r):f.He(4),f.ve(du(s)),f.ve(l),{Zt:d,Ht:w,rawLastModDate:a}}function pu(t){return t.every(t=>t>=32&&t<=126)}function hu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function mu(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):rr(t,e)}const yu=1048576,gu=".zip.js-temp",Eu=1048576,Su=1048576,bu=".zip.js-temp",Ru="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(ge(t));n.assign(ie,e),n.assign(de,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const xu="Entry filename already exists",zu="Duplicate entry filename in the imported zip file",Fu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Du="Entry is an ancestor of target entry",Au="Root directory cannot be moved",Iu="Target entry is not a directory",Cu="Parent entry is not a directory",Tu="Readable stream already consumed",ku="throw",vu="keep-first",_u="keep-last",Nu=new u([ku,vu,_u]),Uu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Ou="Invalid readerOptions (must be an object)",Mu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Lu="Invalid passwords option (must be an array of strings)",Bu="Invalid requestPassword option (must be a function returning a string or undefined)",Wu="zipjs-abort-export",Pu=new w(0),Zu=new u([Yn,Gn,jn]);class Hu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(xu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ve++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,Ge:r.Ge||r.uncompressedSize===ft,passThrough:r.passThrough,je:r.je||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=bl(t);r&&(t=r.pop(),n=Rl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(xu);n!=e.parent&&(el(e),e.parent=n,n.children.push(e),El(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==ft))}}class Vu extends Hu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Vu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===ft||(t.constructor==No?e.type==n:t.constructor!=To||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Qu(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([li(r),li(t,o)]);const i=qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof Ki||!o&&!i&&!a?s:kn(s).pipeThrough(new vr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!ui(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await kn(a).pipeTo(_n(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Re(t)&&t.message==$e)return!1;throw t}}getText(t,e){return this.getData(new Mo(t),e)}getBlob(t,e){return this.getData(new No(t),e)}getData64URI(t,e){return this.getData(new To(t),e)}getUint8Array(t){return this.getData(new oi,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Se(await this.getUint8Array(t)).buffer}replaceBlob(t){fl(this,{data:t,Reader:_o,Writer:No,uncompressedSize:t.size})}replaceText(t){fl(this,{data:t,Reader:Uo,Writer:Mo,uncompressedSize:Oo(t)})}replaceData64URI(t){fl(this,{data:t,Reader:Co,Writer:To,uncompressedSize:dl(t)})}replaceUint8Array(t){fl(this,{data:t,Reader:ri,Writer:oi,uncompressedSize:t.length})}replaceReadable(t){fl(this,{data:null,Reader:$u(t),Writer:null,uncompressedSize:ft})}}class Gu extends Hu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Gu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Sl(this,t,{options:e},!0)}addText(t,e,n={}){return Sl(this,t,{data:e,Reader:Uo,Writer:Mo,options:n,uncompressedSize:Oo(e)})}addBlob(t,e,n={}){return Sl(this,t,{data:e,Reader:_o,Writer:No,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Sl(this,t,{data:e,Reader:Co,Writer:To,options:n,uncompressedSize:dl(e)})}addUint8Array(t,e,n={}){return Sl(this,t,{data:e,Reader:ri,Writer:oi,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Sl(this,t,{data:e,Reader:class extends ni{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Sl(this,t,{Reader:$u(e),options:n})}addFileSystemEntry(t,e={}){return hl(this,t,e)}addFileSystemHandle(t,e={}){return hl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Sl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new _o(t),e)}importData64URI(t,e){return this.importZip(new Co(t),e)}importUint8Array(t,e){return this.importZip(new ri(t),e)}importHttpContent(t,e){return this.importZip(new ni(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new No(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new To(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new oi,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;ll(r.passThrough),al(r);const s=il(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:ft,onprogress:ft,onend:ft,preventClose:!1}),w=Yu([t],t=>Xu(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await _r(o,w),await E(t,e),a&&await _r(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await _r(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!nl(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||nl(u.reason))return;Yt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Wu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Wu));try{n.entryName===ft&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await li(t),r=new Za(t,e)),ll(e.passThrough),al(e);const o=function(t){if(t===ft)return ku;if(Nu.has(t))return t;throw new d(Fu)}(e.duplicates),i=[],a={qe:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==vu){u=!0;break}if(o!=_u)throw new d(zu);this.fs.remove(r),r=new Gu(this.fs,t,{data:null},e),i.push(r)}}else r=new Gu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==vu)continue;if(o!=_u)throw new d(zu);e.directory?e.data=t:(this.fs.remove(e),e=ft)}e||(e=new Gu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==vu)continue;if(o!=_u)throw new d(zu);this.fs.remove(s)}i.push(Sl(r,c,{data:t,Reader:Ju(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==ft||(e.bufferedWrite=!0);const[i]=await g.all([tl(r,il(e.readerOptions)),o?ft:li(t)]),a=o?t:new Rc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=Yu(e.children,t=>pl(t)?0:1);let d=0,w=0;if(a&&await _r(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(pl(e))return;const{name:a,ee:c}=rl(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:ft,onend:ft,onprogress:async t=>{d+=t-p,p=t,s&&await _r(s,d,r)}}));w++,u&&await _r(u,w,f,h)}c&&await _r(c,d)}(a,r,Yu([r],Ku),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;il((t=n.assign({},t)).readerOptions),t.bufferedWrite===ft&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!pl(t)).map(n=>{const{name:r,ee:o}=rl(n,e,t);return{name:r,size:n.directory?0:ol(n,wl(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>pl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(jt(t[_t]))throw new d(Qs);if(o!==ft&&!(o instanceof w))throw new d(ks);const s=du(o);if(s>M)throw new d(Ts);const l=t[kt],f=new c,p=t[Tt]===ft?0:t[Tt];let h=p,m=dt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);eu(i,o,Bi)&&!e.endsWith(st)&&(e+=st);const s=Cc(i,e,o);({name:e}=s);const{re:c}=Tc(i,e,o);0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0);const u=!eu(i,o,Bi);if(u&&r===ft)throw new d(Qs);const{We:w,re:p}=vc(i,u,r,c,o);if(u&&!c.ie&&au(p.compressionMethod,p.level))throw new d(Qs);const E=n.assign({},o,s.re,c,p,{[kt]:l}),S=Nc(E),b=Mc(E),R={fe:S,he:du(S.ce,b.ue)};l&&Uc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.he+x;y.push(z),g.add(Boolean(E.jt||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||_c(y,p,!0)!=_c(y,p,!1)))&&!r)throw new d(Qs);const{Fe:E,De:S}=Lc(f);let b=eu(i,t,Ni);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(Ks);b=!0}else b===ft&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class ju{constructor(){yl(this)}get children(){return this.root.children}remove(t){el(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=ft}move(t,e){if(t==this.root)throw new d(Au);if(!e.directory)throw new d(Iu);if(e.isDescendantOf(t))throw new d(Du);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(xu)}else el(t),t.parent=e,e.children.push(t),El(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):ft;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return gl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return gl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return gl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return gl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return gl(this,n=>n.importReadable(t,e))}importZip(t,e){return gl(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const qu={FS:ju,ZipDirectoryEntry:Gu,ZipFileEntry:Vu};function Yu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function Ku(t){return t.uncompressedSize}function Xu(t,e){const{data:n}=t;return e&&n instanceof Ki?n.compressedSize:t.uncompressedSize}function $u(t){let e;return function(){if(e)throw new d(Tu);return e=!0,{readable:t}}}function Ju(t,e){return class extends Ao{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){al(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new No,e);const s=new u;let c;for(;;){for(const t of cl(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ye){await r.Ye;continue}let n;r.Ye=new g(t=>n=t);try{const e=await i(t,c);if(e===ft||null===e)break;if(typeof e!=mt)throw new d(Bu);const n=await f(ul(e));if(n.done)return n.data;c=n.error}finally{r.Ye=ft,n()}}if(!s.size)throw new d(oa);const l=new d($e);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(sl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new No,i);return function(t,e){const{qe:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Re(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return sl(t)||e.zipCrypto&&Re(t)&&Zu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Ke=new _o(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Ke.readUint8Array(t,e)}}}function Qu(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function tl(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=Qu(n.Reader,n.data,e);o.set(n,r);try{await li(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==ft&&(n.uncompressedSize=r.size,n.Ge=!1)})),o}function el(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function nl(t){return Boolean(t)&&t.message==Wu}function rl(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof Ki){const e=wl(t,r),n=i.lastModDate===ft?r.lastModDate:i.lastModDate;({ee:a,ne:s}=Ic(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.je},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===ft)throw new d(Uu);return{name:o,ee:c}}function ol(t,e){const{reader:n}=t;return n&&n.size!==ft?n.size:t.Ge?ft:Xu(t,e)}function il(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new d(Ou);return t&&(ll(t.passThrough),al(t)),t}function al(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=mt)))throw new d(Lu);if(r&&typeof r!=pt)throw new d(Bu)}function sl(t){return Re(t)&&t.message==$e}function cl(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(ul(o)),r.push(...e.qe),n&&r.push(...n.filter(t=>t).map(ul)),r}function ul(t){return{key:t,options:{password:t,rawPassword:Pu}}}function ll(t){if(Xt(t)===Wt)throw new d(Mu)}function fl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:ft,uncompressedSize:r===ft?0:r,Ge:r===ft})}function dl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function wl(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function pl(t){return t.directory&&null===t.data}function hl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await ml(o)),"file"==o.kind){const t=await o.getFile();i.push(Sl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===ft&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function ml(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await ml(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function yl(t){t.entries=[],t.Ve=0,t.root=new Gu(t)}function gl(t,e){const{entries:r,Ve:o,root:i}=t;return yl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ve:o,root:i}),e})}function El(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Sl(t,e,n,r){if(t.directory){const o=bl(e);return o&&(e=o.pop(),t=Rl(t,o)),r?new Gu(t.fs,e,n,t):new Vu(t.fs,e,n,t)}throw new d(Cu)}function bl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Rl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(xu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Du)}else t=new Gu(r.fs,e,{data:null},r)}),t}t.BlobReader=_o,t.BlobWriter=No,t.Data64URIReader=Co,t.Data64URIWriter=To,t.ERR_ABORTED=Gt,t.ERR_AMBIGUOUS_ARCHIVE=ua,t.ERR_ANCESTOR_ENTRY=Du,t.ERR_BAD_FORMAT=Ji,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ea,t.ERR_CODEC_OUT_OF_MEMORY=qn,t.ERR_DUPLICATED_NAME=Cs,t.ERR_DUPLICATE_IMPORTED_ENTRY=zu,t.ERR_ENCRYPTED=oa,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=la,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=ca,t.ERR_ENTRY_EXISTS=xu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ta,t.ERR_EOCDR_NOT_FOUND=Qi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ra,t.ERR_HTTP_RANGE=po,t.ERR_HTTP_RESOURCE_CHANGED=ho,t.ERR_HTTP_STATUS=wo,t.ERR_INVALID_AUTHENTICATION_CODE=Je,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=Nn,t.ERR_INVALID_CODEC_MODULE=On,t.ERR_INVALID_COMMENT=Ts,t.ERR_INVALID_COMMENT_TYPE=ks,t.ERR_INVALID_COMPRESSED_DATA=jn,t.ERR_INVALID_CRC32=Yn,t.ERR_INVALID_DATE=Ns,t.ERR_INVALID_DUPLICATES=Fu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ms,t.ERR_INVALID_ENTRY=dc,t.ERR_INVALID_ENTRY_COMMENT=vs,t.ERR_INVALID_ENTRY_COMMENT_TYPE=_s,t.ERR_INVALID_ENTRY_NAME=Us,t.ERR_INVALID_EXTRAFIELD=Ps,t.ERR_INVALID_EXTRAFIELD_DATA=Vs,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Hs,t.ERR_INVALID_EXTRAFIELD_TYPE=Zs,t.ERR_INVALID_FILENAME_VALIDATION=wa,t.ERR_INVALID_FUNCTION_OPTION=Pt,t.ERR_INVALID_GID=oc,t.ERR_INVALID_LEVEL=lc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=pa,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=cc,t.ERR_INVALID_MSDOS_DATA=uc,t.ERR_INVALID_PASSWORD=$e,t.ERR_INVALID_PASSWORDS=Lu,t.ERR_INVALID_PASSWORD_TYPE=Ht,t.ERR_INVALID_PASS_THROUGH=Uu,t.ERR_INVALID_PASS_THROUGH_VALUE=Vt,t.ERR_INVALID_READER=ec,t.ERR_INVALID_READER_OPTIONS=Ou,t.ERR_INVALID_REQUEST_PASSWORD=Bu,t.ERR_INVALID_SIGNAL=Zt,t.ERR_INVALID_SIGNATURE_DATA=fc,t.ERR_INVALID_STRICTNESS=da,t.ERR_INVALID_UID=rc,t.ERR_INVALID_UNCOMPRESSED_SIZE=Gn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=ac,t.ERR_INVALID_UNIX_ID_SIZE=sc,t.ERR_INVALID_UNIX_MODE=ic,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=Os,t.ERR_ITERATOR_COMPLETED_TOO_SOON=mo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=na,t.ERR_OVERLAPPING_ENTRY=sa,t.ERR_PARENT_NOT_DIRECTORY=Cu,t.ERR_READABLE_CONSUMED=Tu,t.ERR_RESERVED_COMPRESSION_METHOD=Un,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=Au,t.ERR_SPLIT_ZIP_FILE=aa,t.ERR_TARGET_NOT_DIRECTORY=Iu,t.ERR_UNDEFINED_COMPRESSION_METHOD=$s,t.ERR_UNDEFINED_CRC32=Js,t.ERR_UNDEFINED_READER=tc,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=Xs,t.ERR_UNDETERMINED_SIZE=Qs,t.ERR_UNSAFE_FILENAME=fa,t.ERR_UNSUPPORTED_COMPRESSION=Mn,t.ERR_UNSUPPORTED_CONTEXT=Ru,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=ia,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Ws,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Ls,t.ERR_UNSUPPORTED_FORMAT=Ks,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Mu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Bs,t.ERR_UNSUPPORTED_UINT64=ha,t.ERR_WORKER_STARTUP_TIMEOUT=xr,t.ERR_WRITER_NOT_INITIALIZED=yo,t.ERR_WRITER_SIZE_NOT_WRITABLE=go,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=wc,t.ERR_ZIP_NOT_EMPTY=nc,t.HttpRangeReader=class extends ni{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ni,t.Reader=Ao,t.SplitDataReader=ii,t.SplitDataWriter=ai,t.TextReader=Uo,t.TextWriter=Mo,t.Uint8ArrayReader=ri,t.Uint8ArrayWriter=oi,t.VERSION="2.20.0",t.WARNING_APPENDED_DATA=Ra,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=hc,t.WARNING_COMPRESSED_PATCHED_DATA=ga,t.WARNING_COMPRESSION_UNAVAILABLE=pc,t.WARNING_DUPLICATE_FILENAME=Ia,t.WARNING_MALFORMED_EXTRA_FIELD=Ea,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=Da,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=va,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=_a,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Na,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=ka,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Ca,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=Aa,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ta,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=za,t.WARNING_PREPENDED_DATA=xa,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Fa,t.WARNING_UNKNOWN_VERSION=ya,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=Sa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ma,t.WARNING_WRAPPED_ENTRIES_COUNT=ba,t.Writer=Io,t.ZipDirectoryEntry=Gu,t.ZipEntry=Hu,t.ZipFS=ju,t.ZipFileEntry=Vu,t.ZipReader=Za,t.ZipReaderStream=Ha,t.ZipWriter=Rc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Rc(n,t),this._t=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Dc(e,t)}}()}});return Ac(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return Ac(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this._t))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Dc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Dc(r,t),t}}},t.configure=function(t){n.assign(de,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Eu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=vn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=yu,directoryName:r=gu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Su,directoryName:r=bu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(Ru);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=qu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Zn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:mu(n,Kn)||mu(t,Kn)||mu(t,$n),decompression:mu(r,Kn)||mu(e,Kn)||mu(e,$n),registered:!1},{compressionMethod:9,compression:!1,decompression:mu(r,Xn)||mu(e,Xn),registered:!1}];for(const t of Zn()){const e=Hn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:ft,decompression:e?typeof e.DecompressionStream==pt:ft,registered:!0})}return o},t.isZipFile=Va,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new d(Nn);if(Ln.includes(e))throw new d(Un);const c=typeof i==pt||typeof a==pt;if(!(c||typeof r==mt&&r.length))throw new d(Nn);Bn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Vn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of fe)delete de[t];n.assign(de,ie)},t.terminateWorkers=async function(){await g.allSettled([oo(),...Kr.map(t=>(so(t),t.terminate()))]),zr=ft,Fr=!1},t.unregisterCodec=function(t){const e=Bn.get(t);if(e){let n;Bn.delete(t),Bn.forEach(t=>n=n||t.format==e.format),n||Wn.delete(e.format)}}});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=8192,ot=61440,it=16384,at=2048,st=1024,ct="/",ut=30,lt=new s(2107,11,31,23,59,58),ft=new s(1980,0,1),dt=void 0,wt=1/0,pt="Local file header not found",ht="Overlapping entry found",mt="Zip64 extra field not found",yt="undefined",gt="function",Et="object",St="string",bt="boolean",Rt=new w,xt=k.asyncDispose||k(),zt="password",Ft="rawPassword",Dt="passThrough",At="signal",It="checkAmbiguity",Ct="useWebWorkers",Tt="useCompressionStream",kt="preventClose",vt="level",_t="useUnicodeFileNames",Nt="dataDescriptor",Ut="offset",Ot="usdz",Mt="strictness",Lt="maxAppendedDataSize",Bt="signCentralDirectory",Wt="entry",Pt="filename",Zt="comment",Ht="strict",Vt="balanced",Gt="tolerant",jt="compressed",qt="Invalid option (must be a function)",Yt="Invalid signal (must be an AbortSignal instance)",Kt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Xt="Invalid passThrough option (must be a boolean or 'compressed')",$t="The operation was aborted";function Jt(t){if(t&&typeof t!=gt)throw new d(qt);return t}function Qt(t){if(t&&(typeof t.addEventListener!=gt||typeof t.aborted!=bt))throw new d(Yt);return t||dt}function te(t){if(t&&t.aborted)throw t.reason===dt?new DOMException($t,"AbortError"):t.reason}function ee(t,e){if(t&&typeof t!=St||e&&!(e instanceof w))throw new d(Kt)}function ne(t){if(t!==dt&&typeof t!=bt&&t!==jt)throw new d(Xt);return t}function re(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function oe(t,e,n){t!==dt&&re(t,e,n)}function ie(t){return typeof t==St&&t.trim()?o(t):t}const ae=262144,se="Invalid maxWorkers (must be an integer greater than 0)",ce="Invalid baseURI (must be a string)",ue="Invalid URI (must be a string or a function returning a string)";let le=2;try{typeof C!=yt&&C.hardwareConcurrency&&(le=C.hardwareConcurrency)}catch{}const fe={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:ae,maxWorkers:le,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=yt&&A,DecompressionStream:typeof I!=yt&&I},de="maxWorkers",we="baseURI",pe=["wasmURI","workerURI"],he=["chunkSize",de,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],me=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],ye=[we,...pe,"useCompressionStream","useWebWorkers","transferStreams",...he,...me],ge={...fe};function Ee(){return ge}function Se(t){return be(t.chunkSize)}function be(t){return t=ie(t),o.isInteger(t)&&t>=1?a.max(t,64):ae}function Re(t){const e={};for(const n of ye){const r=t[n];r!==dt&&(e[n]=xe(n,r))}return e}function xe(t,e){if(he.includes(t)){if(e=ie(e),t==de&&(!o.isInteger(e)||e<1))throw new d(se)}else if(me.includes(t))Jt(e);else if(t==we){if(e&&typeof e!=St)throw new d(ce)}else if(pe.includes(t)&&e&&typeof e!=St&&typeof e!=gt)throw new d(ue);return e}function ze(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function Fe(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function De(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Ae(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Ie(t){return Boolean(t)&&"object"==typeof t}const Ce=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Ce[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=Ce[e-1][t];Ce[e][t]=n>>>8^Ce[0][255&n]}const[Te,ke,ve,_e,Ne,Ue,Oe,Me]=Ce;class Le{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=Me[255&t]^Oe[t>>>8&255]^Ue[t>>>16&255]^Ne[t>>>24&255]^_e[255&n]^ve[n>>>8&255]^ke[n>>>16&255]^Te[n>>>24&255]}}for(;r<n;r++)e=e>>>8^Te[255&(e^t[r])];this.o=e}get(){return~this.o}}class Be extends z{constructor(){let t;const e=new Le;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function We(t){if(typeof E==yt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Pe=64,Ze=20,He=new w([128]),Ve=new w(1),Ge=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),je=new w(256),qe=new Int32Array(256),Ye=new Int32Array(256),Ke=new Int32Array(256),Xe=new Int32Array(256);let $e=!1;function Je(t){const e=function(){const t=new Int32Array(Ge),e=new Int32Array(16),n=new w(Pe),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(He,0,1);56!=i;)c(Ve,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Ze),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Ge),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Pe;)n[i++]=t[e++];i==Pe&&(u(r,0),i=0)}if(e+Pe<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Pe<=a;e+=Pe)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Pe),r=new w(Pe);t.length>Pe&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Pe;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Pe),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Pe),e.update(t,0,Ze);const o=e.digest();return e.update(n,0,Pe),o}}}function Qe(t){return je[t>>>24]<<24|je[t>>>16&255]<<16|je[t>>>8&255]<<8|je[255&t]}function tn(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function en(t){return 255&(t<<1^27*(t>>7))}const nn=typeof R!=yt&&typeof R.getRandomValues==gt,rn="Invalid password",on="Invalid authentication code",an="zipjs-abort-check-password",sn="Crypto API not supported";function cn(t){if(nn)return R.getRandomValues(t);throw new d(sn)}const un={name:"PBKDF2"},ln=n.assign({hash:{name:"HMAC"}},un),fn=n.assign({iterations:1e3,hash:{name:"SHA-1"}},un),dn=["deriveBits"],wn=[8,12,16],pn=[16,24,32],hn=10,mn=typeof R!=yt,yn=mn&&R.subtle;let gn=mn&&typeof yn!=yt&&typeof yn.importKey==gt&&typeof yn.deriveBits==gt;class En extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){bn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await Fn(t,e,n,An(r,0,wn[e])),i=An(r,wn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw zn(t),new d(rn)}(i,o,n,An(t,0,wn[o]+2)),t=An(t,wn[o]+2),r?(zn(i),e.error(new d(an))):a()):await s,i.h)return;const c=new w(t.length-hn-(t.length-hn)%16);e.enqueue(xn(i,t,c,0,hn,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=An(n,n.length-hn),s=new w(An(n,0,n.length-hn));e.process(s,!0);const c=e.digest();let u=n.length<hn?1:0;for(let t=0;t<hn;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(on));t.enqueue(s)}}}),Rn(this,i)}}class Sn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){bn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=Rt;if(n?(s=await async function(t,e,n){const r=cn(new w(wn[e]));return Fe(r,await Fn(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(xn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=An(e.digest(),0,hn);t.enqueue(Fe(i,a))}}}),Rn(this,r)}}function bn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Dn(e,r),strength:o-1,S:Rt,h:!1})}function Rn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw zn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(zn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function xn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Fe(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=An(n,r,r+u);t.set(An(e,0,u)),a.process(t,i)}return t.S=An(e,u),n}function zn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function Fn(t,e,r,o){t.password=null;const i=pn[e],s=await async function(t,e,r){if(gn)try{const o=await yn.importKey("raw",t,ln,!1,dn);return new w(await yn.deriveBits(n.assign({salt:e},fn),o,8*r))}catch{gn=!1}return function(t,e,n,r){const o=Je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Ze){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Ze),u=o.digest();for(let t=0;t<Ze;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Ze,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!$e){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),je[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);je[0]=99;for(let t=0;t<256;t++){const e=je[t],n=en(e),r=n<<24|e<<16|e<<8|n^e;qe[t]=r,Ye[t]=r>>>8|r<<24,Ke[t]=r>>>16|r<<16,Xe[t]=r>>>24|r<<8}$e=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=Qe(r<<8|r>>>24)^i<<24,i=en(i)):n>6&&t%n==4&&(r=Qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=Je(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=tn(a)^n[0],e=tn(s)^n[1],i=tn(c)^n[2],l=tn(u)^n[3],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[4],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[5],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[6],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[7];t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[8],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[9],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[10],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[11],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[12],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[13],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[14],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[15],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[16],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[17],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[18],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[19],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[20],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[21],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[22],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[23],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[24],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[25],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[26],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[27],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[28],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[29],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[30],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[31],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[32],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[33],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[34],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[35],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[36],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[37],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[38],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[39];let h=40;r>10&&(t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[40],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[41],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[42],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[43],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[44],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[45],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[46],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[47],h=48),r>12&&(t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[48],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[49],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[50],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[51],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[52],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[53],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[54],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[55],h=56),o[0]=(je[f>>>24]<<24|je[d>>>16&255]<<16|je[w>>>8&255]<<8|je[255&p])^n[h],o[1]=(je[d>>>24]<<24|je[w>>>16&255]<<16|je[p>>>8&255]<<8|je[255&f])^n[h+1],o[2]=(je[w>>>24]<<24|je[p>>>16&255]<<16|je[f>>>8&255]<<8|je[255&d])^n[h+2],o[3]=(je[p>>>24]<<24|je[f>>>16&255]<<16|je[d>>>8&255]<<8|je[255&w])^n[h+3]}}(An(s,0,i),An(s,i,2*i)),t.h&&zn(t),An(s,2*i)}function Dn(t,e){return e===dt?We(t):e}function An(t,e,n){return t.subarray(e,n)}class In extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){Tn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=kn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d(rn);t=t.subarray(12)}r?e.error(new d(an)):e.enqueue(kn(n,t))}})}}class Cn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){Tn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=cn(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(vn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(vn(n,t),o),e.enqueue(r)}})}}function Tn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new Le(o[0]),D:new Le(o[2])}),r)for(let e=0;e<r.length;e++)_n(t,r[e]);else for(let n=0;n<e.length;n++)_n(t,e.charCodeAt(n))}(t,e,r)}function kn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Nn(t)^e[r],_n(t,n[r]);return n}function vn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Nn(t)^e[r],_n(t,e[r]);return n}function _n(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=On(a.imul(On(n+Un(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function Nn(t){const e=2|t.R[2];return Un(a.imul(e,1^e)>>>8)}function Un(t){return 255&t}function On(t){return 4294967295&t}function Mn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function Ln(t,e){t=Mn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=gt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function Bn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Wn="Invalid codec definition",Pn="Reserved compression method",Zn="Invalid codec module",Hn="Compression method not supported",Vn=[0,8,9,99],Gn=new c,jn=new c;function qn(t){return Gn.get(t)}function Yn(){return e.from(Gn.values(),t=>n.assign({},t,jn.get(t.format)))}function Kn(t){return jn.get(t)}function Xn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=gt&&typeof r!=gt)throw new d(Zn);jn.set(t,{CompressionStream:n,DecompressionStream:r})}const $n="Invalid uncompressed size",Jn="Invalid compressed data",Qn="Codec out of memory",tr="Invalid CRC32",er="deflate-raw",nr="deflate64-raw",rr="gzip",or=[31,139,8];class ir extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,y,g,E=super.readable;const S=f&&Kn(f),b=wr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new Be,E=hr(E,h)),o)if(S)E=mr(E,dr(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new ar,E=mr(E,new b(rr,{level:u,chunkSize:e})),E=hr(E,g);else try{E=pr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw br(t);let e;try{e=new r(rr)}catch{throw br(t)}E=mr(E,e),E=hr(E,new ar)}i&&(s?E=hr(E,new Cn(t)):(y=new Sn(t),E=hr(E,y))),fr(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class ar extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Fe(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Fe(n.subarray(0,s),t.subarray(0,i-s))),n=Fe(n.subarray(s),t.subarray(i-s))},flush(){const e=Ae(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class sr extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=hr(x,new In(t)):(b=new En(t),x=hr(x,b))),c){const t=new u,o=p&&Kn(p);let i;if(o)x=mr(x,dr(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=wr(l,r,n);if(a&&!f&&s!==dt&&E!==dt&&o)try{i=new o(rr,{chunkSize:e})}catch{i=dt}if(!i)try{x=pr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===dt||!l&&n)throw br(t);try{i=new r(rr)}catch{throw br(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===dt?new Le:dt;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(or),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await Er(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=Ae(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await yr(i,t),await gr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d($n);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await gr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw xr(t,tr);if(l!=n)throw xr(t,$n);return{done:!0}}throw Sr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=dt,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await gr(n,t),Sr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new Be,x=hr(x,S)),fr(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(tr)}})}}const cr=new c;function ur(t,e){if(!t)return!1;let n=cr.get(t);n||(n=new c,cr.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function lr(t){return ur(t,er)}function fr(t,e,r){e=hr(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function dr(t,e,n){if(!t)throw new d(Hn);return new t(e,n)}function wr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function pr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?nr:er;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return mr(t,c,i)}function hr(t,e){return Mn(t).pipeThrough(e)}function mr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await Er(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await yr(r,t),await gr(o,t)}}(),e.readable}async function yr(t,e){try{await t.abort(e)}catch{}}async function gr(t,e){try{await t.cancel(e)}catch{}}function Er(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function Sr(t,e){return e.has(t)?t:xr(t,Rr(t)?Qn:Jn)}function br(t){return Rr(t)?xr(t,Qn):t}function Rr(t){return Ie(t)&&"Z_MEM_ERROR"==t.code}function xr(t,e){const n=new d(e);return n.cause=t,n}const zr="data",Fr="deflate",Dr="inflate";class Ar extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Fr)?i=ir:o.startsWith(Dr)&&(i=sr),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new d($n)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Ir extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const Cr="Worker startup timeout";let Tr,kr,vr,_r=()=>{};async function Nr(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!lr(e)&&(r=e,!ur(r,rr)))||!!n&&await Ur();var r}async function Ur(){if(_r)try{return await void 0,!0}catch{}return!1}function Or(t){t.createWorker?kr=!0:Tr=!1}class Mr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return kr&&(f=dt),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Ir(Se(s))).pipeThrough(new Lr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),Tr===dt&&(Tr=typeof T!=yt),(u&&vr&&(Tr&&l||f)?vr:Wr)(t,s)}}class Lr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await Br(t,n)},async transform(t,r){o+=t.length,e&&await Br(e,o,n),r.enqueue(t)},async flush(){r&&await Br(r,o)}})}}async function Br(t,...e){try{await t(...e)}catch{}}function Wr(t,e){return{run:()=>Pr(t,e)}}async function Pr({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Fr),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!lr(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Ar(t,i),s=new Ir(Se(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Ie(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Ur()),c}}const Zr={type:"module"},Hr="error",Vr="abort";let Gr,jr,qr;var Yr;function Kr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Xr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function $r(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(jr===dt||Gr!==t){const n=typeof t==gt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===dt&&(o=!1),o&&(u=Zr);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return $r(t,e,r,o,!1);if(o)throw i;return $r(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=Zr);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return $r(t,e,r,!1,i);throw n}}Gr=t,jr=c,qr=u}else s=new T(jr,qr);return s.addEventListener("message",t=>{r.M=!0,Jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Ie(l))try{s!==dt&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Ie(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==dt&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||to({type:zr,value:t,done:n,messageId:i},e)}if(r==zr){const t=new w(o);await l.ready,await l.write(t),y()||to({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Xr(e),g(s))}function g(t){y()||(p(t),E(),Ie(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Hr,t=>Qr(t,r)),s.addEventListener("messageerror",t=>Qr(t,r)),s}function Jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function Qr(t,e){t.preventDefault&&t.preventDefault(),Jr(e);const{M:r,B:o,writer:i,U:a}=e;Xr(e),r||(e.v=null);let s=t.error||new d(t.message||Hr);r||(s=n.assign(new d(s.message||Hr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function to(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=De(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Yr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==gt&&(s=s());try{c=$r(t.workerURI,r,t)}catch{return Or(t),Wr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(Cr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Ie(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Vr,t);c.addEventListener(Vr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{to({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Xr(t),t.v=null,e){const t=new d(Cr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Ie(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Ie(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Or(t),Kr(t),Pr(t,e);if(n&&n.codecImportFailed){if(t.reader)return Kr(t),Pr(t,e);t.U()}throw n}}}})}return t.N},vr=Yr;let eo=[];const no=[];let ro,oo,io=0;async function ao(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!jn.has(t)&&e&&Xn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===dt||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:dt,e.createWorker=e.useWebWorkers&&h?h:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=eo.find(t=>!t.I);if(n)return po(n),new Mr(n,t,e,S);if(eo.length<m){const n={j:io};return io++,eo.push(n),new Mr(n,t,e,S)}return new g(n=>{no.push({resolve:n,stream:t,T:e}),oo=r.workerStarvationTimeout,so()})}()).run();function S(t){if(co(),t.O)return t.O=!1,lo();if(no.length){const[{resolve:e,stream:n,T:r}]=no.splice(0,1);e(new Mr(t,n,r,S)),so()}else t.v?(po(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{eo=eo.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):eo=eo.filter(e=>e!=t)}}function so(){!ro&&no.length&&o.isFinite(oo)&&oo>=0&&(ro=v(uo,oo))}function co(){ro&&(_(ro),ro=null)}function uo(){if(ro=null,no.length){const[{resolve:t,stream:e,T:n}]=no.splice(0,1);t(new Mr({},e,fo(n),wo)),so()}}function lo(){const t=no.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new Mr({},e,fo(n),()=>{wo(),r()}))}));return co(),g.all(t)}function fo(t){return n.assign({},t,{useWebWorkers:!1,workerURI:dt,createWorker:dt})}function wo(){co(),so()}function po(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const ho="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function mo(t,e){return go(t,e,!0)}function yo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function go(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=ho[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const Eo="HTTP error ",So="HTTP Range not supported",bo="HTTP resource changed",Ro="Writer iterator completed too soon",xo="Writer not initialized",zo="Invalid writer (size must be writable)",Fo="Content-Range",Do="Range",Ao="GET",Io="bytes",Co=16777216,To="writable",ko=k();class vo{constructor(){this.size=0}init(){this.initialized=!0}}class _o extends vo{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=Se(Ee())}={}){const r=this;let o=0;return n=be(n),new F({async pull(i){const s=e===dt?n:a.min(n,e-o),c=await gi(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&s)&&i.close()}})}}class No extends vo{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(xo);return t.writeUint8Array(De(e))}});n.defineProperty(t,To,{get:()=>e})}writeUint8Array(){}}class Uo extends _o{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class Oo extends No{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let Mo,Lo;class Bo extends _o{constructor(t){super(),n.assign(this,{J:t,size:t.size}),Lo||(Lo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();Mo=1==e}catch{Mo=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==gt){if(!r&&o>=n)return Mn(e.stream());if(Mo)return Mn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class Wo extends vo{constructor(t){super();const e=this,r=new z;n.defineProperty(e,To,{get:()=>r.writable}),e.contentType=t,e.et=Ln(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Po extends Bo{constructor(t){super(new y([t],{type:"text/plain"}))}}function Zo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Ho extends Wo{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return go(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Vo extends _o{constructor(t,e){super(),jo(this,t,e)}async init(){await qo(this,ai,ni),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==dt){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(So);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=dt,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ai(Ao,t,ti(t,o,e));if(206!=n.status)throw new d(So);const c=Ko(n);if(c!==dt&&c!=o)throw new d(So);Qo(t,n),Jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Yo(this,t,e,ai,ni)}}class Go extends _o{constructor(t,e){super(),jo(this,t,e)}async init(){await qo(this,si,ri),super.init()}readUint8Array(t,e){return Yo(this,t,e,si,ri)}}function jo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=Co,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function qo(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ee(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==yt||o)){const r=await e(Ao,t,ti(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Io))throw new d(So);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),Jo(t,r);const i=Xo(r);i===dt?await ii(t,e,n):t.size=i,o&&o.length&&Ko(r)===t.size-o.length&&(t.ot=o)}}else await ii(t,e,n)}async function Yo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return Rt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(Ao,t,ti(t,e,n));if(206!=o.status)throw new d(So);const i=Ko(o);if(i!==dt&&i!=e)throw new d(So);Qo(t,o),Jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(So);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ko(t){const e=t.headers.get(Fo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Xo(t){const e=t.headers.get(Fo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function $o({headers:t}){return{it:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function Jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=$o(e))}function Qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Xo(e);if(t!==dt&&i!==dt&&t!=i)throw new d(bo);if(o){const t=$o(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new d(bo)}}}function ti(t,e=0,r=1){return n.assign({},ei(t),{[Do]:Io+"="+(e<0?e:e+"-"+(e+r-1))})}function ei({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function ni(t){await oi(t,ai)}async function ri(t){await oi(t,si)}async function oi(t,e){const n=await e(Ao,t,ei(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function ii(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,ei(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ai(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(So):new d(Eo+(a.statusText||a.status))}function si(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(So):new d(Eo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ci extends _o{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Go(t,e):new Vo(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class ui extends _o{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class li extends No{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class fi extends _o{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(yi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await gi(c,s,e);else{const i=r-s;o=Fe(await gi(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=Rt;return n.ft=a.max(i,n.ft),o}}class di extends vo{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===ko)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(Ro);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await mi(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,To,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(ko)}finally{t.releaseLock()}}}class wi{constructor(t){return e.isArray(t)&&(t=new fi(t)),(t instanceof F||typeof t.getReader==gt)&&(t={readable:Mn(t)}),t}}class pi{constructor(t){t.writable===dt&&typeof t.next==gt&&(t=new di(t)),(t instanceof D||typeof t.getWriter==gt)&&(t={writable:Bn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new d(zo)}return t}}function hi(t){return Boolean(t&&t.getData)}async function mi(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function yi(t){return t=new wi(t),await mi(t),t.size!==dt&&t.readUint8Array||(t=new Bo(await Ln(t.readable)),await mi(t)),t}function gi(t,e,n){return t.readUint8Array(e,n)}function Ei(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?_o.prototype.createReadable.call(t,e):t.readable}function Si(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const bi="filename",Ri="rawFilename",xi="comment",zi="rawComment",Fi="uncompressedSize",Di="compressedSize",Ai="offset",Ii="diskNumberStart",Ci="lastModDate",Ti="rawLastModDate",ki="lastAccessDate",vi="rawLastAccessDate",_i="creationDate",Ni="rawCreationDate",Ui="internalFileAttributes",Oi="externalFileAttributes",Mi="msdosAttributesRaw",Li="msdosAttributes",Bi="msDosCompatible",Wi="zip64",Pi="encrypted",Zi="version",Hi="versionMadeBy",Vi="zipCrypto",Gi="directory",ji="executable",qi="compressionMethod",Yi="signature",Ki="extraField",Xi="unixMode",$i="setuid",Ji="setgid",Qi="sticky",ta=[bi,Ri,Fi,Di,Ci,Ti,xi,zi,ki,vi,_i,Ni,Ai,Ii,Ui,Oi,Mi,Li,Bi,Wi,Pi,Zi,Hi,Vi,Gi,ji,"symlink",qi,Yi,"crc32",Ki,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Xi,"unixExternalUpper",$i,Ji,Qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ea{constructor(t){ta.forEach(e=>this[e]=t[e])}}const na=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function ra(t,e,n){return t?e?12:16+4*n:0}const oa="File format is not recognized",ia="End of central directory not found",aa="End of Zip64 central directory locator not found",sa="Central directory header not found",ca="File contains encrypted entry",ua="Encryption method not supported",la="Split zip file",fa="Entry data out of bounds",da="Ambiguous archive",wa="Encrypted central directory is not supported",pa="Unsafe filename",ha="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ma="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",ya="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ga="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ea="unsorted central directory",Sa="unknown version needed to extract",ba="compressed patched data",Ra="malformed extra field",xa="unknown zip64 extensible data",za="wrapped entries count",Fa="appended data",Da="prepended data",Aa="prepended central directory",Ia="trailing central directory data",Ca="mismatched central directory offset",Ta="missing zip64 extra field",ka="duplicate filename",va="mismatched zip64 end of central directory record",_a="multiple end of central directory records",Na="mismatched local file header (filename)",Ua="mismatched local file header (general purpose bit flag)",Oa="mismatched local file header (compression method)",Ma="mismatched local file header (crc32 or sizes)",La=/^[a-zA-Z]:/,Ba=/(^|[\\/])\.\.([\\/]|$)/,Wa="utf-8",Pa="cp437",Za=[[Fi,O],[Di,O],[Ai,O],[Ii,M]],Ha={[M]:{yt:Ts,bytes:4},[O]:{yt:ks,bytes:8}},Va=i(o.MAX_SAFE_INTEGER);class Ga{constructor(t,e={}){n.assign(this,{reader:new wi(t),options:e,gt:{Et:new u,St:[],bt:[]},Rt:new WeakSet})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await mi(r),r.size!==dt&&r.readUint8Array||(r=new Bo(await Ln(r.readable)),await mi(r)),r.size<Y)throw new d(oa);const i=e.warnings=[],s=ws(t,e.options),c=s==Ht,l=s!=Gt,f=ms(zs(e,t,Lt),s),p=function(t,e){if(t===dt)return e;if(!ds(t))throw new d(ma);return t}(zs(e,t,"filenameValidation"),s),h=zs(e,t,"normalizeFilename"),{xt:m,zt:y}=await ys(r,l,f);if(!m)throw await async function(t){return await fs(t)==W}(r)?new d(la):new d(ia);l&&y>1&&xs(_a);const g=Ae(m);let E=Ts(g,12),S=Ts(g,16);const b=m.offset,R=Cs(g,20),x=b+Y+R,F=r.size-x;F>f&&xs(Fa),F>0&&Si(i,Fa);let D=Cs(g,4);const A=r.ft||0;let I,C,T,k,v,_=Cs(g,6),N=Cs(g,10),U=0,P=X;const V=S==O||E==O||N==M||_==M;if(S!=O&&_!=M&&(S+=ls(r,_)),V){const t=m.offset>=K?await gi(r,m.offset-K,K):Rt,e=Ae(t);if(t.length==K&&Ts(e,0)==j){S=ls(r,Ts(e,4))+ks(e,8);let t=await gi(r,S,X),s=Ae(t);if(t.length<X||Ts(s,0)!=G){const e=m.offset-K;let n=e-X;if(await Ja(r,n,G)||(n=await async function(t,e){const n=a.max(0,e-65591),r=await gi(t,n,e-n),i=Ae(r);for(let t=r.length-X;t>=0;t--)if(Ts(i,t)==G&&t+12+o(i.getBigUint64(t+4,!0))==r.length)return n+t}(r,e)),n!==dt&&n>=0&&S!=n){const e=S;S=n,S>e&&(U=S-e),t=await gi(r,S,X),s=Ae(t)}}if(t.length<X||Ts(s,0)!=G)throw new d(aa);if(T=!0,k=ks(s,4)>44,k){const t=a.min(ks(s,4)-44,r.size-S-X);t>0&&(P+=t,v=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ae(t),o=Cs(r,26);n.assign(e,{compressionMethod:Cs(r,0),compressedSize:ks(r,2),uncompressedSize:ks(r,10),encryptionAlgorithm:Cs(r,18),bitLength:Cs(r,20),flags:Cs(r,22),hashAlgorithm:Cs(r,24),hashData:t.subarray(28,28+o)})}return e}(await gi(r,S+X,t)))}D==M?D=Ts(s,16):D!=Ts(s,16)&&Rs(c,i,va),_==M?_=Ts(s,20):_!=Ts(s,20)&&Rs(c,i,va),N==M?N=ks(s,32):N!=ks(s,32)&&Rs(c,i,va),E==O?E=ks(s,40):E!=ks(s,40)&&Rs(c,i,va),S=ls(r,_)+ks(s,48)+U}else if(S==O||E==O||_==M)throw new d(aa)}let $=E;const J=m.offset-(T?P+K:0);if(A!=D)throw new d(la);if(S<0)throw new d(oa);let Q=0,tt=S<r.size?await gi(r,S,E):Rt,et=Ae(tt);if(E){let t=J-E;if(S!=t&&_==D){const e=tt.length>=4&&(Ts(et,Q)==H||Boolean(v&&v.compressedSize)||Ka(et));if(!e&&t<0)throw new d(oa);let n=!e;if(t>=0&&t+4<=r.size){let o=await $a(r,t);if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await gi(t,n,e-n),o=Ae(r);for(let t=r.length-6;t>=0;t--)if(Ts(o,t)==Z&&t+6+Cs(o,t+4)==r.length)return n+t}(r,J),n=e-E;e!==dt&&n>=0&&await $a(r,n)&&(t=n,o=!0)}e&&(n=o)}if(n&&t!=S){const n=S;S=t,tt=await gi(r,S,E),et=Ae(tt);const o=S-n,s=function(t,e){if(t.length<q)return dt;const n=Ts(e,42);if(n!=O)return n;let r=q+Cs(e,28);const o=a.min(r+Cs(e,30),t.length);for(;r+4<=o;){const t=Cs(e,r),n=Cs(e,r+2);if(1==t){let t=r+4;return Ts(e,24)==O&&(t+=8),Ts(e,20)==O&&(t+=8),t+8<=o?ks(e,t):dt}r+=4+n}return dt}(tt,et),u=s!==dt&&await Ja(r,s,B),l=s!==dt&&await Ja(r,s+o,B);o>0&&(!u||l)?(U+=o,I=e):(Rs(c,i,Ca),o<0&&!u&&l&&(U+=o))}}if(tt.length<4)throw new d(oa)}else!N&&S<J&&_==D&&(U+=J-S,S=J);const nt=J-S;if(E!=nt&&nt>=0&&_==D&&(E=nt,tt=await gi(r,S,E),et=Ae(tt)),S<0||S>=r.size)throw new d(oa);e.directoryOffset=S,e.directoryLength=$;const rt=Fs(e,t,"decryptCentralDirectory");let ut,lt;if(rt&&N&&tt.length>=4&&Ts(et,0)!=H&&(k||Ka(et))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(v,$,tt.length);lt=tt.subarray(t),tt=await rt(tt.subarray(0,t),v),et=Ae(tt),$=tt.length,ut=!0}v&&!ut&&(tt.length<4||Ts(et,0)==H)&&Si(i,xa),C=S;const ft=zs(e,t,"filenameEncoding"),wt=zs(e,t,"commentEncoding"),pt=new u;let ht,yt=-1;const gt=!c&&!T;!N&>&&(N=Xa(et,tt,Q),N&&Si(i,za));const Et=n.assign({},e.options,t,{[Mt]:s});delete Et[It];for(let o=0;o<N;o++){const s=new Ya(r,Et);if(Q+q>tt.length||Ts(et,Q)!=H){if(0==o&&!ut&&(k||Ka(et)))throw new d(wa);throw new d(sa)}ts(s,et,Q+6);const u=Boolean(s.bitFlag.languageEncodingFlag),l=Q+q,f=l+s.filenameLength+s.extraFieldLength,m=Cs(et,Q+4),y=!(m>>8),g=m>>8==3,E=Cs(et,Q+32),S=f+E,b=new w(tt.subarray(l,S)),R=b.subarray(0,s.filenameLength),x=b.subarray(s.filenameLength+s.extraFieldLength),F=u||!ft&&yo(R),D=u||!wt&&yo(x),A=Ts(et,Q+38),I=A&L,T={readOnly:Boolean(1&I),hidden:Boolean(2&I),system:Boolean(4&I),directory:Boolean(16&I),archive:Boolean(32&I)},v=Ts(et,Q+42),_=Fs(e,t,"decodeText")||mo,B=F?Wa:ft||Pa,W=D?Wa:wt||Pa;let P=_(R,B,Pt);P===dt&&(P=mo(R,B));let Z,V=_(x,W,Zt);V===dt&&(V=mo(x,W)),n.assign(s,{index:o,Ft:ut,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:E,offset:v,diskNumberStart:Cs(et,Q+34),internalFileAttributes:Cs(et,Q+36),externalFileAttributes:A,msdosAttributesRaw:I,msdosAttributes:T,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(s.filenameLength,s.filenameLength+s.extraFieldLength),rawComment:x,filename:P,comment:V});try{Z=es(s,s,et,Q+6)}catch(t){if(c||t.message!=mt)throw t;s.At=!0,Si(i,Ta,s.filename)}if(P=s.filename,h){const t=h(P);t!==dt&&(P=s.filename=t)}if(hs(P,p)){const t=new d(pa);throw t.filename=P,t}if(Z&&Si(i,Ra,P),s.At&&s.offset==O)C=0;else{s.offset+=U;const t=ls(r,s.diskNumberStart)+s.offset;C=a.min(t,C),t<yt&&Si(i,Ea,P),yt=t}(s.version&L)>63&&Si(i,Sa,P),32&~s.rawBitFlag||Si(i,ba,P),pt.has(s.filename)&&(ht=!0),pt.add(s.filename);const G=s.externalFileAttributes>>16&M;s.unixMode===dt&&16877&G&&(s.unixMode=G);const j=Boolean(s.unixMode&at),Y=Boolean(s.unixMode&st),K=Boolean(512&s.unixMode),X=40960==((s.unixMode===dt?G:s.unixMode)&ot),$=s.unixMode!==dt&&(s.unixMode&ot)==it||(G&ot)==it||y&&T.directory||s.filename.endsWith(ct),J=!X&&!$&&(s.unixMode!==dt?!!(73&s.unixMode):g&&!!(73&G));n.assign(s,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:J,directory:$,zipCrypto:s.encrypted&&!s.extraFieldAES});const nt=new ea(s);if(s.At&&e.Rt.add(nt),nt.getData=(t,n)=>s.getData(t,nt,e,n),nt.arrayBuffer=async t=>{const r=new z,o=Ln(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await s.getData(r,nt,e,n.assign({},t,{preventClose:!1})),o},Q=S,o==N-1&>){const t=Xa(et,tt,Q);t&&(N+=t,Si(i,za))}const{onprogress:rt}=t;if(rt)try{await rt(o+1,N,new ea(s))}catch{}yield nt}let St=Q,bt=Qa(tt.subarray(Q))||(ut?Qa(lt):dt);if(!bt&&!ut){const t=S+Q,e=a.min(J-t,65541);e>=6&&(bt=Qa(await gi(r,t,e)))}bt&&(e.digitalSignature=bt,St=Q+6+bt.length),(Q!=$&&St!=$||!ut&&Q!=E&&St!=E)&&Rs(c,i,Ia),ht&&Rs(c,i,ka);const xt=zs(e,t,"extractPrependedData"),zt=zs(e,t,"extractAppendedData"),Ft=(c||xt)&&N&&4==C&&await async function(t){const e=await fs(t);return e==W||808471376==e}(r)?4:0;return c&&(U>0||N&&C>Ft)&&xs(Da),(U>0||N&&C>4)&&Si(i,Da),I&&Si(i,Aa),xt&&(e.prependedData=C>Ft?await gi(r,Ft,C-Ft):Rt),e.comment=R?await gi(r,b+Y,R):Rt,zt&&(e.appendedData=x<r.size?await gi(r,x,r.size-x):Rt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[xt](){return this.close()}}class ja{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Ga(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function qa(t,e={}){if(t=new wi(t),await mi(t),t.size!==dt&&t.readUint8Array||(t=new Bo(await Ln(t.readable)),await mi(t)),t.size<Y)return!1;const n=ws(e,{}),r=n!=Gt,o=ms(e[Lt],n),{xt:i,zt:a}=await ys(t,r,o);if(!i||n==Ht&&a>1)return!1;const s=Cs(Ae(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ya=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,{gt:s,directoryOffset:c}=r;if(i.At)throw new d(mt);const u=Ee(),{reader:l,index:f,offset:w,diskNumberStart:p,extraFieldAES:h,extraFieldZip64:m,compressionMethod:y,bitFlag:g,rawBitFlag:E,crc32:S,rawLastModDate:b,uncompressedSize:R,compressedSize:x}=i,{dataDescriptor:z}=g,F=e.localDirectory={},A=e.warnings=[],I=ls(l,p)+w,C=await gi(l,I,ut),T=Ae(C);let k=zs(i,o,zt),v=zs(i,o,Ft);const _=ne(zs(i,o,Dt)),N=Boolean(_),U=!0===_;if(ee(k,v),k=k&&k.length?k:dt,v=v&&v.length?v:dt,h&&99!=h.originalCompressionMethod)throw new d(Hn);if(C.length<ut||Ts(T,0)!=B)throw new d(pt);ts(F,T,4);const{extraFieldLength:O,filenameLength:M}=F,W=F.dataOffset=I+ut+M+O,P=zs(i,o,"checkLocalDirectory"),Z=ws(o,i.options),H=function(t,e){return t===dt?e!=Gt:Boolean(t)}(P,Z),V=zs(i,o,"checkLocalFilename"),G=function(t,e){return t===dt?e==Ht:Boolean(t)}(V===dt?P:V,Z);let j=Rt;if(G&&(M||O)){const t=await gi(l,I+ut,M+O);j=t.subarray(0,M),F.rawExtraField=t.subarray(M)}else F.rawExtraField=O?await gi(l,I+ut+M,O):Rt;G&&(F.rawFilename=j),es(i,F,T,4,!0)&&Si(A,Ra),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.Ft&&(e.rawBitFlag&rt)==rt;!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||Rs(a,o,Na),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Rs(a,o,Ua),e.compressionMethod!=t.compressionMethod&&Rs(a,o,Oa),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Rs(a,o,Ma)}(i,F,j,G,H?dt:A);const{lastAccessDate:q,creationDate:Y,uid:K,gid:X}=F;q&&e.lastAccessDate===dt&&(e.lastAccessDate=q),Y&&e.creationDate===dt&&(e.creationDate=Y),K!==dt&&e.uid===dt&&(e.uid=K),X!==dt&&e.gid===dt&&(e.gid=X);const $=zs(i,o,"checkPasswordOnly"),J=i.encrypted&&(!U||$),Q=J&&!h;if(U||(e.zipCrypto=Q),J&&!(64&~i.rawBitFlag))throw new d(ua);const tt=N?dt:qn(y);if(0!=y&&8!=y&&9!=y&&!tt&&!N)throw new d(Hn);if(J){if(!Q&&(h.strength<1||h.strength>3))throw new d(ua);if(!k&&!v)throw new d(ca)}if(W+x>a.min(l.size,c))throw new d(fa);const et=x,nt=Qt(zs(i,o,At));te(nt);let ot=zs(i,o,"checkOverlappingEntry");const it=zs(i,o,"checkOverlappingEntryOnly");it&&(ot=!0);const{onstart:at,onprogress:st,onend:ct}=o,lt=0!=y&&!N,ft=N?x-ra(J,Q,h&&h.strength):R,wt=9==y;let yt=zs(i,o,Tt);wt&&(yt=!1);const gt=zs(i,o,"checkCrc32"),Et=(gt===dt?zs(i,o,"checkSignature"):gt)&&!N&&(!J||Q||h&&1==h.vendorVersion),St={options:{codecType:Dr,password:k,rawPassword:v,zipCrypto:Q,encryptionStrength:h&&h.strength,checkCrc32:Et,checkAuthenticationCode:zs(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(z?b>>>8&L:S>>>24&L),outputSize:ft,crc32:S,compressed:lt,encrypted:J,useWebWorkers:zs(i,o,Ct),useCompressionStream:yt,deflate64:wt,format:tt?tt.format:dt,codecURI:tt?tt.codecURI:dt,compressionMethod:y,rawBitFlag:E,checkPasswordOnly:$},config:u,A:{signal:nt,size:et,onstart:at,onprogress:st,onend:ct}};let bt,xt,It;ot&&(await async function({reader:t,It:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=await ss(t,s+i,{crc32:o,compressedSize:i,uncompressedSize:a,zip64:n});r?(e.localDirectory.dataDescriptor=r,f=us(r.zip64,r.signature)):f=us(n,!1)}const w={start:r,end:s+i+f,It:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&as(e,o)?o:i&&as(e,i)?i:void 0}(h,w)||m.find(t=>as(w,t));if(t){const e=new d(ht);throw e.overlappingEntry=t.It,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:l,It:e,index:f,offset:I,crc32:S,compressedSize:x,uncompressedSize:R,dataOffset:W,dataDescriptor:z||F.bitFlag.dataDescriptor,extraFieldZip64:m||F.extraFieldZip64,gt:s}),function(t,e,n){const{dataDescriptor:r}=e,o=t.Ft&&(e.rawBitFlag&rt)==rt;r&&!o&&(t.crc32!==dt&&r.crc32!=t.crc32||r.compressedSize!=t.compressedSize||r.uncompressedSize!=t.uncompressedSize)&&Rs(!n,n,Ma)}(i,F,H?dt:A));try{if(!it){$&&(t=new D),t=new pi(t),await mi(t,function(t,e,n){return a.min(t,n?1032*e:e)}(ft,x,lt)),({writable:bt}=t);const e=Mn(l.createReadable({offset:W,size:et})),{outputSize:r}=await ao({readable:e,writable:bt},St);if(te(nt),r!=ft)throw n.assign(new d($n),{outputSize:r});t.size+=r}}catch(e){if(Ie(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!$||!Ie(e)||e.message!=an)throw xt=e,It=!0,e}finally{if((hi(t)||!zs(i,o,kt))&&bt&&!bt.locked){const t=bt.getWriter();if(It)try{await t.abort(xt)}catch{}else await t.close()}}return $||it?dt:t.getData?t.getData():bt}};function Ka(t){return t.byteLength>=4&&134630224==Ts(t,0)}function Xa(t,e,n){let r=0;for(;n+q<=e.length&&Ts(t,n)==H;)n+=q+Cs(t,n+28)+Cs(t,n+30)+Cs(t,n+32),r++;return r%65536?0:r}function $a(t,e){return Ja(t,e,H)}async function Ja(t,e,n){return!(e<0||e+4>t.size)&&Ts(Ae(await gi(t,e,4)),0)==n}function Qa(t){if(t.length>=6){const e=Ae(t);if(Ts(e,0)==Z){const n=Cs(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function ts(t,e,r){const o=t.rawBitFlag=Cs(e,r+2),i=!(1&~o),a=Ts(e,r+6);n.assign(t,{encrypted:i,version:Cs(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Ds(a),filenameLength:Cs(e,r+22),extraFieldLength:Cs(e,r+24)})}function es(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=Ae(a);let f=0,w=!1;try{for(;f<a.length;){const t=Cs(l,f),e=Cs(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Cs(r,o+4);n.assign(e,{signature:Ts(r,o+10),crc32:Ts(r,o+10),compressedSize:Ts(r,o+14),uncompressedSize:Ts(r,o+18)});const h=u.get(1);let m;h?(function(t,e,n){e.zip64=!0;const r=Ae(t.data),o=Za.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Ha[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(mt)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Ha[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0}(h,e,i)||(w=!0),e.extraFieldZip64=h):Za.some(([t,n])=>e[t]==n)&&(i?w=!0:m=!0);const y=u.get(28789);y&&(ns(y,bi,Ri,e,t),e.extraFieldUnicodePath=y);const g=u.get(25461);g&&(ns(g,xi,zi,e,t),e.extraFieldUnicodeComment=g);const E=u.get($);E&&(99==p||e.encrypted)&&E.data.length>=7?(function(t,e,r){const o=Ae(t.data),i=Is(o,4);n.assign(t,{vendorVersion:Is(o,0),vendorId:Is(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Cs(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(E,e,p),e.extraFieldAES=E):(E&&(w=!0),e.compressionMethod=p);const S=u.get(13);S&&(rs(S,e),e.extraFieldPkwareUnix=S);const b=u.get(22613);b&&(rs(b,e),e.extraFieldUnixType1=b);const R=u.get(J);R&&(function(t,e,n){if(!t.data.length)return;const r=Ae(t.data),o=Is(r,0),i=[],a=[];n?(1&~o||(i.push(Ci),a.push(Ti)),2&~o||(i.push(ki),a.push(vi)),4&~o||(i.push(_i),a.push(Ni))):t.data.length>=5&&(i.push(Ci),a.push(Ti));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Ts(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(R,e,i),e.extraFieldExtendedTimestamp=R);const x=u.get(10);x&&(function(t,e){const r=Ae(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Cs(r,i),n=Cs(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Ae(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:As(i),lastAccessDate:As(a),creationDate:As(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(x,e),e.extraFieldNTFS=x);const z=u.get(tt);let F;z&&(F=os(z,e,!0),e.extraFieldInfoZip=z);const D=u.get(et);D&&(os(D,F?{}:e,!1),e.extraFieldUnix=D);const A=u.get(Q);if(A&&(e.extraFieldUSDZ=A),m)throw new d(mt);return w}function ns(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=Ae(t.data),s=new Le;s.append(i[r]);const c=Ae(new w(4));c.setUint32(0,s.get(),!0);const u=Ts(a,1),l=Is(a,0);n.assign(t,{version:l,[e]:mo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Ts(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function rs(t,e){if(t.data.length<8)return;const r=Ae(t.data),o={lastAccessDate:new s(1e3*(0|Ts(r,0))),lastModDate:new s(1e3*(0|Ts(r,4)))};t.data.length>=12&&(o.uid=Cs(r,8),o.gid=Cs(r,10)),n.assign(t,o),n.assign(e,o)}function os(t,e,r){try{const o=Ae(t.data);let i,a;if(r){let e=0;const r=Is(o,e++),s=Is(o,e++);i=is(t.data.subarray(e,e+s)),e+=s;const c=Is(o,e++);a=is(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Cs(o,0),a=Cs(o,2),n.assign(t,{uid:i,gid:a}));return i!==dt&&(e.uid=i),a!==dt&&(e.gid=a),i!==dt||a!==dt}catch{}}function is(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function as(t,e){return t.start<e.end&&e.start<t.end}async function ss(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:i}){const s=a.min(24,a.max(0,t.size-e)),c=Ae(s?await gi(t,e,s):Rt),u=[[i,!0],[i,!1],[!i,!0],[!i,!1]].map(([t,e])=>cs(c,t,e)).filter(t=>t&&t.compressedSize==r&&t.uncompressedSize==o);return u.find(t=>t.crc32==n)||u[0]||cs(c,i,!0)||cs(c,i,!1)}function cs(t,e,n){const r=n?4:0;if(t.byteLength<us(e,n)||n&&Ts(t,0)!=P)return dt;const o=Ts(t,r);let i,a;try{e?(i=ks(t,r+4),a=ks(t,r+12)):(i=Ts(t,r+4),a=Ts(t,r+8))}catch{return dt}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function us(t,e){return(t?20:12)+(e?4:0)}function ls(t,e){return t.ht?t.ht(e):0}async function fs(t){return Ts(Ae(await gi(t,0,4)))}function ds(t){return t===Ht||t===Vt||t===Gt}function ws(t,e){return ps(t,ps(e,Vt))}function ps(t,e){const n=t[Mt];if(n!==dt){if(!ds(n))throw new d(ha);return n}const r=t[It];return r===dt?e:r?Ht:e==Gt?Gt:Vt}function hs(t,e){if(e==Gt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Ba.test(t)||t.startsWith("/")||t.startsWith("\\")||La.test(t))||e==Ht&&(n.includes(".")||n.includes("")||t.includes("\0"))}function ms(t,e){if(t!==dt){const e=ie(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(ya);return e}return e==Ht?0:e==Gt?1/0:M}async function ys(t,e,n){const{size:r}=t,o=a.min(r,65557),i={Ct:64};let s,c,u=0;for await(const[n,a,l,f,d]of gs(t,o)){const o=Cs(n,f+20);if(d+Y+o==r){const o=await Ss(t,n,a,f,d,r,i);if(2==o){if(s||(s=Es(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=Es(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of gs(t,o)){const o=Es(c,u,l);i||(i=o);const f=await Ss(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{xt:s,zt:u}}async function*gs(t,e){const n=t.size-e,r=await gi(t,n,e),o=Ae(r);for(let t=r.length-Y;t>=0;t--)Ts(o,t)==V&&(yield[o,n,r,t,n+t])}function Es(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function Ss(t,e,n,r,o,i,a){const s=Cs(e,r+10),c=Ts(e,r+12),u=Ts(e,r+16);if(s==M||c==O||u==O)return await bs(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Cs(e,r+6);for(const r of[o-c,ls(t,l)+u])if(await bs(t,e,n,r,i,a)==H)return 2;return 0}async function bs(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?Ts(e,r-n):i.Ct>0?(i.Ct--,Ts(Ae(await gi(t,r,4)),0)):dt}function Rs(t,e,n){t?xs(n):Si(e,n)}function xs(t){const e=new d(da);throw e.reason=t,e}function zs(t,e,n){return e[n]===dt?t.options[n]:e[n]}function Fs(t,e,n){return Jt(zs(t,e,n))}function Ds(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<ft?ft:r}function As(t){return new s(o(t/i(1e4)-i(116444736e5)))}function Is(t,e){return t.getUint8(e)}function Cs(t,e){return t.getUint16(e,!0)}function Ts(t,e){return t.getUint32(e,!0)}function ks(t,e){const n=t.getBigUint64(e,!0);if(n>Va)throw new d(ga);return o(n)}var vs=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:da,ERR_BAD_FORMAT:oa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:sa,ERR_CODEC_OUT_OF_MEMORY:Qn,ERR_ENCRYPTED:ca,ERR_ENCRYPTED_CENTRAL_DIRECTORY:wa,ERR_ENTRY_DATA_OUT_OF_BOUNDS:fa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:aa,ERR_EOCDR_NOT_FOUND:ia,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:mt,ERR_INVALID_AUTHENTICATION_CODE:on,ERR_INVALID_COMPRESSED_DATA:Jn,ERR_INVALID_CRC32:tr,ERR_INVALID_FILENAME_VALIDATION:ma,ERR_INVALID_MAX_APPENDED_DATA_SIZE:ya,ERR_INVALID_PASSWORD:rn,ERR_INVALID_STRICTNESS:ha,ERR_INVALID_UNCOMPRESSED_SIZE:$n,ERR_LOCAL_FILE_HEADER_NOT_FOUND:pt,ERR_OVERLAPPING_ENTRY:ht,ERR_SPLIT_ZIP_FILE:la,ERR_UNSAFE_FILENAME:pa,ERR_UNSUPPORTED_COMPRESSION:Hn,ERR_UNSUPPORTED_ENCRYPTION:ua,ERR_UNSUPPORTED_UINT64:ga,ERR_WORKER_STARTUP_TIMEOUT:Cr,WARNING_APPENDED_DATA:Fa,WARNING_COMPRESSED_PATCHED_DATA:ba,WARNING_DUPLICATE_FILENAME:ka,WARNING_MALFORMED_EXTRA_FIELD:Ra,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:Ca,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Ua,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Oa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ma,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Na,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:va,WARNING_MISSING_ZIP64_EXTRA_FIELD:Ta,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:_a,WARNING_PREPENDED_CENTRAL_DIRECTORY:Aa,WARNING_PREPENDED_DATA:Da,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ia,WARNING_UNKNOWN_VERSION:Sa,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:xa,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ea,WARNING_WRAPPED_ENTRIES_COUNT:za,ZipReader:Ga,ZipReaderStream:ja,Tt:async function(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,extraFieldZip64:i}){const a=await ss(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:Boolean(i)});if(a&&a.compressedSize==r&&a.uncompressedSize==o)return us(a.zip64,a.signature)},isZipFile:qa});const _s="File already exists",Ns="Zip file comment exceeds 64KB",Us="Invalid zip file comment (must be a Uint8Array)",Os="File entry comment exceeds 64KB",Ms="Invalid file entry comment (must be a string)",Ls="Invalid date (must be a valid Date instance)",Bs="File entry name exceeds 64KB",Ws="Version exceeds 65535",Ps="The strength must equal 1, 2, or 3",Zs="Encryption is not supported in USDZ files",Hs="Split zip files are not supported in USDZ files",Vs="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Gs="Invalid extra field (must be a Map)",js="Invalid extra field type (must be integer 0..65535)",qs="Invalid extra field data (must be a Uint8Array)",Ys="Extra field data exceeds 64KB",Ks=-2147483648,Xs=2147483647,$s=i(0),Js=i("0x7fffffffffffffff"),Qs="Zip64 is not supported (set the 'zip64' option to 'true')",tc="Undefined uncompressed size",ec="Undefined compression method",nc="Undefined CRC32",rc="Undetermined size",oc="Undefined reader",ic="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ac="Zip file not empty",sc="Invalid uid (must be integer 0..2^32-1)",cc="Invalid gid (must be integer 0..2^32-1)",uc="Invalid UNIX mode (must be integer 0..65535)",lc="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",fc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",dc="Invalid msdosAttributesRaw (must be integer 0..255)",wc="Invalid msdosAttributes (must be an object with boolean flags)",pc="Invalid level (must be integer 0..9)",hc="Signature data exceeds 64KB",mc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",yc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",gc="compression unavailable",Ec="clamped last modification date",Sc=new w([7,0,2,0,65,69,3,0,0]),bc="infozip",Rc="unix",xc=[8,9,5,3];let zc=0;const Fc=[];class Dc{constructor(t,e={}){t=new pi(t);const{availableSize:r=wt,maxSize:o=wt}=t,i=r>0&&r!==wt&&o>0&&o!==wt;if(i&&e[Ot])throw new d(Hs);n.assign(this,{writer:t,kt:i,options:e,vt:new c,_t:new u,offset:e[Ut]===dt?t.size||t.writable.size||0:e[Ut],Nt:e[Ut]===dt?0:e[Ut]-(t.size||t.writable.size||0),Ut:new u,Ot:[],warnings:[],Mt:0,Lt:0,Bt:dt,Wt:!1})}prependZip(t){return Cc(this,async function(t,e){if(t._t.size)throw new d(ac);await Tc(t,e)}(this,t))}appendZip(t,e={}){return Cc(this,Tc(this,t,e))}add(t="",e,r={}){const o=this,{Ut:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Wt];if(a!==dt){const{Pt:e,Zt:r}=_c(a,ne(au(t,o,Dt)),au(t,o,Ci));delete o[Wt],o=n.assign(e,r,o)}if(au(t,o,Gi)&&!e.endsWith(ct)&&(e+=ct),t._t.has(e))throw new d(_s);t._t.add(e),zc<Ee().maxWorkers?zc++:await new g(t=>Fc.push(t));try{return await async function(t,e,r,o){const a=Nc(t,e,o);({name:e}=a);const s=Uc(t,e,o),{comment:c}=s,u=o[Ki];t.vt.set(e,dt);const l=t.Bt,f={};let w,p;s.Ht.keepOrder&&(f.Vt=new g(t=>w=t)),t.Bt=f;try{const{Ht:c}=s;0==c.level||c.compressionMethod!==dt||c.Gt||await Nr(Ee())||(c.level=0,Si(t.warnings,gc,e));const u=await async function(t,e,{Ht:r},o){if(r.Gt&&!e&&!au(t,o,Gi))throw new d(oc);let i;if(e){if(e=new wi(e),await mi(e),!e.readUint8Array&&!e.readable)throw new d(ic);({size:i}=e)}return n.assign({reader:e},Mc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=jc(t.writer),m=Gc(t.writer);let y=o.crc32===dt?o[Yi]:o.crc32;const E=u.Ht.encrypted&&!c.zipCrypto;if(c.Gt&&!c.jt&&E&&(y=dt),c.Gt&&r&&!E&&y===dt)throw new d(nc);const S=Bc(o=n.assign({},o,a.Ht,s.Ht,u.Ht,{signature:o[Yi],crc32:y,offset:t.offset-h,diskNumberStart:m,[Ot]:t.options[Ot]}));S.qt&&Si(t.warnings,Ec,e);const b=Zc(o),R=gu(S.Yt,b.Kt);p=await async function(t,e,r,o,a){const{vt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,Xt:f,signal:w}=a,{$t:p,It:h,Jt:m,Qt:y}=o,E=t.options[Ot];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.Vt:dt;s.set(e,I);try{a.bufferedWrite||!u||t.te||t.Mt||t.Lt||!l&&!f?(S=!0,t.Mt++,A=a.createTempStream?await a.createTempStream():new z(dt,dt,{highWaterMark:wt}),A.size=0,await mi(c)):(b=!0,t.Lt++,A=c,await T,await k()),await mi(A);const h=jc(c);t.kt&&!S&&await tu(t,c),E&&!S&&Wc(o,t.offset-h);const{Yt:m}=p;S||await v();const y=Gc(c),R=Yc(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await eu(A,m)),I=await async function(t,e,{diskNumberStart:r,Vt:o},a,s,c){const{$t:u,ee:l,ne:f}=a,{re:w,oe:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,ie:b,ae:R,se:x,ce:z,ue:F,le:D,fe:A,de:I,we:C}=u,{Kt:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,pe:P,he:Z,me:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,ye:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,Gt:St,jt:bt,format:Rt,codecURI:xt}=c,zt={Vt:o,versionMadeBy:Y,zip64:W,pe:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,ie:b,ae:R,se:x,le:D,fe:A,de:I,we:C,rawExtraField:X,ye:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Mn(Ei(t,{size:n})),o={options:{codecType:Fr,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await ao({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,te(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Qs)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:Ie(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,$t:r,ee:o},{zip64:a,zipCrypto:s,Gt:c,dataDescriptor:u}){const{oe:l,encrypted:f}=r,{ge:d,Ee:w}=o;f&&!s&&!c||t===dt||(hu(l,10,t),u&&hu(d,w,t)),a?u&&(mu(d,w+4,i(e)),mu(d,w+12,i(n))):(hu(l,14,e),hu(l,18,n),u&&(hu(d,w+4,e),hu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,$t:u,ee:l},c),G&&await eu(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,re:w,oe:p,signature:Ft,crc32:!y||V||St?Ft:dt,ce:z,ue:F,he:Z,me:H}),zt}(r,A,I,o,Ee(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.kt&&await tu(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Gc(c),I.offset=Yc(t,c),E){const e=o.ne;Wc(o,t.offset-jc(c)),I.size+=o.ne-e}!function({rawFilename:t,encrypted:e,zip64:n,ae:r,crc32:o,compressedSize:a,uncompressedSize:s,he:c,me:u},l,{dataDescriptor:f,Gt:d}){if(f||((!e||d&&o!==dt)&&hu(l,14,o),u||hu(l,18,a),c||hu(l,22,s)),n&&r){const e=ut+gu(t)+4;mu(l,e,i(s)),mu(l,e+8,i(a))}}(I,p.Se,a),await eu(c,p.Yt),await nu(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Mt--,b&&t.Lt--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.te=!0;const{be:e}=t;t.be=new g(e=>R=()=>{t.te=!1,e()}),await e}async function v(){qc(c,gu(p.Yt))&&await c.closeDisk()}}(t,e,r,{$t:S,ee:b,ne:R,It:f,Jt:l,Qt:w},o)}catch(n){throw t.vt.delete(e),n}finally{w&&w(l&&l.Vt)}return n.assign(p,{name:e,comment:c,extraField:u}),new ea(p)}(t,e,r,o)}catch(n){throw t._t.delete(e),n}finally{const t=Fc.shift();t?t():zc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Cc(o,s)}remove(t){const{_t:e,vt:n}=this;if(typeof t==St&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=Rt,n={}){const r=this,{Ut:o,writer:a}=this,{writable:s}=a;if(r.Wt)return Ic(a);if(!(t instanceof w))throw new d(Us);if(gu(t)>M)throw new d(Ns);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Ot.map(t=>t.Re));const c=r.Ot.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=Hc(t.vt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{vt:o,writer:i}=t,a=new w(n);await mi(i);let s=0,c=0,u=Gc(i),l=jc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,ie:w,we:p,se:h,le:m,de:y,rawExtraField:g,ye:E,rawComment:S,versionMadeBy:b,re:R,oe:x,he:z,me:F,Te:D,ke:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=gu(w,p,h,m,y,g,E),N=q+gu(d,S)+_;qc(i,s+N-c)&&(await eu(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Gc(i),l=jc(i)),z||hu(x,18,k),F||hu(x,14,v),(A||D)&&n.version<45&&pu(x,0,45);const U=Vc(N);if(U.ve(H),U._e(b),U.Ne(R.subarray(0,24)),U._e(_),U._e(gu(S)),U._e(D?M:T),U._e(I),U.ve(C),U.ve(A?O:e),U.Ne(d),U.Ne(w),U.Ne(p),U.Ne(h),U.Ne(m),U.Ne(y),U.Ne(g),U.Ne(E),U.Ne(S),yu(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new ea(n))}catch{}}return await eu(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Gc(i),Ue:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=cu(t,n,Bt);if(r){const n=await r(e),o=gu(n);if(o>M)throw new d(hc);const i=Vc(6+o);i.ve(Z),i._e(o),i.Ne(n);const{writer:a}=t;return qc(a,gu(i.ct))&&await a.closeDisk(),await eu(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Oe:c,De:u}=r;let{Fe:l}=r,f=t.vt.size,w=a.diskNumber,p=Yc(t,a);const h=gu(e);if(h>M)throw new d(Ns);let m=au(t,n,Wi),y=Gc(o);if(qc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Qs);m=!0}else m===dt&&u&&(m=!0);const g=Vc(m?98:Y);qc(o,gu(g.ct)+h)&&await o.closeDisk(),y=Gc(o);let E=y==s.diskNumber?s.Ue:0;m&&(g.ve(G),g.Me(44),g._e(45),g._e(45),g.ve(y),g.ve(w),g.Me(E),g.Me(f),g.Me(l),g.Me(p),g.ve(j),g.ve(y),g.Me(i(Yc(t,o))+i(l)+i(c)),g.ve(y+1),au(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ve(V),g._e(y),g._e(w),g._e(E),g._e(f),g.ve(l),g.ve(p),g._e(h),await eu(o,g.ct),h&&await eu(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Oe:l,De:a})}(r,t,n),r.Wt=!0,!hi(a)&&au(r,n,kt)||await s.getWriter().close(),Ic(a)}[xt](){return this.close()}}class Ac extends g{then(t,e){const{Le:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function Ic(t){return t.getData?t.getData():t.writable}function Cc(t,e){const r=new Ac((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Le=o,o.Re=g.prototype.then.call(r,dt,t=>n.assign(o,{xe:!0,error:t})),t.Ot.push(o),r}async function Tc(t,r,o={}){const{Ut:i,_t:s,vt:l}=t,f=Jt(o.filter);for(;i.size;)await g.allSettled(e.from(i));let w;const p=new g(t=>w=t);i.add(p);const h=[];let m;try{r=new wi(r),await mi(r),r.size!==dt&&r.readUint8Array||(r=new Bo(await Ln(r.readable)),await mi(r));const{ZipReader:o,Tt:i}=await g.resolve().then(function(){return vs}),w=new o(r),p=await w.getEntries(),y=[];for(const t of p)f&&!await f(t)||y.push(t);await w.close(),await mi(t.writer);const{directoryOffset:E,Rt:S}=w;y.forEach(t=>{const{filename:e}=t;if(S.has(t))throw new d(mt);if(s.has(e))throw new d(_s);s.add(e),h.push(e)}),t.te=!0;const{be:b}=t;t.be=new g(e=>m=()=>{t.te=!1,e()}),await b,t.kt&&(delete t.kt,!f&&await async function(t){return wu(Ae(await gi(t,0,4)),0)==W}(r)||(await eu(t.writer,Qc()),t.offset+=4));const R=await async function(t,n,r,o,i,s,l){const{writer:f}=t,w=new c;if(f.closeDisk||s){const p=e.from(r).sort((t,e)=>Jc(n,t)-Jc(n,e)),h=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const s=Jc(t,n[e]),c=n[e+1];c&&Jc(t,c)>s&&(i=a.min(Jc(t,c),r)),o[e]=i}return o}(n,p,i),m=new u(o),y=new c;for(let t=0;t<p.length;t++){const e=p[t];if(m.has(e)){const r=Jc(n,e),o=await $c(n,r);if(o===dt)throw new d(pt);let i=r+o+e.compressedSize;if(e.bitFlag.dataDescriptor){const r=await l(n,i,e);i=r===dt?a.max(i,h[t]):i+r}if(i>h[t])throw new d(ht);h[t]=i,y.set(e,o)}}let g,E=0;for(let e=0;e<p.length;e++){const r=p[e];if(m.has(r)){const o=Jc(n,r);o<E?w.set(r,g):(s||await Xc(t,n,E,o-E),f.closeDisk&&qc(f,y.get(r))&&await f.closeDisk(),g={offset:Yc(t,f),diskNumberStart:Gc(f)},w.set(r,g),await Xc(t,n,o,h[e]-o),E=h[e])}}s||await Xc(t,n,E,i-E)}else{const e=t.offset;await Xc(t,n,0,i),r.forEach(t=>w.set(t,{offset:e+Jc(n,t),diskNumberStart:0}))}return w}(t,r,p,y,E,Boolean(f),i);y.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,rawBitFlag:i,uncompressedSize:a,compressedSize:s,extraFieldZip64:c}=t;let{compressionMethod:u,rawExtraField:f}=t;f=Kc(f||Rt),t.extraFieldAES&&(u=99);const d=gu(f),w=Boolean(c)&&c.uncompressedSize!==dt,p=Boolean(c)&&c.compressedSize!==dt,{re:h,oe:m}=Eu({version:e,bitFlag:i,compressionMethod:u,uncompressedSize:a,compressedSize:s,rawLastModDate:r,rawFilename:o,me:p,he:w,extraFieldLength:d}),{crc32:y}=t;y!==dt&&hu(m,10,y);const{offset:g,diskNumberStart:E}=R.get(t);n.assign(t,{pe:!0,he:w,me:p,offset:g,diskNumberStart:E,Te:!1,ie:Rt,we:Rt,se:Rt,le:Rt,fe:Rt,de:Rt,rawExtraField:f,ye:Rt,re:h,oe:m}),l.set(t.filename,t)})}catch(t){throw h.forEach(t=>s.delete(t)),t}finally{w(),i.delete(p),m&&m()}}async function kc(t,e){try{await t.writer.writable.abort(e)}catch{}}function vc(t,e,n){t.Ut.add(e),e.catch(t=>{try{n(t)}catch{}})}function _c(t,r,o){if(null===t||typeof t!=Et||e.isArray(t))throw new d(mc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[_t]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{na.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Ki]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?Rc:bc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==jt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[vt]=xc[F.level]),o===dt)k.rawLastModDate=w;else if(r!==jt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<ft?e=ft:e>lt&&(e=lt),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(yc);return{Pt:C,Zt:k}}function Nc(t,n,r){let o=au(t,r,Bi),i=au(t,r,Hi,o?20:768);const a=au(t,r,ji),s=uu(t,r,"uid"),c=uu(t,r,"gid");let u=uu(t,r,Xi),l=au(t,r,"unixExtraFieldType"),f=au(t,r,$i),w=au(t,r,Ji),p=au(t,r,Qi);if(oe(s,O,sc),oe(c,O,cc),oe(u,M,uc),l!==dt&&l!==bc&&l!==Rc)throw new d(lc);if(l===Rc&&(s!==dt&&s>M||c!==dt&&c>M))throw new d(fc);l!==dt||s===dt&&c===dt||(l=bc);let h=uu(t,r,Mi),m=au(t,r,Li);const y=h!==dt||m!==dt;if(s!==dt||c!==dt||u!==dt||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),oe(h,L,dc),m&&(typeof m!==Et||e.isArray(m)))throw new d(wc);if(i>M)throw new d(Ws);let g=au(t,r,Oi);const E=g!==dt;E||(g=0),!r[Gi]&&n.endsWith(ct)&&(r[Gi]=!0);const S=au(t,r,Gi);if(S?(n.endsWith(ct)||(n+=ct),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==dt||Boolean(f||w||p);u=u===dt?g>>16&M:u&M,f?u|=at:f=Boolean(u&at),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|it:u&ot||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==dt&&40960==(u&ot);return{name:n,Ht:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Uc(t,e,n){const r=cu(t,n,"encodeText")||We;let i=r(e,Pt);if(i===dt&&(i=We(e)),gu(i)>M)throw new d(Bs);const a=n[xi]||"";if(typeof a!=St)throw new d(Ms);let c=r(a,Zt);if(c===dt&&(c=We(a)),gu(c)>M)throw new d(Os);const u=au(t,n,Zi);if(u!==dt&&u>M)throw new d(Ws);const l=su(t,n,Ci,new s),f=au(t,n,Ti),w=su(t,n,ki),p=su(t,n,_i),h=au(t,n,Ui,0),m=ne(au(t,n,Dt)),y=Boolean(m),g=!0===m;let E=au(t,n,zt),S=au(t,n,Ft);ee(E,S),E=E&&E.length?E:dt,S=S&&S.length?S:dt;const b=uu(t,n,"encryptionStrength",3),R=au(t,n,Vi),x=au(t,n,"extendedTimestamp",!0),z=au(t,n,"ntfsTimestamp"),F=au(t,n,"keepOrder",!0),D=au(t,n,Ct),A=au(t,n,"bufferedWrite"),I=cu(t,n,"createTempStream"),C=au(t,n,"dataDescriptorSignature",!0),T=Qt(au(t,n,At));te(T);const k=au(t,n,_t,!Su(i)||!Su(c)),v=au(t,n,qi),_=y||v===dt?dt:qn(v);if(!y&&v!==dt&&0!==v&&8!==v&&!_)throw new d(Hn);let N=uu(t,n,vt);if(oe(N,9,pc),t.options[Ot]){if(E!==dt||S!==dt)throw new d(Zs);N===dt&&v===dt&&(N=0)}y&&(N=ie(n[vt]));let U=au(t,n,Tt),O=au(t,n,Nt);A&&O===dt&&(O=!1),(O===dt||R&&!g)&&(O=!0),N!==dt&&6!=N&&(U=!1);const L=au(t,n,Wi);if(!(R||E===dt&&S===dt||o.isInteger(b)&&b>=1&&b<=3))throw new d(Ps);const B=Oc(n[Ki]),W=Oc(n.localExtraField),P=Oc(n.centralExtraField);return{comment:a,Ht:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,Gt:y,jt:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:dt,codecURI:_?_.codecURI:dt,Be:_?_.versionNeeded:dt,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,We:W,ye:P}}}function Oc(t){if(!t)return Rt;if(!(t instanceof c))throw new d(Gs);let e=0,n=0;t.forEach((t,n)=>{if(re(n,M,js),!(t instanceof w))throw new d(qs);if(gu(t)>M)throw new d(Ys);e+=4+gu(t)});const r=new w(e),o=Ae(r);return t.forEach((t,e)=>{pu(o,n,e),pu(o,n+2,gu(t)),yu(r,t,n+4),n+=4+gu(t)}),r}function Mc(t,e,n,r,o){const{Gt:i,jt:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Fi],y===dt)throw new d(tc);if(h===dt)throw new d(ec)}const E=!0===w,S=au(t,o,Pi);if(e&&a&&!S&&gu(c,u))throw new d(Vs);const b=e&&(Boolean(c&&gu(c)||u&&gu(u))||a&&S);e||(p=0,h=0);const R=ra(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===dt?lu(y)+R:n+(a?0:R)):n===dt?(f=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(fu(h,p)?lu(y):y)+R));const x=!(b||e&&(0!==n||i)||fu(h,p));x&&au(t,o,Nt)===dt&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Qs);w=!0}return w=w||!1,{Pe:m,Ht:{dataDescriptor:f,Xt:x,zip64:w,pe:E,Ze:g,he:z,me:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function Lc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Bc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,We:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,Gt:S,encrypted:b,he:R,me:x,uncompressedSize:z,Ze:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&fu(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Vc(t);if(e._e(1),e._e(t-4),T=e.ct,v&&(e.Me(z),k)){const t=ra(b,l,y);e.Me(S?0:z+t)}}else T=Rt;let N,U,O,L,W;if(b&&!l){const t=Vc(gu(Sc)+2);t._e($),t.Ne(Sc),N=t.ct,N[8]=y}else N=Rt;if(g){const t=ou(n),e=(P=t)>=Ks&&P<=Xs;if(e){const e=9+(o?4:0)+(i?4:0),n=Vc(e);L=1+(o?2:0)+(i?4:0),W=t,n._e(J),n._e(e-4),n.He(L),n.ve(t),o&&n.ve(iu(ou(o))),i&&n.ve(iu(ou(i))),O=n.ct}else O=Rt;if(E===dt?!e||Boolean(o||i):E)try{const t=ru(n),e=Vc(36);e._e(10),e._e(32),e.Ve(4),e._e(1),e._e(24),e.Me(t),e.Me(o?ru(o):t),e.Me(i?ru(i):t),U=e.ct}catch{U=Rt}else U=Rt}else U=O=Rt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=bc||e===dt&&n===dt)if(r!=Rc||e===dt&&n===dt)Z=H=Rt;else{const t=Vc(8);t._e(et),t._e(4),t._e((e===dt?0:e)&M),t._e((n===dt?0:n)&M),Z=t.ct;const r=Vc(4);r._e(et),r._e(0),H=r.ct}else{const t=Pc(e===dt?0:e),r=Pc(n===dt?0:n),o=3+t.length+r.length,i=Vc(4+o);i._e(tt),i._e(o),i.He(1),i.He(t.length),i.Ne(t),i.He(r.length),i.Ne(r),Z=H=i.ct}}catch{Z=H=Rt}I===dt&&(I=C?8:0),A===dt&&(A=0!=I||p||b?20:10);const{Be:V}=t;C&&V!==dt&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==dt&&(N[4]=1),pu(Ae(N),9,I),I=99);const G=_?gu(T):0,j=G+gu(N,O,U,Z,h,m);if(j+(t[Ot]?67:0)>M)throw new d(Ys);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<ft?ft:q>lt?lt:q,K=gu(O)?new s(1e3*ou(n)):gu(U)?n:Y,{re:X,oe:Q,rawLastModDate:nt}=Eu({version:A,bitFlag:bu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,me:x,he:R,extraFieldLength:j}),rt=Vc(ut+gu(e)+j),ot=rt.ct,it=Ae(ot);return rt.ve(B),rt.Ne(X),rt.Ne(e),_&&rt.Ne(T),rt.Ne(N),rt.Ne(O),rt.Ne(U),rt.Ne(Z),rt.Ne(h),rt.Ne(m),w&&(x||hu(it,18,0),R||hu(it,22,0)),{Yt:ot,Se:it,re:X,oe:Q,lastModDate:K,qt:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ce:L,ue:W,ie:Rt,ae:G,se:O,le:U,fe:Z,de:H,we:N,extraFieldLength:j}}function Wc(t,e){const{$t:n}=t;let{Yt:r,extraFieldLength:o}=n,i=64-(e+gu(r))%64;i<4&&(i+=64);const a=new w(i),s=Ae(a);pu(s,0,Q),pu(s,2,i-4);const c=r;n.Yt=r=new w(gu(c)+i),yu(r,c),yu(r,a,gu(c));const u=Ae(r);pu(u,28,o+i),n.Se=u,t.ne+=i}function Pc(t){const e=new w(4);Ae(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Zc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=Rt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=Ae(o),n&&(i=4,hu(r,0,P))),{Kt:o,ge:r,Ee:i}}function Hc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,we:o,rawComment:i,le:a,de:s,rawExtraField:c,ye:u,ce:l,ue:f,pe:w,uncompressedSize:p,compressedSize:h}=r;let{he:m,me:y}=r;w||(m&&p<O&&(m=r.he=!1),y&&h<O&&(y=r.me=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Vc(t);e._e(1),e._e(t-4),m&&e.Me(p),y&&e.Me(h),g&&e.Me(r.offset),E&&e.ve(r.diskNumberStart),S=e.ct}else S=Rt;if(r.ie=S,r.ke=g,r.Te=E,f===dt)b=Rt;else{const t=Vc(9);t._e(J),t._e(5),t.He(l),t.ve(f),b=t.ct}r.se=b;const R=gu(S,o,a,s,b,c,u);if(R>M)throw new d(Ys);e+=q+gu(t,i)+R}return{Fe:e,De:n}}function Vc(t){const e=new w(t),n=Ae(e);let r=0;return{ct:e,He:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},_e:t=>{pu(n,r,t),r+=2},ve:t=>{hu(n,r,t),r+=4},Me:t=>{mu(n,r,i(t)),r+=8},Ne:t=>{yu(e,t,r),r+=gu(t)},Ve:t=>r+=t}}function Gc(t){const{diskNumber:e=0}=t;return e}function jc(t){const{diskOffset:e=0}=t;return e}function qc(t,e){const{availableSize:n=wt}=t;return e>n}function Yc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Nt:0)}function Kc(t){const e=Ae(t);let n=0;for(;n+4<=gu(t);){const r=4+du(e,n+2);if(1==du(e,n))return Kc(Fe(t.subarray(0,n),t.subarray(a.min(n+r,gu(t)))));n+=r}return t}async function Xc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await nu(Ei(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){if(i){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}}throw e}finally{o.size+=i,t.offset+=i}}}async function $c(t,e){const n=e>=0&&e+ut<=t.size?await gi(t,e,ut):Rt;if(gu(n)<ut)return dt;const r=Ae(n);return wu(r,0)!=B?dt:ut+du(r,26)+du(r,28)}function Jc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Qc(){const t=new w(4);return hu(Ae(t),0,W),t}async function tu(t,e){delete t.kt,await eu(e,Qc()),t.offset+=4}async function eu(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=gu(e),await r.write(e)}finally{r.releaseLock()}}async function nu(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(gu(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function ru(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<$s?$s:e>Js?Js:e}}function ou(t){return a.floor(t.getTime()/1e3)}function iu(t){return a.min(Xs,a.max(Ks,t))}function au(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function su(t,e,n,r){const i=au(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=gt||o.isNaN(i.getTime())))throw new d(Ls);return i}function cu(t,e,n){return Jt(au(t,e,n))}function uu(t,e,n,r){return ie(au(t,e,n,r))}function lu(t){return t+5*(a.floor(t/16383)+1)}function fu(t,e){return t===dt?e===dt||e>0:0!==t}function du(t,e){return t.getUint16(e,!0)}function wu(t,e){return t.getUint32(e,!0)}function pu(t,e,n){t.setUint16(e,n,!0)}function hu(t,e,n){t.setUint32(e,n,!0)}function mu(t,e,n){t.setBigUint64(e,n,!0)}function yu(t,e,n){t.set(e,n)}function gu(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Eu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,me:c,he:u,extraFieldLength:l}){const f=Vc(26),d=f.ct,w=Ae(d);if(f._e(t),f._e(e),f._e(n),a===dt){const t=new h(1),e=Ae(t);pu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),pu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ve(a),f.Ve(4),c||o!==dt?f.ve(c?O:o):f.Ve(4),u||r!==dt?f.ve(u?O:r):f.Ve(4),f._e(gu(s)),f._e(l),{re:d,oe:w,rawLastModDate:a}}function Su(t){return t.every(t=>t>=32&&t<=126)}function bu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Ru(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):ur(t,e)}const xu=1048576,zu=".zip.js-temp",Fu=1048576,Du=1048576,Au=".zip.js-temp",Iu="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=Re(ze(t));n.assign(fe,e),n.assign(ge,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const Cu="Entry filename already exists",Tu="Duplicate entry filename in the imported zip file",ku='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',vu="Entry is an ancestor of target entry",_u="Root directory cannot be moved",Nu="Target entry is not a directory",Uu="Parent entry is not a directory",Ou="Readable stream already consumed",Mu="throw",Lu="keep-first",Bu="keep-last",Wu=new u([Mu,Lu,Bu]),Pu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Zu="Invalid readerOptions (must be an object)",Hu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Vu="Invalid passwords option (must be an array of strings)",Gu="Invalid requestPassword option (must be a function returning a string or undefined)",ju="zipjs-abort-export",qu=new w(0),Yu=new u([tr,$n,Jn]);class Ku{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(Cu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ge++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,je:r.je||r.uncompressedSize===dt,passThrough:r.passThrough,qe:r.qe||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=Al(t);r&&(t=r.pop(),n=Il(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(Cu);n!=e.parent&&(sl(e),e.parent=n,n.children.push(e),Fl(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class Xu extends Ku{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Xu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==Wo?e.type==n:t.constructor!=Oo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=il(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([mi(r),mi(t,o)]);const i=Qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof ea||!o&&!i&&!a?s:Mn(s).pipeThrough(new Lr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!hi(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Mn(a).pipeTo(Bn(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Ie(t)&&t.message==rn)return!1;throw t}}getText(t,e){return this.getData(new Ho(t),e)}getBlob(t,e){return this.getData(new Wo(t),e)}getData64URI(t,e){return this.getData(new Oo(t),e)}getUint8Array(t){return this.getData(new li,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return De(await this.getUint8Array(t)).buffer}replaceBlob(t){yl(this,{data:t,Reader:Bo,Writer:Wo,uncompressedSize:t.size})}replaceText(t){yl(this,{data:t,Reader:Po,Writer:Ho,uncompressedSize:Zo(t)})}replaceData64URI(t){yl(this,{data:t,Reader:Uo,Writer:Oo,uncompressedSize:gl(t)})}replaceUint8Array(t){yl(this,{data:t,Reader:ui,Writer:li,uncompressedSize:t.length})}replaceReadable(t){yl(this,{data:null,Reader:rl(t),Writer:null,uncompressedSize:dt})}}class $u extends Ku{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new $u(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Dl(this,t,{options:e},!0)}addText(t,e,n={}){return Dl(this,t,{data:e,Reader:Po,Writer:Ho,options:n,uncompressedSize:Zo(e)})}addBlob(t,e,n={}){return Dl(this,t,{data:e,Reader:Bo,Writer:Wo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Dl(this,t,{data:e,Reader:Uo,Writer:Oo,options:n,uncompressedSize:gl(e)})}addUint8Array(t,e,n={}){return Dl(this,t,{data:e,Reader:ui,Writer:li,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Dl(this,t,{data:e,Reader:class extends ci{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Dl(this,t,{Reader:rl(e),options:n})}addFileSystemEntry(t,e={}){return bl(this,t,e)}addFileSystemHandle(t,e={}){return bl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Dl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new Bo(t),e)}importData64URI(t,e){return this.importZip(new Uo(t),e)}importUint8Array(t,e){return this.importZip(new ui(t),e)}importHttpContent(t,e){return this.importZip(new ci(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Wo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Oo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new li,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;ml(r.passThrough),dl(r);const s=fl(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!Qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=tl([t],t=>nl(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await Br(o,w),await E(t,e),a&&await Br(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await Br(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!cl(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||cl(u.reason))return;te(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(ju):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(ju));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==gt?(r=t,e=n.assign({},r.options,e)):(await mi(t),r=new Ga(t,e)),ml(e.passThrough),dl(e);const o=function(t){if(t===dt)return Mu;if(Wu.has(t))return t;throw new d(ku)}(e.duplicates),i=[],a={Ye:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==Lu){u=!0;break}if(o!=Bu)throw new d(Tu);this.fs.remove(r),r=new $u(this.fs,t,{data:null},e),i.push(r)}}else r=new $u(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==Lu)continue;if(o!=Bu)throw new d(Tu);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new $u(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==Lu)continue;if(o!=Bu)throw new d(Tu);this.fs.remove(s)}i.push(Dl(r,c,{data:t,Reader:ol(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==gt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await g.all([al(r,fl(e.readerOptions)),o?dt:mi(t)]),a=o?t:new Dc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=tl(e.children,t=>Sl(t)?0:1);let d=0,w=0;if(a&&await Br(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Sl(e))return;const{name:a,Pt:c}=ul(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{d+=t-p,p=t,s&&await Br(s,d,r)}}));w++,u&&await Br(u,w,f,h)}c&&await Br(c,d)}(a,r,tl([r],el),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;fl((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Sl(t)).map(n=>{const{name:r,Pt:o}=ul(n,e,t);return{name:r,size:n.directory?0:ll(n,El(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Sl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(Jt(t[Bt]))throw new d(rc);if(o!==dt&&!(o instanceof w))throw new d(Us);const s=gu(o);if(s>M)throw new d(Ns);const l=t[Ot],f=new c,p=t[Ut]===dt?0:t[Ut];let h=p,m=wt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);au(i,o,Gi)&&!e.endsWith(ct)&&(e+=ct);const s=Nc(i,e,o);({name:e}=s);const{Ht:c}=Uc(i,e,o);0==c.level||c.compressionMethod!==dt||c.Gt||await Nr(Ee())||(c.level=0);const u=!au(i,o,Gi);if(u&&r===dt)throw new d(rc);const{Pe:w,Ht:p}=Mc(i,u,r,c,o);if(u&&!c.Gt&&fu(p.compressionMethod,p.level))throw new d(rc);const E=n.assign({},o,s.Ht,c,p,{[Ot]:l}),S=Bc(E),b=Zc(E),R={$t:S,ne:gu(S.Yt,b.Kt)};l&&Wc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.ne+x;y.push(z),g.add(Boolean(E.pe||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||Lc(y,p,!0)!=Lc(y,p,!1)))&&!r)throw new d(rc);const{Fe:E,De:S}=Hc(f);let b=au(i,t,Wi);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(Qs);b=!0}else b===dt&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class Ju{constructor(){xl(this)}get children(){return this.root.children}remove(t){sl(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new d(_u);if(!e.directory)throw new d(Nu);if(e.isDescendantOf(t))throw new d(vu);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(Cu)}else sl(t),t.parent=e,e.children.push(t),Fl(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return zl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return zl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return zl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return zl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return zl(this,n=>n.importReadable(t,e))}importZip(t,e){return zl(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Qu={FS:Ju,ZipDirectoryEntry:$u,ZipFileEntry:Xu};function tl(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function el(t){return t.uncompressedSize}function nl(t,e){const{data:n}=t;return e&&n instanceof ea?n.compressedSize:t.uncompressedSize}function rl(t){let e;return function(){if(e)throw new d(Ou);return e=!0,{readable:t}}}function ol(t,e){return class extends _o{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){dl(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new Wo,e);const s=new u;let c;for(;;){for(const t of pl(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ke){await r.Ke;continue}let n;r.Ke=new g(t=>n=t);try{const e=await i(t,c);if(e===dt||null===e)break;if(typeof e!=St)throw new d(Gu);const n=await f(hl(e));if(n.done)return n.data;c=n.error}finally{r.Ke=dt,n()}}if(!s.size)throw new d(ca);const l=new d(rn);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(wl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new Wo,i);return function(t,e){const{Ye:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Ie(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return wl(t)||e.zipCrypto&&Ie(t)&&Yu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Xe=new Bo(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function il(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function al(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=il(n.Reader,n.data,e);o.set(n,r);try{await mi(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==dt&&(n.uncompressedSize=r.size,n.je=!1)})),o}function sl(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function cl(t){return Boolean(t)&&t.message==ju}function ul(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof ea){const e=El(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Pt:a,Zt:s}=_c(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.qe},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new d(Pu);return{name:o,Pt:c}}function ll(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.je?dt:nl(t,e)}function fl(t){if(t&&(typeof t!=Et||e.isArray(t)))throw new d(Zu);return t&&(ml(t.passThrough),dl(t)),t}function dl(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=St)))throw new d(Vu);if(r&&typeof r!=gt)throw new d(Gu)}function wl(t){return Ie(t)&&t.message==rn}function pl(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(hl(o)),r.push(...e.Ye),n&&r.push(...n.filter(t=>t).map(hl)),r}function hl(t){return{key:t,options:{password:t,rawPassword:qu}}}function ml(t){if(ne(t)===jt)throw new d(Hu)}function yl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,je:r===dt})}function gl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function El(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Sl(t){return t.directory&&null===t.data}function bl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await Rl(o)),"file"==o.kind){const t=await o.getFile();i.push(Dl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function Rl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Rl(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function xl(t){t.entries=[],t.Ge=0,t.root=new $u(t)}function zl(t,e){const{entries:r,Ge:o,root:i}=t;return xl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ge:o,root:i}),e})}function Fl(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Dl(t,e,n,r){if(t.directory){const o=Al(e);return o&&(e=o.pop(),t=Il(t,o)),r?new $u(t.fs,e,n,t):new Xu(t.fs,e,n,t)}throw new d(Uu)}function Al(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Il(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(Cu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(vu)}else t=new $u(r.fs,e,{data:null},r)}),t}t.BlobReader=Bo,t.BlobWriter=Wo,t.Data64URIReader=Uo,t.Data64URIWriter=Oo,t.ERR_ABORTED=$t,t.ERR_AMBIGUOUS_ARCHIVE=da,t.ERR_ANCESTOR_ENTRY=vu,t.ERR_BAD_FORMAT=oa,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=sa,t.ERR_CODEC_OUT_OF_MEMORY=Qn,t.ERR_DUPLICATED_NAME=_s,t.ERR_DUPLICATE_IMPORTED_ENTRY=Tu,t.ERR_ENCRYPTED=ca,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=wa,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=fa,t.ERR_ENTRY_EXISTS=Cu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=aa,t.ERR_EOCDR_NOT_FOUND=ia,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=mt,t.ERR_HTTP_RANGE=So,t.ERR_HTTP_RESOURCE_CHANGED=bo,t.ERR_HTTP_STATUS=Eo,t.ERR_INVALID_AUTHENTICATION_CODE=on,t.ERR_INVALID_BASE_URI=ce,t.ERR_INVALID_CODEC_DEFINITION=Wn,t.ERR_INVALID_CODEC_MODULE=Zn,t.ERR_INVALID_COMMENT=Ns,t.ERR_INVALID_COMMENT_TYPE=Us,t.ERR_INVALID_COMPRESSED_DATA=Jn,t.ERR_INVALID_CRC32=tr,t.ERR_INVALID_DATE=Ls,t.ERR_INVALID_DUPLICATES=ku,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ps,t.ERR_INVALID_ENTRY=mc,t.ERR_INVALID_ENTRY_COMMENT=Os,t.ERR_INVALID_ENTRY_COMMENT_TYPE=Ms,t.ERR_INVALID_ENTRY_NAME=Bs,t.ERR_INVALID_EXTRAFIELD=Gs,t.ERR_INVALID_EXTRAFIELD_DATA=Ys,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=qs,t.ERR_INVALID_EXTRAFIELD_TYPE=js,t.ERR_INVALID_FILENAME_VALIDATION=ma,t.ERR_INVALID_FUNCTION_OPTION=qt,t.ERR_INVALID_GID=cc,t.ERR_INVALID_LEVEL=pc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=ya,t.ERR_INVALID_MAX_WORKERS=se,t.ERR_INVALID_MSDOS_ATTRIBUTES=dc,t.ERR_INVALID_MSDOS_DATA=wc,t.ERR_INVALID_PASSWORD=rn,t.ERR_INVALID_PASSWORDS=Vu,t.ERR_INVALID_PASSWORD_TYPE=Kt,t.ERR_INVALID_PASS_THROUGH=Pu,t.ERR_INVALID_PASS_THROUGH_VALUE=Xt,t.ERR_INVALID_READER=ic,t.ERR_INVALID_READER_OPTIONS=Zu,t.ERR_INVALID_REQUEST_PASSWORD=Gu,t.ERR_INVALID_SIGNAL=Yt,t.ERR_INVALID_SIGNATURE_DATA=hc,t.ERR_INVALID_STRICTNESS=ha,t.ERR_INVALID_UID=sc,t.ERR_INVALID_UNCOMPRESSED_SIZE=$n,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=lc,t.ERR_INVALID_UNIX_ID_SIZE=fc,t.ERR_INVALID_UNIX_MODE=uc,t.ERR_INVALID_URI=ue,t.ERR_INVALID_VERSION=Ws,t.ERR_ITERATOR_COMPLETED_TOO_SOON=Ro,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=pt,t.ERR_OVERLAPPING_ENTRY=ht,t.ERR_PARENT_NOT_DIRECTORY=Uu,t.ERR_READABLE_CONSUMED=Ou,t.ERR_RESERVED_COMPRESSION_METHOD=Pn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=_u,t.ERR_SPLIT_ZIP_FILE=la,t.ERR_TARGET_NOT_DIRECTORY=Nu,t.ERR_UNDEFINED_COMPRESSION_METHOD=ec,t.ERR_UNDEFINED_CRC32=nc,t.ERR_UNDEFINED_READER=oc,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=tc,t.ERR_UNDETERMINED_SIZE=rc,t.ERR_UNSAFE_FILENAME=pa,t.ERR_UNSUPPORTED_COMPRESSION=Hn,t.ERR_UNSUPPORTED_CONTEXT=Iu,t.ERR_UNSUPPORTED_CRYPTO_API=sn,t.ERR_UNSUPPORTED_ENCRYPTION=ua,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Vs,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Zs,t.ERR_UNSUPPORTED_FORMAT=Qs,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Hu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Hs,t.ERR_UNSUPPORTED_UINT64=ga,t.ERR_WORKER_STARTUP_TIMEOUT=Cr,t.ERR_WRITER_NOT_INITIALIZED=xo,t.ERR_WRITER_SIZE_NOT_WRITABLE=zo,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=yc,t.ERR_ZIP_NOT_EMPTY=ac,t.HttpRangeReader=class extends ci{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ci,t.Reader=_o,t.SplitDataReader=fi,t.SplitDataWriter=di,t.TextReader=Po,t.TextWriter=Ho,t.Uint8ArrayReader=ui,t.Uint8ArrayWriter=li,t.VERSION="2.21.0",t.WARNING_APPENDED_DATA=Fa,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=Ec,t.WARNING_COMPRESSED_PATCHED_DATA=ba,t.WARNING_COMPRESSION_UNAVAILABLE=gc,t.WARNING_DUPLICATE_FILENAME=ka,t.WARNING_MALFORMED_EXTRA_FIELD=Ra,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=Ca,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=Ua,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=Oa,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Ma,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Na,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=va,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=Ta,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=_a,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=Aa,t.WARNING_PREPENDED_DATA=Da,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Ia,t.WARNING_UNKNOWN_VERSION=Sa,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=xa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=Ea,t.WARNING_WRAPPED_ENTRIES_COUNT=za,t.Writer=No,t.ZipDirectoryEntry=$u,t.ZipEntry=Ku,t.ZipFS=Ju,t.ZipFileEntry=Xu,t.ZipReader=Ga,t.ZipReaderStream=ja,t.ZipWriter=Dc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Dc(n,t),this.Ut=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await kc(e,t)}}()}});return vc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return vc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.Ut))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await kc(r,t),t}try{return await r.close(t,n)}catch(t){throw await kc(r,t),t}}},t.configure=function(t){n.assign(ge,Re(ze(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Fu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=Ln(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=xu,directoryName:r=zu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Du,directoryName:r=Au,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(Iu);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=Qu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Yn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=Ee(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Ru(n,er)||Ru(t,er)||Ru(t,rr),decompression:Ru(r,er)||Ru(e,er)||Ru(e,rr),registered:!1},{compressionMethod:9,compression:!1,decompression:Ru(r,nr)||Ru(e,nr),registered:!1}];for(const t of Yn()){const e=Kn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==gt:dt,decompression:e?typeof e.DecompressionStream==gt:dt,registered:!0})}return o},t.isZipFile=qa,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=St||!n.length)throw new d(Wn);if(Vn.includes(e))throw new d(Pn);const c=typeof i==gt||typeof a==gt;if(!(c||typeof r==St&&r.length))throw new d(Wn);Gn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Xn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of ye)delete ge[t];n.assign(ge,fe)},t.terminateWorkers=async function(){await g.allSettled([lo(),...eo.map(t=>(po(t),t.terminate()))]),Tr=dt,kr=!1},t.unregisterCodec=function(t){const e=Gn.get(t);if(e){let n;Gn.delete(t),Gn.forEach(t=>n=n||t.format==e.format),n||jn.delete(e.format)}}});
|