@gyng/remote-zip 0.2.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ function ge(e){let n=e.length;for(;--n>=0;)e[n]=0}var pi=0,kn=1,xi=2,mi=3,yi=258,vt=29,Ce=256,ve=Ce+1+vt,_e=30,St=19,vn=2*ve+1,te=15,nt=16,Ei=7,Dt=256,Sn=16,Dn=17,Rn=18,bt=new Uint8Array([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]),Ye=new Uint8Array([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]),Ai=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Un=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ki=512,q=new Array((ve+2)*2);ge(q);var Ee=new Array(_e*2);ge(Ee);var Se=new Array(ki);ge(Se);var De=new Array(yi-mi+1);ge(De);var Rt=new Array(vt);ge(Rt);var We=new Array(_e);ge(We);function it(e,n,t,i,r){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}var On,In,zn;function rt(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}var Cn=e=>e<256?Se[e]:Se[256+(e>>>7)],Re=(e,n)=>{e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255},N=(e,n,t)=>{e.bi_valid>nt-t?(e.bi_buf|=n<<e.bi_valid&65535,Re(e,e.bi_buf),e.bi_buf=n>>nt-e.bi_valid,e.bi_valid+=t-nt):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)},P=(e,n,t)=>{N(e,t[n*2],t[n*2+1])},Tn=(e,n)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1},vi=e=>{e.bi_valid===16?(Re(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Si=(e,n)=>{let t=n.dyn_tree,i=n.max_code,r=n.stat_desc.static_tree,a=n.stat_desc.has_stree,l=n.stat_desc.extra_bits,s=n.stat_desc.extra_base,c=n.stat_desc.max_length,o,f,g,_,d,u,E=0;for(_=0;_<=te;_++)e.bl_count[_]=0;for(t[e.heap[e.heap_max]*2+1]=0,o=e.heap_max+1;o<vn;o++)f=e.heap[o],_=t[t[f*2+1]*2+1]+1,_>c&&(_=c,E++),t[f*2+1]=_,!(f>i)&&(e.bl_count[_]++,d=0,f>=s&&(d=l[f-s]),u=t[f*2],e.opt_len+=u*(_+d),a&&(e.static_len+=u*(r[f*2+1]+d)));if(E!==0){do{for(_=c-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[c]--,E-=2}while(E>0);for(_=c;_!==0;_--)for(f=e.bl_count[_];f!==0;)g=e.heap[--o],!(g>i)&&(t[g*2+1]!==_&&(e.opt_len+=(_-t[g*2+1])*t[g*2],t[g*2+1]=_),f--)}},Nn=(e,n,t)=>{let i=new Array(te+1),r=0,a,l;for(a=1;a<=te;a++)r=r+t[a-1]<<1,i[a]=r;for(l=0;l<=n;l++){let s=e[l*2+1];s!==0&&(e[l*2]=Tn(i[s]++,s))}},Di=()=>{let e,n,t,i,r,a=new Array(te+1);for(t=0,i=0;i<vt-1;i++)for(Rt[i]=t,e=0;e<1<<bt[i];e++)De[t++]=i;for(De[t-1]=i,r=0,i=0;i<16;i++)for(We[i]=r,e=0;e<1<<Ye[i];e++)Se[r++]=i;for(r>>=7;i<_e;i++)for(We[i]=r<<7,e=0;e<1<<Ye[i]-7;e++)Se[256+r++]=i;for(n=0;n<=te;n++)a[n]=0;for(e=0;e<=143;)q[e*2+1]=8,e++,a[8]++;for(;e<=255;)q[e*2+1]=9,e++,a[9]++;for(;e<=279;)q[e*2+1]=7,e++,a[7]++;for(;e<=287;)q[e*2+1]=8,e++,a[8]++;for(Nn(q,ve+1,a),e=0;e<_e;e++)Ee[e*2+1]=5,Ee[e*2]=Tn(e,5);On=new it(q,bt,Ce+1,ve,te),In=new it(Ee,Ye,0,_e,te),zn=new it(new Array(0),Ai,0,St,Ei)},Ln=e=>{let n;for(n=0;n<ve;n++)e.dyn_ltree[n*2]=0;for(n=0;n<_e;n++)e.dyn_dtree[n*2]=0;for(n=0;n<St;n++)e.bl_tree[n*2]=0;e.dyn_ltree[Dt*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Zn=e=>{e.bi_valid>8?Re(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ft=(e,n,t,i)=>{let r=n*2,a=t*2;return e[r]<e[a]||e[r]===e[a]&&i[n]<=i[t]},at=(e,n,t)=>{let i=e.heap[t],r=t<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Ft(n,e.heap[r+1],e.heap[r],e.depth)&&r++,!Ft(n,i,e.heap[r],e.depth));)e.heap[t]=e.heap[r],t=r,r<<=1;e.heap[t]=i},Ht=(e,n,t)=>{let i,r,a=0,l,s;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+a++]&255,i+=(e.pending_buf[e.sym_buf+a++]&255)<<8,r=e.pending_buf[e.sym_buf+a++],i===0?P(e,r,n):(l=De[r],P(e,l+Ce+1,n),s=bt[l],s!==0&&(r-=Rt[l],N(e,r,s)),i--,l=Cn(i),P(e,l,t),s=Ye[l],s!==0&&(i-=We[l],N(e,i,s)));while(a<e.sym_next);P(e,Dt,n)},wt=(e,n)=>{let t=n.dyn_tree,i=n.stat_desc.static_tree,r=n.stat_desc.has_stree,a=n.stat_desc.elems,l,s,c=-1,o;for(e.heap_len=0,e.heap_max=vn,l=0;l<a;l++)t[l*2]!==0?(e.heap[++e.heap_len]=c=l,e.depth[l]=0):t[l*2+1]=0;for(;e.heap_len<2;)o=e.heap[++e.heap_len]=c<2?++c:0,t[o*2]=1,e.depth[o]=0,e.opt_len--,r&&(e.static_len-=i[o*2+1]);for(n.max_code=c,l=e.heap_len>>1;l>=1;l--)at(e,t,l);o=a;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],at(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=s,t[o*2]=t[l*2]+t[s*2],e.depth[o]=(e.depth[l]>=e.depth[s]?e.depth[l]:e.depth[s])+1,t[l*2+1]=t[s*2+1]=o,e.heap[1]=o++,at(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Si(e,n),Nn(t,c,e.bl_count)},Pt=(e,n,t)=>{let i,r=-1,a,l=n[1],s=0,c=7,o=4;for(l===0&&(c=138,o=3),n[(t+1)*2+1]=65535,i=0;i<=t;i++)a=l,l=n[(i+1)*2+1],!(++s<c&&a===l)&&(s<o?e.bl_tree[a*2]+=s:a!==0?(a!==r&&e.bl_tree[a*2]++,e.bl_tree[Sn*2]++):s<=10?e.bl_tree[Dn*2]++:e.bl_tree[Rn*2]++,s=0,r=a,l===0?(c=138,o=3):a===l?(c=6,o=3):(c=7,o=4))},Bt=(e,n,t)=>{let i,r=-1,a,l=n[1],s=0,c=7,o=4;for(l===0&&(c=138,o=3),i=0;i<=t;i++)if(a=l,l=n[(i+1)*2+1],!(++s<c&&a===l)){if(s<o)do P(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==r&&(P(e,a,e.bl_tree),s--),P(e,Sn,e.bl_tree),N(e,s-3,2)):s<=10?(P(e,Dn,e.bl_tree),N(e,s-3,3)):(P(e,Rn,e.bl_tree),N(e,s-11,7));s=0,r=a,l===0?(c=138,o=3):a===l?(c=6,o=3):(c=7,o=4)}},Ri=e=>{let n;for(Pt(e,e.dyn_ltree,e.l_desc.max_code),Pt(e,e.dyn_dtree,e.d_desc.max_code),wt(e,e.bl_desc),n=St-1;n>=3&&e.bl_tree[Un[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n},Ui=(e,n,t,i)=>{let r;for(N(e,n-257,5),N(e,t-1,5),N(e,i-4,4),r=0;r<i;r++)N(e,e.bl_tree[Un[r]*2+1],3);Bt(e,e.dyn_ltree,n-1),Bt(e,e.dyn_dtree,t-1)},Oi=e=>{let n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return 0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(t=32;t<Ce;t++)if(e.dyn_ltree[t*2]!==0)return 1;return 0},$t=!1,Ii=e=>{$t||(Di(),$t=!0),e.l_desc=new rt(e.dyn_ltree,On),e.d_desc=new rt(e.dyn_dtree,In),e.bl_desc=new rt(e.bl_tree,zn),e.bi_buf=0,e.bi_valid=0,Ln(e)},Mn=(e,n,t,i)=>{N(e,(pi<<1)+(i?1:0),3),Zn(e),Re(e,t),Re(e,~t),t&&e.pending_buf.set(e.window.subarray(n,n+t),e.pending),e.pending+=t},zi=e=>{N(e,kn<<1,3),P(e,Dt,q),vi(e)},Ci=(e,n,t,i)=>{let r,a,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=Oi(e)),wt(e,e.l_desc),wt(e,e.d_desc),l=Ri(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=t+5,t+4<=r&&n!==-1?Mn(e,n,t,i):e.strategy===4||a===r?(N(e,(kn<<1)+(i?1:0),3),Ht(e,q,Ee)):(N(e,(xi<<1)+(i?1:0),3),Ui(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Ht(e,e.dyn_ltree,e.dyn_dtree)),Ln(e),i&&Zn(e)},Ti=(e,n,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=n,e.pending_buf[e.sym_buf+e.sym_next++]=n>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(De[t]+Ce+1)*2]++,e.dyn_dtree[Cn(n)*2]++),e.sym_next===e.sym_end),Ni=Ii,Li=Mn,Zi=Ci,Mi=Ti,Fi=zi,Hi={_tr_init:Ni,_tr_stored_block:Li,_tr_flush_block:Zi,_tr_tally:Mi,_tr_align:Fi},Pi=(e,n,t,i)=>{let r=e&65535|0,a=e>>>16&65535|0,l=0;for(;t!==0;){l=t>2e3?2e3:t,t-=l;do r=r+n[i++]|0,a=a+r|0;while(--l);r%=65521,a%=65521}return r|a<<16|0},Ue=Pi,Bi=()=>{let e,n=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n},$i=new Uint32Array(Bi()),Ki=(e,n,t,i)=>{let r=$i,a=i+t;e^=-1;for(let l=i;l<a;l++)e=e>>>8^r[(e^n[l])&255];return e^-1},z=Ki,re={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},be={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:Gi,_tr_stored_block:pt,_tr_flush_block:qi,_tr_tally:j,_tr_align:Xi}=Hi,{Z_NO_FLUSH:J,Z_PARTIAL_FLUSH:Yi,Z_FULL_FLUSH:Wi,Z_FINISH:M,Z_BLOCK:Kt,Z_OK:C,Z_STREAM_END:Gt,Z_STREAM_ERROR:B,Z_DATA_ERROR:Vi,Z_BUF_ERROR:ot,Z_DEFAULT_COMPRESSION:ji,Z_FILTERED:Ji,Z_HUFFMAN_ONLY:$e,Z_RLE:Qi,Z_FIXED:er,Z_DEFAULT_STRATEGY:tr,Z_UNKNOWN:nr,Z_DEFLATED:Je}=be,ir=9,rr=15,ar=8,or=29,sr=256,xt=sr+1+or,lr=30,fr=19,cr=2*xt+1,dr=15,k=3,V=258,$=V+k+1,_r=32,he=42,Ut=57,mt=69,yt=73,Et=91,At=103,ne=113,me=666,T=1,we=2,ae=3,pe=4,hr=3,ie=(e,n)=>(e.msg=re[n],n),qt=e=>e*2-(e>4?9:0),W=e=>{let n=e.length;for(;--n>=0;)e[n]=0},ur=e=>{let n,t,i,r=e.w_size;n=e.hash_size,i=n;do t=e.head[--i],e.head[i]=t>=r?t-r:0;while(--n);n=r,i=n;do t=e.prev[--i],e.prev[i]=t>=r?t-r:0;while(--n)},gr=(e,n,t)=>(n<<e.hash_shift^t)&e.hash_mask,Q=gr,L=e=>{let n=e.state,t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+t),e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))},Z=(e,n)=>{qi(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,L(e.strm)},D=(e,n)=>{e.pending_buf[e.pending++]=n},xe=(e,n)=>{e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255},kt=(e,n,t,i)=>{let r=e.avail_in;return r>i&&(r=i),r===0?0:(e.avail_in-=r,n.set(e.input.subarray(e.next_in,e.next_in+r),t),e.state.wrap===1?e.adler=Ue(e.adler,n,r,t):e.state.wrap===2&&(e.adler=z(e.adler,n,r,t)),e.next_in+=r,e.total_in+=r,r)},Fn=(e,n)=>{let t=e.max_chain_length,i=e.strstart,r,a,l=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-$?e.strstart-(e.w_size-$):0,o=e.window,f=e.w_mask,g=e.prev,_=e.strstart+V,d=o[i+l-1],u=o[i+l];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(r=n,!(o[r+l]!==u||o[r+l-1]!==d||o[r]!==o[i]||o[++r]!==o[i+1])){i+=2,r++;do;while(o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&o[++i]===o[++r]&&i<_);if(a=V-(_-i),i=_-V,a>l){if(e.match_start=n,l=a,a>=s)break;d=o[i+l-1],u=o[i+l]}}while((n=g[n&f])>c&&--t!==0);return l<=e.lookahead?l:e.lookahead},ue=e=>{let n=e.w_size,t,i,r;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-$)&&(e.window.set(e.window.subarray(n,n+n-i),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),ur(e),i+=n),e.strm.avail_in===0)break;if(t=kt(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=k)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=Q(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=Q(e,e.ins_h,e.window[r+k-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<k)););}while(e.lookahead<$&&e.strm.avail_in!==0)},Hn=(e,n)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,r,a,l=0,s=e.strm.avail_in;do{if(i=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,r=e.strstart-e.block_start,i>r+e.strm.avail_in&&(i=r+e.strm.avail_in),i>a&&(i=a),i<t&&(i===0&&n!==M||n===J||i!==r+e.strm.avail_in)))break;l=n===M&&i===r+e.strm.avail_in?1:0,pt(e,0,0,l),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,L(e.strm),r&&(r>i&&(r=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,i-=r),i&&(kt(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(l===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),l?pe:n!==J&&n!==M&&e.strm.avail_in===0&&e.strstart===e.block_start?we:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(kt(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,t=a>e.w_size?e.w_size:a,r=e.strstart-e.block_start,(r>=t||(r||n===M)&&n!==J&&e.strm.avail_in===0&&r<=a)&&(i=r>a?a:r,l=n===M&&e.strm.avail_in===0&&i===r?1:0,pt(e,e.block_start,i,l),e.block_start+=i,L(e.strm)),l?ae:T)},st=(e,n)=>{let t,i;for(;;){if(e.lookahead<$){if(ue(e),e.lookahead<$&&n===J)return T;if(e.lookahead===0)break}if(t=0,e.lookahead>=k&&(e.ins_h=Q(e,e.ins_h,e.window[e.strstart+k-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-$&&(e.match_length=Fn(e,t)),e.match_length>=k)if(i=j(e,e.strstart-e.match_start,e.match_length-k),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=k){e.match_length--;do e.strstart++,e.ins_h=Q(e,e.ins_h,e.window[e.strstart+k-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Q(e,e.ins_h,e.window[e.strstart+1]);else i=j(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Z(e,!1),e.strm.avail_out===0))return T}return e.insert=e.strstart<k-1?e.strstart:k-1,n===M?(Z(e,!0),e.strm.avail_out===0?ae:pe):e.sym_next&&(Z(e,!1),e.strm.avail_out===0)?T:we},ce=(e,n)=>{let t,i,r;for(;;){if(e.lookahead<$){if(ue(e),e.lookahead<$&&n===J)return T;if(e.lookahead===0)break}if(t=0,e.lookahead>=k&&(e.ins_h=Q(e,e.ins_h,e.window[e.strstart+k-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=k-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-$&&(e.match_length=Fn(e,t),e.match_length<=5&&(e.strategy===Ji||e.match_length===k&&e.strstart-e.match_start>4096)&&(e.match_length=k-1)),e.prev_length>=k&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-k,i=j(e,e.strstart-1-e.prev_match,e.prev_length-k),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=Q(e,e.ins_h,e.window[e.strstart+k-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=k-1,e.strstart++,i&&(Z(e,!1),e.strm.avail_out===0))return T}else if(e.match_available){if(i=j(e,0,e.window[e.strstart-1]),i&&Z(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return T}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=j(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<k-1?e.strstart:k-1,n===M?(Z(e,!0),e.strm.avail_out===0?ae:pe):e.sym_next&&(Z(e,!1),e.strm.avail_out===0)?T:we},br=(e,n)=>{let t,i,r,a,l=e.window;for(;;){if(e.lookahead<=V){if(ue(e),e.lookahead<=V&&n===J)return T;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=k&&e.strstart>0&&(r=e.strstart-1,i=l[r],i===l[++r]&&i===l[++r]&&i===l[++r])){a=e.strstart+V;do;while(i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&r<a);e.match_length=V-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=k?(t=j(e,1,e.match_length-k),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=j(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Z(e,!1),e.strm.avail_out===0))return T}return e.insert=0,n===M?(Z(e,!0),e.strm.avail_out===0?ae:pe):e.sym_next&&(Z(e,!1),e.strm.avail_out===0)?T:we},wr=(e,n)=>{let t;for(;;){if(e.lookahead===0&&(ue(e),e.lookahead===0)){if(n===J)return T;break}if(e.match_length=0,t=j(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Z(e,!1),e.strm.avail_out===0))return T}return e.insert=0,n===M?(Z(e,!0),e.strm.avail_out===0?ae:pe):e.sym_next&&(Z(e,!1),e.strm.avail_out===0)?T:we};function H(e,n,t,i,r){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=i,this.func=r}var ye=[new H(0,0,0,0,Hn),new H(4,4,8,4,st),new H(4,5,16,8,st),new H(4,6,32,32,st),new H(4,4,16,16,ce),new H(8,16,32,32,ce),new H(8,16,128,128,ce),new H(8,32,128,256,ce),new H(32,128,258,1024,ce),new H(32,258,258,4096,ce)],pr=e=>{e.window_size=2*e.w_size,W(e.head),e.max_lazy_match=ye[e.level].max_lazy,e.good_match=ye[e.level].good_length,e.nice_match=ye[e.level].nice_length,e.max_chain_length=ye[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=k-1,e.match_available=0,e.ins_h=0};function xr(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Je,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(cr*2),this.dyn_dtree=new Uint16Array((2*lr+1)*2),this.bl_tree=new Uint16Array((2*fr+1)*2),W(this.dyn_ltree),W(this.dyn_dtree),W(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(dr+1),this.heap=new Uint16Array(2*xt+1),W(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*xt+1),W(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Te=e=>{if(!e)return 1;let n=e.state;return!n||n.strm!==e||n.status!==he&&n.status!==Ut&&n.status!==mt&&n.status!==yt&&n.status!==Et&&n.status!==At&&n.status!==ne&&n.status!==me?1:0},Pn=e=>{if(Te(e))return ie(e,B);e.total_in=e.total_out=0,e.data_type=nr;let n=e.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Ut:n.wrap?he:ne,e.adler=n.wrap===2?0:1,n.last_flush=-2,Gi(n),C},Bn=e=>{let n=Pn(e);return n===C&&pr(e.state),n},mr=(e,n)=>Te(e)||e.state.wrap!==2?B:(e.state.gzhead=n,C),$n=(e,n,t,i,r,a)=>{if(!e)return B;let l=1;if(n===ji&&(n=6),i<0?(l=0,i=-i):i>15&&(l=2,i-=16),r<1||r>ir||t!==Je||i<8||i>15||n<0||n>9||a<0||a>er||i===8&&l!==1)return ie(e,B);i===8&&(i=9);let s=new xr;return e.state=s,s.strm=e,s.status=he,s.wrap=l,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+k-1)/k),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=n,s.strategy=a,s.method=t,Bn(e)},yr=(e,n)=>$n(e,n,Je,rr,ar,tr),Er=(e,n)=>{if(Te(e)||n>Kt||n<0)return e?ie(e,B):B;let t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===me&&n!==M)return ie(e,e.avail_out===0?ot:B);let i=t.last_flush;if(t.last_flush=n,t.pending!==0){if(L(e),e.avail_out===0)return t.last_flush=-1,C}else if(e.avail_in===0&&qt(n)<=qt(i)&&n!==M)return ie(e,ot);if(t.status===me&&e.avail_in!==0)return ie(e,ot);if(t.status===he&&t.wrap===0&&(t.status=ne),t.status===he){let r=Je+(t.w_bits-8<<4)<<8,a=-1;if(t.strategy>=$e||t.level<2?a=0:t.level<6?a=1:t.level===6?a=2:a=3,r|=a<<6,t.strstart!==0&&(r|=_r),r+=31-r%31,xe(t,r),t.strstart!==0&&(xe(t,e.adler>>>16),xe(t,e.adler&65535)),e.adler=1,t.status=ne,L(e),t.pending!==0)return t.last_flush=-1,C}if(t.status===Ut){if(e.adler=0,D(t,31),D(t,139),D(t,8),t.gzhead)D(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),D(t,t.gzhead.time&255),D(t,t.gzhead.time>>8&255),D(t,t.gzhead.time>>16&255),D(t,t.gzhead.time>>24&255),D(t,t.level===9?2:t.strategy>=$e||t.level<2?4:0),D(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(D(t,t.gzhead.extra.length&255),D(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=z(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=mt;else if(D(t,0),D(t,0),D(t,0),D(t,0),D(t,0),D(t,t.level===9?2:t.strategy>=$e||t.level<2?4:0),D(t,hr),t.status=ne,L(e),t.pending!==0)return t.last_flush=-1,C}if(t.status===mt){if(t.gzhead.extra){let r=t.pending,a=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+a>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r)),t.gzindex+=s,L(e),t.pending!==0)return t.last_flush=-1,C;r=0,a-=s}let l=new Uint8Array(t.gzhead.extra);t.pending_buf.set(l.subarray(t.gzindex,t.gzindex+a),t.pending),t.pending+=a,t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r)),t.gzindex=0}t.status=yt}if(t.status===yt){if(t.gzhead.name){let r=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r)),L(e),t.pending!==0)return t.last_flush=-1,C;r=0}t.gzindex<t.gzhead.name.length?a=t.gzhead.name.charCodeAt(t.gzindex++)&255:a=0,D(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r)),t.gzindex=0}t.status=Et}if(t.status===Et){if(t.gzhead.comment){let r=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r)),L(e),t.pending!==0)return t.last_flush=-1,C;r=0}t.gzindex<t.gzhead.comment.length?a=t.gzhead.comment.charCodeAt(t.gzindex++)&255:a=0,D(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>r&&(e.adler=z(e.adler,t.pending_buf,t.pending-r,r))}t.status=At}if(t.status===At){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(L(e),t.pending!==0))return t.last_flush=-1,C;D(t,e.adler&255),D(t,e.adler>>8&255),e.adler=0}if(t.status=ne,L(e),t.pending!==0)return t.last_flush=-1,C}if(e.avail_in!==0||t.lookahead!==0||n!==J&&t.status!==me){let r=t.level===0?Hn(t,n):t.strategy===$e?wr(t,n):t.strategy===Qi?br(t,n):ye[t.level].func(t,n);if((r===ae||r===pe)&&(t.status=me),r===T||r===ae)return e.avail_out===0&&(t.last_flush=-1),C;if(r===we&&(n===Yi?Xi(t):n!==Kt&&(pt(t,0,0,!1),n===Wi&&(W(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),L(e),e.avail_out===0))return t.last_flush=-1,C}return n!==M?C:t.wrap<=0?Gt:(t.wrap===2?(D(t,e.adler&255),D(t,e.adler>>8&255),D(t,e.adler>>16&255),D(t,e.adler>>24&255),D(t,e.total_in&255),D(t,e.total_in>>8&255),D(t,e.total_in>>16&255),D(t,e.total_in>>24&255)):(xe(t,e.adler>>>16),xe(t,e.adler&65535)),L(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?C:Gt)},Ar=e=>{if(Te(e))return B;let n=e.state.status;return e.state=null,n===ne?ie(e,Vi):C},kr=(e,n)=>{let t=n.length;if(Te(e))return B;let i=e.state,r=i.wrap;if(r===2||r===1&&i.status!==he||i.lookahead)return B;if(r===1&&(e.adler=Ue(e.adler,n,t,0)),i.wrap=0,t>=i.w_size){r===0&&(W(i.head),i.strstart=0,i.block_start=0,i.insert=0);let c=new Uint8Array(i.w_size);c.set(n.subarray(t-i.w_size,t),0),n=c,t=i.w_size}let a=e.avail_in,l=e.next_in,s=e.input;for(e.avail_in=t,e.next_in=0,e.input=n,ue(i);i.lookahead>=k;){let c=i.strstart,o=i.lookahead-(k-1);do i.ins_h=Q(i,i.ins_h,i.window[c+k-1]),i.prev[c&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=c,c++;while(--o);i.strstart=c,i.lookahead=k-1,ue(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=k-1,i.match_available=0,e.next_in=l,e.input=s,e.avail_in=a,i.wrap=r,C},vr=yr,Sr=$n,Dr=Bn,Rr=Pn,Ur=mr,Or=Er,Ir=Ar,zr=kr,Cr="pako deflate (from Nodeca project)",Ae={deflateInit:vr,deflateInit2:Sr,deflateReset:Dr,deflateResetKeep:Rr,deflateSetHeader:Ur,deflate:Or,deflateEnd:Ir,deflateSetDictionary:zr,deflateInfo:Cr},Tr=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),Nr=function(e){let n=Array.prototype.slice.call(arguments,1);for(;n.length;){let t=n.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(let i in t)Tr(t,i)&&(e[i]=t[i])}}return e},Lr=e=>{let n=0;for(let i=0,r=e.length;i<r;i++)n+=e[i].length;let t=new Uint8Array(n);for(let i=0,r=0,a=e.length;i<a;i++){let l=e[i];t.set(l,r),r+=l.length}return t},Qe={assign:Nr,flattenChunks:Lr},Kn=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Kn=!1}var Oe=new Uint8Array(256);for(let e=0;e<256;e++)Oe[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Oe[254]=Oe[254]=1;var Zr=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let n,t,i,r,a,l=e.length,s=0;for(r=0;r<l;r++)t=e.charCodeAt(r),(t&64512)===55296&&r+1<l&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),r++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(n=new Uint8Array(s),a=0,r=0;a<s;r++)t=e.charCodeAt(r),(t&64512)===55296&&r+1<l&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),r++)),t<128?n[a++]=t:t<2048?(n[a++]=192|t>>>6,n[a++]=128|t&63):t<65536?(n[a++]=224|t>>>12,n[a++]=128|t>>>6&63,n[a++]=128|t&63):(n[a++]=240|t>>>18,n[a++]=128|t>>>12&63,n[a++]=128|t>>>6&63,n[a++]=128|t&63);return n},Mr=(e,n)=>{if(n<65534&&e.subarray&&Kn)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let t="";for(let i=0;i<n;i++)t+=String.fromCharCode(e[i]);return t},Fr=(e,n)=>{let t=n||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,n));let i,r,a=new Array(t*2);for(r=0,i=0;i<t;){let l=e[i++];if(l<128){a[r++]=l;continue}let s=Oe[l];if(s>4){a[r++]=65533,i+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&i<t;)l=l<<6|e[i++]&63,s--;if(s>1){a[r++]=65533;continue}l<65536?a[r++]=l:(l-=65536,a[r++]=55296|l>>10&1023,a[r++]=56320|l&1023)}return Mr(a,r)},Hr=(e,n)=>{n=n||e.length,n>e.length&&(n=e.length);let t=n-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?n:t+Oe[e[t]]>n?t:n},Ie={string2buf:Zr,buf2string:Fr,utf8border:Hr};function Pr(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Gn=Pr,qn=Object.prototype.toString,{Z_NO_FLUSH:Br,Z_SYNC_FLUSH:$r,Z_FULL_FLUSH:Kr,Z_FINISH:Gr,Z_OK:Ve,Z_STREAM_END:qr,Z_DEFAULT_COMPRESSION:Xr,Z_DEFAULT_STRATEGY:Yr,Z_DEFLATED:Wr}=be;function Ne(e){this.options=Qe.assign({level:Xr,method:Wr,chunkSize:16384,windowBits:15,memLevel:8,strategy:Yr},e||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Gn,this.strm.avail_out=0;let t=Ae.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(t!==Ve)throw new Error(re[t]);if(n.header&&Ae.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=Ie.string2buf(n.dictionary):qn.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,t=Ae.deflateSetDictionary(this.strm,i),t!==Ve)throw new Error(re[t]);this._dict_set=!0}}Ne.prototype.push=function(e,n){let t=this.strm,i=this.options.chunkSize,r,a;if(this.ended)return!1;for(n===~~n?a=n:a=n===!0?Gr:Br,typeof e=="string"?t.input=Ie.string2buf(e):qn.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(a===$r||a===Kr)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(r=Ae.deflate(t,a),r===qr)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),r=Ae.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Ve;if(t.avail_out===0){this.onData(t.output);continue}if(a>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};Ne.prototype.onData=function(e){this.chunks.push(e)};Ne.prototype.onEnd=function(e){e===Ve&&(this.result=Qe.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ot(e,n){let t=new Ne(n);if(t.push(e,!0),t.err)throw t.msg||re[t.err];return t.result}function Vr(e,n){return n=n||{},n.raw=!0,Ot(e,n)}function jr(e,n){return n=n||{},n.gzip=!0,Ot(e,n)}var Jr=Ne,Qr=Ot,ea=Vr,ta=jr,na=be,ia={Deflate:Jr,deflate:Qr,deflateRaw:ea,gzip:ta,constants:na},Ke=16209,ra=16191,aa=function(n,t){let i,r,a,l,s,c,o,f,g,_,d,u,E,y,x,b,p,h,S,I,w,U,v,m,A=n.state;i=n.next_in,v=n.input,r=i+(n.avail_in-5),a=n.next_out,m=n.output,l=a-(t-n.avail_out),s=a+(n.avail_out-257),c=A.dmax,o=A.wsize,f=A.whave,g=A.wnext,_=A.window,d=A.hold,u=A.bits,E=A.lencode,y=A.distcode,x=(1<<A.lenbits)-1,b=(1<<A.distbits)-1;e:do{u<15&&(d+=v[i++]<<u,u+=8,d+=v[i++]<<u,u+=8),p=E[d&x];t:for(;;){if(h=p>>>24,d>>>=h,u-=h,h=p>>>16&255,h===0)m[a++]=p&65535;else if(h&16){S=p&65535,h&=15,h&&(u<h&&(d+=v[i++]<<u,u+=8),S+=d&(1<<h)-1,d>>>=h,u-=h),u<15&&(d+=v[i++]<<u,u+=8,d+=v[i++]<<u,u+=8),p=y[d&b];n:for(;;){if(h=p>>>24,d>>>=h,u-=h,h=p>>>16&255,h&16){if(I=p&65535,h&=15,u<h&&(d+=v[i++]<<u,u+=8,u<h&&(d+=v[i++]<<u,u+=8)),I+=d&(1<<h)-1,I>c){n.msg="invalid distance too far back",A.mode=Ke;break e}if(d>>>=h,u-=h,h=a-l,I>h){if(h=I-h,h>f&&A.sane){n.msg="invalid distance too far back",A.mode=Ke;break e}if(w=0,U=_,g===0){if(w+=o-h,h<S){S-=h;do m[a++]=_[w++];while(--h);w=a-I,U=m}}else if(g<h){if(w+=o+g-h,h-=g,h<S){S-=h;do m[a++]=_[w++];while(--h);if(w=0,g<S){h=g,S-=h;do m[a++]=_[w++];while(--h);w=a-I,U=m}}}else if(w+=g-h,h<S){S-=h;do m[a++]=_[w++];while(--h);w=a-I,U=m}for(;S>2;)m[a++]=U[w++],m[a++]=U[w++],m[a++]=U[w++],S-=3;S&&(m[a++]=U[w++],S>1&&(m[a++]=U[w++]))}else{w=a-I;do m[a++]=m[w++],m[a++]=m[w++],m[a++]=m[w++],S-=3;while(S>2);S&&(m[a++]=m[w++],S>1&&(m[a++]=m[w++]))}}else if((h&64)===0){p=y[(p&65535)+(d&(1<<h)-1)];continue n}else{n.msg="invalid distance code",A.mode=Ke;break e}break}}else if((h&64)===0){p=E[(p&65535)+(d&(1<<h)-1)];continue t}else if(h&32){A.mode=ra;break e}else{n.msg="invalid literal/length code",A.mode=Ke;break e}break}}while(i<r&&a<s);S=u>>3,i-=S,u-=S<<3,d&=(1<<u)-1,n.next_in=i,n.next_out=a,n.avail_in=i<r?5+(r-i):5-(i-r),n.avail_out=a<s?257+(s-a):257-(a-s),A.hold=d,A.bits=u},de=15,Xt=852,Yt=592,Wt=0,lt=1,Vt=2,oa=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),sa=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),la=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),fa=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ca=(e,n,t,i,r,a,l,s)=>{let c=s.bits,o=0,f=0,g=0,_=0,d=0,u=0,E=0,y=0,x=0,b=0,p,h,S,I,w,U=null,v,m=new Uint16Array(de+1),A=new Uint16Array(de+1),ee=null,Mt,Pe,Be;for(o=0;o<=de;o++)m[o]=0;for(f=0;f<i;f++)m[n[t+f]]++;for(d=c,_=de;_>=1&&m[_]===0;_--);if(d>_&&(d=_),_===0)return r[a++]=1<<24|64<<16|0,r[a++]=1<<24|64<<16|0,s.bits=1,0;for(g=1;g<_&&m[g]===0;g++);for(d<g&&(d=g),y=1,o=1;o<=de;o++)if(y<<=1,y-=m[o],y<0)return-1;if(y>0&&(e===Wt||_!==1))return-1;for(A[1]=0,o=1;o<de;o++)A[o+1]=A[o]+m[o];for(f=0;f<i;f++)n[t+f]!==0&&(l[A[n[t+f]]++]=f);if(e===Wt?(U=ee=l,v=20):e===lt?(U=oa,ee=sa,v=257):(U=la,ee=fa,v=0),b=0,f=0,o=g,w=a,u=d,E=0,S=-1,x=1<<d,I=x-1,e===lt&&x>Xt||e===Vt&&x>Yt)return 1;for(;;){Mt=o-E,l[f]+1<v?(Pe=0,Be=l[f]):l[f]>=v?(Pe=ee[l[f]-v],Be=U[l[f]-v]):(Pe=96,Be=0),p=1<<o-E,h=1<<u,g=h;do h-=p,r[w+(b>>E)+h]=Mt<<24|Pe<<16|Be|0;while(h!==0);for(p=1<<o-1;b&p;)p>>=1;if(p!==0?(b&=p-1,b+=p):b=0,f++,--m[o]===0){if(o===_)break;o=n[t+l[f]]}if(o>d&&(b&I)!==S){for(E===0&&(E=d),w+=g,u=o-E,y=1<<u;u+E<_&&(y-=m[u+E],!(y<=0));)u++,y<<=1;if(x+=1<<u,e===lt&&x>Xt||e===Vt&&x>Yt)return 1;S=b&I,r[S]=d<<24|u<<16|w-a|0}}return b!==0&&(r[w+b]=o-E<<24|64<<16|0),s.bits=d,0},ke=ca,da=0,Xn=1,Yn=2,{Z_FINISH:jt,Z_BLOCK:_a,Z_TREES:Ge,Z_OK:oe,Z_STREAM_END:ha,Z_NEED_DICT:ua,Z_STREAM_ERROR:F,Z_DATA_ERROR:Wn,Z_MEM_ERROR:Vn,Z_BUF_ERROR:ga,Z_DEFLATED:Jt}=be,et=16180,Qt=16181,en=16182,tn=16183,nn=16184,rn=16185,an=16186,on=16187,sn=16188,ln=16189,je=16190,G=16191,ft=16192,fn=16193,ct=16194,cn=16195,dn=16196,_n=16197,hn=16198,qe=16199,Xe=16200,un=16201,gn=16202,bn=16203,wn=16204,pn=16205,dt=16206,xn=16207,mn=16208,O=16209,jn=16210,Jn=16211,ba=852,wa=592,pa=15,xa=pa,yn=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function ma(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var se=e=>{if(!e)return 1;let n=e.state;return!n||n.strm!==e||n.mode<et||n.mode>Jn?1:0},Qn=e=>{if(se(e))return F;let n=e.state;return e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=et,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(ba),n.distcode=n.distdyn=new Int32Array(wa),n.sane=1,n.back=-1,oe},ei=e=>{if(se(e))return F;let n=e.state;return n.wsize=0,n.whave=0,n.wnext=0,Qn(e)},ti=(e,n)=>{let t;if(se(e))return F;let i=e.state;return n<0?(t=0,n=-n):(t=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?F:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=t,i.wbits=n,ei(e))},ni=(e,n)=>{if(!e)return F;let t=new ma;e.state=t,t.strm=e,t.window=null,t.mode=et;let i=ti(e,n);return i!==oe&&(e.state=null),i},ya=e=>ni(e,xa),En=!0,_t,ht,Ea=e=>{if(En){_t=new Int32Array(512),ht=new Int32Array(32);let n=0;for(;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(ke(Xn,e.lens,0,288,_t,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;ke(Yn,e.lens,0,32,ht,0,e.work,{bits:5}),En=!1}e.lencode=_t,e.lenbits=9,e.distcode=ht,e.distbits=5},ii=(e,n,t,i)=>{let r,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(n.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>i&&(r=i),a.window.set(n.subarray(t-i,t-i+r),a.wnext),i-=r,i?(a.window.set(n.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0},Aa=(e,n)=>{let t,i,r,a,l,s,c,o,f,g,_,d,u,E,y=0,x,b,p,h,S,I,w,U,v=new Uint8Array(4),m,A,ee=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(se(e)||!e.output||!e.input&&e.avail_in!==0)return F;t=e.state,t.mode===G&&(t.mode=ft),l=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,o=t.hold,f=t.bits,g=s,_=c,U=oe;e:for(;;)switch(t.mode){case et:if(t.wrap===0){t.mode=ft;break}for(;f<16;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(t.wrap&2&&o===35615){t.wbits===0&&(t.wbits=15),t.check=0,v[0]=o&255,v[1]=o>>>8&255,t.check=z(t.check,v,2,0),o=0,f=0,t.mode=Qt;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((o&255)<<8)+(o>>8))%31){e.msg="incorrect header check",t.mode=O;break}if((o&15)!==Jt){e.msg="unknown compression method",t.mode=O;break}if(o>>>=4,f-=4,w=(o&15)+8,t.wbits===0&&(t.wbits=w),w>15||w>t.wbits){e.msg="invalid window size",t.mode=O;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=o&512?ln:G,o=0,f=0;break;case Qt:for(;f<16;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(t.flags=o,(t.flags&255)!==Jt){e.msg="unknown compression method",t.mode=O;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=O;break}t.head&&(t.head.text=o>>8&1),t.flags&512&&t.wrap&4&&(v[0]=o&255,v[1]=o>>>8&255,t.check=z(t.check,v,2,0)),o=0,f=0,t.mode=en;case en:for(;f<32;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.head&&(t.head.time=o),t.flags&512&&t.wrap&4&&(v[0]=o&255,v[1]=o>>>8&255,v[2]=o>>>16&255,v[3]=o>>>24&255,t.check=z(t.check,v,4,0)),o=0,f=0,t.mode=tn;case tn:for(;f<16;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.head&&(t.head.xflags=o&255,t.head.os=o>>8),t.flags&512&&t.wrap&4&&(v[0]=o&255,v[1]=o>>>8&255,t.check=z(t.check,v,2,0)),o=0,f=0,t.mode=nn;case nn:if(t.flags&1024){for(;f<16;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.length=o,t.head&&(t.head.extra_len=o),t.flags&512&&t.wrap&4&&(v[0]=o&255,v[1]=o>>>8&255,t.check=z(t.check,v,2,0)),o=0,f=0}else t.head&&(t.head.extra=null);t.mode=rn;case rn:if(t.flags&1024&&(d=t.length,d>s&&(d=s),d&&(t.head&&(w=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+d),w)),t.flags&512&&t.wrap&4&&(t.check=z(t.check,i,d,a)),s-=d,a+=d,t.length-=d),t.length))break e;t.length=0,t.mode=an;case an:if(t.flags&2048){if(s===0)break e;d=0;do w=i[a+d++],t.head&&w&&t.length<65536&&(t.head.name+=String.fromCharCode(w));while(w&&d<s);if(t.flags&512&&t.wrap&4&&(t.check=z(t.check,i,d,a)),s-=d,a+=d,w)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=on;case on:if(t.flags&4096){if(s===0)break e;d=0;do w=i[a+d++],t.head&&w&&t.length<65536&&(t.head.comment+=String.fromCharCode(w));while(w&&d<s);if(t.flags&512&&t.wrap&4&&(t.check=z(t.check,i,d,a)),s-=d,a+=d,w)break e}else t.head&&(t.head.comment=null);t.mode=sn;case sn:if(t.flags&512){for(;f<16;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(t.wrap&4&&o!==(t.check&65535)){e.msg="header crc mismatch",t.mode=O;break}o=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=G;break;case ln:for(;f<32;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}e.adler=t.check=yn(o),o=0,f=0,t.mode=je;case je:if(t.havedict===0)return e.next_out=l,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=o,t.bits=f,ua;e.adler=t.check=1,t.mode=G;case G:if(n===_a||n===Ge)break e;case ft:if(t.last){o>>>=f&7,f-=f&7,t.mode=dt;break}for(;f<3;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}switch(t.last=o&1,o>>>=1,f-=1,o&3){case 0:t.mode=fn;break;case 1:if(Ea(t),t.mode=qe,n===Ge){o>>>=2,f-=2;break e}break;case 2:t.mode=dn;break;case 3:e.msg="invalid block type",t.mode=O}o>>>=2,f-=2;break;case fn:for(o>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if((o&65535)!==(o>>>16^65535)){e.msg="invalid stored block lengths",t.mode=O;break}if(t.length=o&65535,o=0,f=0,t.mode=ct,n===Ge)break e;case ct:t.mode=cn;case cn:if(d=t.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;r.set(i.subarray(a,a+d),l),s-=d,a+=d,c-=d,l+=d,t.length-=d;break}t.mode=G;break;case dn:for(;f<14;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(t.nlen=(o&31)+257,o>>>=5,f-=5,t.ndist=(o&31)+1,o>>>=5,f-=5,t.ncode=(o&15)+4,o>>>=4,f-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=O;break}t.have=0,t.mode=_n;case _n:for(;t.have<t.ncode;){for(;f<3;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.lens[ee[t.have++]]=o&7,o>>>=3,f-=3}for(;t.have<19;)t.lens[ee[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,m={bits:t.lenbits},U=ke(da,t.lens,0,19,t.lencode,0,t.work,m),t.lenbits=m.bits,U){e.msg="invalid code lengths set",t.mode=O;break}t.have=0,t.mode=hn;case hn:for(;t.have<t.nlen+t.ndist;){for(;y=t.lencode[o&(1<<t.lenbits)-1],x=y>>>24,b=y>>>16&255,p=y&65535,!(x<=f);){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(p<16)o>>>=x,f-=x,t.lens[t.have++]=p;else{if(p===16){for(A=x+2;f<A;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(o>>>=x,f-=x,t.have===0){e.msg="invalid bit length repeat",t.mode=O;break}w=t.lens[t.have-1],d=3+(o&3),o>>>=2,f-=2}else if(p===17){for(A=x+3;f<A;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}o>>>=x,f-=x,w=0,d=3+(o&7),o>>>=3,f-=3}else{for(A=x+7;f<A;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}o>>>=x,f-=x,w=0,d=11+(o&127),o>>>=7,f-=7}if(t.have+d>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=O;break}for(;d--;)t.lens[t.have++]=w}}if(t.mode===O)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=O;break}if(t.lenbits=9,m={bits:t.lenbits},U=ke(Xn,t.lens,0,t.nlen,t.lencode,0,t.work,m),t.lenbits=m.bits,U){e.msg="invalid literal/lengths set",t.mode=O;break}if(t.distbits=6,t.distcode=t.distdyn,m={bits:t.distbits},U=ke(Yn,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,m),t.distbits=m.bits,U){e.msg="invalid distances set",t.mode=O;break}if(t.mode=qe,n===Ge)break e;case qe:t.mode=Xe;case Xe:if(s>=6&&c>=258){e.next_out=l,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=o,t.bits=f,aa(e,_),l=e.next_out,r=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,o=t.hold,f=t.bits,t.mode===G&&(t.back=-1);break}for(t.back=0;y=t.lencode[o&(1<<t.lenbits)-1],x=y>>>24,b=y>>>16&255,p=y&65535,!(x<=f);){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(b&&(b&240)===0){for(h=x,S=b,I=p;y=t.lencode[I+((o&(1<<h+S)-1)>>h)],x=y>>>24,b=y>>>16&255,p=y&65535,!(h+x<=f);){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}o>>>=h,f-=h,t.back+=h}if(o>>>=x,f-=x,t.back+=x,t.length=p,b===0){t.mode=pn;break}if(b&32){t.back=-1,t.mode=G;break}if(b&64){e.msg="invalid literal/length code",t.mode=O;break}t.extra=b&15,t.mode=un;case un:if(t.extra){for(A=t.extra;f<A;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.length+=o&(1<<t.extra)-1,o>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=gn;case gn:for(;y=t.distcode[o&(1<<t.distbits)-1],x=y>>>24,b=y>>>16&255,p=y&65535,!(x<=f);){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if((b&240)===0){for(h=x,S=b,I=p;y=t.distcode[I+((o&(1<<h+S)-1)>>h)],x=y>>>24,b=y>>>16&255,p=y&65535,!(h+x<=f);){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}o>>>=h,f-=h,t.back+=h}if(o>>>=x,f-=x,t.back+=x,b&64){e.msg="invalid distance code",t.mode=O;break}t.offset=p,t.extra=b&15,t.mode=bn;case bn:if(t.extra){for(A=t.extra;f<A;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}t.offset+=o&(1<<t.extra)-1,o>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=O;break}t.mode=wn;case wn:if(c===0)break e;if(d=_-c,t.offset>d){if(d=t.offset-d,d>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=O;break}d>t.wnext?(d-=t.wnext,u=t.wsize-d):u=t.wnext-d,d>t.length&&(d=t.length),E=t.window}else E=r,u=l-t.offset,d=t.length;d>c&&(d=c),c-=d,t.length-=d;do r[l++]=E[u++];while(--d);t.length===0&&(t.mode=Xe);break;case pn:if(c===0)break e;r[l++]=t.length,c--,t.mode=Xe;break;case dt:if(t.wrap){for(;f<32;){if(s===0)break e;s--,o|=i[a++]<<f,f+=8}if(_-=c,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?z(t.check,r,_,l-_):Ue(t.check,r,_,l-_)),_=c,t.wrap&4&&(t.flags?o:yn(o))!==t.check){e.msg="incorrect data check",t.mode=O;break}o=0,f=0}t.mode=xn;case xn:if(t.wrap&&t.flags){for(;f<32;){if(s===0)break e;s--,o+=i[a++]<<f,f+=8}if(t.wrap&4&&o!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=O;break}o=0,f=0}t.mode=mn;case mn:U=ha;break e;case O:U=Wn;break e;case jn:return Vn;case Jn:default:return F}return e.next_out=l,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=o,t.bits=f,(t.wsize||_!==e.avail_out&&t.mode<O&&(t.mode<dt||n!==jt))&&ii(e,e.output,e.next_out,_-e.avail_out),g-=e.avail_in,_-=e.avail_out,e.total_in+=g,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?z(t.check,r,_,e.next_out-_):Ue(t.check,r,_,e.next_out-_)),e.data_type=t.bits+(t.last?64:0)+(t.mode===G?128:0)+(t.mode===qe||t.mode===ct?256:0),(g===0&&_===0||n===jt)&&U===oe&&(U=ga),U},ka=e=>{if(se(e))return F;let n=e.state;return n.window&&(n.window=null),e.state=null,oe},va=(e,n)=>{if(se(e))return F;let t=e.state;return(t.wrap&2)===0?F:(t.head=n,n.done=!1,oe)},Sa=(e,n)=>{let t=n.length,i,r,a;return se(e)||(i=e.state,i.wrap!==0&&i.mode!==je)?F:i.mode===je&&(r=1,r=Ue(r,n,t,0),r!==i.check)?Wn:(a=ii(e,n,t,t),a?(i.mode=jn,Vn):(i.havedict=1,oe))},Da=ei,Ra=ti,Ua=Qn,Oa=ya,Ia=ni,za=Aa,Ca=ka,Ta=va,Na=Sa,La="pako inflate (from Nodeca project)",X={inflateReset:Da,inflateReset2:Ra,inflateResetKeep:Ua,inflateInit:Oa,inflateInit2:Ia,inflate:za,inflateEnd:Ca,inflateGetHeader:Ta,inflateSetDictionary:Na,inflateInfo:La};function Za(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Ma=Za,ri=Object.prototype.toString,{Z_NO_FLUSH:Fa,Z_FINISH:Ha,Z_OK:ze,Z_STREAM_END:ut,Z_NEED_DICT:gt,Z_STREAM_ERROR:Pa,Z_DATA_ERROR:An,Z_MEM_ERROR:Ba}=be;function Le(e){this.options=Qe.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Gn,this.strm.avail_out=0;let t=X.inflateInit2(this.strm,n.windowBits);if(t!==ze)throw new Error(re[t]);if(this.header=new Ma,X.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Ie.string2buf(n.dictionary):ri.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=X.inflateSetDictionary(this.strm,n.dictionary),t!==ze)))throw new Error(re[t])}Le.prototype.push=function(e,n){let t=this.strm,i=this.options.chunkSize,r=this.options.dictionary,a,l,s;if(this.ended)return!1;for(n===~~n?l=n:l=n===!0?Ha:Fa,ri.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=X.inflate(t,l),a===gt&&r&&(a=X.inflateSetDictionary(t,r),a===ze?a=X.inflate(t,l):a===An&&(a=gt));t.avail_in>0&&a===ut&&t.state.wrap>0&&e[t.next_in]!==0;)X.inflateReset(t),a=X.inflate(t,l);switch(a){case Pa:case An:case gt:case Ba:return this.onEnd(a),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||a===ut))if(this.options.to==="string"){let c=Ie.utf8border(t.output,t.next_out),o=t.next_out-c,f=Ie.buf2string(t.output,c);t.next_out=o,t.avail_out=i-o,o&&t.output.set(t.output.subarray(c,c+o),0),this.onData(f)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===ze&&s===0)){if(a===ut)return a=X.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Le.prototype.onData=function(e){this.chunks.push(e)};Le.prototype.onEnd=function(e){e===ze&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Qe.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function It(e,n){let t=new Le(n);if(t.push(e),t.err)throw t.msg||re[t.err];return t.result}function $a(e,n){return n=n||{},n.raw=!0,It(e,n)}var Ka=Le,Ga=It,qa=$a,Xa=It,Ya=be,Wa={Inflate:Ka,inflate:Ga,inflateRaw:qa,ungzip:Xa,constants:Ya},{Deflate:yo,deflate:Eo,deflateRaw:Ao,gzip:ko}=ia,{Inflate:Va,inflate:vo,inflateRaw:ja,ungzip:So}=Wa;var zt=Va;var ai=ja;var Ja=(()=>{let e=new Uint32Array(256);for(let n=0;n<256;n+=1){let t=n;for(let i=0;i<8;i+=1)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t>>>0}return e})(),Ct=(e,n)=>(Ja[(e^n)&255]^e>>>8)>>>0,Me=class{state=4294967295;update(n){let t=this.state;for(let i=0;i<n.length;i+=1)t=Ct(t,n[i]);this.state=t}digest(){return(this.state^4294967295)>>>0}},Nt=e=>{let n=new Me;return n.update(e),n.digest()},K=e=>(e<<1^(e&128?27:0))&255,Y=(()=>{let e=new Uint8Array(256),n=new Uint8Array(256),t=new Uint8Array(256),i=1;for(let a=0;a<255;a+=1)n[a]=i,t[i]=a,i=(i^K(i))&255;let r=a=>a===0?0:n[(255-t[a])%255];for(let a=0;a<256;a+=1){let l=r(a),s=l;for(let c=0;c<4;c+=1)l=(l<<1|l>>7)&255,s^=l;e[a]=(s^99)&255}return e})(),Qa=(()=>{let e=new Uint8Array(11),n=1;for(let t=1;t<=10;t+=1)e[t]=n,n=K(n);return e})(),eo=e=>{let n=e.length/4,t=n+6,i=4*(t+1),r=new Uint8Array(i*4);r.set(e);for(let a=n;a<i;a+=1){let l=r[(a-1)*4],s=r[(a-1)*4+1],c=r[(a-1)*4+2],o=r[(a-1)*4+3];if(a%n===0){let f=l;l=Y[s]^Qa[a/n],s=Y[c],c=Y[o],o=Y[f]}else n>6&&a%n===4&&(l=Y[l],s=Y[s],c=Y[c],o=Y[o]);r[a*4]=r[(a-n)*4]^l,r[a*4+1]=r[(a-n)*4+1]^s,r[a*4+2]=r[(a-n)*4+2]^c,r[a*4+3]=r[(a-n)*4+3]^o}return{w:r,rounds:t}},to=({w:e,rounds:n},t)=>{let i=t.slice(0,16),r=a=>{for(let l=0;l<16;l+=1)i[l]^=e[a*16+l]};r(0);for(let a=1;a<=n;a+=1){for(let s=0;s<16;s+=1)i[s]=Y[i[s]];let l=i[1];if(i[1]=i[5],i[5]=i[9],i[9]=i[13],i[13]=l,l=i[2],i[2]=i[10],i[10]=l,l=i[6],i[6]=i[14],i[14]=l,l=i[3],i[3]=i[15],i[15]=i[11],i[11]=i[7],i[7]=l,a!==n)for(let s=0;s<4;s+=1){let c=s*4,o=i[c],f=i[c+1],g=i[c+2],_=i[c+3];i[c]=K(o)^(K(f)^f)^g^_,i[c+1]=o^K(f)^(K(g)^g)^_,i[c+2]=o^f^K(g)^(K(_)^_),i[c+3]=K(o)^o^f^g^K(_)}r(a)}return i};var no=(e,n)=>{let t=eo(n),i=new Uint8Array(e.length),r=new Uint8Array(16);for(let a=0,l=1;a<e.length;a+=16,l+=1){r.fill(0);for(let o=l,f=0;o>0&&f<16;o=Math.floor(o/256),f+=1)r[f]=o&255;let s=to(t,r),c=Math.min(16,e.length-a);for(let o=0;o<c;o+=1)i[a+o]=e[a+o]^s[o]}return i},Tt=class{k0=305419896;k1=591751049;k2=878082192;constructor(n){for(let t of n)this.update(t)}update(n){this.k0=Ct(this.k0,n),this.k1=this.k1+(this.k0&255)>>>0,this.k1=Math.imul(this.k1,134775813)+1>>>0,this.k2=Ct(this.k2,this.k1>>>24)}streamByte(){let n=(this.k2|2)&65535;return n*(n^1)>>>8&255}},oi=(e,n)=>{let t=new Tt(n),i=new Uint8Array(e.length);for(let r=0;r<e.length;r+=1){let a=(e[r]^t.streamByte())&255;t.update(a),i[r]=a}return{plaintext:i.subarray(12),checkByte:i[11]}};var io={1:{saltLength:8,keyLength:16},2:{saltLength:12,keyLength:24},3:{saltLength:16,keyLength:32}},si=e=>{let n=new DataView(e);for(let t=0;t+4<=e.byteLength;){let i=n.getUint16(t,!0),r=n.getUint16(t+2,!0);if(i===39169)return{strength:n.getUint8(t+4+4),actualMethod:n.getUint16(t+4+5,!0)};t=t+4+r}return null},tt=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),ro=async(e,n,t)=>{let i=globalThis.crypto.subtle,r=await i.importKey("raw",tt(e),"PBKDF2",!1,["deriveBits"]),a=new Uint8Array(await i.deriveBits({name:"PBKDF2",salt:tt(n),iterations:1e3,hash:"SHA-1"},r,(t*2+2)*8));return{encKey:a.subarray(0,t),authKey:a.subarray(t,t*2),verify:a.subarray(t*2,t*2+2)}},ao=async(e,n)=>{let t=globalThis.crypto.subtle,i=await t.importKey("raw",tt(e),{name:"HMAC",hash:"SHA-1"},!1,["sign"]);return new Uint8Array(await t.sign("HMAC",i,tt(n)))},Ze=class extends Error{constructor(t){super(t);this.reason=t}reason},li=async(e,n,t)=>{let i=io[t];if(!i)throw new Ze("UNSUPPORTED");let{saltLength:r,keyLength:a}=i,l=e.subarray(0,r),s=e.subarray(r,r+2),c=e.subarray(e.length-10),o=e.subarray(r+2,e.length-10),{encKey:f,authKey:g,verify:_}=await ro(n,l,a);if(_[0]!==s[0]||_[1]!==s[1])throw new Ze("WRONG_PASSWORD");let d=await ao(g,o),u=c.length===10;for(let E=0;E<10;E+=1)d[E]!==c[E]&&(u=!1);if(!u)throw new Ze("BAD_MAC");return no(o,f)};var di=1347092738,_i=1347093252,hi=1347093766,oo=1347094280,so=1347094022,lo=1347094023,le=4294967295,Fe=65535,R=class extends Error{code;constructor(n,t="UNKNOWN"){super(n),this.name=this.constructor.name,this.code=t}},fo=e=>{switch(e.reason){case"WRONG_PASSWORD":return new R("Incorrect password (AES)","WRONG_PASSWORD");case"UNSUPPORTED":return new R("Unsupported AES key strength","UNSUPPORTED_ENCRYPTION");default:return new R("AES authentication failed (corrupt data or wrong password)","DECRYPTION_FAILED")}},He=(e,n)=>{if(e<200||e>=400)throw new R(`Could not fetch remote ZIP at ${n}: HTTP status ${e}`,"HTTP_ERROR")},Lt=class{contentLength;url;centralDirectoryRecords;endOfCentralDirectory;method;credentials;redirect;signal;timeoutMs;requestInit;constructor({contentLength:n,url:t,centralDirectoryRecords:i,endOfCentralDirectory:r,method:a,credentials:l="same-origin",redirect:s,signal:c,timeoutMs:o,requestInit:f}){this.contentLength=n,this.url=t,this.method=a,this.centralDirectoryRecords=i,this.endOfCentralDirectory=r,this.credentials=l,this.redirect=s,this.signal=c,this.timeoutMs=o,this.requestInit=f}requestInitFor(n,t,i){let r=[this.signal,i?.signal].filter(Boolean);return ui({credentials:this.credentials,redirect:this.redirect,signal:r.length<=1?r[0]:AbortSignal.any(r),timeoutMs:i?.timeoutMs??this.timeoutMs,requestInit:this.requestInit},n,t)}files(){return this.centralDirectoryRecords.map(n=>({filename:n.data.filename,size:n.data.uncompressedSize,modified:gi(n.data.lastModifiedDate,n.data.lastModifiedTime),attributes:n.data.externalFileAttributes}))}async fetch(n,t,i){let{file:r,response:a}=await this.fetchEntryResponse(n,t,i),l=ci(await a.arrayBuffer(),r.data.compressedSize);if(!l)throw new R("cannot parse local file header in remote ZIP","LOCAL_HEADER_PARSE_FAILED");return this.decodeEntry(r,new Uint8Array(l.meta.compressedData),l.data.compressionMethod,i)}async decodeEntry(n,t,i,r){let a=t,l=i,s=n.data.generalPurposeBitFlag;if(s&1){if(s&64)throw new R("Strong-encrypted ZIP entries are not supported","UNSUPPORTED_ENCRYPTION");if(!r?.password)throw new R(`Password required for encrypted entry: ${n.data.filename}`,"UNSUPPORTED_ENCRYPTION");let f=new TextEncoder().encode(r.password),g=l===99?si(n.data.extraField):null;if(g){try{a=await li(a,f,g.strength)}catch(_){throw fo(_)}l=g.actualMethod}else{let{plaintext:_,checkByte:d}=oi(a,f),u=s&8?n.data.lastModifiedTime>>8&255:n.data.crc32>>>24&255;if(d!==u)throw new R(`Incorrect password for entry: ${n.data.filename}`,"WRONG_PASSWORD");a=_}}let c=r?.maxUncompressedSize,o;if(l===0){if(c!==void 0&&a.byteLength>c)throw new R(`Uncompressed size exceeds maxUncompressedSize (${c} bytes)`,"DECOMPRESSION_LIMIT_EXCEEDED");o=a}else o=co(a,c);if(r?.verifyCrc){let f=Nt(o);if(f!==n.data.crc32)throw new R(`CRC-32 mismatch for ${n.data.filename}: expected ${n.data.crc32}, got ${f}`,"CRC_MISMATCH")}return o}async fetchStream(n,t,i){let{file:r,response:a}=await this.fetchEntryResponse(n,t,i);if(!a.body)throw new R("Remote ZIP response has no body to stream","LOCAL_HEADER_PARSE_FAILED");if(r.data.generalPurposeBitFlag&1){let c=ci(await a.arrayBuffer(),r.data.compressedSize);if(!c)throw new R("cannot parse local file header in remote ZIP","LOCAL_HEADER_PARSE_FAILED");let o=await this.decodeEntry(r,new Uint8Array(c.meta.compressedData),c.data.compressionMethod,i);return new ReadableStream({start(f){f.enqueue(o),f.close()}})}let l=a.body.getReader(),s=_o(l,{compressedSize:r.data.compressedSize,compressionMethod:r.data.compressionMethod,maxBytes:i?.maxUncompressedSize,expectedCrc:i?.verifyCrc?r.data.crc32:void 0});return new ReadableStream({async pull(c){try{let{done:o,value:f}=await s.next();o?c.close():c.enqueue(f)}catch(o){await l.cancel(o),c.error(o)}},async cancel(c){await l.cancel(c)}})}async fetchEntryResponse(n,t,i){let r=this.centralDirectoryRecords.find(c=>c.data.filename===n);if(!r)throw new R(`File not found in remote ZIP: ${n}`,"FILE_NOT_FOUND");let a=new Headers(t);a.append("Range",`bytes=${r.data.localFileHeaderRelativeOffset}-${r.data.localFileHeaderRelativeOffset+r.data.compressedSize+418}`);let s=await fetch(this.url.toString(),this.requestInitFor(this.method,a,{signal:i?.signal,timeoutMs:i?.timeoutMs}));return He(s.status,this.url),{file:r,response:s}}},co=(e,n)=>{if(n===void 0)try{return ai(e)}catch(c){throw new R(`Failed to inflate remote ZIP entry: ${String(c)}`,"UNKNOWN")}let t=new zt({raw:!0}),i=[],r=0,a=!1;if(t.onData=c=>{if(a)return;let o=c;if(r+=o.length,r>n){a=!0;return}i.push(o)},t.push(e,!0),a)throw new R(`Decompressed size exceeds maxUncompressedSize (${n} bytes)`,"DECOMPRESSION_LIMIT_EXCEEDED");if(t.err)throw new R(`Failed to inflate remote ZIP entry: ${t.msg}`,"UNKNOWN");let l=new Uint8Array(r),s=0;for(let c of i)l.set(c,s),s+=c.length;return l};async function*_o(e,n){let{compressedSize:t,compressionMethod:i,maxBytes:r,expectedCrc:a}=n,l=a!==void 0?new Me:void 0,s=new Uint8Array(0),c=b=>{let p=new Uint8Array(s.length+b.length);p.set(s),p.set(b,s.length),s=p},o=async b=>{for(;s.length<b;){let{done:p,value:h}=await e.read();if(p)throw new R("Truncated local file header in remote ZIP","LOCAL_HEADER_PARSE_FAILED");c(h)}};await o(30);let f=new DataView(s.buffer,s.byteOffset,s.byteLength);if(f.getUint32(0)!==_i)throw new R("cannot parse local file header in remote ZIP","LOCAL_HEADER_PARSE_FAILED");let g=30+f.getUint16(26,!0)+f.getUint16(28,!0);await o(g);let _=0,d=[],u=b=>{if(_+=b.length,r!==void 0&&_>r)throw new R(`Decompressed size exceeds maxUncompressedSize (${r} bytes)`,"DECOMPRESSION_LIMIT_EXCEEDED");l?.update(b),d.push(b)},E=i===0?void 0:new zt({raw:!0});E&&(E.onData=b=>u(b));let y=t,x=b=>{let p=b.length>y?b.subarray(0,y):b;if(y-=p.length,E){if(E.push(p,y===0),E.err)throw new R(`Failed to inflate remote ZIP entry: ${E.msg}`,"UNKNOWN")}else u(p)};for(x(s.subarray(g)),yield*d.splice(0);y>0;){let{done:b,value:p}=await e.read();if(b)break;x(p),yield*d.splice(0)}if(l&&l.digest()!==a)throw new R(`CRC-32 mismatch: expected ${a}, got ${l.digest()}`,"CRC_MISMATCH")}var ho=(e,n)=>{let t=[];if(e&&t.push(e),n!==void 0&&t.push(AbortSignal.timeout(n)),t.length!==0)return t.length===1?t[0]:AbortSignal.any(t)},ui=(e,n,t)=>{let i=new Headers(e.requestInit?.headers);return t&&t.forEach((r,a)=>i.set(a,r)),{...e.requestInit,method:n,headers:i,redirect:e.redirect??e.requestInit?.redirect??"follow",credentials:e.credentials,signal:ho(e.signal,e.timeoutMs)}},fi=class{url;headUrl;additionalHeaders;method;credentials;redirect;signal;timeoutMs;requestInit;constructor({url:n,headUrl:t,additionalHeaders:i,method:r="GET",credentials:a="same-origin",redirect:l,signal:s,timeoutMs:c,requestInit:o}){this.url=n,this.headUrl=t??n,this.additionalHeaders=i,this.method=r,this.credentials=a,this.redirect=l,this.signal=s,this.timeoutMs=c,this.requestInit=o}requestInitFor(n,t){return ui({credentials:this.credentials,redirect:this.redirect,signal:this.signal,timeoutMs:this.timeoutMs,requestInit:this.requestInit},n,t)}async populate(){let n=await fetch(this.headUrl.toString(),this.requestInitFor("HEAD",this.additionalHeaders));He(n.status,this.headUrl);let t=n.headers.get("content-length");if(!t)throw new R("Could not get Content-Length of URL","CONTENT_LENGTH_MISSING");let i=Number.parseInt(t,10),{eocd:r,cdOffset:a,cdSize:l}=await this.fetchEndOfCentralDirectory(i,this.additionalHeaders),s=await this.fetchCentralDirectoryRecords(a,l,this.additionalHeaders);return new Lt({url:this.url,contentLength:i,endOfCentralDirectory:r,centralDirectoryRecords:s,method:this.method,credentials:this.credentials,redirect:this.redirect,signal:this.signal,timeoutMs:this.timeoutMs,requestInit:this.requestInit})}async fetchEndOfCentralDirectory(n,t){let r=[128,65577];for(let a of r){let l=Math.max(0,n-a),s=new Headers(t);s.append("Range",`bytes=${l}-${n}`);let c=await fetch(this.url.toString(),this.requestInitFor(this.method,s));He(c.status,this.url);let o=await c.arrayBuffer(),f=mo(o);if(f){let g=f.data.centralDirectoryByteOffset,_=f.data.centralDirectoryByteSize;if(uo(f)){let d=go(o);if(!d){if(a!==r[r.length-1]&&l>0)continue;throw new R("ZIP64 EOCD locator not found","UNSUPPORTED_ZIP64")}let u=await this.fetchZip64EOCD(d.zip64EOCDOffset,t);g=u.centralDirectoryByteOffset,_=u.centralDirectoryByteSize}if(g<0||_<0||g+_>n)throw new R(`Central directory is out of bounds (offset ${g}, size ${_}, archive ${n} bytes)`,"CENTRAL_DIRECTORY_OUT_OF_BOUNDS");return{eocd:f,cdOffset:g,cdSize:_}}if(l===0)break}throw new R("Could not get EOCD record of remote ZIP","EOCD_NOT_FOUND")}async fetchZip64EOCD(n,t){let i=new Headers(t);i.append("Range",`bytes=${n}-${n+56}`);let r=await fetch(this.url.toString(),this.requestInitFor(this.method,i));He(r.status,this.url);let a=bo(await r.arrayBuffer());if(!a)throw new R("ZIP64 EOCD record not found","UNSUPPORTED_ZIP64");return a}async fetchCentralDirectoryRecords(n,t,i){let r=new Headers(i);r.append("Range",`bytes=${n}-${n+t}`);let a=await fetch(this.url.toString(),this.requestInitFor(this.method,r));He(a.status,this.url);let l=await a.arrayBuffer();return po(l)}},gi=(e,n)=>{let t=e&31||1,i=e>>5&15||1,r=(e>>9&127)+1980,a=n>>11&31,l=n>>5&63,s=(n&31)<<1,c=f=>f.toString().padStart(2,"0"),o=`${r}-${c(i)}-${c(t)}T${c(a)}:${c(l)}:${c(s)}`;return Number.isNaN(Date.parse(o))?gi(0,0):o},uo=e=>e.data.diskNumber===Fe||e.data.cdDisk===Fe||e.data.centralDirectoryDiskNumber===Fe||e.data.centralDirectoryRecordCount===Fe||e.data.centralDirectoryByteSize===le||e.data.centralDirectoryByteOffset===le,fe=(e,n)=>{let t=e.getBigUint64(n,!0);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new R(`ZIP64 value ${t} exceeds Number.MAX_SAFE_INTEGER`,"UNSUPPORTED_ZIP64");return Number(t)},bi=(e,n)=>{let t=new DataView(e);for(let i=0;i+4<=e.byteLength;){let r=t.getUint16(i,!0),a=t.getUint16(i+2,!0),l=i+4;if(r===1){let s={},c=l;return n.uncompressed&&(s.uncompressedSize=fe(t,c),c+=8),n.compressed&&(s.compressedSize=fe(t,c),c+=8),n.offset&&(s.localHeaderOffset=fe(t,c),c+=8),n.disk&&(s.diskStart=t.getUint32(c,!0)),s}i=l+a}return{}},go=e=>{let n=new DataView(e);for(let t=e.byteLength-20;t>=0;t-=1)if(n.getUint32(t)===lo)return{zip64EOCDOffset:fe(n,t+8)};return null},bo=e=>{let n=new DataView(e);for(let t=0;t<=e.byteLength-56;t+=1)if(n.getUint32(t)===so)return{centralDirectoryRecordCount:fe(n,t+32),centralDirectoryByteSize:fe(n,t+40),centralDirectoryByteOffset:fe(n,t+48)};return null},wo="\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0",Zt=(e,n)=>{if(n)return new TextDecoder().decode(e);let t="";for(let i of new Uint8Array(e))t+=i<128?String.fromCharCode(i):wo[i-128];return t},wi=e=>!!(e>>11&1),po=e=>{let n=[],t=new DataView(e);for(let i=0;i<=e.byteLength-4;i+=1)if(t.getUint32(i)===di){let r=xo(e.slice(i));if(r){n.push(r),i+=r.meta.length-1;continue}}else if(t.getUint32(i)===hi)break;return n},xo=e=>{let t=new DataView(e);for(let i=0;i<e.byteLength-46;i+=1)if(t.getInt32(i)===di){let r=t.getUint16(i+28,!0),a=t.getUint16(i+30,!0),l=t.getUint16(i+32,!0),s=t.getUint32(i+20,!0),c=t.getUint32(i+24,!0),o=t.getUint16(i+34,!0),f=t.getUint32(i+42,!0),g=e.slice(i+46+r,i+46+r+a),_={uncompressed:c===le,compressed:s===le,offset:f===le,disk:o===Fe},d=_.uncompressed||_.compressed||_.offset||_.disk?bi(g,_):{},u=wi(t.getUint16(i+8,!0));return{meta:{length:46+r+a+l},data:{signature:e.slice(i,i+4),versionMadeBy:t.getUint16(i+4,!0),versionToExtract:t.getUint16(i+6,!0),generalPurposeBitFlag:t.getUint16(i+8,!0),compressionMethod:t.getUint16(i+10,!0),lastModifiedTime:t.getUint16(i+12,!0),lastModifiedDate:t.getUint16(i+14,!0),crc32:t.getUint32(i+16,!0),compressedSize:d.compressedSize??s,uncompressedSize:d.uncompressedSize??c,filenameLength:r,extraFieldLength:a,fileCommentLength:l,startingDiskNumber:d.diskStart??o,internalFileAttributes:t.getUint16(i+36,!0),externalFileAttributes:t.getUint32(i+38,!0),localFileHeaderRelativeOffset:d.localHeaderOffset??f,filename:Zt(e.slice(i+46,i+46+r),u),extraField:g,fileComment:Zt(e.slice(i+46+r+a,i+46+r+a+l),u)}}}return null},mo=e=>{let t=new DataView(e),i=new TextDecoder;for(let r=e.byteLength-22;r>=0;r-=1)if(t.getUint32(r)===hi){let a=t.getUint16(r+20,!0);return{meta:{},data:{signature:e.slice(r,r+4),diskNumber:t.getUint16(r+4,!0),cdDisk:t.getUint16(r+6,!0),centralDirectoryDiskNumber:t.getUint16(r+8,!0),centralDirectoryRecordCount:t.getUint16(r+10,!0),centralDirectoryByteSize:t.getUint32(r+12,!0),centralDirectoryByteOffset:t.getUint32(r+16,!0),commentLength:a,comment:i.decode(e.slice(r+22,r+22+a))}}}return null},ci=(e,n=0)=>{let i=new DataView(e);for(let r=0;r<=e.byteLength-30;r+=1)if(i.getUint32(r)===_i){let a=i.getUint16(r+26,!0),l=i.getUint16(r+28,!0),s=i.getUint16(r+6,!0),c=!!(s>>3&1),o=r+30+a+l,f=i.getUint32(r+18,!0),g=i.getUint32(r+22,!0),_=e.slice(r+30+a,o),d={uncompressed:g===le,compressed:f===le,offset:!1,disk:!1},u=d.uncompressed||d.compressed?bi(_,d):{},E=u.compressedSize??f,y=u.uncompressedSize??g,x=i.getUint32(o+n)===oo,b=x?4:0;return{meta:{dataDescriptor:c?{optionalSignature:x?e.slice(o+n,o+n+b):void 0,crc32:i.getUint32(o+n+b,!0),compressedSize:i.getUint32(o+n+b+4,!0),uncompressedSize:i.getUint32(o+n+b+8,!0)}:void 0,compressedData:c?e.slice(o,o+n):e.slice(o,o+E)},data:{signature:e.slice(r,r+4),versionToExtract:i.getUint16(r+4,!0),generalPurposeBitFlag:i.getUint16(r+6,!0),compressionMethod:i.getUint16(r+8,!0),lastModifiedTime:i.getUint16(r+10,!0),lastModifiedDate:i.getUint16(r+12,!0),crc32:i.getUint32(r+14,!0),compressedSize:E,uncompressedSize:y,filenameLength:a,extraFieldLength:l,filename:Zt(e.slice(r+30,r+30+a),wi(s)),extraField:_}}}return null};export{Lt as RemoteZip,R as RemoteZipError,fi as RemoteZipPointer,Nt as crc32,Zt as decodeZipString,uo as isZip64,po as parseAllCDs,xo as parseOneCD,mo as parseOneEOCD,ci as parseOneLocalFile,bo as parseZip64EOCD,go as parseZip64EOCDLocator,gi as parseZipDatetime};
2
+ /*! Bundled license information:
3
+
4
+ pako/dist/pako.esm.mjs:
5
+ (*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) *)
6
+ */
7
+ //# sourceMappingURL=index.mjs.map