@zip.js/zip.js 2.5.24 → 2.6.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.
- package/README.md +62 -0
- package/cli-deno/mc-zip.js +1 -3
- package/dist/zip-fs-full.js +14 -46
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +14 -46
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +14 -46
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker-inflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +14 -46
- package/dist/zip.min.js +1 -1
- package/index-fflate.js +1 -5
- package/index.d.ts +2 -14
- package/index.js +1 -5
- package/lib/core/codec-interface.js +1 -3
- package/lib/core/codec-pool.js +4 -15
- package/lib/core/io.js +12 -33
- package/lib/core/zip-fs-core.js +0 -1
- package/lib/core/zip-reader.js +1 -1
- package/lib/zip-fs.js +2 -6
- package/lib/zip-full-fflate.js +2 -6
- package/lib/zip-full.js +2 -6
- package/lib/zip-no-worker-deflate.js +2 -6
- package/lib/zip-no-worker-fflate-deflate.js +2 -6
- package/lib/zip-no-worker-fflate-inflate.js +2 -6
- package/lib/zip-no-worker-fflate.js +2 -6
- package/lib/zip-no-worker-inflate.js +2 -6
- package/lib/zip-no-worker.js +2 -6
- package/lib/zip.js +2 -6
- package/package.json +2 -2
- package/rollup-fflate.config.dev.js +3 -1
- package/rollup-fflate.config.js +3 -1
- package/tests/all/test-abort-signal-read.js +1 -1
- package/tests/all/test-abort-signal-write.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,BigInt:s,Math:i,Date:a,Map:o,URL:l,Error:c,Uint8Array:u,Uint16Array:d,Uint32Array:h,DataView:f,Blob:p,Promise:g,TextEncoder:w,TextDecoder:_,document:y,crypto:m,btoa:b,TransformStream:x,ReadableStream:v,WritableStream:k,CompressionStream:R,DecompressionStream:S,navigator:z}=globalThis,T=(()=>{const e=-2;function n(e){return r(e.map((([e,n])=>new t(e).fill(n,0,e))))}function r(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?r(n):n)),[])}const s=[0,1,2,3].concat(...n([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function a(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,u=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=u=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>u?++u:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=u,o=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=i.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,i=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,u,d,h,f=0;for(u=0;15>=u;u++)t.bl_count[u]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],u=n[2*n[2*l+1]+1]+1,u>a&&(u=a,f++),n[2*l+1]=u,l>e.max_code||(t.bl_count[u]++,d=0,i>l||(d=s[l-i]),h=n[2*l],t.opt_len+=h*(u+d),r&&(t.static_len+=h*(r[2*l+1]+d)));if(0!==f){do{for(u=a-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[a]--,f-=2}while(f>0);for(u=a;0!==u;u--)for(l=t.bl_count[u];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=u&&(t.opt_len+=(u-n[2*c+1])*n[2*c],n[2*c+1]=u),l--)}})(n),((e,n,r)=>{const s=[];let i,a,o,l=0;for(i=1;15>=i;i++)s[i]=l=l+r[i-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function o(e,t,n,r,s){const i=this;i.static_tree=e,i.extra_bits=t,i.extra_base=n,i.elems=r,i.max_length=s}a._length_code=[0,1,2,3,4,5,6,7].concat(...n([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),a.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],a.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],a.d_code=e=>256>e?s[e]:s[256+(e>>>7)],a.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],a.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const l=n([[144,8],[112,9],[24,7],[8,8]]);o.static_ltree=r([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,l[t]])));const h=n([[30,5]]);function f(e,t,n,r,s){const i=this;i.good_length=e,i.max_lazy=t,i.nice_length=n,i.max_chain=r,i.func=s}o.static_dtree=r([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,h[t]]))),o.static_l_desc=new o(o.static_ltree,a.extra_lbits,257,286,15),o.static_d_desc=new o(o.static_dtree,a.extra_dbits,0,30,15),o.static_bl_desc=new o(null,a.extra_blbits,0,19,7);const p=[new f(0,0,0,0,0),new f(4,4,8,4,1),new f(4,5,16,8,1),new f(4,6,32,32,1),new f(4,4,16,16,2),new f(8,16,32,32,2),new f(8,16,128,128,2),new f(8,32,128,256,2),new f(32,128,258,1024,2),new f(32,258,258,4096,2)],g=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],w=113,_=666,y=262;function m(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function b(){const t=this;let n,r,s,l,c,h,f,b,x,v,k,R,S,z,T,E,A,D,F,C,W,U,B,M,H,I,q,L,N,V,O,P,K;const Z=new a,j=new a,X=new a;let Y,G,J,Q,$,ee;function te(){let e;for(e=0;286>e;e++)O[2*e]=0;for(e=0;30>e;e++)P[2*e]=0;for(e=0;19>e;e++)K[2*e]=0;O[512]=1,t.opt_len=t.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],i=0,a=7,o=4;0===s&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++i<a&&n==s||(o>i?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(a=138,o=3):n==s?(a=6,o=3):(a=7,o=4))}function re(e){t.pending_buf[t.pending++]=e}function se(e){re(255&e),re(e>>>8&255)}function ie(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ae(e,t){const n=2*e;ie(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,i=e[1],a=0,o=7,l=4;for(0===i&&(o=138,l=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++a>=o||r!=i){if(l>a)do{ae(r,K)}while(0!=--a);else 0!==r?(r!=s&&(ae(r,K),a--),ae(16,K),ie(a-3,2)):a>10?(ae(18,K),ie(a-11,7)):(ae(17,K),ie(a-3,3));a=0,s=r,0===i?(o=138,l=3):r==i?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(e,n){let r,s,o;if(t.dist_buf[G]=e,t.lc_buf[G]=255&n,G++,0===e?O[2*n]++:(J++,e--,O[2*(a._length_code[n]+256+1)]++,P[2*a.d_code(e)]++),0==(8191&G)&&q>2){for(r=8*G,s=W-A,o=0;30>o;o++)r+=P[2*o]*(5+a.extra_dbits[o]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function ue(e,n){let r,s,i,o,l=0;if(0!==G)do{r=t.dist_buf[l],s=t.lc_buf[l],l++,0===r?ae(s,e):(i=a._length_code[s],ae(i+256+1,e),o=a.extra_lbits[i],0!==o&&(s-=a.base_length[i],ie(s,o)),r--,i=a.d_code(r),ae(i,n),o=a.extra_dbits[i],0!==o&&(r-=a.base_dist[i],ie(r,o)))}while(G>l);ae(256,e),Q=e[513]}function de(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function he(e,n,r){ie(0+(r?1:0),3),((e,n)=>{de(),Q=8,se(n),se(~n),t.pending_buf.set(b.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function fe(e){((e,n,r)=>{let s,i,l=0;q>0?(Z.build_tree(t),j.build_tree(t),l=(()=>{let e;for(ne(O,Z.max_code),ne(P,j.max_code),X.build_tree(t),e=18;e>=3&&0===K[2*a.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(),s=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==e?i==s?(ie(2+(r?1:0),3),ue(o.static_ltree,o.static_dtree)):(ie(4+(r?1:0),3),((e,t,n)=>{let r;for(ie(e-257,5),ie(t-1,5),ie(n-4,4),r=0;n>r;r++)ie(K[2*a.bl_order[r]+1],3);oe(O,e-1),oe(P,t-1)})(Z.max_code+1,j.max_code+1,l+1),ue(O,P)):he(e,n,r),te(),r&&de()})(0>A?-1:A,W-A,e),A=W,n.flush_pending()}function pe(){let e,t,r,s;do{if(s=x-B-W,0===s&&0===W&&0===B)s=c;else if(-1==s)s--;else if(W>=c+c-y){b.set(b.subarray(c,c+c),0),U-=c,W-=c,A-=c,e=S,r=e;do{t=65535&k[--r],k[r]=c>t?0:t-c}while(0!=--e);e=c,r=e;do{t=65535&v[--r],v[r]=c>t?0:t-c}while(0!=--e);s+=c}if(0===n.avail_in)return;e=n.read_buf(b,W+B,s),B+=e,3>B||(R=255&b[W],R=(R<<E^255&b[W+1])&T)}while(y>B&&0!==n.avail_in)}function ge(e){let t,n,r=H,s=W,i=M;const a=W>c-y?W-(c-y):0;let o=V;const l=f,u=W+258;let d=b[s+i-1],h=b[s+i];N>M||(r>>=2),o>B&&(o=B);do{if(t=e,b[t+i]==h&&b[t+i-1]==d&&b[t]==b[s]&&b[++t]==b[s+1]){s+=2,t++;do{}while(b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&u>s);if(n=258-(u-s),s=u-258,n>i){if(U=e,i=n,n>=o)break;d=b[s+i-1],h=b[s+i]}}}while((e=65535&v[e&l])>a&&0!=--r);return i>B?B:i}t.depth=[],t.bl_count=[],t.heap=[],O=[],P=[],K=[],t.pqdownheap=(e,n)=>{const r=t.heap,s=r[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&m(e,r[i+1],r[i],t.depth)&&i++,!m(e,s,r[i],t.depth));)r[n]=r[i],n=i,i<<=1;r[n]=s},t.deflateInit=(n,a,g,_,y,m)=>(_||(_=8),y||(y=8),m||(m=0),n.msg=null,-1==a&&(a=6),1>y||y>9||8!=_||9>g||g>15||0>a||a>9||0>m||m>2?e:(n.dstate=t,h=g,c=1<<h,f=c-1,z=y+7,S=1<<z,T=S-1,E=i.floor((z+3-1)/3),b=new u(2*c),v=[],k=[],Y=1<<y+6,t.pending_buf=new u(4*Y),s=4*Y,t.dist_buf=new d(Y),t.lc_buf=new u(Y),q=a,L=m,(e=>(e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,r=w,l=0,Z.dyn_tree=O,Z.stat_desc=o.static_l_desc,j.dyn_tree=P,j.stat_desc=o.static_d_desc,X.dyn_tree=K,X.stat_desc=o.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{x=2*c,k[S-1]=0;for(let e=0;S-1>e;e++)k[e]=0;I=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain,W=0,A=0,B=0,D=M=2,C=0,R=0})(),0))(n))),t.deflateEnd=()=>42!=r&&r!=w&&r!=_?e:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,k=null,v=null,b=null,t.dstate=null,r==w?-3:0),t.deflateParams=(t,n,r)=>{let s=0;return-1==n&&(n=6),0>n||n>9||0>r||r>2?e:(p[q].func!=p[n].func&&0!==t.total_in&&(s=t.deflate(1)),q!=n&&(q=n,I=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain),L=r,s)},t.deflateSetDictionary=(t,n,s)=>{let i,a=s,o=0;if(!n||42!=r)return e;if(3>a)return 0;for(a>c-y&&(a=c-y,o=s-a),b.set(n.subarray(o,o+a),0),W=a,A=a,R=255&b[0],R=(R<<E^255&b[1])&T,i=0;a-3>=i;i++)R=(R<<E^255&b[i+2])&T,v[i&f]=k[R],k[R]=i;return 0},t.deflate=(i,a)=>{let u,d,m,x,z;if(a>4||0>a)return e;if(!i.next_out||!i.next_in&&0!==i.avail_in||r==_&&4!=a)return i.msg=g[4],e;if(0===i.avail_out)return i.msg=g[7],-5;var H;if(n=i,x=l,l=a,42==r&&(d=8+(h-8<<4)<<8,m=(q-1&255)>>1,m>3&&(m=3),d|=m<<6,0!==W&&(d|=32),d+=31-d%31,r=w,re((H=d)>>8&255),re(255&H)),0!==t.pending){if(n.flush_pending(),0===n.avail_out)return l=-1,0}else if(0===n.avail_in&&x>=a&&4!=a)return n.msg=g[7],-5;if(r==_&&0!==n.avail_in)return i.msg=g[7],-5;if(0!==n.avail_in||0!==B||0!=a&&r!=_){switch(z=-1,p[q].func){case 0:z=(e=>{let t,r=65535;for(r>s-5&&(r=s-5);;){if(1>=B){if(pe(),0===B&&0==e)return 0;if(0===B)break}if(W+=B,B=0,t=A+r,(0===W||W>=t)&&(B=W-t,W=t,fe(!1),0===n.avail_out))return 0;if(W-A>=c-y&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a);break;case 1:z=(e=>{let t,r=0;for(;;){if(y>B){if(pe(),y>B&&0==e)return 0;if(0===B)break}if(3>B||(R=(R<<E^255&b[W+2])&T,r=65535&k[R],v[W&f]=k[R],k[R]=W),0===r||(W-r&65535)>c-y||2!=L&&(D=ge(r)),3>D)t=ce(0,255&b[W]),B--,W++;else if(t=ce(W-U,D-3),B-=D,D>I||3>B)W+=D,D=0,R=255&b[W],R=(R<<E^255&b[W+1])&T;else{D--;do{W++,R=(R<<E^255&b[W+2])&T,r=65535&k[R],v[W&f]=k[R],k[R]=W}while(0!=--D);W++}if(t&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a);break;case 2:z=(e=>{let t,r,s=0;for(;;){if(y>B){if(pe(),y>B&&0==e)return 0;if(0===B)break}if(3>B||(R=(R<<E^255&b[W+2])&T,s=65535&k[R],v[W&f]=k[R],k[R]=W),M=D,F=U,D=2,0!==s&&I>M&&c-y>=(W-s&65535)&&(2!=L&&(D=ge(s)),5>=D&&(1==L||3==D&&W-U>4096)&&(D=2)),3>M||D>M)if(0!==C){if(t=ce(0,255&b[W-1]),t&&fe(!1),W++,B--,0===n.avail_out)return 0}else C=1,W++,B--;else{r=W+B-3,t=ce(W-1-F,M-3),B-=M-1,M-=2;do{++W>r||(R=(R<<E^255&b[W+2])&T,s=65535&k[R],v[W&f]=k[R],k[R]=W)}while(0!=--M);if(C=0,D=2,W++,t&&(fe(!1),0===n.avail_out))return 0}}return 0!==C&&(t=ce(0,255&b[W-1]),C=0),fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a)}if(2!=z&&3!=z||(r=_),0==z||2==z)return 0===n.avail_out&&(l=-1),0;if(1==z){if(1==a)ie(2,3),ae(256,o.static_ltree),le(),9>1+Q+10-ee&&(ie(2,3),ae(256,o.static_ltree),le()),Q=7;else if(he(0,0,!1),3==a)for(u=0;S>u;u++)k[u]=0;if(n.flush_pending(),0===n.avail_out)return l=-1,0}}return 4!=a?0:1}}function x(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}return x.prototype={deflateInit(e,t){const n=this;return n.dstate=new b,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(t){const n=this;return n.dstate?n.dstate.deflate(n,t):e},deflateEnd(){const t=this;if(!t.dstate)return e;const n=t.dstate.deflateEnd();return t.dstate=null,n},deflateParams(t,n){const r=this;return r.dstate?r.dstate.deflateParams(r,t,n):e},deflateSetDictionary(t,n){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,t,n):e},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}},function(e){const t=new x,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new u(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let i,a,o=0,l=0,d=0;const h=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,i=t.deflate(0),0!=i)throw new c("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?h.push(new u(s)):h.push(s.slice(0,t.next_out_index))),d+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return h.length>1?(a=new u(d),h.forEach((e=>{a.set(e,l),l+=e.length}))):a=h[0]||new u,a}},this.flush=()=>{let e,r,i=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new c("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new u(a),o.forEach((e=>{r.set(e,i),i+=e.length})),r}}})(),E=void 0,A={chunkSize:524288,maxWorkers:void 0!==z&&z.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},D=n.assign({},A);function F(){return D}function C(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:u,workerScripts:d}=e;if(n!==E&&(D.baseURL=n),r!==E&&(D.chunkSize=r),s!==E&&(D.maxWorkers=s),i!==E&&(D.terminateWorkerTimeout=i),a!==E&&(D.useCompressionStream=a),o!==E&&(D.useWebWorkers=o),l!==E&&(D.Deflate=l),u!==E&&(D.Inflate=u),d!==E){const{deflate:e,inflate:n}=d;if((e||n)&&(D.workerScripts||(D.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");D.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");D.workerScripts.inflate=n}}}const W=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;W[e]=t}class U{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^W[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class B extends x{constructor(){super({start(){this.crc32=new U},transform(e){this.crc32.append(e)},flush(e){const t=new u(4);new f(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}function M(e){if(void 0===w){const t=new u((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)}const H={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=H.getPartial(n);return 32===r?e.concat(t):H._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+H.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=H.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>i.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=H.getPartial(s);return r.push(H.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{fromBits(e){const t=H.bitLength(e)/8,n=new u(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(H.partial(8*(3&n),r)),t}}},q={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};q.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=I.utf8String.toBits(e));const n=t._buffer=H.concat(t._buffer,e),r=t._length,s=t._length=r+H.bitLength(e);if(s>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const i=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=H.concat(t,[H.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=r[0],o=r[1],l=r[2],c=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+u+s[e]+n._key[i.floor(e/20)]|0;u=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+u|0}};const L={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(I.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new c("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,l,u;const d=new ArrayBuffer(s),h=new f(d);let p=0;const g=H;for(t=I.bytes.toBits(t),u=1;(s||1)>p;u++){for(i=a=e.encrypt(g.concat(t,[u])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;(s||1)>p&&o<i.length;o++)h.setInt32(p,i[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q.sha1,r=[[],[]],s=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>s&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},V="Invalid pasword",O=16,P={name:"PBKDF2"},K=n.assign({hash:{name:"HMAC"}},P),Z=n.assign({iterations:1e3,hash:{name:"SHA-1"}},P),j=["deriveBits"],X=[8,12,16],Y=[16,24,32],G=10,J=[0,0,0,0],Q="undefined",$="function",ee=typeof m!=Q,te=ee&&typeof m.subtle!=Q,ne=ee&&typeof m.getRandomValues==$,re=ee&&te&&typeof m.subtle.importKey==$,se=ee&&te&&typeof m.subtle.deriveBits==$,ie=I.bytes,ae=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,l=1;if(4!==s&&6!==s&&8!==s)throw new c("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,l,c;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,c=s[l=s[o=s[u]]];let d=16843009*c^65537*l^257*o^16843008*u,h=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=h=h<<24^h>>>8,t[n][i]=d=d<<24^d>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],u=i[3],d=i[4];let h,f,p,g=e[0]^n[0],w=e[t?3:1]^n[1],_=e[2]^n[2],y=e[t?1:3]^n[3],m=4;for(let e=0;r>e;e++)h=a[g>>>24]^o[w>>16&255]^l[_>>8&255]^u[255&y]^n[m],f=a[w>>>24]^o[_>>16&255]^l[y>>8&255]^u[255&g]^n[m+1],p=a[_>>>24]^o[y>>16&255]^l[g>>8&255]^u[255&w]^n[m+2],y=a[y>>>24]^o[g>>16&255]^l[w>>8&255]^u[255&_]^n[m+3],m+=4,g=h,w=f,_=p;for(let e=0;4>e;e++)s[t?3&-e:e]=d[g>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[m++],h=g,g=w,w=_,_=y,y=h;return s}},oe=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=H.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return H.clamp(t,s)}},le=N.hmacSha1;class ce extends x{constructor(e,r,s){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,signed:r,strength:s-1,pending:new u})},async transform(e,n){const r=this;if(r.password){const n=r.password;r.password=null;const s=pe(e,0,X[r.strength]+2);await(async(e,t,n)=>{await he(e,n,pe(t,0,X[e.strength]));const r=pe(t,X[e.strength]),s=e.keys.passwordVerification;if(s[0]!=r[0]||s[1]!=r[1])throw new c(V)})(r,s,n),r.ctr=new oe(new ae(r.keys.key),t.from(J)),r.hmac=new le(r.keys.authentication),e=pe(e,X[r.strength]+2),r.resolveReady()}else await r.ready;const s=new u(e.length-G-(e.length-G)%O);n.enqueue(de(r,e,s,0,G,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,r=pe(n,0,n.length-G),s=pe(n,n.length-G);let a=new u;if(r.length){const e=we(ie,r);t.hmac.update(e);const n=t.ctr.update(e);a=ge(ie,n)}if(i.valid=!0,t.signed){const e=pe(ge(ie,t.hmac.digest()),0,G);for(let t=0;G>t;t++)e[t]!=s[t]&&(i.valid=!1)}e.enqueue(a)}}),i=this}}class ue extends x{constructor(e,r){let s;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,strength:r-1,pending:new u})},async transform(e,n){const r=this;let s=new u;if(r.password){const e=r.password;r.password=null,s=await(async(e,t)=>{const n=(r=new u(X[e.strength]),ne?m.getRandomValues(r):L.getRandomValues(r));var r;return await he(e,t,n),fe(n,e.keys.passwordVerification)})(r,e),r.ctr=new oe(new ae(r.keys.key),t.from(J)),r.hmac=new le(r.keys.authentication),r.resolveReady()}else await r.ready;const i=new u(s.length+e.length-e.length%O);i.set(s,0),n.enqueue(de(r,e,i,s.length,0))},async flush(e){const t=this;await t.ready;let n=new u;if(t.pending.length){const e=t.ctr.update(we(ie,t.pending));t.hmac.update(e),n=ge(ie,e)}s.signature=ge(ie,t.hmac.digest()).slice(0,G),e.enqueue(fe(n,s.signature))}}),s=this}}function de(e,t,n,r,s,i){const a=t.length-s;let o;for(e.pending.length&&(t=fe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new u(t)).set(n,0)}return e})(n,a-a%O)),o=0;a-O>=o;o+=O){const s=we(ie,pe(t,o,o+O));i&&e.hmac.update(s);const a=e.ctr.update(s);i||e.hmac.update(a),n.set(ge(ie,a),o+r)}return e.pending=pe(t,o),n}async function he(e,t,r){const s=M(t),i=await((e,t,n,r,s)=>re?m.subtle.importKey("raw",t,n,!1,s):N.importKey(t))(0,s,K,0,j),a=await(async(e,t,n)=>se?await m.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,Z.iterations,n))(n.assign({salt:r},Z),i,8*(2*Y[e.strength]+2)),o=new u(a);e.keys={key:we(ie,pe(o,0,Y[e.strength])),authentication:we(ie,pe(o,Y[e.strength],2*Y[e.strength])),passwordVerification:pe(o,2*Y[e.strength])}}function fe(e,t){let n=e;return e.length+t.length&&(n=new u(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function pe(e,t,n){return e.subarray(t,n)}function ge(e,t){return e.fromBits(t)}function we(e,t){return e.toBits(t)}class _e extends x{constructor(e,t){let r;super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;if(n.password){const t=me(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(V);e=e.subarray(12)}t.enqueue(me(n,e))},flush(){r.valid=!0}}),r=this}}class ye extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=m.getRandomValues(new u(12));t[11]=n.passwordVerification,r=new u(e.length+t.length),r.set(be(n,t),0),s=12}else r=new u(e.length),s=0;r.set(be(n,e),s),t.enqueue(r)},flush(){}})}}function me(e,t){const n=new u(t.length);for(let r=0;r<t.length;r++)n[r]=ke(e)^t[r],ve(e,n[r]);return n}function be(e,t){const n=new u(t.length);for(let r=0;r<t.length;r++)n[r]=ke(e)^t[r],ve(e,t[r]);return n}function xe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new U(e.keys[0]),e.crcKey2=new U(e.keys[2]);for(let n=0;n<t.length;n++)ve(e,t.charCodeAt(n))}function ve(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Se(e.keys[1]+Re(e.keys[0])),e.keys[1]=Se(i.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ke(e){const t=2|e.keys[2];return Re(i.imul(t,1^t)>>>8)}function Re(e){return 255&e}function Se(e){return 4294967295&e}class ze extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",Ee="deflate-raw",Ae="undefined",De=typeof R==Ae,Fe=typeof S==Ae;let Ce=!0,We=!0;class Ue extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{compressed:s,encrypted:i,useCompressionStream:a,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:u,signed:d}=t,h=this;let p,g,w=He(super.readable);if(i&&!u||!d||([w,p]=w.tee(),p=p.pipeThrough(new B)),s)if(void 0!==a&&!a||De&&!We)w=Me(e,w,n);else try{w=w.pipeThrough(new R(Ee))}catch(t){We=!1,w=Me(e,w,n)}i&&(u?w=w.pipeThrough(new ye(o,l)):(g=new ue(o,c),w=w.pipeThrough(g))),Ie(h,w,(async()=>{let e;i&&!u&&(e=g.signature),i&&!u||!d||(e=await p.getReader().read(),e=new f(e.value.buffer).getUint32(0)),h.signature=e}))}}class Be extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:s,encrypted:i,password:a,passwordVerification:o,signed:l,encryptionStrength:u,compressed:d,useCompressionStream:h}=t;let p,g,w=He(super.readable);if(i&&(s?w=w.pipeThrough(new _e(a,o)):(g=new ce(a,l,u),w=w.pipeThrough(g))),d)if(void 0!==h&&!h||Fe&&!Ce)w=Me(e,w,n);else try{w=w.pipeThrough(new S(Ee))}catch(t){Ce=!1,w=Me(e,w,n)}i&&!s||!l||([w,p]=w.tee(),p=p.pipeThrough(new B)),Ie(this,w,(async()=>{if(i&&!s&&!g.valid)throw new c(Te);if((!i||s)&&l){const e=await p.getReader().read();if(e!=new f(e.value.buffer).getUint32(0,!1))throw new c(Te)}}))}}function Me(e,t,n){return t.pipeThrough(new ze(e,{chunkSize:n}))}function He(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Ie(e,t,r){e.length=0,t=t.pipeThrough(new x({transform(t,n){t&&t.length&&(e.length+=t.length,n.enqueue(t))},flush:r})),n.defineProperty(e,"readable",{get:()=>t})}const qe="deflate",Le="data",Ne="AbortError";class Ve{constructor(e,t,n,r,s){const{codecType:i}=r;async function a(i){const a=new i(e,r,s);await t.pipeThrough(a).pipeTo(n,{preventClose:!0});const{length:o,signature:l}=a;return{length:o,signature:l}}i.startsWith(qe)?this.run=()=>a(Ue):i.startsWith("inflate")&&(this.run=()=>a(Be))}}let Oe=!0;class Pe{constructor(e,t,r,s){const{readable:i,writable:a}=t,{options:o,config:d,streamOptions:h,webWorker:f,scripts:p,codecConstructor:w}=r;n.assign(e,{busy:!0,codecConstructor:w,readable:i,writable:a,options:n.assign({},o),scripts:p,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,s(e)}});const{signal:_,onstart:y,onprogress:m,size:b,onend:v}=h;let k=0;const R={};return y&&(R.start=()=>Ke(y,b())),R.transform=async(e,t)=>{k+=e.length,m&&await Ke(m,k,b()),t.enqueue(e)},R.flush=()=>{i.size=()=>k,v&&Ke(v,k)},e.readable=i.pipeThrough(new x(R,{highWaterMark:1,size:()=>d.chunkSize}),{signal:_}),f?((e,{baseURL:t,chunkSize:r})=>{const s={type:"module"},{readable:i,writable:a}=e;if(n.assign(e,{reader:i.getReader(),writer:a.getWriter(),result:new g(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Oe)try{e.worker=o({})}catch(t){Oe=!1,e.worker=o(s)}else e.worker=o(s);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:r,writer:s,resolveResult:i,rejectResult:a,onTaskFinished:o}=e,{type:l,data:h,messageId:f,result:p}=n,g=n.error;try{if(g){const{message:e,stack:t}=g,n=new c(e);n.stack=t,w(n)}else{if("pull"==l){const{value:e,done:t}=await r.read();d({type:Le,data:e,done:t,messageId:f})}l==Le&&(await s.ready,await s.write(new u(h))),"close"==l&&w(null,p)}}catch(e){w(e)}function w(e,t){e?a(e):i(t),s.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return d({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:r}}),e.result}}}return e.interface;function o(n){let r,s;r=e.scripts[0],"function"==typeof r&&(r=r());try{s=new l(r,t)}catch(e){s=r}return new Worker(s,n)}function d(t){const{worker:n,writer:r,onTaskFinished:s}=e;try{let{data:e}=t;if(e)try{const{buffer:r,length:s}=e;s!=r.byteLength&&(e=new u(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw r.releaseLock(),s(),e}}})(e,d):((e,t)=>{const n=new Ve(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:r}=e;return{async run(){try{return await n.run()}finally{r()}}}})(e,d)}}async function Ke(e,...t){try{await e(...t)}catch(e){}}let Ze=[];const je=[];let Xe=0;function Ye(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Ge="HTTP error ",Je="HTTP Range not supported",Qe="text/plain",$e="GET",et=65536;class tt{constructor(){this.size=0}init(){this.initialized=!0}}class nt extends tt{get readable(){const e=this,{chunkSize:t=et}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a}=n,{chunkOffset:o}=this;r.enqueue(await e.readUint8Array(s+o,i.min(t,a()-o))),o+t>a()?r.close():this.chunkOffset+=t}});return n}}class rt extends tt{constructor(){super();const e=this,t=new k({write:t=>e.writeUint8Array(t)});n.defineProperty(this,"writable",{get:()=>t})}}class st extends rt{writeUint8Array(e){this.size+=e.length}}class it extends nt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new u(await this.blob.slice(e,e+t).arrayBuffer())}}class at extends st{constructor(e){super();const t=this;t.contentType=e,t.arrayBuffersMaxlength=8,ot(t)}writeUint8Array(e){super.writeUint8Array(e);const t=this;t.arrayBuffers.length==t.arrayBuffersMaxlength&<(t),t.arrayBuffers.push(e.buffer)}getData(){const e=this;return e.blob||(e.arrayBuffers.length&<(e),e.blob=e.pendingBlob,ot(e)),e.blob}}function ot(e){e.pendingBlob=new p([],{type:e.contentType}),e.arrayBuffers=[]}function lt(e){e.pendingBlob=new p([e.pendingBlob,...e.arrayBuffers],{type:e.contentType}),e.arrayBuffers=[]}class ct extends nt{constructor(e,t){super();const r=this;r.url=e,r.preventHeadRequest=t.preventHeadRequest,r.useRangeHeader=t.useRangeHeader,r.forceRangeRequests=t.forceRangeRequests,r.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await dt(this,mt,gt)}readUint8Array(e,t){return ht(this,e,t,mt,gt)}}class ut extends nt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await dt(this,bt,wt)}readUint8Array(e,t){return ht(this,e,t,bt,wt)}}async function dt(e,t,n){if((e=>{const{baseURL:t}=F(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const r=await t($e,e,ft(e));if(!e.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new c(Je);{let s;const i=r.headers.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=Number(t))}}void 0===s?await yt(e,t,n):e.size=s}}else await yt(e,t,n)}async function ht(e,t,n,r,s){if(e.useRangeHeader||e.forceRangeRequests){const s=await r($e,e,ft(e,t,n));if(206!=s.status)throw new c(Je);return new u(await s.arrayBuffer())}return e.data||await s(e,e.options),new u(e.data.subarray(t,t+n))}function ft(e,t=0,r=1){return n.assign({},pt(e),{Range:"bytes="+t+"-"+(t+r-1)})}function pt(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function gt(e){await _t(e,mt)}async function wt(e){await _t(e,bt)}async function _t(e,t){const n=await t($e,e,pt(e));e.data=new u(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function yt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,pt(e))).headers.get("Content-Length");r?e.size=Number(r):await n(e,e.options)}}async function mt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new c(Je):new c(Ge+(i.statusText||i.status))}function bt(e,{url:t},r){return new g(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new o(e)})}else i(416==a.status?new c(Je):new c(Ge+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail.error)),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class xt extends nt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new ut(e,t):new ct(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const vt=4294967295,kt=65535,Rt=new a(2107,11,31),St=new a(1980,0,1),zt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class Tt{constructor(e){zt.forEach((t=>this[t]=e[t]))}}const Et="File already exists",At="Zip file comment exceeds 64KB",Dt="File entry comment exceeds 64KB",Ft="File entry name exceeds 64KB",Ct="Version exceeds 65535",Wt="The strength must equal 1, 2, or 3",Ut="Extra field type exceeds 65535",Bt="Extra field data exceeds 64KB",Mt="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ht=new u([7,0,2,0,65,69,3,0,0]);let It=0;async function qt(e,t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()}function Lt(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function Nt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e,t,n){e.setUint8(t,n)}function Ot(e,t,n){e.setUint16(t,n,!0)}function Pt(e,t,n){e.setUint32(t,n,!0)}function Kt(e,t,n){e.setBigUint64(t,n,!0)}function Zt(e,t,n){e.set(t,n)}function jt(e){return new f(e.buffer)}C({Deflate:T}),e.BlobReader=it,e.BlobWriter=at,e.Data64URIReader=class extends nt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=i.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new u(t),r=4*i.floor(e/3),s=this.dataStart,a=atob(this.dataURI.substring(r+s,4*i.ceil((e+t)/3)+s)),o=e-3*i.floor(r/4);for(let e=o;o+t>e;e++)n[e-o]=a.charCodeAt(e);return n}},e.Data64URIWriter=class extends st{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){super.writeUint8Array(e);const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=b(s):t.pending=s}getData(){return this.data+b(this.pending)}},e.ERR_ABORT=Ne,e.ERR_DUPLICATED_NAME=Et,e.ERR_HTTP_RANGE=Je,e.ERR_INVALID_COMMENT=At,e.ERR_INVALID_ENCRYPTION_STRENGTH=Wt,e.ERR_INVALID_ENTRY_COMMENT=Dt,e.ERR_INVALID_ENTRY_NAME=Ft,e.ERR_INVALID_EXTRAFIELD_DATA=Bt,e.ERR_INVALID_EXTRAFIELD_TYPE=Ut,e.ERR_INVALID_VERSION=Ct,e.ERR_NOT_SEEKABLE_READER="Reader is not seekable",e.ERR_UNSUPPORTED_FORMAT=Mt,e.HttpRangeReader=class extends xt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=xt,e.ReadableStreamReader=class extends tt{constructor(e){super(),e||(this.readable=new v({}))}},e.Reader=nt,e.TextReader=class extends nt{constructor(e){super(),this.blobReader=new it(new p([e],{type:Qe}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends st{constructor(e){super(),this.encoding=e,this.blob=new p([],{type:Qe})}writeUint8Array(e){super.writeUint8Array(e),this.blob=new p([this.blob,e.buffer],{type:Qe})}getData(){return this.blob.text()}},e.Uint8ArrayReader=class extends nt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends st{constructor(){super(),this.array=new u}writeUint8Array(e){super.writeUint8Array(e);const t=this,n=t.array;t.array=new u(n.length+e.length),t.array.set(n),t.array.set(e,n.length)}getData(){return this.array}},e.WritableStreamWriter=class extends st{constructor(e,{preventClose:t}={}){super(),this.preventClose=t,e||(e=new k({})),n.defineProperty(this,"writable",{get:()=>e})}},e.Writer=st,e.ZipWriter=class{constructor(e,t={}){n.assign(this,{writer:e,options:t,config:F(),files:new o,offset:e.size||0,pendingCompressedSize:0,pendingEntries:[],pendingAddFileCalls:new Set})}async add(e="",r,o={}){const l=this,{pendingAddFileCalls:p,pendingEntries:w,config:_}=l;if(It>=_.maxWorkers)return new g(((t,n)=>w.push({name:e,reader:r,options:o,resolve:t,reject:n})));{let _;It++;try{return _=(async(e,r,o,l)=>{if(r=r.trim(),l.directory&&!r.endsWith("/")?r+="/":l.directory=r.endsWith("/"),e.files.has(r))throw new c(Et);const p=M(r);if(p.length>kt)throw new c(Ft);const w=l.comment||"",_=M(w);if(_.length>kt)throw new c(Dt);const y=e.options.version||l.version||0;if(y>kt)throw new c(Ct);const m=e.options.versionMadeBy||l.versionMadeBy||20;if(m>kt)throw new c(Ct);const b=Nt(e,l,"lastModDate")||new a,x=Nt(e,l,"lastAccessDate"),v=Nt(e,l,"creationDate"),k=Nt(e,l,"password"),R=Nt(e,l,"encryptionStrength")||3,S=Nt(e,l,"zipCrypto");if(void 0!==k&&void 0!==R&&(1>R||R>3))throw new c(Wt);let z=new u;const{extraField:T}=l;if(T){let e=0,t=0;T.forEach((t=>e+=4+t.length)),z=new u(e),T.forEach(((e,n)=>{if(n>kt)throw new c(Ut);if(e.length>kt)throw new c(Bt);Zt(z,new d([n]),t),Zt(z,new d([e.length]),t+2),Zt(z,e,t+4),t+=4+e.length}))}let E=Nt(e,l,"extendedTimestamp");void 0===E&&(E=!0);let A=0,D=Nt(e,l,"keepOrder");void 0===D&&(D=!0);let F=0,C=Nt(e,l,"msDosCompatible");void 0===C&&(C=!0);const W=Nt(e,l,"internalFileAttribute")||0,U=Nt(e,l,"externalFileAttribute")||0;o&&(o.init&&!o.initialized&&await o.init(),void 0===o.size?l.dataDescriptor=!0:F=o.size,A=(e=>e+5*(i.floor(e/16383)+1))(F));let B=l.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=vt||F>=vt||A>=vt){if(!1===l.zip64||!1===e.options.zip64||!D)throw new c(Mt);B=!0}e.pendingCompressedSize+=A,await g.resolve();const H=Nt(e,l,"level"),I=Nt(e,l,"useWebWorkers"),q=Nt(e,l,"bufferedWrite");let L=Nt(e,l,"dataDescriptor"),N=Nt(e,l,"dataDescriptorSignature");const V=Nt(e,l,"signal"),O=Nt(e,l,"useCompressionStream");void 0===L&&(L=!0),L&&void 0===N&&(N=!1);const P=await(async(e,r,a,o)=>{const{files:l,writer:d}=e,{keepOrder:p,dataDescriptor:w,zipCrypto:_,signal:y}=o,m=t.from(l.values()).pop();let b,x,v,k,R,S={};l.set(r,S);try{let t;if(p&&(t=m&&m.lock,S.lock=new g((e=>v=e))),o.bufferedWrite||e.lockWriter||!w?(R=new at,R.init(),b=!0):(e.lockWriter=g.resolve(),d.init&&!d.initialized&&await d.init(),R=d),S=await(async(e,t,r,a,o)=>{const{rawFilename:l,lastAccessDate:d,creationDate:f,password:p,level:w,zip64:_,zipCrypto:y,dataDescriptor:m,dataDescriptorSignature:b,directory:x,version:v,versionMadeBy:k,rawComment:R,rawExtraField:S,useWebWorkers:z,onstart:T,onprogress:E,onend:A,signal:D,encryptionStrength:F,extendedTimestamp:C,msDosCompatible:W,internalFileAttribute:U,externalFileAttribute:B,useCompressionStream:M}=o,H=!(!p||!p.length),I=0!==w&&!x;let q,L,N;if(H&&!y){q=new u(Ht.length+2);const e=jt(q);Ot(e,0,39169),Zt(q,Ht,2),Vt(e,8,F)}else q=new u;if(C){N=new u(9+(d?4:0)+(f?4:0));const e=jt(N);Ot(e,0,21589),Ot(e,2,N.length-4),Vt(e,4,1+(d?2:0)+(f?4:0)),Pt(e,5,i.floor(o.lastModDate.getTime()/1e3)),d&&Pt(e,9,i.floor(d.getTime()/1e3)),f&&Pt(e,13,i.floor(f.getTime()/1e3));try{L=new u(36);const e=jt(L),t=Lt(o.lastModDate);Ot(e,0,10),Ot(e,2,32),Ot(e,8,1),Ot(e,10,24),Kt(e,12,t),Kt(e,20,Lt(d)||t),Kt(e,28,Lt(f)||t)}catch(e){L=new u}}else L=N=new u;const V={version:v||20,versionMadeBy:k,zip64:_,directory:!!x,filenameUTF8:!0,rawFilename:l,commentUTF8:!0,rawComment:R,rawExtraFieldZip64:_?new u(28):new u,rawExtraFieldExtendedTimestamp:N,rawExtraFieldNTFS:L,rawExtraFieldAES:q,rawExtraField:S,extendedTimestamp:C,msDosCompatible:W,internalFileAttribute:U,externalFileAttribute:B};let O=V.uncompressedSize=0,P=2048;m&&(P|=8);let K=0;I&&(K=8),_&&(V.version=V.version>45?V.version:45),H&&(P|=1,y||(V.version=V.version>51?V.version:51,K=99,I&&(V.rawExtraFieldAES[9]=8))),V.compressionMethod=K;const Z=V.headerArray=new u(26),j=jt(Z);Ot(j,0,V.version),Ot(j,2,P),Ot(j,4,K);const X=new h(1),Y=jt(X);let G;G=o.lastModDate<St?St:o.lastModDate>Rt?Rt:o.lastModDate,Ot(Y,0,(G.getHours()<<6|G.getMinutes())<<5|G.getSeconds()/2),Ot(Y,2,(G.getFullYear()-1980<<4|G.getMonth()+1)<<5|G.getDate());const J=X[0];Pt(j,6,J),Ot(j,22,l.length);const Q=q.length+N.length+L.length+S.length;Ot(j,24,Q);const $=new u(30+l.length+Q);let ee;Pt(jt($),0,67324752),Zt($,Z,4),Zt($,l,30),Zt($,q,30+l.length),Zt($,N,30+l.length+q.length),Zt($,L,30+l.length+q.length+N.length),Zt($,S,30+l.length+q.length+N.length+L.length);let te=0;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(a),await qt(r,$),V.dataWritten=t.dataWritten=!0;const n=()=>e.size,s=e.readable;s.size=n;const o={options:{codecType:qe,level:w,password:p,encryptionStrength:F,zipCrypto:H&&y,passwordVerification:H&&y&&J>>8&255,signed:!0,compressed:I,encrypted:H,useWebWorkers:z,useCompressionStream:M},config:a,streamOptions:{signal:D,size:n,onstart:T,onprogress:E,onend:A},codecConstructor:a.Deflate};ee=await(async(e,t)=>{const{options:n,config:r,streamOptions:s}=t,i=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:o,codecType:l}=n,{workerScripts:u}=r;let d;if(t.webWorker=!i&&(a||void 0===a&&r.useWebWorkers),t.scripts=t.webWorker&&u?u[l]:[],n.useCompressionStream=void 0===o?r.useCompressionStream:o,Ze.length<r.maxWorkers){const n={indexWorker:Xe};Xe++,Ze.push(n),d=new Pe(n,e,t,h)}else{const n=Ze.find((e=>!e.busy));n?(Ye(n),d=new Pe(n,e,t,h)):d=await new g((n=>je.push({resolve:n,stream:e,workerOptions:t})))}try{return await d.run()}catch(e){const{signal:t}=s;throw t&&t.aborted&&(t.reason==e||e.name==Ne)?new c(Ne):e}function h(e){if(je.length){const[{resolve:t,stream:n,workerOptions:r}]=je.splice(0,1);t(new Pe(e,n,r,h))}else if(e.worker){const{terminateWorkerTimeout:t}=r;Ye(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ze=Ze.filter((t=>t!=e)),e.terminate()}),t))}else Ze=Ze.filter((t=>t!=e))}})({readable:s,writable:r},o),O=V.uncompressedSize=e.size=s.size(),te=ee.length}else await qt(r,$),V.dataWritten=t.dataWritten=!0;let ne,re=new u,se=0;if(m&&(re=new u(_?b?24:20:b?16:12),ne=jt(re),b&&(se=4,Pt(ne,0,134695760))),e){const{signature:e}=ee;if(H&&!y||void 0===e||(Pt(j,10,e),V.signature=e,m&&Pt(ne,se,e)),_){const e=jt(V.rawExtraFieldZip64);Ot(e,0,1),Ot(e,2,24),Pt(j,14,vt),Kt(e,12,s(te)),Pt(j,18,vt),Kt(e,4,s(O)),m&&(Kt(ne,se+4,s(te)),Kt(ne,se+12,s(O)))}else Pt(j,14,te),Pt(j,18,O),m&&(Pt(ne,se+4,te),Pt(ne,se+8,O))}m&&await qt(r,re);const ie=$.length+te+re.length;return n.assign(V,{compressedSize:te,lastModDate:G,rawLastModDate:J,creationDate:f,lastAccessDate:d,encrypted:H,length:ie}),V})(a,S,R.writable,e.config,o),l.set(r,S),S.filename=r,b){let n=R.getData();await t,await async function t(){const{lockWriter:n}=e;if(n)return await n.then((()=>delete e.lockWriter)),t();e.lockWriter=new g((e=>x=e))}(),k=!0;const{writable:r}=d;if(!w){const e=26,t=await((e,t,n)=>n?e.slice(0,n).arrayBuffer():e.arrayBuffer())(n,0,e),s=new f(t);S.encrypted&&!_||Pt(s,14,S.signature),S.zip64?(Pt(s,18,vt),Pt(s,22,vt)):(Pt(s,18,S.compressedSize),Pt(s,22,S.uncompressedSize)),await qt(r,new u(t)),n=n.slice(e)}await n.stream().pipeTo(r,{preventClose:!0,signal:y}),k=!1}if(S.offset=e.offset,S.zip64)Kt(jt(S.rawExtraFieldZip64),20,s(S.offset));else if(S.offset>=vt)throw new c(Mt);return e.offset+=S.length,S}catch(t){throw(b&&k||!b&&S.dataWritten)&&(t.corruptedEntry=e.hasCorruptedEntries=!0,e.offset+=R.size),l.delete(r),t}finally{v&&v(),x&&x()}})(e,r,o,n.assign({},l,{rawFilename:p,rawComment:_,version:y,versionMadeBy:m,lastModDate:b,lastAccessDate:x,creationDate:v,rawExtraField:z,zip64:B,password:k,level:H,useWebWorkers:I,encryptionStrength:R,extendedTimestamp:E,zipCrypto:S,bufferedWrite:q,keepOrder:D,dataDescriptor:L,dataDescriptorSignature:N,signal:V,msDosCompatible:C,internalFileAttribute:W,externalFileAttribute:U,useCompressionStream:O}));return A&&(e.pendingCompressedSize-=A),n.assign(P,{name:r,comment:w,extraField:T}),new Tt(P)})(l,e,r,o),p.add(_),await _}finally{p.delete(_),It--;const e=w.shift();e&&l.add(e.name,e.reader,e.options).then(e.resolve).catch(e.reject)}}}async close(e=new u,n={}){const{pendingAddFileCalls:r,writer:a}=this,{writable:o}=a;for(;r.size;)await g.all(t.from(r));return await(async(e,n,r)=>{const{files:a}=e;let o=0,l=0,d=e.offset,h=a.size;for(const[,e]of a)l+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let f=r.zip64||e.options.zip64||!1;if(d>=vt||l>=vt||h>=kt){if(!1===r.zip64||!1===e.options.zip64)throw new c(Mt);f=!0}const p=new u(l+(f?98:22)),g=jt(p);for(const[e,n]of t.from(a.values()).entries()){const{rawFilename:t,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraField:c,rawComment:d,versionMadeBy:h,headerArray:f,directory:w,zip64:_,msDosCompatible:y,internalFileAttribute:m,externalFileAttribute:b}=n;let x,v;if(n.extendedTimestamp){v=n.rawExtraFieldNTFS,x=new u(9);const e=jt(x);Ot(e,0,21589),Ot(e,2,x.length-4),Vt(e,4,1),Pt(e,5,i.floor(n.lastModDate.getTime()/1e3))}else v=x=new u;const k=s.length+l.length+x.length+v.length+c.length;if(Pt(g,o,33639248),Ot(g,o+4,h),Zt(p,f,o+6),Ot(g,o+30,k),Ot(g,o+32,d.length),Pt(g,o+34,m),b?Pt(g,o+38,b):w&&y&&Vt(g,o+38,16),Pt(g,o+42,_?vt:n.offset),Zt(p,t,o+46),Zt(p,s,o+46+t.length),Zt(p,l,o+46+t.length+s.length),Zt(p,x,o+46+t.length+s.length+l.length),Zt(p,v,o+46+t.length+s.length+l.length+x.length),Zt(p,c,o+46+t.length+s.length+l.length+x.length+v.length),Zt(p,d,o+46+t.length+k),o+=46+t.length+k+d.length,r.onprogress)try{await r.onprogress(e+1,a.size,new Tt(n))}catch(e){}}if(f&&(Pt(g,o,101075792),Kt(g,o+4,s(44)),Ot(g,o+12,45),Ot(g,o+14,45),Kt(g,o+24,s(h)),Kt(g,o+32,s(h)),Kt(g,o+40,s(l)),Kt(g,o+48,s(d)),Pt(g,o+56,117853008),Kt(g,o+64,s(d)+s(l)),Pt(g,o+72,1),h=kt,d=vt,l=vt,o+=76),Pt(g,o,101010256),Ot(g,o+8,h),Ot(g,o+10,h),Pt(g,o+12,l),Pt(g,o+16,d),n&&n.length){if(n.length>kt)throw new c(At);Ot(g,o+20,n.length)}const{writable:w}=e.writer;await qt(w,p),n&&n.length&&await qt(w,n)})(this,e,n),a.preventClose||n.preventClose||await o.getWriter().close(),a.getData?a.getData():o}},e.configure=C,e.getMimeType=()=>"application/octet-stream",e.terminateWorkers=()=>{Ze.forEach((e=>{Ye(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,BigInt:s,Math:i,Date:a,Map:o,URL:l,Error:c,Uint8Array:u,Uint16Array:d,Uint32Array:h,DataView:f,Blob:p,Promise:g,TextEncoder:w,TextDecoder:_,document:y,crypto:m,btoa:b,TransformStream:x,ReadableStream:v,WritableStream:k,CompressionStream:R,DecompressionStream:z,navigator:S}=globalThis,T=(()=>{const e=-2;function n(e){return r(e.map((([e,n])=>new t(e).fill(n,0,e))))}function r(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?r(n):n)),[])}const s=[0,1,2,3].concat(...n([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function a(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,u=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=u=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>u?++u:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=u,o=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=i.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,i=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,u,d,h,f=0;for(u=0;15>=u;u++)t.bl_count[u]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],u=n[2*n[2*l+1]+1]+1,u>a&&(u=a,f++),n[2*l+1]=u,l>e.max_code||(t.bl_count[u]++,d=0,i>l||(d=s[l-i]),h=n[2*l],t.opt_len+=h*(u+d),r&&(t.static_len+=h*(r[2*l+1]+d)));if(0!==f){do{for(u=a-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[a]--,f-=2}while(f>0);for(u=a;0!==u;u--)for(l=t.bl_count[u];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=u&&(t.opt_len+=(u-n[2*c+1])*n[2*c],n[2*c+1]=u),l--)}})(n),((e,n,r)=>{const s=[];let i,a,o,l=0;for(i=1;15>=i;i++)s[i]=l=l+r[i-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function o(e,t,n,r,s){const i=this;i.static_tree=e,i.extra_bits=t,i.extra_base=n,i.elems=r,i.max_length=s}a._length_code=[0,1,2,3,4,5,6,7].concat(...n([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),a.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],a.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],a.d_code=e=>256>e?s[e]:s[256+(e>>>7)],a.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],a.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const l=n([[144,8],[112,9],[24,7],[8,8]]);o.static_ltree=r([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,l[t]])));const h=n([[30,5]]);function f(e,t,n,r,s){const i=this;i.good_length=e,i.max_lazy=t,i.nice_length=n,i.max_chain=r,i.func=s}o.static_dtree=r([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,h[t]]))),o.static_l_desc=new o(o.static_ltree,a.extra_lbits,257,286,15),o.static_d_desc=new o(o.static_dtree,a.extra_dbits,0,30,15),o.static_bl_desc=new o(null,a.extra_blbits,0,19,7);const p=[new f(0,0,0,0,0),new f(4,4,8,4,1),new f(4,5,16,8,1),new f(4,6,32,32,1),new f(4,4,16,16,2),new f(8,16,32,32,2),new f(8,16,128,128,2),new f(8,32,128,256,2),new f(32,128,258,1024,2),new f(32,258,258,4096,2)],g=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],w=113,_=666,y=262;function m(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function b(){const t=this;let n,r,s,l,c,h,f,b,x,v,k,R,z,S,T,A,E,F,D,C,W,U,B,M,H,I,q,L,N,V,P,O,K;const Z=new a,j=new a,X=new a;let Y,G,J,Q,$,ee;function te(){let e;for(e=0;286>e;e++)P[2*e]=0;for(e=0;30>e;e++)O[2*e]=0;for(e=0;19>e;e++)K[2*e]=0;P[512]=1,t.opt_len=t.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],i=0,a=7,o=4;0===s&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++i<a&&n==s||(o>i?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(a=138,o=3):n==s?(a=6,o=3):(a=7,o=4))}function re(e){t.pending_buf[t.pending++]=e}function se(e){re(255&e),re(e>>>8&255)}function ie(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ae(e,t){const n=2*e;ie(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,i=e[1],a=0,o=7,l=4;for(0===i&&(o=138,l=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++a>=o||r!=i){if(l>a)do{ae(r,K)}while(0!=--a);else 0!==r?(r!=s&&(ae(r,K),a--),ae(16,K),ie(a-3,2)):a>10?(ae(18,K),ie(a-11,7)):(ae(17,K),ie(a-3,3));a=0,s=r,0===i?(o=138,l=3):r==i?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(e,n){let r,s,o;if(t.dist_buf[G]=e,t.lc_buf[G]=255&n,G++,0===e?P[2*n]++:(J++,e--,P[2*(a._length_code[n]+256+1)]++,O[2*a.d_code(e)]++),0==(8191&G)&&q>2){for(r=8*G,s=W-E,o=0;30>o;o++)r+=O[2*o]*(5+a.extra_dbits[o]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function ue(e,n){let r,s,i,o,l=0;if(0!==G)do{r=t.dist_buf[l],s=t.lc_buf[l],l++,0===r?ae(s,e):(i=a._length_code[s],ae(i+256+1,e),o=a.extra_lbits[i],0!==o&&(s-=a.base_length[i],ie(s,o)),r--,i=a.d_code(r),ae(i,n),o=a.extra_dbits[i],0!==o&&(r-=a.base_dist[i],ie(r,o)))}while(G>l);ae(256,e),Q=e[513]}function de(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function he(e,n,r){ie(0+(r?1:0),3),((e,n)=>{de(),Q=8,se(n),se(~n),t.pending_buf.set(b.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function fe(e){((e,n,r)=>{let s,i,l=0;q>0?(Z.build_tree(t),j.build_tree(t),l=(()=>{let e;for(ne(P,Z.max_code),ne(O,j.max_code),X.build_tree(t),e=18;e>=3&&0===K[2*a.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(),s=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==e?i==s?(ie(2+(r?1:0),3),ue(o.static_ltree,o.static_dtree)):(ie(4+(r?1:0),3),((e,t,n)=>{let r;for(ie(e-257,5),ie(t-1,5),ie(n-4,4),r=0;n>r;r++)ie(K[2*a.bl_order[r]+1],3);oe(P,e-1),oe(O,t-1)})(Z.max_code+1,j.max_code+1,l+1),ue(P,O)):he(e,n,r),te(),r&&de()})(0>E?-1:E,W-E,e),E=W,n.flush_pending()}function pe(){let e,t,r,s;do{if(s=x-B-W,0===s&&0===W&&0===B)s=c;else if(-1==s)s--;else if(W>=c+c-y){b.set(b.subarray(c,c+c),0),U-=c,W-=c,E-=c,e=z,r=e;do{t=65535&k[--r],k[r]=c>t?0:t-c}while(0!=--e);e=c,r=e;do{t=65535&v[--r],v[r]=c>t?0:t-c}while(0!=--e);s+=c}if(0===n.avail_in)return;e=n.read_buf(b,W+B,s),B+=e,3>B||(R=255&b[W],R=(R<<A^255&b[W+1])&T)}while(y>B&&0!==n.avail_in)}function ge(e){let t,n,r=H,s=W,i=M;const a=W>c-y?W-(c-y):0;let o=V;const l=f,u=W+258;let d=b[s+i-1],h=b[s+i];N>M||(r>>=2),o>B&&(o=B);do{if(t=e,b[t+i]==h&&b[t+i-1]==d&&b[t]==b[s]&&b[++t]==b[s+1]){s+=2,t++;do{}while(b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&u>s);if(n=258-(u-s),s=u-258,n>i){if(U=e,i=n,n>=o)break;d=b[s+i-1],h=b[s+i]}}}while((e=65535&v[e&l])>a&&0!=--r);return i>B?B:i}t.depth=[],t.bl_count=[],t.heap=[],P=[],O=[],K=[],t.pqdownheap=(e,n)=>{const r=t.heap,s=r[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&m(e,r[i+1],r[i],t.depth)&&i++,!m(e,s,r[i],t.depth));)r[n]=r[i],n=i,i<<=1;r[n]=s},t.deflateInit=(n,a,g,_,y,m)=>(_||(_=8),y||(y=8),m||(m=0),n.msg=null,-1==a&&(a=6),1>y||y>9||8!=_||9>g||g>15||0>a||a>9||0>m||m>2?e:(n.dstate=t,h=g,c=1<<h,f=c-1,S=y+7,z=1<<S,T=z-1,A=i.floor((S+3-1)/3),b=new u(2*c),v=[],k=[],Y=1<<y+6,t.pending_buf=new u(4*Y),s=4*Y,t.dist_buf=new d(Y),t.lc_buf=new u(Y),q=a,L=m,(e=>(e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,r=w,l=0,Z.dyn_tree=P,Z.stat_desc=o.static_l_desc,j.dyn_tree=O,j.stat_desc=o.static_d_desc,X.dyn_tree=K,X.stat_desc=o.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{x=2*c,k[z-1]=0;for(let e=0;z-1>e;e++)k[e]=0;I=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain,W=0,E=0,B=0,F=M=2,C=0,R=0})(),0))(n))),t.deflateEnd=()=>42!=r&&r!=w&&r!=_?e:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,k=null,v=null,b=null,t.dstate=null,r==w?-3:0),t.deflateParams=(t,n,r)=>{let s=0;return-1==n&&(n=6),0>n||n>9||0>r||r>2?e:(p[q].func!=p[n].func&&0!==t.total_in&&(s=t.deflate(1)),q!=n&&(q=n,I=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain),L=r,s)},t.deflateSetDictionary=(t,n,s)=>{let i,a=s,o=0;if(!n||42!=r)return e;if(3>a)return 0;for(a>c-y&&(a=c-y,o=s-a),b.set(n.subarray(o,o+a),0),W=a,E=a,R=255&b[0],R=(R<<A^255&b[1])&T,i=0;a-3>=i;i++)R=(R<<A^255&b[i+2])&T,v[i&f]=k[R],k[R]=i;return 0},t.deflate=(i,a)=>{let u,d,m,x,S;if(a>4||0>a)return e;if(!i.next_out||!i.next_in&&0!==i.avail_in||r==_&&4!=a)return i.msg=g[4],e;if(0===i.avail_out)return i.msg=g[7],-5;var H;if(n=i,x=l,l=a,42==r&&(d=8+(h-8<<4)<<8,m=(q-1&255)>>1,m>3&&(m=3),d|=m<<6,0!==W&&(d|=32),d+=31-d%31,r=w,re((H=d)>>8&255),re(255&H)),0!==t.pending){if(n.flush_pending(),0===n.avail_out)return l=-1,0}else if(0===n.avail_in&&x>=a&&4!=a)return n.msg=g[7],-5;if(r==_&&0!==n.avail_in)return i.msg=g[7],-5;if(0!==n.avail_in||0!==B||0!=a&&r!=_){switch(S=-1,p[q].func){case 0:S=(e=>{let t,r=65535;for(r>s-5&&(r=s-5);;){if(1>=B){if(pe(),0===B&&0==e)return 0;if(0===B)break}if(W+=B,B=0,t=E+r,(0===W||W>=t)&&(B=W-t,W=t,fe(!1),0===n.avail_out))return 0;if(W-E>=c-y&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a);break;case 1:S=(e=>{let t,r=0;for(;;){if(y>B){if(pe(),y>B&&0==e)return 0;if(0===B)break}if(3>B||(R=(R<<A^255&b[W+2])&T,r=65535&k[R],v[W&f]=k[R],k[R]=W),0===r||(W-r&65535)>c-y||2!=L&&(F=ge(r)),3>F)t=ce(0,255&b[W]),B--,W++;else if(t=ce(W-U,F-3),B-=F,F>I||3>B)W+=F,F=0,R=255&b[W],R=(R<<A^255&b[W+1])&T;else{F--;do{W++,R=(R<<A^255&b[W+2])&T,r=65535&k[R],v[W&f]=k[R],k[R]=W}while(0!=--F);W++}if(t&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a);break;case 2:S=(e=>{let t,r,s=0;for(;;){if(y>B){if(pe(),y>B&&0==e)return 0;if(0===B)break}if(3>B||(R=(R<<A^255&b[W+2])&T,s=65535&k[R],v[W&f]=k[R],k[R]=W),M=F,D=U,F=2,0!==s&&I>M&&c-y>=(W-s&65535)&&(2!=L&&(F=ge(s)),5>=F&&(1==L||3==F&&W-U>4096)&&(F=2)),3>M||F>M)if(0!==C){if(t=ce(0,255&b[W-1]),t&&fe(!1),W++,B--,0===n.avail_out)return 0}else C=1,W++,B--;else{r=W+B-3,t=ce(W-1-D,M-3),B-=M-1,M-=2;do{++W>r||(R=(R<<A^255&b[W+2])&T,s=65535&k[R],v[W&f]=k[R],k[R]=W)}while(0!=--M);if(C=0,F=2,W++,t&&(fe(!1),0===n.avail_out))return 0}}return 0!==C&&(t=ce(0,255&b[W-1]),C=0),fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(a)}if(2!=S&&3!=S||(r=_),0==S||2==S)return 0===n.avail_out&&(l=-1),0;if(1==S){if(1==a)ie(2,3),ae(256,o.static_ltree),le(),9>1+Q+10-ee&&(ie(2,3),ae(256,o.static_ltree),le()),Q=7;else if(he(0,0,!1),3==a)for(u=0;z>u;u++)k[u]=0;if(n.flush_pending(),0===n.avail_out)return l=-1,0}}return 4!=a?0:1}}function x(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}return x.prototype={deflateInit(e,t){const n=this;return n.dstate=new b,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(t){const n=this;return n.dstate?n.dstate.deflate(n,t):e},deflateEnd(){const t=this;if(!t.dstate)return e;const n=t.dstate.deflateEnd();return t.dstate=null,n},deflateParams(t,n){const r=this;return r.dstate?r.dstate.deflateParams(r,t,n):e},deflateSetDictionary(t,n){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,t,n):e},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}},function(e){const t=new x,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new u(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let i,a,o=0,l=0,d=0;const h=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,i=t.deflate(0),0!=i)throw new c("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?h.push(new u(s)):h.push(s.slice(0,t.next_out_index))),d+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return h.length>1?(a=new u(d),h.forEach((e=>{a.set(e,l),l+=e.length}))):a=h[0]||new u,a}},this.flush=()=>{let e,r,i=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new c("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new u(a),o.forEach((e=>{r.set(e,i),i+=e.length})),r}}})(),A=void 0,E={chunkSize:524288,maxWorkers:void 0!==S&&S.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},F=n.assign({},E);function D(){return F}function C(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:u,workerScripts:d}=e;if(n!==A&&(F.baseURL=n),r!==A&&(F.chunkSize=r),s!==A&&(F.maxWorkers=s),i!==A&&(F.terminateWorkerTimeout=i),a!==A&&(F.useCompressionStream=a),o!==A&&(F.useWebWorkers=o),l!==A&&(F.Deflate=l),u!==A&&(F.Inflate=u),d!==A){const{deflate:e,inflate:n}=d;if((e||n)&&(F.workerScripts||(F.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");F.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");F.workerScripts.inflate=n}}}const W=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;W[e]=t}class U{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^W[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class B extends x{constructor(){super({start(){this.crc32=new U},transform(e){this.crc32.append(e)},flush(e){const t=new u(4);new f(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}function M(e){if(void 0===w){const t=new u((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)}const H={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=H.getPartial(n);return 32===r?e.concat(t):H._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+H.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=H.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>i.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=H.getPartial(s);return r.push(H.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{fromBits(e){const t=H.bitLength(e)/8,n=new u(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(H.partial(8*(3&n),r)),t}}},q={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};q.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=I.utf8String.toBits(e));const n=t._buffer=H.concat(t._buffer,e),r=t._length,s=t._length=r+H.bitLength(e);if(s>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const i=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=H.concat(t,[H.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=r[0],o=r[1],l=r[2],c=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+u+s[e]+n._key[i.floor(e/20)]|0;u=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+u|0}};const L={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(I.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new c("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,l,u;const d=new ArrayBuffer(s),h=new f(d);let p=0;const g=H;for(t=I.bytes.toBits(t),u=1;(s||1)>p;u++){for(i=a=e.encrypt(g.concat(t,[u])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;(s||1)>p&&o<i.length;o++)h.setInt32(p,i[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q.sha1,r=[[],[]],s=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>s&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},V="Invalid pasword",P=16,O={name:"PBKDF2"},K=n.assign({hash:{name:"HMAC"}},O),Z=n.assign({iterations:1e3,hash:{name:"SHA-1"}},O),j=["deriveBits"],X=[8,12,16],Y=[16,24,32],G=10,J=[0,0,0,0],Q="undefined",$="function",ee=typeof m!=Q,te=ee&&typeof m.subtle!=Q,ne=ee&&typeof m.getRandomValues==$,re=ee&&te&&typeof m.subtle.importKey==$,se=ee&&te&&typeof m.subtle.deriveBits==$,ie=I.bytes,ae=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,l=1;if(4!==s&&6!==s&&8!==s)throw new c("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,l,c;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,c=s[l=s[o=s[u]]];let d=16843009*c^65537*l^257*o^16843008*u,h=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=h=h<<24^h>>>8,t[n][i]=d=d<<24^d>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],u=i[3],d=i[4];let h,f,p,g=e[0]^n[0],w=e[t?3:1]^n[1],_=e[2]^n[2],y=e[t?1:3]^n[3],m=4;for(let e=0;r>e;e++)h=a[g>>>24]^o[w>>16&255]^l[_>>8&255]^u[255&y]^n[m],f=a[w>>>24]^o[_>>16&255]^l[y>>8&255]^u[255&g]^n[m+1],p=a[_>>>24]^o[y>>16&255]^l[g>>8&255]^u[255&w]^n[m+2],y=a[y>>>24]^o[g>>16&255]^l[w>>8&255]^u[255&_]^n[m+3],m+=4,g=h,w=f,_=p;for(let e=0;4>e;e++)s[t?3&-e:e]=d[g>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[m++],h=g,g=w,w=_,_=y,y=h;return s}},oe=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=H.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return H.clamp(t,s)}},le=N.hmacSha1;class ce extends x{constructor(e,r,s){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,signed:r,strength:s-1,pending:new u})},async transform(e,n){const r=this;if(r.password){const n=r.password;r.password=null;const s=pe(e,0,X[r.strength]+2);await(async(e,t,n)=>{await he(e,n,pe(t,0,X[e.strength]));const r=pe(t,X[e.strength]),s=e.keys.passwordVerification;if(s[0]!=r[0]||s[1]!=r[1])throw new c(V)})(r,s,n),r.ctr=new oe(new ae(r.keys.key),t.from(J)),r.hmac=new le(r.keys.authentication),e=pe(e,X[r.strength]+2),r.resolveReady()}else await r.ready;const s=new u(e.length-G-(e.length-G)%P);n.enqueue(de(r,e,s,0,G,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,r=pe(n,0,n.length-G),s=pe(n,n.length-G);let a=new u;if(r.length){const e=we(ie,r);t.hmac.update(e);const n=t.ctr.update(e);a=ge(ie,n)}if(i.valid=!0,t.signed){const e=pe(ge(ie,t.hmac.digest()),0,G);for(let t=0;G>t;t++)e[t]!=s[t]&&(i.valid=!1)}e.enqueue(a)}}),i=this}}class ue extends x{constructor(e,r){let s;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:e,strength:r-1,pending:new u})},async transform(e,n){const r=this;let s=new u;if(r.password){const e=r.password;r.password=null,s=await(async(e,t)=>{const n=(r=new u(X[e.strength]),ne?m.getRandomValues(r):L.getRandomValues(r));var r;return await he(e,t,n),fe(n,e.keys.passwordVerification)})(r,e),r.ctr=new oe(new ae(r.keys.key),t.from(J)),r.hmac=new le(r.keys.authentication),r.resolveReady()}else await r.ready;const i=new u(s.length+e.length-e.length%P);i.set(s,0),n.enqueue(de(r,e,i,s.length,0))},async flush(e){const t=this;await t.ready;let n=new u;if(t.pending.length){const e=t.ctr.update(we(ie,t.pending));t.hmac.update(e),n=ge(ie,e)}s.signature=ge(ie,t.hmac.digest()).slice(0,G),e.enqueue(fe(n,s.signature))}}),s=this}}function de(e,t,n,r,s,i){const a=t.length-s;let o;for(e.pending.length&&(t=fe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new u(t)).set(n,0)}return e})(n,a-a%P)),o=0;a-P>=o;o+=P){const s=we(ie,pe(t,o,o+P));i&&e.hmac.update(s);const a=e.ctr.update(s);i||e.hmac.update(a),n.set(ge(ie,a),o+r)}return e.pending=pe(t,o),n}async function he(e,t,r){const s=M(t),i=await((e,t,n,r,s)=>re?m.subtle.importKey("raw",t,n,!1,s):N.importKey(t))(0,s,K,0,j),a=await(async(e,t,n)=>se?await m.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,Z.iterations,n))(n.assign({salt:r},Z),i,8*(2*Y[e.strength]+2)),o=new u(a);e.keys={key:we(ie,pe(o,0,Y[e.strength])),authentication:we(ie,pe(o,Y[e.strength],2*Y[e.strength])),passwordVerification:pe(o,2*Y[e.strength])}}function fe(e,t){let n=e;return e.length+t.length&&(n=new u(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function pe(e,t,n){return e.subarray(t,n)}function ge(e,t){return e.fromBits(t)}function we(e,t){return e.toBits(t)}class _e extends x{constructor(e,t){let r;super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;if(n.password){const t=me(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(V);e=e.subarray(12)}t.enqueue(me(n,e))},flush(){r.valid=!0}}),r=this}}class ye extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=m.getRandomValues(new u(12));t[11]=n.passwordVerification,r=new u(e.length+t.length),r.set(be(n,t),0),s=12}else r=new u(e.length),s=0;r.set(be(n,e),s),t.enqueue(r)},flush(){}})}}function me(e,t){const n=new u(t.length);for(let r=0;r<t.length;r++)n[r]=ke(e)^t[r],ve(e,n[r]);return n}function be(e,t){const n=new u(t.length);for(let r=0;r<t.length;r++)n[r]=ke(e)^t[r],ve(e,t[r]);return n}function xe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new U(e.keys[0]),e.crcKey2=new U(e.keys[2]);for(let n=0;n<t.length;n++)ve(e,t.charCodeAt(n))}function ve(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=ze(e.keys[1]+Re(e.keys[0])),e.keys[1]=ze(i.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ke(e){const t=2|e.keys[2];return Re(i.imul(t,1^t)>>>8)}function Re(e){return 255&e}function ze(e){return 4294967295&e}class Se extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",Ae="deflate-raw",Ee="undefined",Fe=typeof R==Ee,De=typeof z==Ee;let Ce=!0,We=!0;class Ue extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{compressed:s,encrypted:i,useCompressionStream:a,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:u,signed:d}=t,h=this;let p,g,w=He(super.readable);if(i&&!u||!d||([w,p]=w.tee(),p=p.pipeThrough(new B)),s)if(void 0!==a&&!a||Fe&&!We)w=Me(e,w,n);else try{w=w.pipeThrough(new R(Ae))}catch(t){We=!1,w=Me(e,w,n)}i&&(u?w=w.pipeThrough(new ye(o,l)):(g=new ue(o,c),w=w.pipeThrough(g))),Ie(h,w,(async()=>{let e;i&&!u&&(e=g.signature),i&&!u||!d||(e=await p.getReader().read(),e=new f(e.value.buffer).getUint32(0)),h.signature=e}))}}class Be extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:s,encrypted:i,password:a,passwordVerification:o,signed:l,encryptionStrength:u,compressed:d,useCompressionStream:h}=t;let p,g,w=He(super.readable);if(i&&(s?w=w.pipeThrough(new _e(a,o)):(g=new ce(a,l,u),w=w.pipeThrough(g))),d)if(void 0!==h&&!h||De&&!Ce)w=Me(e,w,n);else try{w=w.pipeThrough(new z(Ae))}catch(t){Ce=!1,w=Me(e,w,n)}i&&!s||!l||([w,p]=w.tee(),p=p.pipeThrough(new B)),Ie(this,w,(async()=>{if(i&&!s&&!g.valid)throw new c(Te);if((!i||s)&&l){const e=await p.getReader().read();if(e!=new f(e.value.buffer).getUint32(0,!1))throw new c(Te)}}))}}function Me(e,t,n){return t.pipeThrough(new Se(e,{chunkSize:n}))}function He(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Ie(e,t,r){e.length=0,t=t.pipeThrough(new x({transform(t,n){t&&t.length&&(e.length+=t.length,n.enqueue(t))},flush:r})),n.defineProperty(e,"readable",{get:()=>t})}const qe="deflate",Le="data";class Ne{constructor(e,t,n,r,s){const{codecType:i}=r;async function a(i){const a=new i(e,r,s);await t.pipeThrough(a).pipeTo(n,{preventClose:!0});const{length:o,signature:l}=a;return{length:o,signature:l}}i.startsWith(qe)?this.run=()=>a(Ue):i.startsWith("inflate")&&(this.run=()=>a(Be))}}let Ve=!0;class Pe{constructor(e,t,r,s){const{readable:i,writable:a}=t,{options:o,config:d,streamOptions:h,webWorker:f,scripts:p,codecConstructor:w}=r;n.assign(e,{busy:!0,codecConstructor:w,readable:i,writable:a,options:n.assign({},o),scripts:p,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,s(e)}});const{signal:_,onstart:y,onprogress:m,size:b,onend:v}=h;let k=0;const R={};return y&&(R.start=()=>Oe(y,b())),R.transform=async(e,t)=>{k+=e.length,m&&await Oe(m,k,b()),t.enqueue(e)},R.flush=()=>{i.size=()=>k,v&&Oe(v,k)},e.readable=i.pipeThrough(new x(R,{highWaterMark:1,size:()=>d.chunkSize}),{signal:_}),f?((e,{baseURL:t,chunkSize:r})=>{const s={type:"module"},{readable:i,writable:a}=e;if(n.assign(e,{reader:i.getReader(),writer:a.getWriter(),result:new g(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Ve)try{e.worker=o({})}catch(t){Ve=!1,e.worker=o(s)}else e.worker=o(s);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:r,writer:s,resolveResult:i,rejectResult:a,onTaskFinished:o}=e,{type:l,data:h,messageId:f,result:p}=n,g=n.error;try{if(g){const{message:e,stack:t}=g,n=new c(e);n.stack=t,w(n)}else{if("pull"==l){const{value:e,done:t}=await r.read();d({type:Le,data:e,done:t,messageId:f})}l==Le&&(await s.ready,await s.write(new u(h))),"close"==l&&w(null,p)}}catch(e){w(e)}function w(e,t){e?a(e):i(t),s.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return d({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:r}}),e.result}}}return e.interface;function o(n){let r,s;r=e.scripts[0],"function"==typeof r&&(r=r());try{s=new l(r,t)}catch(e){s=r}return new Worker(s,n)}function d(t){const{worker:n,writer:r,onTaskFinished:s}=e;try{let{data:e}=t;if(e)try{const{buffer:r,length:s}=e;s!=r.byteLength&&(e=new u(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw r.releaseLock(),s(),e}}})(e,d):((e,t)=>{const n=new Ne(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:r}=e;return{async run(){try{return await n.run()}finally{r()}}}})(e,d)}}async function Oe(e,...t){try{await e(...t)}catch(e){}}let Ke=[];const Ze=[];let je=0;function Xe(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Ye="HTTP error ",Ge="HTTP Range not supported",Je="text/plain",Qe="GET",$e=65536;class et{constructor(){this.size=0}init(){this.initialized=!0}}class tt extends et{get readable(){const e=this,{chunkSize:t=$e}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a}=n,{chunkOffset:o}=this;r.enqueue(await e.readUint8Array(s+o,i.min(t,a()-o))),o+t>a()?r.close():this.chunkOffset+=t}});return n}}class nt extends et{constructor(){super();const e=this,t=new k({write:t=>e.writeUint8Array(t)});n.defineProperty(this,"writable",{get:()=>t})}}class rt extends nt{writeUint8Array(e){this.size+=e.length}}class st extends tt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new u(await this.blob.slice(e,e+t).arrayBuffer())}}class it extends rt{constructor(e){super();const t=this;t.contentType=e,t.arrayBuffersMaxlength=8,at(t)}writeUint8Array(e){super.writeUint8Array(e);const t=this;t.arrayBuffers.length==t.arrayBuffersMaxlength&&ot(t),t.arrayBuffers.push(e.buffer)}getData(){const e=this;return e.blob||(e.arrayBuffers.length&&ot(e),e.blob=e.pendingBlob,at(e)),e.blob}}function at(e){e.pendingBlob=new p([],{type:e.contentType}),e.arrayBuffers=[]}function ot(e){e.pendingBlob=new p([e.pendingBlob,...e.arrayBuffers],{type:e.contentType}),e.arrayBuffers=[]}class lt extends tt{constructor(e,t){super();const r=this;r.url=e,r.preventHeadRequest=t.preventHeadRequest,r.useRangeHeader=t.useRangeHeader,r.forceRangeRequests=t.forceRangeRequests,r.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ut(this,yt,pt)}readUint8Array(e,t){return dt(this,e,t,yt,pt)}}class ct extends tt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ut(this,mt,gt)}readUint8Array(e,t){return dt(this,e,t,mt,gt)}}async function ut(e,t,n){if((e=>{const{baseURL:t}=D(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const r=await t(Qe,e,ht(e));if(!e.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new c(Ge);{let s;const i=r.headers.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=Number(t))}}void 0===s?await _t(e,t,n):e.size=s}}else await _t(e,t,n)}async function dt(e,t,n,r,s){if(e.useRangeHeader||e.forceRangeRequests){const s=await r(Qe,e,ht(e,t,n));if(206!=s.status)throw new c(Ge);return new u(await s.arrayBuffer())}return e.data||await s(e,e.options),new u(e.data.subarray(t,t+n))}function ht(e,t=0,r=1){return n.assign({},ft(e),{Range:"bytes="+t+"-"+(t+r-1)})}function ft(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function pt(e){await wt(e,yt)}async function gt(e){await wt(e,mt)}async function wt(e,t){const n=await t(Qe,e,ft(e));e.data=new u(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function _t(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,ft(e))).headers.get("Content-Length");r?e.size=Number(r):await n(e,e.options)}}async function yt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new c(Ge):new c(Ye+(i.statusText||i.status))}function mt(e,{url:t},r){return new g(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new o(e)})}else i(416==a.status?new c(Ge):new c(Ye+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail.error)),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class bt extends tt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new ct(e,t):new lt(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const xt=4294967295,vt=65535,kt=new a(2107,11,31),Rt=new a(1980,0,1),zt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){zt.forEach((t=>this[t]=e[t]))}}const Tt="File already exists",At="Zip file comment exceeds 64KB",Et="File entry comment exceeds 64KB",Ft="File entry name exceeds 64KB",Dt="Version exceeds 65535",Ct="The strength must equal 1, 2, or 3",Wt="Extra field type exceeds 65535",Ut="Extra field data exceeds 64KB",Bt="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Mt=new u([7,0,2,0,65,69,3,0,0]);let Ht=0;async function It(e,t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()}function qt(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function Lt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Nt(e,t,n){e.setUint8(t,n)}function Vt(e,t,n){e.setUint16(t,n,!0)}function Pt(e,t,n){e.setUint32(t,n,!0)}function Ot(e,t,n){e.setBigUint64(t,n,!0)}function Kt(e,t,n){e.set(t,n)}function Zt(e){return new f(e.buffer)}C({Deflate:T}),e.BlobReader=st,e.BlobWriter=it,e.Data64URIReader=class extends tt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=i.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new u(t),r=4*i.floor(e/3),s=this.dataStart,a=atob(this.dataURI.substring(r+s,4*i.ceil((e+t)/3)+s)),o=e-3*i.floor(r/4);for(let e=o;o+t>e;e++)n[e-o]=a.charCodeAt(e);return n}},e.Data64URIWriter=class extends rt{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){super.writeUint8Array(e);const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=b(s):t.pending=s}getData(){return this.data+b(this.pending)}},e.ERR_DUPLICATED_NAME=Tt,e.ERR_HTTP_RANGE=Ge,e.ERR_INVALID_COMMENT=At,e.ERR_INVALID_ENCRYPTION_STRENGTH=Ct,e.ERR_INVALID_ENTRY_COMMENT=Et,e.ERR_INVALID_ENTRY_NAME=Ft,e.ERR_INVALID_EXTRAFIELD_DATA=Ut,e.ERR_INVALID_EXTRAFIELD_TYPE=Wt,e.ERR_INVALID_VERSION=Dt,e.ERR_UNSUPPORTED_FORMAT=Bt,e.HttpRangeReader=class extends bt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=bt,e.Reader=tt,e.TextReader=class extends tt{constructor(e){super(),this.blobReader=new st(new p([e],{type:Je}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends rt{constructor(e){super(),this.encoding=e,this.blob=new p([],{type:Je})}writeUint8Array(e){super.writeUint8Array(e),this.blob=new p([this.blob,e.buffer],{type:Je})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new g(((n,r)=>{t.onload=e=>n(e.target.result),t.onerror=()=>r(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends tt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends rt{constructor(){super(),this.array=new u}writeUint8Array(e){super.writeUint8Array(e);const t=this,n=t.array;t.array=new u(n.length+e.length),t.array.set(n),t.array.set(e,n.length)}getData(){return this.array}},e.Writer=rt,e.ZipWriter=class{constructor(e,t={}){n.assign(this,{writer:e,options:t,config:D(),files:new o,offset:e.size||0,pendingCompressedSize:0,pendingEntries:[],pendingAddFileCalls:new Set})}async add(e="",r,o={}){const l=this,{pendingAddFileCalls:p,pendingEntries:w,config:_}=l;if(Ht>=_.maxWorkers)return new g(((t,n)=>w.push({name:e,reader:r,options:o,resolve:t,reject:n})));{let _;Ht++;try{return _=(async(e,r,o,l)=>{if(r=r.trim(),l.directory&&!r.endsWith("/")?r+="/":l.directory=r.endsWith("/"),e.files.has(r))throw new c(Tt);const p=M(r);if(p.length>vt)throw new c(Ft);const w=l.comment||"",_=M(w);if(_.length>vt)throw new c(Et);const y=e.options.version||l.version||0;if(y>vt)throw new c(Dt);const m=e.options.versionMadeBy||l.versionMadeBy||20;if(m>vt)throw new c(Dt);const b=Lt(e,l,"lastModDate")||new a,x=Lt(e,l,"lastAccessDate"),v=Lt(e,l,"creationDate"),k=Lt(e,l,"password"),R=Lt(e,l,"encryptionStrength")||3,z=Lt(e,l,"zipCrypto");if(void 0!==k&&void 0!==R&&(1>R||R>3))throw new c(Ct);let S=new u;const{extraField:T}=l;if(T){let e=0,t=0;T.forEach((t=>e+=4+t.length)),S=new u(e),T.forEach(((e,n)=>{if(n>vt)throw new c(Wt);if(e.length>vt)throw new c(Ut);Kt(S,new d([n]),t),Kt(S,new d([e.length]),t+2),Kt(S,e,t+4),t+=4+e.length}))}let A=Lt(e,l,"extendedTimestamp");void 0===A&&(A=!0);let E=0,F=Lt(e,l,"keepOrder");void 0===F&&(F=!0);let D=0,C=Lt(e,l,"msDosCompatible");void 0===C&&(C=!0);const W=Lt(e,l,"internalFileAttribute")||0,U=Lt(e,l,"externalFileAttribute")||0;o&&(o.init&&!o.initialized&&await o.init(),void 0===o.size?l.dataDescriptor=!0:D=o.size,E=(e=>e+5*(i.floor(e/16383)+1))(D));let B=l.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=xt||D>=xt||E>=xt){if(!1===l.zip64||!1===e.options.zip64||!F)throw new c(Bt);B=!0}e.pendingCompressedSize+=E,await g.resolve();const H=Lt(e,l,"level"),I=Lt(e,l,"useWebWorkers"),q=Lt(e,l,"bufferedWrite");let L=Lt(e,l,"dataDescriptor"),N=Lt(e,l,"dataDescriptorSignature");const V=Lt(e,l,"signal"),P=Lt(e,l,"useCompressionStream");void 0===L&&(L=!0),L&&void 0===N&&(N=!1);const O=await(async(e,r,a,o)=>{const{files:l,writer:d}=e,{keepOrder:p,dataDescriptor:w,zipCrypto:_,signal:y}=o,m=t.from(l.values()).pop();let b,x,v,k,R,z={};l.set(r,z);try{let t;if(p&&(t=m&&m.lock,z.lock=new g((e=>v=e))),o.bufferedWrite||e.lockWriter||!w?(R=new it,R.init(),b=!0):(e.lockWriter=g.resolve(),d.init&&!d.initialized&&await d.init(),R=d),z=await(async(e,t,r,a,o)=>{const{rawFilename:l,lastAccessDate:c,creationDate:d,password:f,level:p,zip64:w,zipCrypto:_,dataDescriptor:y,dataDescriptorSignature:m,directory:b,version:x,versionMadeBy:v,rawComment:k,rawExtraField:R,useWebWorkers:z,onstart:S,onprogress:T,onend:A,signal:E,encryptionStrength:F,extendedTimestamp:D,msDosCompatible:C,internalFileAttribute:W,externalFileAttribute:U,useCompressionStream:B}=o,M=!(!f||!f.length),H=0!==p&&!b;let I,q,L;if(M&&!_){I=new u(Mt.length+2);const e=Zt(I);Vt(e,0,39169),Kt(I,Mt,2),Nt(e,8,F)}else I=new u;if(D){L=new u(9+(c?4:0)+(d?4:0));const e=Zt(L);Vt(e,0,21589),Vt(e,2,L.length-4),Nt(e,4,1+(c?2:0)+(d?4:0)),Pt(e,5,i.floor(o.lastModDate.getTime()/1e3)),c&&Pt(e,9,i.floor(c.getTime()/1e3)),d&&Pt(e,13,i.floor(d.getTime()/1e3));try{q=new u(36);const e=Zt(q),t=qt(o.lastModDate);Vt(e,0,10),Vt(e,2,32),Vt(e,8,1),Vt(e,10,24),Ot(e,12,t),Ot(e,20,qt(c)||t),Ot(e,28,qt(d)||t)}catch(e){q=new u}}else q=L=new u;const N={version:x||20,versionMadeBy:v,zip64:w,directory:!!b,filenameUTF8:!0,rawFilename:l,commentUTF8:!0,rawComment:k,rawExtraFieldZip64:w?new u(28):new u,rawExtraFieldExtendedTimestamp:L,rawExtraFieldNTFS:q,rawExtraFieldAES:I,rawExtraField:R,extendedTimestamp:D,msDosCompatible:C,internalFileAttribute:W,externalFileAttribute:U};let V=N.uncompressedSize=0,P=2048;y&&(P|=8);let O=0;H&&(O=8),w&&(N.version=N.version>45?N.version:45),M&&(P|=1,_||(N.version=N.version>51?N.version:51,O=99,H&&(N.rawExtraFieldAES[9]=8))),N.compressionMethod=O;const K=N.headerArray=new u(26),Z=Zt(K);Vt(Z,0,N.version),Vt(Z,2,P),Vt(Z,4,O);const j=new h(1),X=Zt(j);let Y;Y=o.lastModDate<Rt?Rt:o.lastModDate>kt?kt:o.lastModDate,Vt(X,0,(Y.getHours()<<6|Y.getMinutes())<<5|Y.getSeconds()/2),Vt(X,2,(Y.getFullYear()-1980<<4|Y.getMonth()+1)<<5|Y.getDate());const G=j[0];Pt(Z,6,G),Vt(Z,22,l.length);const J=I.length+L.length+q.length+R.length;Vt(Z,24,J);const Q=new u(30+l.length+J);let $;Pt(Zt(Q),0,67324752),Kt(Q,K,4),Kt(Q,l,30),Kt(Q,I,30+l.length),Kt(Q,L,30+l.length+I.length),Kt(Q,q,30+l.length+I.length+L.length),Kt(Q,R,30+l.length+I.length+L.length+q.length);let ee=0;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(a),await It(r,Q),N.dataWritten=t.dataWritten=!0;const n=()=>e.size,s=e.readable;s.size=n;const o={options:{codecType:qe,level:p,password:f,encryptionStrength:F,zipCrypto:M&&_,passwordVerification:M&&_&&G>>8&255,signed:!0,compressed:H,encrypted:M,useWebWorkers:z,useCompressionStream:B},config:a,streamOptions:{signal:E,size:n,onstart:S,onprogress:T,onend:A},codecConstructor:a.Deflate};$=await(async(e,t)=>{const{options:n,config:r}=t,s=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:i,useCompressionStream:a,codecType:o}=n,{workerScripts:l}=r;let c;if(t.webWorker=!s&&(i||void 0===i&&r.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===a?r.useCompressionStream:a,Ke.length<r.maxWorkers){const n={indexWorker:je};je++,Ke.push(n),c=new Pe(n,e,t,u)}else{const n=Ke.find((e=>!e.busy));n?(Xe(n),c=new Pe(n,e,t,u)):c=await new g((n=>Ze.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function u(e){if(Ze.length){const[{resolve:t,stream:n,workerOptions:r}]=Ze.splice(0,1);t(new Pe(e,n,r,u))}else if(e.worker){const{terminateWorkerTimeout:t}=r;Xe(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ke=Ke.filter((t=>t!=e)),e.terminate()}),t))}else Ke=Ke.filter((t=>t!=e))}})({readable:s,writable:r},o),V=N.uncompressedSize=e.size=s.size(),ee=$.length}else await It(r,Q),N.dataWritten=t.dataWritten=!0;let te,ne=new u,re=0;if(y&&(ne=new u(w?m?24:20:m?16:12),te=Zt(ne),m&&(re=4,Pt(te,0,134695760))),e){const{signature:e}=$;if(M&&!_||void 0===e||(Pt(Z,10,e),N.signature=e,y&&Pt(te,re,e)),w){const e=Zt(N.rawExtraFieldZip64);Vt(e,0,1),Vt(e,2,24),Pt(Z,14,xt),Ot(e,12,s(ee)),Pt(Z,18,xt),Ot(e,4,s(V)),y&&(Ot(te,re+4,s(ee)),Ot(te,re+12,s(V)))}else Pt(Z,14,ee),Pt(Z,18,V),y&&(Pt(te,re+4,ee),Pt(te,re+8,V))}y&&await It(r,ne);const se=Q.length+ee+ne.length;return n.assign(N,{compressedSize:ee,lastModDate:Y,rawLastModDate:G,creationDate:d,lastAccessDate:c,encrypted:M,length:se}),N})(a,z,R.writable,e.config,o),l.set(r,z),z.filename=r,b){let n=R.getData();await t,await async function t(){const{lockWriter:n}=e;if(n)return await n.then((()=>delete e.lockWriter)),t();e.lockWriter=new g((e=>x=e))}(),k=!0;const{writable:r}=d;if(!w){const e=26,t=await((e,t,n)=>n?e.slice(0,n).arrayBuffer():e.arrayBuffer())(n,0,e),s=new f(t);z.encrypted&&!_||Pt(s,14,z.signature),z.zip64?(Pt(s,18,xt),Pt(s,22,xt)):(Pt(s,18,z.compressedSize),Pt(s,22,z.uncompressedSize)),await It(r,new u(t)),n=n.slice(e)}await n.stream().pipeTo(r,{preventClose:!0,signal:y}),k=!1}if(z.offset=e.offset,z.zip64)Ot(Zt(z.rawExtraFieldZip64),20,s(z.offset));else if(z.offset>=xt)throw new c(Bt);return e.offset+=z.length,z}catch(t){throw(b&&k||!b&&z.dataWritten)&&(t.corruptedEntry=e.hasCorruptedEntries=!0,e.offset+=R.size),l.delete(r),t}finally{v&&v(),x&&x()}})(e,r,o,n.assign({},l,{rawFilename:p,rawComment:_,version:y,versionMadeBy:m,lastModDate:b,lastAccessDate:x,creationDate:v,rawExtraField:S,zip64:B,password:k,level:H,useWebWorkers:I,encryptionStrength:R,extendedTimestamp:A,zipCrypto:z,bufferedWrite:q,keepOrder:F,dataDescriptor:L,dataDescriptorSignature:N,signal:V,msDosCompatible:C,internalFileAttribute:W,externalFileAttribute:U,useCompressionStream:P}));return E&&(e.pendingCompressedSize-=E),n.assign(O,{name:r,comment:w,extraField:T}),new St(O)})(l,e,r,o),p.add(_),await _}finally{p.delete(_),Ht--;const e=w.shift();e&&l.add(e.name,e.reader,e.options).then(e.resolve).catch(e.reject)}}}async close(e=new u,n={}){const{pendingAddFileCalls:r,writer:a}=this,{writable:o}=a;for(;r.size;)await g.all(t.from(r));return await(async(e,n,r)=>{const{files:a}=e;let o=0,l=0,d=e.offset,h=a.size;for(const[,e]of a)l+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let f=r.zip64||e.options.zip64||!1;if(d>=xt||l>=xt||h>=vt){if(!1===r.zip64||!1===e.options.zip64)throw new c(Bt);f=!0}const p=new u(l+(f?98:22)),g=Zt(p);for(const[e,n]of t.from(a.values()).entries()){const{rawFilename:t,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraField:c,rawComment:d,versionMadeBy:h,headerArray:f,directory:w,zip64:_,msDosCompatible:y,internalFileAttribute:m,externalFileAttribute:b}=n;let x,v;if(n.extendedTimestamp){v=n.rawExtraFieldNTFS,x=new u(9);const e=Zt(x);Vt(e,0,21589),Vt(e,2,x.length-4),Nt(e,4,1),Pt(e,5,i.floor(n.lastModDate.getTime()/1e3))}else v=x=new u;const k=s.length+l.length+x.length+v.length+c.length;if(Pt(g,o,33639248),Vt(g,o+4,h),Kt(p,f,o+6),Vt(g,o+30,k),Vt(g,o+32,d.length),Pt(g,o+34,m),b?Pt(g,o+38,b):w&&y&&Nt(g,o+38,16),Pt(g,o+42,_?xt:n.offset),Kt(p,t,o+46),Kt(p,s,o+46+t.length),Kt(p,l,o+46+t.length+s.length),Kt(p,x,o+46+t.length+s.length+l.length),Kt(p,v,o+46+t.length+s.length+l.length+x.length),Kt(p,c,o+46+t.length+s.length+l.length+x.length+v.length),Kt(p,d,o+46+t.length+k),o+=46+t.length+k+d.length,r.onprogress)try{await r.onprogress(e+1,a.size,new St(n))}catch(e){}}if(f&&(Pt(g,o,101075792),Ot(g,o+4,s(44)),Vt(g,o+12,45),Vt(g,o+14,45),Ot(g,o+24,s(h)),Ot(g,o+32,s(h)),Ot(g,o+40,s(l)),Ot(g,o+48,s(d)),Pt(g,o+56,117853008),Ot(g,o+64,s(d)+s(l)),Pt(g,o+72,1),h=vt,d=xt,l=xt,o+=76),Pt(g,o,101010256),Vt(g,o+8,h),Vt(g,o+10,h),Pt(g,o+12,l),Pt(g,o+16,d),n&&n.length){if(n.length>vt)throw new c(At);Vt(g,o+20,n.length)}const{writable:w}=e.writer;await It(w,p),n&&n.length&&await It(w,n)})(this,e,n),a.preventClose||n.preventClose||await o.getWriter().close(),a.getData?a.getData():o}},e.configure=C,e.getMimeType=()=>"application/octet-stream",e.terminateWorkers=()=>{Ke.forEach((e=>{Xe(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,BigInt:r,Math:a,Date:s,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:f,DataView:h,Blob:_,Promise:w,TextEncoder:p,TextDecoder:b,document:g,crypto:y,btoa:m,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:R,DecompressionStream:S,navigator:T}=globalThis,E=(()=>{const e=-2,t=-3,n=-5,i=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],r=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],s=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],f=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function h(){let e,i,r,a,s,c;function d(e,i,o,l,d,u,f,h,_,w,p){let b,g,y,m,x,k,v,R,S,T,E,z,A,D,U;T=0,x=o;do{r[e[i+T]]++,T++,x--}while(0!==x);if(r[0]==o)return f[0]=-1,h[0]=0,0;for(R=h[0],k=1;15>=k&&0===r[k];k++);for(v=k,k>R&&(R=k),x=15;0!==x&&0===r[x];x--);for(y=x,R>x&&(R=x),h[0]=R,D=1<<k;x>k;k++,D<<=1)if(0>(D-=r[k]))return t;if(0>(D-=r[x]))return t;for(r[x]+=D,c[1]=k=0,T=1,A=2;0!=--x;)c[A]=k+=r[T],A++,T++;x=0,T=0;do{0!==(k=e[i+T])&&(p[c[k]++]=x),T++}while(++x<o);for(o=c[y],c[0]=x=0,T=0,m=-1,z=-R,s[0]=0,E=0,U=0;y>=v;v++)for(b=r[v];0!=b--;){for(;v>z+R;){if(m++,z+=R,U=y-z,U=U>R?R:U,(g=1<<(k=v-z))>b+1&&(g-=b+1,A=v,U>k))for(;++k<U&&(g<<=1)>r[++A];)g-=r[A];if(U=1<<k,w[0]+U>1440)return t;s[m]=E=w[0],w[0]+=U,0!==m?(c[m]=x,a[0]=k,a[1]=R,k=x>>>z-R,a[2]=E-s[m-1]-k,_.set(a,3*(s[m-1]+k))):f[0]=E}for(a[1]=v-z,o>T?p[T]<l?(a[0]=256>p[T]?0:96,a[2]=p[T++]):(a[0]=u[p[T]-l]+16+64,a[2]=d[p[T++]-l]):a[0]=192,g=1<<v-z,k=x>>>z;U>k;k+=g)_.set(a,3*(E+k));for(k=1<<v-1;0!=(x&k);k>>>=1)x^=k;for(x^=k,S=(1<<z)-1;(x&S)!=c[m];)m--,z-=R,S=(1<<z)-1}return 0!==D&&1!=y?n:0}function h(t){let n;for(e||(e=[],i=[],r=new Int32Array(16),a=[],s=new Int32Array(15),c=new Int32Array(16)),i.length<t&&(i=[]),n=0;t>n;n++)i[n]=0;for(n=0;16>n;n++)r[n]=0;for(n=0;3>n;n++)a[n]=0;s.set(r.subarray(0,15),0),c.set(r.subarray(0,16),0)}this.inflate_trees_bits=(r,a,s,o,l)=>{let c;return h(19),e[0]=0,c=d(r,0,19,19,null,null,s,a,o,e,i),c==t?l.msg="oversubscribed dynamic bit lengths tree":c!=n&&0!==a[0]||(l.msg="incomplete dynamic bit lengths tree",c=t),c},this.inflate_trees_dynamic=(r,a,s,c,_,w,p,b,g)=>{let y;return h(288),e[0]=0,y=d(s,0,r,257,o,l,w,c,b,e,i),0!=y||0===c[0]?(y==t?g.msg="oversubscribed literal/length tree":-4!=y&&(g.msg="incomplete literal/length tree",y=t),y):(h(288),y=d(s,r,a,0,u,f,p,_,b,e,i),0!=y||0===_[0]&&r>257?(y==t?g.msg="oversubscribed distance tree":y==n?(g.msg="incomplete distance tree",y=t):-4!=y&&(g.msg="empty distance tree with lengths",y=t),y):0)}}function _(){const n=this;let r,a,s,o,l=0,c=0,d=0,u=0,f=0,h=0,_=0,w=0,p=0,b=0;function g(e,n,r,a,s,o,l,c){let d,u,f,h,_,w,p,b,g,y,m,x,k,v,R,S;p=c.next_in_index,b=c.avail_in,_=l.bitb,w=l.bitk,g=l.write,y=g<l.read?l.read-g-1:l.end-g,m=i[e],x=i[n];do{for(;20>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(d=_&m,u=r,f=a,S=3*(f+d),0!==(h=u[S]))for(;;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15,k=u[S+2]+(_&i[h]),_>>=h,w-=h;15>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;for(d=_&x,u=s,f=o,S=3*(f+d),h=u[S];;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15;h>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(v=u[S+2]+(_&i[h]),_>>=h,w-=h,y-=k,v>g){R=g-v;do{R+=l.end}while(0>R);if(h=l.end-R,k>h){if(k-=h,g-R>0&&h>g-R)do{l.win[g++]=l.win[R++]}while(0!=--h);else l.win.set(l.win.subarray(R,R+h),g),g+=h,R+=h,h=0;R=0}}else R=g-v,g-R>0&&2>g-R?(l.win[g++]=l.win[R++],l.win[g++]=l.win[R++],k-=2):(l.win.set(l.win.subarray(R,R+2),g),g+=2,R+=2,k-=2);if(g-R>0&&k>g-R)do{l.win[g++]=l.win[R++]}while(0!=--k);else l.win.set(l.win.subarray(R,R+k),g),g+=k,R+=k,k=0;break}if(0!=(64&h))return c.msg="invalid distance code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t;d+=u[S+2],d+=_&i[h],S=3*(f+d),h=u[S]}break}if(0!=(64&h))return 0!=(32&h)?(k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,1):(c.msg="invalid literal/length code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t);if(d+=u[S+2],d+=_&i[h],S=3*(f+d),0===(h=u[S])){_>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--;break}}else _>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--}while(y>=258&&b>=10);return k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,0}n.init=(e,t,n,i,l,c)=>{r=0,_=e,w=t,s=n,p=i,o=l,b=c,a=null},n.proc=(n,y,m)=>{let x,k,v,R,S,T,E,z=0,A=0,D=0;for(D=y.next_in_index,R=y.avail_in,z=n.bitb,A=n.bitk,S=n.write,T=S<n.read?n.read-S-1:n.end-S;;)switch(r){case 0:if(T>=258&&R>=10&&(n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,m=g(_,w,s,p,o,b,n,y),D=y.next_in_index,R=y.avail_in,z=n.bitb,A=n.bitk,S=n.write,T=S<n.read?n.read-S-1:n.end-S,0!=m)){r=1==m?7:9;break}d=_,a=s,c=p,r=1;case 1:for(x=d;x>A;){if(0===R)return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);m=0,R--,z|=(255&y.read_byte(D++))<<A,A+=8}if(k=3*(c+(z&i[x])),z>>>=a[k+1],A-=a[k+1],v=a[k],0===v){u=a[k+2],r=6;break}if(0!=(16&v)){f=15&v,l=a[k+2],r=2;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}if(0!=(32&v)){r=7;break}return r=9,y.msg="invalid literal/length code",m=t,n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);case 2:for(x=f;x>A;){if(0===R)return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);m=0,R--,z|=(255&y.read_byte(D++))<<A,A+=8}l+=z&i[x],z>>=x,A-=x,d=w,a=o,c=b,r=3;case 3:for(x=d;x>A;){if(0===R)return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);m=0,R--,z|=(255&y.read_byte(D++))<<A,A+=8}if(k=3*(c+(z&i[x])),z>>=a[k+1],A-=a[k+1],v=a[k],0!=(16&v)){f=15&v,h=a[k+2],r=4;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}return r=9,y.msg="invalid distance code",m=t,n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);case 4:for(x=f;x>A;){if(0===R)return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);m=0,R--,z|=(255&y.read_byte(D++))<<A,A+=8}h+=z&i[x],z>>=x,A-=x,r=5;case 5:for(E=S-h;0>E;)E+=n.end;for(;0!==l;){if(0===T&&(S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T)))return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);n.win[S++]=n.win[E++],T--,E==n.end&&(E=0),l--}r=0;break;case 6:if(0===T&&(S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T)))return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);m=0,n.win[S++]=u,T--,r=0;break;case 7:if(A>7&&(A-=8,R++,D--),n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,n.read!=n.write)return n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);r=8;case 8:return m=1,n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);case 9:return m=t,n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m);default:return m=e,n.bitb=z,n.bitk=A,y.avail_in=R,y.total_in+=D-y.next_in_index,y.next_in_index=D,n.write=S,n.inflate_flush(y,m)}},n.free=()=>{}}h.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=r,i[0]=s,0);const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function p(r,a){const s=this;let o,l=0,c=0,u=0,f=0;const p=[0],b=[0],g=new _;let y=0,m=new Int32Array(4320);const x=new h;s.bitk=0,s.bitb=0,s.win=new d(a),s.end=a,s.read=0,s.write=0,s.reset=(e,t)=>{t&&(t[0]=0),6==l&&g.free(e),l=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(r,null),s.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=s.read,i=(a>s.write?s.end:s.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i,a==s.end&&(a=0,s.write==s.end&&(s.write=0),i=s.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,s.read=a,t},s.proc=(n,r)=>{let a,d,_,k,v,R,S,T;for(k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R;;){let E,z,A,D,U,F,C,L;switch(l){case 0:for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}switch(a=7&d,y=1&a,a>>>1){case 0:d>>>=3,_-=3,a=7&_,d>>>=a,_-=a,l=1;break;case 1:E=[],z=[],A=[[]],D=[[]],h.inflate_trees_fixed(E,z,A,D),g.init(E[0],z[0],A[0],0,D[0],0),d>>>=3,_-=3,l=6;break;case 2:d>>>=3,_-=3,l=3;break;case 3:return d>>>=3,_-=3,l=9,n.msg="invalid block type",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}break;case 1:for(;32>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if((~d>>>16&65535)!=(65535&d))return l=9,n.msg="invalid stored block lengths",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=65535&d,d=_=0,l=0!==c?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(0===S&&(R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S&&(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S)))return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(r=0,a=c,a>v&&(a=v),a>S&&(a=S),s.win.set(n.read_buf(k,a),R),k+=a,v-=a,R+=a,S-=a,0!=(c-=a))break;l=0!==y?7:0;break;case 3:for(;14>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(u=a=16383&d,(31&a)>29||(a>>5&31)>29)return l=9,n.msg="too many length or distance symbols",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(T=0;a>T;T++)o[T]=0;d>>>=14,_-=14,f=0,l=4;case 4:for(;4+(u>>>10)>f;){for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}o[w[f++]]=7&d,d>>>=3,_-=3}for(;19>f;)o[w[f++]]=0;if(p[0]=7,a=x.inflate_trees_bits(o,p,b,m,n),0!=a)return(r=a)==t&&(o=null,l=9),s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);f=0,l=5;case 5:for(;a=u,258+(31&a)+(a>>5&31)>f;){let e,c;for(a=p[0];a>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(a=m[3*(b[0]+(d&i[a]))+1],c=m[3*(b[0]+(d&i[a]))+2],16>c)d>>>=a,_-=a,o[f++]=c;else{for(T=18==c?7:c-14,e=18==c?11:3;a+T>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(d>>>=a,_-=a,e+=d&i[T],d>>>=T,_-=T,T=f,a=u,T+e>258+(31&a)+(a>>5&31)||16==c&&1>T)return o=null,l=9,n.msg="invalid bit length repeat",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=16==c?o[T-1]:0;do{o[T++]=c}while(0!=--e);f=T}}if(b[0]=-1,U=[],F=[],C=[],L=[],U[0]=9,F[0]=6,a=u,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,U,F,C,L,m,n),0!=a)return a==t&&(o=null,l=9),r=a,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);g.init(U[0],F[0],m,C[0],m,L[0]),l=6;case 6:if(s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,1!=(r=g.proc(s,n,r)))return s.inflate_flush(n,r);if(r=0,g.free(n),k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R,0===y){l=0;break}l=7;case 7:if(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,s.read!=s.write)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);l=8;case 8:return r=1,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);case 9:return r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);default:return r=e,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}}},s.free=e=>{s.reset(e,null),s.win=null,m=null},s.set_dictionary=(e,t,n)=>{s.win.set(e.subarray(t,t+n),0),s.read=s.write=n},s.sync_point=()=>1==l?1:0}const b=13,g=[0,0,255,255];function y(){const i=this;function r(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0,i.inflateEnd=e=>(i.blocks&&i.blocks.free(e),i.blocks=null,0),i.inflateInit=(t,n)=>(t.msg=null,i.blocks=null,8>n||n>15?(i.inflateEnd(t),e):(i.wbits=n,t.istate.blocks=new p(t,1<<n),r(t),0)),i.inflate=(i,r)=>{let a,s;if(!i||!i.istate||!i.next_in)return e;const o=i.istate;for(r=4==r?n:0,a=n;;)switch(o.mode){case 0:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,8!=(15&(o.method=i.read_byte(i.next_in_index++)))){o.mode=b,i.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=b,i.msg="invalid win size",o.marker=5;break}o.mode=1;case 1:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,s=255&i.read_byte(i.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=b,i.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need=(255&i.read_byte(i.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===i.avail_in?a:(a=r,i.avail_in--,i.total_in++,o.need+=255&i.read_byte(i.next_in_index++),o.mode=6,2);case 6:return o.mode=b,i.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(i,a),a==t){o.mode=b,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(i,o.was),o.mode=12;case 12:return i.avail_in=0,1;case b:return t;default:return e}},i.inflateSetDictionary=(t,n,i)=>{let r=0,a=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return a<1<<s.wbits||(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},i.inflateSync=i=>{let a,s,o,l,c;if(!i||!i.istate)return e;const d=i.istate;if(d.mode!=b&&(d.mode=b,d.marker=0),0===(a=i.avail_in))return n;for(s=i.next_in_index,o=d.marker;0!==a&&4>o;)i.read_byte(s)==g[o]?o++:o=0!==i.read_byte(s)?0:4-o,s++,a--;return i.total_in+=s-i.next_in_index,i.next_in_index=s,i.avail_in=a,d.marker=o,4!=o?t:(l=i.total_in,c=i.total_out,r(i),i.total_in=l,i.total_out=c,d.mode=7,0)},i.inflateSyncPoint=t=>t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}function m(){}return m.prototype={inflateInit(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},function(e){const t=new m,i=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new d(i);let s=!1;t.inflateInit(),t.next_out=r,this.append=(e,a)=>{const o=[];let l,u,f=0,h=0,_=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,0!==t.avail_in||s||(t.next_in_index=0,s=!0),l=t.inflate(0),s&&l===n){if(0!==t.avail_in)throw new c("inflating: bad input")}else if(0!==l&&1!==l)throw new c("inflating: "+t.msg);if((s||1===l)&&t.avail_in===e.length)throw new c("inflating: bad input");t.next_out_index&&(t.next_out_index===i?o.push(new d(r)):o.push(r.slice(0,t.next_out_index))),_+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=f&&(a(t.next_in_index),f=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(u=new d(_),o.forEach((e=>{u.set(e,h),h+=e.length}))):u=o[0]||new d,u}},this.flush=()=>{t.inflateEnd()}}})(),z=void 0,A={chunkSize:524288,maxWorkers:void 0!==T&&T.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},D=n.assign({},A);function U(){return D}function F(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==z&&(D.baseURL=n),i!==z&&(D.chunkSize=i),r!==z&&(D.maxWorkers=r),a!==z&&(D.terminateWorkerTimeout=a),s!==z&&(D.useCompressionStream=s),o!==z&&(D.useWebWorkers=o),l!==z&&(D.Deflate=l),d!==z&&(D.Inflate=d),u!==z){const{deflate:e,inflate:n}=u;if((e||n)&&(D.workerScripts||(D.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");D.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");D.workerScripts.inflate=n}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class L{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^C[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class W extends x{constructor(){super({start(){this.crc32=new L},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new h(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const B={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=B.getPartial(n);return 32===i?e.concat(t):B._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+B.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=B.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r<e.length;r++)i.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=B.getPartial(r);return i.push(B.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},I={bytes:{fromBits(e){const t=B.bitLength(e)/8,n=new d(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(B.partial(8*(3&n),i)),t}}},H={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};H.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=I.utf8String.toBits(e));const n=t._buffer=B.concat(t._buffer,e),i=t._length,r=t._length=i+B.bitLength(e);if(r>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new f(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=B.concat(t,[B.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let s=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+r[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}};const O={getRandomValues(e){const t=new f(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||a.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},M={importKey:e=>new M.hmacSha1(I.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new c("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,d;const u=new ArrayBuffer(r),f=new h(u);let _=0;const w=B;for(t=I.bytes.toBits(t),d=1;(r||1)>_;d++){for(a=s=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>_&&o<a.length;o++)f.setInt32(_,a[o]),_+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=H.sha1,i=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},N="Invalid pasword",q=16,P={name:"PBKDF2"},V=n.assign({hash:{name:"HMAC"}},P),K=n.assign({iterations:1e3,hash:{name:"SHA-1"}},P),Z=["deriveBits"],G=[8,12,16],j=[16,24,32],X=10,Y=[0,0,0,0],J="undefined",Q="function",$=typeof y!=J,ee=$&&typeof y.subtle!=J,te=$&&typeof y.getRandomValues==Q,ne=$&&ee&&typeof y.subtle.importKey==Q,ie=$&&ee&&typeof y.subtle.deriveBits==Q,re=I.bytes,ae=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new c("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let f,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],y=4;for(let e=0;i>e;e++)f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&g]^n[y],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^d[255&w]^n[y+1],_=s[b>>>24]^o[g>>16&255]^l[w>>8&255]^d[255&p]^n[y+2],g=s[g>>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[y+3],y+=4,w=f,p=h,b=_;for(let e=0;4>e;e++)r[t?3&-e:e]=u[w>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[255&g]^n[y++],f=w,w=p,p=b,b=g,g=f;return r}},se=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=B.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return B.clamp(t,r)}},oe=M.hmacSha1;class le extends x{constructor(e,i,r){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:i,strength:r-1,pending:new d})},async transform(e,n){const i=this;if(i.password){const n=i.password;i.password=null;const r=he(e,0,G[i.strength]+2);await(async(e,t,n)=>{await ue(e,n,he(t,0,G[e.strength]));const i=he(t,G[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new c(N)})(i,r,n),i.ctr=new se(new ae(i.keys.key),t.from(Y)),i.hmac=new oe(i.keys.authentication),e=he(e,G[i.strength]+2),i.resolveReady()}else await i.ready;const r=new d(e.length-X-(e.length-X)%q);n.enqueue(de(i,e,r,0,X,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=he(n,0,n.length-X),r=he(n,n.length-X);let s=new d;if(i.length){const e=we(re,i);t.hmac.update(e);const n=t.ctr.update(e);s=_e(re,n)}if(a.valid=!0,t.signed){const e=he(_e(re,t.hmac.digest()),0,X);for(let t=0;X>t;t++)e[t]!=r[t]&&(a.valid=!1)}e.enqueue(s)}}),a=this}}class ce extends x{constructor(e,i){let r;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:i-1,pending:new d})},async transform(e,n){const i=this;let r=new d;if(i.password){const e=i.password;i.password=null,r=await(async(e,t)=>{const n=(i=new d(G[e.strength]),te?y.getRandomValues(i):O.getRandomValues(i));var i;return await ue(e,t,n),fe(n,e.keys.passwordVerification)})(i,e),i.ctr=new se(new ae(i.keys.key),t.from(Y)),i.hmac=new oe(i.keys.authentication),i.resolveReady()}else await i.ready;const a=new d(r.length+e.length-e.length%q);a.set(r,0),n.enqueue(de(i,e,a,r.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(we(re,t.pending));t.hmac.update(e),n=_e(re,e)}r.signature=_e(re,t.hmac.digest()).slice(0,X),e.enqueue(fe(n,r.signature))}}),r=this}}function de(e,t,n,i,r,a){const s=t.length-r;let o;for(e.pending.length&&(t=fe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,s-s%q)),o=0;s-q>=o;o+=q){const r=we(re,he(t,o,o+q));a&&e.hmac.update(r);const s=e.ctr.update(r);a||e.hmac.update(s),n.set(_e(re,s),o+i)}return e.pending=he(t,o),n}async function ue(e,t,i){const r=(e=>{if(void 0===p){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new p).encode(e)})(t),a=await((e,t,n,i,r)=>ne?y.subtle.importKey("raw",t,n,!1,r):M.importKey(t))(0,r,V,0,Z),s=await(async(e,t,n)=>ie?await y.subtle.deriveBits(e,t,n):M.pbkdf2(t,e.salt,K.iterations,n))(n.assign({salt:i},K),a,8*(2*j[e.strength]+2)),o=new d(s);e.keys={key:we(re,he(o,0,j[e.strength])),authentication:we(re,he(o,j[e.strength],2*j[e.strength])),passwordVerification:he(o,2*j[e.strength])}}function fe(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function he(e,t,n){return e.subarray(t,n)}function _e(e,t){return e.fromBits(t)}function we(e,t){return e.toBits(t)}class pe extends x{constructor(e,t){let i;super({start(){n.assign(this,{password:e,passwordVerification:t}),me(this,e)},transform(e,t){const n=this;if(n.password){const t=ge(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(N);e=e.subarray(12)}t.enqueue(ge(n,e))},flush(){i.valid=!0}}),i=this}}class be extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),me(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=y.getRandomValues(new d(12));t[11]=n.passwordVerification,i=new d(e.length+t.length),i.set(ye(n,t),0),r=12}else i=new d(e.length),r=0;i.set(ye(n,e),r),t.enqueue(i)},flush(){}})}}function ge(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ke(e)^t[i],xe(e,n[i]);return n}function ye(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ke(e)^t[i],xe(e,t[i]);return n}function me(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new L(e.keys[0]),e.crcKey2=new L(e.keys[2]);for(let n=0;n<t.length;n++)xe(e,t.charCodeAt(n))}function xe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Re(e.keys[1]+ve(e.keys[0])),e.keys[1]=Re(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ke(e){const t=2|e.keys[2];return ve(a.imul(t,1^t)>>>8)}function ve(e){return 255&e}function Re(e){return 4294967295&e}class Se extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",Ee="deflate-raw",ze="undefined",Ae=typeof R==ze,De=typeof S==ze;let Ue=!0,Fe=!0;class Ce extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:r,encrypted:a,useCompressionStream:s,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u}=t,f=this;let _,w,p=Be(super.readable);if(a&&!d||!u||([p,_]=p.tee(),_=_.pipeThrough(new W)),r)if(void 0!==s&&!s||Ae&&!Fe)p=We(e,p,n);else try{p=p.pipeThrough(new R(Ee))}catch(t){Fe=!1,p=We(e,p,n)}a&&(d?p=p.pipeThrough(new be(o,l)):(w=new ce(o,c),p=p.pipeThrough(w))),Ie(f,p,(async()=>{let e;a&&!d&&(e=w.signature),a&&!d||!u||(e=await _.getReader().read(),e=new h(e.value.buffer).getUint32(0)),f.signature=e}))}}class Le extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{zipCrypto:r,encrypted:a,password:s,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:f}=t;let _,w,p=Be(super.readable);if(a&&(r?p=p.pipeThrough(new pe(s,o)):(w=new le(s,l,d),p=p.pipeThrough(w))),u)if(void 0!==f&&!f||De&&!Ue)p=We(e,p,n);else try{p=p.pipeThrough(new S(Ee))}catch(t){Ue=!1,p=We(e,p,n)}a&&!r||!l||([p,_]=p.tee(),_=_.pipeThrough(new W)),Ie(this,p,(async()=>{if(a&&!r&&!w.valid)throw new c(Te);if((!a||r)&&l){const e=await _.getReader().read();if(e!=new h(e.value.buffer).getUint32(0,!1))throw new c(Te)}}))}}function We(e,t,n){return t.pipeThrough(new Se(e,{chunkSize:n}))}function Be(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Ie(e,t,i){e.length=0,t=t.pipeThrough(new x({transform(t,n){t&&t.length&&(e.length+=t.length,n.enqueue(t))},flush:i})),n.defineProperty(e,"readable",{get:()=>t})}const He="inflate",Oe="data",Me="AbortError";class Ne{constructor(e,t,n,i,r){const{codecType:a}=i;async function s(a){const s=new a(e,i,r);await t.pipeThrough(s).pipeTo(n,{preventClose:!0});const{length:o,signature:l}=s;return{length:o,signature:l}}a.startsWith("deflate")?this.run=()=>s(Ce):a.startsWith(He)&&(this.run=()=>s(Le))}}let qe=!0;class Pe{constructor(e,t,i,r){const{readable:a,writable:s}=t,{options:o,config:u,streamOptions:f,webWorker:h,scripts:_,codecConstructor:p}=i;n.assign(e,{busy:!0,codecConstructor:p,readable:a,writable:s,options:n.assign({},o),scripts:_,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,r(e)}});const{signal:b,onstart:g,onprogress:y,size:m,onend:k}=f;let v=0;const R={};return g&&(R.start=()=>Ve(g,m())),R.transform=async(e,t)=>{v+=e.length,y&&await Ve(y,v,m()),t.enqueue(e)},R.flush=()=>{a.size=()=>v,k&&Ve(k,v)},e.readable=a.pipeThrough(new x(R,{highWaterMark:1,size:()=>u.chunkSize}),{signal:b}),h?((e,{baseURL:t,chunkSize:i})=>{const r={type:"module"},{readable:a,writable:s}=e;if(n.assign(e,{reader:a.getReader(),writer:s.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(qe)try{e.worker=o({})}catch(t){qe=!1,e.worker=o(r)}else e.worker=o(r);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:i,writer:r,resolveResult:a,rejectResult:s,onTaskFinished:o}=e,{type:l,data:f,messageId:h,result:_}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,p(n)}else{if("pull"==l){const{value:e,done:t}=await i.read();u({type:Oe,data:e,done:t,messageId:h})}l==Oe&&(await r.ready,await r.write(new d(f))),"close"==l&&p(null,_)}}catch(e){p(e)}function p(e,t){e?s(e):a(t),r.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:i}}),e.result}}}return e.interface;function o(n){let i,r;i=e.scripts[0],"function"==typeof i&&(i=i());try{r=new l(i,t)}catch(e){r=i}return new Worker(r,n)}function u(t){const{worker:n,writer:i,onTaskFinished:r}=e;try{let{data:e}=t;if(e)try{const{buffer:i,length:r}=e;r!=i.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw i.releaseLock(),r(),e}}})(e,u):((e,t)=>{const n=new Ne(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:i}=e;return{async run(){try{return await n.run()}finally{i()}}}})(e,u)}}async function Ve(e,...t){try{await e(...t)}catch(e){}}let Ke=[];const Ze=[];let Ge=0;function je(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Xe="HTTP error ",Ye="HTTP Range not supported",Je="text/plain",Qe="GET",$e=65536;class et{constructor(){this.size=0}init(){this.initialized=!0}}class tt extends et{get readable(){const e=this,{chunkSize:t=$e}=e,n=new k({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s}=n,{chunkOffset:o}=this;i.enqueue(await e.readUint8Array(r+o,a.min(t,s()-o))),o+t>s()?i.close():this.chunkOffset+=t}});return n}}class nt extends et{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(this,"writable",{get:()=>t})}}class it extends nt{writeUint8Array(e){this.size+=e.length}}class rt extends tt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}function at(e){e.pendingBlob=new _([],{type:e.contentType}),e.arrayBuffers=[]}function st(e){e.pendingBlob=new _([e.pendingBlob,...e.arrayBuffers],{type:e.contentType}),e.arrayBuffers=[]}class ot extends tt{constructor(e,t){super();const i=this;i.url=e,i.preventHeadRequest=t.preventHeadRequest,i.useRangeHeader=t.useRangeHeader,i.forceRangeRequests=t.forceRangeRequests,i.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ct(this,bt,ht)}readUint8Array(e,t){return dt(this,e,t,bt,ht)}}class lt extends tt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ct(this,gt,_t)}readUint8Array(e,t){return dt(this,e,t,gt,_t)}}async function ct(e,t,n){if((e=>{const{baseURL:t}=U(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const i=await t(Qe,e,ut(e));if(!e.forceRangeRequests&&"bytes"!=i.headers.get("Accept-Ranges"))throw new c(Ye);{let r;const a=i.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(r=Number(t))}}void 0===r?await pt(e,t,n):e.size=r}}else await pt(e,t,n)}async function dt(e,t,n,i,r){if(e.useRangeHeader||e.forceRangeRequests){const r=await i(Qe,e,ut(e,t,n));if(206!=r.status)throw new c(Ye);return new d(await r.arrayBuffer())}return e.data||await r(e,e.options),new d(e.data.subarray(t,t+n))}function ut(e,t=0,i=1){return n.assign({},ft(e),{Range:"bytes="+t+"-"+(t+i-1)})}function ft(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ht(e){await wt(e,bt)}async function _t(e){await wt(e,gt)}async function wt(e,t){const n=await t(Qe,e,ft(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function pt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,ft(e))).headers.get("Content-Length");i?e.size=Number(i):await n(e,e.options)}}async function bt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new c(Ye):new c(Xe+(a.statusText||a.status))}function gt(e,{url:t},i){return new w(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new o(e)})}else a(416==s.status?new c(Ye):new c(Xe+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail.error)),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class yt extends tt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new lt(e,t):new ot(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const mt=4294967295,xt=33639248,kt=101075792,vt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Rt(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{let t="";for(let n=0;n<e.length;n++)t+=vt[e[n]];return t})(e):new b(t).decode(e)}const St=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class Tt{constructor(e){St.forEach((t=>this[t]=e[t]))}}const Et="File format is not recognized",zt="End of central directory not found",At="End of Zip64 central directory not found",Dt="End of Zip64 central directory locator not found",Ut="Central directory header not found",Ft="Local file header not found",Ct="Zip64 extra field not found",Lt="File contains encrypted entry",Wt="Encryption method not supported",Bt="Compression method not supported",It="utf-8",Ht="cp437",Ot=["uncompressedSize","compressedSize","offset"];class Mt{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,n={}){const i=this,{reader:r,offset:a,extraFieldAES:s,compressionMethod:o,config:l,bitFlag:d,signature:u,rawLastModDate:f,compressedSize:h}=i,_=i.localDirectory={};let p=await Qt(r,a,30);const b=Jt(p);let g=Vt(i,n,"password");if(g=g&&g.length&&g,s&&99!=s.originalCompressionMethod)throw new c(Bt);if(0!=o&&8!=o)throw new c(Bt);if(67324752!=Xt(b,0))throw new c(Ft);Nt(_,b,4),p=await Qt(r,a,30+_.filenameLength+_.extraFieldLength),_.rawExtraField=p.subarray(30+_.filenameLength),await qt(i,_,b,4),t.lastAccessDate=_.lastAccessDate,t.creationDate=_.creationDate;const y=i.encrypted&&_.encrypted,m=y&&!s;if(y){if(!m&&void 0===s.strength)throw new c(Wt);if(!g)throw new c(Lt)}const x=a+30+_.filenameLength+_.extraFieldLength,k=()=>h,v=r.readable;v.offset=x,v.size=k;const{writable:R}=e,S=Vt(i,n,"signal");e.init&&!e.initialized&&await e.init();const{onstart:T,onprogress:E,onend:z}=n,A={options:{codecType:He,password:g,zipCrypto:m,encryptionStrength:s&&s.strength,signed:Vt(i,n,"checkSignature"),passwordVerification:m&&(d.dataDescriptor?f>>>8&255:u>>>24&255),signature:u,compressed:0!=o,encrypted:y,useWebWorkers:Vt(i,n,"useWebWorkers"),useCompressionStream:Vt(i,n,"useCompressionStream")},config:l,streamOptions:{signal:S,size:k,onstart:T,onprogress:E,onend:z},codecConstructor:l.Inflate};return await(async(e,t)=>{const{options:n,config:i,streamOptions:r}=t,a=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:s,useCompressionStream:o,codecType:l}=n,{workerScripts:d}=i;let u;if(t.webWorker=!a&&(s||void 0===s&&i.useWebWorkers),t.scripts=t.webWorker&&d?d[l]:[],n.useCompressionStream=void 0===o?i.useCompressionStream:o,Ke.length<i.maxWorkers){const n={indexWorker:Ge};Ge++,Ke.push(n),u=new Pe(n,e,t,f)}else{const n=Ke.find((e=>!e.busy));n?(je(n),u=new Pe(n,e,t,f)):u=await new w((n=>Ze.push({resolve:n,stream:e,workerOptions:t})))}try{return await u.run()}catch(e){const{signal:t}=r;throw t&&t.aborted&&(t.reason==e||e.name==Me)?new c(Me):e}function f(e){if(Ze.length){const[{resolve:t,stream:n,workerOptions:i}]=Ze.splice(0,1);t(new Pe(e,n,i,f))}else if(e.worker){const{terminateWorkerTimeout:t}=i;je(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ke=Ke.filter((t=>t!=e)),e.terminate()}),t))}else Ke=Ke.filter((t=>t!=e))}})({readable:v,writable:R},A),e.preventClose||await R.getWriter().close(),e.getData?e.getData():R}}function Nt(e,t,i){const r=e.rawBitFlag=jt(t,i+2),a=1==(1&r),s=Xt(t,i+6);n.assign(e,{encrypted:a,version:jt(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Kt(s),filenameLength:jt(t,i+22),extraFieldLength:jt(t,i+24)})}async function qt(e,t,i,r){const{rawExtraField:l}=t,u=t.extraField=new o,f=Jt(new d(l));let h=0;try{for(;h<l.length;){const e=jt(f,h),t=jt(f,h+2);u.set(e,{type:e,data:l.slice(h+4,h+4+t)}),h+=4+t}}catch(e){}const _=jt(i,r+4);t.signature=Xt(i,r+10),t.uncompressedSize=Xt(i,r+18),t.compressedSize=Xt(i,r+14);const w=u.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Jt(e.data);e.values=[];for(let t=0;t<a.floor(e.data.length/8);t++)e.values.push(Yt(n,0+8*t));const i=Ot.filter((e=>t[e]==mt));for(let t=0;t<i.length;t++)e[i[t]]=e.values[t];Ot.forEach((n=>{if(t[n]==mt){if(void 0===e[n])throw new c(Ct);t[n]=e[n]}}))})(w,t),t.extraFieldZip64=w);const p=u.get(28789);p&&(await Pt(p,"filename","rawFilename",t,e),t.extraFieldUnicodePath=p);const b=u.get(25461);b&&(await Pt(b,"comment","rawComment",t,e),t.extraFieldUnicodeComment=b);const g=u.get(39169);g?(((e,t,n)=>{const i=Jt(e.data);e.vendorVersion=Gt(i,0),e.vendorId=Gt(i,2);const r=Gt(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=jt(i,5)})(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const y=u.get(10);y&&(((e,t)=>{const i=Jt(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=jt(i,a),n=jt(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Jt(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:Zt(a),lastAccessDate:Zt(s),creationDate:Zt(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(y,t),t.extraFieldNTFS=y);const m=u.get(21589);m&&(((e,t)=>{const n=Jt(e.data),i=Gt(n,0),r=[],a=[];1==(1&i)&&(r.push("lastModDate"),a.push("rawLastModDate")),2==(2&i)&&(r.push("lastAccessDate"),a.push("rawLastAccessDate")),4==(4&i)&&(r.push("creationDate"),a.push("rawCreationDate"));let o=1;r.forEach(((i,r)=>{if(e.data.length>=o+4){const l=Xt(n,o);t[i]=e[i]=new s(1e3*l);const c=a[r];e[c]=l}o+=4}))})(m,t),t.extraFieldExtendedTimestamp=m)}async function Pt(e,t,n,i,r){const a=Jt(e.data);e.version=Gt(a,0),e.signature=Xt(a,1);const s=new L;s.append(r[n]);const o=Jt(new d(4));o.setUint32(0,s.get(),!0),e[t]=await Rt(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==Xt(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Vt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Kt(e){const t=(4294901760&e)>>16,n=65535&e;try{return new s(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Zt(e){return new s(Number(e/r(1e4)-r(116444736e5)))}function Gt(e,t){return e.getUint8(t)}function jt(e,t){return e.getUint16(t,!0)}function Xt(e,t){return e.getUint32(t,!0)}function Yt(e,t){return Number(e.getBigUint64(t,!0))}function Jt(e){return new h(e.buffer)}function Qt(e,t,n){return e.readUint8Array(t,n)}F({Inflate:E}),e.BlobReader=rt,e.BlobWriter=class extends it{constructor(e){super();const t=this;t.contentType=e,t.arrayBuffersMaxlength=8,at(t)}writeUint8Array(e){super.writeUint8Array(e);const t=this;t.arrayBuffers.length==t.arrayBuffersMaxlength&&st(t),t.arrayBuffers.push(e.buffer)}getData(){const e=this;return e.blob||(e.arrayBuffers.length&&st(e),e.blob=e.pendingBlob,at(e)),e.blob}},e.Data64URIReader=class extends tt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),i=4*a.floor(e/3),r=this.dataStart,s=atob(this.dataURI.substring(i+r,4*a.ceil((e+t)/3)+r)),o=e-3*a.floor(i/4);for(let e=o;o+t>e;e++)n[e-o]=s.charCodeAt(e);return n}},e.Data64URIWriter=class extends it{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){super.writeUint8Array(e);const t=this;let n=0,r=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=m(r):t.pending=r}getData(){return this.data+m(this.pending)}},e.ERR_ABORT=Me,e.ERR_BAD_FORMAT=Et,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Ut,e.ERR_ENCRYPTED=Lt,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Dt,e.ERR_EOCDR_NOT_FOUND=zt,e.ERR_EOCDR_ZIP64_NOT_FOUND=At,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ct,e.ERR_HTTP_RANGE=Ye,e.ERR_INVALID_PASSWORD=N,e.ERR_INVALID_SIGNATURE=Te,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Ft,e.ERR_NOT_SEEKABLE_READER="Reader is not seekable",e.ERR_UNSUPPORTED_COMPRESSION=Bt,e.ERR_UNSUPPORTED_ENCRYPTION=Wt,e.HttpRangeReader=class extends yt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=yt,e.ReadableStreamReader=class extends et{constructor(e){super(),e||(this.readable=new k({}))}},e.Reader=tt,e.TextReader=class extends tt{constructor(e){super(),this.blobReader=new rt(new _([e],{type:Je}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends it{constructor(e){super(),this.encoding=e,this.blob=new _([],{type:Je})}writeUint8Array(e){super.writeUint8Array(e),this.blob=new _([this.blob,e.buffer],{type:Je})}getData(){return this.blob.text()}},e.Uint8ArrayReader=class extends tt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends it{constructor(){super(),this.array=new d}writeUint8Array(e){super.writeUint8Array(e);const t=this,n=t.array;t.array=new d(n.length+e.length),t.array.set(n),t.array.set(e,n.length)}getData(){return this.array}},e.WritableStreamWriter=class extends it{constructor(e,{preventClose:t}={}){super(),this.preventClose=t,e||(e=new v({})),n.defineProperty(this,"writable",{get:()=>e})}},e.Writer=it,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:e,options:t,config:U()})}async*getEntriesGenerator(e={}){const t=this,{reader:i,config:r}=t;if(i.initialized||await i.init(),i.chunkSize=(e=>a.max(e.chunkSize,64))(r),22>i.size)throw new c(Et);const s=await(async(e,t,n)=>{const i=new d(4);return Jt(i).setUint32(0,101010256,!0),await r(22)||await r(a.min(1048582,n));async function r(t){const r=n-t,a=await Qt(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!s)throw new c(zt);const o=Jt(s);let l=Xt(o,12),u=Xt(o,16);const f=s.offset,h=jt(o,20),_=f+22+h;let p=jt(o,8),b=0,g=0;if(u==mt||l==mt||65535==p){const e=Jt(await Qt(i,s.offset-20,20));if(117853008!=Xt(e,0))throw new c(At);u=Yt(e,8);let t=await Qt(i,u,56),n=Jt(t);const r=s.offset-20-56;if(Xt(n,0)!=kt&&u!=r){const e=u;u=r,b=u-e,t=await Qt(i,u,56),n=Jt(t)}if(Xt(n,0)!=kt)throw new c(Dt);p=Yt(n,32),l=Yt(n,40),u-=l}if(0>u||u>=i.size)throw new c(Et);let y=0,m=await Qt(i,u,l),x=Jt(m);if(l){const e=s.offset-l;if(Xt(x,y)!=xt&&u!=e){const t=u;u=e,b=u-t,m=await Qt(i,u,l),x=Jt(m)}}if(0>u||u>=i.size)throw new c(Et);for(let s=0;p>s;s++){const o=new Mt(i,r,t.options);if(Xt(x,y)!=xt)throw new c(Ut);Nt(o,x,y+6);const l=!!o.bitFlag.languageEncodingFlag,d=y+46,u=d+o.filenameLength,f=u+o.extraFieldLength,h=jt(x,y+4),_=0==(0&h);n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:jt(x,y+32),directory:_&&16==(16&Gt(x,y+38)),offset:Xt(x,y+42)+b,internalFileAttribute:Xt(x,y+34),externalFileAttribute:Xt(x,y+38),rawFilename:m.subarray(d,u),filenameUTF8:l,commentUTF8:l,rawExtraField:m.subarray(u,f)}),g=a.max(o.offset,g);const k=f+o.commentLength;o.rawComment=m.subarray(f,k);const v=Vt(t,e,"filenameEncoding"),R=Vt(t,e,"commentEncoding"),[S,T]=await w.all([Rt(o.rawFilename,o.filenameUTF8?It:v||Ht),Rt(o.rawComment,o.commentUTF8?It:R||Ht)]);o.filename=S,o.comment=T,!o.directory&&o.filename.endsWith("/")&&(o.directory=!0),await qt(o,o,x,y+6);const E=new Tt(o);if(E.getData=(e,t)=>o.getData(e,E,t),y=k,e.onprogress)try{await e.onprogress(s+1,p,new Tt(o))}catch(e){}yield E}const k=Vt(t,e,"extractPrependedData"),v=Vt(t,e,"extractAppendedData");return k&&(t.prependedData=await Qt(i,0,g)),t.comment=h?await Qt(i,f+22,h):new d,v&&(t.appendedData=_<i.size?await Qt(i,_,i.size-_):new d),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=F,e.getMimeType=()=>"application/octet-stream",e.terminateWorkers=()=>{Ke.forEach((e=>{je(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,BigInt:r,Math:a,Date:s,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:f,DataView:h,Blob:_,Promise:w,TextEncoder:p,TextDecoder:g,document:b,crypto:y,btoa:m,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:R,DecompressionStream:S,navigator:T}=globalThis,z=(()=>{const e=-2,t=-3,n=-5,i=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],r=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],s=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],f=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function h(){let e,i,r,a,s,c;function d(e,i,o,l,d,u,f,h,_,w,p){let g,b,y,m,x,k,v,R,S,T,z,D,A,E,U;T=0,x=o;do{r[e[i+T]]++,T++,x--}while(0!==x);if(r[0]==o)return f[0]=-1,h[0]=0,0;for(R=h[0],k=1;15>=k&&0===r[k];k++);for(v=k,k>R&&(R=k),x=15;0!==x&&0===r[x];x--);for(y=x,R>x&&(R=x),h[0]=R,E=1<<k;x>k;k++,E<<=1)if(0>(E-=r[k]))return t;if(0>(E-=r[x]))return t;for(r[x]+=E,c[1]=k=0,T=1,A=2;0!=--x;)c[A]=k+=r[T],A++,T++;x=0,T=0;do{0!==(k=e[i+T])&&(p[c[k]++]=x),T++}while(++x<o);for(o=c[y],c[0]=x=0,T=0,m=-1,D=-R,s[0]=0,z=0,U=0;y>=v;v++)for(g=r[v];0!=g--;){for(;v>D+R;){if(m++,D+=R,U=y-D,U=U>R?R:U,(b=1<<(k=v-D))>g+1&&(b-=g+1,A=v,U>k))for(;++k<U&&(b<<=1)>r[++A];)b-=r[A];if(U=1<<k,w[0]+U>1440)return t;s[m]=z=w[0],w[0]+=U,0!==m?(c[m]=x,a[0]=k,a[1]=R,k=x>>>D-R,a[2]=z-s[m-1]-k,_.set(a,3*(s[m-1]+k))):f[0]=z}for(a[1]=v-D,o>T?p[T]<l?(a[0]=256>p[T]?0:96,a[2]=p[T++]):(a[0]=u[p[T]-l]+16+64,a[2]=d[p[T++]-l]):a[0]=192,b=1<<v-D,k=x>>>D;U>k;k+=b)_.set(a,3*(z+k));for(k=1<<v-1;0!=(x&k);k>>>=1)x^=k;for(x^=k,S=(1<<D)-1;(x&S)!=c[m];)m--,D-=R,S=(1<<D)-1}return 0!==E&&1!=y?n:0}function h(t){let n;for(e||(e=[],i=[],r=new Int32Array(16),a=[],s=new Int32Array(15),c=new Int32Array(16)),i.length<t&&(i=[]),n=0;t>n;n++)i[n]=0;for(n=0;16>n;n++)r[n]=0;for(n=0;3>n;n++)a[n]=0;s.set(r.subarray(0,15),0),c.set(r.subarray(0,16),0)}this.inflate_trees_bits=(r,a,s,o,l)=>{let c;return h(19),e[0]=0,c=d(r,0,19,19,null,null,s,a,o,e,i),c==t?l.msg="oversubscribed dynamic bit lengths tree":c!=n&&0!==a[0]||(l.msg="incomplete dynamic bit lengths tree",c=t),c},this.inflate_trees_dynamic=(r,a,s,c,_,w,p,g,b)=>{let y;return h(288),e[0]=0,y=d(s,0,r,257,o,l,w,c,g,e,i),0!=y||0===c[0]?(y==t?b.msg="oversubscribed literal/length tree":-4!=y&&(b.msg="incomplete literal/length tree",y=t),y):(h(288),y=d(s,r,a,0,u,f,p,_,g,e,i),0!=y||0===_[0]&&r>257?(y==t?b.msg="oversubscribed distance tree":y==n?(b.msg="incomplete distance tree",y=t):-4!=y&&(b.msg="empty distance tree with lengths",y=t),y):0)}}function _(){const n=this;let r,a,s,o,l=0,c=0,d=0,u=0,f=0,h=0,_=0,w=0,p=0,g=0;function b(e,n,r,a,s,o,l,c){let d,u,f,h,_,w,p,g,b,y,m,x,k,v,R,S;p=c.next_in_index,g=c.avail_in,_=l.bitb,w=l.bitk,b=l.write,y=b<l.read?l.read-b-1:l.end-b,m=i[e],x=i[n];do{for(;20>w;)g--,_|=(255&c.read_byte(p++))<<w,w+=8;if(d=_&m,u=r,f=a,S=3*(f+d),0!==(h=u[S]))for(;;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15,k=u[S+2]+(_&i[h]),_>>=h,w-=h;15>w;)g--,_|=(255&c.read_byte(p++))<<w,w+=8;for(d=_&x,u=s,f=o,S=3*(f+d),h=u[S];;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15;h>w;)g--,_|=(255&c.read_byte(p++))<<w,w+=8;if(v=u[S+2]+(_&i[h]),_>>=h,w-=h,y-=k,v>b){R=b-v;do{R+=l.end}while(0>R);if(h=l.end-R,k>h){if(k-=h,b-R>0&&h>b-R)do{l.win[b++]=l.win[R++]}while(0!=--h);else l.win.set(l.win.subarray(R,R+h),b),b+=h,R+=h,h=0;R=0}}else R=b-v,b-R>0&&2>b-R?(l.win[b++]=l.win[R++],l.win[b++]=l.win[R++],k-=2):(l.win.set(l.win.subarray(R,R+2),b),b+=2,R+=2,k-=2);if(b-R>0&&k>b-R)do{l.win[b++]=l.win[R++]}while(0!=--k);else l.win.set(l.win.subarray(R,R+k),b),b+=k,R+=k,k=0;break}if(0!=(64&h))return c.msg="invalid distance code",k=c.avail_in-g,k=k>w>>3?w>>3:k,g+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=g,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=b,t;d+=u[S+2],d+=_&i[h],S=3*(f+d),h=u[S]}break}if(0!=(64&h))return 0!=(32&h)?(k=c.avail_in-g,k=k>w>>3?w>>3:k,g+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=g,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=b,1):(c.msg="invalid literal/length code",k=c.avail_in-g,k=k>w>>3?w>>3:k,g+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=g,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=b,t);if(d+=u[S+2],d+=_&i[h],S=3*(f+d),0===(h=u[S])){_>>=u[S+1],w-=u[S+1],l.win[b++]=u[S+2],y--;break}}else _>>=u[S+1],w-=u[S+1],l.win[b++]=u[S+2],y--}while(y>=258&&g>=10);return k=c.avail_in-g,k=k>w>>3?w>>3:k,g+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=g,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=b,0}n.init=(e,t,n,i,l,c)=>{r=0,_=e,w=t,s=n,p=i,o=l,g=c,a=null},n.proc=(n,y,m)=>{let x,k,v,R,S,T,z,D=0,A=0,E=0;for(E=y.next_in_index,R=y.avail_in,D=n.bitb,A=n.bitk,S=n.write,T=S<n.read?n.read-S-1:n.end-S;;)switch(r){case 0:if(T>=258&&R>=10&&(n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,m=b(_,w,s,p,o,g,n,y),E=y.next_in_index,R=y.avail_in,D=n.bitb,A=n.bitk,S=n.write,T=S<n.read?n.read-S-1:n.end-S,0!=m)){r=1==m?7:9;break}d=_,a=s,c=p,r=1;case 1:for(x=d;x>A;){if(0===R)return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(E++))<<A,A+=8}if(k=3*(c+(D&i[x])),D>>>=a[k+1],A-=a[k+1],v=a[k],0===v){u=a[k+2],r=6;break}if(0!=(16&v)){f=15&v,l=a[k+2],r=2;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}if(0!=(32&v)){r=7;break}return r=9,y.msg="invalid literal/length code",m=t,n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);case 2:for(x=f;x>A;){if(0===R)return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(E++))<<A,A+=8}l+=D&i[x],D>>=x,A-=x,d=w,a=o,c=g,r=3;case 3:for(x=d;x>A;){if(0===R)return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(E++))<<A,A+=8}if(k=3*(c+(D&i[x])),D>>=a[k+1],A-=a[k+1],v=a[k],0!=(16&v)){f=15&v,h=a[k+2],r=4;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}return r=9,y.msg="invalid distance code",m=t,n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);case 4:for(x=f;x>A;){if(0===R)return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(E++))<<A,A+=8}h+=D&i[x],D>>=x,A-=x,r=5;case 5:for(z=S-h;0>z;)z+=n.end;for(;0!==l;){if(0===T&&(S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T)))return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);n.win[S++]=n.win[z++],T--,z==n.end&&(z=0),l--}r=0;break;case 6:if(0===T&&(S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,T=S<n.read?n.read-S-1:n.end-S),0===T)))return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);m=0,n.win[S++]=u,T--,r=0;break;case 7:if(A>7&&(A-=8,R++,E--),n.write=S,m=n.inflate_flush(y,m),S=n.write,T=S<n.read?n.read-S-1:n.end-S,n.read!=n.write)return n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);r=8;case 8:return m=1,n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);case 9:return m=t,n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m);default:return m=e,n.bitb=D,n.bitk=A,y.avail_in=R,y.total_in+=E-y.next_in_index,y.next_in_index=E,n.write=S,n.inflate_flush(y,m)}},n.free=()=>{}}h.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=r,i[0]=s,0);const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function p(r,a){const s=this;let o,l=0,c=0,u=0,f=0;const p=[0],g=[0],b=new _;let y=0,m=new Int32Array(4320);const x=new h;s.bitk=0,s.bitb=0,s.win=new d(a),s.end=a,s.read=0,s.write=0,s.reset=(e,t)=>{t&&(t[0]=0),6==l&&b.free(e),l=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(r,null),s.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=s.read,i=(a>s.write?s.end:s.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i,a==s.end&&(a=0,s.write==s.end&&(s.write=0),i=s.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,s.read=a,t},s.proc=(n,r)=>{let a,d,_,k,v,R,S,T;for(k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R;;){let z,D,A,E,U,F,C,L;switch(l){case 0:for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}switch(a=7&d,y=1&a,a>>>1){case 0:d>>>=3,_-=3,a=7&_,d>>>=a,_-=a,l=1;break;case 1:z=[],D=[],A=[[]],E=[[]],h.inflate_trees_fixed(z,D,A,E),b.init(z[0],D[0],A[0],0,E[0],0),d>>>=3,_-=3,l=6;break;case 2:d>>>=3,_-=3,l=3;break;case 3:return d>>>=3,_-=3,l=9,n.msg="invalid block type",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}break;case 1:for(;32>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if((~d>>>16&65535)!=(65535&d))return l=9,n.msg="invalid stored block lengths",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=65535&d,d=_=0,l=0!==c?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(0===S&&(R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S&&(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S)))return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(r=0,a=c,a>v&&(a=v),a>S&&(a=S),s.win.set(n.read_buf(k,a),R),k+=a,v-=a,R+=a,S-=a,0!=(c-=a))break;l=0!==y?7:0;break;case 3:for(;14>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(u=a=16383&d,(31&a)>29||(a>>5&31)>29)return l=9,n.msg="too many length or distance symbols",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(T=0;a>T;T++)o[T]=0;d>>>=14,_-=14,f=0,l=4;case 4:for(;4+(u>>>10)>f;){for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}o[w[f++]]=7&d,d>>>=3,_-=3}for(;19>f;)o[w[f++]]=0;if(p[0]=7,a=x.inflate_trees_bits(o,p,g,m,n),0!=a)return(r=a)==t&&(o=null,l=9),s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);f=0,l=5;case 5:for(;a=u,258+(31&a)+(a>>5&31)>f;){let e,c;for(a=p[0];a>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(a=m[3*(g[0]+(d&i[a]))+1],c=m[3*(g[0]+(d&i[a]))+2],16>c)d>>>=a,_-=a,o[f++]=c;else{for(T=18==c?7:c-14,e=18==c?11:3;a+T>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(d>>>=a,_-=a,e+=d&i[T],d>>>=T,_-=T,T=f,a=u,T+e>258+(31&a)+(a>>5&31)||16==c&&1>T)return o=null,l=9,n.msg="invalid bit length repeat",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=16==c?o[T-1]:0;do{o[T++]=c}while(0!=--e);f=T}}if(g[0]=-1,U=[],F=[],C=[],L=[],U[0]=9,F[0]=6,a=u,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,U,F,C,L,m,n),0!=a)return a==t&&(o=null,l=9),r=a,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);b.init(U[0],F[0],m,C[0],m,L[0]),l=6;case 6:if(s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,1!=(r=b.proc(s,n,r)))return s.inflate_flush(n,r);if(r=0,b.free(n),k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R,0===y){l=0;break}l=7;case 7:if(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,s.read!=s.write)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);l=8;case 8:return r=1,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);case 9:return r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);default:return r=e,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}}},s.free=e=>{s.reset(e,null),s.win=null,m=null},s.set_dictionary=(e,t,n)=>{s.win.set(e.subarray(t,t+n),0),s.read=s.write=n},s.sync_point=()=>1==l?1:0}const g=13,b=[0,0,255,255];function y(){const i=this;function r(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0,i.inflateEnd=e=>(i.blocks&&i.blocks.free(e),i.blocks=null,0),i.inflateInit=(t,n)=>(t.msg=null,i.blocks=null,8>n||n>15?(i.inflateEnd(t),e):(i.wbits=n,t.istate.blocks=new p(t,1<<n),r(t),0)),i.inflate=(i,r)=>{let a,s;if(!i||!i.istate||!i.next_in)return e;const o=i.istate;for(r=4==r?n:0,a=n;;)switch(o.mode){case 0:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,8!=(15&(o.method=i.read_byte(i.next_in_index++)))){o.mode=g,i.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=g,i.msg="invalid win size",o.marker=5;break}o.mode=1;case 1:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,s=255&i.read_byte(i.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=g,i.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need=(255&i.read_byte(i.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===i.avail_in?a:(a=r,i.avail_in--,i.total_in++,o.need+=255&i.read_byte(i.next_in_index++),o.mode=6,2);case 6:return o.mode=g,i.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(i,a),a==t){o.mode=g,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(i,o.was),o.mode=12;case 12:return i.avail_in=0,1;case g:return t;default:return e}},i.inflateSetDictionary=(t,n,i)=>{let r=0,a=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return a<1<<s.wbits||(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},i.inflateSync=i=>{let a,s,o,l,c;if(!i||!i.istate)return e;const d=i.istate;if(d.mode!=g&&(d.mode=g,d.marker=0),0===(a=i.avail_in))return n;for(s=i.next_in_index,o=d.marker;0!==a&&4>o;)i.read_byte(s)==b[o]?o++:o=0!==i.read_byte(s)?0:4-o,s++,a--;return i.total_in+=s-i.next_in_index,i.next_in_index=s,i.avail_in=a,d.marker=o,4!=o?t:(l=i.total_in,c=i.total_out,r(i),i.total_in=l,i.total_out=c,d.mode=7,0)},i.inflateSyncPoint=t=>t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}function m(){}return m.prototype={inflateInit(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},function(e){const t=new m,i=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new d(i);let s=!1;t.inflateInit(),t.next_out=r,this.append=(e,a)=>{const o=[];let l,u,f=0,h=0,_=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,0!==t.avail_in||s||(t.next_in_index=0,s=!0),l=t.inflate(0),s&&l===n){if(0!==t.avail_in)throw new c("inflating: bad input")}else if(0!==l&&1!==l)throw new c("inflating: "+t.msg);if((s||1===l)&&t.avail_in===e.length)throw new c("inflating: bad input");t.next_out_index&&(t.next_out_index===i?o.push(new d(r)):o.push(r.slice(0,t.next_out_index))),_+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=f&&(a(t.next_in_index),f=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(u=new d(_),o.forEach((e=>{u.set(e,h),h+=e.length}))):u=o[0]||new d,u}},this.flush=()=>{t.inflateEnd()}}})(),D=void 0,A={chunkSize:524288,maxWorkers:void 0!==T&&T.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},E=n.assign({},A);function U(){return E}function F(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==D&&(E.baseURL=n),i!==D&&(E.chunkSize=i),r!==D&&(E.maxWorkers=r),a!==D&&(E.terminateWorkerTimeout=a),s!==D&&(E.useCompressionStream=s),o!==D&&(E.useWebWorkers=o),l!==D&&(E.Deflate=l),d!==D&&(E.Inflate=d),u!==D){const{deflate:e,inflate:n}=u;if((e||n)&&(E.workerScripts||(E.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");E.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");E.workerScripts.inflate=n}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class L{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^C[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class W extends x{constructor(){super({start(){this.crc32=new L},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new h(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const B={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=B.getPartial(n);return 32===i?e.concat(t):B._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+B.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=B.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r<e.length;r++)i.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=B.getPartial(r);return i.push(B.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},I={bytes:{fromBits(e){const t=B.bitLength(e)/8,n=new d(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(B.partial(8*(3&n),i)),t}}},H={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};H.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=I.utf8String.toBits(e));const n=t._buffer=B.concat(t._buffer,e),i=t._length,r=t._length=i+B.bitLength(e);if(r>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new f(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=B.concat(t,[B.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let s=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+r[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}};const O={getRandomValues(e){const t=new f(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||a.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},M={importKey:e=>new M.hmacSha1(I.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new c("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,d;const u=new ArrayBuffer(r),f=new h(u);let _=0;const w=B;for(t=I.bytes.toBits(t),d=1;(r||1)>_;d++){for(a=s=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>_&&o<a.length;o++)f.setInt32(_,a[o]),_+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=H.sha1,i=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},N="Invalid pasword",q=16,P={name:"PBKDF2"},V=n.assign({hash:{name:"HMAC"}},P),K=n.assign({iterations:1e3,hash:{name:"SHA-1"}},P),Z=["deriveBits"],G=[8,12,16],j=[16,24,32],X=10,Y=[0,0,0,0],J="undefined",Q="function",$=typeof y!=J,ee=$&&typeof y.subtle!=J,te=$&&typeof y.getRandomValues==Q,ne=$&&ee&&typeof y.subtle.importKey==Q,ie=$&&ee&&typeof y.subtle.deriveBits==Q,re=I.bytes,ae=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new c("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let f,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],b=e[t?1:3]^n[3],y=4;for(let e=0;i>e;e++)f=s[w>>>24]^o[p>>16&255]^l[g>>8&255]^d[255&b]^n[y],h=s[p>>>24]^o[g>>16&255]^l[b>>8&255]^d[255&w]^n[y+1],_=s[g>>>24]^o[b>>16&255]^l[w>>8&255]^d[255&p]^n[y+2],b=s[b>>>24]^o[w>>16&255]^l[p>>8&255]^d[255&g]^n[y+3],y+=4,w=f,p=h,g=_;for(let e=0;4>e;e++)r[t?3&-e:e]=u[w>>>24]<<24^u[p>>16&255]<<16^u[g>>8&255]<<8^u[255&b]^n[y++],f=w,w=p,p=g,g=b,b=f;return r}},se=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=B.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return B.clamp(t,r)}},oe=M.hmacSha1;class le extends x{constructor(e,i,r){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:i,strength:r-1,pending:new d})},async transform(e,n){const i=this;if(i.password){const n=i.password;i.password=null;const r=he(e,0,G[i.strength]+2);await(async(e,t,n)=>{await ue(e,n,he(t,0,G[e.strength]));const i=he(t,G[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new c(N)})(i,r,n),i.ctr=new se(new ae(i.keys.key),t.from(Y)),i.hmac=new oe(i.keys.authentication),e=he(e,G[i.strength]+2),i.resolveReady()}else await i.ready;const r=new d(e.length-X-(e.length-X)%q);n.enqueue(de(i,e,r,0,X,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=he(n,0,n.length-X),r=he(n,n.length-X);let s=new d;if(i.length){const e=we(re,i);t.hmac.update(e);const n=t.ctr.update(e);s=_e(re,n)}if(a.valid=!0,t.signed){const e=he(_e(re,t.hmac.digest()),0,X);for(let t=0;X>t;t++)e[t]!=r[t]&&(a.valid=!1)}e.enqueue(s)}}),a=this}}class ce extends x{constructor(e,i){let r;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:i-1,pending:new d})},async transform(e,n){const i=this;let r=new d;if(i.password){const e=i.password;i.password=null,r=await(async(e,t)=>{const n=(i=new d(G[e.strength]),te?y.getRandomValues(i):O.getRandomValues(i));var i;return await ue(e,t,n),fe(n,e.keys.passwordVerification)})(i,e),i.ctr=new se(new ae(i.keys.key),t.from(Y)),i.hmac=new oe(i.keys.authentication),i.resolveReady()}else await i.ready;const a=new d(r.length+e.length-e.length%q);a.set(r,0),n.enqueue(de(i,e,a,r.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(we(re,t.pending));t.hmac.update(e),n=_e(re,e)}r.signature=_e(re,t.hmac.digest()).slice(0,X),e.enqueue(fe(n,r.signature))}}),r=this}}function de(e,t,n,i,r,a){const s=t.length-r;let o;for(e.pending.length&&(t=fe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,s-s%q)),o=0;s-q>=o;o+=q){const r=we(re,he(t,o,o+q));a&&e.hmac.update(r);const s=e.ctr.update(r);a||e.hmac.update(s),n.set(_e(re,s),o+i)}return e.pending=he(t,o),n}async function ue(e,t,i){const r=(e=>{if(void 0===p){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new p).encode(e)})(t),a=await((e,t,n,i,r)=>ne?y.subtle.importKey("raw",t,n,!1,r):M.importKey(t))(0,r,V,0,Z),s=await(async(e,t,n)=>ie?await y.subtle.deriveBits(e,t,n):M.pbkdf2(t,e.salt,K.iterations,n))(n.assign({salt:i},K),a,8*(2*j[e.strength]+2)),o=new d(s);e.keys={key:we(re,he(o,0,j[e.strength])),authentication:we(re,he(o,j[e.strength],2*j[e.strength])),passwordVerification:he(o,2*j[e.strength])}}function fe(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function he(e,t,n){return e.subarray(t,n)}function _e(e,t){return e.fromBits(t)}function we(e,t){return e.toBits(t)}class pe extends x{constructor(e,t){let i;super({start(){n.assign(this,{password:e,passwordVerification:t}),me(this,e)},transform(e,t){const n=this;if(n.password){const t=be(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(N);e=e.subarray(12)}t.enqueue(be(n,e))},flush(){i.valid=!0}}),i=this}}class ge extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),me(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=y.getRandomValues(new d(12));t[11]=n.passwordVerification,i=new d(e.length+t.length),i.set(ye(n,t),0),r=12}else i=new d(e.length),r=0;i.set(ye(n,e),r),t.enqueue(i)},flush(){}})}}function be(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ke(e)^t[i],xe(e,n[i]);return n}function ye(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ke(e)^t[i],xe(e,t[i]);return n}function me(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new L(e.keys[0]),e.crcKey2=new L(e.keys[2]);for(let n=0;n<t.length;n++)xe(e,t.charCodeAt(n))}function xe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Re(e.keys[1]+ve(e.keys[0])),e.keys[1]=Re(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ke(e){const t=2|e.keys[2];return ve(a.imul(t,1^t)>>>8)}function ve(e){return 255&e}function Re(e){return 4294967295&e}class Se extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",ze="deflate-raw",De="undefined",Ae=typeof R==De,Ee=typeof S==De;let Ue=!0,Fe=!0;class Ce extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:r,encrypted:a,useCompressionStream:s,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u}=t,f=this;let _,w,p=Be(super.readable);if(a&&!d||!u||([p,_]=p.tee(),_=_.pipeThrough(new W)),r)if(void 0!==s&&!s||Ae&&!Fe)p=We(e,p,n);else try{p=p.pipeThrough(new R(ze))}catch(t){Fe=!1,p=We(e,p,n)}a&&(d?p=p.pipeThrough(new ge(o,l)):(w=new ce(o,c),p=p.pipeThrough(w))),Ie(f,p,(async()=>{let e;a&&!d&&(e=w.signature),a&&!d||!u||(e=await _.getReader().read(),e=new h(e.value.buffer).getUint32(0)),f.signature=e}))}}class Le extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{zipCrypto:r,encrypted:a,password:s,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:f}=t;let _,w,p=Be(super.readable);if(a&&(r?p=p.pipeThrough(new pe(s,o)):(w=new le(s,l,d),p=p.pipeThrough(w))),u)if(void 0!==f&&!f||Ee&&!Ue)p=We(e,p,n);else try{p=p.pipeThrough(new S(ze))}catch(t){Ue=!1,p=We(e,p,n)}a&&!r||!l||([p,_]=p.tee(),_=_.pipeThrough(new W)),Ie(this,p,(async()=>{if(a&&!r&&!w.valid)throw new c(Te);if((!a||r)&&l){const e=await _.getReader().read();if(e!=new h(e.value.buffer).getUint32(0,!1))throw new c(Te)}}))}}function We(e,t,n){return t.pipeThrough(new Se(e,{chunkSize:n}))}function Be(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Ie(e,t,i){e.length=0,t=t.pipeThrough(new x({transform(t,n){t&&t.length&&(e.length+=t.length,n.enqueue(t))},flush:i})),n.defineProperty(e,"readable",{get:()=>t})}const He="inflate",Oe="data";class Me{constructor(e,t,n,i,r){const{codecType:a}=i;async function s(a){const s=new a(e,i,r);await t.pipeThrough(s).pipeTo(n,{preventClose:!0});const{length:o,signature:l}=s;return{length:o,signature:l}}a.startsWith("deflate")?this.run=()=>s(Ce):a.startsWith(He)&&(this.run=()=>s(Le))}}let Ne=!0;class qe{constructor(e,t,i,r){const{readable:a,writable:s}=t,{options:o,config:u,streamOptions:f,webWorker:h,scripts:_,codecConstructor:p}=i;n.assign(e,{busy:!0,codecConstructor:p,readable:a,writable:s,options:n.assign({},o),scripts:_,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,r(e)}});const{signal:g,onstart:b,onprogress:y,size:m,onend:k}=f;let v=0;const R={};return b&&(R.start=()=>Pe(b,m())),R.transform=async(e,t)=>{v+=e.length,y&&await Pe(y,v,m()),t.enqueue(e)},R.flush=()=>{a.size=()=>v,k&&Pe(k,v)},e.readable=a.pipeThrough(new x(R,{highWaterMark:1,size:()=>u.chunkSize}),{signal:g}),h?((e,{baseURL:t,chunkSize:i})=>{const r={type:"module"},{readable:a,writable:s}=e;if(n.assign(e,{reader:a.getReader(),writer:s.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Ne)try{e.worker=o({})}catch(t){Ne=!1,e.worker=o(r)}else e.worker=o(r);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:i,writer:r,resolveResult:a,rejectResult:s,onTaskFinished:o}=e,{type:l,data:f,messageId:h,result:_}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,p(n)}else{if("pull"==l){const{value:e,done:t}=await i.read();u({type:Oe,data:e,done:t,messageId:h})}l==Oe&&(await r.ready,await r.write(new d(f))),"close"==l&&p(null,_)}}catch(e){p(e)}function p(e,t){e?s(e):a(t),r.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:i}}),e.result}}}return e.interface;function o(n){let i,r;i=e.scripts[0],"function"==typeof i&&(i=i());try{r=new l(i,t)}catch(e){r=i}return new Worker(r,n)}function u(t){const{worker:n,writer:i,onTaskFinished:r}=e;try{let{data:e}=t;if(e)try{const{buffer:i,length:r}=e;r!=i.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw i.releaseLock(),r(),e}}})(e,u):((e,t)=>{const n=new Me(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:i}=e;return{async run(){try{return await n.run()}finally{i()}}}})(e,u)}}async function Pe(e,...t){try{await e(...t)}catch(e){}}let Ve=[];const Ke=[];let Ze=0;function Ge(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const je="HTTP error ",Xe="HTTP Range not supported",Ye="text/plain",Je="GET",Qe=65536;class $e{constructor(){this.size=0}init(){this.initialized=!0}}class et extends $e{get readable(){const e=this,{chunkSize:t=Qe}=e,n=new k({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s}=n,{chunkOffset:o}=this;i.enqueue(await e.readUint8Array(r+o,a.min(t,s()-o))),o+t>s()?i.close():this.chunkOffset+=t}});return n}}class tt extends $e{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(this,"writable",{get:()=>t})}}class nt extends tt{writeUint8Array(e){this.size+=e.length}}class it extends et{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}function rt(e){e.pendingBlob=new _([],{type:e.contentType}),e.arrayBuffers=[]}function at(e){e.pendingBlob=new _([e.pendingBlob,...e.arrayBuffers],{type:e.contentType}),e.arrayBuffers=[]}class st extends et{constructor(e,t){super();const i=this;i.url=e,i.preventHeadRequest=t.preventHeadRequest,i.useRangeHeader=t.useRangeHeader,i.forceRangeRequests=t.forceRangeRequests,i.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await lt(this,pt,ft)}readUint8Array(e,t){return ct(this,e,t,pt,ft)}}class ot extends et{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await lt(this,gt,ht)}readUint8Array(e,t){return ct(this,e,t,gt,ht)}}async function lt(e,t,n){if((e=>{const{baseURL:t}=U(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const i=await t(Je,e,dt(e));if(!e.forceRangeRequests&&"bytes"!=i.headers.get("Accept-Ranges"))throw new c(Xe);{let r;const a=i.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(r=Number(t))}}void 0===r?await wt(e,t,n):e.size=r}}else await wt(e,t,n)}async function ct(e,t,n,i,r){if(e.useRangeHeader||e.forceRangeRequests){const r=await i(Je,e,dt(e,t,n));if(206!=r.status)throw new c(Xe);return new d(await r.arrayBuffer())}return e.data||await r(e,e.options),new d(e.data.subarray(t,t+n))}function dt(e,t=0,i=1){return n.assign({},ut(e),{Range:"bytes="+t+"-"+(t+i-1)})}function ut(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ft(e){await _t(e,pt)}async function ht(e){await _t(e,gt)}async function _t(e,t){const n=await t(Je,e,ut(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function wt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,ut(e))).headers.get("Content-Length");i?e.size=Number(i):await n(e,e.options)}}async function pt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new c(Xe):new c(je+(a.statusText||a.status))}function gt(e,{url:t},i){return new w(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new o(e)})}else a(416==s.status?new c(Xe):new c(je+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail.error)),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class bt extends et{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new ot(e,t):new st(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const yt=4294967295,mt=33639248,xt=101075792,kt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function vt(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{let t="";for(let n=0;n<e.length;n++)t+=kt[e[n]];return t})(e):new g(t).decode(e)}const Rt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){Rt.forEach((t=>this[t]=e[t]))}}const Tt="File format is not recognized",zt="End of central directory not found",Dt="End of Zip64 central directory not found",At="End of Zip64 central directory locator not found",Et="Central directory header not found",Ut="Local file header not found",Ft="Zip64 extra field not found",Ct="File contains encrypted entry",Lt="Encryption method not supported",Wt="Compression method not supported",Bt="utf-8",It="cp437",Ht=["uncompressedSize","compressedSize","offset"];class Ot{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,n={}){const i=this,{reader:r,offset:a,extraFieldAES:s,compressionMethod:o,config:l,bitFlag:d,signature:u,rawLastModDate:f,compressedSize:h}=i,_=i.localDirectory={};let p=await Jt(r,a,30);const g=Yt(p);let b=Pt(i,n,"password");if(b=b&&b.length&&b,s&&99!=s.originalCompressionMethod)throw new c(Wt);if(0!=o&&8!=o)throw new c(Wt);if(67324752!=jt(g,0))throw new c(Ut);Mt(_,g,4),p=await Jt(r,a,30+_.filenameLength+_.extraFieldLength),_.rawExtraField=p.subarray(30+_.filenameLength),await Nt(i,_,g,4),t.lastAccessDate=_.lastAccessDate,t.creationDate=_.creationDate;const y=i.encrypted&&_.encrypted,m=y&&!s;if(y){if(!m&&void 0===s.strength)throw new c(Lt);if(!b)throw new c(Ct)}const x=a+30+_.filenameLength+_.extraFieldLength,k=()=>h,v=r.readable;v.offset=x,v.size=k;const{writable:R}=e,S=Pt(i,n,"signal");e.init&&!e.initialized&&await e.init();const{onstart:T,onprogress:z,onend:D}=n,A={options:{codecType:He,password:b,zipCrypto:m,encryptionStrength:s&&s.strength,signed:Pt(i,n,"checkSignature"),passwordVerification:m&&(d.dataDescriptor?f>>>8&255:u>>>24&255),signature:u,compressed:0!=o,encrypted:y,useWebWorkers:Pt(i,n,"useWebWorkers"),useCompressionStream:Pt(i,n,"useCompressionStream")},config:l,streamOptions:{signal:S,size:k,onstart:T,onprogress:z,onend:D},codecConstructor:l.Inflate};return await(async(e,t)=>{const{options:n,config:i}=t,r=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:s,codecType:o}=n,{workerScripts:l}=i;let c;if(t.webWorker=!r&&(a||void 0===a&&i.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===s?i.useCompressionStream:s,Ve.length<i.maxWorkers){const n={indexWorker:Ze};Ze++,Ve.push(n),c=new qe(n,e,t,d)}else{const n=Ve.find((e=>!e.busy));n?(Ge(n),c=new qe(n,e,t,d)):c=await new w((n=>Ke.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function d(e){if(Ke.length){const[{resolve:t,stream:n,workerOptions:i}]=Ke.splice(0,1);t(new qe(e,n,i,d))}else if(e.worker){const{terminateWorkerTimeout:t}=i;Ge(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ve=Ve.filter((t=>t!=e)),e.terminate()}),t))}else Ve=Ve.filter((t=>t!=e))}})({readable:v,writable:R},A),e.preventClose||await R.getWriter().close(),e.getData?e.getData():R}}function Mt(e,t,i){const r=e.rawBitFlag=Gt(t,i+2),a=1==(1&r),s=jt(t,i+6);n.assign(e,{encrypted:a,version:Gt(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Vt(s),filenameLength:Gt(t,i+22),extraFieldLength:Gt(t,i+24)})}async function Nt(e,t,i,r){const{rawExtraField:l}=t,u=t.extraField=new o,f=Yt(new d(l));let h=0;try{for(;h<l.length;){const e=Gt(f,h),t=Gt(f,h+2);u.set(e,{type:e,data:l.slice(h+4,h+4+t)}),h+=4+t}}catch(e){}const _=Gt(i,r+4);t.signature=jt(i,r+10),t.uncompressedSize=jt(i,r+18),t.compressedSize=jt(i,r+14);const w=u.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Yt(e.data);e.values=[];for(let t=0;t<a.floor(e.data.length/8);t++)e.values.push(Xt(n,0+8*t));const i=Ht.filter((e=>t[e]==yt));for(let t=0;t<i.length;t++)e[i[t]]=e.values[t];Ht.forEach((n=>{if(t[n]==yt){if(void 0===e[n])throw new c(Ft);t[n]=e[n]}}))})(w,t),t.extraFieldZip64=w);const p=u.get(28789);p&&(await qt(p,"filename","rawFilename",t,e),t.extraFieldUnicodePath=p);const g=u.get(25461);g&&(await qt(g,"comment","rawComment",t,e),t.extraFieldUnicodeComment=g);const b=u.get(39169);b?(((e,t,n)=>{const i=Yt(e.data);e.vendorVersion=Zt(i,0),e.vendorId=Zt(i,2);const r=Zt(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Gt(i,5)})(b,t,_),t.extraFieldAES=b):t.compressionMethod=_;const y=u.get(10);y&&(((e,t)=>{const i=Yt(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=Gt(i,a),n=Gt(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Yt(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:Kt(a),lastAccessDate:Kt(s),creationDate:Kt(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(y,t),t.extraFieldNTFS=y);const m=u.get(21589);m&&(((e,t)=>{const n=Yt(e.data),i=Zt(n,0),r=[],a=[];1==(1&i)&&(r.push("lastModDate"),a.push("rawLastModDate")),2==(2&i)&&(r.push("lastAccessDate"),a.push("rawLastAccessDate")),4==(4&i)&&(r.push("creationDate"),a.push("rawCreationDate"));let o=1;r.forEach(((i,r)=>{if(e.data.length>=o+4){const l=jt(n,o);t[i]=e[i]=new s(1e3*l);const c=a[r];e[c]=l}o+=4}))})(m,t),t.extraFieldExtendedTimestamp=m)}async function qt(e,t,n,i,r){const a=Yt(e.data);e.version=Zt(a,0),e.signature=jt(a,1);const s=new L;s.append(r[n]);const o=Yt(new d(4));o.setUint32(0,s.get(),!0),e[t]=await vt(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==jt(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Pt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e){const t=(4294901760&e)>>16,n=65535&e;try{return new s(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Kt(e){return new s(Number(e/r(1e4)-r(116444736e5)))}function Zt(e,t){return e.getUint8(t)}function Gt(e,t){return e.getUint16(t,!0)}function jt(e,t){return e.getUint32(t,!0)}function Xt(e,t){return Number(e.getBigUint64(t,!0))}function Yt(e){return new h(e.buffer)}function Jt(e,t,n){return e.readUint8Array(t,n)}F({Inflate:z}),e.BlobReader=it,e.BlobWriter=class extends nt{constructor(e){super();const t=this;t.contentType=e,t.arrayBuffersMaxlength=8,rt(t)}writeUint8Array(e){super.writeUint8Array(e);const t=this;t.arrayBuffers.length==t.arrayBuffersMaxlength&&at(t),t.arrayBuffers.push(e.buffer)}getData(){const e=this;return e.blob||(e.arrayBuffers.length&&at(e),e.blob=e.pendingBlob,rt(e)),e.blob}},e.Data64URIReader=class extends et{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),i=4*a.floor(e/3),r=this.dataStart,s=atob(this.dataURI.substring(i+r,4*a.ceil((e+t)/3)+r)),o=e-3*a.floor(i/4);for(let e=o;o+t>e;e++)n[e-o]=s.charCodeAt(e);return n}},e.Data64URIWriter=class extends nt{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){super.writeUint8Array(e);const t=this;let n=0,r=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=m(r):t.pending=r}getData(){return this.data+m(this.pending)}},e.ERR_BAD_FORMAT=Tt,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Et,e.ERR_ENCRYPTED=Ct,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=At,e.ERR_EOCDR_NOT_FOUND=zt,e.ERR_EOCDR_ZIP64_NOT_FOUND=Dt,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ft,e.ERR_HTTP_RANGE=Xe,e.ERR_INVALID_PASSWORD=N,e.ERR_INVALID_SIGNATURE=Te,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Ut,e.ERR_UNSUPPORTED_COMPRESSION=Wt,e.ERR_UNSUPPORTED_ENCRYPTION=Lt,e.HttpRangeReader=class extends bt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=bt,e.Reader=et,e.TextReader=class extends et{constructor(e){super(),this.blobReader=new it(new _([e],{type:Ye}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends nt{constructor(e){super(),this.encoding=e,this.blob=new _([],{type:Ye})}writeUint8Array(e){super.writeUint8Array(e),this.blob=new _([this.blob,e.buffer],{type:Ye})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new w(((n,i)=>{t.onload=e=>n(e.target.result),t.onerror=()=>i(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends et{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends nt{constructor(){super(),this.array=new d}writeUint8Array(e){super.writeUint8Array(e);const t=this,n=t.array;t.array=new d(n.length+e.length),t.array.set(n),t.array.set(e,n.length)}getData(){return this.array}},e.Writer=nt,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:e,options:t,config:U()})}async*getEntriesGenerator(e={}){const t=this,{reader:i,config:r}=t;if(i.initialized||await i.init(),i.chunkSize=(e=>a.max(e.chunkSize,64))(r),22>i.size)throw new c(Tt);const s=await(async(e,t,n)=>{const i=new d(4);return Yt(i).setUint32(0,101010256,!0),await r(22)||await r(a.min(1048582,n));async function r(t){const r=n-t,a=await Jt(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!s)throw new c(zt);const o=Yt(s);let l=jt(o,12),u=jt(o,16);const f=s.offset,h=Gt(o,20),_=f+22+h;let p=Gt(o,8),g=0,b=0;if(u==yt||l==yt||65535==p){const e=Yt(await Jt(i,s.offset-20,20));if(117853008!=jt(e,0))throw new c(Dt);u=Xt(e,8);let t=await Jt(i,u,56),n=Yt(t);const r=s.offset-20-56;if(jt(n,0)!=xt&&u!=r){const e=u;u=r,g=u-e,t=await Jt(i,u,56),n=Yt(t)}if(jt(n,0)!=xt)throw new c(At);p=Xt(n,32),l=Xt(n,40),u-=l}if(0>u||u>=i.size)throw new c(Tt);let y=0,m=await Jt(i,u,l),x=Yt(m);if(l){const e=s.offset-l;if(jt(x,y)!=mt&&u!=e){const t=u;u=e,g=u-t,m=await Jt(i,u,l),x=Yt(m)}}if(0>u||u>=i.size)throw new c(Tt);for(let s=0;p>s;s++){const o=new Ot(i,r,t.options);if(jt(x,y)!=mt)throw new c(Et);Mt(o,x,y+6);const l=!!o.bitFlag.languageEncodingFlag,d=y+46,u=d+o.filenameLength,f=u+o.extraFieldLength,h=Gt(x,y+4),_=0==(0&h);n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:Gt(x,y+32),directory:_&&16==(16&Zt(x,y+38)),offset:jt(x,y+42)+g,internalFileAttribute:jt(x,y+34),externalFileAttribute:jt(x,y+38),rawFilename:m.subarray(d,u),filenameUTF8:l,commentUTF8:l,rawExtraField:m.subarray(u,f)}),b=a.max(o.offset,b);const k=f+o.commentLength;o.rawComment=m.subarray(f,k);const v=Pt(t,e,"filenameEncoding"),R=Pt(t,e,"commentEncoding"),[S,T]=await w.all([vt(o.rawFilename,o.filenameUTF8?Bt:v||It),vt(o.rawComment,o.commentUTF8?Bt:R||It)]);o.filename=S,o.comment=T,!o.directory&&o.filename.endsWith("/")&&(o.directory=!0),await Nt(o,o,x,y+6);const z=new St(o);if(z.getData=(e,t)=>o.getData(e,z,t),y=k,e.onprogress)try{await e.onprogress(s+1,p,new St(o))}catch(e){}yield z}const k=Pt(t,e,"extractPrependedData"),v=Pt(t,e,"extractAppendedData");return k&&(t.prependedData=b>0?await Jt(i,0,b):new d),t.comment=h?await Jt(i,f+22,h):new d,v&&(t.appendedData=_<i.size?await Jt(i,_,i.size-_):new d),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=F,e.getMimeType=()=>"application/octet-stream",e.terminateWorkers=()=>{Ve.forEach((e=>{Ge(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|