@zip.js/zip.js 2.14.1 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/BENCHMARKS.md +19 -11
  2. package/deno.json +1 -1
  3. package/dist/zip-core-external.js +82 -41
  4. package/dist/zip-core-external.min.js +1 -1
  5. package/dist/zip-core.js +82 -41
  6. package/dist/zip-core.min.js +1 -1
  7. package/dist/zip-fs-core-external.js +82 -41
  8. package/dist/zip-fs-core-external.min.js +1 -1
  9. package/dist/zip-fs-core.js +82 -41
  10. package/dist/zip-fs-core.min.js +1 -1
  11. package/dist/zip-fs-external.js +82 -41
  12. package/dist/zip-fs-external.min.js +1 -1
  13. package/dist/zip-fs-native.js +84 -43
  14. package/dist/zip-fs-native.min.js +1 -1
  15. package/dist/zip-fs.js +84 -43
  16. package/dist/zip-fs.min.js +1 -1
  17. package/dist/zip-legacy.js +84 -43
  18. package/dist/zip-legacy.min.js +1 -1
  19. package/dist/zip-native.js +84 -43
  20. package/dist/zip-native.min.js +1 -1
  21. package/dist/zip-web-worker-native.js +1 -1
  22. package/dist/zip-web-worker.js +1 -1
  23. package/dist/zip.js +84 -43
  24. package/dist/zip.min.js +1 -1
  25. package/index-native.cjs +84 -43
  26. package/index-native.min.js +1 -1
  27. package/index.cjs +84 -43
  28. package/index.d.cts +20 -13
  29. package/index.d.ts +20 -13
  30. package/index.min.js +1 -1
  31. package/lib/core/codec-pool.js +35 -19
  32. package/lib/core/codec-worker.js +4 -2
  33. package/lib/core/streams/zip-entry-stream.js +18 -10
  34. package/lib/core/util/decode-text.js +15 -1
  35. package/lib/core/version.js +1 -1
  36. package/lib/core/web-worker-inline-native.js +1 -1
  37. package/lib/core/web-worker-inline-wasm.js +1 -1
  38. package/lib/core/zip-reader.js +12 -10
  39. package/lib/core/zlib-streams-inline.js +1 -1
  40. package/package.json +1 -1
@@ -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: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)}}});
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,$=39169,J=21589,Q=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 $t(t){if(t!==dt&&typeof t!=yt&&t!==Pt)throw new f(Gt);return t}function Jt(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new f(n)}function Qt(t,e,n){t!==dt&&Jt(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,$e="Invalid password",Je="Invalid authentication code",Qe="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new 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($e)}(n,i,o,En(t,0,an[i]+2)),t=En(t,an[i]+2),r?(yn(n),e.error(new f(Qe))):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(Je);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($e);t=t.subarray(12)}r?e.error(new f(Qe)):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 $n 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=function(t,e,n){return t&&e?e:n&&n.F?n:void 0}(s,r,n),R=c&&o&&!l&&!E&&(!i||a)&&Boolean(b);if(i&&!a||!c||R||(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(R)g=new Jn,S=ar(S,new b(Kn,{level:u,chunkSize:e})),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 Jn)}i&&(a?S=sr(S,new Rn(t)):(y=new pn(t),S=sr(S,y))),rr(p,S,()=>{i&&!a||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class Jn 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 Qn 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,R=super.readable;if(i&&(o?R=sr(R,new bn(t)):(E=new wn(t),R=sr(R,E))),c){const t=d&&Zn(d);if(t)R=ar(R,or(t.DecompressionStream,d,{chunkSize:e,compressionMethod:p,rawBitFlag:h,uncompressedSize:y}));else try{R=ir(R,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=new ve,R=function(t,e,n,r){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)}}(R,e,y,b)}R=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)})}(R)}s&&!b&&(S=new _e,R=sr(R,S)),rr(this,R,()=>{if(s){const t=b?b.get()>>>0:new m(S.value.buffer).getUint32(0,!1);if(a!=t)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=$n:o.startsWith(lr)&&(i=Qn),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())),t.A=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),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 $r(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(),t.U)return t.U=!1,Yr();if(Wr.length){const[{resolve:e,stream:n,C:r}]=Wr.splice(0,1);e(new br(t,n,r,b)),Gr()}else t.T?($r(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(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:n}]=Wr.splice(0,1);t(new br({},e,Kr(n),Xr)),Gr()}}function Yr(){const t=Wr.splice(0).map(({resolve:t,stream:e,C:n})=>new g(r=>{t(new br({},e,Kr(n),()=>{Xr(),r()}))}));return jr(),g.all(t)}function Kr(t){return n.assign({},t,{useWebWorkers:!1,workerURI:dt,createWorker:dt})}function Xr(){jr(),Gr()}function $r(t){const{j:e}=t;e&&(_(e),t.j=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 eo(t,e,!0)}function to(t){if(!t.some(t=>t>127))return!1;try{return new E("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function eo(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 E(e,{ignoreBOM:n}).decode(t)}const no="HTTP error ",ro="HTTP Range not supported",oo="HTTP resource changed",io="Writer iterator completed too soon",so="Writer not initialized",ao="Invalid writer (size must be writable)",co="Content-Range",uo="Range",lo="GET",fo="bytes",wo=16777216,po="writable",ho=k();class mo{constructor(){this.size=0}init(){this.initialized=!0}}class yo extends mo{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 ni(r,t+o,a);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&a)&&i.close()}})}}class go extends mo{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new f(so);return t.writeUint8Array(Ee(e))}});n.defineProperty(t,po,{get:()=>e})}writeUint8Array(){}}class So extends yo{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 Eo extends go{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 bo,Ro;class xo extends yo{constructor(t){super(),n.assign(this,{$:t,size:t.size}),Ro||(Ro=(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();bo=1==e}catch{bo=!1}})())}createReadable(t){const{$: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(bo)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.$:n.$.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class zo extends mo{constructor(t){super();const e=this,r=new z;n.defineProperty(e,po,{get:()=>r.writable}),e.contentType=t,e.J=kn(r.readable,t),e.J.catch(()=>{})}getData(){return this.J}}class Fo extends xo{constructor(t){super(new y([t],{type:"text/plain"}))}}function Do(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 Ao extends zo{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 eo(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Io extends yo{constructor(t,e){super(),To(this,t,e)}async init(){await ko(this,Vo,Wo),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(ro);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 Vo(lo,t,Lo(t,o,e));if(206!=n.status)throw new f(ro);const c=_o(n);if(c!==dt&&c!=o)throw new f(ro);Mo(t,n),Oo(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 vo(this,t,e,Vo,Wo)}}class Co extends yo{constructor(t,e){super(),To(this,t,e)}async init(){await ko(this,Go,Po),super.init()}readUint8Array(t,e){return vo(this,t,e,Go,Po)}}function To(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:s,combineSizeEocd:a,checkResourceChanges:c=!0,maximumRangeSize:u=wo,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 ko(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(lo,t,Lo(t,a?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(s||o&&o.toLowerCase()==fo))throw new f(ro);{let o;a&&206==r.status&&(o=new w(await r.arrayBuffer())),Oo(t,r);const i=No(r);i===dt?await Ho(t,e,n):t.size=i,o&&o.length&&_o(r)===t.size-o.length&&(t.nt=o)}}else await Ho(t,e,n)}async function vo(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(lo,t,Lo(t,e,n));if(206!=o.status)throw new f(ro);const i=_o(o);if(i!==dt&&i!=e)throw new f(ro);Mo(t,o),Oo(t,o);const s=new w(await o.arrayBuffer());if(s.length!=n)throw new f(ro);return s}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function _o(t){const e=t.headers.get(co);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function No(t){const e=t.headers.get(co);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Uo({headers:t}){return{ot:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function Oo(t,e){const{checkResourceChanges:n,it:r}=t;n&&!r&&206==e.status&&(t.it=Uo(e))}function Mo(t,e){const{checkResourceChanges:r,it:o,size:i}=t;if(r){const t=No(e);if(t!==dt&&i!==dt&&t!=i)throw new f(oo);if(o){const t=Uo(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new f(oo)}}}function Lo(t,e=0,r=1){return n.assign({},Bo(t),{[uo]:fo+"="+(e<0?e:e+"-"+(e+r-1))})}function Bo({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function Wo(t){await Zo(t,Vo)}async function Po(t){await Zo(t,Go)}async function Zo(t,e){const n=await e(lo,t,Bo(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Ho(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Bo(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function Vo(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(ro):new f(no+(s.statusText||s.status))}function Go(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(ro):new f(no+(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 jo extends yo{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Co(t,e):new Io(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 qo extends yo{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 Yo extends go{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 Ko extends yo{constructor(t){super(),this.ut=t}async init(){const t=this;t.lt=0;const e=t.ut=await g.all(t.ut.map(ei));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 ni(c,a,e);else{const i=r-a;o=Se(await ni(c,a,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.lt=s.max(i,n.lt),o}}class Xo extends mo{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===ho)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(io);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await ti(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,po,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(ho)}finally{t.releaseLock()}}}class $o{constructor(t){return e.isArray(t)&&(t=new Ko(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:Tn(t)}),t}}class Jo{constructor(t){t.writable===dt&&typeof t.next==pt&&(t=new Xo(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(ao)}return t}}function Qo(t){return Boolean(t&&t.getData)}async function ti(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function ei(t){return t=new $o(t),await ti(t),t.size!==dt&&t.readUint8Array||(t=new xo(await kn(t.readable)),await ti(t)),t}function ni(t,e,n){return t.readUint8Array(e,n)}function ri(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?yo.prototype.createReadable.call(t,e):t.readable}function oi(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const ii="filename",si="rawFilename",ai="comment",ci="rawComment",ui="uncompressedSize",li="compressedSize",di="offset",fi="diskNumberStart",wi="lastModDate",pi="rawLastModDate",hi="lastAccessDate",mi="rawLastAccessDate",yi="creationDate",gi="rawCreationDate",Si="internalFileAttributes",Ei="externalFileAttributes",bi="msdosAttributesRaw",Ri="msdosAttributes",xi="msDosCompatible",zi="zip64",Fi="encrypted",Di="version",Ai="versionMadeBy",Ii="zipCrypto",Ci="directory",Ti="executable",ki="compressionMethod",vi="signature",_i="extraField",Ni="unixMode",Ui="setuid",Oi="setgid",Mi="sticky",Li=[ii,si,ui,li,wi,pi,ai,ci,hi,mi,yi,gi,di,fi,Si,Ei,bi,Ri,xi,zi,Fi,Di,Ai,Ii,Ci,Ti,"symlink",ki,vi,"crc32",_i,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Ni,"unixExternalUpper",Ui,Oi,Mi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Bi{constructor(t){Li.forEach(e=>this[e]=t[e])}}const Wi=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function Pi(t,e,n){return t?e?12:16+4*n:0}const Zi="File format is not recognized",Hi="End of central directory not found",Vi="End of Zip64 central directory locator not found",Gi="Central directory header not found",ji="Local file header not found",qi="Zip64 extra field not found",Yi="File contains encrypted entry",Ki="Encryption method not supported",Xi="Split zip file",$i="Overlapping entry found",Ji="Entry data out of bounds",Qi="Ambiguous archive",ts="Encrypted central directory is not supported",es="Unsafe filename",ns="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",rs="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",os="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",is="64-bit value exceeds Number.MAX_SAFE_INTEGER",ss="unsorted central directory",as="unknown version needed to extract",cs="compressed patched data",us="malformed extra field",ls="unknown zip64 extensible data",ds="wrapped entries count",fs="appended data",ws="prepended data",ps="prepended central directory",hs="trailing central directory data",ms="duplicate filename",ys="mismatched zip64 end of central directory record",gs="multiple end of central directory records",Ss="mismatched local file header (filename)",Es="mismatched local file header (general purpose bit flag)",bs="mismatched local file header (compression method)",Rs="mismatched local file header (crc32 or sizes)",xs=/^[a-zA-Z]:/,zs=/(^|[\\/])\.\.([\\/]|$)/,Fs="utf-8",Ds="cp437",As=[[ui,O],[li,O],[di,O],[fi,M]],Is={[M]:{ht:da,bytes:4},[O]:{ht:fa,bytes:8}},Cs=i(o.MAX_SAFE_INTEGER);class Ts{constructor(t,e={}){n.assign(this,{reader:new $o(t),options:e,yt:{gt:new u,St:[],Et:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await ti(r),r.size!==dt&&r.readUint8Array||(r=new xo(await kn(r.readable)),await ti(r)),r.size<Y)throw new f(Zi);const o=e.warnings=[],i=Ys(t,e.options),a=i==Lt,c=i!=Wt,l=$s(ia(e,t,_t),i),d=function(t,e){if(t===dt)return e;if(!qs(t))throw new f(rs);return t}(ia(e,t,"filenameValidation"),i),p=ia(e,t,"normalizeFilename"),{bt:h,Rt:m}=await Js(r,c,l);if(!h)throw await async function(t){return await js(t)==W}(r)?new f(Xi):new f(Hi);c&&m>1&&oa(gs);const y=be(h);let g=da(y,12),S=da(y,16);const E=h.offset,b=la(y,20),R=E+Y+b,x=r.size-R;x>l&&oa(fs),x>0&&oi(o,fs);let F=la(y,4);const D=r.lt||0;let A,I,C,T,k,v=la(y,6),_=la(y,10),N=0,U=X;const B=S==O||g==O||_==M||v==M;if(S!=O&&v!=M&&(S+=Gs(r,v)),B){const t=h.offset>=K?await ni(r,h.offset-K,K):gt,e=be(t);if(t.length==K&&da(e,0)==j){S=Gs(r,da(e,4))+fa(e,8);let t=await ni(r,S,X),i=be(t);const c=h.offset-K-X;if((t.length<X||da(i,0)!=G)&&S!=c&&c>=0){const e=S;S=c,S>e&&(N=S-e),t=await ni(r,S,X),i=be(t)}if(t.length<X||da(i,0)!=G)throw new f(Vi);if(C=!0,T=fa(i,4)>44,T){const t=s.min(fa(i,4)-44,r.size-S-X);t>0&&(U+=t,k=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=be(t),o=la(r,26);n.assign(e,{compressionMethod:la(r,0),compressedSize:fa(r,2),uncompressedSize:fa(r,10),encryptionAlgorithm:la(r,18),bitLength:la(r,20),flags:la(r,22),hashAlgorithm:la(r,24),hashData:t.subarray(28,28+o)})}return e}(await ni(r,S+X,t)))}F==M?F=da(i,16):F!=da(i,16)&&ra(a,o,ys),v==M?v=da(i,20):v!=da(i,20)&&ra(a,o,ys),_==M?_=fa(i,32):_!=fa(i,32)&&ra(a,o,ys),g==O?g=fa(i,40):g!=fa(i,40)&&ra(a,o,ys),S=Gs(r,v)+fa(i,48)+N}}let P=g;const Z=h.offset-(C?U+K:0);if(S>=r.size&&(N=r.size-S-g-Y,S=r.size-g-Y),D!=F)throw new f(Xi);if(S<0)throw new f(Zi);let V=0,$=await ni(r,S,g),J=be($);if(g){if($.length<4)throw new f(Zi);const t=Z-g;if(S!=t&&v==F){const e=da(J,V)==H||Boolean(k&&k.compressedSize)||Ns(J);let n=!e;if(!n&&t>=0&&t+4<=r.size&&(n=da(be(await ni(r,t,4)),0)==H),n){const n=S;S=t,S>n&&(N+=S-n,A=e),$=await ni(r,S,g),J=be($)}}}const Q=Z-S;if(g!=Q&&Q>=0&&v==F&&(g=Q,$=await ni(r,S,g),J=be($)),S<0||S>=r.size)throw new f(Zi);e.directoryOffset=S,e.directoryLength=P;const tt=sa(e,t,"decryptCentralDirectory");let et,nt;if(tt&&_&&$.length>=4&&da(J,0)!=H&&(T||Ns(J))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(k,P,$.length);nt=$.subarray(t),$=await tt($.subarray(0,t),k),J=be($),P=$.length,et=!0}k&&!et&&($.length<4||da(J,0)==H)&&oi(o,ls),I=S;const ct=ia(e,t,"filenameEncoding"),ut=ia(e,t,"commentEncoding"),lt=new u;let ft,wt=-1;const pt=!a&&!C;!_&&pt&&(_=Us(J,$,V),_&&oi(o,ds));for(let i=0;i<_;i++){const a=new _s(r,e.options);if(V+q>$.length||da(J,V)!=H){if(0==i&&!et&&(T||Ns(J)))throw new f(ts);throw new f(Gi)}Ms(a,J,V+6);const c=Boolean(a.bitFlag.languageEncodingFlag),u=V+q,l=u+a.filenameLength+a.extraFieldLength,h=la(J,V+4),m=!(h>>8),y=h>>8==3,g=la(J,V+32),S=l+g,E=new w($.subarray(u,S)),b=E.subarray(0,a.filenameLength),R=E.subarray(a.filenameLength+a.extraFieldLength),x=c||!ct&&to(b),F=c||!ut&&to(R),D=da(J,V+38),A=D&L,C={readOnly:Boolean(1&A),hidden:Boolean(2&A),system:Boolean(4&A),directory:Boolean(16&A),archive:Boolean(32&A)},k=da(J,V+42),v=sa(e,t,"decodeText")||Qr,U=x?Fs:ct||Ds,O=F?Fs:ut||Ds;let B=v(b,U,Ot);if(B===dt&&(B=Qr(b,U)),p){const t=p(B);t!==dt&&(B=t)}if(Xs(B,d)){const t=new f(es);throw t.filename=B,t}let W=v(R,O,Mt);W===dt&&(W=Qr(R,O)),n.assign(a,{index:i,xt:et,versionMadeBy:h,msDosCompatible:m,zip64:!1,compressedSize:0,uncompressedSize:0,zt:g,offset:k,diskNumberStart:la(J,V+34),internalFileAttributes:la(J,V+36),externalFileAttributes:D,msdosAttributesRaw:A,msdosAttributes:C,rawFilename:b,filenameUTF8:x,commentUTF8:F,rawExtraField:E.subarray(a.filenameLength,a.filenameLength+a.extraFieldLength),rawComment:R,filename:B,comment:W}),Ls(a,a,J,V+6)&&oi(o,us,B),a.offset+=N;const P=Gs(r,a.diskNumberStart)+a.offset;I=s.min(P,I),P<wt&&oi(o,ss,B),wt=P,(a.version&L)>63&&oi(o,as,B),32&~a.rawBitFlag||oi(o,cs,B),lt.has(a.filename)&&(ft=!0),lt.add(a.filename);const Z=a.externalFileAttributes>>16&M;a.unixMode===dt&&16877&Z&&(a.unixMode=Z);const G=Boolean(a.unixMode&it),j=Boolean(a.unixMode&st),Y=Boolean(512&a.unixMode),K=40960==((a.unixMode===dt?Z:a.unixMode)&rt),X=!K&&(a.unixMode!==dt?!!(73&a.unixMode):y&&!!(73&Z)),Q=a.unixMode!==dt&&(a.unixMode&rt)==ot,tt=(Z&rt)==ot;n.assign(a,{setuid:G,setgid:j,sticky:Y,symlink:K,unixExternalUpper:Z,executable:X,directory:Q||tt||m&&C.directory||a.filename.endsWith(at),zipCrypto:a.encrypted&&!a.extraFieldAES});const nt=new Bi(a);if(nt.getData=(t,n)=>a.getData(t,nt,e.yt,n),nt.arrayBuffer=async t=>{const r=new z,o=kn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await a.getData(r,nt,e.yt,n.assign({},t,{preventClose:!1})),o},V=S,i==_-1&&pt){const t=Us(J,$,V);t&&(_+=t,oi(o,ds))}const{onprogress:ht}=t;if(ht)try{await ht(i+1,_,new Bi(a))}catch{}yield nt}let ht=V,mt=Os($.subarray(V))||(et?Os(nt):dt);if(!mt&&!et){const t=S+V,e=s.min(Z-t,65541);e>=6&&(mt=Os(await ni(r,t,e)))}mt&&(e.digitalSignature=mt,ht=V+6+mt.length),(V!=P&&ht!=P||!et&&V!=g&&ht!=g)&&ra(a,o,hs),ft&&ra(a,o,ms);const yt=ia(e,t,"extractPrependedData"),St=ia(e,t,"extractAppendedData"),Et=(a||yt)&&_&&4==I&&await async function(t){const e=await js(t);return e==W||808471376==e}(r)?4:0;return a&&(N||_&&I>Et)&&oa(ws),(N||_&&I>4)&&oi(o,ws),A&&oi(o,ps),yt&&(e.prependedData=I>Et?await ni(r,Et,I-Et):gt),e.comment=b?await ni(r,E+Y,b):gt,St&&(e.appendedData=R<r.size?await ni(r,R,r.size-R):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[St](){return this.close()}}class ks{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),s=new Ts(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 vs(t,e={}){if(t=new $o(t),await ti(t),t.size!==dt&&t.readUint8Array||(t=new xo(await kn(t.readable)),await ti(t)),t.size<Y)return!1;const n=Ys(e,{}),r=n!=Wt,o=$s(e[_t],n),{bt:i,Rt:s}=await Js(t,r,o);if(!i||n==Lt&&s>1)return!1;const a=la(be(i),20),c=i.offset+Y+a;return t.size-c<=o}let _s=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=Gs(c,d)+l,A=await ni(c,F,ct),I=be(A);let C=ia(i,o,Et),T=ia(i,o,bt);const k=$t(ia(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||da(I,0)!=B)throw new f(ji);Ms(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=ia(i,o,"checkLocalDirectory"),W=Ys(o,i.options),Z=function(t,e){return t===dt?e!=Wt:Boolean(t)}(M,W),H=ia(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 ni(c,F+ct,U+N);G=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await ni(c,F+ct+U,N):gt;V&&(x.rawFilename=G),Ls(i,x,I,4,!0)&&oi(z,us),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])||ra(s,o,Ss),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&ra(s,o,Es),e.compressionMethod!=t.compressionMethod&&ra(s,o,bs),e.bitFlag.dataDescriptor||a||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||ra(s,o,Rs)}(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=ia(i,o,"checkPasswordOnly"),$=i.encrypted&&x.encrypted&&(!_||X),J=$&&!w;if(_||(e.zipCrypto=J),$&&!(64&~x.rawBitFlag))throw new f(Ki);const Q=v?dt:Wn(h);if(0!=h&&8!=h&&9!=h&&!Q&&!v)throw new f(On);if($){if(!J&&(w.strength<1||w.strength>3))throw new f(Ki);if(!C&&!T)throw new f(Yi)}if(O+b>c.size)throw new f(Ji);const tt=b,et=Yt(ia(i,o,xt));Kt(et);let nt=ia(i,o,"checkOverlappingEntry");const rt=ia(i,o,"checkOverlappingEntryOnly");rt&&(nt=!0);const{onstart:ot,onprogress:it,onend:st}=o,at=0!=h&&!v,ut=v?b-Pi($,J,w&&w.strength):E,lt=9==h;let ft=ia(i,o,Ft);lt&&(ft=!1);const wt=ia(i,o,"checkCrc32"),pt=(wt===dt?ia(i,o,"checkSignature"):wt)&&!v&&(!$||J||w&&1==w.vendorVersion),ht={options:{codecType:lr,password:C,rawPassword:T,zipCrypto:J,encryptionStrength:w&&w.strength,checkCrc32:pt,checkAuthenticationCode:ia(i,o,"checkAuthenticationCode"),passwordVerification:J&&(R?S>>>8&L:g>>>24&L),outputSize:ut,crc32:g,compressed:at,encrypted:$,useWebWorkers:ia(i,o,zt),useCompressionStream:ft,transferStreams:ia(i,o,Dt),deflate64:lt,format:Q?Q.format:dt,codecURI:Q?Q.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 ni(t,a+i,d+4),r=be(n);let c=n.length==d+4&&da(r,0)==P;if(c){const t=Vs(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=Vs(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&&Hs(e,o)?o:i&&Hs(e,i)?i:void 0}(h,w)||m.find(t=>Hs(w,t));if(t){const e=new f($i);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 Jo(t),await ti(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!=Qe)throw yt=e,St=!0,e}finally{if((Qo(t)||!ia(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 Ns(t){const e=s.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==da(t,n))return!0;return!1}function Us(t,e,n){let r=0;for(;n+q<=e.length&&da(t,n)==H;)n+=q+la(t,n+28)+la(t,n+30)+la(t,n+32),r++;return r%65536?0:r}function Os(t){if(t.length>=6){const e=be(t);if(da(e,0)==Z){const n=la(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function Ms(t,e,r){const o=t.rawBitFlag=la(e,r+2),i=!(1&~o),s=da(e,r+6);n.assign(t,{encrypted:i,version:la(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:s,lastModDate:aa(s),filenameLength:la(e,r+22),extraFieldLength:la(e,r+24)})}function Ls(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=la(l,d),e=la(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=la(r,o+4);n.assign(e,{signature:da(r,o+10),crc32:da(r,o+10),compressedSize:da(r,o+14),uncompressedSize:da(r,o+18)});const h=u.get(1);h&&(function(t,e){e.zip64=!0;const n=be(t.data),r=As.filter(([t,n])=>e[t]==n),o=r.reduce((t,[,e])=>t+Is[e].bytes,0);if(t.data.length<o)throw new f(qi);for(let o=0,i=0;o<r.length;o++){const[s,a]=r[o],c=Is[a];e[s]=t[s]=c.ht(n,i),i+=c.bytes}}(h,e),e.extraFieldZip64=h);const m=u.get(28789);m&&(Bs(m,ii,si,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Bs(y,ai,ci,e,t),e.extraFieldUnicodeComment=y);const g=u.get($);g&&g.data.length>=7?(function(t,e,r){const o=be(t.data),i=ua(o,4);n.assign(t,{vendorVersion:ua(o,0),vendorId:ua(o,2),strength:i,originalCompressionMethod:r,compressionMethod:la(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&&(Ws(S,e),e.extraFieldPkwareUnix=S);const E=u.get(22613);E&&(Ws(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=la(r,i),n=la(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:ca(i),lastAccessDate:ca(s),creationDate:ca(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=Ps(R,e,!1),e.extraFieldUnix=R),!x){const t=u.get(tt);t&&(Ps(t,e,!0),e.extraFieldInfoZip=t)}const z=u.get(J);z&&(function(t,e,n){if(!t.data.length)return;const r=be(t.data),o=ua(r,0),i=[],s=[];n?(1&~o||(i.push(wi),s.push(pi)),2&~o||(i.push(hi),s.push(mi)),4&~o||(i.push(yi),s.push(gi))):t.data.length>=5&&(i.push(wi),s.push(pi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=da(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(Q);return F&&(e.extraFieldUSDZ=F),w}function Bs(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=da(s,1),l=ua(s,0);n.assign(t,{version:l,[e]:Qr(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==da(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function Ws(t,e){if(t.data.length<8)return;const r=be(t.data),o={lastAccessDate:new a(1e3*(0|da(r,0))),lastModDate:new a(1e3*(0|da(r,4)))};t.data.length>=12&&(o.uid=la(r,8),o.gid=la(r,10)),n.assign(t,o),n.assign(e,o)}function Ps(t,e,r){try{const o=be(t.data);let i,s;if(r){let e=0;const r=ua(o,e++),a=ua(o,e++);i=Zs(t.data.subarray(e,e+a)),e+=a;const c=ua(o,e++);s=Zs(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:s})}else t.data.length>=4&&(i=la(o,0),s=la(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 Zs(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Hs(t,e){return t.start<e.end&&e.start<t.end}function Vs(t,e,n){const r=da(t,e);let o,i;return n?(o=fa(t,e+4),i=fa(t,e+12)):(o=da(t,e+4),i=da(t,e+8)),{crc32:r,compressedSize:o,uncompressedSize:i}}function Gs(t,e){return t.wt?t.wt(e):0}async function js(t){return da(be(await ni(t,0,4)))}function qs(t){return t===Lt||t===Bt||t===Wt}function Ys(t,e){return Ks(t,Ks(e,Bt))}function Ks(t,e){const n=t.strictness;if(n!==dt){if(!qs(n))throw new f(ns);return n}const r=t.checkAmbiguity;return r===dt?e:r?Lt:e==Wt?Wt:Bt}function Xs(t,e){if(e==Wt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(zs.test(t)||t.startsWith("/")||t.startsWith("\\")||xs.test(t))||e==Lt&&(n.includes(".")||n.includes("")||t.includes("\0"))}function $s(t,e){if(t!==dt){const e=te(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new f(os);return e}return e==Lt?0:e==Wt?1/0:M}async function Js(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 Qs(t,o)){const o=la(n,d+20);if(f+Y+o==r){const o=await ea(t,n,s,d,f,r,i);if(2==o){if(a||(a=ta(l,d,f)),u++,!e||u>1)break}else 1!=o||c||(c=ta(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 Qs(t,o)){const o=ta(c,u,l);i||(i=o);const d=await ea(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*Qs(t,e){const n=t.size-e,r=await ni(t,n,e),o=be(r);for(let t=r.length-Y;t>=0;t--)da(o,t)==V&&(yield[o,n,r,t,n+t])}function ta(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function ea(t,e,n,r,o,i,s){const a=la(e,r+10),c=da(e,r+12),u=da(e,r+16);if(a==M||c==O||u==O)return await na(t,e,n,o-K,i,s)==j?2:0;if(!a&&!c)return 1;const l=la(e,r+6);for(const r of[o-c,Gs(t,l)+u])if(await na(t,e,n,r,i,s)==H)return 2;return 0}async function na(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?da(e,r-n):i.count>0?(i.count--,da(be(await ni(t,r,4)),0)):dt}function ra(t,e,n){t?oa(n):oi(e,n)}function oa(t){const e=new f(Qi);throw e.reason=t,e}function ia(t,e,n){return e[n]===dt?t.options[n]:e[n]}function sa(t,e,n){return qt(ia(t,e,n))}function aa(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 ca(t){return new a(o(t/i(1e4)-i(116444736e5)))}function ua(t,e){return t.getUint8(e)}function la(t,e){return t.getUint16(e,!0)}function da(t,e){return t.getUint32(e,!0)}function fa(t,e){const n=t.getBigUint64(e,!0);if(n>Cs)throw new f(is);return o(n)}var wa=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Qi,ERR_BAD_FORMAT:Zi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Gi,ERR_ENCRYPTED:Yi,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ts,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Ji,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Vi,ERR_EOCDR_NOT_FOUND:Hi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:qi,ERR_INVALID_AUTHENTICATION_CODE:Je,ERR_INVALID_COMPRESSED_DATA:Gn,ERR_INVALID_CRC32:jn,ERR_INVALID_FILENAME_VALIDATION:rs,ERR_INVALID_MAX_APPENDED_DATA_SIZE:os,ERR_INVALID_PASSWORD:$e,ERR_INVALID_STRICTNESS:ns,ERR_INVALID_UNCOMPRESSED_SIZE:Vn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:ji,ERR_OVERLAPPING_ENTRY:$i,ERR_SPLIT_ZIP_FILE:Xi,ERR_UNSAFE_FILENAME:es,ERR_UNSUPPORTED_COMPRESSION:On,ERR_UNSUPPORTED_ENCRYPTION:Ki,ERR_UNSUPPORTED_UINT64:is,ERR_WORKER_STARTUP_TIMEOUT:wr,WARNING_APPENDED_DATA:fs,WARNING_COMPRESSED_PATCHED_DATA:cs,WARNING_DUPLICATE_FILENAME:ms,WARNING_MALFORMED_EXTRA_FIELD:us,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Es,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:bs,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Rs,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ss,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ys,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:gs,WARNING_PREPENDED_CENTRAL_DIRECTORY:ps,WARNING_PREPENDED_DATA:ws,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:hs,WARNING_UNKNOWN_VERSION:as,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:ls,WARNING_UNSORTED_CENTRAL_DIRECTORY:ss,WARNING_WRAPPED_ENTRIES_COUNT:ds,ZipReader:Ts,ZipReaderStream:ks,isZipFile:vs});const pa="File already exists",ha="Zip file comment exceeds 64KB",ma="Invalid zip file comment (must be a Uint8Array)",ya="File entry comment exceeds 64KB",ga="Invalid file entry comment (must be a string)",Sa="Invalid date (must be a valid Date instance)",Ea="File entry name exceeds 64KB",ba="Version exceeds 65535",Ra="The strength must equal 1, 2, or 3",xa="Encryption is not supported in USDZ files",za="Split zip files are not supported in USDZ files",Fa="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Da="Invalid extra field (must be a Map)",Aa="Invalid extra field type (must be integer 0..65535)",Ia="Invalid extra field data (must be a Uint8Array)",Ca="Extra field data exceeds 64KB",Ta=-2147483648,ka=2147483647,va=i(0),_a=i("0x7fffffffffffffff"),Na="Zip64 is not supported (set the 'zip64' option to 'true')",Ua="Undefined uncompressed size",Oa="Undefined compression method",Ma="Undefined CRC32",La="Undetermined size",Ba="Undefined reader",Wa="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",Pa="Zip file not empty",Za="Invalid uid (must be integer 0..2^32-1)",Ha="Invalid gid (must be integer 0..2^32-1)",Va="Invalid UNIX mode (must be integer 0..65535)",Ga="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",ja="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",qa="Invalid msdosAttributesRaw (must be integer 0..255)",Ya="Invalid msdosAttributes (must be an object with boolean flags)",Ka="Invalid level (must be integer 0..9)",Xa="Signature data exceeds 64KB",$a="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ja="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Qa="compression unavailable",tc="clamped last modification date",ec=new w([7,0,2,0,65,69,3,0,0]),nc="infozip",rc="unix",oc=[8,9,5,3];let ic=0;const sc=[];class ac{constructor(t,e={}){t=new Jo(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(za);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 lc(this,async function(t,e){if(t.It.size)throw new f(Pa);await t.Ot(e)}(this,t))}appendZip(t){return lc(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 $o(t),await ti(t),t.size!==dt&&t.readUint8Array||(t=new xo(await kn(t.readable)),await ti(t));const{ZipReader:o}=await g.resolve().then(function(){return wa}),a=new o(t),u=await a.getEntries();await a.close(),await ti(r.writer);const{directoryOffset:w}=a;u.forEach(({filename:t})=>{if(i.has(t))throw new f(pa);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 ni(t,0,4)).getUint32(0,!0)==W}(t)||(await Uc(r.writer,_c()),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)=>vc(n,t)-vc(n,e));let c=0;for(const e of a){const r=vc(n,e);await Tc(t,n,c,r-c),Ac(i,await kc(n,r))&&await i.closeDisk(),s.set(e,{offset:Ic(t,i),diskNumberStart:Fc(i)}),c=r}await Tc(t,n,c,o-c)}else{const e=t.offset;await Tc(t,n,0,o),r.forEach(t=>s.set(t,{offset:e+vc(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=Cc(f||gt),t.extraFieldAES&&(d=99);const y=$c(f),g=Boolean(l)&&l.uncompressedSize!==dt,S=Boolean(l)&&l.compressedSize!==dt,E=-7&tu(w,p,m,a,d)|w<<1,{Bt:b,Wt:R}=Jc({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&&Yc(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{$t:e,Jt:r}=wc(s,$t(Wc(t,o,Rt)),Wc(t,o,wi));delete o[Ut],o=n.assign(e,r,o)}if(Wc(t,o,Ci)&&!e.endsWith(at)&&(e+=at),t.It.has(e))throw new f(pa);t.It.add(e),ic<we().maxWorkers?ic++:await new g(t=>sc.push(t));try{return await async function(t,e,r,o){const s=pc(t,e,o);({name:e}=s);const a=hc(t,e,o),{comment:c}=a,u=o[_i];t.At.set(e,dt);const l=t.Nt,d={};let w,p;a.Qt.keepOrder&&(d.te=new g(t=>w=t)),t.Nt=d;try{const{Qt:c}=a;0==c.level||c.compressionMethod!==dt||c.ee||await gr(we())||(c.level=0,oi(t.warnings,Qa,e));const u=await async function(t,e,{Qt:r},o){if(r.ee&&!e&&!Wc(t,o,Ci))throw new f(Ba);let i;if(e){if(e=new $o(e),await ti(e),!e.readable&&!e.readUint8Array)throw new f(Wa);({size:i}=e)}return n.assign({reader:e},yc(t,Boolean(e),i,r,o))}(t,r,a,o);({reader:r}=u);const h=Dc(t.writer),m=Fc(t.writer);let y=o.crc32===dt?o[vi]:o.crc32;const S=u.Qt.encrypted&&!c.zipCrypto;if(c.ee&&!c.ne&&S&&(y=dt),c.ee&&r&&!S&&y===dt)throw new f(Ma);const E=Sc(o=n.assign({},o,s.Qt,a.Qt,u.Qt,{signature:o[vi],crc32:y,offset:t.offset-h,diskNumberStart:m,[vt]:t.options[vt]}));E.re&&oi(t.warnings,tc,e);const b=Rc(o),R=$c(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 ti(c)):(b=!0,t._t++,A=c,await T,await k()),await ti(A);const h=Dc(c);t.Dt&&!E&&await Nc(t,c),S&&!E&&Ec(o,t.offset-h);const{oe:m}=p;E||await v();const y=Fc(c),R=Ic(t,c);if(I.diskNumberStart=y,E||(F=!0,D=c.size,await Uc(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:$,transferStreams:J,onstart:Q,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(ri(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:$,useCompressionStream:St,transferStreams:J,format:Rt,codecURI:xt,compressionMethod:E},config:a,D:{signal:nt,size:n,onstart:Q,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(Na)}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||(Yc(l,10,t),u&&Yc(f,w,t)),s?u&&(Kc(f,w+4,i(e)),Kc(f,w+12,i(n))):(Yc(l,14,e),Yc(l,18,n),u&&(Yc(f,w+4,e),Yc(f,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,ae:u,le:l},c),V&&await Uc(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 Nc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Fc(c),I.offset=Ic(t,c),S){const e=o.de;Ec(o,t.offset-Dc(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)&&Yc(l,14,o),u||Yc(l,18,s),c||Yc(l,22,a)),n&&r){const e=ct+$c(t)+4;Kc(l,e,i(a)),Kc(l,e+8,i(s))}}(I,p.ye,s),await Uc(c,p.oe),await Oc(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(){Ac(c,$c(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 Bi(p)}(t,e,r,o)}catch(n){throw t.It.delete(e),n}finally{const t=sc.shift();t?t():ic--}}(o,t,e,r);s.add(a);const c=()=>s.delete(a);return g.prototype.then.call(a,c,c),lc(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 uc(s);if(!(t instanceof w))throw new f(ma);if($c(t)>M)throw new f(ha);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}=xc(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 ti(i);let a=0,c=0,u=Fc(i),l=Dc(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,_=$c(w,p,h,m,y,g,S),N=q+$c(f,E)+_;Ac(i,a+N-c)&&(await Uc(i,s.slice(c,a)),c=a,d=0,await i.closeDisk()),0==t&&(u=Fc(i),l=Dc(i)),z||Yc(x,18,k),F||Yc(x,14,v),(A||D)&&n.version<45&&qc(x,0,45);const U=zc(N);if(U.Ae(H),U.Ie(b),U.Ce(R.subarray(0,24)),U.Ie(_),U.Ie($c(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),Xc(s,U.st,a),a+=N,d++,r.onprogress)try{await r.onprogress(t+1,o.size,new Bi(n))}catch{}}return await Uc(i,c?s.slice(c):s),{xe:{diskNumber:u,diskOffset:l},ze:{diskNumber:Fc(i),Te:d},Fe:s}}(t,o,r),l=await async function(t,e,n){const r=Zc(t,n,Nt);if(r){const n=await r(e),o=$c(n);if(o>M)throw new f(Xa);const i=zc(6+o);i.Ae(Z),i.Ie(o),i.Ce(n);const{writer:s}=t;return Ac(s,$c(i.st))&&await s.closeDisk(),await Uc(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=Ic(t,s);const h=$c(e);if(h>M)throw new f(ha);let m=Wc(t,n,zi),y=Fc(o);if(Ac(o,(m?98:Y)+h)&&y++,p>=O||l>=O||d>=M||y>=M){if(!1===m)throw new f(Na);m=!0}else m===dt&&u&&(m=!0);const g=zc(m?98:Y);Ac(o,$c(g.st)+h)&&await o.closeDisk(),y=Fc(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(Ic(t,o))+i(l)+i(c)),g.Ae(y+1),Wc(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 Uc(o,g.st),h&&await Uc(o,e)}(t,n,r,{xe:a,ze:c,be:o,ke:l,Re:s})}(r,t,n),r.Ut=!0,!Qo(s)&&Wc(r,n,At)||await a.getWriter().close(),uc(s)}[St](){return this.close()}}class cc extends g{then(t,e){const{_e:n}=this;return n&&(n.Ee=!0),super.then(t,e)}}function uc(t){return t.getData?t.getData():t.writable}function lc(t,e){const r=new cc((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 dc(t,e){try{await t.writer.writable.abort(e)}catch{}}function fc(t,e,n){t.Tt.add(e),e.catch(t=>{try{n(t)}catch{}})}function wc(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new f($a);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)=>{Wi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[_i]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?rc:nc});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]=oc[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(Ja);return{$t:C,Jt:k}}function pc(t,n,r){let o=Wc(t,r,xi),i=Wc(t,r,Ai,o?20:768);const s=Wc(t,r,Ti),a=Hc(t,r,"uid"),c=Hc(t,r,"gid");let u=Hc(t,r,Ni),l=Wc(t,r,"unixExtraFieldType"),d=Wc(t,r,Ui),w=Wc(t,r,Oi),p=Wc(t,r,Mi);if(Qt(a,O,Za),Qt(c,O,Ha),Qt(u,M,Va),l!==dt&&l!==nc&&l!==rc)throw new f(Ga);if(l===rc&&(a!==dt&&a>M||c!==dt&&c>M))throw new f(ja);l!==dt||a===dt&&c===dt||(l=nc);let h=Hc(t,r,bi),m=Wc(t,r,Ri);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),Qt(h,L,qa),m&&(typeof m!==ht||e.isArray(m)))throw new f(Ya);if(i>M)throw new f(ba);let g=Wc(t,r,Ei);const S=g!==dt;S||(g=0),!r[Ci]&&n.endsWith(at)&&(r[Ci]=!0);const E=Wc(t,r,Ci);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,Qt:{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 hc(t,e,n){const r=Zc(t,n,"encodeText")||Ne;let i=r(e,Ot);if(i===dt&&(i=Ne(e)),$c(i)>M)throw new f(Ea);const s=n[ai]||"";if(typeof s!=mt)throw new f(ga);let c=r(s,Mt);if(c===dt&&(c=Ne(s)),$c(c)>M)throw new f(ya);const u=Wc(t,n,Di);if(u!==dt&&u>M)throw new f(ba);const l=Pc(t,n,wi,new a),d=Wc(t,n,pi),w=Pc(t,n,hi),p=Pc(t,n,yi),h=Wc(t,n,Si,0),m=$t(Wc(t,n,Rt)),y=Boolean(m),g=!0===m,S=Wc(t,n,Et),E=Wc(t,n,bt);Xt(S,E);const b=Hc(t,n,"encryptionStrength",3),R=Wc(t,n,Ii),x=Wc(t,n,"extendedTimestamp",!0),z=Wc(t,n,"ntfsTimestamp"),F=Wc(t,n,"keepOrder",!0),D=Wc(t,n,zt),A=Wc(t,n,Dt),I=Wc(t,n,"bufferedWrite"),C=Zc(t,n,"createTempStream"),T=Wc(t,n,"dataDescriptorSignature",!0),k=Yt(Wc(t,n,xt));Kt(k);const v=Wc(t,n,Ct,!Qc(i)||!Qc(c)),_=Wc(t,n,ki),N=y||_===dt?dt:Wn(_);if(!y&&_!==dt&&0!==_&&8!==_&&!N)throw new f(On);let U=Hc(t,n,It);if(Qt(U,9,Ka),t.options[vt]){if(S!==dt||E!==dt)throw new f(xa);U===dt&&_===dt&&(U=0)}y&&(U=te(n[It]));let O=Wc(t,n,Ft),L=Wc(t,n,Tt);I&&L===dt&&(L=!1),(L===dt||R&&!g)&&(L=!0),U!==dt&&6!=U&&(O=!1);const B=Wc(t,n,zi);if(!(R||S===dt&&E===dt||o.isInteger(b)&&b>=1&&b<=3))throw new f(Ra);const W=mc(n[_i]),P=mc(n.localExtraField),Z=mc(n.centralExtraField);return{comment:s,Qt:{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 mc(t){if(!t)return gt;if(!(t instanceof c))throw new f(Da);let e=0,n=0;t.forEach((t,n)=>{if(Jt(n,M,Aa),!(t instanceof w))throw new f(Ia);if($c(t)>M)throw new f(Ca);e+=4+$c(t)});const r=new w(e),o=be(r);return t.forEach((t,e)=>{qc(o,n,e),qc(o,n+2,$c(t)),Xc(r,t,n+4),n+=4+$c(t)}),r}function yc(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[ui],y===dt)throw new f(Ua);if(h===dt)throw new f(Oa)}const S=!0===w,E=Wc(t,o,Fi);if(e&&s&&!E&&$c(c,u))throw new f(Fa);const b=e&&(Boolean(c&&$c(c)||u&&$c(u))||s&&E);e||(p=0,h=0);const R=Pi(b,a,l);e&&(i?(o.uncompressedSize=y,m=n===dt?Vc(y)+R:n+(s?0:R)):n===dt?(d=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(Gc(h,p)?Vc(y):y)+R));const x=!(b||e&&(0!==n||i)||Gc(h,p));x&&Wc(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(Na);w=!0}return w=w||!1,{Oe:m,Qt:{dataDescriptor:d,se:x,zip64:w,Ht:S,Me:g,Zt:z,Pt:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function gc(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 Sc(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&&Gc(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=zc(t);if(e.Ie(1),e.Ie(t-4),T=e.st,v&&(e.ve(z),k)){const t=Pi(b,l,y);e.ve(E?0:z+t)}}else T=gt;let N,U,O,L,W;if(b&&!l){const t=zc($c(ec)+2);t.Ie($),t.Ce(ec),N=t.st,N[8]=y}else N=gt;if(g){const t=Lc(n),e=(P=t)>=Ta&&P<=ka;if(e){const e=9+(o?4:0)+(i?4:0),n=zc(e);L=1+(o?2:0)+(i?4:0),W=t,n.Ie(J),n.Ie(e-4),n.Le(L),n.Ae(t),o&&n.Ae(Bc(Lc(o))),i&&n.Ae(Bc(Lc(i))),O=n.st}else O=gt;if(S===dt?!e||Boolean(o||i):S)try{const t=Mc(n),e=zc(36);e.Ie(10),e.Ie(32),e.Be(4),e.Ie(1),e.Ie(24),e.ve(t),e.ve(o?Mc(o):t),e.ve(i?Mc(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!=nc||e===dt&&n===dt)if(r!=rc||e===dt&&n===dt)Z=gt;else{const t=zc(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=bc(e===dt?0:e),r=bc(n===dt?0:n),o=3+t.length+r.length,i=zc(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),qc(be(N),9,I),I=99);const V=_?$c(T):0,G=V+$c(N,O,U,Z,h,m);if(G+(t[vt]?67:0)>M)throw new f(Ca);const j=new a(2e3*s.ceil(s.floor(n.getTime()/1e3)/2)),q=j<lt?lt:j>ut?ut:j,Y=$c(O)?new a(1e3*Lc(n)):$c(U)?n:q,{Bt:K,Wt:X,rawLastModDate:Q}=Jc({version:A,bitFlag:tu(c,d,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:q,rawLastModDate:r,rawFilename:e,Pt:x,Zt:R,extraFieldLength:G}),nt=zc(ct+$c(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||Yc(ot,18,0),R||Yc(ot,22,0)),{oe:rt,ye:ot,Bt:K,Wt:X,lastModDate:Y,re:Y===q&&j.getTime()!=q.getTime(),rawLastModDate:Q,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 Ec(t,e){const{ae:n}=t;let{oe:r,extraFieldLength:o}=n,i=64-(e+$c(r))%64;i<4&&(i+=64);const s=new w(i),a=be(s);qc(a,0,Q),qc(a,2,i-4);const c=r;n.oe=r=new w($c(c)+i),Xc(r,c),Xc(r,s,$c(c));const u=be(r);qc(u,28,o+i),n.ye=u,t.de+=i}function bc(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 Rc({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,Yc(r,0,P))),{ie:o,he:r,me:i}}function xc(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=zc(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=zc(9);t.Ie(J),t.Ie(5),t.Le(l),t.Ae(d),b=t.st}r.qt=b;const R=$c(E,o,s,a,b,c,u);if(R>M)throw new f(Ca);e+=q+$c(t,i)+R}return{be:e,Re:n}}function zc(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=>{qc(n,r,t),r+=2},Ae:t=>{Yc(n,r,t),r+=4},ve:t=>{Kc(n,r,i(t)),r+=8},Ce:t=>{Xc(e,t,r),r+=$c(t)},Be:t=>r+=t}}function Fc(t){const{diskNumber:e=0}=t;return e}function Dc(t){const{diskOffset:e=0}=t;return e}function Ac(t,e){const{availableSize:n=ft}=t;return e>n}function Ic(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Ct:0)}function Cc(t){const e=be(t);let n=0;for(;n+4<=$c(t);){const r=4+jc(e,n+2);if(1==jc(e,n))return Cc(Se(t.subarray(0,n),t.subarray(s.min(n+r,$c(t)))));n+=r}return t}async function Tc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await Oc(ri(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 kc(t,e){const n=await ni(t,e,ct);if($c(n)<ct)return ct;const r=be(n);return ct+jc(r,26)+jc(r,28)}function vc(t,{offset:e,diskNumberStart:n}){return e+(t.wt?t.wt(n):0)}function _c(){const t=new w(4);return Yc(be(t),0,W),t}async function Nc(t,e){delete t.Dt,await Uc(e,_c()),t.offset+=4}async function Uc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=$c(e),await r.write(e)}finally{r.releaseLock()}}async function Oc(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($c(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Mc(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<va?va:e>_a?_a:e}}function Lc(t){return s.floor(t.getTime()/1e3)}function Bc(t){return s.min(ka,s.max(Ta,t))}function Wc(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function Pc(t,e,n,r){const i=Wc(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new f(Sa);return i}function Zc(t,e,n){return qt(Wc(t,e,n))}function Hc(t,e,n,r){return te(Wc(t,e,n,r))}function Vc(t){return t+5*(s.floor(t/16383)+1)}function Gc(t,e){return t===dt?e===dt||e>0:0!==t}function jc(t,e){return t.getUint16(e,!0)}function qc(t,e,n){t.setUint16(e,n,!0)}function Yc(t,e,n){t.setUint32(e,n,!0)}function Kc(t,e,n){t.setBigUint64(e,n,!0)}function Xc(t,e,n){t.set(e,n)}function $c(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Jc({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:s,rawFilename:a,Pt:c,Zt:u,extraFieldLength:l}){const d=zc(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);qc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),qc(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($c(a)),d.Ie(l),{Bt:f,Wt:w,rawLastModDate:s}}function Qc(t){return t.every(t=>t>=32&&t<=126)}function tu(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 eu(t,e){if(!t)return!1;const{We:n}=t;return n?n.includes(e):er(t,e)}const nu=1048576,ru=".zip.js-temp",ou=1048576,iu=1048576,su=".zip.js-temp",au="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 cu="Entry filename already exists",uu="Duplicate entry filename in the imported zip file",lu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',du="Entry is an ancestor of target entry",fu="Root directory cannot be moved",wu="Target entry is not a directory",pu="Parent entry is not a directory",hu="Readable stream already consumed",mu="throw",yu="keep-first",gu="keep-last",Su=new u([mu,yu,gu]),Eu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",bu="Invalid readerOptions (must be an object)",Ru="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",xu="zipjs-abort-export";class zu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new f(cu);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=Ju(t);r&&(t=r.pop(),n=Qu(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new f(cu);n!=e.parent&&(Ou(e),e.parent=n,n.children.push(e),Xu(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 Fu extends zu{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 Fu(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==zo?e.type==n:t.constructor!=Eo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Nu(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([ti(r),ti(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 Bi||!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=!Qo(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==$e)return!1;throw t}}getText(t,e){return this.getData(new Ao(t),e)}getBlob(t,e){return this.getData(new zo(t),e)}getData64URI(t,e){return this.getData(new Eo(t),e)}getUint8Array(t){return this.getData(new Yo,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ee(await this.getUint8Array(t)).buffer}replaceBlob(t){Zu(this,{data:t,Reader:xo,Writer:zo,uncompressedSize:t.size})}replaceText(t){Zu(this,{data:t,Reader:Fo,Writer:Ao,uncompressedSize:Do(t)})}replaceData64URI(t){Zu(this,{data:t,Reader:So,Writer:Eo,uncompressedSize:Hu(t)})}replaceUint8Array(t){Zu(this,{data:t,Reader:qo,Writer:Yo,uncompressedSize:t.length})}replaceReadable(t){Zu(this,{data:null,Reader:vu(t),Writer:null,uncompressedSize:dt})}}class Du extends zu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Du(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 $u(this,t,{options:e},!0)}addText(t,e,n={}){return $u(this,t,{data:e,Reader:Fo,Writer:Ao,options:n,uncompressedSize:Do(e)})}addBlob(t,e,n={}){return $u(this,t,{data:e,Reader:xo,Writer:zo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return $u(this,t,{data:e,Reader:So,Writer:Eo,options:n,uncompressedSize:Hu(e)})}addUint8Array(t,e,n={}){return $u(this,t,{data:e,Reader:qo,Writer:Yo,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return $u(this,t,{data:e,Reader:class extends jo{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return $u(this,t,{Reader:vu(e),options:n})}addFileSystemEntry(t,e={}){return ju(this,t,e)}addFileSystemHandle(t,e={}){return ju(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new a(t.lastModified)),$u(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 xo(t),e)}importData64URI(t,e){return this.importZip(new So(t),e)}importUint8Array(t,e){return this.importZip(new qo(t),e)}importHttpContent(t,e){return this.importZip(new jo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new zo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Eo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Yo,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;Pu(r.passThrough);const a=Wu(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=Cu([t],t=>ku(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=>!Mu(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||Mu(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(xu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new f(xu));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 ti(t),r=new Ts(t,e)),Pu(e.passThrough);const o=function(t){if(t===dt)return mu;if(Su.has(t))return t;throw new f(lu)}(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==yu){c=!0;break}if(o!=gu)throw new f(uu);this.fs.remove(r),r=new Du(this.fs,t,{data:null},e),i.push(r)}}else r=new Du(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==yu)continue;if(o!=gu)throw new f(uu);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new Du(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==yu)continue;if(o!=gu)throw new f(uu);this.fs.remove(s)}i.push($u(r,a,{data:t,Reader:_u(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([Uu(r,Wu(e.readerOptions)),o?dt:ti(t)]),s=o?t:new ac(t,e);return await async function(t,e,r,o,i){const{onstart:s,onprogress:a,onend:c,onentryprogress:u}=o,l=e,d=Cu(e.children,t=>Gu(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(Gu(e))return;const{name:s,$t:c}=Lu(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,Cu([r],Tu),e,i),o?s:(await s.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;Wu((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Gu(t)).map(n=>{const{name:r,$t:o}=Lu(n,e,t);return{name:r,size:n.directory?0:Bu(n,Vu(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Gu(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(qt(t[Nt]))throw new f(La);if(o!==dt&&!(o instanceof w))throw new f(ma);const a=$c(o);if(a>M)throw new f(ha);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);Wc(i,o,Ci)&&!e.endsWith(at)&&(e+=at);const a=pc(i,e,o);({name:e}=a);const{Qt:c}=hc(i,e,o);0==c.level||c.compressionMethod!==dt||c.ee||await gr(we())||(c.level=0);const u=!Wc(i,o,Ci);if(u&&r===dt)throw new f(La);const{Oe:w,Qt:p}=yc(i,u,r,c,o);if(u&&!c.ee&&Gc(p.compressionMethod,p.level))throw new f(La);const S=n.assign({},o,a.Qt,c,p,{[vt]:l}),E=Sc(S),b=Rc(S),R={ae:E,de:$c(E.oe,b.ie)};l&&Ec(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||gc(y,p,!0)!=gc(y,p,!1)))&&!r)throw new f(La);const{be:S,Re:E}=xc(d);let b=Wc(i,t,zi);if(h>=O||S>=O||d.size>=M){if(!1===b)throw new f(Na);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 Au{constructor(){Yu(this)}get children(){return this.root.children}remove(t){Ou(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(fu);if(!e.directory)throw new f(wu);if(e.isDescendantOf(t))throw new f(du);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new f(cu)}else Ou(t),t.parent=e,e.children.push(t),Xu(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 Ku(this,n=>n.importBlob(t,e))}importData64URI(t,e){return Ku(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return Ku(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return Ku(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return Ku(this,n=>n.importReadable(t,e))}importZip(t,e){return Ku(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 Iu={FS:Au,ZipDirectoryEntry:Du,ZipFileEntry:Fu};function Cu(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 Tu(t){return t.uncompressedSize}function ku(t,e){const{data:n}=t;return e&&n instanceof Bi?n.compressedSize:t.uncompressedSize}function vu(t){let e;return function(){if(e)throw new f(hu);return e=!0,{readable:t}}}function _u(t){return class extends yo{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 zo,n.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:i||o,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=s,e.Ve=new xo(s),e.size=s.size,super.init()}readUint8Array(t,e){return this.Ve.readUint8Array(t,e)}}}function Nu(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function Uu(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=Nu(t.Reader,t.data,e);o.set(t,n);try{await ti(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 Ou(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function Mu(t){return Boolean(t)&&t.message==xu}function Lu(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let s={},a={};if(t.data instanceof Bi){const e=Vu(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({$t:s,Jt:a}=wc(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(Eu);return{name:o,$t:c}}function Bu(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.Ze?dt:ku(t,e)}function Wu(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new f(bu);return t&&Pu(t.passThrough),t}function Pu(t){if($t(t)===Pt)throw new f(Ru)}function Zu(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,Ze:r===dt})}function Hu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return s.floor(.75*(e-n))}function Vu(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Gu(t){return t.directory&&null===t.data}function ju(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 qu(o)),"file"==o.kind){const t=await o.getFile();i.push($u(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 qu(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 qu(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 Yu(t){t.entries=[],t.Pe=0,t.root=new Du(t)}function Ku(t,e){const{entries:r,Pe:o,root:i}=t;return Yu(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Pe:o,root:i}),e})}function Xu(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 $u(t,e,n,r){if(t.directory){const o=Ju(e);return o&&(e=o.pop(),t=Qu(t,o)),r?new Du(t.fs,e,n,t):new Fu(t.fs,e,n,t)}throw new f(pu)}function Ju(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Qu(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new f(cu);if(n&&(t==n||t.isDescendantOf(n)))throw new f(du)}else t=new Du(r.fs,e,{data:null},r)}),t}t.BlobReader=xo,t.BlobWriter=zo,t.Data64URIReader=So,t.Data64URIWriter=Eo,t.ERR_ABORTED=jt,t.ERR_AMBIGUOUS_ARCHIVE=Qi,t.ERR_ANCESTOR_ENTRY=du,t.ERR_BAD_FORMAT=Zi,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Gi,t.ERR_DUPLICATED_NAME=pa,t.ERR_DUPLICATE_IMPORTED_ENTRY=uu,t.ERR_ENCRYPTED=Yi,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=ts,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=Ji,t.ERR_ENTRY_EXISTS=cu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Vi,t.ERR_EOCDR_NOT_FOUND=Hi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=qi,t.ERR_HTTP_RANGE=ro,t.ERR_HTTP_RESOURCE_CHANGED=oo,t.ERR_HTTP_STATUS=no,t.ERR_INVALID_AUTHENTICATION_CODE=Je,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=_n,t.ERR_INVALID_CODEC_MODULE=Un,t.ERR_INVALID_COMMENT=ha,t.ERR_INVALID_COMMENT_TYPE=ma,t.ERR_INVALID_COMPRESSED_DATA=Gn,t.ERR_INVALID_CRC32=jn,t.ERR_INVALID_DATE=Sa,t.ERR_INVALID_DUPLICATES=lu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ra,t.ERR_INVALID_ENTRY=$a,t.ERR_INVALID_ENTRY_COMMENT=ya,t.ERR_INVALID_ENTRY_COMMENT_TYPE=ga,t.ERR_INVALID_ENTRY_NAME=Ea,t.ERR_INVALID_EXTRAFIELD=Da,t.ERR_INVALID_EXTRAFIELD_DATA=Ca,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Ia,t.ERR_INVALID_EXTRAFIELD_TYPE=Aa,t.ERR_INVALID_FILENAME_VALIDATION=rs,t.ERR_INVALID_FUNCTION_OPTION=Zt,t.ERR_INVALID_GID=Ha,t.ERR_INVALID_LEVEL=Ka,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=os,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=qa,t.ERR_INVALID_MSDOS_DATA=Ya,t.ERR_INVALID_PASSWORD=$e,t.ERR_INVALID_PASSWORD_TYPE=Vt,t.ERR_INVALID_PASS_THROUGH=Eu,t.ERR_INVALID_PASS_THROUGH_VALUE=Gt,t.ERR_INVALID_READER=Wa,t.ERR_INVALID_READER_OPTIONS=bu,t.ERR_INVALID_SIGNAL=Ht,t.ERR_INVALID_SIGNATURE_DATA=Xa,t.ERR_INVALID_STRICTNESS=ns,t.ERR_INVALID_UID=Za,t.ERR_INVALID_UNCOMPRESSED_SIZE=Vn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=Ga,t.ERR_INVALID_UNIX_ID_SIZE=ja,t.ERR_INVALID_UNIX_MODE=Va,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=ba,t.ERR_ITERATOR_COMPLETED_TOO_SOON=io,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ji,t.ERR_OVERLAPPING_ENTRY=$i,t.ERR_PARENT_NOT_DIRECTORY=pu,t.ERR_READABLE_CONSUMED=hu,t.ERR_RESERVED_COMPRESSION_METHOD=Nn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=fu,t.ERR_SPLIT_ZIP_FILE=Xi,t.ERR_TARGET_NOT_DIRECTORY=wu,t.ERR_UNDEFINED_COMPRESSION_METHOD=Oa,t.ERR_UNDEFINED_CRC32=Ma,t.ERR_UNDEFINED_READER=Ba,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=Ua,t.ERR_UNDETERMINED_SIZE=La,t.ERR_UNSAFE_FILENAME=es,t.ERR_UNSUPPORTED_COMPRESSION=On,t.ERR_UNSUPPORTED_CONTEXT=au,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=Ki,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Fa,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=xa,t.ERR_UNSUPPORTED_FORMAT=Na,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Ru,t.ERR_UNSUPPORTED_SPLIT_USDZ=za,t.ERR_UNSUPPORTED_UINT64=is,t.ERR_WORKER_STARTUP_TIMEOUT=wr,t.ERR_WRITER_NOT_INITIALIZED=so,t.ERR_WRITER_SIZE_NOT_WRITABLE=ao,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=Ja,t.ERR_ZIP_NOT_EMPTY=Pa,t.HttpRangeReader=class extends jo{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=jo,t.Reader=yo,t.SplitDataReader=Ko,t.SplitDataWriter=Xo,t.TextReader=Fo,t.TextWriter=Ao,t.Uint8ArrayReader=qo,t.Uint8ArrayWriter=Yo,t.VERSION="2.15.0",t.WARNING_APPENDED_DATA=fs,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=tc,t.WARNING_COMPRESSED_PATCHED_DATA=cs,t.WARNING_COMPRESSION_UNAVAILABLE=Qa,t.WARNING_DUPLICATE_FILENAME=ms,t.WARNING_MALFORMED_EXTRA_FIELD=us,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=Es,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=bs,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Rs,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Ss,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=ys,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=gs,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=ps,t.WARNING_PREPENDED_DATA=ws,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=hs,t.WARNING_UNKNOWN_VERSION=as,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=ls,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ss,t.WARNING_WRAPPED_ENTRIES_COUNT=ds,t.Writer=go,t.ZipDirectoryEntry=Du,t.ZipEntry=zu,t.ZipFS=Au,t.ZipFileEntry=Fu,t.ZipReader=Ts,t.ZipReaderStream=ks,t.ZipWriter=ac,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new ac(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 dc(e,t)}}()}});return fc(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 fc(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 dc(r,t),t}try{return await r.close(t,n)}catch(t){throw await dc(r,t),t}}},t.configure=function(t){n.assign(fe,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=ou}=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=nu,directoryName:r=ru,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=iu,directoryName:r=su,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new f(au);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=Iu,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:eu(n,qn)||eu(t,qn)||eu(t,Kn),decompression:eu(r,qn)||eu(e,qn)||eu(e,Kn),registered:!1},{compressionMethod:9,compression:!1,decompression:eu(r,Yn)||eu(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=vs,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([Yr(),...Br.map(t=>($r(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)}}});