Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zip.js/zip.js

Package Overview
Dependencies
Maintainers
1
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zip.js/zip.js - npm Package Compare versions

Comparing version 2.2.29 to 2.2.30

2

dist/zip-no-worker-deflate.min.js

@@ -1,1 +0,1 @@

!function(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 t=256,n=256,r=-2,i=-5;function s(e){return e.map((([e,t])=>new Array(e).fill(t,0,e))).flat()}const a=[0,1,2,3].concat(...s([[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 o(){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=function(n){const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a<s;a++)0!==r[2*a]?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):r[2*a+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=l,a=Math.floor(n.heap_len/2);a>=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(t){const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,c,l,d,u,h,f=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<573;o++)c=t.heap[o],d=n[2*n[2*c+1]+1]+1,d>a&&(d=a,f++),n[2*c+1]=d,c>e.max_code||(t.bl_count[d]++,u=0,c>=s&&(u=i[c-s]),h=n[2*c],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*c+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(c=t.bl_count[d];0!==c;)l=t.heap[--o],l>e.max_code||(n[2*l+1]!=d&&(t.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(e,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))}(r,e.max_code,n.bl_count)}}function c(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[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]])),o.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],o.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],o.d_code=function(e){return e<256?a[e]:a[256+(e>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const d=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],h=113,f=666,p=258,w=262;function g(e,t,n,r){const i=e[2*t],s=e[2*n];return i<s||i==s&&r[t]<=r[n]}function _(){const e=this;let s,a,l,_,y,b,m,x,A,k,U,v,E,R,z,S,I,D,F,B,T,W,M,C,H,O,P,j,L,V,q,N,K;const G=new o,Z=new o,X=new o;let Y,J,Q,$,ee,te,ne,re;function ie(){let t;for(t=0;t<286;t++)q[2*t]=0;for(t=0;t<30;t++)N[2*t]=0;for(t=0;t<19;t++)K[2*t]=0;q[512]=1,e.opt_len=e.static_len=0,Q=ee=0}function se(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let c=0;c<=t;c++)n=i,i=e[2*(c+1)+1],++s<a&&n==i||(s<o?K[2*n]+=s:0!==n?(n!=r&&K[2*n]++,K[32]++):s<=10?K[34]++:K[36]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function ae(t){e.pending_buf[e.pending++]=t}function oe(e){ae(255&e),ae(e>>>8&255)}function ce(e,t){let n;const r=t;re>16-r?(n=e,ne|=n<<re&65535,oe(ne),ne=n>>>16-re,re+=r-16):(ne|=e<<re&65535,re+=r)}function le(e,t){const n=2*e;ce(65535&t[n],65535&t[n+1])}function de(e,t){let n,r,i=-1,s=e[1],a=0,o=7,c=4;for(0===s&&(o=138,c=3),n=0;n<=t;n++)if(r=s,s=e[2*(n+1)+1],!(++a<o&&r==s)){if(a<c)do{le(r,K)}while(0!=--a);else 0!==r?(r!=i&&(le(r,K),a--),le(16,K),ce(a-3,2)):a<=10?(le(17,K),ce(a-3,3)):(le(18,K),ce(a-11,7));a=0,i=r,0===s?(o=138,c=3):r==s?(o=6,c=3):(o=7,c=4)}}function ue(){16==re?(oe(ne),ne=0,re=0):re>=8&&(ae(255&ne),ne>>>=8,re-=8)}function he(n,r){let i,s,a;if(e.pending_buf[$+2*Q]=n>>>8&255,e.pending_buf[$+2*Q+1]=255&n,e.pending_buf[Y+Q]=255&r,Q++,0===n?q[2*r]++:(ee++,n--,q[2*(o._length_code[r]+t+1)]++,N[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=T-I,a=0;a<30;a++)i+=N[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,ee<Math.floor(Q/2)&&i<Math.floor(s/2))return!0}return Q==J-1}function fe(r,i){let s,a,c,l,d=0;if(0!==Q)do{s=e.pending_buf[$+2*d]<<8&65280|255&e.pending_buf[$+2*d+1],a=255&e.pending_buf[Y+d],d++,0===s?le(a,r):(c=o._length_code[a],le(c+t+1,r),l=o.extra_lbits[c],0!==l&&(a-=o.base_length[c],ce(a,l)),s--,c=o.d_code(s),le(c,i),l=o.extra_dbits[c],0!==l&&(s-=o.base_dist[c],ce(s,l)))}while(d<Q);le(n,r),te=r[513]}function pe(){re>8?oe(ne):re>0&&ae(255&ne),ne=0,re=0}function we(t,n,r){ce(0+(r?1:0),3),function(t,n,r){pe(),te=8,r&&(oe(n),oe(~n)),e.pending_buf.set(x.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function ge(t,n,r){let i,s,a=0;P>0?(G.build_tree(e),Z.build_tree(e),a=function(){let t;for(se(q,G.max_code),se(N,Z.max_code),X.build_tree(e),t=18;t>=3&&0===K[2*o.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=t?we(t,n,r):s==i?(ce(2+(r?1:0),3),fe(c.static_ltree,c.static_dtree)):(ce(4+(r?1:0),3),function(e,t,n){let r;for(ce(e-257,5),ce(t-1,5),ce(n-4,4),r=0;r<n;r++)ce(K[2*o.bl_order[r]+1],3);de(q,e-1),de(N,t-1)}(G.max_code+1,Z.max_code+1,a+1),fe(q,N)),ie(),r&&pe()}function _e(e){ge(I>=0?I:-1,T-I,e),I=T,s.flush_pending()}function ye(){let e,t,n,r;do{if(r=A-M-T,0===r&&0===T&&0===M)r=y;else if(-1==r)r--;else if(T>=y+y-w){x.set(x.subarray(y,y+y),0),W-=y,T-=y,I-=y,e=E,n=e;do{t=65535&U[--n],U[n]=t>=y?t-y:0}while(0!=--e);e=y,n=e;do{t=65535&k[--n],k[n]=t>=y?t-y:0}while(0!=--e);r+=y}if(0===s.avail_in)return;e=s.read_buf(x,T+M,r),M+=e,M>=3&&(v=255&x[T],v=(v<<S^255&x[T+1])&z)}while(M<w&&0!==s.avail_in)}function be(e){let t,n,r=H,i=T,s=C;const a=T>y-w?T-(y-w):0;let o=V;const c=m,l=T+p;let d=x[i+s-1],u=x[i+s];C>=L&&(r>>=2),o>M&&(o=M);do{if(t=e,x[t+s]==u&&x[t+s-1]==d&&x[t]==x[i]&&x[++t]==x[i+1]){i+=2,t++;do{}while(x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&i<l);if(n=p-(l-i),i=l-p,n>s){if(W=e,s=n,n>=o)break;d=x[i+s-1],u=x[i+s]}}}while((e=65535&k[e&c])>a&&0!=--r);return s<=M?s:M}function me(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,a=h,_=0,G.dyn_tree=q,G.stat_desc=c.static_l_desc,Z.dyn_tree=N,Z.stat_desc=c.static_d_desc,X.dyn_tree=K,X.stat_desc=c.static_bl_desc,ne=0,re=0,te=8,ie(),function(){A=2*y,U[E-1]=0;for(let e=0;e<E-1;e++)U[e]=0;O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain,T=0,I=0,M=0,D=C=2,B=0,v=0}(),0}e.depth=[],e.bl_count=[],e.heap=[],q=[],N=[],K=[],e.pqdownheap=function(t,n){const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s<e.heap_len&&g(t,r[s+1],r[s],e.depth)&&s++,!g(t,i,r[s],e.depth));)r[n]=r[s],n=s,s<<=1;r[n]=i},e.deflateInit=function(t,n,i,s,a,o){return s||(s=8),a||(a=8),o||(o=0),t.msg=null,-1==n&&(n=6),a<1||a>9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(t.dstate=e,b=i,y=1<<b,m=y-1,R=a+7,E=1<<R,z=E-1,S=Math.floor((R+3-1)/3),x=new Uint8Array(2*y),k=[],U=[],J=1<<a+6,e.pending_buf=new Uint8Array(4*J),l=4*J,$=Math.floor(J/2),Y=3*J,P=n,j=o,me(t))},e.deflateEnd=function(){return 42!=a&&a!=h&&a!=f?r:(e.pending_buf=null,U=null,k=null,x=null,e.dstate=null,a==h?-3:0)},e.deflateParams=function(e,t,n){let i=0;return-1==t&&(t=6),t<0||t>9||n<0||n>2?r:(d[P].func!=d[t].func&&0!==e.total_in&&(i=e.deflate(1)),P!=t&&(P=t,O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain),j=n,i)},e.deflateSetDictionary=function(e,t,n){let i,s=n,o=0;if(!t||42!=a)return r;if(s<3)return 0;for(s>y-w&&(s=y-w,o=n-s),x.set(t.subarray(o,o+s),0),T=s,I=s,v=255&x[0],v=(v<<S^255&x[1])&z,i=0;i<=s-3;i++)v=(v<<S^255&x[i+2])&z,k[i&m]=U[v],U[v]=i;return 0},e.deflate=function(t,o){let p,g,A,R,H;if(o>4||o<0)return r;if(!t.next_out||!t.next_in&&0!==t.avail_in||a==f&&4!=o)return t.msg=u[4],r;if(0===t.avail_out)return t.msg=u[7],i;var L;if(s=t,R=_,_=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==T&&(g|=32),g+=31-g%31,a=h,ae((L=g)>>8&255),ae(255&L)),0!==e.pending){if(s.flush_pending(),0===s.avail_out)return _=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=u[7],i;if(a==f&&0!==s.avail_in)return t.msg=u[7],i;if(0!==s.avail_in||0!==M||0!=o&&a!=f){switch(H=-1,d[P].func){case 0:H=function(e){let t,n=65535;for(n>l-5&&(n=l-5);;){if(M<=1){if(ye(),0===M&&0==e)return 0;if(0===M)break}if(T+=M,M=0,t=I+n,(0===T||T>=t)&&(M=T-t,T=t,_e(!1),0===s.avail_out))return 0;if(T-I>=y-w&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 1:H=function(e){let t,n=0;for(;;){if(M<w){if(ye(),M<w&&0==e)return 0;if(0===M)break}if(M>=3&&(v=(v<<S^255&x[T+2])&z,n=65535&U[v],k[T&m]=U[v],U[v]=T),0!==n&&(T-n&65535)<=y-w&&2!=j&&(D=be(n)),D>=3)if(t=he(T-W,D-3),M-=D,D<=O&&M>=3){D--;do{T++,v=(v<<S^255&x[T+2])&z,n=65535&U[v],k[T&m]=U[v],U[v]=T}while(0!=--D);T++}else T+=D,D=0,v=255&x[T],v=(v<<S^255&x[T+1])&z;else t=he(0,255&x[T]),M--,T++;if(t&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 2:H=function(e){let t,n,r=0;for(;;){if(M<w){if(ye(),M<w&&0==e)return 0;if(0===M)break}if(M>=3&&(v=(v<<S^255&x[T+2])&z,r=65535&U[v],k[T&m]=U[v],U[v]=T),C=D,F=W,D=2,0!==r&&C<O&&(T-r&65535)<=y-w&&(2!=j&&(D=be(r)),D<=5&&(1==j||3==D&&T-W>4096)&&(D=2)),C>=3&&D<=C){n=T+M-3,t=he(T-1-F,C-3),M-=C-1,C-=2;do{++T<=n&&(v=(v<<S^255&x[T+2])&z,r=65535&U[v],k[T&m]=U[v],U[v]=T)}while(0!=--C);if(B=0,D=2,T++,t&&(_e(!1),0===s.avail_out))return 0}else if(0!==B){if(t=he(0,255&x[T-1]),t&&_e(!1),T++,M--,0===s.avail_out)return 0}else B=1,T++,M--}return 0!==B&&(t=he(0,255&x[T-1]),B=0),_e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o)}if(2!=H&&3!=H||(a=f),0==H||2==H)return 0===s.avail_out&&(_=-1),0;if(1==H){if(1==o)ce(2,3),le(n,c.static_ltree),ue(),1+te+10-re<9&&(ce(2,3),le(n,c.static_ltree),ue()),te=7;else if(we(0,0,!1),3==o)for(p=0;p<E;p++)U[p]=0;if(s.flush_pending(),0===s.avail_out)return _=-1,0}}return 4!=o?0:1}}function y(){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}y.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new _,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):r},deflateEnd:function(){const e=this;if(!e.dstate)return r;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):r},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):r},read_buf:function(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},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 b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(e){if(void 0!==e.chunkSize&&(m.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(m.maxWorkers=e.maxWorkers),void 0!==e.useWebWorkers&&(m.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(m.Deflate=e.Deflate),void 0!==e.Inflate&&(m.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=e.workerScripts.inflate}}}const A="HTTP error ",k="HTTP Range not supported",U="text/plain",v="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",S="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class D extends I{}class F extends I{writeUint8Array(e){this.size+=e.length}}class B extends D{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){const n=new FileReader;return new Promise(((r,i)=>{n.onload=e=>r(new Uint8Array(e.target.result)),n.onerror=()=>i(n.error),n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}class T extends F{constructor(e){super(),this.offset=0,this.contentType=e,this.blob=new Blob([],{type:e})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class W extends D{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest){const e=await C(R,this.url,this.options);if(this.size=Number(e.headers.get(v)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(E)!=S)throw new Error(k);void 0===this.size&&await M(this,this.options)}else await M(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await C(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+e+"-"+(e+t-1)}));if(206!=n.status)throw new Error(k);return new Uint8Array(await n.arrayBuffer())}return this.data||await M(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function M(e,t){const n=await C(z,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function C(e,t,n,r){r=Object.assign({},n.headers,r);const i=await fetch(t,Object.assign({},n,{method:e,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends D{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest)return new Promise(((e,t)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(v)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(E)==S?e():t(new Error(k)):void 0===this.size?O(this,this.url).then((()=>e())).catch(t):e()}),t)));await O(this,this.url)}async readUint8Array(e,t){if(!this.useRangeHeader)return this.data||await O(this,this.url),new Uint8Array(this.data.subarray(e,e+t));if(206!=(await new Promise(((n,r)=>P(z,this.url,(e=>n(new Uint8Array(e.response))),r,[["Range","bytes="+e+"-"+(e+t-1)]])))).status)throw new Error(k)}}function O(e,t){return new Promise(((n,r)=>P(z,t,(t=>{e.data=new Uint8Array(t.response),e.size||(e.size=e.data.length),n()}),r)))}function P(e,t,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(e,t),i.forEach((e=>s.setRequestHeader(e[0],e[1]))),s.responseType="arraybuffer",s.send(),s}class j extends D{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new H(e,t):this.reader=new W(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)}}function L(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}const V=4294967295,q=65535,N=67324752,K=134695760,G=new Date(2107,11,31),Z=new Date(1980,0,1),X=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;X[e]=t}class Y{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)t=t>>>8^X[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const J={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=J.getPartial(n);return 32===r?e.concat(t):J._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)+J.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=J.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=>Math.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 i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=J.getPartial(i);return r.push(J.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Q={bytes:{fromBits(e){const t=J.bitLength(e)/8,n=new Uint8Array(t);let r;for(let i=0;i<t;i++)0==(3&i)&&(r=e[i/4]),n[i]=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(J.partial(8*(3&n),r)),t}}},$={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};$.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;"string"==typeof e&&(e=Q.utf8String.toBits(e));const n=t._buffer=J.concat(t._buffer,e),r=t._length,i=t._length=r+J.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(s.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=J.concat(t,[J.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.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:function(e,t,n,r){return e<=19?t&n|~t&r:e<=39?t^n^r:e<=59?t&n|t&r|n&r:e<=79?t^n^r:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],s=n[1],a=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const n=t._S(5,i)+t._f(e,s,a,o)+c+r[e]+t._key[Math.floor(e/20)]|0;c=o,o=a,a=t._S(30,s),s=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}};const ee={aes: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],i=e.length;let s,a,o,c=1;if(4!==i&&6!==i&&8!==i)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=s<=4||e<4?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],i=[],s=[];let a,o,c,l;for(let e=0;e<256;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,r[s]=d,l=i[c=i[o=i[d]]];let u=16843009*l^65537*c^257*o^16843008*d,h=257*i[s]^16843008*s;for(let n=0;n<4;n++)e[n][d]=h=h<<24^h>>>8,t[n][s]=u=u<<24^u>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],c=s[2],l=s[3],d=s[4];let u,h,f,p=e[0]^n[0],w=e[t?3:1]^n[1],g=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;e<r;e++)u=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&_]^n[y],h=a[w>>>24]^o[g>>16&255]^c[_>>8&255]^l[255&p]^n[y+1],f=a[g>>>24]^o[_>>16&255]^c[p>>8&255]^l[255&w]^n[y+2],_=a[_>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[y+3],y+=4,p=u,w=h,g=f;for(let e=0;e<4;e++)i[t?3&-e:e]=d[p>>>24]<<24^d[w>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^n[y++],u=p,p=w,w=g,g=_,_=u;return i}}},te={ctrGladman: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 i=J.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return J.clamp(t,i)}}},ne={hmacSha1:class{constructor(e){const t=this,n=t._hash=$.sha1,r=[[],[]],i=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>i&&(e=n.hash(e));for(let t=0;t<i;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}}},re="Invalid pasword",ie=16,se={name:"PBKDF2"},ae=Object.assign({hash:{name:"HMAC"}},se),oe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},se),ce=["deriveBits"],le=[8,12,16],de=[16,24,32],ue=10,he=[0,0,0,0],fe=crypto.subtle,pe=Q.bytes,we=ee.aes,ge=te.ctrGladman,_e=ne.hmacSha1;class ye{constructor(e,t,n){Object.assign(this,{password:e,signed:t,strength:n-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;if(t.password){const n=ke(e,0,le[t.strength]+2);await async function(e,t,n){await xe(e,n,ke(t,0,le[e.strength]));const r=ke(t,le[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(re)}(t,n,t.password),t.password=null,t.aesCtrGladman=new ge(new we(t.keys.key),Array.from(he)),t.hmac=new _e(t.keys.authentication),e=ke(e,le[t.strength]+2)}return me(t,e,new Uint8Array(e.length-ue-(e.length-ue)%ie),0,ue,!0)}async flush(){const e=this,t=e.pendingInput,n=ke(t,0,t.length-ue),r=ke(t,t.length-ue);let i=new Uint8Array(0);if(n.length){const t=pe.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);i=pe.fromBits(r)}let s=!0;if(e.signed){const t=ke(pe.fromBits(e.hmac.digest()),0,ue);for(let e=0;e<ue;e++)t[e]!=r[e]&&(s=!1)}return{valid:s,data:i}}}class be{constructor(e,t){Object.assign(this,{password:e,strength:t-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;let n=new Uint8Array(0);t.password&&(n=await async function(e,t){const n=crypto.getRandomValues(new Uint8Array(le[e.strength]));return await xe(e,t,n),Ae(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new ge(new we(t.keys.key),Array.from(he)),t.hmac=new _e(t.keys.authentication));const r=new Uint8Array(n.length+e.length-e.length%ie);return r.set(n,0),me(t,e,r,n.length,0)}async flush(){const e=this;let t=new Uint8Array(0);if(e.pendingInput.length){const n=e.aesCtrGladman.update(pe.toBits(e.pendingInput));e.hmac.update(n),t=pe.fromBits(n)}const n=ke(pe.fromBits(e.hmac.digest()),0,ue);return{data:Ae(t,n),signature:n}}}function me(e,t,n,r,i,s){const a=t.length-i;let o;for(e.pendingInput.length&&(t=Ae(e.pendingInput,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,a-a%ie)),o=0;o<=a-ie;o+=ie){const i=pe.toBits(ke(t,o,o+ie));s&&e.hmac.update(i);const a=e.aesCtrGladman.update(i);s||e.hmac.update(a),n.set(pe.fromBits(a),o+r)}return e.pendingInput=ke(t,o),n}async function xe(e,t,n){const r=(new TextEncoder).encode(t),i=await fe.importKey("raw",r,ae,!1,ce),s=await fe.deriveBits(Object.assign({salt:n},oe),i,8*(2*de[e.strength]+2)),a=new Uint8Array(s);e.keys={key:pe.toBits(ke(a,0,de[e.strength])),authentication:pe.toBits(ke(a,de[e.strength],2*de[e.strength])),passwordVerification:ke(a,2*de[e.strength])}}function Ae(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ke(e,t,n){return e.subarray(t,n)}const Ue=12;class ve{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Se(this,e)}async append(e){const t=this;if(t.password){const n=Re(t,e.subarray(0,Ue));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(re);e=e.subarray(Ue)}return Re(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ee{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Se(this,e)}async append(e){const t=this;let n,r;if(t.password){t.password=null;const i=crypto.getRandomValues(new Uint8Array(Ue));i[11]=t.passwordVerification,n=new Uint8Array(e.length+i.length),n.set(ze(t,i),0),r=Ue}else n=new Uint8Array(e.length),r=0;return n.set(ze(t,e),r),n}async flush(){return{data:new Uint8Array(0)}}}function Re(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=De(e)^t[r],Ie(e,n[r]);return n}function ze(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=De(e)^t[r],Ie(e,t[r]);return n}function Se(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new Y(e.keys[0]),e.crcKey2=new Y(e.keys[2]);for(let n=0;n<t.length;n++)Ie(e,t.charCodeAt(n))}function Ie(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Be(e.keys[1]+Fe(e.keys[0])),e.keys[1]=Be(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function De(e){const t=2|e.keys[2];return Fe(Math.imul(t,1^t)>>>8)}function Fe(e){return 255&e}function Be(e){return 4294967295&e}const Te="deflate",We="Invalid signature";class Me{constructor(e,{signature:t,password:n,signed:r,compressed:i,zipCrypto:s,passwordVerification:a,encryptionStrength:o},{chunkSize:c}){const l=Boolean(n);Object.assign(this,{signature:t,encrypted:l,signed:r,compressed:i,inflate:i&&new e({chunkSize:c}),crc32:r&&new Y,zipCrypto:s,decrypt:l&&s?new ve(n,a):new ye(n,r,o)})}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 Uint8Array(0);if(e.encrypted){const t=await e.decrypt.flush();if(!t.valid)throw new Error(We);n=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const n=new DataView(new Uint8Array(4).buffer);if(t=e.crc32.get(),n.setUint32(0,t),e.cipher!=n.getUint32(0,!1))throw new Error(We)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class Ce{constructor(e,{encrypted:t,signed:n,compressed:r,level:i,zipCrypto:s,password:a,passwordVerification:o,encryptionStrength:c},{chunkSize:l}){Object.assign(this,{encrypted:t,signed:n,compressed:r,deflate:r&&new e({level:i||5,chunkSize:l}),crc32:n&&new Y,zipCrypto:s,encrypt:t&&s?new Ee(a,o):new be(a,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 Uint8Array(0);if(e.compressed&&(n=await e.deflate.flush()||new Uint8Array(0)),e.encrypted){n=await e.encrypt.append(n);const r=await e.encrypt.flush();t=r.signature;const i=new Uint8Array(n.length+r.data.length);i.set(n,0),i.set(r.data,n.length),n=i}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:n,signature:t}}}const He="init",Oe="append",Pe="flush",je="message";var Le=(e,t,n,r,i,s,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,webWorker:s,onTaskFinished(){e.busy=!1;i(e)&&e.worker&&e.worker.terminate()}}),s?function(e,t){let n;e.interface||(e.worker=new Worker(new URL(e.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),e.worker.addEventListener(je,s,!1),e.interface={append:e=>r({type:Oe,data:e}),flush:()=>r({type:Pe})});return e.interface;async function r(r){if(!n){const n=e.options,r=e.scripts.slice(1);await i({scripts:r,type:He,options:n,config:{chunkSize:t.chunkSize}})}return i(r)}function i(t){const r=e.worker,i=new Promise(((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 i}function s(t){const r=t.data;if(n){const t=r.error,i=r.type;if(t){const r=new Error(t.message);r.stack=t.stack,n.reject(r),n=null,e.onTaskFinished()}else if(i==He||i==Pe||i==Oe){const t=r.data;i==Pe?(n.resolve({data:new Uint8Array(t),signature:r.signature}),n=null,e.onTaskFinished()):n.resolve(t&&new Uint8Array(t))}}}}(e,r):function(e,t){const n=function(e,t,n){return t.codecType.startsWith(Te)?new Ce(e,t,n):t.codecType.startsWith("inflate")?new Me(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()}}}}(e,r));let Ve=[],qe=[];function Ne(e){if(e&&e.aborted)throw new Error("Abort error")}async function Ke(e,t){return t.length&&await e.writeUint8Array(t),t.length}const Ge=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod"];class Ze{constructor(e){Ge.forEach((t=>this[t]=e[t]))}}const Xe="File already exists",Ye="Zip file comment exceeds 64KB",Je="File entry comment exceeds 64KB",Qe="File entry name exceeds 64KB",$e="Version exceeds 65535",et="The modification date must be between 1/1/1980 and 12/31/2107",tt="The strength must equal 1, 2, or 3",nt="Extra field type exceeds 65535",rt="Extra field data exceeds 64KB",it=new Uint8Array([7,0,2,0,65,69,3,0,0]);function st(e,t,n){const r=new FileReader;return new Promise(((i,s)=>{r.onload=e=>i(e.target.result),r.onerror=()=>s(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)}))}function at(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function ot(e,t,n){e.setUint8(t,n)}function ct(e,t,n){e.setUint16(t,n,!0)}function lt(e,t,n){e.setUint32(t,n,!0)}function dt(e,t,n){e.setBigUint64(t,n,!0)}function ut(e,t,n){e.set(t,n)}function ht(e){return new DataView(e.buffer)}x({Deflate:function(e){const t=new y,n=e&&e.chunkSize?Math.floor(1.05*e.chunkSize):65536,r=new Uint8Array(n);let i=e?e.level:-1;void 0===i&&(i=-1),t.deflateInit(i),t.next_out=r,this.append=function(e,i){let s,a,o=0,c=0,l=0;const d=[];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,s=t.deflate(0),0!=s)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new Uint8Array(r)):d.push(r.slice(0,t.next_out_index))),l+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=o&&(i(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(a=new Uint8Array(l),d.forEach((function(e){a.set(e,c),c+=e.length}))):a=d[0]||new Uint8Array(0),a}},this.flush=function(){let e,i,s=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 Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(r.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new Uint8Array(a),o.forEach((function(e){i.set(e,s),s+=e.length})),i}}}),e.BlobReader=B,e.BlobWriter=T,e.Data64URIReader=class extends D{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new Uint8Array(t),r=4*Math.floor(e/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),s=e-3*Math.floor(r/4);for(let e=s;e<s+t;e++)n[e-s]=i.charCodeAt(e);return n}},e.Data64URIWriter=class extends F{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}async writeUint8Array(e){super.writeUint8Array(e);let t=0,n=this.pending;const r=this.pending.length;for(this.pending="",t=0;t<3*Math.floor((r+e.length)/3)-r;t++)n+=String.fromCharCode(e[t]);for(;t<e.length;t++)this.pending+=String.fromCharCode(e[t]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},e.ERR_DUPLICATED_NAME=Xe,e.ERR_HTTP_RANGE=k,e.ERR_INVALID_COMMENT=Ye,e.ERR_INVALID_DATE=et,e.ERR_INVALID_ENCRYPTION_STRENGTH=tt,e.ERR_INVALID_ENTRY_COMMENT=Je,e.ERR_INVALID_ENTRY_NAME=Qe,e.ERR_INVALID_EXTRAFIELD_DATA=rt,e.ERR_INVALID_EXTRAFIELD_TYPE=nt,e.ERR_INVALID_VERSION=$e,e.HttpRangeReader=class extends j{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=j,e.Reader=D,e.TextReader=class extends D{constructor(e){super(),this.blobReader=new B(new Blob([e],{type:U}))}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 F{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:U})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:U})}getData(){const e=new FileReader;return new Promise(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=()=>n(e.error),e.readAsText(this.blob,this.encoding)}))}},e.Uint8ArrayReader=class extends D{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 F{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.Writer=F,e.ZipWriter=class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:m,files:new Map,offset:e.size,pendingOutputSize:0})}async add(e="",t,n={}){const r=this;if(e=e.trim(),n.directory&&!e.endsWith("/")?e+="/":n.directory=e.endsWith("/"),r.files.has(e))throw new Error(Xe);const i=(new TextEncoder).encode(e);if(i.length>q)throw new Error(Qe);const s=n.comment||"",a=(new TextEncoder).encode(s);if(a.length>q)throw new Error(Je);const o=r.options.version||n.version||0;if(o>q)throw new Error($e);const c=n.lastModDate||new Date;if(c<Z||c>G)throw new Error(et);const l=at(r,n,"password"),d=at(r,n,"encryptionStrength")||3,u=at(r,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(tt);let h=new Uint8Array(0);const f=n.extraField;if(f){let e=0,t=0;f.forEach((t=>e+=4+t.length)),h=new Uint8Array(e),f.forEach(((e,n)=>{if(n>q)throw new Error(nt);if(e.length>q)throw new Error(rt);ut(h,new Uint16Array([n]),t),ut(h,new Uint16Array([e.length]),t+2),ut(h,e,t+4),t+=4+e.length}))}let p=!1,w=0;const g=t&&!1!==n.zip64&&!1!==r.options.zip64;g&&(p=n.zip64||r.options.zip64,p||(t.initialized||await t.init(),w=Math.floor(1.05*t.size),r.pendingOutputSize+=w,p=r.offset>=V||w>=V||r.offset+r.pendingOutputSize>=V,await Promise.resolve()));const _=at(r,n,"level"),y=at(r,n,"useWebWorkers"),b=at(r,n,"bufferedWrite");let m=at(r,n,"keepOrder"),x=at(r,n,"dataDescriptor");const A=at(r,n,"signal");void 0===x&&(x=!0),void 0===m&&(m=!0);const k=await async function(e,t,n,r){const i=e.files,s=e.writer,a=Array.from(i.values()).pop();let o,c,l={};i.set(t,l);try{let d,u;try{let t;r.keepOrder&&(d=a&&a.lock),l.lock=t=new Promise((e=>c=e)),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(u=new T,u.init()):(e.lockWrite=new Promise((e=>o=e)),s.initialized||await s.init(),u=s),l=await async function(e,t,n,r){const{rawFilename:i,lastModDate:s,password:a,level:o,zip64:c,zipCrypto:l,dataDescriptor:d,directory:u,version:h,rawComment:f,rawExtraField:p,useWebWorkers:w,onprogress:g,signal:_,encryptionStrength:y}=r,b=Boolean(a&&a.length),m=0!==o&&!u;let x;if(b&&!l){x=new Uint8Array(it.length+2);const e=ht(x);ct(e,0,39169),ut(x,it,2),ot(e,8,y)}else x=new Uint8Array(0);const A={version:h||20,zip64:c,directory:Boolean(u),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:f,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:x,rawExtraField:p};let k=2048;d&&(k|=8);let U=0;m&&(U=8);c&&(A.version=A.version>45?A.version:45);b&&(k|=1,l||(A.version=A.version>51?A.version:51,U=99,m&&(A.rawExtraFieldAES[9]=8)));A.compressionMethod=U;const v=A.headerArray=new Uint8Array(26),E=ht(v);ct(E,0,A.version),ct(E,2,k),ct(E,4,U);const R=new Uint32Array(1),z=ht(R);ct(z,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),ct(z,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const S=R[0];lt(E,6,S),ct(E,22,i.length),ct(E,24,0),ct(E,24,x.length+A.rawExtraField.length);const I=new Uint8Array(30+i.length+x.length+A.rawExtraField.length);let D;lt(ht(I),0,N),ut(I,v,4),ut(I,i,30),ut(I,x,30+i.length),ut(I,A.rawExtraField,30+i.length+x.length);let F=0,B=0;if(e){F=e.size;const r=await function(e,t,n){const r=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[t.codecType]:[];if(Ve.length<n.maxWorkers){const a={};return Ve.push(a),Le(a,e,t,n,s,r,i)}{const a=Ve.find((e=>!e.busy));return a?Le(a,e,t,n,s,r,i):new Promise((n=>qe.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:i})))}function s(e){const t=!qe.length;if(t)Ve=Ve.filter((t=>t!=e));else{const[{resolve:t,codecConstructor:r,options:i,webWorker:a,scripts:o}]=qe.splice(0,1);t(Le(e,r,i,n,s,a,o))}return t}}(n.Deflate,{codecType:Te,level:o,password:a,encryptionStrength:y,zipCrypto:b&&l,passwordVerification:b&&l&&S>>8&255,signed:!0,compressed:m,encrypted:b,useWebWorkers:w},n);await t.writeUint8Array(I),e.initialized||await e.init(),D=await async function(e,t,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const d=a.signal;if(c<i){Ne(d);const u=await t.readUint8Array(c+r,Math.min(o,i-c)),h=u.length;Ne(d);const f=await e.append(u);if(Ne(d),l+=await Ke(n,f),a.onprogress)try{a.onprogress(c+h,i)}catch(e){}return s(c+o,l)}{const t=await e.flush();return l+=await Ke(n,t.data),{signature:t.signature,length:l}}}()}(r,e,t,0,F,n,{onprogress:g,signal:_}),B=D.length}else await t.writeUint8Array(I);let T,W=new Uint8Array(0);d&&(W=new Uint8Array(c?24:16),T=ht(W),lt(T,0,K));if(e){const e=D.signature;if(b&&!l||void 0===e||(lt(E,10,e),A.signature=e,d&&lt(T,4,e)),c){const e=ht(A.rawExtraFieldZip64);ct(e,0,1),ct(e,2,24),lt(E,14,V),dt(e,12,BigInt(B)),lt(E,18,V),dt(e,4,BigInt(F)),d&&(dt(T,8,BigInt(B)),dt(T,16,BigInt(F)))}else lt(E,14,B),lt(E,18,F),d&&(lt(T,8,B),lt(T,12,F))}d&&await t.writeUint8Array(W);const M=I.length+B+W.length;return Object.assign(A,{compressedSize:B,uncompressedSize:F,lastModDate:s,rawLastModDate:S,encrypted:b,length:M}),A}(n,u,e.config,r),l.lock=t}catch(e){throw i.delete(t),e}if(i.set(t,l),u!=s){let t=0;const n=u.getData();let a;await Promise.all([e.lockWrite,d]);do{a=Array.from(i.values()).find((e=>e.writingBufferedData)),a&&await a.lock}while(a&&a.lock);if(l.writingBufferedData=!0,!r.dataDescriptor){const e=26,i=await st(n,0,e),a=new DataView(i);l.encrypted&&!r.zipCrypto||lt(a,14,l.signature),l.zip64?(lt(a,18,V),lt(a,22,V)):(lt(a,18,l.compressedSize),lt(a,22,l.uncompressedSize)),await s.writeUint8Array(new Uint8Array(i)),t=e}await async function(e,t,n=0){const r=536870912;async function i(){if(n<t.size){const s=await st(t,n,n+r);await e.writeUint8Array(new Uint8Array(s)),n+=r,await i()}}await i()}(s,n,t),delete l.writingBufferedData}if(l.offset=e.offset,l.zip64){dt(ht(l.rawExtraFieldZip64),20,BigInt(l.offset))}return e.offset+=l.length,l}finally{c(),o&&o()}}(r,e,t,Object.assign({},n,{rawFilename:i,rawComment:a,version:o,lastModDate:c,rawExtraField:h,zip64:p,password:l,level:_,useWebWorkers:y,encryptionStrength:d,zipCrypto:u,bufferedWrite:b,keepOrder:m,dataDescriptor:x,signal:A}));return g&&(r.pendingOutputSize-=w),Object.assign(k,{name:e,comment:s,extraField:f}),new Ze(k)}async close(e=new Uint8Array(0)){const t=this,n=t.writer,r=t.files;let i=0,s=0,a=t.offset,o=r.size;for(const[,e]of r)s+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const c=t.options.zip64||a>=V||s>=V||o>=q,l=new Uint8Array(s+(c?98:22)),d=ht(l);if(e.length){if(!(e.length<=q))throw new Error(Ye);ct(d,i+20,e.length)}for(const[,e]of r){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawExtraField:s,rawComment:a,version:o,headerArray:c,directory:u,zip64:h}=e,f=n.length+r.length+s.length;lt(d,i,33639248),ct(d,i+4,o),ut(l,c,i+6),ct(d,i+30,f),ct(d,i+32,a.length),u&&ot(d,i+38,16),lt(d,i+42,h?V:e.offset),ut(l,t,i+46),ut(l,n,i+46+t.length),ut(l,r,i+46+t.length+n.length),ut(l,s,46+t.length+n.length+r.length),ut(l,a,i+46+t.length+f),i+=46+t.length+f+a.length}return c&&(lt(d,i,101075792),dt(d,i+4,BigInt(44)),ct(d,i+12,45),ct(d,i+14,45),dt(d,i+24,BigInt(o)),dt(d,i+32,BigInt(o)),dt(d,i+40,BigInt(s)),dt(d,i+48,BigInt(a)),lt(d,i+56,117853008),dt(d,i+64,BigInt(a)+BigInt(s)),lt(d,i+72,1),o=q,a=V,s=V,i+=76),lt(d,i,101010256),ct(d,i+8,o),ct(d,i+10,o),lt(d,i+12,s),lt(d,i+16,a),await n.writeUint8Array(l),e.length&&await n.writeUint8Array(e),n.getData()}},e.configure=x,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(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 t=256,n=256,r=-2,i=-5;function s(e){return e.map((([e,t])=>new Array(e).fill(t,0,e))).flat()}const a=[0,1,2,3].concat(...s([[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 o(){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=function(n){const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a<s;a++)0!==r[2*a]?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):r[2*a+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=l,a=Math.floor(n.heap_len/2);a>=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(t){const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,c,l,d,u,h,f=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<573;o++)c=t.heap[o],d=n[2*n[2*c+1]+1]+1,d>a&&(d=a,f++),n[2*c+1]=d,c>e.max_code||(t.bl_count[d]++,u=0,c>=s&&(u=i[c-s]),h=n[2*c],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*c+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(c=t.bl_count[d];0!==c;)l=t.heap[--o],l>e.max_code||(n[2*l+1]!=d&&(t.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(e,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))}(r,e.max_code,n.bl_count)}}function c(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[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]])),o.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],o.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],o.d_code=function(e){return e<256?a[e]:a[256+(e>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const d=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],h=113,f=666,p=258,w=262;function g(e,t,n,r){const i=e[2*t],s=e[2*n];return i<s||i==s&&r[t]<=r[n]}function _(){const e=this;let s,a,l,_,y,b,m,x,A,k,U,v,E,R,z,S,I,D,F,W,B,T,M,C,H,O,P,j,L,V,q,N,K;const G=new o,Z=new o,X=new o;let Y,J,Q,$,ee,te,ne,re;function ie(){let t;for(t=0;t<286;t++)q[2*t]=0;for(t=0;t<30;t++)N[2*t]=0;for(t=0;t<19;t++)K[2*t]=0;q[512]=1,e.opt_len=e.static_len=0,Q=ee=0}function se(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let c=0;c<=t;c++)n=i,i=e[2*(c+1)+1],++s<a&&n==i||(s<o?K[2*n]+=s:0!==n?(n!=r&&K[2*n]++,K[32]++):s<=10?K[34]++:K[36]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function ae(t){e.pending_buf[e.pending++]=t}function oe(e){ae(255&e),ae(e>>>8&255)}function ce(e,t){let n;const r=t;re>16-r?(n=e,ne|=n<<re&65535,oe(ne),ne=n>>>16-re,re+=r-16):(ne|=e<<re&65535,re+=r)}function le(e,t){const n=2*e;ce(65535&t[n],65535&t[n+1])}function de(e,t){let n,r,i=-1,s=e[1],a=0,o=7,c=4;for(0===s&&(o=138,c=3),n=0;n<=t;n++)if(r=s,s=e[2*(n+1)+1],!(++a<o&&r==s)){if(a<c)do{le(r,K)}while(0!=--a);else 0!==r?(r!=i&&(le(r,K),a--),le(16,K),ce(a-3,2)):a<=10?(le(17,K),ce(a-3,3)):(le(18,K),ce(a-11,7));a=0,i=r,0===s?(o=138,c=3):r==s?(o=6,c=3):(o=7,c=4)}}function ue(){16==re?(oe(ne),ne=0,re=0):re>=8&&(ae(255&ne),ne>>>=8,re-=8)}function he(n,r){let i,s,a;if(e.pending_buf[$+2*Q]=n>>>8&255,e.pending_buf[$+2*Q+1]=255&n,e.pending_buf[Y+Q]=255&r,Q++,0===n?q[2*r]++:(ee++,n--,q[2*(o._length_code[r]+t+1)]++,N[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=B-I,a=0;a<30;a++)i+=N[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,ee<Math.floor(Q/2)&&i<Math.floor(s/2))return!0}return Q==J-1}function fe(r,i){let s,a,c,l,d=0;if(0!==Q)do{s=e.pending_buf[$+2*d]<<8&65280|255&e.pending_buf[$+2*d+1],a=255&e.pending_buf[Y+d],d++,0===s?le(a,r):(c=o._length_code[a],le(c+t+1,r),l=o.extra_lbits[c],0!==l&&(a-=o.base_length[c],ce(a,l)),s--,c=o.d_code(s),le(c,i),l=o.extra_dbits[c],0!==l&&(s-=o.base_dist[c],ce(s,l)))}while(d<Q);le(n,r),te=r[513]}function pe(){re>8?oe(ne):re>0&&ae(255&ne),ne=0,re=0}function we(t,n,r){ce(0+(r?1:0),3),function(t,n,r){pe(),te=8,r&&(oe(n),oe(~n)),e.pending_buf.set(x.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function ge(t,n,r){let i,s,a=0;P>0?(G.build_tree(e),Z.build_tree(e),a=function(){let t;for(se(q,G.max_code),se(N,Z.max_code),X.build_tree(e),t=18;t>=3&&0===K[2*o.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=t?we(t,n,r):s==i?(ce(2+(r?1:0),3),fe(c.static_ltree,c.static_dtree)):(ce(4+(r?1:0),3),function(e,t,n){let r;for(ce(e-257,5),ce(t-1,5),ce(n-4,4),r=0;r<n;r++)ce(K[2*o.bl_order[r]+1],3);de(q,e-1),de(N,t-1)}(G.max_code+1,Z.max_code+1,a+1),fe(q,N)),ie(),r&&pe()}function _e(e){ge(I>=0?I:-1,B-I,e),I=B,s.flush_pending()}function ye(){let e,t,n,r;do{if(r=A-M-B,0===r&&0===B&&0===M)r=y;else if(-1==r)r--;else if(B>=y+y-w){x.set(x.subarray(y,y+y),0),T-=y,B-=y,I-=y,e=E,n=e;do{t=65535&U[--n],U[n]=t>=y?t-y:0}while(0!=--e);e=y,n=e;do{t=65535&k[--n],k[n]=t>=y?t-y:0}while(0!=--e);r+=y}if(0===s.avail_in)return;e=s.read_buf(x,B+M,r),M+=e,M>=3&&(v=255&x[B],v=(v<<S^255&x[B+1])&z)}while(M<w&&0!==s.avail_in)}function be(e){let t,n,r=H,i=B,s=C;const a=B>y-w?B-(y-w):0;let o=V;const c=m,l=B+p;let d=x[i+s-1],u=x[i+s];C>=L&&(r>>=2),o>M&&(o=M);do{if(t=e,x[t+s]==u&&x[t+s-1]==d&&x[t]==x[i]&&x[++t]==x[i+1]){i+=2,t++;do{}while(x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&x[++i]==x[++t]&&i<l);if(n=p-(l-i),i=l-p,n>s){if(T=e,s=n,n>=o)break;d=x[i+s-1],u=x[i+s]}}}while((e=65535&k[e&c])>a&&0!=--r);return s<=M?s:M}function me(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,a=h,_=0,G.dyn_tree=q,G.stat_desc=c.static_l_desc,Z.dyn_tree=N,Z.stat_desc=c.static_d_desc,X.dyn_tree=K,X.stat_desc=c.static_bl_desc,ne=0,re=0,te=8,ie(),function(){A=2*y,U[E-1]=0;for(let e=0;e<E-1;e++)U[e]=0;O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain,B=0,I=0,M=0,D=C=2,W=0,v=0}(),0}e.depth=[],e.bl_count=[],e.heap=[],q=[],N=[],K=[],e.pqdownheap=function(t,n){const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s<e.heap_len&&g(t,r[s+1],r[s],e.depth)&&s++,!g(t,i,r[s],e.depth));)r[n]=r[s],n=s,s<<=1;r[n]=i},e.deflateInit=function(t,n,i,s,a,o){return s||(s=8),a||(a=8),o||(o=0),t.msg=null,-1==n&&(n=6),a<1||a>9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(t.dstate=e,b=i,y=1<<b,m=y-1,R=a+7,E=1<<R,z=E-1,S=Math.floor((R+3-1)/3),x=new Uint8Array(2*y),k=[],U=[],J=1<<a+6,e.pending_buf=new Uint8Array(4*J),l=4*J,$=Math.floor(J/2),Y=3*J,P=n,j=o,me(t))},e.deflateEnd=function(){return 42!=a&&a!=h&&a!=f?r:(e.pending_buf=null,U=null,k=null,x=null,e.dstate=null,a==h?-3:0)},e.deflateParams=function(e,t,n){let i=0;return-1==t&&(t=6),t<0||t>9||n<0||n>2?r:(d[P].func!=d[t].func&&0!==e.total_in&&(i=e.deflate(1)),P!=t&&(P=t,O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain),j=n,i)},e.deflateSetDictionary=function(e,t,n){let i,s=n,o=0;if(!t||42!=a)return r;if(s<3)return 0;for(s>y-w&&(s=y-w,o=n-s),x.set(t.subarray(o,o+s),0),B=s,I=s,v=255&x[0],v=(v<<S^255&x[1])&z,i=0;i<=s-3;i++)v=(v<<S^255&x[i+2])&z,k[i&m]=U[v],U[v]=i;return 0},e.deflate=function(t,o){let p,g,A,R,H;if(o>4||o<0)return r;if(!t.next_out||!t.next_in&&0!==t.avail_in||a==f&&4!=o)return t.msg=u[4],r;if(0===t.avail_out)return t.msg=u[7],i;var L;if(s=t,R=_,_=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==B&&(g|=32),g+=31-g%31,a=h,ae((L=g)>>8&255),ae(255&L)),0!==e.pending){if(s.flush_pending(),0===s.avail_out)return _=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=u[7],i;if(a==f&&0!==s.avail_in)return t.msg=u[7],i;if(0!==s.avail_in||0!==M||0!=o&&a!=f){switch(H=-1,d[P].func){case 0:H=function(e){let t,n=65535;for(n>l-5&&(n=l-5);;){if(M<=1){if(ye(),0===M&&0==e)return 0;if(0===M)break}if(B+=M,M=0,t=I+n,(0===B||B>=t)&&(M=B-t,B=t,_e(!1),0===s.avail_out))return 0;if(B-I>=y-w&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 1:H=function(e){let t,n=0;for(;;){if(M<w){if(ye(),M<w&&0==e)return 0;if(0===M)break}if(M>=3&&(v=(v<<S^255&x[B+2])&z,n=65535&U[v],k[B&m]=U[v],U[v]=B),0!==n&&(B-n&65535)<=y-w&&2!=j&&(D=be(n)),D>=3)if(t=he(B-T,D-3),M-=D,D<=O&&M>=3){D--;do{B++,v=(v<<S^255&x[B+2])&z,n=65535&U[v],k[B&m]=U[v],U[v]=B}while(0!=--D);B++}else B+=D,D=0,v=255&x[B],v=(v<<S^255&x[B+1])&z;else t=he(0,255&x[B]),M--,B++;if(t&&(_e(!1),0===s.avail_out))return 0}return _e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o);break;case 2:H=function(e){let t,n,r=0;for(;;){if(M<w){if(ye(),M<w&&0==e)return 0;if(0===M)break}if(M>=3&&(v=(v<<S^255&x[B+2])&z,r=65535&U[v],k[B&m]=U[v],U[v]=B),C=D,F=T,D=2,0!==r&&C<O&&(B-r&65535)<=y-w&&(2!=j&&(D=be(r)),D<=5&&(1==j||3==D&&B-T>4096)&&(D=2)),C>=3&&D<=C){n=B+M-3,t=he(B-1-F,C-3),M-=C-1,C-=2;do{++B<=n&&(v=(v<<S^255&x[B+2])&z,r=65535&U[v],k[B&m]=U[v],U[v]=B)}while(0!=--C);if(W=0,D=2,B++,t&&(_e(!1),0===s.avail_out))return 0}else if(0!==W){if(t=he(0,255&x[B-1]),t&&_e(!1),B++,M--,0===s.avail_out)return 0}else W=1,B++,M--}return 0!==W&&(t=he(0,255&x[B-1]),W=0),_e(4==e),0===s.avail_out?4==e?2:0:4==e?3:1}(o)}if(2!=H&&3!=H||(a=f),0==H||2==H)return 0===s.avail_out&&(_=-1),0;if(1==H){if(1==o)ce(2,3),le(n,c.static_ltree),ue(),1+te+10-re<9&&(ce(2,3),le(n,c.static_ltree),ue()),te=7;else if(we(0,0,!1),3==o)for(p=0;p<E;p++)U[p]=0;if(s.flush_pending(),0===s.avail_out)return _=-1,0}}return 4!=o?0:1}}function y(){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}y.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new _,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate:function(e){const t=this;return t.dstate?t.dstate.deflate(t,e):r},deflateEnd:function(){const e=this;if(!e.dstate)return r;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):r},deflateSetDictionary:function(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):r},read_buf:function(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},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 b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(e){if(void 0!==e.chunkSize&&(m.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(m.maxWorkers=e.maxWorkers),void 0!==e.useWebWorkers&&(m.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(m.Deflate=e.Deflate),void 0!==e.Inflate&&(m.Inflate=e.Inflate),void 0!==e.workerScripts){if(e.workerScripts.deflate){if(!Array.isArray(e.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=e.workerScripts.inflate}}}const A="HTTP error ",k="HTTP Range not supported",U="text/plain",v="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",S="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class D extends I{}class F extends I{writeUint8Array(e){this.size+=e.length}}class W extends D{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){const n=new FileReader;return new Promise(((r,i)=>{n.onload=e=>r(new Uint8Array(e.target.result)),n.onerror=()=>i(n.error),n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}class B extends F{constructor(e){super(),this.offset=0,this.contentType=e,this.blob=new Blob([],{type:e})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class T extends D{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest){const e=await C(R,this.url,this.options);if(this.size=Number(e.headers.get(v)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(E)!=S)throw new Error(k);void 0===this.size&&await M(this,this.options)}else await M(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await C(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+e+"-"+(e+t-1)}));if(206!=n.status)throw new Error(k);return new Uint8Array(await n.arrayBuffer())}return this.data||await M(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function M(e,t){const n=await C(z,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function C(e,t,n,r){r=Object.assign({},n.headers,r);const i=await fetch(t,Object.assign({},n,{method:e,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends D{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest)return new Promise(((e,t)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(v)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(E)==S?e():t(new Error(k)):void 0===this.size?O(this,this.url).then((()=>e())).catch(t):e()}),t)));await O(this,this.url)}async readUint8Array(e,t){if(!this.useRangeHeader)return this.data||await O(this,this.url),new Uint8Array(this.data.subarray(e,e+t));if(206!=(await new Promise(((n,r)=>P(z,this.url,(e=>n(new Uint8Array(e.response))),r,[["Range","bytes="+e+"-"+(e+t-1)]])))).status)throw new Error(k)}}function O(e,t){return new Promise(((n,r)=>P(z,t,(t=>{e.data=new Uint8Array(t.response),e.size||(e.size=e.data.length),n()}),r)))}function P(e,t,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(e,t),i.forEach((e=>s.setRequestHeader(e[0],e[1]))),s.responseType="arraybuffer",s.send(),s}class j extends D{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new H(e,t):this.reader=new T(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)}}function L(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}const V=4294967295,q=65535,N=67324752,K=134695760,G="/",Z=new Date(2107,11,31),X=new Date(1980,0,1),Y=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;Y[e]=t}class J{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)t=t>>>8^Y[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const Q={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=Q.getPartial(n);return 32===r?e.concat(t):Q._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)+Q.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=Q.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=>Math.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 i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=Q.getPartial(i);return r.push(Q.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},$={bytes:{fromBits(e){const t=Q.bitLength(e)/8,n=new Uint8Array(t);let r;for(let i=0;i<t;i++)0==(3&i)&&(r=e[i/4]),n[i]=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(Q.partial(8*(3&n),r)),t}}},ee={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};ee.sha1.prototype={blockSize:512,reset:function(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update:function(e){const t=this;"string"==typeof e&&(e=$.utf8String.toBits(e));const n=t._buffer=Q.concat(t._buffer,e),r=t._length,i=t._length=r+Q.bitLength(e);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(s.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=Q.concat(t,[Q.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.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:function(e,t,n,r){return e<=19?t&n|~t&r:e<=39?t^n^r:e<=59?t&n|t&r|n&r:e<=79?t^n^r:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){const t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],s=n[1],a=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const n=t._S(5,i)+t._f(e,s,a,o)+c+r[e]+t._key[Math.floor(e/20)]|0;c=o,o=a,a=t._S(30,s),s=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}};const te={aes: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],i=e.length;let s,a,o,c=1;if(4!==i&&6!==i&&8!==i)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;s<4*i+28;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=s<=4||e<4?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],i=[],s=[];let a,o,c,l;for(let e=0;e<256;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,r[s]=d,l=i[c=i[o=i[d]]];let u=16843009*l^65537*c^257*o^16843008*d,h=257*i[s]^16843008*s;for(let n=0;n<4;n++)e[n][d]=h=h<<24^h>>>8,t[n][s]=u=u<<24^u>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],c=s[2],l=s[3],d=s[4];let u,h,f,p=e[0]^n[0],w=e[t?3:1]^n[1],g=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;e<r;e++)u=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&_]^n[y],h=a[w>>>24]^o[g>>16&255]^c[_>>8&255]^l[255&p]^n[y+1],f=a[g>>>24]^o[_>>16&255]^c[p>>8&255]^l[255&w]^n[y+2],_=a[_>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[y+3],y+=4,p=u,w=h,g=f;for(let e=0;e<4;e++)i[t?3&-e:e]=d[p>>>24]<<24^d[w>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^n[y++],u=p,p=w,w=g,g=_,_=u;return i}}},ne={ctrGladman: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 i=Q.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return Q.clamp(t,i)}}},re={hmacSha1:class{constructor(e){const t=this,n=t._hash=ee.sha1,r=[[],[]],i=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>i&&(e=n.hash(e));for(let t=0;t<i;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}}},ie="Invalid pasword",se=16,ae={name:"PBKDF2"},oe=Object.assign({hash:{name:"HMAC"}},ae),ce=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},ae),le=["deriveBits"],de=[8,12,16],ue=[16,24,32],he=10,fe=[0,0,0,0],pe=crypto.subtle,we=$.bytes,ge=te.aes,_e=ne.ctrGladman,ye=re.hmacSha1;class be{constructor(e,t,n){Object.assign(this,{password:e,signed:t,strength:n-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;if(t.password){const n=Ue(e,0,de[t.strength]+2);await async function(e,t,n){await Ae(e,n,Ue(t,0,de[e.strength]));const r=Ue(t,de[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(ie)}(t,n,t.password),t.password=null,t.aesCtrGladman=new _e(new ge(t.keys.key),Array.from(fe)),t.hmac=new ye(t.keys.authentication),e=Ue(e,de[t.strength]+2)}return xe(t,e,new Uint8Array(e.length-he-(e.length-he)%se),0,he,!0)}async flush(){const e=this,t=e.pendingInput,n=Ue(t,0,t.length-he),r=Ue(t,t.length-he);let i=new Uint8Array(0);if(n.length){const t=we.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);i=we.fromBits(r)}let s=!0;if(e.signed){const t=Ue(we.fromBits(e.hmac.digest()),0,he);for(let e=0;e<he;e++)t[e]!=r[e]&&(s=!1)}return{valid:s,data:i}}}class me{constructor(e,t){Object.assign(this,{password:e,strength:t-1,pendingInput:new Uint8Array(0)})}async append(e){const t=this;let n=new Uint8Array(0);t.password&&(n=await async function(e,t){const n=crypto.getRandomValues(new Uint8Array(de[e.strength]));return await Ae(e,t,n),ke(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new _e(new ge(t.keys.key),Array.from(fe)),t.hmac=new ye(t.keys.authentication));const r=new Uint8Array(n.length+e.length-e.length%se);return r.set(n,0),xe(t,e,r,n.length,0)}async flush(){const e=this;let t=new Uint8Array(0);if(e.pendingInput.length){const n=e.aesCtrGladman.update(we.toBits(e.pendingInput));e.hmac.update(n),t=we.fromBits(n)}const n=Ue(we.fromBits(e.hmac.digest()),0,he);return{data:ke(t,n),signature:n}}}function xe(e,t,n,r,i,s){const a=t.length-i;let o;for(e.pendingInput.length&&(t=ke(e.pendingInput,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,a-a%se)),o=0;o<=a-se;o+=se){const i=we.toBits(Ue(t,o,o+se));s&&e.hmac.update(i);const a=e.aesCtrGladman.update(i);s||e.hmac.update(a),n.set(we.fromBits(a),o+r)}return e.pendingInput=Ue(t,o),n}async function Ae(e,t,n){const r=(new TextEncoder).encode(t),i=await pe.importKey("raw",r,oe,!1,le),s=await pe.deriveBits(Object.assign({salt:n},ce),i,8*(2*ue[e.strength]+2)),a=new Uint8Array(s);e.keys={key:we.toBits(Ue(a,0,ue[e.strength])),authentication:we.toBits(Ue(a,ue[e.strength],2*ue[e.strength])),passwordVerification:Ue(a,2*ue[e.strength])}}function ke(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ue(e,t,n){return e.subarray(t,n)}const ve=12;class Ee{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Ie(this,e)}async append(e){const t=this;if(t.password){const n=ze(t,e.subarray(0,ve));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(ie);e=e.subarray(ve)}return ze(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Re{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Ie(this,e)}async append(e){const t=this;let n,r;if(t.password){t.password=null;const i=crypto.getRandomValues(new Uint8Array(ve));i[11]=t.passwordVerification,n=new Uint8Array(e.length+i.length),n.set(Se(t,i),0),r=ve}else n=new Uint8Array(e.length),r=0;return n.set(Se(t,e),r),n}async flush(){return{data:new Uint8Array(0)}}}function ze(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Fe(e)^t[r],De(e,n[r]);return n}function Se(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Fe(e)^t[r],De(e,t[r]);return n}function Ie(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new J(e.keys[0]),e.crcKey2=new J(e.keys[2]);for(let n=0;n<t.length;n++)De(e,t.charCodeAt(n))}function De(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Be(e.keys[1]+We(e.keys[0])),e.keys[1]=Be(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function Fe(e){const t=2|e.keys[2];return We(Math.imul(t,1^t)>>>8)}function We(e){return 255&e}function Be(e){return 4294967295&e}const Te="deflate",Me="Invalid signature";class Ce{constructor(e,{signature:t,password:n,signed:r,compressed:i,zipCrypto:s,passwordVerification:a,encryptionStrength:o},{chunkSize:c}){const l=Boolean(n);Object.assign(this,{signature:t,encrypted:l,signed:r,compressed:i,inflate:i&&new e({chunkSize:c}),crc32:r&&new J,zipCrypto:s,decrypt:l&&s?new Ee(n,a):new be(n,r,o)})}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 Uint8Array(0);if(e.encrypted){const t=await e.decrypt.flush();if(!t.valid)throw new Error(Me);n=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const n=new DataView(new Uint8Array(4).buffer);if(t=e.crc32.get(),n.setUint32(0,t),e.cipher!=n.getUint32(0,!1))throw new Error(Me)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class He{constructor(e,{encrypted:t,signed:n,compressed:r,level:i,zipCrypto:s,password:a,passwordVerification:o,encryptionStrength:c},{chunkSize:l}){Object.assign(this,{encrypted:t,signed:n,compressed:r,deflate:r&&new e({level:i||5,chunkSize:l}),crc32:n&&new J,zipCrypto:s,encrypt:t&&s?new Re(a,o):new me(a,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 Uint8Array(0);if(e.compressed&&(n=await e.deflate.flush()||new Uint8Array(0)),e.encrypted){n=await e.encrypt.append(n);const r=await e.encrypt.flush();t=r.signature;const i=new Uint8Array(n.length+r.data.length);i.set(n,0),i.set(r.data,n.length),n=i}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:n,signature:t}}}const Oe="init",Pe="append",je="flush",Le="message";var Ve=(e,t,n,r,i,s,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,webWorker:s,onTaskFinished(){e.busy=!1;i(e)&&e.worker&&e.worker.terminate()}}),s?function(e,t){let n;e.interface||(e.worker=new Worker(new URL(e.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),e.worker.addEventListener(Le,s,!1),e.interface={append:e=>r({type:Pe,data:e}),flush:()=>r({type:je})});return e.interface;async function r(r){if(!n){const n=e.options,r=e.scripts.slice(1);await i({scripts:r,type:Oe,options:n,config:{chunkSize:t.chunkSize}})}return i(r)}function i(t){const r=e.worker,i=new Promise(((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 i}function s(t){const r=t.data;if(n){const t=r.error,i=r.type;if(t){const r=new Error(t.message);r.stack=t.stack,n.reject(r),n=null,e.onTaskFinished()}else if(i==Oe||i==je||i==Pe){const t=r.data;i==je?(n.resolve({data:new Uint8Array(t),signature:r.signature}),n=null,e.onTaskFinished()):n.resolve(t&&new Uint8Array(t))}}}}(e,r):function(e,t){const n=function(e,t,n){return t.codecType.startsWith(Te)?new He(e,t,n):t.codecType.startsWith("inflate")?new Ce(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()}}}}(e,r));let qe=[],Ne=[];function Ke(e){if(e&&e.aborted)throw new Error("Abort error")}async function Ge(e,t){return t.length&&await e.writeUint8Array(t),t.length}const Ze=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod"];class Xe{constructor(e){Ze.forEach((t=>this[t]=e[t]))}}const Ye="File already exists",Je="Zip file comment exceeds 64KB",Qe="File entry comment exceeds 64KB",$e="File entry name exceeds 64KB",et="Version exceeds 65535",tt="The modification date must be between 1/1/1980 and 12/31/2107",nt="The strength must equal 1, 2, or 3",rt="Extra field type exceeds 65535",it="Extra field data exceeds 64KB",st=new Uint8Array([7,0,2,0,65,69,3,0,0]);let at=0;function ot(e,t,n){const r=new FileReader;return new Promise(((i,s)=>{r.onload=e=>i(e.target.result),r.onerror=()=>s(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)}))}function ct(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function lt(e,t,n){e.setUint8(t,n)}function dt(e,t,n){e.setUint16(t,n,!0)}function ut(e,t,n){e.setUint32(t,n,!0)}function ht(e,t,n){e.setBigUint64(t,n,!0)}function ft(e,t,n){e.set(t,n)}function pt(e){return new DataView(e.buffer)}x({Deflate:function(e){const t=new y,n=e&&e.chunkSize?Math.floor(1.05*e.chunkSize):65536,r=new Uint8Array(n);let i=e?e.level:-1;void 0===i&&(i=-1),t.deflateInit(i),t.next_out=r,this.append=function(e,i){let s,a,o=0,c=0,l=0;const d=[];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,s=t.deflate(0),0!=s)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new Uint8Array(r)):d.push(r.slice(0,t.next_out_index))),l+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=o&&(i(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(a=new Uint8Array(l),d.forEach((function(e){a.set(e,c),c+=e.length}))):a=d[0]||new Uint8Array(0),a}},this.flush=function(){let e,i,s=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 Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(r.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new Uint8Array(a),o.forEach((function(e){i.set(e,s),s+=e.length})),i}}}),e.BlobReader=W,e.BlobWriter=B,e.Data64URIReader=class extends D{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new Uint8Array(t),r=4*Math.floor(e/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),s=e-3*Math.floor(r/4);for(let e=s;e<s+t;e++)n[e-s]=i.charCodeAt(e);return n}},e.Data64URIWriter=class extends F{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}async writeUint8Array(e){super.writeUint8Array(e);let t=0,n=this.pending;const r=this.pending.length;for(this.pending="",t=0;t<3*Math.floor((r+e.length)/3)-r;t++)n+=String.fromCharCode(e[t]);for(;t<e.length;t++)this.pending+=String.fromCharCode(e[t]);n.length>2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},e.ERR_DUPLICATED_NAME=Ye,e.ERR_HTTP_RANGE=k,e.ERR_INVALID_COMMENT=Je,e.ERR_INVALID_DATE=tt,e.ERR_INVALID_ENCRYPTION_STRENGTH=nt,e.ERR_INVALID_ENTRY_COMMENT=Qe,e.ERR_INVALID_ENTRY_NAME=$e,e.ERR_INVALID_EXTRAFIELD_DATA=it,e.ERR_INVALID_EXTRAFIELD_TYPE=rt,e.ERR_INVALID_VERSION=et,e.HttpRangeReader=class extends j{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=j,e.Reader=D,e.TextReader=class extends D{constructor(e){super(),this.blobReader=new W(new Blob([e],{type:U}))}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 F{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:U})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:U})}getData(){const e=new FileReader;return new Promise(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=()=>n(e.error),e.readAsText(this.blob,this.encoding)}))}},e.Uint8ArrayReader=class extends D{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 F{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.Writer=F,e.ZipWriter=class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:m,files:new Map,offset:e.size,pendingOutputSize:0,pendingEntries:[]})}async add(e="",t,n={}){const r=this;if(!(at<r.config.maxWorkers))return new Promise(((i,s)=>r.pendingEntries.push({name:e,reader:t,options:n,resolve:i,reject:s})));at++;try{return await async function(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(G)?t+=G:r.directory=t.endsWith(G);if(e.files.has(t))throw new Error(Ye);const i=(new TextEncoder).encode(t);if(i.length>q)throw new Error($e);const s=r.comment||"",a=(new TextEncoder).encode(s);if(a.length>q)throw new Error(Qe);const o=e.options.version||r.version||0;if(o>q)throw new Error(et);const c=r.lastModDate||new Date;if(c<X||c>Z)throw new Error(tt);const l=ct(e,r,"password"),d=ct(e,r,"encryptionStrength")||3,u=ct(e,r,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(nt);let h=new Uint8Array(0);const f=r.extraField;if(f){let e=0,t=0;f.forEach((t=>e+=4+t.length)),h=new Uint8Array(e),f.forEach(((e,n)=>{if(n>q)throw new Error(rt);if(e.length>q)throw new Error(it);ft(h,new Uint16Array([n]),t),ft(h,new Uint16Array([e.length]),t+2),ft(h,e,t+4),t+=4+e.length}))}let p=!1,w=0;const g=n&&!1!==r.zip64&&!1!==e.options.zip64;g&&(p=r.zip64||e.options.zip64,p||(n.initialized||await n.init(),w=Math.floor(1.05*n.size),e.pendingOutputSize+=w,p=e.offset>=V||w>=V||e.offset+e.pendingOutputSize>=V,await Promise.resolve()));const _=ct(e,r,"level"),y=ct(e,r,"useWebWorkers"),b=ct(e,r,"bufferedWrite");let m=ct(e,r,"keepOrder"),x=ct(e,r,"dataDescriptor");const A=ct(e,r,"signal");void 0===x&&(x=!0);void 0===m&&(m=!0);const k=await async function(e,t,n,r){const i=e.files,s=e.writer,a=Array.from(i.values()).pop();let o,c,l={};i.set(t,l);try{let d,u;try{let t;r.keepOrder&&(d=a&&a.lock),l.lock=t=new Promise((e=>c=e)),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(u=new B,u.init()):(e.lockWrite=new Promise((e=>o=e)),s.initialized||await s.init(),u=s),l=await async function(e,t,n,r){const{rawFilename:i,lastModDate:s,password:a,level:o,zip64:c,zipCrypto:l,dataDescriptor:d,directory:u,version:h,rawComment:f,rawExtraField:p,useWebWorkers:w,onprogress:g,signal:_,encryptionStrength:y}=r,b=Boolean(a&&a.length),m=0!==o&&!u;let x;if(b&&!l){x=new Uint8Array(st.length+2);const e=pt(x);dt(e,0,39169),ft(x,st,2),lt(e,8,y)}else x=new Uint8Array(0);const A={version:h||20,zip64:c,directory:Boolean(u),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:f,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:x,rawExtraField:p};let k=2048;d&&(k|=8);let U=0;m&&(U=8);c&&(A.version=A.version>45?A.version:45);b&&(k|=1,l||(A.version=A.version>51?A.version:51,U=99,m&&(A.rawExtraFieldAES[9]=8)));A.compressionMethod=U;const v=A.headerArray=new Uint8Array(26),E=pt(v);dt(E,0,A.version),dt(E,2,k),dt(E,4,U);const R=new Uint32Array(1),z=pt(R);dt(z,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),dt(z,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const S=R[0];ut(E,6,S),dt(E,22,i.length),dt(E,24,0),dt(E,24,x.length+A.rawExtraField.length);const I=new Uint8Array(30+i.length+x.length+A.rawExtraField.length);let D;ut(pt(I),0,N),ft(I,v,4),ft(I,i,30),ft(I,x,30+i.length),ft(I,A.rawExtraField,30+i.length+x.length);let F=0,W=0;if(e){F=e.size;const r=await function(e,t,n){const r=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[t.codecType]:[];if(qe.length<n.maxWorkers){const a={};return qe.push(a),Ve(a,e,t,n,s,r,i)}{const a=qe.find((e=>!e.busy));return a?Ve(a,e,t,n,s,r,i):new Promise((n=>Ne.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:i})))}function s(e){const t=!Ne.length;if(t)qe=qe.filter((t=>t!=e));else{const[{resolve:t,codecConstructor:r,options:i,webWorker:a,scripts:o}]=Ne.splice(0,1);t(Ve(e,r,i,n,s,a,o))}return t}}(n.Deflate,{codecType:Te,level:o,password:a,encryptionStrength:y,zipCrypto:b&&l,passwordVerification:b&&l&&S>>8&255,signed:!0,compressed:m,encrypted:b,useWebWorkers:w},n);await t.writeUint8Array(I),e.initialized||await e.init(),D=await async function(e,t,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const d=a.signal;if(c<i){Ke(d);const u=await t.readUint8Array(c+r,Math.min(o,i-c)),h=u.length;Ke(d);const f=await e.append(u);if(Ke(d),l+=await Ge(n,f),a.onprogress)try{a.onprogress(c+h,i)}catch(e){}return s(c+o,l)}{const t=await e.flush();return l+=await Ge(n,t.data),{signature:t.signature,length:l}}}()}(r,e,t,0,F,n,{onprogress:g,signal:_}),W=D.length}else await t.writeUint8Array(I);let B,T=new Uint8Array(0);d&&(T=new Uint8Array(c?24:16),B=pt(T),ut(B,0,K));if(e){const e=D.signature;if(b&&!l||void 0===e||(ut(E,10,e),A.signature=e,d&&ut(B,4,e)),c){const e=pt(A.rawExtraFieldZip64);dt(e,0,1),dt(e,2,24),ut(E,14,V),ht(e,12,BigInt(W)),ut(E,18,V),ht(e,4,BigInt(F)),d&&(ht(B,8,BigInt(W)),ht(B,16,BigInt(F)))}else ut(E,14,W),ut(E,18,F),d&&(ut(B,8,W),ut(B,12,F))}d&&await t.writeUint8Array(T);const M=I.length+W+T.length;return Object.assign(A,{compressedSize:W,uncompressedSize:F,lastModDate:s,rawLastModDate:S,encrypted:b,length:M}),A}(n,u,e.config,r),l.lock=t}catch(e){throw i.delete(t),e}if(i.set(t,l),u!=s){let t=0;const n=u.getData();let a;await Promise.all([e.lockWrite,d]);do{a=Array.from(i.values()).find((e=>e.writingBufferedData)),a&&await a.lock}while(a&&a.lock);if(l.writingBufferedData=!0,!r.dataDescriptor){const e=26,i=await ot(n,0,e),a=new DataView(i);l.encrypted&&!r.zipCrypto||ut(a,14,l.signature),l.zip64?(ut(a,18,V),ut(a,22,V)):(ut(a,18,l.compressedSize),ut(a,22,l.uncompressedSize)),await s.writeUint8Array(new Uint8Array(i)),t=e}await async function(e,t,n=0){const r=536870912;async function i(){if(n<t.size){const s=await ot(t,n,n+r);await e.writeUint8Array(new Uint8Array(s)),n+=r,await i()}}await i()}(s,n,t),delete l.writingBufferedData}if(l.offset=e.offset,l.zip64){ht(pt(l.rawExtraFieldZip64),20,BigInt(l.offset))}return e.offset+=l.length,l}finally{c(),o&&o()}}(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:a,version:o,lastModDate:c,rawExtraField:h,zip64:p,password:l,level:_,useWebWorkers:y,encryptionStrength:d,zipCrypto:u,bufferedWrite:b,keepOrder:m,dataDescriptor:x,signal:A}));g&&(e.pendingOutputSize-=w);return Object.assign(k,{name:t,comment:s,extraField:f}),new Xe(k)}(r,e,t,n)}finally{at--;const e=r.pendingEntries.shift();e&&r.add(e.name,e.reader,e.options).then(e.resolve).catch(e.reject)}}async close(e=new Uint8Array(0)){const t=this,n=t.writer,r=t.files;let i=0,s=0,a=t.offset,o=r.size;for(const[,e]of r)s+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const c=t.options.zip64||a>=V||s>=V||o>=q,l=new Uint8Array(s+(c?98:22)),d=pt(l);if(e.length){if(!(e.length<=q))throw new Error(Je);dt(d,i+20,e.length)}for(const[,e]of r){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawExtraField:s,rawComment:a,version:o,headerArray:c,directory:u,zip64:h}=e,f=n.length+r.length+s.length;ut(d,i,33639248),dt(d,i+4,o),ft(l,c,i+6),dt(d,i+30,f),dt(d,i+32,a.length),u&&lt(d,i+38,16),ut(d,i+42,h?V:e.offset),ft(l,t,i+46),ft(l,n,i+46+t.length),ft(l,r,i+46+t.length+n.length),ft(l,s,46+t.length+n.length+r.length),ft(l,a,i+46+t.length+f),i+=46+t.length+f+a.length}return c&&(ut(d,i,101075792),ht(d,i+4,BigInt(44)),dt(d,i+12,45),dt(d,i+14,45),ht(d,i+24,BigInt(o)),ht(d,i+32,BigInt(o)),ht(d,i+40,BigInt(s)),ht(d,i+48,BigInt(a)),ut(d,i+56,117853008),ht(d,i+64,BigInt(a)+BigInt(s)),ut(d,i+72,1),o=q,a=V,s=V,i+=76),ut(d,i,101010256),dt(d,i+8,o),dt(d,i+10,o),ut(d,i+12,s),ut(d,i+16,a),await n.writeUint8Array(l),e.length&&await n.writeUint8Array(e),n.getData()}},e.configure=x,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -31,3 +31,3 @@ /*

import { Deflate, Inflate} from "fflate";
import { Deflate, Inflate } from "./lib/zip-fflate-shim.js";
import { configure } from "./lib/core/configuration.js";

@@ -34,0 +34,0 @@ import getMimeType from "./lib/core/util/mime-type.js";

@@ -80,2 +80,4 @@ /*

let workers = 0;
class ZipWriter {

@@ -90,3 +92,4 @@

offset: writer.size,
pendingOutputSize: 0
pendingOutputSize: 0,
pendingEntries: []
});

@@ -97,103 +100,18 @@ }

const zipWriter = this;
name = name.trim();
if (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {
name += DIRECTORY_SIGNATURE;
} else {
options.directory = name.endsWith(DIRECTORY_SIGNATURE);
}
if (zipWriter.files.has(name)) {
throw new Error(ERR_DUPLICATED_NAME);
}
const rawFilename = (new TextEncoder()).encode(name);
if (rawFilename.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_ENTRY_NAME);
}
const comment = options.comment || "";
const rawComment = (new TextEncoder()).encode(comment);
if (rawComment.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_ENTRY_COMMENT);
}
const version = zipWriter.options.version || options.version || 0;
if (version > MAX_16_BITS) {
throw new Error(ERR_INVALID_VERSION);
}
const lastModDate = options.lastModDate || new Date();
if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) {
throw new Error(ERR_INVALID_DATE);
}
const password = getOptionValue(zipWriter, options, "password");
const encryptionStrength = getOptionValue(zipWriter, options, "encryptionStrength") || 3;
const zipCrypto = getOptionValue(zipWriter, options, "zipCrypto");
if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) {
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
}
let rawExtraField = new Uint8Array(0);
const extraField = options.extraField;
if (extraField) {
let extraFieldSize = 0;
let offset = 0;
extraField.forEach(data => extraFieldSize += 4 + data.length);
rawExtraField = new Uint8Array(extraFieldSize);
extraField.forEach((data, type) => {
if (type > MAX_16_BITS) {
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
if (workers < zipWriter.config.maxWorkers) {
workers++;
try {
return await addFile(zipWriter, name, reader, options);
} finally {
workers--;
const pendingEntry = zipWriter.pendingEntries.shift();
if (pendingEntry) {
zipWriter.add(pendingEntry.name, pendingEntry.reader, pendingEntry.options)
.then(pendingEntry.resolve)
.catch(pendingEntry.reject);
}
if (data.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
}
arraySet(rawExtraField, new Uint16Array([type]), offset);
arraySet(rawExtraField, new Uint16Array([data.length]), offset + 2);
arraySet(rawExtraField, data, offset + 4);
offset += 4 + data.length;
});
}
let zip64 = false;
let outputSize = 0;
const zip64Enabled = reader && options.zip64 !== false && zipWriter.options.zip64 !== false;
if (zip64Enabled) {
zip64 = options.zip64 || zipWriter.options.zip64;
if (!zip64) {
if (!reader.initialized) {
await reader.init();
}
outputSize = Math.floor(reader.size * 1.05);
zipWriter.pendingOutputSize += outputSize;
zip64 = zipWriter.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || zipWriter.offset + zipWriter.pendingOutputSize >= MAX_32_BITS;
await Promise.resolve();
}
} else {
return new Promise((resolve, reject) => zipWriter.pendingEntries.push({ name, reader, options, resolve, reject }));
}
const level = getOptionValue(zipWriter, options, "level");
const useWebWorkers = getOptionValue(zipWriter, options, "useWebWorkers");
const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite");
let keepOrder = getOptionValue(zipWriter, options, "keepOrder");
let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor");
const signal = getOptionValue(zipWriter, options, "signal");
if (dataDescriptor === undefined) {
dataDescriptor = true;
}
if (keepOrder === undefined) {
keepOrder = true;
}
const fileEntry = await addFile(zipWriter, name, reader, Object.assign({}, options, {
rawFilename,
rawComment,
version,
lastModDate,
rawExtraField,
zip64,
password,
level,
useWebWorkers,
encryptionStrength,
zipCrypto,
bufferedWrite,
keepOrder,
dataDescriptor,
signal
}));
if (zip64Enabled) {
zipWriter.pendingOutputSize -= outputSize;
}
Object.assign(fileEntry, { name, comment, extraField });
return new Entry(fileEntry);
}

@@ -304,2 +222,106 @@

async function addFile(zipWriter, name, reader, options) {
name = name.trim();
if (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {
name += DIRECTORY_SIGNATURE;
} else {
options.directory = name.endsWith(DIRECTORY_SIGNATURE);
}
if (zipWriter.files.has(name)) {
throw new Error(ERR_DUPLICATED_NAME);
}
const rawFilename = (new TextEncoder()).encode(name);
if (rawFilename.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_ENTRY_NAME);
}
const comment = options.comment || "";
const rawComment = (new TextEncoder()).encode(comment);
if (rawComment.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_ENTRY_COMMENT);
}
const version = zipWriter.options.version || options.version || 0;
if (version > MAX_16_BITS) {
throw new Error(ERR_INVALID_VERSION);
}
const lastModDate = options.lastModDate || new Date();
if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) {
throw new Error(ERR_INVALID_DATE);
}
const password = getOptionValue(zipWriter, options, "password");
const encryptionStrength = getOptionValue(zipWriter, options, "encryptionStrength") || 3;
const zipCrypto = getOptionValue(zipWriter, options, "zipCrypto");
if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) {
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
}
let rawExtraField = new Uint8Array(0);
const extraField = options.extraField;
if (extraField) {
let extraFieldSize = 0;
let offset = 0;
extraField.forEach(data => extraFieldSize += 4 + data.length);
rawExtraField = new Uint8Array(extraFieldSize);
extraField.forEach((data, type) => {
if (type > MAX_16_BITS) {
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
}
if (data.length > MAX_16_BITS) {
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
}
arraySet(rawExtraField, new Uint16Array([type]), offset);
arraySet(rawExtraField, new Uint16Array([data.length]), offset + 2);
arraySet(rawExtraField, data, offset + 4);
offset += 4 + data.length;
});
}
let zip64 = false;
let outputSize = 0;
const zip64Enabled = reader && options.zip64 !== false && zipWriter.options.zip64 !== false;
if (zip64Enabled) {
zip64 = options.zip64 || zipWriter.options.zip64;
if (!zip64) {
if (!reader.initialized) {
await reader.init();
}
outputSize = Math.floor(reader.size * 1.05);
zipWriter.pendingOutputSize += outputSize;
zip64 = zipWriter.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || zipWriter.offset + zipWriter.pendingOutputSize >= MAX_32_BITS;
await Promise.resolve();
}
}
const level = getOptionValue(zipWriter, options, "level");
const useWebWorkers = getOptionValue(zipWriter, options, "useWebWorkers");
const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite");
let keepOrder = getOptionValue(zipWriter, options, "keepOrder");
let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor");
const signal = getOptionValue(zipWriter, options, "signal");
if (dataDescriptor === undefined) {
dataDescriptor = true;
}
if (keepOrder === undefined) {
keepOrder = true;
}
const fileEntry = await getFileEntry(zipWriter, name, reader, Object.assign({}, options, {
rawFilename,
rawComment,
version,
lastModDate,
rawExtraField,
zip64,
password,
level,
useWebWorkers,
encryptionStrength,
zipCrypto,
bufferedWrite,
keepOrder,
dataDescriptor,
signal
}));
if (zip64Enabled) {
zipWriter.pendingOutputSize -= outputSize;
}
Object.assign(fileEntry, { name, comment, extraField });
return new Entry(fileEntry);
}
async function getFileEntry(zipWriter, name, reader, options) {
const files = zipWriter.files;

@@ -306,0 +328,0 @@ const writer = zipWriter.writer;

@@ -6,3 +6,3 @@ {

"license": "BSD-3-Clause",
"version": "2.2.29",
"version": "2.2.30",
"type": "module",

@@ -9,0 +9,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc