芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/front-web/build/libs/zip/dist/zip-no-worker-deflate.min.js
((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:d,Uint16Array:u,Uint32Array:h,DataView:f,Blob:p,Promise:w,TextEncoder:g,TextDecoder:_,FileReader:y,document:m,crypto:b,btoa:x}=globalThis,k=-2;function v(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 z=[0,1,2,3].concat(...v([[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,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=d,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,d,u,h,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>a&&(d=a,f++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,i>l||(u=s[l-i]),h=n[2*l],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*l+1]+u)));if(0!==f){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,f-=2}while(f>0);for(d=a;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),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 S(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(...v([[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?z[e]:z[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 E=v([[144,8],[112,9],[24,7],[8,8]]);S.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,E[t]])));const T=v([[30,5]]);function D(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}S.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,T[t]]))),S.static_l_desc=new S(S.static_ltree,A.extra_lbits,257,286,15),S.static_d_desc=new S(S.static_dtree,A.extra_dbits,0,30,15),S.static_bl_desc=new S(null,A.extra_blbits,0,19,7);const F=[new D(0,0,0,0,0),new D(4,4,8,4,1),new D(4,5,16,8,1),new D(4,6,32,32,1),new D(4,4,16,16,2),new D(8,16,32,32,2),new D(8,16,128,128,2),new D(8,32,128,256,2),new D(32,128,258,1024,2),new D(32,258,258,4096,2)],W=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],B=113,U=666,C=262;function I(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function M(){const e=this;let t,n,r,s,a,o,l,c,h,f,p,w,g,_,y,m,b,x,v,R,z,E,T,D,M,H,L,N,V,q,P,K,O;const Z=new A,G=new A,j=new A;let X,Y,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)P[2*t]=0;for(t=0;30>t;t++)K[2*t]=0;for(t=0;19>t;t++)O[2*t]=0;P[512]=1,e.opt_len=e.static_len=0,Y=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
i?O[2*n]+=i:0!==n?(n!=r&&O[2*n]++,O[32]++):i>10?O[36]++:O[34]++,i=0,r=n,0===s?(a=138,o=3):n==s?(a=6,o=3):(a=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}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<
>>16-ee,ee+=r-16):($|=e<
=n;n++)if(r=i,i=e[2*(n+1)+1],++a>=o||r!=i){if(l>a)do{ae(r,O)}while(0!=--a);else 0!==r?(r!=s&&(ae(r,O),a--),ae(16,O),ie(a-3,2)):a>10?(ae(18,O),ie(a-11,7)):(ae(17,O),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(t,n){let r,s,a;if(e.dist_buf[Y]=t,e.lc_buf[Y]=255&n,Y++,0===t?P[2*n]++:(J++,t--,P[2*(A._length_code[n]+256+1)]++,K[2*A.d_code(t)]++),0==(8191&Y)&&L>2){for(r=8*Y,s=z-b,a=0;30>a;a++)r+=K[2*a]*(5+A.extra_dbits[a]);if(r>>>=3,J
o);ae(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function he(t,n,r){ie(0+(r?1:0),3),((t,n)=>{ue(),Q=8,se(n),se(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function fe(n){((t,n,r)=>{let s,i,a=0;L>0?(Z.build_tree(e),G.build_tree(e),a=(()=>{let t;for(ne(P,Z.max_code),ne(K,G.max_code),j.build_tree(e),t=18;t>=3&&0===O[2*A.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(ie(2+(r?1:0),3),de(S.static_ltree,S.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(O[2*A.bl_order[r]+1],3);oe(P,e-1),oe(K,t-1)})(Z.max_code+1,G.max_code+1,a+1),de(P,K)):he(t,n,r),te(),r&&ue()})(0>b?-1:b,z-b,n),b=z,t.flush_pending()}function pe(){let e,n,r,s;do{if(s=h-T-z,0===s&&0===z&&0===T)s=a;else if(-1==s)s--;else if(z>=a+a-C){c.set(c.subarray(a,a+a),0),E-=a,z-=a,b-=a,e=g,r=e;do{n=65535&p[--r],p[r]=a>n?0:n-a}while(0!=--e);e=a,r=e;do{n=65535&f[--r],f[r]=a>n?0:n-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,z+T,s),T+=e,3>T||(w=255&c[z],w=(w<
T&&0!==t.avail_in)}function we(e){let t,n,r=M,s=z,i=D;const o=z>a-C?z-(a-C):0;let d=q;const u=l,h=z+258;let p=c[s+i-1],w=c[s+i];V>D||(r>>=2),d>T&&(d=T);do{if(t=e,c[t+i]==w&&c[t+i-1]==p&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&h>s);if(n=258-(h-s),s=h-258,n>i){if(E=e,i=n,n>=d)break;p=c[s+i-1],w=c[s+i]}}}while((e=65535&f[e&u])>o&&0!=--r);return i>T?T:i}e.depth=[],e.bl_count=[],e.heap=[],P=[],K=[],O=[],e.pqdownheap=(t,n)=>{const r=e.heap,s=r[n];let i=n<<1;for(;i<=e.heap_len&&(i
(E||(E=8),W||(W=8),U||(U=0),t.msg=null,-1==v&&(v=6),1>W||W>9||8!=E||9>A||A>15||0>v||v>9||0>U||U>2?k:(t.dstate=e,o=A,a=1<
(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=B,s=0,Z.dyn_tree=P,Z.stat_desc=S.static_l_desc,G.dyn_tree=K,G.stat_desc=S.static_d_desc,j.dyn_tree=O,j.stat_desc=S.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{h=2*a,p[g-1]=0;for(let e=0;g-1>e;e++)p[e]=0;H=F[L].max_lazy,V=F[L].good_length,q=F[L].nice_length,M=F[L].max_chain,z=0,b=0,T=0,x=D=2,R=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=B&&n!=U?k:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,p=null,f=null,c=null,e.dstate=null,n==B?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?k:(F[L].func!=F[t].func&&0!==e.total_in&&(r=e.deflate(1)),L!=t&&(L=t,H=F[L].max_lazy,V=F[L].good_length,q=F[L].nice_length,M=F[L].max_chain),N=n,r)},e.deflateSetDictionary=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return k;if(3>i)return 0;for(i>a-C&&(i=a-C,o=r-i),c.set(t.subarray(o,o+i),0),z=i,b=i,w=255&c[0],w=(w<
=s;s++)w=(w<
{let u,h,_,A,I;if(d>4||0>d)return k;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==U&&4!=d)return i.msg=W[4],k;if(0===i.avail_out)return i.msg=W[7],-5;var M;if(t=i,A=s,s=d,42==n&&(h=8+(o-8<<4)<<8,_=(L-1&255)>>1,_>3&&(_=3),h|=_<<6,0!==z&&(h|=32),h+=31-h%31,n=B,re((M=h)>>8&255),re(255&M)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&A>=d&&4!=d)return t.msg=W[7],-5;if(n==U&&0!==t.avail_in)return i.msg=W[7],-5;if(0!==t.avail_in||0!==T||0!=d&&n!=U){switch(I=-1,F[L].func){case 0:I=(e=>{let n,s=65535;for(s>r-5&&(s=r-5);;){if(1>=T){if(pe(),0===T&&0==e)return 0;if(0===T)break}if(z+=T,T=0,n=b+s,(0===z||z>=n)&&(T=z-n,z=n,fe(!1),0===t.avail_out))return 0;if(z-b>=a-C&&(fe(!1),0===t.avail_out))return 0}return fe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:I=(e=>{let n,r=0;for(;;){if(C>T){if(pe(),C>T&&0==e)return 0;if(0===T)break}if(3>T||(w=(w<
a-C||2!=N&&(x=we(r)),3>x)n=ce(0,255&c[z]),T--,z++;else if(n=ce(z-E,x-3),T-=x,x>H||3>T)z+=x,x=0,w=255&c[z],w=(w<
{let n,r,s=0;for(;;){if(C>T){if(pe(),C>T&&0==e)return 0;if(0===T)break}if(3>T||(w=(w<
D&&a-C>=(z-s&65535)&&(2!=N&&(x=we(s)),5>=x&&(1==N||3==x&&z-E>4096)&&(x=2)),3>D||x>D)if(0!==R){if(n=ce(0,255&c[z-1]),n&&fe(!1),z++,T--,0===t.avail_out)return 0}else R=1,z++,T--;else{r=z+T-3,n=ce(z-1-v,D-3),T-=D-1,D-=2;do{++z>r||(w=(w<
1+Q+10-ee&&(ie(2,3),ae(256,S.static_ltree),le()),Q=7;else if(he(0,0,!1),3==d)for(u=0;g>u;u++)p[u]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function H(){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}H.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new M,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):k},deflateEnd:function(){const e=this;if(!e.dstate)return k;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams:function(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):k},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):k},read_buf:function(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:function(){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))}};const L={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},N=n.assign({},L);function V(e){if(void 0!==e.baseURL&&(N.baseURL=e.baseURL),void 0!==e.chunkSize&&(N.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(N.maxWorkers=e.maxWorkers),void 0!==e.terminateWorkerTimeout&&(N.terminateWorkerTimeout=e.terminateWorkerTimeout),void 0!==e.useWebWorkers&&(N.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(N.Deflate=e.Deflate),void 0!==e.Inflate&&(N.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!t.isArray(e.workerScripts.deflate))throw new c("workerScripts.deflate must be an array");N.workerScripts||(N.workerScripts={}),N.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!t.isArray(e.workerScripts.inflate))throw new c("workerScripts.inflate must be an array");N.workerScripts||(N.workerScripts={}),N.workerScripts.inflate=e.workerScripts.inflate}}}const q=[];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;q[e]=t}class P{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^q[255&(t^e[n])];this.crc=t}get(){return~this.crc}}function K(e){if(void 0===g){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n
0&&t&&(e[n-1]=O.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
>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=O.getPartial(s);return r.push(O.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},Z={bytes:{fromBits(e){const t=O.bitLength(e)/8,n=new d(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
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:function(){const e=this;let t=e._buffer;const n=e._h;t=O.concat(t,[O.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<
>>32-e,_block:function(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],d=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)+d+s[e]+n._key[i.floor(e/20)]|0;d=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]+d|0}};const j={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
new X.hmacSha1(Z.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,d;const u=new ArrayBuffer(s);let h=new f(u),p=0;const w=O;for(t=Z.bytes.toBits(t),d=1;(s||1)>p;d++){for(i=a=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;l
p&&o
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)}}},Y="Invalid pasword",J=16,Q={name:"PBKDF2"},$=n.assign({hash:{name:"HMAC"}},Q),ee=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Q),te=["deriveBits"],ne=[8,12,16],re=[16,24,32],se=10,ie=[0,0,0,0],ae=void 0!==b,oe=ae&&void 0!==b.subtle,le=Z.bytes,ce=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 d=a=0;!n[d];d^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[d]=i,r[i]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,h=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][d]=h=h<<24^h>>>8,t[n][i]=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],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],d=i[3],u=i[4];let h,f,p,w=e[0]^n[0],g=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[w>>>24]^o[g>>16&255]^l[_>>8&255]^d[255&y]^n[m],f=a[g>>>24]^o[_>>16&255]^l[y>>8&255]^d[255&w]^n[m+1],p=a[_>>>24]^o[y>>16&255]^l[w>>8&255]^d[255&g]^n[m+2],y=a[y>>>24]^o[w>>16&255]^l[g>>8&255]^d[255&_]^n[m+3],m+=4,w=h,g=f,_=p;for(let e=0;4>e;e++)s[t?3&-e:e]=u[w>>>24]<<24^u[g>>16&255]<<16^u[_>>8&255]<<8^u[255&y]^n[m++],h=w,w=g,g=_,_=y,y=h;return s}},de=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=O.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 O.clamp(t,s)}},ue=X.hmacSha1;class he{constructor(e,t,r){n.assign(this,{password:e,signed:t,strength:r-1,pendingInput:new d(0)})}async append(e){const n=this;if(n.password){const r=_e(e,0,ne[n.strength]+2);await(async(e,t,n)=>{await we(e,n,_e(t,0,ne[e.strength]));const r=_e(t,ne[e.strength]),s=e.keys.passwordVerification;if(s[0]!=r[0]||s[1]!=r[1])throw new c(Y)})(n,r,n.password),n.password=null,n.aesCtrGladman=new de(new ce(n.keys.key),t.from(ie)),n.hmac=new ue(n.keys.authentication),e=_e(e,ne[n.strength]+2)}return pe(n,e,new d(e.length-se-(e.length-se)%J),0,se,!0)}flush(){const e=this,t=e.pendingInput,n=_e(t,0,t.length-se),r=_e(t,t.length-se);let s=new d(0);if(n.length){const t=le.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);s=le.fromBits(r)}let i=!0;if(e.signed){const t=_e(le.fromBits(e.hmac.digest()),0,se);for(let e=0;se>e;e++)t[e]!=r[e]&&(i=!1)}return{valid:i,data:s}}}class fe{constructor(e,t){n.assign(this,{password:e,strength:t-1,pendingInput:new d(0)})}async append(e){const n=this;let r=new d(0);n.password&&(r=await(async(e,t)=>{const n=(r=new d(ne[e.strength]),ae&&"function"==typeof b.getRandomValues?b.getRandomValues(r):j.getRandomValues(r));var r;return await we(e,t,n),ge(n,e.keys.passwordVerification)})(n,n.password),n.password=null,n.aesCtrGladman=new de(new ce(n.keys.key),t.from(ie)),n.hmac=new ue(n.keys.authentication));const s=new d(r.length+e.length-e.length%J);return s.set(r,0),pe(n,e,s,r.length,0)}flush(){const e=this;let t=new d(0);if(e.pendingInput.length){const n=e.aesCtrGladman.update(le.toBits(e.pendingInput));e.hmac.update(n),t=le.fromBits(n)}const n=_e(le.fromBits(e.hmac.digest()),0,se);return{data:ge(t,n),signature:n}}}function pe(e,t,n,r,s,i){const a=t.length-s;let o;for(e.pendingInput.length&&(t=ge(e.pendingInput,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,a-a%J)),o=0;a-J>=o;o+=J){const s=le.toBits(_e(t,o,o+J));i&&e.hmac.update(s);const a=e.aesCtrGladman.update(s);i||e.hmac.update(a),n.set(le.fromBits(a),o+r)}return e.pendingInput=_e(t,o),n}async function we(e,t,r){const s=K(t),i=await(async(e,t,n,r,s)=>ae&&oe&&"function"==typeof b.subtle.importKey?b.subtle.importKey("raw",t,n,!1,s):X.importKey(t))(0,s,$,0,te),a=await(async(e,t,n)=>ae&&oe&&"function"==typeof b.subtle.deriveBits?await b.subtle.deriveBits(e,t,n):X.pbkdf2(t,e.salt,ee.iterations,n))(n.assign({salt:r},ee),i,8*(2*re[e.strength]+2)),o=new d(a);e.keys={key:le.toBits(_e(o,0,re[e.strength])),authentication:le.toBits(_e(o,re[e.strength],2*re[e.strength])),passwordVerification:_e(o,2*re[e.strength])}}function ge(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 _e(e,t,n){return e.subarray(t,n)}class ye{constructor(e,t){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)}append(e){const t=this;if(t.password){const n=be(t,e.subarray(0,12));if(t.password=null,n[11]!=t.passwordVerification)throw new c(Y);e=e.subarray(12)}return be(t,e)}flush(){return{valid:!0,data:new d(0)}}}class me{constructor(e,t){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)}append(e){const t=this;let n,r;if(t.password){t.password=null;const s=b.getRandomValues(new d(12));s[11]=t.passwordVerification,n=new d(e.length+s.length),n.set(xe(t,s),0),r=12}else n=new d(e.length),r=0;return n.set(xe(t,e),r),n}flush(){return{data:new d(0)}}}function be(e,t){const n=new d(t.length);for(let r=0;r
>>24]),e.keys[2]=~e.crcKey2.get()}function Re(e){const t=2|e.keys[2];return ze(i.imul(t,1^t)>>>8)}function ze(e){return 255&e}function Ae(e){return 4294967295&e}const Se="deflate",Ee="Invalid signature";class Te{constructor(e,{signature:t,password:r,signed:s,compressed:i,zipCrypto:a,passwordVerification:o,encryptionStrength:l},{chunkSize:c}){const d=!!r;n.assign(this,{signature:t,encrypted:d,signed:s,compressed:i,inflate:i&&new e({chunkSize:c}),crc32:s&&new P,zipCrypto:a,decrypt:d&&a?new ye(r,o):new he(r,s,l)})}async append(e){const t=this;return t.encrypted&&e.length&&(e=await t.decrypt.append(e)),t.compressed&&e.length&&(e=await t.inflate.append(e)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),e}async flush(){const e=this;let t,n=new d(0);if(e.encrypted){const t=e.decrypt.flush();if(!t.valid)throw new c(Ee);n=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const n=new f(new d(4).buffer);if(t=e.crc32.get(),n.setUint32(0,t),e.signature!=n.getUint32(0,!1))throw new c(Ee)}return e.compressed&&(n=await e.inflate.append(n)||new d(0),await e.inflate.flush()),{data:n,signature:t}}}class De{constructor(e,{encrypted:t,signed:r,compressed:s,level:i,zipCrypto:a,password:o,passwordVerification:l,encryptionStrength:c},{chunkSize:d}){n.assign(this,{encrypted:t,signed:r,compressed:s,deflate:s&&new e({level:i||5,chunkSize:d}),crc32:r&&new P,zipCrypto:a,encrypt:t&&a?new me(o,l):new fe(o,c)})}async append(e){const t=this;let n=e;return t.compressed&&e.length&&(n=await t.deflate.append(e)),t.encrypted&&n.length&&(n=await t.encrypt.append(n)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),n}async flush(){const e=this;let t,n=new d(0);if(e.compressed&&(n=await e.deflate.flush()||new d(0)),e.encrypted){n=await e.encrypt.append(n);const r=e.encrypt.flush();t=r.signature;const s=new d(n.length+r.data.length);s.set(n,0),s.set(r.data,n.length),n=s}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:n,signature:t}}}const Fe="init",We="append",Be="flush";let Ue=!0;var Ce=(e,t,r,s,i,a,o)=>(n.assign(e,{busy:!0,codecConstructor:t,options:n.assign({},r),scripts:o,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),a?((e,t)=>{let n;const r={type:"module"};if(!e.interface){if(Ue)try{e.worker=s({},t.baseURL)}catch(n){Ue=!1,e.worker=s(r,t.baseURL)}else e.worker=s(r,t.baseURL);e.worker.addEventListener("message",(t=>{const r=t.data;if(n){const t=r.error,s=r.type;if(t){const r=new c(t.message);r.stack=t.stack,n.reject(r),n=null,e.onTaskFinished()}else if(s==Fe||s==Be||s==We){const t=r.data;s==Be?(n.resolve({data:new d(t),signature:r.signature}),n=null,e.onTaskFinished()):n.resolve(t&&new d(t))}}}),!1),e.interface={append:e=>i({type:We,data:e}),flush:()=>i({type:Be}),abort(){e.onTaskFinished()}}}return e.interface;function s(t,n){let r,s;r=e.scripts[0],"function"==typeof r&&(r=r());try{s=new l(r,n)}catch(e){s=r}return new Worker(s,t)}async function i(r){if(!n){const n=e.options,r=e.scripts.slice(1);await a({scripts:r,type:Fe,options:n,config:{chunkSize:t.chunkSize}})}return a(r)}function a(t){const r=e.worker,s=new w(((e,t)=>n={resolve:e,reject:t}));try{if(t.data)try{t.data=t.data.buffer,r.postMessage(t,[t.data])}catch(e){r.postMessage(t)}else r.postMessage(t)}catch(t){n.reject(t),n=null,e.onTaskFinished()}return s}})(e,s):((e,t)=>{const n=((e,t,n)=>t.codecType.startsWith(Se)?new De(e,t,n):t.codecType.startsWith("inflate")?new Te(e,t,n):void 0)(e.codecConstructor,e.options,t);return{async append(t){try{return await n.append(t)}catch(t){throw e.onTaskFinished(),t}},async flush(){try{return await n.flush()}finally{e.onTaskFinished()}},abort(){e.onTaskFinished()}}})(e,s));let Ie=[],Me=[];function He(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}const Le="HTTP error ",Ne="HTTP Range not supported",Ve="text/plain",qe="GET";class Pe{constructor(){this.size=0}init(){this.initialized=!0}}class Ke extends Pe{}class Oe extends Pe{writeUint8Array(e){this.size+=e.length}}class Ze extends Ke{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){if(this.blob.arrayBuffer)return new d(await this.blob.slice(e,e+t).arrayBuffer());{const n=new y;return new w(((r,s)=>{n.onload=e=>r(new d(e.target.result)),n.onerror=()=>s(n.error),n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}}class Ge extends Oe{constructor(e){super(),this.contentType=e,this.arrayBuffersMaxlength=8,je(this)}async writeUint8Array(e){super.writeUint8Array(e),this.arrayBuffers.length==this.arrayBuffersMaxlength&&Xe(this),this.arrayBuffers.push(e.buffer)}getData(){return this.blob||(this.arrayBuffers.length&&Xe(this),this.blob=this.pendingBlob,je(this)),this.blob}}function je(e){e.pendingBlob=new p([],{type:e.contentType}),e.arrayBuffers=[]}function Xe(e){e.pendingBlob=new p([e.pendingBlob,...e.arrayBuffers],{type:e.contentType}),e.arrayBuffers=[]}class Ye extends Ke{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=n.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){super.init(),await Qe(this,at,nt)}async readUint8Array(e,t){return $e(this,e,t,at,nt)}}class Je extends Ke{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=t}async init(){super.init(),await Qe(this,ot,rt)}async readUint8Array(e,t){return $e(this,e,t,ot,rt)}}async function Qe(e,t,n){if((e=>{if(void 0!==m){const t=m.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const r=await t(qe,e,et(e));if(!e.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new c(Ne);{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 it(e,t,n):e.size=s}}else await it(e,t,n)}async function $e(e,t,n,r,s){if(e.useRangeHeader||e.forceRangeRequests){const s=await r(qe,e,et(e,t,n));if(206!=s.status)throw new c(Ne);return new d(await s.arrayBuffer())}return e.data||await s(e,e.options),new d(e.data.subarray(t,t+n))}function et(e,t=0,r=1){return n.assign({},tt(e),{Range:"bytes="+t+"-"+(t+r-1)})}function tt(e){let t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function nt(e){await st(e,at)}async function rt(e){await st(e,ot)}async function st(e,t){const n=await t(qe,e,tt(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function it(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,tt(e))).headers.get("Content-Length");r?e.size=Number(r):await n(e,e.options)}}async function at(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 new c(Le+(i.statusText||i.status))}function ot(e,{url:t},r){return new w(((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(new c(Le+(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 lt extends Ke{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new Je(e,t):this.reader=new Ye(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const ct=4294967295,dt=65535,ut=new a(2107,11,31),ht=new a(1980,0,1);function ft(e,t){if(e&&e.aborted)throw t.abort(),new c("Abort error")}async function pt(e,t){return t.length&&await e.writeUint8Array(t),t.length}const wt=["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 gt{constructor(e){wt.forEach((t=>this[t]=e[t]))}}const _t="File already exists",yt="Zip file comment exceeds 64KB",mt="File entry comment exceeds 64KB",bt="File entry name exceeds 64KB",xt="Version exceeds 65535",kt="The strength must equal 1, 2, or 3",vt="Extra field type exceeds 65535",Rt="Extra field data exceeds 64KB",zt="Zip64 is not supported",At=new d([7,0,2,0,65,69,3,0,0]);let St=0;function Et(e,t,n){if(e.arrayBuffer)return t||n?e.slice(t,n).arrayBuffer():e.arrayBuffer();{const r=new y;return new w(((s,i)=>{r.onload=e=>s(e.target.result),r.onerror=()=>i(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)}))}}function Tt(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function Dt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Ft(e,t,n){e.setUint8(t,n)}function Wt(e,t,n){e.setUint16(t,n,!0)}function Bt(e,t,n){e.setUint32(t,n,!0)}function Ut(e,t,n){e.setBigUint64(t,n,!0)}function Ct(e,t,n){e.set(t,n)}function It(e){return new f(e.buffer)}V({Deflate:function(e){const t=new H,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new d(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,u=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 d(s)):h.push(s.slice(0,t.next_out_index))),u+=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 d(u),h.forEach((e=>{a.set(e,l),l+=e.length}))):a=h[0]||new d(0),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 d(a),o.forEach((e=>{r.set(e,i),i+=e.length})),r}}}),e.BlobReader=Ze,e.BlobWriter=Ge,e.Data64URIReader=class extends Ke{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=i.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new d(t),r=4*i.floor(e/3),s=atob(this.dataURI.substring(r+this.dataStart,4*i.ceil((e+t)/3)+this.dataStart)),a=e-3*i.floor(r/4);for(let e=a;a+t>e;e++)n[e-a]=s.charCodeAt(e);return n}},e.Data64URIWriter=class extends Oe{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}async writeUint8Array(e){super.writeUint8Array(e);let t=0,n=this.pending;const s=this.pending.length;for(this.pending="",t=0;t<3*i.floor((s+e.length)/3)-s;t++)n+=r.fromCharCode(e[t]);for(;t
2?this.data+=x(n):this.pending=n}getData(){return this.data+x(this.pending)}},e.ERR_DUPLICATED_NAME=_t,e.ERR_HTTP_RANGE=Ne,e.ERR_INVALID_COMMENT=yt,e.ERR_INVALID_ENCRYPTION_STRENGTH=kt,e.ERR_INVALID_ENTRY_COMMENT=mt,e.ERR_INVALID_ENTRY_NAME=bt,e.ERR_INVALID_EXTRAFIELD_DATA=Rt,e.ERR_INVALID_EXTRAFIELD_TYPE=vt,e.ERR_INVALID_VERSION=xt,e.ERR_UNSUPPORTED_FORMAT=zt,e.HttpRangeReader=class extends lt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=lt,e.Reader=Ke,e.TextReader=class extends Ke{constructor(e){super(),this.blobReader=new Ze(new p([e],{type:Ve}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends Oe{constructor(e){super(),this.encoding=e,this.blob=new p([],{type:Ve})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new p([this.blob,e.buffer],{type:Ve})}getData(){if(this.blob.text)return this.blob.text();{const e=new y;return new w(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=()=>n(e.error),e.readAsText(this.blob,this.encoding)}))}}},e.Uint8ArrayReader=class extends Ke{constructor(e){super(),this.array=e,this.size=e.length}async readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Oe{constructor(){super(),this.array=new d(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new d(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.WritableStreamWriter=class extends Oe{constructor(e){super(),this.writableStream=e,this.writer=e.getWriter()}async writeUint8Array(e){return await this.writer.ready,this.writer.write(e)}async getData(){return await this.writer.ready,await this.writer.close(),this.writableStream}},e.Writer=Oe,e.ZipWriter=class{constructor(e,t={}){n.assign(this,{writer:e,options:t,config:N,files:new o,offset:e.size,pendingCompressedSize:0,pendingEntries:[]})}async add(e="",r,o={}){const l=this;if(St>=l.config.maxWorkers)return new w(((t,n)=>l.pendingEntries.push({name:e,reader:r,options:o,resolve:t,reject:n})));St++;try{return await(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(_t);const p=K(r);if(p.length>dt)throw new c(bt);const g=l.comment||"",_=K(g);if(_.length>dt)throw new c(mt);const y=e.options.version||l.version||0;if(y>dt)throw new c(xt);const m=e.options.versionMadeBy||l.versionMadeBy||20;if(m>dt)throw new c(xt);const b=Dt(e,l,"lastModDate")||new a,x=Dt(e,l,"lastAccessDate"),k=Dt(e,l,"creationDate"),v=Dt(e,l,"password"),R=Dt(e,l,"encryptionStrength")||3,z=Dt(e,l,"zipCrypto");if(void 0!==v&&void 0!==R&&(1>R||R>3))throw new c(kt);let A=new d(0);const S=l.extraField;if(S){let e=0,t=0;S.forEach((t=>e+=4+t.length)),A=new d(e),S.forEach(((e,n)=>{if(n>dt)throw new c(vt);if(e.length>dt)throw new c(Rt);Ct(A,new u([n]),t),Ct(A,new u([e.length]),t+2),Ct(A,e,t+4),t+=4+e.length}))}let E=Dt(e,l,"extendedTimestamp");void 0===E&&(E=!0);let T=0,D=Dt(e,l,"keepOrder");void 0===D&&(D=!0);let F=0,W=Dt(e,l,"msDosCompatible");void 0===W&&(W=!0);const B=Dt(e,l,"internalFileAttribute")||0,U=Dt(e,l,"externalFileAttribute")||0;o&&(o.initialized||await o.init(),F=o.size,T=(e=>e+5*(i.floor(e/16383)+1))(F));let C=l.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=ct||F>=ct||T>=ct){if(!1===l.zip64||!1===e.options.zip64||!D)throw new c(zt);C=!0}e.pendingCompressedSize+=T,await w.resolve();const I=Dt(e,l,"level"),M=Dt(e,l,"useWebWorkers"),H=Dt(e,l,"bufferedWrite");let L=Dt(e,l,"dataDescriptor"),N=Dt(e,l,"dataDescriptorSignature");const V=Dt(e,l,"signal");void 0===L&&(L=!0),L&&void 0===N&&(N=!0);const q=await(async(e,r,a,o)=>{const l=e.files,u=e.writer,p=t.from(l.values()).pop();let g,_,y,m={};l.set(r,m);try{let b,x,k;if(o.keepOrder&&(b=p&&p.lock),m.lock=k=new w((e=>y=e)),o.bufferedWrite||e.lockWrite||!o.dataDescriptor?(x=new Ge,x.init(),g=!0):(e.lockWrite=new w((e=>_=e)),u.initialized||await u.init(),x=u),m=await(async(e,t,r,a)=>{const{rawFilename:o,lastAccessDate:l,creationDate:c,password:u,level:f,zip64:p,zipCrypto:g,dataDescriptor:_,dataDescriptorSignature:y,directory:m,version:b,versionMadeBy:x,rawComment:k,rawExtraField:v,useWebWorkers:R,onprogress:z,signal:A,encryptionStrength:S,extendedTimestamp:E,msDosCompatible:T,internalFileAttribute:D,externalFileAttribute:F}=a,W=!(!u||!u.length),B=0!==f&&!m;let U,C,I;if(W&&!g){U=new d(At.length+2);const e=It(U);Wt(e,0,39169),Ct(U,At,2),Ft(e,8,S)}else U=new d(0);if(E){I=new d(9+(l?4:0)+(c?4:0));const e=It(I);Wt(e,0,21589),Wt(e,2,I.length-4),Ft(e,4,1+(l?2:0)+(c?4:0)),Bt(e,5,i.floor(a.lastModDate.getTime()/1e3)),l&&Bt(e,9,i.floor(l.getTime()/1e3)),c&&Bt(e,13,i.floor(c.getTime()/1e3));try{C=new d(36);const e=It(C),t=Tt(a.lastModDate);Wt(e,0,10),Wt(e,2,32),Wt(e,8,1),Wt(e,10,24),Ut(e,12,t),Ut(e,20,Tt(l)||t),Ut(e,28,Tt(c)||t)}catch(e){C=new d(0)}}else C=I=new d(0);const M={version:b||20,versionMadeBy:x,zip64:p,directory:!!m,filenameUTF8:!0,rawFilename:o,commentUTF8:!0,rawComment:k,rawExtraFieldZip64:new d(p?28:0),rawExtraFieldExtendedTimestamp:I,rawExtraFieldNTFS:C,rawExtraFieldAES:U,rawExtraField:v,extendedTimestamp:E,msDosCompatible:T,internalFileAttribute:D,externalFileAttribute:F};let H=M.uncompressedSize=0,L=2048;_&&(L|=8);let N=0;B&&(N=8),p&&(M.version=M.version>45?M.version:45),W&&(L|=1,g||(M.version=M.version>51?M.version:51,N=99,B&&(M.rawExtraFieldAES[9]=8))),M.compressionMethod=N;const V=M.headerArray=new d(26),q=It(V);Wt(q,0,M.version),Wt(q,2,L),Wt(q,4,N);const P=new h(1),K=It(P);let O;O=a.lastModDate
ut?ut:a.lastModDate,Wt(K,0,(O.getHours()<<6|O.getMinutes())<<5|O.getSeconds()/2),Wt(K,2,(O.getFullYear()-1980<<4|O.getMonth()+1)<<5|O.getDate());const Z=P[0];Bt(q,6,Z),Wt(q,22,o.length);const G=U.length+I.length+C.length+M.rawExtraField.length;Wt(q,24,G);const j=new d(30+o.length+G);let X;Bt(It(j),0,67324752),Ct(j,V,4),Ct(j,o,30),Ct(j,U,30+o.length),Ct(j,I,30+o.length+U.length),Ct(j,C,30+o.length+U.length+I.length),Ct(j,M.rawExtraField,30+o.length+U.length+I.length+C.length);let Y=0;if(e){H=M.uncompressedSize=e.size;const n=await((e,t,n)=>{const r=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),s=r&&n.workerScripts?n.workerScripts[t.codecType]:[];if(Ie.length
!e.busy));return a?(He(a),Ce(a,e,t,n,i,r,s)):new w((n=>Me.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:s})))}function i(e){if(Me.length){const[{resolve:t,codecConstructor:r,options:s,webWorker:a,scripts:o}]=Me.splice(0,1);t(Ce(e,r,s,n,i,a,o))}else e.worker?(He(e),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(e.terminateTimeout=setTimeout((()=>{Ie=Ie.filter((t=>t!=e)),e.terminate()}),n.terminateWorkerTimeout))):Ie=Ie.filter((t=>t!=e))}})(r.Deflate,{codecType:Se,level:f,password:u,encryptionStrength:S,zipCrypto:W&&g,passwordVerification:W&&g&&Z>>8&255,signed:!0,compressed:B,encrypted:W,useWebWorkers:R},r);await t.writeUint8Array(j),M.dataWritten=!0,X=await(async(e,t,n,r,s,a,o)=>{const l=i.max(a.chunkSize,64);return async function r(a=0,c=0){const d=o.signal;if(s>a){ft(d,e);const u=await t.readUint8Array(a+0,i.min(l,s-a)),h=u.length;ft(d,e);const f=await e.append(u);if(ft(d,e),c+=await pt(n,f),o.onprogress)try{o.onprogress(a+h,s)}catch(e){}return r(a+l,c)}{const t=await e.flush();return c+=await pt(n,t.data),{signature:t.signature,length:c}}}()})(n,e,t,0,H,r,{onprogress:z,signal:A}),Y=X.length}else await t.writeUint8Array(j),M.dataWritten=!0;let J,Q=new d(0),$=0;if(_&&(Q=new d(p?y?24:20:y?16:12),J=It(Q),y&&($=4,Bt(J,0,134695760))),e){const e=X.signature;if(W&&!g||void 0===e||(Bt(q,10,e),M.signature=e,_&&Bt(J,$,e)),p){const e=It(M.rawExtraFieldZip64);Wt(e,0,1),Wt(e,2,24),Bt(q,14,ct),Ut(e,12,s(Y)),Bt(q,18,ct),Ut(e,4,s(H)),_&&(Ut(J,$+4,s(Y)),Ut(J,$+12,s(H)))}else Bt(q,14,Y),Bt(q,18,H),_&&(Bt(J,$+4,Y),Bt(J,$+8,H))}_&&await t.writeUint8Array(Q);const ee=j.length+Y+Q.length;return n.assign(M,{compressedSize:Y,lastModDate:O,rawLastModDate:Z,creationDate:c,lastAccessDate:l,encrypted:W,length:ee}),M})(a,x,e.config,o),m.lock=k,l.set(r,m),m.filename=r,g){let n=0;const r=x.getData();let s;await w.all([e.lockWrite,b]);do{s=t.from(l.values()).find((e=>e.writingBufferedData)),s&&await s.lock}while(s&&s.lock);if(m.writingBufferedData=!0,!o.dataDescriptor){const e=26,t=await Et(r,0,e),s=new f(t);m.encrypted&&!o.zipCrypto||Bt(s,14,m.signature),m.zip64?(Bt(s,18,ct),Bt(s,22,ct)):(Bt(s,18,m.compressedSize),Bt(s,22,m.uncompressedSize)),await u.writeUint8Array(new d(t)),n=e}await(async(e,t,n=0)=>{const r=536870912;await async function s(){if(n
=ct)throw new c(zt);return e.offset+=m.length,m}catch(t){throw(g&&m.writingBufferedData||!g&&m.dataWritten)&&(t.corruptedEntry=e.hasCorruptedEntries=!0,m.uncompressedSize&&(e.offset+=m.uncompressedSize)),l.delete(r),t}finally{y(),_&&_()}})(e,r,o,n.assign({},l,{rawFilename:p,rawComment:_,version:y,versionMadeBy:m,lastModDate:b,lastAccessDate:x,creationDate:k,rawExtraField:A,zip64:C,password:v,level:I,useWebWorkers:M,encryptionStrength:R,extendedTimestamp:E,zipCrypto:z,bufferedWrite:H,keepOrder:D,dataDescriptor:L,dataDescriptorSignature:N,signal:V,msDosCompatible:W,internalFileAttribute:B,externalFileAttribute:U}));return T&&(e.pendingCompressedSize-=T),n.assign(q,{name:r,comment:g,extraField:S}),new gt(q)})(l,e,r,o)}finally{St--;const e=l.pendingEntries.shift();e&&l.add(e.name,e.reader,e.options).then(e.resolve).catch(e.reject)}}async close(e=new d(0),n={}){return await(async(e,n,r)=>{const a=e.writer,o=e.files;let l=0,u=0,h=e.offset,f=o.size;for(const[,e]of o)u+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let p=r.zip64||e.options.zip64||!1;if(h>=ct||u>=ct||f>=dt){if(!1===r.zip64||!1===e.options.zip64)throw new c(zt);p=!0}const w=new d(u+(p?98:22)),g=It(w);if(n&&n.length){if(n.length>dt)throw new c(yt);Wt(g,l+20,n.length)}for(const[e,n]of t.from(o.values()).entries()){const{rawFilename:t,rawExtraFieldZip64:s,rawExtraFieldAES:a,rawExtraField:c,rawComment:u,versionMadeBy:h,headerArray:f,directory:p,zip64:_,msDosCompatible:y,internalFileAttribute:m,externalFileAttribute:b}=n;let x,k;if(n.extendedTimestamp){k=n.rawExtraFieldNTFS,x=new d(9);const e=It(x);Wt(e,0,21589),Wt(e,2,x.length-4),Ft(e,4,1),Bt(e,5,i.floor(n.lastModDate.getTime()/1e3))}else k=x=new d(0);const v=s.length+a.length+x.length+k.length+c.length;if(Bt(g,l,33639248),Wt(g,l+4,h),Ct(w,f,l+6),Wt(g,l+30,v),Wt(g,l+32,u.length),Bt(g,l+34,m),b?Bt(g,l+38,b):p&&y&&Ft(g,l+38,16),Bt(g,l+42,_?ct:n.offset),Ct(w,t,l+46),Ct(w,s,l+46+t.length),Ct(w,a,l+46+t.length+s.length),Ct(w,x,l+46+t.length+s.length+a.length),Ct(w,k,l+46+t.length+s.length+a.length+x.length),Ct(w,c,l+46+t.length+s.length+a.length+x.length+k.length),Ct(w,u,l+46+t.length+v),l+=46+t.length+v+u.length,r.onprogress)try{r.onprogress(e+1,o.size,new gt(n))}catch(e){}}p&&(Bt(g,l,101075792),Ut(g,l+4,s(44)),Wt(g,l+12,45),Wt(g,l+14,45),Ut(g,l+24,s(f)),Ut(g,l+32,s(f)),Ut(g,l+40,s(u)),Ut(g,l+48,s(h)),Bt(g,l+56,117853008),Ut(g,l+64,s(h)+s(u)),Bt(g,l+72,1),f=dt,h=ct,u=ct,l+=76),Bt(g,l,101010256),Wt(g,l+8,f),Wt(g,l+10,f),Bt(g,l+12,u),Bt(g,l+16,h),await a.writeUint8Array(w),n&&n.length&&await a.writeUint8Array(n)})(this,e,n),this.writer.getData()}},e.configure=V,e.getMimeType=()=>"application/octet-stream",e.terminateWorkers=()=>{Ie.forEach((e=>{He(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));