@zip.js/zip.js 2.19.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:b,document:S,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:k,Symbol:T,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==S?S.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,at=1024,st="/",ct=30,ut=new s(2107,11,31,23,59,58),lt=new s(1980,0,1),ft=void 0,dt=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",gt=new w,Et=T.asyncDispose||T(),bt="password",St="rawPassword",Rt="passThrough",xt="signal",zt="useWebWorkers",Ft="useCompressionStream",Dt="preventClose",At="level",It="useUnicodeFileNames",Ct="dataDescriptor",kt="offset",Tt="usdz",vt="maxAppendedDataSize",_t="signCentralDirectory",Nt="entry",Ut="filename",Ot="comment",Mt="strict",Lt="balanced",Bt="tolerant",Wt="compressed",Pt="Invalid option (must be a function)",Zt="Invalid signal (must be an AbortSignal instance)",Ht="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Vt="Invalid passThrough option (must be a boolean or 'compressed')",Gt="The operation was aborted";function jt(t){if(t&&typeof t!=pt)throw new d(Pt);return t}function qt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new d(Zt);return t||ft}function Yt(t){if(t&&t.aborted)throw t.reason===ft?new DOMException(Gt,"AbortError"):t.reason}function Kt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new d(Ht)}function Xt(t){if(t!==ft&&typeof t!=yt&&t!==Wt)throw new d(Vt);return t}function $t(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function Jt(t,e,n){t!==ft&&$t(t,e,n)}function Qt(t){return typeof t==mt&&t.trim()?o(t):t}const te=262144,ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof C!=wt&&C.hardwareConcurrency&&(oe=C.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:te,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof I!=wt&&I},ae="maxWorkers",se="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",ae,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],fe=[se,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],de={...ie};function we(){return de}function pe(t){return he(t.chunkSize)}function he(t){return t=Qt(t),o.isInteger(t)&&t>=1?a.max(t,64):te}function me(t){const e={};for(const n of fe){const r=t[n];r!==ft&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=Qt(e),t==ae&&(!o.isInteger(e)||e<1))throw new d(ee)}else if(le.includes(t))jt(e);else if(t==se){if(e&&typeof e!=mt)throw new d(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new d(re);return e}function ge(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===ft&&r===ft)return t;const o=n.assign({},t);return o.CompressionStreamFallback===ft&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===ft&&(o.DecompressionStreamFallback=r),o}function Ee(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function be(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Se(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Re(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[ze,Fe,De,Ae,Ie,Ce,ke,Te]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=Te[255&t]^ke[t>>>8&255]^Ce[t>>>16&255]^Ie[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^ze[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ze[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends z{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof E==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Ue=64,Oe=20,Me=new w([128]),Le=new w(1),Be=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),We=new w(256),Pe=new Int32Array(256),Ze=new Int32Array(256),He=new Int32Array(256),Ve=new Int32Array(256);let Ge=!1;function je(t){const e=function(){const t=new Int32Array(Be),e=new Int32Array(16),n=new w(Ue),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Me,0,1);56!=i;)c(Le,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Oe),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Be),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Ue;)n[i++]=t[e++];i==Ue&&(u(r,0),i=0)}if(e+Ue<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Ue<=a;e+=Ue)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Ue),r=new w(Ue);t.length>Ue&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Ue;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Ue),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Ue),e.update(t,0,Oe);const o=e.digest();return e.update(n,0,Ue),o}}}function qe(t){return We[t>>>24]<<24|We[t>>>16&255]<<16|We[t>>>8&255]<<8|We[255&t]}function Ye(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Ke(t){return 255&(t<<1^27*(t>>7))}const Xe=typeof R!=wt&&typeof R.getRandomValues==pt,$e="Invalid password",Je="Invalid authentication code",Qe="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new d(tn)}const nn={name:"PBKDF2"},rn=n.assign({hash:{name:"HMAC"}},nn),on=n.assign({iterations:1e3,hash:{name:"SHA-1"}},nn),an=["deriveBits"],sn=[8,12,16],cn=[16,24,32],un=10,ln=typeof R!=wt,fn=ln&&R.subtle;let dn=ln&&typeof fn!=wt&&typeof fn.importKey==pt&&typeof fn.deriveBits==pt;class wn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){hn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await En(t,e,n,Sn(r,0,sn[e])),i=Sn(r,sn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw gn(t),new d($e)}(i,o,n,Sn(t,0,sn[o]+2)),t=Sn(t,sn[o]+2),r?(gn(i),e.error(new d(Qe))):a()):await s,i.h)return;const c=new w(t.length-un-(t.length-un)%16);e.enqueue(yn(i,t,c,0,un,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=Sn(n,n.length-un),s=new w(Sn(n,0,n.length-un));e.process(s,!0);const c=e.digest();let u=n.length<un?1:0;for(let t=0;t<un;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(Je));t.enqueue(s)}}}),mn(this,i)}}class pn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){hn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=gt;if(n?(s=await async function(t,e,n){const r=en(new w(sn[e]));return Ee(r,await En(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(yn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=Sn(e.digest(),0,un);t.enqueue(Ee(i,a))}}}),mn(this,r)}}function hn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:bn(e,r),strength:o-1,S:gt,h:!1})}function mn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw gn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(gn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function yn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ee(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=Sn(n,r,r+u);t.set(Sn(e,0,u)),a.process(t,i)}return t.S=Sn(e,u),n}function gn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function En(t,e,r,o){t.password=null;const i=cn[e],s=await async function(t,e,r){if(dn)try{const o=await fn.importKey("raw",t,rn,!1,an);return new w(await fn.deriveBits(n.assign({salt:e},on),o,8*r))}catch{dn=!1}return function(t,e,n,r){const o=je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Oe){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Oe),u=o.digest();for(let t=0;t<Oe;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Oe,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Ge){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),We[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);We[0]=99;for(let t=0;t<256;t++){const e=We[t],n=Ke(e),r=n<<24|e<<16|e<<8|n^e;Pe[t]=r,Ze[t]=r>>>8|r<<24,He[t]=r>>>16|r<<16,Ve[t]=r>>>24|r<<8}Ge=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=qe(r<<8|r>>>24)^i<<24,i=Ke(i)):n>6&&t%n==4&&(r=qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=je(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=Ye(a)^n[0],e=Ye(s)^n[1],i=Ye(c)^n[2],l=Ye(u)^n[3],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[4],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[5],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[6],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[7];t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[8],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[9],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[10],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[11],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[12],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[13],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[14],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[15],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[16],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[17],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[18],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[19],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[20],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[21],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[22],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[23],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[24],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[25],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[26],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[27],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[28],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[29],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[30],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[31],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[32],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[33],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[34],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[35],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[36],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[37],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[38],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[39];let h=40;r>10&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[40],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[41],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[42],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[43],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[44],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[45],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[46],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[47],h=48),r>12&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[48],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[49],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[50],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[51],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[52],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[53],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[54],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[55],h=56),o[0]=(We[f>>>24]<<24|We[d>>>16&255]<<16|We[w>>>8&255]<<8|We[255&p])^n[h],o[1]=(We[d>>>24]<<24|We[w>>>16&255]<<16|We[p>>>8&255]<<8|We[255&f])^n[h+1],o[2]=(We[w>>>24]<<24|We[p>>>16&255]<<16|We[f>>>8&255]<<8|We[255&d])^n[h+2],o[3]=(We[p>>>24]<<24|We[f>>>16&255]<<16|We[d>>>8&255]<<8|We[255&w])^n[h+3]}}(Sn(s,0,i),Sn(s,i,2*i)),t.h&&gn(t),Sn(s,2*i)}function bn(t,e){return e===ft?Ne(t):e}function Sn(t,e,n){return t.subarray(e,n)}class Rn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=Fn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d($e);t=t.subarray(12)}r?e.error(new d(Qe)):e.enqueue(Fn(n,t))}})}}class xn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=en(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Dn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Dn(n,t),o),e.enqueue(r)}})}}function zn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new ve(o[0]),D:new ve(o[2])}),r)for(let e=0;e<r.length;e++)An(t,r[e]);else for(let n=0;n<e.length;n++)An(t,e.charCodeAt(n))}(t,e,r)}function Fn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,n[r]);return n}function Dn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,e[r]);return n}function An(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=kn(a.imul(kn(n+Cn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function In(t){const e=2|t.R[2];return Cn(a.imul(e,1^e)>>>8)}function Cn(t){return 255&t}function kn(t){return 4294967295&t}function Tn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function vn(t,e){t=Tn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function _n(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Nn="Invalid codec definition",Un="Reserved compression method",On="Invalid codec module",Mn="Compression method not supported",Ln=[0,8,9,99],Bn=new c,Wn=new c;function Pn(t){return Bn.get(t)}function Zn(){return e.from(Bn.values(),t=>n.assign({},t,Wn.get(t.format)))}function Hn(t){return Wn.get(t)}function Vn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new d(On);Wn.set(t,{CompressionStream:n,DecompressionStream:r})}const Gn="Invalid uncompressed size",jn="Invalid compressed data",qn="Codec out of memory",Yn="Invalid CRC32",Kn="deflate-raw",Xn="deflate64-raw",$n="gzip",Jn=[31,139,8];class Qn extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,y,g,E=super.readable;const b=f&&Hn(f),S=sr(a,r,n),R=c&&o&&!l&&!b&&(!i||s)&&Boolean(S);if(i&&!s||!c||R||(h=new _e,E=ur(E,h)),o)if(b)E=lr(E,ar(b.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new tr,E=lr(E,new S($n,{level:u,chunkSize:e})),E=ur(E,g);else try{E=cr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw hr(t);let e;try{e=new r($n)}catch{throw hr(t)}E=lr(E,e),E=ur(E,new tr)}i&&(s?E=ur(E,new xn(t)):(y=new pn(t),E=ur(E,y))),ir(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class tr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ee(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ee(n.subarray(0,s),t.subarray(0,i-s))),n=Ee(n.subarray(s),t.subarray(i-s))},flush(){const e=Se(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class er extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let b,S,R,x=super.readable;if(i&&(o?x=ur(x,new Rn(t)):(S=new wn(t),x=ur(x,S))),c){const t=new u,o=p&&Hn(p);let i;if(o)x=lr(x,ar(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=sr(l,r,n);if(a&&!f&&s!==ft&&E!==ft&&o)try{i=new o($n,{chunkSize:e})}catch{i=ft}if(!i)try{x=cr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===ft||!l&&n)throw hr(t);try{i=new r($n)}catch{throw hr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===ft?new ve:ft;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(Jn),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await wr(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=Se(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await fr(i,t),await dr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Gn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await dr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw yr(t,Yn);if(l!=n)throw yr(t,Gn);return{done:!0}}throw pr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=ft,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await dr(n,t),pr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(b=new _e,x=ur(x,b)),ir(this,x,()=>{if(b){const t=new m(b.value.buffer).getUint32(0,!1);if(s!=t)throw new d(Yn)}})}}const nr=new c;function rr(t,e){if(!t)return!1;let n=nr.get(t);n||(n=new c,nr.set(t,n));let r=n.get(e);if(r===ft){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function or(t){return rr(t,Kn)}function ir(t,e,r){e=ur(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function ar(t,e,n){if(!t)throw new d(Mn);return new t(e,n)}function sr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function cr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?Xn:Kn;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return lr(t,c,i)}function ur(t,e){return Tn(t).pipeThrough(e)}function lr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await wr(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await fr(r,t),await dr(o,t)}}(),e.readable}async function fr(t,e){try{await t.abort(e)}catch{}}async function dr(t,e){try{await t.cancel(e)}catch{}}function wr(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function pr(t,e){return e.has(t)?t:yr(t,mr(t)?qn:jn)}function hr(t){return mr(t)?yr(t,qn):t}function mr(t){return Re(t)&&"Z_MEM_ERROR"==t.code}function yr(t,e){const n=new d(e);return n.cause=t,n}const gr="data",Er="deflate",br="inflate";class Sr extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Er)?i=Qn:o.startsWith(br)&&(i=er),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==ft&&r.outputSize>t.outputSize))throw new d(Gn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Rr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const xr="Worker startup timeout";let zr,Fr,Dr,Ar=()=>{};async function Ir(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!or(e)&&(r=e,!rr(r,$n)))||!!n&&await Cr();var r}async function Cr(){if(Ar)try{return await void 0,!0}catch{}return!1}function kr(t){t.createWorker?Fr=!0:zr=!1}class Tr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return Fr&&(f=ft),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Rr(pe(s))).pipeThrough(new vr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),zr===ft&&(zr=typeof k!=wt),(u&&Dr&&(zr&&l||f)?Dr:Nr)(t,s)}}class vr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await _r(t,n)},async transform(t,r){o+=t.length,e&&await _r(e,o,n),r.enqueue(t)},async flush(){r&&await _r(r,o)}})}}async function _r(t,...e){try{await t(...e)}catch{}}function Nr(t,e){return{run:()=>Ur(t,e)}}async function Ur({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Er),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!or(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Sr(t,i),s=new Rr(pe(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Re(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Cr()),c}}const Or={type:"module"},Mr="error",Lr="abort";let Br,Wr,Pr;var Zr;function Hr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Vr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Gr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Wr===ft||Br!==t){const n=typeof t==pt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===ft&&(o=!1),o&&(u=Or);try{s=new k(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Gr(t,e,r,o,!1);if(o)throw i;return Gr(t,e,r,!0,!1)}}else{o===ft&&(o=!0),o&&(u=Or);try{c=new f(c,e)}catch{}try{s=new k(c,u)}catch(n){if(o)return Gr(t,e,r,!1,i);throw n}}Br=t,Wr=c,Pr=u}else s=new k(Wr,Pr);return s.addEventListener("message",t=>{r.M=!0,jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Re(l))try{s!==ft&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Re(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==ft&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Yr({type:gr,value:t,done:n,messageId:i},e)}if(r==gr){const t=new w(o);await l.ready,await l.write(t),y()||Yr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Vr(e),g(s))}function g(t){y()||(p(t),E(),Re(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Mr,t=>qr(t,r)),s.addEventListener("messageerror",t=>qr(t,r)),s}function jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function qr(t,e){t.preventDefault&&t.preventDefault(),jr(e);const{M:r,B:o,writer:i,U:a}=e;Vr(e),r||(e.v=null);let s=t.error||new d(t.message||Mr);r||(s=n.assign(new d(s.message||Mr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function Yr(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=be(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Zr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==pt&&(s=s());try{c=Gr(t.workerURI,r,t)}catch{return kr(t),Nr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(xr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Re(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Lr,t);c.addEventListener(Lr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{Yr({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Vr(t),t.v=null,e){const t=new d(xr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Re(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Re(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return kr(t),Hr(t),Ur(t,e);if(n&&n.codecImportFailed){if(t.reader)return Hr(t),Ur(t,e);t.U()}throw n}}}})}return t.N},Dr=Zr;let Kr=[];const Xr=[];let $r,Jr,Qr=0;async function to(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Wn.has(t)&&e&&Vn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===ft||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===ft&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:ft,e.createWorker=e.useWebWorkers&&h?h:ft,n.useCompressionStream=a||a===ft&&r.useCompressionStream,(await async function(){const n=Kr.find(t=>!t.I);if(n)return so(n),new Tr(n,t,e,b);if(Kr.length<m){const n={j:Qr};return Qr++,Kr.push(n),new Tr(n,t,e,b)}return new g(n=>{Xr.push({resolve:n,stream:t,T:e}),Jr=r.workerStarvationTimeout,eo()})}()).run();function b(t){if(no(),t.O)return t.O=!1,oo();if(Xr.length){const[{resolve:e,stream:n,T:r}]=Xr.splice(0,1);e(new Tr(t,n,r,b)),eo()}else t.v?(so(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{Kr=Kr.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Kr=Kr.filter(e=>e!=t)}}function eo(){!$r&&Xr.length&&o.isFinite(Jr)&&Jr>=0&&($r=v(ro,Jr))}function no(){$r&&(_($r),$r=null)}function ro(){if($r=null,Xr.length){const[{resolve:t,stream:e,T:n}]=Xr.splice(0,1);t(new Tr({},e,io(n),ao)),eo()}}function oo(){const t=Xr.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new Tr({},e,io(n),()=>{ao(),r()}))}));return no(),g.all(t)}function io(t){return n.assign({},t,{useWebWorkers:!1,workerURI:ft,createWorker:ft})}function ao(){no(),eo()}function so(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const co="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function uo(t,e){return fo(t,e,!0)}function lo(t){if(!t.some(t=>t>127))return!1;try{return new b("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function fo(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=co[t[n]];return e}(t):new b(e,{ignoreBOM:n}).decode(t)}const wo="HTTP error ",po="HTTP Range not supported",ho="HTTP resource changed",mo="Writer iterator completed too soon",yo="Writer not initialized",go="Invalid writer (size must be writable)",Eo="Content-Range",bo="Range",So="GET",Ro="bytes",xo=16777216,zo="writable",Fo=T();class Do{constructor(){this.size=0}init(){this.initialized=!0}}class Ao extends Do{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const s=e===ft?n:a.min(n,e-o),c=await di(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==ft&&o>=e||!c.length&&s)&&i.close()}})}}class Io extends Do{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(yo);return t.writeUint8Array(be(e))}});n.defineProperty(t,zo,{get:()=>e})}writeUint8Array(){}}class Co extends Ao{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class ko extends Io{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let To,vo;class _o extends Ao{constructor(t){super(),n.assign(this,{J:t,size:t.size}),vo||(vo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();To=1==e}catch{To=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return Tn(e.stream());if(To)return Tn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class No extends Do{constructor(t){super();const e=this,r=new z;n.defineProperty(e,zo,{get:()=>r.writable}),e.contentType=t,e.et=vn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Uo extends _o{constructor(t){super(new y([t],{type:"text/plain"}))}}function Oo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Mo extends No{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return fo(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Lo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ti,Xo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==ft){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(po);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=ft,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ti(So,t,Yo(t,o,e));if(206!=n.status)throw new d(po);const c=Ho(n);if(c!==ft&&c!=o)throw new d(po);qo(t,n),jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Zo(this,t,e,ti,Xo)}}class Bo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ei,$o),super.init()}readUint8Array(t,e){return Zo(this,t,e,ei,$o)}}function Wo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=xo,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Po(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==wt||o)){const r=await e(So,t,Yo(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Ro))throw new d(po);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),jo(t,r);const i=Vo(r);i===ft?await Qo(t,e,n):t.size=i,o&&o.length&&Ho(r)===t.size-o.length&&(t.ot=o)}}else await Qo(t,e,n)}async function Zo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return gt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(So,t,Yo(t,e,n));if(206!=o.status)throw new d(po);const i=Ho(o);if(i!==ft&&i!=e)throw new d(po);qo(t,o),jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(po);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ho(t){const e=t.headers.get(Eo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Vo(t){const e=t.headers.get(Eo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Go({headers:t}){return{it:t.get("Etag")||ft,lastModified:t.get("Last-Modified")||ft}}function jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Go(e))}function qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Vo(e);if(t!==ft&&i!==ft&&t!=i)throw new d(ho);if(o){const t=Go(e);if(n.entries(o).some(([e,n])=>n!==ft&&t[e]!==ft&&n!=t[e]))throw new d(ho)}}}function Yo(t,e=0,r=1){return n.assign({},Ko(t),{[bo]:Ro+"="+(e<0?e:e+"-"+(e+r-1))})}function Ko({options:t}){const{headers:e}=t;if(e)return T.iterator in e?n.fromEntries(e):e}async function Xo(t){await Jo(t,ti)}async function $o(t){await Jo(t,ei)}async function Jo(t,e){const n=await e(So,t,Ko(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Qo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Ko(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ti(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(po):new d(wo+(a.statusText||a.status))}function ei(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(po):new d(wo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ni extends Ao{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Bo(t,e):new Lo(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class ri extends Ao{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class oi extends Io{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ii extends Ao{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(fi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===ft?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await di(c,s,e);else{const i=r-s;o=Ee(await di(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.ft=a.max(i,n.ft),o}}class ai extends Do{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===Fo)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(mo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await li(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,zo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Fo)}finally{t.releaseLock()}}}class si{constructor(t){return e.isArray(t)&&(t=new ii(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:Tn(t)}),t}}class ci{constructor(t){t.writable===ft&&typeof t.next==pt&&(t=new ai(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:_n(t)});try{t.size=t.size===ft?0:t.size}catch{throw new d(go)}return t}}function ui(t){return Boolean(t&&t.getData)}async function li(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function fi(t){return t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t}function di(t,e,n){return t.readUint8Array(e,n)}function wi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Ao.prototype.createReadable.call(t,e):t.readable}function pi(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==ft&&(r.filename=n),t.push(r)}}const hi="filename",mi="rawFilename",yi="comment",gi="rawComment",Ei="uncompressedSize",bi="compressedSize",Si="offset",Ri="diskNumberStart",xi="lastModDate",zi="rawLastModDate",Fi="lastAccessDate",Di="rawLastAccessDate",Ai="creationDate",Ii="rawCreationDate",Ci="internalFileAttributes",ki="externalFileAttributes",Ti="msdosAttributesRaw",vi="msdosAttributes",_i="msDosCompatible",Ni="zip64",Ui="encrypted",Oi="version",Mi="versionMadeBy",Li="zipCrypto",Bi="directory",Wi="executable",Pi="compressionMethod",Zi="signature",Hi="extraField",Vi="unixMode",Gi="setuid",ji="setgid",qi="sticky",Yi=[hi,mi,Ei,bi,xi,zi,yi,gi,Fi,Di,Ai,Ii,Si,Ri,Ci,ki,Ti,vi,_i,Ni,Ui,Oi,Mi,Li,Bi,Wi,"symlink",Pi,Zi,"crc32",Hi,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Vi,"unixExternalUpper",Gi,ji,qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Ki{constructor(t){Yi.forEach(e=>this[e]=t[e])}}const Xi=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function $i(t,e,n){return t?e?12:16+4*n:0}const Ji="File format is not recognized",Qi="End of central directory not found",ta="End of Zip64 central directory locator not found",ea="Central directory header not found",na="Local file header not found",ra="Zip64 extra field not found",oa="File contains encrypted entry",ia="Encryption method not supported",aa="Split zip file",sa="Overlapping entry found",ca="Entry data out of bounds",ua="Ambiguous archive",la="Encrypted central directory is not supported",fa="Unsafe filename",da="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",wa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",pa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ha="64-bit value exceeds Number.MAX_SAFE_INTEGER",ma="unsorted central directory",ya="unknown version needed to extract",ga="compressed patched data",Ea="malformed extra field",ba="unknown zip64 extensible data",Sa="wrapped entries count",Ra="appended data",xa="prepended data",za="prepended central directory",Fa="trailing central directory data",Da="duplicate filename",Aa="mismatched zip64 end of central directory record",Ia="multiple end of central directory records",Ca="mismatched local file header (filename)",ka="mismatched local file header (general purpose bit flag)",Ta="mismatched local file header (compression method)",va="mismatched local file header (crc32 or sizes)",_a=/^[a-zA-Z]:/,Na=/(^|[\\/])\.\.([\\/]|$)/,Ua="utf-8",Oa="cp437",Ma=[[Ei,O],[bi,O],[Si,O],[Ri,M]],La={[M]:{yt:Rs,bytes:4},[O]:{yt:xs,bytes:8}},Ba=i(o.MAX_SAFE_INTEGER);class Wa{constructor(t,e={}){n.assign(this,{reader:new si(t),options:e,gt:{Et:new u,bt:[],St:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await li(r),r.size!==ft&&r.readUint8Array||(r=new _o(await vn(r.readable)),await li(r)),r.size<Y)throw new d(Ji);const o=e.warnings=[],i=is(t,e.options),s=i==Mt,c=i!=Bt,l=cs(ms(e,t,vt),i),f=function(t,e){if(t===ft)return e;if(!os(t))throw new d(wa);return t}(ms(e,t,"filenameValidation"),i),p=ms(e,t,"normalizeFilename"),{Rt:h,xt:m}=await us(r,c,l);if(!h)throw await async function(t){return await rs(t)==W}(r)?new d(aa):new d(Qi);c&&m>1&&hs(Ia);const y=Se(h);let g=Rs(y,12),E=Rs(y,16);const b=h.offset,S=Ss(y,20),R=b+Y+S,x=r.size-R;x>l&&hs(Ra),x>0&&pi(o,Ra);let F=Ss(y,4);const D=r.ft||0;let A,I,C,k,T,v=Ss(y,6),_=Ss(y,10),N=0,U=X;const B=E==O||g==O||_==M||v==M;if(E!=O&&v!=M&&(E+=ns(r,v)),B){const t=h.offset>=K?await di(r,h.offset-K,K):gt,e=Se(t);if(t.length==K&&Rs(e,0)==j){E=ns(r,Rs(e,4))+xs(e,8);let t=await di(r,E,X),i=Se(t);const c=h.offset-K-X;if((t.length<X||Rs(i,0)!=G)&&E!=c&&c>=0){const e=E;E=c,E>e&&(N=E-e),t=await di(r,E,X),i=Se(t)}if(t.length<X||Rs(i,0)!=G)throw new d(ta);if(C=!0,k=xs(i,4)>44,k){const t=a.min(xs(i,4)-44,r.size-E-X);t>0&&(U+=t,T=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Se(t),o=Ss(r,26);n.assign(e,{compressionMethod:Ss(r,0),compressedSize:xs(r,2),uncompressedSize:xs(r,10),encryptionAlgorithm:Ss(r,18),bitLength:Ss(r,20),flags:Ss(r,22),hashAlgorithm:Ss(r,24),hashData:t.subarray(28,28+o)})}return e}(await di(r,E+X,t)))}F==M?F=Rs(i,16):F!=Rs(i,16)&&ps(s,o,Aa),v==M?v=Rs(i,20):v!=Rs(i,20)&&ps(s,o,Aa),_==M?_=xs(i,32):_!=xs(i,32)&&ps(s,o,Aa),g==O?g=xs(i,40):g!=xs(i,40)&&ps(s,o,Aa),E=ns(r,v)+xs(i,48)+N}}let P=g;const Z=h.offset-(C?U+K:0);if(E>=r.size&&(N=r.size-E-g-Y,E=r.size-g-Y),D!=F)throw new d(aa);if(E<0)throw new d(Ji);let V=0,$=await di(r,E,g),J=Se($);if(g){if($.length<4)throw new d(Ji);const t=Z-g;if(E!=t&&v==F){const e=Rs(J,V)==H||Boolean(T&&T.compressedSize)||Va(J);let n=!e;if(!n&&t>=0&&t+4<=r.size&&(n=Rs(Se(await di(r,t,4)),0)==H),n){const n=E;E=t,E>n&&(N+=E-n,A=e),$=await di(r,E,g),J=Se($)}}}const Q=Z-E;if(g!=Q&&Q>=0&&v==F&&(g=Q,$=await di(r,E,g),J=Se($)),E<0||E>=r.size)throw new d(Ji);e.directoryOffset=E,e.directoryLength=P;const tt=ys(e,t,"decryptCentralDirectory");let et,nt;if(tt&&_&&$.length>=4&&Rs(J,0)!=H&&(k||Va(J))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(T,P,$.length);nt=$.subarray(t),$=await tt($.subarray(0,t),T),J=Se($),P=$.length,et=!0}T&&!et&&($.length<4||Rs(J,0)==H)&&pi(o,ba),I=E;const ct=ms(e,t,"filenameEncoding"),ut=ms(e,t,"commentEncoding"),lt=new u;let dt,wt=-1;const pt=!s&&!C;!_&&pt&&(_=Ga(J,$,V),_&&pi(o,Sa));for(let i=0;i<_;i++){const s=new Ha(r,e.options);if(V+q>$.length||Rs(J,V)!=H){if(0==i&&!et&&(k||Va(J)))throw new d(la);throw new d(ea)}qa(s,J,V+6);const c=Boolean(s.bitFlag.languageEncodingFlag),u=V+q,l=u+s.filenameLength+s.extraFieldLength,h=Ss(J,V+4),m=!(h>>8),y=h>>8==3,g=Ss(J,V+32),E=l+g,b=new w($.subarray(u,E)),S=b.subarray(0,s.filenameLength),R=b.subarray(s.filenameLength+s.extraFieldLength),x=c||!ct&&lo(S),F=c||!ut&&lo(R),D=Rs(J,V+38),A=D&L,C={readOnly:Boolean(1&A),hidden:Boolean(2&A),system:Boolean(4&A),directory:Boolean(16&A),archive:Boolean(32&A)},T=Rs(J,V+42),v=ys(e,t,"decodeText")||uo,U=x?Ua:ct||Oa,O=F?Ua:ut||Oa;let B=v(S,U,Ut);B===ft&&(B=uo(S,U));let W=v(R,O,Ot);W===ft&&(W=uo(R,O)),n.assign(s,{index:i,zt:et,versionMadeBy:h,msDosCompatible:m,zip64:!1,compressedSize:0,uncompressedSize:0,Ft:g,offset:T,diskNumberStart:Ss(J,V+34),internalFileAttributes:Ss(J,V+36),externalFileAttributes:D,msdosAttributesRaw:A,msdosAttributes:C,rawFilename:S,filenameUTF8:x,commentUTF8:F,rawExtraField:b.subarray(s.filenameLength,s.filenameLength+s.extraFieldLength),rawComment:R,filename:B,comment:W});const P=Ya(s,s,J,V+6);if(B=s.filename,p){const t=p(B);t!==ft&&(B=s.filename=t)}if(ss(B,f)){const t=new d(fa);throw t.filename=B,t}P&&pi(o,Ea,B),s.offset+=N;const Z=ns(r,s.diskNumberStart)+s.offset;I=a.min(Z,I),Z<wt&&pi(o,ma,B),wt=Z,(s.version&L)>63&&pi(o,ya,B),32&~s.rawBitFlag||pi(o,ga,B),lt.has(s.filename)&&(dt=!0),lt.add(s.filename);const G=s.externalFileAttributes>>16&M;s.unixMode===ft&&16877&G&&(s.unixMode=G);const j=Boolean(s.unixMode&it),Y=Boolean(s.unixMode&at),K=Boolean(512&s.unixMode),X=40960==((s.unixMode===ft?G:s.unixMode)&rt),Q=!X&&(s.unixMode!==ft?!!(73&s.unixMode):y&&!!(73&G)),tt=s.unixMode!==ft&&(s.unixMode&rt)==ot,nt=(G&rt)==ot;n.assign(s,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:Q,directory:tt||nt||m&&C.directory||s.filename.endsWith(st),zipCrypto:s.encrypted&&!s.extraFieldAES});const ht=new Ki(s);if(ht.getData=(t,n)=>s.getData(t,ht,e.gt,n),ht.arrayBuffer=async t=>{const r=new z,o=vn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await s.getData(r,ht,e.gt,n.assign({},t,{preventClose:!1})),o},V=E,i==_-1&&pt){const t=Ga(J,$,V);t&&(_+=t,pi(o,Sa))}const{onprogress:mt}=t;if(mt)try{await mt(i+1,_,new Ki(s))}catch{}yield ht}let ht=V,mt=ja($.subarray(V))||(et?ja(nt):ft);if(!mt&&!et){const t=E+V,e=a.min(Z-t,65541);e>=6&&(mt=ja(await di(r,t,e)))}mt&&(e.digitalSignature=mt,ht=V+6+mt.length),(V!=P&&ht!=P||!et&&V!=g&&ht!=g)&&ps(s,o,Fa),dt&&ps(s,o,Da);const yt=ms(e,t,"extractPrependedData"),Et=ms(e,t,"extractAppendedData"),bt=(s||yt)&&_&&4==I&&await async function(t){const e=await rs(t);return e==W||808471376==e}(r)?4:0;return s&&(N||_&&I>bt)&&hs(xa),(N||_&&I>4)&&pi(o,xa),A&&pi(o,za),yt&&(e.prependedData=I>bt?await di(r,bt,I-bt):gt),e.comment=S?await di(r,b+Y,S):gt,Et&&(e.appendedData=R<r.size?await di(r,R,r.size-R):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[Et](){return this.close()}}class Pa{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Wa(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Za(t,e={}){if(t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t.size<Y)return!1;const n=is(e,{}),r=n!=Bt,o=cs(e[vt],n),{Rt:i,xt:a}=await us(t,r,o);if(!i||n==Mt&&a>1)return!1;const s=Ss(Se(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ha=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,s=we(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:g,rawLastModDate:E,uncompressedSize:b,compressedSize:S}=i,{dataDescriptor:R}=m,x=e.localDirectory={},z=e.warnings=[],F=ns(c,f)+l,A=await di(c,F,ct),I=Se(A);let C=ms(i,o,bt),k=ms(i,o,St);const T=Xt(ms(i,o,Rt)),v=Boolean(T),_=!0===T;if(Kt(C,k),C=C&&C.length?C:ft,k=k&&k.length?k:ft,w&&99!=w.originalCompressionMethod)throw new d(Mn);if(A.length<ct||Rs(I,0)!=B)throw new d(na);qa(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=ms(i,o,"checkLocalDirectory"),W=is(o,i.options),P=function(t,e){return t===ft?e!=Bt:Boolean(t)}(M,W),Z=ms(i,o,"checkLocalFilename"),H=function(t,e){return t===ft?e==Mt:Boolean(t)}(Z===ft?M:Z,W);let V=gt;if(H&&(U||N)){const t=await di(c,F+ct,U+N);V=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await di(c,F+ct+U,N):gt;H&&(x.rawFilename=V),Ya(i,x,I,4,!0)&&pi(z,Ea),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.zt&&!(8192&~e.rawBitFlag);!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||ps(a,o,Ca),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&ps(a,o,ka),e.compressionMethod!=t.compressionMethod&&ps(a,o,Ta),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||ps(a,o,va)}(i,x,V,H,P?ft:z);const{lastAccessDate:G,creationDate:j,uid:q,gid:Y}=x;G&&(e.lastAccessDate=G),j&&(e.creationDate=j),q!==ft&&e.uid===ft&&(e.uid=q),Y!==ft&&e.gid===ft&&(e.gid=Y);const K=ms(i,o,"checkPasswordOnly"),X=i.encrypted&&(!_||K),$=X&&!w;if(_||(e.zipCrypto=$),X&&!(64&~i.rawBitFlag))throw new d(ia);const J=v?ft:Pn(h);if(0!=h&&8!=h&&9!=h&&!J&&!v)throw new d(Mn);if(X){if(!$&&(w.strength<1||w.strength>3))throw new d(ia);if(!C&&!k)throw new d(oa)}if(O+S>c.size)throw new d(ca);const Q=S,tt=qt(ms(i,o,xt));Yt(tt);let et=ms(i,o,"checkOverlappingEntry");const nt=ms(i,o,"checkOverlappingEntryOnly");nt&&(et=!0);const{onstart:rt,onprogress:ot,onend:it}=o,at=0!=h&&!v,st=v?S-$i(X,$,w&&w.strength):b,ut=9==h;let lt=ms(i,o,Ft);ut&&(lt=!1);const dt=ms(i,o,"checkCrc32"),wt=(dt===ft?ms(i,o,"checkSignature"):dt)&&!v&&(!X||$||w&&1==w.vendorVersion),pt={options:{codecType:br,password:C,rawPassword:k,zipCrypto:$,encryptionStrength:w&&w.strength,checkCrc32:wt,checkAuthenticationCode:ms(i,o,"checkAuthenticationCode"),passwordVerification:$&&(R?E>>>8&L:g>>>24&L),outputSize:st,crc32:g,compressed:at,encrypted:X,useWebWorkers:ms(i,o,zt),useCompressionStream:lt,deflate64:ut,format:J?J.format:ft,codecURI:J?J.codecURI:ft,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:K},config:s,A:{signal:tt,size:Q,onstart:rt,onprogress:ot,onend:it}};let ht,mt,yt;et&&await async function({reader:t,Dt:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=Se(await di(t,s+i,24)),c=[[n,!0],[n,!1],[!n,!0],[!n,!1]].map(([t,e])=>ts(r,t,e)).filter(t=>t&&t.compressedSize==i&&t.uncompressedSize==a),l=c.find(t=>t.crc32==o)||c[0]||ts(r,n,!0)||ts(r,n,!1);l?(e.localDirectory.dataDescriptor=l,f=es(l.zip64,l.signature)):f=es(n,!1)}const w={start:r,end:s+i+f,Dt:e},{Et:p,bt:h,St:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&Qa(e,o)?o:i&&Qa(e,i)?i:void 0}(h,w)||m.find(t=>Qa(w,t));if(t){const e=new d(sa);throw e.overlappingEntry=t.Dt,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.bt=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:c,Dt:e,index:u,offset:F,crc32:g,compressedSize:S,uncompressedSize:b,dataOffset:O,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,gt:r});try{if(!nt){K&&(t=new D),t=new ci(t),await li(t,function(t,e,n){return a.min(t,n?1032*e:e)}(st,S,at)),({writable:ht}=t);const e=Tn(c.createReadable({offset:O,size:Q})),{outputSize:r}=await to({readable:e,writable:ht},pt);if(Yt(tt),r!=st)throw n.assign(new d(Gn),{outputSize:r});t.size+=r}}catch(e){const{outputSize:n}=pt;if(n!==ft?t.size+=n:Re(e)&&e.outputSize!==ft&&(t.size+=e.outputSize),!K||!Re(e)||e.message!=Qe)throw mt=e,yt=!0,e}finally{if((ui(t)||!ms(i,o,Dt))&&ht&&!ht.locked){const t=ht.getWriter();if(yt)try{await t.abort(mt)}catch{}else await t.close()}}return K||nt?ft:t.getData?t.getData():ht}};function Va(t){const e=a.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==Rs(t,n))return!0;return!1}function Ga(t,e,n){let r=0;for(;n+q<=e.length&&Rs(t,n)==H;)n+=q+Ss(t,n+28)+Ss(t,n+30)+Ss(t,n+32),r++;return r%65536?0:r}function ja(t){if(t.length>=6){const e=Se(t);if(Rs(e,0)==Z){const n=Ss(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function qa(t,e,r){const o=t.rawBitFlag=Ss(e,r+2),i=!(1&~o),a=Rs(e,r+6);n.assign(t,{encrypted:i,version:Ss(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:gs(a),filenameLength:Ss(e,r+22),extraFieldLength:Ss(e,r+24)})}function Ya(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=Se(a);let f=0,w=!1;try{for(;f<a.length;){const t=Ss(l,f),e=Ss(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Ss(r,o+4);n.assign(e,{signature:Rs(r,o+10),crc32:Rs(r,o+10),compressedSize:Rs(r,o+14),uncompressedSize:Rs(r,o+18)});const h=u.get(1);if(h)(function(t,e,n){e.zip64=!0;const r=Se(t.data),o=Ma.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+La[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(ra)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=La[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0})(h,e,i)||(w=!0),e.extraFieldZip64=h;else if(Ma.some(([t,n])=>e[t]==n)){if(!i)throw new d(ra);w=!0}const m=u.get(28789);m&&(Ka(m,hi,mi,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Ka(y,yi,gi,e,t),e.extraFieldUnicodeComment=y);const g=u.get($);g&&(99==p||e.encrypted)&&g.data.length>=7?(function(t,e,r){const o=Se(t.data),i=bs(o,4);n.assign(t,{vendorVersion:bs(o,0),vendorId:bs(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Ss(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=ft)}(g,e,p),e.extraFieldAES=g):(g&&(w=!0),e.compressionMethod=p);const E=u.get(13);E&&(Xa(E,e),e.extraFieldPkwareUnix=E);const b=u.get(22613);b&&(Xa(b,e),e.extraFieldUnixType1=b);const S=u.get(10);S&&(function(t,e){const r=Se(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Ss(r,i),n=Ss(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Se(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:Es(i),lastAccessDate:Es(a),creationDate:Es(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(S,e),e.extraFieldNTFS=S);const R=u.get(tt);let x;R&&(x=$a(R,e,!0),e.extraFieldInfoZip=R);const z=u.get(et);z&&($a(z,x?{}:e,!1),e.extraFieldUnix=z);const F=u.get(J);F&&(function(t,e,n){if(!t.data.length)return;const r=Se(t.data),o=bs(r,0),i=[],a=[];n?(1&~o||(i.push(xi),a.push(zi)),2&~o||(i.push(Fi),a.push(Di)),4&~o||(i.push(Ai),a.push(Ii))):t.data.length>=5&&(i.push(xi),a.push(zi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Rs(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(F,e,i),e.extraFieldExtendedTimestamp=F);const D=u.get(Q);return D&&(e.extraFieldUSDZ=D),w}function Ka(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=Se(t.data),s=new ve;s.append(i[r]);const c=Se(new w(4));c.setUint32(0,s.get(),!0);const u=Rs(a,1),l=bs(a,0);n.assign(t,{version:l,[e]:uo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Rs(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function Xa(t,e){if(t.data.length<8)return;const r=Se(t.data),o={lastAccessDate:new s(1e3*(0|Rs(r,0))),lastModDate:new s(1e3*(0|Rs(r,4)))};t.data.length>=12&&(o.uid=Ss(r,8),o.gid=Ss(r,10)),n.assign(t,o),n.assign(e,o)}function $a(t,e,r){try{const o=Se(t.data);let i,a;if(r){let e=0;const r=bs(o,e++),s=bs(o,e++);i=Ja(t.data.subarray(e,e+s)),e+=s;const c=bs(o,e++);a=Ja(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Ss(o,0),a=Ss(o,2),n.assign(t,{uid:i,gid:a}));return i!==ft&&(e.uid=i),a!==ft&&(e.gid=a),i!==ft||a!==ft}catch{}}function Ja(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Qa(t,e){return t.start<e.end&&e.start<t.end}function ts(t,e,n){const r=n?4:0;if(t.byteLength<es(e,n)||n&&Rs(t,0)!=P)return ft;const o=Rs(t,r);let i,a;try{e?(i=xs(t,r+4),a=xs(t,r+12)):(i=Rs(t,r+4),a=Rs(t,r+8))}catch{return ft}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function es(t,e){return(t?20:12)+(e?4:0)}function ns(t,e){return t.ht?t.ht(e):0}async function rs(t){return Rs(Se(await di(t,0,4)))}function os(t){return t===Mt||t===Lt||t===Bt}function is(t,e){return as(t,as(e,Lt))}function as(t,e){const n=t.strictness;if(n!==ft){if(!os(n))throw new d(da);return n}const r=t.checkAmbiguity;return r===ft?e:r?Mt:e==Bt?Bt:Lt}function ss(t,e){if(e==Bt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Na.test(t)||t.startsWith("/")||t.startsWith("\\")||_a.test(t))||e==Mt&&(n.includes(".")||n.includes("")||t.includes("\0"))}function cs(t,e){if(t!==ft){const e=Qt(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(pa);return e}return e==Mt?0:e==Bt?1/0:M}async function us(t,e,n){const{size:r}=t,o=a.min(r,65557),i={At:64};let s,c,u=0;for await(const[n,a,l,f,d]of ls(t,o)){const o=Ss(n,f+20);if(d+Y+o==r){const o=await ds(t,n,a,f,d,r,i);if(2==o){if(s||(s=fs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=fs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of ls(t,o)){const o=fs(c,u,l);i||(i=o);const f=await ds(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{Rt:s,xt:u}}async function*ls(t,e){const n=t.size-e,r=await di(t,n,e),o=Se(r);for(let t=r.length-Y;t>=0;t--)Rs(o,t)==V&&(yield[o,n,r,t,n+t])}function fs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function ds(t,e,n,r,o,i,a){const s=Ss(e,r+10),c=Rs(e,r+12),u=Rs(e,r+16);if(s==M||c==O||u==O)return await ws(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Ss(e,r+6);for(const r of[o-c,ns(t,l)+u])if(await ws(t,e,n,r,i,a)==H)return 2;return 0}async function ws(t,e,n,r,o,i){return r<0||r+4>o?ft:r>=n?Rs(e,r-n):i.At>0?(i.At--,Rs(Se(await di(t,r,4)),0)):ft}function ps(t,e,n){t?hs(n):pi(e,n)}function hs(t){const e=new d(ua);throw e.reason=t,e}function ms(t,e,n){return e[n]===ft?t.options[n]:e[n]}function ys(t,e,n){return jt(ms(t,e,n))}function gs(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function Es(t){return new s(o(t/i(1e4)-i(116444736e5)))}function bs(t,e){return t.getUint8(e)}function Ss(t,e){return t.getUint16(e,!0)}function Rs(t,e){return t.getUint32(e,!0)}function xs(t,e){const n=t.getBigUint64(e,!0);if(n>Ba)throw new d(ha);return o(n)}var zs=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ua,ERR_BAD_FORMAT:Ji,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ea,ERR_CODEC_OUT_OF_MEMORY:qn,ERR_ENCRYPTED:oa,ERR_ENCRYPTED_CENTRAL_DIRECTORY:la,ERR_ENTRY_DATA_OUT_OF_BOUNDS:ca,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ta,ERR_EOCDR_NOT_FOUND:Qi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ra,ERR_INVALID_AUTHENTICATION_CODE:Je,ERR_INVALID_COMPRESSED_DATA:jn,ERR_INVALID_CRC32:Yn,ERR_INVALID_FILENAME_VALIDATION:wa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:pa,ERR_INVALID_PASSWORD:$e,ERR_INVALID_STRICTNESS:da,ERR_INVALID_UNCOMPRESSED_SIZE:Gn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:na,ERR_OVERLAPPING_ENTRY:sa,ERR_SPLIT_ZIP_FILE:aa,ERR_UNSAFE_FILENAME:fa,ERR_UNSUPPORTED_COMPRESSION:Mn,ERR_UNSUPPORTED_ENCRYPTION:ia,ERR_UNSUPPORTED_UINT64:ha,ERR_WORKER_STARTUP_TIMEOUT:xr,WARNING_APPENDED_DATA:Ra,WARNING_COMPRESSED_PATCHED_DATA:ga,WARNING_DUPLICATE_FILENAME:Da,WARNING_MALFORMED_EXTRA_FIELD:Ea,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ka,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Ta,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:va,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ca,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Aa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ia,WARNING_PREPENDED_CENTRAL_DIRECTORY:za,WARNING_PREPENDED_DATA:xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Fa,WARNING_UNKNOWN_VERSION:ya,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:ba,WARNING_UNSORTED_CENTRAL_DIRECTORY:ma,WARNING_WRAPPED_ENTRIES_COUNT:Sa,ZipReader:Wa,ZipReaderStream:Pa,isZipFile:Za});const Fs="File already exists",Ds="Zip file comment exceeds 64KB",As="Invalid zip file comment (must be a Uint8Array)",Is="File entry comment exceeds 64KB",Cs="Invalid file entry comment (must be a string)",ks="Invalid date (must be a valid Date instance)",Ts="File entry name exceeds 64KB",vs="Version exceeds 65535",_s="The strength must equal 1, 2, or 3",Ns="Encryption is not supported in USDZ files",Us="Split zip files are not supported in USDZ files",Os="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ms="Invalid extra field (must be a Map)",Ls="Invalid extra field type (must be integer 0..65535)",Bs="Invalid extra field data (must be a Uint8Array)",Ws="Extra field data exceeds 64KB",Ps=-2147483648,Zs=2147483647,Hs=i(0),Vs=i("0x7fffffffffffffff"),Gs="Zip64 is not supported (set the 'zip64' option to 'true')",js="Undefined uncompressed size",qs="Undefined compression method",Ys="Undefined CRC32",Ks="Undetermined size",Xs="Undefined reader",$s="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",Js="Zip file not empty",Qs="Invalid uid (must be integer 0..2^32-1)",tc="Invalid gid (must be integer 0..2^32-1)",ec="Invalid UNIX mode (must be integer 0..65535)",nc="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",rc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",oc="Invalid msdosAttributesRaw (must be integer 0..255)",ic="Invalid msdosAttributes (must be an object with boolean flags)",ac="Invalid level (must be integer 0..9)",sc="Signature data exceeds 64KB",cc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",uc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",lc="compression unavailable",fc="clamped last modification date",dc=new w([7,0,2,0,65,69,3,0,0]),wc="infozip",pc="unix",hc=[8,9,5,3];let mc=0;const yc=[];class gc{constructor(t,e={}){t=new ci(t);const{availableSize:r=dt,maxSize:o=dt}=t,i=r>0&&r!==dt&&o>0&&o!==dt;if(i&&e[Tt])throw new d(Us);n.assign(this,{writer:t,It:i,options:e,Ct:new c,kt:new u,offset:e[kt]===ft?t.size||t.writable.size||0:e[kt],Tt:e[kt]===ft?0:e[kt]-(t.size||t.writable.size||0),vt:new u,_t:[],warnings:[],Nt:0,Ut:0,Ot:ft,Mt:!1})}prependZip(t){return Sc(this,async function(t,e){if(t.kt.size)throw new d(Js);await t.Lt(e)}(this,t))}appendZip(t){return Sc(this,this.Lt(t))}async Lt(t){const r=this,{vt:o,kt:i,Ct:a}=r;for(;o.size;)await g.allSettled(e.from(o));let s;const u=new g(t=>s=t);o.add(u);const l=[];let f;try{t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t));const{ZipReader:o}=await g.resolve().then(function(){return zs}),s=new o(t),u=await s.getEntries();await s.close(),await li(r.writer);const{directoryOffset:w}=s;u.forEach(({filename:t})=>{if(i.has(t))throw new d(Fs);i.add(t),l.push(t)}),r.Bt=!0;const{Wt:p}=r;r.Wt=new g(t=>f=()=>{r.Bt=!1,t()}),await p,r.It&&(delete r.It,await async function(t){return Se(await di(t,0,4)).getUint32(0,!0)==W}(t)||(await jc(r.writer,Vc()),r.offset+=4));const h=await async function(t,n,r,o){const{writer:i}=t,a=new c;if(i.closeDisk){const s=e.from(r).sort((t,e)=>Hc(n,t)-Hc(n,e));let c=0;for(const e of s){const r=Hc(n,e);await Pc(t,n,c,r-c),Lc(i,await Zc(n,r))&&await i.closeDisk(),a.set(e,{offset:Bc(t,i),diskNumberStart:Oc(i)}),c=r}await Pc(t,n,c,o-c)}else{const e=t.offset;await Pc(t,n,0,o),r.forEach(t=>a.set(t,{offset:e+Hc(n,t),diskNumberStart:0}))}return a}(r,t,u,w);u.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:s,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:f,rawExtraField:d}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=i;d=Wc(d||gt),t.extraFieldAES&&(f=99);const y=cu(d),g=Boolean(l)&&l.uncompressedSize!==ft,E=Boolean(l)&&l.compressedSize!==ft,b=-7&fu(w,p,m,s,f)|w<<1,{Pt:S,Zt:R}=uu({version:e,bitFlag:b,compressionMethod:f,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,Ht:E,Vt:g,extraFieldLength:y}),{crc32:x}=t;x!==ft&&iu(R,10,x);const{offset:z,diskNumberStart:F}=h.get(t);n.assign(t,{Gt:!0,Vt:g,Ht:E,offset:z,diskNumberStart:F,jt:!1,qt:gt,Yt:gt,Kt:gt,Xt:gt,$t:gt,Jt:gt,rawExtraField:d,Qt:gt,Pt:S,Zt:R}),a.set(t.filename,t)})}catch(t){throw l.forEach(t=>i.delete(t)),t}finally{s(),o.delete(u),f&&f()}}add(t="",e,r={}){const o=this,{vt:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Nt];if(a!==ft){const{te:e,ee:r}=zc(a,Xt($c(t,o,Rt)),$c(t,o,xi));delete o[Nt],o=n.assign(e,r,o)}if($c(t,o,Bi)&&!e.endsWith(st)&&(e+=st),t.kt.has(e))throw new d(Fs);t.kt.add(e),mc<we().maxWorkers?mc++:await new g(t=>yc.push(t));try{return await async function(t,e,r,o){const a=Fc(t,e,o);({name:e}=a);const s=Dc(t,e,o),{comment:c}=s,u=o[Hi];t.Ct.set(e,ft);const l=t.Ot,f={};let w,p;s.ne.keepOrder&&(f.re=new g(t=>w=t)),t.Ot=f;try{const{ne:c}=s;0==c.level||c.compressionMethod!==ft||c.oe||await Ir(we())||(c.level=0,pi(t.warnings,lc,e));const u=await async function(t,e,{ne:r},o){if(r.oe&&!e&&!$c(t,o,Bi))throw new d(Xs);let i;if(e){if(e=new si(e),await li(e),!e.readUint8Array&&!e.readable)throw new d($s);({size:i}=e)}return n.assign({reader:e},Ic(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Mc(t.writer),m=Oc(t.writer);let y=o.crc32===ft?o[Zi]:o.crc32;const E=u.ne.encrypted&&!c.zipCrypto;if(c.oe&&!c.ie&&E&&(y=ft),c.oe&&r&&!E&&y===ft)throw new d(Ys);const b=kc(o=n.assign({},o,a.ne,s.ne,u.ne,{signature:o[Zi],crc32:y,offset:t.offset-h,diskNumberStart:m,[Tt]:t.options[Tt]}));b.ae&&pi(t.warnings,fc,e);const S=_c(o),R=cu(b.se,S.ce);p=await async function(t,e,r,o,a){const{Ct:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,ue:f,signal:w}=a,{le:p,Dt:h,fe:m,de:y}=o,E=t.options[Tt];let b,S,R,x,F,D,A,I=h,C=0;const k=u&&m?m.re:ft;s.set(e,I);try{a.bufferedWrite||!u||t.Bt||t.Nt||t.Ut||!l&&!f?(b=!0,t.Nt++,A=a.createTempStream?await a.createTempStream():new z(ft,ft,{highWaterMark:dt}),A.size=0,await li(c)):(S=!0,t.Ut++,A=c,await k,await T()),await li(A);const h=Mc(c);t.It&&!b&&await Gc(t,c),E&&!b&&Tc(o,t.offset-h);const{se:m}=p;b||await v();const y=Oc(c),R=Bc(t,c);if(I.diskNumberStart=y,b||(F=!0,D=c.size,await jc(A,m)),I=await async function(t,e,{diskNumberStart:r,re:o},a,s,c){const{le:u,we:l,pe:f}=a,{Pt:w,Zt:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:b,qt:S,he:R,Kt:x,me:z,ye:F,Xt:D,$t:A,Jt:I,Yt:C}=u,{ce:k}=l,{rawFilename:T,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,Gt:P,Vt:Z,Ht:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,Qt:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:dt,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,oe:bt,ie:St,format:Rt,codecURI:xt}=c,zt={re:o,versionMadeBy:Y,zip64:W,Gt:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:T,commentUTF8:Boolean(B),rawComment:K,qt:S,he:R,Kt:x,Xt:D,$t:A,Jt:I,Yt:C,rawExtraField:X,Qt:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(dt),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;bt||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Tn(wi(t,{size:n})),o={options:{codecType:Er,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!bt,compressed:g&&!bt,encrypted:y&&!St,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:b},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await to({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,Yt(nt),bt||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Gs)}catch(t){const{outputSize:n}=o;throw n!==ft?e.size+=n:Re(t)&&t.outputSize!==ft&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,le:r,we:o},{zip64:a,zipCrypto:s,oe:c,dataDescriptor:u}){const{Zt:l,encrypted:f}=r,{ge:d,Ee:w}=o;f&&!s&&!c||t===ft||(iu(l,10,t),u&&iu(d,w,t)),a?u&&(au(d,w+4,i(e)),au(d,w+12,i(n))):(iu(l,14,e),iu(l,18,n),u&&(iu(d,w+4,e),iu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,le:u,we:l},c),G&&await jc(e,k),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:b,version:E,Pt:w,Zt:p,signature:Ft,crc32:!y||V||bt?Ft:ft,me:z,ye:F,Vt:Z,Ht:H}),zt}(r,A,I,o,we(),a),b||(F=!1),s.set(e,I),I.filename=e,b){if(await g.all([A.writable.getWriter().close(),k]),await T(),t.It&&await Gc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Oc(c),I.offset=Bc(t,c),E){const e=o.pe;Tc(o,t.offset-Mc(c)),I.size+=o.pe-e}!function({rawFilename:t,encrypted:e,zip64:n,he:r,crc32:o,compressedSize:a,uncompressedSize:s,Vt:c,Ht:u},l,{dataDescriptor:f,oe:d}){if(f||((!e||d&&o!==ft)&&iu(l,14,o),u||iu(l,18,a),c||iu(l,22,s)),n&&r){const e=ct+cu(t)+4;au(l,e,i(s)),au(l,e+8,i(a))}}(I,p.be,a),await jc(c,p.se),await qc(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,b&&(t.offset+=C)}throw s.delete(e),n}finally{if(b&&t.Nt--,S&&t.Ut--,y&&y(k),R&&R(),b&&A&&A.dispose)try{await A.dispose()}catch{}}async function T(){t.Bt=!0;const{Wt:e}=t;t.Wt=new g(e=>R=()=>{t.Bt=!1,e()}),await e}async function v(){Lc(c,cu(p.se))&&await c.closeDisk()}}(t,e,r,{le:b,we:S,pe:R,Dt:f,fe:l,de:w},o)}catch(n){throw t.Ct.delete(e),n}finally{w&&w(l&&l.re)}return n.assign(p,{name:e,comment:c,extraField:u}),new Ki(p)}(t,e,r,o)}catch(n){throw t.kt.delete(e),n}finally{const t=yc.shift();t?t():mc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Sc(o,s)}remove(t){const{kt:e,Ct:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==ft){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=gt,n={}){const r=this,{vt:o,writer:a}=this,{writable:s}=a;if(r.Mt)return bc(a);if(!(t instanceof w))throw new d(As);if(cu(t)>M)throw new d(Ds);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r._t.map(t=>t.Se));const c=r._t.filter(t=>t.Re&&!t.xe);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.xe=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{ze:o,Fe:a}=Nc(t.Ct),{De:s,Ae:c,Ie:u}=await async function(t,n,r){const{Ct:o,writer:i}=t,a=new w(n);await li(i);let s=0,c=0,u=Oc(i),l=Mc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,qt:w,Yt:p,Kt:h,Xt:m,Jt:y,rawExtraField:g,Qt:E,rawComment:b,versionMadeBy:S,Pt:R,Zt:x,Vt:z,Ht:F,jt:D,Ce:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:k,uncompressedSize:T,compressedSize:v}=n,_=cu(w,p,h,m,y,g,E),N=q+cu(d,b)+_;Lc(i,s+N-c)&&(await jc(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Oc(i),l=Mc(i)),z||iu(x,18,T),F||iu(x,14,v),(A||D)&&n.version<45&&ou(x,0,45);const U=Uc(N);if(U.ke(H),U.Te(S),U.ve(R.subarray(0,24)),U.Te(_),U.Te(cu(b)),U.Te(D?M:k),U.Te(I),U.ke(C),U.ke(A?O:e),U.ve(d),U.ve(w),U.ve(p),U.ve(h),U.ve(m),U.ve(y),U.ve(g),U.ve(E),U.ve(b),su(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new Ki(n))}catch{}}return await jc(i,c?a.slice(c):a),{De:{diskNumber:u,diskOffset:l},Ae:{diskNumber:Oc(i),_e:f},Ie:a}}(t,o,r),l=await async function(t,e,n){const r=Qc(t,n,_t);if(r){const n=await r(e),o=cu(n);if(o>M)throw new d(sc);const i=Uc(6+o);i.ke(Z),i.Te(o),i.ve(n);const{writer:a}=t;return Lc(a,cu(i.ct))&&await a.closeDisk(),await jc(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{De:a,Ae:s,Ne:c,Fe:u}=r;let{ze:l}=r,f=t.Ct.size,w=a.diskNumber,p=Bc(t,a);const h=cu(e);if(h>M)throw new d(Ds);let m=$c(t,n,Ni),y=Oc(o);if(Lc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Gs);m=!0}else m===ft&&u&&(m=!0);const g=Uc(m?98:Y);Lc(o,cu(g.ct)+h)&&await o.closeDisk(),y=Oc(o);let E=y==s.diskNumber?s._e:0;m&&(g.ke(G),g.Ue(44),g.Te(45),g.Te(45),g.ke(y),g.ke(w),g.Ue(E),g.Ue(f),g.Ue(l),g.Ue(p),g.ke(j),g.ke(y),g.Ue(i(Bc(t,o))+i(l)+i(c)),g.ke(y+1),$c(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ke(V),g.Te(y),g.Te(w),g.Te(E),g.Te(f),g.ke(l),g.ke(p),g.Te(h),await jc(o,g.ct),h&&await jc(o,e)}(t,n,r,{De:s,Ae:c,ze:o,Ne:l,Fe:a})}(r,t,n),r.Mt=!0,!ui(a)&&$c(r,n,Dt)||await s.getWriter().close(),bc(a)}[Et](){return this.close()}}class Ec extends g{then(t,e){const{Oe:n}=this;return n&&(n.xe=!0),super.then(t,e)}}function bc(t){return t.getData?t.getData():t.writable}function Sc(t,e){const r=new Ec((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Oe=o,o.Se=g.prototype.then.call(r,ft,t=>n.assign(o,{Re:!0,error:t})),t._t.push(o),r}async function Rc(t,e){try{await t.writer.writable.abort(e)}catch{}}function xc(t,e,n){t.vt.add(e),e.catch(t=>{try{n(t)}catch{}})}function zc(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new d(cc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:b,extraFieldAES:S,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[It]=!0);const k=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{Xi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);k&&(C[Hi]=k),A===ft&&I===ft||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?pc:wc});const T={};if(r&&!D)if(n.assign(T,{uncompressedSize:m,crc32:E,compressionMethod:b}),r!==Wt&&n.assign(T,{encrypted:y,zipCrypto:g,encryptionStrength:S?S.strength:ft}),F&&(T.dataDescriptor=F.dataDescriptor,T[At]=hc[F.level]),o===ft)T.rawLastModDate=w;else if(r!==Wt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(uc);return{te:C,ee:T}}function Fc(t,n,r){let o=$c(t,r,_i),i=$c(t,r,Mi,o?20:768);const a=$c(t,r,Wi),s=tu(t,r,"uid"),c=tu(t,r,"gid");let u=tu(t,r,Vi),l=$c(t,r,"unixExtraFieldType"),f=$c(t,r,Gi),w=$c(t,r,ji),p=$c(t,r,qi);if(Jt(s,O,Qs),Jt(c,O,tc),Jt(u,M,ec),l!==ft&&l!==wc&&l!==pc)throw new d(nc);if(l===pc&&(s!==ft&&s>M||c!==ft&&c>M))throw new d(rc);l!==ft||s===ft&&c===ft||(l=wc);let h=tu(t,r,Ti),m=$c(t,r,vi);const y=h!==ft||m!==ft;if(s!==ft||c!==ft||u!==ft||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),Jt(h,L,oc),m&&(typeof m!==ht||e.isArray(m)))throw new d(ic);if(i>M)throw new d(vs);let g=$c(t,r,ki);const E=g!==ft;E||(g=0),!r[Bi]&&n.endsWith(st)&&(r[Bi]=!0);const b=$c(t,r,Bi);if(b?(n.endsWith(st)||(n+=st),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==ft||Boolean(f||w||p);u=u===ft?g>>16&M:u&M,f?u|=it:f=Boolean(u&it),w?u|=at:w=Boolean(u&at),p?u|=512:p=Boolean(512&u),E&&!t||(b?u=-61441&u|ot:u&rt||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==ft)t&=L;else if(e!==ft){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===ft&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const S=g>>16&M,R=u!==ft&&40960==(u&rt);return{name:n,ne:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:S,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Dc(t,e,n){const r=Qc(t,n,"encodeText")||Ne;let i=r(e,Ut);if(i===ft&&(i=Ne(e)),cu(i)>M)throw new d(Ts);const a=n[yi]||"";if(typeof a!=mt)throw new d(Cs);let c=r(a,Ot);if(c===ft&&(c=Ne(a)),cu(c)>M)throw new d(Is);const u=$c(t,n,Oi);if(u!==ft&&u>M)throw new d(vs);const l=Jc(t,n,xi,new s),f=$c(t,n,zi),w=Jc(t,n,Fi),p=Jc(t,n,Ai),h=$c(t,n,Ci,0),m=Xt($c(t,n,Rt)),y=Boolean(m),g=!0===m;let E=$c(t,n,bt),b=$c(t,n,St);Kt(E,b),E=E&&E.length?E:ft,b=b&&b.length?b:ft;const S=tu(t,n,"encryptionStrength",3),R=$c(t,n,Li),x=$c(t,n,"extendedTimestamp",!0),z=$c(t,n,"ntfsTimestamp"),F=$c(t,n,"keepOrder",!0),D=$c(t,n,zt),A=$c(t,n,"bufferedWrite"),I=Qc(t,n,"createTempStream"),C=$c(t,n,"dataDescriptorSignature",!0),k=qt($c(t,n,xt));Yt(k);const T=$c(t,n,It,!lu(i)||!lu(c)),v=$c(t,n,Pi),_=y||v===ft?ft:Pn(v);if(!y&&v!==ft&&0!==v&&8!==v&&!_)throw new d(Mn);let N=tu(t,n,At);if(Jt(N,9,ac),t.options[Tt]){if(E!==ft||b!==ft)throw new d(Ns);N===ft&&v===ft&&(N=0)}y&&(N=Qt(n[At]));let U=$c(t,n,Ft),O=$c(t,n,Ct);A&&O===ft&&(O=!1),(O===ft||R&&!g)&&(O=!0),N!==ft&&6!=N&&(U=!1);const L=$c(t,n,Ni);if(!(R||E===ft&&b===ft||o.isInteger(S)&&S>=1&&S<=3))throw new d(_s);const B=Ac(n[Hi]),W=Ac(n.localExtraField),P=Ac(n.centralExtraField);return{comment:a,ne:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,oe:y,ie:g,password:E,rawPassword:b,encryptionStrength:S,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:k,useUnicodeFileNames:T,compressionMethod:v,format:_?_.format:ft,codecURI:_?_.codecURI:ft,Me:_?_.versionNeeded:ft,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,Le:W,Qt:P}}}function Ac(t){if(!t)return gt;if(!(t instanceof c))throw new d(Ms);let e=0,n=0;t.forEach((t,n)=>{if($t(n,M,Ls),!(t instanceof w))throw new d(Bs);if(cu(t)>M)throw new d(Ws);e+=4+cu(t)});const r=new w(e),o=Se(r);return t.forEach((t,e)=>{ou(o,n,e),ou(o,n+2,cu(t)),su(r,t,n+4),n+=4+cu(t)}),r}function Ic(t,e,n,r,o){const{oe:i,ie:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ei],y===ft)throw new d(js);if(h===ft)throw new d(qs)}const E=!0===w,b=$c(t,o,Ui);if(e&&a&&!b&&cu(c,u))throw new d(Os);const S=e&&(Boolean(c&&cu(c)||u&&cu(u))||a&&b);e||(p=0,h=0);const R=$i(S,s,l);e&&(i?(o.uncompressedSize=y,m=n===ft?eu(y)+R:n+(a?0:R)):n===ft?(f=!0,(w||w===ft)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(nu(h,p)?eu(y):y)+R));const x=!(S||e&&(0!==n||i)||nu(h,p));x&&$c(t,o,Ct)===ft&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Gs);w=!0}return w=w||!1,{Be:m,ne:{dataDescriptor:f,ue:x,zip64:w,Gt:E,We:g,Vt:z,Ht:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:S}}}function Cc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function kc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,Le:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,oe:b,encrypted:S,Vt:R,Ht:x,uncompressedSize:z,We:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&nu(I,c);let k;const T=b||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||T&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Uc(t);if(e.Te(1),e.Te(t-4),k=e.ct,v&&(e.Ue(z),T)){const t=$i(S,l,y);e.Ue(b?0:z+t)}}else k=gt;let N,U,O,L,W;if(S&&!l){const t=Uc(cu(dc)+2);t.Te($),t.ve(dc),N=t.ct,N[8]=y}else N=gt;if(g){const t=Kc(n),e=(P=t)>=Ps&&P<=Zs;if(e){const e=9+(o?4:0)+(i?4:0),n=Uc(e);L=1+(o?2:0)+(i?4:0),W=t,n.Te(J),n.Te(e-4),n.Pe(L),n.ke(t),o&&n.ke(Xc(Kc(o))),i&&n.ke(Xc(Kc(i))),O=n.ct}else O=gt;if(E===ft?!e||Boolean(o||i):E)try{const t=Yc(n),e=Uc(36);e.Te(10),e.Te(32),e.Ze(4),e.Te(1),e.Te(24),e.Ue(t),e.Ue(o?Yc(o):t),e.Ue(i?Yc(i):t),U=e.ct}catch{U=gt}else U=gt}else U=O=gt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=wc||e===ft&&n===ft)if(r!=pc||e===ft&&n===ft)Z=H=gt;else{const t=Uc(8);t.Te(et),t.Te(4),t.Te((e===ft?0:e)&M),t.Te((n===ft?0:n)&M),Z=t.ct;const r=Uc(4);r.Te(et),r.Te(0),H=r.ct}else{const t=vc(e===ft?0:e),r=vc(n===ft?0:n),o=3+t.length+r.length,i=Uc(4+o);i.Te(tt),i.Te(o),i.Pe(1),i.Pe(t.length),i.ve(t),i.Pe(r.length),i.ve(r),Z=H=i.ct}}catch{Z=H=gt}I===ft&&(I=C?8:0),A===ft&&(A=0!=I||p||S?20:10);const{Me:V}=t;C&&V!==ft&&(A=A>V?A:V),u&&(A=A>45?A:45),S&&!l&&(A=A>51?A:51,b&&D!==ft&&(N[4]=1),ou(Se(N),9,I),I=99);const G=_?cu(k):0,j=G+cu(N,O,U,Z,h,m);if(j+(t[Tt]?67:0)>M)throw new d(Ws);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<lt?lt:q>ut?ut:q,K=cu(O)?new s(1e3*Kc(n)):cu(U)?n:Y,{Pt:X,Zt:Q,rawLastModDate:nt}=uu({version:A,bitFlag:fu(c,f,w,S,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,Ht:x,Vt:R,extraFieldLength:j}),rt=Uc(ct+cu(e)+j),ot=rt.ct,it=Se(ot);return rt.ke(B),rt.ve(X),rt.ve(e),_&&rt.ve(k),rt.ve(N),rt.ve(O),rt.ve(U),rt.ve(Z),rt.ve(h),rt.ve(m),w&&(x||iu(it,18,0),R||iu(it,22,0)),{se:ot,be:it,Pt:X,Zt:Q,lastModDate:K,ae:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:S,compressed:C,version:A,compressionMethod:I,me:L,ye:W,qt:gt,he:G,Kt:O,Xt:U,$t:Z,Jt:H,Yt:N,extraFieldLength:j}}function Tc(t,e){const{le:n}=t;let{se:r,extraFieldLength:o}=n,i=64-(e+cu(r))%64;i<4&&(i+=64);const a=new w(i),s=Se(a);ou(s,0,Q),ou(s,2,i-4);const c=r;n.se=r=new w(cu(c)+i),su(r,c),su(r,a,cu(c));const u=Se(r);ou(u,28,o+i),n.be=u,t.pe+=i}function vc(t){const e=new w(4);Se(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function _c({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=gt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=Se(o),n&&(i=4,iu(r,0,P))),{ce:o,ge:r,Ee:i}}function Nc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,Yt:o,rawComment:i,Xt:a,Jt:s,rawExtraField:c,Qt:u,me:l,ye:f,Gt:w,uncompressedSize:p,compressedSize:h}=r;let{Vt:m,Ht:y}=r;w||(m&&p<O&&(m=r.Vt=!1),y&&h<O&&(y=r.Ht=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let b,S;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Uc(t);e.Te(1),e.Te(t-4),m&&e.Ue(p),y&&e.Ue(h),g&&e.Ue(r.offset),E&&e.ke(r.diskNumberStart),b=e.ct}else b=gt;if(r.qt=b,r.Ce=g,r.jt=E,f===ft)S=gt;else{const t=Uc(9);t.Te(J),t.Te(5),t.Pe(l),t.ke(f),S=t.ct}r.Kt=S;const R=cu(b,o,a,s,S,c,u);if(R>M)throw new d(Ws);e+=q+cu(t,i)+R}return{ze:e,Fe:n}}function Uc(t){const e=new w(t),n=Se(e);let r=0;return{ct:e,Pe:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},Te:t=>{ou(n,r,t),r+=2},ke:t=>{iu(n,r,t),r+=4},Ue:t=>{au(n,r,i(t)),r+=8},ve:t=>{su(e,t,r),r+=cu(t)},Ze:t=>r+=t}}function Oc(t){const{diskNumber:e=0}=t;return e}function Mc(t){const{diskOffset:e=0}=t;return e}function Lc(t,e){const{availableSize:n=dt}=t;return e>n}function Bc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Tt:0)}function Wc(t){const e=Se(t);let n=0;for(;n+4<=cu(t);){const r=4+ru(e,n+2);if(1==ru(e,n))return Wc(Ee(t.subarray(0,n),t.subarray(a.min(n+r,cu(t)))));n+=r}return t}async function Pc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await qc(wi(e,{offset:n,size:r}),o,ft,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function Zc(t,e){const n=await di(t,e,ct);if(cu(n)<ct)return ct;const r=Se(n);return ct+ru(r,26)+ru(r,28)}function Hc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Vc(){const t=new w(4);return iu(Se(t),0,W),t}async function Gc(t,e){delete t.It,await jc(e,Vc()),t.offset+=4}async function jc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=cu(e),await r.write(e)}finally{r.releaseLock()}}async function qc(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(cu(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Yc(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<Hs?Hs:e>Vs?Vs:e}}function Kc(t){return a.floor(t.getTime()/1e3)}function Xc(t){return a.min(Zs,a.max(Ps,t))}function $c(t,e,n,r){const o=e[n]===ft?t.options[n]:e[n];return o===ft?r:o}function Jc(t,e,n,r){const i=$c(t,e,n,r);if(null===i)return r;if(i!==ft&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new d(ks);return i}function Qc(t,e,n){return jt($c(t,e,n))}function tu(t,e,n,r){return Qt($c(t,e,n,r))}function eu(t){return t+5*(a.floor(t/16383)+1)}function nu(t,e){return t===ft?e===ft||e>0:0!==t}function ru(t,e){return t.getUint16(e,!0)}function ou(t,e,n){t.setUint16(e,n,!0)}function iu(t,e,n){t.setUint32(e,n,!0)}function au(t,e,n){t.setBigUint64(e,n,!0)}function su(t,e,n){t.set(e,n)}function cu(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function uu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,Ht:c,Vt:u,extraFieldLength:l}){const f=Uc(26),d=f.ct,w=Se(d);if(f.Te(t),f.Te(e),f.Te(n),a===ft){const t=new h(1),e=Se(t);ou(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),ou(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ke(a),f.Ze(4),c||o!==ft?f.ke(c?O:o):f.Ze(4),u||r!==ft?f.ke(u?O:r):f.Ze(4),f.Te(cu(s)),f.Te(l),{Pt:d,Zt:w,rawLastModDate:a}}function lu(t){return t.every(t=>t>=32&&t<=126)}function fu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function du(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):rr(t,e)}const wu=1048576,pu=".zip.js-temp",hu=1048576,mu=1048576,yu=".zip.js-temp",gu="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(ge(t));n.assign(ie,e),n.assign(de,e)}({baseURI:void 0===S&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===S?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",S.baseURI).href})}catch{}const Eu="Entry filename already exists",bu="Duplicate entry filename in the imported zip file",Su='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Ru="Entry is an ancestor of target entry",xu="Root directory cannot be moved",zu="Target entry is not a directory",Fu="Parent entry is not a directory",Du="Readable stream already consumed",Au="throw",Iu="keep-first",Cu="keep-last",ku=new u([Au,Iu,Cu]),Tu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",vu="Invalid readerOptions (must be an object)",_u="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Nu="Invalid passwords option (must be an array of strings)",Uu="Invalid requestPassword option (must be a function returning a string or undefined)",Ou="zipjs-abort-export",Mu=new w(0),Lu=new u([Yn,Gn,jn]);class Bu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(Eu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.He++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,Ve:r.Ve||r.uncompressedSize===ft,passThrough:r.passThrough,Ge:r.Ge||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=yl(t);r&&(t=r.pop(),n=gl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(Eu);n!=e.parent&&($u(e),e.parent=n,n.children.push(e),hl(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==ft))}}class Wu extends Bu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Wu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===ft||(t.constructor==No?e.type==n:t.constructor!=ko||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Ku(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([li(r),li(t,o)]);const i=qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof Ki||!o&&!i&&!a?s:Tn(s).pipeThrough(new vr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!ui(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Tn(a).pipeTo(_n(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Re(t)&&t.message==$e)return!1;throw t}}getText(t,e){return this.getData(new Mo(t),e)}getBlob(t,e){return this.getData(new No(t),e)}getData64URI(t,e){return this.getData(new ko(t),e)}getUint8Array(t){return this.getData(new oi,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return be(await this.getUint8Array(t)).buffer}replaceBlob(t){sl(this,{data:t,Reader:_o,Writer:No,uncompressedSize:t.size})}replaceText(t){sl(this,{data:t,Reader:Uo,Writer:Mo,uncompressedSize:Oo(t)})}replaceData64URI(t){sl(this,{data:t,Reader:Co,Writer:ko,uncompressedSize:cl(t)})}replaceUint8Array(t){sl(this,{data:t,Reader:ri,Writer:oi,uncompressedSize:t.length})}replaceReadable(t){sl(this,{data:null,Reader:qu(t),Writer:null,uncompressedSize:ft})}}class Pu extends Bu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Pu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return ml(this,t,{options:e},!0)}addText(t,e,n={}){return ml(this,t,{data:e,Reader:Uo,Writer:Mo,options:n,uncompressedSize:Oo(e)})}addBlob(t,e,n={}){return ml(this,t,{data:e,Reader:_o,Writer:No,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return ml(this,t,{data:e,Reader:Co,Writer:ko,options:n,uncompressedSize:cl(e)})}addUint8Array(t,e,n={}){return ml(this,t,{data:e,Reader:ri,Writer:oi,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return ml(this,t,{data:e,Reader:class extends ni{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return ml(this,t,{Reader:qu(e),options:n})}addFileSystemEntry(t,e={}){return fl(this,t,e)}addFileSystemHandle(t,e={}){return fl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),ml(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new _o(t),e)}importData64URI(t,e){return this.importZip(new Co(t),e)}importUint8Array(t,e){return this.importZip(new ri(t),e)}importHttpContent(t,e){return this.importZip(new ni(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new No(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new ko(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new oi,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;al(r.passThrough),nl(r);const s=el(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:ft,onprogress:ft,onend:ft,preventClose:!1}),w=Vu([t],t=>ju(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await _r(o,w),await E(t,e),a&&await _r(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await _r(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>b(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!Ju(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await b(n,e)}async function b(e,n){if(u.aborted){if(h||Ju(u.reason))return;Yt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Ou):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Ou));try{n.entryName===ft&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await li(t),r=new Wa(t,e)),al(e.passThrough),nl(e);const o=function(t){if(t===ft)return Au;if(ku.has(t))return t;throw new d(Su)}(e.duplicates),i=[],a={je:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==Iu){u=!0;break}if(o!=Cu)throw new d(bu);this.fs.remove(r),r=new Pu(this.fs,t,{data:null},e),i.push(r)}}else r=new Pu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==Iu)continue;if(o!=Cu)throw new d(bu);e.directory?e.data=t:(this.fs.remove(e),e=ft)}e||(e=new Pu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==Iu)continue;if(o!=Cu)throw new d(bu);this.fs.remove(s)}i.push(ml(r,c,{data:t,Reader:Yu(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==ft||(e.bufferedWrite=!0);const[i]=await g.all([Xu(r,el(e.readerOptions)),o?ft:li(t)]),a=o?t:new gc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=Vu(e.children,t=>ll(t)?0:1);let d=0,w=0;if(a&&await _r(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(ll(e))return;const{name:a,te:c}=Qu(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:ft,onend:ft,onprogress:async t=>{d+=t-p,p=t,s&&await _r(s,d,r)}}));w++,u&&await _r(u,w,f,h)}c&&await _r(c,d)}(a,r,Vu([r],Gu),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;el((t=n.assign({},t)).readerOptions),t.bufferedWrite===ft&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!ll(t)).map(n=>{const{name:r,te:o}=Qu(n,e,t);return{name:r,size:n.directory?0:tl(n,ul(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>ll(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(jt(t[_t]))throw new d(Ks);if(o!==ft&&!(o instanceof w))throw new d(As);const s=cu(o);if(s>M)throw new d(Ds);const l=t[Tt],f=new c,p=t[kt]===ft?0:t[kt];let h=p,m=dt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);$c(i,o,Bi)&&!e.endsWith(st)&&(e+=st);const s=Fc(i,e,o);({name:e}=s);const{ne:c}=Dc(i,e,o);0==c.level||c.compressionMethod!==ft||c.oe||await Ir(we())||(c.level=0);const u=!$c(i,o,Bi);if(u&&r===ft)throw new d(Ks);const{Be:w,ne:p}=Ic(i,u,r,c,o);if(u&&!c.oe&&nu(p.compressionMethod,p.level))throw new d(Ks);const E=n.assign({},o,s.ne,c,p,{[Tt]:l}),b=kc(E),S=_c(E),R={le:b,pe:cu(b.se,S.ce)};l&&Tc(R,h);const x=u?w:0;f.set(e,n.assign({},E,b,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.pe+x;y.push(z),g.add(Boolean(E.Gt||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||Cc(y,p,!0)!=Cc(y,p,!1)))&&!r)throw new d(Ks);const{ze:E,Fe:b}=Nc(f);let S=$c(i,t,Ni);if(h>=O||E>=O||f.size>=M){if(!1===S)throw new d(Gs);S=!0}else S===ft&&b&&(S=!0);return h-p+E+s+(S?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class Zu{constructor(){wl(this)}get children(){return this.root.children}remove(t){$u(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=ft}move(t,e){if(t==this.root)throw new d(xu);if(!e.directory)throw new d(zu);if(e.isDescendantOf(t))throw new d(Ru);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(Eu)}else $u(t),t.parent=e,e.children.push(t),hl(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):ft;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return pl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return pl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return pl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return pl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return pl(this,n=>n.importReadable(t,e))}importZip(t,e){return pl(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Hu={FS:Zu,ZipDirectoryEntry:Pu,ZipFileEntry:Wu};function Vu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function Gu(t){return t.uncompressedSize}function ju(t,e){const{data:n}=t;return e&&n instanceof Ki?n.compressedSize:t.uncompressedSize}function qu(t){let e;return function(){if(e)throw new d(Du);return e=!0,{readable:t}}}function Yu(t,e){return class extends Ao{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){nl(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new No,e);const s=new u;let c;for(;;){for(const t of ol(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.qe){await r.qe;continue}let n;r.qe=new g(t=>n=t);try{const e=await i(t,c);if(e===ft||null===e)break;if(typeof e!=mt)throw new d(Uu);const n=await f(il(e));if(n.done)return n.data;c=n.error}finally{r.qe=ft,n()}}if(!s.size)throw new d(oa);const l=new d($e);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(rl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new No,i);return function(t,e){const{je:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Re(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return rl(t)||e.zipCrypto&&Re(t)&&Lu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Ye=new _o(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Ye.readUint8Array(t,e)}}}function Ku(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function Xu(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=Ku(n.Reader,n.data,e);o.set(n,r);try{await li(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==ft&&(n.uncompressedSize=r.size,n.Ve=!1)})),o}function $u(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function Ju(t){return Boolean(t)&&t.message==Ou}function Qu(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof Ki){const e=ul(t,r),n=i.lastModDate===ft?r.lastModDate:i.lastModDate;({te:a,ee:s}=zc(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.Ge},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===ft)throw new d(Tu);return{name:o,te:c}}function tl(t,e){const{reader:n}=t;return n&&n.size!==ft?n.size:t.Ve?ft:ju(t,e)}function el(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new d(vu);return t&&(al(t.passThrough),nl(t)),t}function nl(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=mt)))throw new d(Nu);if(r&&typeof r!=pt)throw new d(Uu)}function rl(t){return Re(t)&&t.message==$e}function ol(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(il(o)),r.push(...e.je),n&&r.push(...n.filter(t=>t).map(il)),r}function il(t){return{key:t,options:{password:t,rawPassword:Mu}}}function al(t){if(Xt(t)===Wt)throw new d(_u)}function sl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:ft,uncompressedSize:r===ft?0:r,Ve:r===ft})}function cl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function ul(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function ll(t){return t.directory&&null===t.data}function fl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await dl(o)),"file"==o.kind){const t=await o.getFile();i.push(ml(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===ft&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function dl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await dl(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[T.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function wl(t){t.entries=[],t.He=0,t.root=new Pu(t)}function pl(t,e){const{entries:r,He:o,root:i}=t;return wl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,He:o,root:i}),e})}function hl(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function ml(t,e,n,r){if(t.directory){const o=yl(e);return o&&(e=o.pop(),t=gl(t,o)),r?new Pu(t.fs,e,n,t):new Wu(t.fs,e,n,t)}throw new d(Fu)}function yl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function gl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(Eu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Ru)}else t=new Pu(r.fs,e,{data:null},r)}),t}t.BlobReader=_o,t.BlobWriter=No,t.Data64URIReader=Co,t.Data64URIWriter=ko,t.ERR_ABORTED=Gt,t.ERR_AMBIGUOUS_ARCHIVE=ua,t.ERR_ANCESTOR_ENTRY=Ru,t.ERR_BAD_FORMAT=Ji,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ea,t.ERR_CODEC_OUT_OF_MEMORY=qn,t.ERR_DUPLICATED_NAME=Fs,t.ERR_DUPLICATE_IMPORTED_ENTRY=bu,t.ERR_ENCRYPTED=oa,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=la,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=ca,t.ERR_ENTRY_EXISTS=Eu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ta,t.ERR_EOCDR_NOT_FOUND=Qi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ra,t.ERR_HTTP_RANGE=po,t.ERR_HTTP_RESOURCE_CHANGED=ho,t.ERR_HTTP_STATUS=wo,t.ERR_INVALID_AUTHENTICATION_CODE=Je,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=Nn,t.ERR_INVALID_CODEC_MODULE=On,t.ERR_INVALID_COMMENT=Ds,t.ERR_INVALID_COMMENT_TYPE=As,t.ERR_INVALID_COMPRESSED_DATA=jn,t.ERR_INVALID_CRC32=Yn,t.ERR_INVALID_DATE=ks,t.ERR_INVALID_DUPLICATES=Su,t.ERR_INVALID_ENCRYPTION_STRENGTH=_s,t.ERR_INVALID_ENTRY=cc,t.ERR_INVALID_ENTRY_COMMENT=Is,t.ERR_INVALID_ENTRY_COMMENT_TYPE=Cs,t.ERR_INVALID_ENTRY_NAME=Ts,t.ERR_INVALID_EXTRAFIELD=Ms,t.ERR_INVALID_EXTRAFIELD_DATA=Ws,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Bs,t.ERR_INVALID_EXTRAFIELD_TYPE=Ls,t.ERR_INVALID_FILENAME_VALIDATION=wa,t.ERR_INVALID_FUNCTION_OPTION=Pt,t.ERR_INVALID_GID=tc,t.ERR_INVALID_LEVEL=ac,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=pa,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=oc,t.ERR_INVALID_MSDOS_DATA=ic,t.ERR_INVALID_PASSWORD=$e,t.ERR_INVALID_PASSWORDS=Nu,t.ERR_INVALID_PASSWORD_TYPE=Ht,t.ERR_INVALID_PASS_THROUGH=Tu,t.ERR_INVALID_PASS_THROUGH_VALUE=Vt,t.ERR_INVALID_READER=$s,t.ERR_INVALID_READER_OPTIONS=vu,t.ERR_INVALID_REQUEST_PASSWORD=Uu,t.ERR_INVALID_SIGNAL=Zt,t.ERR_INVALID_SIGNATURE_DATA=sc,t.ERR_INVALID_STRICTNESS=da,t.ERR_INVALID_UID=Qs,t.ERR_INVALID_UNCOMPRESSED_SIZE=Gn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=nc,t.ERR_INVALID_UNIX_ID_SIZE=rc,t.ERR_INVALID_UNIX_MODE=ec,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=vs,t.ERR_ITERATOR_COMPLETED_TOO_SOON=mo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=na,t.ERR_OVERLAPPING_ENTRY=sa,t.ERR_PARENT_NOT_DIRECTORY=Fu,t.ERR_READABLE_CONSUMED=Du,t.ERR_RESERVED_COMPRESSION_METHOD=Un,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=xu,t.ERR_SPLIT_ZIP_FILE=aa,t.ERR_TARGET_NOT_DIRECTORY=zu,t.ERR_UNDEFINED_COMPRESSION_METHOD=qs,t.ERR_UNDEFINED_CRC32=Ys,t.ERR_UNDEFINED_READER=Xs,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=js,t.ERR_UNDETERMINED_SIZE=Ks,t.ERR_UNSAFE_FILENAME=fa,t.ERR_UNSUPPORTED_COMPRESSION=Mn,t.ERR_UNSUPPORTED_CONTEXT=gu,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=ia,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Os,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Ns,t.ERR_UNSUPPORTED_FORMAT=Gs,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=_u,t.ERR_UNSUPPORTED_SPLIT_USDZ=Us,t.ERR_UNSUPPORTED_UINT64=ha,t.ERR_WORKER_STARTUP_TIMEOUT=xr,t.ERR_WRITER_NOT_INITIALIZED=yo,t.ERR_WRITER_SIZE_NOT_WRITABLE=go,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=uc,t.ERR_ZIP_NOT_EMPTY=Js,t.HttpRangeReader=class extends ni{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ni,t.Reader=Ao,t.SplitDataReader=ii,t.SplitDataWriter=ai,t.TextReader=Uo,t.TextWriter=Mo,t.Uint8ArrayReader=ri,t.Uint8ArrayWriter=oi,t.VERSION="2.19.0",t.WARNING_APPENDED_DATA=Ra,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=fc,t.WARNING_COMPRESSED_PATCHED_DATA=ga,t.WARNING_COMPRESSION_UNAVAILABLE=lc,t.WARNING_DUPLICATE_FILENAME=Da,t.WARNING_MALFORMED_EXTRA_FIELD=Ea,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=ka,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=Ta,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=va,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Ca,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Aa,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ia,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=za,t.WARNING_PREPENDED_DATA=xa,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Fa,t.WARNING_UNKNOWN_VERSION=ya,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=ba,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ma,t.WARNING_WRAPPED_ENTRIES_COUNT=Sa,t.Writer=Io,t.ZipDirectoryEntry=Pu,t.ZipEntry=Bu,t.ZipFS=Zu,t.ZipFileEntry=Wu,t.ZipReader=Wa,t.ZipReaderStream=Pa,t.ZipWriter=gc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new gc(n,t),this.vt=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Rc(e,t)}}()}});return xc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return xc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.vt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Rc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Rc(r,t),t}}},t.configure=function(t){n.assign(de,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=hu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=vn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=wu,directoryName:r=pu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=mu,directoryName:r=yu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(gu);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=Hu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Zn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:du(n,Kn)||du(t,Kn)||du(t,$n),decompression:du(r,Kn)||du(e,Kn)||du(e,$n),registered:!1},{compressionMethod:9,compression:!1,decompression:du(r,Xn)||du(e,Xn),registered:!1}];for(const t of Zn()){const e=Hn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:ft,decompression:e?typeof e.DecompressionStream==pt:ft,registered:!0})}return o},t.isZipFile=Za,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new d(Nn);if(Ln.includes(e))throw new d(Un);const c=typeof i==pt||typeof a==pt;if(!(c||typeof r==mt&&r.length))throw new d(Nn);Bn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Vn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of fe)delete de[t];n.assign(de,ie)},t.terminateWorkers=async function(){await g.allSettled([oo(),...Kr.map(t=>(so(t),t.terminate()))]),zr=ft,Fr=!1},t.unregisterCodec=function(t){const e=Bn.get(t);if(e){let n;Bn.delete(t),Bn.forEach(t=>n=n||t.format==e.format),n||Wn.delete(e.format)}}});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,at=1024,st="/",ct=30,ut=new s(2107,11,31,23,59,58),lt=new s(1980,0,1),ft=void 0,dt=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",gt=new w,Et=k.asyncDispose||k(),St="password",bt="rawPassword",Rt="passThrough",xt="signal",zt="useWebWorkers",Ft="useCompressionStream",Dt="preventClose",At="level",It="useUnicodeFileNames",Ct="dataDescriptor",Tt="offset",kt="usdz",vt="maxAppendedDataSize",_t="signCentralDirectory",Nt="entry",Ut="filename",Ot="comment",Mt="strict",Lt="balanced",Bt="tolerant",Wt="compressed",Pt="Invalid option (must be a function)",Zt="Invalid signal (must be an AbortSignal instance)",Ht="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Vt="Invalid passThrough option (must be a boolean or 'compressed')",Gt="The operation was aborted";function jt(t){if(t&&typeof t!=pt)throw new d(Pt);return t}function qt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new d(Zt);return t||ft}function Yt(t){if(t&&t.aborted)throw t.reason===ft?new DOMException(Gt,"AbortError"):t.reason}function Kt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new d(Ht)}function Xt(t){if(t!==ft&&typeof t!=yt&&t!==Wt)throw new d(Vt);return t}function $t(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function Jt(t,e,n){t!==ft&&$t(t,e,n)}function Qt(t){return typeof t==mt&&t.trim()?o(t):t}const te=262144,ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof C!=wt&&C.hardwareConcurrency&&(oe=C.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:te,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof I!=wt&&I},ae="maxWorkers",se="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",ae,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],fe=[se,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],de={...ie};function we(){return de}function pe(t){return he(t.chunkSize)}function he(t){return t=Qt(t),o.isInteger(t)&&t>=1?a.max(t,64):te}function me(t){const e={};for(const n of fe){const r=t[n];r!==ft&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=Qt(e),t==ae&&(!o.isInteger(e)||e<1))throw new d(ee)}else if(le.includes(t))jt(e);else if(t==se){if(e&&typeof e!=mt)throw new d(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new d(re);return e}function ge(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===ft&&r===ft)return t;const o=n.assign({},t);return o.CompressionStreamFallback===ft&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===ft&&(o.DecompressionStreamFallback=r),o}function Ee(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Se(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function be(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Re(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[ze,Fe,De,Ae,Ie,Ce,Te,ke]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=ke[255&t]^Te[t>>>8&255]^Ce[t>>>16&255]^Ie[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^ze[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ze[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends z{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof E==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Ue=64,Oe=20,Me=new w([128]),Le=new w(1),Be=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),We=new w(256),Pe=new Int32Array(256),Ze=new Int32Array(256),He=new Int32Array(256),Ve=new Int32Array(256);let Ge=!1;function je(t){const e=function(){const t=new Int32Array(Be),e=new Int32Array(16),n=new w(Ue),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Me,0,1);56!=i;)c(Le,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Oe),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Be),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Ue;)n[i++]=t[e++];i==Ue&&(u(r,0),i=0)}if(e+Ue<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Ue<=a;e+=Ue)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Ue),r=new w(Ue);t.length>Ue&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Ue;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Ue),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Ue),e.update(t,0,Oe);const o=e.digest();return e.update(n,0,Ue),o}}}function qe(t){return We[t>>>24]<<24|We[t>>>16&255]<<16|We[t>>>8&255]<<8|We[255&t]}function Ye(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Ke(t){return 255&(t<<1^27*(t>>7))}const Xe=typeof R!=wt&&typeof R.getRandomValues==pt,$e="Invalid password",Je="Invalid authentication code",Qe="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new d(tn)}const nn={name:"PBKDF2"},rn=n.assign({hash:{name:"HMAC"}},nn),on=n.assign({iterations:1e3,hash:{name:"SHA-1"}},nn),an=["deriveBits"],sn=[8,12,16],cn=[16,24,32],un=10,ln=typeof R!=wt,fn=ln&&R.subtle;let dn=ln&&typeof fn!=wt&&typeof fn.importKey==pt&&typeof fn.deriveBits==pt;class wn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){hn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await En(t,e,n,bn(r,0,sn[e])),i=bn(r,sn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw gn(t),new d($e)}(i,o,n,bn(t,0,sn[o]+2)),t=bn(t,sn[o]+2),r?(gn(i),e.error(new d(Qe))):a()):await s,i.h)return;const c=new w(t.length-un-(t.length-un)%16);e.enqueue(yn(i,t,c,0,un,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=bn(n,n.length-un),s=new w(bn(n,0,n.length-un));e.process(s,!0);const c=e.digest();let u=n.length<un?1:0;for(let t=0;t<un;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(Je));t.enqueue(s)}}}),mn(this,i)}}class pn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){hn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=gt;if(n?(s=await async function(t,e,n){const r=en(new w(sn[e]));return Ee(r,await En(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(yn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=bn(e.digest(),0,un);t.enqueue(Ee(i,a))}}}),mn(this,r)}}function hn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Sn(e,r),strength:o-1,S:gt,h:!1})}function mn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw gn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(gn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function yn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ee(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=bn(n,r,r+u);t.set(bn(e,0,u)),a.process(t,i)}return t.S=bn(e,u),n}function gn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function En(t,e,r,o){t.password=null;const i=cn[e],s=await async function(t,e,r){if(dn)try{const o=await fn.importKey("raw",t,rn,!1,an);return new w(await fn.deriveBits(n.assign({salt:e},on),o,8*r))}catch{dn=!1}return function(t,e,n,r){const o=je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Oe){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Oe),u=o.digest();for(let t=0;t<Oe;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Oe,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Ge){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),We[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);We[0]=99;for(let t=0;t<256;t++){const e=We[t],n=Ke(e),r=n<<24|e<<16|e<<8|n^e;Pe[t]=r,Ze[t]=r>>>8|r<<24,He[t]=r>>>16|r<<16,Ve[t]=r>>>24|r<<8}Ge=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=qe(r<<8|r>>>24)^i<<24,i=Ke(i)):n>6&&t%n==4&&(r=qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=je(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=Ye(a)^n[0],e=Ye(s)^n[1],i=Ye(c)^n[2],l=Ye(u)^n[3],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[4],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[5],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[6],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[7];t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[8],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[9],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[10],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[11],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[12],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[13],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[14],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[15],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[16],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[17],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[18],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[19],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[20],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[21],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[22],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[23],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[24],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[25],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[26],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[27],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[28],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[29],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[30],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[31],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[32],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[33],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[34],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[35],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[36],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[37],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[38],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[39];let h=40;r>10&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[40],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[41],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[42],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[43],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[44],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[45],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[46],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[47],h=48),r>12&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[48],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[49],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[50],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[51],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[52],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[53],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[54],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[55],h=56),o[0]=(We[f>>>24]<<24|We[d>>>16&255]<<16|We[w>>>8&255]<<8|We[255&p])^n[h],o[1]=(We[d>>>24]<<24|We[w>>>16&255]<<16|We[p>>>8&255]<<8|We[255&f])^n[h+1],o[2]=(We[w>>>24]<<24|We[p>>>16&255]<<16|We[f>>>8&255]<<8|We[255&d])^n[h+2],o[3]=(We[p>>>24]<<24|We[f>>>16&255]<<16|We[d>>>8&255]<<8|We[255&w])^n[h+3]}}(bn(s,0,i),bn(s,i,2*i)),t.h&&gn(t),bn(s,2*i)}function Sn(t,e){return e===ft?Ne(t):e}function bn(t,e,n){return t.subarray(e,n)}class Rn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=Fn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d($e);t=t.subarray(12)}r?e.error(new d(Qe)):e.enqueue(Fn(n,t))}})}}class xn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=en(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Dn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Dn(n,t),o),e.enqueue(r)}})}}function zn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new ve(o[0]),D:new ve(o[2])}),r)for(let e=0;e<r.length;e++)An(t,r[e]);else for(let n=0;n<e.length;n++)An(t,e.charCodeAt(n))}(t,e,r)}function Fn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,n[r]);return n}function Dn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,e[r]);return n}function An(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=Tn(a.imul(Tn(n+Cn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function In(t){const e=2|t.R[2];return Cn(a.imul(e,1^e)>>>8)}function Cn(t){return 255&t}function Tn(t){return 4294967295&t}function kn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function vn(t,e){t=kn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function _n(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Nn="Invalid codec definition",Un="Reserved compression method",On="Invalid codec module",Mn="Compression method not supported",Ln=[0,8,9,99],Bn=new c,Wn=new c;function Pn(t){return Bn.get(t)}function Zn(){return e.from(Bn.values(),t=>n.assign({},t,Wn.get(t.format)))}function Hn(t){return Wn.get(t)}function Vn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new d(On);Wn.set(t,{CompressionStream:n,DecompressionStream:r})}const Gn="Invalid uncompressed size",jn="Invalid compressed data",qn="Codec out of memory",Yn="Invalid CRC32",Kn="deflate-raw",Xn="deflate64-raw",$n="gzip",Jn=[31,139,8];class Qn extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,y,g,E=super.readable;const S=f&&Hn(f),b=sr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new _e,E=ur(E,h)),o)if(S)E=lr(E,ar(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new tr,E=lr(E,new b($n,{level:u,chunkSize:e})),E=ur(E,g);else try{E=cr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw hr(t);let e;try{e=new r($n)}catch{throw hr(t)}E=lr(E,e),E=ur(E,new tr)}i&&(s?E=ur(E,new xn(t)):(y=new pn(t),E=ur(E,y))),ir(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class tr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ee(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ee(n.subarray(0,s),t.subarray(0,i-s))),n=Ee(n.subarray(s),t.subarray(i-s))},flush(){const e=be(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class er extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=ur(x,new Rn(t)):(b=new wn(t),x=ur(x,b))),c){const t=new u,o=p&&Hn(p);let i;if(o)x=lr(x,ar(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=sr(l,r,n);if(a&&!f&&s!==ft&&E!==ft&&o)try{i=new o($n,{chunkSize:e})}catch{i=ft}if(!i)try{x=cr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===ft||!l&&n)throw hr(t);try{i=new r($n)}catch{throw hr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===ft?new ve:ft;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(Jn),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await wr(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=be(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await fr(i,t),await dr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Gn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await dr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw yr(t,Yn);if(l!=n)throw yr(t,Gn);return{done:!0}}throw pr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=ft,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await dr(n,t),pr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new _e,x=ur(x,S)),ir(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(Yn)}})}}const nr=new c;function rr(t,e){if(!t)return!1;let n=nr.get(t);n||(n=new c,nr.set(t,n));let r=n.get(e);if(r===ft){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function or(t){return rr(t,Kn)}function ir(t,e,r){e=ur(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function ar(t,e,n){if(!t)throw new d(Mn);return new t(e,n)}function sr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function cr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?Xn:Kn;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return lr(t,c,i)}function ur(t,e){return kn(t).pipeThrough(e)}function lr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await wr(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await fr(r,t),await dr(o,t)}}(),e.readable}async function fr(t,e){try{await t.abort(e)}catch{}}async function dr(t,e){try{await t.cancel(e)}catch{}}function wr(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function pr(t,e){return e.has(t)?t:yr(t,mr(t)?qn:jn)}function hr(t){return mr(t)?yr(t,qn):t}function mr(t){return Re(t)&&"Z_MEM_ERROR"==t.code}function yr(t,e){const n=new d(e);return n.cause=t,n}const gr="data",Er="deflate",Sr="inflate";class br extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Er)?i=Qn:o.startsWith(Sr)&&(i=er),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==ft&&r.outputSize>t.outputSize))throw new d(Gn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Rr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const xr="Worker startup timeout";let zr,Fr,Dr,Ar=()=>{};async function Ir(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!or(e)&&(r=e,!rr(r,$n)))||!!n&&await Cr();var r}async function Cr(){if(Ar)try{return await void 0,!0}catch{}return!1}function Tr(t){t.createWorker?Fr=!0:zr=!1}class kr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return Fr&&(f=ft),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Rr(pe(s))).pipeThrough(new vr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),zr===ft&&(zr=typeof T!=wt),(u&&Dr&&(zr&&l||f)?Dr:Nr)(t,s)}}class vr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await _r(t,n)},async transform(t,r){o+=t.length,e&&await _r(e,o,n),r.enqueue(t)},async flush(){r&&await _r(r,o)}})}}async function _r(t,...e){try{await t(...e)}catch{}}function Nr(t,e){return{run:()=>Ur(t,e)}}async function Ur({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Er),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!or(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new br(t,i),s=new Rr(pe(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Re(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Cr()),c}}const Or={type:"module"},Mr="error",Lr="abort";let Br,Wr,Pr;var Zr;function Hr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Vr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Gr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Wr===ft||Br!==t){const n=typeof t==pt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===ft&&(o=!1),o&&(u=Or);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Gr(t,e,r,o,!1);if(o)throw i;return Gr(t,e,r,!0,!1)}}else{o===ft&&(o=!0),o&&(u=Or);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return Gr(t,e,r,!1,i);throw n}}Br=t,Wr=c,Pr=u}else s=new T(Wr,Pr);return s.addEventListener("message",t=>{r.M=!0,jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Re(l))try{s!==ft&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Re(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==ft&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Yr({type:gr,value:t,done:n,messageId:i},e)}if(r==gr){const t=new w(o);await l.ready,await l.write(t),y()||Yr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Vr(e),g(s))}function g(t){y()||(p(t),E(),Re(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Mr,t=>qr(t,r)),s.addEventListener("messageerror",t=>qr(t,r)),s}function jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function qr(t,e){t.preventDefault&&t.preventDefault(),jr(e);const{M:r,B:o,writer:i,U:a}=e;Vr(e),r||(e.v=null);let s=t.error||new d(t.message||Mr);r||(s=n.assign(new d(s.message||Mr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function Yr(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=Se(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Zr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==pt&&(s=s());try{c=Gr(t.workerURI,r,t)}catch{return Tr(t),Nr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(xr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Re(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Lr,t);c.addEventListener(Lr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{Yr({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Vr(t),t.v=null,e){const t=new d(xr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Re(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Re(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Tr(t),Hr(t),Ur(t,e);if(n&&n.codecImportFailed){if(t.reader)return Hr(t),Ur(t,e);t.U()}throw n}}}})}return t.N},Dr=Zr;let Kr=[];const Xr=[];let $r,Jr,Qr=0;async function to(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Wn.has(t)&&e&&Vn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===ft||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===ft&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:ft,e.createWorker=e.useWebWorkers&&h?h:ft,n.useCompressionStream=a||a===ft&&r.useCompressionStream,(await async function(){const n=Kr.find(t=>!t.I);if(n)return so(n),new kr(n,t,e,S);if(Kr.length<m){const n={j:Qr};return Qr++,Kr.push(n),new kr(n,t,e,S)}return new g(n=>{Xr.push({resolve:n,stream:t,T:e}),Jr=r.workerStarvationTimeout,eo()})}()).run();function S(t){if(no(),t.O)return t.O=!1,oo();if(Xr.length){const[{resolve:e,stream:n,T:r}]=Xr.splice(0,1);e(new kr(t,n,r,S)),eo()}else t.v?(so(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{Kr=Kr.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Kr=Kr.filter(e=>e!=t)}}function eo(){!$r&&Xr.length&&o.isFinite(Jr)&&Jr>=0&&($r=v(ro,Jr))}function no(){$r&&(_($r),$r=null)}function ro(){if($r=null,Xr.length){const[{resolve:t,stream:e,T:n}]=Xr.splice(0,1);t(new kr({},e,io(n),ao)),eo()}}function oo(){const t=Xr.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new kr({},e,io(n),()=>{ao(),r()}))}));return no(),g.all(t)}function io(t){return n.assign({},t,{useWebWorkers:!1,workerURI:ft,createWorker:ft})}function ao(){no(),eo()}function so(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const co="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function uo(t,e){return fo(t,e,!0)}function lo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function fo(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=co[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const wo="HTTP error ",po="HTTP Range not supported",ho="HTTP resource changed",mo="Writer iterator completed too soon",yo="Writer not initialized",go="Invalid writer (size must be writable)",Eo="Content-Range",So="Range",bo="GET",Ro="bytes",xo=16777216,zo="writable",Fo=k();class Do{constructor(){this.size=0}init(){this.initialized=!0}}class Ao extends Do{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const s=e===ft?n:a.min(n,e-o),c=await di(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==ft&&o>=e||!c.length&&s)&&i.close()}})}}class Io extends Do{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(yo);return t.writeUint8Array(Se(e))}});n.defineProperty(t,zo,{get:()=>e})}writeUint8Array(){}}class Co extends Ao{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class To extends Io{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let ko,vo;class _o extends Ao{constructor(t){super(),n.assign(this,{J:t,size:t.size}),vo||(vo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();ko=1==e}catch{ko=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return kn(e.stream());if(ko)return kn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class No extends Do{constructor(t){super();const e=this,r=new z;n.defineProperty(e,zo,{get:()=>r.writable}),e.contentType=t,e.et=vn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Uo extends _o{constructor(t){super(new y([t],{type:"text/plain"}))}}function Oo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Mo extends No{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return fo(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Lo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ti,Xo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==ft){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(po);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=ft,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ti(bo,t,Yo(t,o,e));if(206!=n.status)throw new d(po);const c=Ho(n);if(c!==ft&&c!=o)throw new d(po);qo(t,n),jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Zo(this,t,e,ti,Xo)}}class Bo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ei,$o),super.init()}readUint8Array(t,e){return Zo(this,t,e,ei,$o)}}function Wo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=xo,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Po(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==wt||o)){const r=await e(bo,t,Yo(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Ro))throw new d(po);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),jo(t,r);const i=Vo(r);i===ft?await Qo(t,e,n):t.size=i,o&&o.length&&Ho(r)===t.size-o.length&&(t.ot=o)}}else await Qo(t,e,n)}async function Zo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return gt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(bo,t,Yo(t,e,n));if(206!=o.status)throw new d(po);const i=Ho(o);if(i!==ft&&i!=e)throw new d(po);qo(t,o),jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(po);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ho(t){const e=t.headers.get(Eo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Vo(t){const e=t.headers.get(Eo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Go({headers:t}){return{it:t.get("Etag")||ft,lastModified:t.get("Last-Modified")||ft}}function jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Go(e))}function qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Vo(e);if(t!==ft&&i!==ft&&t!=i)throw new d(ho);if(o){const t=Go(e);if(n.entries(o).some(([e,n])=>n!==ft&&t[e]!==ft&&n!=t[e]))throw new d(ho)}}}function Yo(t,e=0,r=1){return n.assign({},Ko(t),{[So]:Ro+"="+(e<0?e:e+"-"+(e+r-1))})}function Ko({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function Xo(t){await Jo(t,ti)}async function $o(t){await Jo(t,ei)}async function Jo(t,e){const n=await e(bo,t,Ko(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Qo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Ko(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ti(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(po):new d(wo+(a.statusText||a.status))}function ei(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(po):new d(wo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ni extends Ao{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Bo(t,e):new Lo(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class ri extends Ao{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class oi extends Io{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ii extends Ao{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(fi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===ft?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await di(c,s,e);else{const i=r-s;o=Ee(await di(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.ft=a.max(i,n.ft),o}}class ai extends Do{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===Fo)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(mo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await li(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,zo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Fo)}finally{t.releaseLock()}}}class si{constructor(t){return e.isArray(t)&&(t=new ii(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:kn(t)}),t}}class ci{constructor(t){t.writable===ft&&typeof t.next==pt&&(t=new ai(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:_n(t)});try{t.size=t.size===ft?0:t.size}catch{throw new d(go)}return t}}function ui(t){return Boolean(t&&t.getData)}async function li(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function fi(t){return t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t}function di(t,e,n){return t.readUint8Array(e,n)}function wi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Ao.prototype.createReadable.call(t,e):t.readable}function pi(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==ft&&(r.filename=n),t.push(r)}}const hi="filename",mi="rawFilename",yi="comment",gi="rawComment",Ei="uncompressedSize",Si="compressedSize",bi="offset",Ri="diskNumberStart",xi="lastModDate",zi="rawLastModDate",Fi="lastAccessDate",Di="rawLastAccessDate",Ai="creationDate",Ii="rawCreationDate",Ci="internalFileAttributes",Ti="externalFileAttributes",ki="msdosAttributesRaw",vi="msdosAttributes",_i="msDosCompatible",Ni="zip64",Ui="encrypted",Oi="version",Mi="versionMadeBy",Li="zipCrypto",Bi="directory",Wi="executable",Pi="compressionMethod",Zi="signature",Hi="extraField",Vi="unixMode",Gi="setuid",ji="setgid",qi="sticky",Yi=[hi,mi,Ei,Si,xi,zi,yi,gi,Fi,Di,Ai,Ii,bi,Ri,Ci,Ti,ki,vi,_i,Ni,Ui,Oi,Mi,Li,Bi,Wi,"symlink",Pi,Zi,"crc32",Hi,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Vi,"unixExternalUpper",Gi,ji,qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Ki{constructor(t){Yi.forEach(e=>this[e]=t[e])}}const Xi=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function $i(t,e,n){return t?e?12:16+4*n:0}const Ji="File format is not recognized",Qi="End of central directory not found",ta="End of Zip64 central directory locator not found",ea="Central directory header not found",na="Local file header not found",ra="Zip64 extra field not found",oa="File contains encrypted entry",ia="Encryption method not supported",aa="Split zip file",sa="Overlapping entry found",ca="Entry data out of bounds",ua="Ambiguous archive",la="Encrypted central directory is not supported",fa="Unsafe filename",da="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",wa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",pa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ha="64-bit value exceeds Number.MAX_SAFE_INTEGER",ma="unsorted central directory",ya="unknown version needed to extract",ga="compressed patched data",Ea="malformed extra field",Sa="unknown zip64 extensible data",ba="wrapped entries count",Ra="appended data",xa="prepended data",za="prepended central directory",Fa="trailing central directory data",Da="mismatched central directory offset",Aa="missing zip64 extra field",Ia="duplicate filename",Ca="mismatched zip64 end of central directory record",Ta="multiple end of central directory records",ka="mismatched local file header (filename)",va="mismatched local file header (general purpose bit flag)",_a="mismatched local file header (compression method)",Na="mismatched local file header (crc32 or sizes)",Ua=/^[a-zA-Z]:/,Oa=/(^|[\\/])\.\.([\\/]|$)/,Ma="utf-8",La="cp437",Ba=[[Ei,O],[Si,O],[bi,O],[Ri,M]],Wa={[M]:{yt:Ds,bytes:4},[O]:{yt:As,bytes:8}},Pa=i(o.MAX_SAFE_INTEGER);class Za{constructor(t,e={}){n.assign(this,{reader:new si(t),options:e,gt:{Et:new u,St:[],bt:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await li(r),r.size!==ft&&r.readUint8Array||(r=new _o(await vn(r.readable)),await li(r)),r.size<Y)throw new d(Ji);const o=e.warnings=[],i=us(t,e.options),s=i==Mt,c=i!=Bt,l=ds(Ss(e,t,vt),i),f=function(t,e){if(t===ft)return e;if(!cs(t))throw new d(wa);return t}(Ss(e,t,"filenameValidation"),i),p=Ss(e,t,"normalizeFilename"),{Rt:h,xt:m}=await ws(r,c,l);if(!h)throw await async function(t){return await ss(t)==W}(r)?new d(aa):new d(Qi);c&&m>1&&Es(Ta);const y=be(h);let g=Ds(y,12),E=Ds(y,16);const S=h.offset,b=Fs(y,20),R=S+Y+b,x=r.size-R;x>l&&Es(Ra),x>0&&pi(o,Ra);let F=Fs(y,4);const D=r.ft||0;let A,I,C,T,k,v=Fs(y,6),_=Fs(y,10),N=0,U=X;const P=E==O||g==O||_==M||v==M;if(E!=O&&v!=M&&(E+=as(r,v)),P){const t=h.offset>=K?await di(r,h.offset-K,K):gt,e=be(t);if(t.length==K&&Ds(e,0)==j){E=as(r,Ds(e,4))+As(e,8);let t=await di(r,E,X),i=be(t);const c=h.offset-K-X;if((t.length<X||Ds(i,0)!=G)&&E!=c&&c>=0){const e=E;E=c,E>e&&(N=E-e),t=await di(r,E,X),i=be(t)}if(t.length<X||Ds(i,0)!=G)throw new d(ta);if(C=!0,T=As(i,4)>44,T){const t=a.min(As(i,4)-44,r.size-E-X);t>0&&(U+=t,k=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=be(t),o=Fs(r,26);n.assign(e,{compressionMethod:Fs(r,0),compressedSize:As(r,2),uncompressedSize:As(r,10),encryptionAlgorithm:Fs(r,18),bitLength:Fs(r,20),flags:Fs(r,22),hashAlgorithm:Fs(r,24),hashData:t.subarray(28,28+o)})}return e}(await di(r,E+X,t)))}F==M?F=Ds(i,16):F!=Ds(i,16)&&gs(s,o,Ca),v==M?v=Ds(i,20):v!=Ds(i,20)&&gs(s,o,Ca),_==M?_=As(i,32):_!=As(i,32)&&gs(s,o,Ca),g==O?g=As(i,40):g!=As(i,40)&&gs(s,o,Ca),E=as(r,v)+As(i,48)+N}else if(E==O||g==O||v==M)throw new d(ta)}let V=g;const $=h.offset-(C?U+K:0);if(E>=r.size&&(N=r.size-E-g-Y,E=r.size-g-Y),D!=F)throw new d(aa);if(E<0)throw new d(Ji);let J=0,Q=await di(r,E,g),tt=be(Q);if(g){if(Q.length<4)throw new d(Ji);let t=$-g;if(E!=t&&v==F){const e=Ds(tt,J)==H||Boolean(k&&k.compressedSize)||ja(tt);let n=!e;if(t>=0&&t+4<=r.size){const o=await Ya(r,t);if(e)n=o;else if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await di(t,n,e-n),o=be(r);for(let t=r.length-6;t>=0;t--)if(Ds(o,t)==Z&&t+6+Fs(o,t+4)==r.length)return n+t}(r,$),n=e-g;e!==ft&&n>=0&&await Ya(r,n)&&(t=n)}}if(n){const n=E;if(E=t,Q=await di(r,E,g),tt=be(Q),E>n)N+=E-n,A=e;else{gs(s,o,Da);const t=E-n;if(Q.length>=q){const e=Ds(tt,42);!await Ka(r,e,B)&&await Ka(r,e+t,B)&&(N+=t)}}}}}const et=$-E;if(g!=et&&et>=0&&v==F&&(g=et,Q=await di(r,E,g),tt=be(Q)),E<0||E>=r.size)throw new d(Ji);e.directoryOffset=E,e.directoryLength=V;const nt=bs(e,t,"decryptCentralDirectory");let ct,ut;if(nt&&_&&Q.length>=4&&Ds(tt,0)!=H&&(T||ja(tt))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(k,V,Q.length);ut=Q.subarray(t),Q=await nt(Q.subarray(0,t),k),tt=be(Q),V=Q.length,ct=!0}k&&!ct&&(Q.length<4||Ds(tt,0)==H)&&pi(o,Sa),I=E;const lt=Ss(e,t,"filenameEncoding"),dt=Ss(e,t,"commentEncoding"),wt=new u;let pt,ht=-1;const mt=!s&&!C;!_&&mt&&(_=qa(tt,Q,J),_&&pi(o,ba));for(let i=0;i<_;i++){const c=new Ga(r,e.options);if(J+q>Q.length||Ds(tt,J)!=H){if(0==i&&!ct&&(T||ja(tt)))throw new d(la);throw new d(ea)}$a(c,tt,J+6);const u=Boolean(c.bitFlag.languageEncodingFlag),l=J+q,h=l+c.filenameLength+c.extraFieldLength,m=Fs(tt,J+4),y=!(m>>8),g=m>>8==3,E=Fs(tt,J+32),S=h+E,b=new w(Q.subarray(l,S)),R=b.subarray(0,c.filenameLength),x=b.subarray(c.filenameLength+c.extraFieldLength),F=u||!lt&&lo(R),D=u||!dt&&lo(x),A=Ds(tt,J+38),C=A&L,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=Ds(tt,J+42),U=bs(e,t,"decodeText")||uo,O=F?Ma:lt||La,B=D?Ma:dt||La;let W=U(R,O,Ut);W===ft&&(W=uo(R,O));let P,Z=U(x,B,Ot);Z===ft&&(Z=uo(x,B)),n.assign(c,{index:i,zt:ct,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Ft:E,offset:v,diskNumberStart:Fs(tt,J+34),internalFileAttributes:Fs(tt,J+36),externalFileAttributes:A,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(c.filenameLength,c.filenameLength+c.extraFieldLength),rawComment:x,filename:W,comment:Z});try{P=Ja(c,c,tt,J+6)}catch(t){if(s||t.message!=ra)throw t;c.Dt=!0,pi(o,Aa,c.filename)}if(W=c.filename,p){const t=p(W);t!==ft&&(W=c.filename=t)}if(fs(W,f)){const t=new d(fa);throw t.filename=W,t}P&&pi(o,Ea,W),c.offset+=N;const V=as(r,c.diskNumberStart)+c.offset;I=a.min(V,I),V<ht&&pi(o,ma,W),ht=V,(c.version&L)>63&&pi(o,ya,W),32&~c.rawBitFlag||pi(o,ga,W),wt.has(c.filename)&&(pt=!0),wt.add(c.filename);const G=c.externalFileAttributes>>16&M;c.unixMode===ft&&16877&G&&(c.unixMode=G);const j=Boolean(c.unixMode&it),Y=Boolean(c.unixMode&at),K=Boolean(512&c.unixMode),X=40960==((c.unixMode===ft?G:c.unixMode)&rt),$=c.unixMode!==ft&&(c.unixMode&rt)==ot||(G&rt)==ot||y&&k.directory||c.filename.endsWith(st),et=!X&&!$&&(c.unixMode!==ft?!!(73&c.unixMode):g&&!!(73&G));n.assign(c,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:et,directory:$,zipCrypto:c.encrypted&&!c.extraFieldAES});const nt=new Ki(c);if(nt.getData=(t,n)=>c.getData(t,nt,e.gt,n),nt.arrayBuffer=async t=>{const r=new z,o=vn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await c.getData(r,nt,e.gt,n.assign({},t,{preventClose:!1})),o},J=S,i==_-1&&mt){const t=qa(tt,Q,J);t&&(_+=t,pi(o,ba))}const{onprogress:ut}=t;if(ut)try{await ut(i+1,_,new Ki(c))}catch{}yield nt}let yt=J,Et=Xa(Q.subarray(J))||(ct?Xa(ut):ft);if(!Et&&!ct){const t=E+J,e=a.min($-t,65541);e>=6&&(Et=Xa(await di(r,t,e)))}Et&&(e.digitalSignature=Et,yt=J+6+Et.length),(J!=V&&yt!=V||!ct&&J!=g&&yt!=g)&&gs(s,o,Fa),pt&&gs(s,o,Ia);const St=Ss(e,t,"extractPrependedData"),bt=Ss(e,t,"extractAppendedData"),Rt=(s||St)&&_&&4==I&&await async function(t){const e=await ss(t);return e==W||808471376==e}(r)?4:0;return s&&(N>0||_&&I>Rt)&&Es(xa),(N>0||_&&I>4)&&pi(o,xa),A&&pi(o,za),St&&(e.prependedData=I>Rt?await di(r,Rt,I-Rt):gt),e.comment=b?await di(r,S+Y,b):gt,bt&&(e.appendedData=R<r.size?await di(r,R,r.size-R):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[Et](){return this.close()}}class Ha{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Za(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Va(t,e={}){if(t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t.size<Y)return!1;const n=us(e,{}),r=n!=Bt,o=ds(e[vt],n),{Rt:i,xt:a}=await ws(t,r,o);if(!i||n==Mt&&a>1)return!1;const s=Fs(be(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ga=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this;if(i.Dt)throw new d(ra);const s=we(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:g,rawLastModDate:E,uncompressedSize:S,compressedSize:b}=i,{dataDescriptor:R}=m,x=e.localDirectory={},z=e.warnings=[],F=as(c,f)+l,A=await di(c,F,ct),I=be(A);let C=Ss(i,o,St),T=Ss(i,o,bt);const k=Xt(Ss(i,o,Rt)),v=Boolean(k),_=!0===k;if(Kt(C,T),C=C&&C.length?C:ft,T=T&&T.length?T:ft,w&&99!=w.originalCompressionMethod)throw new d(Mn);if(A.length<ct||Ds(I,0)!=B)throw new d(na);$a(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=Ss(i,o,"checkLocalDirectory"),W=us(o,i.options),P=function(t,e){return t===ft?e!=Bt:Boolean(t)}(M,W),Z=Ss(i,o,"checkLocalFilename"),H=function(t,e){return t===ft?e==Mt:Boolean(t)}(Z===ft?M:Z,W);let V=gt;if(H&&(U||N)){const t=await di(c,F+ct,U+N);V=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await di(c,F+ct+U,N):gt;H&&(x.rawFilename=V),Ja(i,x,I,4,!0)&&pi(z,Ea),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.zt&&!(8192&~e.rawBitFlag);!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||gs(a,o,ka),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&gs(a,o,va),e.compressionMethod!=t.compressionMethod&&gs(a,o,_a),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||gs(a,o,Na)}(i,x,V,H,P?ft:z);const{lastAccessDate:G,creationDate:j,uid:q,gid:Y}=x;G&&(e.lastAccessDate=G),j&&(e.creationDate=j),q!==ft&&e.uid===ft&&(e.uid=q),Y!==ft&&e.gid===ft&&(e.gid=Y);const K=Ss(i,o,"checkPasswordOnly"),X=i.encrypted&&(!_||K),$=X&&!w;if(_||(e.zipCrypto=$),X&&!(64&~i.rawBitFlag))throw new d(ia);const J=v?ft:Pn(h);if(0!=h&&8!=h&&9!=h&&!J&&!v)throw new d(Mn);if(X){if(!$&&(w.strength<1||w.strength>3))throw new d(ia);if(!C&&!T)throw new d(oa)}if(O+b>c.size)throw new d(ca);const Q=b,tt=qt(Ss(i,o,xt));Yt(tt);let et=Ss(i,o,"checkOverlappingEntry");const nt=Ss(i,o,"checkOverlappingEntryOnly");nt&&(et=!0);const{onstart:rt,onprogress:ot,onend:it}=o,at=0!=h&&!v,st=v?b-$i(X,$,w&&w.strength):S,ut=9==h;let lt=Ss(i,o,Ft);ut&&(lt=!1);const dt=Ss(i,o,"checkCrc32"),wt=(dt===ft?Ss(i,o,"checkSignature"):dt)&&!v&&(!X||$||w&&1==w.vendorVersion),pt={options:{codecType:Sr,password:C,rawPassword:T,zipCrypto:$,encryptionStrength:w&&w.strength,checkCrc32:wt,checkAuthenticationCode:Ss(i,o,"checkAuthenticationCode"),passwordVerification:$&&(R?E>>>8&L:g>>>24&L),outputSize:st,crc32:g,compressed:at,encrypted:X,useWebWorkers:Ss(i,o,zt),useCompressionStream:lt,deflate64:ut,format:J?J.format:ft,codecURI:J?J.codecURI:ft,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:K},config:s,A:{signal:tt,size:Q,onstart:rt,onprogress:ot,onend:it}};let ht,mt,yt;et&&await async function({reader:t,At:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=be(await di(t,s+i,24)),c=[[n,!0],[n,!1],[!n,!0],[!n,!1]].map(([t,e])=>os(r,t,e)).filter(t=>t&&t.compressedSize==i&&t.uncompressedSize==a),l=c.find(t=>t.crc32==o)||c[0]||os(r,n,!0)||os(r,n,!1);l?(e.localDirectory.dataDescriptor=l,f=is(l.zip64,l.signature)):f=is(n,!1)}const w={start:r,end:s+i+f,At:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&rs(e,o)?o:i&&rs(e,i)?i:void 0}(h,w)||m.find(t=>rs(w,t));if(t){const e=new d(sa);throw e.overlappingEntry=t.At,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:c,At:e,index:u,offset:F,crc32:g,compressedSize:b,uncompressedSize:S,dataOffset:O,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,gt:r});try{if(!nt){K&&(t=new D),t=new ci(t),await li(t,function(t,e,n){return a.min(t,n?1032*e:e)}(st,b,at)),({writable:ht}=t);const e=kn(c.createReadable({offset:O,size:Q})),{outputSize:r}=await to({readable:e,writable:ht},pt);if(Yt(tt),r!=st)throw n.assign(new d(Gn),{outputSize:r});t.size+=r}}catch(e){const{outputSize:n}=pt;if(n!==ft?t.size+=n:Re(e)&&e.outputSize!==ft&&(t.size+=e.outputSize),!K||!Re(e)||e.message!=Qe)throw mt=e,yt=!0,e}finally{if((ui(t)||!Ss(i,o,Dt))&&ht&&!ht.locked){const t=ht.getWriter();if(yt)try{await t.abort(mt)}catch{}else await t.close()}}return K||nt?ft:t.getData?t.getData():ht}};function ja(t){const e=a.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==Ds(t,n))return!0;return!1}function qa(t,e,n){let r=0;for(;n+q<=e.length&&Ds(t,n)==H;)n+=q+Fs(t,n+28)+Fs(t,n+30)+Fs(t,n+32),r++;return r%65536?0:r}function Ya(t,e){return Ka(t,e,H)}async function Ka(t,e,n){return!(e<0||e+4>t.size)&&Ds(be(await di(t,e,4)),0)==n}function Xa(t){if(t.length>=6){const e=be(t);if(Ds(e,0)==Z){const n=Fs(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function $a(t,e,r){const o=t.rawBitFlag=Fs(e,r+2),i=!(1&~o),a=Ds(e,r+6);n.assign(t,{encrypted:i,version:Fs(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Rs(a),filenameLength:Fs(e,r+22),extraFieldLength:Fs(e,r+24)})}function Ja(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=be(a);let f=0,w=!1;try{for(;f<a.length;){const t=Fs(l,f),e=Fs(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Fs(r,o+4);n.assign(e,{signature:Ds(r,o+10),crc32:Ds(r,o+10),compressedSize:Ds(r,o+14),uncompressedSize:Ds(r,o+18)});const h=u.get(1);if(h)(function(t,e,n){e.zip64=!0;const r=be(t.data),o=Ba.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Wa[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(ra)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Wa[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0})(h,e,i)||(w=!0),e.extraFieldZip64=h;else if(Ba.some(([t,n])=>e[t]==n)){if(!i)throw new d(ra);w=!0}const m=u.get(28789);m&&(Qa(m,hi,mi,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Qa(y,yi,gi,e,t),e.extraFieldUnicodeComment=y);const g=u.get($);g&&(99==p||e.encrypted)&&g.data.length>=7?(function(t,e,r){const o=be(t.data),i=zs(o,4);n.assign(t,{vendorVersion:zs(o,0),vendorId:zs(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Fs(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=ft)}(g,e,p),e.extraFieldAES=g):(g&&(w=!0),e.compressionMethod=p);const E=u.get(13);E&&(ts(E,e),e.extraFieldPkwareUnix=E);const S=u.get(22613);S&&(ts(S,e),e.extraFieldUnixType1=S);const b=u.get(J);b&&(function(t,e,n){if(!t.data.length)return;const r=be(t.data),o=zs(r,0),i=[],a=[];n?(1&~o||(i.push(xi),a.push(zi)),2&~o||(i.push(Fi),a.push(Di)),4&~o||(i.push(Ai),a.push(Ii))):t.data.length>=5&&(i.push(xi),a.push(zi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Ds(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(b,e,i),e.extraFieldExtendedTimestamp=b);const R=u.get(10);R&&(function(t,e){const r=be(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Fs(r,i),n=Fs(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=be(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:xs(i),lastAccessDate:xs(a),creationDate:xs(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(R,e),e.extraFieldNTFS=R);const x=u.get(tt);let z;x&&(z=es(x,e,!0),e.extraFieldInfoZip=x);const F=u.get(et);F&&(es(F,z?{}:e,!1),e.extraFieldUnix=F);const D=u.get(Q);return D&&(e.extraFieldUSDZ=D),w}function Qa(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=be(t.data),s=new ve;s.append(i[r]);const c=be(new w(4));c.setUint32(0,s.get(),!0);const u=Ds(a,1),l=zs(a,0);n.assign(t,{version:l,[e]:uo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Ds(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function ts(t,e){if(t.data.length<8)return;const r=be(t.data),o={lastAccessDate:new s(1e3*(0|Ds(r,0))),lastModDate:new s(1e3*(0|Ds(r,4)))};t.data.length>=12&&(o.uid=Fs(r,8),o.gid=Fs(r,10)),n.assign(t,o),n.assign(e,o)}function es(t,e,r){try{const o=be(t.data);let i,a;if(r){let e=0;const r=zs(o,e++),s=zs(o,e++);i=ns(t.data.subarray(e,e+s)),e+=s;const c=zs(o,e++);a=ns(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Fs(o,0),a=Fs(o,2),n.assign(t,{uid:i,gid:a}));return i!==ft&&(e.uid=i),a!==ft&&(e.gid=a),i!==ft||a!==ft}catch{}}function ns(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function rs(t,e){return t.start<e.end&&e.start<t.end}function os(t,e,n){const r=n?4:0;if(t.byteLength<is(e,n)||n&&Ds(t,0)!=P)return ft;const o=Ds(t,r);let i,a;try{e?(i=As(t,r+4),a=As(t,r+12)):(i=Ds(t,r+4),a=Ds(t,r+8))}catch{return ft}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function is(t,e){return(t?20:12)+(e?4:0)}function as(t,e){return t.ht?t.ht(e):0}async function ss(t){return Ds(be(await di(t,0,4)))}function cs(t){return t===Mt||t===Lt||t===Bt}function us(t,e){return ls(t,ls(e,Lt))}function ls(t,e){const n=t.strictness;if(n!==ft){if(!cs(n))throw new d(da);return n}const r=t.checkAmbiguity;return r===ft?e:r?Mt:e==Bt?Bt:Lt}function fs(t,e){if(e==Bt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Oa.test(t)||t.startsWith("/")||t.startsWith("\\")||Ua.test(t))||e==Mt&&(n.includes(".")||n.includes("")||t.includes("\0"))}function ds(t,e){if(t!==ft){const e=Qt(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(pa);return e}return e==Mt?0:e==Bt?1/0:M}async function ws(t,e,n){const{size:r}=t,o=a.min(r,65557),i={It:64};let s,c,u=0;for await(const[n,a,l,f,d]of ps(t,o)){const o=Fs(n,f+20);if(d+Y+o==r){const o=await ms(t,n,a,f,d,r,i);if(2==o){if(s||(s=hs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=hs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of ps(t,o)){const o=hs(c,u,l);i||(i=o);const f=await ms(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{Rt:s,xt:u}}async function*ps(t,e){const n=t.size-e,r=await di(t,n,e),o=be(r);for(let t=r.length-Y;t>=0;t--)Ds(o,t)==V&&(yield[o,n,r,t,n+t])}function hs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function ms(t,e,n,r,o,i,a){const s=Fs(e,r+10),c=Ds(e,r+12),u=Ds(e,r+16);if(s==M||c==O||u==O)return await ys(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Fs(e,r+6);for(const r of[o-c,as(t,l)+u])if(await ys(t,e,n,r,i,a)==H)return 2;return 0}async function ys(t,e,n,r,o,i){return r<0||r+4>o?ft:r>=n?Ds(e,r-n):i.It>0?(i.It--,Ds(be(await di(t,r,4)),0)):ft}function gs(t,e,n){t?Es(n):pi(e,n)}function Es(t){const e=new d(ua);throw e.reason=t,e}function Ss(t,e,n){return e[n]===ft?t.options[n]:e[n]}function bs(t,e,n){return jt(Ss(t,e,n))}function Rs(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function xs(t){return new s(o(t/i(1e4)-i(116444736e5)))}function zs(t,e){return t.getUint8(e)}function Fs(t,e){return t.getUint16(e,!0)}function Ds(t,e){return t.getUint32(e,!0)}function As(t,e){const n=t.getBigUint64(e,!0);if(n>Pa)throw new d(ha);return o(n)}var Is=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ua,ERR_BAD_FORMAT:Ji,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ea,ERR_CODEC_OUT_OF_MEMORY:qn,ERR_ENCRYPTED:oa,ERR_ENCRYPTED_CENTRAL_DIRECTORY:la,ERR_ENTRY_DATA_OUT_OF_BOUNDS:ca,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ta,ERR_EOCDR_NOT_FOUND:Qi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ra,ERR_INVALID_AUTHENTICATION_CODE:Je,ERR_INVALID_COMPRESSED_DATA:jn,ERR_INVALID_CRC32:Yn,ERR_INVALID_FILENAME_VALIDATION:wa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:pa,ERR_INVALID_PASSWORD:$e,ERR_INVALID_STRICTNESS:da,ERR_INVALID_UNCOMPRESSED_SIZE:Gn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:na,ERR_OVERLAPPING_ENTRY:sa,ERR_SPLIT_ZIP_FILE:aa,ERR_UNSAFE_FILENAME:fa,ERR_UNSUPPORTED_COMPRESSION:Mn,ERR_UNSUPPORTED_ENCRYPTION:ia,ERR_UNSUPPORTED_UINT64:ha,ERR_WORKER_STARTUP_TIMEOUT:xr,WARNING_APPENDED_DATA:Ra,WARNING_COMPRESSED_PATCHED_DATA:ga,WARNING_DUPLICATE_FILENAME:Ia,WARNING_MALFORMED_EXTRA_FIELD:Ea,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:Da,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:va,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:_a,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Na,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ka,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Ca,WARNING_MISSING_ZIP64_EXTRA_FIELD:Aa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ta,WARNING_PREPENDED_CENTRAL_DIRECTORY:za,WARNING_PREPENDED_DATA:xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Fa,WARNING_UNKNOWN_VERSION:ya,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Sa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ma,WARNING_WRAPPED_ENTRIES_COUNT:ba,ZipReader:Za,ZipReaderStream:Ha,isZipFile:Va});const Cs="File already exists",Ts="Zip file comment exceeds 64KB",ks="Invalid zip file comment (must be a Uint8Array)",vs="File entry comment exceeds 64KB",_s="Invalid file entry comment (must be a string)",Ns="Invalid date (must be a valid Date instance)",Us="File entry name exceeds 64KB",Os="Version exceeds 65535",Ms="The strength must equal 1, 2, or 3",Ls="Encryption is not supported in USDZ files",Bs="Split zip files are not supported in USDZ files",Ws="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ps="Invalid extra field (must be a Map)",Zs="Invalid extra field type (must be integer 0..65535)",Hs="Invalid extra field data (must be a Uint8Array)",Vs="Extra field data exceeds 64KB",Gs=-2147483648,js=2147483647,qs=i(0),Ys=i("0x7fffffffffffffff"),Ks="Zip64 is not supported (set the 'zip64' option to 'true')",Xs="Undefined uncompressed size",$s="Undefined compression method",Js="Undefined CRC32",Qs="Undetermined size",tc="Undefined reader",ec="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",nc="Zip file not empty",rc="Invalid uid (must be integer 0..2^32-1)",oc="Invalid gid (must be integer 0..2^32-1)",ic="Invalid UNIX mode (must be integer 0..65535)",ac="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",sc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",cc="Invalid msdosAttributesRaw (must be integer 0..255)",uc="Invalid msdosAttributes (must be an object with boolean flags)",lc="Invalid level (must be integer 0..9)",fc="Signature data exceeds 64KB",dc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",wc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",pc="compression unavailable",hc="clamped last modification date",mc=new w([7,0,2,0,65,69,3,0,0]),yc="infozip",gc="unix",Ec=[8,9,5,3];let Sc=0;const bc=[];class Rc{constructor(t,e={}){t=new ci(t);const{availableSize:r=dt,maxSize:o=dt}=t,i=r>0&&r!==dt&&o>0&&o!==dt;if(i&&e[kt])throw new d(Bs);n.assign(this,{writer:t,Ct:i,options:e,Tt:new c,kt:new u,offset:e[Tt]===ft?t.size||t.writable.size||0:e[Tt],vt:e[Tt]===ft?0:e[Tt]-(t.size||t.writable.size||0),_t:new u,Nt:[],warnings:[],Ut:0,Ot:0,Mt:ft,Lt:!1})}prependZip(t){return Fc(this,async function(t,e){if(t.kt.size)throw new d(nc);await t.Bt(e)}(this,t))}appendZip(t,e={}){return Fc(this,this.Bt(t,e))}async Bt(t,r={}){const o=this,{_t:i,kt:a,Tt:s}=o,l=jt(r.filter);for(;i.size;)await g.allSettled(e.from(i));let f;const w=new g(t=>f=t);i.add(w);const p=[];let h;try{t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t));const{ZipReader:r}=await g.resolve().then(function(){return Is}),i=new r(t),f=await i.getEntries(),w=[];for(const t of f)l&&!await l(t)||w.push(t);await i.close(),await li(o.writer);const{directoryOffset:m}=i;w.forEach(({filename:t})=>{if(a.has(t))throw new d(Cs);a.add(t),p.push(t)}),o.Wt=!0;const{Pt:y}=o;o.Pt=new g(t=>h=()=>{o.Wt=!1,t()}),await y,o.Ct&&(delete o.Ct,await async function(t){return be(await di(t,0,4)).getUint32(0,!0)==W}(t)||(await Xc(o.writer,Yc()),o.offset+=4));const E=await async function(t,n,r,o,i,a){const{writer:s}=t,l=new c;if(s.closeDisk||a){const c=e.from(r).sort((t,e)=>qc(n,t)-qc(n,e)),f=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const r=qc(t,n[e]),a=n[e+1];a&&qc(t,a)>r&&(i=qc(t,a)),o[e]=i}return o}(n,c,i),d=new u(o);let w,p=0;for(let e=0;e<c.length;e++){const r=c[e];if(d.has(r)){const o=qc(n,r);o<p?l.set(r,w):(a||await Gc(t,n,p,o-p),s.closeDisk&&Zc(s,await jc(n,o))&&await s.closeDisk(),w={offset:Hc(t,s),diskNumberStart:Wc(s)},l.set(r,w),await Gc(t,n,o,f[e]-o),p=f[e])}}a||await Gc(t,n,p,i-p)}else{const e=t.offset;await Gc(t,n,0,i),r.forEach(t=>l.set(t,{offset:e+qc(n,t),diskNumberStart:0}))}return l}(o,t,f,w,m,Boolean(l));w.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:a,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:f,rawExtraField:d}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=i;d=Vc(d||gt),t.extraFieldAES&&(f=99);const m=du(d),y=Boolean(l)&&l.uncompressedSize!==ft,g=Boolean(l)&&l.compressedSize!==ft,S=-7&hu(w,p,h,a,f)|w<<1,{Zt:b,Ht:R}=wu({version:e,bitFlag:S,compressionMethod:f,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,Vt:g,Gt:y,extraFieldLength:m}),{crc32:x}=t;x!==ft&&uu(R,10,x);const{offset:z,diskNumberStart:F}=E.get(t);n.assign(t,{jt:!0,Gt:y,Vt:g,offset:z,diskNumberStart:F,qt:!1,Yt:gt,Kt:gt,Xt:gt,$t:gt,Jt:gt,Qt:gt,rawExtraField:d,te:gt,Zt:b,Ht:R}),s.set(t.filename,t)})}catch(t){throw p.forEach(t=>a.delete(t)),t}finally{f(),i.delete(w),h&&h()}}add(t="",e,r={}){const o=this,{_t:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Nt];if(a!==ft){const{ee:e,ne:r}=Ic(a,Xt(eu(t,o,Rt)),eu(t,o,xi));delete o[Nt],o=n.assign(e,r,o)}if(eu(t,o,Bi)&&!e.endsWith(st)&&(e+=st),t.kt.has(e))throw new d(Cs);t.kt.add(e),Sc<we().maxWorkers?Sc++:await new g(t=>bc.push(t));try{return await async function(t,e,r,o){const a=Cc(t,e,o);({name:e}=a);const s=Tc(t,e,o),{comment:c}=s,u=o[Hi];t.Tt.set(e,ft);const l=t.Mt,f={};let w,p;s.re.keepOrder&&(f.oe=new g(t=>w=t)),t.Mt=f;try{const{re:c}=s;0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0,pi(t.warnings,pc,e));const u=await async function(t,e,{re:r},o){if(r.ie&&!e&&!eu(t,o,Bi))throw new d(tc);let i;if(e){if(e=new si(e),await li(e),!e.readUint8Array&&!e.readable)throw new d(ec);({size:i}=e)}return n.assign({reader:e},vc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Pc(t.writer),m=Wc(t.writer);let y=o.crc32===ft?o[Zi]:o.crc32;const E=u.re.encrypted&&!c.zipCrypto;if(c.ie&&!c.ae&&E&&(y=ft),c.ie&&r&&!E&&y===ft)throw new d(Js);const S=Nc(o=n.assign({},o,a.re,s.re,u.re,{signature:o[Zi],crc32:y,offset:t.offset-h,diskNumberStart:m,[kt]:t.options[kt]}));S.se&&pi(t.warnings,hc,e);const b=Mc(o),R=du(S.ce,b.ue);p=await async function(t,e,r,o,a){const{Tt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,le:f,signal:w}=a,{fe:p,At:h,de:m,we:y}=o,E=t.options[kt];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.oe:ft;s.set(e,I);try{a.bufferedWrite||!u||t.Wt||t.Ut||t.Ot||!l&&!f?(S=!0,t.Ut++,A=a.createTempStream?await a.createTempStream():new z(ft,ft,{highWaterMark:dt}),A.size=0,await li(c)):(b=!0,t.Ot++,A=c,await T,await k()),await li(A);const h=Pc(c);t.Ct&&!S&&await Kc(t,c),E&&!S&&Uc(o,t.offset-h);const{ce:m}=p;S||await v();const y=Wc(c),R=Hc(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await Xc(A,m)),I=await async function(t,e,{diskNumberStart:r,oe:o},a,s,c){const{fe:u,pe:l,he:f}=a,{Zt:w,Ht:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,Yt:b,me:R,Xt:x,ye:z,ge:F,$t:D,Jt:A,Qt:I,Kt:C}=u,{ue:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,jt:P,Gt:Z,Vt:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,te:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:dt,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,ie:St,ae:bt,format:Rt,codecURI:xt}=c,zt={oe:o,versionMadeBy:Y,zip64:W,jt:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,Yt:b,me:R,Xt:x,$t:D,Jt:A,Qt:I,Kt:C,rawExtraField:X,te:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(dt),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=kn(wi(t,{size:n})),o={options:{codecType:Er,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await to({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,Yt(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Ks)}catch(t){const{outputSize:n}=o;throw n!==ft?e.size+=n:Re(t)&&t.outputSize!==ft&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,fe:r,pe:o},{zip64:a,zipCrypto:s,ie:c,dataDescriptor:u}){const{Ht:l,encrypted:f}=r,{Ee:d,Se:w}=o;f&&!s&&!c||t===ft||(uu(l,10,t),u&&uu(d,w,t)),a?u&&(lu(d,w+4,i(e)),lu(d,w+12,i(n))):(uu(l,14,e),uu(l,18,n),u&&(uu(d,w+4,e),uu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,fe:u,pe:l},c),G&&await Xc(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,Zt:w,Ht:p,signature:Ft,crc32:!y||V||St?Ft:ft,ye:z,ge:F,Gt:Z,Vt:H}),zt}(r,A,I,o,we(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.Ct&&await Kc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Wc(c),I.offset=Hc(t,c),E){const e=o.he;Uc(o,t.offset-Pc(c)),I.size+=o.he-e}!function({rawFilename:t,encrypted:e,zip64:n,me:r,crc32:o,compressedSize:a,uncompressedSize:s,Gt:c,Vt:u},l,{dataDescriptor:f,ie:d}){if(f||((!e||d&&o!==ft)&&uu(l,14,o),u||uu(l,18,a),c||uu(l,22,s)),n&&r){const e=ct+du(t)+4;lu(l,e,i(s)),lu(l,e+8,i(a))}}(I,p.be,a),await Xc(c,p.ce),await $c(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Ut--,b&&t.Ot--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.Wt=!0;const{Pt:e}=t;t.Pt=new g(e=>R=()=>{t.Wt=!1,e()}),await e}async function v(){Zc(c,du(p.ce))&&await c.closeDisk()}}(t,e,r,{fe:S,pe:b,he:R,At:f,de:l,we:w},o)}catch(n){throw t.Tt.delete(e),n}finally{w&&w(l&&l.oe)}return n.assign(p,{name:e,comment:c,extraField:u}),new Ki(p)}(t,e,r,o)}catch(n){throw t.kt.delete(e),n}finally{const t=bc.shift();t?t():Sc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Fc(o,s)}remove(t){const{kt:e,Tt:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==ft){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=gt,n={}){const r=this,{_t:o,writer:a}=this,{writable:s}=a;if(r.Lt)return zc(a);if(!(t instanceof w))throw new d(ks);if(du(t)>M)throw new d(Ts);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Nt.map(t=>t.Re));const c=r.Nt.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=Lc(t.Tt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{Tt:o,writer:i}=t,a=new w(n);await li(i);let s=0,c=0,u=Wc(i),l=Pc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,Yt:w,Kt:p,Xt:h,$t:m,Qt:y,rawExtraField:g,te:E,rawComment:S,versionMadeBy:b,Zt:R,Ht:x,Gt:z,Vt:F,qt:D,Te:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=du(w,p,h,m,y,g,E),N=q+du(d,S)+_;Zc(i,s+N-c)&&(await Xc(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Wc(i),l=Pc(i)),z||uu(x,18,k),F||uu(x,14,v),(A||D)&&n.version<45&&cu(x,0,45);const U=Bc(N);if(U.ke(H),U.ve(b),U._e(R.subarray(0,24)),U.ve(_),U.ve(du(S)),U.ve(D?M:T),U.ve(I),U.ke(C),U.ke(A?O:e),U._e(d),U._e(w),U._e(p),U._e(h),U._e(m),U._e(y),U._e(g),U._e(E),U._e(S),fu(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new Ki(n))}catch{}}return await Xc(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Wc(i),Ne:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=ru(t,n,_t);if(r){const n=await r(e),o=du(n);if(o>M)throw new d(fc);const i=Bc(6+o);i.ke(Z),i.ve(o),i._e(n);const{writer:a}=t;return Zc(a,du(i.ct))&&await a.closeDisk(),await Xc(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Ue:c,De:u}=r;let{Fe:l}=r,f=t.Tt.size,w=a.diskNumber,p=Hc(t,a);const h=du(e);if(h>M)throw new d(Ts);let m=eu(t,n,Ni),y=Wc(o);if(Zc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Ks);m=!0}else m===ft&&u&&(m=!0);const g=Bc(m?98:Y);Zc(o,du(g.ct)+h)&&await o.closeDisk(),y=Wc(o);let E=y==s.diskNumber?s.Ne:0;m&&(g.ke(G),g.Oe(44),g.ve(45),g.ve(45),g.ke(y),g.ke(w),g.Oe(E),g.Oe(f),g.Oe(l),g.Oe(p),g.ke(j),g.ke(y),g.Oe(i(Hc(t,o))+i(l)+i(c)),g.ke(y+1),eu(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ke(V),g.ve(y),g.ve(w),g.ve(E),g.ve(f),g.ke(l),g.ke(p),g.ve(h),await Xc(o,g.ct),h&&await Xc(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Ue:l,De:a})}(r,t,n),r.Lt=!0,!ui(a)&&eu(r,n,Dt)||await s.getWriter().close(),zc(a)}[Et](){return this.close()}}class xc extends g{then(t,e){const{Me:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function zc(t){return t.getData?t.getData():t.writable}function Fc(t,e){const r=new xc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Me=o,o.Re=g.prototype.then.call(r,ft,t=>n.assign(o,{xe:!0,error:t})),t.Nt.push(o),r}async function Dc(t,e){try{await t.writer.writable.abort(e)}catch{}}function Ac(t,e,n){t._t.add(e),e.catch(t=>{try{n(t)}catch{}})}function Ic(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new d(dc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[It]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{Xi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Hi]=T),A===ft&&I===ft||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?gc:yc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==Wt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:ft}),F&&(k.dataDescriptor=F.dataDescriptor,k[At]=Ec[F.level]),o===ft)k.rawLastModDate=w;else if(r!==Wt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(wc);return{ee:C,ne:k}}function Cc(t,n,r){let o=eu(t,r,_i),i=eu(t,r,Mi,o?20:768);const a=eu(t,r,Wi),s=ou(t,r,"uid"),c=ou(t,r,"gid");let u=ou(t,r,Vi),l=eu(t,r,"unixExtraFieldType"),f=eu(t,r,Gi),w=eu(t,r,ji),p=eu(t,r,qi);if(Jt(s,O,rc),Jt(c,O,oc),Jt(u,M,ic),l!==ft&&l!==yc&&l!==gc)throw new d(ac);if(l===gc&&(s!==ft&&s>M||c!==ft&&c>M))throw new d(sc);l!==ft||s===ft&&c===ft||(l=yc);let h=ou(t,r,ki),m=eu(t,r,vi);const y=h!==ft||m!==ft;if(s!==ft||c!==ft||u!==ft||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),Jt(h,L,cc),m&&(typeof m!==ht||e.isArray(m)))throw new d(uc);if(i>M)throw new d(Os);let g=eu(t,r,Ti);const E=g!==ft;E||(g=0),!r[Bi]&&n.endsWith(st)&&(r[Bi]=!0);const S=eu(t,r,Bi);if(S?(n.endsWith(st)||(n+=st),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==ft||Boolean(f||w||p);u=u===ft?g>>16&M:u&M,f?u|=it:f=Boolean(u&it),w?u|=at:w=Boolean(u&at),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|ot:u&rt||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==ft)t&=L;else if(e!==ft){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===ft&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==ft&&40960==(u&rt);return{name:n,re:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Tc(t,e,n){const r=ru(t,n,"encodeText")||Ne;let i=r(e,Ut);if(i===ft&&(i=Ne(e)),du(i)>M)throw new d(Us);const a=n[yi]||"";if(typeof a!=mt)throw new d(_s);let c=r(a,Ot);if(c===ft&&(c=Ne(a)),du(c)>M)throw new d(vs);const u=eu(t,n,Oi);if(u!==ft&&u>M)throw new d(Os);const l=nu(t,n,xi,new s),f=eu(t,n,zi),w=nu(t,n,Fi),p=nu(t,n,Ai),h=eu(t,n,Ci,0),m=Xt(eu(t,n,Rt)),y=Boolean(m),g=!0===m;let E=eu(t,n,St),S=eu(t,n,bt);Kt(E,S),E=E&&E.length?E:ft,S=S&&S.length?S:ft;const b=ou(t,n,"encryptionStrength",3),R=eu(t,n,Li),x=eu(t,n,"extendedTimestamp",!0),z=eu(t,n,"ntfsTimestamp"),F=eu(t,n,"keepOrder",!0),D=eu(t,n,zt),A=eu(t,n,"bufferedWrite"),I=ru(t,n,"createTempStream"),C=eu(t,n,"dataDescriptorSignature",!0),T=qt(eu(t,n,xt));Yt(T);const k=eu(t,n,It,!pu(i)||!pu(c)),v=eu(t,n,Pi),_=y||v===ft?ft:Pn(v);if(!y&&v!==ft&&0!==v&&8!==v&&!_)throw new d(Mn);let N=ou(t,n,At);if(Jt(N,9,lc),t.options[kt]){if(E!==ft||S!==ft)throw new d(Ls);N===ft&&v===ft&&(N=0)}y&&(N=Qt(n[At]));let U=eu(t,n,Ft),O=eu(t,n,Ct);A&&O===ft&&(O=!1),(O===ft||R&&!g)&&(O=!0),N!==ft&&6!=N&&(U=!1);const L=eu(t,n,Ni);if(!(R||E===ft&&S===ft||o.isInteger(b)&&b>=1&&b<=3))throw new d(Ms);const B=kc(n[Hi]),W=kc(n.localExtraField),P=kc(n.centralExtraField);return{comment:a,re:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,ie:y,ae:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:ft,codecURI:_?_.codecURI:ft,Le:_?_.versionNeeded:ft,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,Be:W,te:P}}}function kc(t){if(!t)return gt;if(!(t instanceof c))throw new d(Ps);let e=0,n=0;t.forEach((t,n)=>{if($t(n,M,Zs),!(t instanceof w))throw new d(Hs);if(du(t)>M)throw new d(Vs);e+=4+du(t)});const r=new w(e),o=be(r);return t.forEach((t,e)=>{cu(o,n,e),cu(o,n+2,du(t)),fu(r,t,n+4),n+=4+du(t)}),r}function vc(t,e,n,r,o){const{ie:i,ae:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ei],y===ft)throw new d(Xs);if(h===ft)throw new d($s)}const E=!0===w,S=eu(t,o,Ui);if(e&&a&&!S&&du(c,u))throw new d(Ws);const b=e&&(Boolean(c&&du(c)||u&&du(u))||a&&S);e||(p=0,h=0);const R=$i(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===ft?iu(y)+R:n+(a?0:R)):n===ft?(f=!0,(w||w===ft)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(au(h,p)?iu(y):y)+R));const x=!(b||e&&(0!==n||i)||au(h,p));x&&eu(t,o,Ct)===ft&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Ks);w=!0}return w=w||!1,{We:m,re:{dataDescriptor:f,le:x,zip64:w,jt:E,Pe:g,Gt:z,Vt:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function _c(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Nc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,Be:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,ie:S,encrypted:b,Gt:R,Vt:x,uncompressedSize:z,Pe:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&au(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Bc(t);if(e.ve(1),e.ve(t-4),T=e.ct,v&&(e.Oe(z),k)){const t=$i(b,l,y);e.Oe(S?0:z+t)}}else T=gt;let N,U,O,L,W;if(b&&!l){const t=Bc(du(mc)+2);t.ve($),t._e(mc),N=t.ct,N[8]=y}else N=gt;if(g){const t=Qc(n),e=(P=t)>=Gs&&P<=js;if(e){const e=9+(o?4:0)+(i?4:0),n=Bc(e);L=1+(o?2:0)+(i?4:0),W=t,n.ve(J),n.ve(e-4),n.Ze(L),n.ke(t),o&&n.ke(tu(Qc(o))),i&&n.ke(tu(Qc(i))),O=n.ct}else O=gt;if(E===ft?!e||Boolean(o||i):E)try{const t=Jc(n),e=Bc(36);e.ve(10),e.ve(32),e.He(4),e.ve(1),e.ve(24),e.Oe(t),e.Oe(o?Jc(o):t),e.Oe(i?Jc(i):t),U=e.ct}catch{U=gt}else U=gt}else U=O=gt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=yc||e===ft&&n===ft)if(r!=gc||e===ft&&n===ft)Z=H=gt;else{const t=Bc(8);t.ve(et),t.ve(4),t.ve((e===ft?0:e)&M),t.ve((n===ft?0:n)&M),Z=t.ct;const r=Bc(4);r.ve(et),r.ve(0),H=r.ct}else{const t=Oc(e===ft?0:e),r=Oc(n===ft?0:n),o=3+t.length+r.length,i=Bc(4+o);i.ve(tt),i.ve(o),i.Ze(1),i.Ze(t.length),i._e(t),i.Ze(r.length),i._e(r),Z=H=i.ct}}catch{Z=H=gt}I===ft&&(I=C?8:0),A===ft&&(A=0!=I||p||b?20:10);const{Le:V}=t;C&&V!==ft&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==ft&&(N[4]=1),cu(be(N),9,I),I=99);const G=_?du(T):0,j=G+du(N,O,U,Z,h,m);if(j+(t[kt]?67:0)>M)throw new d(Vs);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<lt?lt:q>ut?ut:q,K=du(O)?new s(1e3*Qc(n)):du(U)?n:Y,{Zt:X,Ht:Q,rawLastModDate:nt}=wu({version:A,bitFlag:hu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,Vt:x,Gt:R,extraFieldLength:j}),rt=Bc(ct+du(e)+j),ot=rt.ct,it=be(ot);return rt.ke(B),rt._e(X),rt._e(e),_&&rt._e(T),rt._e(N),rt._e(O),rt._e(U),rt._e(Z),rt._e(h),rt._e(m),w&&(x||uu(it,18,0),R||uu(it,22,0)),{ce:ot,be:it,Zt:X,Ht:Q,lastModDate:K,se:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ye:L,ge:W,Yt:gt,me:G,Xt:O,$t:U,Jt:Z,Qt:H,Kt:N,extraFieldLength:j}}function Uc(t,e){const{fe:n}=t;let{ce:r,extraFieldLength:o}=n,i=64-(e+du(r))%64;i<4&&(i+=64);const a=new w(i),s=be(a);cu(s,0,Q),cu(s,2,i-4);const c=r;n.ce=r=new w(du(c)+i),fu(r,c),fu(r,a,du(c));const u=be(r);cu(u,28,o+i),n.be=u,t.he+=i}function Oc(t){const e=new w(4);be(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Mc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=gt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=be(o),n&&(i=4,uu(r,0,P))),{ue:o,Ee:r,Se:i}}function Lc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,Kt:o,rawComment:i,$t:a,Qt:s,rawExtraField:c,te:u,ye:l,ge:f,jt:w,uncompressedSize:p,compressedSize:h}=r;let{Gt:m,Vt:y}=r;w||(m&&p<O&&(m=r.Gt=!1),y&&h<O&&(y=r.Vt=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Bc(t);e.ve(1),e.ve(t-4),m&&e.Oe(p),y&&e.Oe(h),g&&e.Oe(r.offset),E&&e.ke(r.diskNumberStart),S=e.ct}else S=gt;if(r.Yt=S,r.Te=g,r.qt=E,f===ft)b=gt;else{const t=Bc(9);t.ve(J),t.ve(5),t.Ze(l),t.ke(f),b=t.ct}r.Xt=b;const R=du(S,o,a,s,b,c,u);if(R>M)throw new d(Vs);e+=q+du(t,i)+R}return{Fe:e,De:n}}function Bc(t){const e=new w(t),n=be(e);let r=0;return{ct:e,Ze:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},ve:t=>{cu(n,r,t),r+=2},ke:t=>{uu(n,r,t),r+=4},Oe:t=>{lu(n,r,i(t)),r+=8},_e:t=>{fu(e,t,r),r+=du(t)},He:t=>r+=t}}function Wc(t){const{diskNumber:e=0}=t;return e}function Pc(t){const{diskOffset:e=0}=t;return e}function Zc(t,e){const{availableSize:n=dt}=t;return e>n}function Hc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.vt:0)}function Vc(t){const e=be(t);let n=0;for(;n+4<=du(t);){const r=4+su(e,n+2);if(1==su(e,n))return Vc(Ee(t.subarray(0,n),t.subarray(a.min(n+r,du(t)))));n+=r}return t}async function Gc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await $c(wi(e,{offset:n,size:r}),o,ft,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function jc(t,e){const n=await di(t,e,ct);if(du(n)<ct)return ct;const r=be(n);return ct+su(r,26)+su(r,28)}function qc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Yc(){const t=new w(4);return uu(be(t),0,W),t}async function Kc(t,e){delete t.Ct,await Xc(e,Yc()),t.offset+=4}async function Xc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=du(e),await r.write(e)}finally{r.releaseLock()}}async function $c(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(du(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Jc(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<qs?qs:e>Ys?Ys:e}}function Qc(t){return a.floor(t.getTime()/1e3)}function tu(t){return a.min(js,a.max(Gs,t))}function eu(t,e,n,r){const o=e[n]===ft?t.options[n]:e[n];return o===ft?r:o}function nu(t,e,n,r){const i=eu(t,e,n,r);if(null===i)return r;if(i!==ft&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new d(Ns);return i}function ru(t,e,n){return jt(eu(t,e,n))}function ou(t,e,n,r){return Qt(eu(t,e,n,r))}function iu(t){return t+5*(a.floor(t/16383)+1)}function au(t,e){return t===ft?e===ft||e>0:0!==t}function su(t,e){return t.getUint16(e,!0)}function cu(t,e,n){t.setUint16(e,n,!0)}function uu(t,e,n){t.setUint32(e,n,!0)}function lu(t,e,n){t.setBigUint64(e,n,!0)}function fu(t,e,n){t.set(e,n)}function du(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function wu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,Vt:c,Gt:u,extraFieldLength:l}){const f=Bc(26),d=f.ct,w=be(d);if(f.ve(t),f.ve(e),f.ve(n),a===ft){const t=new h(1),e=be(t);cu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),cu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ke(a),f.He(4),c||o!==ft?f.ke(c?O:o):f.He(4),u||r!==ft?f.ke(u?O:r):f.He(4),f.ve(du(s)),f.ve(l),{Zt:d,Ht:w,rawLastModDate:a}}function pu(t){return t.every(t=>t>=32&&t<=126)}function hu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function mu(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):rr(t,e)}const yu=1048576,gu=".zip.js-temp",Eu=1048576,Su=1048576,bu=".zip.js-temp",Ru="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(ge(t));n.assign(ie,e),n.assign(de,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const xu="Entry filename already exists",zu="Duplicate entry filename in the imported zip file",Fu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Du="Entry is an ancestor of target entry",Au="Root directory cannot be moved",Iu="Target entry is not a directory",Cu="Parent entry is not a directory",Tu="Readable stream already consumed",ku="throw",vu="keep-first",_u="keep-last",Nu=new u([ku,vu,_u]),Uu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Ou="Invalid readerOptions (must be an object)",Mu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Lu="Invalid passwords option (must be an array of strings)",Bu="Invalid requestPassword option (must be a function returning a string or undefined)",Wu="zipjs-abort-export",Pu=new w(0),Zu=new u([Yn,Gn,jn]);class Hu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(xu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ve++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,Ge:r.Ge||r.uncompressedSize===ft,passThrough:r.passThrough,je:r.je||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=bl(t);r&&(t=r.pop(),n=Rl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(xu);n!=e.parent&&(el(e),e.parent=n,n.children.push(e),El(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==ft))}}class Vu extends Hu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Vu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===ft||(t.constructor==No?e.type==n:t.constructor!=To||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Qu(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([li(r),li(t,o)]);const i=qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof Ki||!o&&!i&&!a?s:kn(s).pipeThrough(new vr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!ui(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await kn(a).pipeTo(_n(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Re(t)&&t.message==$e)return!1;throw t}}getText(t,e){return this.getData(new Mo(t),e)}getBlob(t,e){return this.getData(new No(t),e)}getData64URI(t,e){return this.getData(new To(t),e)}getUint8Array(t){return this.getData(new oi,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Se(await this.getUint8Array(t)).buffer}replaceBlob(t){fl(this,{data:t,Reader:_o,Writer:No,uncompressedSize:t.size})}replaceText(t){fl(this,{data:t,Reader:Uo,Writer:Mo,uncompressedSize:Oo(t)})}replaceData64URI(t){fl(this,{data:t,Reader:Co,Writer:To,uncompressedSize:dl(t)})}replaceUint8Array(t){fl(this,{data:t,Reader:ri,Writer:oi,uncompressedSize:t.length})}replaceReadable(t){fl(this,{data:null,Reader:$u(t),Writer:null,uncompressedSize:ft})}}class Gu extends Hu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Gu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Sl(this,t,{options:e},!0)}addText(t,e,n={}){return Sl(this,t,{data:e,Reader:Uo,Writer:Mo,options:n,uncompressedSize:Oo(e)})}addBlob(t,e,n={}){return Sl(this,t,{data:e,Reader:_o,Writer:No,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Sl(this,t,{data:e,Reader:Co,Writer:To,options:n,uncompressedSize:dl(e)})}addUint8Array(t,e,n={}){return Sl(this,t,{data:e,Reader:ri,Writer:oi,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Sl(this,t,{data:e,Reader:class extends ni{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Sl(this,t,{Reader:$u(e),options:n})}addFileSystemEntry(t,e={}){return hl(this,t,e)}addFileSystemHandle(t,e={}){return hl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Sl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new _o(t),e)}importData64URI(t,e){return this.importZip(new Co(t),e)}importUint8Array(t,e){return this.importZip(new ri(t),e)}importHttpContent(t,e){return this.importZip(new ni(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new No(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new To(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new oi,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;ll(r.passThrough),al(r);const s=il(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:ft,onprogress:ft,onend:ft,preventClose:!1}),w=Yu([t],t=>Xu(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await _r(o,w),await E(t,e),a&&await _r(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await _r(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!nl(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||nl(u.reason))return;Yt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Wu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Wu));try{n.entryName===ft&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await li(t),r=new Za(t,e)),ll(e.passThrough),al(e);const o=function(t){if(t===ft)return ku;if(Nu.has(t))return t;throw new d(Fu)}(e.duplicates),i=[],a={qe:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==vu){u=!0;break}if(o!=_u)throw new d(zu);this.fs.remove(r),r=new Gu(this.fs,t,{data:null},e),i.push(r)}}else r=new Gu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==vu)continue;if(o!=_u)throw new d(zu);e.directory?e.data=t:(this.fs.remove(e),e=ft)}e||(e=new Gu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==vu)continue;if(o!=_u)throw new d(zu);this.fs.remove(s)}i.push(Sl(r,c,{data:t,Reader:Ju(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==ft||(e.bufferedWrite=!0);const[i]=await g.all([tl(r,il(e.readerOptions)),o?ft:li(t)]),a=o?t:new Rc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=Yu(e.children,t=>pl(t)?0:1);let d=0,w=0;if(a&&await _r(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(pl(e))return;const{name:a,ee:c}=rl(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:ft,onend:ft,onprogress:async t=>{d+=t-p,p=t,s&&await _r(s,d,r)}}));w++,u&&await _r(u,w,f,h)}c&&await _r(c,d)}(a,r,Yu([r],Ku),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;il((t=n.assign({},t)).readerOptions),t.bufferedWrite===ft&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!pl(t)).map(n=>{const{name:r,ee:o}=rl(n,e,t);return{name:r,size:n.directory?0:ol(n,wl(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>pl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(jt(t[_t]))throw new d(Qs);if(o!==ft&&!(o instanceof w))throw new d(ks);const s=du(o);if(s>M)throw new d(Ts);const l=t[kt],f=new c,p=t[Tt]===ft?0:t[Tt];let h=p,m=dt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);eu(i,o,Bi)&&!e.endsWith(st)&&(e+=st);const s=Cc(i,e,o);({name:e}=s);const{re:c}=Tc(i,e,o);0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0);const u=!eu(i,o,Bi);if(u&&r===ft)throw new d(Qs);const{We:w,re:p}=vc(i,u,r,c,o);if(u&&!c.ie&&au(p.compressionMethod,p.level))throw new d(Qs);const E=n.assign({},o,s.re,c,p,{[kt]:l}),S=Nc(E),b=Mc(E),R={fe:S,he:du(S.ce,b.ue)};l&&Uc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.he+x;y.push(z),g.add(Boolean(E.jt||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||_c(y,p,!0)!=_c(y,p,!1)))&&!r)throw new d(Qs);const{Fe:E,De:S}=Lc(f);let b=eu(i,t,Ni);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(Ks);b=!0}else b===ft&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class ju{constructor(){yl(this)}get children(){return this.root.children}remove(t){el(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=ft}move(t,e){if(t==this.root)throw new d(Au);if(!e.directory)throw new d(Iu);if(e.isDescendantOf(t))throw new d(Du);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(xu)}else el(t),t.parent=e,e.children.push(t),El(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):ft;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return gl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return gl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return gl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return gl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return gl(this,n=>n.importReadable(t,e))}importZip(t,e){return gl(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const qu={FS:ju,ZipDirectoryEntry:Gu,ZipFileEntry:Vu};function Yu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function Ku(t){return t.uncompressedSize}function Xu(t,e){const{data:n}=t;return e&&n instanceof Ki?n.compressedSize:t.uncompressedSize}function $u(t){let e;return function(){if(e)throw new d(Tu);return e=!0,{readable:t}}}function Ju(t,e){return class extends Ao{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){al(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new No,e);const s=new u;let c;for(;;){for(const t of cl(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ye){await r.Ye;continue}let n;r.Ye=new g(t=>n=t);try{const e=await i(t,c);if(e===ft||null===e)break;if(typeof e!=mt)throw new d(Bu);const n=await f(ul(e));if(n.done)return n.data;c=n.error}finally{r.Ye=ft,n()}}if(!s.size)throw new d(oa);const l=new d($e);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(sl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new No,i);return function(t,e){const{qe:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Re(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return sl(t)||e.zipCrypto&&Re(t)&&Zu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Ke=new _o(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Ke.readUint8Array(t,e)}}}function Qu(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function tl(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=Qu(n.Reader,n.data,e);o.set(n,r);try{await li(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==ft&&(n.uncompressedSize=r.size,n.Ge=!1)})),o}function el(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function nl(t){return Boolean(t)&&t.message==Wu}function rl(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof Ki){const e=wl(t,r),n=i.lastModDate===ft?r.lastModDate:i.lastModDate;({ee:a,ne:s}=Ic(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.je},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===ft)throw new d(Uu);return{name:o,ee:c}}function ol(t,e){const{reader:n}=t;return n&&n.size!==ft?n.size:t.Ge?ft:Xu(t,e)}function il(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new d(Ou);return t&&(ll(t.passThrough),al(t)),t}function al(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=mt)))throw new d(Lu);if(r&&typeof r!=pt)throw new d(Bu)}function sl(t){return Re(t)&&t.message==$e}function cl(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(ul(o)),r.push(...e.qe),n&&r.push(...n.filter(t=>t).map(ul)),r}function ul(t){return{key:t,options:{password:t,rawPassword:Pu}}}function ll(t){if(Xt(t)===Wt)throw new d(Mu)}function fl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:ft,uncompressedSize:r===ft?0:r,Ge:r===ft})}function dl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function wl(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function pl(t){return t.directory&&null===t.data}function hl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await ml(o)),"file"==o.kind){const t=await o.getFile();i.push(Sl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===ft&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function ml(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await ml(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function yl(t){t.entries=[],t.Ve=0,t.root=new Gu(t)}function gl(t,e){const{entries:r,Ve:o,root:i}=t;return yl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ve:o,root:i}),e})}function El(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Sl(t,e,n,r){if(t.directory){const o=bl(e);return o&&(e=o.pop(),t=Rl(t,o)),r?new Gu(t.fs,e,n,t):new Vu(t.fs,e,n,t)}throw new d(Cu)}function bl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Rl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(xu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Du)}else t=new Gu(r.fs,e,{data:null},r)}),t}t.BlobReader=_o,t.BlobWriter=No,t.Data64URIReader=Co,t.Data64URIWriter=To,t.ERR_ABORTED=Gt,t.ERR_AMBIGUOUS_ARCHIVE=ua,t.ERR_ANCESTOR_ENTRY=Du,t.ERR_BAD_FORMAT=Ji,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ea,t.ERR_CODEC_OUT_OF_MEMORY=qn,t.ERR_DUPLICATED_NAME=Cs,t.ERR_DUPLICATE_IMPORTED_ENTRY=zu,t.ERR_ENCRYPTED=oa,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=la,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=ca,t.ERR_ENTRY_EXISTS=xu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ta,t.ERR_EOCDR_NOT_FOUND=Qi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ra,t.ERR_HTTP_RANGE=po,t.ERR_HTTP_RESOURCE_CHANGED=ho,t.ERR_HTTP_STATUS=wo,t.ERR_INVALID_AUTHENTICATION_CODE=Je,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=Nn,t.ERR_INVALID_CODEC_MODULE=On,t.ERR_INVALID_COMMENT=Ts,t.ERR_INVALID_COMMENT_TYPE=ks,t.ERR_INVALID_COMPRESSED_DATA=jn,t.ERR_INVALID_CRC32=Yn,t.ERR_INVALID_DATE=Ns,t.ERR_INVALID_DUPLICATES=Fu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ms,t.ERR_INVALID_ENTRY=dc,t.ERR_INVALID_ENTRY_COMMENT=vs,t.ERR_INVALID_ENTRY_COMMENT_TYPE=_s,t.ERR_INVALID_ENTRY_NAME=Us,t.ERR_INVALID_EXTRAFIELD=Ps,t.ERR_INVALID_EXTRAFIELD_DATA=Vs,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Hs,t.ERR_INVALID_EXTRAFIELD_TYPE=Zs,t.ERR_INVALID_FILENAME_VALIDATION=wa,t.ERR_INVALID_FUNCTION_OPTION=Pt,t.ERR_INVALID_GID=oc,t.ERR_INVALID_LEVEL=lc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=pa,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=cc,t.ERR_INVALID_MSDOS_DATA=uc,t.ERR_INVALID_PASSWORD=$e,t.ERR_INVALID_PASSWORDS=Lu,t.ERR_INVALID_PASSWORD_TYPE=Ht,t.ERR_INVALID_PASS_THROUGH=Uu,t.ERR_INVALID_PASS_THROUGH_VALUE=Vt,t.ERR_INVALID_READER=ec,t.ERR_INVALID_READER_OPTIONS=Ou,t.ERR_INVALID_REQUEST_PASSWORD=Bu,t.ERR_INVALID_SIGNAL=Zt,t.ERR_INVALID_SIGNATURE_DATA=fc,t.ERR_INVALID_STRICTNESS=da,t.ERR_INVALID_UID=rc,t.ERR_INVALID_UNCOMPRESSED_SIZE=Gn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=ac,t.ERR_INVALID_UNIX_ID_SIZE=sc,t.ERR_INVALID_UNIX_MODE=ic,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=Os,t.ERR_ITERATOR_COMPLETED_TOO_SOON=mo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=na,t.ERR_OVERLAPPING_ENTRY=sa,t.ERR_PARENT_NOT_DIRECTORY=Cu,t.ERR_READABLE_CONSUMED=Tu,t.ERR_RESERVED_COMPRESSION_METHOD=Un,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=Au,t.ERR_SPLIT_ZIP_FILE=aa,t.ERR_TARGET_NOT_DIRECTORY=Iu,t.ERR_UNDEFINED_COMPRESSION_METHOD=$s,t.ERR_UNDEFINED_CRC32=Js,t.ERR_UNDEFINED_READER=tc,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=Xs,t.ERR_UNDETERMINED_SIZE=Qs,t.ERR_UNSAFE_FILENAME=fa,t.ERR_UNSUPPORTED_COMPRESSION=Mn,t.ERR_UNSUPPORTED_CONTEXT=Ru,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=ia,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Ws,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Ls,t.ERR_UNSUPPORTED_FORMAT=Ks,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Mu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Bs,t.ERR_UNSUPPORTED_UINT64=ha,t.ERR_WORKER_STARTUP_TIMEOUT=xr,t.ERR_WRITER_NOT_INITIALIZED=yo,t.ERR_WRITER_SIZE_NOT_WRITABLE=go,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=wc,t.ERR_ZIP_NOT_EMPTY=nc,t.HttpRangeReader=class extends ni{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ni,t.Reader=Ao,t.SplitDataReader=ii,t.SplitDataWriter=ai,t.TextReader=Uo,t.TextWriter=Mo,t.Uint8ArrayReader=ri,t.Uint8ArrayWriter=oi,t.VERSION="2.20.0",t.WARNING_APPENDED_DATA=Ra,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=hc,t.WARNING_COMPRESSED_PATCHED_DATA=ga,t.WARNING_COMPRESSION_UNAVAILABLE=pc,t.WARNING_DUPLICATE_FILENAME=Ia,t.WARNING_MALFORMED_EXTRA_FIELD=Ea,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=Da,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=va,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=_a,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Na,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=ka,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Ca,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=Aa,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ta,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=za,t.WARNING_PREPENDED_DATA=xa,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Fa,t.WARNING_UNKNOWN_VERSION=ya,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=Sa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ma,t.WARNING_WRAPPED_ENTRIES_COUNT=ba,t.Writer=Io,t.ZipDirectoryEntry=Gu,t.ZipEntry=Hu,t.ZipFS=ju,t.ZipFileEntry=Vu,t.ZipReader=Za,t.ZipReaderStream=Ha,t.ZipWriter=Rc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Rc(n,t),this._t=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Dc(e,t)}}()}});return Ac(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return Ac(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this._t))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Dc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Dc(r,t),t}}},t.configure=function(t){n.assign(de,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Eu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=vn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=yu,directoryName:r=gu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Su,directoryName:r=bu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(Ru);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=qu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Zn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:mu(n,Kn)||mu(t,Kn)||mu(t,$n),decompression:mu(r,Kn)||mu(e,Kn)||mu(e,$n),registered:!1},{compressionMethod:9,compression:!1,decompression:mu(r,Xn)||mu(e,Xn),registered:!1}];for(const t of Zn()){const e=Hn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:ft,decompression:e?typeof e.DecompressionStream==pt:ft,registered:!0})}return o},t.isZipFile=Va,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new d(Nn);if(Ln.includes(e))throw new d(Un);const c=typeof i==pt||typeof a==pt;if(!(c||typeof r==mt&&r.length))throw new d(Nn);Bn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Vn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of fe)delete de[t];n.assign(de,ie)},t.terminateWorkers=async function(){await g.allSettled([oo(),...Kr.map(t=>(so(t),t.terminate()))]),zr=ft,Fr=!1},t.unregisterCodec=function(t){const e=Bn.get(t);if(e){let n;Bn.delete(t),Bn.forEach(t=>n=n||t.format==e.format),n||Wn.delete(e.format)}}});