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.37 to 2.2.38

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 y(){const e=this;let s,a,l,y,_,m,b,x,A,k,v,U,E,R,z,S,T,W,I,D,F,B,C,M,H,O,P,j,L,V,N,q,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++)N[2*t]=0;for(t=0;t<30;t++)q[2*t]=0;for(t=0;t<19;t++)K[2*t]=0;N[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?N[2*r]++:(ee++,n--,N[2*(o._length_code[r]+t+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=F-T,a=0;a<30;a++)i+=q[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(N,G.max_code),se(q,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(N,e-1),de(q,t-1)}(G.max_code+1,Z.max_code+1,a+1),fe(N,q)),ie(),r&&pe()}function ye(e){ge(T>=0?T:-1,F-T,e),T=F,s.flush_pending()}function _e(){let e,t,n,r;do{if(r=A-C-F,0===r&&0===F&&0===C)r=_;else if(-1==r)r--;else if(F>=_+_-w){x.set(x.subarray(_,_+_),0),B-=_,F-=_,T-=_,e=E,n=e;do{t=65535&v[--n],v[n]=t>=_?t-_:0}while(0!=--e);e=_,n=e;do{t=65535&k[--n],k[n]=t>=_?t-_:0}while(0!=--e);r+=_}if(0===s.avail_in)return;e=s.read_buf(x,F+C,r),C+=e,C>=3&&(U=255&x[F],U=(U<<S^255&x[F+1])&z)}while(C<w&&0!==s.avail_in)}function me(e){let t,n,r=H,i=F,s=M;const a=F>_-w?F-(_-w):0;let o=V;const c=b,l=F+p;let d=x[i+s-1],u=x[i+s];M>=L&&(r>>=2),o>C&&(o=C);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(B=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<=C?s:C}function be(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,a=h,y=0,G.dyn_tree=N,G.stat_desc=c.static_l_desc,Z.dyn_tree=q,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*_,v[E-1]=0;for(let e=0;e<E-1;e++)v[e]=0;O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain,F=0,T=0,C=0,W=M=2,D=0,U=0}(),0}e.depth=[],e.bl_count=[],e.heap=[],N=[],q=[],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,m=i,_=1<<m,b=_-1,R=a+7,E=1<<R,z=E-1,S=Math.floor((R+3-1)/3),x=new Uint8Array(2*_),k=[],v=[],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,be(t))},e.deflateEnd=function(){return 42!=a&&a!=h&&a!=f?r:(e.pending_buf=null,v=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>_-w&&(s=_-w,o=n-s),x.set(t.subarray(o,o+s),0),F=s,T=s,U=255&x[0],U=(U<<S^255&x[1])&z,i=0;i<=s-3;i++)U=(U<<S^255&x[i+2])&z,k[i&b]=v[U],v[U]=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=y,y=o,42==a&&(g=8+(m-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==F&&(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 y=-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!==C||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(C<=1){if(_e(),0===C&&0==e)return 0;if(0===C)break}if(F+=C,C=0,t=T+n,(0===F||F>=t)&&(C=F-t,F=t,ye(!1),0===s.avail_out))return 0;if(F-T>=_-w&&(ye(!1),0===s.avail_out))return 0}return ye(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(C<w){if(_e(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(U=(U<<S^255&x[F+2])&z,n=65535&v[U],k[F&b]=v[U],v[U]=F),0!==n&&(F-n&65535)<=_-w&&2!=j&&(W=me(n)),W>=3)if(t=he(F-B,W-3),C-=W,W<=O&&C>=3){W--;do{F++,U=(U<<S^255&x[F+2])&z,n=65535&v[U],k[F&b]=v[U],v[U]=F}while(0!=--W);F++}else F+=W,W=0,U=255&x[F],U=(U<<S^255&x[F+1])&z;else t=he(0,255&x[F]),C--,F++;if(t&&(ye(!1),0===s.avail_out))return 0}return ye(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(C<w){if(_e(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(U=(U<<S^255&x[F+2])&z,r=65535&v[U],k[F&b]=v[U],v[U]=F),M=W,I=B,W=2,0!==r&&M<O&&(F-r&65535)<=_-w&&(2!=j&&(W=me(r)),W<=5&&(1==j||3==W&&F-B>4096)&&(W=2)),M>=3&&W<=M){n=F+C-3,t=he(F-1-I,M-3),C-=M-1,M-=2;do{++F<=n&&(U=(U<<S^255&x[F+2])&z,r=65535&v[U],k[F&b]=v[U],v[U]=F)}while(0!=--M);if(D=0,W=2,F++,t&&(ye(!1),0===s.avail_out))return 0}else if(0!==D){if(t=he(0,255&x[F-1]),t&&ye(!1),F++,C--,0===s.avail_out)return 0}else D=1,F++,C--}return 0!==D&&(t=he(0,255&x[F-1]),D=0),ye(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&&(y=-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++)v[p]=0;if(s.flush_pending(),0===s.avail_out)return y=-1,0}}return 4!=o?0:1}}function _(){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}_.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new y,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 m={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},b=Object.assign({},m);function x(e){if(void 0!==e.chunkSize&&(b.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(b.maxWorkers=e.maxWorkers),void 0!==e.terminateWorkerTimeout&&(b.terminateWorkerTimeout=e.terminateWorkerTimeout),void 0!==e.useWebWorkers&&(b.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(b.Deflate=e.Deflate),void 0!==e.Inflate&&(b.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");b.workerScripts||(b.workerScripts={}),b.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");b.workerScripts||(b.workerScripts={}),b.workerScripts.inflate=e.workerScripts.inflate}}}const A="HTTP error ",k="HTTP Range not supported",v="text/plain",U="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",S="bytes";class T{constructor(){this.size=0}init(){this.initialized=!0}}class W extends T{}class I extends T{writeUint8Array(e){this.size+=e.length}}class D extends W{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 F extends I{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 B extends W{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 M(R,this.url,this.options);if(this.size=Number(e.headers.get(U)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(E)!=S)throw new Error(k);void 0===this.size&&await C(this,this.options)}else await C(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await M(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 C(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function C(e,t){const n=await M(z,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function M(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 W{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(U)),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 W{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new H(e,t):this.reader=new B(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,N=65535,q=67324752,K=134695760,G=33639248,Z=101010256,X=101075792,Y=117853008,J="/",Q=new Date(2107,11,31),$=new Date(1980,0,1),ee=[];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;ee[e]=t}class te{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^ee[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const ne={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=ne.getPartial(n);return 32===r?e.concat(t):ne._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)+ne.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]=ne.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=ne.getPartial(i);return r.push(ne.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},re={bytes:{fromBits(e){const t=ne.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(ne.partial(8*(3&n),r)),t}}},ie={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};ie.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=re.utf8String.toBits(e));const n=t._buffer=ne.concat(t._buffer,e),r=t._length,i=t._length=r+ne.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=ne.concat(t,[ne.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 se={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],y=e[t?1:3]^n[3],_=4;for(let e=0;e<r;e++)u=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&y]^n[_],h=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^l[255&p]^n[_+1],f=a[g>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&w]^n[_+2],y=a[y>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[_+3],_+=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&y]^n[_++],u=p,p=w,w=g,g=y,y=u;return i}}},ae={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=ne.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 ne.clamp(t,i)}}},oe={hmacSha1:class{constructor(e){const t=this,n=t._hash=ie.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}}},ce="Invalid pasword",le=16,de={name:"PBKDF2"},ue=Object.assign({hash:{name:"HMAC"}},de),he=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},de),fe=["deriveBits"],pe=[8,12,16],we=[16,24,32],ge=10,ye=[0,0,0,0],_e=crypto.subtle,me=re.bytes,be=se.aes,xe=ae.ctrGladman,Ae=oe.hmacSha1;class ke{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=ze(e,0,pe[t.strength]+2);await async function(e,t,n){await Ee(e,n,ze(t,0,pe[e.strength]));const r=ze(t,pe[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(ce)}(t,n,t.password),t.password=null,t.aesCtrGladman=new xe(new be(t.keys.key),Array.from(ye)),t.hmac=new Ae(t.keys.authentication),e=ze(e,pe[t.strength]+2)}return Ue(t,e,new Uint8Array(e.length-ge-(e.length-ge)%le),0,ge,!0)}async flush(){const e=this,t=e.pendingInput,n=ze(t,0,t.length-ge),r=ze(t,t.length-ge);let i=new Uint8Array(0);if(n.length){const t=me.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);i=me.fromBits(r)}let s=!0;if(e.signed){const t=ze(me.fromBits(e.hmac.digest()),0,ge);for(let e=0;e<ge;e++)t[e]!=r[e]&&(s=!1)}return{valid:s,data:i}}}class ve{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(pe[e.strength]));return await Ee(e,t,n),Re(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new xe(new be(t.keys.key),Array.from(ye)),t.hmac=new Ae(t.keys.authentication));const r=new Uint8Array(n.length+e.length-e.length%le);return r.set(n,0),Ue(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(me.toBits(e.pendingInput));e.hmac.update(n),t=me.fromBits(n)}const n=ze(me.fromBits(e.hmac.digest()),0,ge);return{data:Re(t,n),signature:n}}}function Ue(e,t,n,r,i,s){const a=t.length-i;let o;for(e.pendingInput.length&&(t=Re(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%le)),o=0;o<=a-le;o+=le){const i=me.toBits(ze(t,o,o+le));s&&e.hmac.update(i);const a=e.aesCtrGladman.update(i);s||e.hmac.update(a),n.set(me.fromBits(a),o+r)}return e.pendingInput=ze(t,o),n}async function Ee(e,t,n){const r=(new TextEncoder).encode(t),i=await _e.importKey("raw",r,ue,!1,fe),s=await _e.deriveBits(Object.assign({salt:n},he),i,8*(2*we[e.strength]+2)),a=new Uint8Array(s);e.keys={key:me.toBits(ze(a,0,we[e.strength])),authentication:me.toBits(ze(a,we[e.strength],2*we[e.strength])),passwordVerification:ze(a,2*we[e.strength])}}function Re(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 ze(e,t,n){return e.subarray(t,n)}const Se=12;class Te{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;if(t.password){const n=Ie(t,e.subarray(0,Se));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(ce);e=e.subarray(Se)}return Ie(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class We{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;let n,r;if(t.password){t.password=null;const i=crypto.getRandomValues(new Uint8Array(Se));i[11]=t.passwordVerification,n=new Uint8Array(e.length+i.length),n.set(De(t,i),0),r=Se}else n=new Uint8Array(e.length),r=0;return n.set(De(t,e),r),n}async flush(){return{data:new Uint8Array(0)}}}function Ie(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ce(e)^t[r],Be(e,n[r]);return n}function De(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ce(e)^t[r],Be(e,t[r]);return n}function Fe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new te(e.keys[0]),e.crcKey2=new te(e.keys[2]);for(let n=0;n<t.length;n++)Be(e,t.charCodeAt(n))}function Be(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=He(e.keys[1]+Me(e.keys[0])),e.keys[1]=He(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function Ce(e){const t=2|e.keys[2];return Me(Math.imul(t,1^t)>>>8)}function Me(e){return 255&e}function He(e){return 4294967295&e}const Oe="deflate",Pe="Invalid signature";class je{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 te,zipCrypto:s,decrypt:l&&s?new Te(n,a):new ke(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(Pe);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(Pe)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class Le{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 te,zipCrypto:s,encrypt:t&&s?new We(a,o):new ve(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 Ve="init",Ne="append",qe="flush",Ke="message";var Ge=(e,t,n,r,i,s,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),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(Ke,s,!1),e.interface={append:e=>r({type:Ne,data:e}),flush:()=>r({type:qe})});return e.interface;async function r(r){if(!n){const n=e.options,r=e.scripts.slice(1);await i({scripts:r,type:Ve,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==Ve||i==qe||i==Ne){const t=r.data;i==qe?(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(Oe)?new Le(e,t,n):t.codecType.startsWith("inflate")?new je(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 Ze=[],Xe=[];function Ye(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}function Je(e,t){if(e&&e.aborted)throw t.flush(),new Error("Abort error")}async function Qe(e,t){return t.length&&await e.writeUint8Array(t),t.length}const $e=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod"];class et{constructor(e){$e.forEach((t=>this[t]=e[t]))}}const tt="File already exists",nt="Zip file comment exceeds 64KB",rt="File entry comment exceeds 64KB",it="File entry name exceeds 64KB",st="Version exceeds 65535",at="The modification date must be between 1/1/1980 and 12/31/2107",ot="The strength must equal 1, 2, or 3",ct="Extra field type exceeds 65535",lt="Extra field data exceeds 64KB",dt="Zip64 is not supported when keepOrder is set to false",ut=new Uint8Array([7,0,2,0,65,69,3,0,0]);let ht=0;function ft(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 pt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function wt(e,t,n){e.setUint8(t,n)}function gt(e,t,n){e.setUint16(t,n,!0)}function yt(e,t,n){e.setUint32(t,n,!0)}function _t(e,t,n){e.setBigUint64(t,n,!0)}function mt(e,t,n){e.set(t,n)}function bt(e){return new DataView(e.buffer)}x({Deflate:function(e){const t=new _,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(Math.floor(r/16383)+1);var r;const i=new Uint8Array(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=function(e,r){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(i)):d.push(i.slice(0,t.next_out_index))),l+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return 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,r,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(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new Uint8Array(a),o.forEach((function(e){r.set(e,s),s+=e.length})),r}}}),e.BlobReader=D,e.BlobWriter=F,e.Data64URIReader=class extends W{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 I{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=tt,e.ERR_HTTP_RANGE=k,e.ERR_INVALID_COMMENT=nt,e.ERR_INVALID_DATE=at,e.ERR_INVALID_ENCRYPTION_STRENGTH=ot,e.ERR_INVALID_ENTRY_COMMENT=rt,e.ERR_INVALID_ENTRY_NAME=it,e.ERR_INVALID_EXTRAFIELD_DATA=lt,e.ERR_INVALID_EXTRAFIELD_TYPE=ct,e.ERR_INVALID_VERSION=st,e.ERR_UNSUPPORTED_FORMAT=dt,e.HttpRangeReader=class extends j{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=j,e.Reader=W,e.TextReader=class extends W{constructor(e){super(),this.blobReader=new D(new Blob([e],{type:v}))}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 I{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:v})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:v})}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 W{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 I{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=I,e.ZipWriter=class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:b,files:new Map,offset:e.size,pendingCompressedSize:0,pendingEntries:[]})}async add(e="",t,n={}){const r=this;if(!(ht<r.config.maxWorkers))return new Promise(((i,s)=>r.pendingEntries.push({name:e,reader:t,options:n,resolve:i,reject:s})));ht++;try{return await async function(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(J)?t+=J:r.directory=t.endsWith(J);if(e.files.has(t))throw new Error(tt);const i=(new TextEncoder).encode(t);if(i.length>N)throw new Error(it);const s=r.comment||"",a=(new TextEncoder).encode(s);if(a.length>N)throw new Error(rt);const o=e.options.version||r.version||0;if(o>N)throw new Error(st);const c=pt(e,r,"lastModDate")||new Date;if(c<$||c>Q)throw new Error(at);const l=pt(e,r,"password"),d=pt(e,r,"encryptionStrength")||3,u=pt(e,r,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(ot);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>N)throw new Error(ct);if(e.length>N)throw new Error(lt);mt(h,new Uint16Array([n]),t),mt(h,new Uint16Array([e.length]),t+2),mt(h,e,t+4),t+=4+e.length}))}let p=!1,w=0,g=pt(e,r,"keepOrder");void 0===g&&(g=!0);if(!1!==r.zip64&&!1!==e.options.zip64&&(p=r.zip64||e.options.zip64,!p)){let t=0;if(n&&(n.initialized||await n.init(),t=n.size,w=function(e){return e+5*(Math.floor(e/16383)+1)}(t)),p=e.offset+e.pendingCompressedSize>=V||t>=V||w>=V,!g&&p)throw new Error(dt);e.pendingCompressedSize+=w,await Promise.resolve()}const y=pt(e,r,"level"),_=pt(e,r,"useWebWorkers"),m=pt(e,r,"bufferedWrite");let b=pt(e,r,"dataDescriptor");const x=pt(e,r,"signal");void 0===b&&(b=!0);const A=await async function(e,t,n,r){const i=e.files,s=e.writer,a=Array.from(i.values()).pop();let o,c,l,d={};i.set(t,d);try{let u,h,f;if(r.keepOrder&&(u=a&&a.lock),d.lock=f=new Promise((e=>l=e)),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(h=new F,h.init(),o=!0):(e.lockWrite=new Promise((e=>c=e)),s.initialized||await s.init(),h=s),d=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:y,encryptionStrength:_}=r,m=Boolean(a&&a.length),b=0!==o&&!u;let x;if(m&&!l){x=new Uint8Array(ut.length+2);const e=bt(x);gt(e,0,39169),mt(x,ut,2),wt(e,8,_)}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=A.uncompressedSize=0,v=2048;d&&(v|=8);let U=0;b&&(U=8);c&&(A.version=A.version>45?A.version:45);m&&(v|=1,l||(A.version=A.version>51?A.version:51,U=99,b&&(A.rawExtraFieldAES[9]=8)));A.compressionMethod=U;const E=A.headerArray=new Uint8Array(26),R=bt(E);gt(R,0,A.version),gt(R,2,v),gt(R,4,U);const z=new Uint32Array(1),S=bt(z);gt(S,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),gt(S,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const T=z[0];yt(R,6,T),gt(R,22,i.length),gt(R,24,0),gt(R,24,x.length+A.rawExtraField.length);const W=new Uint8Array(30+i.length+x.length+A.rawExtraField.length);let I;yt(bt(W),0,q),mt(W,E,4),mt(W,i,30),mt(W,x,30+i.length),mt(W,A.rawExtraField,30+i.length+x.length);let D=0;if(e){k=A.uncompressedSize=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(Ze.length<n.maxWorkers){const a={};return Ze.push(a),Ge(a,e,t,n,s,r,i)}{const a=Ze.find((e=>!e.busy));return a?(Ye(a),Ge(a,e,t,n,s,r,i)):new Promise((n=>Xe.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:i})))}function s(e){if(Xe.length){const[{resolve:t,codecConstructor:r,options:i,webWorker:a,scripts:o}]=Xe.splice(0,1);t(Ge(e,r,i,n,s,a,o))}else e.worker?(Ye(e),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(e.terminateTimeout=setTimeout((()=>{Ze=Ze.filter((t=>t!=e)),e.terminate()}),n.terminateWorkerTimeout))):Ze=Ze.filter((t=>t!=e))}}(n.Deflate,{codecType:Oe,level:o,password:a,encryptionStrength:_,zipCrypto:m&&l,passwordVerification:m&&l&&T>>8&255,signed:!0,compressed:b,encrypted:m,useWebWorkers:w},n);await t.writeUint8Array(W),A.dataWritten=!0,e.initialized||await e.init(),I=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){Je(d,e);const u=await t.readUint8Array(c+r,Math.min(o,i-c)),h=u.length;Je(d,e);const f=await e.append(u);if(Je(d,e),l+=await Qe(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 Qe(n,t.data),{signature:t.signature,length:l}}}()}(r,e,t,0,k,n,{onprogress:g,signal:y}),D=I.length}else await t.writeUint8Array(W),A.dataWritten=!0;let F,B=new Uint8Array(0);d&&(B=new Uint8Array(c?24:16),F=bt(B),yt(F,0,K));if(e){const e=I.signature;if(m&&!l||void 0===e||(yt(R,10,e),A.signature=e,d&&yt(F,4,e)),c){const e=bt(A.rawExtraFieldZip64);gt(e,0,1),gt(e,2,24),yt(R,14,V),_t(e,12,BigInt(D)),yt(R,18,V),_t(e,4,BigInt(k)),d&&(_t(F,8,BigInt(D)),_t(F,16,BigInt(k)))}else yt(R,14,D),yt(R,18,k),d&&(yt(F,8,D),yt(F,12,k))}d&&await t.writeUint8Array(B);const C=W.length+D+B.length;return Object.assign(A,{compressedSize:D,lastModDate:s,rawLastModDate:T,encrypted:m,length:C}),A}(n,h,e.config,r),d.lock=f,i.set(t,d),o){let t=0;const n=h.getData();let a;await Promise.all([e.lockWrite,u]);do{a=Array.from(i.values()).find((e=>e.writingBufferedData)),a&&await a.lock}while(a&&a.lock);if(d.writingBufferedData=!0,!r.dataDescriptor){const e=26,i=await ft(n,0,e),a=new DataView(i);d.encrypted&&!r.zipCrypto||yt(a,14,d.signature),d.zip64?(yt(a,18,V),yt(a,22,V)):(yt(a,18,d.compressedSize),yt(a,22,d.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 ft(t,n,n+r);await e.writeUint8Array(new Uint8Array(s)),n+=r,await i()}}await i()}(s,n,t),delete d.writingBufferedData}if(d.offset=e.offset,d.zip64){_t(bt(d.rawExtraFieldZip64),20,BigInt(d.offset))}return e.offset+=d.length,d}catch(n){throw(o&&d.writingBufferedData||!o&&d.dataWritten)&&(n.corruptedEntry=e.hasCorruptedEntries=!0,d.uncompressedSize&&(e.offset+=d.uncompressedSize)),i.delete(t),n}finally{l(),c&&c()}}(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:a,version:o,lastModDate:c,rawExtraField:h,zip64:p,password:l,level:y,useWebWorkers:_,encryptionStrength:d,zipCrypto:u,bufferedWrite:m,keepOrder:g,dataDescriptor:b,signal:x}));w&&(e.pendingCompressedSize-=w);return Object.assign(A,{name:t,comment:s,extraField:f}),new et(A)}(r,e,t,n)}finally{ht--;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),t={}){return async function(e,t,n){const r=e.writer,i=e.files;let s=0,a=0,o=e.offset,c=i.size;for(const[,e]of i)a+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const l=e.options.zip64||o>=V||a>=V||c>=N,d=new Uint8Array(a+(l?98:22)),u=bt(d);if(t&&t.length){if(!(t.length<=N))throw new Error(nt);gt(u,s+20,t.length)}for(const[e,t]of Array.from(i.values()).entries()){const{rawFilename:r,rawExtraFieldZip64:a,rawExtraFieldAES:o,rawExtraField:c,rawComment:l,version:h,headerArray:f,directory:p,zip64:w}=t,g=a.length+o.length+c.length;if(yt(u,s,G),gt(u,s+4,h),mt(d,f,s+6),gt(u,s+30,g),gt(u,s+32,l.length),p&&wt(u,s+38,16),yt(u,s+42,w?V:t.offset),mt(d,r,s+46),mt(d,a,s+46+r.length),mt(d,o,s+46+r.length+a.length),mt(d,c,46+r.length+a.length+o.length),mt(d,l,s+46+r.length+g),s+=46+r.length+g+l.length,n.onprogress)try{n.onprogress(e+1,i.size,new et(t))}catch(e){}}l&&(yt(u,s,X),_t(u,s+4,BigInt(44)),gt(u,s+12,45),gt(u,s+14,45),_t(u,s+24,BigInt(c)),_t(u,s+32,BigInt(c)),_t(u,s+40,BigInt(a)),_t(u,s+48,BigInt(o)),yt(u,s+56,Y),_t(u,s+64,BigInt(o)+BigInt(a)),yt(u,s+72,1),c=N,o=V,a=V,s+=76);yt(u,s,Z),gt(u,s+8,c),gt(u,s+10,c),yt(u,s+12,a),yt(u,s+16,o),await r.writeUint8Array(d),t&&t.length&&await r.writeUint8Array(t)}(this,e,t)}},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 y(){const e=this;let s,a,l,y,_,m,b,x,A,k,v,U,E,R,z,S,T,W,D,I,F,B,C,M,H,O,P,j,L,V,N,q,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++)N[2*t]=0;for(t=0;t<30;t++)q[2*t]=0;for(t=0;t<19;t++)K[2*t]=0;N[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?N[2*r]++:(ee++,n--,N[2*(o._length_code[r]+t+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=F-T,a=0;a<30;a++)i+=q[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(N,G.max_code),se(q,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(N,e-1),de(q,t-1)}(G.max_code+1,Z.max_code+1,a+1),fe(N,q)),ie(),r&&pe()}function ye(e){ge(T>=0?T:-1,F-T,e),T=F,s.flush_pending()}function _e(){let e,t,n,r;do{if(r=A-C-F,0===r&&0===F&&0===C)r=_;else if(-1==r)r--;else if(F>=_+_-w){x.set(x.subarray(_,_+_),0),B-=_,F-=_,T-=_,e=E,n=e;do{t=65535&v[--n],v[n]=t>=_?t-_:0}while(0!=--e);e=_,n=e;do{t=65535&k[--n],k[n]=t>=_?t-_:0}while(0!=--e);r+=_}if(0===s.avail_in)return;e=s.read_buf(x,F+C,r),C+=e,C>=3&&(U=255&x[F],U=(U<<S^255&x[F+1])&z)}while(C<w&&0!==s.avail_in)}function me(e){let t,n,r=H,i=F,s=M;const a=F>_-w?F-(_-w):0;let o=V;const c=b,l=F+p;let d=x[i+s-1],u=x[i+s];M>=L&&(r>>=2),o>C&&(o=C);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(B=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<=C?s:C}function be(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,a=h,y=0,G.dyn_tree=N,G.stat_desc=c.static_l_desc,Z.dyn_tree=q,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*_,v[E-1]=0;for(let e=0;e<E-1;e++)v[e]=0;O=d[P].max_lazy,L=d[P].good_length,V=d[P].nice_length,H=d[P].max_chain,F=0,T=0,C=0,W=M=2,I=0,U=0}(),0}e.depth=[],e.bl_count=[],e.heap=[],N=[],q=[],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,m=i,_=1<<m,b=_-1,R=a+7,E=1<<R,z=E-1,S=Math.floor((R+3-1)/3),x=new Uint8Array(2*_),k=[],v=[],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,be(t))},e.deflateEnd=function(){return 42!=a&&a!=h&&a!=f?r:(e.pending_buf=null,v=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>_-w&&(s=_-w,o=n-s),x.set(t.subarray(o,o+s),0),F=s,T=s,U=255&x[0],U=(U<<S^255&x[1])&z,i=0;i<=s-3;i++)U=(U<<S^255&x[i+2])&z,k[i&b]=v[U],v[U]=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=y,y=o,42==a&&(g=8+(m-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==F&&(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 y=-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!==C||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(C<=1){if(_e(),0===C&&0==e)return 0;if(0===C)break}if(F+=C,C=0,t=T+n,(0===F||F>=t)&&(C=F-t,F=t,ye(!1),0===s.avail_out))return 0;if(F-T>=_-w&&(ye(!1),0===s.avail_out))return 0}return ye(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(C<w){if(_e(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(U=(U<<S^255&x[F+2])&z,n=65535&v[U],k[F&b]=v[U],v[U]=F),0!==n&&(F-n&65535)<=_-w&&2!=j&&(W=me(n)),W>=3)if(t=he(F-B,W-3),C-=W,W<=O&&C>=3){W--;do{F++,U=(U<<S^255&x[F+2])&z,n=65535&v[U],k[F&b]=v[U],v[U]=F}while(0!=--W);F++}else F+=W,W=0,U=255&x[F],U=(U<<S^255&x[F+1])&z;else t=he(0,255&x[F]),C--,F++;if(t&&(ye(!1),0===s.avail_out))return 0}return ye(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(C<w){if(_e(),C<w&&0==e)return 0;if(0===C)break}if(C>=3&&(U=(U<<S^255&x[F+2])&z,r=65535&v[U],k[F&b]=v[U],v[U]=F),M=W,D=B,W=2,0!==r&&M<O&&(F-r&65535)<=_-w&&(2!=j&&(W=me(r)),W<=5&&(1==j||3==W&&F-B>4096)&&(W=2)),M>=3&&W<=M){n=F+C-3,t=he(F-1-D,M-3),C-=M-1,M-=2;do{++F<=n&&(U=(U<<S^255&x[F+2])&z,r=65535&v[U],k[F&b]=v[U],v[U]=F)}while(0!=--M);if(I=0,W=2,F++,t&&(ye(!1),0===s.avail_out))return 0}else if(0!==I){if(t=he(0,255&x[F-1]),t&&ye(!1),F++,C--,0===s.avail_out)return 0}else I=1,F++,C--}return 0!==I&&(t=he(0,255&x[F-1]),I=0),ye(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&&(y=-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++)v[p]=0;if(s.flush_pending(),0===s.avail_out)return y=-1,0}}return 4!=o?0:1}}function _(){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}_.prototype={deflateInit:function(e,t){const n=this;return n.dstate=new y,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 m={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},b=Object.assign({},m);function x(e){if(void 0!==e.chunkSize&&(b.chunkSize=e.chunkSize),void 0!==e.maxWorkers&&(b.maxWorkers=e.maxWorkers),void 0!==e.terminateWorkerTimeout&&(b.terminateWorkerTimeout=e.terminateWorkerTimeout),void 0!==e.useWebWorkers&&(b.useWebWorkers=e.useWebWorkers),void 0!==e.Deflate&&(b.Deflate=e.Deflate),void 0!==e.Inflate&&(b.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");b.workerScripts||(b.workerScripts={}),b.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");b.workerScripts||(b.workerScripts={}),b.workerScripts.inflate=e.workerScripts.inflate}}}const A="HTTP error ",k="HTTP Range not supported",v="text/plain",U="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",S="bytes";class T{constructor(){this.size=0}init(){this.initialized=!0}}class W extends T{}class D extends T{writeUint8Array(e){this.size+=e.length}}class I extends W{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 F extends D{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 B extends W{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 M(R,this.url,this.options);if(this.size=Number(e.headers.get(U)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(E)!=S)throw new Error(k);void 0===this.size&&await C(this,this.options)}else await C(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await M(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 C(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function C(e,t){const n=await M(z,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function M(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 W{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(U)),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 W{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new H(e,t):this.reader=new B(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,N=65535,q=67324752,K=134695760,G=33639248,Z=101010256,X=101075792,Y=117853008,J="/",Q=new Date(2107,11,31),$=new Date(1980,0,1),ee=[];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;ee[e]=t}class te{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^ee[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const ne={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=ne.getPartial(n);return 32===r?e.concat(t):ne._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)+ne.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]=ne.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=ne.getPartial(i);return r.push(ne.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},re={bytes:{fromBits(e){const t=ne.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(ne.partial(8*(3&n),r)),t}}},ie={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};ie.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=re.utf8String.toBits(e));const n=t._buffer=ne.concat(t._buffer,e),r=t._length,i=t._length=r+ne.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=ne.concat(t,[ne.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 se={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],y=e[t?1:3]^n[3],_=4;for(let e=0;e<r;e++)u=a[p>>>24]^o[w>>16&255]^c[g>>8&255]^l[255&y]^n[_],h=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^l[255&p]^n[_+1],f=a[g>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&w]^n[_+2],y=a[y>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[_+3],_+=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&y]^n[_++],u=p,p=w,w=g,g=y,y=u;return i}}},ae={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=ne.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 ne.clamp(t,i)}}},oe={hmacSha1:class{constructor(e){const t=this,n=t._hash=ie.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}}},ce="Invalid pasword",le=16,de={name:"PBKDF2"},ue=Object.assign({hash:{name:"HMAC"}},de),he=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},de),fe=["deriveBits"],pe=[8,12,16],we=[16,24,32],ge=10,ye=[0,0,0,0],_e=crypto.subtle,me=re.bytes,be=se.aes,xe=ae.ctrGladman,Ae=oe.hmacSha1;class ke{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=ze(e,0,pe[t.strength]+2);await async function(e,t,n){await Ee(e,n,ze(t,0,pe[e.strength]));const r=ze(t,pe[e.strength]),i=e.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(ce)}(t,n,t.password),t.password=null,t.aesCtrGladman=new xe(new be(t.keys.key),Array.from(ye)),t.hmac=new Ae(t.keys.authentication),e=ze(e,pe[t.strength]+2)}return Ue(t,e,new Uint8Array(e.length-ge-(e.length-ge)%le),0,ge,!0)}async flush(){const e=this,t=e.pendingInput,n=ze(t,0,t.length-ge),r=ze(t,t.length-ge);let i=new Uint8Array(0);if(n.length){const t=me.toBits(n);e.hmac.update(t);const r=e.aesCtrGladman.update(t);i=me.fromBits(r)}let s=!0;if(e.signed){const t=ze(me.fromBits(e.hmac.digest()),0,ge);for(let e=0;e<ge;e++)t[e]!=r[e]&&(s=!1)}return{valid:s,data:i}}}class ve{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(pe[e.strength]));return await Ee(e,t,n),Re(n,e.keys.passwordVerification)}(t,t.password),t.password=null,t.aesCtrGladman=new xe(new be(t.keys.key),Array.from(ye)),t.hmac=new Ae(t.keys.authentication));const r=new Uint8Array(n.length+e.length-e.length%le);return r.set(n,0),Ue(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(me.toBits(e.pendingInput));e.hmac.update(n),t=me.fromBits(n)}const n=ze(me.fromBits(e.hmac.digest()),0,ge);return{data:Re(t,n),signature:n}}}function Ue(e,t,n,r,i,s){const a=t.length-i;let o;for(e.pendingInput.length&&(t=Re(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%le)),o=0;o<=a-le;o+=le){const i=me.toBits(ze(t,o,o+le));s&&e.hmac.update(i);const a=e.aesCtrGladman.update(i);s||e.hmac.update(a),n.set(me.fromBits(a),o+r)}return e.pendingInput=ze(t,o),n}async function Ee(e,t,n){const r=(new TextEncoder).encode(t),i=await _e.importKey("raw",r,ue,!1,fe),s=await _e.deriveBits(Object.assign({salt:n},he),i,8*(2*we[e.strength]+2)),a=new Uint8Array(s);e.keys={key:me.toBits(ze(a,0,we[e.strength])),authentication:me.toBits(ze(a,we[e.strength],2*we[e.strength])),passwordVerification:ze(a,2*we[e.strength])}}function Re(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 ze(e,t,n){return e.subarray(t,n)}const Se=12;class Te{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;if(t.password){const n=De(t,e.subarray(0,Se));if(t.password=null,n[11]!=t.passwordVerification)throw new Error(ce);e=e.subarray(Se)}return De(t,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class We{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Fe(this,e)}async append(e){const t=this;let n,r;if(t.password){t.password=null;const i=crypto.getRandomValues(new Uint8Array(Se));i[11]=t.passwordVerification,n=new Uint8Array(e.length+i.length),n.set(Ie(t,i),0),r=Se}else n=new Uint8Array(e.length),r=0;return n.set(Ie(t,e),r),n}async flush(){return{data:new Uint8Array(0)}}}function De(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ce(e)^t[r],Be(e,n[r]);return n}function Ie(e,t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ce(e)^t[r],Be(e,t[r]);return n}function Fe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new te(e.keys[0]),e.crcKey2=new te(e.keys[2]);for(let n=0;n<t.length;n++)Be(e,t.charCodeAt(n))}function Be(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=He(e.keys[1]+Me(e.keys[0])),e.keys[1]=He(Math.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function Ce(e){const t=2|e.keys[2];return Me(Math.imul(t,1^t)>>>8)}function Me(e){return 255&e}function He(e){return 4294967295&e}const Oe="deflate",Pe="Invalid signature";class je{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 te,zipCrypto:s,decrypt:l&&s?new Te(n,a):new ke(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(Pe);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(Pe)}return e.compressed&&(n=await e.inflate.append(n)||new Uint8Array(0),await e.inflate.flush()),{data:n,signature:t}}}class Le{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 te,zipCrypto:s,encrypt:t&&s?new We(a,o):new ve(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 Ve="init",Ne="append",qe="flush",Ke="message";var Ge=(e,t,n,r,i,s,a)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:a,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),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(Ke,s,!1),e.interface={append:e=>r({type:Ne,data:e}),flush:()=>r({type:qe})});return e.interface;async function r(r){if(!n){const n=e.options,r=e.scripts.slice(1);await i({scripts:r,type:Ve,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==Ve||i==qe||i==Ne){const t=r.data;i==qe?(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(Oe)?new Le(e,t,n):t.codecType.startsWith("inflate")?new je(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 Ze=[],Xe=[];function Ye(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}function Je(e,t){if(e&&e.aborted)throw t.flush(),new Error("Abort error")}async function Qe(e,t){return t.length&&await e.writeUint8Array(t),t.length}const $e=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod"];class et{constructor(e){$e.forEach((t=>this[t]=e[t]))}}const tt="File already exists",nt="Zip file comment exceeds 64KB",rt="File entry comment exceeds 64KB",it="File entry name exceeds 64KB",st="Version exceeds 65535",at="The modification date must be between 1/1/1980 and 12/31/2107",ot="The strength must equal 1, 2, or 3",ct="Extra field type exceeds 65535",lt="Extra field data exceeds 64KB",dt="Zip64 is not supported when keepOrder is set to false",ut=new Uint8Array([7,0,2,0,65,69,3,0,0]);let ht=0;function ft(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 pt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function wt(e,t,n){e.setUint8(t,n)}function gt(e,t,n){e.setUint16(t,n,!0)}function yt(e,t,n){e.setUint32(t,n,!0)}function _t(e,t,n){e.setBigUint64(t,n,!0)}function mt(e,t,n){e.set(t,n)}function bt(e){return new DataView(e.buffer)}x({Deflate:function(e){const t=new _,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(Math.floor(r/16383)+1);var r;const i=new Uint8Array(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=function(e,r){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(i)):d.push(i.slice(0,t.next_out_index))),l+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return 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,r,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(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new Uint8Array(a),o.forEach((function(e){r.set(e,s),s+=e.length})),r}}}),e.BlobReader=I,e.BlobWriter=F,e.Data64URIReader=class extends W{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 D{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=tt,e.ERR_HTTP_RANGE=k,e.ERR_INVALID_COMMENT=nt,e.ERR_INVALID_DATE=at,e.ERR_INVALID_ENCRYPTION_STRENGTH=ot,e.ERR_INVALID_ENTRY_COMMENT=rt,e.ERR_INVALID_ENTRY_NAME=it,e.ERR_INVALID_EXTRAFIELD_DATA=lt,e.ERR_INVALID_EXTRAFIELD_TYPE=ct,e.ERR_INVALID_VERSION=st,e.ERR_UNSUPPORTED_FORMAT=dt,e.HttpRangeReader=class extends j{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=j,e.Reader=W,e.TextReader=class extends W{constructor(e){super(),this.blobReader=new I(new Blob([e],{type:v}))}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 D{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:v})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:v})}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 W{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 D{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=D,e.ZipWriter=class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:b,files:new Map,offset:e.size,pendingCompressedSize:0,pendingEntries:[]})}async add(e="",t,n={}){const r=this;if(!(ht<r.config.maxWorkers))return new Promise(((i,s)=>r.pendingEntries.push({name:e,reader:t,options:n,resolve:i,reject:s})));ht++;try{return await async function(e,t,n,r){t=t.trim(),r.directory&&!t.endsWith(J)?t+=J:r.directory=t.endsWith(J);if(e.files.has(t))throw new Error(tt);const i=(new TextEncoder).encode(t);if(i.length>N)throw new Error(it);const s=r.comment||"",a=(new TextEncoder).encode(s);if(a.length>N)throw new Error(rt);const o=e.options.version||r.version||0;if(o>N)throw new Error(st);const c=pt(e,r,"lastModDate")||new Date;if(c<$||c>Q)throw new Error(at);const l=pt(e,r,"password"),d=pt(e,r,"encryptionStrength")||3,u=pt(e,r,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(ot);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>N)throw new Error(ct);if(e.length>N)throw new Error(lt);mt(h,new Uint16Array([n]),t),mt(h,new Uint16Array([e.length]),t+2),mt(h,e,t+4),t+=4+e.length}))}let p=!1,w=0,g=pt(e,r,"keepOrder");void 0===g&&(g=!0);if(!1!==r.zip64&&!1!==e.options.zip64&&(p=r.zip64||e.options.zip64,!p)){let t=0;if(n&&(n.initialized||await n.init(),t=n.size,w=function(e){return e+5*(Math.floor(e/16383)+1)}(t)),p=e.offset+e.pendingCompressedSize>=V||t>=V||w>=V,!g&&p)throw new Error(dt);e.pendingCompressedSize+=w,await Promise.resolve()}const y=pt(e,r,"level"),_=pt(e,r,"useWebWorkers"),m=pt(e,r,"bufferedWrite");let b=pt(e,r,"dataDescriptor");const x=pt(e,r,"signal");void 0===b&&(b=!0);const A=await async function(e,t,n,r){const i=e.files,s=e.writer,a=Array.from(i.values()).pop();let o,c,l,d={};i.set(t,d);try{let u,h,f;if(r.keepOrder&&(u=a&&a.lock),d.lock=f=new Promise((e=>l=e)),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(h=new F,h.init(),o=!0):(e.lockWrite=new Promise((e=>c=e)),s.initialized||await s.init(),h=s),d=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:y,encryptionStrength:_}=r,m=Boolean(a&&a.length),b=0!==o&&!u;let x;if(m&&!l){x=new Uint8Array(ut.length+2);const e=bt(x);gt(e,0,39169),mt(x,ut,2),wt(e,8,_)}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=A.uncompressedSize=0,v=2048;d&&(v|=8);let U=0;b&&(U=8);c&&(A.version=A.version>45?A.version:45);m&&(v|=1,l||(A.version=A.version>51?A.version:51,U=99,b&&(A.rawExtraFieldAES[9]=8)));A.compressionMethod=U;const E=A.headerArray=new Uint8Array(26),R=bt(E);gt(R,0,A.version),gt(R,2,v),gt(R,4,U);const z=new Uint32Array(1),S=bt(z);gt(S,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),gt(S,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const T=z[0];yt(R,6,T),gt(R,22,i.length),gt(R,24,0),gt(R,24,x.length+A.rawExtraField.length);const W=new Uint8Array(30+i.length+x.length+A.rawExtraField.length);let D;yt(bt(W),0,q),mt(W,E,4),mt(W,i,30),mt(W,x,30+i.length),mt(W,A.rawExtraField,30+i.length+x.length);let I=0;if(e){k=A.uncompressedSize=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(Ze.length<n.maxWorkers){const a={};return Ze.push(a),Ge(a,e,t,n,s,r,i)}{const a=Ze.find((e=>!e.busy));return a?(Ye(a),Ge(a,e,t,n,s,r,i)):new Promise((n=>Xe.push({resolve:n,codecConstructor:e,options:t,webWorker:r,scripts:i})))}function s(e){if(Xe.length){const[{resolve:t,codecConstructor:r,options:i,webWorker:a,scripts:o}]=Xe.splice(0,1);t(Ge(e,r,i,n,s,a,o))}else e.worker?(Ye(e),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(e.terminateTimeout=setTimeout((()=>{Ze=Ze.filter((t=>t!=e)),e.terminate()}),n.terminateWorkerTimeout))):Ze=Ze.filter((t=>t!=e))}}(n.Deflate,{codecType:Oe,level:o,password:a,encryptionStrength:_,zipCrypto:m&&l,passwordVerification:m&&l&&T>>8&255,signed:!0,compressed:b,encrypted:m,useWebWorkers:w},n);await t.writeUint8Array(W),A.dataWritten=!0,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){Je(d,e);const u=await t.readUint8Array(c+r,Math.min(o,i-c)),h=u.length;Je(d,e);const f=await e.append(u);if(Je(d,e),l+=await Qe(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 Qe(n,t.data),{signature:t.signature,length:l}}}()}(r,e,t,0,k,n,{onprogress:g,signal:y}),I=D.length}else await t.writeUint8Array(W),A.dataWritten=!0;let F,B=new Uint8Array(0);d&&(B=new Uint8Array(c?24:16),F=bt(B),yt(F,0,K));if(e){const e=D.signature;if(m&&!l||void 0===e||(yt(R,10,e),A.signature=e,d&&yt(F,4,e)),c){const e=bt(A.rawExtraFieldZip64);gt(e,0,1),gt(e,2,24),yt(R,14,V),_t(e,12,BigInt(I)),yt(R,18,V),_t(e,4,BigInt(k)),d&&(_t(F,8,BigInt(I)),_t(F,16,BigInt(k)))}else yt(R,14,I),yt(R,18,k),d&&(yt(F,8,I),yt(F,12,k))}d&&await t.writeUint8Array(B);const C=W.length+I+B.length;return Object.assign(A,{compressedSize:I,lastModDate:s,rawLastModDate:T,encrypted:m,length:C}),A}(n,h,e.config,r),d.lock=f,i.set(t,d),o){let t=0;const n=h.getData();let a;await Promise.all([e.lockWrite,u]);do{a=Array.from(i.values()).find((e=>e.writingBufferedData)),a&&await a.lock}while(a&&a.lock);if(d.writingBufferedData=!0,!r.dataDescriptor){const e=26,i=await ft(n,0,e),a=new DataView(i);d.encrypted&&!r.zipCrypto||yt(a,14,d.signature),d.zip64?(yt(a,18,V),yt(a,22,V)):(yt(a,18,d.compressedSize),yt(a,22,d.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 ft(t,n,n+r);await e.writeUint8Array(new Uint8Array(s)),n+=r,await i()}}await i()}(s,n,t),delete d.writingBufferedData}if(d.offset=e.offset,d.zip64){_t(bt(d.rawExtraFieldZip64),20,BigInt(d.offset))}return e.offset+=d.length,d}catch(n){throw(o&&d.writingBufferedData||!o&&d.dataWritten)&&(n.corruptedEntry=e.hasCorruptedEntries=!0,d.uncompressedSize&&(e.offset+=d.uncompressedSize)),i.delete(t),n}finally{l(),c&&c()}}(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:a,version:o,lastModDate:c,rawExtraField:h,zip64:p,password:l,level:y,useWebWorkers:_,encryptionStrength:d,zipCrypto:u,bufferedWrite:m,keepOrder:g,dataDescriptor:b,signal:x}));w&&(e.pendingCompressedSize-=w);return Object.assign(A,{name:t,comment:s,extraField:f}),new et(A)}(r,e,t,n)}finally{ht--;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),t={}){return await async function(e,t,n){const r=e.writer,i=e.files;let s=0,a=0,o=e.offset,c=i.size;for(const[,e]of i)a+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const l=e.options.zip64||o>=V||a>=V||c>=N,d=new Uint8Array(a+(l?98:22)),u=bt(d);if(t&&t.length){if(!(t.length<=N))throw new Error(nt);gt(u,s+20,t.length)}for(const[e,t]of Array.from(i.values()).entries()){const{rawFilename:r,rawExtraFieldZip64:a,rawExtraFieldAES:o,rawExtraField:c,rawComment:l,version:h,headerArray:f,directory:p,zip64:w}=t,g=a.length+o.length+c.length;if(yt(u,s,G),gt(u,s+4,h),mt(d,f,s+6),gt(u,s+30,g),gt(u,s+32,l.length),p&&wt(u,s+38,16),yt(u,s+42,w?V:t.offset),mt(d,r,s+46),mt(d,a,s+46+r.length),mt(d,o,s+46+r.length+a.length),mt(d,c,46+r.length+a.length+o.length),mt(d,l,s+46+r.length+g),s+=46+r.length+g+l.length,n.onprogress)try{n.onprogress(e+1,i.size,new et(t))}catch(e){}}l&&(yt(u,s,X),_t(u,s+4,BigInt(44)),gt(u,s+12,45),gt(u,s+14,45),_t(u,s+24,BigInt(c)),_t(u,s+32,BigInt(c)),_t(u,s+40,BigInt(a)),_t(u,s+48,BigInt(o)),yt(u,s+56,Y),_t(u,s+64,BigInt(o)+BigInt(a)),yt(u,s+72,1),c=N,o=V,a=V,s+=76);yt(u,s,Z),gt(u,s+8,c),gt(u,s+10,c),yt(u,s+12,a),yt(u,s+16,o),await r.writeUint8Array(d),t&&t.length&&await r.writeUint8Array(t)}(this,e,t),this.writer.getData()}},e.configure=x,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -118,3 +118,4 @@ /*

async close(comment = new Uint8Array(0), options = {}) {
return closeFile(this, comment, options);
await closeFile(this, comment, options);
return this.writer.getData();
}

@@ -121,0 +122,0 @@ }

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

"license": "BSD-3-Clause",
"version": "2.2.37",
"version": "2.2.38",
"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