@zip.js/zip.js 2.11.3 → 2.12.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.
Files changed (50) hide show
  1. package/deno.json +1 -1
  2. package/dist/zip-core-external.js +444 -114
  3. package/dist/zip-core-external.min.js +1 -1
  4. package/dist/zip-core.js +454 -111
  5. package/dist/zip-core.min.js +1 -1
  6. package/dist/zip-fs-core-external.js +509 -236
  7. package/dist/zip-fs-core-external.min.js +1 -1
  8. package/dist/zip-fs-core.js +522 -233
  9. package/dist/zip-fs-core.min.js +1 -1
  10. package/dist/zip-fs-external.js +509 -236
  11. package/dist/zip-fs-external.min.js +1 -1
  12. package/dist/zip-fs-native.js +524 -235
  13. package/dist/zip-fs-native.min.js +1 -1
  14. package/dist/zip-fs.js +525 -236
  15. package/dist/zip-fs.min.js +1 -1
  16. package/dist/zip-legacy.js +456 -113
  17. package/dist/zip-legacy.min.js +1 -1
  18. package/dist/zip-native.js +456 -113
  19. package/dist/zip-native.min.js +1 -1
  20. package/dist/zip-web-worker-native.js +1 -1
  21. package/dist/zip-web-worker.js +1 -1
  22. package/dist/zip.js +457 -114
  23. package/dist/zip.min.js +1 -1
  24. package/index-native.cjs +524 -235
  25. package/index-native.min.js +1 -1
  26. package/index.cjs +525 -236
  27. package/index.d.cts +480 -59
  28. package/index.d.ts +480 -59
  29. package/index.min.js +1 -1
  30. package/lib/core/codec-worker-web.js +10 -2
  31. package/lib/core/codec-worker.js +4 -3
  32. package/lib/core/configuration.js +20 -5
  33. package/lib/core/constants.js +2 -0
  34. package/lib/core/io.js +20 -10
  35. package/lib/core/options.js +29 -0
  36. package/lib/core/streams/codec-stream.js +6 -0
  37. package/lib/core/util/warnings.js +42 -0
  38. package/lib/core/version.js +1 -1
  39. package/lib/core/web-worker-base.js +4 -3
  40. package/lib/core/web-worker-inline-native.js +1 -1
  41. package/lib/core/web-worker-inline-wasm.js +1 -1
  42. package/lib/core/zip-entry.js +49 -1
  43. package/lib/core/zip-fs.js +43 -134
  44. package/lib/core/zip-reader.js +108 -47
  45. package/lib/core/zip-writer.js +238 -54
  46. package/lib/zip-core-base.js +9 -3
  47. package/lib/zip-core-reader.js +2 -0
  48. package/lib/zip-core-writer.js +6 -1
  49. package/lib/zip-module-wasm-base.js +2 -2
  50. package/package.json +5 -3
@@ -1 +1 @@
1
- const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,D="/",x=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),T=void 0,U=1/0,I="undefined",k="function",C="object",M="string",v=new Uint8Array,N="password",_="rawPassword",B="passThrough",j="signal",P="useWebWorkers",L="useCompressionStream",W="transferStreams",Z="preventClose",V="dataDescriptor",H="offset",G="usdz",K="maxAppendedDataSize",q="signCentralDirectory",Y="filename",X="comment",J="strict",Q="balanced",$="tolerant",tt="Invalid option (must be a function)",et="Invalid signal (must be an AbortSignal instance)",rt="Invalid password (password must be a string, rawPassword must be a Uint8Array)";function nt(t){if(t&&typeof t!=k)throw new Error(tt);return t}function ot(t){if(t&&(typeof t.addEventListener!=k||"boolean"!=typeof t.aborted))throw new Error(et);return t||T}function at(t,e){if(t&&typeof t!=M||e&&!(e instanceof Uint8Array))throw new Error(rt)}function it(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function st(t,e,r){t!==T&&it(t,e,r)}function ct(t){return typeof t==M&&t.trim()?Number(t):t}const ut="Invalid maxWorkers (must be an integer greater than 0)";let lt=2;try{typeof navigator!=I&&navigator.hardwareConcurrency&&(lt=navigator.hardwareConcurrency)}catch{}const ft={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:lt,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=I&&CompressionStream,DecompressionStream:typeof DecompressionStream!=I&&DecompressionStream},dt="maxWorkers",wt=["chunkSize",dt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],pt=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],ht=["baseURI","wasmURI","workerURI","useCompressionStream","useWebWorkers","transferStreams",...wt,...pt],mt={...ft};function yt(){return mt}function bt(t){return Et(t.chunkSize)}function Et(t){return t=ct(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function St(t){Object.assign(mt,gt(Rt(t)))}function gt(t){const e={};for(const r of ht){const n=t[r];n!==T&&(e[r]=At(r,n))}return e}function At(t,e){if(wt.includes(t)){if(e=ct(e),t==dt&&(!Number.isInteger(e)||e<1))throw new Error(ut)}else pt.includes(t)&&nt(e);return e}function Rt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===T&&r===T)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===T&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===T&&(n.DecompressionStreamFallback=r),n}function zt(t){const e=gt(Rt(t));Object.assign(ft,e),Object.assign(mt,e)}function Dt(){for(const t of ht)delete mt[t];Object.assign(mt,ft)}function xt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Ft(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Ot(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Tt=[[],[],[],[],[],[],[],[]];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;Tt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Tt[e-1][t];Tt[e][t]=r>>>8^Tt[0][255&r]}const[Ut,It,kt,Ct,Mt,vt,Nt,_t]=Tt;class Bt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=_t[255&t]^Nt[t>>>8&255]^vt[t>>>16&255]^Mt[t>>>24&255]^Ct[255&r]^kt[r>>>8&255]^It[r>>>16&255]^Ut[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ut[255&(e^t[n])];this.o=e}get(){return~this.o}}class jt extends TransformStream{constructor(){let t;const e=new Bt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function Pt(t){if(typeof TextEncoder==I){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const Lt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=Lt.l(r);return 32===n?t.concat(e):Lt.h(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+Lt.l(r)},m(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Lt.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,h(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=Lt.l(o);return n.push(Lt.S(e+a&31,e+a>32?r:n.pop(),1)),n}},Wt={bytes:{A(t){const e=Lt.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(Lt.S(8*(3&r),n)),e}}},Zt=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.O=t.O.slice(0),e.T=t.T.slice(0),e.U=t.U):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.T=[],t.U=0,t}update(t){const e=this;"string"==typeof t&&(t=Wt.I.R(t));const r=e.T=Lt.concat(e.T,t),n=e.U,o=e.U=n+Lt.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}M(){const t=this;let e=t.T;const r=t.O;e=Lt.concat(e,[Lt.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.U/4294967296)),e.push(0|t.U);e.length;)t.C(e.splice(0,16));return t.reset(),r}v(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}N(t,e){return e<<t|e>>>32-t}C(t){const e=this,r=e.O,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e.N(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e.N(5,o)+e.v(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e.N(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},Vt={importKey:t=>new Vt._(Wt.bytes.R(t)),B(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=Lt;for(e=Wt.bytes.R(e),u=1;d<(o||1);u++){for(a=i=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;d<(o||1)&&s<a.length;s++)f.setInt32(d,a[s]),d+=4}return l.slice(0,n/8)},_:class{constructor(t){const e=this,r=e.j=Zt,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).M());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e.P[0].update(n[0]),e.P[1].update(n[1]),e.L=new r(e.P[0])}reset(){const t=this;t.L=new t.j(t.P[0]),t.W=!1}update(t){this.W=!0,this.L.update(t)}digest(){const t=this,e=t.L.M(),r=new t.j(t.P[1]).update(e).M();return t.reset(),r}encrypt(t){if(this.W)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Ht=typeof crypto!=I&&typeof crypto.getRandomValues==k,Gt="Invalid password",Kt="Invalid authentication code",qt="zipjs-abort-check-password",Yt="Crypto API not supported";function Xt(t){if(Ht)return crypto.getRandomValues(t);throw new Error(Yt)}const Jt=16,Qt={name:"PBKDF2"},$t=Object.assign({hash:{name:"HMAC"}},Qt),te=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},Qt),ee=["deriveBits"],re=[8,12,16],ne=[16,24,32],oe=10,ae=[0,0,0,0],ie=typeof crypto!=I,se=ie&&crypto.subtle,ce=ie&&typeof se!=I,ue=Wt.bytes,le=class{constructor(t){const e=this;e.Z=[[[],[],[],[],[]],[[],[],[],[],[]]],e.Z[0][0][0]||e.V();const r=e.Z[0][4],n=e.Z[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}V(){const t=this.Z[0],e=this.Z[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,u;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=i=0;!r[l];l^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[l]=a,n[a]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.Z[e],i=a[0],s=a[1],c=a[2],u=a[3],l=a[4];let f,d,w,p=t[0]^r[0],h=t[e?3:1]^r[1],m=t[2]^r[2],y=t[e?1:3]^r[3],b=4;for(let t=0;t<n;t++)f=i[p>>>24]^s[h>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=i[h>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&p]^r[b+1],w=i[m>>>24]^s[y>>16&255]^c[p>>8&255]^u[255&h]^r[b+2],y=i[y>>>24]^s[p>>16&255]^c[h>>8&255]^u[255&m]^r[b+3],b+=4,p=f,h=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[p>>>24]<<24^l[h>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=p,p=h,h=m,m=y,y=f;return o}},fe=class{constructor(t,e){this.G=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.G,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=Lt.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return Lt.m(e,o)}},de=Vt._;let we=ie&&ce&&typeof se.importKey==k,pe=ie&&ce&&typeof se.deriveBits==k;class he extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){ye(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await Ee(t,e,r,ge(n,0,re[e])),a=ge(n,re[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(Gt)}(r,a,o,ge(t,0,re[a]+2)),t=ge(t,re[a]+2),n?e.error(new Error(qt)):i()):await s;const c=new Uint8Array(t.length-oe-(t.length-oe)%Jt);e.enqueue(be(r,t,c,0,oe,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=ge(n,0,n.length-oe),s=ge(n,n.length-oe);let c=v;if(i.length){const t=Re(ue,i);r.update(t);const n=e.update(t);c=Ae(ue,n)}const u=ge(Ae(ue,r.digest()),0,oe);let l=n.length<oe?1:0;for(let t=0;t<oe;t++)l|=u[t]^s[t];if(l&&o)throw new Error(Kt);t.enqueue(c)}}})}}class me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){ye(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=v;n?(s=await async function(t,e,r){const n=Xt(new Uint8Array(re[e]));return xt(n,await Ee(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%Jt);c.set(s,0),e.enqueue(be(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=v;if(n.length){const t=e.update(Re(ue,n));r.update(t),a=Ae(ue,t)}const i=Ae(ue,r.digest()).slice(0,oe);t.enqueue(xt(a,i))}}})}}function ye(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:Se(e,r),strength:n-1,it:v})}function be(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=xt(c,e));const u=e.length-o;let l;for(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+(u-u%Jt)),l=0;l<=u-Jt;l+=Jt){const t=Re(ue,ge(e,l,l+Jt));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(Ae(ue,o),l+n)}return t.it=ge(e,l),r}async function Ee(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!we)return Vt.importKey(e);try{return await se.importKey("raw",e,r,!1,o)}catch{return we=!1,Vt.importKey(e)}}(0,r,$t,0,ee),a=await async function(t,e,r){if(!pe)return Vt.B(e,t.salt,te.iterations,r);try{return await se.deriveBits(t,e,r)}catch{return pe=!1,Vt.B(e,t.salt,te.iterations,r)}}(Object.assign({salt:n},te),o,8*(2*ne[e]+2)),i=new Uint8Array(a),s=Re(ue,ge(i,0,ne[e])),c=Re(ue,ge(i,ne[e],2*ne[e])),u=ge(i,2*ne[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new fe(new le(s),Array.from(ae)),ot:new de(c)}),u}function Se(t,e){return e===T?Pt(t):e}function ge(t,e,r){return t.subarray(e,r)}function Ae(t,e){return t.A(e)}function Re(t,e){return t.R(e)}class ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){xe(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Fe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Gt);t=t.subarray(12)}n?e.error(new Error(qt)):e.enqueue(Fe(r,t))}})}}class De extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){xe(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Xt(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Oe(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Oe(r,t),o),e.enqueue(n)}})}}function xe(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{keys:n,ct:new Bt(n[0]),ut:new Bt(n[2])}),r)for(let e=0;e<r.length;e++)Te(t,r[e]);else for(let r=0;r<e.length;r++)Te(t,e.charCodeAt(r))}(t,e,r)}function Fe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ue(t)^e[n],Te(t,r[n]);return r}function Oe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ue(t)^e[n],Te(t,e[n]);return r}function Te(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=ke(Math.imul(ke(r+Ie(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function Ue(t){const e=2|t.keys[2];return Ie(Math.imul(e,1^e)>>>8)}function Ie(t){return 255&t}function ke(t){return 4294967295&t}function Ce(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Me(t,e){t=Ce(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=k||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function ve(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Ne="Invalid codec definition",_e="Reserved compression method",Be="Invalid codec module",je="Compression method not supported",Pe=[0,8,9,99],Le=new Map,We=new Map;function Ze(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=M||!n.length)throw new Error(Ne);if(Pe.includes(r))throw new Error(_e);const c=typeof a==k||typeof i==k;if(!(c||typeof o==M&&o.length))throw new Error(Ne);Le.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&qe(n,{CompressionStream:a,DecompressionStream:i})}function Ve(t){const e=Le.get(t);if(e){let r;Le.delete(t),Le.forEach(t=>r=r||t.format==e.format),r||We.delete(e.format)}}function He(t){return Le.get(t)}function Ge(){return Array.from(Le.values(),t=>Object.assign({},t,We.get(t.format)))}function Ke(t){return We.get(t)}function qe(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(Be);We.set(t,{CompressionStream:r,DecompressionStream:n})}const Ye="Invalid uncompressed size",Xe="Invalid compressed data",Je="Invalid CRC32",Qe="deflate-raw",$e="deflate64-raw",tr="gzip",er=[31,139,8];class rr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&Ke(f),S=c&&o&&!l&&!E&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||S||(h=new jt,b=fr(b,h)),o)if(E)b=dr(b,ur(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(S)y=new nr,b=dr(b,new n(tr)),b=fr(b,y);else try{b=lr(b,i,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(tr)}catch{throw t}b=dr(b,e),b=fr(b,new nr)}a&&(s?b=fr(b,new De(t)):(m=new me(t),b=fr(b,m))),cr(p,b,()=>{a&&!s||!c||(p.crc32=S?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class nr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=xt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(xt(r.subarray(0,i),t.subarray(0,a-i))),r=xt(r.subarray(i),t.subarray(a-i))},flush(){const e=Ot(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class or extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y=super.readable;if(a&&(o?y=fr(y,new ze(t)):(m=new he(t),y=fr(y,m))),c){const t=f&&Ke(f);if(t)y=dr(y,ur(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{y=lr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===T)throw t;let e;try{e=new n(tr)}catch{throw t}y=function(t,e,r){const n=new Bt;let o,a,i,s=0,c=!1;const u=new Promise((t,e)=>{a=t,i=e});u.catch(()=>{}),r||a();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(er),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Ot(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&d(),e.enqueue(t)},cancel(t){i(t)}});return t=fr(t,l),fr(t=dr(t,e),f);function d(){w(),o=setTimeout(()=>i(new Error(Ye)),5e3)}function w(){clearTimeout(o)}}(y,e,p)}y=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(Xe);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(h=new jt,y=fr(y,h)),cr(this,y,()=>{if(i){const t=new DataView(h.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(Je)}})}}const ar=new Map;function ir(t,e){if(!t)return!1;let r=ar.get(t);r||(r=new Map,ar.set(t,r));let n=r.get(e);if(n===T){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function sr(t){return ir(t,Qe)}function cr(t,e,r){e=fr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function ur(t,e,r){if(!t)throw new Error(je);return new t(e,r)}function lr(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?$e:Qe;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return dr(t,s)}function fr(t,e){return Ce(t).pipeThrough(e)}function dr(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const wr="data",pr="deflate",hr="inflate";class mr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(pr)?o=rr:n.startsWith(hr)&&(o=or),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==T&&r.outputSize>t.outputSize))throw new Error(Ye)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class yr extends TransformStream{constructor(t){const e=[];let r=0;function n(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(o,a){for(e.push(o),r+=o.length;r>t;)a.enqueue(n())},flush(t){r&&t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r))}})}}const br="Worker startup timeout";let Er,Sr,gr,Ar=()=>{};async function Rr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(sr(e)||ir(e,tr))return!0;if(r)try{return await Ar(t),!0}catch{return!1}return!1}function zr(t){t.createWorker?Sr=!0:Er=!1}class Dr{constructor(t,{readable:e,writable:r},{options:n,config:o,ft:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:u},l){const{signal:f}=a;return Sr&&(u=T),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new yr(bt(o))).pipeThrough(new xr(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:u,transferStreams:s,terminate:()=>new Promise(e=>{const{yt:r,wt:n}=t;r?(n?t.bt=e:(r.terminate(),e()),t.Et=null):e()}),St(){if(t.wt){const{bt:e}=t;e&&(t.bt=null,t.gt=!0,t.yt.terminate(),e()),t.wt=!1,l(t)}}}),Er===T&&(Er=typeof Worker!=I),(i&&gr&&(Er&&c||u)?gr:Or)(t,o)}}class xr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Fr(t,r)},async transform(t,n){o+=t.length,e&&await Fr(e,o,r),n.enqueue(t)},async flush(){n&&await Fr(n,o)}})}}async function Fr(t,...e){try{await t(...e)}catch{}}function Or(t,e){return{run:()=>Tr(t,e)}}async function Tr({options:t,readable:e,writable:r,St:n},o){let a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(pr),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!sr(n))try{await Ar(o)}catch{}}else try{await Ar(o)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new mr(t,o),await e.pipeThrough(a).pipeThrough(new yr(bt(o))).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:i,outputSize:s}=a;return{crc32:n,inputSize:i,outputSize:s}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{n()}}const Ur={type:"module"},Ir="error";let kr,Cr,Mr,vr=!0;try{vr=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==T}catch{}var Nr;function _r(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Br(t){const{yt:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function jr(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(Cr===T||kr!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===T&&(n=!1),n&&(c=Ur);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return jr(t,e,r,n,!1);if(n)throw o;return jr(t,e,r,!0,!1)}}else{n===T&&(n=!0),n&&(c=Ur);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return jr(t,e,r,!1,o);throw a}}kr=t,Cr=s,Mr=c}else i=new Worker(Cr,Mr);return i.addEventListener("message",t=>{r.At=!0,Pr(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,Rt:u,zt:l,St:f,ht:d}=e,w=()=>e.ht!=d;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),p(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();w()||Wr({type:wr,value:t,done:r,messageId:o},e)}r==wr&&(await c.ready,await c.write(new Uint8Array(n)),w()||Wr({type:"ack",messageId:o},e)),"close"==r&&p(null,a)}}catch(i){w()||(Br(e),p(i))}function p(t,e){w()||(t?l(t):u(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(Ir,t=>Lr(t,r)),i.addEventListener("messageerror",t=>Lr(t,r)),i}function Pr(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function Lr(t,e){t.preventDefault&&t.preventDefault(),Pr(e);const{At:r,zt:n,writer:o,St:a}=e;Br(e),r||(e.yt=null);let i=t.error||new Error(t.message||Ir);r||(i=Object.assign(new Error(i.message||Ir),{xt:!0}),e.Ft=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Wr(t,{yt:e,writer:r,transferStreams:n,At:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Ft(r),s.push(t.value.buffer)),n&&vr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{vr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Nr=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==k&&(a=a());try{i=jr(t.workerURI,r,t)}catch{return zr(t),Or(t,e)}Object.assign(t,{yt:i,At:!1,gt:!1,Ft:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.yt){const{Ft:e}=t;t.Ft=null;const r=e||new Error(br);throw r.xt=!0,r}let r,n;const o=new Promise((t,e)=>{r=t,n=e});Object.assign(t,{reader:null,writer:null,Rt:r,zt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Ot:u}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Ot:()=>e.abort()}}(t.writable);let l;try{l=Wr({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.St(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.At&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.At)return;const{zt:e,writer:r}=t;if(Br(t),t.yt=null,e){const t=new Error(br);t.xt=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(t){await d(),u();try{await c}catch{}throw t}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.xt)return zr(t),_r(t),Tr(t,e);if(r&&r.codecImportFailed){if(t.reader)return _r(t),Tr(t,e);t.St()}throw r}}}})}return t.Et},gr=Nr;let Zr=[];const Vr=[];let Hr,Gr,Kr=0;async function qr(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!We.has(t)&&e&&qe(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===T&&n.transferStreams);const m=!(s||c||u||l),y=f===T||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(a||a===T&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:T,e.createWorker=e.useWebWorkers&&p?p:T,r.useCompressionStream=i||i===T&&n.useCompressionStream,(await async function(){const r=Zr.find(t=>!t.wt);if(r)return $r(r),new Dr(r,t,e,b);if(Zr.length<h){const r={Tt:Kr};return Kr++,Zr.push(r),new Dr(r,t,e,b)}return new Promise(r=>{Vr.push({resolve:r,stream:t,Ut:e}),Gr=n.workerStarvationTimeout,Yr()})}()).run();function b(t){if(Xr(),Vr.length){const[{resolve:e,stream:r,Ut:n}]=Vr.splice(0,1);e(new Dr(t,r,n,b)),Yr()}else t.yt?($r(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.gt?t.gt=!1:t.It=setTimeout(async()=>{Zr=Zr.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):Zr=Zr.filter(e=>e!=t)}}function Yr(){!Hr&&Vr.length&&Number.isFinite(Gr)&&Gr>=0&&(Hr=setTimeout(Jr,Gr))}function Xr(){Hr&&(clearTimeout(Hr),Hr=null)}function Jr(){if(Hr=null,Vr.length){const[{resolve:t,stream:e,Ut:r}]=Vr.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:T,createWorker:T});t(new Dr({},e,n,Qr)),Yr()}}function Qr(){Xr(),Yr()}function $r(t){const{It:e}=t;e&&(clearTimeout(e),t.It=null)}const tn="\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 en(t,e){return rn(t,e,!0)}function rn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=tn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const nn="HTTP error ",on="HTTP Range not supported",an="HTTP resource changed",sn="Writer iterator completed too soon",cn="Writer not initialized",un="Content-Range",ln="Range",fn="GET",dn="bytes",wn=16777216,pn="writable",hn=Symbol();class mn{constructor(){this.size=0}init(){this.initialized=!0}}class yn extends mn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=bt(yt())}={}){const n=this;let o=0;return r=Et(r),new ReadableStream({async pull(a){const i=e===T?r:Math.min(r,e-o),s=await ro(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==T&&o>=e||!s.length&&i)&&a.close()}})}}class bn extends mn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(cn);return t.writeUint8Array(Ft(e))}});Object.defineProperty(t,pn,{get:()=>e})}writeUint8Array(){}}class En extends yn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{kt:t,Ct:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Ct:r,kt:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Sn extends bn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Mt:""})}writeUint8Array(t){const e=this;let r,n=e.Mt;const o=e.Mt.length;for(e.Mt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Mt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Mt=n+e.Mt}getData(){return this.data+btoa(this.Mt)}}let gn,An;class Rn extends yn{constructor(t){super(),Object.assign(this,{vt:t,size:t.size}),An||(An=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();gn=1==e}catch{gn=!1}})())}createReadable(t){const{vt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};return!n&&o>=r?Ce(e.stream()):gn?Ce(e.slice(n,n+o).stream()):super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.vt:r.vt.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class zn extends mn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,pn,{get:()=>r.writable}),e.contentType=t,e.Nt=Me(r.readable,t),e.Nt.catch(()=>{})}getData(){return this.Nt}}class Dn extends Rn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function xn(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class Fn extends zn{constructor(t){super(),Object.assign(this,{encoding:t,_t:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,_t:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return rn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class On extends yn{constructor(t,e){super(),Un(this,t,e)}async init(){await In(this,Zn,jn),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==T){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(on);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=T,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await Zn(fn,t,_n(t,o,e));if(206!=r.status)throw new Error(on);const s=r.headers.get(un);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(on)}Nn(t,r),vn(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return kn(this,t,e,Zn,jn)}}class Tn extends yn{constructor(t,e){super(),Un(this,t,e)}async init(){await In(this,Vn,Pn),super.init()}readUint8Array(t,e){return kn(this,t,e,Vn,Pn)}}function Un(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=wn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function In(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=yt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==I||o)){const n=await e(fn,t,_n(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==dn))throw new Error(on);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.Bt=e)}vn(t,n);const o=Cn(n);o===T?await Wn(t,e,r):t.size=o}}else await Wn(t,e,r)}async function kn(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,Bt:s,size:c,options:u}=t;if(a||i){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return v;{e+r>c&&(r=c-e);const o=await n(fn,t,_n(t,e,r));if(206!=o.status)throw new Error(on);const a=o.headers.get(un);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(on)}Nn(t,o),vn(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(on);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function Cn(t){const e=t.headers.get(un);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Mn({headers:t}){return{jt:t.get("Etag")||T,lastModified:t.get("Last-Modified")||T}}function vn(t,e){const{checkResourceChanges:r,Pt:n}=t;r&&!n&&206==e.status&&(t.Pt=Mn(e))}function Nn(t,e){const{checkResourceChanges:r,Pt:n,size:o}=t;if(r){const t=Cn(e);if(t!==T&&o!==T&&t!=o)throw new Error(an);if(n){const t=Mn(e);if(Object.entries(n).some(([e,r])=>r!==T&&t[e]!==T&&r!=t[e]))throw new Error(an)}}}function _n(t,e=0,r=1){return Object.assign({},Bn(t),{[ln]:dn+"="+(e<0?e:e+"-"+(e+r-1))})}function Bn({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function jn(t){await Ln(t,Zn)}async function Pn(t){await Ln(t,Vn)}async function Ln(t,e){const r=await e(fn,t,Bn(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Wn(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,Bn(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function Zn(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status<400)return a;throw 416==a.status?new Error(on):new Error(nn+(a.statusText||a.status))}function Vn(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status<400){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(on):new Error(nn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Hn extends yn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Tn(t,e):new On(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 Gn extends Hn{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Kn extends yn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Lt:t,size:t.length})}readUint8Array(t,e){return this.Lt.slice(t,t+e)}}class qn extends bn{constructor(t){super(),this.Wt=t||262144}init(t=0){Object.assign(this,{offset:0,Lt:new Uint8Array(t>0?t:this.Wt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Lt.length){let t=e.Lt.length?2*e.Lt.length:e.Wt;for(;t<r;)t*=2;const n=e.Lt;e.Lt=new Uint8Array(t),e.Lt.set(n)}e.Lt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Lt.length?this.Lt:this.Lt.slice(0,this.offset)}}class Yn extends yn{constructor(t){super(),this.Zt=t}async init(){const t=this;t.Vt=0;const e=t.Zt=await Promise.all(t.Zt.map(eo));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Gt(t){const{Ht:e,size:r}=this,n=e[t];return n===T?r:n}async readUint8Array(t,e){const r=this,{Zt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await ro(s,i,e);else{const a=n-i;o=xt(await ro(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=v;return r.Vt=Math.max(a,r.Vt),o}}class Xn extends mn{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===hn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(sn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await to(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,pn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(hn)}finally{t.releaseLock()}}}class Jn{constructor(t){return Array.isArray(t)&&(t=new Yn(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Ce(t)}),t}}class Qn{constructor(t){return t.writable===T&&typeof t.next==k&&(t=new Xn(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:ve(t)}),t.size===T&&(t.size=0),t}}function $n(t){return Boolean(t&&t.getData)}async function to(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function eo(t){return t=new Jn(t),await to(t),t.size!==T&&t.readUint8Array||(t=new Rn(await Me(t.readable)),await to(t)),t}function ro(t,e,r){return t.readUint8Array(e,r)}function no(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?yn.prototype.createReadable.call(t,e):t.readable}const oo="filename",ao="rawFilename",io="comment",so="rawComment",co="uncompressedSize",uo="compressedSize",lo="offset",fo="diskNumberStart",wo="lastModDate",po="rawLastModDate",ho="lastAccessDate",mo="rawLastAccessDate",yo="creationDate",bo="rawCreationDate",Eo="internalFileAttributes",So="externalFileAttributes",go="msdosAttributesRaw",Ao="msdosAttributes",Ro="msDosCompatible",zo="zip64",Do="encrypted",xo="version",Fo="versionMadeBy",Oo="zipCrypto",To="directory",Uo="executable",Io="compressionMethod",ko="signature",Co="extraField",Mo="unixMode",vo="setuid",No="setgid",_o="sticky",Bo=[oo,ao,co,uo,wo,po,io,so,ho,mo,yo,bo,lo,fo,Eo,So,go,Ao,Ro,zo,Do,xo,Fo,Oo,To,Uo,"symlink",Io,ko,"crc32",Co,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Mo,"unixExternalUpper",vo,No,_o,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class jo{constructor(t){Bo.forEach(e=>this[e]=t[e])}}const Po="File format is not recognized",Lo="End of central directory not found",Wo="End of Zip64 central directory locator not found",Zo="Central directory header not found",Vo="Local file header not found",Ho="Zip64 extra field not found",Go="File contains encrypted entry",Ko="Encryption method not supported",qo="Split zip file",Yo="Overlapping entry found",Xo="Entry data out of bounds",Jo="Ambiguous archive",Qo="Encrypted central directory is not supported",$o="Unsafe filename",ta="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ea="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",ra="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",na="64-bit value exceeds Number.MAX_SAFE_INTEGER",oa="unsorted central directory",aa="unknown version needed to extract",ia="compressed patched data",sa="malformed extra field",ca="unknown zip64 extensible data",ua="wrapped entries count",la="appended data",fa="prepended data",da="prepended central directory",wa="trailing central directory data",pa="duplicate filename",ha="mismatched zip64 end of central directory record",ma="mismatched local file header (general purpose bit flag)",ya="mismatched local file header (compression method)",ba="mismatched local file header (crc32 or sizes)",Ea=/^[a-zA-Z]:/,Sa="utf-8",ga="cp437",Aa=[[co,t],[uo,t],[lo,t],[fo,e]],Ra={[e]:{Kt:ii,bytes:4},[t]:{Kt:si,bytes:8}},za=BigInt(Number.MAX_SAFE_INTEGER);class Da{constructor(t,e={}){Object.assign(this,{reader:new Jn(t),options:e,qt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await to(i),i.size!==T&&i.readUint8Array||(i=new Rn(await Me(i.readable)),await to(i)),i.size<d)throw new Error(Po);const c=a.warnings=[],h=Wa(n,a.options),m=h==J,y=h!=$,b=Ha(ti(a,n,K),h),E=function(t,e){if(t===T)return e;if(!La(t))throw new Error(ea);return t}(ti(a,n,"filenameValidation"),h),S=ti(a,n,"normalizeFilename"),{Yt:x,Xt:F}=await Ga(i,y,b);if(!x)throw await async function(t){return await Pa(t)==o}(i)?new Error(qo):new Error(Lo);y&&F>1&&$a("multiple end of central directory records");const O=Ot(x);let U=ii(O,12),I=ii(O,16);const k=x.offset,C=ai(O,20),M=k+d+C,N=i.size-M;N>b&&$a(la),N>0&&Qa(c,la);let _=ai(O,4);const B=i.Vt||0;let j,P,L,W,Z,V=ai(O,6),H=ai(O,10),G=0,q=p;const Q=I==t||U==t||H==e||V==e;if(I!=t&&V!=e&&(I+=ja(i,V)),Q){const r=x.offset>=w?await ro(i,x.offset-w,w):v,n=Ot(r);if(r.length==w&&ii(n,0)==l){I=ja(i,ii(n,4))+si(n,8);let r=await ro(i,I,p),o=Ot(r);const a=x.offset-w-p;if((r.length<p||ii(o,0)!=u)&&I!=a&&a>=0){const t=I;I=a,I>t&&(G=I-t),r=await ro(i,I,p),o=Ot(r)}if(r.length<p||ii(o,0)!=u)throw new Error(Wo);if(L=!0,W=si(o,4)>44,W){const t=Math.min(si(o,4)-44,i.size-I-p);t>0&&(q+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ot(t),n=ai(r,26);Object.assign(e,{compressionMethod:ai(r,0),compressedSize:si(r,2),uncompressedSize:si(r,10),encryptionAlgorithm:ai(r,18),bitLength:ai(r,20),flags:ai(r,22),hashAlgorithm:ai(r,24),hashData:t.subarray(28,28+n)})}return e}(await ro(i,I+p,t)))}_==e?_=ii(o,16):_!=ii(o,16)&&Ja(m,c,ha),V==e?V=ii(o,20):V!=ii(o,20)&&Ja(m,c,ha),H==e?H=si(o,32):H!=si(o,32)&&Ja(m,c,ha),U==t?U=si(o,40):U!=si(o,40)&&Ja(m,c,ha),I=ja(i,V)+si(o,48)+G}}let tt=U;const et=x.offset-(L?q+w:0);if(I>=i.size&&(G=i.size-I-U-d,I=i.size-U-d),B!=_)throw new Error(qo);if(I<0)throw new Error(Po);let rt=0,nt=await ro(i,I,U),ot=Ot(nt);if(U){if(nt.length<4)throw new Error(Po);const t=et-U;if(I!=t&&V==_){const e=ii(ot,rt)==s||Boolean(Z&&Z.compressedSize)||Ta(ot);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=ii(Ot(await ro(i,t,4)),0)==s),r){const r=I;I=t,I>r&&(G+=I-r,j=e),nt=await ro(i,I,U),ot=Ot(nt)}}}const at=et-I;if(U!=at&&at>=0&&V==_&&(U=at,nt=await ro(i,I,U),ot=Ot(nt)),I<0||I>=i.size)throw new Error(Po);a.directoryOffset=I,a.directoryLength=tt;const it=ei(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&nt.length>=4&&ii(ot,0)!=s&&(W||Ta(ot))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,tt,nt.length);ct=nt.subarray(t),nt=await it(nt.subarray(0,t),Z),ot=Ot(nt),tt=nt.length,st=!0}Z&&!st&&(nt.length<4||ii(ot,0)==s)&&Qa(c,ca),P=I;const ut=ti(a,n,"filenameEncoding"),lt=ti(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=Ua(ot,nt,rt),H&&Qa(c,ua));for(let t=0;t<H;t++){const o=new Oa(i,a.options);if(rt+f>nt.length||ii(ot,rt)!=s){if(0==t&&!st&&(W||Ta(ot)))throw new Error(Qo);throw new Error(Zo)}ka(o,ot,rt+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=rt+f,d=l+o.filenameLength,w=d+o.extraFieldLength,p=ai(ot,rt+4),h=!(p>>8),m=p>>8==3,y=nt.subarray(l,d),b=ai(ot,rt+32),x=w+b,F=nt.subarray(w,x),O=u,U=u,I=ii(ot,rt+38),k=I&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},M=ii(ot,rt+42),v=ei(a,n,"decodeText")||en,N=O?Sa:ut||ga,_=U?Sa:lt||ga;let B=v(y,N,Y);if(B===T&&(B=en(y,N)),S){const t=S(B);t!==T&&(B=t)}if(Va(B,E)){const t=new Error($o);throw t.filename=B,t}let j=v(F,_,X);j===T&&(j=en(F,_)),Object.assign(o,{index:t,Jt:st,versionMadeBy:p,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:b,offset:M,diskNumberStart:ai(ot,rt+34),internalFileAttributes:ai(ot,rt+36),externalFileAttributes:I,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:y,filenameUTF8:O,commentUTF8:U,rawExtraField:nt.subarray(d,w),rawComment:F,filename:B,comment:j}),Ca(o,o,ot,rt+6)&&Qa(c,sa,B),o.offset+=G;const L=ja(i,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&Qa(c,oa,B),wt=L,(o.version&r)>63&&Qa(c,aa,B),32&~o.rawBitFlag||Qa(c,ia,B),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===T&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),K=Boolean(o.unixMode&z),q=Boolean(512&o.unixMode),J=40960==((o.unixMode===T?Z:o.unixMode)&g),Q=!J&&(o.unixMode!==T?!!(73&o.unixMode):m&&!!(73&Z)),$=o.unixMode!==T&&(o.unixMode&g)==A,tt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:K,sticky:q,symlink:J,unixExternalUpper:Z,executable:Q,directory:$||tt||h&&C.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const et=new jo(o);if(et.getData=(t,e)=>o.getData(t,et,a.qt,e),et.arrayBuffer=async t=>{const e=new TransformStream,r=Me(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,et,a.qt,t),r},rt=x,t==H-1&&pt){const t=Ua(ot,nt,rt);t&&(H+=t,Qa(c,ua))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new jo(o))}catch{}yield et}let ht=rt,mt=Ia(nt.subarray(rt))||(st?Ia(ct):T);if(!mt&&!st){const t=I+rt,e=Math.min(et-t,65541);e>=6&&(mt=Ia(await ro(i,t,e)))}mt&&(a.digitalSignature=mt,ht=rt+6+mt.length),(rt!=tt&&ht!=tt||!st&&rt!=U&&ht!=U)&&Ja(m,c,wa),dt&&Ja(m,c,pa);const yt=ti(a,n,"extractPrependedData"),bt=ti(a,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await Pa(t);return e==o||808471376==e}(i)?4:0;return m&&(G||H&&P>Et)&&$a(fa),(G||H&&P>4)&&Qa(c,fa),j&&Qa(c,da),yt&&(a.prependedData=P>Et?await ro(i,Et,P-Et):v),a.comment=C?await ro(i,k+d,C):v,bt&&(a.appendedData=M<i.size?await ro(i,M,i.size-M):v),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}}class xa{constructor(t={}){const{readable:e,writable:r}=new TransformStream,n=new Da(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await n.next();if(e)return t.close();const o={...r,readable:function(){const{readable:t,writable:e}=new TransformStream;if(r.getData)return async function(){try{await r.getData(e)}catch(t){try{await e.abort(t)}catch{}}}(),t}()};delete o.getData,t.enqueue(o)}}),this.writable=r}}async function Fa(t,e={}){if(t=new Jn(t),await to(t),t.size!==T&&t.readUint8Array||(t=new Rn(await Me(t.readable)),await to(t)),t.size<d)return!1;const r=Wa(e,{}),n=r!=$,o=Ha(e[K],r),{Yt:a,Xt:i}=await Ga(t,n,o);if(!a||r==J&&i>1)return!1;const s=ai(Ot(a),20),c=a.offset+d+s;return t.size-c<=o}let Oa=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=yt(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},z=e.warnings=[],D=ja(u,d)+f,F=await ro(u,D,x),O=Ot(F);let U=ti(s,i,N),I=ti(s,i,_);const k=ti(s,i,B);if(at(U,I),U=U&&U.length&&U,I=I&&I.length&&I,w&&99!=w.originalCompressionMethod)throw new Error(je);if(F.length<x||ii(O,0)!=n)throw new Error(Vo);ka(R,O,4);const{extraFieldLength:C,filenameLength:M}=R,V=R.dataOffset=D+x+M+C,H=ti(s,i,"checkLocalDirectory"),G=Wa(i,s.options),K=function(t,e){return t===T?e!=$:Boolean(t)}(H,G),q=function(t,e){return t===T?e==J:Boolean(t)}(H,G);let Y=v;if(q&&(M||C)){const t=await ro(u,D+x,M+C);Y=t.subarray(0,M),R.rawExtraField=t.subarray(M)}else R.rawExtraField=C?await ro(u,D+x+M,C):v;q&&(R.rawFilename=Y),Ca(s,R,O,4,!0)&&Qa(z,sa),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Ja(i,o,"mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ja(i,o,ma),e.compressionMethod!=t.compressionMethod&&Ja(i,o,ya),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ja(i,o,ba)}(s,R,Y,q,K?T:z);const{lastAccessDate:X,creationDate:Q,uid:tt,gid:et}=R;X&&(e.lastAccessDate=X),Q&&(e.creationDate=Q),tt!==T&&e.uid===T&&(e.uid=tt),et!==T&&e.gid===T&&(e.gid=et);const rt=s.encrypted&&R.encrypted&&!k,nt=rt&&!w;if(k||(e.zipCrypto=nt),rt&&!(64&~R.rawBitFlag))throw new Error(Ko);const it=k?T:He(h);if(0!=h&&8!=h&&9!=h&&!it&&!k)throw new Error(je);if(rt){if(!nt&&(w.strength<1||w.strength>3))throw new Error(Ko);if(!U&&!I)throw new Error(Go)}if(V+g>u.size)throw new Error(Xo);const st=g,ct=Ce(u.createReadable({offset:V,size:st})),ut=ot(ti(s,i,j)),lt=ti(s,i,"checkPasswordOnly");let ft=ti(s,i,"checkOverlappingEntry");const dt=ti(s,i,"checkOverlappingEntryOnly");dt&&(ft=!0);const{onstart:wt,onprogress:pt,onend:ht}=i,mt=0!=h&&!k,bt=k?g:S,Et=9==h;let St=ti(s,i,L);Et&&(St=!1);const gt=ti(s,i,"checkCrc32"),At=(gt===T?ti(s,i,"checkSignature"):gt)&&!k&&(!rt||nt||w&&1==w.vendorVersion),Rt={options:{codecType:hr,password:U,rawPassword:I,zipCrypto:nt,encryptionStrength:w&&w.strength,checkCrc32:At,checkAuthenticationCode:ti(s,i,"checkAuthenticationCode"),passwordVerification:nt&&(A?E>>>8&r:b>>>24&r),outputSize:bt,crc32:b,compressed:mt,encrypted:rt,useWebWorkers:ti(s,i,P),useCompressionStream:St,transferStreams:ti(s,i,W),deflate64:Et,format:it?it.format:T,codecURI:it?it.codecURI:T,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:lt},config:c,ft:{signal:ut,size:st,onstart:wt,onprogress:pt,onend:ht}};let zt,Dt;ft&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,qt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await ro(t,c+i,d+4),n=Ot(r);let u=r.length==d+4&&ii(n,0)==a;if(u){const t=Ba(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=Ba(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,$t:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(Yo);throw t.overlappingEntry=e.$t,t}f.set(r,w)}({reader:u,$t:e,index:l,offset:D,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:V,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,qt:o});try{if(!dt){lt&&(t=new WritableStream),t=new Qn(t),await to(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(bt,g,mt)),({writable:zt}=t);const{outputSize:e}=await qr({readable:ct,writable:zt},Rt);if(t.size+=e,e!=bt)throw new Error(Ye)}}catch(e){if(e.outputSize!==T&&(t.size+=e.outputSize),!lt||e.message!=qt)throw Dt=e,e}finally{if(($n(t)||!ti(s,i,Z))&&zt&&!zt.locked){const t=zt.getWriter();if(Dt)try{await t.abort(Dt)}catch{}else await t.close()}}return lt||dt?T:t.getData?t.getData():zt}};function Ta(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==ii(t,r))return!0;return!1}function Ua(t,e,r){let n=0;for(;r+f<=e.length&&ii(t,r)==s;)r+=f+ai(t,r+28)+ai(t,r+30)+ai(t,r+32),n++;return n%65536?0:n}function Ia(t){if(t.length>=6){const e=Ot(t);if(ii(e,0)==i){const r=ai(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function ka(t,e,r){const n=t.rawBitFlag=ai(e,r+2),o=!(1&~n),a=ii(e,r+6);Object.assign(t,{encrypted:o,version:ai(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:ri(a),filenameLength:ai(e,r+22),extraFieldLength:ai(e,r+24)})}function Ca(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Ot(a);let c=0,u=!1;try{for(;c<a.length;){const t=ai(s,c),e=ai(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=ai(r,n+4);Object.assign(e,{signature:ii(r,n+10),crc32:ii(r,n+10),compressedSize:ii(r,n+14),uncompressedSize:ii(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=Ot(t.data),n=Aa.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Ra[e].bytes,0);if(t.data.length<o)throw new Error(Ho);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=Ra[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=i.get(28789);d&&(Ma(d,oo,ao,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(Ma(w,io,so,e,t),e.extraFieldUnicodeComment=w);const p=i.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Ot(t.data),o=oi(n,4);Object.assign(t,{vendorVersion:oi(n,0),vendorId:oi(n,2),strength:o,originalCompressionMethod:r,compressionMethod:ai(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=T)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=i.get(13);S&&(va(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(va(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Ot(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=ai(r,o),a=ai(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Ot(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:ni(o),lastAccessDate:ni(a),creationDate:ni(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let z;if(R&&(z=Na(R,e,!1),e.extraFieldUnix=R),!z){const t=i.get(b);t&&(Na(t,e,!0),e.extraFieldInfoZip=t)}const D=i.get(m);D&&(function(t,e,r){if(!t.data.length)return;const n=Ot(t.data),o=oi(n,0),a=[],i=[];r?(1&~o||(a.push(wo),i.push(po)),2&~o||(a.push(ho),i.push(mo)),4&~o||(a.push(yo),i.push(bo))):t.data.length>=5&&(a.push(wo),i.push(po));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=ii(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const x=i.get(y);return x&&(e.extraFieldUSDZ=x),u}function Ma(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Ot(t.data),i=new Bt;i.append(o[r]);const s=Ot(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=ii(a,1),u=oi(a,0);Object.assign(t,{version:u,[e]:en(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==ii(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function va(t,e){if(t.data.length<8)return;const r=Ot(t.data),n={lastAccessDate:new Date(1e3*(0|ii(r,0))),lastModDate:new Date(1e3*(0|ii(r,4)))};t.data.length>=12&&(n.uid=ai(r,8),n.gid=ai(r,10)),Object.assign(t,n),Object.assign(e,n)}function Na(t,e,r){try{const n=Ot(t.data);let o,a;if(r){let e=0;const r=oi(n,e++),i=oi(n,e++);o=_a(t.data.subarray(e,e+i)),e+=i;const s=oi(n,e++);a=_a(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=ai(n,0),a=ai(n,2),Object.assign(t,{uid:o,gid:a}));return o!==T&&(e.uid=o),a!==T&&(e.gid=a),o!==T||a!==T}catch{}}function _a(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Ba(t,e,r){const n=ii(t,e);let o,a;return r?(o=si(t,e+4),a=si(t,e+12)):(o=ii(t,e+4),a=ii(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function ja(t,e){return t.Gt?t.Gt(e):0}async function Pa(t){return ii(Ot(await ro(t,0,4)))}function La(t){return t===J||t===Q||t===$}function Wa(t,e){return Za(t,Za(e,Q))}function Za(t,e){const r=t.strictness;if(r!==T){if(!La(r))throw new Error(ta);return r}const n=t.checkAmbiguity;return n===T?e:n?J:e==$?$:Q}function Va(t,e){if(e==$)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Ea.test(t))||e==J&&(r.includes(".")||r.includes(""))}function Ha(t,r){if(t!==T){const e=ct(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(ra);return e}return r==J?0:r==$?1/0:e}async function Ga(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,u,l,f,w]of Ka(t,o)){const o=ai(r,f+20);if(w+d+o==n){const o=await Ya(t,r,u,f,w,n,a);if(2==o){if(i||(i=qa(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=qa(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of Ka(t,o)){const o=qa(c,u,l);a||(a=o);const f=await Ya(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Yt:i,Xt:c}}async function*Ka(t,e){const r=t.size-e,n=await ro(t,r,e),o=Ot(n);for(let t=n.length-d;t>=0;t--)ii(o,t)==c&&(yield[o,r,n,t,r+t])}function qa(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function Ya(r,n,o,a,i,c,u){const f=ai(n,a+10),d=ii(n,a+12),p=ii(n,a+16);if(f==e||d==t||p==t)return await Xa(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=ai(n,a+6);for(const t of[i-d,ja(r,h)+p])if(await Xa(r,n,o,t,c,u)==s)return 2;return 0}async function Xa(t,e,r,n,o,a){return n<0||n+4>o?T:n>=r?ii(e,n-r):a.count>0?(a.count--,ii(Ot(await ro(t,n,4)),0)):T}function Ja(t,e,r){t?$a(r):Qa(e,r)}function Qa(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==T&&(n.filename=r),t.push(n)}}function $a(t){const e=new Error(Jo);throw e.reason=t,e}function ti(t,e,r){return e[r]===T?t.options[r]:e[r]}function ei(t,e,r){return nt(ti(t,e,r))}function ri(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<O?O:o}function ni(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function oi(t,e){return t.getUint8(e)}function ai(t,e){return t.getUint16(e,!0)}function ii(t,e){return t.getUint32(e,!0)}function si(t,e){const r=t.getBigUint64(e,!0);if(r>za)throw new Error(na);return Number(r)}var ci=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Jo,ERR_BAD_FORMAT:Po,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Zo,ERR_ENCRYPTED:Go,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Qo,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Xo,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Wo,ERR_EOCDR_NOT_FOUND:Lo,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ho,ERR_INVALID_AUTHENTICATION_CODE:Kt,ERR_INVALID_COMPRESSED_DATA:Xe,ERR_INVALID_CRC32:Je,ERR_INVALID_FILENAME_VALIDATION:ea,ERR_INVALID_MAX_APPENDED_DATA_SIZE:ra,ERR_INVALID_PASSWORD:Gt,ERR_INVALID_STRICTNESS:ta,ERR_INVALID_UNCOMPRESSED_SIZE:Ye,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Vo,ERR_OVERLAPPING_ENTRY:Yo,ERR_SPLIT_ZIP_FILE:qo,ERR_UNSAFE_FILENAME:$o,ERR_UNSUPPORTED_COMPRESSION:je,ERR_UNSUPPORTED_ENCRYPTION:Ko,ERR_UNSUPPORTED_UINT64:na,ERR_WORKER_STARTUP_TIMEOUT:br,WARNING_APPENDED_DATA:la,WARNING_COMPRESSED_PATCHED_DATA:ia,WARNING_DUPLICATE_FILENAME:pa,WARNING_MALFORMED_EXTRA_FIELD:sa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ma,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ya,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ba,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ha,WARNING_PREPENDED_CENTRAL_DIRECTORY:da,WARNING_PREPENDED_DATA:fa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:wa,WARNING_UNKNOWN_VERSION:aa,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:ca,WARNING_UNSORTED_CENTRAL_DIRECTORY:oa,WARNING_WRAPPED_ENTRIES_COUNT:ua,ZipReader:Da,ZipReaderStream:xa,isZipFile:Fa});const ui="File already exists",li="Zip file comment exceeds 64KB",fi="Invalid zip file comment (must be a Uint8Array)",di="File entry comment exceeds 64KB",wi="Invalid file entry comment (must be a string)",pi="Invalid date (must be a valid Date instance)",hi="File entry name exceeds 64KB",mi="Version exceeds 65535",yi="The strength must equal 1, 2, or 3",bi="Encryption is not supported in USDZ files",Ei="Split zip files are not supported in USDZ files",Si="Encryption is not supported when the 'passThrough' option is set",gi="Invalid extra field (must be a Map)",Ai="Invalid extra field type (must be integer 0..65535)",Ri="Invalid extra field data (must be a Uint8Array)",zi="Extra field data exceeds 64KB",Di=-2147483648,xi=2147483647,Fi=BigInt(0),Oi=BigInt("0x7fffffffffffffff"),Ti="Zip64 is not supported (set the 'zip64' option to 'true')",Ui="Undefined uncompressed size",Ii="Undefined compression method",ki="Undetermined size",Ci="Undefined reader",Mi="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",vi="Zip file not empty",Ni="Invalid uid (must be integer 0..2^32-1)",_i="Invalid gid (must be integer 0..2^32-1)",Bi="Invalid UNIX mode (must be integer 0..65535)",ji="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Pi="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Li="Invalid msdosAttributesRaw (must be integer 0..255)",Wi="Invalid msdosAttributes (must be an object with boolean flags)",Zi="Invalid level (must be integer 0..9)",Vi="Signature data exceeds 64KB",Hi=new Uint8Array([7,0,2,0,65,69,3,0,0]),Gi="infozip",Ki="unix";let qi=0;const Yi=[];class Xi{constructor(t,e={}){t=new Qn(t);const{availableSize:r=U,maxSize:n=U}=t,o=r>0&&r!==U&&n>0&&n!==U;if(o&&e[G])throw new Error(Ei);Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[H]===T?t.size||t.writable.size||0:e[H],ne:e[H]===T?0:e[H]-(t.size||t.writable.size||0),oe:new Set,ae:[],ie:0,se:0,ce:T})}prependZip(t){return $i(this,async function(t,e){if(t.re.size)throw new Error(vi);await t.ue(e)}(this,t))}appendZip(t){return $i(this,this.ue(t))}async ue(t){const e=this,{oe:r,re:n,ee:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new Jn(t),await to(t),t.size!==T&&t.readUint8Array||(t=new Rn(await Me(t.readable)),await to(t));const{ZipReader:r}=await Promise.resolve().then(function(){return ci}),i=new r(t),s=await i.getEntries();await i.close(),await to(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(ui);n.add(t),c.push(t)}),e.le=!0;const{fe:f}=e;e.fe=new Promise(t=>u=()=>{e.le=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return Ot(await ro(t,0,4)).getUint32(0,!0)==o}(t)||(await As(e.writer,Ss()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>Es(e,t)-Es(e,r));let s=0;for(const r of i){const n=Es(e,r);await ys(t,e,s,n-s),ps(o,await bs(e,n))&&await o.closeDisk(),a.set(r,{offset:hs(t,o),diskNumberStart:ds(o)}),s=n}await ys(t,e,s,n-s)}else{const o=t.offset;await ys(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+Es(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=ms(f||v),t.extraFieldAES&&(l=99);const m=js(f),y=Boolean(u)&&u.uncompressedSize!==T,b=Boolean(u)&&u.compressedSize!==T,E=-7&Ls(w,p,h,i,l)|w<<1,{de:S,we:g}=Ps({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,pe:b,he:y,extraFieldLength:m}),{crc32:A}=t;A!==T&&Ns(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{me:!0,he:y,pe:b,offset:R,diskNumberStart:z,ye:!1,be:v,Ee:v,Se:v,ge:v,Ae:v,rawExtraField:f,Re:v,extendedTimestamp:!1,de:S,we:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{oe:i}=a,s=async function(e,n,o,a){if(Os(e,a=Object.assign({},a),To)&&!n.endsWith(D)&&(n+=D),e.re.has(n))throw new Error(ui);e.re.add(n),qi<yt().maxWorkers?qi++:await new Promise(t=>Yi.push(t));try{return await async function(e,n,o,a){const i=rs(e,n,a);({name:n}=i);const s=ns(e,n,a),{comment:c}=s,u=a[Co];e.ee.set(n,T);const l=e.ce,f={};let d,w;s.ze.keepOrder&&(f.De=new Promise(t=>d=t)),e.ce=f;try{const{ze:c}=s;0==c.level||c.compressionMethod!==T||c.passThrough||await Rr(yt())||(c.level=0);const u=await async function(t,e,{ze:r},n){if(r.passThrough&&!e&&!Os(t,n,To))throw new Error(Ci);let o;if(e){if(e=new Jn(e),await to(e),!e.readable&&!e.readUint8Array)throw new Error(Mi);({size:o}=e)}return Object.assign({reader:e},as(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=ws(e.writer),h=ds(e.writer),m=is(a=Object.assign({},a,i.ze,s.ze,u.ze,{signature:a[ko],crc32:a.crc32===T?a[ko]:a.crc32,offset:e.offset-p,diskNumberStart:h,[G]:e.options[G]})),y=us(a),b=js(m.xe,y.Fe);w=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,Oe:f,signal:d}=i,{Te:w,$t:p,Ue:h,Ie:m}=a,y=e.options[G];let b,E,S,g,A,R,z,D=p,F=0;const O=u&&h?h.De:T;s.set(n,D);try{i.bufferedWrite||!u||e.le||e.ie||e.se||!l&&!f?(b=!0,e.ie++,z=i.createTempStream?await i.createTempStream():new TransformStream(T,T,{highWaterMark:U}),z.size=0,await to(c)):(E=!0,e.se++,z=c,await O,await I()),await to(z);const p=ws(c);e.te&&!b&&await gs(e,c),y&&!b&&ss(a,e.offset-p);const{xe:h}=w;b||await k();const m=ds(c),S=hs(e,c);if(D.diskNumberStart=m,b||(A=!0,R=c.size,await As(z,h)),D=await async function(e,n,{diskNumberStart:o,De:a},i,s,c){const{Te:u,ke:l,Ce:f}=i,{de:d,we:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,be:S,Me:g,Se:A,ve:R,ge:z,Ae:D,Ee:x}=u,{Fe:F}=l,{rawFilename:O,lastAccessDate:U,creationDate:I,password:k,rawPassword:C,level:M,zip64:v,me:N,he:_,pe:B,zipCrypto:j,dataDescriptor:P,directory:L,executable:W,versionMadeBy:Z,rawComment:V,rawExtraField:H,Re:G,useWebWorkers:K,transferStreams:q,onstart:Y,onprogress:X,onend:J,signal:Q,encryptionStrength:$,extendedTimestamp:tt,msDosCompatible:et,internalFileAttributes:rt,externalFileAttributes:nt,uid:ot,gid:at,unixMode:it,symlink:st,setuid:ct,setgid:ut,sticky:lt,unixExternalUpper:ft,msdosAttributesRaw:dt,msdosAttributes:wt,useCompressionStream:pt,passThrough:ht,format:mt,codecURI:yt}=c,bt={De:a,versionMadeBy:Z,zip64:v,me:N,directory:Boolean(L),executable:Boolean(W),filenameUTF8:!0,rawFilename:O,commentUTF8:!0,rawComment:V,be:S,Me:g,Se:A,ge:z,Ae:D,Ee:x,rawExtraField:H,Re:G,extendedTimestamp:tt,msDosCompatible:et,internalFileAttributes:rt,externalFileAttributes:nt,diskNumberStart:o,uid:ot,gid:at,unixMode:it,symlink:Boolean(st),setuid:ct,setgid:ut,sticky:lt,unixExternalUpper:ft,msdosAttributesRaw:dt,msdosAttributes:wt};let{crc32:Et,uncompressedSize:St}=c,gt=0;ht||(St=0);const{writable:At}=n;if(e){const o=e.size,a=Ce(no(e,{size:o})),i={options:{codecType:pr,inputSize:o,level:M,rawPassword:C,password:k,encryptionStrength:$,zipCrypto:m&&j,passwordVerification:m&&j&&h>>8&r,computeCrc32:!ht,compressed:y&&!ht,encrypted:m&&!ht,useWebWorkers:K,useCompressionStream:pt,transferStreams:q,format:mt,codecURI:yt,compressionMethod:E},config:s,ft:{signal:Q,size:o,onstart:Y,onprogress:X,onend:J}};try{const e=await qr({readable:a,writable:At},i);if(gt=e.outputSize,n.size+=gt,ht||(St=e.inputSize,m&&!j||(Et=e.crc32)),!B&&gt>=t||!_&&St>=t)throw new Error(Ti)}catch(t){throw t.outputSize!==T&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,Te:n,ke:o},{zip64:a,zipCrypto:i,passThrough:s,dataDescriptor:c}){const{we:u,encrypted:l}=n,{Ne:f,_e:d}=o;l&&!i&&!s||t===T||(Ns(u,10,t),c&&Ns(f,d,t)),a?c&&(_s(f,d+4,BigInt(e)),_s(f,d+12,BigInt(r))):(Ns(u,14,e),Ns(u,18,r),c&&(Ns(f,d+4,e),Ns(f,d+8,r)))}({crc32:Et,compressedSize:gt,uncompressedSize:St,Te:u,ke:l},c),P&&await As(n,F),Object.assign(bt,{uncompressedSize:St,compressedSize:gt,lastModDate:p,rawLastModDate:h,creationDate:I,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(j),size:f+gt,compressionMethod:E,version:b,de:d,we:w,signature:Et,crc32:!m||j||ht?Et:T,ve:R,he:_,pe:B}),bt}(o,z,D,a,yt(),i),b||(A=!1),s.set(n,D),D.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await I(),e.te&&await gs(e,c),g=!0,R=c.size,await k(),D.diskNumberStart=ds(c),D.offset=hs(e,c),y){const t=a.Ce;ss(a,e.offset-ws(c)),D.size+=a.Ce-t}!function({rawFilename:t,encrypted:e,zip64:r,Me:n,crc32:o,compressedSize:a,uncompressedSize:i,he:s,pe:c},u,{dataDescriptor:l,passThrough:f}){if(l||((!e||f&&o!==T)&&Ns(u,14,o),c||Ns(u,18,a),s||Ns(u,22,i)),r&&n){const e=x+js(t)+4;_s(u,e,BigInt(i)),_s(u,e+8,BigInt(a))}}(D,w.Be,i),await As(c,w.xe),await Rs(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else D.diskNumberStart=m,D.offset=S;return e.offset+=D.size,D}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.ie--,E&&e.se--,m&&m(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function I(){e.le=!0;const{fe:t}=e;e.fe=new Promise(t=>S=()=>{e.le=!1,t()}),await t}async function k(){ps(c,js(w.xe))&&await c.closeDisk()}}(e,n,o,{Te:m,ke:y,Ce:b,$t:f,Ue:l,Ie:d},a)}catch(t){throw e.ee.delete(n),t}finally{d&&d(l&&l.De)}return Object.assign(w,{name:n,comment:c,extraField:u}),new jo(w)}(e,n,o,a)}catch(t){throw e.re.delete(n),t}finally{const t=Yi.shift();t?t():qi--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),$i(a,s)}remove(t){const{re:e,ee:r}=this;if(typeof t==M&&(t=r.get(t)),t&&t.filename!==T){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=v,n={}){const o=this,{oe:a,writer:w}=this,{writable:p}=w;if(!(r instanceof Uint8Array))throw new Error(fi);if(js(r)>e)throw new Error(li);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.je));const h=o.ae.filter(t=>t.error&&!t.Pe);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Pe=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Le:a,We:w}=ls(r.ee),{Ze:p,Ve:h,He:m}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await to(i);let u=0,l=0,d=ds(i),w=ws(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:h,rawFilename:m,be:y,Ee:b,Se:E,ge:S,Ae:g,rawExtraField:A,Re:R,rawComment:z,versionMadeBy:D,de:x,we:F,he:O,pe:T,ye:U,Ge:I,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:M,uncompressedSize:v,compressedSize:N}=n,_=js(y,b,E,S,g,A,R),B=f+js(m,z)+_;ps(i,u+B-l)&&(await As(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=ds(i),w=ws(i)),O||Ns(F,18,v),T||Ns(F,14,N),(I||U)&&n.version<45&&vs(F,0,45);const j=fs(B);if(j.Ke(s),j.qe(D),j.Ye(x.subarray(0,24)),j.qe(_),j.qe(js(z)),j.qe(U?e:M),j.qe(k),j.Ke(C),j.Ke(I?t:h),j.Ye(m),j.Ye(y),j.Ye(b),j.Ye(E),j.Ye(S),j.Ye(g),j.Ye(A),j.Ye(R),j.Ye(z),Bs(c,j.Lt,u),u+=B,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new jo(n))}catch{}}return await As(i,l?c.slice(l):c),{Ze:{diskNumber:d,diskOffset:w},Ve:{diskNumber:ds(i),Xe:p},He:c}}(r,a,o),y=await async function(t,r,n){const o=Us(t,n,q);if(o){const n=await o(r),a=js(n);if(a>e)throw new Error(Vi);const s=fs(6+a);s.Ke(i),s.qe(a),s.Ye(n);const{writer:c}=t;return ps(c,js(s.Lt))&&await c.closeDisk(),await As(c,s.Lt),6+a}return 0}(r,m,o);await async function(r,n,o,a){const{writer:i}=r,{Ze:s,Ve:f,Je:w,We:p}=a;let{Le:h}=a,m=r.ee.size,y=s.diskNumber,b=hs(r,s);const E=js(n);if(E>e)throw new Error(li);let S=Os(r,o,zo),g=ds(i);if(ps(i,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(Ti);S=!0}else S===T&&p&&(S=!0);const A=fs(S?98:d);ps(i,js(A.Lt)+E)&&await i.closeDisk(),g=ds(i);let R=g==f.diskNumber?f.Xe:0;S&&(A.Ke(u),A.Qe(44),A.qe(45),A.qe(45),A.Ke(g),A.Ke(y),A.Qe(R),A.Qe(m),A.Qe(h),A.Qe(b),A.Ke(l),A.Ke(g),A.Qe(BigInt(hs(r,i))+BigInt(h)+BigInt(w)),A.Ke(g+1),Os(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.Ke(c),A.qe(g),A.qe(y),A.qe(R),A.qe(m),A.Ke(h),A.Ke(b),A.qe(E),await As(i,A.Lt),E&&await As(i,n)}(r,n,o,{Ze:p,Ve:h,Le:a,Je:y,We:w})}(o,r,n),!$n(w)&&Os(o,n,Z)||await p.getWriter().close(),w.getData?w.getData():p}}class Ji{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Xi(r,t),this.oe=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await ts(e,t)}}()}});return es(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return es(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await ts(r,t),t}try{return await r.close(t,e)}catch(t){throw await ts(r,t),t}}}class Qi extends Promise{then(t,e){const{$e:r}=this;return r&&(r.Pe=!0),super.then(t,e)}}function $i(t,e){const r=new Qi((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.$e=n,n.je=Promise.prototype.then.call(r,T,t=>n.error=t),t.ae.push(n),r}async function ts(t,e){try{await t.writer.writable.abort(e)}catch{}}function es(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function rs(n,o,a){let i=Os(n,a,Ro),s=Os(n,a,Fo,i?20:768);const c=Os(n,a,Uo),u=Is(n,a,"uid"),l=Is(n,a,"gid");let f=Is(n,a,Mo),d=Os(n,a,"unixExtraFieldType"),w=Os(n,a,vo),p=Os(n,a,No),h=Os(n,a,_o);if(st(u,t,Ni),st(l,t,_i),st(f,e,Bi),d!==T&&d!==Gi&&d!==Ki)throw new Error(ji);if(d===Ki&&(u!==T&&u>e||l!==T&&l>e))throw new Error(Pi);d!==T||u===T&&l===T||(d=Gi);let m=Is(n,a,go),y=Os(n,a,Ao);const b=m!==T||y!==T;if(u!==T||l!==T||f!==T||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),st(m,r,Li),y&&(typeof y!==C||Array.isArray(y)))throw new Error(Wi);if(s>e)throw new Error(mi);let E=Os(n,a,So);const S=E!==T;S||(E=0),!a[To]&&o.endsWith(D)&&(a[To]=!0);const x=Os(n,a,To);if(x?(o.endsWith(D)||(o+=D),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==T||Boolean(w||p||h);f=f===T?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),h?f|=512:h=Boolean(512&f),S&&!t||(x?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==T)t&=r;else if(e!==T){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===T&&(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}}(m,y)),b&&(E=E&t|m&r);const F=E>>16&e,O=f!==T&&40960==(f&g);return{name:o,ze:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function ns(t,r,n){const o=Us(t,n,"encodeText")||Pt;let a=o(r,Y);if(a===T&&(a=Pt(r)),js(a)>e)throw new Error(hi);const i=n[io]||"";if(typeof i!=M)throw new Error(wi);let s=o(i,X);if(s===T&&(s=Pt(i)),js(s)>e)throw new Error(di);const c=Os(t,n,xo);if(c!==T&&c>e)throw new Error(mi);const u=Ts(t,n,wo,new Date),l=Os(t,n,po),f=Ts(t,n,ho),d=Ts(t,n,yo),w=Os(t,n,Eo,0),p=Os(t,n,B),h=Os(t,n,N),m=Os(t,n,_);at(h,m);const y=Is(t,n,"encryptionStrength",3),b=Os(t,n,Oo),E=Os(t,n,"extendedTimestamp",!0),S=Os(t,n,"ntfsTimestamp"),g=Os(t,n,"keepOrder",!0),A=Os(t,n,P),R=Os(t,n,W),z=Os(t,n,"bufferedWrite"),D=Us(t,n,"createTempStream"),x=Os(t,n,"dataDescriptorSignature",!0),F=ot(Os(t,n,j)),O=Os(t,n,"useUnicodeFileNames",!0),U=Os(t,n,Io),I=p||U===T?T:He(U);if(!p&&U!==T&&0!==U&&8!==U&&!I)throw new Error(je);let k=Is(t,n,"level");if(st(k,9,Zi),t.options[G]){if(h!==T||m!==T)throw new Error(bi);k===T&&U===T&&(k=0)}p&&(k=T);let C=Os(t,n,L),v=Os(t,n,V);z&&v===T&&(v=!1),(v===T||b&&!p)&&(v=!0),k!==T&&6!=k&&(C=!1);const Z=Os(t,n,zo);if(!(b||h===T&&m===T||Number.isInteger(y)&&y>=1&&y<=3))throw new Error(yi);const H=os(n[Co]),K=os(n.localExtraField),q=os(n.centralExtraField);return{comment:i,ze:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,passThrough:p,password:h,rawPassword:m,encryptionStrength:y,zipCrypto:b,extendedTimestamp:E,ntfsTimestamp:S,keepOrder:g,useWebWorkers:A,transferStreams:R,bufferedWrite:z,createTempStream:D,dataDescriptorSignature:x,signal:F,useUnicodeFileNames:O,compressionMethod:U,format:I?I.format:T,codecURI:I?I.codecURI:T,er:I?I.versionNeeded:T,level:k,useCompressionStream:C,dataDescriptor:v,zip64:Z,rawExtraField:H,rr:K,Re:q}}}function os(t){if(!t)return v;if(!(t instanceof Map))throw new Error(gi);let r=0,n=0;t.forEach((t,n)=>{if(it(n,e,Ai),!(t instanceof Uint8Array))throw new Error(Ri);if(js(t)>e)throw new Error(zi);r+=4+js(t)});const o=new Uint8Array(r),a=Ot(o);return t.forEach((t,e)=>{vs(a,n,e),vs(a,n+2,js(t)),Bs(o,t,n+4),n+=4+js(t)}),o}function as(e,r,n,o,a){const{passThrough:i,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=o;let{dataDescriptor:f,zip64:d,level:w,compressionMethod:p}=o,h=0,m=0,y=!1;if(i&&r){if(m=a[co],m===T)throw new Error(Ui);if(p===T)throw new Error(Ii)}const b=!0===d,E=Os(e,a,Do);if(r&&i&&!E&&js(c,u))throw new Error(Si);const S=r&&(Boolean(c&&js(c)||u&&js(u))||i&&E);r||(w=0,p=0);const g=S?s?12:16+4*l:0;r&&(i?(a.uncompressedSize=m,h=n===T?ks(m)+g:n):n===T?(f=!0,(d||d===T)&&(d=y=!0,h=4294967296)):(a.uncompressedSize=m=n,h=(Cs(p,w)?ks(m):m)+g));const A=!(S||r&&(0!==n||i)||Cs(p,w));A&&!s&&Os(e,a,V)===T&&(f=!1);const R=b||y||m>=t,z=b||h>=t;if(R||z){if(!1===d)throw new Error(Ti);d=!0}return d=d||!1,{nr:h,ze:{dataDescriptor:f,Oe:A,zip64:d,me:b,ar:y,he:R,pe:z,uncompressedSize:m,level:w,compressionMethod:p,encrypted:S}}}function is(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,rr:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,passThrough:R,encrypted:z,he:D,pe:U,uncompressedSize:I,ar:k,crc32:C}=t;let{version:M,compressionMethod:N}=t;const _=!w&&Cs(N,c);let B;const j=R||!_,P=u&&(t.bufferedWrite||!d||!D&&!U||j&&!k),L=P||u&&d&&(D||U);if(u&&(D||U)){const t=20,e=fs(t);if(e.qe(1),e.qe(t-4),B=e.Lt,P&&(e.Qe(I),j)){const t=z?l?12:16+4*S:0;e.Qe(R?0:I+t)}}else B=v;let W,Z,V,H,K;if(z&&!l){const t=fs(js(Hi)+2);t.qe(h),t.Ye(Hi),W=t.Lt,W[8]=S}else W=v;if(g){const t=Ds(o),e=xs(t);if(e){const e=9+(i?4:0)+(s?4:0),r=fs(e);H=1+(i?2:0)+(s?4:0),r.qe(m),r.qe(e-4),r.ir(H),r.Ke(t),i&&r.Ke(Fs(Ds(i))),s&&r.Ke(Fs(Ds(s))),V=r.Lt}else V=v;if(A===T?!e||Boolean(i||s):A)try{const t=zs(o),e=fs(36);e.qe(10),e.qe(32),e.sr(4),e.qe(1),e.qe(24),e.Qe(t),e.Qe(i?zs(i):t),e.Qe(s?zs(s):t),Z=e.Lt}catch{Z=v}else Z=v}else Z=V=v;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Gi||r===T&&n===T)if(o!=Ki||r===T&&n===T)K=v;else{const t=fs(8);t.qe(E),t.qe(4),t.qe((r===T?0:r)&e),t.qe((n===T?0:n)&e),K=t.Lt}else{const t=cs(r===T?0:r),e=cs(n===T?0:n),o=3+t.length+e.length,a=fs(4+o);a.qe(b),a.qe(o),a.ir(1),a.ir(t.length),a.Ye(t),a.ir(e.length),a.Ye(e),K=a.Lt}}catch{K=v}N===T&&(N=_?8:0),M===T&&(M=0!=N||w||z?20:10);const{er:q}=t;_&&q!==T&&(M=M>q?M:q),u&&(M=M>45?M:45),z&&!l&&(M=M>51?M:51,R&&C!==T&&(W[4]=1),vs(Ot(W),9,N),N=99);const Y=L?js(B):0,X=Y+js(W,V,Z,K,p,y);if(X+(t[G]?67:0)>e)throw new Error(zi);const J=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),Q=J<O?O:J>F?F:J,$=js(V)?new Date(1e3*Ds(o)):js(Z)?o:Q,{de:tt,we:et,rawLastModDate:rt}=Ps({version:M,bitFlag:Ls(c,f,d,z,N),compressionMethod:N,uncompressedSize:I,lastModDate:Q,rawLastModDate:a,rawFilename:r,pe:U,he:D,extraFieldLength:X}),nt=fs(x+js(r)+X),ot=nt.Lt,at=Ot(ot);return nt.Ke(n),nt.Ye(tt),nt.Ye(r),L&&nt.Ye(B),nt.Ye(W),nt.Ye(V),nt.Ye(Z),nt.Ye(K),nt.Ye(p),nt.Ye(y),d&&(U||Ns(at,18,0),D||Ns(at,22,0)),{xe:ot,Be:at,de:tt,we:et,lastModDate:$,rawLastModDate:rt,encrypted:z,compressed:_,version:M,compressionMethod:N,ve:H,be:v,Me:Y,Se:V,ge:Z,Ae:K,Ee:W,extraFieldLength:X}}function ss(t,e){const{Te:r}=t;let{xe:n,extraFieldLength:o}=r,a=64-(e+js(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Ot(i);vs(s,0,y),vs(s,2,a-4);const c=n;r.xe=n=new Uint8Array(js(c)+a),Bs(n,c),Bs(n,i,js(c));const u=Ot(n);vs(u,28,o+a),r.Be=u,t.Ce+=a}function cs(t){const e=new Uint8Array(4);Ot(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function us({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=v,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Ot(o),r&&(i=4,Ns(n,0,a))),{Fe:o,Ne:n,_e:i}}function ls(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Ee:i,rawComment:s,ge:c,Ae:u,rawExtraField:l,Re:d,extendedTimestamp:w,ve:p,lastModDate:h,me:y,uncompressedSize:b,compressedSize:E}=a;let{he:S,pe:g}=a;y||(S&&b<t&&(S=a.he=!1),g&&E<t&&(g=a.pe=!1)),o=o||S||g;const A=a.offset>=t,R=a.diskNumberStart>=e;let z,D;if(A||R||S||g){const t=4+(S?8:0)+(g?8:0)+(A?8:0)+(R?4:0),e=fs(t);e.qe(1),e.qe(t-4),S&&e.Qe(b),g&&e.Qe(E),A&&e.Qe(a.offset),R&&e.Ke(a.diskNumberStart),z=e.Lt}else z=v;a.be=z,a.Ge=A,a.ye=R;const x=Ds(h);if(w&&xs(x)){const t=fs(9);t.qe(m),t.qe(5),t.ir(p),t.Ke(x),D=t.Lt}else D=v;a.Se=D;const F=js(z,i,c,u,D,l,d);if(F>e)throw new Error(zi);n+=f+js(r,s)+F}return{Le:n,We:o}}function fs(t){const e=new Uint8Array(t),r=Ot(e);let n=0;return{Lt:e,ir:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},qe:t=>{vs(r,n,t),n+=2},Ke:t=>{Ns(r,n,t),n+=4},Qe:t=>{_s(r,n,BigInt(t)),n+=8},Ye:t=>{Bs(e,t,n),n+=js(t)},sr:t=>n+=t}}function ds(t){const{diskNumber:e=0}=t;return e}function ws(t){const{diskOffset:e=0}=t;return e}function ps(t,e){const{availableSize:r=U}=t;return e>r}function hs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function ms(t){const e=Ot(t);let r=0;for(;r+4<=js(t);){const n=4+Ms(e,r+2);if(1==Ms(e,r))return ms(xt(t.subarray(0,r),t.subarray(Math.min(r+n,js(t)))));r+=n}return t}async function ys(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await Rs(no(e,{offset:r,size:n}),o,T,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function bs(t,e){const r=await ro(t,e,x);if(js(r)<x)return x;const n=Ot(r);return x+Ms(n,26)+Ms(n,28)}function Es(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function Ss(){const t=new Uint8Array(4);return Ns(Ot(t),0,o),t}async function gs(t,e){delete t.te,await As(e,Ss()),t.offset+=4}async function As(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=js(e),await n.write(e)}finally{n.releaseLock()}}async function Rs(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(js(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function zs(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Fi?Fi:e>Oi?Oi:e}}function Ds(t){return Math.floor(t.getTime()/1e3)}function xs(t){return t>=Di&&t<=xi}function Fs(t){return Math.min(xi,Math.max(Di,t))}function Os(t,e,r,n){const o=e[r]===T?t.options[r]:e[r];return o===T?n:o}function Ts(t,e,r,n){const o=Os(t,e,r,n);if(null===o)return n;if(o!==T&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(pi);return o}function Us(t,e,r){return nt(Os(t,e,r))}function Is(t,e,r,n){return ct(Os(t,e,r,n))}function ks(t){return t+5*(Math.floor(t/16383)+1)}function Cs(t,e){return t===T?e===T||e>0:0!==t}function Ms(t,e){return t.getUint16(e,!0)}function vs(t,e,r){t.setUint16(e,r,!0)}function Ns(t,e,r){t.setUint32(e,r,!0)}function _s(t,e,r){t.setBigUint64(e,r,!0)}function Bs(t,e,r){t.set(e,r)}function js(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Ps({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,pe:u,he:l,extraFieldLength:f}){const d=fs(26),w=d.Lt,p=Ot(w);if(d.qe(e),d.qe(r),d.qe(n),s===T){const t=new Uint32Array(1),e=Ot(t);vs(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),vs(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ke(s),d.sr(4),u||a!==T?d.Ke(u?t:a):d.sr(4),l||o!==T?d.Ke(l?t:o):d.sr(4),d.qe(js(c)),d.qe(f),{de:w,we:p,rawLastModDate:s}}function Ls(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Ws(){return"application/octet-stream"}function Zs(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=yt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Vs(r,Qe)||Vs(t,Qe)||Vs(t,tr),decompression:Vs(n,Qe)||Vs(e,Qe)||Vs(e,tr),registered:!1},{compressionMethod:9,compression:!1,decompression:Vs(n,$e)||Vs(e,$e),registered:!1}];for(const t of Ge()){const e=Ke(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:T,decompression:e?typeof e.DecompressionStream==k:T,registered:!0})}return o}function Vs(t,e){if(!t)return!1;const{cr:r}=t;return r?r.includes(e):ir(t,e)}const Hs="2.11.3",Gs=1048576,Ks=".zip.js-temp";function qs(t={}){const{thresholdBytes:e=Gs,directoryName:r=Ks,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Ys=1048576;function Xs(t={}){const{thresholdBytes:e=Ys}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=Me(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?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(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Js=1048576,Qs=".zip.js-temp",$s="createSyncAccessHandle is only available in dedicated workers";function tc(t={}){const{thresholdBytes:e=Js,directoryName:r=Qs,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error($s);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;return{writable:u,readable:new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{zt({baseURI:import.meta.url})}catch{}const ec="deflate",rc="deflate-raw",nc="deflate64-raw",oc="gzip";let ac,ic,sc,cc,uc;function lc(t,e,r={}){if(!ac){const t=new Error("WASM module not loaded");throw t.cause=uc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.ur=ic(o),this.in=ic(a),this.inBufferSize=a,!this.ur||!this.in)throw new Error("allocation failed");if(this.lr=new Uint8Array(o),t?(this.dr=ac.deflate_process,this.wr=ac.deflate_last_consumed,this.pr=ac.deflate_end,this.mr=ac.deflate_new(),r=e===oc?ac.deflate_init_gzip(this.mr,n):e===rc?ac.deflate_init_raw(this.mr,n):ac.deflate_init(this.mr,n)):e===nc?(this.dr=ac.inflate9_process,this.wr=ac.inflate9_last_consumed,this.pr=ac.inflate9_end,this.mr=ac.inflate9_new(),r=ac.inflate9_init_raw(this.mr)):(this.dr=ac.inflate_process,this.wr=ac.inflate_last_consumed,this.pr=ac.inflate_end,this.mr=ac.inflate_new(),r=e===rc?ac.inflate_init_raw(this.mr):e===oc?ac.inflate_init_gzip(this.mr):ac.inflate_init(this.mr)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(cc.buffer),a=this.dr,i=this.wr,s=this.ur,c=this.lr;let u=0;for(;u<r.length;){const t=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&sc&&(sc(this.in),this.in=0),this.in=ic(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(u,u+t),this.in);const l=a(this.mr,this.in,t,s,o,0),f=l>>24&255,d=128&f?f-256:f;if(d<0)throw new Error("process error:"+d);const w=16777215&l;w&&(c.set(n.subarray(s,s+w),0),e.enqueue(c.slice(0,w)));const p=i(this.mr);if(0===p&&0===w)break;u+=p}}catch(t){i(this),e.error(t)}},flush(t){try{const e=new Uint8Array(cc.buffer),r=this.dr,n=this.ur,a=this.lr;for(;;){const i=r(this.mr,0,0,n,o,4),s=i>>24&255,c=128&s?s-256:s;if(c<0)throw new Error("process error:"+c);const u=16777215&i;if(u&&(a.set(e.subarray(n,n+u),0),t.enqueue(a.slice(0,u))),1===s||0===u)break}}catch(e){t.error(e)}finally{const e=i(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){i(this)}});function i(t){let e=0;return t.mr&&t.pr&&(e=t.pr(t.mr)),t.mr=0,t.in&&sc&&sc(t.in),t.in=0,t.ur&&sc&&sc(t.ur),t.ur=0,e}}class fc{constructor(t=ec,e){return lc(!0,t,e)}}class dc{constructor(t=ec,e){return lc(!1,t,e)}}fc.lt=!0,dc.lt=!0,fc.cr=[ec,rc,oc],dc.cr=[ec,rc,oc,nc];let wc,pc=!1;function hc(){wc=null,async function(){await Promise.allSettled(Zr.map(t=>($r(t),t.terminate()))),Er=T,Sr=!1}(),pc=!1,ac=ic=sc=cc=uc=null}!function({yr:t}){Ar=t}({yr:t=>{if(!wc){let{wasmURI:e}=t;typeof e==k&&(e=e()),wc=async function(t,{baseURI:e}){if(!pc)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}!function(t){if(ac=t,({malloc:ic,free:sc,memory:cc}=ac),"function"!=typeof ic||"function"!=typeof sc||!cc)throw ac=ic=sc=cc=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),pc=!0}catch(t){throw function(t){uc=t}(t),t}}(e,t).catch(t=>{throw wc=null,t})}return wc}}),zt({CompressionStreamFallback:fc,DecompressionStreamFallback:dc}),zt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const mc="Entry filename already exists",yc="Duplicate entry filename in the imported zip file",bc='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Ec="Entry is a ancestor of target entry",Sc="Readable stream already consumed",gc="throw",Ac="keep-first",Rc="keep-last",zc=new Set([gc,Ac,Rc]),Dc="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",xc="Invalid readerOptions (must be an object)",Fc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Oc="zipjs-abort-export",Tc="The operation was aborted",Uc=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);class Ic{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(mc);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Er++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Sr:r.Sr||r.uncompressedSize===T,passThrough:r.passThrough,gr:r.gr||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.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 r=e.parent;if(r){const n=ou(t);n&&(t=n.pop(),r=au(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(mc);r!=e.parent&&(Zc(e),e.parent=r,r.children.push(e),ru(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==T))}}class kc extends Ic{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new kc(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===T||(t.constructor==zn?e.type==r:t.constructor!=Sn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Lc(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([to(n),to(t,o)]);const a=ot(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof jo||!o&&!a&&!i?s:Ce(s).pipeThrough(new xr({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!$n(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Ce(i).pipeTo(ve(t.writable),{signal:a,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,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(t.message==Gt)return!1;throw t}}getText(t,e){return this.getData(new Fn(t),e)}getBlob(t,e){return this.getData(new zn(t),e)}getData64URI(t,e){return this.getData(new Sn(t),e)}getUint8Array(t){return this.getData(new qn,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ft(await this.getUint8Array(t)).buffer}replaceBlob(t){qc(this,{data:t,Reader:Rn,Writer:zn,uncompressedSize:t.size})}replaceText(t){qc(this,{data:t,Reader:Dn,Writer:Fn,uncompressedSize:xn(t)})}replaceData64URI(t){qc(this,{data:t,Reader:En,Writer:Sn,uncompressedSize:Yc(t)})}replaceUint8Array(t){qc(this,{data:t,Reader:Kn,Writer:qn,uncompressedSize:t.length})}replaceReadable(t){qc(this,{data:null,Reader:jc(t),Writer:null,uncompressedSize:T})}}class Cc extends Ic{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Cc(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return nu(this,t,{options:e},!0)}addText(t,e,r={}){return nu(this,t,{data:e,Reader:Dn,Writer:Fn,options:r,uncompressedSize:xn(e)})}addBlob(t,e,r={}){return nu(this,t,{data:e,Reader:Rn,Writer:zn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return nu(this,t,{data:e,Reader:En,Writer:Sn,options:r,uncompressedSize:Yc(e)})}addUint8Array(t,e,r={}){return nu(this,t,{data:e,Reader:Kn,Writer:qn,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return nu(this,t,{data:e,Reader:class extends Hn{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return nu(this,t,{Reader:jc(e),options:r})}addFileSystemEntry(t,e={}){return Qc(this,t,e)}addFileSystemHandle(t,e={}){return Qc(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),nu(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 Rn(t),e)}importData64URI(t,e){return this.importZip(new En(t),e)}importUint8Array(t,e){return this.importZip(new Kn(t),e)}importHttpContent(t,e){return this.importZip(new Hn(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new zn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Sn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new qn,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r,i=Kc(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!ot(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:T,onprogress:T,onend:T,preventClose:!1}),f=Nc([t],t=>Bc(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Fr(n,f),await m(t,e),a&&await Fr(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await Fr(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Vc(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||Vc(c.reason))return;throw c.reason===T?new DOMException(Tc,"AbortError"):c.reason}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw w?new Error(Oc):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Oc));try{r.entryName===T&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==k?(r=t,e=Object.assign({},r.options,e)):(await to(t),r=new Da(t,e));const n=function(t){if(t===T)return gc;if(zc.has(t))return t;throw new Error(bc)}(e.duplicates),o=[],a=await r.getEntries(e);for(const t of a){let r=this;try{const a=t.filename.split("/").filter(t=>""!=t&&"."!=t),i=a.pop();let s=!1;for(const t of a){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Ac){s=!0;break}if(n!=Rc)throw new Error(yc);this.fs.remove(r),r=new Cc(this.fs,t,{data:null},e),o.push(r)}}else r=new Cc(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(i){if(e=r.getChildByName(i),e&&!e.directory){if(n==Ac)continue;if(n!=Rc)throw new Error(yc);this.fs.remove(e),e=T}e||(e=new Cc(this.fs,i,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const a=r.getChildByName(i);if(a){if(n==Ac)continue;if(n!=Rc)throw new Error(yc);this.fs.remove(a)}o.push(nu(r,i,{data:t,Reader:Pc(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this;(e=Object.assign({},e)).bufferedWrite===T&&(e.bufferedWrite=!0);const[n]=await Promise.all([Wc(r,Kc(e.readerOptions)),to(t)]),o=new Xi(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=Nc(e.children,t=>Jc(t)?0:1);let f=0,d=0;if(a&&await Fr(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(Jc(e))return;const{name:a,Ar:s}=Hc(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:T,onend:T,onprogress:async t=>{f+=t-w,w=t,i&&await Fr(i,f,r)}}));d++,c&&await Fr(c,d,l,p)}s&&await Fr(s,f)}(o,r,Nc([r],_c),e,n),await o.close(e.globalComment),t.getData?t.getData():t.writable}getExportedSize(r={}){const n=this;Kc((r=Object.assign({},r)).readerOptions),r.bufferedWrite===T&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!Jc(t)).map(t=>{const{name:e,Ar:o}=Hc(t,n,r);return{name:e,size:t.directory?0:Gc(t,Xc(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Jc(t)||!t.children.length);return async function(r,n,o,a){const i={options:r};if(nt(r[q]))throw new Error(ki);if(a!==T&&!(a instanceof Uint8Array))throw new Error(fi);const s=js(a);if(s>e)throw new Error(li);const c=r[G],u=new Map,l=r[H]===T?0:r[H];let f=l,w=U;for(const t of n){let{name:e}=t;const{size:r}=t,n=Object.assign({},t.options);Os(i,n,To)&&!e.endsWith(D)&&(e+=D);const o=rs(i,e,n);({name:e}=o);const{ze:a}=ns(i,e,n);0==a.level||a.compressionMethod!==T||a.passThrough||await Rr(yt())||(a.level=0);const s=!Os(i,n,To);if(s&&r===T)throw new Error(ki);const{nr:l,ze:d}=as(i,s,r,a,n);if(s&&!a.passThrough&&Cs(d.compressionMethod,d.level))throw new Error(ki);const p=Object.assign({},n,o.ze,a,d,{[G]:c}),h=is(p),m=us(p),y={Te:h,Ce:js(h.xe,m.Fe)};c&&ss(y,f);const b=s?l:0;u.set(e,Object.assign({},p,h,{offset:f,diskNumberStart:0,compressedSize:b}));const E=y.Ce+b;w=Math.min(w,E),f+=E}if(u.size>1&&(c||f-w>=t)&&!o)throw new Error(ki);const{Le:p,We:h}=ls(u);let m=Os(i,r,zo);if(f>=t||p>=t||u.size>=e){if(!1===m)throw new Error(Ti);m=!0}else m===T&&h&&(m=!0);return f-l+p+s+(m?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(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 r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class Mc{constructor(){tu(this)}get children(){return this.root.children}remove(t){Zc(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=T}move(t,e){if(t==this.root)throw new Error("Root directory cannot be moved");if(!e.directory)throw new Error("Target entry is not a directory");if(e.isDescendantOf(t))throw new Error(Ec);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(mc)}else Zc(t),t.parent=e,e.children.push(t),ru(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):T;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}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,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}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 eu(this,r=>r.importBlob(t,e))}importData64URI(t,e){return eu(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return eu(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return eu(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return eu(this,r=>r.importReadable(t,e))}importZip(t,e){return eu(this,r=>r.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 vc={FS:Mc,ZipDirectoryEntry:Cc,ZipFileEntry:kc};function Nc(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function _c(t){return t.uncompressedSize}function Bc(t,e){const{data:r}=t;return e&&r instanceof jo?r.compressedSize:t.uncompressedSize}function jc(t){let e;return function(){if(e)throw new Error(Sc);return e=!0,{readable:t}}}function Pc(t){return class extends yn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,a=await e.entry.getData(new zn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=a,e.Rr=new Rn(a),e.size=a.size,super.init()}readUint8Array(t,e){return this.Rr.readUint8Array(t,e)}}}function Lc(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Wc(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async t=>{const r=t.reader=Lc(t.Reader,t.data,e);o.set(t,r);try{await to(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==T&&(t.uncompressedSize=r.size,t.Sr=!1)})),o}function Zc(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Vc(t){return Boolean(t)&&t.message==Oc}function Hc(t,e,n){const o=n.relativePath?t.getRelativeName(e):t.getFullname(),a=t.options||{};let i={},s={};if(t.data instanceof jo){const{externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,rawLastModDate:l,creationDate:f,lastAccessDate:d,uncompressedSize:w,encrypted:p,zipCrypto:h,crc32:m,compressionMethod:y,extraFieldAES:b,internalFileAttributes:E,extraField:S,bitFlag:g,uid:A,gid:R}=t.data;i={externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,creationDate:f,lastAccessDate:d,internalFileAttributes:E};const z=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Uc.has(r)||e.set(r,t.data)}),e.size)return e}}(S);if(z&&(i.extraField=z),A===T&&R===T||Object.assign(i,{uid:A,gid:R,unixExtraFieldType:"infozip"}),Xc(t,n)){let t;b&&(t=b.strength),s={passThrough:!0,encrypted:p,zipCrypto:h,crc32:m,uncompressedSize:w,encryptionStrength:t,compressionMethod:y},g&&(s.dataDescriptor=g.dataDescriptor);const e=a.lastModDate===T?n.lastModDate:a.lastModDate;if(e===T)s.rawLastModDate=l;else if(h&&(!g||g.dataDescriptor)&&e instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(e)!=(l>>>8&r))throw new Error(Fc)}}const c=Object.assign({lastModDate:t.gr},i,n,a,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===T)throw new Error(Dc);return{name:o,Ar:c}}function Gc(t,e){const{reader:r}=t;return r&&r.size!==T?r.size:t.Sr?T:Bc(t,e)}function Kc(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(xc);return t}function qc(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:T,uncompressedSize:r===T?0:r,Sr:r===T})}function Yc(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Xc(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Jc(t){return t.directory&&null===t.data}function Qc(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await $c(n)),"file"==n.kind){const t=await n.getFile();o.push(nu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===T&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function $c(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await $c(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function tu(t){t.entries=[],t.Er=0,t.root=new Cc(t)}function eu(t,e){const{entries:r,Er:n,root:o}=t;return tu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Er:n,root:o}),e})}function ru(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function nu(t,e,r,n){if(t.directory){const o=ou(e);return o&&(e=o.pop(),t=au(t,o)),n?new Cc(t.fs,e,r,t):new kc(t.fs,e,r,t)}throw new Error("Parent entry is not a directory")}function ou(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function au(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(mc);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Ec)}else t=new Cc(n.fs,e,{data:null},n)}),t}export{Rn as BlobReader,zn as BlobWriter,En as Data64URIReader,Sn as Data64URIWriter,Tc as ERR_ABORTED,Jo as ERR_AMBIGUOUS_ARCHIVE,Po as ERR_BAD_FORMAT,Zo as ERR_CENTRAL_DIRECTORY_NOT_FOUND,ui as ERR_DUPLICATED_NAME,yc as ERR_DUPLICATE_IMPORTED_ENTRY,Go as ERR_ENCRYPTED,Qo as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Xo as ERR_ENTRY_DATA_OUT_OF_BOUNDS,mc as ERR_ENTRY_EXISTS,Wo as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Lo as ERR_EOCDR_NOT_FOUND,Ho as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,on as ERR_HTTP_RANGE,an as ERR_HTTP_RESOURCE_CHANGED,Kt as ERR_INVALID_AUTHENTICATION_CODE,Ne as ERR_INVALID_CODEC_DEFINITION,Be as ERR_INVALID_CODEC_MODULE,li as ERR_INVALID_COMMENT,fi as ERR_INVALID_COMMENT_TYPE,Xe as ERR_INVALID_COMPRESSED_DATA,Je as ERR_INVALID_CRC32,pi as ERR_INVALID_DATE,bc as ERR_INVALID_DUPLICATES,yi as ERR_INVALID_ENCRYPTION_STRENGTH,di as ERR_INVALID_ENTRY_COMMENT,wi as ERR_INVALID_ENTRY_COMMENT_TYPE,hi as ERR_INVALID_ENTRY_NAME,gi as ERR_INVALID_EXTRAFIELD,zi as ERR_INVALID_EXTRAFIELD_DATA,Ri as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Ai as ERR_INVALID_EXTRAFIELD_TYPE,ea as ERR_INVALID_FILENAME_VALIDATION,tt as ERR_INVALID_FUNCTION_OPTION,_i as ERR_INVALID_GID,Zi as ERR_INVALID_LEVEL,ra as ERR_INVALID_MAX_APPENDED_DATA_SIZE,ut as ERR_INVALID_MAX_WORKERS,Li as ERR_INVALID_MSDOS_ATTRIBUTES,Wi as ERR_INVALID_MSDOS_DATA,Gt as ERR_INVALID_PASSWORD,rt as ERR_INVALID_PASSWORD_TYPE,Dc as ERR_INVALID_PASS_THROUGH,Mi as ERR_INVALID_READER,xc as ERR_INVALID_READER_OPTIONS,et as ERR_INVALID_SIGNAL,Vi as ERR_INVALID_SIGNATURE_DATA,ta as ERR_INVALID_STRICTNESS,Ni as ERR_INVALID_UID,Ye as ERR_INVALID_UNCOMPRESSED_SIZE,ji as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Pi as ERR_INVALID_UNIX_ID_SIZE,Bi as ERR_INVALID_UNIX_MODE,mi as ERR_INVALID_VERSION,sn as ERR_ITERATOR_COMPLETED_TOO_SOON,Vo as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Yo as ERR_OVERLAPPING_ENTRY,Sc as ERR_READABLE_CONSUMED,_e as ERR_RESERVED_COMPRESSION_METHOD,qo as ERR_SPLIT_ZIP_FILE,Ii as ERR_UNDEFINED_COMPRESSION_METHOD,Ci as ERR_UNDEFINED_READER,Ui as ERR_UNDEFINED_UNCOMPRESSED_SIZE,ki as ERR_UNDETERMINED_SIZE,$o as ERR_UNSAFE_FILENAME,je as ERR_UNSUPPORTED_COMPRESSION,$s as ERR_UNSUPPORTED_CONTEXT,Yt as ERR_UNSUPPORTED_CRYPTO_API,Ko as ERR_UNSUPPORTED_ENCRYPTION,Si as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,bi as ERR_UNSUPPORTED_ENCRYPTION_USDZ,Ti as ERR_UNSUPPORTED_FORMAT,Ei as ERR_UNSUPPORTED_SPLIT_USDZ,na as ERR_UNSUPPORTED_UINT64,br as ERR_WORKER_STARTUP_TIMEOUT,cn as ERR_WRITER_NOT_INITIALIZED,Fc as ERR_ZIP_CRYPTO_LAST_MOD_DATE,vi as ERR_ZIP_NOT_EMPTY,Gn as HttpRangeReader,Hn as HttpReader,yn as Reader,Yn as SplitDataReader,Xn as SplitDataWriter,Dn as TextReader,Fn as TextWriter,Kn as Uint8ArrayReader,qn as Uint8ArrayWriter,Hs as VERSION,la as WARNING_APPENDED_DATA,ia as WARNING_COMPRESSED_PATCHED_DATA,pa as WARNING_DUPLICATE_FILENAME,sa as WARNING_MALFORMED_EXTRA_FIELD,ma as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ya as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,ba as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ha as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,da as WARNING_PREPENDED_CENTRAL_DIRECTORY,fa as WARNING_PREPENDED_DATA,wa as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,aa as WARNING_UNKNOWN_VERSION,ca as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,oa as WARNING_UNSORTED_CENTRAL_DIRECTORY,ua as WARNING_WRAPPED_ENTRIES_COUNT,bn as Writer,Cc as ZipDirectoryEntry,Ic as ZipEntry,Mc as ZipFS,kc as ZipFileEntry,Da as ZipReader,xa as ZipReaderStream,Xi as ZipWriter,Ji as ZipWriterStream,St as configure,Xs as createBlobTempStream,qs as createOPFSTempStream,tc as createSyncAccessHandleTempStream,vc as fs,Ws as getMimeType,Ge as getRegisteredCodecs,Zs as getSupportedCompressionMethods,Fa as isZipFile,Ze as registerCodec,Dt as resetConfiguration,hc as terminateWorkers,Ve as unregisterCodec};
1
+ const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,x="/",D=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),T=void 0,I=1/0,U="undefined",C="function",k="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",K="useUnicodeFileNames",Y="dataDescriptor",q="offset",X="usdz",J="maxAppendedDataSize",Q="signCentralDirectory",$="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",at="compressed",it="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=C)throw new Error(it);return t}function dt(t){if(t&&(typeof t.addEventListener!=C||typeof t.aborted!=M))throw new Error(st);return t||T}function wt(t){if(t&&t.aborted)throw t.reason===T?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==T&&typeof t!=M&&t!==at)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==T&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=U&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=U&&CompressionStream,DecompressionStream:typeof DecompressionStream!=U&&DecompressionStream},zt="maxWorkers",xt="baseURI",Dt=["wasmURI","workerURI"],Ft=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Tt=[xt,...Dt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],It={...Rt};function Ut(){return It}function Ct(t){return kt(t.chunkSize)}function kt(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Tt){const n=t[r];n!==T&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==xt){if(e&&typeof e!=v)throw new Error(St)}else if(Dt.includes(t)&&e&&typeof e!=v&&typeof e!=C)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===T&&r===T)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===T&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===T&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Bt(){for(const t of Tt)delete It[t];Object.assign(It,Rt)}function Pt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Zt=[[],[],[],[],[],[],[],[]];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;Zt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Zt[e-1][t];Zt[e][t]=r>>>8^Zt[0][255&r]}const[Vt,Ht,Gt,Kt,Yt,qt,Xt,Jt]=Zt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^Xt[t>>>8&255]^qt[t>>>16&255]^Yt[t>>>24&255]^Kt[255&r]^Gt[r>>>8&255]^Ht[r>>>16&255]^Vt[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Vt[255&(e^t[n])];this.o=e}get(){return~this.o}}class $t extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function te(t){if(typeof TextEncoder==U){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const ee={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=ee.l(r);return 32===n?t.concat(e):ee.h(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+ee.l(r)},m(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=ee.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,h(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=ee.l(o);return n.push(ee.S(e+a&31,e+a>32?r:n.pop(),1)),n}},re={bytes:{A(t){const e=ee.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(ee.S(8*(3&r),n)),e}}},ne=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.O=t.O.slice(0),e.T=t.T.slice(0),e.I=t.I):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.T=[],t.I=0,t}update(t){const e=this;"string"==typeof t&&(t=re.U.R(t));const r=e.T=ee.concat(e.T,t),n=e.I,o=e.I=n+ee.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}v(){const t=this;let e=t.T;const r=t.O;e=ee.concat(e,[ee.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.I/4294967296)),e.push(0|t.I);e.length;)t.C(e.splice(0,16));return t.reset(),r}M(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}N(t,e){return e<<t|e>>>32-t}C(t){const e=this,r=e.O,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e.N(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e.N(5,o)+e.M(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e.N(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},oe={importKey:t=>new oe._(re.bytes.R(t)),j(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=ee;for(e=re.bytes.R(e),u=1;d<(o||1);u++){for(a=i=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;d<(o||1)&&s<a.length;s++)f.setInt32(d,a[s]),d+=4}return l.slice(0,n/8)},_:class{constructor(t){const e=this,r=e.B=ne,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).v());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e.P[0].update(n[0]),e.P[1].update(n[1]),e.L=new r(e.P[0])}reset(){const t=this;t.L=new t.B(t.P[0]),t.W=!1}update(t){this.W=!0,this.L.update(t)}digest(){const t=this,e=t.L.v(),r=new t.B(t.P[1]).update(e).v();return t.reset(),r}encrypt(t){if(this.W)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},ae=typeof crypto!=U&&typeof crypto.getRandomValues==C,ie="Invalid password",se="Invalid authentication code",ce="zipjs-abort-check-password",ue="Crypto API not supported";function le(t){if(ae)return crypto.getRandomValues(t);throw new Error(ue)}const fe=16,de={name:"PBKDF2"},we=Object.assign({hash:{name:"HMAC"}},de),pe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},de),he=["deriveBits"],me=[8,12,16],ye=[16,24,32],be=10,Ee=[0,0,0,0],Se=typeof crypto!=U,ge=Se&&crypto.subtle,Ae=Se&&typeof ge!=U,Re=re.bytes,ze=class{constructor(t){const e=this;e.Z=[[[],[],[],[],[]],[[],[],[],[],[]]],e.Z[0][0][0]||e.V();const r=e.Z[0][4],n=e.Z[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}V(){const t=this.Z[0],e=this.Z[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,u;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=i=0;!r[l];l^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[l]=a,n[a]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.Z[e],i=a[0],s=a[1],c=a[2],u=a[3],l=a[4];let f,d,w,p=t[0]^r[0],h=t[e?3:1]^r[1],m=t[2]^r[2],y=t[e?1:3]^r[3],b=4;for(let t=0;t<n;t++)f=i[p>>>24]^s[h>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=i[h>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&p]^r[b+1],w=i[m>>>24]^s[y>>16&255]^c[p>>8&255]^u[255&h]^r[b+2],y=i[y>>>24]^s[p>>16&255]^c[h>>8&255]^u[255&m]^r[b+3],b+=4,p=f,h=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[p>>>24]<<24^l[h>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=p,p=h,h=m,m=y,y=f;return o}},xe=class{constructor(t,e){this.G=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.G,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=ee.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return ee.m(e,o)}},De=oe._;let Fe=Se&&Ae&&typeof ge.importKey==C,Oe=Se&&Ae&&typeof ge.deriveBits==C;class Te extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){Ue(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await ke(t,e,r,Me(n,0,me[e])),a=Me(n,me[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(ie)}(r,a,o,Me(t,0,me[a]+2)),t=Me(t,me[a]+2),n?e.error(new Error(ce)):i()):await s;const c=new Uint8Array(t.length-be-(t.length-be)%fe);e.enqueue(Ce(r,t,c,0,be,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=Me(n,0,n.length-be),s=Me(n,n.length-be);let c=N;if(i.length){const t=_e(Re,i);r.update(t);const n=e.update(t);c=Ne(Re,n)}const u=Me(Ne(Re,r.digest()),0,be);let l=n.length<be?1:0;for(let t=0;t<be;t++)l|=u[t]^s[t];if(l&&o)throw new Error(se);t.enqueue(c)}}})}}class Ie extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){Ue(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=N;n?(s=await async function(t,e,r){const n=le(new Uint8Array(me[e]));return Pt(n,await ke(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%fe);c.set(s,0),e.enqueue(Ce(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=N;if(n.length){const t=e.update(_e(Re,n));r.update(t),a=Ne(Re,t)}const i=Ne(Re,r.digest()).slice(0,be);t.enqueue(Pt(a,i))}}})}}function Ue(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:ve(e,r),strength:n-1,it:N})}function Ce(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=Pt(c,e));const u=e.length-o;let l;for(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+(u-u%fe)),l=0;l<=u-fe;l+=fe){const t=_e(Re,Me(e,l,l+fe));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(Ne(Re,o),l+n)}return t.it=Me(e,l),r}async function ke(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!Fe)return oe.importKey(e);try{return await ge.importKey("raw",e,r,!1,o)}catch{return Fe=!1,oe.importKey(e)}}(0,r,we,0,he),a=await async function(t,e,r){if(!Oe)return oe.j(e,t.salt,pe.iterations,r);try{return await ge.deriveBits(t,e,r)}catch{return Oe=!1,oe.j(e,t.salt,pe.iterations,r)}}(Object.assign({salt:n},pe),o,8*(2*ye[e]+2)),i=new Uint8Array(a),s=_e(Re,Me(i,0,ye[e])),c=_e(Re,Me(i,ye[e],2*ye[e])),u=Me(i,2*ye[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new xe(new ze(s),Array.from(Ee)),ot:new De(c)}),u}function ve(t,e){return e===T?te(t):e}function Me(t,e,r){return t.subarray(e,r)}function Ne(t,e){return t.A(e)}function _e(t,e){return t.R(e)}class je extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Pe(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Le(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(ie);t=t.subarray(12)}n?e.error(new Error(ce)):e.enqueue(Le(r,t))}})}}class Be extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Pe(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=le(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(We(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(We(r,t),o),e.enqueue(n)}})}}function Pe(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{keys:n,ct:new Qt(n[0]),ut:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)Ze(t,r[e]);else for(let r=0;r<e.length;r++)Ze(t,e.charCodeAt(r))}(t,e,r)}function Le(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ve(t)^e[n],Ze(t,r[n]);return r}function We(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ve(t)^e[n],Ze(t,e[n]);return r}function Ze(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=Ge(Math.imul(Ge(r+He(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function Ve(t){const e=2|t.keys[2];return He(Math.imul(e,1^e)>>>8)}function He(t){return 255&t}function Ge(t){return 4294967295&t}function Ke(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Ye(t,e){t=Ke(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=C||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function qe(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Xe="Invalid codec definition",Je="Reserved compression method",Qe="Invalid codec module",$e="Compression method not supported",tr=[0,8,9,99],er=new Map,rr=new Map;function nr(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(Xe);if(tr.includes(r))throw new Error(Je);const c=typeof a==C||typeof i==C;if(!(c||typeof o==v&&o.length))throw new Error(Xe);er.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&cr(n,{CompressionStream:a,DecompressionStream:i})}function or(t){const e=er.get(t);if(e){let r;er.delete(t),er.forEach(t=>r=r||t.format==e.format),r||rr.delete(e.format)}}function ar(t){return er.get(t)}function ir(){return Array.from(er.values(),t=>Object.assign({},t,rr.get(t.format)))}function sr(t){return rr.get(t)}function cr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=C&&typeof n!=C)throw new Error(Qe);rr.set(t,{CompressionStream:r,DecompressionStream:n})}const ur="Invalid uncompressed size",lr="Invalid compressed data",fr="Invalid CRC32",dr="deflate-raw",wr="deflate64-raw",pr="gzip",hr=[31,139,8];class mr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&sr(f),S=c&&o&&!l&&!E&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||S||(h=new $t,b=xr(b,h)),o)if(E)b=Dr(b,Rr(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(S)y=new yr,b=Dr(b,new n(pr)),b=xr(b,y);else try{b=zr(b,i,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(pr)}catch{throw t}b=Dr(b,e),b=xr(b,new yr)}a&&(s?b=xr(b,new Be(t)):(m=new Ie(t),b=xr(b,m))),Ar(p,b,()=>{a&&!s||!c||(p.crc32=S?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class yr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Pt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Pt(r.subarray(0,i),t.subarray(0,a-i))),r=Pt(r.subarray(i),t.subarray(a-i))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class br extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y=super.readable;if(a&&(o?y=xr(y,new je(t)):(m=new Te(t),y=xr(y,m))),c){const t=f&&sr(f);if(t)y=Dr(y,Rr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{y=zr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===T)throw t;let e;try{e=new n(pr)}catch{throw t}y=function(t,e,r){const n=new Qt;let o,a,i,s=0,c=!1;const u=new Promise((t,e)=>{a=t,i=e});u.catch(()=>{}),r||a();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(hr),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Wt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&d(),e.enqueue(t)},cancel(t){i(t)}});return t=xr(t,l),xr(t=Dr(t,e),f);function d(){w(),o=setTimeout(()=>i(new Error(ur)),5e3)}function w(){clearTimeout(o)}}(y,e,p)}y=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(lr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(h=new $t,y=xr(y,h)),Ar(this,y,()=>{if(i){const t=new DataView(h.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(fr)}})}}const Er=new Map;function Sr(t,e){if(!t)return!1;let r=Er.get(t);r||(r=new Map,Er.set(t,r));let n=r.get(e);if(n===T){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function gr(t){return Sr(t,dr)}function Ar(t,e,r){e=xr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Rr(t,e,r){if(!t)throw new Error($e);return new t(e,r)}function zr(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?wr:dr;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return Dr(t,s)}function xr(t,e){return Ke(t).pipeThrough(e)}function Dr(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const Fr="data",Or="deflate",Tr="inflate";class Ir extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Or)?o=mr:n.startsWith(Tr)&&(o=br),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==T&&r.outputSize>t.outputSize))throw new Error(ur)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Ur extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const Cr="Worker startup timeout";let kr,vr,Mr,Nr=()=>{};async function _r(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(gr(e)||Sr(e,pr))return!0;if(r)try{return await Nr(t),!0}catch{return!1}return!1}function jr(t){t.createWorker?vr=!0:kr=!1}class Br{constructor(t,{readable:e,writable:r},{options:n,config:o,ft:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:u},l){const{signal:f}=a;return vr&&(u=T),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new Ur(Ct(o))).pipeThrough(new Pr(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:u,transferStreams:s,terminate:()=>new Promise(e=>{const{yt:r,wt:n}=t;r?(n?t.bt=e:(r.terminate(),e()),t.Et=null):e()}),St(){if(t.wt){const{bt:e}=t;e&&(t.bt=null,t.gt=!0,t.yt.terminate(),e()),t.wt=!1,l(t)}}}),kr===T&&(kr=typeof Worker!=U),(i&&Mr&&(kr&&c||u)?Mr:Wr)(t,o)}}class Pr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Lr(t,r)},async transform(t,n){o+=t.length,e&&await Lr(e,o,r),n.enqueue(t)},async flush(){n&&await Lr(n,o)}})}}async function Lr(t,...e){try{await t(...e)}catch{}}function Wr(t,e){return{run:()=>Zr(t,e)}}async function Zr({options:t,readable:e,writable:r,St:n},o){let a,i;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Or),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!gr(n))try{await Nr(o)}catch{}}else try{await Nr(o)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new Ir(t,o),i=new Ur(Ct(o)),await e.pipeThrough(a).pipeThrough(i).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:s,outputSize:c}=a;return{crc32:n,inputSize:s,outputSize:c}}catch(t){throw a&&(t.outputSize=i?i.outputSize:0),t}finally{n()}}const Vr={type:"module"},Hr="error";let Gr,Kr,Yr,qr=!0;try{qr=typeof structuredClone==C&&structuredClone(new DOMException("","AbortError")).code!==T}catch{}var Xr;function Jr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Qr(t){const{yt:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function $r(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(Kr===T||Gr!==t){const a=typeof t==C;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===T&&(n=!1),n&&(c=Vr);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return $r(t,e,r,n,!1);if(n)throw o;return $r(t,e,r,!0,!1)}}else{n===T&&(n=!0),n&&(c=Vr);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return $r(t,e,r,!1,o);throw a}}Gr=t,Kr=s,Yr=c}else i=new Worker(Kr,Yr);return i.addEventListener("message",t=>{r.At=!0,tn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,Rt:u,zt:l,St:f,ht:d}=e,w=()=>e.ht!=d;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),p(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();w()||rn({type:Fr,value:t,done:r,messageId:o},e)}if(r==Fr){const t=new Uint8Array(n);await c.ready,await c.write(t),e.outputSize+=t.length,w()||rn({type:"ack",messageId:o},e)}"close"==r&&p(null,a)}}catch(i){w()||(Qr(e),p(i))}function p(t,e){w()||(t?l(t):u(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(Hr,t=>en(t,r)),i.addEventListener("messageerror",t=>en(t,r)),i}function tn(t){const{xt:e}=t;e&&(clearTimeout(e),t.xt=null)}function en(t,e){t.preventDefault&&t.preventDefault(),tn(e);const{At:r,zt:n,writer:o,St:a}=e;Qr(e),r||(e.yt=null);let i=t.error||new Error(t.message||Hr);r||(i=Object.assign(new Error(i.message||Hr),{Dt:!0}),e.Ft=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function rn(t,{yt:e,writer:r,transferStreams:n,At:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&qr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{qr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Xr=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==C&&(a=a());try{i=$r(t.workerURI,r,t)}catch{return jr(t),Wr(t,e)}Object.assign(t,{yt:i,At:!1,gt:!1,Ft:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.yt){const{Ft:e}=t;t.Ft=null;const r=e||new Error(Cr);throw r.Dt=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{e&&e.outputSize===T&&(e.outputSize=t.outputSize),o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Rt:r,zt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Ot:u}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Ot:()=>e.abort()}}(t.writable);let l;try{l=rn({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.St(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.At&&Number.isFinite(f)&&f>=0&&(t.xt=setTimeout(()=>function(t){if(t.xt=null,t.At)return;const{zt:e,writer:r}=t;if(Qr(t),t.yt=null,e){const t=new Error(Cr);t.Dt=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(t){await d(),u();try{await c}catch{}throw t}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.Dt)return jr(t),Jr(t),Zr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Jr(t),Zr(t,e);t.St()}throw r}}}})}return t.Et},Mr=Xr;let nn=[];const on=[];let an,sn,cn=0;async function un(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!rr.has(t)&&e&&cr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===T&&n.transferStreams);const m=!(s||c||u||l),y=f===T||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(a||a===T&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:T,e.createWorker=e.useWebWorkers&&p?p:T,r.useCompressionStream=i||i===T&&n.useCompressionStream,(await async function(){const r=nn.find(t=>!t.wt);if(r)return pn(r),new Br(r,t,e,b);if(nn.length<h){const r={Tt:cn};return cn++,nn.push(r),new Br(r,t,e,b)}return new Promise(r=>{on.push({resolve:r,stream:t,It:e}),sn=n.workerStarvationTimeout,ln()})}()).run();function b(t){if(fn(),on.length){const[{resolve:e,stream:r,It:n}]=on.splice(0,1);e(new Br(t,r,n,b)),ln()}else t.yt?(pn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.gt?t.gt=!1:t.Ut=setTimeout(async()=>{nn=nn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):nn=nn.filter(e=>e!=t)}}function ln(){!an&&on.length&&Number.isFinite(sn)&&sn>=0&&(an=setTimeout(dn,sn))}function fn(){an&&(clearTimeout(an),an=null)}function dn(){if(an=null,on.length){const[{resolve:t,stream:e,It:r}]=on.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:T,createWorker:T});t(new Br({},e,n,wn)),ln()}}function wn(){fn(),ln()}function pn(t){const{Ut:e}=t;e&&(clearTimeout(e),t.Ut=null)}const hn="\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 mn(t,e){return yn(t,e,!0)}function yn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=hn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const bn="HTTP error ",En="HTTP Range not supported",Sn="HTTP resource changed",gn="Writer iterator completed too soon",An="Writer not initialized",Rn="Invalid writer (size must be writable)",zn="Content-Range",xn="Range",Dn="GET",Fn="bytes",On=16777216,Tn="writable",In=Symbol();class Un{constructor(){this.size=0}init(){this.initialized=!0}}class Cn extends Un{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=Ct(Ut())}={}){const n=this;let o=0;return r=kt(r),new ReadableStream({async pull(a){const i=e===T?r:Math.min(r,e-o),s=await bo(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==T&&o>=e||!s.length&&i)&&a.close()}})}}class kn extends Un{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(An);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Tn,{get:()=>e})}writeUint8Array(){}}class vn extends Cn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{Ct:t,kt:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{kt:r,Ct:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Mn extends kn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",vt:""})}writeUint8Array(t){const e=this;let r,n=e.vt;const o=e.vt.length;for(e.vt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.vt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.vt=n+e.vt}getData(){return this.data+btoa(this.vt)}}let Nn,_n;class jn extends Cn{constructor(t){super(),Object.assign(this,{Mt:t,size:t.size}),_n||(_n=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();Nn=1==e}catch{Nn=!1}})())}createReadable(t){const{Mt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==C){if(!n&&o>=r)return Ke(e.stream());if(Nn)return Ke(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.Mt:r.Mt.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class Bn extends Un{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Tn,{get:()=>r.writable}),e.contentType=t,e.Nt=Ye(r.readable,t),e.Nt.catch(()=>{})}getData(){return this.Nt}}class Pn extends jn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Ln(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class Wn extends Bn{constructor(t){super(),Object.assign(this,{encoding:t,_t:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,_t:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return yn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Zn extends Cn{constructor(t,e){super(),Hn(this,t,e)}async init(){await Gn(this,oo,to),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==T){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(En);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=T,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await oo(Dn,t,Qn(t,o,e));if(206!=r.status)throw new Error(En);const s=r.headers.get(zn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(En)}Jn(t,r),Xn(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return Kn(this,t,e,oo,to)}}class Vn extends Cn{constructor(t,e){super(),Hn(this,t,e)}async init(){await Gn(this,ao,eo),super.init()}readUint8Array(t,e){return Kn(this,t,e,ao,eo)}}function Hn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=On,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function Gn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ut(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==U||o)){const n=await e(Dn,t,Qn(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==Fn))throw new Error(En);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.jt=e)}Xn(t,n);const o=Yn(n);o===T?await no(t,e,r):t.size=o}}else await no(t,e,r)}async function Kn(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,jt:s,size:c,options:u}=t;if(a||i){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return N;{e+r>c&&(r=c-e);const o=await n(Dn,t,Qn(t,e,r));if(206!=o.status)throw new Error(En);const a=o.headers.get(zn);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(En)}Jn(t,o),Xn(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(En);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function Yn(t){const e=t.headers.get(zn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function qn({headers:t}){return{Bt:t.get("Etag")||T,lastModified:t.get("Last-Modified")||T}}function Xn(t,e){const{checkResourceChanges:r,Pt:n}=t;r&&!n&&206==e.status&&(t.Pt=qn(e))}function Jn(t,e){const{checkResourceChanges:r,Pt:n,size:o}=t;if(r){const t=Yn(e);if(t!==T&&o!==T&&t!=o)throw new Error(Sn);if(n){const t=qn(e);if(Object.entries(n).some(([e,r])=>r!==T&&t[e]!==T&&r!=t[e]))throw new Error(Sn)}}}function Qn(t,e=0,r=1){return Object.assign({},$n(t),{[xn]:Fn+"="+(e<0?e:e+"-"+(e+r-1))})}function $n({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function to(t){await ro(t,oo)}async function eo(t){await ro(t,ao)}async function ro(t,e){const r=await e(Dn,t,$n(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function no(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,$n(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function oo(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(En):new Error(bn+(a.statusText||a.status))}function ao(t,{url:e},r){return new Promise((n,o)=>{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 r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(En):new Error(bn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class io extends Cn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Vn(t,e):new Zn(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 so extends io{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class co extends Cn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Lt:t,size:t.length})}readUint8Array(t,e){return this.Lt.slice(t,t+e)}}class uo extends kn{constructor(t){super(),this.Wt=t||262144}init(t=0){Object.assign(this,{offset:0,Lt:new Uint8Array(t>0?t:this.Wt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Lt.length){let t=e.Lt.length?2*e.Lt.length:e.Wt;for(;t<r;)t*=2;const n=e.Lt;e.Lt=new Uint8Array(t),e.Lt.set(n)}e.Lt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Lt.length?this.Lt:this.Lt.slice(0,this.offset)}}class lo extends Cn{constructor(t){super(),this.Zt=t}async init(){const t=this;t.Vt=0;const e=t.Zt=await Promise.all(t.Zt.map(yo));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Gt(t){const{Ht:e,size:r}=this,n=e[t];return n===T?r:n}async readUint8Array(t,e){const r=this,{Zt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await bo(s,i,e);else{const a=n-i;o=Pt(await bo(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.Vt=Math.max(a,r.Vt),o}}class fo extends Un{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===In)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(gn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await mo(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,Tn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(In)}finally{t.releaseLock()}}}class wo{constructor(t){return Array.isArray(t)&&(t=new lo(t)),(t instanceof ReadableStream||typeof t.getReader==C)&&(t={readable:Ke(t)}),t}}class po{constructor(t){t.writable===T&&typeof t.next==C&&(t=new fo(t)),(t instanceof WritableStream||typeof t.getWriter==C)&&(t={writable:qe(t)});try{t.size=t.size===T?0:t.size}catch{throw new Error(Rn)}return t}}function ho(t){return Boolean(t&&t.getData)}async function mo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function yo(t){return t=new wo(t),await mo(t),t.size!==T&&t.readUint8Array||(t=new jn(await Ye(t.readable)),await mo(t)),t}function bo(t,e,r){return t.readUint8Array(e,r)}function Eo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Cn.prototype.createReadable.call(t,e):t.readable}function So(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==T&&(n.filename=r),t.push(n)}}const go="filename",Ao="rawFilename",Ro="comment",zo="rawComment",xo="uncompressedSize",Do="compressedSize",Fo="offset",Oo="diskNumberStart",To="lastModDate",Io="rawLastModDate",Uo="lastAccessDate",Co="rawLastAccessDate",ko="creationDate",vo="rawCreationDate",Mo="internalFileAttributes",No="externalFileAttributes",_o="msdosAttributesRaw",jo="msdosAttributes",Bo="msDosCompatible",Po="zip64",Lo="encrypted",Wo="version",Zo="versionMadeBy",Vo="zipCrypto",Ho="directory",Go="executable",Ko="compressionMethod",Yo="signature",qo="extraField",Xo="unixMode",Jo="setuid",Qo="setgid",$o="sticky",ta=[go,Ao,xo,Do,To,Io,Ro,zo,Uo,Co,ko,vo,Fo,Oo,Mo,No,_o,jo,Bo,Po,Lo,Wo,Zo,Vo,Ho,Go,"symlink",Ko,Yo,"crc32",qo,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Xo,"unixExternalUpper",Jo,Qo,$o,"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 ra=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function na(t,e,r){return t?e?12:16+4*r:0}const oa="File format is not recognized",aa="End of central directory not found",ia="End of Zip64 central directory locator not found",sa="Central directory header not found",ca="Local file header not found",ua="Zip64 extra field not found",la="File contains encrypted entry",fa="Encryption method not supported",da="Split zip file",wa="Overlapping entry found",pa="Entry data out of bounds",ha="Ambiguous archive",ma="Encrypted central directory is not supported",ya="Unsafe filename",ba="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ea="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Sa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ga="64-bit value exceeds Number.MAX_SAFE_INTEGER",Aa="unsorted central directory",Ra="unknown version needed to extract",za="compressed patched data",xa="malformed extra field",Da="unknown zip64 extensible data",Fa="wrapped entries count",Oa="appended data",Ta="prepended data",Ia="prepended central directory",Ua="trailing central directory data",Ca="duplicate filename",ka="mismatched zip64 end of central directory record",va="multiple end of central directory records",Ma="mismatched local file header (filename)",Na="mismatched local file header (general purpose bit flag)",_a="mismatched local file header (compression method)",ja="mismatched local file header (crc32 or sizes)",Ba=/^[a-zA-Z]:/,Pa="utf-8",La="cp437",Wa=[[xo,t],[Do,t],[Fo,t],[Oo,e]],Za={[e]:{Kt:xi,bytes:4},[t]:{Kt:Di,bytes:8}},Va=BigInt(Number.MAX_SAFE_INTEGER);class Ha{constructor(t,e={}){Object.assign(this,{reader:new wo(t),options:e,Yt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await mo(i),i.size!==T&&i.readUint8Array||(i=new jn(await Ye(i.readable)),await mo(i)),i.size<d)throw new Error(oa);const c=a.warnings=[],h=ci(n,a.options),m=h==rt,y=h!=ot,b=fi(Ei(a,n,J),h),E=function(t,e){if(t===T)return e;if(!si(t))throw new Error(Ea);return t}(Ei(a,n,"filenameValidation"),h),S=Ei(a,n,"normalizeFilename"),{qt:D,Xt:F}=await di(i,y,b);if(!D)throw await async function(t){return await ii(t)==o}(i)?new Error(da):new Error(aa);y&&F>1&&bi(va);const O=Wt(D);let I=xi(O,12),U=xi(O,16);const C=D.offset,k=zi(O,20),v=C+d+k,M=i.size-v;M>b&&bi(Oa),M>0&&So(c,Oa);let _=zi(O,4);const j=i.Vt||0;let B,P,L,W,Z,V=zi(O,6),H=zi(O,10),G=0,K=p;const Y=U==t||I==t||H==e||V==e;if(U!=t&&V!=e&&(U+=ai(i,V)),Y){const r=D.offset>=w?await bo(i,D.offset-w,w):N,n=Wt(r);if(r.length==w&&xi(n,0)==l){U=ai(i,xi(n,4))+Di(n,8);let r=await bo(i,U,p),o=Wt(r);const a=D.offset-w-p;if((r.length<p||xi(o,0)!=u)&&U!=a&&a>=0){const t=U;U=a,U>t&&(G=U-t),r=await bo(i,U,p),o=Wt(r)}if(r.length<p||xi(o,0)!=u)throw new Error(ia);if(L=!0,W=Di(o,4)>44,W){const t=Math.min(Di(o,4)-44,i.size-U-p);t>0&&(K+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=zi(r,26);Object.assign(e,{compressionMethod:zi(r,0),compressedSize:Di(r,2),uncompressedSize:Di(r,10),encryptionAlgorithm:zi(r,18),bitLength:zi(r,20),flags:zi(r,22),hashAlgorithm:zi(r,24),hashData:t.subarray(28,28+n)})}return e}(await bo(i,U+p,t)))}_==e?_=xi(o,16):_!=xi(o,16)&&yi(m,c,ka),V==e?V=xi(o,20):V!=xi(o,20)&&yi(m,c,ka),H==e?H=Di(o,32):H!=Di(o,32)&&yi(m,c,ka),I==t?I=Di(o,40):I!=Di(o,40)&&yi(m,c,ka),U=ai(i,V)+Di(o,48)+G}}let q=I;const X=D.offset-(L?K+w:0);if(U>=i.size&&(G=i.size-U-I-d,U=i.size-I-d),j!=_)throw new Error(da);if(U<0)throw new Error(oa);let Q=0,$=await bo(i,U,I),nt=Wt($);if(I){if($.length<4)throw new Error(oa);const t=X-I;if(U!=t&&V==_){const e=xi(nt,Q)==s||Boolean(Z&&Z.compressedSize)||qa(nt);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=xi(Wt(await bo(i,t,4)),0)==s),r){const r=U;U=t,U>r&&(G+=U-r,B=e),$=await bo(i,U,I),nt=Wt($)}}}const at=X-U;if(I!=at&&at>=0&&V==_&&(I=at,$=await bo(i,U,I),nt=Wt($)),U<0||U>=i.size)throw new Error(oa);a.directoryOffset=U,a.directoryLength=q;const it=Si(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&$.length>=4&&xi(nt,0)!=s&&(W||qa(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,q,$.length);ct=$.subarray(t),$=await it($.subarray(0,t),Z),nt=Wt($),q=$.length,st=!0}Z&&!st&&($.length<4||xi(nt,0)==s)&&So(c,Da),P=U;const ut=Ei(a,n,"filenameEncoding"),lt=Ei(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=Xa(nt,$,Q),H&&So(c,Fa));for(let t=0;t<H;t++){const o=new Ya(i,a.options);if(Q+f>$.length||xi(nt,Q)!=s){if(0==t&&!st&&(W||qa(nt)))throw new Error(ma);throw new Error(sa)}Qa(o,nt,Q+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=Q+f,d=l+o.filenameLength,w=d+o.extraFieldLength,p=zi(nt,Q+4),h=!(p>>8),m=p>>8==3,y=$.subarray(l,d),b=zi(nt,Q+32),D=w+b,F=$.subarray(w,D),O=u,I=u,U=xi(nt,Q+38),C=U&r,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=xi(nt,Q+42),M=Si(a,n,"decodeText")||mn,N=O?Pa:ut||La,_=I?Pa:lt||La;let j=M(y,N,tt);if(j===T&&(j=mn(y,N)),S){const t=S(j);t!==T&&(j=t)}if(li(j,E)){const t=new Error(ya);throw t.filename=j,t}let B=M(F,_,et);B===T&&(B=mn(F,_)),Object.assign(o,{index:t,Jt:st,versionMadeBy:p,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:b,offset:v,diskNumberStart:zi(nt,Q+34),internalFileAttributes:zi(nt,Q+36),externalFileAttributes:U,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:y,filenameUTF8:O,commentUTF8:I,rawExtraField:$.subarray(d,w),rawComment:F,filename:j,comment:B}),$a(o,o,nt,Q+6)&&So(c,xa,j),o.offset+=G;const L=ai(i,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&So(c,Aa,j),wt=L,(o.version&r)>63&&So(c,Ra,j),32&~o.rawBitFlag||So(c,za,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===T&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),K=Boolean(o.unixMode&z),Y=Boolean(512&o.unixMode),q=40960==((o.unixMode===T?Z:o.unixMode)&g),X=!q&&(o.unixMode!==T?!!(73&o.unixMode):m&&!!(73&Z)),J=o.unixMode!==T&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:K,sticky:Y,symlink:q,unixExternalUpper:Z,executable:X,directory:J||rt||h&&k.directory||o.filename.endsWith(x),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new ea(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.Yt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=Ye(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.Yt,Object.assign({},t,{preventClose:!1})),r},Q=D,t==H-1&&pt){const t=Xa(nt,$,Q);t&&(H+=t,So(c,Fa))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new ea(o))}catch{}yield ot}let ht=Q,mt=Ja($.subarray(Q))||(st?Ja(ct):T);if(!mt&&!st){const t=U+Q,e=Math.min(X-t,65541);e>=6&&(mt=Ja(await bo(i,t,e)))}mt&&(a.digitalSignature=mt,ht=Q+6+mt.length),(Q!=q&&ht!=q||!st&&Q!=I&&ht!=I)&&yi(m,c,Ua),dt&&yi(m,c,Ca);const yt=Ei(a,n,"extractPrependedData"),bt=Ei(a,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await ii(t);return e==o||808471376==e}(i)?4:0;return m&&(G||H&&P>Et)&&bi(Ta),(G||H&&P>4)&&So(c,Ta),B&&So(c,Ia),yt&&(a.prependedData=P>Et?await bo(i,Et,P-Et):N),a.comment=k?await bo(i,C+d,k):N,bt&&(a.appendedData=v<i.size?await bo(i,v,i.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class Ga{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new Ha(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function Ka(t,e={}){if(t=new wo(t),await mo(t),t.size!==T&&t.readUint8Array||(t=new jn(await Ye(t.readable)),await mo(t)),t.size<d)return!1;const r=ci(e,{}),n=r!=ot,o=fi(e[J],r),{qt:a,Xt:i}=await di(t,n,o);if(!a||r==rt&&i>1)return!1;const s=zi(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let Ya=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=Ut(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},z=e.warnings=[],x=ai(u,d)+f,F=await bo(u,x,D),O=Wt(F);let I=Ei(s,i,j),U=Ei(s,i,B);const C=ht(Ei(s,i,P)),k=Boolean(C),v=!0===C;if(pt(I,U),I=I&&I.length&&I,U=U&&U.length&&U,w&&99!=w.originalCompressionMethod)throw new Error($e);if(F.length<D||xi(O,0)!=n)throw new Error(ca);Qa(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=x+D+_+M,K=Ei(s,i,"checkLocalDirectory"),Y=ci(i,s.options),q=function(t,e){return t===T?e!=ot:Boolean(t)}(K,Y),X=Ei(s,i,"checkLocalFilename"),J=function(t,e){return t===T?e==rt:Boolean(t)}(X===T?K:X,Y);let Q=N;if(J&&(_||M)){const t=await bo(u,x+D,_+M);Q=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await bo(u,x+D+_,M):N;J&&(R.rawFilename=Q),$a(s,R,O,4,!0)&&So(z,xa),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||yi(i,o,Ma),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&yi(i,o,Na),e.compressionMethod!=t.compressionMethod&&yi(i,o,_a),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||yi(i,o,ja)}(s,R,Q,J,q?T:z);const{lastAccessDate:$,creationDate:tt,uid:et,gid:nt}=R;$&&(e.lastAccessDate=$),tt&&(e.creationDate=tt),et!==T&&e.uid===T&&(e.uid=et),nt!==T&&e.gid===T&&(e.gid=nt);const at=Ei(s,i,"checkPasswordOnly"),it=s.encrypted&&R.encrypted&&(!v||at),st=it&&!w;if(v||(e.zipCrypto=st),it&&!(64&~R.rawBitFlag))throw new Error(fa);const ct=k?T:ar(h);if(0!=h&&8!=h&&9!=h&&!ct&&!k)throw new Error($e);if(it){if(!st&&(w.strength<1||w.strength>3))throw new Error(fa);if(!I&&!U)throw new Error(la)}if(G+g>u.size)throw new Error(pa);const ut=g,lt=Ke(u.createReadable({offset:G,size:ut})),ft=dt(Ei(s,i,L));wt(ft);let mt=Ei(s,i,"checkOverlappingEntry");const yt=Ei(s,i,"checkOverlappingEntryOnly");yt&&(mt=!0);const{onstart:bt,onprogress:Et,onend:St}=i,gt=0!=h&&!k,At=k?g-na(it,st,w&&w.strength):S,Rt=9==h;let zt=Ei(s,i,Z);Rt&&(zt=!1);const xt=Ei(s,i,"checkCrc32"),Dt=(xt===T?Ei(s,i,"checkSignature"):xt)&&!k&&(!it||st||w&&1==w.vendorVersion),Ft={options:{codecType:Tr,password:I,rawPassword:U,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:Dt,checkAuthenticationCode:Ei(s,i,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:At,crc32:b,compressed:gt,encrypted:it,useWebWorkers:Ei(s,i,W),useCompressionStream:zt,transferStreams:Ei(s,i,V),deflate64:Rt,format:ct?ct.format:T,codecURI:ct?ct.codecURI:T,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:at},config:c,ft:{signal:ft,size:ut,onstart:bt,onprogress:Et,onend:St}};let Ot,Tt;mt&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,Yt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await bo(t,c+i,d+4),n=Wt(r);let u=r.length==d+4&&xi(n,0)==a;if(u){const t=oi(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=oi(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,$t:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(wa);throw t.overlappingEntry=e.$t,t}f.set(r,w)}({reader:u,$t:e,index:l,offset:x,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,Yt:o});try{if(!yt){at&&(t=new WritableStream),t=new po(t),await mo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(At,g,gt)),({writable:Ot}=t);const{outputSize:e}=await un({readable:lt,writable:Ot},Ft);if(e!=At)throw Object.assign(new Error(ur),{outputSize:e});t.size+=e}}catch(e){if(e.outputSize!==T&&(t.size+=e.outputSize),!at||e.message!=ce)throw Tt=e,e}finally{if((ho(t)||!Ei(s,i,H))&&Ot&&!Ot.locked){const t=Ot.getWriter();if(Tt)try{await t.abort(Tt)}catch{}else await t.close()}}return at||yt?T:t.getData?t.getData():Ot}};function qa(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==xi(t,r))return!0;return!1}function Xa(t,e,r){let n=0;for(;r+f<=e.length&&xi(t,r)==s;)r+=f+zi(t,r+28)+zi(t,r+30)+zi(t,r+32),n++;return n%65536?0:n}function Ja(t){if(t.length>=6){const e=Wt(t);if(xi(e,0)==i){const r=zi(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function Qa(t,e,r){const n=t.rawBitFlag=zi(e,r+2),o=!(1&~n),a=xi(e,r+6);Object.assign(t,{encrypted:o,version:zi(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:gi(a),filenameLength:zi(e,r+22),extraFieldLength:zi(e,r+24)})}function $a(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Wt(a);let c=0,u=!1;try{for(;c<a.length;){const t=zi(s,c),e=zi(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=zi(r,n+4);Object.assign(e,{signature:xi(r,n+10),crc32:xi(r,n+10),compressedSize:xi(r,n+14),uncompressedSize:xi(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=Wa.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Za[e].bytes,0);if(t.data.length<o)throw new Error(ua);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=Za[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=i.get(28789);d&&(ti(d,go,Ao,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(ti(w,Ro,zo,e,t),e.extraFieldUnicodeComment=w);const p=i.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=Ri(n,4);Object.assign(t,{vendorVersion:Ri(n,0),vendorId:Ri(n,2),strength:o,originalCompressionMethod:r,compressionMethod:zi(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=T)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=i.get(13);S&&(ei(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(ei(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=zi(r,o),a=zi(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Ai(o),lastAccessDate:Ai(a),creationDate:Ai(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let z;if(R&&(z=ri(R,e,!1),e.extraFieldUnix=R),!z){const t=i.get(b);t&&(ri(t,e,!0),e.extraFieldInfoZip=t)}const x=i.get(m);x&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=Ri(n,0),a=[],i=[];r?(1&~o||(a.push(To),i.push(Io)),2&~o||(a.push(Uo),i.push(Co)),4&~o||(a.push(ko),i.push(vo))):t.data.length>=5&&(a.push(To),i.push(Io));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=xi(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(x,e,o),e.extraFieldExtendedTimestamp=x);const D=i.get(y);return D&&(e.extraFieldUSDZ=D),u}function ti(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new Qt;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=xi(a,1),u=Ri(a,0);Object.assign(t,{version:u,[e]:mn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==xi(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function ei(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|xi(r,0))),lastModDate:new Date(1e3*(0|xi(r,4)))};t.data.length>=12&&(n.uid=zi(r,8),n.gid=zi(r,10)),Object.assign(t,n),Object.assign(e,n)}function ri(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=Ri(n,e++),i=Ri(n,e++);o=ni(t.data.subarray(e,e+i)),e+=i;const s=Ri(n,e++);a=ni(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=zi(n,0),a=zi(n,2),Object.assign(t,{uid:o,gid:a}));return o!==T&&(e.uid=o),a!==T&&(e.gid=a),o!==T||a!==T}catch{}}function ni(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function oi(t,e,r){const n=xi(t,e);let o,a;return r?(o=Di(t,e+4),a=Di(t,e+12)):(o=xi(t,e+4),a=xi(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function ai(t,e){return t.Gt?t.Gt(e):0}async function ii(t){return xi(Wt(await bo(t,0,4)))}function si(t){return t===rt||t===nt||t===ot}function ci(t,e){return ui(t,ui(e,nt))}function ui(t,e){const r=t.strictness;if(r!==T){if(!si(r))throw new Error(ba);return r}const n=t.checkAmbiguity;return n===T?e:n?rt:e==ot?ot:nt}function li(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Ba.test(t))||e==rt&&(r.includes(".")||r.includes(""))}function fi(t,r){if(t!==T){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Sa);return e}return r==rt?0:r==ot?1/0:e}async function di(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,u,l,f,w]of wi(t,o)){const o=zi(r,f+20);if(w+d+o==n){const o=await hi(t,r,u,f,w,n,a);if(2==o){if(i||(i=pi(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=pi(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of wi(t,o)){const o=pi(c,u,l);a||(a=o);const f=await hi(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{qt:i,Xt:c}}async function*wi(t,e){const r=t.size-e,n=await bo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)xi(o,t)==c&&(yield[o,r,n,t,r+t])}function pi(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function hi(r,n,o,a,i,c,u){const f=zi(n,a+10),d=xi(n,a+12),p=xi(n,a+16);if(f==e||d==t||p==t)return await mi(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=zi(n,a+6);for(const t of[i-d,ai(r,h)+p])if(await mi(r,n,o,t,c,u)==s)return 2;return 0}async function mi(t,e,r,n,o,a){return n<0||n+4>o?T:n>=r?xi(e,n-r):a.count>0?(a.count--,xi(Wt(await bo(t,n,4)),0)):T}function yi(t,e,r){t?bi(r):So(e,r)}function bi(t){const e=new Error(ha);throw e.reason=t,e}function Ei(t,e,r){return e[r]===T?t.options[r]:e[r]}function Si(t,e,r){return ft(Ei(t,e,r))}function gi(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<O?O:o}function Ai(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Ri(t,e){return t.getUint8(e)}function zi(t,e){return t.getUint16(e,!0)}function xi(t,e){return t.getUint32(e,!0)}function Di(t,e){const r=t.getBigUint64(e,!0);if(r>Va)throw new Error(ga);return Number(r)}var Fi=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ha,ERR_BAD_FORMAT:oa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:sa,ERR_ENCRYPTED:la,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ma,ERR_ENTRY_DATA_OUT_OF_BOUNDS:pa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ia,ERR_EOCDR_NOT_FOUND:aa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ua,ERR_INVALID_AUTHENTICATION_CODE:se,ERR_INVALID_COMPRESSED_DATA:lr,ERR_INVALID_CRC32:fr,ERR_INVALID_FILENAME_VALIDATION:Ea,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Sa,ERR_INVALID_PASSWORD:ie,ERR_INVALID_STRICTNESS:ba,ERR_INVALID_UNCOMPRESSED_SIZE:ur,ERR_LOCAL_FILE_HEADER_NOT_FOUND:ca,ERR_OVERLAPPING_ENTRY:wa,ERR_SPLIT_ZIP_FILE:da,ERR_UNSAFE_FILENAME:ya,ERR_UNSUPPORTED_COMPRESSION:$e,ERR_UNSUPPORTED_ENCRYPTION:fa,ERR_UNSUPPORTED_UINT64:ga,ERR_WORKER_STARTUP_TIMEOUT:Cr,WARNING_APPENDED_DATA:Oa,WARNING_COMPRESSED_PATCHED_DATA:za,WARNING_DUPLICATE_FILENAME:Ca,WARNING_MALFORMED_EXTRA_FIELD:xa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Na,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:_a,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ja,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ma,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ka,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:va,WARNING_PREPENDED_CENTRAL_DIRECTORY:Ia,WARNING_PREPENDED_DATA:Ta,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ua,WARNING_UNKNOWN_VERSION:Ra,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Da,WARNING_UNSORTED_CENTRAL_DIRECTORY:Aa,WARNING_WRAPPED_ENTRIES_COUNT:Fa,ZipReader:Ha,ZipReaderStream:Ga,isZipFile:Ka});const Oi="File already exists",Ti="Zip file comment exceeds 64KB",Ii="Invalid zip file comment (must be a Uint8Array)",Ui="File entry comment exceeds 64KB",Ci="Invalid file entry comment (must be a string)",ki="Invalid date (must be a valid Date instance)",vi="File entry name exceeds 64KB",Mi="Version exceeds 65535",Ni="The strength must equal 1, 2, or 3",_i="Encryption is not supported in USDZ files",ji="Split zip files are not supported in USDZ files",Bi="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Pi="Invalid extra field (must be a Map)",Li="Invalid extra field type (must be integer 0..65535)",Wi="Invalid extra field data (must be a Uint8Array)",Zi="Extra field data exceeds 64KB",Vi=-2147483648,Hi=2147483647,Gi=BigInt(0),Ki=BigInt("0x7fffffffffffffff"),Yi="Zip64 is not supported (set the 'zip64' option to 'true')",qi="Undefined uncompressed size",Xi="Undefined compression method",Ji="Undefined CRC32",Qi="Undetermined size",$i="Undefined reader",ts="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",es="Zip file not empty",rs="Invalid uid (must be integer 0..2^32-1)",ns="Invalid gid (must be integer 0..2^32-1)",os="Invalid UNIX mode (must be integer 0..65535)",as="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",is="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",ss="Invalid msdosAttributesRaw (must be integer 0..255)",cs="Invalid msdosAttributes (must be an object with boolean flags)",us="Invalid level (must be integer 0..9)",ls="Signature data exceeds 64KB",fs="Invalid entry option (must be an entry returned by ZipReader#getEntries())",ds="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",ws="compression unavailable",ps="clamped last modification date",hs=new Uint8Array([7,0,2,0,65,69,3,0,0]),ms="infozip",ys="unix",bs=[8,9,5,3];let Es=0;const Ss=[];class gs{constructor(t,e={}){t=new po(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[X])throw new Error(ji);Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[q]===T?t.size||t.writable.size||0:e[q],ne:e[q]===T?0:e[q]-(t.size||t.writable.size||0),oe:new Set,ae:[],warnings:[],ie:0,se:0,ce:T,ue:!1})}prependZip(t){return xs(this,async function(t,e){if(t.re.size)throw new Error(es);await t.le(e)}(this,t))}appendZip(t){return xs(this,this.le(t))}async le(t){const e=this,{oe:r,re:n,ee:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new wo(t),await mo(t),t.size!==T&&t.readUint8Array||(t=new jn(await Ye(t.readable)),await mo(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Fi}),i=new r(t),s=await i.getEntries();await i.close(),await mo(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Oi);n.add(t),c.push(t)}),e.fe=!0;const{de:f}=e;e.de=new Promise(t=>u=()=>{e.fe=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return Wt(await bo(t,0,4)).getUint32(0,!0)==o}(t)||(await Xs(e.writer,Ys()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>Ks(e,t)-Ks(e,r));let s=0;for(const r of i){const n=Ks(e,r);await Hs(t,e,s,n-s),Ws(o,await Gs(e,n))&&await o.closeDisk(),a.set(r,{offset:Zs(t,o),diskNumberStart:Ps(o)}),s=n}await Hs(t,e,s,n-s)}else{const o=t.offset;await Hs(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+Ks(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=Vs(f||N),t.extraFieldAES&&(l=99);const m=dc(f),y=Boolean(u)&&u.uncompressedSize!==T,b=Boolean(u)&&u.compressedSize!==T,E=-7&hc(w,p,h,i,l)|w<<1,{we:S,pe:g}=wc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,he:b,me:y,extraFieldLength:m}),{crc32:A}=t;A!==T&&uc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{ye:!0,me:y,he:b,offset:R,diskNumberStart:z,be:!1,Ee:N,Se:N,ge:N,Ae:N,Re:N,rawExtraField:f,ze:N,extendedTimestamp:!1,we:S,pe:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{oe:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[$];if(i!==T){const{xe:t,De:r}=Os(i,ht(ec(e,a,P)),ec(e,a,To));delete a[$],a=Object.assign(t,r,a)}if(ec(e,a,Ho)&&!n.endsWith(x)&&(n+=x),e.re.has(n))throw new Error(Oi);e.re.add(n),Es<Ut().maxWorkers?Es++:await new Promise(t=>Ss.push(t));try{return await async function(e,n,o,a){const i=Ts(e,n,a);({name:n}=i);const s=Is(e,n,a),{comment:c}=s,u=a[qo];e.ee.set(n,T);const l=e.ce,f={};let d,w;s.Fe.keepOrder&&(f.Oe=new Promise(t=>d=t)),e.ce=f;try{const{Fe:c}=s;0==c.level||c.compressionMethod!==T||c.Te||await _r(Ut())||(c.level=0,So(e.warnings,ws,n));const u=await async function(t,e,{Fe:r},n){if(r.Te&&!e&&!ec(t,n,Ho))throw new Error($i);let o;if(e){if(e=new wo(e),await mo(e),!e.readable&&!e.readUint8Array)throw new Error(ts);({size:o}=e)}return Object.assign({reader:e},Cs(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=Ls(e.writer),h=Ps(e.writer);let m=a.crc32===T?a[Yo]:a.crc32;const y=u.Fe.encrypted&&!c.zipCrypto;if(c.Te&&!c.Ie&&y&&(m=T),c.Te&&o&&!y&&m===T)throw new Error(Ji);const b=vs(a=Object.assign({},a,i.Fe,s.Fe,u.Fe,{signature:a[Yo],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.Ue&&So(e.warnings,ps,n);const E=_s(a),S=dc(b.Ce,E.ke);w=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ve:f,signal:d}=i,{Me:w,$t:p,Ne:h,_e:m}=a,y=e.options[X];let b,E,S,g,A,R,z,x=p,F=0;const O=u&&h?h.Oe:T;s.set(n,x);try{i.bufferedWrite||!u||e.fe||e.ie||e.se||!l&&!f?(b=!0,e.ie++,z=i.createTempStream?await i.createTempStream():new TransformStream(T,T,{highWaterMark:I}),z.size=0,await mo(c)):(E=!0,e.se++,z=c,await O,await U()),await mo(z);const p=Ls(c);e.te&&!b&&await qs(e,c),y&&!b&&Ms(a,e.offset-p);const{Ce:h}=w;b||await C();const m=Ps(c),S=Zs(e,c);if(x.diskNumberStart=m,b||(A=!0,R=c.size,await Xs(z,h)),x=await async function(e,n,{diskNumberStart:o,Oe:a},i,s,c){const{Me:u,je:l,Be:f}=i,{we:d,pe:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,Ee:S,Pe:g,ge:A,Le:R,We:z,Ae:x,Re:D,Se:F}=u,{ke:O}=l,{rawFilename:I,lastAccessDate:U,creationDate:C,password:k,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,ye:j,me:B,he:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:K,ze:Y,useWebWorkers:q,transferStreams:X,onstart:J,onprogress:Q,onend:$,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,Te:yt,Ie:bt,format:Et,codecURI:St}=c,gt={Oe:a,versionMadeBy:H,zip64:_,ye:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:I,commentUTF8:Boolean(N),rawComment:G,Ee:S,Pe:g,ge:A,Ae:x,Re:D,Se:F,rawExtraField:K,ze:Y,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,zt=0;yt||(Rt=0);const{writable:xt}=n;if(e){const o=e.size,a=Ke(Eo(e,{size:o})),i={options:{codecType:Or,inputSize:o,level:M,rawPassword:v,password:k,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:q,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,ft:{signal:tt,size:o,onstart:J,onprogress:Q,onend:$}};try{const e=await un({readable:a,writable:xt},i);if(zt=e.outputSize,n.size+=zt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&zt>=t||!B&&Rt>=t)throw new Error(Yi)}catch(t){throw t.outputSize!==T&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,Me:n,je:o},{zip64:a,zipCrypto:i,Te:s,dataDescriptor:c}){const{pe:u,encrypted:l}=n,{Ze:f,Ve:d}=o;l&&!i&&!s||t===T||(uc(u,10,t),c&&uc(f,d,t)),a?c&&(lc(f,d+4,BigInt(e)),lc(f,d+12,BigInt(r))):(uc(u,14,e),uc(u,18,r),c&&(uc(f,d+4,e),uc(f,d+8,r)))}({crc32:At,compressedSize:zt,uncompressedSize:Rt,Me:u,je:l},c),W&&await Xs(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:zt,lastModDate:p,rawLastModDate:h,creationDate:C,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+zt,compressionMethod:E,version:b,we:d,pe:w,signature:At,crc32:!m||L||yt?At:T,Le:R,We:z,me:B,he:P}),gt}(o,z,x,a,Ut(),i),b||(A=!1),s.set(n,x),x.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await U(),e.te&&await qs(e,c),g=!0,R=c.size,await C(),x.diskNumberStart=Ps(c),x.offset=Zs(e,c),y){const t=a.Be;Ms(a,e.offset-Ls(c)),x.size+=a.Be-t}!function({rawFilename:t,encrypted:e,zip64:r,Pe:n,crc32:o,compressedSize:a,uncompressedSize:i,me:s,he:c},u,{dataDescriptor:l,Te:f}){if(l||((!e||f&&o!==T)&&uc(u,14,o),c||uc(u,18,a),s||uc(u,22,i)),r&&n){const e=D+dc(t)+4;lc(u,e,BigInt(i)),lc(u,e+8,BigInt(a))}}(x,w.He,i),await Xs(c,w.Ce),await Js(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else x.diskNumberStart=m,x.offset=S;return e.offset+=x.size,x}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.ie--,E&&e.se--,m&&m(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function U(){e.fe=!0;const{de:t}=e;e.de=new Promise(t=>S=()=>{e.fe=!1,t()}),await t}async function C(){Ws(c,dc(w.Ce))&&await c.closeDisk()}}(e,n,o,{Me:b,je:E,Be:S,$t:f,Ne:l,_e:d},a)}catch(t){throw e.ee.delete(n),t}finally{d&&d(l&&l.Oe)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ea(w)}(e,n,o,a)}catch(t){throw e.re.delete(n),t}finally{const t=Ss.shift();t?t():Es--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),xs(a,s)}remove(t){const{re:e,ee:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==T){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{oe:a,writer:w}=this,{writable:p}=w;if(o.ue)return zs(w);if(!(r instanceof Uint8Array))throw new Error(Ii);if(dc(r)>e)throw new Error(Ti);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.Ge));const h=o.ae.filter(t=>t.error&&!t.Ke);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Ke=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Ye:a,qe:w}=js(r.ee),{Xe:p,Je:h,Qe:m}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await mo(i);let u=0,l=0,d=Ps(i),w=Ls(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:h,rawFilename:m,Ee:y,Se:b,ge:E,Ae:S,Re:g,rawExtraField:A,ze:R,rawComment:z,versionMadeBy:x,we:D,pe:F,me:O,he:T,be:I,$e:U,internalFileAttributes:C,externalFileAttributes:k,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=dc(y,b,E,S,g,A,R),j=f+dc(m,z)+_;Ws(i,u+j-l)&&(await Xs(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=Ps(i),w=Ls(i)),O||uc(F,18,M),T||uc(F,14,N),(U||I)&&n.version<45&&cc(F,0,45);const B=Bs(j);if(B.er(s),B.rr(x),B.nr(D.subarray(0,24)),B.rr(_),B.rr(dc(z)),B.rr(I?e:v),B.rr(C),B.er(k),B.er(U?t:h),B.nr(m),B.nr(y),B.nr(b),B.nr(E),B.nr(S),B.nr(g),B.nr(A),B.nr(R),B.nr(z),fc(c,B.Lt,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new ea(n))}catch{}}return await Xs(i,l?c.slice(l):c),{Xe:{diskNumber:d,diskOffset:w},Je:{diskNumber:Ps(i),ar:p},Qe:c}}(r,a,o),y=await async function(t,r,n){const o=nc(t,n,Q);if(o){const n=await o(r),a=dc(n);if(a>e)throw new Error(ls);const s=Bs(6+a);s.er(i),s.rr(a),s.nr(n);const{writer:c}=t;return Ws(c,dc(s.Lt))&&await c.closeDisk(),await Xs(c,s.Lt),6+a}return 0}(r,m,o);await async function(r,n,o,a){const{writer:i}=r,{Xe:s,Je:f,ir:w,qe:p}=a;let{Ye:h}=a,m=r.ee.size,y=s.diskNumber,b=Zs(r,s);const E=dc(n);if(E>e)throw new Error(Ti);let S=ec(r,o,Po),g=Ps(i);if(Ws(i,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(Yi);S=!0}else S===T&&p&&(S=!0);const A=Bs(S?98:d);Ws(i,dc(A.Lt)+E)&&await i.closeDisk(),g=Ps(i);let R=g==f.diskNumber?f.ar:0;S&&(A.er(u),A.sr(44),A.rr(45),A.rr(45),A.er(g),A.er(y),A.sr(R),A.sr(m),A.sr(h),A.sr(b),A.er(l),A.er(g),A.sr(BigInt(Zs(r,i))+BigInt(h)+BigInt(w)),A.er(g+1),ec(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.er(c),A.rr(g),A.rr(y),A.rr(R),A.rr(m),A.er(h),A.er(b),A.rr(E),await Xs(i,A.Lt),E&&await Xs(i,n)}(r,n,o,{Xe:p,Je:h,Ye:a,ir:y,qe:w})}(o,r,n),o.ue=!0,!ho(w)&&ec(o,n,H)||await p.getWriter().close(),zs(w)}[_](){return this.close()}}class As{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new gs(r,t),this.oe=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Ds(e,t)}}()}});return Fs(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return Fs(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ds(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ds(r,t),t}}}class Rs extends Promise{then(t,e){const{cr:r}=this;return r&&(r.Ke=!0),super.then(t,e)}}function zs(t){return t.getData?t.getData():t.writable}function xs(t,e){const r=new Rs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.cr=n,n.Ge=Promise.prototype.then.call(r,T,t=>n.error=t),t.ae.push(n),r}async function Ds(t,e){try{await t.writer.writable.abort(e)}catch{}}function Fs(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function Os(t,e,n){if(null===t||typeof t!=k||Array.isArray(t))throw new Error(fs);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[K]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{ra.has(r)||e.set(r,t.data)}),e.size)return e}}(E);x&&(z[qo]=x),A===T&&R===T||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?ys:ms});const D={};if(e&&!g)if(Object.assign(D,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==at&&Object.assign(D,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:T}),S&&(D.dataDescriptor=S.dataDescriptor,D[G]=bs[S.level]),n===T)D.rawLastModDate=c;else if(e!==at&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(ds);return{xe:z,De:D}}function Ts(n,o,a){let i=ec(n,a,Bo),s=ec(n,a,Zo,i?20:768);const c=ec(n,a,Go),u=oc(n,a,"uid"),l=oc(n,a,"gid");let f=oc(n,a,Xo),d=ec(n,a,"unixExtraFieldType"),w=ec(n,a,Jo),p=ec(n,a,Qo),h=ec(n,a,$o);if(yt(u,t,rs),yt(l,t,ns),yt(f,e,os),d!==T&&d!==ms&&d!==ys)throw new Error(as);if(d===ys&&(u!==T&&u>e||l!==T&&l>e))throw new Error(is);d!==T||u===T&&l===T||(d=ms);let m=oc(n,a,_o),y=ec(n,a,jo);const b=m!==T||y!==T;if(u!==T||l!==T||f!==T||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),yt(m,r,ss),y&&(typeof y!==k||Array.isArray(y)))throw new Error(cs);if(s>e)throw new Error(Mi);let E=ec(n,a,No);const S=E!==T;S||(E=0),!a[Ho]&&o.endsWith(x)&&(a[Ho]=!0);const D=ec(n,a,Ho);if(D?(o.endsWith(x)||(o+=x),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==T||Boolean(w||p||h);f=f===T?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),h?f|=512:h=Boolean(512&f),S&&!t||(D?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==T)t&=r;else if(e!==T){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===T&&(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}}(m,y)),b&&(E=E&t|m&r);const F=E>>16&e,O=f!==T&&40960==(f&g);return{name:o,Fe:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function Is(t,r,n){const o=nc(t,n,"encodeText")||te;let a=o(r,tt);if(a===T&&(a=te(r)),dc(a)>e)throw new Error(vi);const i=n[Ro]||"";if(typeof i!=v)throw new Error(Ci);let s=o(i,et);if(s===T&&(s=te(i)),dc(s)>e)throw new Error(Ui);const c=ec(t,n,Wo);if(c!==T&&c>e)throw new Error(Mi);const u=rc(t,n,To,new Date),l=ec(t,n,Io),f=rc(t,n,Uo),d=rc(t,n,ko),w=ec(t,n,Mo,0),p=ht(ec(t,n,P)),h=Boolean(p),m=!0===p,y=ec(t,n,j),b=ec(t,n,B);pt(y,b);const E=oc(t,n,"encryptionStrength",3),S=ec(t,n,Vo),g=ec(t,n,"extendedTimestamp",!0),A=ec(t,n,"ntfsTimestamp"),R=ec(t,n,"keepOrder",!0),z=ec(t,n,W),x=ec(t,n,V),D=ec(t,n,"bufferedWrite"),F=nc(t,n,"createTempStream"),O=ec(t,n,"dataDescriptorSignature",!0),I=dt(ec(t,n,L));wt(I);const U=ec(t,n,K,!pc(a)||!pc(s)),C=ec(t,n,Ko),k=h||C===T?T:ar(C);if(!h&&C!==T&&0!==C&&8!==C&&!k)throw new Error($e);let M=oc(t,n,G);if(yt(M,9,us),t.options[X]){if(y!==T||b!==T)throw new Error(_i);M===T&&C===T&&(M=0)}h&&(M=bt(n[G]));let N=ec(t,n,Z),_=ec(t,n,Y);D&&_===T&&(_=!1),(_===T||S&&!m)&&(_=!0),M!==T&&6!=M&&(N=!1);const H=ec(t,n,Po);if(!(S||y===T&&b===T||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(Ni);const q=Us(n[qo]),J=Us(n.localExtraField),Q=Us(n.centralExtraField);return{comment:i,Fe:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,Te:h,Ie:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:x,bufferedWrite:D,createTempStream:F,dataDescriptorSignature:O,signal:I,useUnicodeFileNames:U,compressionMethod:C,format:k?k.format:T,codecURI:k?k.codecURI:T,ur:k?k.versionNeeded:T,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:q,lr:J,ze:Q}}}function Us(t){if(!t)return N;if(!(t instanceof Map))throw new Error(Pi);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,Li),!(t instanceof Uint8Array))throw new Error(Wi);if(dc(t)>e)throw new Error(Zi);r+=4+dc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{cc(a,n,e),cc(a,n+2,dc(t)),fc(o,t,n+4),n+=4+dc(t)}),o}function Cs(e,r,n,o,a){const{Te:i,Ie:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(i&&r){if(y=a[xo],y===T)throw new Error(qi);if(h===T)throw new Error(Xi)}const E=!0===w,S=ec(e,a,Lo);if(r&&s&&!S&&dc(u,l))throw new Error(Bi);const g=r&&(Boolean(u&&dc(u)||l&&dc(l))||s&&S);r||(p=0,h=0);const A=na(g,c,f);r&&(i?(a.uncompressedSize=y,m=n===T?ac(y)+A:n+(s?0:A)):n===T?(d=!0,(w||w===T)&&(w=b=!0,m=4294967296)):(a.uncompressedSize=y=n,m=(ic(h,p)?ac(y):y)+A));const R=!(g||r&&(0!==n||i)||ic(h,p));R&&!c&&ec(e,a,Y)===T&&(d=!1);const z=E||b||y>=t,x=E||m>=t;if(z||x){if(!1===w)throw new Error(Yi);w=!0}return w=w||!1,{dr:m,Fe:{dataDescriptor:d,ve:R,zip64:w,ye:E,wr:b,me:z,he:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function ks(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function vs(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,lr:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,Te:R,encrypted:z,me:x,he:I,uncompressedSize:U,wr:C,crc32:k}=t;let{version:v,compressionMethod:M}=t;const _=!w&&ic(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!x&&!I||B&&!C),L=P||u&&d&&(x||I);if(u&&(x||I)){const t=20,e=Bs(t);if(e.rr(1),e.rr(t-4),j=e.Lt,P&&(e.sr(U),B)){const t=na(z,l,S);e.sr(R?0:U+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=Bs(dc(hs)+2);t.rr(h),t.nr(hs),W=t.Lt,W[8]=S}else W=N;if(g){const t=$s(o),e=(K=t)>=Vi&&K<=Hi;if(e){const e=9+(i?4:0)+(s?4:0),r=Bs(e);H=1+(i?2:0)+(s?4:0),G=t,r.rr(m),r.rr(e-4),r.pr(H),r.er(t),i&&r.er(tc($s(i))),s&&r.er(tc($s(s))),V=r.Lt}else V=N;if(A===T?!e||Boolean(i||s):A)try{const t=Qs(o),e=Bs(36);e.rr(10),e.rr(32),e.mr(4),e.rr(1),e.rr(24),e.sr(t),e.sr(i?Qs(i):t),e.sr(s?Qs(s):t),Z=e.Lt}catch{Z=N}else Z=N}else Z=V=N;var K;let Y;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=ms||r===T&&n===T)if(o!=ys||r===T&&n===T)Y=N;else{const t=Bs(8);t.rr(E),t.rr(4),t.rr((r===T?0:r)&e),t.rr((n===T?0:n)&e),Y=t.Lt}else{const t=Ns(r===T?0:r),e=Ns(n===T?0:n),o=3+t.length+e.length,a=Bs(4+o);a.rr(b),a.rr(o),a.pr(1),a.pr(t.length),a.nr(t),a.pr(e.length),a.nr(e),Y=a.Lt}}catch{Y=N}M===T&&(M=_?8:0),v===T&&(v=0!=M||w||z?20:10);const{ur:q}=t;_&&q!==T&&(v=v>q?v:q),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&k!==T&&(W[4]=1),cc(Wt(W),9,M),M=99);const J=L?dc(j):0,Q=J+dc(W,V,Z,Y,p,y);if(Q+(t[X]?67:0)>e)throw new Error(Zi);const $=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=$<O?O:$>F?F:$,et=dc(V)?new Date(1e3*$s(o)):dc(Z)?o:tt,{we:rt,pe:nt,rawLastModDate:ot}=wc({version:v,bitFlag:hc(c,f,d,z,M),compressionMethod:M,uncompressedSize:U,lastModDate:tt,rawLastModDate:a,rawFilename:r,he:I,me:x,extraFieldLength:Q}),at=Bs(D+dc(r)+Q),it=at.Lt,st=Wt(it);return at.er(n),at.nr(rt),at.nr(r),L&&at.nr(j),at.nr(W),at.nr(V),at.nr(Z),at.nr(Y),at.nr(p),at.nr(y),d&&(I||uc(st,18,0),x||uc(st,22,0)),{Ce:it,He:st,we:rt,pe:nt,lastModDate:et,Ue:et===tt&&$.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,Le:H,We:G,Ee:N,Pe:J,ge:V,Ae:Z,Re:Y,Se:W,extraFieldLength:Q}}function Ms(t,e){const{Me:r}=t;let{Ce:n,extraFieldLength:o}=r,a=64-(e+dc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);cc(s,0,y),cc(s,2,a-4);const c=n;r.Ce=n=new Uint8Array(dc(c)+a),fc(n,c),fc(n,i,dc(c));const u=Wt(n);cc(u,28,o+a),r.He=u,t.Be+=a}function Ns(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function _s({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(i=4,uc(n,0,a))),{ke:o,Ze:n,Ve:i}}function js(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Se:i,rawComment:s,Ae:c,Re:u,rawExtraField:l,ze:d,Le:w,We:p,ye:h,uncompressedSize:y,compressedSize:b}=a;let{me:E,he:S}=a;h||(E&&y<t&&(E=a.me=!1),S&&b<t&&(S=a.he=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=Bs(t);e.rr(1),e.rr(t-4),E&&e.sr(y),S&&e.sr(b),g&&e.sr(a.offset),A&&e.er(a.diskNumberStart),R=e.Lt}else R=N;if(a.Ee=R,a.$e=g,a.be=A,p===T)z=N;else{const t=Bs(9);t.rr(m),t.rr(5),t.pr(w),t.er(p),z=t.Lt}a.ge=z;const x=dc(R,i,c,u,z,l,d);if(x>e)throw new Error(Zi);n+=f+dc(r,s)+x}return{Ye:n,qe:o}}function Bs(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{Lt:e,pr:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},rr:t=>{cc(r,n,t),n+=2},er:t=>{uc(r,n,t),n+=4},sr:t=>{lc(r,n,BigInt(t)),n+=8},nr:t=>{fc(e,t,n),n+=dc(t)},mr:t=>n+=t}}function Ps(t){const{diskNumber:e=0}=t;return e}function Ls(t){const{diskOffset:e=0}=t;return e}function Ws(t,e){const{availableSize:r=I}=t;return e>r}function Zs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function Vs(t){const e=Wt(t);let r=0;for(;r+4<=dc(t);){const n=4+sc(e,r+2);if(1==sc(e,r))return Vs(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,dc(t)))));r+=n}return t}async function Hs(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await Js(Eo(e,{offset:r,size:n}),o,T,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function Gs(t,e){const r=await bo(t,e,D);if(dc(r)<D)return D;const n=Wt(r);return D+sc(n,26)+sc(n,28)}function Ks(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function Ys(){const t=new Uint8Array(4);return uc(Wt(t),0,o),t}async function qs(t,e){delete t.te,await Xs(e,Ys()),t.offset+=4}async function Xs(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=dc(e),await n.write(e)}finally{n.releaseLock()}}async function Js(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(dc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function Qs(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Gi?Gi:e>Ki?Ki:e}}function $s(t){return Math.floor(t.getTime()/1e3)}function tc(t){return Math.min(Hi,Math.max(Vi,t))}function ec(t,e,r,n){const o=e[r]===T?t.options[r]:e[r];return o===T?n:o}function rc(t,e,r,n){const o=ec(t,e,r,n);if(null===o)return n;if(o!==T&&(typeof o.getTime!=C||Number.isNaN(o.getTime())))throw new Error(ki);return o}function nc(t,e,r){return ft(ec(t,e,r))}function oc(t,e,r,n){return bt(ec(t,e,r,n))}function ac(t){return t+5*(Math.floor(t/16383)+1)}function ic(t,e){return t===T?e===T||e>0:0!==t}function sc(t,e){return t.getUint16(e,!0)}function cc(t,e,r){t.setUint16(e,r,!0)}function uc(t,e,r){t.setUint32(e,r,!0)}function lc(t,e,r){t.setBigUint64(e,r,!0)}function fc(t,e,r){t.set(e,r)}function dc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function wc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,he:u,me:l,extraFieldLength:f}){const d=Bs(26),w=d.Lt,p=Wt(w);if(d.rr(e),d.rr(r),d.rr(n),s===T){const t=new Uint32Array(1),e=Wt(t);cc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),cc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.er(s),d.mr(4),u||a!==T?d.er(u?t:a):d.mr(4),l||o!==T?d.er(l?t:o):d.mr(4),d.rr(dc(c)),d.rr(f),{we:w,pe:p,rawLastModDate:s}}function pc(t){return t.every(t=>t>=32&&t<=126)}function hc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function mc(){return"application/octet-stream"}function yc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Ut(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:bc(r,dr)||bc(t,dr)||bc(t,pr),decompression:bc(n,dr)||bc(e,dr)||bc(e,pr),registered:!1},{compressionMethod:9,compression:!1,decompression:bc(n,wr)||bc(e,wr),registered:!1}];for(const t of ir()){const e=sr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==C:T,decompression:e?typeof e.DecompressionStream==C:T,registered:!0})}return o}function bc(t,e){if(!t)return!1;const{yr:r}=t;return r?r.includes(e):Sr(t,e)}const Ec="2.12.0",Sc=1048576,gc=".zip.js-temp";function Ac(t={}){const{thresholdBytes:e=Sc,directoryName:r=gc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Rc=1048576;function zc(t={}){const{thresholdBytes:e=Rc}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=Ye(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?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(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const xc=1048576,Dc=".zip.js-temp",Fc="createSyncAccessHandle is only available in dedicated workers";function Oc(t={}){const{thresholdBytes:e=xc,directoryName:r=Dc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Fc);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;return{writable:u,readable:new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Tc="deflate",Ic="deflate-raw",Uc="deflate64-raw",Cc="gzip";let kc,vc,Mc,Nc,_c;function jc(t,e,r={}){if(!kc){const t=new Error("WASM module not loaded");throw t.cause=_c,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.Er=vc(o),this.in=vc(a),this.inBufferSize=a,!this.Er||!this.in)throw new Error("allocation failed");if(this.Sr=new Uint8Array(o),t?(this.gr=kc.deflate_process,this.Ar=kc.deflate_last_consumed,this.Rr=kc.deflate_end,this.zr=kc.deflate_new(),r=e===Cc?kc.deflate_init_gzip(this.zr,n):e===Ic?kc.deflate_init_raw(this.zr,n):kc.deflate_init(this.zr,n)):e===Uc?(this.gr=kc.inflate9_process,this.Ar=kc.inflate9_last_consumed,this.Rr=kc.inflate9_end,this.zr=kc.inflate9_new(),r=kc.inflate9_init_raw(this.zr)):(this.gr=kc.inflate_process,this.Ar=kc.inflate_last_consumed,this.Rr=kc.inflate_end,this.zr=kc.inflate_new(),r=e===Ic?kc.inflate_init_raw(this.zr):e===Cc?kc.inflate_init_gzip(this.zr):kc.inflate_init(this.zr)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(Nc.buffer),a=this.gr,i=this.Ar,s=this.Er,c=this.Sr;let u=0;for(;u<r.length;){const t=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Mc&&(Mc(this.in),this.in=0),this.in=vc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(u,u+t),this.in);const l=a(this.zr,this.in,t,s,o,0),f=l>>24&255,d=128&f?f-256:f;if(d<0)throw new Error("process error:"+d);const w=16777215&l;w&&(c.set(n.subarray(s,s+w),0),e.enqueue(c.slice(0,w)));const p=i(this.zr);if(0===p&&0===w)break;u+=p}}catch(t){i(this),e.error(t)}},flush(t){try{const e=new Uint8Array(Nc.buffer),r=this.gr,n=this.Er,a=this.Sr;for(;;){const i=r(this.zr,0,0,n,o,4),s=i>>24&255,c=128&s?s-256:s;if(c<0)throw new Error("process error:"+c);const u=16777215&i;if(u&&(a.set(e.subarray(n,n+u),0),t.enqueue(a.slice(0,u))),1===s||0===u)break}}catch(e){t.error(e)}finally{const e=i(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){i(this)}});function i(t){let e=0;return t.zr&&t.Rr&&(e=t.Rr(t.zr)),t.zr=0,t.in&&Mc&&Mc(t.in),t.in=0,t.Er&&Mc&&Mc(t.Er),t.Er=0,e}}class Bc{constructor(t=Tc,e){return jc(!0,t,e)}}class Pc{constructor(t=Tc,e){return jc(!1,t,e)}}Bc.lt=!0,Pc.lt=!0,Bc.yr=[Tc,Ic,Cc],Pc.yr=[Tc,Ic,Cc,Uc];let Lc,Wc=!1;async function Zc(){await async function(){await Promise.allSettled(nn.map(t=>(pn(t),t.terminate()))),kr=T,vr=!1}(),Lc=null,Wc=!1,kc=vc=Mc=Nc=_c=null}!function({Dr:t}){Nr=t}({Dr:t=>{if(!Lc){let{wasmURI:e}=t;typeof e==C&&(e=e()),Lc=async function(t,{baseURI:e}){if(!Wc)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}!function(t){if(kc=t,({malloc:vc,free:Mc,memory:Nc}=kc),"function"!=typeof vc||"function"!=typeof Mc||!Nc)throw kc=vc=Mc=Nc=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),Wc=!0}catch(t){throw function(t){_c=t}(t),t}}(e,t).catch(t=>{throw Lc=null,t})}return Lc}}),jt({CompressionStreamFallback:Bc,DecompressionStreamFallback:Pc}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Vc="Entry filename already exists",Hc="Duplicate entry filename in the imported zip file",Gc='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Kc="Entry is an ancestor of target entry",Yc="Root directory cannot be moved",qc="Target entry is not a directory",Xc="Parent entry is not a directory",Jc="Readable stream already consumed",Qc="throw",$c="keep-first",tu="keep-last",eu=new Set([Qc,$c,tu]),ru="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",nu="Invalid readerOptions (must be an object)",ou="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",au="zipjs-abort-export";class iu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Vc);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Fr++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Or:r.Or||r.uncompressedSize===T,passThrough:r.passThrough,Tr:r.Tr||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.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 r=e.parent;if(r){const n=vu(t);n&&(t=n.pop(),r=Mu(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Vc);r!=e.parent&&(bu(e),e.parent=r,r.children.push(e),Cu(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==T))}}class su extends iu{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new su(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===T||(t.constructor==Bn?e.type==r:t.constructor!=Mn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=mu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([mo(n),mo(t,o)]);const a=dt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof ea||!o&&!a&&!i?s:Ke(s).pipeThrough(new Pr({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!ho(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Ke(i).pipeTo(qe(t.writable),{signal:a,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,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(t.message==ie)return!1;throw t}}getText(t,e){return this.getData(new Wn(t),e)}getBlob(t,e){return this.getData(new Bn(t),e)}getData64URI(t,e){return this.getData(new Mn(t),e)}getUint8Array(t){return this.getData(new uo,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){zu(this,{data:t,Reader:jn,Writer:Bn,uncompressedSize:t.size})}replaceText(t){zu(this,{data:t,Reader:Pn,Writer:Wn,uncompressedSize:Ln(t)})}replaceData64URI(t){zu(this,{data:t,Reader:vn,Writer:Mn,uncompressedSize:xu(t)})}replaceUint8Array(t){zu(this,{data:t,Reader:co,Writer:uo,uncompressedSize:t.length})}replaceReadable(t){zu(this,{data:null,Reader:pu(t),Writer:null,uncompressedSize:T})}}class cu extends iu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new cu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return ku(this,t,{options:e},!0)}addText(t,e,r={}){return ku(this,t,{data:e,Reader:Pn,Writer:Wn,options:r,uncompressedSize:Ln(e)})}addBlob(t,e,r={}){return ku(this,t,{data:e,Reader:jn,Writer:Bn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return ku(this,t,{data:e,Reader:vn,Writer:Mn,options:r,uncompressedSize:xu(e)})}addUint8Array(t,e,r={}){return ku(this,t,{data:e,Reader:co,Writer:uo,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return ku(this,t,{data:e,Reader:class extends io{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return ku(this,t,{Reader:pu(e),options:r})}addFileSystemEntry(t,e={}){return Ou(this,t,e)}addFileSystemHandle(t,e={}){return Ou(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),ku(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 jn(t),e)}importData64URI(t,e){return this.importZip(new vn(t),e)}importUint8Array(t,e){return this.importZip(new co(t),e)}importHttpContent(t,e){return this.importZip(new io(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Bn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Mn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new uo,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;Ru(r.passThrough);const i=Au(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:T,onprogress:T,onend:T,preventClose:!1}),f=fu([t],t=>wu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Lr(n,f),await m(t,e),a&&await Lr(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await Lr(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Eu(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||Eu(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw w?new Error(au):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(au));try{r.entryName===T&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==C?(r=t,e=Object.assign({},r.options,e)):(await mo(t),r=new Ha(t,e)),Ru(e.passThrough);const n=function(t){if(t===T)return Qc;if(eu.has(t))return t;throw new Error(Gc)}(e.duplicates),o=[],a=await r.getEntries(e);for(const t of a){let r=this;try{const a=t.filename.split("/").filter(t=>""!=t&&"."!=t),i=a.pop();let s=!1;for(const t of a){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==$c){s=!0;break}if(n!=tu)throw new Error(Hc);this.fs.remove(r),r=new cu(this.fs,t,{data:null},e),o.push(r)}}else r=new cu(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(i){if(e=r.getChildByName(i),e&&!e.directory){if(n==$c)continue;if(n!=tu)throw new Error(Hc);this.fs.remove(e),e=T}e||(e=new cu(this.fs,i,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const a=r.getChildByName(i);if(a){if(n==$c)continue;if(n!=tu)throw new Error(Hc);this.fs.remove(a)}o.push(ku(r,i,{data:t,Reader:hu(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==C;e=Object.assign({},e),n||e.bufferedWrite!==T||(e.bufferedWrite=!0);const[o]=await Promise.all([yu(r,Au(e.readerOptions)),n?T:mo(t)]),a=n?t:new gs(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=fu(e.children,t=>Fu(t)?0:1);let f=0,d=0;if(a&&await Lr(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(Fu(e))return;const{name:a,xe:s}=Su(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:T,onend:T,onprogress:async t=>{f+=t-w,w=t,i&&await Lr(i,f,r)}}));d++,c&&await Lr(c,d,l,p)}s&&await Lr(s,f)}(a,r,fu([r],du),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Au((r=Object.assign({},r)).readerOptions),r.bufferedWrite===T&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!Fu(t)).map(t=>{const{name:e,xe:o}=Su(t,n,r);return{name:e,size:t.directory?0:gu(t,Du(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Fu(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(ft(r[Q]))throw new Error(Qi);if(a!==T&&!(a instanceof Uint8Array))throw new Error(Ii);const s=dc(a);if(s>e)throw new Error(Ti);const c=r[X],u=new Map,l=r[q]===T?0:r[q];let f=l,w=I;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);ec(i,o,Ho)&&!r.endsWith(x)&&(r+=x);const a=Ts(i,r,o);({name:r}=a);const{Fe:s}=Is(i,r,o);0==s.level||s.compressionMethod!==T||s.Te||await _r(Ut())||(s.level=0);const l=!ec(i,o,Ho);if(l&&n===T)throw new Error(Qi);const{dr:d,Fe:m}=Cs(i,l,n,s,o);if(l&&!s.Te&&ic(m.compressionMethod,m.level))throw new Error(Qi);const y=Object.assign({},o,a.Fe,s,m,{[X]:c}),b=vs(y),E=_s(y),S={Me:b,Be:dc(b.Ce,E.ke)};c&&Ms(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.Be+g;p.push(A),h.add(Boolean(y.ye||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||ks(p,l,!0)!=ks(p,l,!1)))&&!o)throw new Error(Qi);const{Ye:m,qe:y}=js(u);let b=ec(i,r,Po);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(Yi);b=!0}else b===T&&y&&(b=!0);return f-l+m+s+(b?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(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 r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class uu{constructor(){Iu(this)}get children(){return this.root.children}remove(t){bu(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=T}move(t,e){if(t==this.root)throw new Error(Yc);if(!e.directory)throw new Error(qc);if(e.isDescendantOf(t))throw new Error(Kc);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Vc)}else bu(t),t.parent=e,e.children.push(t),Cu(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):T;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}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,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}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 Uu(this,r=>r.importBlob(t,e))}importData64URI(t,e){return Uu(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return Uu(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return Uu(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return Uu(this,r=>r.importReadable(t,e))}importZip(t,e){return Uu(this,r=>r.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 lu={FS:uu,ZipDirectoryEntry:cu,ZipFileEntry:su};function fu(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function du(t){return t.uncompressedSize}function wu(t,e){const{data:r}=t;return e&&r instanceof ea?r.compressedSize:t.uncompressedSize}function pu(t){let e;return function(){if(e)throw new Error(Jc);return e=!0,{readable:t}}}function hu(t){return class extends Cn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,a=await e.entry.getData(new Bn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=a,e.Ir=new jn(a),e.size=a.size,super.init()}readUint8Array(t,e){return this.Ir.readUint8Array(t,e)}}}function mu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function yu(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async t=>{const r=t.reader=mu(t.Reader,t.data,e);o.set(t,r);try{await mo(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==T&&(t.uncompressedSize=r.size,t.Or=!1)})),o}function bu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Eu(t){return Boolean(t)&&t.message==au}function Su(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof ea){const e=Du(t,r),n=o.lastModDate===T?r.lastModDate:o.lastModDate;({xe:a,De:i}=Os(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.Tr},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===T)throw new Error(ru);return{name:n,xe:s}}function gu(t,e){const{reader:r}=t;return r&&r.size!==T?r.size:t.Or?T:wu(t,e)}function Au(t){if(t&&(typeof t!=k||Array.isArray(t)))throw new Error(nu);return t&&Ru(t.passThrough),t}function Ru(t){if(ht(t)===at)throw new Error(ou)}function zu(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:T,uncompressedSize:r===T?0:r,Or:r===T})}function xu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Du(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Fu(t){return t.directory&&null===t.data}function Ou(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await Tu(n)),"file"==n.kind){const t=await n.getFile();o.push(ku(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===T&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function Tu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await Tu(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function Iu(t){t.entries=[],t.Fr=0,t.root=new cu(t)}function Uu(t,e){const{entries:r,Fr:n,root:o}=t;return Iu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Fr:n,root:o}),e})}function Cu(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function ku(t,e,r,n){if(t.directory){const o=vu(e);return o&&(e=o.pop(),t=Mu(t,o)),n?new cu(t.fs,e,r,t):new su(t.fs,e,r,t)}throw new Error(Xc)}function vu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Mu(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Vc);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Kc)}else t=new cu(n.fs,e,{data:null},n)}),t}export{jn as BlobReader,Bn as BlobWriter,vn as Data64URIReader,Mn as Data64URIWriter,lt as ERR_ABORTED,ha as ERR_AMBIGUOUS_ARCHIVE,Kc as ERR_ANCESTOR_ENTRY,oa as ERR_BAD_FORMAT,sa as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Oi as ERR_DUPLICATED_NAME,Hc as ERR_DUPLICATE_IMPORTED_ENTRY,la as ERR_ENCRYPTED,ma as ERR_ENCRYPTED_CENTRAL_DIRECTORY,pa as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Vc as ERR_ENTRY_EXISTS,ia as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,aa as ERR_EOCDR_NOT_FOUND,ua as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,En as ERR_HTTP_RANGE,Sn as ERR_HTTP_RESOURCE_CHANGED,bn as ERR_HTTP_STATUS,se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,Xe as ERR_INVALID_CODEC_DEFINITION,Qe as ERR_INVALID_CODEC_MODULE,Ti as ERR_INVALID_COMMENT,Ii as ERR_INVALID_COMMENT_TYPE,lr as ERR_INVALID_COMPRESSED_DATA,fr as ERR_INVALID_CRC32,ki as ERR_INVALID_DATE,Gc as ERR_INVALID_DUPLICATES,Ni as ERR_INVALID_ENCRYPTION_STRENGTH,fs as ERR_INVALID_ENTRY,Ui as ERR_INVALID_ENTRY_COMMENT,Ci as ERR_INVALID_ENTRY_COMMENT_TYPE,vi as ERR_INVALID_ENTRY_NAME,Pi as ERR_INVALID_EXTRAFIELD,Zi as ERR_INVALID_EXTRAFIELD_DATA,Wi as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Li as ERR_INVALID_EXTRAFIELD_TYPE,Ea as ERR_INVALID_FILENAME_VALIDATION,it as ERR_INVALID_FUNCTION_OPTION,ns as ERR_INVALID_GID,us as ERR_INVALID_LEVEL,Sa as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,ss as ERR_INVALID_MSDOS_ATTRIBUTES,cs as ERR_INVALID_MSDOS_DATA,ie as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,ru as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,ts as ERR_INVALID_READER,nu as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,ls as ERR_INVALID_SIGNATURE_DATA,ba as ERR_INVALID_STRICTNESS,rs as ERR_INVALID_UID,ur as ERR_INVALID_UNCOMPRESSED_SIZE,as as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,is as ERR_INVALID_UNIX_ID_SIZE,os as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Mi as ERR_INVALID_VERSION,gn as ERR_ITERATOR_COMPLETED_TOO_SOON,ca as ERR_LOCAL_FILE_HEADER_NOT_FOUND,wa as ERR_OVERLAPPING_ENTRY,Xc as ERR_PARENT_NOT_DIRECTORY,Jc as ERR_READABLE_CONSUMED,Je as ERR_RESERVED_COMPRESSION_METHOD,Yc as ERR_ROOT_DIRECTORY_NOT_MOVABLE,da as ERR_SPLIT_ZIP_FILE,qc as ERR_TARGET_NOT_DIRECTORY,Xi as ERR_UNDEFINED_COMPRESSION_METHOD,Ji as ERR_UNDEFINED_CRC32,$i as ERR_UNDEFINED_READER,qi as ERR_UNDEFINED_UNCOMPRESSED_SIZE,Qi as ERR_UNDETERMINED_SIZE,ya as ERR_UNSAFE_FILENAME,$e as ERR_UNSUPPORTED_COMPRESSION,Fc as ERR_UNSUPPORTED_CONTEXT,ue as ERR_UNSUPPORTED_CRYPTO_API,fa as ERR_UNSUPPORTED_ENCRYPTION,Bi as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,_i as ERR_UNSUPPORTED_ENCRYPTION_USDZ,Yi as ERR_UNSUPPORTED_FORMAT,ou as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,ji as ERR_UNSUPPORTED_SPLIT_USDZ,ga as ERR_UNSUPPORTED_UINT64,Cr as ERR_WORKER_STARTUP_TIMEOUT,An as ERR_WRITER_NOT_INITIALIZED,Rn as ERR_WRITER_SIZE_NOT_WRITABLE,ds as ERR_ZIP_CRYPTO_LAST_MOD_DATE,es as ERR_ZIP_NOT_EMPTY,so as HttpRangeReader,io as HttpReader,Cn as Reader,lo as SplitDataReader,fo as SplitDataWriter,Pn as TextReader,Wn as TextWriter,co as Uint8ArrayReader,uo as Uint8ArrayWriter,Ec as VERSION,Oa as WARNING_APPENDED_DATA,ps as WARNING_CLAMPED_LAST_MODIFICATION_DATE,za as WARNING_COMPRESSED_PATCHED_DATA,ws as WARNING_COMPRESSION_UNAVAILABLE,Ca as WARNING_DUPLICATE_FILENAME,xa as WARNING_MALFORMED_EXTRA_FIELD,Na as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,_a as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,ja as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Ma as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,ka as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,va as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Ia as WARNING_PREPENDED_CENTRAL_DIRECTORY,Ta as WARNING_PREPENDED_DATA,Ua as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Ra as WARNING_UNKNOWN_VERSION,Da as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Aa as WARNING_UNSORTED_CENTRAL_DIRECTORY,Fa as WARNING_WRAPPED_ENTRIES_COUNT,kn as Writer,cu as ZipDirectoryEntry,iu as ZipEntry,uu as ZipFS,su as ZipFileEntry,Ha as ZipReader,Ga as ZipReaderStream,gs as ZipWriter,As as ZipWriterStream,vt as configure,zc as createBlobTempStream,Ac as createOPFSTempStream,Oc as createSyncAccessHandleTempStream,lu as fs,mc as getMimeType,ir as getRegisteredCodecs,yc as getSupportedCompressionMethods,Ka as isZipFile,nr as registerCodec,Bt as resetConfiguration,Zc as terminateWorkers,or as unregisterCodec};