@zip.js/zip.js 2.13.1 → 2.14.1

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 (51) hide show
  1. package/BENCHMARKS.md +349 -416
  2. package/deno.json +1 -1
  3. package/dist/zip-core-external.js +761 -945
  4. package/dist/zip-core-external.min.js +1 -1
  5. package/dist/zip-core.js +626 -911
  6. package/dist/zip-core.min.js +1 -1
  7. package/dist/zip-fs-core-external.js +768 -948
  8. package/dist/zip-fs-core-external.min.js +1 -1
  9. package/dist/zip-fs-core.js +633 -914
  10. package/dist/zip-fs-core.min.js +1 -1
  11. package/dist/zip-fs-external.js +768 -948
  12. package/dist/zip-fs-external.min.js +1 -1
  13. package/dist/zip-fs-native.js +635 -916
  14. package/dist/zip-fs-native.min.js +1 -1
  15. package/dist/zip-fs.js +771 -951
  16. package/dist/zip-fs.min.js +1 -1
  17. package/dist/zip-legacy.js +628 -913
  18. package/dist/zip-legacy.min.js +1 -1
  19. package/dist/zip-module.wasm +0 -0
  20. package/dist/zip-native.js +628 -913
  21. package/dist/zip-native.min.js +1 -1
  22. package/dist/zip-web-worker-native.js +1 -1
  23. package/dist/zip-web-worker.js +1 -1
  24. package/dist/zip.js +764 -948
  25. package/dist/zip.min.js +1 -1
  26. package/index-native.cjs +635 -916
  27. package/index-native.min.js +1 -1
  28. package/index.cjs +771 -951
  29. package/index.d.cts +52 -12
  30. package/index.d.ts +52 -12
  31. package/index.min.js +1 -1
  32. package/lib/core/codec-worker.js +37 -26
  33. package/lib/core/io.js +29 -21
  34. package/lib/core/streams/aes-crypto-stream.js +58 -99
  35. package/lib/core/streams/codecs/aes-hmac-sha1.js +486 -0
  36. package/lib/core/streams/zlib-wasm/aes-hmac-sha1-wasm.js +106 -0
  37. package/lib/core/streams/zlib-wasm/zlib-streams-loader.js +4 -0
  38. package/lib/core/streams/zlib-wasm/zlib-streams.js +2 -7
  39. package/lib/core/streams/zlib-wasm/zlib-streams.wasm +0 -0
  40. package/lib/core/version.js +1 -1
  41. package/lib/core/web-worker-base.js +15 -9
  42. package/lib/core/web-worker-inline-native.js +1 -1
  43. package/lib/core/web-worker-inline-wasm.js +1 -1
  44. package/lib/core/web-worker-wasm.js +2 -0
  45. package/lib/core/zip-fs.js +7 -3
  46. package/lib/core/zip-reader.js +53 -6
  47. package/lib/core/zip-writer.js +1 -2
  48. package/lib/core/zlib-streams-inline.js +1 -1
  49. package/lib/zip-module-wasm-base.js +3 -1
  50. package/package.json +1 -1
  51. package/lib/core/streams/codecs/sjcl.js +0 -795
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:s,Date:a,Map:c,Set:u,Response:l,URL:d,Error:f,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:S,TextEncoder:g,TextDecoder:b,document:E,crypto:z,btoa:x,TransformStream:R,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:C,navigator:I,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==E?E.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,K=22,Y=20,X=56,J=39169,Q=21589,$=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,st=1024,at="/",ct=30,ut=new a(2107,11,31,23,59,58),lt=new a(1980,0,1),dt=void 0,ft=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",St=new w,gt=k.asyncDispose||k(),bt="password",Et="rawPassword",zt="passThrough",xt="signal",Rt="useWebWorkers",Ft="useCompressionStream",Dt="transferStreams",At="preventClose",Ct="level",It="useUnicodeFileNames",Tt="dataDescriptor",kt="offset",vt="usdz",_t="maxAppendedDataSize",Nt="signCentralDirectory",Ut="entry",Ot="filename",Mt="comment",Lt="strict",Bt="balanced",Wt="tolerant",Pt="compressed",Zt="Invalid option (must be a function)",Ht="Invalid signal (must be an AbortSignal instance)",Vt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Gt="Invalid passThrough option (must be a boolean or 'compressed')",jt="The operation was aborted";function qt(t){if(t&&typeof t!=pt)throw new f(Zt);return t}function Kt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new f(Ht);return t||dt}function Yt(t){if(t&&t.aborted)throw t.reason===dt?new DOMException(jt,"AbortError"):t.reason}function Xt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new f(Vt)}function Jt(t){if(t!==dt&&typeof t!=yt&&t!==Pt)throw new f(Gt);return t}function Qt(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new f(n)}function $t(t,e,n){t!==dt&&Qt(t,e,n)}function te(t){return typeof t==mt&&t.trim()?o(t):t}const ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof I!=wt&&I.hardwareConcurrency&&(oe=I.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof C!=wt&&C},se="maxWorkers",ae="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",se,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],de=[ae,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],fe={...ie};function we(){return fe}function pe(t){return he(t.chunkSize)}function he(t){return t=te(t),o.isInteger(t)&&t>=1?s.max(t,64):65536}function me(t){const e={};for(const n of de){const r=t[n];r!==dt&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=te(e),t==se&&(!o.isInteger(e)||e<1))throw new f(ee)}else if(le.includes(t))qt(e);else if(t==ae){if(e&&typeof e!=mt)throw new f(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new f(re);return e}function Se(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function ge(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function be(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Ee(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function ze(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[Re,Fe,De,Ae,Ce,Ie,Te,ke]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=ke[255&t]^Te[t>>>8&255]^Ie[t>>>16&255]^Ce[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^Re[n>>>24&255]}}for(;r<n;r++)e=e>>>8^Re[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends R{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof g==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new g).encode(t)}const Ue={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=Ue.l(n);return 32===r?t.concat(e):Ue.h(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Ue.l(n)},m(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=Ue.S(e,t[n-1]&2147483648>>e-1,1)),t},S:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let o=0;o<t.length;o++)r.push(n|t[o]>>>e),n=t[o]<<32-e;const o=t.length?t[t.length-1]:0,i=Ue.l(o);return r.push(Ue.S(e+i&31,e+i>32?n:r.pop(),1)),r}},Oe={bytes:{R(t){const e=Ue.bitLength(t)/8,n=new w(e);let r;for(let o=0;o<e;o++)3&o||(r=t[o/4]),n[o]=r>>>24,r<<=8;return n},F(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3&~n||(e.push(r),r=0);return 3&n&&e.push(Ue.S(8*(3&n),r)),e}}},Me=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.A=[1518500249,1859775393,2400959708,3395469782],t?(e.C=t.C.slice(0),e.I=t.I.slice(0),e.T=t.T):e.reset()}reset(){const t=this;return t.C=t.D.slice(0),t.I=[],t.T=0,t}update(t){const e=this;"string"==typeof t&&(t=Oe.v.F(t));const n=e.I=Ue.concat(e.I,t),r=e.T,o=e.T=r+Ue.bitLength(t);if(o>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const i=new h(n);let s=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);t<=o;t+=e.blockSize)e._(i.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),e}N(){const t=this;let e=t.I;const n=t.C;e=Ue.concat(e,[Ue.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.T/4294967296)),e.push(0|t.T);e.length;)t._(e.splice(0,16));return t.reset(),n}U(t,e,n,r){return t<=19?e&n|~e&r:t<=39?e^n^r:t<=59?e&n|e&r|n&r:t<=79?e^n^r:void 0}O(t,e){return e<<t|e>>>32-t}_(t){const n=this,r=n.C,o=e(80);for(let e=0;e<16;e++)o[e]=t[e];let i=r[0],a=r[1],c=r[2],u=r[3],l=r[4];for(let t=0;t<=79;t++){t>=16&&(o[t]=n.O(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.O(5,i)+n.U(t,a,c,u)+l+o[t]+n.A[s.floor(t/20)]|0;l=u,u=c,c=n.O(30,a),a=i,i=e}r[0]=r[0]+i|0,r[1]=r[1]+a|0,r[2]=r[2]+c|0,r[3]=r[3]+u|0,r[4]=r[4]+l|0}},Le={importKey:t=>new Le.M(Oe.bytes.F(t)),L(t,e,n,r){if(n=n||1e4,r<0||n<0)throw new f("invalid params to pbkdf2");const o=1+(r>>5)<<2;let i,s,a,c,u;const l=new ArrayBuffer(o),d=new m(l);let w=0;const p=Ue;for(e=Oe.bytes.F(e),u=1;w<(o||1);u++){for(i=s=t.encrypt(p.concat(e,[u])),a=1;a<n;a++)for(s=t.encrypt(s),c=0;c<s.length;c++)i[c]^=s[c];for(a=0;w<(o||1)&&a<i.length;a++)d.setInt32(w,i[a]),w+=4}return l.slice(0,r/8)},M:class{constructor(t){const e=this,n=e.B=Me,r=[[],[]];e.W=[new n,new n];const o=e.W[0].blockSize/32;t.length>o&&(t=(new n).update(t).N());for(let e=0;e<o;e++)r[0][e]=909522486^t[e],r[1][e]=1549556828^t[e];e.W[0].update(r[0]),e.W[1].update(r[1]),e.P=new n(e.W[0])}reset(){const t=this;t.P=new t.B(t.W[0]),t.Z=!1}update(t){this.Z=!0,this.P.update(t)}digest(){const t=this,e=t.P.N(),n=new t.B(t.W[1]).update(e).N();return t.reset(),n}encrypt(t){if(this.Z)throw new f("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Be=typeof z!=wt&&typeof z.getRandomValues==pt,We="Invalid password",Pe="Invalid authentication code",Ze="zipjs-abort-check-password",He="Crypto API not supported";function Ve(t){if(Be)return z.getRandomValues(t);throw new f(He)}const Ge=16,je={name:"PBKDF2"},qe=n.assign({hash:{name:"HMAC"}},je),Ke=n.assign({iterations:1e3,hash:{name:"SHA-1"}},je),Ye=["deriveBits"],Xe=[8,12,16],Je=[16,24,32],Qe=10,$e=[0,0,0,0],tn=typeof z!=wt,en=tn&&z.subtle,nn=tn&&typeof en!=wt,rn=Oe.bytes,on=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.V();const n=e.H[0][4],r=e.H[1],o=t.length;let i,s,a,c=1;if(4!==o&&6!==o&&8!==o)throw new f("invalid aes key size");for(e.A=[s=t.slice(0),a=[]],i=o;i<4*o+28;i++){let t=s[i-1];(i%o===0||8===o&&i%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],i%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),s[i]=s[i-o]^t}for(let t=0;i;t++,i--){const e=s[3&t?i:i-4];a[t]=i<=4||t<4?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this.G(t,0)}decrypt(t){return this.G(t,1)}V(){const t=this.H[0],e=this.H[1],n=t[4],r=e[4],o=[],i=[];let s,a,c,u;for(let t=0;t<256;t++)i[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=s=0;!n[l];l^=a||1,s=i[s]||1){let i=s^s<<1^s<<2^s<<3^s<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,u=o[c=o[a=o[l]]];let d=16843009*u^65537*c^257*a^16843008*l,f=257*o[i]^16843008*i;for(let n=0;n<4;n++)t[n][l]=f=f<<24^f>>>8,e[n][i]=d=d<<24^d>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}G(t,e){if(4!==t.length)throw new f("invalid aes block size");const n=this.A[e],r=n.length/4-2,o=[0,0,0,0],i=this.H[e],s=i[0],a=i[1],c=i[2],u=i[3],l=i[4];let d,w,p,h=t[0]^n[0],m=t[e?3:1]^n[1],y=t[2]^n[2],S=t[e?1:3]^n[3],g=4;for(let t=0;t<r;t++)d=s[h>>>24]^a[m>>16&255]^c[y>>8&255]^u[255&S]^n[g],w=s[m>>>24]^a[y>>16&255]^c[S>>8&255]^u[255&h]^n[g+1],p=s[y>>>24]^a[S>>16&255]^c[h>>8&255]^u[255&m]^n[g+2],S=s[S>>>24]^a[h>>16&255]^c[m>>8&255]^u[255&y]^n[g+3],g+=4,h=d,m=w,y=p;for(let t=0;t<4;t++)o[e?3&-t:t]=l[h>>>24]<<24^l[m>>16&255]<<16^l[y>>8&255]<<8^l[255&S]^n[g++],d=h,h=m,m=y,y=S,S=d;return o}},sn=class{constructor(t,e){this.j=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.j,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,n){let r;if(!(r=e.length))return[];const o=Ue.bitLength(e);for(let o=0;o<r;o+=4){this.$(n);const r=t.encrypt(n);e[o]^=r[0],e[o+1]^=r[1],e[o+2]^=r[2],e[o+3]^=r[3]}return Ue.m(e,o)}},an=Le.M;let cn=tn&&nn&&typeof en.importKey==pt,un=tn&&nn&&typeof en.deriveBits==pt;class ln extends R{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){super({start(){fn(this,t,e,n)},async transform(t,e){const n=this,{password:o,strength:i,et:s,ready:a}=n;o?(await async function(t,e,n,r){const o=await pn(t,e,n,mn(r,0,Xe[e])),i=mn(r,Xe[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new f(We)}(n,i,o,mn(t,0,Xe[i]+2)),t=mn(t,Xe[i]+2),r?e.error(new f(Ze)):s()):await a;const c=new w(t.length-Qe-(t.length-Qe)%Ge);e.enqueue(wn(n,t,c,0,Qe,!0))},async flush(t){const{nt:e,ot:n,it:r,ready:i}=this;if(n&&e){await i;const s=mn(r,0,r.length-Qe),a=mn(r,r.length-Qe);let c=St;if(s.length){const t=Sn(rn,s);n.update(t);const r=e.update(t);c=yn(rn,r)}const u=mn(yn(rn,n.digest()),0,Qe);let l=r.length<Qe?1:0;for(let t=0;t<Qe;t++)l|=u[t]^a[t];if(l&&o)throw new f(Pe);t.enqueue(c)}}})}}class dn extends R{constructor({password:t,rawPassword:e,encryptionStrength:n}){super({start(){fn(this,t,e,n)},async transform(t,e){const n=this,{password:r,strength:o,et:i,ready:s}=n;let a=St;r?(a=await async function(t,e,n){const r=Ve(new w(Xe[e]));return ge(r,await pn(t,e,n,r))}(n,o,r),i()):await s;const c=new w(a.length+t.length-t.length%Ge);c.set(a,0),e.enqueue(wn(n,t,c,a.length,0))},async flush(t){const{nt:e,ot:n,it:r,ready:o}=this;if(n&&e){await o;let i=St;if(r.length){const t=e.update(Sn(rn,r));n.update(t),i=yn(rn,t)}const s=yn(rn,n.digest()).slice(0,Qe);t.enqueue(ge(i,s))}}})}}function fn(t,e,r,o){n.assign(t,{ready:new S(e=>t.et=e),password:hn(e,r),strength:o-1,it:St})}function wn(t,e,n,r,o,i){const{nt:s,ot:a,it:c}=t;c.length&&(e=ge(c,e));const u=e.length-o;let l;for(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+(u-u%Ge)),l=0;l<=u-Ge;l+=Ge){const t=Sn(rn,mn(e,l,l+Ge));i&&a.update(t);const o=s.update(t);i||a.update(o),n.set(yn(rn,o),l+r)}return t.it=mn(e,l),n}async function pn(t,r,o,i){t.password=null;const s=await async function(t,e,n,r,o){if(!cn)return Le.importKey(e);try{return await en.importKey("raw",e,n,!1,o)}catch{return cn=!1,Le.importKey(e)}}(0,o,qe,0,Ye),a=await async function(t,e,n){if(!un)return Le.L(e,t.salt,Ke.iterations,n);try{return await en.deriveBits(t,e,n)}catch{return un=!1,Le.L(e,t.salt,Ke.iterations,n)}}(n.assign({salt:i},Ke),s,8*(2*Je[r]+2)),c=new w(a),u=Sn(rn,mn(c,0,Je[r])),l=Sn(rn,mn(c,Je[r],2*Je[r])),d=mn(c,2*Je[r]);return n.assign(t,{keys:{key:u,st:l,passwordVerification:d},nt:new sn(new on(u),e.from($e)),ot:new an(l)}),d}function hn(t,e){return e===dt?Ne(t):e}function mn(t,e,n){return t.subarray(e,n)}function yn(t,e){return t.R(e)}function Sn(t,e){return t.F(e)}class gn extends R{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){En(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new f(We);t=t.subarray(12)}r?e.error(new f(Ze)):e.enqueue(zn(n,t))}})}}class bn extends R{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){En(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=Ve(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(xn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(xn(n,t),o),e.enqueue(r)}})}}function En(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{keys:o,ct:new ve(o[0]),ut:new ve(o[2])}),r)for(let e=0;e<r.length;e++)Rn(t,r[e]);else for(let n=0;n<e.length;n++)Rn(t,e.charCodeAt(n))}(t,e,r)}function zn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Fn(t)^e[r],Rn(t,n[r]);return n}function xn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Fn(t)^e[r],Rn(t,e[r]);return n}function Rn(t,e){let[,n]=t.keys;t.ct.append([e]);const r=~t.ct.get();n=An(s.imul(An(n+Dn(r)),134775813)+1),t.ut.append([n>>>24]);const o=~t.ut.get();t.keys=[r,n,o]}function Fn(t){const e=2|t.keys[2];return Dn(s.imul(e,1^e)>>>8)}function Dn(t){return 255&t}function An(t){return 4294967295&t}function Cn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}function In(t,e){t=Cn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function Tn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const kn="Invalid codec definition",vn="Reserved compression method",_n="Invalid codec module",Nn="Compression method not supported",Un=[0,8,9,99],On=new c,Mn=new c;function Ln(t){return On.get(t)}function Bn(){return e.from(On.values(),t=>n.assign({},t,Mn.get(t.format)))}function Wn(t){return Mn.get(t)}function Pn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new f(_n);Mn.set(t,{CompressionStream:n,DecompressionStream:r})}const Zn="Invalid uncompressed size",Hn="Invalid compressed data",Vn="Invalid CRC32",Gn="deflate-raw",jn="deflate64-raw",qn="gzip",Kn=[31,139,8];class Yn extends R{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:s,zipCrypto:a,computeCrc32:c,level:u,deflate64:l,format:d,compressionMethod:f,inputSize:w}=t,p=this;let h,y,S,g=super.readable;const b=d&&Wn(d),E=c&&o&&!l&&!b&&(!i||a)&&Boolean(s&&r);if(i&&!a||!c||E||(h=new _e,g=or(g,h)),o)if(b)g=ir(g,nr(b.CompressionStream,d,{level:u,chunkSize:e,compressionMethod:f,uncompressedSize:w}));else if(E)S=new Xn,g=ir(g,new r(qn)),g=or(g,S);else try{g=rr(g,s,{level:u,chunkSize:e},r,n)}catch(t){let e;try{e=new r(qn)}catch{throw t}g=ir(g,e),g=or(g,new Xn)}i&&(a?g=or(g,new bn(t)):(y=new dn(t),g=or(g,y))),er(p,g,()=>{i&&!a||!c||(p.crc32=E?S.crc32:new m(h.value.buffer).getUint32(0))})}}class Xn extends R{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=ge(n,t));const i=o-8,a=s.min(i,n.length);r.enqueue(ge(n.subarray(0,a),t.subarray(0,i-a))),n=ge(n.subarray(a),t.subarray(i-a))},flush(){const e=Ee(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Jn extends R{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:s,crc32:a,compressed:c,useCompressionStream:u,deflate64:l,format:d,compressionMethod:p,rawBitFlag:h,outputSize:y}=t;let g,b,E=super.readable;if(i&&(o?E=or(E,new gn(t)):(b=new ln(t),E=or(E,b))),c){const t=d&&Wn(d);if(t)E=ir(E,nr(t.DecompressionStream,d,{chunkSize:e,compressionMethod:p,rawBitFlag:h,uncompressedSize:y}));else try{E=rr(E,u,{chunkSize:e,deflate64:l},r,n)}catch(t){if(l||y===dt)throw t;let e;try{e=new r(qn)}catch{throw t}E=function(t,e,n){const r=new ve;let o,i,s,a=0,c=!1;const u=new S((t,e)=>{i=t,s=e});u.catch(()=>{}),n||i();const l=new R({start(t){const e=new w(10);e.set(Kn),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,p();try{await u}finally{h()}const e=new w(8),o=Ee(e);o.setUint32(0,r.get(),!0),o.setUint32(4,n,!0),t.enqueue(e)},cancel(t){s(t)}}),d=new R({transform(t,e){r.append(t),a+=t.length,a>=n?i():c&&p(),e.enqueue(t)},cancel(t){s(t)}});return t=or(t,l),or(t=ir(t,e),d);function p(){h(),o=v(()=>s(new f(Zn)),5e3)}function h(){_(o)}}(E,e,y)}E=function(t){const e=t.getReader();return new F({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new f(Hn);throw e.cause=t,e}const{value:r,done:o}=n;o?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}(E)}s&&(g=new _e,E=or(E,g)),er(this,E,()=>{if(s){const t=new m(g.value.buffer);if(a!=t.getUint32(0,!1))throw new f(Vn)}})}}const Qn=new c;function $n(t,e){if(!t)return!1;let n=Qn.get(t);n||(n=new c,Qn.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function tr(t){return $n(t,Gn)}function er(t,e,r){e=or(e,new R({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function nr(t,e,n){if(!t)throw new f(Nn);return new t(e,n)}function rr(t,e,n,r,o){const i=e&&r?r:o||r,s=n.deflate64?jn:Gn;let a;try{a=new i(s,n)}catch(t){if(!e||!o||i==o)throw t;a=new o(s,n)}return ir(t,a)}function or(t,e){return Cn(t).pipeThrough(e)}function ir(t,e){const n=e.writable.getWriter(),r=t.getReader();return async function(){try{for(;;){await n.ready;const t=await r.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(n,t),await async function(t,e){try{await t.cancel(e)}catch{}}(r,t)}}(),e.readable}const sr="data",ar="deflate",cr="inflate";class ur extends R{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(ar)?i=Yn:o.startsWith(cr)&&(i=Jn),r.outputSize=0;let s=0;const a=new i(t,e),c=super.readable,u=new R({transform(t,e){t&&t.length&&(s+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:s})}}),l=new R({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new f(Zn)},flush(){const{crc32:t}=a;n.assign(r,{crc32:t,inputSize:s})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(a).pipeThrough(l)})}}class lr extends R{constructor(t){const e=[];let r=0,i=0;function s(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=65536),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(s())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const dr="Worker startup timeout";let fr,wr,pr;async function hr(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;if(n&&!n.lt)return!0;if(tr(e)||$n(e,qn))return!0;if(n)try{return await void 0,!0}catch{return!1}return!1}function mr(t){t.createWorker?wr=!0:fr=!1}class yr{constructor(t,{readable:e,writable:r},o,i){const{options:s,config:a,ft:c,useWebWorkers:u,transferStreams:l,workerURI:d}=o;let{createWorker:f}=o;const{signal:w}=c;return wr&&(f=dt),n.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new lr(pe(a))).pipeThrough(new Sr(c),{signal:w}),writable:r,options:n.assign({},s),yt:o,workerURI:d,createWorker:f,transferStreams:l,terminate:()=>new S(e=>{const{St:n,wt:r}=t;n?(r?t.gt=e:(n.terminate(),e()),t.bt=null):e()}),Et(){if(t.wt){const{gt:e}=t;e&&(t.gt=null,t.zt=!0,t.St.terminate(),e()),t.wt=!1,i(t)}}}),fr===dt&&(fr=typeof T!=wt),(u&&pr&&(fr&&d||f)?pr:br)(t,a)}}class Sr extends R{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await gr(t,n)},async transform(t,r){o+=t.length,e&&await gr(e,o,n),r.enqueue(t)},async flush(){r&&await gr(r,o)}})}}async function gr(t,...e){try{await t(...e)}catch{}}function br(t,e){return{run:()=>Er(t,e)}}async function Er({options:t,readable:e,writable:n,Et:r,yt:o},i){let s,a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(ar),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;if(t.useCompressionStream){if(n&&n.lt&&!tr(r))try{await void 0}catch{}}else try{await void 0}catch{n&&!n.lt||(t.useCompressionStream=!0)}}s=new ur(t,i),a=new lr(pe(i)),await e.pipeThrough(s).pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{crc32:r,inputSize:o,outputSize:c}=s;return{crc32:r,inputSize:o,outputSize:c}}catch(t){if(s){const e=a?a.outputSize:0;if(o.outputSize=e,ze(t))try{t.outputSize=e}catch{}}throw t}finally{r()}}const zr={type:"module"},xr="error";let Rr,Fr,Dr,Ar=!0;try{Ar=typeof N==pt&&N(new DOMException("","AbortError")).code!==dt}catch{}var Cr;function Ir(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Tr(t){const{St:e}=t;if(e)try{e.terminate()}catch{}t.bt=null}function kr(t,e,r,o,i=!0){const{createWorker:s}=r;let a,c,u;if(s)a=s();else if(Fr===dt||Rr!==t){const n=typeof t==pt;c=n?t(i):t;const s=c.startsWith("data:"),l=c.startsWith("blob:");if(s||l){o===dt&&(o=!1),o&&(u=zr);try{a=new T(c,u)}catch(i){if(l)try{d.revokeObjectURL(c)}catch{}if(n&&l)return kr(t,e,r,o,!1);if(o)throw i;return kr(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=zr);try{c=new d(c,e)}catch{}try{a=new T(c,u)}catch(n){if(o)return kr(t,e,r,!1,i);throw n}}Rr=t,Fr=c,Dr=u}else a=new T(Fr,Dr);return a.addEventListener("message",t=>{r.xt=!0,vr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:s,error:a,errorValue:c}=t,{reader:u,writer:l,Rt:d,Ft:p,Et:h,ht:m}=e,y=()=>e.ht!=m;try{if(a)S(function(t,e){const{message:r,stack:o,code:i,name:s,outputSize:a,cause:c,codecImportFailed:u}=t;let l;if(e?l=e.value:(l=n.assign(new f(r),{stack:o,code:i,name:s}),c&&(l.cause=n.assign(new f(c.message),{name:c.name}))),ze(l))try{a!==dt&&(l.outputSize=a),u&&(l.codecImportFailed=!0),e&&(l.name!==s&&(l.name=s),l.code!==i&&(l.code=i))}catch{}return l}(a,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Nr({type:sr,value:t,done:n,messageId:i},e)}if(r==sr){const t=new w(o);await l.ready,await l.write(t),y()||Nr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(d(t),g(),h())}(s)}}catch(a){y()||(Tr(e),S(a))}function S(t){y()||(p(t),g(),ze(t)&&t.codecImportFailed||h())}function g(){l&&l.releaseLock()}}(t,r)}),a.addEventListener(xr,t=>_r(t,r)),a.addEventListener("messageerror",t=>_r(t,r)),a}function vr(t){const{Dt:e}=t;e&&(_(e),t.Dt=null)}function _r(t,e){t.preventDefault&&t.preventDefault(),vr(e);const{xt:r,Ft:o,writer:i,Et:s}=e;Tr(e),r||(e.St=null);let a=t.error||new f(t.message||xr);r||(a=n.assign(new f(a.message||xr),{At:!0}),e.Ct=a),o&&(o(a),i&&i.releaseLock(),r&&s())}function Nr(t,{St:e,writer:n,transferStreams:r,xt:o}){try{const{value:n,readable:i,writable:s}=t,a=[];if(n&&(t.value=be(n),a.push(t.value.buffer)),r&&Ar&&o?(i&&a.push(i),s&&a.push(s)):t.readable=t.writable=null,a.length)try{return e.postMessage(t,a),!0}catch{Ar=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Cr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:s}=e;let{wasmURI:a}=e;if(!t.bt){let c;typeof a==pt&&(a=a());try{c=kr(t.workerURI,r,t)}catch{return mr(t),br(t,e)}n.assign(t,{St:c,xt:!1,zt:!1,Ct:null,bt:{run:async()=>{try{return await async function(t,e){if(!t.St){const{Ct:e}=t;t.Ct=null;const n=e||new f(dr);throw n.At=!0,n}let r,i;const s=new S((e,n)=>{r=e,i=e=>{const{outputSize:r,yt:o}=t;if(o.outputSize=r,ze(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,It:!1,Tt:null,Rt:r,Ft:i,result:s});const{readable:a,options:c}=t,{writable:u,closed:l,kt:d}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:s}=new R({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),a=s.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return a.catch(t=>{o||n.assign(e,{It:!0,Tt:t})}),{writable:i,closed:a,kt:()=>{o=!0,r.abort()}}}(t.writable,t);let w;try{w=Nr({type:"start",options:c,config:e,readable:a,writable:u},t)}catch(e){d();try{await l}catch{}throw t.Et(),e}w||n.assign(t,{reader:a.getReader(),writer:u.getWriter()});const{workerStartupTimeout:p}=e;!t.xt&&o.isFinite(p)&&p>=0&&(t.Dt=v(()=>function(t){if(t.Dt=null,t.xt)return;const{Ft:e,writer:n}=t;if(Tr(t),t.St=null,e){const t=new f(dr);t.At=!0,e(t),n&&n.releaseLock()}}(t),p));try{const t=await s;return await h(),await l,t}catch(e){await h(),d();try{await l}catch{}const{outputSize:n,yt:r,It:o,Tt:i}=t;r.outputSize=n;const s=ze(e)&&(e.codecImportFailed||e.At),a=o&&!s?i:e;if(ze(a))try{a.outputSize=n}catch{}throw a}async function h(){if(!w&&!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:a,baseURI:r,workerStartupTimeout:s})}catch(n){if(n&&n.At)return mr(t),Ir(t),Er(t,e);if(n&&n.codecImportFailed){if(t.reader)return Ir(t),Er(t,e);t.Et()}throw n}}}})}return t.bt},pr=Cr;let Ur=[];const Or=[];let Mr,Lr,Br=0;async function Wr(t,e){const{options:n,config:r}=e,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,compressed:c,checkCrc32:u,computeCrc32:l,encrypted:f,format:w,codecURI:p}=n,{workerURI:h,createWorker:m,maxWorkers:y}=r;w&&(p&&(n.codecURI=function(t,e){try{return new d(t,e).toString()}catch{return t}}(p,r.baseURI)),await async function(t,e){!Mn.has(t)&&e&&Pn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(w,n.codecURI)),e.transferStreams=!w&&(i||i===dt&&r.transferStreams);const g=!(c||u||l||f),b=w===dt||Boolean(n.codecURI);return e.useWebWorkers=!g&&b&&(s||s===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&h?h:dt,e.createWorker=e.useWebWorkers&&m?m:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=Ur.find(t=>!t.wt);if(n)return Gr(n),new yr(n,t,e,E);if(Ur.length<y){const n={vt:Br};return Br++,Ur.push(n),new yr(n,t,e,E)}return new S(n=>{Or.push({resolve:n,stream:t,yt:e}),Lr=r.workerStarvationTimeout,Pr()})}()).run();function E(t){if(Zr(),Or.length){const[{resolve:e,stream:n,yt:r}]=Or.splice(0,1);e(new yr(t,n,r,E)),Pr()}else t.St?(Gr(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.zt?t.zt=!1:t._t=v(async()=>{Ur=Ur.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Ur=Ur.filter(e=>e!=t)}}function Pr(){!Mr&&Or.length&&o.isFinite(Lr)&&Lr>=0&&(Mr=v(Hr,Lr))}function Zr(){Mr&&(_(Mr),Mr=null)}function Hr(){if(Mr=null,Or.length){const[{resolve:t,stream:e,yt:r}]=Or.splice(0,1),o=n.assign({},r,{useWebWorkers:!1,workerURI:dt,createWorker:dt});t(new yr({},e,o,Vr)),Pr()}}function Vr(){Zr(),Pr()}function Gr(t){const{_t:e}=t;e&&(_(e),t._t=null)}const jr="\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 qr(t,e){return Kr(t,e,!0)}function Kr(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=jr[t[n]];return e}(t):new b(e,{ignoreBOM:n}).decode(t)}const Yr="HTTP error ",Xr="HTTP Range not supported",Jr="HTTP resource changed",Qr="Writer iterator completed too soon",$r="Writer not initialized",to="Invalid writer (size must be writable)",eo="Content-Range",no="Range",ro="GET",oo="bytes",io=16777216,so="writable",ao=k();class co{constructor(){this.size=0}init(){this.initialized=!0}}class uo extends co{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const a=e===dt?n:s.min(n,e-o),c=await Ko(r,t+o,a);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&a)&&i.close()}})}}class lo extends co{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new f($r);return t.writeUint8Array(be(e))}});n.defineProperty(t,so,{get:()=>e})}writeUint8Array(){}}class fo extends uo{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{Nt:t,Ut:r,size:s.floor(.75*(e-r))})}readUint8Array(t,e){const{Ut:n,Nt:r}=this,o=new w(e),i=4*s.floor(t/3),a=atob(r.substring(i+n,4*s.ceil((t+e)/3)+n)),c=t-3*s.floor(i/4);let u=0;for(let t=c;t<c+e&&t<a.length;t++)o[t-c]=a.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class wo extends lo{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Ot:""})}writeUint8Array(t){const e=this;let n,o=e.Ot;const i=e.Ot.length;for(e.Ot="",n=0;n<3*s.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.Ot+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.Ot=o+e.Ot}getData(){return this.data+x(this.Ot)}}let po,ho;class mo extends uo{constructor(t){super(),n.assign(this,{Mt:t,size:t.size}),ho||(ho=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();po=1==e}catch{po=!1}})())}createReadable(t){const{Mt:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return Cn(e.stream());if(po)return Cn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.Mt:n.Mt.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class yo extends co{constructor(t){super();const e=this,r=new R;n.defineProperty(e,so,{get:()=>r.writable}),e.contentType=t,e.Lt=In(r.readable,t),e.Lt.catch(()=>{})}getData(){return this.Lt}}class So extends mo{constructor(t){super(new y([t],{type:"text/plain"}))}}function go(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class bo extends yo{constructor(t){super(),n.assign(this,{encoding:t,Bt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,Bt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return Kr(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Eo extends uo{constructor(t,e){super(),xo(this,t,e)}async init(){await Ro(this,Oo,vo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:i}=e;if((n||r)&&i!==dt){const{offset:n=0,size:r=i-n}=t||{};if(r>0&&n<i)return function(t,e,n){let r,i=e,a=0,c=n;return new F({start:()=>u(),async pull(t){r||await u();const{value:e,done:n}=await r.read();if(n)throw new f(Xr);const o=e.length>a?e.subarray(0,a):e;a-=o.length,c-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=r;r=dt,await t.cancel()}(),c||t.close())},cancel:t=>r&&r.cancel(t)});async function u(){const e=s.min(t.maximumRangeSize,c),n=await Oo(ro,t,To(t,i,e));if(206!=n.status)throw new f(Xr);const u=n.headers.get(eo);if(u){const t=o(u.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t)&&t!=i)throw new f(Xr)}Io(t,n),Co(t,n),i+=e,a=e,r=n.body.getReader()}}(e,n,s.min(r,i-n))}return super.createReadable(t)}readUint8Array(t,e){return Fo(this,t,e,Oo,vo)}}class zo extends uo{constructor(t,e){super(),xo(this,t,e)}async init(){await Ro(this,Mo,_o),super.init()}readUint8Array(t,e){return Fo(this,t,e,Mo,_o)}}function xo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a,checkResourceChanges:c=!0,maximumRangeSize:u=io,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Ro(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new d(t,e);return"http:"==n||"https:"==n}(r)&&(i||s)&&(typeof o==wt||o)){const r=await e(ro,t,To(t,a?-22:void 0)),o=r.headers.get("Accept-Ranges");if(!(s||o&&o.toLowerCase()==oo))throw new f(Xr);{if(a){const e=new w(await r.arrayBuffer());206==r.status&&e.length==K&&(t.Wt=e)}Co(t,r);const o=Do(r);o===dt?await Uo(t,e,n):t.size=o}}else await Uo(t,e,n)}async function Fo(t,e,n,r,i){const{useRangeHeader:s,forceRangeRequests:a,Wt:c,size:u,options:l}=t;if(s||a){if(c&&e==u-K&&n==K)return c;if(e>=u||0===n)return St;{e+n>u&&(n=u-e);const i=await r(ro,t,To(t,e,n));if(206!=i.status)throw new f(Xr);const s=i.headers.get(eo);if(s){const t=o(s.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t)&&t!=e)throw new f(Xr)}Io(t,i),Co(t,i);const a=new w(await i.arrayBuffer());if(a.length!=n)throw new f(Xr);return a}}{const{data:r}=t;return r||await i(t,l),t.data.subarray(e,e+n)}}function Do(t){const e=t.headers.get(eo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Ao({headers:t}){return{Pt:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function Co(t,e){const{checkResourceChanges:n,Zt:r}=t;n&&!r&&206==e.status&&(t.Zt=Ao(e))}function Io(t,e){const{checkResourceChanges:r,Zt:o,size:i}=t;if(r){const t=Do(e);if(t!==dt&&i!==dt&&t!=i)throw new f(Jr);if(o){const t=Ao(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new f(Jr)}}}function To(t,e=0,r=1){return n.assign({},ko(t),{[no]:oo+"="+(e<0?e:e+"-"+(e+r-1))})}function ko({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function vo(t){await No(t,Oo)}async function _o(t){await No(t,Mo)}async function No(t,e){const n=await e(ro,t,ko(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Uo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,ko(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function Oo(t,{fetch:e=fetch,options:r,url:o},i){const s=await e(o,n.assign({},r,{method:t,headers:i}));if(s.status>=200&&s.status<=299)return s;throw 416==s.status?new f(Xr):new f(Yr+(s.statusText||s.status))}function Mo(t,{url:e},r){return new S((o,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status>=200&&s.status<=299){const t=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:s.status,arrayBuffer:()=>s.response,headers:new c(t)})}else i(416==s.status?new f(Xr):new f(Yr+(s.statusText||s.status)))},!1),s.addEventListener("error",t=>i(t.detail?t.detail.error:new f("Network error")),!1),s.open(t,e),r)for(const t of n.entries(r))s.setRequestHeader(t[0],t[1]);s.responseType="arraybuffer",s.send()})}class Lo extends uo{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new zo(t,e):new Eo(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 Bo extends uo{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{Ht:t,size:t.length})}readUint8Array(t,e){return this.Ht.slice(t,t+e)}}class Wo extends lo{constructor(t){super(),this.Vt=t||262144}init(t=0){n.assign(this,{offset:0,Ht:new w(t>0?t:this.Vt)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.Ht.length){let t=e.Ht.length?2*e.Ht.length:e.Vt;for(;t<n;)t*=2;const r=e.Ht;e.Ht=new w(t),e.Ht.set(r)}e.Ht.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Ht.length?this.Ht:this.Ht.slice(0,this.offset)}}class Po extends uo{constructor(t){super(),this.Gt=t}async init(){const t=this;t.jt=0;const e=t.Gt=await S.all(t.Gt.map(qo));t.qt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}Kt(t){const{qt:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{Gt:r}=this;let o,i=0,a=t;for(;r[i]&&a>=r[i].size;)a-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(a+e<=r)o=await Ko(c,a,e);else{const i=r-a;o=ge(await Ko(c,a,i),await n.readUint8Array(t+i,e-i))}}else o=St;return n.jt=s.max(i,n.jt),o}}class Zo extends co{constructor(t,e=4294967295){super();const r=this;let o,i,s;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new D({async write(e){if(e===ao)return void(s&&await u());const{availableSize:n}=r;if(s)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:a}=await t.next();if(a&&!n)throw new f(Qr);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await jo(o),i=n.writable,s=i.getWriter(),await this.write(e)}},async close(){s&&(await s.ready,await l())},async abort(t){s&&await s.abort(t)}});async function c(t){const e=t.length;e&&(await s.ready,await s.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,s=null,r.availableSize=r.maxSize}async function l(){await s.close()}n.defineProperty(r,so,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(ao)}finally{t.releaseLock()}}}class Ho{constructor(t){return e.isArray(t)&&(t=new Po(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:Cn(t)}),t}}class Vo{constructor(t){t.writable===dt&&typeof t.next==pt&&(t=new Zo(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:Tn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new f(to)}return t}}function Go(t){return Boolean(t&&t.getData)}async function jo(t,e){if(!t.init||t.initialized)return S.resolve();await t.init(e)}async function qo(t){return t=new Ho(t),await jo(t),t.size!==dt&&t.readUint8Array||(t=new mo(await In(t.readable)),await jo(t)),t}function Ko(t,e,n){return t.readUint8Array(e,n)}function Yo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?uo.prototype.createReadable.call(t,e):t.readable}function Xo(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const Jo="filename",Qo="rawFilename",$o="comment",ti="rawComment",ei="uncompressedSize",ni="compressedSize",ri="offset",oi="diskNumberStart",ii="lastModDate",si="rawLastModDate",ai="lastAccessDate",ci="rawLastAccessDate",ui="creationDate",li="rawCreationDate",di="internalFileAttributes",fi="externalFileAttributes",wi="msdosAttributesRaw",pi="msdosAttributes",hi="msDosCompatible",mi="zip64",yi="encrypted",Si="version",gi="versionMadeBy",bi="zipCrypto",Ei="directory",zi="executable",xi="compressionMethod",Ri="signature",Fi="extraField",Di="unixMode",Ai="setuid",Ci="setgid",Ii="sticky",Ti=[Jo,Qo,ei,ni,ii,si,$o,ti,ai,ci,ui,li,ri,oi,di,fi,wi,pi,hi,mi,yi,Si,gi,bi,Ei,zi,"symlink",xi,Ri,"crc32",Fi,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Di,"unixExternalUpper",Ai,Ci,Ii,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ki{constructor(t){Ti.forEach(e=>this[e]=t[e])}}const vi=new u([1,J,10,Q,28789,25461,$,tt,et,22613,13]);function _i(t,e,n){return t?e?12:16+4*n:0}const Ni="File format is not recognized",Ui="End of central directory not found",Oi="End of Zip64 central directory locator not found",Mi="Central directory header not found",Li="Local file header not found",Bi="Zip64 extra field not found",Wi="File contains encrypted entry",Pi="Encryption method not supported",Zi="Split zip file",Hi="Overlapping entry found",Vi="Entry data out of bounds",Gi="Ambiguous archive",ji="Encrypted central directory is not supported",qi="Unsafe filename",Ki="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Yi="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Xi="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Ji="64-bit value exceeds Number.MAX_SAFE_INTEGER",Qi="unsorted central directory",$i="unknown version needed to extract",ts="compressed patched data",es="malformed extra field",ns="unknown zip64 extensible data",rs="wrapped entries count",os="appended data",is="prepended data",ss="prepended central directory",as="trailing central directory data",cs="duplicate filename",us="mismatched zip64 end of central directory record",ls="multiple end of central directory records",ds="mismatched local file header (filename)",fs="mismatched local file header (general purpose bit flag)",ws="mismatched local file header (compression method)",ps="mismatched local file header (crc32 or sizes)",hs=/^[a-zA-Z]:/,ms="utf-8",ys="cp437",Ss=[[ei,O],[ni,O],[ri,O],[oi,M]],gs={[M]:{Yt:ea,bytes:4},[O]:{Yt:na,bytes:8}},bs=i(o.MAX_SAFE_INTEGER);class Es{constructor(t,e={}){n.assign(this,{reader:new Ho(t),options:e,Xt:new c})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await jo(r),r.size!==dt&&r.readUint8Array||(r=new mo(await In(r.readable)),await jo(r)),r.size<K)throw new f(Ni);const o=e.warnings=[],i=Ls(t,e.options),a=i==Lt,c=i!=Wt,l=Ps(Ys(e,t,_t),i),d=function(t,e){if(t===dt)return e;if(!Ms(t))throw new f(Yi);return t}(Ys(e,t,"filenameValidation"),i),w=Ys(e,t,"normalizeFilename"),{Jt:p,Qt:h}=await Zs(r,c,l);if(!p)throw await async function(t){return await Os(t)==W}(r)?new f(Zi):new f(Ui);c&&h>1&&Ks(ls);const m=Ee(p);let y=ea(m,12),S=ea(m,16);const g=p.offset,b=ta(m,20),E=g+K+b,z=r.size-E;z>l&&Ks(os),z>0&&Xo(o,os);let x=ta(m,4);const F=r.jt||0;let D,A,C,I,T,k=ta(m,6),v=ta(m,10),_=0,N=X;const U=S==O||y==O||v==M||k==M;if(S!=O&&k!=M&&(S+=Us(r,k)),U){const t=p.offset>=Y?await Ko(r,p.offset-Y,Y):St,e=Ee(t);if(t.length==Y&&ea(e,0)==j){S=Us(r,ea(e,4))+na(e,8);let t=await Ko(r,S,X),i=Ee(t);const c=p.offset-Y-X;if((t.length<X||ea(i,0)!=G)&&S!=c&&c>=0){const e=S;S=c,S>e&&(_=S-e),t=await Ko(r,S,X),i=Ee(t)}if(t.length<X||ea(i,0)!=G)throw new f(Oi);if(C=!0,I=na(i,4)>44,I){const t=s.min(na(i,4)-44,r.size-S-X);t>0&&(N+=t,T=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ee(t),o=ta(r,26);n.assign(e,{compressionMethod:ta(r,0),compressedSize:na(r,2),uncompressedSize:na(r,10),encryptionAlgorithm:ta(r,18),bitLength:ta(r,20),flags:ta(r,22),hashAlgorithm:ta(r,24),hashData:t.subarray(28,28+o)})}return e}(await Ko(r,S+X,t)))}x==M?x=ea(i,16):x!=ea(i,16)&&qs(a,o,us),k==M?k=ea(i,20):k!=ea(i,20)&&qs(a,o,us),v==M?v=na(i,32):v!=na(i,32)&&qs(a,o,us),y==O?y=na(i,40):y!=na(i,40)&&qs(a,o,us),S=Us(r,k)+na(i,48)+_}}let B=y;const P=p.offset-(C?N+Y:0);if(S>=r.size&&(_=r.size-S-y-K,S=r.size-y-K),F!=x)throw new f(Zi);if(S<0)throw new f(Ni);let Z=0,V=await Ko(r,S,y),J=Ee(V);if(y){if(V.length<4)throw new f(Ni);const t=P-y;if(S!=t&&k==x){const e=ea(J,Z)==H||Boolean(T&&T.compressedSize)||Fs(J);let n=!e;if(!n&&t>=0&&t+4<=r.size&&(n=ea(Ee(await Ko(r,t,4)),0)==H),n){const n=S;S=t,S>n&&(_+=S-n,D=e),V=await Ko(r,S,y),J=Ee(V)}}}const Q=P-S;if(y!=Q&&Q>=0&&k==x&&(y=Q,V=await Ko(r,S,y),J=Ee(V)),S<0||S>=r.size)throw new f(Ni);e.directoryOffset=S,e.directoryLength=B;const $=Xs(e,t,"decryptCentralDirectory");let tt,et;if($&&v&&V.length>=4&&ea(J,0)!=H&&(I||Fs(J))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(T,B,V.length);et=V.subarray(t),V=await $(V.subarray(0,t),T),J=Ee(V),B=V.length,tt=!0}T&&!tt&&(V.length<4||ea(J,0)==H)&&Xo(o,ns),A=S;const nt=Ys(e,t,"filenameEncoding"),ct=Ys(e,t,"commentEncoding"),ut=new u;let lt,ft=-1;const wt=!a&&!C;!v&&wt&&(v=Ds(J,V,Z),v&&Xo(o,rs));for(let i=0;i<v;i++){const a=new Rs(r,e.options);if(Z+q>V.length||ea(J,Z)!=H){if(0==i&&!tt&&(I||Fs(J)))throw new f(ji);throw new f(Mi)}Cs(a,J,Z+6);const c=Boolean(a.bitFlag.languageEncodingFlag),u=Z+q,l=u+a.filenameLength,p=l+a.extraFieldLength,h=ta(J,Z+4),m=!(h>>8),y=h>>8==3,S=V.subarray(u,l),g=ta(J,Z+32),b=p+g,E=V.subarray(p,b),z=c,x=c,F=ea(J,Z+38),D=F&L,C={readOnly:Boolean(1&D),hidden:Boolean(2&D),system:Boolean(4&D),directory:Boolean(16&D),archive:Boolean(32&D)},T=ea(J,Z+42),k=Xs(e,t,"decodeText")||qr,N=z?ms:nt||ys,U=x?ms:ct||ys;let O=k(S,N,Ot);if(O===dt&&(O=qr(S,N)),w){const t=w(O);t!==dt&&(O=t)}if(Ws(O,d)){const t=new f(qi);throw t.filename=O,t}let B=k(E,U,Mt);B===dt&&(B=qr(E,U)),n.assign(a,{index:i,$t:tt,versionMadeBy:h,msDosCompatible:m,zip64:!1,compressedSize:0,uncompressedSize:0,te:g,offset:T,diskNumberStart:ta(J,Z+34),internalFileAttributes:ta(J,Z+36),externalFileAttributes:F,msdosAttributesRaw:D,msdosAttributes:C,rawFilename:S,filenameUTF8:z,commentUTF8:x,rawExtraField:V.subarray(l,p),rawComment:E,filename:O,comment:B}),Is(a,a,J,Z+6)&&Xo(o,es,O),a.offset+=_;const W=Us(r,a.diskNumberStart)+a.offset;A=s.min(W,A),W<ft&&Xo(o,Qi,O),ft=W,(a.version&L)>63&&Xo(o,$i,O),32&~a.rawBitFlag||Xo(o,ts,O),ut.has(a.filename)&&(lt=!0),ut.add(a.filename);const P=a.externalFileAttributes>>16&M;a.unixMode===dt&&16877&P&&(a.unixMode=P);const G=Boolean(a.unixMode&it),j=Boolean(a.unixMode&st),K=Boolean(512&a.unixMode),Y=40960==((a.unixMode===dt?P:a.unixMode)&rt),X=!Y&&(a.unixMode!==dt?!!(73&a.unixMode):y&&!!(73&P)),Q=a.unixMode!==dt&&(a.unixMode&rt)==ot,$=(P&rt)==ot;n.assign(a,{setuid:G,setgid:j,sticky:K,symlink:Y,unixExternalUpper:P,executable:X,directory:Q||$||m&&C.directory||a.filename.endsWith(at),zipCrypto:a.encrypted&&!a.extraFieldAES});const et=new ki(a);if(et.getData=(t,n)=>a.getData(t,et,e.Xt,n),et.arrayBuffer=async t=>{const r=new R,o=In(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await a.getData(r,et,e.Xt,n.assign({},t,{preventClose:!1})),o},Z=b,i==v-1&&wt){const t=Ds(J,V,Z);t&&(v+=t,Xo(o,rs))}const{onprogress:pt}=t;if(pt)try{await pt(i+1,v,new ki(a))}catch{}yield et}let pt=Z,ht=As(V.subarray(Z))||(tt?As(et):dt);if(!ht&&!tt){const t=S+Z,e=s.min(P-t,65541);e>=6&&(ht=As(await Ko(r,t,e)))}ht&&(e.digitalSignature=ht,pt=Z+6+ht.length),(Z!=B&&pt!=B||!tt&&Z!=y&&pt!=y)&&qs(a,o,as),lt&&qs(a,o,cs);const mt=Ys(e,t,"extractPrependedData"),yt=Ys(e,t,"extractAppendedData"),gt=(a||mt)&&v&&4==A&&await async function(t){const e=await Os(t);return e==W||808471376==e}(r)?4:0;return a&&(_||v&&A>gt)&&Ks(is),(_||v&&A>4)&&Xo(o,is),D&&Xo(o,ss),mt&&(e.prependedData=A>gt?await Ko(r,gt,A-gt):St),e.comment=b?await Ko(r,g+K,b):St,yt&&(e.appendedData=E<r.size?await Ko(r,E,r.size-E):St),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[gt](){return this.close()}}class zs{constructor(t={}){let r;const{readable:o,writable:i}=new R({start(t){r=t}}),s=new Es(o,t),a=s.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new R;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(s){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:a,value:c}=await o.read();a?s.close():s.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await S.allSettled(n.map(e=>e.cancel(t))),await S.allSettled([a.return(),s.close()])}}),this.writable=i}}async function xs(t,e={}){if(t=new Ho(t),await jo(t),t.size!==dt&&t.readUint8Array||(t=new mo(await In(t.readable)),await jo(t)),t.size<K)return!1;const n=Ls(e,{}),r=n!=Wt,o=Ps(e[_t],n),{Jt:i,Qt:s}=await Zs(t,r,o);if(!i||n==Lt&&s>1)return!1;const a=ta(Ee(i),20),c=i.offset+K+a;return t.size-c<=o}let Rs=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,a=we(),{reader:c,index:u,offset:l,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:S,rawLastModDate:g,uncompressedSize:b,compressedSize:E}=i,{dataDescriptor:z}=m,x=e.localDirectory={},R=e.warnings=[],F=Us(c,d)+l,A=await Ko(c,F,ct),C=Ee(A);let I=Ys(i,o,bt),T=Ys(i,o,Et);const k=Jt(Ys(i,o,zt)),v=Boolean(k),_=!0===k;if(Xt(I,T),I=I&&I.length&&I,T=T&&T.length&&T,w&&99!=w.originalCompressionMethod)throw new f(Nn);if(A.length<ct||ea(C,0)!=B)throw new f(Li);Cs(x,C,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=Ys(i,o,"checkLocalDirectory"),W=Ls(o,i.options),Z=function(t,e){return t===dt?e!=Wt:Boolean(t)}(M,W),H=Ys(i,o,"checkLocalFilename"),V=function(t,e){return t===dt?e==Lt:Boolean(t)}(H===dt?M:H,W);let G=St;if(V&&(U||N)){const t=await Ko(c,F+ct,U+N);G=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await Ko(c,F+ct+U,N):St;V&&(x.rawFilename=G),Is(i,x,C,4,!0)&&Xo(R,es),function(t,e,n,r,o){const{rawFilename:i}=t,s=!o,a=t.$t&&!(8192&~e.rawBitFlag);!r||a||n.length==i.length&&!n.some((t,e)=>t!=i[e])||qs(s,o,ds),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&qs(s,o,fs),e.compressionMethod!=t.compressionMethod&&qs(s,o,ws),e.bitFlag.dataDescriptor||a||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||qs(s,o,ps)}(i,x,G,V,Z?dt:R);const{lastAccessDate:j,creationDate:q,uid:K,gid:Y}=x;j&&(e.lastAccessDate=j),q&&(e.creationDate=q),K!==dt&&e.uid===dt&&(e.uid=K),Y!==dt&&e.gid===dt&&(e.gid=Y);const X=Ys(i,o,"checkPasswordOnly"),J=i.encrypted&&x.encrypted&&(!_||X),Q=J&&!w;if(_||(e.zipCrypto=Q),J&&!(64&~x.rawBitFlag))throw new f(Pi);const $=v?dt:Ln(h);if(0!=h&&8!=h&&9!=h&&!$&&!v)throw new f(Nn);if(J){if(!Q&&(w.strength<1||w.strength>3))throw new f(Pi);if(!I&&!T)throw new f(Wi)}if(O+E>c.size)throw new f(Vi);const tt=E,et=Cn(c.createReadable({offset:O,size:tt})),nt=Kt(Ys(i,o,xt));Yt(nt);let rt=Ys(i,o,"checkOverlappingEntry");const ot=Ys(i,o,"checkOverlappingEntryOnly");ot&&(rt=!0);const{onstart:it,onprogress:st,onend:at}=o,ut=0!=h&&!v,lt=v?E-_i(J,Q,w&&w.strength):b,ft=9==h;let wt=Ys(i,o,Ft);ft&&(wt=!1);const pt=Ys(i,o,"checkCrc32"),ht=(pt===dt?Ys(i,o,"checkSignature"):pt)&&!v&&(!J||Q||w&&1==w.vendorVersion),mt={options:{codecType:cr,password:I,rawPassword:T,zipCrypto:Q,encryptionStrength:w&&w.strength,checkCrc32:ht,checkAuthenticationCode:Ys(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(z?g>>>8&L:S>>>24&L),outputSize:lt,crc32:S,compressed:ut,encrypted:J,useWebWorkers:Ys(i,o,Rt),useCompressionStream:wt,transferStreams:Ys(i,o,Dt),deflate64:ft,format:$?$.format:dt,codecURI:$?$.codecURI:dt,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:X},config:a,ft:{signal:nt,size:tt,onstart:it,onprogress:st,onend:at}};let yt,gt,Ct;rt&&await async function({reader:t,ee:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:u,Xt:l}){let d=0;if(c&&(d=u?20:12),d){const n=await Ko(t,a+i,d+4),r=Ee(n);let c=n.length==d+4&&ea(r,0)==P;if(c){const t=Ns(r,4,u);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:c=!1}if(n.length>=d){const t=Ns(r,c?4:0,u);t.signature=c,e.localDirectory.dataDescriptor=t}}const w={start:r,end:a+i+d,ee:e};for(const[t,e]of l)if(t!=n&&w.start<e.end&&e.start<w.end){const t=new f(Hi);throw t.overlappingEntry=e.ee,t}l.set(n,w)}({reader:c,ee:e,index:u,offset:F,crc32:S,compressedSize:E,uncompressedSize:b,dataOffset:O,dataDescriptor:z||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,Xt:r});try{if(!ot){X&&(t=new D),t=new Vo(t),await jo(t,function(t,e,n){return s.min(t,n?1032*e:e)}(lt,E,ut)),({writable:yt}=t);const{outputSize:e}=await Wr({readable:et,writable:yt},mt);if(e!=lt)throw n.assign(new f(Zn),{outputSize:e});t.size+=e}}catch(e){const{outputSize:n}=mt;if(n!==dt?t.size+=n:ze(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!X||!ze(e)||e.message!=Ze)throw gt=e,Ct=!0,e}finally{if((Go(t)||!Ys(i,o,At))&&yt&&!yt.locked){const t=yt.getWriter();if(Ct)try{await t.abort(gt)}catch{}else await t.close()}}return X||ot?dt:t.getData?t.getData():yt}};function Fs(t){const e=s.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==ea(t,n))return!0;return!1}function Ds(t,e,n){let r=0;for(;n+q<=e.length&&ea(t,n)==H;)n+=q+ta(t,n+28)+ta(t,n+30)+ta(t,n+32),r++;return r%65536?0:r}function As(t){if(t.length>=6){const e=Ee(t);if(ea(e,0)==Z){const n=ta(e,4);if(6+n<=t.length)return t.subarray(6,6+n)}}}function Cs(t,e,r){const o=t.rawBitFlag=ta(e,r+2),i=!(1&~o),s=ea(e,r+6);n.assign(t,{encrypted:i,version:ta(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:s,lastModDate:Js(s),filenameLength:ta(e,r+22),extraFieldLength:ta(e,r+24)})}function Is(t,e,r,o,i){const{rawExtraField:s}=e,u=e.extraField=new c,l=Ee(s);let d=0,w=!1;try{for(;d<s.length;){const t=ta(l,d),e=ta(l,d+2);u.set(t,{type:t,data:s.slice(d+4,d+4+e)}),d+=4+e}}catch{w=!0}d>s.length&&(w=!0);const p=ta(r,o+4);n.assign(e,{signature:ea(r,o+10),crc32:ea(r,o+10),compressedSize:ea(r,o+14),uncompressedSize:ea(r,o+18)});const h=u.get(1);h&&(function(t,e){e.zip64=!0;const n=Ee(t.data),r=Ss.filter(([t,n])=>e[t]==n),o=r.reduce((t,[,e])=>t+gs[e].bytes,0);if(t.data.length<o)throw new f(Bi);for(let o=0,i=0;o<r.length;o++){const[s,a]=r[o],c=gs[a];e[s]=t[s]=c.Yt(n,i),i+=c.bytes}}(h,e),e.extraFieldZip64=h);const m=u.get(28789);m&&(Ts(m,Jo,Qo,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Ts(y,$o,ti,e,t),e.extraFieldUnicodeComment=y);const S=u.get(J);S&&S.data.length>=7?(function(t,e,r){const o=Ee(t.data),i=$s(o,4);n.assign(t,{vendorVersion:$s(o,0),vendorId:$s(o,2),strength:i,originalCompressionMethod:r,compressionMethod:ta(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(S,e,p),e.extraFieldAES=S):e.compressionMethod=p;const g=u.get(13);g&&(ks(g,e),e.extraFieldPkwareUnix=g);const b=u.get(22613);b&&(ks(b,e),e.extraFieldUnixType1=b);const E=u.get(10);E&&(function(t,e){const r=Ee(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=ta(r,i),n=ta(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Ee(o),i=r.getBigUint64(0,!0),s=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:s,rawCreationDate:a});const c={lastModDate:Qs(i),lastAccessDate:Qs(s),creationDate:Qs(a)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:s,rawCreationDate:a})}}(E,e),e.extraFieldNTFS=E);const z=u.get(et);let x;if(z&&(x=vs(z,e,!1),e.extraFieldUnix=z),!x){const t=u.get(tt);t&&(vs(t,e,!0),e.extraFieldInfoZip=t)}const R=u.get(Q);R&&(function(t,e,n){if(!t.data.length)return;const r=Ee(t.data),o=$s(r,0),i=[],s=[];n?(1&~o||(i.push(ii),s.push(si)),2&~o||(i.push(ai),s.push(ci)),4&~o||(i.push(ui),s.push(li))):t.data.length>=5&&(i.push(ii),s.push(si));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=ea(r,c);e[n]=t[n]=new a(1e3*(0|i));const u=s[o];t[u]=i}c+=4})}(R,e,i),e.extraFieldExtendedTimestamp=R);const F=u.get($);return F&&(e.extraFieldUSDZ=F),w}function Ts(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const s=Ee(t.data),a=new ve;a.append(i[r]);const c=Ee(new w(4));c.setUint32(0,a.get(),!0);const u=ea(s,1),l=$s(s,0);n.assign(t,{version:l,[e]:qr(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==ea(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function ks(t,e){if(t.data.length<8)return;const r=Ee(t.data),o={lastAccessDate:new a(1e3*(0|ea(r,0))),lastModDate:new a(1e3*(0|ea(r,4)))};t.data.length>=12&&(o.uid=ta(r,8),o.gid=ta(r,10)),n.assign(t,o),n.assign(e,o)}function vs(t,e,r){try{const o=Ee(t.data);let i,s;if(r){let e=0;const r=$s(o,e++),a=$s(o,e++);i=_s(t.data.subarray(e,e+a)),e+=a;const c=$s(o,e++);s=_s(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:s})}else t.data.length>=4&&(i=ta(o,0),s=ta(o,2),n.assign(t,{uid:i,gid:s}));return i!==dt&&(e.uid=i),s!==dt&&(e.gid=s),i!==dt||s!==dt}catch{}}function _s(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Ns(t,e,n){const r=ea(t,e);let o,i;return n?(o=na(t,e+4),i=na(t,e+12)):(o=ea(t,e+4),i=ea(t,e+8)),{crc32:r,compressedSize:o,uncompressedSize:i}}function Us(t,e){return t.Kt?t.Kt(e):0}async function Os(t){return ea(Ee(await Ko(t,0,4)))}function Ms(t){return t===Lt||t===Bt||t===Wt}function Ls(t,e){return Bs(t,Bs(e,Bt))}function Bs(t,e){const n=t.strictness;if(n!==dt){if(!Ms(n))throw new f(Ki);return n}const r=t.checkAmbiguity;return r===dt?e:r?Lt:e==Wt?Wt:Bt}function Ws(t,e){if(e==Wt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(n.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||hs.test(t))||e==Lt&&(n.includes(".")||n.includes(""))}function Ps(t,e){if(t!==dt){const e=te(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new f(Xi);return e}return e==Lt?0:e==Wt?1/0:M}async function Zs(t,e,n){const{size:r}=t,o=s.min(r,65557),i={count:64};let a,c,u=0;for await(const[n,s,l,d,f]of Hs(t,o)){const o=ta(n,d+20);if(f+K+o==r){const o=await Gs(t,n,s,d,f,r,i);if(2==o){if(a||(a=Vs(l,d,f)),u++,!e||u>1)break}else 1!=o||c||(c=Vs(l,d,f))}}return a||(a=c),a||(a=await async function(t,e,n){const{size:r}=t,o=s.min(r,e==1/0?r:65557+e);let i,a;for await(const[e,s,c,u,l]of Hs(t,o)){const o=Vs(c,u,l);i||(i=o);const d=await Gs(t,e,s,u,l,r,n);if(2==d)return o;1!=d||a||(a=o)}return a||i}(t,n,i)),{Jt:a,Qt:u}}async function*Hs(t,e){const n=t.size-e,r=await Ko(t,n,e),o=Ee(r);for(let t=r.length-K;t>=0;t--)ea(o,t)==V&&(yield[o,n,r,t,n+t])}function Vs(t,e,n){return{offset:n,buffer:t.slice(e,e+K).buffer}}async function Gs(t,e,n,r,o,i,s){const a=ta(e,r+10),c=ea(e,r+12),u=ea(e,r+16);if(a==M||c==O||u==O)return await js(t,e,n,o-Y,i,s)==j?2:0;if(!a&&!c)return 1;const l=ta(e,r+6);for(const r of[o-c,Us(t,l)+u])if(await js(t,e,n,r,i,s)==H)return 2;return 0}async function js(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?ea(e,r-n):i.count>0?(i.count--,ea(Ee(await Ko(t,r,4)),0)):dt}function qs(t,e,n){t?Ks(n):Xo(e,n)}function Ks(t){const e=new f(Gi);throw e.reason=t,e}function Ys(t,e,n){return e[n]===dt?t.options[n]:e[n]}function Xs(t,e,n){return qt(Ys(t,e,n))}function Js(t){const e=(4294901760&t)>>16,n=t&M,r=new a(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function Qs(t){return new a(o(t/i(1e4)-i(116444736e5)))}function $s(t,e){return t.getUint8(e)}function ta(t,e){return t.getUint16(e,!0)}function ea(t,e){return t.getUint32(e,!0)}function na(t,e){const n=t.getBigUint64(e,!0);if(n>bs)throw new f(Ji);return o(n)}var ra=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Gi,ERR_BAD_FORMAT:Ni,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Mi,ERR_ENCRYPTED:Wi,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ji,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Vi,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Oi,ERR_EOCDR_NOT_FOUND:Ui,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Bi,ERR_INVALID_AUTHENTICATION_CODE:Pe,ERR_INVALID_COMPRESSED_DATA:Hn,ERR_INVALID_CRC32:Vn,ERR_INVALID_FILENAME_VALIDATION:Yi,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Xi,ERR_INVALID_PASSWORD:We,ERR_INVALID_STRICTNESS:Ki,ERR_INVALID_UNCOMPRESSED_SIZE:Zn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Li,ERR_OVERLAPPING_ENTRY:Hi,ERR_SPLIT_ZIP_FILE:Zi,ERR_UNSAFE_FILENAME:qi,ERR_UNSUPPORTED_COMPRESSION:Nn,ERR_UNSUPPORTED_ENCRYPTION:Pi,ERR_UNSUPPORTED_UINT64:Ji,ERR_WORKER_STARTUP_TIMEOUT:dr,WARNING_APPENDED_DATA:os,WARNING_COMPRESSED_PATCHED_DATA:ts,WARNING_DUPLICATE_FILENAME:cs,WARNING_MALFORMED_EXTRA_FIELD:es,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:fs,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ws,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ps,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ds,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:us,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:ls,WARNING_PREPENDED_CENTRAL_DIRECTORY:ss,WARNING_PREPENDED_DATA:is,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:as,WARNING_UNKNOWN_VERSION:$i,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:ns,WARNING_UNSORTED_CENTRAL_DIRECTORY:Qi,WARNING_WRAPPED_ENTRIES_COUNT:rs,ZipReader:Es,ZipReaderStream:zs,isZipFile:xs});const oa="File already exists",ia="Zip file comment exceeds 64KB",sa="Invalid zip file comment (must be a Uint8Array)",aa="File entry comment exceeds 64KB",ca="Invalid file entry comment (must be a string)",ua="Invalid date (must be a valid Date instance)",la="File entry name exceeds 64KB",da="Version exceeds 65535",fa="The strength must equal 1, 2, or 3",wa="Encryption is not supported in USDZ files",pa="Split zip files are not supported in USDZ files",ha="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",ma="Invalid extra field (must be a Map)",ya="Invalid extra field type (must be integer 0..65535)",Sa="Invalid extra field data (must be a Uint8Array)",ga="Extra field data exceeds 64KB",ba=-2147483648,Ea=2147483647,za=i(0),xa=i("0x7fffffffffffffff"),Ra="Zip64 is not supported (set the 'zip64' option to 'true')",Fa="Undefined uncompressed size",Da="Undefined compression method",Aa="Undefined CRC32",Ca="Undetermined size",Ia="Undefined reader",Ta="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ka="Zip file not empty",va="Invalid uid (must be integer 0..2^32-1)",_a="Invalid gid (must be integer 0..2^32-1)",Na="Invalid UNIX mode (must be integer 0..65535)",Ua="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Oa="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ma="Invalid msdosAttributesRaw (must be integer 0..255)",La="Invalid msdosAttributes (must be an object with boolean flags)",Ba="Invalid level (must be integer 0..9)",Wa="Signature data exceeds 64KB",Pa="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Za="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Ha="compression unavailable",Va="clamped last modification date",Ga=new w([7,0,2,0,65,69,3,0,0]),ja="infozip",qa="unix",Ka=[8,9,5,3];let Ya=0;const Xa=[];class Ja{constructor(t,e={}){t=new Vo(t);const{availableSize:r=ft,maxSize:o=ft}=t,i=r>0&&r!==ft&&o>0&&o!==ft;if(i&&e[vt])throw new f(pa);n.assign(this,{writer:t,ne:i,options:e,re:new c,oe:new u,offset:e[kt]===dt?t.size||t.writable.size||0:e[kt],ie:e[kt]===dt?0:e[kt]-(t.size||t.writable.size||0),se:new u,ae:[],warnings:[],ce:0,ue:0,le:dt,de:!1})}prependZip(t){return tc(this,async function(t,e){if(t.oe.size)throw new f(ka);await t.fe(e)}(this,t))}appendZip(t){return tc(this,this.fe(t))}async fe(t){const r=this,{se:o,oe:i,re:s}=r;for(;o.size;)await S.allSettled(e.from(o));let a;const u=new S(t=>a=t);o.add(u);const l=[];let d;try{t=new Ho(t),await jo(t),t.size!==dt&&t.readUint8Array||(t=new mo(await In(t.readable)),await jo(t));const{ZipReader:o}=await S.resolve().then(function(){return ra}),a=new o(t),u=await a.getEntries();await a.close(),await jo(r.writer);const{directoryOffset:w}=a;u.forEach(({filename:t})=>{if(i.has(t))throw new f(oa);i.add(t),l.push(t)}),r.we=!0;const{pe:p}=r;r.pe=new S(t=>d=()=>{r.we=!1,t()}),await p,r.ne&&(delete r.ne,await async function(t){return Ee(await Ko(t,0,4)).getUint32(0,!0)==W}(t)||(await Fc(r.writer,xc()),r.offset+=4));const h=await async function(t,n,r,o){const{writer:i}=t,s=new c;if(i.closeDisk){const a=e.from(r).sort((t,e)=>zc(n,t)-zc(n,e));let c=0;for(const e of a){const r=zc(n,e);await bc(t,n,c,r-c),yc(i,await Ec(n,r))&&await i.closeDisk(),s.set(e,{offset:Sc(t,i),diskNumberStart:hc(i)}),c=r}await bc(t,n,c,o-c)}else{const e=t.offset;await bc(t,n,0,o),r.forEach(t=>s.set(t,{offset:e+zc(n,t),diskNumberStart:0}))}return s}(r,t,u,w);u.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:a,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:d,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=i;f=gc(f||St),t.extraFieldAES&&(d=99);const y=Pc(f),S=Boolean(l)&&l.uncompressedSize!==dt,g=Boolean(l)&&l.compressedSize!==dt,b=-7&Vc(w,p,m,a,d)|w<<1,{he:E,me:z}=Zc({version:e,bitFlag:b,compressionMethod:d,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,ye:g,Se:S,extraFieldLength:y}),{crc32:x}=t;x!==dt&&Lc(z,10,x);const{offset:R,diskNumberStart:F}=h.get(t);n.assign(t,{ge:!0,Se:S,ye:g,offset:R,diskNumberStart:F,be:!1,Ee:St,ze:St,xe:St,Re:St,Fe:St,rawExtraField:f,De:St,extendedTimestamp:!1,he:E,me:z}),s.set(t.filename,t)})}catch(t){throw l.forEach(t=>i.delete(t)),t}finally{a(),o.delete(u),d&&d()}}add(t="",e,r={}){const o=this,{se:s}=o,a=async function(t,e,r,o){const s=(o=n.assign({},o))[Ut];if(s!==dt){const{Ae:e,Ce:r}=rc(s,Jt(Tc(t,o,zt)),Tc(t,o,ii));delete o[Ut],o=n.assign(e,r,o)}if(Tc(t,o,Ei)&&!e.endsWith(at)&&(e+=at),t.oe.has(e))throw new f(oa);t.oe.add(e),Ya<we().maxWorkers?Ya++:await new S(t=>Xa.push(t));try{return await async function(t,e,r,o){const s=oc(t,e,o);({name:e}=s);const a=ic(t,e,o),{comment:c}=a,u=o[Fi];t.re.set(e,dt);const l=t.le,d={};let w,p;a.Ie.keepOrder&&(d.Te=new S(t=>w=t)),t.le=d;try{const{Ie:c}=a;0==c.level||c.compressionMethod!==dt||c.ke||await hr(we())||(c.level=0,Xo(t.warnings,Ha,e));const u=await async function(t,e,{Ie:r},o){if(r.ke&&!e&&!Tc(t,o,Ei))throw new f(Ia);let i;if(e){if(e=new Ho(e),await jo(e),!e.readable&&!e.readUint8Array)throw new f(Ta);({size:i}=e)}return n.assign({reader:e},ac(t,Boolean(e),i,r,o))}(t,r,a,o);({reader:r}=u);const h=mc(t.writer),m=hc(t.writer);let y=o.crc32===dt?o[Ri]:o.crc32;const g=u.Ie.encrypted&&!c.zipCrypto;if(c.ke&&!c.ve&&g&&(y=dt),c.ke&&r&&!g&&y===dt)throw new f(Aa);const b=uc(o=n.assign({},o,s.Ie,a.Ie,u.Ie,{signature:o[Ri],crc32:y,offset:t.offset-h,diskNumberStart:m,[vt]:t.options[vt]}));b._e&&Xo(t.warnings,Va,e);const E=fc(o),z=Pc(b.Ne,E.Ue);p=await async function(t,e,r,o,s){const{re:a,writer:c}=t,{keepOrder:u,dataDescriptor:l,Oe:d,signal:w}=s,{Me:p,ee:h,Le:m,Be:y}=o,g=t.options[vt];let b,E,z,x,F,D,A,C=h,I=0;const T=u&&m?m.Te:dt;a.set(e,C);try{s.bufferedWrite||!u||t.we||t.ce||t.ue||!l&&!d?(b=!0,t.ce++,A=s.createTempStream?await s.createTempStream():new R(dt,dt,{highWaterMark:ft}),A.size=0,await jo(c)):(E=!0,t.ue++,A=c,await T,await k()),await jo(A);const h=mc(c);t.ne&&!b&&await Rc(t,c),g&&!b&&lc(o,t.offset-h);const{Ne:m}=p;b||await v();const y=hc(c),z=Sc(t,c);if(C.diskNumberStart=y,b||(F=!0,D=c.size,await Fc(A,m)),C=await async function(t,e,{diskNumberStart:r,Te:o},s,a,c){const{Me:u,We:l,Pe:d}=s,{he:w,me:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:S,version:g,compressionMethod:b,Ee:E,Ze:z,xe:x,He:R,Ve:F,Re:D,Fe:A,ze:C}=u,{Ue:I}=l,{rawFilename:T,lastAccessDate:k,creationDate:v,password:_,rawPassword:N,level:U,useUnicodeFileNames:M,zip64:B,ge:W,Se:P,ye:Z,zipCrypto:H,dataDescriptor:V,directory:G,executable:j,versionMadeBy:q,rawComment:K,rawExtraField:Y,De:X,useWebWorkers:J,transferStreams:Q,onstart:$,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:st,externalFileAttributes:at,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:St,useCompressionStream:gt,ke:bt,ve:Et,format:zt,codecURI:xt}=c,Rt={Te:o,versionMadeBy:q,zip64:B,ge:W,directory:Boolean(G),executable:Boolean(j),filenameUTF8:Boolean(M),rawFilename:T,commentUTF8:Boolean(M),rawComment:K,Ee:E,Ze:z,xe:x,Re:D,Fe:A,ze:C,rawExtraField:Y,De:X,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:st,externalFileAttributes:at,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:St};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;bt||(Dt=0);const{writable:Ct}=e;if(t){const n=t.size,r=Cn(Yo(t,{size:n})),o={options:{codecType:ar,inputSize:n,level:U,rawPassword:N,password:_,encryptionStrength:rt,zipCrypto:y&&H,passwordVerification:y&&H&&m>>8&L,computeCrc32:!bt,compressed:S&&!bt,encrypted:y&&!Et,useWebWorkers:J,useCompressionStream:gt,transferStreams:Q,format:zt,codecURI:xt,compressionMethod:b},config:a,ft:{signal:nt,size:n,onstart:$,onprogress:tt,onend:et}};try{const t=await Wr({readable:r,writable:Ct},o);if(At=t.outputSize,e.size+=At,bt||(Dt=t.inputSize,y&&!H||(Ft=t.crc32)),!Z&&At>=O||!P&&Dt>=O)throw new f(Ra)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:ze(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,Me:r,We:o},{zip64:s,zipCrypto:a,ke:c,dataDescriptor:u}){const{me:l,encrypted:d}=r,{Ge:f,je:w}=o;d&&!a&&!c||t===dt||(Lc(l,10,t),u&&Lc(f,w,t)),s?u&&(Bc(f,w+4,i(e)),Bc(f,w+12,i(n))):(Lc(l,14,e),Lc(l,18,n),u&&(Lc(f,w+4,e),Lc(f,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,Me:u,We:l},c),V&&await Fc(e,I),n.assign(Rt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:v,lastAccessDate:k,encrypted:Boolean(y),zipCrypto:Boolean(H),size:d+At,compressionMethod:b,version:g,he:w,me:p,signature:Ft,crc32:!y||H||bt?Ft:dt,He:R,Ve:F,Se:P,ye:Z}),Rt}(r,A,C,o,we(),s),b||(F=!1),a.set(e,C),C.filename=e,b){if(await S.all([A.writable.getWriter().close(),T]),await k(),t.ne&&await Rc(t,c),x=!0,D=c.size,await v(),C.diskNumberStart=hc(c),C.offset=Sc(t,c),g){const e=o.Pe;lc(o,t.offset-mc(c)),C.size+=o.Pe-e}!function({rawFilename:t,encrypted:e,zip64:n,Ze:r,crc32:o,compressedSize:s,uncompressedSize:a,Se:c,ye:u},l,{dataDescriptor:d,ke:f}){if(d||((!e||f&&o!==dt)&&Lc(l,14,o),u||Lc(l,18,s),c||Lc(l,22,a)),n&&r){const e=ct+Pc(t)+4;Bc(l,e,i(a)),Bc(l,e+8,i(s))}}(C,p.qe,s),await Fc(c,p.Ne),await Dc(A.readable,c,w,t=>I+=t),c.size+=A.size,x=!1}else C.diskNumberStart=y,C.offset=z;return t.offset+=C.size,C}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,b&&(t.offset+=I)}throw a.delete(e),n}finally{if(b&&t.ce--,E&&t.ue--,y&&y(T),z&&z(),b&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.we=!0;const{pe:e}=t;t.pe=new S(e=>z=()=>{t.we=!1,e()}),await e}async function v(){yc(c,Pc(p.Ne))&&await c.closeDisk()}}(t,e,r,{Me:b,We:E,Pe:z,ee:d,Le:l,Be:w},o)}catch(n){throw t.re.delete(e),n}finally{w&&w(l&&l.Te)}return n.assign(p,{name:e,comment:c,extraField:u}),new ki(p)}(t,e,r,o)}catch(n){throw t.oe.delete(e),n}finally{const t=Xa.shift();t?t():Ya--}}(o,t,e,r);s.add(a);const c=()=>s.delete(a);return S.prototype.then.call(a,c,c),tc(o,a)}remove(t){const{oe:e,re:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=St,n={}){const r=this,{se:o,writer:s}=this,{writable:a}=s;if(r.de)return $a(s);if(!(t instanceof w))throw new f(sa);if(Pc(t)>M)throw new f(ia);for(;o.size;)await S.allSettled(e.from(o));await S.allSettled(r.ae.map(t=>t.Ke));const c=r.ae.filter(t=>t.Ye&&!t.Xe);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.Xe=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Je:o,Qe:s}=wc(t.re),{$e:a,tn:c,en:u}=await async function(t,n,r){const{re:o,writer:i}=t,s=new w(n);await jo(i);let a=0,c=0,u=hc(i),l=mc(i),d=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:f,Ee:w,ze:p,xe:h,Re:m,Fe:y,rawExtraField:S,De:g,rawComment:b,versionMadeBy:E,he:z,me:x,Se:R,ye:F,be:D,nn:A,internalFileAttributes:C,externalFileAttributes:I,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=Pc(w,p,h,m,y,S,g),N=q+Pc(f,b)+_;yc(i,a+N-c)&&(await Fc(i,s.slice(c,a)),c=a,d=0,await i.closeDisk()),0==t&&(u=hc(i),l=mc(i)),R||Lc(x,18,k),F||Lc(x,14,v),(A||D)&&n.version<45&&Mc(x,0,45);const U=pc(N);if(U.rn(H),U.sn(E),U.an(z.subarray(0,24)),U.sn(_),U.sn(Pc(b)),U.sn(D?M:T),U.sn(C),U.rn(I),U.rn(A?O:e),U.an(f),U.an(w),U.an(p),U.an(h),U.an(m),U.an(y),U.an(S),U.an(g),U.an(b),Wc(s,U.Ht,a),a+=N,d++,r.onprogress)try{await r.onprogress(t+1,o.size,new ki(n))}catch{}}return await Fc(i,c?s.slice(c):s),{$e:{diskNumber:u,diskOffset:l},tn:{diskNumber:hc(i),cn:d},en:s}}(t,o,r),l=await async function(t,e,n){const r=vc(t,n,Nt);if(r){const n=await r(e),o=Pc(n);if(o>M)throw new f(Wa);const i=pc(6+o);i.rn(Z),i.sn(o),i.an(n);const{writer:s}=t;return yc(s,Pc(i.Ht))&&await s.closeDisk(),await Fc(s,i.Ht),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{$e:s,tn:a,un:c,Qe:u}=r;let{Je:l}=r,d=t.re.size,w=s.diskNumber,p=Sc(t,s);const h=Pc(e);if(h>M)throw new f(ia);let m=Tc(t,n,mi),y=hc(o);if(yc(o,(m?98:K)+h)&&y++,p>=O||l>=O||d>=M||y>=M){if(!1===m)throw new f(Ra);m=!0}else m===dt&&u&&(m=!0);const S=pc(m?98:K);yc(o,Pc(S.Ht)+h)&&await o.closeDisk(),y=hc(o);let g=y==a.diskNumber?a.cn:0;m&&(S.rn(G),S.ln(44),S.sn(45),S.sn(45),S.rn(y),S.rn(w),S.ln(g),S.ln(d),S.ln(l),S.ln(p),S.rn(j),S.rn(y),S.ln(i(Sc(t,o))+i(l)+i(c)),S.rn(y+1),Tc(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),g=M,d=M,p=O,l=O),S.rn(V),S.sn(y),S.sn(w),S.sn(g),S.sn(d),S.rn(l),S.rn(p),S.sn(h),await Fc(o,S.Ht),h&&await Fc(o,e)}(t,n,r,{$e:a,tn:c,Je:o,un:l,Qe:s})}(r,t,n),r.de=!0,!Go(s)&&Tc(r,n,At)||await a.getWriter().close(),$a(s)}[gt](){return this.close()}}class Qa extends S{then(t,e){const{dn:n}=this;return n&&(n.Xe=!0),super.then(t,e)}}function $a(t){return t.getData?t.getData():t.writable}function tc(t,e){const r=new Qa((t,n)=>S.prototype.then.call(e,t,n)),o={};return r.dn=o,o.Ke=S.prototype.then.call(r,dt,t=>n.assign(o,{Ye:!0,error:t})),t.ae.push(o),r}async function ec(t,e){try{await t.writer.writable.abort(e)}catch{}}function nc(t,e,n){t.se.add(e),e.catch(t=>{try{n(t)}catch{}})}function rc(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new f(Pa);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:d,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:S,crc32:g,compressionMethod:b,extraFieldAES:E,extraFieldUnix:z,internalFileAttributes:x,extraField:R,bitFlag:F,directory:D,uid:A,gid:C}=t,I={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:d,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(I[It]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{vi.has(n)||e.set(n,t.data)}),e.size)return e}}(R);T&&(I[Fi]=T),A===dt&&C===dt||n.assign(I,{uid:A,gid:C,unixExtraFieldType:z?qa:ja});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:g,compressionMethod:b}),r!==Pt&&n.assign(k,{encrypted:y,zipCrypto:S,encryptionStrength:E?E.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[Ct]=Ka[F.level]),o===dt)k.rawLastModDate=w;else if(r!==Pt&&S&&(!F||F.dataDescriptor)&&o instanceof a&&function(t){let e=new a(2e3*s.ceil(s.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new f(Za);return{Ae:I,Ce:k}}function oc(t,n,r){let o=Tc(t,r,hi),i=Tc(t,r,gi,o?20:768);const s=Tc(t,r,zi),a=_c(t,r,"uid"),c=_c(t,r,"gid");let u=_c(t,r,Di),l=Tc(t,r,"unixExtraFieldType"),d=Tc(t,r,Ai),w=Tc(t,r,Ci),p=Tc(t,r,Ii);if($t(a,O,va),$t(c,O,_a),$t(u,M,Na),l!==dt&&l!==ja&&l!==qa)throw new f(Ua);if(l===qa&&(a!==dt&&a>M||c!==dt&&c>M))throw new f(Oa);l!==dt||a===dt&&c===dt||(l=ja);let h=_c(t,r,wi),m=Tc(t,r,pi);const y=h!==dt||m!==dt;if(a!==dt||c!==dt||u!==dt||l||s?(o=!1,i=i&L|768):y&&(o=!0,i&=L),$t(h,L,Ma),m&&(typeof m!==ht||e.isArray(m)))throw new f(La);if(i>M)throw new f(da);let S=Tc(t,r,fi);const g=S!==dt;g||(S=0),!r[Ei]&&n.endsWith(at)&&(r[Ei]=!0);const b=Tc(t,r,Ei);if(b?(n.endsWith(at)||(n+=at),g||(S=16,o||(S|=16877<<16))):o||g||(S=s?493<<16:27525120),!o){const t=u!==dt||Boolean(d||w||p);u=u===dt?S>>16&M:u&M,d?u|=it:d=Boolean(u&it),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),g&&!t||(b?u=-61441&u|ot:u&rt||(u|=32768),S=(u&M)<<16|S&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:s}=e;let a=0;n&&(a|=1),r&&(a|=2),o&&(a|=4),i&&(a|=16),s&&(a|=32),t=a&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(S=S&O|h&L);const E=S>>16&M,z=u!==dt&&40960==(u&rt);return{name:n,Ie:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:S,unixExternalUpper:E,uid:a,gid:c,unixMode:u,unixExtraFieldType:l,symlink:z,setuid:d,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function ic(t,e,n){const r=vc(t,n,"encodeText")||Ne;let i=r(e,Ot);if(i===dt&&(i=Ne(e)),Pc(i)>M)throw new f(la);const s=n[$o]||"";if(typeof s!=mt)throw new f(ca);let c=r(s,Mt);if(c===dt&&(c=Ne(s)),Pc(c)>M)throw new f(aa);const u=Tc(t,n,Si);if(u!==dt&&u>M)throw new f(da);const l=kc(t,n,ii,new a),d=Tc(t,n,si),w=kc(t,n,ai),p=kc(t,n,ui),h=Tc(t,n,di,0),m=Jt(Tc(t,n,zt)),y=Boolean(m),S=!0===m,g=Tc(t,n,bt),b=Tc(t,n,Et);Xt(g,b);const E=_c(t,n,"encryptionStrength",3),z=Tc(t,n,bi),x=Tc(t,n,"extendedTimestamp",!0),R=Tc(t,n,"ntfsTimestamp"),F=Tc(t,n,"keepOrder",!0),D=Tc(t,n,Rt),A=Tc(t,n,Dt),C=Tc(t,n,"bufferedWrite"),I=vc(t,n,"createTempStream"),T=Tc(t,n,"dataDescriptorSignature",!0),k=Kt(Tc(t,n,xt));Yt(k);const v=Tc(t,n,It,!Hc(i)||!Hc(c)),_=Tc(t,n,xi),N=y||_===dt?dt:Ln(_);if(!y&&_!==dt&&0!==_&&8!==_&&!N)throw new f(Nn);let U=_c(t,n,Ct);if($t(U,9,Ba),t.options[vt]){if(g!==dt||b!==dt)throw new f(wa);U===dt&&_===dt&&(U=0)}y&&(U=te(n[Ct]));let O=Tc(t,n,Ft),L=Tc(t,n,Tt);C&&L===dt&&(L=!1),(L===dt||z&&!S)&&(L=!0),U!==dt&&6!=U&&(O=!1);const B=Tc(t,n,mi);if(!(z||g===dt&&b===dt||o.isInteger(E)&&E>=1&&E<=3))throw new f(fa);const W=sc(n[Fi]),P=sc(n.localExtraField),Z=sc(n.centralExtraField);return{comment:s,Ie:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:d,lastAccessDate:w,creationDate:p,internalFileAttributes:h,ke:y,ve:S,password:g,rawPassword:b,encryptionStrength:E,zipCrypto:z,extendedTimestamp:x,ntfsTimestamp:R,keepOrder:F,useWebWorkers:D,transferStreams:A,bufferedWrite:C,createTempStream:I,dataDescriptorSignature:T,signal:k,useUnicodeFileNames:v,compressionMethod:_,format:N?N.format:dt,codecURI:N?N.codecURI:dt,fn:N?N.versionNeeded:dt,level:U,useCompressionStream:O,dataDescriptor:L,zip64:B,rawExtraField:W,wn:P,De:Z}}}function sc(t){if(!t)return St;if(!(t instanceof c))throw new f(ma);let e=0,n=0;t.forEach((t,n)=>{if(Qt(n,M,ya),!(t instanceof w))throw new f(Sa);if(Pc(t)>M)throw new f(ga);e+=4+Pc(t)});const r=new w(e),o=Ee(r);return t.forEach((t,e)=>{Mc(o,n,e),Mc(o,n+2,Pc(t)),Wc(r,t,n+4),n+=4+Pc(t)}),r}function ac(t,e,n,r,o){const{ke:i,ve:s,zipCrypto:a,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,S=!1;if(i&&e){if(y=o[ei],y===dt)throw new f(Fa);if(h===dt)throw new f(Da)}const g=!0===w,b=Tc(t,o,yi);if(e&&s&&!b&&Pc(c,u))throw new f(ha);const E=e&&(Boolean(c&&Pc(c)||u&&Pc(u))||s&&b);e||(p=0,h=0);const z=_i(E,a,l);e&&(i?(o.uncompressedSize=y,m=n===dt?Nc(y)+z:n+(s?0:z)):n===dt?(d=!0,(w||w===dt)&&(w=S=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(Uc(h,p)?Nc(y):y)+z));const x=!(E||e&&(0!==n||i)||Uc(h,p));x&&!a&&Tc(t,o,Tt)===dt&&(d=!1);const R=g||S||y>=O,F=g||m>=O;if(R||F){if(!1===w)throw new f(Ra);w=!0}return w=w||!1,{pn:m,Ie:{dataDescriptor:d,Oe:x,zip64:w,ge:g,hn:S,Se:R,ye:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:E}}}function cc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function uc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:d,dataDescriptor:w,directory:p,rawExtraField:h,wn:m,encryptionStrength:y,extendedTimestamp:S,ntfsTimestamp:g,ke:b,encrypted:E,Se:z,ye:x,uncompressedSize:R,hn:F,crc32:D}=t;let{version:A,compressionMethod:C}=t;const I=!p&&Uc(C,c);let T;const k=b||!I,v=u&&(t.bufferedWrite||!w||!z&&!x||k&&!F),_=v||u&&w&&(z||x);if(u&&(z||x)){const t=20,e=pc(t);if(e.sn(1),e.sn(t-4),T=e.Ht,v&&(e.ln(R),k)){const t=_i(E,l,y);e.ln(b?0:R+t)}}else T=St;let N,U,O,L,W;if(E&&!l){const t=pc(Pc(Ga)+2);t.sn(J),t.an(Ga),N=t.Ht,N[8]=y}else N=St;if(S){const t=Cc(n),e=(P=t)>=ba&&P<=Ea;if(e){const e=9+(o?4:0)+(i?4:0),n=pc(e);L=1+(o?2:0)+(i?4:0),W=t,n.sn(Q),n.sn(e-4),n.yn(L),n.rn(t),o&&n.rn(Ic(Cc(o))),i&&n.rn(Ic(Cc(i))),O=n.Ht}else O=St;if(g===dt?!e||Boolean(o||i):g)try{const t=Ac(n),e=pc(36);e.sn(10),e.sn(32),e.Sn(4),e.sn(1),e.sn(24),e.ln(t),e.ln(o?Ac(o):t),e.ln(i?Ac(i):t),U=e.Ht}catch{U=St}else U=St}else U=O=St;var P;let Z;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=ja||e===dt&&n===dt)if(r!=qa||e===dt&&n===dt)Z=St;else{const t=pc(8);t.sn(et),t.sn(4),t.sn((e===dt?0:e)&M),t.sn((n===dt?0:n)&M),Z=t.Ht}else{const t=dc(e===dt?0:e),r=dc(n===dt?0:n),o=3+t.length+r.length,i=pc(4+o);i.sn(tt),i.sn(o),i.yn(1),i.yn(t.length),i.an(t),i.yn(r.length),i.an(r),Z=i.Ht}}catch{Z=St}C===dt&&(C=I?8:0),A===dt&&(A=0!=C||p||E?20:10);const{fn:H}=t;I&&H!==dt&&(A=A>H?A:H),u&&(A=A>45?A:45),E&&!l&&(A=A>51?A:51,b&&D!==dt&&(N[4]=1),Mc(Ee(N),9,C),C=99);const V=_?Pc(T):0,G=V+Pc(N,O,U,Z,h,m);if(G+(t[vt]?67:0)>M)throw new f(ga);const j=new a(2e3*s.ceil(s.floor(n.getTime()/1e3)/2)),q=j<lt?lt:j>ut?ut:j,K=Pc(O)?new a(1e3*Cc(n)):Pc(U)?n:q,{he:Y,me:X,rawLastModDate:$}=Zc({version:A,bitFlag:Vc(c,d,w,E,C),compressionMethod:C,uncompressedSize:R,lastModDate:q,rawLastModDate:r,rawFilename:e,ye:x,Se:z,extraFieldLength:G}),nt=pc(ct+Pc(e)+G),rt=nt.Ht,ot=Ee(rt);return nt.rn(B),nt.an(Y),nt.an(e),_&&nt.an(T),nt.an(N),nt.an(O),nt.an(U),nt.an(Z),nt.an(h),nt.an(m),w&&(x||Lc(ot,18,0),z||Lc(ot,22,0)),{Ne:rt,qe:ot,he:Y,me:X,lastModDate:K,_e:K===q&&j.getTime()!=q.getTime(),rawLastModDate:$,encrypted:E,compressed:I,version:A,compressionMethod:C,He:L,Ve:W,Ee:St,Ze:V,xe:O,Re:U,Fe:Z,ze:N,extraFieldLength:G}}function lc(t,e){const{Me:n}=t;let{Ne:r,extraFieldLength:o}=n,i=64-(e+Pc(r))%64;i<4&&(i+=64);const s=new w(i),a=Ee(s);Mc(a,0,$),Mc(a,2,i-4);const c=r;n.Ne=r=new w(Pc(c)+i),Wc(r,c),Wc(r,s,Pc(c));const u=Ee(r);Mc(u,28,o+i),n.qe=u,t.Pe+=i}function dc(t){const e=new w(4);Ee(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function fc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=St,i=0,s=t?20:12;return n&&(s+=4),e&&(o=new w(s),r=Ee(o),n&&(i=4,Lc(r,0,P))),{Ue:o,Ge:r,je:i}}function wc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,ze:o,rawComment:i,Re:s,Fe:a,rawExtraField:c,De:u,He:l,Ve:d,ge:w,uncompressedSize:p,compressedSize:h}=r;let{Se:m,ye:y}=r;w||(m&&p<O&&(m=r.Se=!1),y&&h<O&&(y=r.ye=!1)),n=n||m||y;const S=r.offset>=O,g=r.diskNumberStart>=M;let b,E;if(S||g||m||y){const t=4+(m?8:0)+(y?8:0)+(S?8:0)+(g?4:0),e=pc(t);e.sn(1),e.sn(t-4),m&&e.ln(p),y&&e.ln(h),S&&e.ln(r.offset),g&&e.rn(r.diskNumberStart),b=e.Ht}else b=St;if(r.Ee=b,r.nn=S,r.be=g,d===dt)E=St;else{const t=pc(9);t.sn(Q),t.sn(5),t.yn(l),t.rn(d),E=t.Ht}r.xe=E;const z=Pc(b,o,s,a,E,c,u);if(z>M)throw new f(ga);e+=q+Pc(t,i)+z}return{Je:e,Qe:n}}function pc(t){const e=new w(t),n=Ee(e);let r=0;return{Ht:e,yn:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},sn:t=>{Mc(n,r,t),r+=2},rn:t=>{Lc(n,r,t),r+=4},ln:t=>{Bc(n,r,i(t)),r+=8},an:t=>{Wc(e,t,r),r+=Pc(t)},Sn:t=>r+=t}}function hc(t){const{diskNumber:e=0}=t;return e}function mc(t){const{diskOffset:e=0}=t;return e}function yc(t,e){const{availableSize:n=ft}=t;return e>n}function Sc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.ie:0)}function gc(t){const e=Ee(t);let n=0;for(;n+4<=Pc(t);){const r=4+Oc(e,n+2);if(1==Oc(e,n))return gc(ge(t.subarray(0,n),t.subarray(s.min(n+r,Pc(t)))));n+=r}return t}async function bc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await Dc(Yo(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function Ec(t,e){const n=await Ko(t,e,ct);if(Pc(n)<ct)return ct;const r=Ee(n);return ct+Oc(r,26)+Oc(r,28)}function zc(t,{offset:e,diskNumberStart:n}){return e+(t.Kt?t.Kt(n):0)}function xc(){const t=new w(4);return Lc(Ee(t),0,W),t}async function Rc(t,e){delete t.ne,await Fc(e,xc()),t.offset+=4}async function Fc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=Pc(e),await r.write(e)}finally{r.releaseLock()}}async function Dc(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(Pc(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Ac(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<za?za:e>xa?xa:e}}function Cc(t){return s.floor(t.getTime()/1e3)}function Ic(t){return s.min(Ea,s.max(ba,t))}function Tc(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function kc(t,e,n,r){const i=Tc(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new f(ua);return i}function vc(t,e,n){return qt(Tc(t,e,n))}function _c(t,e,n,r){return te(Tc(t,e,n,r))}function Nc(t){return t+5*(s.floor(t/16383)+1)}function Uc(t,e){return t===dt?e===dt||e>0:0!==t}function Oc(t,e){return t.getUint16(e,!0)}function Mc(t,e,n){t.setUint16(e,n,!0)}function Lc(t,e,n){t.setUint32(e,n,!0)}function Bc(t,e,n){t.setBigUint64(e,n,!0)}function Wc(t,e,n){t.set(e,n)}function Pc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Zc({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:s,rawFilename:a,ye:c,Se:u,extraFieldLength:l}){const d=pc(26),f=d.Ht,w=Ee(f);if(d.sn(t),d.sn(e),d.sn(n),s===dt){const t=new h(1),e=Ee(t);Mc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),Mc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.rn(s),d.Sn(4),c||o!==dt?d.rn(c?O:o):d.Sn(4),u||r!==dt?d.rn(u?O:r):d.Sn(4),d.sn(Pc(a)),d.sn(l),{he:f,me:w,rawLastModDate:s}}function Hc(t){return t.every(t=>t>=32&&t<=126)}function Vc(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Gc(t,e){if(!t)return!1;const{gn:n}=t;return n?n.includes(e):$n(t,e)}const jc=1048576,qc=".zip.js-temp",Kc=1048576,Yc=1048576,Xc=".zip.js-temp",Jc="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(Se(t));n.assign(ie,e),n.assign(fe,e)}({baseURI:void 0===E&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===E?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new d("zip-fs-core.min.js",E.baseURI).href})}catch{}const Qc="Entry filename already exists",$c="Duplicate entry filename in the imported zip file",tu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',eu="Entry is an ancestor of target entry",nu="Root directory cannot be moved",ru="Target entry is not a directory",ou="Parent entry is not a directory",iu="Readable stream already consumed",su="throw",au="keep-first",cu="keep-last",uu=new u([su,au,cu]),lu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",du="Invalid readerOptions (must be an object)",fu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",wu="zipjs-abort-export";class pu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new f(Qc);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.bn++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,En:r.En||r.uncompressedSize===dt,passThrough:r.passThrough,zn:r.zn||new a}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=Zu(t);r&&(t=r.pop(),n=Hu(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new f(Qc);n!=e.parent&&(Du(e),e.parent=n,n.children.push(e),Wu(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class hu extends pu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new hu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==yo?e.type==n:t.constructor!=wo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Ru(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await S.all([jo(r),jo(t,o)]);const i=Kt(e.signal),s=function(t,e,n,r){const{onstart:o,onprogress:i,onend:s}=n,{readable:a}=e;return t.data instanceof ki||!o&&!i&&!s?a:Cn(a).pipeThrough(new Sr({onstart:o,onprogress:i,onend:s,size:e.size}),{signal:r})}(n,r,e,i),a=!Go(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Cn(s).pipeTo(Tn(t.writable),{signal:i,preventClose:a,preventAbort:a}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(ze(t)&&t.message==We)return!1;throw t}}getText(t,e){return this.getData(new bo(t),e)}getBlob(t,e){return this.getData(new yo(t),e)}getData64URI(t,e){return this.getData(new wo(t),e)}getUint8Array(t){return this.getData(new Wo,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return be(await this.getUint8Array(t)).buffer}replaceBlob(t){vu(this,{data:t,Reader:mo,Writer:yo,uncompressedSize:t.size})}replaceText(t){vu(this,{data:t,Reader:So,Writer:bo,uncompressedSize:go(t)})}replaceData64URI(t){vu(this,{data:t,Reader:fo,Writer:wo,uncompressedSize:_u(t)})}replaceUint8Array(t){vu(this,{data:t,Reader:Bo,Writer:Wo,uncompressedSize:t.length})}replaceReadable(t){vu(this,{data:null,Reader:zu(t),Writer:null,uncompressedSize:dt})}}class mu extends pu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new mu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Pu(this,t,{options:e},!0)}addText(t,e,n={}){return Pu(this,t,{data:e,Reader:So,Writer:bo,options:n,uncompressedSize:go(e)})}addBlob(t,e,n={}){return Pu(this,t,{data:e,Reader:mo,Writer:yo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Pu(this,t,{data:e,Reader:fo,Writer:wo,options:n,uncompressedSize:_u(e)})}addUint8Array(t,e,n={}){return Pu(this,t,{data:e,Reader:Bo,Writer:Wo,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Pu(this,t,{data:e,Reader:class extends Lo{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Pu(this,t,{Reader:zu(e),options:n})}addFileSystemEntry(t,e={}){return Ou(this,t,e)}addFileSystemHandle(t,e={}){return Ou(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new a(t.lastModified)),Pu(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 mo(t),e)}importData64URI(t,e){return this.importZip(new fo(t),e)}importUint8Array(t,e){return this.importZip(new Bo(t),e)}importHttpContent(t,e){return this.importZip(new Lo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new yo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new wo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Wo,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:s}=r;ku(r.passThrough);const a=Tu(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!Kt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),d=n.assign({},r,a,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=gu([t],t=>Eu(t,d.passThrough)),p=[];let h=!1,m=0;try{o&&await gr(o,w),await g(t,e),s&&await gr(s,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await gr(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function g(t,e){if(r.concurrent){const n=(await S.allSettled(t.children.map(t=>b(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!Au(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await b(n,e)}async function b(e,n){if(u.aborted){if(h||Au(u.reason))return;Yt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await g(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},d)}catch(t){throw h?new f(wu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new f(wu));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await jo(t),r=new Es(t,e)),ku(e.passThrough);const o=function(t){if(t===dt)return su;if(uu.has(t))return t;throw new f(tu)}(e.duplicates),i=[],s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=s.pop();let c=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==au){c=!0;break}if(o!=cu)throw new f($c);this.fs.remove(r),r=new mu(this.fs,t,{data:null},e),i.push(r)}}else r=new mu(this.fs,t,{data:null},e),i.push(r)}if(c)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&!e.directory){if(o==au)continue;if(o!=cu)throw new f($c);this.fs.remove(e),e=dt}e||(e=new mu(this.fs,a,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(a);if(s){if(o==au)continue;if(o!=cu)throw new f($c);this.fs.remove(s)}i.push(Pu(r,a,{data:t,Reader:xu(n.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await S.all([Fu(r,Tu(e.readerOptions)),o?dt:jo(t)]),s=o?t:new Ja(t,e);return await async function(t,e,r,o,i){const{onstart:s,onprogress:a,onend:c,onentryprogress:u}=o,l=e,d=gu(e.children,t=>Uu(t)?0:1);let f=0,w=0;if(s&&await gr(s,r),o.bufferedWrite)await async function t(e){const n=(await S.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Uu(e))return;const{name:s,Ae:c}=Cu(e,l,o);let p=0;const h=await t.add(s,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{f+=t-p,p=t,a&&await gr(a,f,r)}}));w++,u&&await gr(u,w,d,h)}c&&await gr(c,f)}(s,r,gu([r],bu),e,i),o?s:(await s.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;Tu((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Uu(t)).map(n=>{const{name:r,Ae:o}=Cu(n,e,t);return{name:r,size:n.directory?0:Iu(n,Nu(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Uu(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(qt(t[Nt]))throw new f(Ca);if(o!==dt&&!(o instanceof w))throw new f(sa);const a=Pc(o);if(a>M)throw new f(ia);const l=t[vt],d=new c,p=t[kt]===dt?0:t[kt];let h=p,m=ft;const y=[],S=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);Tc(i,o,Ei)&&!e.endsWith(at)&&(e+=at);const a=oc(i,e,o);({name:e}=a);const{Ie:c}=ic(i,e,o);0==c.level||c.compressionMethod!==dt||c.ke||await hr(we())||(c.level=0);const u=!Tc(i,o,Ei);if(u&&r===dt)throw new f(Ca);const{pn:w,Ie:p}=ac(i,u,r,c,o);if(u&&!c.ke&&Uc(p.compressionMethod,p.level))throw new f(Ca);const g=n.assign({},o,a.Ie,c,p,{[vt]:l}),b=uc(g),E=fc(g),z={Me:b,Pe:Pc(b.Ne,E.Ue)};l&&lc(z,h);const x=u?w:0;d.set(e,n.assign({},g,b,{offset:h,diskNumberStart:0,compressedSize:x}));const R=z.Pe+x;y.push(R),S.add(Boolean(g.ge||g.uncompressedSize>=O||x>=O)),m=s.min(m,R),h+=R}if(d.size>1&&(l||h-m>=O&&(S.size>1||cc(y,p,!0)!=cc(y,p,!1)))&&!r)throw new f(Ca);const{Je:g,Qe:b}=wc(d);let E=Tc(i,t,mi);if(h>=O||g>=O||d.size>=M){if(!1===E)throw new f(Ra);E=!0}else E===dt&&b&&(E=!0);return h-p+g+a+(E?98:K)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await S.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class yu{constructor(){Lu(this)}get children(){return this.root.children}remove(t){Du(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new f(nu);if(!e.directory)throw new f(ru);if(e.isDescendantOf(t))throw new f(eu);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new f(Qc)}else Du(t),t.parent=e,e.children.push(t),Wu(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return Bu(this,n=>n.importBlob(t,e))}importData64URI(t,e){return Bu(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return Bu(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return Bu(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return Bu(this,n=>n.importReadable(t,e))}importZip(t,e){return Bu(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Su={FS:yu,ZipDirectoryEntry:mu,ZipFileEntry:hu};function gu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function bu(t){return t.uncompressedSize}function Eu(t,e){const{data:n}=t;return e&&n instanceof ki?n.compressedSize:t.uncompressedSize}function zu(t){let e;return function(){if(e)throw new f(iu);return e=!0,{readable:t}}}function xu(t){return class extends uo{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=n.assign({},t,e.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:i}=r,s=await e.entry.getData(new yo,n.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:i||o,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=s,e.xn=new mo(s),e.size=s.size,super.init()}readUint8Array(t,e){return this.xn.readUint8Array(t,e)}}}function Ru(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function Fu(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await S.all(n.map(async t=>{const n=t.reader=Ru(t.Reader,t.data,e);o.set(t,n);try{await jo(n)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}n.size!==dt&&(t.uncompressedSize=n.size,t.En=!1)})),o}function Du(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function Au(t){return Boolean(t)&&t.message==wu}function Cu(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let s={},a={};if(t.data instanceof ki){const e=Nu(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Ae:s,Ce:a}=rc(t.data,e,n)),e&&(a.passThrough=!0)}const c=n.assign({lastModDate:t.zn},s,r,i,a,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new f(lu);return{name:o,Ae:c}}function Iu(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.En?dt:Eu(t,e)}function Tu(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new f(du);return t&&ku(t.passThrough),t}function ku(t){if(Jt(t)===Pt)throw new f(fu)}function vu(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,En:r===dt})}function _u(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return s.floor(.75*(e-n))}function Nu(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Uu(t){return t.directory&&null===t.data}function Ou(t,e,r){return async function t(e,o,i,s=""){if(o){const c=s?s+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await Mu(o)),"file"==o.kind){const t=await o.getFile();i.push(Pu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new a(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function Mu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new S((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Mu(t));n(t,r,o)}else r(e)},o)}return await new S((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function Lu(t){t.entries=[],t.bn=0,t.root=new mu(t)}function Bu(t,e){const{entries:r,bn:o,root:i}=t;return Lu(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,bn:o,root:i}),e})}function Wu(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Pu(t,e,n,r){if(t.directory){const o=Zu(e);return o&&(e=o.pop(),t=Hu(t,o)),r?new mu(t.fs,e,n,t):new hu(t.fs,e,n,t)}throw new f(ou)}function Zu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Hu(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new f(Qc);if(n&&(t==n||t.isDescendantOf(n)))throw new f(eu)}else t=new mu(r.fs,e,{data:null},r)}),t}t.BlobReader=mo,t.BlobWriter=yo,t.Data64URIReader=fo,t.Data64URIWriter=wo,t.ERR_ABORTED=jt,t.ERR_AMBIGUOUS_ARCHIVE=Gi,t.ERR_ANCESTOR_ENTRY=eu,t.ERR_BAD_FORMAT=Ni,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Mi,t.ERR_DUPLICATED_NAME=oa,t.ERR_DUPLICATE_IMPORTED_ENTRY=$c,t.ERR_ENCRYPTED=Wi,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=ji,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=Vi,t.ERR_ENTRY_EXISTS=Qc,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Oi,t.ERR_EOCDR_NOT_FOUND=Ui,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Bi,t.ERR_HTTP_RANGE=Xr,t.ERR_HTTP_RESOURCE_CHANGED=Jr,t.ERR_HTTP_STATUS=Yr,t.ERR_INVALID_AUTHENTICATION_CODE=Pe,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=kn,t.ERR_INVALID_CODEC_MODULE=_n,t.ERR_INVALID_COMMENT=ia,t.ERR_INVALID_COMMENT_TYPE=sa,t.ERR_INVALID_COMPRESSED_DATA=Hn,t.ERR_INVALID_CRC32=Vn,t.ERR_INVALID_DATE=ua,t.ERR_INVALID_DUPLICATES=tu,t.ERR_INVALID_ENCRYPTION_STRENGTH=fa,t.ERR_INVALID_ENTRY=Pa,t.ERR_INVALID_ENTRY_COMMENT=aa,t.ERR_INVALID_ENTRY_COMMENT_TYPE=ca,t.ERR_INVALID_ENTRY_NAME=la,t.ERR_INVALID_EXTRAFIELD=ma,t.ERR_INVALID_EXTRAFIELD_DATA=ga,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Sa,t.ERR_INVALID_EXTRAFIELD_TYPE=ya,t.ERR_INVALID_FILENAME_VALIDATION=Yi,t.ERR_INVALID_FUNCTION_OPTION=Zt,t.ERR_INVALID_GID=_a,t.ERR_INVALID_LEVEL=Ba,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=Xi,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=Ma,t.ERR_INVALID_MSDOS_DATA=La,t.ERR_INVALID_PASSWORD=We,t.ERR_INVALID_PASSWORD_TYPE=Vt,t.ERR_INVALID_PASS_THROUGH=lu,t.ERR_INVALID_PASS_THROUGH_VALUE=Gt,t.ERR_INVALID_READER=Ta,t.ERR_INVALID_READER_OPTIONS=du,t.ERR_INVALID_SIGNAL=Ht,t.ERR_INVALID_SIGNATURE_DATA=Wa,t.ERR_INVALID_STRICTNESS=Ki,t.ERR_INVALID_UID=va,t.ERR_INVALID_UNCOMPRESSED_SIZE=Zn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=Ua,t.ERR_INVALID_UNIX_ID_SIZE=Oa,t.ERR_INVALID_UNIX_MODE=Na,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=da,t.ERR_ITERATOR_COMPLETED_TOO_SOON=Qr,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Li,t.ERR_OVERLAPPING_ENTRY=Hi,t.ERR_PARENT_NOT_DIRECTORY=ou,t.ERR_READABLE_CONSUMED=iu,t.ERR_RESERVED_COMPRESSION_METHOD=vn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=nu,t.ERR_SPLIT_ZIP_FILE=Zi,t.ERR_TARGET_NOT_DIRECTORY=ru,t.ERR_UNDEFINED_COMPRESSION_METHOD=Da,t.ERR_UNDEFINED_CRC32=Aa,t.ERR_UNDEFINED_READER=Ia,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=Fa,t.ERR_UNDETERMINED_SIZE=Ca,t.ERR_UNSAFE_FILENAME=qi,t.ERR_UNSUPPORTED_COMPRESSION=Nn,t.ERR_UNSUPPORTED_CONTEXT=Jc,t.ERR_UNSUPPORTED_CRYPTO_API=He,t.ERR_UNSUPPORTED_ENCRYPTION=Pi,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=ha,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=wa,t.ERR_UNSUPPORTED_FORMAT=Ra,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=fu,t.ERR_UNSUPPORTED_SPLIT_USDZ=pa,t.ERR_UNSUPPORTED_UINT64=Ji,t.ERR_WORKER_STARTUP_TIMEOUT=dr,t.ERR_WRITER_NOT_INITIALIZED=$r,t.ERR_WRITER_SIZE_NOT_WRITABLE=to,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=Za,t.ERR_ZIP_NOT_EMPTY=ka,t.HttpRangeReader=class extends Lo{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=Lo,t.Reader=uo,t.SplitDataReader=Po,t.SplitDataWriter=Zo,t.TextReader=So,t.TextWriter=bo,t.Uint8ArrayReader=Bo,t.Uint8ArrayWriter=Wo,t.VERSION="2.13.1",t.WARNING_APPENDED_DATA=os,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=Va,t.WARNING_COMPRESSED_PATCHED_DATA=ts,t.WARNING_COMPRESSION_UNAVAILABLE=Ha,t.WARNING_DUPLICATE_FILENAME=cs,t.WARNING_MALFORMED_EXTRA_FIELD=es,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=fs,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=ws,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=ps,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=ds,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=us,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=ls,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=ss,t.WARNING_PREPENDED_DATA=is,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=as,t.WARNING_UNKNOWN_VERSION=$i,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=ns,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=Qi,t.WARNING_WRAPPED_ENTRIES_COUNT=rs,t.Writer=lo,t.ZipDirectoryEntry=mu,t.ZipEntry=pu,t.ZipFS=yu,t.ZipFileEntry=hu,t.ZipReader=Es,t.ZipReaderStream=zs,t.ZipWriter=Ja,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new R;this.readable=e,this.zipWriter=new Ja(n,t),this.se=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new R({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await ec(e,t)}}()}});return nc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new R({start(t){e=t}});return nc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await S.allSettled(e.from(this.se))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await ec(r,t),t}try{return await r.close(t,n)}catch(t){throw await ec(r,t),t}}},t.configure=function(t){n.assign(fe,me(Se(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Kc}=t;return function(){const t=[];let n,r,o,i=0,s=!1;const a=new D({async write(o){s?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new R;r=In(e.readable),n=e.writable.getWriter(),s=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:a,readable:new F({async pull(e){if(s){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=jc,directoryName:r=qc,getDirectory:o=()=>I.storage.getDirectory()}=t;let i;function s(){return i||(i=S.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,a,c=0,u=!1;const l=new D({async write(a){u?await i.write(a):(t.push(a),c+=a.length,c>n&&await async function(){const n=await s();r=z.randomUUID?z.randomUUID():e.from(z.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let d=0;return{writable:l,readable:new F({async pull(e){if(u){if(!a){const t=await o.getFile();a=t.stream().getReader()}const{value:t,done:n}=await a.read();n?e.close():e.enqueue(t)}else d<t.length?e.enqueue(t[d++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await s();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Yc,directoryName:r=Xc,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new f(Jc);const i=o||(()=>I.storage.getDirectory());let a;function c(){return a||(a=S.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,o,i=0,a=!1,u=0,l=0;const d=new D({async write(s){a?(o.write(s,{at:u}),u+=s.length):(t.push(s),i+=s.length,i>n&&await async function(){const n=await c();r=z.randomUUID?z.randomUUID():e.from(z.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),a=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let f=0;return{writable:d,readable:new F({pull(e){if(a){const t=u-l;if(t<=0)return void e.close();const n=new w(s.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else f<t.length?e.enqueue(t[f++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=Su,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Bn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Gc(n,Gn)||Gc(t,Gn)||Gc(t,qn),decompression:Gc(r,Gn)||Gc(e,Gn)||Gc(e,qn),registered:!1},{compressionMethod:9,compression:!1,decompression:Gc(r,jn)||Gc(e,jn),registered:!1}];for(const t of Bn()){const e=Wn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:dt,decompression:e?typeof e.DecompressionStream==pt:dt,registered:!0})}return o},t.isZipFile=xs,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:s,versionNeeded:a}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new f(kn);if(Un.includes(e))throw new f(vn);const c=typeof i==pt||typeof s==pt;if(!(c||typeof r==mt&&r.length))throw new f(kn);On.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:a}),c&&Pn(n,{CompressionStream:i,DecompressionStream:s})},t.resetConfiguration=function(){for(const t of de)delete fe[t];n.assign(fe,ie)},t.terminateWorkers=async function(){await S.allSettled(Ur.map(t=>(Gr(t),t.terminate()))),fr=dt,wr=!1},t.unregisterCodec=function(t){const e=On.get(t);if(e){let n;On.delete(t),On.forEach(t=>n=n||t.format==e.format),n||Mn.delete(e.format)}}});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:s,Date:a,Map:c,Set:u,Response:l,URL:d,Error:f,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:S,TextDecoder:E,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,J=39169,Q=21589,$=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,st=1024,at="/",ct=30,ut=new a(2107,11,31,23,59,58),lt=new a(1980,0,1),dt=void 0,ft=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",gt=new w,St=k.asyncDispose||k(),Et="password",bt="rawPassword",Rt="passThrough",xt="signal",zt="useWebWorkers",Ft="useCompressionStream",Dt="transferStreams",At="preventClose",It="level",Ct="useUnicodeFileNames",Tt="dataDescriptor",kt="offset",vt="usdz",_t="maxAppendedDataSize",Nt="signCentralDirectory",Ut="entry",Ot="filename",Mt="comment",Lt="strict",Bt="balanced",Wt="tolerant",Pt="compressed",Zt="Invalid option (must be a function)",Ht="Invalid signal (must be an AbortSignal instance)",Vt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Gt="Invalid passThrough option (must be a boolean or 'compressed')",jt="The operation was aborted";function qt(t){if(t&&typeof t!=pt)throw new f(Zt);return t}function Yt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new f(Ht);return t||dt}function Kt(t){if(t&&t.aborted)throw t.reason===dt?new DOMException(jt,"AbortError"):t.reason}function Xt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new f(Vt)}function Jt(t){if(t!==dt&&typeof t!=yt&&t!==Pt)throw new f(Gt);return t}function Qt(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new f(n)}function $t(t,e,n){t!==dt&&Qt(t,e,n)}function te(t){return typeof t==mt&&t.trim()?o(t):t}const ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof C!=wt&&C.hardwareConcurrency&&(oe=C.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof I!=wt&&I},se="maxWorkers",ae="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",se,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],de=[ae,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],fe={...ie};function we(){return fe}function pe(t){return he(t.chunkSize)}function he(t){return t=te(t),o.isInteger(t)&&t>=1?s.max(t,64):65536}function me(t){const e={};for(const n of de){const r=t[n];r!==dt&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=te(e),t==se&&(!o.isInteger(e)||e<1))throw new f(ee)}else if(le.includes(t))qt(e);else if(t==ae){if(e&&typeof e!=mt)throw new f(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new f(re);return e}function ge(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function Se(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Ee(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function be(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Re(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[ze,Fe,De,Ae,Ie,Ce,Te,ke]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=ke[255&t]^Te[t>>>8&255]^Ce[t>>>16&255]^Ie[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^ze[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ze[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends z{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof S==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new S).encode(t)}const Ue=64,Oe=20,Me=new w([128]),Le=new w(1),Be=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),We=new w(256),Pe=new Int32Array(256),Ze=new Int32Array(256),He=new Int32Array(256),Ve=new Int32Array(256);let Ge=!1;function je(t){const e=function(){const t=new Int32Array(Be),e=new Int32Array(16),n=new w(Ue),r=new m(n.buffer),o=new w(8);let i=0,a=0;return{update:c,digest:function(){const e=8*a,n=s.floor(e/4294967296),r=e>>>0;for(c(Me,0,1);56!=i;)c(Le,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Oe),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Be),i=0,a=0,u}};function c(t,e,o){const s=e+o;if(a+=o,i){for(;e<s&&i<Ue;)n[i++]=t[e++];i==Ue&&(u(r,0),i=0)}if(e+Ue<=s){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Ue<=s;e+=Ue)u(n,e)}for(;e<s;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],s=t[1],a=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((a^c)&s^c)+u+1518500249+e[t]|0,s=s<<30|s>>>2,c=(u<<5|u>>>27)+((s^a)&i^a)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,a=(c<<5|c>>>27)+((i^s)&u^s)+a+1518500249+e[t+2]|0,u=u<<30|u>>>2,s=(a<<5|a>>>27)+((u^i)&c^i)+s+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(s<<5|s>>>27)+((c^u)&a^u)+i+1518500249+e[t+4]|0,a=a<<30|a>>>2;u=(i<<5|i>>>27)+((a^c)&s^c)+u+1518500249+e[15]|0,s=s<<30|s>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((s^a)&i^a)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,a=(c<<5|c>>>27)+((i^s)&u^s)+a+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,s=(a<<5|a>>>27)+((u^i)&c^i)+s+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(s<<5|s>>>27)+((c^u)&a^u)+i+1518500249+o|0,a=a<<30|a>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(s^a^c)+u+1859775393+o|0,s=s<<30|s>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^s^a)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,a=(c<<5|c>>>27)+(u^i^s)+a+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,s=(a<<5|a>>>27)+(c^u^i)+s+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(s<<5|s>>>27)+(a^c^u)+i+1859775393+o|0,a=a<<30|a>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(s&a|(s|a)&c)+u+2400959708+o|0,s=s<<30|s>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&s|(i|s)&a)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,a=(c<<5|c>>>27)+(u&i|(u|i)&s)+a+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,s=(a<<5|a>>>27)+(c&u|(c|u)&i)+s+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(s<<5|s>>>27)+(a&c|(a|c)&u)+i+2400959708+o|0,a=a<<30|a>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(s^a^c)+u+3395469782+o|0,s=s<<30|s>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^s^a)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,a=(c<<5|c>>>27)+(u^i^s)+a+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,s=(a<<5|a>>>27)+(c^u^i)+s+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(s<<5|s>>>27)+(a^c^u)+i+3395469782+o|0,a=a<<30|a>>>2;t[0]=t[0]+i|0,t[1]=t[1]+s|0,t[2]=t[2]+a|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Ue),r=new w(Ue);t.length>Ue&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Ue;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Ue),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Ue),e.update(t,0,Oe);const o=e.digest();return e.update(n,0,Ue),o}}}function qe(t){return We[t>>>24]<<24|We[t>>>16&255]<<16|We[t>>>8&255]<<8|We[255&t]}function Ye(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Ke(t){return 255&(t<<1^27*(t>>7))}const Xe=typeof R!=wt&&typeof R.getRandomValues==pt,Je="Invalid password",Qe="Invalid authentication code",$e="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new f(tn)}const nn={name:"PBKDF2"},rn=n.assign({hash:{name:"HMAC"}},nn),on=n.assign({iterations:1e3,hash:{name:"SHA-1"}},nn),sn=["deriveBits"],an=[8,12,16],cn=[16,24,32],un=10,ln=typeof R!=wt,dn=ln&&R.subtle;let fn=ln&&typeof dn!=wt&&typeof dn.importKey==pt&&typeof dn.deriveBits==pt;class wn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){super({start(){hn(this,t,e,n)},async transform(t,e){const n=this,{password:o,strength:i,l:s,ready:a}=n;o?(await async function(t,e,n,r){const o=await gn(t,e,n,En(r,0,an[e])),i=En(r,an[e]);if(o[0]!=i[0]||o[1]!=i[1])throw yn(t),new f(Je)}(n,i,o,En(t,0,an[i]+2)),t=En(t,an[i]+2),r?(yn(n),e.error(new f($e))):s()):await a;const c=new w(t.length-un-(t.length-un)%16);e.enqueue(mn(n,t,c,0,un,!0))},async flush(t){const{h:e,m:n,ready:r}=this;if(e){await r;const i=En(n,n.length-un),s=new w(En(n,0,n.length-un));e.process(s,!0);const a=e.digest();let c=n.length<un?1:0;for(let t=0;t<un;t++)c|=a[t]^i[t];if(c&&o)throw new f(Qe);t.enqueue(s)}},cancel(){yn(this)}})}}class pn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){super({start(){hn(this,t,e,n)},async transform(t,e){const n=this,{password:r,strength:o,l:i,ready:s}=n;let a=gt;r?(a=await async function(t,e,n){const r=en(new w(an[e]));return Se(r,await gn(t,e,n,r))}(n,o,r),i()):await s;const c=new w(a.length+t.length-t.length%16);c.set(a,0),e.enqueue(mn(n,t,c,a.length,0,!1))},async flush(t){const{h:e,m:n,ready:r}=this;if(e){await r;const o=new w(n);e.process(o,!1);const i=En(e.digest(),0,un);t.enqueue(Se(o,i))}},cancel(){yn(this)}})}}function hn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Sn(e,r),strength:o-1,m:gt})}function mn(t,e,n,r,o,i){const{h:s,m:a}=t;a.length&&(e=Se(a,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=En(n,r,r+u);t.set(En(e,0,u)),s.process(t,i)}return t.m=En(e,u),n}function yn({h:t}){t&&t.dispose&&t.dispose()}async function gn(t,e,r,o){t.password=null;const i=cn[e],a=await async function(t,e,r){if(fn)try{const o=await dn.importKey("raw",t,rn,!1,sn);return new w(await dn.deriveBits(n.assign({salt:e},on),o,8*r))}catch{fn=!1}return function(t,e,n,r){const o=je(t),i=new w(r),a=new w(e.length+4),c=new m(a.buffer);a.set(e);for(let t=1,n=0;n<r;t++,n+=Oe){c.setUint32(e.length,t),o.update(a,0,a.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Oe),u=o.digest();for(let t=0;t<Oe;t++)l[t]^=u[t]}i.set(l.subarray(0,s.min(Oe,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.h=function(t,e){!function(){if(!Ge){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),We[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);We[0]=99;for(let t=0;t<256;t++){const e=We[t],n=Ke(e),r=n<<24|e<<16|e<<8|n^e;Pe[t]=r,Ze[t]=r>>>8|r<<24,He[t]=r>>>16|r<<16,Ve[t]=r>>>24|r<<8}Ge=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=qe(r<<8|r>>>24)^i<<24,i=Ke(i)):n>6&&t%n==4&&(r=qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=je(e);let s=0,a=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){s=s+1|0,s||(a=a+1|0,a||(c=c+1|0,c||(u=u+1|0)));let t=Ye(s)^n[0],e=Ye(a)^n[1],i=Ye(c)^n[2],l=Ye(u)^n[3],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[4],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[5],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[6],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[7];t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[8],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[9],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[10],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[11],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[12],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[13],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[14],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[15],t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[16],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[17],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[18],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[19],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[20],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[21],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[22],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[23],t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[24],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[25],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[26],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[27],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[28],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[29],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[30],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[31],t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[32],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[33],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[34],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[35],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[36],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[37],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[38],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[39];let h=40;r>10&&(t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[40],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[41],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[42],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[43],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[44],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[45],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[46],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[47],h=48),r>12&&(t=Pe[d>>>24]^Ze[f>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[48],e=Pe[f>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&d]^n[49],i=Pe[w>>>24]^Ze[p>>>16&255]^He[d>>>8&255]^Ve[255&f]^n[50],l=Pe[p>>>24]^Ze[d>>>16&255]^He[f>>>8&255]^Ve[255&w]^n[51],d=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[52],f=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[53],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[54],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[55],h=56),o[0]=(We[d>>>24]<<24|We[f>>>16&255]<<16|We[w>>>8&255]<<8|We[255&p])^n[h],o[1]=(We[f>>>24]<<24|We[w>>>16&255]<<16|We[p>>>8&255]<<8|We[255&d])^n[h+1],o[2]=(We[w>>>24]<<24|We[p>>>16&255]<<16|We[d>>>8&255]<<8|We[255&f])^n[h+2],o[3]=(We[p>>>24]<<24|We[d>>>16&255]<<16|We[f>>>8&255]<<8|We[255&w])^n[h+3]}}(En(a,0,i),En(a,i,2*i)),En(a,2*i)}function Sn(t,e){return e===dt?Ne(t):e}function En(t,e,n){return t.subarray(e,n)}class bn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){xn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new f(Je);t=t.subarray(12)}r?e.error(new f($e)):e.enqueue(zn(n,t))}})}}class Rn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){xn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=en(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Fn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Fn(n,t),o),e.enqueue(r)}})}}function xn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{keys:o,S:new ve(o[0]),R:new ve(o[2])}),r)for(let e=0;e<r.length;e++)Dn(t,r[e]);else for(let n=0;n<e.length;n++)Dn(t,e.charCodeAt(n))}(t,e,r)}function zn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=An(t)^e[r],Dn(t,n[r]);return n}function Fn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=An(t)^e[r],Dn(t,e[r]);return n}function Dn(t,e){let[,n]=t.keys;t.S.append([e]);const r=~t.S.get();n=Cn(s.imul(Cn(n+In(r)),134775813)+1),t.R.append([n>>>24]);const o=~t.R.get();t.keys=[r,n,o]}function An(t){const e=2|t.keys[2];return In(s.imul(e,1^e)>>>8)}function In(t){return 255&t}function Cn(t){return 4294967295&t}function Tn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}function kn(t,e){t=Tn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function vn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const _n="Invalid codec definition",Nn="Reserved compression method",Un="Invalid codec module",On="Compression method not supported",Mn=[0,8,9,99],Ln=new c,Bn=new c;function Wn(t){return Ln.get(t)}function Pn(){return e.from(Ln.values(),t=>n.assign({},t,Bn.get(t.format)))}function Zn(t){return Bn.get(t)}function Hn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new f(Un);Bn.set(t,{CompressionStream:n,DecompressionStream:r})}const Vn="Invalid uncompressed size",Gn="Invalid compressed data",jn="Invalid CRC32",qn="deflate-raw",Yn="deflate64-raw",Kn="gzip",Xn=[31,139,8];class Jn extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:s,zipCrypto:a,computeCrc32:c,level:u,deflate64:l,format:d,compressionMethod:f,inputSize:w}=t,p=this;let h,y,g,S=super.readable;const E=d&&Zn(d),b=c&&o&&!l&&!E&&(!i||a)&&Boolean(s&&r);if(i&&!a||!c||b||(h=new _e,S=sr(S,h)),o)if(E)S=ar(S,or(E.CompressionStream,d,{level:u,chunkSize:e,compressionMethod:f,uncompressedSize:w}));else if(b)g=new Qn,S=ar(S,new r(Kn)),S=sr(S,g);else try{S=ir(S,s,{level:u,chunkSize:e},r,n)}catch(t){let e;try{e=new r(Kn)}catch{throw t}S=ar(S,e),S=sr(S,new Qn)}i&&(a?S=sr(S,new Rn(t)):(y=new pn(t),S=sr(S,y))),rr(p,S,()=>{i&&!a||!c||(p.crc32=b?g.crc32:new m(h.value.buffer).getUint32(0))})}}class Qn extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Se(n,t));const i=o-8,a=s.min(i,n.length);r.enqueue(Se(n.subarray(0,a),t.subarray(0,i-a))),n=Se(n.subarray(a),t.subarray(i-a))},flush(){const e=be(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class $n extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:s,crc32:a,compressed:c,useCompressionStream:u,deflate64:l,format:d,compressionMethod:p,rawBitFlag:h,outputSize:y}=t;let S,E,b=super.readable;if(i&&(o?b=sr(b,new bn(t)):(E=new wn(t),b=sr(b,E))),c){const t=d&&Zn(d);if(t)b=ar(b,or(t.DecompressionStream,d,{chunkSize:e,compressionMethod:p,rawBitFlag:h,uncompressedSize:y}));else try{b=ir(b,u,{chunkSize:e,deflate64:l},r,n)}catch(t){if(l||y===dt)throw t;let e;try{e=new r(Kn)}catch{throw t}b=function(t,e,n){const r=new ve;let o,i,s,a=0,c=!1;const u=new g((t,e)=>{i=t,s=e});u.catch(()=>{}),n||i();const l=new z({start(t){const e=new w(10);e.set(Xn),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,p();try{await u}finally{h()}const e=new w(8),o=be(e);o.setUint32(0,r.get(),!0),o.setUint32(4,n,!0),t.enqueue(e)},cancel(t){s(t)}}),d=new z({transform(t,e){r.append(t),a+=t.length,a>=n?i():c&&p(),e.enqueue(t)},cancel(t){s(t)}});return t=sr(t,l),sr(t=ar(t,e),d);function p(){h(),o=v(()=>s(new f(Vn)),5e3)}function h(){_(o)}}(b,e,y)}b=function(t){const e=t.getReader();return new F({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new f(Gn);throw e.cause=t,e}const{value:r,done:o}=n;o?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}(b)}s&&(S=new _e,b=sr(b,S)),rr(this,b,()=>{if(s){const t=new m(S.value.buffer);if(a!=t.getUint32(0,!1))throw new f(jn)}})}}const tr=new c;function er(t,e){if(!t)return!1;let n=tr.get(t);n||(n=new c,tr.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function nr(t){return er(t,qn)}function rr(t,e,r){e=sr(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function or(t,e,n){if(!t)throw new f(On);return new t(e,n)}function ir(t,e,n,r,o){const i=e&&r?r:o||r,s=n.deflate64?Yn:qn;let a;try{a=new i(s,n)}catch(t){if(!e||!o||i==o)throw t;a=new o(s,n)}return ar(t,a)}function sr(t,e){return Tn(t).pipeThrough(e)}function ar(t,e){const n=e.writable.getWriter(),r=t.getReader();return async function(){try{for(;;){await n.ready;const t=await r.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(n,t),await async function(t,e){try{await t.cancel(e)}catch{}}(r,t)}}(),e.readable}const cr="data",ur="deflate",lr="inflate";class dr extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(ur)?i=Jn:o.startsWith(lr)&&(i=$n),r.outputSize=0;let s=0;const a=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(s+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:s})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new f(Vn)},flush(){const{crc32:t}=a;n.assign(r,{crc32:t,inputSize:s})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(a).pipeThrough(l)})}}class fr extends z{constructor(t){const e=[];let r=0,i=0;function s(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=65536),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(s())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const wr="Worker startup timeout";let pr,hr,mr,yr=()=>{};async function gr(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.F)||!(!nr(e)&&(r=e,!er(r,Kn)))||!!n&&await Sr();var r}async function Sr(){if(yr)try{return await void 0,!0}catch{}return!1}function Er(t){t.createWorker?hr=!0:pr=!1}class br{constructor(t,{readable:e,writable:r},o,i){const{options:s,config:a,D:c,useWebWorkers:u,transferStreams:l,workerURI:d}=o;let{createWorker:f}=o;const{signal:w}=c;return hr&&(f=dt),n.assign(t,{A:!0,I:(t.I||0)+1,readable:e.pipeThrough(new fr(pe(a))).pipeThrough(new Rr(c),{signal:w}),writable:r,options:n.assign({},s),C:o,workerURI:d,createWorker:f,transferStreams:l,terminate:()=>new g(e=>{const{T:n,A:r}=t;r?(t.v=t.v||[],t.v.push(e)):(n&&(n.terminate(),t.T=null),e()),t._=null}),N(){if(t.A){const{v:e,T:n}=t;e&&(t.v=null,n&&(t.U=!0,n.terminate()),e.forEach(t=>t())),t.A=!1,i(t)}}}),pr===dt&&(pr=typeof T!=wt),(u&&mr&&(pr&&d||f)?mr:zr)(t,a)}}class Rr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await xr(t,n)},async transform(t,r){o+=t.length,e&&await xr(e,o,n),r.enqueue(t)},async flush(){r&&await xr(r,o)}})}}async function xr(t,...e){try{await t(...e)}catch{}}function zr(t,e){return{run:()=>Fr(t,e)}}async function Fr({options:t,readable:e,writable:n,N:r,C:o},i){let s,a,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(ur),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.F&&!nr(r)&&await u():await u()||n&&!n.F||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),s=new dr(t,i),a=new fr(pe(i)),await e.pipeThrough(s).pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{crc32:r,inputSize:o,outputSize:c}=s;return{crc32:r,inputSize:o,outputSize:c}}catch(t){if(s){const e=a?a.outputSize:0;if(o.outputSize=e,Re(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Sr()),c}}const Dr={type:"module"},Ar="error";let Ir,Cr,Tr,kr=!0;try{kr=typeof N==pt&&N(new DOMException("","AbortError")).code!==dt}catch{}var vr;function _r(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Nr(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t._=null}function Ur(t,e,r,o,i=!0){const{createWorker:s}=r;let a,c,u;if(s)a=s();else if(Cr===dt||Ir!==t){const n=typeof t==pt;c=n?t(i):t;const s=c.startsWith("data:"),l=c.startsWith("blob:");if(s||l){o===dt&&(o=!1),o&&(u=Dr);try{a=new T(c,u)}catch(i){if(l)try{d.revokeObjectURL(c)}catch{}if(n&&l)return Ur(t,e,r,o,!1);if(o)throw i;return Ur(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=Dr);try{c=new d(c,e)}catch{}try{a=new T(c,u)}catch(n){if(o)return Ur(t,e,r,!1,i);throw n}}Ir=t,Cr=c,Tr=u}else a=new T(Cr,Tr);return a.addEventListener("message",t=>{r.O=!0,Or(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:s,error:a,errorValue:c}=t,{reader:u,writer:l,M:d,L:p,N:h,I:m}=e,y=()=>e.I!=m;try{if(a)g(function(t,e){const{message:r,stack:o,code:i,name:s,outputSize:a,cause:c,codecImportFailed:u}=t;let l;if(e?l=e.value:(l=n.assign(new f(r),{stack:o,code:i,name:s}),c&&(l.cause=n.assign(new f(c.message),{name:c.name}))),Re(l))try{a!==dt&&(l.outputSize=a),u&&(l.codecImportFailed=!0),e&&(l.name!==s&&(l.name=s),l.code!==i&&(l.code=i))}catch{}return l}(a,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Lr({type:cr,value:t,done:n,messageId:i},e)}if(r==cr){const t=new w(o);await l.ready,await l.write(t),y()||Lr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(d(t),S(),h())}(s)}}catch(a){y()||(Nr(e),g(a))}function g(t){y()||(p(t),S(),Re(t)&&t.codecImportFailed||h())}function S(){l&&l.releaseLock()}}(t,r)}),a.addEventListener(Ar,t=>Mr(t,r)),a.addEventListener("messageerror",t=>Mr(t,r)),a}function Or(t){const{B:e}=t;e&&(_(e),t.B=null)}function Mr(t,e){t.preventDefault&&t.preventDefault(),Or(e);const{O:r,L:o,writer:i,N:s}=e;Nr(e),r||(e.T=null);let a=t.error||new f(t.message||Ar);r||(a=n.assign(new f(a.message||Ar),{W:!0}),e.P=a),o&&(o(a),i&&i.releaseLock(),r&&s())}function Lr(t,{T:e,writer:n,transferStreams:r,O:o}){try{const{value:n,readable:i,writable:s}=t,a=[];if(n&&(t.value=Ee(n),a.push(t.value.buffer)),r&&kr&&o?(i&&a.push(i),s&&a.push(s)):t.readable=t.writable=null,a.length)try{return e.postMessage(t,a),!0}catch{kr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}vr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:s}=e;let{wasmURI:a}=e;if(!t._){let c;typeof a==pt&&(a=a());try{c=Ur(t.workerURI,r,t)}catch{return Er(t),zr(t,e)}n.assign(t,{T:c,O:!1,U:!1,P:null,_:{run:async()=>{try{return await async function(t,e){if(!t.T){const{P:e}=t;t.P=null;const n=e||new f(wr);throw n.W=!0,n}let r,i;const s=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,C:o}=t;if(o.outputSize=r,Re(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,H:null,M:r,L:i,result:s});const{readable:a,options:c}=t,{writable:u,closed:l,V:d}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:s}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),a=s.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return a.catch(t=>{o||n.assign(e,{Z:!0,H:t})}),{writable:i,closed:a,V:()=>{o=!0,r.abort()}}}(t.writable,t);let w;try{w=Lr({type:"start",options:c,config:e,readable:a,writable:u},t)}catch(e){d();try{await l}catch{}throw t.N(),e}w||n.assign(t,{reader:a.getReader(),writer:u.getWriter()});const{workerStartupTimeout:p}=e;!t.O&&o.isFinite(p)&&p>=0&&(t.B=v(()=>function(t){if(t.B=null,t.O)return;const{L:e,writer:n}=t;if(Nr(t),t.T=null,e){const t=new f(wr);t.W=!0,e(t),n&&n.releaseLock()}}(t),p));try{const t=await s;return await h(),await l,t}catch(e){await h(),d();try{await l}catch{}const{outputSize:n,C:r,Z:o,H:i}=t;r.outputSize=n;const s=Re(e)&&(e.codecImportFailed||e.W),a=o&&!s?i:e;if(Re(a))try{a.outputSize=n}catch{}throw a}async function h(){if(!w&&!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:a,baseURI:r,workerStartupTimeout:s})}catch(n){if(n&&n.W)return Er(t),_r(t),Fr(t,e);if(n&&n.codecImportFailed){if(t.reader)return _r(t),Fr(t,e);t.N()}throw n}}}})}return t._},mr=vr;let Br=[];const Wr=[];let Pr,Zr,Hr=0;async function Vr(t,e){const{options:n,config:r}=e,{transferStreams:i,useWebWorkers:s,useCompressionStream:a,compressed:c,checkCrc32:u,computeCrc32:l,encrypted:f,format:w,codecURI:p}=n,{workerURI:h,createWorker:m,maxWorkers:y}=r;w&&(p&&(n.codecURI=function(t,e){try{return new d(t,e).toString()}catch{return t}}(p,r.baseURI)),await async function(t,e){!Bn.has(t)&&e&&Hn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(w,n.codecURI)),e.transferStreams=!w&&(i||i===dt&&r.transferStreams);const S=!(c||u||l||f),E=w===dt||Boolean(n.codecURI);return e.useWebWorkers=!S&&E&&(s||s===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&h?h:dt,e.createWorker=e.useWebWorkers&&m?m:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=Br.find(t=>!t.A);if(n)return Kr(n),new br(n,t,e,b);if(Br.length<y){const n={G:Hr};return Hr++,Br.push(n),new br(n,t,e,b)}return new g(n=>{Wr.push({resolve:n,stream:t,C:e}),Zr=r.workerStarvationTimeout,Gr()})}()).run();function b(t){if(jr(),Wr.length){const[{resolve:e,stream:n,C:r}]=Wr.splice(0,1);e(new br(t,n,r,b)),Gr()}else t.T?(Kr(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.U?t.U=!1:t.j=v(async()=>{Br=Br.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Br=Br.filter(e=>e!=t)}}function Gr(){!Pr&&Wr.length&&o.isFinite(Zr)&&Zr>=0&&(Pr=v(qr,Zr))}function jr(){Pr&&(_(Pr),Pr=null)}function qr(){if(Pr=null,Wr.length){const[{resolve:t,stream:e,C:r}]=Wr.splice(0,1),o=n.assign({},r,{useWebWorkers:!1,workerURI:dt,createWorker:dt});t(new br({},e,o,Yr)),Gr()}}function Yr(){jr(),Gr()}function Kr(t){const{j:e}=t;e&&(_(e),t.j=null)}const Xr="\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 Jr(t,e){return Qr(t,e,!0)}function Qr(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=Xr[t[n]];return e}(t):new E(e,{ignoreBOM:n}).decode(t)}const $r="HTTP error ",to="HTTP Range not supported",eo="HTTP resource changed",no="Writer iterator completed too soon",ro="Writer not initialized",oo="Invalid writer (size must be writable)",io="Content-Range",so="Range",ao="GET",co="bytes",uo=16777216,lo="writable",fo=k();class wo{constructor(){this.size=0}init(){this.initialized=!0}}class po extends wo{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const a=e===dt?n:s.min(n,e-o),c=await $o(r,t+o,a);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&a)&&i.close()}})}}class ho extends wo{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new f(ro);return t.writeUint8Array(Ee(e))}});n.defineProperty(t,lo,{get:()=>e})}writeUint8Array(){}}class mo extends po{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{Y:t,K:r,size:s.floor(.75*(e-r))})}readUint8Array(t,e){const{K:n,Y:r}=this,o=new w(e),i=4*s.floor(t/3),a=atob(r.substring(i+n,4*s.ceil((t+e)/3)+n)),c=t-3*s.floor(i/4);let u=0;for(let t=c;t<c+e&&t<a.length;t++)o[t-c]=a.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class yo extends ho{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",X:""})}writeUint8Array(t){const e=this;let n,o=e.X;const i=e.X.length;for(e.X="",n=0;n<3*s.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.X+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.X=o+e.X}getData(){return this.data+x(this.X)}}let go,So;class Eo extends po{constructor(t){super(),n.assign(this,{J:t,size:t.size}),So||(So=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();go=1==e}catch{go=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return Tn(e.stream());if(go)return Tn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class bo extends wo{constructor(t){super();const e=this,r=new z;n.defineProperty(e,lo,{get:()=>r.writable}),e.contentType=t,e.$=kn(r.readable,t),e.$.catch(()=>{})}getData(){return this.$}}class Ro extends Eo{constructor(t){super(new y([t],{type:"text/plain"}))}}function xo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class zo extends bo{constructor(t){super(),n.assign(this,{encoding:t,et:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,et:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return Qr(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Fo extends po{constructor(t,e){super(),Ao(this,t,e)}async init(){await Io(this,Po,Mo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o}=e;if((n||r)&&o!==dt){const{offset:n=0,size:r=o-n}=t||{};if(r>0&&n<o)return function(t,e,n){let r,o=e,i=0,a=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new f(to);const o=e.length>i?e.subarray(0,i):e;i-=o.length,a-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=dt,await t.cancel()}(),a||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=s.min(t.maximumRangeSize,a),n=await Po(ao,t,Uo(t,o,e));if(206!=n.status)throw new f(to);const c=To(n);if(c!==dt&&c!=o)throw new f(to);No(t,n),_o(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,s.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Co(this,t,e,Po,Mo)}}class Do extends po{constructor(t,e){super(),Ao(this,t,e)}async init(){await Io(this,Zo,Lo),super.init()}readUint8Array(t,e){return Co(this,t,e,Zo,Lo)}}function Ao(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a,checkResourceChanges:c=!0,maximumRangeSize:u=uo,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Io(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new d(t,e);return"http:"==n||"https:"==n}(r)&&(i||s)&&(typeof o==wt||o)){const r=await e(ao,t,Uo(t,a?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(s||o&&o.toLowerCase()==co))throw new f(to);{let o;a&&206==r.status&&(o=new w(await r.arrayBuffer())),_o(t,r);const i=ko(r);i===dt?await Wo(t,e,n):t.size=i,o&&o.length&&To(r)===t.size-o.length&&(t.nt=o)}}else await Wo(t,e,n)}async function Co(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:s,nt:a,size:c,options:u}=t;if(i||s){if(e>=c||0===n)return gt;{if(e+n>c&&(n=c-e),a&&e>=c-a.length){const t=e-(c-a.length);return a.slice(t,t+n)}const o=await r(ao,t,Uo(t,e,n));if(206!=o.status)throw new f(to);const i=To(o);if(i!==dt&&i!=e)throw new f(to);No(t,o),_o(t,o);const s=new w(await o.arrayBuffer());if(s.length!=n)throw new f(to);return s}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function To(t){const e=t.headers.get(io);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function ko(t){const e=t.headers.get(io);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function vo({headers:t}){return{ot:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function _o(t,e){const{checkResourceChanges:n,it:r}=t;n&&!r&&206==e.status&&(t.it=vo(e))}function No(t,e){const{checkResourceChanges:r,it:o,size:i}=t;if(r){const t=ko(e);if(t!==dt&&i!==dt&&t!=i)throw new f(eo);if(o){const t=vo(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new f(eo)}}}function Uo(t,e=0,r=1){return n.assign({},Oo(t),{[so]:co+"="+(e<0?e:e+"-"+(e+r-1))})}function Oo({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function Mo(t){await Bo(t,Po)}async function Lo(t){await Bo(t,Zo)}async function Bo(t,e){const n=await e(ao,t,Oo(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Wo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Oo(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function Po(t,{fetch:e=fetch,options:r,url:o},i){const s=await e(o,n.assign({},r,{method:t,headers:i}));if(s.status>=200&&s.status<=299)return s;throw 416==s.status?new f(to):new f($r+(s.statusText||s.status))}function Zo(t,{url:e},r){return new g((o,i)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",()=>{if(s.status>=200&&s.status<=299){const t=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:s.status,arrayBuffer:()=>s.response,headers:new c(t)})}else i(416==s.status?new f(to):new f($r+(s.statusText||s.status)))},!1),s.addEventListener("error",t=>i(t.detail?t.detail.error:new f("Network error")),!1),s.open(t,e),r)for(const t of n.entries(r))s.setRequestHeader(t[0],t[1]);s.responseType="arraybuffer",s.send()})}class Ho extends po{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Do(t,e):new Fo(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 Vo extends po{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{st:t,size:t.length})}readUint8Array(t,e){return this.st.slice(t,t+e)}}class Go extends ho{constructor(t){super(),this.ct=t||262144}init(t=0){n.assign(this,{offset:0,st:new w(t>0?t:this.ct)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.st.length){let t=e.st.length?2*e.st.length:e.ct;for(;t<n;)t*=2;const r=e.st;e.st=new w(t),e.st.set(r)}e.st.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.st.length?this.st:this.st.slice(0,this.offset)}}class jo extends po{constructor(t){super(),this.ut=t}async init(){const t=this;t.lt=0;const e=t.ut=await g.all(t.ut.map(Qo));t.ft=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}wt(t){const{ft:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{ut:r}=this;let o,i=0,a=t;for(;r[i]&&a>=r[i].size;)a-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(a+e<=r)o=await $o(c,a,e);else{const i=r-a;o=Se(await $o(c,a,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.lt=s.max(i,n.lt),o}}class qo extends wo{constructor(t,e=4294967295){super();const r=this;let o,i,s;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new D({async write(e){if(e===fo)return void(s&&await u());const{availableSize:n}=r;if(s)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:a}=await t.next();if(a&&!n)throw new f(no);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await Jo(o),i=n.writable,s=i.getWriter(),await this.write(e)}},async close(){s&&(await s.ready,await l())},async abort(t){s&&await s.abort(t)}});async function c(t){const e=t.length;e&&(await s.ready,await s.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,s=null,r.availableSize=r.maxSize}async function l(){await s.close()}n.defineProperty(r,lo,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(fo)}finally{t.releaseLock()}}}class Yo{constructor(t){return e.isArray(t)&&(t=new jo(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:Tn(t)}),t}}class Ko{constructor(t){t.writable===dt&&typeof t.next==pt&&(t=new qo(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:vn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new f(oo)}return t}}function Xo(t){return Boolean(t&&t.getData)}async function Jo(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function Qo(t){return t=new Yo(t),await Jo(t),t.size!==dt&&t.readUint8Array||(t=new Eo(await kn(t.readable)),await Jo(t)),t}function $o(t,e,n){return t.readUint8Array(e,n)}function ti(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?po.prototype.createReadable.call(t,e):t.readable}function ei(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const ni="filename",ri="rawFilename",oi="comment",ii="rawComment",si="uncompressedSize",ai="compressedSize",ci="offset",ui="diskNumberStart",li="lastModDate",di="rawLastModDate",fi="lastAccessDate",wi="rawLastAccessDate",pi="creationDate",hi="rawCreationDate",mi="internalFileAttributes",yi="externalFileAttributes",gi="msdosAttributesRaw",Si="msdosAttributes",Ei="msDosCompatible",bi="zip64",Ri="encrypted",xi="version",zi="versionMadeBy",Fi="zipCrypto",Di="directory",Ai="executable",Ii="compressionMethod",Ci="signature",Ti="extraField",ki="unixMode",vi="setuid",_i="setgid",Ni="sticky",Ui=[ni,ri,si,ai,li,di,oi,ii,fi,wi,pi,hi,ci,ui,mi,yi,gi,Si,Ei,bi,Ri,xi,zi,Fi,Di,Ai,"symlink",Ii,Ci,"crc32",Ti,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ki,"unixExternalUpper",vi,_i,Ni,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Oi{constructor(t){Ui.forEach(e=>this[e]=t[e])}}const Mi=new u([1,J,10,Q,28789,25461,$,tt,et,22613,13]);function Li(t,e,n){return t?e?12:16+4*n:0}const Bi="File format is not recognized",Wi="End of central directory not found",Pi="End of Zip64 central directory locator not found",Zi="Central directory header not found",Hi="Local file header not found",Vi="Zip64 extra field not found",Gi="File contains encrypted entry",ji="Encryption method not supported",qi="Split zip file",Yi="Overlapping entry found",Ki="Entry data out of bounds",Xi="Ambiguous archive",Ji="Encrypted central directory is not supported",Qi="Unsafe filename",$i="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ts="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",es="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ns="64-bit value exceeds Number.MAX_SAFE_INTEGER",rs="unsorted central directory",os="unknown version needed to extract",is="compressed patched data",ss="malformed extra field",as="unknown zip64 extensible data",cs="wrapped entries count",us="appended data",ls="prepended data",ds="prepended central directory",fs="trailing central directory data",ws="duplicate filename",ps="mismatched zip64 end of central directory record",hs="multiple end of central directory records",ms="mismatched local file header (filename)",ys="mismatched local file header (general purpose bit flag)",gs="mismatched local file header (compression method)",Ss="mismatched local file header (crc32 or sizes)",Es=/^[a-zA-Z]:/,bs="utf-8",Rs="cp437",xs=[[si,O],[ai,O],[ci,O],[ui,M]],zs={[M]:{ht:aa,bytes:4},[O]:{ht:ca,bytes:8}},Fs=i(o.MAX_SAFE_INTEGER);class Ds{constructor(t,e={}){n.assign(this,{reader:new Yo(t),options:e,yt:{gt:new u,St:[],Et:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await Jo(r),r.size!==dt&&r.readUint8Array||(r=new Eo(await kn(r.readable)),await Jo(r)),r.size<Y)throw new f(Bi);const o=e.warnings=[],i=Vs(t,e.options),a=i==Lt,c=i!=Wt,l=qs(ea(e,t,_t),i),d=function(t,e){if(t===dt)return e;if(!Hs(t))throw new f(ts);return t}(ea(e,t,"filenameValidation"),i),w=ea(e,t,"normalizeFilename"),{bt:p,Rt:h}=await Ys(r,c,l);if(!p)throw await async function(t){return await Zs(t)==W}(r)?new f(qi):new f(Wi);c&&h>1&&ta(hs);const m=be(p);let y=aa(m,12),g=aa(m,16);const S=p.offset,E=sa(m,20),b=S+Y+E,R=r.size-b;R>l&&ta(us),R>0&&ei(o,us);let x=sa(m,4);const F=r.lt||0;let D,A,I,C,T,k=sa(m,6),v=sa(m,10),_=0,N=X;const U=g==O||y==O||v==M||k==M;if(g!=O&&k!=M&&(g+=Ps(r,k)),U){const t=p.offset>=K?await $o(r,p.offset-K,K):gt,e=be(t);if(t.length==K&&aa(e,0)==j){g=Ps(r,aa(e,4))+ca(e,8);let t=await $o(r,g,X),i=be(t);const c=p.offset-K-X;if((t.length<X||aa(i,0)!=G)&&g!=c&&c>=0){const e=g;g=c,g>e&&(_=g-e),t=await $o(r,g,X),i=be(t)}if(t.length<X||aa(i,0)!=G)throw new f(Pi);if(I=!0,C=ca(i,4)>44,C){const t=s.min(ca(i,4)-44,r.size-g-X);t>0&&(N+=t,T=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=be(t),o=sa(r,26);n.assign(e,{compressionMethod:sa(r,0),compressedSize:ca(r,2),uncompressedSize:ca(r,10),encryptionAlgorithm:sa(r,18),bitLength:sa(r,20),flags:sa(r,22),hashAlgorithm:sa(r,24),hashData:t.subarray(28,28+o)})}return e}(await $o(r,g+X,t)))}x==M?x=aa(i,16):x!=aa(i,16)&&$s(a,o,ps),k==M?k=aa(i,20):k!=aa(i,20)&&$s(a,o,ps),v==M?v=ca(i,32):v!=ca(i,32)&&$s(a,o,ps),y==O?y=ca(i,40):y!=ca(i,40)&&$s(a,o,ps),g=Ps(r,k)+ca(i,48)+_}}let B=y;const P=p.offset-(I?N+K:0);if(g>=r.size&&(_=r.size-g-y-Y,g=r.size-y-Y),F!=x)throw new f(qi);if(g<0)throw new f(Bi);let Z=0,V=await $o(r,g,y),J=be(V);if(y){if(V.length<4)throw new f(Bi);const t=P-y;if(g!=t&&k==x){const e=aa(J,Z)==H||Boolean(T&&T.compressedSize)||Ts(J);let n=!e;if(!n&&t>=0&&t+4<=r.size&&(n=aa(be(await $o(r,t,4)),0)==H),n){const n=g;g=t,g>n&&(_+=g-n,D=e),V=await $o(r,g,y),J=be(V)}}}const Q=P-g;if(y!=Q&&Q>=0&&k==x&&(y=Q,V=await $o(r,g,y),J=be(V)),g<0||g>=r.size)throw new f(Bi);e.directoryOffset=g,e.directoryLength=B;const $=na(e,t,"decryptCentralDirectory");let tt,et;if($&&v&&V.length>=4&&aa(J,0)!=H&&(C||Ts(J))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(T,B,V.length);et=V.subarray(t),V=await $(V.subarray(0,t),T),J=be(V),B=V.length,tt=!0}T&&!tt&&(V.length<4||aa(J,0)==H)&&ei(o,as),A=g;const nt=ea(e,t,"filenameEncoding"),ct=ea(e,t,"commentEncoding"),ut=new u;let lt,ft=-1;const wt=!a&&!I;!v&&wt&&(v=ks(J,V,Z),v&&ei(o,cs));for(let i=0;i<v;i++){const a=new Cs(r,e.options);if(Z+q>V.length||aa(J,Z)!=H){if(0==i&&!tt&&(C||Ts(J)))throw new f(Ji);throw new f(Zi)}_s(a,J,Z+6);const c=Boolean(a.bitFlag.languageEncodingFlag),u=Z+q,l=u+a.filenameLength,p=l+a.extraFieldLength,h=sa(J,Z+4),m=!(h>>8),y=h>>8==3,g=V.subarray(u,l),S=sa(J,Z+32),E=p+S,b=V.subarray(p,E),R=c,x=c,F=aa(J,Z+38),D=F&L,I={readOnly:Boolean(1&D),hidden:Boolean(2&D),system:Boolean(4&D),directory:Boolean(16&D),archive:Boolean(32&D)},T=aa(J,Z+42),k=na(e,t,"decodeText")||Jr,N=R?bs:nt||Rs,U=x?bs:ct||Rs;let O=k(g,N,Ot);if(O===dt&&(O=Jr(g,N)),w){const t=w(O);t!==dt&&(O=t)}if(js(O,d)){const t=new f(Qi);throw t.filename=O,t}let B=k(b,U,Mt);B===dt&&(B=Jr(b,U)),n.assign(a,{index:i,xt:tt,versionMadeBy:h,msDosCompatible:m,zip64:!1,compressedSize:0,uncompressedSize:0,zt:S,offset:T,diskNumberStart:sa(J,Z+34),internalFileAttributes:sa(J,Z+36),externalFileAttributes:F,msdosAttributesRaw:D,msdosAttributes:I,rawFilename:g,filenameUTF8:R,commentUTF8:x,rawExtraField:V.subarray(l,p),rawComment:b,filename:O,comment:B}),Ns(a,a,J,Z+6)&&ei(o,ss,O),a.offset+=_;const W=Ps(r,a.diskNumberStart)+a.offset;A=s.min(W,A),W<ft&&ei(o,rs,O),ft=W,(a.version&L)>63&&ei(o,os,O),32&~a.rawBitFlag||ei(o,is,O),ut.has(a.filename)&&(lt=!0),ut.add(a.filename);const P=a.externalFileAttributes>>16&M;a.unixMode===dt&&16877&P&&(a.unixMode=P);const G=Boolean(a.unixMode&it),j=Boolean(a.unixMode&st),Y=Boolean(512&a.unixMode),K=40960==((a.unixMode===dt?P:a.unixMode)&rt),X=!K&&(a.unixMode!==dt?!!(73&a.unixMode):y&&!!(73&P)),Q=a.unixMode!==dt&&(a.unixMode&rt)==ot,$=(P&rt)==ot;n.assign(a,{setuid:G,setgid:j,sticky:Y,symlink:K,unixExternalUpper:P,executable:X,directory:Q||$||m&&I.directory||a.filename.endsWith(at),zipCrypto:a.encrypted&&!a.extraFieldAES});const et=new Oi(a);if(et.getData=(t,n)=>a.getData(t,et,e.yt,n),et.arrayBuffer=async t=>{const r=new z,o=kn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await a.getData(r,et,e.yt,n.assign({},t,{preventClose:!1})),o},Z=E,i==v-1&&wt){const t=ks(J,V,Z);t&&(v+=t,ei(o,cs))}const{onprogress:pt}=t;if(pt)try{await pt(i+1,v,new Oi(a))}catch{}yield et}let pt=Z,ht=vs(V.subarray(Z))||(tt?vs(et):dt);if(!ht&&!tt){const t=g+Z,e=s.min(P-t,65541);e>=6&&(ht=vs(await $o(r,t,e)))}ht&&(e.digitalSignature=ht,pt=Z+6+ht.length),(Z!=B&&pt!=B||!tt&&Z!=y&&pt!=y)&&$s(a,o,fs),lt&&$s(a,o,ws);const mt=ea(e,t,"extractPrependedData"),yt=ea(e,t,"extractAppendedData"),St=(a||mt)&&v&&4==A&&await async function(t){const e=await Zs(t);return e==W||808471376==e}(r)?4:0;return a&&(_||v&&A>St)&&ta(ls),(_||v&&A>4)&&ei(o,ls),D&&ei(o,ds),mt&&(e.prependedData=A>St?await $o(r,St,A-St):gt),e.comment=E?await $o(r,S+Y,E):gt,yt&&(e.appendedData=b<r.size?await $o(r,b,r.size-b):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[St](){return this.close()}}class As{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),s=new Ds(o,t),a=s.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(s){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:a,value:c}=await o.read();a?s.close():s.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([a.return(),s.close()])}}),this.writable=i}}async function Is(t,e={}){if(t=new Yo(t),await Jo(t),t.size!==dt&&t.readUint8Array||(t=new Eo(await kn(t.readable)),await Jo(t)),t.size<Y)return!1;const n=Vs(e,{}),r=n!=Wt,o=qs(e[_t],n),{bt:i,Rt:s}=await Ys(t,r,o);if(!i||n==Lt&&s>1)return!1;const a=sa(be(i),20),c=i.offset+Y+a;return t.size-c<=o}let Cs=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,a=we(),{reader:c,index:u,offset:l,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:g,rawLastModDate:S,uncompressedSize:E,compressedSize:b}=i,{dataDescriptor:R}=m,x=e.localDirectory={},z=e.warnings=[],F=Ps(c,d)+l,A=await $o(c,F,ct),I=be(A);let C=ea(i,o,Et),T=ea(i,o,bt);const k=Jt(ea(i,o,Rt)),v=Boolean(k),_=!0===k;if(Xt(C,T),C=C&&C.length&&C,T=T&&T.length&&T,w&&99!=w.originalCompressionMethod)throw new f(On);if(A.length<ct||aa(I,0)!=B)throw new f(Hi);_s(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=ea(i,o,"checkLocalDirectory"),W=Vs(o,i.options),Z=function(t,e){return t===dt?e!=Wt:Boolean(t)}(M,W),H=ea(i,o,"checkLocalFilename"),V=function(t,e){return t===dt?e==Lt:Boolean(t)}(H===dt?M:H,W);let G=gt;if(V&&(U||N)){const t=await $o(c,F+ct,U+N);G=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await $o(c,F+ct+U,N):gt;V&&(x.rawFilename=G),Ns(i,x,I,4,!0)&&ei(z,ss),function(t,e,n,r,o){const{rawFilename:i}=t,s=!o,a=t.xt&&!(8192&~e.rawBitFlag);!r||a||n.length==i.length&&!n.some((t,e)=>t!=i[e])||$s(s,o,ms),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&$s(s,o,ys),e.compressionMethod!=t.compressionMethod&&$s(s,o,gs),e.bitFlag.dataDescriptor||a||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||$s(s,o,Ss)}(i,x,G,V,Z?dt:z);const{lastAccessDate:j,creationDate:q,uid:Y,gid:K}=x;j&&(e.lastAccessDate=j),q&&(e.creationDate=q),Y!==dt&&e.uid===dt&&(e.uid=Y),K!==dt&&e.gid===dt&&(e.gid=K);const X=ea(i,o,"checkPasswordOnly"),J=i.encrypted&&x.encrypted&&(!_||X),Q=J&&!w;if(_||(e.zipCrypto=Q),J&&!(64&~x.rawBitFlag))throw new f(ji);const $=v?dt:Wn(h);if(0!=h&&8!=h&&9!=h&&!$&&!v)throw new f(On);if(J){if(!Q&&(w.strength<1||w.strength>3))throw new f(ji);if(!C&&!T)throw new f(Gi)}if(O+b>c.size)throw new f(Ki);const tt=b,et=Yt(ea(i,o,xt));Kt(et);let nt=ea(i,o,"checkOverlappingEntry");const rt=ea(i,o,"checkOverlappingEntryOnly");rt&&(nt=!0);const{onstart:ot,onprogress:it,onend:st}=o,at=0!=h&&!v,ut=v?b-Li(J,Q,w&&w.strength):E,lt=9==h;let ft=ea(i,o,Ft);lt&&(ft=!1);const wt=ea(i,o,"checkCrc32"),pt=(wt===dt?ea(i,o,"checkSignature"):wt)&&!v&&(!J||Q||w&&1==w.vendorVersion),ht={options:{codecType:lr,password:C,rawPassword:T,zipCrypto:Q,encryptionStrength:w&&w.strength,checkCrc32:pt,checkAuthenticationCode:ea(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(R?S>>>8&L:g>>>24&L),outputSize:ut,crc32:g,compressed:at,encrypted:J,useWebWorkers:ea(i,o,zt),useCompressionStream:ft,transferStreams:ea(i,o,Dt),deflate64:lt,format:$?$.format:dt,codecURI:$?$.codecURI:dt,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:X},config:a,D:{signal:et,size:tt,onstart:ot,onprogress:it,onend:st}};let mt,yt,St;nt&&await async function({reader:t,Ft:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:u,yt:l}){let d=0;if(c&&(d=u?20:12),d){const n=await $o(t,a+i,d+4),r=be(n);let c=n.length==d+4&&aa(r,0)==P;if(c){const t=Ws(r,4,u);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:c=!1}if(n.length>=d){const t=Ws(r,c?4:0,u);t.signature=c,e.localDirectory.dataDescriptor=t}}const w={start:r,end:a+i+d,Ft:e},{gt:p,St:h,Et:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&Bs(e,o)?o:i&&Bs(e,i)?i:void 0}(h,w)||m.find(t=>Bs(w,t));if(t){const e=new f(Yi);throw e.overlappingEntry=t.Ft,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:c,Ft:e,index:u,offset:F,crc32:g,compressedSize:b,uncompressedSize:E,dataOffset:O,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,yt:r});try{if(!rt){X&&(t=new D),t=new Ko(t),await Jo(t,function(t,e,n){return s.min(t,n?1032*e:e)}(ut,b,at)),({writable:mt}=t);const e=Tn(c.createReadable({offset:O,size:tt})),{outputSize:r}=await Vr({readable:e,writable:mt},ht);if(r!=ut)throw n.assign(new f(Vn),{outputSize:r});t.size+=r}}catch(e){const{outputSize:n}=ht;if(n!==dt?t.size+=n:Re(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!X||!Re(e)||e.message!=$e)throw yt=e,St=!0,e}finally{if((Xo(t)||!ea(i,o,At))&&mt&&!mt.locked){const t=mt.getWriter();if(St)try{await t.abort(yt)}catch{}else await t.close()}}return X||rt?dt:t.getData?t.getData():mt}};function Ts(t){const e=s.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==aa(t,n))return!0;return!1}function ks(t,e,n){let r=0;for(;n+q<=e.length&&aa(t,n)==H;)n+=q+sa(t,n+28)+sa(t,n+30)+sa(t,n+32),r++;return r%65536?0:r}function vs(t){if(t.length>=6){const e=be(t);if(aa(e,0)==Z){const n=sa(e,4);if(6+n<=t.length)return t.subarray(6,6+n)}}}function _s(t,e,r){const o=t.rawBitFlag=sa(e,r+2),i=!(1&~o),s=aa(e,r+6);n.assign(t,{encrypted:i,version:sa(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:s,lastModDate:ra(s),filenameLength:sa(e,r+22),extraFieldLength:sa(e,r+24)})}function Ns(t,e,r,o,i){const{rawExtraField:s}=e,u=e.extraField=new c,l=be(s);let d=0,w=!1;try{for(;d<s.length;){const t=sa(l,d),e=sa(l,d+2);u.set(t,{type:t,data:s.slice(d+4,d+4+e)}),d+=4+e}}catch{w=!0}d>s.length&&(w=!0);const p=sa(r,o+4);n.assign(e,{signature:aa(r,o+10),crc32:aa(r,o+10),compressedSize:aa(r,o+14),uncompressedSize:aa(r,o+18)});const h=u.get(1);h&&(function(t,e){e.zip64=!0;const n=be(t.data),r=xs.filter(([t,n])=>e[t]==n),o=r.reduce((t,[,e])=>t+zs[e].bytes,0);if(t.data.length<o)throw new f(Vi);for(let o=0,i=0;o<r.length;o++){const[s,a]=r[o],c=zs[a];e[s]=t[s]=c.ht(n,i),i+=c.bytes}}(h,e),e.extraFieldZip64=h);const m=u.get(28789);m&&(Us(m,ni,ri,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Us(y,oi,ii,e,t),e.extraFieldUnicodeComment=y);const g=u.get(J);g&&g.data.length>=7?(function(t,e,r){const o=be(t.data),i=ia(o,4);n.assign(t,{vendorVersion:ia(o,0),vendorId:ia(o,2),strength:i,originalCompressionMethod:r,compressionMethod:sa(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(g,e,p),e.extraFieldAES=g):e.compressionMethod=p;const S=u.get(13);S&&(Os(S,e),e.extraFieldPkwareUnix=S);const E=u.get(22613);E&&(Os(E,e),e.extraFieldUnixType1=E);const b=u.get(10);b&&(function(t,e){const r=be(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=sa(r,i),n=sa(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=be(o),i=r.getBigUint64(0,!0),s=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:s,rawCreationDate:a});const c={lastModDate:oa(i),lastAccessDate:oa(s),creationDate:oa(a)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:s,rawCreationDate:a})}}(b,e),e.extraFieldNTFS=b);const R=u.get(et);let x;if(R&&(x=Ms(R,e,!1),e.extraFieldUnix=R),!x){const t=u.get(tt);t&&(Ms(t,e,!0),e.extraFieldInfoZip=t)}const z=u.get(Q);z&&(function(t,e,n){if(!t.data.length)return;const r=be(t.data),o=ia(r,0),i=[],s=[];n?(1&~o||(i.push(li),s.push(di)),2&~o||(i.push(fi),s.push(wi)),4&~o||(i.push(pi),s.push(hi))):t.data.length>=5&&(i.push(li),s.push(di));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=aa(r,c);e[n]=t[n]=new a(1e3*(0|i));const u=s[o];t[u]=i}c+=4})}(z,e,i),e.extraFieldExtendedTimestamp=z);const F=u.get($);return F&&(e.extraFieldUSDZ=F),w}function Us(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const s=be(t.data),a=new ve;a.append(i[r]);const c=be(new w(4));c.setUint32(0,a.get(),!0);const u=aa(s,1),l=ia(s,0);n.assign(t,{version:l,[e]:Jr(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==aa(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function Os(t,e){if(t.data.length<8)return;const r=be(t.data),o={lastAccessDate:new a(1e3*(0|aa(r,0))),lastModDate:new a(1e3*(0|aa(r,4)))};t.data.length>=12&&(o.uid=sa(r,8),o.gid=sa(r,10)),n.assign(t,o),n.assign(e,o)}function Ms(t,e,r){try{const o=be(t.data);let i,s;if(r){let e=0;const r=ia(o,e++),a=ia(o,e++);i=Ls(t.data.subarray(e,e+a)),e+=a;const c=ia(o,e++);s=Ls(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:s})}else t.data.length>=4&&(i=sa(o,0),s=sa(o,2),n.assign(t,{uid:i,gid:s}));return i!==dt&&(e.uid=i),s!==dt&&(e.gid=s),i!==dt||s!==dt}catch{}}function Ls(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Bs(t,e){return t.start<e.end&&e.start<t.end}function Ws(t,e,n){const r=aa(t,e);let o,i;return n?(o=ca(t,e+4),i=ca(t,e+12)):(o=aa(t,e+4),i=aa(t,e+8)),{crc32:r,compressedSize:o,uncompressedSize:i}}function Ps(t,e){return t.wt?t.wt(e):0}async function Zs(t){return aa(be(await $o(t,0,4)))}function Hs(t){return t===Lt||t===Bt||t===Wt}function Vs(t,e){return Gs(t,Gs(e,Bt))}function Gs(t,e){const n=t.strictness;if(n!==dt){if(!Hs(n))throw new f($i);return n}const r=t.checkAmbiguity;return r===dt?e:r?Lt:e==Wt?Wt:Bt}function js(t,e){if(e==Wt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(n.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Es.test(t))||e==Lt&&(n.includes(".")||n.includes(""))}function qs(t,e){if(t!==dt){const e=te(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new f(es);return e}return e==Lt?0:e==Wt?1/0:M}async function Ys(t,e,n){const{size:r}=t,o=s.min(r,65557),i={count:64};let a,c,u=0;for await(const[n,s,l,d,f]of Ks(t,o)){const o=sa(n,d+20);if(f+Y+o==r){const o=await Js(t,n,s,d,f,r,i);if(2==o){if(a||(a=Xs(l,d,f)),u++,!e||u>1)break}else 1!=o||c||(c=Xs(l,d,f))}}return a||(a=c),a||(a=await async function(t,e,n){const{size:r}=t,o=s.min(r,e==1/0?r:65557+e);let i,a;for await(const[e,s,c,u,l]of Ks(t,o)){const o=Xs(c,u,l);i||(i=o);const d=await Js(t,e,s,u,l,r,n);if(2==d)return o;1!=d||a||(a=o)}return a||i}(t,n,i)),{bt:a,Rt:u}}async function*Ks(t,e){const n=t.size-e,r=await $o(t,n,e),o=be(r);for(let t=r.length-Y;t>=0;t--)aa(o,t)==V&&(yield[o,n,r,t,n+t])}function Xs(t,e,n){return{offset:n,buffer:t.slice(e,e+Y).buffer}}async function Js(t,e,n,r,o,i,s){const a=sa(e,r+10),c=aa(e,r+12),u=aa(e,r+16);if(a==M||c==O||u==O)return await Qs(t,e,n,o-K,i,s)==j?2:0;if(!a&&!c)return 1;const l=sa(e,r+6);for(const r of[o-c,Ps(t,l)+u])if(await Qs(t,e,n,r,i,s)==H)return 2;return 0}async function Qs(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?aa(e,r-n):i.count>0?(i.count--,aa(be(await $o(t,r,4)),0)):dt}function $s(t,e,n){t?ta(n):ei(e,n)}function ta(t){const e=new f(Xi);throw e.reason=t,e}function ea(t,e,n){return e[n]===dt?t.options[n]:e[n]}function na(t,e,n){return qt(ea(t,e,n))}function ra(t){const e=(4294901760&t)>>16,n=t&M,r=new a(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function oa(t){return new a(o(t/i(1e4)-i(116444736e5)))}function ia(t,e){return t.getUint8(e)}function sa(t,e){return t.getUint16(e,!0)}function aa(t,e){return t.getUint32(e,!0)}function ca(t,e){const n=t.getBigUint64(e,!0);if(n>Fs)throw new f(ns);return o(n)}var ua=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Xi,ERR_BAD_FORMAT:Bi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Zi,ERR_ENCRYPTED:Gi,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Ji,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Ki,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Pi,ERR_EOCDR_NOT_FOUND:Wi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Vi,ERR_INVALID_AUTHENTICATION_CODE:Qe,ERR_INVALID_COMPRESSED_DATA:Gn,ERR_INVALID_CRC32:jn,ERR_INVALID_FILENAME_VALIDATION:ts,ERR_INVALID_MAX_APPENDED_DATA_SIZE:es,ERR_INVALID_PASSWORD:Je,ERR_INVALID_STRICTNESS:$i,ERR_INVALID_UNCOMPRESSED_SIZE:Vn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Hi,ERR_OVERLAPPING_ENTRY:Yi,ERR_SPLIT_ZIP_FILE:qi,ERR_UNSAFE_FILENAME:Qi,ERR_UNSUPPORTED_COMPRESSION:On,ERR_UNSUPPORTED_ENCRYPTION:ji,ERR_UNSUPPORTED_UINT64:ns,ERR_WORKER_STARTUP_TIMEOUT:wr,WARNING_APPENDED_DATA:us,WARNING_COMPRESSED_PATCHED_DATA:is,WARNING_DUPLICATE_FILENAME:ws,WARNING_MALFORMED_EXTRA_FIELD:ss,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ys,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:gs,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ss,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ms,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ps,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:hs,WARNING_PREPENDED_CENTRAL_DIRECTORY:ds,WARNING_PREPENDED_DATA:ls,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:fs,WARNING_UNKNOWN_VERSION:os,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:as,WARNING_UNSORTED_CENTRAL_DIRECTORY:rs,WARNING_WRAPPED_ENTRIES_COUNT:cs,ZipReader:Ds,ZipReaderStream:As,isZipFile:Is});const la="File already exists",da="Zip file comment exceeds 64KB",fa="Invalid zip file comment (must be a Uint8Array)",wa="File entry comment exceeds 64KB",pa="Invalid file entry comment (must be a string)",ha="Invalid date (must be a valid Date instance)",ma="File entry name exceeds 64KB",ya="Version exceeds 65535",ga="The strength must equal 1, 2, or 3",Sa="Encryption is not supported in USDZ files",Ea="Split zip files are not supported in USDZ files",ba="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ra="Invalid extra field (must be a Map)",xa="Invalid extra field type (must be integer 0..65535)",za="Invalid extra field data (must be a Uint8Array)",Fa="Extra field data exceeds 64KB",Da=-2147483648,Aa=2147483647,Ia=i(0),Ca=i("0x7fffffffffffffff"),Ta="Zip64 is not supported (set the 'zip64' option to 'true')",ka="Undefined uncompressed size",va="Undefined compression method",_a="Undefined CRC32",Na="Undetermined size",Ua="Undefined reader",Oa="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",Ma="Zip file not empty",La="Invalid uid (must be integer 0..2^32-1)",Ba="Invalid gid (must be integer 0..2^32-1)",Wa="Invalid UNIX mode (must be integer 0..65535)",Pa="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Za="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ha="Invalid msdosAttributesRaw (must be integer 0..255)",Va="Invalid msdosAttributes (must be an object with boolean flags)",Ga="Invalid level (must be integer 0..9)",ja="Signature data exceeds 64KB",qa="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ya="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Ka="compression unavailable",Xa="clamped last modification date",Ja=new w([7,0,2,0,65,69,3,0,0]),Qa="infozip",$a="unix",tc=[8,9,5,3];let ec=0;const nc=[];class rc{constructor(t,e={}){t=new Ko(t);const{availableSize:r=ft,maxSize:o=ft}=t,i=r>0&&r!==ft&&o>0&&o!==ft;if(i&&e[vt])throw new f(Ea);n.assign(this,{writer:t,Dt:i,options:e,At:new c,It:new u,offset:e[kt]===dt?t.size||t.writable.size||0:e[kt],Ct:e[kt]===dt?0:e[kt]-(t.size||t.writable.size||0),Tt:new u,kt:[],warnings:[],vt:0,_t:0,Nt:dt,Ut:!1})}prependZip(t){return sc(this,async function(t,e){if(t.It.size)throw new f(Ma);await t.Ot(e)}(this,t))}appendZip(t){return sc(this,this.Ot(t))}async Ot(t){const r=this,{Tt:o,It:i,At:s}=r;for(;o.size;)await g.allSettled(e.from(o));let a;const u=new g(t=>a=t);o.add(u);const l=[];let d;try{t=new Yo(t),await Jo(t),t.size!==dt&&t.readUint8Array||(t=new Eo(await kn(t.readable)),await Jo(t));const{ZipReader:o}=await g.resolve().then(function(){return ua}),a=new o(t),u=await a.getEntries();await a.close(),await Jo(r.writer);const{directoryOffset:w}=a;u.forEach(({filename:t})=>{if(i.has(t))throw new f(la);i.add(t),l.push(t)}),r.Mt=!0;const{Lt:p}=r;r.Lt=new g(t=>d=()=>{r.Mt=!1,t()}),await p,r.Dt&&(delete r.Dt,await async function(t){return be(await $o(t,0,4)).getUint32(0,!0)==W}(t)||(await kc(r.writer,Cc()),r.offset+=4));const h=await async function(t,n,r,o){const{writer:i}=t,s=new c;if(i.closeDisk){const a=e.from(r).sort((t,e)=>Ic(n,t)-Ic(n,e));let c=0;for(const e of a){const r=Ic(n,e);await Dc(t,n,c,r-c),xc(i,await Ac(n,r))&&await i.closeDisk(),s.set(e,{offset:zc(t,i),diskNumberStart:bc(i)}),c=r}await Dc(t,n,c,o-c)}else{const e=t.offset;await Dc(t,n,0,o),r.forEach(t=>s.set(t,{offset:e+Ic(n,t),diskNumberStart:0}))}return s}(r,t,u,w);u.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:a,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:d,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=i;f=Fc(f||gt),t.extraFieldAES&&(d=99);const y=qc(f),g=Boolean(l)&&l.uncompressedSize!==dt,S=Boolean(l)&&l.compressedSize!==dt,E=-7&Xc(w,p,m,a,d)|w<<1,{Bt:b,Wt:R}=Yc({version:e,bitFlag:E,compressionMethod:d,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,Pt:S,Zt:g,extraFieldLength:y}),{crc32:x}=t;x!==dt&&Vc(R,10,x);const{offset:z,diskNumberStart:F}=h.get(t);n.assign(t,{Ht:!0,Zt:g,Pt:S,offset:z,diskNumberStart:F,Vt:!1,Gt:gt,jt:gt,qt:gt,Yt:gt,Kt:gt,rawExtraField:f,Xt:gt,Bt:b,Wt:R}),s.set(t.filename,t)})}catch(t){throw l.forEach(t=>i.delete(t)),t}finally{a(),o.delete(u),d&&d()}}add(t="",e,r={}){const o=this,{Tt:s}=o,a=async function(t,e,r,o){const s=(o=n.assign({},o))[Ut];if(s!==dt){const{Jt:e,Qt:r}=uc(s,Jt(Oc(t,o,Rt)),Oc(t,o,li));delete o[Ut],o=n.assign(e,r,o)}if(Oc(t,o,Di)&&!e.endsWith(at)&&(e+=at),t.It.has(e))throw new f(la);t.It.add(e),ec<we().maxWorkers?ec++:await new g(t=>nc.push(t));try{return await async function(t,e,r,o){const s=lc(t,e,o);({name:e}=s);const a=dc(t,e,o),{comment:c}=a,u=o[Ti];t.At.set(e,dt);const l=t.Nt,d={};let w,p;a.$t.keepOrder&&(d.te=new g(t=>w=t)),t.Nt=d;try{const{$t:c}=a;0==c.level||c.compressionMethod!==dt||c.ee||await gr(we())||(c.level=0,ei(t.warnings,Ka,e));const u=await async function(t,e,{$t:r},o){if(r.ee&&!e&&!Oc(t,o,Di))throw new f(Ua);let i;if(e){if(e=new Yo(e),await Jo(e),!e.readable&&!e.readUint8Array)throw new f(Oa);({size:i}=e)}return n.assign({reader:e},wc(t,Boolean(e),i,r,o))}(t,r,a,o);({reader:r}=u);const h=Rc(t.writer),m=bc(t.writer);let y=o.crc32===dt?o[Ci]:o.crc32;const S=u.$t.encrypted&&!c.zipCrypto;if(c.ee&&!c.ne&&S&&(y=dt),c.ee&&r&&!S&&y===dt)throw new f(_a);const E=hc(o=n.assign({},o,s.$t,a.$t,u.$t,{signature:o[Ci],crc32:y,offset:t.offset-h,diskNumberStart:m,[vt]:t.options[vt]}));E.re&&ei(t.warnings,Xa,e);const b=gc(o),R=qc(E.oe,b.ie);p=await async function(t,e,r,o,s){const{At:a,writer:c}=t,{keepOrder:u,dataDescriptor:l,se:d,signal:w}=s,{ae:p,Ft:h,ce:m,ue:y}=o,S=t.options[vt];let E,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.te:dt;a.set(e,I);try{s.bufferedWrite||!u||t.Mt||t.vt||t._t||!l&&!d?(E=!0,t.vt++,A=s.createTempStream?await s.createTempStream():new z(dt,dt,{highWaterMark:ft}),A.size=0,await Jo(c)):(b=!0,t._t++,A=c,await T,await k()),await Jo(A);const h=Rc(c);t.Dt&&!E&&await Tc(t,c),S&&!E&&mc(o,t.offset-h);const{oe:m}=p;E||await v();const y=bc(c),R=zc(t,c);if(I.diskNumberStart=y,E||(F=!0,D=c.size,await kc(A,m)),I=await async function(t,e,{diskNumberStart:r,te:o},s,a,c){const{ae:u,le:l,de:d}=s,{Bt:w,Wt:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:S,compressionMethod:E,Gt:b,fe:R,qt:x,we:z,pe:F,Yt:D,Kt:A,jt:I}=u,{ie:C}=l,{rawFilename:T,lastAccessDate:k,creationDate:v,password:_,rawPassword:N,level:U,useUnicodeFileNames:M,zip64:B,Ht:W,Zt:P,Pt:Z,zipCrypto:H,dataDescriptor:V,directory:G,executable:j,versionMadeBy:q,rawComment:Y,rawExtraField:K,Xt:X,useWebWorkers:J,transferStreams:Q,onstart:$,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:st,externalFileAttributes:at,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:St,ee:Et,ne:bt,format:Rt,codecURI:xt}=c,zt={te:o,versionMadeBy:q,zip64:B,Ht:W,directory:Boolean(G),executable:Boolean(j),filenameUTF8:Boolean(M),rawFilename:T,commentUTF8:Boolean(M),rawComment:Y,Gt:b,fe:R,qt:x,Yt:D,Kt:A,jt:I,rawExtraField:K,Xt:X,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:st,externalFileAttributes:at,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;Et||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Tn(ti(t,{size:n})),o={options:{codecType:ur,inputSize:n,level:U,rawPassword:N,password:_,encryptionStrength:rt,zipCrypto:y&&H,passwordVerification:y&&H&&m>>8&L,computeCrc32:!Et,compressed:g&&!Et,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:St,transferStreams:Q,format:Rt,codecURI:xt,compressionMethod:E},config:a,D:{signal:nt,size:n,onstart:$,onprogress:tt,onend:et}};try{const t=await Vr({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,Et||(Dt=t.inputSize,y&&!H||(Ft=t.crc32)),!Z&&At>=O||!P&&Dt>=O)throw new f(Ta)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:Re(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,ae:r,le:o},{zip64:s,zipCrypto:a,ee:c,dataDescriptor:u}){const{Wt:l,encrypted:d}=r,{he:f,me:w}=o;d&&!a&&!c||t===dt||(Vc(l,10,t),u&&Vc(f,w,t)),s?u&&(Gc(f,w+4,i(e)),Gc(f,w+12,i(n))):(Vc(l,14,e),Vc(l,18,n),u&&(Vc(f,w+4,e),Vc(f,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,ae:u,le:l},c),V&&await kc(e,C),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:v,lastAccessDate:k,encrypted:Boolean(y),zipCrypto:Boolean(H),size:d+At,compressionMethod:E,version:S,Bt:w,Wt:p,signature:Ft,crc32:!y||H||Et?Ft:dt,we:z,pe:F,Zt:P,Pt:Z}),zt}(r,A,I,o,we(),s),E||(F=!1),a.set(e,I),I.filename=e,E){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.Dt&&await Tc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=bc(c),I.offset=zc(t,c),S){const e=o.de;mc(o,t.offset-Rc(c)),I.size+=o.de-e}!function({rawFilename:t,encrypted:e,zip64:n,fe:r,crc32:o,compressedSize:s,uncompressedSize:a,Zt:c,Pt:u},l,{dataDescriptor:d,ee:f}){if(d||((!e||f&&o!==dt)&&Vc(l,14,o),u||Vc(l,18,s),c||Vc(l,22,a)),n&&r){const e=ct+qc(t)+4;Gc(l,e,i(a)),Gc(l,e+8,i(s))}}(I,p.ye,s),await kc(c,p.oe),await vc(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,E&&(t.offset+=C)}throw a.delete(e),n}finally{if(E&&t.vt--,b&&t._t--,y&&y(T),R&&R(),E&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.Mt=!0;const{Lt:e}=t;t.Lt=new g(e=>R=()=>{t.Mt=!1,e()}),await e}async function v(){xc(c,qc(p.oe))&&await c.closeDisk()}}(t,e,r,{ae:E,le:b,de:R,Ft:d,ce:l,ue:w},o)}catch(n){throw t.At.delete(e),n}finally{w&&w(l&&l.te)}return n.assign(p,{name:e,comment:c,extraField:u}),new Oi(p)}(t,e,r,o)}catch(n){throw t.It.delete(e),n}finally{const t=nc.shift();t?t():ec--}}(o,t,e,r);s.add(a);const c=()=>s.delete(a);return g.prototype.then.call(a,c,c),sc(o,a)}remove(t){const{It:e,At:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=gt,n={}){const r=this,{Tt:o,writer:s}=this,{writable:a}=s;if(r.Ut)return ic(s);if(!(t instanceof w))throw new f(fa);if(qc(t)>M)throw new f(da);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.kt.map(t=>t.ge));const c=r.kt.filter(t=>t.Se&&!t.Ee);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.Ee=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{be:o,Re:s}=Sc(t.At),{xe:a,ze:c,Fe:u}=await async function(t,n,r){const{At:o,writer:i}=t,s=new w(n);await Jo(i);let a=0,c=0,u=bc(i),l=Rc(i),d=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:f,Gt:w,jt:p,qt:h,Yt:m,Kt:y,rawExtraField:g,Xt:S,rawComment:E,versionMadeBy:b,Bt:R,Wt:x,Zt:z,Pt:F,Vt:D,De:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=qc(w,p,h,m,y,g,S),N=q+qc(f,E)+_;xc(i,a+N-c)&&(await kc(i,s.slice(c,a)),c=a,d=0,await i.closeDisk()),0==t&&(u=bc(i),l=Rc(i)),z||Vc(x,18,k),F||Vc(x,14,v),(A||D)&&n.version<45&&Hc(x,0,45);const U=Ec(N);if(U.Ae(H),U.Ie(b),U.Ce(R.subarray(0,24)),U.Ie(_),U.Ie(qc(E)),U.Ie(D?M:T),U.Ie(I),U.Ae(C),U.Ae(A?O:e),U.Ce(f),U.Ce(w),U.Ce(p),U.Ce(h),U.Ce(m),U.Ce(y),U.Ce(g),U.Ce(S),U.Ce(E),jc(s,U.st,a),a+=N,d++,r.onprogress)try{await r.onprogress(t+1,o.size,new Oi(n))}catch{}}return await kc(i,c?s.slice(c):s),{xe:{diskNumber:u,diskOffset:l},ze:{diskNumber:bc(i),Te:d},Fe:s}}(t,o,r),l=await async function(t,e,n){const r=Lc(t,n,Nt);if(r){const n=await r(e),o=qc(n);if(o>M)throw new f(ja);const i=Ec(6+o);i.Ae(Z),i.Ie(o),i.Ce(n);const{writer:s}=t;return xc(s,qc(i.st))&&await s.closeDisk(),await kc(s,i.st),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{xe:s,ze:a,ke:c,Re:u}=r;let{be:l}=r,d=t.At.size,w=s.diskNumber,p=zc(t,s);const h=qc(e);if(h>M)throw new f(da);let m=Oc(t,n,bi),y=bc(o);if(xc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||d>=M||y>=M){if(!1===m)throw new f(Ta);m=!0}else m===dt&&u&&(m=!0);const g=Ec(m?98:Y);xc(o,qc(g.st)+h)&&await o.closeDisk(),y=bc(o);let S=y==a.diskNumber?a.Te:0;m&&(g.Ae(G),g.ve(44),g.Ie(45),g.Ie(45),g.Ae(y),g.Ae(w),g.ve(S),g.ve(d),g.ve(l),g.ve(p),g.Ae(j),g.Ae(y),g.ve(i(zc(t,o))+i(l)+i(c)),g.Ae(y+1),Oc(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),S=M,d=M,p=O,l=O),g.Ae(V),g.Ie(y),g.Ie(w),g.Ie(S),g.Ie(d),g.Ae(l),g.Ae(p),g.Ie(h),await kc(o,g.st),h&&await kc(o,e)}(t,n,r,{xe:a,ze:c,be:o,ke:l,Re:s})}(r,t,n),r.Ut=!0,!Xo(s)&&Oc(r,n,At)||await a.getWriter().close(),ic(s)}[St](){return this.close()}}class oc extends g{then(t,e){const{_e:n}=this;return n&&(n.Ee=!0),super.then(t,e)}}function ic(t){return t.getData?t.getData():t.writable}function sc(t,e){const r=new oc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r._e=o,o.ge=g.prototype.then.call(r,dt,t=>n.assign(o,{Se:!0,error:t})),t.kt.push(o),r}async function ac(t,e){try{await t.writer.writable.abort(e)}catch{}}function cc(t,e,n){t.Tt.add(e),e.catch(t=>{try{n(t)}catch{}})}function uc(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new f(qa);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:d,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:S,compressionMethod:E,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:d,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[Ct]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{Mi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Ti]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?$a:Qa});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:S,compressionMethod:E}),r!==Pt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[It]=tc[F.level]),o===dt)k.rawLastModDate=w;else if(r!==Pt&&g&&(!F||F.dataDescriptor)&&o instanceof a&&function(t){let e=new a(2e3*s.ceil(s.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new f(Ya);return{Jt:C,Qt:k}}function lc(t,n,r){let o=Oc(t,r,Ei),i=Oc(t,r,zi,o?20:768);const s=Oc(t,r,Ai),a=Bc(t,r,"uid"),c=Bc(t,r,"gid");let u=Bc(t,r,ki),l=Oc(t,r,"unixExtraFieldType"),d=Oc(t,r,vi),w=Oc(t,r,_i),p=Oc(t,r,Ni);if($t(a,O,La),$t(c,O,Ba),$t(u,M,Wa),l!==dt&&l!==Qa&&l!==$a)throw new f(Pa);if(l===$a&&(a!==dt&&a>M||c!==dt&&c>M))throw new f(Za);l!==dt||a===dt&&c===dt||(l=Qa);let h=Bc(t,r,gi),m=Oc(t,r,Si);const y=h!==dt||m!==dt;if(a!==dt||c!==dt||u!==dt||l||s?(o=!1,i=i&L|768):y&&(o=!0,i&=L),$t(h,L,Ha),m&&(typeof m!==ht||e.isArray(m)))throw new f(Va);if(i>M)throw new f(ya);let g=Oc(t,r,yi);const S=g!==dt;S||(g=0),!r[Di]&&n.endsWith(at)&&(r[Di]=!0);const E=Oc(t,r,Di);if(E?(n.endsWith(at)||(n+=at),S||(g=16,o||(g|=16877<<16))):o||S||(g=s?493<<16:27525120),!o){const t=u!==dt||Boolean(d||w||p);u=u===dt?g>>16&M:u&M,d?u|=it:d=Boolean(u&it),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),S&&!t||(E?u=-61441&u|ot:u&rt||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:s}=e;let a=0;n&&(a|=1),r&&(a|=2),o&&(a|=4),i&&(a|=16),s&&(a|=32),t=a&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==dt&&40960==(u&rt);return{name:n,$t:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:a,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:d,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function dc(t,e,n){const r=Lc(t,n,"encodeText")||Ne;let i=r(e,Ot);if(i===dt&&(i=Ne(e)),qc(i)>M)throw new f(ma);const s=n[oi]||"";if(typeof s!=mt)throw new f(pa);let c=r(s,Mt);if(c===dt&&(c=Ne(s)),qc(c)>M)throw new f(wa);const u=Oc(t,n,xi);if(u!==dt&&u>M)throw new f(ya);const l=Mc(t,n,li,new a),d=Oc(t,n,di),w=Mc(t,n,fi),p=Mc(t,n,pi),h=Oc(t,n,mi,0),m=Jt(Oc(t,n,Rt)),y=Boolean(m),g=!0===m,S=Oc(t,n,Et),E=Oc(t,n,bt);Xt(S,E);const b=Bc(t,n,"encryptionStrength",3),R=Oc(t,n,Fi),x=Oc(t,n,"extendedTimestamp",!0),z=Oc(t,n,"ntfsTimestamp"),F=Oc(t,n,"keepOrder",!0),D=Oc(t,n,zt),A=Oc(t,n,Dt),I=Oc(t,n,"bufferedWrite"),C=Lc(t,n,"createTempStream"),T=Oc(t,n,"dataDescriptorSignature",!0),k=Yt(Oc(t,n,xt));Kt(k);const v=Oc(t,n,Ct,!Kc(i)||!Kc(c)),_=Oc(t,n,Ii),N=y||_===dt?dt:Wn(_);if(!y&&_!==dt&&0!==_&&8!==_&&!N)throw new f(On);let U=Bc(t,n,It);if($t(U,9,Ga),t.options[vt]){if(S!==dt||E!==dt)throw new f(Sa);U===dt&&_===dt&&(U=0)}y&&(U=te(n[It]));let O=Oc(t,n,Ft),L=Oc(t,n,Tt);I&&L===dt&&(L=!1),(L===dt||R&&!g)&&(L=!0),U!==dt&&6!=U&&(O=!1);const B=Oc(t,n,bi);if(!(R||S===dt&&E===dt||o.isInteger(b)&&b>=1&&b<=3))throw new f(ga);const W=fc(n[Ti]),P=fc(n.localExtraField),Z=fc(n.centralExtraField);return{comment:s,$t:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:d,lastAccessDate:w,creationDate:p,internalFileAttributes:h,ee:y,ne:g,password:S,rawPassword:E,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,transferStreams:A,bufferedWrite:I,createTempStream:C,dataDescriptorSignature:T,signal:k,useUnicodeFileNames:v,compressionMethod:_,format:N?N.format:dt,codecURI:N?N.codecURI:dt,Ne:N?N.versionNeeded:dt,level:U,useCompressionStream:O,dataDescriptor:L,zip64:B,rawExtraField:W,Ue:P,Xt:Z}}}function fc(t){if(!t)return gt;if(!(t instanceof c))throw new f(Ra);let e=0,n=0;t.forEach((t,n)=>{if(Qt(n,M,xa),!(t instanceof w))throw new f(za);if(qc(t)>M)throw new f(Fa);e+=4+qc(t)});const r=new w(e),o=be(r);return t.forEach((t,e)=>{Hc(o,n,e),Hc(o,n+2,qc(t)),jc(r,t,n+4),n+=4+qc(t)}),r}function wc(t,e,n,r,o){const{ee:i,ne:s,zipCrypto:a,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[si],y===dt)throw new f(ka);if(h===dt)throw new f(va)}const S=!0===w,E=Oc(t,o,Ri);if(e&&s&&!E&&qc(c,u))throw new f(ba);const b=e&&(Boolean(c&&qc(c)||u&&qc(u))||s&&E);e||(p=0,h=0);const R=Li(b,a,l);e&&(i?(o.uncompressedSize=y,m=n===dt?Wc(y)+R:n+(s?0:R)):n===dt?(d=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(Pc(h,p)?Wc(y):y)+R));const x=!(b||e&&(0!==n||i)||Pc(h,p));x&&Oc(t,o,Tt)===dt&&(d=!1);const z=S||g||y>=O,F=S||m>=O;if(z||F){if(!1===w)throw new f(Ta);w=!0}return w=w||!1,{Oe:m,$t:{dataDescriptor:d,se:x,zip64:w,Ht:S,Me:g,Zt:z,Pt:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function pc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function hc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:d,dataDescriptor:w,directory:p,rawExtraField:h,Ue:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:S,ee:E,encrypted:b,Zt:R,Pt:x,uncompressedSize:z,Me:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&Pc(I,c);let T;const k=E||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Ec(t);if(e.Ie(1),e.Ie(t-4),T=e.st,v&&(e.ve(z),k)){const t=Li(b,l,y);e.ve(E?0:z+t)}}else T=gt;let N,U,O,L,W;if(b&&!l){const t=Ec(qc(Ja)+2);t.Ie(J),t.Ce(Ja),N=t.st,N[8]=y}else N=gt;if(g){const t=Nc(n),e=(P=t)>=Da&&P<=Aa;if(e){const e=9+(o?4:0)+(i?4:0),n=Ec(e);L=1+(o?2:0)+(i?4:0),W=t,n.Ie(Q),n.Ie(e-4),n.Le(L),n.Ae(t),o&&n.Ae(Uc(Nc(o))),i&&n.Ae(Uc(Nc(i))),O=n.st}else O=gt;if(S===dt?!e||Boolean(o||i):S)try{const t=_c(n),e=Ec(36);e.Ie(10),e.Ie(32),e.Be(4),e.Ie(1),e.Ie(24),e.ve(t),e.ve(o?_c(o):t),e.ve(i?_c(i):t),U=e.st}catch{U=gt}else U=gt}else U=O=gt;var P;let Z;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=Qa||e===dt&&n===dt)if(r!=$a||e===dt&&n===dt)Z=gt;else{const t=Ec(8);t.Ie(et),t.Ie(4),t.Ie((e===dt?0:e)&M),t.Ie((n===dt?0:n)&M),Z=t.st}else{const t=yc(e===dt?0:e),r=yc(n===dt?0:n),o=3+t.length+r.length,i=Ec(4+o);i.Ie(tt),i.Ie(o),i.Le(1),i.Le(t.length),i.Ce(t),i.Le(r.length),i.Ce(r),Z=i.st}}catch{Z=gt}I===dt&&(I=C?8:0),A===dt&&(A=0!=I||p||b?20:10);const{Ne:H}=t;C&&H!==dt&&(A=A>H?A:H),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,E&&D!==dt&&(N[4]=1),Hc(be(N),9,I),I=99);const V=_?qc(T):0,G=V+qc(N,O,U,Z,h,m);if(G+(t[vt]?67:0)>M)throw new f(Fa);const j=new a(2e3*s.ceil(s.floor(n.getTime()/1e3)/2)),q=j<lt?lt:j>ut?ut:j,Y=qc(O)?new a(1e3*Nc(n)):qc(U)?n:q,{Bt:K,Wt:X,rawLastModDate:$}=Yc({version:A,bitFlag:Xc(c,d,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:q,rawLastModDate:r,rawFilename:e,Pt:x,Zt:R,extraFieldLength:G}),nt=Ec(ct+qc(e)+G),rt=nt.st,ot=be(rt);return nt.Ae(B),nt.Ce(K),nt.Ce(e),_&&nt.Ce(T),nt.Ce(N),nt.Ce(O),nt.Ce(U),nt.Ce(Z),nt.Ce(h),nt.Ce(m),w&&(x||Vc(ot,18,0),R||Vc(ot,22,0)),{oe:rt,ye:ot,Bt:K,Wt:X,lastModDate:Y,re:Y===q&&j.getTime()!=q.getTime(),rawLastModDate:$,encrypted:b,compressed:C,version:A,compressionMethod:I,we:L,pe:W,Gt:gt,fe:V,qt:O,Yt:U,Kt:Z,jt:N,extraFieldLength:G}}function mc(t,e){const{ae:n}=t;let{oe:r,extraFieldLength:o}=n,i=64-(e+qc(r))%64;i<4&&(i+=64);const s=new w(i),a=be(s);Hc(a,0,$),Hc(a,2,i-4);const c=r;n.oe=r=new w(qc(c)+i),jc(r,c),jc(r,s,qc(c));const u=be(r);Hc(u,28,o+i),n.ye=u,t.de+=i}function yc(t){const e=new w(4);be(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function gc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=gt,i=0,s=t?20:12;return n&&(s+=4),e&&(o=new w(s),r=be(o),n&&(i=4,Vc(r,0,P))),{ie:o,he:r,me:i}}function Sc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,jt:o,rawComment:i,Yt:s,Kt:a,rawExtraField:c,Xt:u,we:l,pe:d,Ht:w,uncompressedSize:p,compressedSize:h}=r;let{Zt:m,Pt:y}=r;w||(m&&p<O&&(m=r.Zt=!1),y&&h<O&&(y=r.Pt=!1)),n=n||m||y;const g=r.offset>=O,S=r.diskNumberStart>=M;let E,b;if(g||S||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(S?4:0),e=Ec(t);e.Ie(1),e.Ie(t-4),m&&e.ve(p),y&&e.ve(h),g&&e.ve(r.offset),S&&e.Ae(r.diskNumberStart),E=e.st}else E=gt;if(r.Gt=E,r.De=g,r.Vt=S,d===dt)b=gt;else{const t=Ec(9);t.Ie(Q),t.Ie(5),t.Le(l),t.Ae(d),b=t.st}r.qt=b;const R=qc(E,o,s,a,b,c,u);if(R>M)throw new f(Fa);e+=q+qc(t,i)+R}return{be:e,Re:n}}function Ec(t){const e=new w(t),n=be(e);let r=0;return{st:e,Le:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},Ie:t=>{Hc(n,r,t),r+=2},Ae:t=>{Vc(n,r,t),r+=4},ve:t=>{Gc(n,r,i(t)),r+=8},Ce:t=>{jc(e,t,r),r+=qc(t)},Be:t=>r+=t}}function bc(t){const{diskNumber:e=0}=t;return e}function Rc(t){const{diskOffset:e=0}=t;return e}function xc(t,e){const{availableSize:n=ft}=t;return e>n}function zc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Ct:0)}function Fc(t){const e=be(t);let n=0;for(;n+4<=qc(t);){const r=4+Zc(e,n+2);if(1==Zc(e,n))return Fc(Se(t.subarray(0,n),t.subarray(s.min(n+r,qc(t)))));n+=r}return t}async function Dc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await vc(ti(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function Ac(t,e){const n=await $o(t,e,ct);if(qc(n)<ct)return ct;const r=be(n);return ct+Zc(r,26)+Zc(r,28)}function Ic(t,{offset:e,diskNumberStart:n}){return e+(t.wt?t.wt(n):0)}function Cc(){const t=new w(4);return Vc(be(t),0,W),t}async function Tc(t,e){delete t.Dt,await kc(e,Cc()),t.offset+=4}async function kc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=qc(e),await r.write(e)}finally{r.releaseLock()}}async function vc(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(qc(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function _c(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<Ia?Ia:e>Ca?Ca:e}}function Nc(t){return s.floor(t.getTime()/1e3)}function Uc(t){return s.min(Aa,s.max(Da,t))}function Oc(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function Mc(t,e,n,r){const i=Oc(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new f(ha);return i}function Lc(t,e,n){return qt(Oc(t,e,n))}function Bc(t,e,n,r){return te(Oc(t,e,n,r))}function Wc(t){return t+5*(s.floor(t/16383)+1)}function Pc(t,e){return t===dt?e===dt||e>0:0!==t}function Zc(t,e){return t.getUint16(e,!0)}function Hc(t,e,n){t.setUint16(e,n,!0)}function Vc(t,e,n){t.setUint32(e,n,!0)}function Gc(t,e,n){t.setBigUint64(e,n,!0)}function jc(t,e,n){t.set(e,n)}function qc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Yc({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:s,rawFilename:a,Pt:c,Zt:u,extraFieldLength:l}){const d=Ec(26),f=d.st,w=be(f);if(d.Ie(t),d.Ie(e),d.Ie(n),s===dt){const t=new h(1),e=be(t);Hc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),Hc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ae(s),d.Be(4),c||o!==dt?d.Ae(c?O:o):d.Be(4),u||r!==dt?d.Ae(u?O:r):d.Be(4),d.Ie(qc(a)),d.Ie(l),{Bt:f,Wt:w,rawLastModDate:s}}function Kc(t){return t.every(t=>t>=32&&t<=126)}function Xc(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Jc(t,e){if(!t)return!1;const{We:n}=t;return n?n.includes(e):er(t,e)}const Qc=1048576,$c=".zip.js-temp",tu=1048576,eu=1048576,nu=".zip.js-temp",ru="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(ge(t));n.assign(ie,e),n.assign(fe,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new d("zip-fs-core.min.js",b.baseURI).href})}catch{}const ou="Entry filename already exists",iu="Duplicate entry filename in the imported zip file",su='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',au="Entry is an ancestor of target entry",cu="Root directory cannot be moved",uu="Target entry is not a directory",lu="Parent entry is not a directory",du="Readable stream already consumed",fu="throw",wu="keep-first",pu="keep-last",hu=new u([fu,wu,pu]),mu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",yu="Invalid readerOptions (must be an object)",gu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Su="zipjs-abort-export";class Eu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new f(ou);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Pe++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,Ze:r.Ze||r.uncompressedSize===dt,passThrough:r.passThrough,He:r.He||new a}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=Yu(t);r&&(t=r.pop(),n=Ku(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new f(ou);n!=e.parent&&(vu(e),e.parent=n,n.children.push(e),ju(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class bu extends Eu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new bu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==bo?e.type==n:t.constructor!=yo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Tu(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([Jo(r),Jo(t,o)]);const i=Yt(e.signal),s=function(t,e,n,r){const{onstart:o,onprogress:i,onend:s}=n,{readable:a}=e;return t.data instanceof Oi||!o&&!i&&!s?a:Tn(a).pipeThrough(new Rr({onstart:o,onprogress:i,onend:s,size:e.size}),{signal:r})}(n,r,e,i),a=!Xo(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Tn(s).pipeTo(vn(t.writable),{signal:i,preventClose:a,preventAbort:a}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Re(t)&&t.message==Je)return!1;throw t}}getText(t,e){return this.getData(new zo(t),e)}getBlob(t,e){return this.getData(new bo(t),e)}getData64URI(t,e){return this.getData(new yo(t),e)}getUint8Array(t){return this.getData(new Go,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ee(await this.getUint8Array(t)).buffer}replaceBlob(t){Lu(this,{data:t,Reader:Eo,Writer:bo,uncompressedSize:t.size})}replaceText(t){Lu(this,{data:t,Reader:Ro,Writer:zo,uncompressedSize:xo(t)})}replaceData64URI(t){Lu(this,{data:t,Reader:mo,Writer:yo,uncompressedSize:Bu(t)})}replaceUint8Array(t){Lu(this,{data:t,Reader:Vo,Writer:Go,uncompressedSize:t.length})}replaceReadable(t){Lu(this,{data:null,Reader:Iu(t),Writer:null,uncompressedSize:dt})}}class Ru extends Eu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Ru(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return qu(this,t,{options:e},!0)}addText(t,e,n={}){return qu(this,t,{data:e,Reader:Ro,Writer:zo,options:n,uncompressedSize:xo(e)})}addBlob(t,e,n={}){return qu(this,t,{data:e,Reader:Eo,Writer:bo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return qu(this,t,{data:e,Reader:mo,Writer:yo,options:n,uncompressedSize:Bu(e)})}addUint8Array(t,e,n={}){return qu(this,t,{data:e,Reader:Vo,Writer:Go,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return qu(this,t,{data:e,Reader:class extends Ho{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return qu(this,t,{Reader:Iu(e),options:n})}addFileSystemEntry(t,e={}){return Zu(this,t,e)}addFileSystemHandle(t,e={}){return Zu(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new a(t.lastModified)),qu(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 Eo(t),e)}importData64URI(t,e){return this.importZip(new mo(t),e)}importUint8Array(t,e){return this.importZip(new Vo(t),e)}importHttpContent(t,e){return this.importZip(new Ho(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new bo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new yo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Go,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:s}=r;Mu(r.passThrough);const a=Ou(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!Yt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),d=n.assign({},r,a,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=Fu([t],t=>Au(t,d.passThrough)),p=[];let h=!1,m=0;try{o&&await xr(o,w),await S(t,e),s&&await xr(s,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await xr(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function S(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>E(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!_u(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await E(n,e)}async function E(e,n){if(u.aborted){if(h||_u(u.reason))return;Kt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await S(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},d)}catch(t){throw h?new f(Su):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new f(Su));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await Jo(t),r=new Ds(t,e)),Mu(e.passThrough);const o=function(t){if(t===dt)return fu;if(hu.has(t))return t;throw new f(su)}(e.duplicates),i=[],s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=s.pop();let c=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==wu){c=!0;break}if(o!=pu)throw new f(iu);this.fs.remove(r),r=new Ru(this.fs,t,{data:null},e),i.push(r)}}else r=new Ru(this.fs,t,{data:null},e),i.push(r)}if(c)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&(!e.directory||e.data)){if(o==wu)continue;if(o!=pu)throw new f(iu);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new Ru(this.fs,a,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(a);if(s){if(o==wu)continue;if(o!=pu)throw new f(iu);this.fs.remove(s)}i.push(qu(r,a,{data:t,Reader:Cu(n.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await g.all([ku(r,Ou(e.readerOptions)),o?dt:Jo(t)]),s=o?t:new rc(t,e);return await async function(t,e,r,o,i){const{onstart:s,onprogress:a,onend:c,onentryprogress:u}=o,l=e,d=Fu(e.children,t=>Pu(t)?0:1);let f=0,w=0;if(s&&await xr(s,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Pu(e))return;const{name:s,Jt:c}=Nu(e,l,o);let p=0;const h=await t.add(s,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{f+=t-p,p=t,a&&await xr(a,f,r)}}));w++,u&&await xr(u,w,d,h)}c&&await xr(c,f)}(s,r,Fu([r],Du),e,i),o?s:(await s.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;Ou((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Pu(t)).map(n=>{const{name:r,Jt:o}=Nu(n,e,t);return{name:r,size:n.directory?0:Uu(n,Wu(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Pu(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(qt(t[Nt]))throw new f(Na);if(o!==dt&&!(o instanceof w))throw new f(fa);const a=qc(o);if(a>M)throw new f(da);const l=t[vt],d=new c,p=t[kt]===dt?0:t[kt];let h=p,m=ft;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);Oc(i,o,Di)&&!e.endsWith(at)&&(e+=at);const a=lc(i,e,o);({name:e}=a);const{$t:c}=dc(i,e,o);0==c.level||c.compressionMethod!==dt||c.ee||await gr(we())||(c.level=0);const u=!Oc(i,o,Di);if(u&&r===dt)throw new f(Na);const{Oe:w,$t:p}=wc(i,u,r,c,o);if(u&&!c.ee&&Pc(p.compressionMethod,p.level))throw new f(Na);const S=n.assign({},o,a.$t,c,p,{[vt]:l}),E=hc(S),b=gc(S),R={ae:E,de:qc(E.oe,b.ie)};l&&mc(R,h);const x=u?w:0;d.set(e,n.assign({},S,E,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.de+x;y.push(z),g.add(Boolean(S.Ht||S.uncompressedSize>=O||x>=O)),m=s.min(m,z),h+=z}if(d.size>1&&(l||h-m>=O&&(g.size>1||pc(y,p,!0)!=pc(y,p,!1)))&&!r)throw new f(Na);const{be:S,Re:E}=Sc(d);let b=Oc(i,t,bi);if(h>=O||S>=O||d.size>=M){if(!1===b)throw new f(Ta);b=!0}else b===dt&&E&&(b=!0);return h-p+S+a+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class xu{constructor(){Vu(this)}get children(){return this.root.children}remove(t){vu(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new f(cu);if(!e.directory)throw new f(uu);if(e.isDescendantOf(t))throw new f(au);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new f(ou)}else vu(t),t.parent=e,e.children.push(t),ju(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return Gu(this,n=>n.importBlob(t,e))}importData64URI(t,e){return Gu(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return Gu(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return Gu(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return Gu(this,n=>n.importReadable(t,e))}importZip(t,e){return Gu(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const zu={FS:xu,ZipDirectoryEntry:Ru,ZipFileEntry:bu};function Fu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function Du(t){return t.uncompressedSize}function Au(t,e){const{data:n}=t;return e&&n instanceof Oi?n.compressedSize:t.uncompressedSize}function Iu(t){let e;return function(){if(e)throw new f(du);return e=!0,{readable:t}}}function Cu(t){return class extends po{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=n.assign({},t,e.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:i}=r,s=await e.entry.getData(new bo,n.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:i||o,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=s,e.Ve=new Eo(s),e.size=s.size,super.init()}readUint8Array(t,e){return this.Ve.readUint8Array(t,e)}}}function Tu(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function ku(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async t=>{const n=t.reader=Tu(t.Reader,t.data,e);o.set(t,n);try{await Jo(n)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}n.size!==dt&&(t.uncompressedSize=n.size,t.Ze=!1)})),o}function vu(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function _u(t){return Boolean(t)&&t.message==Su}function Nu(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let s={},a={};if(t.data instanceof Oi){const e=Wu(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Jt:s,Qt:a}=uc(t.data,e,n)),e&&(a.passThrough=!0)}const c=n.assign({lastModDate:t.He},s,r,i,a,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new f(mu);return{name:o,Jt:c}}function Uu(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.Ze?dt:Au(t,e)}function Ou(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new f(yu);return t&&Mu(t.passThrough),t}function Mu(t){if(Jt(t)===Pt)throw new f(gu)}function Lu(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,Ze:r===dt})}function Bu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return s.floor(.75*(e-n))}function Wu(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Pu(t){return t.directory&&null===t.data}function Zu(t,e,r){return async function t(e,o,i,s=""){if(o){const c=s?s+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await Hu(o)),"file"==o.kind){const t=await o.getFile();i.push(qu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new a(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function Hu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Hu(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function Vu(t){t.entries=[],t.Pe=0,t.root=new Ru(t)}function Gu(t,e){const{entries:r,Pe:o,root:i}=t;return Vu(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Pe:o,root:i}),e})}function ju(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function qu(t,e,n,r){if(t.directory){const o=Yu(e);return o&&(e=o.pop(),t=Ku(t,o)),r?new Ru(t.fs,e,n,t):new bu(t.fs,e,n,t)}throw new f(lu)}function Yu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Ku(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new f(ou);if(n&&(t==n||t.isDescendantOf(n)))throw new f(au)}else t=new Ru(r.fs,e,{data:null},r)}),t}t.BlobReader=Eo,t.BlobWriter=bo,t.Data64URIReader=mo,t.Data64URIWriter=yo,t.ERR_ABORTED=jt,t.ERR_AMBIGUOUS_ARCHIVE=Xi,t.ERR_ANCESTOR_ENTRY=au,t.ERR_BAD_FORMAT=Bi,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Zi,t.ERR_DUPLICATED_NAME=la,t.ERR_DUPLICATE_IMPORTED_ENTRY=iu,t.ERR_ENCRYPTED=Gi,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=Ji,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=Ki,t.ERR_ENTRY_EXISTS=ou,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Pi,t.ERR_EOCDR_NOT_FOUND=Wi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Vi,t.ERR_HTTP_RANGE=to,t.ERR_HTTP_RESOURCE_CHANGED=eo,t.ERR_HTTP_STATUS=$r,t.ERR_INVALID_AUTHENTICATION_CODE=Qe,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=_n,t.ERR_INVALID_CODEC_MODULE=Un,t.ERR_INVALID_COMMENT=da,t.ERR_INVALID_COMMENT_TYPE=fa,t.ERR_INVALID_COMPRESSED_DATA=Gn,t.ERR_INVALID_CRC32=jn,t.ERR_INVALID_DATE=ha,t.ERR_INVALID_DUPLICATES=su,t.ERR_INVALID_ENCRYPTION_STRENGTH=ga,t.ERR_INVALID_ENTRY=qa,t.ERR_INVALID_ENTRY_COMMENT=wa,t.ERR_INVALID_ENTRY_COMMENT_TYPE=pa,t.ERR_INVALID_ENTRY_NAME=ma,t.ERR_INVALID_EXTRAFIELD=Ra,t.ERR_INVALID_EXTRAFIELD_DATA=Fa,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=za,t.ERR_INVALID_EXTRAFIELD_TYPE=xa,t.ERR_INVALID_FILENAME_VALIDATION=ts,t.ERR_INVALID_FUNCTION_OPTION=Zt,t.ERR_INVALID_GID=Ba,t.ERR_INVALID_LEVEL=Ga,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=es,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=Ha,t.ERR_INVALID_MSDOS_DATA=Va,t.ERR_INVALID_PASSWORD=Je,t.ERR_INVALID_PASSWORD_TYPE=Vt,t.ERR_INVALID_PASS_THROUGH=mu,t.ERR_INVALID_PASS_THROUGH_VALUE=Gt,t.ERR_INVALID_READER=Oa,t.ERR_INVALID_READER_OPTIONS=yu,t.ERR_INVALID_SIGNAL=Ht,t.ERR_INVALID_SIGNATURE_DATA=ja,t.ERR_INVALID_STRICTNESS=$i,t.ERR_INVALID_UID=La,t.ERR_INVALID_UNCOMPRESSED_SIZE=Vn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=Pa,t.ERR_INVALID_UNIX_ID_SIZE=Za,t.ERR_INVALID_UNIX_MODE=Wa,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=ya,t.ERR_ITERATOR_COMPLETED_TOO_SOON=no,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Hi,t.ERR_OVERLAPPING_ENTRY=Yi,t.ERR_PARENT_NOT_DIRECTORY=lu,t.ERR_READABLE_CONSUMED=du,t.ERR_RESERVED_COMPRESSION_METHOD=Nn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=cu,t.ERR_SPLIT_ZIP_FILE=qi,t.ERR_TARGET_NOT_DIRECTORY=uu,t.ERR_UNDEFINED_COMPRESSION_METHOD=va,t.ERR_UNDEFINED_CRC32=_a,t.ERR_UNDEFINED_READER=Ua,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=ka,t.ERR_UNDETERMINED_SIZE=Na,t.ERR_UNSAFE_FILENAME=Qi,t.ERR_UNSUPPORTED_COMPRESSION=On,t.ERR_UNSUPPORTED_CONTEXT=ru,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=ji,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=ba,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Sa,t.ERR_UNSUPPORTED_FORMAT=Ta,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=gu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Ea,t.ERR_UNSUPPORTED_UINT64=ns,t.ERR_WORKER_STARTUP_TIMEOUT=wr,t.ERR_WRITER_NOT_INITIALIZED=ro,t.ERR_WRITER_SIZE_NOT_WRITABLE=oo,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=Ya,t.ERR_ZIP_NOT_EMPTY=Ma,t.HttpRangeReader=class extends Ho{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=Ho,t.Reader=po,t.SplitDataReader=jo,t.SplitDataWriter=qo,t.TextReader=Ro,t.TextWriter=zo,t.Uint8ArrayReader=Vo,t.Uint8ArrayWriter=Go,t.VERSION="2.14.1",t.WARNING_APPENDED_DATA=us,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=Xa,t.WARNING_COMPRESSED_PATCHED_DATA=is,t.WARNING_COMPRESSION_UNAVAILABLE=Ka,t.WARNING_DUPLICATE_FILENAME=ws,t.WARNING_MALFORMED_EXTRA_FIELD=ss,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=ys,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=gs,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Ss,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=ms,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=ps,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=hs,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=ds,t.WARNING_PREPENDED_DATA=ls,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=fs,t.WARNING_UNKNOWN_VERSION=os,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=as,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=rs,t.WARNING_WRAPPED_ENTRIES_COUNT=cs,t.Writer=ho,t.ZipDirectoryEntry=Ru,t.ZipEntry=Eu,t.ZipFS=xu,t.ZipFileEntry=bu,t.ZipReader=Ds,t.ZipReaderStream=As,t.ZipWriter=rc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new rc(n,t),this.Tt=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await ac(e,t)}}()}});return cc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return cc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.Tt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await ac(r,t),t}try{return await r.close(t,n)}catch(t){throw await ac(r,t),t}}},t.configure=function(t){n.assign(fe,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=tu}=t;return function(){const t=[];let n,r,o,i=0,s=!1;const a=new D({async write(o){s?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=kn(e.readable),n=e.writable.getWriter(),s=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:a,readable:new F({async pull(e){if(s){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=Qc,directoryName:r=$c,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function s(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,a,c=0,u=!1;const l=new D({async write(a){u?await i.write(a):(t.push(a),c+=a.length,c>n&&await async function(){const n=await s();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let d=0;return{writable:l,readable:new F({async pull(e){if(u){if(!a){const t=await o.getFile();a=t.stream().getReader()}const{value:t,done:n}=await a.read();n?e.close():e.enqueue(t)}else d<t.length?e.enqueue(t[d++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await s();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=eu,directoryName:r=nu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new f(ru);const i=o||(()=>C.storage.getDirectory());let a;function c(){return a||(a=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,o,i=0,a=!1,u=0,l=0;const d=new D({async write(s){a?(o.write(s,{at:u}),u+=s.length):(t.push(s),i+=s.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),a=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let f=0;return{writable:d,readable:new F({pull(e){if(a){const t=u-l;if(t<=0)return void e.close();const n=new w(s.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else f<t.length?e.enqueue(t[f++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=zu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Pn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Jc(n,qn)||Jc(t,qn)||Jc(t,Kn),decompression:Jc(r,qn)||Jc(e,qn)||Jc(e,Kn),registered:!1},{compressionMethod:9,compression:!1,decompression:Jc(r,Yn)||Jc(e,Yn),registered:!1}];for(const t of Pn()){const e=Zn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:dt,decompression:e?typeof e.DecompressionStream==pt:dt,registered:!0})}return o},t.isZipFile=Is,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:s,versionNeeded:a}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new f(_n);if(Mn.includes(e))throw new f(Nn);const c=typeof i==pt||typeof s==pt;if(!(c||typeof r==mt&&r.length))throw new f(_n);Ln.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:a}),c&&Hn(n,{CompressionStream:i,DecompressionStream:s})},t.resetConfiguration=function(){for(const t of de)delete fe[t];n.assign(fe,ie)},t.terminateWorkers=async function(){await g.allSettled(Br.map(t=>(Kr(t),t.terminate()))),pr=dt,hr=!1},t.unregisterCodec=function(t){const e=Ln.get(t);if(e){let n;Ln.delete(t),Ln.forEach(t=>n=n||t.format==e.format),n||Bn.delete(e.format)}}});