@zip.js/zip.js 2.18.1 → 2.18.2

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.
@@ -1 +1 @@
1
- const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,m=39169,h=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,D="/",x=30,O=new Date(2107,11,31,23,59,58),F=new Date(1980,0,1),U=void 0,I=1/0,T="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",P="rawPassword",B="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",q="useUnicodeFileNames",Y="dataDescriptor",K="offset",X="usdz",$="maxAppendedDataSize",J="signCentralDirectory",Q="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",at="compressed",it="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=k)throw new Error(it);return t}function dt(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(st);return t||U}function wt(t){if(t&&t.aborted)throw t.reason===U?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function mt(t){if(t!==U&&typeof t!=M&&t!==at)throw new Error(ut);return t}function ht(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==U&&ht(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=T&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},zt="maxWorkers",Dt="baseURI",xt=["wasmURI","workerURI"],Ot=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ft=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Ut=[Dt,...xt,"useCompressionStream","useWebWorkers","transferStreams",...Ot,...Ft],It={...Rt};function Tt(){return It}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Ut){const n=t[r];n!==U&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ot.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ft.includes(t))ft(e);else if(t==Dt){if(e&&typeof e!=v)throw new Error(St)}else if(xt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Pt(){for(const t of Ut)delete It[t];Object.assign(It,Rt)}function Bt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];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;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,qt,Yt,Kt,Xt,$t,Jt]=Vt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^$t[t>>>8&255]^Xt[t>>>16&255]^Kt[t>>>24&255]^Yt[255&r]^qt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==T){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re=64,ne=20,oe=new Uint8Array([128]),ae=new Uint8Array(1),ie=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),se=new Uint8Array(256),ce=new Int32Array(256),ue=new Int32Array(256),le=new Int32Array(256),fe=new Int32Array(256);let de=!1;function we(t,e){!function(){if(!de){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),se[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);se[0]=99;for(let t=0;t<256;t++){const e=se[t],r=ye(e),n=r<<24|e<<16|e<<8|r^e;ce[t]=n,ue[t]=n>>>8|n<<24,le[t]=n>>>16|n<<16,fe[t]=n>>>24|n<<8}de=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let a=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=me(n<<8|n>>>24)^a<<24,a=ye(a)):r>6&&t%r==4&&(n=me(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),a=pe(e);let i=0,s=0,c=0,u=0;return{process(t,e){e&&a.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||a.update(t,0,t.length)},digest:()=>a.digest()};function l(){i=i+1|0,i||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=he(i)^r[0],e=he(s)^r[1],a=he(c)^r[2],l=he(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[6],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[7];t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[8],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[9],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[10],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[11],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[14],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[15],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[16],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[17],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[18],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[19],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[22],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[23],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[24],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[25],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[26],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[27],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[30],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[31],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[32],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[33],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[34],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[35],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[38],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[39];let m=40;n>10&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[40],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[41],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[42],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[43],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[46],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[47],m=48),n>12&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[48],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[49],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[50],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[51],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[54],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[55],m=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[m],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[m+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[m+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[m+3]}}function pe(t){const e=function(){const t=new Int32Array(ie),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let a=0,i=0;return{update:s,digest:function(){const e=8*i,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=a;)s(ae,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ne),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(ie),a=0,i=0,c}};function s(t,e,o){const s=e+o;if(i+=o,a){for(;e<s&&a<re;)r[a++]=t[e++];a==re&&(c(n,0),a=0)}if(e+re<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+re<=s;e+=re)c(r,e)}for(;e<s;)r[a++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,a=t[0],i=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[t]|0,i=i<<30|i>>>2,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+e[t+1]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+e[t+3]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[15]|0,i=i<<30|i>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+o|0,a=a<<30|a>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,i=(s<<5|s>>>27)+((u^a)&c^a)+i+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,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+1859775393+o|0,i=i<<30|i>>>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)+(a^i^s)+c+1859775393+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+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,a=(i<<5|i>>>27)+(s^c^u)+a+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i&s|(i|s)&c)+u+2400959708+o|0,i=i<<30|i>>>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)+(a&i|(a|i)&s)+c+2400959708+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&a|(u|a)&i)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c&u|(c|u)&a)+i+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,a=(i<<5|i>>>27)+(s&c|(s|c)&u)+a+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+3395469782+o|0,i=i<<30|i>>>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)+(a^i^s)+c+3395469782+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+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,a=(i<<5|i>>>27)+(s^c^u)+a+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+a|0,t[1]=t[1]+i|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(re),n=new Uint8Array(re);t.length>re&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<re;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,re),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,re),e.update(t,0,ne);const o=e.digest();return e.update(r,0,re),o}}}function me(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function he(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function ye(t){return 255&(t<<1^27*(t>>7))}const be=typeof crypto!=T&&typeof crypto.getRandomValues==k,Ee="Invalid password",Se="Invalid authentication code",ge="zipjs-abort-check-password",Ae="Crypto API not supported";function Re(t){if(be)return crypto.getRandomValues(t);throw new Error(Ae)}const ze={name:"PBKDF2"},De=Object.assign({hash:{name:"HMAC"}},ze),xe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Oe=["deriveBits"],Fe=[8,12,16],Ue=[16,24,32],Ie=10,Te=typeof crypto!=T,ke=Te&&crypto.subtle;let Ce=Te&&typeof ke!=T&&typeof ke.importKey==k&&typeof ke.deriveBits==k,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){const a={};super({start(){_e(a,t,e,r)},async transform(t,e){const{password:r,strength:o,l:i,ready:s}=a;if(r?(await async function(t,e,r,n){const o=await Le(t,e,r,Ze(n,0,Fe[e])),a=Ze(n,Fe[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Be(t),new Error(Ee)}(a,o,r,Ze(t,0,Fe[o]+2)),t=Ze(t,Fe[o]+2),n?(Be(a),e.error(new Error(ge))):i()):await s,a.m)return;const c=new Uint8Array(t.length-Ie-(t.length-Ie)%16);e.enqueue(Pe(a,t,c,0,Ie,!0))},async flush(t){const{h:e,S:r,ready:n}=a;if(e){if(await n,a.m)return;const i=Ze(r,r.length-Ie),s=new Uint8Array(Ze(r,0,r.length-Ie));e.process(s,!0);const c=e.digest();let u=r.length<Ie?1:0;for(let t=0;t<Ie;t++)u|=c[t]^i[t];if(u&&o)return void t.error(new Error(Se));t.enqueue(s)}}}),je(this,a)}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){const n={};super({start(){_e(n,t,e,r)},async transform(t,e){const{password:r,strength:o,l:a,ready:i}=n;let s=N;if(r?(s=await async function(t,e,r){const n=Re(new Uint8Array(Fe[e]));return Bt(n,await Le(t,e,r,n))}(n,o,r),a()):await i,n.m)return;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(Pe(n,t,c,s.length,0,!1))},async flush(t){const{h:e,S:r,ready:o}=n;if(e){if(await o,n.m)return;const a=new Uint8Array(r);e.process(a,!1);const i=Ze(e.digest(),0,Ie);t.enqueue(Bt(a,i))}}}),je(this,n)}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:We(e,r),strength:n-1,S:N,m:!1})}function je(t,e){const r=t.readable.getReader(),n=new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Be(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Be(e),r.cancel(t))});Object.defineProperty(t,"readable",{get:()=>n})}function Pe(t,e,r,n,o,a){const{h:i,S:s}=t;s.length&&(e=Bt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=Ze(r,n,n+u);t.set(Ze(e,0,u)),i.process(t,a)}return t.S=Ze(e,u),r}function Be(t){const{h:e}=t;t.m=!0,e&&e.dispose&&e.dispose()}async function Le(t,e,r,n){t.password=null;const o=Ue[e],a=await async function(t,e,r){if(Ce)try{const n=await ke.importKey("raw",t,De,!1,Oe);return new Uint8Array(await ke.deriveBits(Object.assign({salt:e},xe),n,8*r))}catch{Ce=!1}return function(t,e,r,n){const o=pe(t),a=new Uint8Array(n),i=new Uint8Array(e.length+4),s=new DataView(i.buffer);i.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(i,0,i.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ne),c=o.digest();for(let t=0;t<ne;t++)u[t]^=c[t]}a.set(u.subarray(0,Math.min(ne,n-r)),r)}return a}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(Ze(a,0,o),Ze(a,o,2*o)),t.m&&Be(t),Ze(a,2*o)}function We(t,e){return e===U?ee(t):e}function Ze(t,e,r){return t.subarray(e,r)}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=qe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ee);t=t.subarray(12)}n?e.error(new Error(ge)):e.enqueue(qe(r,t))}})}}class He extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Re(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ye(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ye(r,t),o),e.enqueue(n)}})}}function Ge(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{A:n,R:new Qt(n[0]),D:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)Ke(t,r[e]);else for(let r=0;r<e.length;r++)Ke(t,e.charCodeAt(r))}(t,e,r)}function qe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,r[n]);return r}function Ye(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,e[n]);return r}function Ke(t,e){let[,r]=t.A;t.R.append([e]);const n=~t.R.get();r=Je(Math.imul(Je(r+$e(n)),134775813)+1),t.D.append([r>>>24]);const o=~t.D.get();t.A=[n,r,o]}function Xe(t){const e=2|t.A[2];return $e(Math.imul(e,1^e)>>>8)}function $e(t){return 255&t}function Je(t){return 4294967295&t}function Qe(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function tr(t,e){t=Qe(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=k||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function er(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const rr="Invalid codec definition",nr="Reserved compression method",or="Invalid codec module",ar="Compression method not supported",ir=[0,8,9,99],sr=new Map,cr=new Map;function ur(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(rr);if(ir.includes(r))throw new Error(nr);const c=typeof a==k||typeof i==k;if(!(c||typeof o==v&&o.length))throw new Error(rr);sr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&pr(n,{CompressionStream:a,DecompressionStream:i})}function lr(t){const e=sr.get(t);if(e){let r;sr.delete(t),sr.forEach(t=>r=r||t.format==e.format),r||cr.delete(e.format)}}function fr(t){return sr.get(t)}function dr(){return Array.from(sr.values(),t=>Object.assign({},t,cr.get(t.format)))}function wr(t){return cr.get(t)}function pr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(or);cr.set(t,{CompressionStream:r,DecompressionStream:n})}const mr="Invalid uncompressed size",hr="Invalid compressed data",yr="Codec out of memory",br="Invalid CRC32",Er="deflate-raw",Sr="deflate64-raw",gr="gzip",Ar=[31,139,8];class Rr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let m,h,y,b=super.readable;const E=f&&wr(f),S=Tr(i,n,r),g=c&&o&&!l&&!E&&(!a||s)&&Boolean(S);if(a&&!s||!c||g||(m=new te,b=Cr(b,m)),o)if(E)b=vr(b,Ir(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new zr,b=vr(b,new S(gr,{level:u,chunkSize:e})),b=Cr(b,y);else try{b=kr(b,i,{level:u,chunkSize:e},n,r)}catch(t){if(!i&&r)throw Pr(t);let e;try{e=new n(gr)}catch{throw Pr(t)}b=vr(b,e),b=Cr(b,new zr)}a&&(s?b=Cr(b,new He(t)):(h=new Ne(t),b=Cr(b,h))),Ur(p,b,()=>{a&&!s||!c||(p.crc32=g?y.crc32:new DataView(m.value.buffer).getUint32(0))})}}class zr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Bt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Bt(r.subarray(0,i),t.subarray(0,a-i))),r=Bt(r.subarray(i),t.subarray(a-i))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Dr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let m,h,y,b=super.readable;if(a&&(o?b=Cr(b,new Ve(t)):(h=new Me(t),b=Cr(b,h))),c){const t=new Set,o=f&&wr(f);let a;if(o)b=vr(b,Ir(o.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}),t);else{const o=Tr(u,n,r);if(i&&!l&&s!==U&&p!==U&&o)try{a=new o(gr,{chunkSize:e})}catch{a=U}if(!a)try{b=kr(b,u,{chunkSize:e,deflate64:l},n,r,t)}catch(t){if(l||p===U||!u&&r)throw Pr(t);try{a=new n(gr)}catch{throw Pr(t)}}}a?(y=!0,b=function(t,e,r,n,o){const a=e.writable.getWriter(),i=e.readable.getReader(),s=n===U?new Qt:U;let c,u,l=0,f=!1,d=!1;const w=new ReadableStream({start(t){u=t},pull(){h()},cancel:t=>(d=!0,h(),i.cancel(t))});return async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(Ar),await a.write(t);;){await m(),await a.ready;const{value:t,done:r}=await _r(e,o);if(r)break;await a.write(t)}s&&await a.write(new Uint8Array(0));const i=new Uint8Array(8),c=Wt(i);c.setUint32(0,s?s.get():n,!0),c.setUint32(4,r,!0),f=!0,await a.write(i),await a.close()}catch(t){await Mr(a,t),await Nr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await p();if(e)break;if(l+=t.length,l>r)throw new Error(mr);s&&s.append(t),u.enqueue(t)}d||(d=!0,u.close())}catch(t){!function(t){d||(d=!0,u.error(t),h())}(t),await Nr(i,t)}}(),w;function p(){return i.read().catch(t=>{if(f){if(!s)throw Lr(t,br);if(l!=r)throw Lr(t,mr);return{done:!0}}throw jr(t,o)})}function m(){if(!d&&u.desiredSize<=0)return new Promise(t=>c=t)}function h(){if(c){const t=c;c=U,t()}}}(b,a,p,s,t)):b=function(t,e){const r=t.getReader();return new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw await Nr(r,t),jr(t,e)}},cancel:t=>r.cancel(t)})}(b,t)}i&&!y&&(m=new te,b=Cr(b,m)),Ur(this,b,()=>{if(m){const t=new DataView(m.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(br)}})}}const xr=new Map;function Or(t,e){if(!t)return!1;let r=xr.get(t);r||(r=new Map,xr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Fr(t){return Or(t,Er)}function Ur(t,e,r){e=Cr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Ir(t,e,r){if(!t)throw new Error(ar);return new t(e,r)}function Tr(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function kr(t,e,r,n,o,a){const i=e&&n?n:o||n,s=r.deflate64?Sr:Er;let c;try{c=new i(s,r)}catch(t){if(!e||!o||i==o)throw t;c=new o(s,r)}return vr(t,c,a)}function Cr(t,e){return Qe(t).pipeThrough(e)}function vr(t,e,r){const n=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await n.ready;const t=await _r(o,r);if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await Mr(n,t),await Nr(o,t)}}(),e.readable}async function Mr(t,e){try{await t.abort(e)}catch{}}async function Nr(t,e){try{await t.cancel(e)}catch{}}function _r(t,e){const r=t.read();return e?r.catch(t=>{throw e.add(t),t}):r}function jr(t,e){return e.has(t)?t:Lr(t,Br(t)?yr:hr)}function Pr(t){return Br(t)?Lr(t,yr):t}function Br(t){return Zt(t)&&"Z_MEM_ERROR"==t.code}function Lr(t,e){const r=new Error(e);return r.cause=t,r}const Wr="data",Zr="deflate",Vr="inflate";class Hr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Zr)?o=Rr:n.startsWith(Vr)&&(o=Dr),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==U&&r.outputSize>t.outputSize))throw new Error(mr)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Gr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const qr="Worker startup timeout";let Yr,Kr,Xr,$r=()=>{};async function Jr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!Fr(e)&&(n=e,!Or(n,gr)))||!!r&&await Qr(t);var n}async function Qr(t){if($r)try{return await $r(t),!0}catch{}return!1}function tn(t){t.createWorker?Kr=!0:Yr=!1}class en{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,O:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Kr&&(f=U),Object.assign(t,{F:!0,U:(t.U||0)+1,readable:e.pipeThrough(new Gr(kt(i))).pipeThrough(new rn(s),{signal:d}),writable:r,options:Object.assign({},a),I:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{T:r,F:n}=t;n?(t.C=t.C||[],t.C.push(e)):(r&&(r.terminate(),t.T=null),e()),t.v=null}),M(){if(t.F){const{C:e,T:r}=t;e&&(t.C=null,r&&(t.N=!0,r.terminate())),t.F=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),Yr===U&&(Yr=typeof Worker!=T),(c&&Xr&&(Yr&&l||f)?Xr:on)(t,i)}}class rn extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await nn(t,r)},async transform(t,n){o+=t.length,e&&await nn(e,o,r),n.enqueue(t)},async flush(){n&&await nn(n,o)}})}}async function nn(t,...e){try{await t(...e)}catch{}}function on(t,e){return{run:()=>an(t,e)}}async function an({options:t,readable:e,writable:r,M:n,I:o},a){let i,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Zr),r=e?a.CompressionStreamFallback:a.DecompressionStreamFallback,n=e?a.CompressionStream:a.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!Fr(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new Hr(t,a),s=new Gr(kt(a));const{signal:n}=o.O;await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0,signal:n});const{crc32:c,inputSize:l,outputSize:f}=i;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(i){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=Qr(a)),c}}const sn={type:"module"},cn="error",un="abort";let ln,fn,dn,wn=!0;try{wn=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==U}catch{}var pn;function mn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function hn(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.v=null}function yn(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(fn===U||ln!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=sn);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return yn(t,e,r,n,!1);if(n)throw o;return yn(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=sn);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return yn(t,e,r,!1,o);throw a}}ln=t,fn=s,dn=c}else i=new Worker(fn,dn);return i.addEventListener("message",t=>{r._=!0,bn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,j:l,P:f,M:d,U:w}=e,p=()=>e.U!=w;try{if(i)m(function(t,e){const{message:r,stack:n,code:o,name:a,outputSize:i,cause:s,codecImportFailed:c}=t;let u;if(u=e?e.value:Object.assign(new Error(r),{stack:n,code:o,name:a}),Zt(u))try{i!==U&&(u.outputSize=i),c&&(u.codecImportFailed=!0),s&&(Zt(u.cause)||(u.cause=Object.assign(new Error(s.message),{name:s.name})),s.code!==U&&u.cause.code!==s.code&&(u.cause.code=s.code)),e&&(u.name!==a&&(u.name=a),u.code!==o&&(u.code=o))}catch{}return u}(i,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||Sn({type:Wr,value:t,done:r,messageId:o},e)}if(r==Wr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||Sn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),h(),d())}(a)}}catch(i){p()||(hn(e),m(i))}function m(t){p()||(f(t),h(),Zt(t)&&t.codecImportFailed||d())}function h(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(cn,t=>En(t,r)),i.addEventListener("messageerror",t=>En(t,r)),i}function bn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function En(t,e){t.preventDefault&&t.preventDefault(),bn(e);const{_:r,P:n,writer:o,M:a}=e;hn(e),r||(e.T=null);let i=t.error||new Error(t.message||cn);r||(i=Object.assign(new Error(i.message||cn),{L:!0}),e.W=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Sn(t,{T:e,writer:r,transferStreams:n,_:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&wn&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{wn=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}pn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.v){let i;typeof a==k&&(a=a());try{i=yn(t.workerURI,r,t)}catch{return tn(t),on(t,e)}Object.assign(t,{T:i,_:!1,N:!1,W:null,v:{run:async()=>{try{return await async function(t,e){if(!t.T){const{W:e}=t;t.W=null;const r=e||new Error(qr);throw r.L=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,I:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,V:null,j:r,P:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,H:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:a}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),i=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});i.catch(t=>{n||Object.assign(e,{Z:!0,V:t})});const{signal:s}=e.I.O;if(s){const t=()=>r.abort(s.reason),e=()=>s.removeEventListener(un,t);s.addEventListener(un,t),i.then(e,e)}return{writable:o,closed:i,H:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=Sn({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.M(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t._&&Number.isFinite(f)&&f>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t._)return;const{P:e,writer:r}=t;if(hn(t),t.T=null,e){const t=new Error(qr);t.L=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,I:n,Z:o,V:a}=t;n.outputSize=r;const i=Zt(e)&&(e.codecImportFailed||e.L),s=o&&!i?a:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.L)return tn(t),mn(t),an(t,e);if(r&&r.codecImportFailed){if(t.reader)return mn(t),an(t,e);t.M()}throw r}}}})}return t.v},Xr=pn;let gn=[];const An=[];let Rn,zn,Dn=0;async function xn(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:m}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!cr.has(t)&&e&&pr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===U&&n.transferStreams);const h=!(s||c||u||l),y=f===U||Boolean(r.codecURI);return e.useWebWorkers=!h&&y&&(a||a===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:U,e.createWorker=e.useWebWorkers&&p?p:U,r.useCompressionStream=i||i===U&&n.useCompressionStream,(await async function(){const r=gn.find(t=>!t.F);if(r)return Cn(r),new en(r,t,e,b);if(gn.length<m){const r={G:Dn};return Dn++,gn.push(r),new en(r,t,e,b)}return new Promise(r=>{An.push({resolve:r,stream:t,I:e}),zn=n.workerStarvationTimeout,On()})}()).run();function b(t){if(Fn(),t.N)return t.N=!1,In();if(An.length){const[{resolve:e,stream:r,I:n}]=An.splice(0,1);e(new en(t,r,n,b)),On()}else t.T?(Cn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.Y=setTimeout(async()=>{gn=gn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):gn=gn.filter(e=>e!=t)}}function On(){!Rn&&An.length&&Number.isFinite(zn)&&zn>=0&&(Rn=setTimeout(Un,zn))}function Fn(){Rn&&(clearTimeout(Rn),Rn=null)}function Un(){if(Rn=null,An.length){const[{resolve:t,stream:e,I:r}]=An.splice(0,1);t(new en({},e,Tn(r),kn)),On()}}function In(){const t=An.splice(0).map(({resolve:t,stream:e,I:r})=>new Promise(n=>{t(new en({},e,Tn(r),()=>{kn(),n()}))}));return Fn(),Promise.all(t)}function Tn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:U,createWorker:U})}function kn(){Fn(),On()}function Cn(t){const{Y:e}=t;e&&(clearTimeout(e),t.Y=null)}const vn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function Mn(t,e){return _n(t,e,!0)}function Nn(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function _n(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=vn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const jn="HTTP error ",Pn="HTTP Range not supported",Bn="HTTP resource changed",Ln="Writer iterator completed too soon",Wn="Writer not initialized",Zn="Invalid writer (size must be writable)",Vn="Content-Range",Hn="Range",Gn="GET",qn="bytes",Yn=16777216,Kn="writable",Xn=Symbol();class $n{constructor(){this.size=0}init(){this.initialized=!0}}class Jn extends $n{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Tt())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await Po(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==U&&o>=e||!s.length&&i)&&a.close()}})}}class Qn extends $n{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Wn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Kn,{get:()=>e})}writeUint8Array(){}}class to extends Jn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{K:t,X:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{X:r,K:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class eo extends Qn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let r,n=e.$;const o=e.$.length;for(e.$="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.$+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.$=n+e.$}getData(){return this.data+btoa(this.$)}}let ro,no;class oo extends Jn{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),no||(no=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();ro=1==e}catch{ro=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Qe(e.stream());if(ro)return Qe(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.J:r.J.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class ao extends $n{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Kn,{get:()=>r.writable}),e.contentType=t,e.et=tr(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class io extends oo{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function so(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class co extends ao{constructor(t){super(),Object.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return _n(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class uo extends Jn{constructor(t,e){super(),fo(this,t,e)}async init(){await wo(this,xo,Ao),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,ot:a}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{},i=a&&r>=o-a.length;if(n>0&&r<o&&!i)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Pn);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await xo(Gn,t,So(t,o,e));if(206!=r.status)throw new Error(Pn);const s=mo(r);if(s!==U&&s!=o)throw new Error(Pn);Eo(t,r),bo(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return po(this,t,e,xo,Ao)}}class lo extends Jn{constructor(t,e){super(),fo(this,t,e)}async init(){await wo(this,Oo,Ro),super.init()}readUint8Array(t,e){return po(this,t,e,Oo,Ro)}}function fo(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=Yn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function wo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Tt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==T||o)){const n=await e(Gn,t,So(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==qn))throw new Error(Pn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),bo(t,n);const a=ho(n);a===U?await Do(t,e,r):t.size=a,o&&o.length&&mo(n)===t.size-o.length&&(t.ot=o)}}else await Do(t,e,r)}async function po(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,ot:s,size:c,options:u}=t;if(a||i){if(e>=c||0===r)return N;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n(Gn,t,So(t,e,r));if(206!=o.status)throw new Error(Pn);const a=mo(o);if(a!==U&&a!=e)throw new Error(Pn);Eo(t,o),bo(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(Pn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function mo(t){const e=t.headers.get(Vn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function ho(t){const e=t.headers.get(Vn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function yo({headers:t}){return{it:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function bo(t,e){const{checkResourceChanges:r,st:n}=t;r&&!n&&206==e.status&&(t.st=yo(e))}function Eo(t,e){const{checkResourceChanges:r,st:n,size:o}=t;if(r){const t=ho(e);if(t!==U&&o!==U&&t!=o)throw new Error(Bn);if(n){const t=yo(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(Bn)}}}function So(t,e=0,r=1){return Object.assign({},go(t),{[Hn]:qn+"="+(e<0?e:e+"-"+(e+r-1))})}function go({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function Ao(t){await zo(t,xo)}async function Ro(t){await zo(t,Oo)}async function zo(t,e){const r=await e(Gn,t,go(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Do(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,go(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function xo(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(Pn):new Error(jn+(a.statusText||a.status))}function Oo(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(Pn):new Error(jn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Fo extends Jn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new lo(t,e):new uo(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 Uo extends Fo{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Io extends Jn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class To extends Qn{constructor(t){super(),this.ut=t||262144}init(t=0){Object.assign(this,{offset:0,ct:new Uint8Array(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<r;)t*=2;const n=e.ct;e.ct=new Uint8Array(t),e.ct.set(n)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ko extends Jn{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await Promise.all(t.lt.map(jo));t.wt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ht(t){const{wt:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{lt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await Po(s,i,e);else{const a=n-i;o=Bt(await Po(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.ft=Math.max(a,r.ft),o}}class Co extends $n{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===Xn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(Ln);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await _o(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,Kn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Xn)}finally{t.releaseLock()}}}class vo{constructor(t){return Array.isArray(t)&&(t=new ko(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Qe(t)}),t}}class Mo{constructor(t){t.writable===U&&typeof t.next==k&&(t=new Co(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:er(t)});try{t.size=t.size===U?0:t.size}catch{throw new Error(Zn)}return t}}function No(t){return Boolean(t&&t.getData)}async function _o(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function jo(t){return t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t)),t}function Po(t,e,r){return t.readUint8Array(e,r)}function Bo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Jn.prototype.createReadable.call(t,e):t.readable}function Lo(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==U&&(n.filename=r),t.push(n)}}const Wo="filename",Zo="rawFilename",Vo="comment",Ho="rawComment",Go="uncompressedSize",qo="compressedSize",Yo="offset",Ko="diskNumberStart",Xo="lastModDate",$o="rawLastModDate",Jo="lastAccessDate",Qo="rawLastAccessDate",ta="creationDate",ea="rawCreationDate",ra="internalFileAttributes",na="externalFileAttributes",oa="msdosAttributesRaw",aa="msdosAttributes",ia="msDosCompatible",sa="zip64",ca="encrypted",ua="version",la="versionMadeBy",fa="zipCrypto",da="directory",wa="executable",pa="compressionMethod",ma="signature",ha="extraField",ya="unixMode",ba="setuid",Ea="setgid",Sa="sticky",ga=[Wo,Zo,Go,qo,Xo,$o,Vo,Ho,Jo,Qo,ta,ea,Yo,Ko,ra,na,oa,aa,ia,sa,ca,ua,la,fa,da,wa,"symlink",pa,ma,"crc32",ha,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ya,"unixExternalUpper",ba,Ea,Sa,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Aa{constructor(t){ga.forEach(e=>this[e]=t[e])}}const Ra=new Set([1,m,10,h,28789,25461,y,b,E,22613,13]);function za(t,e,r){return t?e?12:16+4*r:0}const Da="File format is not recognized",xa="End of central directory not found",Oa="End of Zip64 central directory locator not found",Fa="Central directory header not found",Ua="Local file header not found",Ia="Zip64 extra field not found",Ta="File contains encrypted entry",ka="Encryption method not supported",Ca="Split zip file",va="Overlapping entry found",Ma="Entry data out of bounds",Na="Ambiguous archive",_a="Encrypted central directory is not supported",ja="Unsafe filename",Pa="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ba="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",La="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Wa="64-bit value exceeds Number.MAX_SAFE_INTEGER",Za="unsorted central directory",Va="unknown version needed to extract",Ha="compressed patched data",Ga="malformed extra field",qa="unknown zip64 extensible data",Ya="wrapped entries count",Ka="appended data",Xa="prepended data",$a="prepended central directory",Ja="trailing central directory data",Qa="duplicate filename",ti="mismatched zip64 end of central directory record",ei="multiple end of central directory records",ri="mismatched local file header (filename)",ni="mismatched local file header (general purpose bit flag)",oi="mismatched local file header (compression method)",ai="mismatched local file header (crc32 or sizes)",ii=/^[a-zA-Z]:/,si=/(^|[\\/])\.\.([\\/]|$)/,ci="utf-8",ui="cp437",li=[[Go,t],[qo,t],[Yo,t],[Ko,e]],fi={[e]:{yt:Ki,bytes:4},[t]:{yt:Xi,bytes:8}},di=BigInt(Number.MAX_SAFE_INTEGER);class wi{constructor(t,e={}){Object.assign(this,{reader:new vo(t),options:e,bt:{Et:new Set,St:[],gt:[]}})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await _o(i),i.size!==U&&i.readUint8Array||(i=new oo(await tr(i.readable)),await _o(i)),i.size<d)throw new Error(Da);const c=a.warnings=[],m=ki(n,a.options),h=m==rt,y=m!=ot,b=Mi(Zi(a,n,$),m),E=function(t,e){if(t===U)return e;if(!Ti(t))throw new Error(Ba);return t}(Zi(a,n,"filenameValidation"),m),S=Zi(a,n,"normalizeFilename"),{At:x,Rt:O}=await Ni(i,y,b);if(!x)throw await async function(t){return await Ii(t)==o}(i)?new Error(Ca):new Error(xa);y&&O>1&&Wi(ei);const F=Wt(x);let I=Ki(F,12),T=Ki(F,16);const k=x.offset,C=Yi(F,20),v=k+d+C,M=i.size-v;M>b&&Wi(Ka),M>0&&Lo(c,Ka);let _=Yi(F,4);const j=i.ft||0;let P,B,L,W,Z,V=Yi(F,6),H=Yi(F,10),G=0,q=p;const Y=T==t||I==t||H==e||V==e;if(T!=t&&V!=e&&(T+=Ui(i,V)),Y){const r=x.offset>=w?await Po(i,x.offset-w,w):N,n=Wt(r);if(r.length==w&&Ki(n,0)==l){T=Ui(i,Ki(n,4))+Xi(n,8);let r=await Po(i,T,p),o=Wt(r);const a=x.offset-w-p;if((r.length<p||Ki(o,0)!=u)&&T!=a&&a>=0){const t=T;T=a,T>t&&(G=T-t),r=await Po(i,T,p),o=Wt(r)}if(r.length<p||Ki(o,0)!=u)throw new Error(Oa);if(L=!0,W=Xi(o,4)>44,W){const t=Math.min(Xi(o,4)-44,i.size-T-p);t>0&&(q+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Yi(r,26);Object.assign(e,{compressionMethod:Yi(r,0),compressedSize:Xi(r,2),uncompressedSize:Xi(r,10),encryptionAlgorithm:Yi(r,18),bitLength:Yi(r,20),flags:Yi(r,22),hashAlgorithm:Yi(r,24),hashData:t.subarray(28,28+n)})}return e}(await Po(i,T+p,t)))}_==e?_=Ki(o,16):_!=Ki(o,16)&&Li(h,c,ti),V==e?V=Ki(o,20):V!=Ki(o,20)&&Li(h,c,ti),H==e?H=Xi(o,32):H!=Xi(o,32)&&Li(h,c,ti),I==t?I=Xi(o,40):I!=Xi(o,40)&&Li(h,c,ti),T=Ui(i,V)+Xi(o,48)+G}}let K=I;const X=x.offset-(L?q+w:0);if(T>=i.size&&(G=i.size-T-I-d,T=i.size-I-d),j!=_)throw new Error(Ca);if(T<0)throw new Error(Da);let J=0,Q=await Po(i,T,I),nt=Wt(Q);if(I){if(Q.length<4)throw new Error(Da);const t=X-I;if(T!=t&&V==_){const e=Ki(nt,J)==s||Boolean(Z&&Z.compressedSize)||yi(nt);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=Ki(Wt(await Po(i,t,4)),0)==s),r){const r=T;T=t,T>r&&(G+=T-r,P=e),Q=await Po(i,T,I),nt=Wt(Q)}}}const at=X-T;if(I!=at&&at>=0&&V==_&&(I=at,Q=await Po(i,T,I),nt=Wt(Q)),T<0||T>=i.size)throw new Error(Da);a.directoryOffset=T,a.directoryLength=K;const it=Vi(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&Q.length>=4&&Ki(nt,0)!=s&&(W||yi(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,Q.length);ct=Q.subarray(t),Q=await it(Q.subarray(0,t),Z),nt=Wt(Q),K=Q.length,st=!0}Z&&!st&&(Q.length<4||Ki(nt,0)==s)&&Lo(c,qa),B=T;const ut=Zi(a,n,"filenameEncoding"),lt=Zi(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!h&&!L;!H&&pt&&(H=bi(nt,Q,J),H&&Lo(c,Ya));for(let t=0;t<H;t++){const o=new hi(i,a.options);if(J+f>Q.length||Ki(nt,J)!=s){if(0==t&&!st&&(W||yi(nt)))throw new Error(_a);throw new Error(Fa)}Si(o,nt,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=Yi(nt,J+4),p=!(w>>8),m=w>>8==3,h=Yi(nt,J+32),y=d+h,b=new Uint8Array(Q.subarray(l,y)),x=b.subarray(0,o.filenameLength),O=b.subarray(o.filenameLength+o.extraFieldLength),F=u||!ut&&Nn(x),I=u||!lt&&Nn(O),T=Ki(nt,J+38),k=T&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Ki(nt,J+42),M=Vi(a,n,"decodeText")||Mn,N=F?ci:ut||ui,_=I?ci:lt||ui;let j=M(x,N,tt);if(j===U&&(j=Mn(x,N)),S){const t=S(j);t!==U&&(j=t)}if(vi(j,E)){const t=new Error(ja);throw t.filename=j,t}let P=M(O,_,et);P===U&&(P=Mn(O,_)),Object.assign(o,{index:t,zt:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:h,offset:v,diskNumberStart:Yi(nt,J+34),internalFileAttributes:Yi(nt,J+36),externalFileAttributes:T,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:x,filenameUTF8:F,commentUTF8:I,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:O,filename:j,comment:P}),gi(o,o,nt,J+6)&&Lo(c,Ga,j),o.offset+=G;const L=Ui(i,o.diskNumberStart)+o.offset;B=Math.min(L,B),L<wt&&Lo(c,Za,j),wt=L,(o.version&r)>63&&Lo(c,Va,j),32&~o.rawBitFlag||Lo(c,Ha,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),q=Boolean(o.unixMode&z),Y=Boolean(512&o.unixMode),K=40960==((o.unixMode===U?Z:o.unixMode)&g),X=!K&&(o.unixMode!==U?!!(73&o.unixMode):m&&!!(73&Z)),$=o.unixMode!==U&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:q,sticky:Y,symlink:K,unixExternalUpper:Z,executable:X,directory:$||rt||p&&C.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new Aa(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.bt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=tr(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.bt,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=bi(nt,Q,J);t&&(H+=t,Lo(c,Ya))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new Aa(o))}catch{}yield ot}let mt=J,ht=Ei(Q.subarray(J))||(st?Ei(ct):U);if(!ht&&!st){const t=T+J,e=Math.min(X-t,65541);e>=6&&(ht=Ei(await Po(i,t,e)))}ht&&(a.digitalSignature=ht,mt=J+6+ht.length),(J!=K&&mt!=K||!st&&J!=I&&mt!=I)&&Li(h,c,Ja),dt&&Li(h,c,Qa);const yt=Zi(a,n,"extractPrependedData"),bt=Zi(a,n,"extractAppendedData"),Et=(h||yt)&&H&&4==B&&await async function(t){const e=await Ii(t);return e==o||808471376==e}(i)?4:0;return h&&(G||H&&B>Et)&&Wi(Xa),(G||H&&B>4)&&Lo(c,Xa),P&&Lo(c,$a),yt&&(a.prependedData=B>Et?await Po(i,Et,B-Et):N),a.comment=C?await Po(i,k+d,C):N,bt&&(a.appendedData=v<i.size?await Po(i,v,i.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class pi{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new wi(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function mi(t,e={}){if(t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t)),t.size<d)return!1;const r=ki(e,{}),n=r!=ot,o=Mi(e[$],r),{At:a,Rt:i}=await Ni(t,n,o);if(!a||r==rt&&i>1)return!1;const s=Yi(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let hi=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const i=this,s=Tt(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:d,extraFieldZip64:w,compressionMethod:p,bitFlag:m,rawBitFlag:h,crc32:y,rawLastModDate:b,uncompressedSize:E,compressedSize:S}=i,{dataDescriptor:g}=m,A=e.localDirectory={},R=e.warnings=[],z=Ui(c,f)+l,D=await Po(c,z,x),O=Wt(D);let F=Zi(i,a,j),I=Zi(i,a,P);const T=mt(Zi(i,a,B)),k=Boolean(T),C=!0===T;if(pt(F,I),F=F&&F.length?F:U,I=I&&I.length?I:U,d&&99!=d.originalCompressionMethod)throw new Error(ar);if(D.length<x||Ki(O,0)!=n)throw new Error(Ua);Si(A,O,4);const{extraFieldLength:v,filenameLength:M}=A,_=A.dataOffset=z+x+M+v,G=Zi(i,a,"checkLocalDirectory"),q=ki(a,i.options),Y=function(t,e){return t===U?e!=ot:Boolean(t)}(G,q),K=Zi(i,a,"checkLocalFilename"),X=function(t,e){return t===U?e==rt:Boolean(t)}(K===U?G:K,q);let $=N;if(X&&(M||v)){const t=await Po(c,z+x,M+v);$=t.subarray(0,M),A.rawExtraField=t.subarray(M)}else A.rawExtraField=v?await Po(c,z+x+M,v):N;X&&(A.rawFilename=$),gi(i,A,O,4,!0)&&Lo(R,Ga),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.zt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Li(i,o,ri),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Li(i,o,ni),e.compressionMethod!=t.compressionMethod&&Li(i,o,oi),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Li(i,o,ai)}(i,A,$,X,Y?U:R);const{lastAccessDate:J,creationDate:Q,uid:tt,gid:et}=A;J&&(e.lastAccessDate=J),Q&&(e.creationDate=Q),tt!==U&&e.uid===U&&(e.uid=tt),et!==U&&e.gid===U&&(e.gid=et);const nt=Zi(i,a,"checkPasswordOnly"),at=i.encrypted&&(!C||nt),it=at&&!d;if(C||(e.zipCrypto=it),at&&!(64&~i.rawBitFlag))throw new Error(ka);const st=k?U:fr(p);if(0!=p&&8!=p&&9!=p&&!st&&!k)throw new Error(ar);if(at){if(!it&&(d.strength<1||d.strength>3))throw new Error(ka);if(!F&&!I)throw new Error(Ta)}if(_+S>c.size)throw new Error(Ma);const ct=S,ut=dt(Zi(i,a,L));wt(ut);let lt=Zi(i,a,"checkOverlappingEntry");const ft=Zi(i,a,"checkOverlappingEntryOnly");ft&&(lt=!0);const{onstart:ht,onprogress:yt,onend:bt}=a,Et=0!=p&&!k,St=k?S-za(at,it,d&&d.strength):E,gt=9==p;let At=Zi(i,a,Z);gt&&(At=!1);const Rt=Zi(i,a,"checkCrc32"),zt=(Rt===U?Zi(i,a,"checkSignature"):Rt)&&!k&&(!at||it||d&&1==d.vendorVersion),Dt={options:{codecType:Vr,password:F,rawPassword:I,zipCrypto:it,encryptionStrength:d&&d.strength,checkCrc32:zt,checkAuthenticationCode:Zi(i,a,"checkAuthenticationCode"),passwordVerification:it&&(g?b>>>8&r:y>>>24&r),outputSize:St,crc32:y,compressed:Et,encrypted:at,useWebWorkers:Zi(i,a,W),useCompressionStream:At,transferStreams:Zi(i,a,V),deflate64:gt,format:st?st.format:U,codecURI:st?st.codecURI:U,compressionMethod:p,rawBitFlag:h,checkPasswordOnly:nt},config:s,O:{signal:ut,size:ct,onstart:ht,onprogress:yt,onend:bt}};let xt,Ot,Ft;lt&&await async function({reader:t,xt:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:i,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,bt:l}){let f=0;if(c){const r=Boolean(u),n=Wt(await Po(t,s+a,24)),c=e.encrypted&&!e.zipCrypto;let l;for(const[t,e]of[[r,!0],[r,!1],[!r,!0],[!r,!1]]){const r=Oi(n,t,e);if(r&&(c||r.crc32==o)&&r.compressedSize==a&&r.uncompressedSize==i){l=r;break}}l||(l=Oi(n,r,!1)),l?(e.localDirectory.dataDescriptor=l,f=Fi(l.zip64,l.signature)):f=Fi(r,!1)}const d={start:n,end:s+a+f,xt:e},{Et:w,St:p,gt:m}=l;if(!w.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],a=t[r];return o&&xi(e,o)?o:a&&xi(e,a)?a:void 0}(p,d)||m.find(t=>xi(d,t));if(t){const e=new Error(va);throw e.overlappingEntry=t.xt,e}w.add(r),m.push(d),m.length*m.length>p.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(p,m),m.length=0)}}({reader:c,xt:e,index:u,offset:z,crc32:y,compressedSize:S,uncompressedSize:E,dataOffset:_,dataDescriptor:g||A.bitFlag.dataDescriptor,extraFieldZip64:w||A.extraFieldZip64,bt:o});try{if(!ft){nt&&(t=new WritableStream),t=new Mo(t),await _o(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(St,S,Et)),({writable:xt}=t);const e=Qe(c.createReadable({offset:_,size:ct})),{outputSize:r}=await xn({readable:e,writable:xt},Dt);if(wt(ut),r!=St)throw Object.assign(new Error(mr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=Dt;if(r!==U?t.size+=r:Zt(e)&&e.outputSize!==U&&(t.size+=e.outputSize),!nt||!Zt(e)||e.message!=ge)throw Ot=e,Ft=!0,e}finally{if((No(t)||!Zi(i,a,H))&&xt&&!xt.locked){const t=xt.getWriter();if(Ft)try{await t.abort(Ot)}catch{}else await t.close()}}return nt||ft?U:t.getData?t.getData():xt}};function yi(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Ki(t,r))return!0;return!1}function bi(t,e,r){let n=0;for(;r+f<=e.length&&Ki(t,r)==s;)r+=f+Yi(t,r+28)+Yi(t,r+30)+Yi(t,r+32),n++;return n%65536?0:n}function Ei(t){if(t.length>=6){const e=Wt(t);if(Ki(e,0)==i){const r=Yi(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function Si(t,e,r){const n=t.rawBitFlag=Yi(e,r+2),o=!(1&~n),a=Ki(e,r+6);Object.assign(t,{encrypted:o,version:Yi(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:Hi(a),filenameLength:Yi(e,r+22),extraFieldLength:Yi(e,r+24)})}function gi(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Wt(a);let c=0,u=!1;try{for(;c<a.length;){const t=Yi(s,c),e=Yi(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=Yi(r,n+4);Object.assign(e,{signature:Ki(r,n+10),crc32:Ki(r,n+10),compressedSize:Ki(r,n+14),uncompressedSize:Ki(r,n+18)});const f=i.get(1);if(f)(function(t,e,r){e.zip64=!0;const n=Wt(t.data),o=li.filter(([t,r])=>e[t]==r),a=o.reduce((t,[,e])=>t+fi[e].bytes,0);if(t.data.length<a){if(r)return!1;throw new Error(Ia)}const i=[];try{for(let t=0,e=0;t<o.length;t++){const[,r]=o[t],a=fi[r];i.push(a.yt(n,e)),e+=a.bytes}}catch(t){if(r)return!1;throw t}return o.forEach(([r],n)=>{e[r]=t[r]=i[n]}),!0})(f,e,o)||(u=!0),e.extraFieldZip64=f;else if(li.some(([t,r])=>e[t]==r)){if(!o)throw new Error(Ia);u=!0}const d=i.get(28789);d&&(Ai(d,Wo,Zo,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(Ai(w,Vo,Ho,e,t),e.extraFieldUnicodeComment=w);const p=i.get(m);p&&(99==l||e.encrypted)&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=qi(n,4);Object.assign(t,{vendorVersion:qi(n,0),vendorId:qi(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Yi(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(p,e,l),e.extraFieldAES=p):(p&&(u=!0),e.compressionMethod=l);const S=i.get(13);S&&(Ri(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(Ri(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=Yi(r,o),a=Yi(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Gi(o),lastAccessDate:Gi(a),creationDate:Gi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let z;if(R&&(z=zi(R,e,!1),e.extraFieldUnix=R),!z){const t=i.get(b);t&&(zi(t,e,!0),e.extraFieldInfoZip=t)}const D=i.get(h);D&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=qi(n,0),a=[],i=[];r?(1&~o||(a.push(Xo),i.push($o)),2&~o||(a.push(Jo),i.push(Qo)),4&~o||(a.push(ta),i.push(ea))):t.data.length>=5&&(a.push(Xo),i.push($o));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=Ki(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const x=i.get(y);return x&&(e.extraFieldUSDZ=x),u}function Ai(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new Qt;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=Ki(a,1),u=qi(a,0);Object.assign(t,{version:u,[e]:Mn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Ki(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ri(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Ki(r,0))),lastModDate:new Date(1e3*(0|Ki(r,4)))};t.data.length>=12&&(n.uid=Yi(r,8),n.gid=Yi(r,10)),Object.assign(t,n),Object.assign(e,n)}function zi(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=qi(n,e++),i=qi(n,e++);o=Di(t.data.subarray(e,e+i)),e+=i;const s=qi(n,e++);a=Di(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=Yi(n,0),a=Yi(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function Di(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function xi(t,e){return t.start<e.end&&e.start<t.end}function Oi(t,e,r){const n=r?4:0;if(t.byteLength<Fi(e,r)||r&&Ki(t,0)!=a)return U;const o=Ki(t,n);let i,s;try{e?(i=Xi(t,n+4),s=Xi(t,n+12)):(i=Ki(t,n+4),s=Ki(t,n+8))}catch{return U}return{signature:r,zip64:e,crc32:o,compressedSize:i,uncompressedSize:s}}function Fi(t,e){return(t?20:12)+(e?4:0)}function Ui(t,e){return t.ht?t.ht(e):0}async function Ii(t){return Ki(Wt(await Po(t,0,4)))}function Ti(t){return t===rt||t===nt||t===ot}function ki(t,e){return Ci(t,Ci(e,nt))}function Ci(t,e){const r=t.strictness;if(r!==U){if(!Ti(r))throw new Error(Pa);return r}const n=t.checkAmbiguity;return n===U?e:n?rt:e==ot?ot:nt}function vi(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(si.test(t)||t.startsWith("/")||t.startsWith("\\")||ii.test(t))||e==rt&&(r.includes(".")||r.includes("")||t.includes("\0"))}function Mi(t,r){if(t!==U){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(La);return e}return r==rt?0:r==ot?1/0:e}async function Ni(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={Ot:64};let i,s,c=0;for await(const[r,u,l,f,w]of _i(t,o)){const o=Yi(r,f+20);if(w+d+o==n){const o=await Pi(t,r,u,f,w,n,a);if(2==o){if(i||(i=ji(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=ji(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of _i(t,o)){const o=ji(c,u,l);a||(a=o);const f=await Pi(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{At:i,Rt:c}}async function*_i(t,e){const r=t.size-e,n=await Po(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Ki(o,t)==c&&(yield[o,r,n,t,r+t])}function ji(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function Pi(r,n,o,a,i,c,u){const f=Yi(n,a+10),d=Ki(n,a+12),p=Ki(n,a+16);if(f==e||d==t||p==t)return await Bi(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const m=Yi(n,a+6);for(const t of[i-d,Ui(r,m)+p])if(await Bi(r,n,o,t,c,u)==s)return 2;return 0}async function Bi(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?Ki(e,n-r):a.Ot>0?(a.Ot--,Ki(Wt(await Po(t,n,4)),0)):U}function Li(t,e,r){t?Wi(r):Lo(e,r)}function Wi(t){const e=new Error(Na);throw e.reason=t,e}function Zi(t,e,r){return e[r]===U?t.options[r]:e[r]}function Vi(t,e,r){return ft(Zi(t,e,r))}function Hi(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<F?F:o}function Gi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function qi(t,e){return t.getUint8(e)}function Yi(t,e){return t.getUint16(e,!0)}function Ki(t,e){return t.getUint32(e,!0)}function Xi(t,e){const r=t.getBigUint64(e,!0);if(r>di)throw new Error(Wa);return Number(r)}var $i=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Na,ERR_BAD_FORMAT:Da,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Fa,ERR_CODEC_OUT_OF_MEMORY:yr,ERR_ENCRYPTED:Ta,ERR_ENCRYPTED_CENTRAL_DIRECTORY:_a,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Ma,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Oa,ERR_EOCDR_NOT_FOUND:xa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ia,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:br,ERR_INVALID_FILENAME_VALIDATION:Ba,ERR_INVALID_MAX_APPENDED_DATA_SIZE:La,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:Pa,ERR_INVALID_UNCOMPRESSED_SIZE:mr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ua,ERR_OVERLAPPING_ENTRY:va,ERR_SPLIT_ZIP_FILE:Ca,ERR_UNSAFE_FILENAME:ja,ERR_UNSUPPORTED_COMPRESSION:ar,ERR_UNSUPPORTED_ENCRYPTION:ka,ERR_UNSUPPORTED_UINT64:Wa,ERR_WORKER_STARTUP_TIMEOUT:qr,WARNING_APPENDED_DATA:Ka,WARNING_COMPRESSED_PATCHED_DATA:Ha,WARNING_DUPLICATE_FILENAME:Qa,WARNING_MALFORMED_EXTRA_FIELD:Ga,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ni,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:oi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ai,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ri,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ti,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:ei,WARNING_PREPENDED_CENTRAL_DIRECTORY:$a,WARNING_PREPENDED_DATA:Xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ja,WARNING_UNKNOWN_VERSION:Va,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:qa,WARNING_UNSORTED_CENTRAL_DIRECTORY:Za,WARNING_WRAPPED_ENTRIES_COUNT:Ya,ZipReader:wi,ZipReaderStream:pi,isZipFile:mi});const Ji="File already exists",Qi="Zip file comment exceeds 64KB",ts="Invalid zip file comment (must be a Uint8Array)",es="File entry comment exceeds 64KB",rs="Invalid file entry comment (must be a string)",ns="Invalid date (must be a valid Date instance)",os="File entry name exceeds 64KB",as="Version exceeds 65535",is="The strength must equal 1, 2, or 3",ss="Encryption is not supported in USDZ files",cs="Split zip files are not supported in USDZ files",us="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",ls="Invalid extra field (must be a Map)",fs="Invalid extra field type (must be integer 0..65535)",ds="Invalid extra field data (must be a Uint8Array)",ws="Extra field data exceeds 64KB",ps=-2147483648,ms=2147483647,hs=BigInt(0),ys=BigInt("0x7fffffffffffffff"),bs="Zip64 is not supported (set the 'zip64' option to 'true')",Es="Undefined uncompressed size",Ss="Undefined compression method",gs="Undefined CRC32",As="Undetermined size",Rs="Undefined reader",zs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",Ds="Zip file not empty",xs="Invalid uid (must be integer 0..2^32-1)",Os="Invalid gid (must be integer 0..2^32-1)",Fs="Invalid UNIX mode (must be integer 0..65535)",Us="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Is="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ts="Invalid msdosAttributesRaw (must be integer 0..255)",ks="Invalid msdosAttributes (must be an object with boolean flags)",Cs="Invalid level (must be integer 0..9)",vs="Signature data exceeds 64KB",Ms="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ns="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",_s="compression unavailable",js="clamped last modification date",Ps=new Uint8Array([7,0,2,0,65,69,3,0,0]),Bs="infozip",Ls="unix",Ws=[8,9,5,3];let Zs=0;const Vs=[];class Hs{constructor(t,e={}){t=new Mo(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[X])throw new Error(cs);Object.assign(this,{writer:t,Ft:o,options:e,Ut:new Map,It:new Set,offset:e[K]===U?t.size||t.writable.size||0:e[K],Tt:e[K]===U?0:e[K]-(t.size||t.writable.size||0),kt:new Set,Ct:[],warnings:[],vt:0,Mt:0,Nt:U,_t:!1})}prependZip(t){return Ks(this,async function(t,e){if(t.It.size)throw new Error(Ds);await t.jt(e)}(this,t))}appendZip(t){return Ks(this,this.jt(t))}async jt(t){const e=this,{kt:r,It:n,Ut:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t));const{ZipReader:r}=await Promise.resolve().then(function(){return $i}),i=new r(t),s=await i.getEntries();await i.close(),await _o(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Ji);n.add(t),c.push(t)}),e.Pt=!0;const{Bt:f}=e;e.Bt=new Promise(t=>u=()=>{e.Pt=!1,t()}),await f,e.Ft&&(delete e.Ft,await async function(t){return Wt(await Po(t,0,4)).getUint32(0,!0)==o}(t)||(await Sc(e.writer,bc()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>yc(e,t)-yc(e,r));let s=0;for(const r of i){const n=yc(e,r);await mc(t,e,s,n-s),dc(o,await hc(e,n))&&await o.closeDisk(),a.set(r,{offset:wc(t,o),diskNumberStart:lc(o)}),s=n}await mc(t,e,s,n-s)}else{const o=t.offset;await mc(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+yc(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=o;f=pc(f||N),t.extraFieldAES&&(l=99);const h=Nc(f),y=Boolean(u)&&u.uncompressedSize!==U,b=Boolean(u)&&u.compressedSize!==U,E=-7&Pc(w,p,m,i,l)|w<<1,{Lt:S,Wt:g}=_c({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Zt:b,Vt:y,extraFieldLength:h}),{crc32:A}=t;A!==U&&Cc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{Ht:!0,Vt:y,Zt:b,offset:R,diskNumberStart:z,Gt:!1,qt:N,Yt:N,Kt:N,Xt:N,$t:N,rawExtraField:f,Jt:N,Lt:S,Wt:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{kt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[Q];if(i!==U){const{Qt:t,te:r}=Js(i,mt(Dc(e,a,B)),Dc(e,a,Xo));delete a[Q],a=Object.assign(t,r,a)}if(Dc(e,a,da)&&!n.endsWith(D)&&(n+=D),e.It.has(n))throw new Error(Ji);e.It.add(n),Zs<Tt().maxWorkers?Zs++:await new Promise(t=>Vs.push(t));try{return await async function(e,n,o,a){const i=Qs(e,n,a);({name:n}=i);const s=tc(e,n,a),{comment:c}=s,u=a[ha];e.Ut.set(n,U);const l=e.Nt,f={};let d,w;s.ee.keepOrder&&(f.re=new Promise(t=>d=t)),e.Nt=f;try{const{ee:c}=s;0==c.level||c.compressionMethod!==U||c.ne||await Jr(Tt())||(c.level=0,Lo(e.warnings,_s,n));const u=await async function(t,e,{ee:r},n){if(r.ne&&!e&&!Dc(t,n,da))throw new Error(Rs);let o;if(e){if(e=new vo(e),await _o(e),!e.readable&&!e.readUint8Array)throw new Error(zs);({size:o}=e)}return Object.assign({reader:e},rc(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=fc(e.writer),m=lc(e.writer);let h=a.crc32===U?a[ma]:a.crc32;const y=u.ee.encrypted&&!c.zipCrypto;if(c.ne&&!c.oe&&y&&(h=U),c.ne&&o&&!y&&h===U)throw new Error(gs);const b=oc(a=Object.assign({},a,i.ee,s.ee,u.ee,{signature:a[ma],crc32:h,offset:e.offset-p,diskNumberStart:m,[X]:e.options[X]}));b.ae&&Lo(e.warnings,js,n);const E=sc(a),S=Nc(b.ie,E.se);w=await async function(e,n,o,a,i){const{Ut:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ce:f,signal:d}=i,{ue:w,xt:p,le:m,fe:h}=a,y=e.options[X];let b,E,S,g,A,R,z,D=p,O=0;const F=u&&m?m.re:U;s.set(n,D);try{i.bufferedWrite||!u||e.Pt||e.vt||e.Mt||!l&&!f?(b=!0,e.vt++,z=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:I}),z.size=0,await _o(c)):(E=!0,e.Mt++,z=c,await F,await T()),await _o(z);const p=fc(c);e.Ft&&!b&&await Ec(e,c),y&&!b&&ac(a,e.offset-p);const{ie:m}=w;b||await k();const h=lc(c),S=wc(e,c);if(D.diskNumberStart=h,b||(A=!0,R=c.size,await Sc(z,m)),D=await async function(e,n,{diskNumberStart:o,re:a},i,s,c){const{ue:u,de:l,we:f}=i,{Lt:d,Wt:w,lastModDate:p,rawLastModDate:m,encrypted:h,compressed:y,version:b,compressionMethod:E,qt:S,pe:g,Kt:A,me:R,he:z,Xt:D,$t:x,Yt:O}=u,{se:F}=l,{rawFilename:I,lastAccessDate:T,creationDate:k,password:C,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Ht:j,Vt:P,Zt:B,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:q,Jt:Y,useWebWorkers:K,transferStreams:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht,useCompressionStream:yt,ne:bt,oe:Et,format:St,codecURI:gt}=c,At={re:a,versionMadeBy:H,zip64:_,Ht:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:I,commentUTF8:Boolean(N),rawComment:G,qt:S,pe:g,Kt:A,Xt:D,$t:x,Yt:O,rawExtraField:q,Jt:Y,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht};let{crc32:Rt,uncompressedSize:zt}=c,Dt=0;bt||(zt=0);const{writable:xt}=n;if(e){const o=e.size,a=Qe(Bo(e,{size:o})),i={options:{codecType:Zr,inputSize:o,level:M,rawPassword:v,password:C,encryptionStrength:et,zipCrypto:h&&L,passwordVerification:h&&L&&m>>8&r,computeCrc32:!bt,compressed:y&&!bt,encrypted:h&&!Et,useWebWorkers:K,useCompressionStream:yt,transferStreams:X,format:St,codecURI:gt,compressionMethod:E},config:s,O:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await xn({readable:a,writable:xt},i);if(Dt=e.outputSize,n.size+=Dt,wt(tt),bt||(zt=e.inputSize,h&&!L||(Rt=e.crc32)),!B&&Dt>=t||!P&&zt>=t)throw new Error(bs)}catch(t){const{outputSize:e}=i;throw e!==U?n.size+=e:Zt(t)&&t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,ue:n,de:o},{zip64:a,zipCrypto:i,ne:s,dataDescriptor:c}){const{Wt:u,encrypted:l}=n,{ye:f,be:d}=o;l&&!i&&!s||t===U||(Cc(u,10,t),c&&Cc(f,d,t)),a?c&&(vc(f,d+4,BigInt(e)),vc(f,d+12,BigInt(r))):(Cc(u,14,e),Cc(u,18,r),c&&(Cc(f,d+4,e),Cc(f,d+8,r)))}({crc32:Rt,compressedSize:Dt,uncompressedSize:zt,ue:u,de:l},c),W&&await Sc(n,F),Object.assign(At,{uncompressedSize:zt,compressedSize:Dt,lastModDate:p,rawLastModDate:m,creationDate:k,lastAccessDate:T,encrypted:Boolean(h),zipCrypto:Boolean(L),size:f+Dt,compressionMethod:E,version:b,Lt:d,Wt:w,signature:Rt,crc32:!h||L||bt?Rt:U,me:R,he:z,Vt:P,Zt:B}),At}(o,z,D,a,Tt(),i),b||(A=!1),s.set(n,D),D.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),F]),await T(),e.Ft&&await Ec(e,c),g=!0,R=c.size,await k(),D.diskNumberStart=lc(c),D.offset=wc(e,c),y){const t=a.we;ac(a,e.offset-fc(c)),D.size+=a.we-t}!function({rawFilename:t,encrypted:e,zip64:r,pe:n,crc32:o,compressedSize:a,uncompressedSize:i,Vt:s,Zt:c},u,{dataDescriptor:l,ne:f}){if(l||((!e||f&&o!==U)&&Cc(u,14,o),c||Cc(u,18,a),s||Cc(u,22,i)),r&&n){const e=x+Nc(t)+4;vc(u,e,BigInt(i)),vc(u,e+8,BigInt(a))}}(D,w.Ee,i),await Sc(c,w.ie),await gc(z.readable,c,d,t=>O+=t),c.size+=z.size,g=!1}else D.diskNumberStart=h,D.offset=S;return e.offset+=D.size,D}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=O)}throw s.delete(n),t}finally{if(b&&e.vt--,E&&e.Mt--,h&&h(F),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function T(){e.Pt=!0;const{Bt:t}=e;e.Bt=new Promise(t=>S=()=>{e.Pt=!1,t()}),await t}async function k(){dc(c,Nc(w.ie))&&await c.closeDisk()}}(e,n,o,{ue:b,de:E,we:S,xt:f,le:l,fe:d},a)}catch(t){throw e.Ut.delete(n),t}finally{d&&d(l&&l.re)}return Object.assign(w,{name:n,comment:c,extraField:u}),new Aa(w)}(e,n,o,a)}catch(t){throw e.It.delete(n),t}finally{const t=Vs.shift();t?t():Zs--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),Ks(a,s)}remove(t){const{It:e,Ut:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{kt:a,writer:w}=this,{writable:p}=w;if(o._t)return Ys(w);if(!(r instanceof Uint8Array))throw new Error(ts);if(Nc(r)>e)throw new Error(Qi);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Ct.map(t=>t.Se));const m=o.Ct.filter(t=>t.ge&&!t.Ae);if(m.length){const t=m.map(t=>t.error);m.forEach(t=>t.Ae=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Re:a,ze:w}=cc(r.Ut),{De:p,xe:m,Oe:h}=await async function(r,n,o){const{Ut:a,writer:i}=r,c=new Uint8Array(n);await _o(i);let u=0,l=0,d=lc(i),w=fc(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:m,rawFilename:h,qt:y,Yt:b,Kt:E,Xt:S,$t:g,rawExtraField:A,Jt:R,rawComment:z,versionMadeBy:D,Lt:x,Wt:O,Vt:F,Zt:U,Gt:I,Fe:T,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Nc(y,b,E,S,g,A,R),j=f+Nc(h,z)+_;dc(i,u+j-l)&&(await Sc(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=lc(i),w=fc(i)),F||Cc(O,18,M),U||Cc(O,14,N),(T||I)&&n.version<45&&kc(O,0,45);const P=uc(j);if(P.Ue(s),P.Ie(D),P.Te(x.subarray(0,24)),P.Ie(_),P.Ie(Nc(z)),P.Ie(I?e:v),P.Ie(k),P.Ue(C),P.Ue(T?t:m),P.Te(h),P.Te(y),P.Te(b),P.Te(E),P.Te(S),P.Te(g),P.Te(A),P.Te(R),P.Te(z),Mc(c,P.ct,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new Aa(n))}catch{}}return await Sc(i,l?c.slice(l):c),{De:{diskNumber:d,diskOffset:w},xe:{diskNumber:lc(i),ke:p},Oe:c}}(r,a,o),y=await async function(t,r,n){const o=Oc(t,n,J);if(o){const n=await o(r),a=Nc(n);if(a>e)throw new Error(vs);const s=uc(6+a);s.Ue(i),s.Ie(a),s.Te(n);const{writer:c}=t;return dc(c,Nc(s.ct))&&await c.closeDisk(),await Sc(c,s.ct),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{De:s,xe:f,Ce:w,ze:p}=a;let{Re:m}=a,h=r.Ut.size,y=s.diskNumber,b=wc(r,s);const E=Nc(n);if(E>e)throw new Error(Qi);let S=Dc(r,o,sa),g=lc(i);if(dc(i,(S?98:d)+E)&&g++,b>=t||m>=t||h>=e||g>=e){if(!1===S)throw new Error(bs);S=!0}else S===U&&p&&(S=!0);const A=uc(S?98:d);dc(i,Nc(A.ct)+E)&&await i.closeDisk(),g=lc(i);let R=g==f.diskNumber?f.ke:0;S&&(A.Ue(u),A.ve(44),A.Ie(45),A.Ie(45),A.Ue(g),A.Ue(y),A.ve(R),A.ve(h),A.ve(m),A.ve(b),A.Ue(l),A.Ue(g),A.ve(BigInt(wc(r,i))+BigInt(m)+BigInt(w)),A.Ue(g+1),Dc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,h=e,b=t,m=t),A.Ue(c),A.Ie(g),A.Ie(y),A.Ie(R),A.Ie(h),A.Ue(m),A.Ue(b),A.Ie(E),await Sc(i,A.ct),E&&await Sc(i,n)}(r,n,o,{De:p,xe:m,Re:a,Ce:y,ze:w})}(o,r,n),o._t=!0,!No(w)&&Dc(o,n,H)||await p.getWriter().close(),Ys(w)}[_](){return this.close()}}class Gs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Hs(r,t),this.kt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Xs(e,t)}}()}});return $s(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return $s(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.kt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Xs(r,t),t}try{return await r.close(t,e)}catch(t){throw await Xs(r,t),t}}}class qs extends Promise{then(t,e){const{Me:r}=this;return r&&(r.Ae=!0),super.then(t,e)}}function Ys(t){return t.getData?t.getData():t.writable}function Ks(t,e){const r=new qs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Me=n,n.Se=Promise.prototype.then.call(r,U,t=>Object.assign(n,{ge:!0,error:t})),t.Ct.push(n),r}async function Xs(t,e){try{await t.writer.writable.abort(e)}catch{}}function $s(t,e,r){t.kt.add(e),e.catch(t=>{try{r(t)}catch{}})}function Js(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(Ms);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:m,extraFieldAES:h,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[q]=!0);const D=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Ra.has(r)||e.set(r,t.data)}),e.size)return e}}(E);D&&(z[ha]=D),A===U&&R===U||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?Ls:Bs});const x={};if(e&&!g)if(Object.assign(x,{uncompressedSize:f,crc32:p,compressionMethod:m}),e!==at&&Object.assign(x,{encrypted:d,zipCrypto:w,encryptionStrength:h?h.strength:U}),S&&(x.dataDescriptor=S.dataDescriptor,x[G]=Ws[S.level]),n===U)x.rawLastModDate=c;else if(e!==at&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<F?e=F:e>O&&(e=O),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Ns);return{Qt:z,te:x}}function Qs(n,o,a){let i=Dc(n,a,ia),s=Dc(n,a,la,i?20:768);const c=Dc(n,a,wa),u=Fc(n,a,"uid"),l=Fc(n,a,"gid");let f=Fc(n,a,ya),d=Dc(n,a,"unixExtraFieldType"),w=Dc(n,a,ba),p=Dc(n,a,Ea),m=Dc(n,a,Sa);if(yt(u,t,xs),yt(l,t,Os),yt(f,e,Fs),d!==U&&d!==Bs&&d!==Ls)throw new Error(Us);if(d===Ls&&(u!==U&&u>e||l!==U&&l>e))throw new Error(Is);d!==U||u===U&&l===U||(d=Bs);let h=Fc(n,a,oa),y=Dc(n,a,aa);const b=h!==U||y!==U;if(u!==U||l!==U||f!==U||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),yt(h,r,Ts),y&&(typeof y!==C||Array.isArray(y)))throw new Error(ks);if(s>e)throw new Error(as);let E=Dc(n,a,na);const S=E!==U;S||(E=0),!a[da]&&o.endsWith(D)&&(a[da]=!0);const x=Dc(n,a,da);if(x?(o.endsWith(D)||(o+=D),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==U||Boolean(w||p||m);f=f===U?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),m?f|=512:m=Boolean(512&f),S&&!t||(x?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:h,msdosAttributes:y}=function(t,e){if(t!==U)t&=r;else if(e!==U){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===U&&(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,y)),b&&(E=E&t|h&r);const O=E>>16&e,F=f!==U&&40960==(f&g);return{name:o,ee:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:O,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:F,setuid:w,setgid:p,sticky:m,msdosAttributesRaw:h,msdosAttributes:y}}}function tc(t,r,n){const o=Oc(t,n,"encodeText")||ee;let a=o(r,tt);if(a===U&&(a=ee(r)),Nc(a)>e)throw new Error(os);const i=n[Vo]||"";if(typeof i!=v)throw new Error(rs);let s=o(i,et);if(s===U&&(s=ee(i)),Nc(s)>e)throw new Error(es);const c=Dc(t,n,ua);if(c!==U&&c>e)throw new Error(as);const u=xc(t,n,Xo,new Date),l=Dc(t,n,$o),f=xc(t,n,Jo),d=xc(t,n,ta),w=Dc(t,n,ra,0),p=mt(Dc(t,n,B)),m=Boolean(p),h=!0===p;let y=Dc(t,n,j),b=Dc(t,n,P);pt(y,b),y=y&&y.length?y:U,b=b&&b.length?b:U;const E=Fc(t,n,"encryptionStrength",3),S=Dc(t,n,fa),g=Dc(t,n,"extendedTimestamp",!0),A=Dc(t,n,"ntfsTimestamp"),R=Dc(t,n,"keepOrder",!0),z=Dc(t,n,W),D=Dc(t,n,V),x=Dc(t,n,"bufferedWrite"),O=Oc(t,n,"createTempStream"),F=Dc(t,n,"dataDescriptorSignature",!0),I=dt(Dc(t,n,L));wt(I);const T=Dc(t,n,q,!jc(a)||!jc(s)),k=Dc(t,n,pa),C=m||k===U?U:fr(k);if(!m&&k!==U&&0!==k&&8!==k&&!C)throw new Error(ar);let M=Fc(t,n,G);if(yt(M,9,Cs),t.options[X]){if(y!==U||b!==U)throw new Error(ss);M===U&&k===U&&(M=0)}m&&(M=bt(n[G]));let N=Dc(t,n,Z),_=Dc(t,n,Y);x&&_===U&&(_=!1),(_===U||S&&!h)&&(_=!0),M!==U&&6!=M&&(N=!1);const H=Dc(t,n,sa);if(!(S||y===U&&b===U||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(is);const K=ec(n[ha]),$=ec(n.localExtraField),J=ec(n.centralExtraField);return{comment:i,ee:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,ne:m,oe:h,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:D,bufferedWrite:x,createTempStream:O,dataDescriptorSignature:F,signal:I,useUnicodeFileNames:T,compressionMethod:k,format:C?C.format:U,codecURI:C?C.codecURI:U,Ne:C?C.versionNeeded:U,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:K,_e:$,Jt:J}}}function ec(t){if(!t)return N;if(!(t instanceof Map))throw new Error(ls);let r=0,n=0;t.forEach((t,n)=>{if(ht(n,e,fs),!(t instanceof Uint8Array))throw new Error(ds);if(Nc(t)>e)throw new Error(ws);r+=4+Nc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{kc(a,n,e),kc(a,n+2,Nc(t)),Mc(o,t,n+4),n+=4+Nc(t)}),o}function rc(e,r,n,o,a){const{ne:i,oe:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:m}=o,h=0,y=0,b=!1;if(i&&r){if(y=a[Go],y===U)throw new Error(Es);if(m===U)throw new Error(Ss)}const E=!0===w,S=Dc(e,a,ca);if(r&&s&&!S&&Nc(u,l))throw new Error(us);const g=r&&(Boolean(u&&Nc(u)||l&&Nc(l))||s&&S);r||(p=0,m=0);const A=za(g,c,f);r&&(i?(a.uncompressedSize=y,h=n===U?Uc(y)+A:n+(s?0:A)):n===U?(d=!0,(w||w===U)&&(w=b=!0,h=4294967296)):(a.uncompressedSize=y=n,h=(Ic(m,p)?Uc(y):y)+A));const R=!(g||r&&(0!==n||i)||Ic(m,p));R&&Dc(e,a,Y)===U&&(d=!1);const z=E||b||y>=t,D=E||h>=t;if(z||D){if(!1===w)throw new Error(bs);w=!0}return w=w||!1,{je:h,ee:{dataDescriptor:d,ce:R,zip64:w,Ht:E,Pe:b,Vt:z,Zt:D,uncompressedSize:y,level:p,compressionMethod:m,encrypted:g}}}function nc(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function oc(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,_e:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,ne:R,encrypted:z,Vt:D,Zt:I,uncompressedSize:T,Pe:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&Ic(M,c);let j;const P=R||!_,B=u&&(t.bufferedWrite||!d||!D&&!I||P&&!k),L=B||u&&d&&(D||I);if(u&&(D||I)){const t=20,e=uc(t);if(e.Ie(1),e.Ie(t-4),j=e.ct,B&&(e.ve(T),P)){const t=za(z,l,S);e.ve(R?0:T+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=uc(Nc(Ps)+2);t.Ie(m),t.Te(Ps),W=t.ct,W[8]=S}else W=N;if(g){const t=Rc(o),e=(q=t)>=ps&&q<=ms;if(e){const e=9+(i?4:0)+(s?4:0),r=uc(e);H=1+(i?2:0)+(s?4:0),G=t,r.Ie(h),r.Ie(e-4),r.Be(H),r.Ue(t),i&&r.Ue(zc(Rc(i))),s&&r.Ue(zc(Rc(s))),V=r.ct}else V=N;if(A===U?!e||Boolean(i||s):A)try{const t=Ac(o),e=uc(36);e.Ie(10),e.Ie(32),e.Le(4),e.Ie(1),e.Ie(24),e.ve(t),e.ve(i?Ac(i):t),e.ve(s?Ac(s):t),Z=e.ct}catch{Z=N}else Z=N}else Z=V=N;var q;let Y;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Bs||r===U&&n===U)if(o!=Ls||r===U&&n===U)Y=N;else{const t=uc(8);t.Ie(E),t.Ie(4),t.Ie((r===U?0:r)&e),t.Ie((n===U?0:n)&e),Y=t.ct}else{const t=ic(r===U?0:r),e=ic(n===U?0:n),o=3+t.length+e.length,a=uc(4+o);a.Ie(b),a.Ie(o),a.Be(1),a.Be(t.length),a.Te(t),a.Be(e.length),a.Te(e),Y=a.ct}}catch{Y=N}M===U&&(M=_?8:0),v===U&&(v=0!=M||w||z?20:10);const{Ne:K}=t;_&&K!==U&&(v=v>K?v:K),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&C!==U&&(W[4]=1),kc(Wt(W),9,M),M=99);const $=L?Nc(j):0,J=$+Nc(W,V,Z,Y,p,y);if(J+(t[X]?67:0)>e)throw new Error(ws);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=Q<F?F:Q>O?O:Q,et=Nc(V)?new Date(1e3*Rc(o)):Nc(Z)?o:tt,{Lt:rt,Wt:nt,rawLastModDate:ot}=_c({version:v,bitFlag:Pc(c,f,d,z,M),compressionMethod:M,uncompressedSize:T,lastModDate:tt,rawLastModDate:a,rawFilename:r,Zt:I,Vt:D,extraFieldLength:J}),at=uc(x+Nc(r)+J),it=at.ct,st=Wt(it);return at.Ue(n),at.Te(rt),at.Te(r),L&&at.Te(j),at.Te(W),at.Te(V),at.Te(Z),at.Te(Y),at.Te(p),at.Te(y),d&&(I||Cc(st,18,0),D||Cc(st,22,0)),{ie:it,Ee:st,Lt:rt,Wt:nt,lastModDate:et,ae:et===tt&&Q.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,me:H,he:G,qt:N,pe:$,Kt:V,Xt:Z,$t:Y,Yt:W,extraFieldLength:J}}function ac(t,e){const{ue:r}=t;let{ie:n,extraFieldLength:o}=r,a=64-(e+Nc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);kc(s,0,y),kc(s,2,a-4);const c=n;r.ie=n=new Uint8Array(Nc(c)+a),Mc(n,c),Mc(n,i,Nc(c));const u=Wt(n);kc(u,28,o+a),r.Ee=u,t.we+=a}function ic(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function sc({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(i=4,Cc(n,0,a))),{se:o,ye:n,be:i}}function cc(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Yt:i,rawComment:s,Xt:c,$t:u,rawExtraField:l,Jt:d,me:w,he:p,Ht:m,uncompressedSize:y,compressedSize:b}=a;let{Vt:E,Zt:S}=a;m||(E&&y<t&&(E=a.Vt=!1),S&&b<t&&(S=a.Zt=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=uc(t);e.Ie(1),e.Ie(t-4),E&&e.ve(y),S&&e.ve(b),g&&e.ve(a.offset),A&&e.Ue(a.diskNumberStart),R=e.ct}else R=N;if(a.qt=R,a.Fe=g,a.Gt=A,p===U)z=N;else{const t=uc(9);t.Ie(h),t.Ie(5),t.Be(w),t.Ue(p),z=t.ct}a.Kt=z;const D=Nc(R,i,c,u,z,l,d);if(D>e)throw new Error(ws);n+=f+Nc(r,s)+D}return{Re:n,ze:o}}function uc(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{ct:e,Be:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Ie:t=>{kc(r,n,t),n+=2},Ue:t=>{Cc(r,n,t),n+=4},ve:t=>{vc(r,n,BigInt(t)),n+=8},Te:t=>{Mc(e,t,n),n+=Nc(t)},Le:t=>n+=t}}function lc(t){const{diskNumber:e=0}=t;return e}function fc(t){const{diskOffset:e=0}=t;return e}function dc(t,e){const{availableSize:r=I}=t;return e>r}function wc(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Tt:0)}function pc(t){const e=Wt(t);let r=0;for(;r+4<=Nc(t);){const n=4+Tc(e,r+2);if(1==Tc(e,r))return pc(Bt(t.subarray(0,r),t.subarray(Math.min(r+n,Nc(t)))));r+=n}return t}async function mc(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await gc(Bo(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function hc(t,e){const r=await Po(t,e,x);if(Nc(r)<x)return x;const n=Wt(r);return x+Tc(n,26)+Tc(n,28)}function yc(t,{offset:e,diskNumberStart:r}){return e+(t.ht?t.ht(r):0)}function bc(){const t=new Uint8Array(4);return Cc(Wt(t),0,o),t}async function Ec(t,e){delete t.Ft,await Sc(e,bc()),t.offset+=4}async function Sc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Nc(e),await n.write(e)}finally{n.releaseLock()}}async function gc(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Nc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function Ac(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<hs?hs:e>ys?ys:e}}function Rc(t){return Math.floor(t.getTime()/1e3)}function zc(t){return Math.min(ms,Math.max(ps,t))}function Dc(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function xc(t,e,r,n){const o=Dc(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(ns);return o}function Oc(t,e,r){return ft(Dc(t,e,r))}function Fc(t,e,r,n){return bt(Dc(t,e,r,n))}function Uc(t){return t+5*(Math.floor(t/16383)+1)}function Ic(t,e){return t===U?e===U||e>0:0!==t}function Tc(t,e){return t.getUint16(e,!0)}function kc(t,e,r){t.setUint16(e,r,!0)}function Cc(t,e,r){t.setUint32(e,r,!0)}function vc(t,e,r){t.setBigUint64(e,r,!0)}function Mc(t,e,r){t.set(e,r)}function Nc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function _c({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,Zt:u,Vt:l,extraFieldLength:f}){const d=uc(26),w=d.ct,p=Wt(w);if(d.Ie(e),d.Ie(r),d.Ie(n),s===U){const t=new Uint32Array(1),e=Wt(t);kc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),kc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ue(s),d.Le(4),u||a!==U?d.Ue(u?t:a):d.Le(4),l||o!==U?d.Ue(l?t:o):d.Le(4),d.Ie(Nc(c)),d.Ie(f),{Lt:w,Wt:p,rawLastModDate:s}}function jc(t){return t.every(t=>t>=32&&t<=126)}function Pc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Bc(){return"application/octet-stream"}function Lc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Tt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Wc(r,Er)||Wc(t,Er)||Wc(t,gr),decompression:Wc(n,Er)||Wc(e,Er)||Wc(e,gr),registered:!1},{compressionMethod:9,compression:!1,decompression:Wc(n,Sr)||Wc(e,Sr),registered:!1}];for(const t of dr()){const e=wr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:U,decompression:e?typeof e.DecompressionStream==k:U,registered:!0})}return o}function Wc(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):Or(t,e)}const Zc="2.18.1",Vc=1048576,Hc=".zip.js-temp";function Gc(t={}){const{thresholdBytes:e=Vc,directoryName:r=Hc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const qc=1048576;function Yc(t={}){const{thresholdBytes:e=qc}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=tr(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Kc=1048576,Xc=".zip.js-temp",$c="createSyncAccessHandle is only available in dedicated workers";function Jc(t={}){const{thresholdBytes:e=Kc,directoryName:r=Xc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error($c);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Qc="deflate",tu="deflate-raw",eu="deflate64-raw",ru="gzip",nu=[Qc,tu,ru],ou=[Qc,tu,ru,eu];let au,iu,su,cu,uu;function lu(t,e){return-4===e&&(t.code="Z_MEM_ERROR"),t}function fu(t,e,r={}){if(!(t?nu:ou).includes(e))throw new TypeError("Unsupported format: "+e);if(!au){const t=new Error("WASM module not loaded");throw t.cause=uu,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536,i={We:0,in:0,inBufferSize:0,Ze:0,Ve:!1};let s,c,u,l,f=!0,d=!1;return function(){try{let r;if(i.We=iu(o),i.in=iu(a),i.inBufferSize=a,!i.We||!i.in)throw lu(new Error("allocation failed"),-4);if(t?(i.He=au.deflate_process,i.Ge=au.deflate_last_consumed,i.qe=au.deflate_end,i.Ze=au.deflate_new(),r=e===ru?au.deflate_init_gzip(i.Ze,n):e===tu?au.deflate_init_raw(i.Ze,n):au.deflate_init(i.Ze,n)):e===eu?(i.He=au.inflate9_process,i.Ge=au.inflate9_last_consumed,i.qe=au.inflate9_end,i.Ze=au.inflate9_new(),r=au.inflate9_init_raw(i.Ze)):(i.He=au.inflate_process,i.Ge=au.inflate_last_consumed,i.qe=au.inflate_end,i.Ze=au.inflate_new(),r=e===tu?au.inflate_init_raw(i.Ze):e===ru?au.inflate_init_gzip(i.Ze):au.inflate_init(i.Ze)),0!==r)throw lu(new Error("init failed:"+r),r)}catch(t){throw m(i),t}}(),{readable:new ReadableStream({start(t){s=t},pull(){f=!1,p()},cancel(t){d=!0,l=t,m(i),c.error(t),p()}},{highWaterMark:0}),writable:new WritableStream({start(t){c=t},async write(t){if(f&&await new Promise(t=>u=t),d)throw l;try{!function(t){const e=new Uint8Array(cu.buffer),r=i.He,n=i.Ge,a=i.We;let s=0;for(;s<t.length;){if(i.Ve)throw new Error("trailing data after the end of the stream");const c=Math.min(t.length-s,32768);if((!i.in||i.inBufferSize<c)&&(i.in&&su&&(su(i.in),i.in=0),i.in=iu(c),i.inBufferSize=c,!i.in))throw lu(new Error("allocation failed"),-4);e.set(t.subarray(s,s+c),i.in);const u=r(i.Ze,i.in,c,a,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw lu(new Error("process error:"+f),f);const d=16777215&u;d&&w(e.slice(a,a+d));const p=n(i.Ze);if(1===l)i.Ve=!0;else if(0===p&&0===d)break;s+=p}}(t)}catch(t){throw m(i),s.error(t),t}},close(){if(d)return;try{!function(){const t=new Uint8Array(cu.buffer),e=i.He,r=i.We;for(;;){const n=e(i.Ze,0,0,r,o,4),a=n>>24&255,s=128&a?a-256:a;if(s<0)throw lu(new Error("process error:"+s),s);const c=16777215&n;if(c&&w(t.slice(r,r+c)),1===a||0===c)break}}()}catch(t){throw m(i),s.error(t),t}const t=m(i);if(0!==t){const e=lu(new Error("end error:"+t),t);throw s.error(e),e}s.close()},abort(t){m(i),s.error(t)}},{highWaterMark:1})};function w(t){f=!0,s.enqueue(t)}function p(){if(u){const t=u;u=null,t()}}function m(t){let e=0;return t.Ze&&t.qe&&(e=t.qe(t.Ze)),t.Ze=0,t.in&&su&&su(t.in),t.in=0,t.We&&su&&su(t.We),t.We=0,e}}class du{constructor(t=Qc,e){return fu(!0,t,e)}}class wu{constructor(t=Qc,e){return fu(!1,t,e)}}du.requiresModule=!0,wu.requiresModule=!0,du.supportedFormats=nu,wu.supportedFormats=ou;const pu=65536;let mu,hu;function yu(t){return new Uint8Array(t.memory.buffer)}let bu,Eu=!1;var Su;async function gu(){await async function(){await Promise.allSettled([In(),...gn.map(t=>(Cn(t),t.terminate()))]),Yr=U,Kr=!1}(),bu=null,Eu=!1,au=iu=su=cu=uu=null,mu=null,hu=0}Su=function(t,e){const r=mu;let n=r?function(t,e,r){hu||(hu=t.malloc(pu));const n=hu?t.aes_hmac_new():0;if(n){const o=yu(t);if(o.set(e,hu),o.set(r,hu+e.length),t.aes_hmac_init(n,hu,e.length,hu+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return we(t,e);const o=hu;return{process(t,e){for(let a=0;a<t.length;a+=pu){const i=t.subarray(a,a+pu),s=yu(r);s.set(i,o),r.aes_hmac_process(n,o,i.length,e?1:0),i.set(s.subarray(o,o+i.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,yu(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=Su||we,function({Ye:t}){$r=t}({Ye:t=>{if(!bu){let{wasmURI:e}=t;typeof e==k&&(e=e()),bu=async function(t,{baseURI:e}){if(!Eu)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var a;(function(t){if(au=t,({malloc:iu,free:su,memory:cu}=au),"function"!=typeof iu||"function"!=typeof su||!cu)throw au=iu=su=cu=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==k&&(mu=a,hu=0)}(t,e),Eu=!0}catch(t){throw function(t){uu=t}(t),t}}(e,t).catch(t=>{throw bu=null,t})}return bu}}),jt({CompressionStreamFallback:du,DecompressionStreamFallback:wu}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Au="Entry filename already exists",Ru="Duplicate entry filename in the imported zip file",zu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Du="Entry is an ancestor of target entry",xu="Root directory cannot be moved",Ou="Target entry is not a directory",Fu="Parent entry is not a directory",Uu="Readable stream already consumed",Iu="throw",Tu="keep-first",ku="keep-last",Cu=new Set([Iu,Tu,ku]),vu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Mu="Invalid readerOptions (must be an object)",Nu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",_u="Invalid passwords option (must be an array of strings)",ju="Invalid requestPassword option (must be a function returning a string or undefined)",Pu="zipjs-abort-export",Bu=new Uint8Array(0),Lu=new Set([br,mr,hr]);class Wu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Au);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ke++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Xe:r.Xe||r.uncompressedSize===U,passThrough:r.passThrough,$e:r.$e||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=Sl(t);n&&(t=n.pop(),r=gl(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Au);r!=e.parent&&(tl(e),e.parent=r,r.children.push(e),bl(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class Zu extends Wu{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Zu(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===U||(t.constructor==ao?e.type==r:t.constructor!=eo||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Ju(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([_o(n),_o(t,o)]);const a=dt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof Aa||!o&&!a&&!i?s:Qe(s).pipeThrough(new rn({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!No(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Qe(i).pipeTo(er(t.writable),{signal:a,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==Ee)return!1;throw t}}getText(t,e){return this.getData(new co(t),e)}getBlob(t,e){return this.getData(new ao(t),e)}getData64URI(t,e){return this.getData(new eo(t),e)}getUint8Array(t){return this.getData(new To,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){ll(this,{data:t,Reader:oo,Writer:ao,uncompressedSize:t.size})}replaceText(t){ll(this,{data:t,Reader:io,Writer:co,uncompressedSize:so(t)})}replaceData64URI(t){ll(this,{data:t,Reader:to,Writer:eo,uncompressedSize:fl(t)})}replaceUint8Array(t){ll(this,{data:t,Reader:Io,Writer:To,uncompressedSize:t.length})}replaceReadable(t){ll(this,{data:null,Reader:Xu(t),Writer:null,uncompressedSize:U})}}class Vu extends Wu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Vu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return El(this,t,{options:e},!0)}addText(t,e,r={}){return El(this,t,{data:e,Reader:io,Writer:co,options:r,uncompressedSize:so(e)})}addBlob(t,e,r={}){return El(this,t,{data:e,Reader:oo,Writer:ao,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return El(this,t,{data:e,Reader:to,Writer:eo,options:r,uncompressedSize:fl(e)})}addUint8Array(t,e,r={}){return El(this,t,{data:e,Reader:Io,Writer:To,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return El(this,t,{data:e,Reader:class extends Fo{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return El(this,t,{Reader:Xu(e),options:r})}addFileSystemEntry(t,e={}){return pl(this,t,e)}addFileSystemHandle(t,e={}){return pl(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),El(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 oo(t),e)}importData64URI(t,e){return this.importZip(new to(t),e)}importUint8Array(t,e){return this.importZip(new Io(t),e)}importHttpContent(t,e){return this.importZip(new Fo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new ao(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new eo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new To,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;ul(r.passThrough),al(r);const i=ol(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:U,onprogress:U,onend:U,preventClose:!1}),f=qu([t],t=>Ku(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await nn(n,f),await h(t,e),a&&await nn(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function m(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await nn(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function h(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!el(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||el(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await h(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:m(o)},l)}catch(t){throw w?new Error(Pu):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Pu));try{r.entryName===U&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==k?(r=t,e=Object.assign({},r.options,e)):(await _o(t),r=new wi(t,e)),ul(e.passThrough),al(e);const n=function(t){if(t===U)return Iu;if(Cu.has(t))return t;throw new Error(zu)}(e.duplicates),o=[],a={Je:[]},i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),s=i.pop();let c=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Tu){c=!0;break}if(n!=ku)throw new Error(Ru);this.fs.remove(r),r=new Vu(this.fs,t,{data:null},e),o.push(r)}}else r=new Vu(this.fs,t,{data:null},e),o.push(r)}if(c)continue;if(t.directory){let e=r;if(s){if(e=r.getChildByName(s),e&&(!e.directory||e.data)){if(n==Tu)continue;if(n!=ku)throw new Error(Ru);e.directory?e.data=t:(this.fs.remove(e),e=U)}e||(e=new Vu(this.fs,s,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(s);if(i){if(n==Tu)continue;if(n!=ku)throw new Error(Ru);this.fs.remove(i)}o.push(El(r,s,{data:t,Reader:$u(Object.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==U||(e.bufferedWrite=!0);const[o]=await Promise.all([Qu(r,ol(e.readerOptions)),n?U:_o(t)]),a=n?t:new Hs(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=qu(e.children,t=>wl(t)?0:1);let f=0,d=0;if(a&&await nn(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(wl(e))return;const{name:a,Qt:s}=rl(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-w,w=t,i&&await nn(i,f,r)}}));d++,c&&await nn(c,d,l,p)}s&&await nn(s,f)}(a,r,qu([r],Yu),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;ol((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!wl(t)).map(t=>{const{name:e,Qt:o}=rl(t,n,r);return{name:e,size:t.directory?0:nl(t,dl(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>wl(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(ft(r[J]))throw new Error(As);if(a!==U&&!(a instanceof Uint8Array))throw new Error(ts);const s=Nc(a);if(s>e)throw new Error(Qi);const c=r[X],u=new Map,l=r[K]===U?0:r[K];let f=l,w=I;const p=[],m=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);Dc(i,o,da)&&!r.endsWith(D)&&(r+=D);const a=Qs(i,r,o);({name:r}=a);const{ee:s}=tc(i,r,o);0==s.level||s.compressionMethod!==U||s.ne||await Jr(Tt())||(s.level=0);const l=!Dc(i,o,da);if(l&&n===U)throw new Error(As);const{je:d,ee:h}=rc(i,l,n,s,o);if(l&&!s.ne&&Ic(h.compressionMethod,h.level))throw new Error(As);const y=Object.assign({},o,a.ee,s,h,{[X]:c}),b=oc(y),E=sc(y),S={ue:b,we:Nc(b.ie,E.se)};c&&ac(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.we+g;p.push(A),m.add(Boolean(y.Ht||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(m.size>1||nc(p,l,!0)!=nc(p,l,!1)))&&!o)throw new Error(As);const{Re:h,ze:y}=cc(u);let b=Dc(i,r,sa);if(f>=t||h>=t||u.size>=e){if(!1===b)throw new Error(bs);b=!0}else b===U&&y&&(b=!0);return f-l+h+s+(b?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class Hu{constructor(){hl(this)}get children(){return this.root.children}remove(t){tl(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=U}move(t,e){if(t==this.root)throw new Error(xu);if(!e.directory)throw new Error(Ou);if(e.isDescendantOf(t))throw new Error(Du);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Au)}else tl(t),t.parent=e,e.children.push(t),bl(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):U;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return yl(this,r=>r.importBlob(t,e))}importData64URI(t,e){return yl(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return yl(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return yl(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return yl(this,r=>r.importReadable(t,e))}importZip(t,e){return yl(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Gu={FS:Hu,ZipDirectoryEntry:Vu,ZipFileEntry:Zu};function qu(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function Yu(t){return t.uncompressedSize}function Ku(t,e){const{data:r}=t;return e&&r instanceof Aa?r.compressedSize:t.uncompressedSize}function Xu(t){let e;return function(){if(e)throw new Error(Uu);return e=!0,{readable:t}}}function $u(t,e){return class extends Jn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,n=Object.assign({},t,r.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:a}=n,i=await async function(t,e,r){al(e);const{passwords:n,requestPassword:o,signal:a}=e;if(delete(e=Object.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!n&&!o)return t.getData(new ao,e);const i=new Set;let s;for(;;){for(const t of sl(e,r,n))if(!i.has(t.key)){const e=await u(t);if(e.done)return e.data;s=e.error}if(!o)break;if(r.Qe){await r.Qe;continue}let a;r.Qe=new Promise(t=>a=t);try{const e=await o(t,s);if(e===U||null===e)break;if(typeof e!=v)throw new Error(ju);const r=await u(cl(e));if(r.done)return r.data;s=r.error}finally{r.Qe=U,a()}}if(!i.size)throw new Error(Ta);const c=new Error(Ee);throw c.cause=s,c;async function u(n){i.add(n.key);const o=Object.assign({},e,n.options);if(t.zipCrypto){o.checkCrc32=!0;try{await t.getData(null,Object.assign({},o,{checkPasswordOnly:!0}))}catch(t){if(il(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new ao,o);return function(t,e){const{Je:r}=t,n=r.findIndex(t=>t.key===e.key);-1!=n&&r.splice(n,1),r.unshift(e)}(r,n),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Zt(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return il(t)||e.zipCrypto&&Zt(t)&&Lu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,Object.assign(n,{checkPasswordOnly:!1,checkOverlappingEntry:a||o,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=i,r.er=new oo(i),r.size=i.size,super.init()}readUint8Array(t,e){return this.er.readUint8Array(t,e)}}}function Ju(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Qu(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async r=>{const n=r.reader=Ju(r.Reader,r.data,e);o.set(r,n);try{await _o(n)}catch(e){try{e.entry=r,e.entryId=r.id,e.entryName=r.getRelativeName(t)}catch{}throw e}n.size!==U&&(r.uncompressedSize=n.size,r.Xe=!1)})),o}function tl(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function el(t){return Boolean(t)&&t.message==Pu}function rl(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof Aa){const e=dl(t,r),n=o.lastModDate===U?r.lastModDate:o.lastModDate;({Qt:a,te:i}=Js(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.$e},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===U)throw new Error(vu);return{name:n,Qt:s}}function nl(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.Xe?U:Ku(t,e)}function ol(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(Mu);return t&&(ul(t.passThrough),al(t)),t}function al(t){const{passwords:e,requestPassword:r}=t;if(e&&(!Array.isArray(e)||e.some(t=>typeof t!=v)))throw new Error(_u);if(r&&typeof r!=k)throw new Error(ju)}function il(t){return Zt(t)&&t.message==Ee}function sl(t,e,r){const n=[],{password:o,rawPassword:a}=t;return a&&a.length&&n.push({key:a,options:{password:"",rawPassword:a}}),o&&n.push(cl(o)),n.push(...e.Je),r&&n.push(...r.filter(t=>t).map(cl)),n}function cl(t){return{key:t,options:{password:t,rawPassword:Bu}}}function ul(t){if(mt(t)===at)throw new Error(Nu)}function ll(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:U,uncompressedSize:r===U?0:r,Xe:r===U})}function fl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function dl(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function wl(t){return t.directory&&null===t.data}function pl(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await ml(n)),"file"==n.kind){const t=await n.getFile();o.push(El(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function ml(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await ml(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function hl(t){t.entries=[],t.Ke=0,t.root=new Vu(t)}function yl(t,e){const{entries:r,Ke:n,root:o}=t;return hl(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ke:n,root:o}),e})}function bl(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function El(t,e,r,n){if(t.directory){const o=Sl(e);return o&&(e=o.pop(),t=gl(t,o)),n?new Vu(t.fs,e,r,t):new Zu(t.fs,e,r,t)}throw new Error(Fu)}function Sl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function gl(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Au);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Du)}else t=new Vu(n.fs,e,{data:null},n)}),t}export{oo as BlobReader,ao as BlobWriter,to as Data64URIReader,eo as Data64URIWriter,lt as ERR_ABORTED,Na as ERR_AMBIGUOUS_ARCHIVE,Du as ERR_ANCESTOR_ENTRY,Da as ERR_BAD_FORMAT,Fa as ERR_CENTRAL_DIRECTORY_NOT_FOUND,yr as ERR_CODEC_OUT_OF_MEMORY,Ji as ERR_DUPLICATED_NAME,Ru as ERR_DUPLICATE_IMPORTED_ENTRY,Ta as ERR_ENCRYPTED,_a as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Ma as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Au as ERR_ENTRY_EXISTS,Oa as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,xa as ERR_EOCDR_NOT_FOUND,Ia as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Pn as ERR_HTTP_RANGE,Bn as ERR_HTTP_RESOURCE_CHANGED,jn as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,rr as ERR_INVALID_CODEC_DEFINITION,or as ERR_INVALID_CODEC_MODULE,Qi as ERR_INVALID_COMMENT,ts as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,br as ERR_INVALID_CRC32,ns as ERR_INVALID_DATE,zu as ERR_INVALID_DUPLICATES,is as ERR_INVALID_ENCRYPTION_STRENGTH,Ms as ERR_INVALID_ENTRY,es as ERR_INVALID_ENTRY_COMMENT,rs as ERR_INVALID_ENTRY_COMMENT_TYPE,os as ERR_INVALID_ENTRY_NAME,ls as ERR_INVALID_EXTRAFIELD,ws as ERR_INVALID_EXTRAFIELD_DATA,ds as ERR_INVALID_EXTRAFIELD_DATA_TYPE,fs as ERR_INVALID_EXTRAFIELD_TYPE,Ba as ERR_INVALID_FILENAME_VALIDATION,it as ERR_INVALID_FUNCTION_OPTION,Os as ERR_INVALID_GID,Cs as ERR_INVALID_LEVEL,La as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,Ts as ERR_INVALID_MSDOS_ATTRIBUTES,ks as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,_u as ERR_INVALID_PASSWORDS,ct as ERR_INVALID_PASSWORD_TYPE,vu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,zs as ERR_INVALID_READER,Mu as ERR_INVALID_READER_OPTIONS,ju as ERR_INVALID_REQUEST_PASSWORD,st as ERR_INVALID_SIGNAL,vs as ERR_INVALID_SIGNATURE_DATA,Pa as ERR_INVALID_STRICTNESS,xs as ERR_INVALID_UID,mr as ERR_INVALID_UNCOMPRESSED_SIZE,Us as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Is as ERR_INVALID_UNIX_ID_SIZE,Fs as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,as as ERR_INVALID_VERSION,Ln as ERR_ITERATOR_COMPLETED_TOO_SOON,Ua as ERR_LOCAL_FILE_HEADER_NOT_FOUND,va as ERR_OVERLAPPING_ENTRY,Fu as ERR_PARENT_NOT_DIRECTORY,Uu as ERR_READABLE_CONSUMED,nr as ERR_RESERVED_COMPRESSION_METHOD,xu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Ca as ERR_SPLIT_ZIP_FILE,Ou as ERR_TARGET_NOT_DIRECTORY,Ss as ERR_UNDEFINED_COMPRESSION_METHOD,gs as ERR_UNDEFINED_CRC32,Rs as ERR_UNDEFINED_READER,Es as ERR_UNDEFINED_UNCOMPRESSED_SIZE,As as ERR_UNDETERMINED_SIZE,ja as ERR_UNSAFE_FILENAME,ar as ERR_UNSUPPORTED_COMPRESSION,$c as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,ka as ERR_UNSUPPORTED_ENCRYPTION,us as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,ss as ERR_UNSUPPORTED_ENCRYPTION_USDZ,bs as ERR_UNSUPPORTED_FORMAT,Nu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,cs as ERR_UNSUPPORTED_SPLIT_USDZ,Wa as ERR_UNSUPPORTED_UINT64,qr as ERR_WORKER_STARTUP_TIMEOUT,Wn as ERR_WRITER_NOT_INITIALIZED,Zn as ERR_WRITER_SIZE_NOT_WRITABLE,Ns as ERR_ZIP_CRYPTO_LAST_MOD_DATE,Ds as ERR_ZIP_NOT_EMPTY,Uo as HttpRangeReader,Fo as HttpReader,Jn as Reader,ko as SplitDataReader,Co as SplitDataWriter,io as TextReader,co as TextWriter,Io as Uint8ArrayReader,To as Uint8ArrayWriter,Zc as VERSION,Ka as WARNING_APPENDED_DATA,js as WARNING_CLAMPED_LAST_MODIFICATION_DATE,Ha as WARNING_COMPRESSED_PATCHED_DATA,_s as WARNING_COMPRESSION_UNAVAILABLE,Qa as WARNING_DUPLICATE_FILENAME,Ga as WARNING_MALFORMED_EXTRA_FIELD,ni as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,oi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,ai as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ri as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,ti as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,ei as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,$a as WARNING_PREPENDED_CENTRAL_DIRECTORY,Xa as WARNING_PREPENDED_DATA,Ja as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Va as WARNING_UNKNOWN_VERSION,qa as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Za as WARNING_UNSORTED_CENTRAL_DIRECTORY,Ya as WARNING_WRAPPED_ENTRIES_COUNT,Qn as Writer,Vu as ZipDirectoryEntry,Wu as ZipEntry,Hu as ZipFS,Zu as ZipFileEntry,wi as ZipReader,pi as ZipReaderStream,Hs as ZipWriter,Gs as ZipWriterStream,vt as configure,Yc as createBlobTempStream,Gc as createOPFSTempStream,Jc as createSyncAccessHandleTempStream,Gu as fs,Bc as getMimeType,dr as getRegisteredCodecs,Lc as getSupportedCompressionMethods,mi as isZipFile,ur as registerCodec,Pt as resetConfiguration,gu as terminateWorkers,lr as unregisterCodec};
1
+ const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,m=39169,h=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,D="/",x=30,O=new Date(2107,11,31,23,59,58),F=new Date(1980,0,1),U=void 0,I=1/0,T="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",P="rawPassword",B="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",q="useUnicodeFileNames",Y="dataDescriptor",K="offset",X="usdz",$="maxAppendedDataSize",J="signCentralDirectory",Q="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",at="compressed",it="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=k)throw new Error(it);return t}function dt(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(st);return t||U}function wt(t){if(t&&t.aborted)throw t.reason===U?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function mt(t){if(t!==U&&typeof t!=M&&t!==at)throw new Error(ut);return t}function ht(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==U&&ht(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=T&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},zt="maxWorkers",Dt="baseURI",xt=["wasmURI","workerURI"],Ot=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ft=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Ut=[Dt,...xt,"useCompressionStream","useWebWorkers","transferStreams",...Ot,...Ft],It={...Rt};function Tt(){return It}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Ut){const n=t[r];n!==U&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ot.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ft.includes(t))ft(e);else if(t==Dt){if(e&&typeof e!=v)throw new Error(St)}else if(xt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Pt(){for(const t of Ut)delete It[t];Object.assign(It,Rt)}function Bt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];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;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,qt,Yt,Kt,Xt,$t,Jt]=Vt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^$t[t>>>8&255]^Xt[t>>>16&255]^Kt[t>>>24&255]^Yt[255&r]^qt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==T){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re=64,ne=20,oe=new Uint8Array([128]),ae=new Uint8Array(1),ie=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),se=new Uint8Array(256),ce=new Int32Array(256),ue=new Int32Array(256),le=new Int32Array(256),fe=new Int32Array(256);let de=!1;function we(t,e){!function(){if(!de){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),se[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);se[0]=99;for(let t=0;t<256;t++){const e=se[t],r=ye(e),n=r<<24|e<<16|e<<8|r^e;ce[t]=n,ue[t]=n>>>8|n<<24,le[t]=n>>>16|n<<16,fe[t]=n>>>24|n<<8}de=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let a=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=me(n<<8|n>>>24)^a<<24,a=ye(a)):r>6&&t%r==4&&(n=me(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),a=pe(e);let i=0,s=0,c=0,u=0;return{process(t,e){e&&a.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||a.update(t,0,t.length)},digest:()=>a.digest()};function l(){i=i+1|0,i||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=he(i)^r[0],e=he(s)^r[1],a=he(c)^r[2],l=he(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[6],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[7];t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[8],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[9],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[10],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[11],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[14],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[15],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[16],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[17],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[18],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[19],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[22],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[23],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[24],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[25],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[26],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[27],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[30],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[31],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[32],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[33],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[34],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[35],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[38],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[39];let m=40;n>10&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[40],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[41],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[42],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[43],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[46],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[47],m=48),n>12&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[48],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[49],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[50],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[51],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[54],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[55],m=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[m],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[m+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[m+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[m+3]}}function pe(t){const e=function(){const t=new Int32Array(ie),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let a=0,i=0;return{update:s,digest:function(){const e=8*i,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=a;)s(ae,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ne),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(ie),a=0,i=0,c}};function s(t,e,o){const s=e+o;if(i+=o,a){for(;e<s&&a<re;)r[a++]=t[e++];a==re&&(c(n,0),a=0)}if(e+re<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+re<=s;e+=re)c(r,e)}for(;e<s;)r[a++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,a=t[0],i=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[t]|0,i=i<<30|i>>>2,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+e[t+1]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+e[t+3]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[15]|0,i=i<<30|i>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+o|0,a=a<<30|a>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,i=(s<<5|s>>>27)+((u^a)&c^a)+i+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,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+1859775393+o|0,i=i<<30|i>>>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)+(a^i^s)+c+1859775393+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+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,a=(i<<5|i>>>27)+(s^c^u)+a+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i&s|(i|s)&c)+u+2400959708+o|0,i=i<<30|i>>>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)+(a&i|(a|i)&s)+c+2400959708+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&a|(u|a)&i)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c&u|(c|u)&a)+i+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,a=(i<<5|i>>>27)+(s&c|(s|c)&u)+a+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+3395469782+o|0,i=i<<30|i>>>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)+(a^i^s)+c+3395469782+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+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,a=(i<<5|i>>>27)+(s^c^u)+a+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+a|0,t[1]=t[1]+i|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(re),n=new Uint8Array(re);t.length>re&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<re;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,re),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,re),e.update(t,0,ne);const o=e.digest();return e.update(r,0,re),o}}}function me(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function he(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function ye(t){return 255&(t<<1^27*(t>>7))}const be=typeof crypto!=T&&typeof crypto.getRandomValues==k,Ee="Invalid password",Se="Invalid authentication code",ge="zipjs-abort-check-password",Ae="Crypto API not supported";function Re(t){if(be)return crypto.getRandomValues(t);throw new Error(Ae)}const ze={name:"PBKDF2"},De=Object.assign({hash:{name:"HMAC"}},ze),xe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Oe=["deriveBits"],Fe=[8,12,16],Ue=[16,24,32],Ie=10,Te=typeof crypto!=T,ke=Te&&crypto.subtle;let Ce=Te&&typeof ke!=T&&typeof ke.importKey==k&&typeof ke.deriveBits==k,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){const a={};super({start(){_e(a,t,e,r)},async transform(t,e){const{password:r,strength:o,l:i,ready:s}=a;if(r?(await async function(t,e,r,n){const o=await Le(t,e,r,Ze(n,0,Fe[e])),a=Ze(n,Fe[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Be(t),new Error(Ee)}(a,o,r,Ze(t,0,Fe[o]+2)),t=Ze(t,Fe[o]+2),n?(Be(a),e.error(new Error(ge))):i()):await s,a.m)return;const c=new Uint8Array(t.length-Ie-(t.length-Ie)%16);e.enqueue(Pe(a,t,c,0,Ie,!0))},async flush(t){const{h:e,S:r,ready:n}=a;if(e){if(await n,a.m)return;const i=Ze(r,r.length-Ie),s=new Uint8Array(Ze(r,0,r.length-Ie));e.process(s,!0);const c=e.digest();let u=r.length<Ie?1:0;for(let t=0;t<Ie;t++)u|=c[t]^i[t];if(u&&o)return void t.error(new Error(Se));t.enqueue(s)}}}),je(this,a)}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){const n={};super({start(){_e(n,t,e,r)},async transform(t,e){const{password:r,strength:o,l:a,ready:i}=n;let s=N;if(r?(s=await async function(t,e,r){const n=Re(new Uint8Array(Fe[e]));return Bt(n,await Le(t,e,r,n))}(n,o,r),a()):await i,n.m)return;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(Pe(n,t,c,s.length,0,!1))},async flush(t){const{h:e,S:r,ready:o}=n;if(e){if(await o,n.m)return;const a=new Uint8Array(r);e.process(a,!1);const i=Ze(e.digest(),0,Ie);t.enqueue(Bt(a,i))}}}),je(this,n)}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:We(e,r),strength:n-1,S:N,m:!1})}function je(t,e){const r=t.readable.getReader(),n=new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Be(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Be(e),r.cancel(t))});Object.defineProperty(t,"readable",{get:()=>n})}function Pe(t,e,r,n,o,a){const{h:i,S:s}=t;s.length&&(e=Bt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=Ze(r,n,n+u);t.set(Ze(e,0,u)),i.process(t,a)}return t.S=Ze(e,u),r}function Be(t){const{h:e}=t;t.m=!0,e&&e.dispose&&e.dispose()}async function Le(t,e,r,n){t.password=null;const o=Ue[e],a=await async function(t,e,r){if(Ce)try{const n=await ke.importKey("raw",t,De,!1,Oe);return new Uint8Array(await ke.deriveBits(Object.assign({salt:e},xe),n,8*r))}catch{Ce=!1}return function(t,e,r,n){const o=pe(t),a=new Uint8Array(n),i=new Uint8Array(e.length+4),s=new DataView(i.buffer);i.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(i,0,i.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ne),c=o.digest();for(let t=0;t<ne;t++)u[t]^=c[t]}a.set(u.subarray(0,Math.min(ne,n-r)),r)}return a}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(Ze(a,0,o),Ze(a,o,2*o)),t.m&&Be(t),Ze(a,2*o)}function We(t,e){return e===U?ee(t):e}function Ze(t,e,r){return t.subarray(e,r)}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=qe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ee);t=t.subarray(12)}n?e.error(new Error(ge)):e.enqueue(qe(r,t))}})}}class He extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Re(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ye(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ye(r,t),o),e.enqueue(n)}})}}function Ge(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{A:n,R:new Qt(n[0]),D:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)Ke(t,r[e]);else for(let r=0;r<e.length;r++)Ke(t,e.charCodeAt(r))}(t,e,r)}function qe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,r[n]);return r}function Ye(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,e[n]);return r}function Ke(t,e){let[,r]=t.A;t.R.append([e]);const n=~t.R.get();r=Je(Math.imul(Je(r+$e(n)),134775813)+1),t.D.append([r>>>24]);const o=~t.D.get();t.A=[n,r,o]}function Xe(t){const e=2|t.A[2];return $e(Math.imul(e,1^e)>>>8)}function $e(t){return 255&t}function Je(t){return 4294967295&t}function Qe(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function tr(t,e){t=Qe(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=k||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function er(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const rr="Invalid codec definition",nr="Reserved compression method",or="Invalid codec module",ar="Compression method not supported",ir=[0,8,9,99],sr=new Map,cr=new Map;function ur(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(rr);if(ir.includes(r))throw new Error(nr);const c=typeof a==k||typeof i==k;if(!(c||typeof o==v&&o.length))throw new Error(rr);sr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&pr(n,{CompressionStream:a,DecompressionStream:i})}function lr(t){const e=sr.get(t);if(e){let r;sr.delete(t),sr.forEach(t=>r=r||t.format==e.format),r||cr.delete(e.format)}}function fr(t){return sr.get(t)}function dr(){return Array.from(sr.values(),t=>Object.assign({},t,cr.get(t.format)))}function wr(t){return cr.get(t)}function pr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(or);cr.set(t,{CompressionStream:r,DecompressionStream:n})}const mr="Invalid uncompressed size",hr="Invalid compressed data",yr="Codec out of memory",br="Invalid CRC32",Er="deflate-raw",Sr="deflate64-raw",gr="gzip",Ar=[31,139,8];class Rr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let m,h,y,b=super.readable;const E=f&&wr(f),S=Tr(i,n,r),g=c&&o&&!l&&!E&&(!a||s)&&Boolean(S);if(a&&!s||!c||g||(m=new te,b=Cr(b,m)),o)if(E)b=vr(b,Ir(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new zr,b=vr(b,new S(gr,{level:u,chunkSize:e})),b=Cr(b,y);else try{b=kr(b,i,{level:u,chunkSize:e},n,r)}catch(t){if(!i&&r)throw Pr(t);let e;try{e=new n(gr)}catch{throw Pr(t)}b=vr(b,e),b=Cr(b,new zr)}a&&(s?b=Cr(b,new He(t)):(h=new Ne(t),b=Cr(b,h))),Ur(p,b,()=>{a&&!s||!c||(p.crc32=g?y.crc32:new DataView(m.value.buffer).getUint32(0))})}}class zr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Bt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Bt(r.subarray(0,i),t.subarray(0,a-i))),r=Bt(r.subarray(i),t.subarray(a-i))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Dr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let m,h,y,b=super.readable;if(a&&(o?b=Cr(b,new Ve(t)):(h=new Me(t),b=Cr(b,h))),c){const t=new Set,o=f&&wr(f);let a;if(o)b=vr(b,Ir(o.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}),t);else{const o=Tr(u,n,r);if(i&&!l&&s!==U&&p!==U&&o)try{a=new o(gr,{chunkSize:e})}catch{a=U}if(!a)try{b=kr(b,u,{chunkSize:e,deflate64:l},n,r,t)}catch(t){if(l||p===U||!u&&r)throw Pr(t);try{a=new n(gr)}catch{throw Pr(t)}}}a?(y=!0,b=function(t,e,r,n,o){const a=e.writable.getWriter(),i=e.readable.getReader(),s=n===U?new Qt:U;let c,u,l=0,f=!1,d=!1;const w=new ReadableStream({start(t){u=t},pull(){h()},cancel:t=>(d=!0,h(),i.cancel(t))});return async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(Ar),await a.write(t);;){await m(),await a.ready;const{value:t,done:r}=await _r(e,o);if(r)break;await a.write(t)}s&&await a.write(new Uint8Array(0));const i=new Uint8Array(8),c=Wt(i);c.setUint32(0,s?s.get():n,!0),c.setUint32(4,r,!0),f=!0,await a.write(i),await a.close()}catch(t){await Mr(a,t),await Nr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await p();if(e)break;if(l+=t.length,l>r)throw new Error(mr);s&&s.append(t),u.enqueue(t)}d||(d=!0,u.close())}catch(t){!function(t){d||(d=!0,u.error(t),h())}(t),await Nr(i,t)}}(),w;function p(){return i.read().catch(t=>{if(f){if(!s)throw Lr(t,br);if(l!=r)throw Lr(t,mr);return{done:!0}}throw jr(t,o)})}function m(){if(!d&&u.desiredSize<=0)return new Promise(t=>c=t)}function h(){if(c){const t=c;c=U,t()}}}(b,a,p,s,t)):b=function(t,e){const r=t.getReader();return new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw await Nr(r,t),jr(t,e)}},cancel:t=>r.cancel(t)})}(b,t)}i&&!y&&(m=new te,b=Cr(b,m)),Ur(this,b,()=>{if(m){const t=new DataView(m.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(br)}})}}const xr=new Map;function Or(t,e){if(!t)return!1;let r=xr.get(t);r||(r=new Map,xr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Fr(t){return Or(t,Er)}function Ur(t,e,r){e=Cr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Ir(t,e,r){if(!t)throw new Error(ar);return new t(e,r)}function Tr(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function kr(t,e,r,n,o,a){const i=e&&n?n:o||n,s=r.deflate64?Sr:Er;let c;try{c=new i(s,r)}catch(t){if(!e||!o||i==o)throw t;c=new o(s,r)}return vr(t,c,a)}function Cr(t,e){return Qe(t).pipeThrough(e)}function vr(t,e,r){const n=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await n.ready;const t=await _r(o,r);if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await Mr(n,t),await Nr(o,t)}}(),e.readable}async function Mr(t,e){try{await t.abort(e)}catch{}}async function Nr(t,e){try{await t.cancel(e)}catch{}}function _r(t,e){const r=t.read();return e?r.catch(t=>{throw e.add(t),t}):r}function jr(t,e){return e.has(t)?t:Lr(t,Br(t)?yr:hr)}function Pr(t){return Br(t)?Lr(t,yr):t}function Br(t){return Zt(t)&&"Z_MEM_ERROR"==t.code}function Lr(t,e){const r=new Error(e);return r.cause=t,r}const Wr="data",Zr="deflate",Vr="inflate";class Hr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Zr)?o=Rr:n.startsWith(Vr)&&(o=Dr),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==U&&r.outputSize>t.outputSize))throw new Error(mr)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Gr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const qr="Worker startup timeout";let Yr,Kr,Xr,$r=()=>{};async function Jr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!Fr(e)&&(n=e,!Or(n,gr)))||!!r&&await Qr(t);var n}async function Qr(t){if($r)try{return await $r(t),!0}catch{}return!1}function tn(t){t.createWorker?Kr=!0:Yr=!1}class en{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,O:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Kr&&(f=U),Object.assign(t,{F:!0,U:(t.U||0)+1,readable:e.pipeThrough(new Gr(kt(i))).pipeThrough(new rn(s),{signal:d}),writable:r,options:Object.assign({},a),I:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{T:r,F:n}=t;n?(t.C=t.C||[],t.C.push(e)):(r&&(r.terminate(),t.T=null),e()),t.v=null}),M(){if(t.F){const{C:e,T:r}=t;e&&(t.C=null,r&&(t.N=!0,r.terminate())),t.F=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),Yr===U&&(Yr=typeof Worker!=T),(c&&Xr&&(Yr&&l||f)?Xr:on)(t,i)}}class rn extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await nn(t,r)},async transform(t,n){o+=t.length,e&&await nn(e,o,r),n.enqueue(t)},async flush(){n&&await nn(n,o)}})}}async function nn(t,...e){try{await t(...e)}catch{}}function on(t,e){return{run:()=>an(t,e)}}async function an({options:t,readable:e,writable:r,M:n,I:o},a){let i,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Zr),r=e?a.CompressionStreamFallback:a.DecompressionStreamFallback,n=e?a.CompressionStream:a.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!Fr(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new Hr(t,a),s=new Gr(kt(a));const{signal:n}=o.O;await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0,signal:n});const{crc32:c,inputSize:l,outputSize:f}=i;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(i){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=Qr(a)),c}}const sn={type:"module"},cn="error",un="abort";let ln,fn,dn,wn=!0;try{wn=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==U}catch{}var pn;function mn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function hn(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.v=null}function yn(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(fn===U||ln!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=sn);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return yn(t,e,r,n,!1);if(n)throw o;return yn(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=sn);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return yn(t,e,r,!1,o);throw a}}ln=t,fn=s,dn=c}else i=new Worker(fn,dn);return i.addEventListener("message",t=>{r._=!0,bn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,j:l,P:f,M:d,U:w}=e,p=()=>e.U!=w;try{if(i)m(function(t,e){const{message:r,stack:n,code:o,name:a,outputSize:i,cause:s,codecImportFailed:c}=t;let u;if(u=e?e.value:Object.assign(new Error(r),{stack:n,code:o,name:a}),Zt(u))try{i!==U&&(u.outputSize=i),c&&(u.codecImportFailed=!0),s&&(Zt(u.cause)||(u.cause=Object.assign(new Error(s.message),{name:s.name})),s.code!==U&&u.cause.code!==s.code&&(u.cause.code=s.code)),e&&(u.name!==a&&(u.name=a),u.code!==o&&(u.code=o))}catch{}return u}(i,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||Sn({type:Wr,value:t,done:r,messageId:o},e)}if(r==Wr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||Sn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),h(),d())}(a)}}catch(i){p()||(hn(e),m(i))}function m(t){p()||(f(t),h(),Zt(t)&&t.codecImportFailed||d())}function h(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(cn,t=>En(t,r)),i.addEventListener("messageerror",t=>En(t,r)),i}function bn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function En(t,e){t.preventDefault&&t.preventDefault(),bn(e);const{_:r,P:n,writer:o,M:a}=e;hn(e),r||(e.T=null);let i=t.error||new Error(t.message||cn);r||(i=Object.assign(new Error(i.message||cn),{L:!0}),e.W=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Sn(t,{T:e,writer:r,transferStreams:n,_:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&wn&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{wn=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}pn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.v){let i;typeof a==k&&(a=a());try{i=yn(t.workerURI,r,t)}catch{return tn(t),on(t,e)}Object.assign(t,{T:i,_:!1,N:!1,W:null,v:{run:async()=>{try{return await async function(t,e){if(!t.T){const{W:e}=t;t.W=null;const r=e||new Error(qr);throw r.L=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,I:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,V:null,j:r,P:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,H:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:a}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),i=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});i.catch(t=>{n||Object.assign(e,{Z:!0,V:t})});const{signal:s}=e.I.O;if(s){const t=()=>r.abort(s.reason),e=()=>s.removeEventListener(un,t);s.addEventListener(un,t),i.then(e,e)}return{writable:o,closed:i,H:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=Sn({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.M(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t._&&Number.isFinite(f)&&f>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t._)return;const{P:e,writer:r}=t;if(hn(t),t.T=null,e){const t=new Error(qr);t.L=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,I:n,Z:o,V:a}=t;n.outputSize=r;const i=Zt(e)&&(e.codecImportFailed||e.L),s=o&&!i?a:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.L)return tn(t),mn(t),an(t,e);if(r&&r.codecImportFailed){if(t.reader)return mn(t),an(t,e);t.M()}throw r}}}})}return t.v},Xr=pn;let gn=[];const An=[];let Rn,zn,Dn=0;async function xn(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:m}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!cr.has(t)&&e&&pr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===U&&n.transferStreams);const h=!(s||c||u||l),y=f===U||Boolean(r.codecURI);return e.useWebWorkers=!h&&y&&(a||a===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:U,e.createWorker=e.useWebWorkers&&p?p:U,r.useCompressionStream=i||i===U&&n.useCompressionStream,(await async function(){const r=gn.find(t=>!t.F);if(r)return Cn(r),new en(r,t,e,b);if(gn.length<m){const r={G:Dn};return Dn++,gn.push(r),new en(r,t,e,b)}return new Promise(r=>{An.push({resolve:r,stream:t,I:e}),zn=n.workerStarvationTimeout,On()})}()).run();function b(t){if(Fn(),t.N)return t.N=!1,In();if(An.length){const[{resolve:e,stream:r,I:n}]=An.splice(0,1);e(new en(t,r,n,b)),On()}else t.T?(Cn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.Y=setTimeout(async()=>{gn=gn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):gn=gn.filter(e=>e!=t)}}function On(){!Rn&&An.length&&Number.isFinite(zn)&&zn>=0&&(Rn=setTimeout(Un,zn))}function Fn(){Rn&&(clearTimeout(Rn),Rn=null)}function Un(){if(Rn=null,An.length){const[{resolve:t,stream:e,I:r}]=An.splice(0,1);t(new en({},e,Tn(r),kn)),On()}}function In(){const t=An.splice(0).map(({resolve:t,stream:e,I:r})=>new Promise(n=>{t(new en({},e,Tn(r),()=>{kn(),n()}))}));return Fn(),Promise.all(t)}function Tn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:U,createWorker:U})}function kn(){Fn(),On()}function Cn(t){const{Y:e}=t;e&&(clearTimeout(e),t.Y=null)}const vn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function Mn(t,e){return _n(t,e,!0)}function Nn(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function _n(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=vn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const jn="HTTP error ",Pn="HTTP Range not supported",Bn="HTTP resource changed",Ln="Writer iterator completed too soon",Wn="Writer not initialized",Zn="Invalid writer (size must be writable)",Vn="Content-Range",Hn="Range",Gn="GET",qn="bytes",Yn=16777216,Kn="writable",Xn=Symbol();class $n{constructor(){this.size=0}init(){this.initialized=!0}}class Jn extends $n{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Tt())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await Po(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==U&&o>=e||!s.length&&i)&&a.close()}})}}class Qn extends $n{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Wn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Kn,{get:()=>e})}writeUint8Array(){}}class to extends Jn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{K:t,X:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{X:r,K:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class eo extends Qn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let r,n=e.$;const o=e.$.length;for(e.$="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.$+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.$=n+e.$}getData(){return this.data+btoa(this.$)}}let ro,no;class oo extends Jn{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),no||(no=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();ro=1==e}catch{ro=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Qe(e.stream());if(ro)return Qe(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.J:r.J.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class ao extends $n{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Kn,{get:()=>r.writable}),e.contentType=t,e.et=tr(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class io extends oo{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function so(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class co extends ao{constructor(t){super(),Object.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return _n(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class uo extends Jn{constructor(t,e){super(),fo(this,t,e)}async init(){await wo(this,xo,Ao),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,ot:a}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{},i=a&&r>=o-a.length;if(n>0&&r<o&&!i)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Pn);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await xo(Gn,t,So(t,o,e));if(206!=r.status)throw new Error(Pn);const s=mo(r);if(s!==U&&s!=o)throw new Error(Pn);Eo(t,r),bo(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return po(this,t,e,xo,Ao)}}class lo extends Jn{constructor(t,e){super(),fo(this,t,e)}async init(){await wo(this,Oo,Ro),super.init()}readUint8Array(t,e){return po(this,t,e,Oo,Ro)}}function fo(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=Yn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function wo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Tt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==T||o)){const n=await e(Gn,t,So(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==qn))throw new Error(Pn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),bo(t,n);const a=ho(n);a===U?await Do(t,e,r):t.size=a,o&&o.length&&mo(n)===t.size-o.length&&(t.ot=o)}}else await Do(t,e,r)}async function po(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,ot:s,size:c,options:u}=t;if(a||i){if(e>=c||0===r)return N;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n(Gn,t,So(t,e,r));if(206!=o.status)throw new Error(Pn);const a=mo(o);if(a!==U&&a!=e)throw new Error(Pn);Eo(t,o),bo(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(Pn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function mo(t){const e=t.headers.get(Vn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function ho(t){const e=t.headers.get(Vn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function yo({headers:t}){return{it:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function bo(t,e){const{checkResourceChanges:r,st:n}=t;r&&!n&&206==e.status&&(t.st=yo(e))}function Eo(t,e){const{checkResourceChanges:r,st:n,size:o}=t;if(r){const t=ho(e);if(t!==U&&o!==U&&t!=o)throw new Error(Bn);if(n){const t=yo(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(Bn)}}}function So(t,e=0,r=1){return Object.assign({},go(t),{[Hn]:qn+"="+(e<0?e:e+"-"+(e+r-1))})}function go({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function Ao(t){await zo(t,xo)}async function Ro(t){await zo(t,Oo)}async function zo(t,e){const r=await e(Gn,t,go(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Do(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,go(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function xo(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(Pn):new Error(jn+(a.statusText||a.status))}function Oo(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(Pn):new Error(jn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Fo extends Jn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new lo(t,e):new uo(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 Uo extends Fo{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Io extends Jn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class To extends Qn{constructor(t){super(),this.ut=t||262144}init(t=0){Object.assign(this,{offset:0,ct:new Uint8Array(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<r;)t*=2;const n=e.ct;e.ct=new Uint8Array(t),e.ct.set(n)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ko extends Jn{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await Promise.all(t.lt.map(jo));t.wt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ht(t){const{wt:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{lt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await Po(s,i,e);else{const a=n-i;o=Bt(await Po(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.ft=Math.max(a,r.ft),o}}class Co extends $n{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===Xn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(Ln);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await _o(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,Kn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Xn)}finally{t.releaseLock()}}}class vo{constructor(t){return Array.isArray(t)&&(t=new ko(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Qe(t)}),t}}class Mo{constructor(t){t.writable===U&&typeof t.next==k&&(t=new Co(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:er(t)});try{t.size=t.size===U?0:t.size}catch{throw new Error(Zn)}return t}}function No(t){return Boolean(t&&t.getData)}async function _o(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function jo(t){return t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t)),t}function Po(t,e,r){return t.readUint8Array(e,r)}function Bo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Jn.prototype.createReadable.call(t,e):t.readable}function Lo(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==U&&(n.filename=r),t.push(n)}}const Wo="filename",Zo="rawFilename",Vo="comment",Ho="rawComment",Go="uncompressedSize",qo="compressedSize",Yo="offset",Ko="diskNumberStart",Xo="lastModDate",$o="rawLastModDate",Jo="lastAccessDate",Qo="rawLastAccessDate",ta="creationDate",ea="rawCreationDate",ra="internalFileAttributes",na="externalFileAttributes",oa="msdosAttributesRaw",aa="msdosAttributes",ia="msDosCompatible",sa="zip64",ca="encrypted",ua="version",la="versionMadeBy",fa="zipCrypto",da="directory",wa="executable",pa="compressionMethod",ma="signature",ha="extraField",ya="unixMode",ba="setuid",Ea="setgid",Sa="sticky",ga=[Wo,Zo,Go,qo,Xo,$o,Vo,Ho,Jo,Qo,ta,ea,Yo,Ko,ra,na,oa,aa,ia,sa,ca,ua,la,fa,da,wa,"symlink",pa,ma,"crc32",ha,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ya,"unixExternalUpper",ba,Ea,Sa,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Aa{constructor(t){ga.forEach(e=>this[e]=t[e])}}const Ra=new Set([1,m,10,h,28789,25461,y,b,E,22613,13]);function za(t,e,r){return t?e?12:16+4*r:0}const Da="File format is not recognized",xa="End of central directory not found",Oa="End of Zip64 central directory locator not found",Fa="Central directory header not found",Ua="Local file header not found",Ia="Zip64 extra field not found",Ta="File contains encrypted entry",ka="Encryption method not supported",Ca="Split zip file",va="Overlapping entry found",Ma="Entry data out of bounds",Na="Ambiguous archive",_a="Encrypted central directory is not supported",ja="Unsafe filename",Pa="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ba="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",La="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Wa="64-bit value exceeds Number.MAX_SAFE_INTEGER",Za="unsorted central directory",Va="unknown version needed to extract",Ha="compressed patched data",Ga="malformed extra field",qa="unknown zip64 extensible data",Ya="wrapped entries count",Ka="appended data",Xa="prepended data",$a="prepended central directory",Ja="trailing central directory data",Qa="duplicate filename",ti="mismatched zip64 end of central directory record",ei="multiple end of central directory records",ri="mismatched local file header (filename)",ni="mismatched local file header (general purpose bit flag)",oi="mismatched local file header (compression method)",ai="mismatched local file header (crc32 or sizes)",ii=/^[a-zA-Z]:/,si=/(^|[\\/])\.\.([\\/]|$)/,ci="utf-8",ui="cp437",li=[[Go,t],[qo,t],[Yo,t],[Ko,e]],fi={[e]:{yt:Ki,bytes:4},[t]:{yt:Xi,bytes:8}},di=BigInt(Number.MAX_SAFE_INTEGER);class wi{constructor(t,e={}){Object.assign(this,{reader:new vo(t),options:e,bt:{Et:new Set,St:[],gt:[]}})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await _o(i),i.size!==U&&i.readUint8Array||(i=new oo(await tr(i.readable)),await _o(i)),i.size<d)throw new Error(Da);const c=a.warnings=[],m=ki(n,a.options),h=m==rt,y=m!=ot,b=Mi(Zi(a,n,$),m),E=function(t,e){if(t===U)return e;if(!Ti(t))throw new Error(Ba);return t}(Zi(a,n,"filenameValidation"),m),S=Zi(a,n,"normalizeFilename"),{At:x,Rt:O}=await Ni(i,y,b);if(!x)throw await async function(t){return await Ii(t)==o}(i)?new Error(Ca):new Error(xa);y&&O>1&&Wi(ei);const F=Wt(x);let I=Ki(F,12),T=Ki(F,16);const k=x.offset,C=Yi(F,20),v=k+d+C,M=i.size-v;M>b&&Wi(Ka),M>0&&Lo(c,Ka);let _=Yi(F,4);const j=i.ft||0;let P,B,L,W,Z,V=Yi(F,6),H=Yi(F,10),G=0,q=p;const Y=T==t||I==t||H==e||V==e;if(T!=t&&V!=e&&(T+=Ui(i,V)),Y){const r=x.offset>=w?await Po(i,x.offset-w,w):N,n=Wt(r);if(r.length==w&&Ki(n,0)==l){T=Ui(i,Ki(n,4))+Xi(n,8);let r=await Po(i,T,p),o=Wt(r);const a=x.offset-w-p;if((r.length<p||Ki(o,0)!=u)&&T!=a&&a>=0){const t=T;T=a,T>t&&(G=T-t),r=await Po(i,T,p),o=Wt(r)}if(r.length<p||Ki(o,0)!=u)throw new Error(Oa);if(L=!0,W=Xi(o,4)>44,W){const t=Math.min(Xi(o,4)-44,i.size-T-p);t>0&&(q+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Yi(r,26);Object.assign(e,{compressionMethod:Yi(r,0),compressedSize:Xi(r,2),uncompressedSize:Xi(r,10),encryptionAlgorithm:Yi(r,18),bitLength:Yi(r,20),flags:Yi(r,22),hashAlgorithm:Yi(r,24),hashData:t.subarray(28,28+n)})}return e}(await Po(i,T+p,t)))}_==e?_=Ki(o,16):_!=Ki(o,16)&&Li(h,c,ti),V==e?V=Ki(o,20):V!=Ki(o,20)&&Li(h,c,ti),H==e?H=Xi(o,32):H!=Xi(o,32)&&Li(h,c,ti),I==t?I=Xi(o,40):I!=Xi(o,40)&&Li(h,c,ti),T=Ui(i,V)+Xi(o,48)+G}}let K=I;const X=x.offset-(L?q+w:0);if(T>=i.size&&(G=i.size-T-I-d,T=i.size-I-d),j!=_)throw new Error(Ca);if(T<0)throw new Error(Da);let J=0,Q=await Po(i,T,I),nt=Wt(Q);if(I){if(Q.length<4)throw new Error(Da);const t=X-I;if(T!=t&&V==_){const e=Ki(nt,J)==s||Boolean(Z&&Z.compressedSize)||yi(nt);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=Ki(Wt(await Po(i,t,4)),0)==s),r){const r=T;T=t,T>r&&(G+=T-r,P=e),Q=await Po(i,T,I),nt=Wt(Q)}}}const at=X-T;if(I!=at&&at>=0&&V==_&&(I=at,Q=await Po(i,T,I),nt=Wt(Q)),T<0||T>=i.size)throw new Error(Da);a.directoryOffset=T,a.directoryLength=K;const it=Vi(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&Q.length>=4&&Ki(nt,0)!=s&&(W||yi(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,Q.length);ct=Q.subarray(t),Q=await it(Q.subarray(0,t),Z),nt=Wt(Q),K=Q.length,st=!0}Z&&!st&&(Q.length<4||Ki(nt,0)==s)&&Lo(c,qa),B=T;const ut=Zi(a,n,"filenameEncoding"),lt=Zi(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!h&&!L;!H&&pt&&(H=bi(nt,Q,J),H&&Lo(c,Ya));for(let t=0;t<H;t++){const o=new hi(i,a.options);if(J+f>Q.length||Ki(nt,J)!=s){if(0==t&&!st&&(W||yi(nt)))throw new Error(_a);throw new Error(Fa)}Si(o,nt,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=Yi(nt,J+4),p=!(w>>8),m=w>>8==3,h=Yi(nt,J+32),y=d+h,b=new Uint8Array(Q.subarray(l,y)),x=b.subarray(0,o.filenameLength),O=b.subarray(o.filenameLength+o.extraFieldLength),F=u||!ut&&Nn(x),I=u||!lt&&Nn(O),T=Ki(nt,J+38),k=T&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Ki(nt,J+42),M=Vi(a,n,"decodeText")||Mn,N=F?ci:ut||ui,_=I?ci:lt||ui;let j=M(x,N,tt);if(j===U&&(j=Mn(x,N)),S){const t=S(j);t!==U&&(j=t)}if(vi(j,E)){const t=new Error(ja);throw t.filename=j,t}let P=M(O,_,et);P===U&&(P=Mn(O,_)),Object.assign(o,{index:t,zt:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:h,offset:v,diskNumberStart:Yi(nt,J+34),internalFileAttributes:Yi(nt,J+36),externalFileAttributes:T,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:x,filenameUTF8:F,commentUTF8:I,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:O,filename:j,comment:P}),gi(o,o,nt,J+6)&&Lo(c,Ga,j),o.offset+=G;const L=Ui(i,o.diskNumberStart)+o.offset;B=Math.min(L,B),L<wt&&Lo(c,Za,j),wt=L,(o.version&r)>63&&Lo(c,Va,j),32&~o.rawBitFlag||Lo(c,Ha,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),q=Boolean(o.unixMode&z),Y=Boolean(512&o.unixMode),K=40960==((o.unixMode===U?Z:o.unixMode)&g),X=!K&&(o.unixMode!==U?!!(73&o.unixMode):m&&!!(73&Z)),$=o.unixMode!==U&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:q,sticky:Y,symlink:K,unixExternalUpper:Z,executable:X,directory:$||rt||p&&C.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new Aa(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.bt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=tr(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.bt,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=bi(nt,Q,J);t&&(H+=t,Lo(c,Ya))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new Aa(o))}catch{}yield ot}let mt=J,ht=Ei(Q.subarray(J))||(st?Ei(ct):U);if(!ht&&!st){const t=T+J,e=Math.min(X-t,65541);e>=6&&(ht=Ei(await Po(i,t,e)))}ht&&(a.digitalSignature=ht,mt=J+6+ht.length),(J!=K&&mt!=K||!st&&J!=I&&mt!=I)&&Li(h,c,Ja),dt&&Li(h,c,Qa);const yt=Zi(a,n,"extractPrependedData"),bt=Zi(a,n,"extractAppendedData"),Et=(h||yt)&&H&&4==B&&await async function(t){const e=await Ii(t);return e==o||808471376==e}(i)?4:0;return h&&(G||H&&B>Et)&&Wi(Xa),(G||H&&B>4)&&Lo(c,Xa),P&&Lo(c,$a),yt&&(a.prependedData=B>Et?await Po(i,Et,B-Et):N),a.comment=C?await Po(i,k+d,C):N,bt&&(a.appendedData=v<i.size?await Po(i,v,i.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class pi{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new wi(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function mi(t,e={}){if(t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t)),t.size<d)return!1;const r=ki(e,{}),n=r!=ot,o=Mi(e[$],r),{At:a,Rt:i}=await Ni(t,n,o);if(!a||r==rt&&i>1)return!1;const s=Yi(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let hi=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const i=this,s=Tt(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:d,extraFieldZip64:w,compressionMethod:p,bitFlag:m,rawBitFlag:h,crc32:y,rawLastModDate:b,uncompressedSize:E,compressedSize:S}=i,{dataDescriptor:g}=m,A=e.localDirectory={},R=e.warnings=[],z=Ui(c,f)+l,D=await Po(c,z,x),O=Wt(D);let F=Zi(i,a,j),I=Zi(i,a,P);const T=mt(Zi(i,a,B)),k=Boolean(T),C=!0===T;if(pt(F,I),F=F&&F.length?F:U,I=I&&I.length?I:U,d&&99!=d.originalCompressionMethod)throw new Error(ar);if(D.length<x||Ki(O,0)!=n)throw new Error(Ua);Si(A,O,4);const{extraFieldLength:v,filenameLength:M}=A,_=A.dataOffset=z+x+M+v,G=Zi(i,a,"checkLocalDirectory"),q=ki(a,i.options),Y=function(t,e){return t===U?e!=ot:Boolean(t)}(G,q),K=Zi(i,a,"checkLocalFilename"),X=function(t,e){return t===U?e==rt:Boolean(t)}(K===U?G:K,q);let $=N;if(X&&(M||v)){const t=await Po(c,z+x,M+v);$=t.subarray(0,M),A.rawExtraField=t.subarray(M)}else A.rawExtraField=v?await Po(c,z+x+M,v):N;X&&(A.rawFilename=$),gi(i,A,O,4,!0)&&Lo(R,Ga),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.zt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Li(i,o,ri),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Li(i,o,ni),e.compressionMethod!=t.compressionMethod&&Li(i,o,oi),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Li(i,o,ai)}(i,A,$,X,Y?U:R);const{lastAccessDate:J,creationDate:Q,uid:tt,gid:et}=A;J&&(e.lastAccessDate=J),Q&&(e.creationDate=Q),tt!==U&&e.uid===U&&(e.uid=tt),et!==U&&e.gid===U&&(e.gid=et);const nt=Zi(i,a,"checkPasswordOnly"),at=i.encrypted&&(!C||nt),it=at&&!d;if(C||(e.zipCrypto=it),at&&!(64&~i.rawBitFlag))throw new Error(ka);const st=k?U:fr(p);if(0!=p&&8!=p&&9!=p&&!st&&!k)throw new Error(ar);if(at){if(!it&&(d.strength<1||d.strength>3))throw new Error(ka);if(!F&&!I)throw new Error(Ta)}if(_+S>c.size)throw new Error(Ma);const ct=S,ut=dt(Zi(i,a,L));wt(ut);let lt=Zi(i,a,"checkOverlappingEntry");const ft=Zi(i,a,"checkOverlappingEntryOnly");ft&&(lt=!0);const{onstart:ht,onprogress:yt,onend:bt}=a,Et=0!=p&&!k,St=k?S-za(at,it,d&&d.strength):E,gt=9==p;let At=Zi(i,a,Z);gt&&(At=!1);const Rt=Zi(i,a,"checkCrc32"),zt=(Rt===U?Zi(i,a,"checkSignature"):Rt)&&!k&&(!at||it||d&&1==d.vendorVersion),Dt={options:{codecType:Vr,password:F,rawPassword:I,zipCrypto:it,encryptionStrength:d&&d.strength,checkCrc32:zt,checkAuthenticationCode:Zi(i,a,"checkAuthenticationCode"),passwordVerification:it&&(g?b>>>8&r:y>>>24&r),outputSize:St,crc32:y,compressed:Et,encrypted:at,useWebWorkers:Zi(i,a,W),useCompressionStream:At,transferStreams:Zi(i,a,V),deflate64:gt,format:st?st.format:U,codecURI:st?st.codecURI:U,compressionMethod:p,rawBitFlag:h,checkPasswordOnly:nt},config:s,O:{signal:ut,size:ct,onstart:ht,onprogress:yt,onend:bt}};let xt,Ot,Ft;lt&&await async function({reader:t,xt:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:i,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,bt:l}){let f=0;if(c){const r=Boolean(u),n=Wt(await Po(t,s+a,24)),c=[[r,!0],[r,!1],[!r,!0],[!r,!1]].map(([t,e])=>Oi(n,t,e)).filter(t=>t&&t.compressedSize==a&&t.uncompressedSize==i),l=c.find(t=>t.crc32==o)||c[0]||Oi(n,r,!0)||Oi(n,r,!1);l?(e.localDirectory.dataDescriptor=l,f=Fi(l.zip64,l.signature)):f=Fi(r,!1)}const d={start:n,end:s+a+f,xt:e},{Et:w,St:p,gt:m}=l;if(!w.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],a=t[r];return o&&xi(e,o)?o:a&&xi(e,a)?a:void 0}(p,d)||m.find(t=>xi(d,t));if(t){const e=new Error(va);throw e.overlappingEntry=t.xt,e}w.add(r),m.push(d),m.length*m.length>p.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(p,m),m.length=0)}}({reader:c,xt:e,index:u,offset:z,crc32:y,compressedSize:S,uncompressedSize:E,dataOffset:_,dataDescriptor:g||A.bitFlag.dataDescriptor,extraFieldZip64:w||A.extraFieldZip64,bt:o});try{if(!ft){nt&&(t=new WritableStream),t=new Mo(t),await _o(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(St,S,Et)),({writable:xt}=t);const e=Qe(c.createReadable({offset:_,size:ct})),{outputSize:r}=await xn({readable:e,writable:xt},Dt);if(wt(ut),r!=St)throw Object.assign(new Error(mr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=Dt;if(r!==U?t.size+=r:Zt(e)&&e.outputSize!==U&&(t.size+=e.outputSize),!nt||!Zt(e)||e.message!=ge)throw Ot=e,Ft=!0,e}finally{if((No(t)||!Zi(i,a,H))&&xt&&!xt.locked){const t=xt.getWriter();if(Ft)try{await t.abort(Ot)}catch{}else await t.close()}}return nt||ft?U:t.getData?t.getData():xt}};function yi(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Ki(t,r))return!0;return!1}function bi(t,e,r){let n=0;for(;r+f<=e.length&&Ki(t,r)==s;)r+=f+Yi(t,r+28)+Yi(t,r+30)+Yi(t,r+32),n++;return n%65536?0:n}function Ei(t){if(t.length>=6){const e=Wt(t);if(Ki(e,0)==i){const r=Yi(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function Si(t,e,r){const n=t.rawBitFlag=Yi(e,r+2),o=!(1&~n),a=Ki(e,r+6);Object.assign(t,{encrypted:o,version:Yi(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:Hi(a),filenameLength:Yi(e,r+22),extraFieldLength:Yi(e,r+24)})}function gi(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Wt(a);let c=0,u=!1;try{for(;c<a.length;){const t=Yi(s,c),e=Yi(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=Yi(r,n+4);Object.assign(e,{signature:Ki(r,n+10),crc32:Ki(r,n+10),compressedSize:Ki(r,n+14),uncompressedSize:Ki(r,n+18)});const f=i.get(1);if(f)(function(t,e,r){e.zip64=!0;const n=Wt(t.data),o=li.filter(([t,r])=>e[t]==r),a=o.reduce((t,[,e])=>t+fi[e].bytes,0);if(t.data.length<a){if(r)return!1;throw new Error(Ia)}const i=[];try{for(let t=0,e=0;t<o.length;t++){const[,r]=o[t],a=fi[r];i.push(a.yt(n,e)),e+=a.bytes}}catch(t){if(r)return!1;throw t}return o.forEach(([r],n)=>{e[r]=t[r]=i[n]}),!0})(f,e,o)||(u=!0),e.extraFieldZip64=f;else if(li.some(([t,r])=>e[t]==r)){if(!o)throw new Error(Ia);u=!0}const d=i.get(28789);d&&(Ai(d,Wo,Zo,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(Ai(w,Vo,Ho,e,t),e.extraFieldUnicodeComment=w);const p=i.get(m);p&&(99==l||e.encrypted)&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=qi(n,4);Object.assign(t,{vendorVersion:qi(n,0),vendorId:qi(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Yi(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(p,e,l),e.extraFieldAES=p):(p&&(u=!0),e.compressionMethod=l);const S=i.get(13);S&&(Ri(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(Ri(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=Yi(r,o),a=Yi(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Gi(o),lastAccessDate:Gi(a),creationDate:Gi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let z;if(R&&(z=zi(R,e,!1),e.extraFieldUnix=R),!z){const t=i.get(b);t&&(zi(t,e,!0),e.extraFieldInfoZip=t)}const D=i.get(h);D&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=qi(n,0),a=[],i=[];r?(1&~o||(a.push(Xo),i.push($o)),2&~o||(a.push(Jo),i.push(Qo)),4&~o||(a.push(ta),i.push(ea))):t.data.length>=5&&(a.push(Xo),i.push($o));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=Ki(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const x=i.get(y);return x&&(e.extraFieldUSDZ=x),u}function Ai(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new Qt;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=Ki(a,1),u=qi(a,0);Object.assign(t,{version:u,[e]:Mn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Ki(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ri(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Ki(r,0))),lastModDate:new Date(1e3*(0|Ki(r,4)))};t.data.length>=12&&(n.uid=Yi(r,8),n.gid=Yi(r,10)),Object.assign(t,n),Object.assign(e,n)}function zi(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=qi(n,e++),i=qi(n,e++);o=Di(t.data.subarray(e,e+i)),e+=i;const s=qi(n,e++);a=Di(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=Yi(n,0),a=Yi(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function Di(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function xi(t,e){return t.start<e.end&&e.start<t.end}function Oi(t,e,r){const n=r?4:0;if(t.byteLength<Fi(e,r)||r&&Ki(t,0)!=a)return U;const o=Ki(t,n);let i,s;try{e?(i=Xi(t,n+4),s=Xi(t,n+12)):(i=Ki(t,n+4),s=Ki(t,n+8))}catch{return U}return{signature:r,zip64:e,crc32:o,compressedSize:i,uncompressedSize:s}}function Fi(t,e){return(t?20:12)+(e?4:0)}function Ui(t,e){return t.ht?t.ht(e):0}async function Ii(t){return Ki(Wt(await Po(t,0,4)))}function Ti(t){return t===rt||t===nt||t===ot}function ki(t,e){return Ci(t,Ci(e,nt))}function Ci(t,e){const r=t.strictness;if(r!==U){if(!Ti(r))throw new Error(Pa);return r}const n=t.checkAmbiguity;return n===U?e:n?rt:e==ot?ot:nt}function vi(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(si.test(t)||t.startsWith("/")||t.startsWith("\\")||ii.test(t))||e==rt&&(r.includes(".")||r.includes("")||t.includes("\0"))}function Mi(t,r){if(t!==U){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(La);return e}return r==rt?0:r==ot?1/0:e}async function Ni(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={Ot:64};let i,s,c=0;for await(const[r,u,l,f,w]of _i(t,o)){const o=Yi(r,f+20);if(w+d+o==n){const o=await Pi(t,r,u,f,w,n,a);if(2==o){if(i||(i=ji(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=ji(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of _i(t,o)){const o=ji(c,u,l);a||(a=o);const f=await Pi(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{At:i,Rt:c}}async function*_i(t,e){const r=t.size-e,n=await Po(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Ki(o,t)==c&&(yield[o,r,n,t,r+t])}function ji(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function Pi(r,n,o,a,i,c,u){const f=Yi(n,a+10),d=Ki(n,a+12),p=Ki(n,a+16);if(f==e||d==t||p==t)return await Bi(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const m=Yi(n,a+6);for(const t of[i-d,Ui(r,m)+p])if(await Bi(r,n,o,t,c,u)==s)return 2;return 0}async function Bi(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?Ki(e,n-r):a.Ot>0?(a.Ot--,Ki(Wt(await Po(t,n,4)),0)):U}function Li(t,e,r){t?Wi(r):Lo(e,r)}function Wi(t){const e=new Error(Na);throw e.reason=t,e}function Zi(t,e,r){return e[r]===U?t.options[r]:e[r]}function Vi(t,e,r){return ft(Zi(t,e,r))}function Hi(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<F?F:o}function Gi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function qi(t,e){return t.getUint8(e)}function Yi(t,e){return t.getUint16(e,!0)}function Ki(t,e){return t.getUint32(e,!0)}function Xi(t,e){const r=t.getBigUint64(e,!0);if(r>di)throw new Error(Wa);return Number(r)}var $i=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Na,ERR_BAD_FORMAT:Da,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Fa,ERR_CODEC_OUT_OF_MEMORY:yr,ERR_ENCRYPTED:Ta,ERR_ENCRYPTED_CENTRAL_DIRECTORY:_a,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Ma,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Oa,ERR_EOCDR_NOT_FOUND:xa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ia,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:br,ERR_INVALID_FILENAME_VALIDATION:Ba,ERR_INVALID_MAX_APPENDED_DATA_SIZE:La,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:Pa,ERR_INVALID_UNCOMPRESSED_SIZE:mr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ua,ERR_OVERLAPPING_ENTRY:va,ERR_SPLIT_ZIP_FILE:Ca,ERR_UNSAFE_FILENAME:ja,ERR_UNSUPPORTED_COMPRESSION:ar,ERR_UNSUPPORTED_ENCRYPTION:ka,ERR_UNSUPPORTED_UINT64:Wa,ERR_WORKER_STARTUP_TIMEOUT:qr,WARNING_APPENDED_DATA:Ka,WARNING_COMPRESSED_PATCHED_DATA:Ha,WARNING_DUPLICATE_FILENAME:Qa,WARNING_MALFORMED_EXTRA_FIELD:Ga,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ni,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:oi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ai,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ri,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ti,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:ei,WARNING_PREPENDED_CENTRAL_DIRECTORY:$a,WARNING_PREPENDED_DATA:Xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ja,WARNING_UNKNOWN_VERSION:Va,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:qa,WARNING_UNSORTED_CENTRAL_DIRECTORY:Za,WARNING_WRAPPED_ENTRIES_COUNT:Ya,ZipReader:wi,ZipReaderStream:pi,isZipFile:mi});const Ji="File already exists",Qi="Zip file comment exceeds 64KB",ts="Invalid zip file comment (must be a Uint8Array)",es="File entry comment exceeds 64KB",rs="Invalid file entry comment (must be a string)",ns="Invalid date (must be a valid Date instance)",os="File entry name exceeds 64KB",as="Version exceeds 65535",is="The strength must equal 1, 2, or 3",ss="Encryption is not supported in USDZ files",cs="Split zip files are not supported in USDZ files",us="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",ls="Invalid extra field (must be a Map)",fs="Invalid extra field type (must be integer 0..65535)",ds="Invalid extra field data (must be a Uint8Array)",ws="Extra field data exceeds 64KB",ps=-2147483648,ms=2147483647,hs=BigInt(0),ys=BigInt("0x7fffffffffffffff"),bs="Zip64 is not supported (set the 'zip64' option to 'true')",Es="Undefined uncompressed size",Ss="Undefined compression method",gs="Undefined CRC32",As="Undetermined size",Rs="Undefined reader",zs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",Ds="Zip file not empty",xs="Invalid uid (must be integer 0..2^32-1)",Os="Invalid gid (must be integer 0..2^32-1)",Fs="Invalid UNIX mode (must be integer 0..65535)",Us="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Is="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ts="Invalid msdosAttributesRaw (must be integer 0..255)",ks="Invalid msdosAttributes (must be an object with boolean flags)",Cs="Invalid level (must be integer 0..9)",vs="Signature data exceeds 64KB",Ms="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ns="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",_s="compression unavailable",js="clamped last modification date",Ps=new Uint8Array([7,0,2,0,65,69,3,0,0]),Bs="infozip",Ls="unix",Ws=[8,9,5,3];let Zs=0;const Vs=[];class Hs{constructor(t,e={}){t=new Mo(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[X])throw new Error(cs);Object.assign(this,{writer:t,Ft:o,options:e,Ut:new Map,It:new Set,offset:e[K]===U?t.size||t.writable.size||0:e[K],Tt:e[K]===U?0:e[K]-(t.size||t.writable.size||0),kt:new Set,Ct:[],warnings:[],vt:0,Mt:0,Nt:U,_t:!1})}prependZip(t){return Ks(this,async function(t,e){if(t.It.size)throw new Error(Ds);await t.jt(e)}(this,t))}appendZip(t){return Ks(this,this.jt(t))}async jt(t){const e=this,{kt:r,It:n,Ut:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new vo(t),await _o(t),t.size!==U&&t.readUint8Array||(t=new oo(await tr(t.readable)),await _o(t));const{ZipReader:r}=await Promise.resolve().then(function(){return $i}),i=new r(t),s=await i.getEntries();await i.close(),await _o(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Ji);n.add(t),c.push(t)}),e.Pt=!0;const{Bt:f}=e;e.Bt=new Promise(t=>u=()=>{e.Pt=!1,t()}),await f,e.Ft&&(delete e.Ft,await async function(t){return Wt(await Po(t,0,4)).getUint32(0,!0)==o}(t)||(await Sc(e.writer,bc()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>yc(e,t)-yc(e,r));let s=0;for(const r of i){const n=yc(e,r);await mc(t,e,s,n-s),dc(o,await hc(e,n))&&await o.closeDisk(),a.set(r,{offset:wc(t,o),diskNumberStart:lc(o)}),s=n}await mc(t,e,s,n-s)}else{const o=t.offset;await mc(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+yc(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=o;f=pc(f||N),t.extraFieldAES&&(l=99);const h=Nc(f),y=Boolean(u)&&u.uncompressedSize!==U,b=Boolean(u)&&u.compressedSize!==U,E=-7&Pc(w,p,m,i,l)|w<<1,{Lt:S,Wt:g}=_c({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Zt:b,Vt:y,extraFieldLength:h}),{crc32:A}=t;A!==U&&Cc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{Ht:!0,Vt:y,Zt:b,offset:R,diskNumberStart:z,Gt:!1,qt:N,Yt:N,Kt:N,Xt:N,$t:N,rawExtraField:f,Jt:N,Lt:S,Wt:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{kt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[Q];if(i!==U){const{Qt:t,te:r}=Js(i,mt(Dc(e,a,B)),Dc(e,a,Xo));delete a[Q],a=Object.assign(t,r,a)}if(Dc(e,a,da)&&!n.endsWith(D)&&(n+=D),e.It.has(n))throw new Error(Ji);e.It.add(n),Zs<Tt().maxWorkers?Zs++:await new Promise(t=>Vs.push(t));try{return await async function(e,n,o,a){const i=Qs(e,n,a);({name:n}=i);const s=tc(e,n,a),{comment:c}=s,u=a[ha];e.Ut.set(n,U);const l=e.Nt,f={};let d,w;s.ee.keepOrder&&(f.re=new Promise(t=>d=t)),e.Nt=f;try{const{ee:c}=s;0==c.level||c.compressionMethod!==U||c.ne||await Jr(Tt())||(c.level=0,Lo(e.warnings,_s,n));const u=await async function(t,e,{ee:r},n){if(r.ne&&!e&&!Dc(t,n,da))throw new Error(Rs);let o;if(e){if(e=new vo(e),await _o(e),!e.readable&&!e.readUint8Array)throw new Error(zs);({size:o}=e)}return Object.assign({reader:e},rc(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=fc(e.writer),m=lc(e.writer);let h=a.crc32===U?a[ma]:a.crc32;const y=u.ee.encrypted&&!c.zipCrypto;if(c.ne&&!c.oe&&y&&(h=U),c.ne&&o&&!y&&h===U)throw new Error(gs);const b=oc(a=Object.assign({},a,i.ee,s.ee,u.ee,{signature:a[ma],crc32:h,offset:e.offset-p,diskNumberStart:m,[X]:e.options[X]}));b.ae&&Lo(e.warnings,js,n);const E=sc(a),S=Nc(b.ie,E.se);w=await async function(e,n,o,a,i){const{Ut:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ce:f,signal:d}=i,{ue:w,xt:p,le:m,fe:h}=a,y=e.options[X];let b,E,S,g,A,R,z,D=p,O=0;const F=u&&m?m.re:U;s.set(n,D);try{i.bufferedWrite||!u||e.Pt||e.vt||e.Mt||!l&&!f?(b=!0,e.vt++,z=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:I}),z.size=0,await _o(c)):(E=!0,e.Mt++,z=c,await F,await T()),await _o(z);const p=fc(c);e.Ft&&!b&&await Ec(e,c),y&&!b&&ac(a,e.offset-p);const{ie:m}=w;b||await k();const h=lc(c),S=wc(e,c);if(D.diskNumberStart=h,b||(A=!0,R=c.size,await Sc(z,m)),D=await async function(e,n,{diskNumberStart:o,re:a},i,s,c){const{ue:u,de:l,we:f}=i,{Lt:d,Wt:w,lastModDate:p,rawLastModDate:m,encrypted:h,compressed:y,version:b,compressionMethod:E,qt:S,pe:g,Kt:A,me:R,he:z,Xt:D,$t:x,Yt:O}=u,{se:F}=l,{rawFilename:I,lastAccessDate:T,creationDate:k,password:C,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Ht:j,Vt:P,Zt:B,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:q,Jt:Y,useWebWorkers:K,transferStreams:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht,useCompressionStream:yt,ne:bt,oe:Et,format:St,codecURI:gt}=c,At={re:a,versionMadeBy:H,zip64:_,Ht:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:I,commentUTF8:Boolean(N),rawComment:G,qt:S,pe:g,Kt:A,Xt:D,$t:x,Yt:O,rawExtraField:q,Jt:Y,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht};let{crc32:Rt,uncompressedSize:zt}=c,Dt=0;bt||(zt=0);const{writable:xt}=n;if(e){const o=e.size,a=Qe(Bo(e,{size:o})),i={options:{codecType:Zr,inputSize:o,level:M,rawPassword:v,password:C,encryptionStrength:et,zipCrypto:h&&L,passwordVerification:h&&L&&m>>8&r,computeCrc32:!bt,compressed:y&&!bt,encrypted:h&&!Et,useWebWorkers:K,useCompressionStream:yt,transferStreams:X,format:St,codecURI:gt,compressionMethod:E},config:s,O:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await xn({readable:a,writable:xt},i);if(Dt=e.outputSize,n.size+=Dt,wt(tt),bt||(zt=e.inputSize,h&&!L||(Rt=e.crc32)),!B&&Dt>=t||!P&&zt>=t)throw new Error(bs)}catch(t){const{outputSize:e}=i;throw e!==U?n.size+=e:Zt(t)&&t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,ue:n,de:o},{zip64:a,zipCrypto:i,ne:s,dataDescriptor:c}){const{Wt:u,encrypted:l}=n,{ye:f,be:d}=o;l&&!i&&!s||t===U||(Cc(u,10,t),c&&Cc(f,d,t)),a?c&&(vc(f,d+4,BigInt(e)),vc(f,d+12,BigInt(r))):(Cc(u,14,e),Cc(u,18,r),c&&(Cc(f,d+4,e),Cc(f,d+8,r)))}({crc32:Rt,compressedSize:Dt,uncompressedSize:zt,ue:u,de:l},c),W&&await Sc(n,F),Object.assign(At,{uncompressedSize:zt,compressedSize:Dt,lastModDate:p,rawLastModDate:m,creationDate:k,lastAccessDate:T,encrypted:Boolean(h),zipCrypto:Boolean(L),size:f+Dt,compressionMethod:E,version:b,Lt:d,Wt:w,signature:Rt,crc32:!h||L||bt?Rt:U,me:R,he:z,Vt:P,Zt:B}),At}(o,z,D,a,Tt(),i),b||(A=!1),s.set(n,D),D.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),F]),await T(),e.Ft&&await Ec(e,c),g=!0,R=c.size,await k(),D.diskNumberStart=lc(c),D.offset=wc(e,c),y){const t=a.we;ac(a,e.offset-fc(c)),D.size+=a.we-t}!function({rawFilename:t,encrypted:e,zip64:r,pe:n,crc32:o,compressedSize:a,uncompressedSize:i,Vt:s,Zt:c},u,{dataDescriptor:l,ne:f}){if(l||((!e||f&&o!==U)&&Cc(u,14,o),c||Cc(u,18,a),s||Cc(u,22,i)),r&&n){const e=x+Nc(t)+4;vc(u,e,BigInt(i)),vc(u,e+8,BigInt(a))}}(D,w.Ee,i),await Sc(c,w.ie),await gc(z.readable,c,d,t=>O+=t),c.size+=z.size,g=!1}else D.diskNumberStart=h,D.offset=S;return e.offset+=D.size,D}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=O)}throw s.delete(n),t}finally{if(b&&e.vt--,E&&e.Mt--,h&&h(F),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function T(){e.Pt=!0;const{Bt:t}=e;e.Bt=new Promise(t=>S=()=>{e.Pt=!1,t()}),await t}async function k(){dc(c,Nc(w.ie))&&await c.closeDisk()}}(e,n,o,{ue:b,de:E,we:S,xt:f,le:l,fe:d},a)}catch(t){throw e.Ut.delete(n),t}finally{d&&d(l&&l.re)}return Object.assign(w,{name:n,comment:c,extraField:u}),new Aa(w)}(e,n,o,a)}catch(t){throw e.It.delete(n),t}finally{const t=Vs.shift();t?t():Zs--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),Ks(a,s)}remove(t){const{It:e,Ut:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{kt:a,writer:w}=this,{writable:p}=w;if(o._t)return Ys(w);if(!(r instanceof Uint8Array))throw new Error(ts);if(Nc(r)>e)throw new Error(Qi);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Ct.map(t=>t.Se));const m=o.Ct.filter(t=>t.ge&&!t.Ae);if(m.length){const t=m.map(t=>t.error);m.forEach(t=>t.Ae=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Re:a,ze:w}=cc(r.Ut),{De:p,xe:m,Oe:h}=await async function(r,n,o){const{Ut:a,writer:i}=r,c=new Uint8Array(n);await _o(i);let u=0,l=0,d=lc(i),w=fc(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:m,rawFilename:h,qt:y,Yt:b,Kt:E,Xt:S,$t:g,rawExtraField:A,Jt:R,rawComment:z,versionMadeBy:D,Lt:x,Wt:O,Vt:F,Zt:U,Gt:I,Fe:T,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Nc(y,b,E,S,g,A,R),j=f+Nc(h,z)+_;dc(i,u+j-l)&&(await Sc(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=lc(i),w=fc(i)),F||Cc(O,18,M),U||Cc(O,14,N),(T||I)&&n.version<45&&kc(O,0,45);const P=uc(j);if(P.Ue(s),P.Ie(D),P.Te(x.subarray(0,24)),P.Ie(_),P.Ie(Nc(z)),P.Ie(I?e:v),P.Ie(k),P.Ue(C),P.Ue(T?t:m),P.Te(h),P.Te(y),P.Te(b),P.Te(E),P.Te(S),P.Te(g),P.Te(A),P.Te(R),P.Te(z),Mc(c,P.ct,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new Aa(n))}catch{}}return await Sc(i,l?c.slice(l):c),{De:{diskNumber:d,diskOffset:w},xe:{diskNumber:lc(i),ke:p},Oe:c}}(r,a,o),y=await async function(t,r,n){const o=Oc(t,n,J);if(o){const n=await o(r),a=Nc(n);if(a>e)throw new Error(vs);const s=uc(6+a);s.Ue(i),s.Ie(a),s.Te(n);const{writer:c}=t;return dc(c,Nc(s.ct))&&await c.closeDisk(),await Sc(c,s.ct),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{De:s,xe:f,Ce:w,ze:p}=a;let{Re:m}=a,h=r.Ut.size,y=s.diskNumber,b=wc(r,s);const E=Nc(n);if(E>e)throw new Error(Qi);let S=Dc(r,o,sa),g=lc(i);if(dc(i,(S?98:d)+E)&&g++,b>=t||m>=t||h>=e||g>=e){if(!1===S)throw new Error(bs);S=!0}else S===U&&p&&(S=!0);const A=uc(S?98:d);dc(i,Nc(A.ct)+E)&&await i.closeDisk(),g=lc(i);let R=g==f.diskNumber?f.ke:0;S&&(A.Ue(u),A.ve(44),A.Ie(45),A.Ie(45),A.Ue(g),A.Ue(y),A.ve(R),A.ve(h),A.ve(m),A.ve(b),A.Ue(l),A.Ue(g),A.ve(BigInt(wc(r,i))+BigInt(m)+BigInt(w)),A.Ue(g+1),Dc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,h=e,b=t,m=t),A.Ue(c),A.Ie(g),A.Ie(y),A.Ie(R),A.Ie(h),A.Ue(m),A.Ue(b),A.Ie(E),await Sc(i,A.ct),E&&await Sc(i,n)}(r,n,o,{De:p,xe:m,Re:a,Ce:y,ze:w})}(o,r,n),o._t=!0,!No(w)&&Dc(o,n,H)||await p.getWriter().close(),Ys(w)}[_](){return this.close()}}class Gs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Hs(r,t),this.kt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Xs(e,t)}}()}});return $s(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return $s(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.kt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Xs(r,t),t}try{return await r.close(t,e)}catch(t){throw await Xs(r,t),t}}}class qs extends Promise{then(t,e){const{Me:r}=this;return r&&(r.Ae=!0),super.then(t,e)}}function Ys(t){return t.getData?t.getData():t.writable}function Ks(t,e){const r=new qs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Me=n,n.Se=Promise.prototype.then.call(r,U,t=>Object.assign(n,{ge:!0,error:t})),t.Ct.push(n),r}async function Xs(t,e){try{await t.writer.writable.abort(e)}catch{}}function $s(t,e,r){t.kt.add(e),e.catch(t=>{try{r(t)}catch{}})}function Js(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(Ms);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:m,extraFieldAES:h,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[q]=!0);const D=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Ra.has(r)||e.set(r,t.data)}),e.size)return e}}(E);D&&(z[ha]=D),A===U&&R===U||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?Ls:Bs});const x={};if(e&&!g)if(Object.assign(x,{uncompressedSize:f,crc32:p,compressionMethod:m}),e!==at&&Object.assign(x,{encrypted:d,zipCrypto:w,encryptionStrength:h?h.strength:U}),S&&(x.dataDescriptor=S.dataDescriptor,x[G]=Ws[S.level]),n===U)x.rawLastModDate=c;else if(e!==at&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<F?e=F:e>O&&(e=O),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Ns);return{Qt:z,te:x}}function Qs(n,o,a){let i=Dc(n,a,ia),s=Dc(n,a,la,i?20:768);const c=Dc(n,a,wa),u=Fc(n,a,"uid"),l=Fc(n,a,"gid");let f=Fc(n,a,ya),d=Dc(n,a,"unixExtraFieldType"),w=Dc(n,a,ba),p=Dc(n,a,Ea),m=Dc(n,a,Sa);if(yt(u,t,xs),yt(l,t,Os),yt(f,e,Fs),d!==U&&d!==Bs&&d!==Ls)throw new Error(Us);if(d===Ls&&(u!==U&&u>e||l!==U&&l>e))throw new Error(Is);d!==U||u===U&&l===U||(d=Bs);let h=Fc(n,a,oa),y=Dc(n,a,aa);const b=h!==U||y!==U;if(u!==U||l!==U||f!==U||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),yt(h,r,Ts),y&&(typeof y!==C||Array.isArray(y)))throw new Error(ks);if(s>e)throw new Error(as);let E=Dc(n,a,na);const S=E!==U;S||(E=0),!a[da]&&o.endsWith(D)&&(a[da]=!0);const x=Dc(n,a,da);if(x?(o.endsWith(D)||(o+=D),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==U||Boolean(w||p||m);f=f===U?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),m?f|=512:m=Boolean(512&f),S&&!t||(x?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:h,msdosAttributes:y}=function(t,e){if(t!==U)t&=r;else if(e!==U){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===U&&(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,y)),b&&(E=E&t|h&r);const O=E>>16&e,F=f!==U&&40960==(f&g);return{name:o,ee:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:O,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:F,setuid:w,setgid:p,sticky:m,msdosAttributesRaw:h,msdosAttributes:y}}}function tc(t,r,n){const o=Oc(t,n,"encodeText")||ee;let a=o(r,tt);if(a===U&&(a=ee(r)),Nc(a)>e)throw new Error(os);const i=n[Vo]||"";if(typeof i!=v)throw new Error(rs);let s=o(i,et);if(s===U&&(s=ee(i)),Nc(s)>e)throw new Error(es);const c=Dc(t,n,ua);if(c!==U&&c>e)throw new Error(as);const u=xc(t,n,Xo,new Date),l=Dc(t,n,$o),f=xc(t,n,Jo),d=xc(t,n,ta),w=Dc(t,n,ra,0),p=mt(Dc(t,n,B)),m=Boolean(p),h=!0===p;let y=Dc(t,n,j),b=Dc(t,n,P);pt(y,b),y=y&&y.length?y:U,b=b&&b.length?b:U;const E=Fc(t,n,"encryptionStrength",3),S=Dc(t,n,fa),g=Dc(t,n,"extendedTimestamp",!0),A=Dc(t,n,"ntfsTimestamp"),R=Dc(t,n,"keepOrder",!0),z=Dc(t,n,W),D=Dc(t,n,V),x=Dc(t,n,"bufferedWrite"),O=Oc(t,n,"createTempStream"),F=Dc(t,n,"dataDescriptorSignature",!0),I=dt(Dc(t,n,L));wt(I);const T=Dc(t,n,q,!jc(a)||!jc(s)),k=Dc(t,n,pa),C=m||k===U?U:fr(k);if(!m&&k!==U&&0!==k&&8!==k&&!C)throw new Error(ar);let M=Fc(t,n,G);if(yt(M,9,Cs),t.options[X]){if(y!==U||b!==U)throw new Error(ss);M===U&&k===U&&(M=0)}m&&(M=bt(n[G]));let N=Dc(t,n,Z),_=Dc(t,n,Y);x&&_===U&&(_=!1),(_===U||S&&!h)&&(_=!0),M!==U&&6!=M&&(N=!1);const H=Dc(t,n,sa);if(!(S||y===U&&b===U||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(is);const K=ec(n[ha]),$=ec(n.localExtraField),J=ec(n.centralExtraField);return{comment:i,ee:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,ne:m,oe:h,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:D,bufferedWrite:x,createTempStream:O,dataDescriptorSignature:F,signal:I,useUnicodeFileNames:T,compressionMethod:k,format:C?C.format:U,codecURI:C?C.codecURI:U,Ne:C?C.versionNeeded:U,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:K,_e:$,Jt:J}}}function ec(t){if(!t)return N;if(!(t instanceof Map))throw new Error(ls);let r=0,n=0;t.forEach((t,n)=>{if(ht(n,e,fs),!(t instanceof Uint8Array))throw new Error(ds);if(Nc(t)>e)throw new Error(ws);r+=4+Nc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{kc(a,n,e),kc(a,n+2,Nc(t)),Mc(o,t,n+4),n+=4+Nc(t)}),o}function rc(e,r,n,o,a){const{ne:i,oe:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:m}=o,h=0,y=0,b=!1;if(i&&r){if(y=a[Go],y===U)throw new Error(Es);if(m===U)throw new Error(Ss)}const E=!0===w,S=Dc(e,a,ca);if(r&&s&&!S&&Nc(u,l))throw new Error(us);const g=r&&(Boolean(u&&Nc(u)||l&&Nc(l))||s&&S);r||(p=0,m=0);const A=za(g,c,f);r&&(i?(a.uncompressedSize=y,h=n===U?Uc(y)+A:n+(s?0:A)):n===U?(d=!0,(w||w===U)&&(w=b=!0,h=4294967296)):(a.uncompressedSize=y=n,h=(Ic(m,p)?Uc(y):y)+A));const R=!(g||r&&(0!==n||i)||Ic(m,p));R&&Dc(e,a,Y)===U&&(d=!1);const z=E||b||y>=t,D=E||h>=t;if(z||D){if(!1===w)throw new Error(bs);w=!0}return w=w||!1,{je:h,ee:{dataDescriptor:d,ce:R,zip64:w,Ht:E,Pe:b,Vt:z,Zt:D,uncompressedSize:y,level:p,compressionMethod:m,encrypted:g}}}function nc(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function oc(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,_e:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,ne:R,encrypted:z,Vt:D,Zt:I,uncompressedSize:T,Pe:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&Ic(M,c);let j;const P=R||!_,B=u&&(t.bufferedWrite||!d||!D&&!I||P&&!k),L=B||u&&d&&(D||I);if(u&&(D||I)){const t=20,e=uc(t);if(e.Ie(1),e.Ie(t-4),j=e.ct,B&&(e.ve(T),P)){const t=za(z,l,S);e.ve(R?0:T+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=uc(Nc(Ps)+2);t.Ie(m),t.Te(Ps),W=t.ct,W[8]=S}else W=N;if(g){const t=Rc(o),e=(q=t)>=ps&&q<=ms;if(e){const e=9+(i?4:0)+(s?4:0),r=uc(e);H=1+(i?2:0)+(s?4:0),G=t,r.Ie(h),r.Ie(e-4),r.Be(H),r.Ue(t),i&&r.Ue(zc(Rc(i))),s&&r.Ue(zc(Rc(s))),V=r.ct}else V=N;if(A===U?!e||Boolean(i||s):A)try{const t=Ac(o),e=uc(36);e.Ie(10),e.Ie(32),e.Le(4),e.Ie(1),e.Ie(24),e.ve(t),e.ve(i?Ac(i):t),e.ve(s?Ac(s):t),Z=e.ct}catch{Z=N}else Z=N}else Z=V=N;var q;let Y;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Bs||r===U&&n===U)if(o!=Ls||r===U&&n===U)Y=N;else{const t=uc(8);t.Ie(E),t.Ie(4),t.Ie((r===U?0:r)&e),t.Ie((n===U?0:n)&e),Y=t.ct}else{const t=ic(r===U?0:r),e=ic(n===U?0:n),o=3+t.length+e.length,a=uc(4+o);a.Ie(b),a.Ie(o),a.Be(1),a.Be(t.length),a.Te(t),a.Be(e.length),a.Te(e),Y=a.ct}}catch{Y=N}M===U&&(M=_?8:0),v===U&&(v=0!=M||w||z?20:10);const{Ne:K}=t;_&&K!==U&&(v=v>K?v:K),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&C!==U&&(W[4]=1),kc(Wt(W),9,M),M=99);const $=L?Nc(j):0,J=$+Nc(W,V,Z,Y,p,y);if(J+(t[X]?67:0)>e)throw new Error(ws);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=Q<F?F:Q>O?O:Q,et=Nc(V)?new Date(1e3*Rc(o)):Nc(Z)?o:tt,{Lt:rt,Wt:nt,rawLastModDate:ot}=_c({version:v,bitFlag:Pc(c,f,d,z,M),compressionMethod:M,uncompressedSize:T,lastModDate:tt,rawLastModDate:a,rawFilename:r,Zt:I,Vt:D,extraFieldLength:J}),at=uc(x+Nc(r)+J),it=at.ct,st=Wt(it);return at.Ue(n),at.Te(rt),at.Te(r),L&&at.Te(j),at.Te(W),at.Te(V),at.Te(Z),at.Te(Y),at.Te(p),at.Te(y),d&&(I||Cc(st,18,0),D||Cc(st,22,0)),{ie:it,Ee:st,Lt:rt,Wt:nt,lastModDate:et,ae:et===tt&&Q.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,me:H,he:G,qt:N,pe:$,Kt:V,Xt:Z,$t:Y,Yt:W,extraFieldLength:J}}function ac(t,e){const{ue:r}=t;let{ie:n,extraFieldLength:o}=r,a=64-(e+Nc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);kc(s,0,y),kc(s,2,a-4);const c=n;r.ie=n=new Uint8Array(Nc(c)+a),Mc(n,c),Mc(n,i,Nc(c));const u=Wt(n);kc(u,28,o+a),r.Ee=u,t.we+=a}function ic(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function sc({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(i=4,Cc(n,0,a))),{se:o,ye:n,be:i}}function cc(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Yt:i,rawComment:s,Xt:c,$t:u,rawExtraField:l,Jt:d,me:w,he:p,Ht:m,uncompressedSize:y,compressedSize:b}=a;let{Vt:E,Zt:S}=a;m||(E&&y<t&&(E=a.Vt=!1),S&&b<t&&(S=a.Zt=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=uc(t);e.Ie(1),e.Ie(t-4),E&&e.ve(y),S&&e.ve(b),g&&e.ve(a.offset),A&&e.Ue(a.diskNumberStart),R=e.ct}else R=N;if(a.qt=R,a.Fe=g,a.Gt=A,p===U)z=N;else{const t=uc(9);t.Ie(h),t.Ie(5),t.Be(w),t.Ue(p),z=t.ct}a.Kt=z;const D=Nc(R,i,c,u,z,l,d);if(D>e)throw new Error(ws);n+=f+Nc(r,s)+D}return{Re:n,ze:o}}function uc(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{ct:e,Be:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Ie:t=>{kc(r,n,t),n+=2},Ue:t=>{Cc(r,n,t),n+=4},ve:t=>{vc(r,n,BigInt(t)),n+=8},Te:t=>{Mc(e,t,n),n+=Nc(t)},Le:t=>n+=t}}function lc(t){const{diskNumber:e=0}=t;return e}function fc(t){const{diskOffset:e=0}=t;return e}function dc(t,e){const{availableSize:r=I}=t;return e>r}function wc(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Tt:0)}function pc(t){const e=Wt(t);let r=0;for(;r+4<=Nc(t);){const n=4+Tc(e,r+2);if(1==Tc(e,r))return pc(Bt(t.subarray(0,r),t.subarray(Math.min(r+n,Nc(t)))));r+=n}return t}async function mc(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await gc(Bo(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function hc(t,e){const r=await Po(t,e,x);if(Nc(r)<x)return x;const n=Wt(r);return x+Tc(n,26)+Tc(n,28)}function yc(t,{offset:e,diskNumberStart:r}){return e+(t.ht?t.ht(r):0)}function bc(){const t=new Uint8Array(4);return Cc(Wt(t),0,o),t}async function Ec(t,e){delete t.Ft,await Sc(e,bc()),t.offset+=4}async function Sc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Nc(e),await n.write(e)}finally{n.releaseLock()}}async function gc(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Nc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function Ac(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<hs?hs:e>ys?ys:e}}function Rc(t){return Math.floor(t.getTime()/1e3)}function zc(t){return Math.min(ms,Math.max(ps,t))}function Dc(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function xc(t,e,r,n){const o=Dc(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(ns);return o}function Oc(t,e,r){return ft(Dc(t,e,r))}function Fc(t,e,r,n){return bt(Dc(t,e,r,n))}function Uc(t){return t+5*(Math.floor(t/16383)+1)}function Ic(t,e){return t===U?e===U||e>0:0!==t}function Tc(t,e){return t.getUint16(e,!0)}function kc(t,e,r){t.setUint16(e,r,!0)}function Cc(t,e,r){t.setUint32(e,r,!0)}function vc(t,e,r){t.setBigUint64(e,r,!0)}function Mc(t,e,r){t.set(e,r)}function Nc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function _c({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,Zt:u,Vt:l,extraFieldLength:f}){const d=uc(26),w=d.ct,p=Wt(w);if(d.Ie(e),d.Ie(r),d.Ie(n),s===U){const t=new Uint32Array(1),e=Wt(t);kc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),kc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ue(s),d.Le(4),u||a!==U?d.Ue(u?t:a):d.Le(4),l||o!==U?d.Ue(l?t:o):d.Le(4),d.Ie(Nc(c)),d.Ie(f),{Lt:w,Wt:p,rawLastModDate:s}}function jc(t){return t.every(t=>t>=32&&t<=126)}function Pc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Bc(){return"application/octet-stream"}function Lc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Tt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Wc(r,Er)||Wc(t,Er)||Wc(t,gr),decompression:Wc(n,Er)||Wc(e,Er)||Wc(e,gr),registered:!1},{compressionMethod:9,compression:!1,decompression:Wc(n,Sr)||Wc(e,Sr),registered:!1}];for(const t of dr()){const e=wr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:U,decompression:e?typeof e.DecompressionStream==k:U,registered:!0})}return o}function Wc(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):Or(t,e)}const Zc="2.18.2",Vc=1048576,Hc=".zip.js-temp";function Gc(t={}){const{thresholdBytes:e=Vc,directoryName:r=Hc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const qc=1048576;function Yc(t={}){const{thresholdBytes:e=qc}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=tr(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Kc=1048576,Xc=".zip.js-temp",$c="createSyncAccessHandle is only available in dedicated workers";function Jc(t={}){const{thresholdBytes:e=Kc,directoryName:r=Xc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error($c);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Qc="deflate",tu="deflate-raw",eu="deflate64-raw",ru="gzip",nu=[Qc,tu,ru],ou=[Qc,tu,ru,eu];let au,iu,su,cu,uu;function lu(t,e){return-4===e&&(t.code="Z_MEM_ERROR"),t}function fu(t,e,r={}){if(!(t?nu:ou).includes(e))throw new TypeError("Unsupported format: "+e);if(!au){const t=new Error("WASM module not loaded");throw t.cause=uu,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536,i={We:0,in:0,inBufferSize:0,Ze:0,Ve:!1};let s,c,u,l,f=!0,d=!1;return function(){try{let r;if(i.We=iu(o),i.in=iu(a),i.inBufferSize=a,!i.We||!i.in)throw lu(new Error("allocation failed"),-4);if(t?(i.He=au.deflate_process,i.Ge=au.deflate_last_consumed,i.qe=au.deflate_end,i.Ze=au.deflate_new(),r=e===ru?au.deflate_init_gzip(i.Ze,n):e===tu?au.deflate_init_raw(i.Ze,n):au.deflate_init(i.Ze,n)):e===eu?(i.He=au.inflate9_process,i.Ge=au.inflate9_last_consumed,i.qe=au.inflate9_end,i.Ze=au.inflate9_new(),r=au.inflate9_init_raw(i.Ze)):(i.He=au.inflate_process,i.Ge=au.inflate_last_consumed,i.qe=au.inflate_end,i.Ze=au.inflate_new(),r=e===tu?au.inflate_init_raw(i.Ze):e===ru?au.inflate_init_gzip(i.Ze):au.inflate_init(i.Ze)),0!==r)throw lu(new Error("init failed:"+r),r)}catch(t){throw m(i),t}}(),{readable:new ReadableStream({start(t){s=t},pull(){f=!1,p()},cancel(t){d=!0,l=t,m(i),c.error(t),p()}},{highWaterMark:0}),writable:new WritableStream({start(t){c=t},async write(t){if(f&&await new Promise(t=>u=t),d)throw l;try{!function(t){const e=new Uint8Array(cu.buffer),r=i.He,n=i.Ge,a=i.We;let s=0;for(;s<t.length;){if(i.Ve)throw new Error("trailing data after the end of the stream");const c=Math.min(t.length-s,32768);if((!i.in||i.inBufferSize<c)&&(i.in&&su&&(su(i.in),i.in=0),i.in=iu(c),i.inBufferSize=c,!i.in))throw lu(new Error("allocation failed"),-4);e.set(t.subarray(s,s+c),i.in);const u=r(i.Ze,i.in,c,a,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw lu(new Error("process error:"+f),f);const d=16777215&u;d&&w(e.slice(a,a+d));const p=n(i.Ze);if(1===l)i.Ve=!0;else if(0===p&&0===d)break;s+=p}}(t)}catch(t){throw m(i),s.error(t),t}},close(){if(d)return;try{!function(){const t=new Uint8Array(cu.buffer),e=i.He,r=i.We;for(;;){const n=e(i.Ze,0,0,r,o,4),a=n>>24&255,s=128&a?a-256:a;if(s<0)throw lu(new Error("process error:"+s),s);const c=16777215&n;if(c&&w(t.slice(r,r+c)),1===a||0===c)break}}()}catch(t){throw m(i),s.error(t),t}const t=m(i);if(0!==t){const e=lu(new Error("end error:"+t),t);throw s.error(e),e}s.close()},abort(t){m(i),s.error(t)}},{highWaterMark:1})};function w(t){f=!0,s.enqueue(t)}function p(){if(u){const t=u;u=null,t()}}function m(t){let e=0;return t.Ze&&t.qe&&(e=t.qe(t.Ze)),t.Ze=0,t.in&&su&&su(t.in),t.in=0,t.We&&su&&su(t.We),t.We=0,e}}class du{constructor(t=Qc,e){return fu(!0,t,e)}}class wu{constructor(t=Qc,e){return fu(!1,t,e)}}du.requiresModule=!0,wu.requiresModule=!0,du.supportedFormats=nu,wu.supportedFormats=ou;const pu=65536;let mu,hu;function yu(t){return new Uint8Array(t.memory.buffer)}let bu,Eu=!1;var Su;async function gu(){await async function(){await Promise.allSettled([In(),...gn.map(t=>(Cn(t),t.terminate()))]),Yr=U,Kr=!1}(),bu=null,Eu=!1,au=iu=su=cu=uu=null,mu=null,hu=0}Su=function(t,e){const r=mu;let n=r?function(t,e,r){hu||(hu=t.malloc(pu));const n=hu?t.aes_hmac_new():0;if(n){const o=yu(t);if(o.set(e,hu),o.set(r,hu+e.length),t.aes_hmac_init(n,hu,e.length,hu+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return we(t,e);const o=hu;return{process(t,e){for(let a=0;a<t.length;a+=pu){const i=t.subarray(a,a+pu),s=yu(r);s.set(i,o),r.aes_hmac_process(n,o,i.length,e?1:0),i.set(s.subarray(o,o+i.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,yu(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=Su||we,function({Ye:t}){$r=t}({Ye:t=>{if(!bu){let{wasmURI:e}=t;typeof e==k&&(e=e()),bu=async function(t,{baseURI:e}){if(!Eu)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var a;(function(t){if(au=t,({malloc:iu,free:su,memory:cu}=au),"function"!=typeof iu||"function"!=typeof su||!cu)throw au=iu=su=cu=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==k&&(mu=a,hu=0)}(t,e),Eu=!0}catch(t){throw function(t){uu=t}(t),t}}(e,t).catch(t=>{throw bu=null,t})}return bu}}),jt({CompressionStreamFallback:du,DecompressionStreamFallback:wu}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Au="Entry filename already exists",Ru="Duplicate entry filename in the imported zip file",zu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Du="Entry is an ancestor of target entry",xu="Root directory cannot be moved",Ou="Target entry is not a directory",Fu="Parent entry is not a directory",Uu="Readable stream already consumed",Iu="throw",Tu="keep-first",ku="keep-last",Cu=new Set([Iu,Tu,ku]),vu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Mu="Invalid readerOptions (must be an object)",Nu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",_u="Invalid passwords option (must be an array of strings)",ju="Invalid requestPassword option (must be a function returning a string or undefined)",Pu="zipjs-abort-export",Bu=new Uint8Array(0),Lu=new Set([br,mr,hr]);class Wu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Au);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ke++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Xe:r.Xe||r.uncompressedSize===U,passThrough:r.passThrough,$e:r.$e||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=Sl(t);n&&(t=n.pop(),r=gl(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Au);r!=e.parent&&(tl(e),e.parent=r,r.children.push(e),bl(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class Zu extends Wu{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Zu(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===U||(t.constructor==ao?e.type==r:t.constructor!=eo||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Ju(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([_o(n),_o(t,o)]);const a=dt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof Aa||!o&&!a&&!i?s:Qe(s).pipeThrough(new rn({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!No(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Qe(i).pipeTo(er(t.writable),{signal:a,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==Ee)return!1;throw t}}getText(t,e){return this.getData(new co(t),e)}getBlob(t,e){return this.getData(new ao(t),e)}getData64URI(t,e){return this.getData(new eo(t),e)}getUint8Array(t){return this.getData(new To,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){ll(this,{data:t,Reader:oo,Writer:ao,uncompressedSize:t.size})}replaceText(t){ll(this,{data:t,Reader:io,Writer:co,uncompressedSize:so(t)})}replaceData64URI(t){ll(this,{data:t,Reader:to,Writer:eo,uncompressedSize:fl(t)})}replaceUint8Array(t){ll(this,{data:t,Reader:Io,Writer:To,uncompressedSize:t.length})}replaceReadable(t){ll(this,{data:null,Reader:Xu(t),Writer:null,uncompressedSize:U})}}class Vu extends Wu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Vu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return El(this,t,{options:e},!0)}addText(t,e,r={}){return El(this,t,{data:e,Reader:io,Writer:co,options:r,uncompressedSize:so(e)})}addBlob(t,e,r={}){return El(this,t,{data:e,Reader:oo,Writer:ao,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return El(this,t,{data:e,Reader:to,Writer:eo,options:r,uncompressedSize:fl(e)})}addUint8Array(t,e,r={}){return El(this,t,{data:e,Reader:Io,Writer:To,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return El(this,t,{data:e,Reader:class extends Fo{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return El(this,t,{Reader:Xu(e),options:r})}addFileSystemEntry(t,e={}){return pl(this,t,e)}addFileSystemHandle(t,e={}){return pl(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),El(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 oo(t),e)}importData64URI(t,e){return this.importZip(new to(t),e)}importUint8Array(t,e){return this.importZip(new Io(t),e)}importHttpContent(t,e){return this.importZip(new Fo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new ao(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new eo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new To,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;ul(r.passThrough),al(r);const i=ol(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:U,onprogress:U,onend:U,preventClose:!1}),f=qu([t],t=>Ku(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await nn(n,f),await h(t,e),a&&await nn(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function m(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await nn(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function h(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!el(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||el(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await h(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:m(o)},l)}catch(t){throw w?new Error(Pu):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Pu));try{r.entryName===U&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==k?(r=t,e=Object.assign({},r.options,e)):(await _o(t),r=new wi(t,e)),ul(e.passThrough),al(e);const n=function(t){if(t===U)return Iu;if(Cu.has(t))return t;throw new Error(zu)}(e.duplicates),o=[],a={Je:[]},i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),s=i.pop();let c=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Tu){c=!0;break}if(n!=ku)throw new Error(Ru);this.fs.remove(r),r=new Vu(this.fs,t,{data:null},e),o.push(r)}}else r=new Vu(this.fs,t,{data:null},e),o.push(r)}if(c)continue;if(t.directory){let e=r;if(s){if(e=r.getChildByName(s),e&&(!e.directory||e.data)){if(n==Tu)continue;if(n!=ku)throw new Error(Ru);e.directory?e.data=t:(this.fs.remove(e),e=U)}e||(e=new Vu(this.fs,s,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(s);if(i){if(n==Tu)continue;if(n!=ku)throw new Error(Ru);this.fs.remove(i)}o.push(El(r,s,{data:t,Reader:$u(Object.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==U||(e.bufferedWrite=!0);const[o]=await Promise.all([Qu(r,ol(e.readerOptions)),n?U:_o(t)]),a=n?t:new Hs(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=qu(e.children,t=>wl(t)?0:1);let f=0,d=0;if(a&&await nn(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(wl(e))return;const{name:a,Qt:s}=rl(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-w,w=t,i&&await nn(i,f,r)}}));d++,c&&await nn(c,d,l,p)}s&&await nn(s,f)}(a,r,qu([r],Yu),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;ol((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!wl(t)).map(t=>{const{name:e,Qt:o}=rl(t,n,r);return{name:e,size:t.directory?0:nl(t,dl(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>wl(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(ft(r[J]))throw new Error(As);if(a!==U&&!(a instanceof Uint8Array))throw new Error(ts);const s=Nc(a);if(s>e)throw new Error(Qi);const c=r[X],u=new Map,l=r[K]===U?0:r[K];let f=l,w=I;const p=[],m=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);Dc(i,o,da)&&!r.endsWith(D)&&(r+=D);const a=Qs(i,r,o);({name:r}=a);const{ee:s}=tc(i,r,o);0==s.level||s.compressionMethod!==U||s.ne||await Jr(Tt())||(s.level=0);const l=!Dc(i,o,da);if(l&&n===U)throw new Error(As);const{je:d,ee:h}=rc(i,l,n,s,o);if(l&&!s.ne&&Ic(h.compressionMethod,h.level))throw new Error(As);const y=Object.assign({},o,a.ee,s,h,{[X]:c}),b=oc(y),E=sc(y),S={ue:b,we:Nc(b.ie,E.se)};c&&ac(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.we+g;p.push(A),m.add(Boolean(y.Ht||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(m.size>1||nc(p,l,!0)!=nc(p,l,!1)))&&!o)throw new Error(As);const{Re:h,ze:y}=cc(u);let b=Dc(i,r,sa);if(f>=t||h>=t||u.size>=e){if(!1===b)throw new Error(bs);b=!0}else b===U&&y&&(b=!0);return f-l+h+s+(b?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class Hu{constructor(){hl(this)}get children(){return this.root.children}remove(t){tl(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=U}move(t,e){if(t==this.root)throw new Error(xu);if(!e.directory)throw new Error(Ou);if(e.isDescendantOf(t))throw new Error(Du);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Au)}else tl(t),t.parent=e,e.children.push(t),bl(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):U;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return yl(this,r=>r.importBlob(t,e))}importData64URI(t,e){return yl(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return yl(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return yl(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return yl(this,r=>r.importReadable(t,e))}importZip(t,e){return yl(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Gu={FS:Hu,ZipDirectoryEntry:Vu,ZipFileEntry:Zu};function qu(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function Yu(t){return t.uncompressedSize}function Ku(t,e){const{data:r}=t;return e&&r instanceof Aa?r.compressedSize:t.uncompressedSize}function Xu(t){let e;return function(){if(e)throw new Error(Uu);return e=!0,{readable:t}}}function $u(t,e){return class extends Jn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,n=Object.assign({},t,r.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:a}=n,i=await async function(t,e,r){al(e);const{passwords:n,requestPassword:o,signal:a}=e;if(delete(e=Object.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!n&&!o)return t.getData(new ao,e);const i=new Set;let s;for(;;){for(const t of sl(e,r,n))if(!i.has(t.key)){const e=await u(t);if(e.done)return e.data;s=e.error}if(!o)break;if(r.Qe){await r.Qe;continue}let a;r.Qe=new Promise(t=>a=t);try{const e=await o(t,s);if(e===U||null===e)break;if(typeof e!=v)throw new Error(ju);const r=await u(cl(e));if(r.done)return r.data;s=r.error}finally{r.Qe=U,a()}}if(!i.size)throw new Error(Ta);const c=new Error(Ee);throw c.cause=s,c;async function u(n){i.add(n.key);const o=Object.assign({},e,n.options);if(t.zipCrypto){o.checkCrc32=!0;try{await t.getData(null,Object.assign({},o,{checkPasswordOnly:!0}))}catch(t){if(il(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new ao,o);return function(t,e){const{Je:r}=t,n=r.findIndex(t=>t.key===e.key);-1!=n&&r.splice(n,1),r.unshift(e)}(r,n),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Zt(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return il(t)||e.zipCrypto&&Zt(t)&&Lu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,Object.assign(n,{checkPasswordOnly:!1,checkOverlappingEntry:a||o,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=i,r.er=new oo(i),r.size=i.size,super.init()}readUint8Array(t,e){return this.er.readUint8Array(t,e)}}}function Ju(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Qu(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async r=>{const n=r.reader=Ju(r.Reader,r.data,e);o.set(r,n);try{await _o(n)}catch(e){try{e.entry=r,e.entryId=r.id,e.entryName=r.getRelativeName(t)}catch{}throw e}n.size!==U&&(r.uncompressedSize=n.size,r.Xe=!1)})),o}function tl(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function el(t){return Boolean(t)&&t.message==Pu}function rl(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof Aa){const e=dl(t,r),n=o.lastModDate===U?r.lastModDate:o.lastModDate;({Qt:a,te:i}=Js(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.$e},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===U)throw new Error(vu);return{name:n,Qt:s}}function nl(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.Xe?U:Ku(t,e)}function ol(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(Mu);return t&&(ul(t.passThrough),al(t)),t}function al(t){const{passwords:e,requestPassword:r}=t;if(e&&(!Array.isArray(e)||e.some(t=>typeof t!=v)))throw new Error(_u);if(r&&typeof r!=k)throw new Error(ju)}function il(t){return Zt(t)&&t.message==Ee}function sl(t,e,r){const n=[],{password:o,rawPassword:a}=t;return a&&a.length&&n.push({key:a,options:{password:"",rawPassword:a}}),o&&n.push(cl(o)),n.push(...e.Je),r&&n.push(...r.filter(t=>t).map(cl)),n}function cl(t){return{key:t,options:{password:t,rawPassword:Bu}}}function ul(t){if(mt(t)===at)throw new Error(Nu)}function ll(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:U,uncompressedSize:r===U?0:r,Xe:r===U})}function fl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function dl(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function wl(t){return t.directory&&null===t.data}function pl(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await ml(n)),"file"==n.kind){const t=await n.getFile();o.push(El(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function ml(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await ml(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function hl(t){t.entries=[],t.Ke=0,t.root=new Vu(t)}function yl(t,e){const{entries:r,Ke:n,root:o}=t;return hl(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ke:n,root:o}),e})}function bl(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function El(t,e,r,n){if(t.directory){const o=Sl(e);return o&&(e=o.pop(),t=gl(t,o)),n?new Vu(t.fs,e,r,t):new Zu(t.fs,e,r,t)}throw new Error(Fu)}function Sl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function gl(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Au);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Du)}else t=new Vu(n.fs,e,{data:null},n)}),t}export{oo as BlobReader,ao as BlobWriter,to as Data64URIReader,eo as Data64URIWriter,lt as ERR_ABORTED,Na as ERR_AMBIGUOUS_ARCHIVE,Du as ERR_ANCESTOR_ENTRY,Da as ERR_BAD_FORMAT,Fa as ERR_CENTRAL_DIRECTORY_NOT_FOUND,yr as ERR_CODEC_OUT_OF_MEMORY,Ji as ERR_DUPLICATED_NAME,Ru as ERR_DUPLICATE_IMPORTED_ENTRY,Ta as ERR_ENCRYPTED,_a as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Ma as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Au as ERR_ENTRY_EXISTS,Oa as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,xa as ERR_EOCDR_NOT_FOUND,Ia as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Pn as ERR_HTTP_RANGE,Bn as ERR_HTTP_RESOURCE_CHANGED,jn as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,rr as ERR_INVALID_CODEC_DEFINITION,or as ERR_INVALID_CODEC_MODULE,Qi as ERR_INVALID_COMMENT,ts as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,br as ERR_INVALID_CRC32,ns as ERR_INVALID_DATE,zu as ERR_INVALID_DUPLICATES,is as ERR_INVALID_ENCRYPTION_STRENGTH,Ms as ERR_INVALID_ENTRY,es as ERR_INVALID_ENTRY_COMMENT,rs as ERR_INVALID_ENTRY_COMMENT_TYPE,os as ERR_INVALID_ENTRY_NAME,ls as ERR_INVALID_EXTRAFIELD,ws as ERR_INVALID_EXTRAFIELD_DATA,ds as ERR_INVALID_EXTRAFIELD_DATA_TYPE,fs as ERR_INVALID_EXTRAFIELD_TYPE,Ba as ERR_INVALID_FILENAME_VALIDATION,it as ERR_INVALID_FUNCTION_OPTION,Os as ERR_INVALID_GID,Cs as ERR_INVALID_LEVEL,La as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,Ts as ERR_INVALID_MSDOS_ATTRIBUTES,ks as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,_u as ERR_INVALID_PASSWORDS,ct as ERR_INVALID_PASSWORD_TYPE,vu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,zs as ERR_INVALID_READER,Mu as ERR_INVALID_READER_OPTIONS,ju as ERR_INVALID_REQUEST_PASSWORD,st as ERR_INVALID_SIGNAL,vs as ERR_INVALID_SIGNATURE_DATA,Pa as ERR_INVALID_STRICTNESS,xs as ERR_INVALID_UID,mr as ERR_INVALID_UNCOMPRESSED_SIZE,Us as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Is as ERR_INVALID_UNIX_ID_SIZE,Fs as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,as as ERR_INVALID_VERSION,Ln as ERR_ITERATOR_COMPLETED_TOO_SOON,Ua as ERR_LOCAL_FILE_HEADER_NOT_FOUND,va as ERR_OVERLAPPING_ENTRY,Fu as ERR_PARENT_NOT_DIRECTORY,Uu as ERR_READABLE_CONSUMED,nr as ERR_RESERVED_COMPRESSION_METHOD,xu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Ca as ERR_SPLIT_ZIP_FILE,Ou as ERR_TARGET_NOT_DIRECTORY,Ss as ERR_UNDEFINED_COMPRESSION_METHOD,gs as ERR_UNDEFINED_CRC32,Rs as ERR_UNDEFINED_READER,Es as ERR_UNDEFINED_UNCOMPRESSED_SIZE,As as ERR_UNDETERMINED_SIZE,ja as ERR_UNSAFE_FILENAME,ar as ERR_UNSUPPORTED_COMPRESSION,$c as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,ka as ERR_UNSUPPORTED_ENCRYPTION,us as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,ss as ERR_UNSUPPORTED_ENCRYPTION_USDZ,bs as ERR_UNSUPPORTED_FORMAT,Nu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,cs as ERR_UNSUPPORTED_SPLIT_USDZ,Wa as ERR_UNSUPPORTED_UINT64,qr as ERR_WORKER_STARTUP_TIMEOUT,Wn as ERR_WRITER_NOT_INITIALIZED,Zn as ERR_WRITER_SIZE_NOT_WRITABLE,Ns as ERR_ZIP_CRYPTO_LAST_MOD_DATE,Ds as ERR_ZIP_NOT_EMPTY,Uo as HttpRangeReader,Fo as HttpReader,Jn as Reader,ko as SplitDataReader,Co as SplitDataWriter,io as TextReader,co as TextWriter,Io as Uint8ArrayReader,To as Uint8ArrayWriter,Zc as VERSION,Ka as WARNING_APPENDED_DATA,js as WARNING_CLAMPED_LAST_MODIFICATION_DATE,Ha as WARNING_COMPRESSED_PATCHED_DATA,_s as WARNING_COMPRESSION_UNAVAILABLE,Qa as WARNING_DUPLICATE_FILENAME,Ga as WARNING_MALFORMED_EXTRA_FIELD,ni as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,oi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,ai as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ri as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,ti as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,ei as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,$a as WARNING_PREPENDED_CENTRAL_DIRECTORY,Xa as WARNING_PREPENDED_DATA,Ja as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Va as WARNING_UNKNOWN_VERSION,qa as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Za as WARNING_UNSORTED_CENTRAL_DIRECTORY,Ya as WARNING_WRAPPED_ENTRIES_COUNT,Qn as Writer,Vu as ZipDirectoryEntry,Wu as ZipEntry,Hu as ZipFS,Zu as ZipFileEntry,wi as ZipReader,pi as ZipReaderStream,Hs as ZipWriter,Gs as ZipWriterStream,vt as configure,Yc as createBlobTempStream,Gc as createOPFSTempStream,Jc as createSyncAccessHandleTempStream,Gu as fs,Bc as getMimeType,dr as getRegisteredCodecs,Lc as getSupportedCompressionMethods,mi as isZipFile,ur as registerCodec,Pt as resetConfiguration,gu as terminateWorkers,lr as unregisterCodec};