@smartledger/bsv 7.5.1 → 7.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +110 -0
- package/README.md +38 -38
- package/bsv-gdaf.min.js +33 -33
- package/bsv-ltp.min.js +33 -33
- package/bsv-smartcontract.min.js +2 -2
- package/bsv-statuslist.min.js +1 -1
- package/bsv.bundle.js +33 -33
- package/bsv.d.ts +56 -11
- package/bsv.min.js +33 -33
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/index.js +4 -1
- package/lib/gdaf/smartledger-anchor.js +120 -11
- package/lib/smart_contract/authorizers.js +8 -0
- package/lib/smart_contract/index.js +4 -2
- package/lib/statuslist/index.js +11 -3
- package/package.json +12 -1
- package/test/gdaf/anchor_no_key_leak.js +59 -1
- package/test/types/dts_drift.js +23 -1
- package/test/types/surface_honesty.js +102 -0
- package/version.js +1 -1
package/bsv-statuslist.min.js
CHANGED
|
@@ -70,5 +70,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
70
70
|
`))}throw i}};function X2(e,t,r,i,n){if(!Eu(t))throw new da("regexp","RegExp",t);var a=n==="match";if(typeof e!="string"||Su(t,e)!==a){if(r instanceof Error)throw r;var o=!r;r=r||(typeof e!="string"?'The "string" argument must be of type string. Received type '+"".concat(nr(e)," (").concat(xu(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(xu(t),`. Input:
|
|
71
71
|
|
|
72
72
|
`).concat(xu(e),`
|
|
73
|
-
`));var s=new ai({actual:e,expected:t,message:r,operator:n,stackStartFn:i});throw s.generatedMessage=o,s}}Ge.match=function e(t,r,i){X2(t,r,i,e,"match")};Ge.doesNotMatch=function e(t,r,i){X2(t,r,i,e,"doesNotMatch")};function Q2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];W2.apply(void 0,[Q2,t.length].concat(t))}Ge.strict=Y7(Q2,Ge,{equal:Ge.strictEqual,deepEqual:Ge.deepStrictEqual,notEqual:Ge.notStrictEqual,notDeepEqual:Ge.notDeepStrictEqual});Ge.strict.strict=Ge.strict});var rx=R((IU,tx)=>{"use strict";m();function X7(){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}tx.exports=X7});var Jo=R(mt=>{"use strict";m();var Q7=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function eI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}mt.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)eI(r,i)&&(e[i]=r[i])}}return e};mt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var tI={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},rI={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};mt.setTyped=function(e){e?(mt.Buf8=Uint8Array,mt.Buf16=Uint16Array,mt.Buf32=Int32Array,mt.assign(mt,tI)):(mt.Buf8=Array,mt.Buf16=Array,mt.Buf32=Array,mt.assign(mt,rI))};mt.setTyped(Q7)});var Mx=R(ya=>{"use strict";m();var iI=Jo(),nI=4,ix=0,nx=1,aI=2;function va(e){for(var t=e.length;--t>=0;)e[t]=0}var oI=0,lx=1,fI=2,sI=3,uI=258,A0=29,nf=256,Qo=nf+1+A0,pa=30,B0=19,hx=2*Qo+1,un=15,m0=16,lI=7,R0=256,cx=16,dx=17,px=18,S0=[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],Bu=[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],hI=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vx=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],cI=512,jr=new Array((Qo+2)*2);va(jr);var Xo=new Array(pa*2);va(Xo);var ef=new Array(cI);va(ef);var tf=new Array(uI-sI+1);va(tf);var k0=new Array(A0);va(k0);var Ru=new Array(pa);va(Ru);function w0(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var yx,gx,bx;function x0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _x(e){return e<256?ef[e]:ef[256+(e>>>7)]}function rf(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function At(e,t,r){e.bi_valid>m0-r?(e.bi_buf|=t<<e.bi_valid&65535,rf(e,e.bi_buf),e.bi_buf=t>>m0-e.bi_valid,e.bi_valid+=r-m0):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function _r(e,t,r){At(e,r[t*2],r[t*2+1])}function mx(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function dI(e){e.bi_valid===16?(rf(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)}function pI(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,y=t.stat_desc.max_length,_,x,B,k,T,O,D=0;for(k=0;k<=un;k++)e.bl_count[k]=0;for(r[e.heap[e.heap_max]*2+1]=0,_=e.heap_max+1;_<hx;_++)x=e.heap[_],k=r[r[x*2+1]*2+1]+1,k>y&&(k=y,D++),r[x*2+1]=k,!(x>i)&&(e.bl_count[k]++,T=0,x>=s&&(T=o[x-s]),O=r[x*2],e.opt_len+=O*(k+T),a&&(e.static_len+=O*(n[x*2+1]+T)));if(D!==0){do{for(k=y-1;e.bl_count[k]===0;)k--;e.bl_count[k]--,e.bl_count[k+1]+=2,e.bl_count[y]--,D-=2}while(D>0);for(k=y;k!==0;k--)for(x=e.bl_count[k];x!==0;)B=e.heap[--_],!(B>i)&&(r[B*2+1]!==k&&(e.opt_len+=(k-r[B*2+1])*r[B*2],r[B*2+1]=k),x--)}}function wx(e,t,r){var i=new Array(un+1),n=0,a,o;for(a=1;a<=un;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=mx(i[s]++,s))}}function vI(){var e,t,r,i,n,a=new Array(un+1);for(r=0,i=0;i<A0-1;i++)for(k0[i]=r,e=0;e<1<<S0[i];e++)tf[r++]=i;for(tf[r-1]=i,n=0,i=0;i<16;i++)for(Ru[i]=n,e=0;e<1<<Bu[i];e++)ef[n++]=i;for(n>>=7;i<pa;i++)for(Ru[i]=n<<7,e=0;e<1<<Bu[i]-7;e++)ef[256+n++]=i;for(t=0;t<=un;t++)a[t]=0;for(e=0;e<=143;)jr[e*2+1]=8,e++,a[8]++;for(;e<=255;)jr[e*2+1]=9,e++,a[9]++;for(;e<=279;)jr[e*2+1]=7,e++,a[7]++;for(;e<=287;)jr[e*2+1]=8,e++,a[8]++;for(wx(jr,Qo+1,a),e=0;e<pa;e++)Xo[e*2+1]=5,Xo[e*2]=mx(e,5);yx=new w0(jr,S0,nf+1,Qo,un),gx=new w0(Xo,Bu,0,pa,un),bx=new w0(new Array(0),hI,0,B0,lI)}function xx(e){var t;for(t=0;t<Qo;t++)e.dyn_ltree[t*2]=0;for(t=0;t<pa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<B0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[R0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ex(e){e.bi_valid>8?rf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function yI(e,t,r,i){Ex(e),i&&(rf(e,r),rf(e,~r)),iI.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function ax(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function E0(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ax(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ax(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function ox(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?_r(e,n,t):(o=tf[n],_r(e,o+nf+1,t),s=S0[o],s!==0&&(n-=k0[o],At(e,n,s)),i--,o=_x(i),_r(e,o,r),s=Bu[o],s!==0&&(i-=Ru[o],At(e,i,s)));while(a<e.last_lit);_r(e,R0,t)}function M0(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,y=-1,_;for(e.heap_len=0,e.heap_max=hx,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=y=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)_=e.heap[++e.heap_len]=y<2?++y:0,r[_*2]=1,e.depth[_]=0,e.opt_len--,n&&(e.static_len-=i[_*2+1]);for(t.max_code=y,o=e.heap_len>>1;o>=1;o--)E0(e,r,o);_=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],E0(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[_*2]=r[o*2]+r[s*2],e.depth[_]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=_,e.heap[1]=_++,E0(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],pI(e,t),wx(r,y,e.bl_count)}function fx(e,t,r){var i,n=-1,a,o=t[1],s=0,y=7,_=4;for(o===0&&(y=138,_=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<y&&a===o)&&(s<_?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[cx*2]++):s<=10?e.bl_tree[dx*2]++:e.bl_tree[px*2]++,s=0,n=a,o===0?(y=138,_=3):a===o?(y=6,_=3):(y=7,_=4))}function sx(e,t,r){var i,n=-1,a,o=t[1],s=0,y=7,_=4;for(o===0&&(y=138,_=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<y&&a===o)){if(s<_)do _r(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(_r(e,a,e.bl_tree),s--),_r(e,cx,e.bl_tree),At(e,s-3,2)):s<=10?(_r(e,dx,e.bl_tree),At(e,s-3,3)):(_r(e,px,e.bl_tree),At(e,s-11,7));s=0,n=a,o===0?(y=138,_=3):a===o?(y=6,_=3):(y=7,_=4)}}function gI(e){var t;for(fx(e,e.dyn_ltree,e.l_desc.max_code),fx(e,e.dyn_dtree,e.d_desc.max_code),M0(e,e.bl_desc),t=B0-1;t>=3&&e.bl_tree[vx[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function bI(e,t,r,i){var n;for(At(e,t-257,5),At(e,r-1,5),At(e,i-4,4),n=0;n<i;n++)At(e,e.bl_tree[vx[n]*2+1],3);sx(e,e.dyn_ltree,t-1),sx(e,e.dyn_dtree,r-1)}function _I(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ix;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return nx;for(r=32;r<nf;r++)if(e.dyn_ltree[r*2]!==0)return nx;return ix}var ux=!1;function mI(e){ux||(vI(),ux=!0),e.l_desc=new x0(e.dyn_ltree,yx),e.d_desc=new x0(e.dyn_dtree,gx),e.bl_desc=new x0(e.bl_tree,bx),e.bi_buf=0,e.bi_valid=0,xx(e)}function Sx(e,t,r,i){At(e,(oI<<1)+(i?1:0),3),yI(e,t,r,!0)}function wI(e){At(e,lx<<1,3),_r(e,R0,jr),dI(e)}function xI(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===aI&&(e.strm.data_type=_I(e)),M0(e,e.l_desc),M0(e,e.d_desc),o=gI(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Sx(e,t,r,i):e.strategy===nI||a===n?(At(e,(lx<<1)+(i?1:0),3),ox(e,jr,Xo)):(At(e,(fI<<1)+(i?1:0),3),bI(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ox(e,e.dyn_ltree,e.dyn_dtree)),xx(e),i&&Ex(e)}function EI(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(tf[r]+nf+1)*2]++,e.dyn_dtree[_x(t)*2]++),e.last_lit===e.lit_bufsize-1}ya._tr_init=mI;ya._tr_stored_block=Sx;ya._tr_flush_block=xI;ya._tr_tally=EI;ya._tr_align=wI});var T0=R((LU,Ax)=>{"use strict";m();function SI(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}Ax.exports=SI});var I0=R((UU,Bx)=>{"use strict";m();function MI(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var AI=MI();function BI(e,t,r,i){var n=AI,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Bx.exports=BI});var kx=R((jU,Rx)=>{"use strict";m();Rx.exports={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"}});var Cx=R(xr=>{"use strict";m();var wt=Jo(),zt=Mx(),qx=T0(),oi=I0(),RI=kx(),dn=0,kI=1,TI=3,hi=4,Tx=5,wr=0,Ix=1,Zt=-2,II=-3,O0=-5,OI=-1,qI=1,ku=2,DI=3,NI=4,PI=0,LI=2,qu=8,CI=9,UI=15,FI=8,jI=29,zI=256,D0=zI+1+jI,ZI=30,HI=19,WI=2*D0+1,KI=15,Fe=3,ui=258,or=ui+Fe+1,GI=32,Du=42,N0=69,Tu=73,Iu=91,Ou=103,ln=113,of=666,nt=1,ff=2,hn=3,_a=4,VI=3;function li(e,t){return e.msg=RI[t],t}function Ox(e){return(e<<1)-(e>4?9:0)}function si(e){for(var t=e.length;--t>=0;)e[t]=0}function fi(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(wt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function ht(e,t){zt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fi(e.strm)}function ze(e,t){e.pending_buf[e.pending++]=t}function af(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function $I(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,wt.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=qx(e.adler,t,n,r):e.state.wrap===2&&(e.adler=oi(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function Dx(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,y=e.strstart>e.w_size-or?e.strstart-(e.w_size-or):0,_=e.window,x=e.w_mask,B=e.prev,k=e.strstart+ui,T=_[i+o-1],O=_[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(_[n+o]!==O||_[n+o-1]!==T||_[n]!==_[i]||_[++n]!==_[i+1])){i+=2,n++;do;while(_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&i<k);if(a=ui-(k-i),i=k-ui,a>o){if(e.match_start=t,o=a,a>=s)break;T=_[i+o-1],O=_[i+o]}}while((t=B[t&x])>y&&--r!==0);return o<=e.lookahead?o:e.lookahead}function cn(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-or)){wt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t}if(e.strm.avail_in===0)break;if(i=$I(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=Fe)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Fe-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Fe)););}while(e.lookahead<or&&e.strm.avail_in!==0)}function YI(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(cn(e),e.lookahead===0&&t===dn)return nt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,ht(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-or&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):(e.strstart>e.block_start&&(ht(e,!1),e.strm.avail_out===0),nt)}function q0(e,t){for(var r,i;;){if(e.lookahead<or){if(cn(e),e.lookahead<or&&t===dn)return nt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Fe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-or&&(e.match_length=Dx(e,r)),e.match_length>=Fe)if(i=zt._tr_tally(e,e.strstart-e.match_start,e.match_length-Fe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Fe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=e.strstart<Fe-1?e.strstart:Fe-1,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function ga(e,t){for(var r,i,n;;){if(e.lookahead<or){if(cn(e),e.lookahead<or&&t===dn)return nt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Fe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=Fe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-or&&(e.match_length=Dx(e,r),e.match_length<=5&&(e.strategy===qI||e.match_length===Fe&&e.strstart-e.match_start>4096)&&(e.match_length=Fe-1)),e.prev_length>=Fe&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-Fe,i=zt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Fe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=Fe-1,e.strstart++,i&&(ht(e,!1),e.strm.avail_out===0))return nt}else if(e.match_available){if(i=zt._tr_tally(e,0,e.window[e.strstart-1]),i&&ht(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return nt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=zt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Fe-1?e.strstart:Fe-1,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function JI(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=ui){if(cn(e),e.lookahead<=ui&&t===dn)return nt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Fe&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+ui;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=ui-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Fe?(r=zt._tr_tally(e,1,e.match_length-Fe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function XI(e,t){for(var r;;){if(e.lookahead===0&&(cn(e),e.lookahead===0)){if(t===dn)return nt;break}if(e.match_length=0,r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function mr(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}var ba;ba=[new mr(0,0,0,0,YI),new mr(4,4,8,4,q0),new mr(4,5,16,8,q0),new mr(4,6,32,32,q0),new mr(4,4,16,16,ga),new mr(8,16,32,32,ga),new mr(8,16,128,128,ga),new mr(8,32,128,256,ga),new mr(32,128,258,1024,ga),new mr(32,258,258,4096,ga)];function QI(e){e.window_size=2*e.w_size,si(e.head),e.max_lazy_match=ba[e.level].max_lazy,e.good_match=ba[e.level].good_length,e.nice_match=ba[e.level].nice_length,e.max_chain_length=ba[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Fe-1,e.match_available=0,e.ins_h=0}function eO(){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=qu,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 wt.Buf16(WI*2),this.dyn_dtree=new wt.Buf16((2*ZI+1)*2),this.bl_tree=new wt.Buf16((2*HI+1)*2),si(this.dyn_ltree),si(this.dyn_dtree),si(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new wt.Buf16(KI+1),this.heap=new wt.Buf16(2*D0+1),si(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new wt.Buf16(2*D0+1),si(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Nx(e){var t;return!e||!e.state?li(e,Zt):(e.total_in=e.total_out=0,e.data_type=LI,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Du:ln,e.adler=t.wrap===2?0:1,t.last_flush=dn,zt._tr_init(t),wr)}function Px(e){var t=Nx(e);return t===wr&&QI(e.state),t}function tO(e,t){return!e||!e.state||e.state.wrap!==2?Zt:(e.state.gzhead=t,wr)}function Lx(e,t,r,i,n,a){if(!e)return Zt;var o=1;if(t===OI&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>CI||r!==qu||i<8||i>15||t<0||t>9||a<0||a>NI)return li(e,Zt);i===8&&(i=9);var s=new eO;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Fe-1)/Fe),s.window=new wt.Buf8(s.w_size*2),s.head=new wt.Buf16(s.hash_size),s.prev=new wt.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new wt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,Px(e)}function rO(e,t){return Lx(e,t,qu,UI,FI,PI)}function iO(e,t){var r,i,n,a;if(!e||!e.state||t>Tx||t<0)return e?li(e,Zt):Zt;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===of&&t!==hi)return li(e,e.avail_out===0?O0:Zt);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===Du)if(i.wrap===2)e.adler=0,ze(i,31),ze(i,139),ze(i,8),i.gzhead?(ze(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ze(i,i.gzhead.time&255),ze(i,i.gzhead.time>>8&255),ze(i,i.gzhead.time>>16&255),ze(i,i.gzhead.time>>24&255),ze(i,i.level===9?2:i.strategy>=ku||i.level<2?4:0),ze(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(ze(i,i.gzhead.extra.length&255),ze(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=oi(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=N0):(ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,i.level===9?2:i.strategy>=ku||i.level<2?4:0),ze(i,VI),i.status=ln);else{var o=qu+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=ku||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=GI),o+=31-o%31,i.status=ln,af(i,o),i.strstart!==0&&(af(i,e.adler>>>16),af(i,e.adler&65535)),e.adler=1}if(i.status===N0)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size));)ze(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Tu)}else i.status=Tu;if(i.status===Tu)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,ze(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Iu)}else i.status=Iu;if(i.status===Iu)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,ze(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Ou)}else i.status=Ou;if(i.status===Ou&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&fi(e),i.pending+2<=i.pending_buf_size&&(ze(i,e.adler&255),ze(i,e.adler>>8&255),e.adler=0,i.status=ln)):i.status=ln),i.pending!==0){if(fi(e),e.avail_out===0)return i.last_flush=-1,wr}else if(e.avail_in===0&&Ox(t)<=Ox(r)&&t!==hi)return li(e,O0);if(i.status===of&&e.avail_in!==0)return li(e,O0);if(e.avail_in!==0||i.lookahead!==0||t!==dn&&i.status!==of){var y=i.strategy===ku?XI(i,t):i.strategy===DI?JI(i,t):ba[i.level].func(i,t);if((y===hn||y===_a)&&(i.status=of),y===nt||y===hn)return e.avail_out===0&&(i.last_flush=-1),wr;if(y===ff&&(t===kI?zt._tr_align(i):t!==Tx&&(zt._tr_stored_block(i,0,0,!1),t===TI&&(si(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),fi(e),e.avail_out===0))return i.last_flush=-1,wr}return t!==hi?wr:i.wrap<=0?Ix:(i.wrap===2?(ze(i,e.adler&255),ze(i,e.adler>>8&255),ze(i,e.adler>>16&255),ze(i,e.adler>>24&255),ze(i,e.total_in&255),ze(i,e.total_in>>8&255),ze(i,e.total_in>>16&255),ze(i,e.total_in>>24&255)):(af(i,e.adler>>>16),af(i,e.adler&65535)),fi(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?wr:Ix)}function nO(e){var t;return!e||!e.state?Zt:(t=e.state.status,t!==Du&&t!==N0&&t!==Tu&&t!==Iu&&t!==Ou&&t!==ln&&t!==of?li(e,Zt):(e.state=null,t===ln?li(e,II):wr))}function aO(e,t){var r=t.length,i,n,a,o,s,y,_,x;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Du||i.lookahead))return Zt;for(o===1&&(e.adler=qx(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(si(i.head),i.strstart=0,i.block_start=0,i.insert=0),x=new wt.Buf8(i.w_size),wt.arraySet(x,t,r-i.w_size,i.w_size,0),t=x,r=i.w_size),s=e.avail_in,y=e.next_in,_=e.input,e.avail_in=r,e.next_in=0,e.input=t,cn(i);i.lookahead>=Fe;){n=i.strstart,a=i.lookahead-(Fe-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+Fe-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=Fe-1,cn(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Fe-1,i.match_available=0,e.next_in=y,e.input=_,e.avail_in=s,i.wrap=o,wr}xr.deflateInit=rO;xr.deflateInit2=Lx;xr.deflateReset=Px;xr.deflateResetKeep=Nx;xr.deflateSetHeader=tO;xr.deflate=iO;xr.deflateEnd=nO;xr.deflateSetDictionary=aO;xr.deflateInfo="pako deflate (from Nodeca project)"});var Fx=R((WU,Ux)=>{"use strict";m();var Nu=30,oO=12;Ux.exports=function(t,r){var i,n,a,o,s,y,_,x,B,k,T,O,D,U,N,j,H,W,Z,K,J,z,X,A,h;i=t.state,n=t.next_in,A=t.input,a=n+(t.avail_in-5),o=t.next_out,h=t.output,s=o-(r-t.avail_out),y=o+(t.avail_out-257),_=i.dmax,x=i.wsize,B=i.whave,k=i.wnext,T=i.window,O=i.hold,D=i.bits,U=i.lencode,N=i.distcode,j=(1<<i.lenbits)-1,H=(1<<i.distbits)-1;e:do{D<15&&(O+=A[n++]<<D,D+=8,O+=A[n++]<<D,D+=8),W=U[O&j];t:for(;;){if(Z=W>>>24,O>>>=Z,D-=Z,Z=W>>>16&255,Z===0)h[o++]=W&65535;else if(Z&16){K=W&65535,Z&=15,Z&&(D<Z&&(O+=A[n++]<<D,D+=8),K+=O&(1<<Z)-1,O>>>=Z,D-=Z),D<15&&(O+=A[n++]<<D,D+=8,O+=A[n++]<<D,D+=8),W=N[O&H];r:for(;;){if(Z=W>>>24,O>>>=Z,D-=Z,Z=W>>>16&255,Z&16){if(J=W&65535,Z&=15,D<Z&&(O+=A[n++]<<D,D+=8,D<Z&&(O+=A[n++]<<D,D+=8)),J+=O&(1<<Z)-1,J>_){t.msg="invalid distance too far back",i.mode=Nu;break e}if(O>>>=Z,D-=Z,Z=o-s,J>Z){if(Z=J-Z,Z>B&&i.sane){t.msg="invalid distance too far back",i.mode=Nu;break e}if(z=0,X=T,k===0){if(z+=x-Z,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}}else if(k<Z){if(z+=x+k-Z,Z-=k,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);if(z=0,k<K){Z=k,K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}}}else if(z+=k-Z,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}for(;K>2;)h[o++]=X[z++],h[o++]=X[z++],h[o++]=X[z++],K-=3;K&&(h[o++]=X[z++],K>1&&(h[o++]=X[z++]))}else{z=o-J;do h[o++]=h[z++],h[o++]=h[z++],h[o++]=h[z++],K-=3;while(K>2);K&&(h[o++]=h[z++],K>1&&(h[o++]=h[z++]))}}else if((Z&64)===0){W=N[(W&65535)+(O&(1<<Z)-1)];continue r}else{t.msg="invalid distance code",i.mode=Nu;break e}break}}else if((Z&64)===0){W=U[(W&65535)+(O&(1<<Z)-1)];continue t}else if(Z&32){i.mode=oO;break e}else{t.msg="invalid literal/length code",i.mode=Nu;break e}break}}while(n<a&&o<y);K=D>>3,n-=K,D-=K<<3,O&=(1<<D)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<y?257+(y-o):257-(o-y),i.hold=O,i.bits=D}});var Gx=R((GU,Kx)=>{"use strict";m();var jx=Jo(),ma=15,zx=852,Zx=592,Hx=0,P0=1,Wx=2,fO=[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],sO=[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],uO=[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],lO=[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];Kx.exports=function(t,r,i,n,a,o,s,y){var _=y.bits,x=0,B=0,k=0,T=0,O=0,D=0,U=0,N=0,j=0,H=0,W,Z,K,J,z,X=null,A=0,h,b=new jx.Buf16(ma+1),d=new jx.Buf16(ma+1),f=null,l=0,v,g,p;for(x=0;x<=ma;x++)b[x]=0;for(B=0;B<n;B++)b[r[i+B]]++;for(O=_,T=ma;T>=1&&b[T]===0;T--);if(O>T&&(O=T),T===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,y.bits=1,0;for(k=1;k<T&&b[k]===0;k++);for(O<k&&(O=k),N=1,x=1;x<=ma;x++)if(N<<=1,N-=b[x],N<0)return-1;if(N>0&&(t===Hx||T!==1))return-1;for(d[1]=0,x=1;x<ma;x++)d[x+1]=d[x]+b[x];for(B=0;B<n;B++)r[i+B]!==0&&(s[d[r[i+B]]++]=B);if(t===Hx?(X=f=s,h=19):t===P0?(X=fO,A-=257,f=sO,l-=257,h=256):(X=uO,f=lO,h=-1),H=0,B=0,x=k,z=o,D=O,U=0,K=-1,j=1<<O,J=j-1,t===P0&&j>zx||t===Wx&&j>Zx)return 1;for(;;){v=x-U,s[B]<h?(g=0,p=s[B]):s[B]>h?(g=f[l+s[B]],p=X[A+s[B]]):(g=96,p=0),W=1<<x-U,Z=1<<D,k=Z;do Z-=W,a[z+(H>>U)+Z]=v<<24|g<<16|p|0;while(Z!==0);for(W=1<<x-1;H&W;)W>>=1;if(W!==0?(H&=W-1,H+=W):H=0,B++,--b[x]===0){if(x===T)break;x=r[i+s[B]]}if(x>O&&(H&J)!==K){for(U===0&&(U=O),z+=k,D=x-U,N=1<<D;D+U<T&&(N-=b[D+U],!(N<=0));)D++,N<<=1;if(j+=1<<D,t===P0&&j>zx||t===Wx&&j>Zx)return 1;K=H&J,a[K]=O<<24|D<<16|z-o|0}}return H!==0&&(a[z+H]=x-U<<24|64<<16|0),y.bits=O,0}});var RE=R(fr=>{"use strict";m();var Rt=Jo(),z0=T0(),Er=I0(),hO=Fx(),sf=Gx(),cO=0,_E=1,mE=2,Vx=4,dO=5,Pu=6,pn=0,pO=1,vO=2,Ht=-2,wE=-3,Z0=-4,yO=-5,$x=8,xE=1,Yx=2,Jx=3,Xx=4,Qx=5,eE=6,tE=7,rE=8,iE=9,nE=10,Uu=11,zr=12,L0=13,aE=14,C0=15,oE=16,fE=17,sE=18,uE=19,Lu=20,Cu=21,lE=22,hE=23,cE=24,dE=25,pE=26,U0=27,vE=28,yE=29,Je=30,H0=31,gO=32,bO=852,_O=592,mO=15,wO=mO;function gE(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function xO(){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 Rt.Buf16(320),this.work=new Rt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function EE(e){var t;return!e||!e.state?Ht:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=xE,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Rt.Buf32(bO),t.distcode=t.distdyn=new Rt.Buf32(_O),t.sane=1,t.back=-1,pn)}function SE(e){var t;return!e||!e.state?Ht:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,EE(e))}function ME(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ht:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,SE(e))}function AE(e,t){var r,i;return e?(i=new xO,e.state=i,i.window=null,r=ME(e,t),r!==pn&&(e.state=null),r):Ht}function EO(e){return AE(e,wO)}var bE=!0,F0,j0;function SO(e){if(bE){var t;for(F0=new Rt.Buf32(512),j0=new Rt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sf(_E,e.lens,0,288,F0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sf(mE,e.lens,0,32,j0,0,e.work,{bits:5}),bE=!1}e.lencode=F0,e.lenbits=9,e.distcode=j0,e.distbits=5}function BE(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Rt.Buf8(a.wsize)),i>=a.wsize?(Rt.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Rt.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(Rt.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function MO(e,t){var r,i,n,a,o,s,y,_,x,B,k,T,O,D,U=0,N,j,H,W,Z,K,J,z,X=new Rt.Buf8(4),A,h,b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ht;r=e.state,r.mode===zr&&(r.mode=L0),o=e.next_out,n=e.output,y=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,_=r.hold,x=r.bits,B=s,k=y,z=pn;e:for(;;)switch(r.mode){case xE:if(r.wrap===0){r.mode=L0;break}for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.wrap&2&&_===35615){r.check=0,X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0),_=0,x=0,r.mode=Yx;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((_&255)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=Je;break}if((_&15)!==$x){e.msg="unknown compression method",r.mode=Je;break}if(_>>>=4,x-=4,J=(_&15)+8,r.wbits===0)r.wbits=J;else if(J>r.wbits){e.msg="invalid window size",r.mode=Je;break}r.dmax=1<<J,e.adler=r.check=1,r.mode=_&512?nE:zr,_=0,x=0;break;case Yx:for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.flags=_,(r.flags&255)!==$x){e.msg="unknown compression method",r.mode=Je;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Je;break}r.head&&(r.head.text=_>>8&1),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0,r.mode=Jx;case Jx:for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.head&&(r.head.time=_),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,X[2]=_>>>16&255,X[3]=_>>>24&255,r.check=Er(r.check,X,4,0)),_=0,x=0,r.mode=Xx;case Xx:for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.head&&(r.head.xflags=_&255,r.head.os=_>>8),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0,r.mode=Qx;case Qx:if(r.flags&1024){for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.length=_,r.head&&(r.head.extra_len=_),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0}else r.head&&(r.head.extra=null);r.mode=eE;case eE:if(r.flags&1024&&(T=r.length,T>s&&(T=s),T&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Rt.arraySet(r.head.extra,i,a,T,J)),r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,r.length-=T),r.length))break e;r.length=0,r.mode=tE;case tE:if(r.flags&2048){if(s===0)break e;T=0;do J=i[a+T++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J));while(J&&T<s);if(r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=rE;case rE:if(r.flags&4096){if(s===0)break e;T=0;do J=i[a+T++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J));while(J&&T<s);if(r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,J)break e}else r.head&&(r.head.comment=null);r.mode=iE;case iE:if(r.flags&512){for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Je;break}_=0,x=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=zr;break;case nE:for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}e.adler=r.check=gE(_),_=0,x=0,r.mode=Uu;case Uu:if(r.havedict===0)return e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,vO;e.adler=r.check=1,r.mode=zr;case zr:if(t===dO||t===Pu)break e;case L0:if(r.last){_>>>=x&7,x-=x&7,r.mode=U0;break}for(;x<3;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}switch(r.last=_&1,_>>>=1,x-=1,_&3){case 0:r.mode=aE;break;case 1:if(SO(r),r.mode=Lu,t===Pu){_>>>=2,x-=2;break e}break;case 2:r.mode=fE;break;case 3:e.msg="invalid block type",r.mode=Je}_>>>=2,x-=2;break;case aE:for(_>>>=x&7,x-=x&7;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if((_&65535)!==(_>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Je;break}if(r.length=_&65535,_=0,x=0,r.mode=C0,t===Pu)break e;case C0:r.mode=oE;case oE:if(T=r.length,T){if(T>s&&(T=s),T>y&&(T=y),T===0)break e;Rt.arraySet(n,i,a,T,o),s-=T,a+=T,y-=T,o+=T,r.length-=T;break}r.mode=zr;break;case fE:for(;x<14;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.nlen=(_&31)+257,_>>>=5,x-=5,r.ndist=(_&31)+1,_>>>=5,x-=5,r.ncode=(_&15)+4,_>>>=4,x-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Je;break}r.have=0,r.mode=sE;case sE:for(;r.have<r.ncode;){for(;x<3;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.lens[b[r.have++]]=_&7,_>>>=3,x-=3}for(;r.have<19;)r.lens[b[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},z=sf(cO,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,z){e.msg="invalid code lengths set",r.mode=Je;break}r.have=0,r.mode=uE;case uE:for(;r.have<r.nlen+r.ndist;){for(;U=r.lencode[_&(1<<r.lenbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(H<16)_>>>=N,x-=N,r.lens[r.have++]=H;else{if(H===16){for(h=N+2;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_>>>=N,x-=N,r.have===0){e.msg="invalid bit length repeat",r.mode=Je;break}J=r.lens[r.have-1],T=3+(_&3),_>>>=2,x-=2}else if(H===17){for(h=N+3;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=N,x-=N,J=0,T=3+(_&7),_>>>=3,x-=3}else{for(h=N+7;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=N,x-=N,J=0,T=11+(_&127),_>>>=7,x-=7}if(r.have+T>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Je;break}for(;T--;)r.lens[r.have++]=J}}if(r.mode===Je)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Je;break}if(r.lenbits=9,A={bits:r.lenbits},z=sf(_E,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,z){e.msg="invalid literal/lengths set",r.mode=Je;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},z=sf(mE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,z){e.msg="invalid distances set",r.mode=Je;break}if(r.mode=Lu,t===Pu)break e;case Lu:r.mode=Cu;case Cu:if(s>=6&&y>=258){e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,hO(e,k),o=e.next_out,n=e.output,y=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,_=r.hold,x=r.bits,r.mode===zr&&(r.back=-1);break}for(r.back=0;U=r.lencode[_&(1<<r.lenbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(j&&(j&240)===0){for(W=N,Z=j,K=H;U=r.lencode[K+((_&(1<<W+Z)-1)>>W)],N=U>>>24,j=U>>>16&255,H=U&65535,!(W+N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=W,x-=W,r.back+=W}if(_>>>=N,x-=N,r.back+=N,r.length=H,j===0){r.mode=pE;break}if(j&32){r.back=-1,r.mode=zr;break}if(j&64){e.msg="invalid literal/length code",r.mode=Je;break}r.extra=j&15,r.mode=lE;case lE:if(r.extra){for(h=r.extra;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,x-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=hE;case hE:for(;U=r.distcode[_&(1<<r.distbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if((j&240)===0){for(W=N,Z=j,K=H;U=r.distcode[K+((_&(1<<W+Z)-1)>>W)],N=U>>>24,j=U>>>16&255,H=U&65535,!(W+N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=W,x-=W,r.back+=W}if(_>>>=N,x-=N,r.back+=N,j&64){e.msg="invalid distance code",r.mode=Je;break}r.offset=H,r.extra=j&15,r.mode=cE;case cE:if(r.extra){for(h=r.extra;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,x-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Je;break}r.mode=dE;case dE:if(y===0)break e;if(T=k-y,r.offset>T){if(T=r.offset-T,T>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Je;break}T>r.wnext?(T-=r.wnext,O=r.wsize-T):O=r.wnext-T,T>r.length&&(T=r.length),D=r.window}else D=n,O=o-r.offset,T=r.length;T>y&&(T=y),y-=T,r.length-=T;do n[o++]=D[O++];while(--T);r.length===0&&(r.mode=Cu);break;case pE:if(y===0)break e;n[o++]=r.length,y--,r.mode=Cu;break;case U0:if(r.wrap){for(;x<32;){if(s===0)break e;s--,_|=i[a++]<<x,x+=8}if(k-=y,e.total_out+=k,r.total+=k,k&&(e.adler=r.check=r.flags?Er(r.check,n,k,o-k):z0(r.check,n,k,o-k)),k=y,(r.flags?_:gE(_))!==r.check){e.msg="incorrect data check",r.mode=Je;break}_=0,x=0}r.mode=vE;case vE:if(r.wrap&&r.flags){for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Je;break}_=0,x=0}r.mode=yE;case yE:z=pO;break e;case Je:z=wE;break e;case H0:return Z0;case gO:default:return Ht}return e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,(r.wsize||k!==e.avail_out&&r.mode<Je&&(r.mode<U0||t!==Vx))&&BE(e,e.output,e.next_out,k-e.avail_out)?(r.mode=H0,Z0):(B-=e.avail_in,k-=e.avail_out,e.total_in+=B,e.total_out+=k,r.total+=k,r.wrap&&k&&(e.adler=r.check=r.flags?Er(r.check,n,k,e.next_out-k):z0(r.check,n,k,e.next_out-k)),e.data_type=r.bits+(r.last?64:0)+(r.mode===zr?128:0)+(r.mode===Lu||r.mode===C0?256:0),(B===0&&k===0||t===Vx)&&z===pn&&(z=yO),z)}function AO(e){if(!e||!e.state)return Ht;var t=e.state;return t.window&&(t.window=null),e.state=null,pn}function BO(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ht:(r.head=t,t.done=!1,pn)}function RO(e,t){var r=t.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Uu)?Ht:i.mode===Uu&&(n=1,n=z0(n,t,r,0),n!==i.check)?wE:(a=BE(e,t,r,r),a?(i.mode=H0,Z0):(i.havedict=1,pn))}fr.inflateReset=SE;fr.inflateReset2=ME;fr.inflateResetKeep=EE;fr.inflateInit=EO;fr.inflateInit2=AE;fr.inflate=MO;fr.inflateEnd=AO;fr.inflateGetHeader=BO;fr.inflateSetDictionary=RO;fr.inflateInfo="pako inflate (from Nodeca project)"});var TE=R((JU,kE)=>{"use strict";m();kE.exports={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_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}});var OE=R(F=>{"use strict";m();var kt=Co(),kO=rx(),uf=Cx(),vn=RE(),IE=TE();for(W0 in IE)F[W0]=IE[W0];var W0;F.NONE=0;F.DEFLATE=1;F.INFLATE=2;F.GZIP=3;F.GUNZIP=4;F.DEFLATERAW=5;F.INFLATERAW=6;F.UNZIP=7;var TO=31,IO=139;function gt(e){if(typeof e!="number"||e<F.DEFLATE||e>F.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}gt.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,kt(this.init_done,"close before init"),kt(this.mode<=F.UNZIP),this.mode===F.DEFLATE||this.mode===F.GZIP||this.mode===F.DEFLATERAW?uf.deflateEnd(this.strm):(this.mode===F.INFLATE||this.mode===F.GUNZIP||this.mode===F.INFLATERAW||this.mode===F.UNZIP)&&vn.inflateEnd(this.strm),this.mode=F.NONE,this.dictionary=null};gt.prototype.write=function(e,t,r,i,n,a,o){return this._write(!0,e,t,r,i,n,a,o)};gt.prototype.writeSync=function(e,t,r,i,n,a,o){return this._write(!1,e,t,r,i,n,a,o)};gt.prototype._write=function(e,t,r,i,n,a,o,s){if(kt.equal(arguments.length,8),kt(this.init_done,"write before init"),kt(this.mode!==F.NONE,"already finalized"),kt.equal(!1,this.write_in_progress,"write already in progress"),kt.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,kt.equal(!1,t===void 0,"must provide flush value"),this.write_in_progress=!0,t!==F.Z_NO_FLUSH&&t!==F.Z_PARTIAL_FLUSH&&t!==F.Z_SYNC_FLUSH&&t!==F.Z_FULL_FLUSH&&t!==F.Z_FINISH&&t!==F.Z_BLOCK)throw new Error("Invalid flush value");if(r==null&&(r=I.Buffer.alloc(0),n=0,i=0),this.strm.avail_in=n,this.strm.input=r,this.strm.next_in=i,this.strm.avail_out=s,this.strm.output=a,this.strm.next_out=o,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var y=this;return M.default.nextTick(function(){y._process(),y._after()}),this};gt.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]};gt.prototype._process=function(){var e=null;switch(this.mode){case F.DEFLATE:case F.GZIP:case F.DEFLATERAW:this.err=uf.deflate(this.strm,this.flush);break;case F.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(e===null)break;if(this.strm.input[e]===TO){if(this.gzip_id_bytes_read=1,e++,this.strm.avail_in===1)break}else{this.mode=F.INFLATE;break}case 1:if(e===null)break;this.strm.input[e]===IO?(this.gzip_id_bytes_read=2,this.mode=F.GUNZIP):this.mode=F.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case F.INFLATE:case F.GUNZIP:case F.INFLATERAW:for(this.err=vn.inflate(this.strm,this.flush),this.err===F.Z_NEED_DICT&&this.dictionary&&(this.err=vn.inflateSetDictionary(this.strm,this.dictionary),this.err===F.Z_OK?this.err=vn.inflate(this.strm,this.flush):this.err===F.Z_DATA_ERROR&&(this.err=F.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===F.GUNZIP&&this.err===F.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=vn.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}};gt.prototype._checkError=function(){switch(this.err){case F.Z_OK:case F.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===F.Z_FINISH)return this._error("unexpected end of file"),!1;break;case F.Z_STREAM_END:break;case F.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0};gt.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}};gt.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()};gt.prototype.init=function(e,t,r,i,n){kt(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),kt(e>=8&&e<=15,"invalid windowBits"),kt(t>=-1&&t<=9,"invalid compression level"),kt(r>=1&&r<=9,"invalid memlevel"),kt(i===F.Z_FILTERED||i===F.Z_HUFFMAN_ONLY||i===F.Z_RLE||i===F.Z_FIXED||i===F.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,r,i,n),this._setDictionary()};gt.prototype.params=function(){throw new Error("deflateParams Not supported")};gt.prototype.reset=function(){this._reset(),this._setDictionary()};gt.prototype._init=function(e,t,r,i,n){switch(this.level=e,this.windowBits=t,this.memLevel=r,this.strategy=i,this.flush=F.Z_NO_FLUSH,this.err=F.Z_OK,(this.mode===F.GZIP||this.mode===F.GUNZIP)&&(this.windowBits+=16),this.mode===F.UNZIP&&(this.windowBits+=32),(this.mode===F.DEFLATERAW||this.mode===F.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new kO,this.mode){case F.DEFLATE:case F.GZIP:case F.DEFLATERAW:this.err=uf.deflateInit2(this.strm,this.level,F.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case F.INFLATE:case F.GUNZIP:case F.INFLATERAW:case F.UNZIP:this.err=vn.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==F.Z_OK&&this._error("Init error"),this.dictionary=n,this.write_in_progress=!1,this.init_done=!0};gt.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=F.Z_OK,this.mode){case F.DEFLATE:case F.DEFLATERAW:this.err=uf.deflateSetDictionary(this.strm,this.dictionary);break;default:break}this.err!==F.Z_OK&&this._error("Failed to set dictionary")}};gt.prototype._reset=function(){switch(this.err=F.Z_OK,this.mode){case F.DEFLATE:case F.DEFLATERAW:case F.GZIP:this.err=uf.deflateReset(this.strm);break;case F.INFLATE:case F.INFLATERAW:case F.GUNZIP:this.err=vn.inflateReset(this.strm);break;default:break}this.err!==F.Z_OK&&this._error("Failed to reset stream")};F.Zlib=gt});var V0=R($=>{"use strict";m();var Sr=st().Buffer,PE=cs().Transform,te=OE(),ci=Gt(),lf=Co().ok,G0=st().kMaxLength,LE="Cannot create final Buffer. It would be larger than 0x"+G0.toString(16)+" bytes";te.Z_MIN_WINDOWBITS=8;te.Z_MAX_WINDOWBITS=15;te.Z_DEFAULT_WINDOWBITS=15;te.Z_MIN_CHUNK=64;te.Z_MAX_CHUNK=1/0;te.Z_DEFAULT_CHUNK=16*1024;te.Z_MIN_MEMLEVEL=1;te.Z_MAX_MEMLEVEL=9;te.Z_DEFAULT_MEMLEVEL=8;te.Z_MIN_LEVEL=-1;te.Z_MAX_LEVEL=9;te.Z_DEFAULT_LEVEL=te.Z_DEFAULT_COMPRESSION;var qE=Object.keys(te);for(Fu=0;Fu<qE.length;Fu++)ju=qE[Fu],ju.match(/^Z/)&&Object.defineProperty($,ju,{enumerable:!0,value:te[ju],writable:!1});var ju,Fu,Zu={Z_OK:te.Z_OK,Z_STREAM_END:te.Z_STREAM_END,Z_NEED_DICT:te.Z_NEED_DICT,Z_ERRNO:te.Z_ERRNO,Z_STREAM_ERROR:te.Z_STREAM_ERROR,Z_DATA_ERROR:te.Z_DATA_ERROR,Z_MEM_ERROR:te.Z_MEM_ERROR,Z_BUF_ERROR:te.Z_BUF_ERROR,Z_VERSION_ERROR:te.Z_VERSION_ERROR},DE=Object.keys(Zu);for(zu=0;zu<DE.length;zu++)K0=DE[zu],Zu[Zu[K0]]=K0;var K0,zu;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(Zu),writable:!1});$.Deflate=yn;$.Inflate=gn;$.Gzip=bn;$.Gunzip=_n;$.DeflateRaw=mn;$.InflateRaw=wn;$.Unzip=xn;$.createDeflate=function(e){return new yn(e)};$.createInflate=function(e){return new gn(e)};$.createDeflateRaw=function(e){return new mn(e)};$.createInflateRaw=function(e){return new wn(e)};$.createGzip=function(e){return new bn(e)};$.createGunzip=function(e){return new _n(e)};$.createUnzip=function(e){return new xn(e)};$.deflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new yn(t),e,r)};$.deflateSync=function(e,t){return Sn(new yn(t),e)};$.gzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new bn(t),e,r)};$.gzipSync=function(e,t){return Sn(new bn(t),e)};$.deflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new mn(t),e,r)};$.deflateRawSync=function(e,t){return Sn(new mn(t),e)};$.unzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new xn(t),e,r)};$.unzipSync=function(e,t){return Sn(new xn(t),e)};$.inflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new gn(t),e,r)};$.inflateSync=function(e,t){return Sn(new gn(t),e)};$.gunzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new _n(t),e,r)};$.gunzipSync=function(e,t){return Sn(new _n(t),e)};$.inflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new wn(t),e,r)};$.inflateRawSync=function(e,t){return Sn(new wn(t),e)};function En(e,t,r){var i=[],n=0;e.on("error",o),e.on("end",s),e.end(t),a();function a(){for(var y;(y=e.read())!==null;)i.push(y),n+=y.length;e.once("readable",a)}function o(y){e.removeListener("end",s),e.removeListener("readable",a),r(y)}function s(){var y,_=null;n>=G0?_=new RangeError(LE):y=Sr.concat(i,n),i=[],e.close(),r(_,y)}}function Sn(e,t){if(typeof t=="string"&&(t=Sr.from(t)),!Sr.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function yn(e){if(!(this instanceof yn))return new yn(e);Qe.call(this,e,te.DEFLATE)}function gn(e){if(!(this instanceof gn))return new gn(e);Qe.call(this,e,te.INFLATE)}function bn(e){if(!(this instanceof bn))return new bn(e);Qe.call(this,e,te.GZIP)}function _n(e){if(!(this instanceof _n))return new _n(e);Qe.call(this,e,te.GUNZIP)}function mn(e){if(!(this instanceof mn))return new mn(e);Qe.call(this,e,te.DEFLATERAW)}function wn(e){if(!(this instanceof wn))return new wn(e);Qe.call(this,e,te.INFLATERAW)}function xn(e){if(!(this instanceof xn))return new xn(e);Qe.call(this,e,te.UNZIP)}function NE(e){return e===te.Z_NO_FLUSH||e===te.Z_PARTIAL_FLUSH||e===te.Z_SYNC_FLUSH||e===te.Z_FULL_FLUSH||e===te.Z_FINISH||e===te.Z_BLOCK}function Qe(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||$.Z_DEFAULT_CHUNK,PE.call(this,e),e.flush&&!NE(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!NE(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||te.Z_NO_FLUSH,this._finishFlushFlag=typeof e.finishFlush<"u"?e.finishFlush:te.Z_FINISH,e.chunkSize&&(e.chunkSize<$.Z_MIN_CHUNK||e.chunkSize>$.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<$.Z_MIN_WINDOWBITS||e.windowBits>$.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<$.Z_MIN_LEVEL||e.level>$.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<$.Z_MIN_MEMLEVEL||e.memLevel>$.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=$.Z_FILTERED&&e.strategy!=$.Z_HUFFMAN_ONLY&&e.strategy!=$.Z_RLE&&e.strategy!=$.Z_FIXED&&e.strategy!=$.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Sr.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new te.Zlib(t);var i=this;this._hadError=!1,this._handle.onerror=function(o,s){Hu(i),i._hadError=!0;var y=new Error(o);y.errno=s,y.code=$.codes[s],i.emit("error",y)};var n=$.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(n=e.level);var a=$.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(a=e.strategy),this._handle.init(e.windowBits||$.Z_DEFAULT_WINDOWBITS,n,e.memLevel||$.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=Sr.allocUnsafe(this._chunkSize),this._offset=0,this._level=n,this._strategy=a,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}ci.inherits(Qe,PE);Qe.prototype.params=function(e,t,r){if(e<$.Z_MIN_LEVEL||e>$.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=$.Z_FILTERED&&t!=$.Z_HUFFMAN_ONLY&&t!=$.Z_RLE&&t!=$.Z_FIXED&&t!=$.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var i=this;this.flush(te.Z_SYNC_FLUSH,function(){lf(i._handle,"zlib binding closed"),i._handle.params(e,t),i._hadError||(i._level=e,i._strategy=t,r&&r())})}else M.default.nextTick(r)};Qe.prototype.reset=function(){return lf(this._handle,"zlib binding closed"),this._handle.reset()};Qe.prototype._flush=function(e){this._transform(Sr.alloc(0),"",e)};Qe.prototype.flush=function(e,t){var r=this,i=this._writableState;(typeof e=="function"||e===void 0&&!t)&&(t=e,e=te.Z_FULL_FLUSH),i.ended?t&&M.default.nextTick(t):i.ending?t&&this.once("end",t):i.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(Sr.alloc(0),"",t))};Qe.prototype.close=function(e){Hu(this,e),M.default.nextTick(OO,this)};function Hu(e,t){t&&M.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function OO(e){e.emit("close")}Qe.prototype._transform=function(e,t,r){var i,n=this._writableState,a=n.ending||n.ended,o=a&&(!e||n.length===e.length);if(e!==null&&!Sr.isBuffer(e))return r(new Error("invalid input"));if(!this._handle)return r(new Error("zlib binding closed"));o?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=n.length&&(this._flushFlag=this._opts.flush||te.Z_NO_FLUSH)),this._processChunk(e,i,r)};Qe.prototype._processChunk=function(e,t,r){var i=e&&e.length,n=this._chunkSize-this._offset,a=0,o=this,s=typeof r=="function";if(!s){var y=[],_=0,x;this.on("error",function(D){x=D}),lf(this._handle,"zlib binding closed");do var B=this._handle.writeSync(t,e,a,i,this._buffer,this._offset,n);while(!this._hadError&&O(B[0],B[1]));if(this._hadError)throw x;if(_>=G0)throw Hu(this),new RangeError(LE);var k=Sr.concat(y,_);return Hu(this),k}lf(this._handle,"zlib binding closed");var T=this._handle.write(t,e,a,i,this._buffer,this._offset,n);T.buffer=e,T.callback=O;function O(D,U){if(this&&(this.buffer=null,this.callback=null),!o._hadError){var N=n-U;if(lf(N>=0,"have should not go down"),N>0){var j=o._buffer.slice(o._offset,o._offset+N);o._offset+=N,s?o.push(j):(y.push(j),_+=j.length)}if((U===0||o._offset>=o._chunkSize)&&(n=o._chunkSize,o._offset=0,o._buffer=Sr.allocUnsafe(o._chunkSize)),U===0){if(a+=i-D,i=D,!s)return!0;var H=o._handle.write(t,e,a,i,o._buffer,o._offset,o._chunkSize);H.callback=O,H.buffer=e;return}if(!s)return!1;r()}}};ci.inherits(yn,Qe);ci.inherits(gn,Qe);ci.inherits(bn,Qe);ci.inherits(_n,Qe);ci.inherits(mn,Qe);ci.inherits(wn,Qe);ci.inherits(xn,Qe)});var zE=R((nF,jE)=>{"use strict";m();var $0=lw(),iF=Js(),CE=V0(),qO=8*1024*1024;function UE(e,t){var r=t&&t.maxDecompressedBytes||qO;return CE.gunzipSync(I.Buffer.from(e,"base64"),{maxOutputLength:r})}async function FE(e,t){if(!t.expectedIssuerDid)throw new Error("expectedIssuerDid is required to verify a status list (issuer pinning); refusing to read revocation state from an unpinned/unverified JWT");var r=t.didResolver;if(!r){var i=t.issuerJwks||(t.issuerPublicJwk?{keys:[t.issuerPublicJwk]}:null);if(!i)throw new Error("Provide params.didResolver, params.issuerJwks, or params.issuerPublicJwk to verify the status list signature");r=async function(){return{jwks:i}}}var n=await $0.verifyVcJwt(e,{didResolver:r,expectedIssuerDid:t.expectedIssuerDid,allowedAlgs:t.allowedAlgs,allowLegacyDER:t.allowLegacyDER,clockToleranceSec:t.clockToleranceSec});if(!n.valid)throw new Error("Status list signature verification failed: "+(n.error||"invalid signature"));return n.payload}async function DO(e){if(!e.issuerDid||!e.privateJwk)throw new Error("issuerDid and privateJwk are required");var t=e.listId||e.issuerDid+"/status/"+Date.now(),r=e.listSize||1e5,i=Math.ceil(r/8),n=I.Buffer.alloc(i,0),a=V0(),o=a.gzipSync(n),s=o.toString("base64"),y={"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/vc/status-list/2021/v1"],type:["VerifiableCredential","StatusList2021Credential"],issuer:e.issuerDid,issuanceDate:new Date().toISOString(),credentialSubject:{id:t,type:"StatusList2021",statusPurpose:"revocation",encodedList:s}},_=await $0.issueVcJwt({issuerDid:e.issuerDid,subjectId:t,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:y.credentialSubject,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:_.jwt,listId:t}}async function NO(e){if(!e.listVcJwt||e.index===void 0||!e.status||!e.privateJwk)throw new Error("listVcJwt, index, status, and privateJwk are required");var t=await FE(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=UE(r,e),n=Math.floor(e.index/8),a=e.index%8;if(n>=i.length)throw new Error("Index out of range");var o=e.status==="revoked"||e.status==="suspended"?1:0;o===1?i[n]|=1<<a:i[n]&=~(1<<a);var s=CE.gzipSync(i),y=s.toString("base64"),_={id:t.vc.credentialSubject.id,type:"StatusList2021",statusPurpose:"revocation",encodedList:y},x=await $0.issueVcJwt({issuerDid:t.iss,subjectId:t.vc.credentialSubject.id,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:_,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:x.jwt}}async function PO(e){if(!e.listVcJwt||e.index===void 0)throw new Error("listVcJwt and index are required");var t=await FE(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=UE(r,e),n=Math.floor(e.index/8),a=e.index%8;if(n>=i.length)throw new Error("Index out of range");var o=i[n]>>a&1;return o===1?"revoked":"valid"}jE.exports={createStatusList:DO,updateStatusList:NO,getCredentialStatusEntry:PO}});var LO=R((oF,ZE)=>{m();ZE.exports=zE()});return LO();})();
|
|
73
|
+
`));var s=new ai({actual:e,expected:t,message:r,operator:n,stackStartFn:i});throw s.generatedMessage=o,s}}Ge.match=function e(t,r,i){X2(t,r,i,e,"match")};Ge.doesNotMatch=function e(t,r,i){X2(t,r,i,e,"doesNotMatch")};function Q2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];W2.apply(void 0,[Q2,t.length].concat(t))}Ge.strict=Y7(Q2,Ge,{equal:Ge.strictEqual,deepEqual:Ge.deepStrictEqual,notEqual:Ge.notStrictEqual,notDeepEqual:Ge.notDeepStrictEqual});Ge.strict.strict=Ge.strict});var rx=R((IU,tx)=>{"use strict";m();function X7(){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}tx.exports=X7});var Jo=R(mt=>{"use strict";m();var Q7=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function eI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}mt.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)eI(r,i)&&(e[i]=r[i])}}return e};mt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var tI={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},rI={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};mt.setTyped=function(e){e?(mt.Buf8=Uint8Array,mt.Buf16=Uint16Array,mt.Buf32=Int32Array,mt.assign(mt,tI)):(mt.Buf8=Array,mt.Buf16=Array,mt.Buf32=Array,mt.assign(mt,rI))};mt.setTyped(Q7)});var Mx=R(ya=>{"use strict";m();var iI=Jo(),nI=4,ix=0,nx=1,aI=2;function va(e){for(var t=e.length;--t>=0;)e[t]=0}var oI=0,lx=1,fI=2,sI=3,uI=258,A0=29,nf=256,Qo=nf+1+A0,pa=30,B0=19,hx=2*Qo+1,un=15,m0=16,lI=7,R0=256,cx=16,dx=17,px=18,S0=[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],Bu=[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],hI=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vx=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],cI=512,jr=new Array((Qo+2)*2);va(jr);var Xo=new Array(pa*2);va(Xo);var ef=new Array(cI);va(ef);var tf=new Array(uI-sI+1);va(tf);var k0=new Array(A0);va(k0);var Ru=new Array(pa);va(Ru);function w0(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var yx,gx,bx;function x0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _x(e){return e<256?ef[e]:ef[256+(e>>>7)]}function rf(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function At(e,t,r){e.bi_valid>m0-r?(e.bi_buf|=t<<e.bi_valid&65535,rf(e,e.bi_buf),e.bi_buf=t>>m0-e.bi_valid,e.bi_valid+=r-m0):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function _r(e,t,r){At(e,r[t*2],r[t*2+1])}function mx(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function dI(e){e.bi_valid===16?(rf(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)}function pI(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,y=t.stat_desc.max_length,_,x,B,k,T,O,D=0;for(k=0;k<=un;k++)e.bl_count[k]=0;for(r[e.heap[e.heap_max]*2+1]=0,_=e.heap_max+1;_<hx;_++)x=e.heap[_],k=r[r[x*2+1]*2+1]+1,k>y&&(k=y,D++),r[x*2+1]=k,!(x>i)&&(e.bl_count[k]++,T=0,x>=s&&(T=o[x-s]),O=r[x*2],e.opt_len+=O*(k+T),a&&(e.static_len+=O*(n[x*2+1]+T)));if(D!==0){do{for(k=y-1;e.bl_count[k]===0;)k--;e.bl_count[k]--,e.bl_count[k+1]+=2,e.bl_count[y]--,D-=2}while(D>0);for(k=y;k!==0;k--)for(x=e.bl_count[k];x!==0;)B=e.heap[--_],!(B>i)&&(r[B*2+1]!==k&&(e.opt_len+=(k-r[B*2+1])*r[B*2],r[B*2+1]=k),x--)}}function wx(e,t,r){var i=new Array(un+1),n=0,a,o;for(a=1;a<=un;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=mx(i[s]++,s))}}function vI(){var e,t,r,i,n,a=new Array(un+1);for(r=0,i=0;i<A0-1;i++)for(k0[i]=r,e=0;e<1<<S0[i];e++)tf[r++]=i;for(tf[r-1]=i,n=0,i=0;i<16;i++)for(Ru[i]=n,e=0;e<1<<Bu[i];e++)ef[n++]=i;for(n>>=7;i<pa;i++)for(Ru[i]=n<<7,e=0;e<1<<Bu[i]-7;e++)ef[256+n++]=i;for(t=0;t<=un;t++)a[t]=0;for(e=0;e<=143;)jr[e*2+1]=8,e++,a[8]++;for(;e<=255;)jr[e*2+1]=9,e++,a[9]++;for(;e<=279;)jr[e*2+1]=7,e++,a[7]++;for(;e<=287;)jr[e*2+1]=8,e++,a[8]++;for(wx(jr,Qo+1,a),e=0;e<pa;e++)Xo[e*2+1]=5,Xo[e*2]=mx(e,5);yx=new w0(jr,S0,nf+1,Qo,un),gx=new w0(Xo,Bu,0,pa,un),bx=new w0(new Array(0),hI,0,B0,lI)}function xx(e){var t;for(t=0;t<Qo;t++)e.dyn_ltree[t*2]=0;for(t=0;t<pa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<B0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[R0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ex(e){e.bi_valid>8?rf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function yI(e,t,r,i){Ex(e),i&&(rf(e,r),rf(e,~r)),iI.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function ax(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function E0(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ax(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ax(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function ox(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?_r(e,n,t):(o=tf[n],_r(e,o+nf+1,t),s=S0[o],s!==0&&(n-=k0[o],At(e,n,s)),i--,o=_x(i),_r(e,o,r),s=Bu[o],s!==0&&(i-=Ru[o],At(e,i,s)));while(a<e.last_lit);_r(e,R0,t)}function M0(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,y=-1,_;for(e.heap_len=0,e.heap_max=hx,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=y=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)_=e.heap[++e.heap_len]=y<2?++y:0,r[_*2]=1,e.depth[_]=0,e.opt_len--,n&&(e.static_len-=i[_*2+1]);for(t.max_code=y,o=e.heap_len>>1;o>=1;o--)E0(e,r,o);_=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],E0(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[_*2]=r[o*2]+r[s*2],e.depth[_]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=_,e.heap[1]=_++,E0(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],pI(e,t),wx(r,y,e.bl_count)}function fx(e,t,r){var i,n=-1,a,o=t[1],s=0,y=7,_=4;for(o===0&&(y=138,_=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<y&&a===o)&&(s<_?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[cx*2]++):s<=10?e.bl_tree[dx*2]++:e.bl_tree[px*2]++,s=0,n=a,o===0?(y=138,_=3):a===o?(y=6,_=3):(y=7,_=4))}function sx(e,t,r){var i,n=-1,a,o=t[1],s=0,y=7,_=4;for(o===0&&(y=138,_=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<y&&a===o)){if(s<_)do _r(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(_r(e,a,e.bl_tree),s--),_r(e,cx,e.bl_tree),At(e,s-3,2)):s<=10?(_r(e,dx,e.bl_tree),At(e,s-3,3)):(_r(e,px,e.bl_tree),At(e,s-11,7));s=0,n=a,o===0?(y=138,_=3):a===o?(y=6,_=3):(y=7,_=4)}}function gI(e){var t;for(fx(e,e.dyn_ltree,e.l_desc.max_code),fx(e,e.dyn_dtree,e.d_desc.max_code),M0(e,e.bl_desc),t=B0-1;t>=3&&e.bl_tree[vx[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function bI(e,t,r,i){var n;for(At(e,t-257,5),At(e,r-1,5),At(e,i-4,4),n=0;n<i;n++)At(e,e.bl_tree[vx[n]*2+1],3);sx(e,e.dyn_ltree,t-1),sx(e,e.dyn_dtree,r-1)}function _I(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ix;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return nx;for(r=32;r<nf;r++)if(e.dyn_ltree[r*2]!==0)return nx;return ix}var ux=!1;function mI(e){ux||(vI(),ux=!0),e.l_desc=new x0(e.dyn_ltree,yx),e.d_desc=new x0(e.dyn_dtree,gx),e.bl_desc=new x0(e.bl_tree,bx),e.bi_buf=0,e.bi_valid=0,xx(e)}function Sx(e,t,r,i){At(e,(oI<<1)+(i?1:0),3),yI(e,t,r,!0)}function wI(e){At(e,lx<<1,3),_r(e,R0,jr),dI(e)}function xI(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===aI&&(e.strm.data_type=_I(e)),M0(e,e.l_desc),M0(e,e.d_desc),o=gI(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Sx(e,t,r,i):e.strategy===nI||a===n?(At(e,(lx<<1)+(i?1:0),3),ox(e,jr,Xo)):(At(e,(fI<<1)+(i?1:0),3),bI(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ox(e,e.dyn_ltree,e.dyn_dtree)),xx(e),i&&Ex(e)}function EI(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(tf[r]+nf+1)*2]++,e.dyn_dtree[_x(t)*2]++),e.last_lit===e.lit_bufsize-1}ya._tr_init=mI;ya._tr_stored_block=Sx;ya._tr_flush_block=xI;ya._tr_tally=EI;ya._tr_align=wI});var T0=R((LU,Ax)=>{"use strict";m();function SI(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}Ax.exports=SI});var I0=R((UU,Bx)=>{"use strict";m();function MI(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var AI=MI();function BI(e,t,r,i){var n=AI,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Bx.exports=BI});var kx=R((jU,Rx)=>{"use strict";m();Rx.exports={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"}});var Cx=R(xr=>{"use strict";m();var wt=Jo(),zt=Mx(),qx=T0(),oi=I0(),RI=kx(),dn=0,kI=1,TI=3,hi=4,Tx=5,wr=0,Ix=1,Zt=-2,II=-3,O0=-5,OI=-1,qI=1,ku=2,DI=3,NI=4,PI=0,LI=2,qu=8,CI=9,UI=15,FI=8,jI=29,zI=256,D0=zI+1+jI,ZI=30,HI=19,WI=2*D0+1,KI=15,Fe=3,ui=258,or=ui+Fe+1,GI=32,Du=42,N0=69,Tu=73,Iu=91,Ou=103,ln=113,of=666,nt=1,ff=2,hn=3,_a=4,VI=3;function li(e,t){return e.msg=RI[t],t}function Ox(e){return(e<<1)-(e>4?9:0)}function si(e){for(var t=e.length;--t>=0;)e[t]=0}function fi(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(wt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function ht(e,t){zt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fi(e.strm)}function ze(e,t){e.pending_buf[e.pending++]=t}function af(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function $I(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,wt.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=qx(e.adler,t,n,r):e.state.wrap===2&&(e.adler=oi(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function Dx(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,y=e.strstart>e.w_size-or?e.strstart-(e.w_size-or):0,_=e.window,x=e.w_mask,B=e.prev,k=e.strstart+ui,T=_[i+o-1],O=_[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(_[n+o]!==O||_[n+o-1]!==T||_[n]!==_[i]||_[++n]!==_[i+1])){i+=2,n++;do;while(_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&_[++i]===_[++n]&&i<k);if(a=ui-(k-i),i=k-ui,a>o){if(e.match_start=t,o=a,a>=s)break;T=_[i+o-1],O=_[i+o]}}while((t=B[t&x])>y&&--r!==0);return o<=e.lookahead?o:e.lookahead}function cn(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-or)){wt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t}if(e.strm.avail_in===0)break;if(i=$I(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=Fe)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Fe-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Fe)););}while(e.lookahead<or&&e.strm.avail_in!==0)}function YI(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(cn(e),e.lookahead===0&&t===dn)return nt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,ht(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-or&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):(e.strstart>e.block_start&&(ht(e,!1),e.strm.avail_out===0),nt)}function q0(e,t){for(var r,i;;){if(e.lookahead<or){if(cn(e),e.lookahead<or&&t===dn)return nt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Fe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-or&&(e.match_length=Dx(e,r)),e.match_length>=Fe)if(i=zt._tr_tally(e,e.strstart-e.match_start,e.match_length-Fe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Fe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=e.strstart<Fe-1?e.strstart:Fe-1,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function ga(e,t){for(var r,i,n;;){if(e.lookahead<or){if(cn(e),e.lookahead<or&&t===dn)return nt;if(e.lookahead===0)break}if(r=0,e.lookahead>=Fe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=Fe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-or&&(e.match_length=Dx(e,r),e.match_length<=5&&(e.strategy===qI||e.match_length===Fe&&e.strstart-e.match_start>4096)&&(e.match_length=Fe-1)),e.prev_length>=Fe&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-Fe,i=zt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Fe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Fe-1])&e.hash_mask,r=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=Fe-1,e.strstart++,i&&(ht(e,!1),e.strm.avail_out===0))return nt}else if(e.match_available){if(i=zt._tr_tally(e,0,e.window[e.strstart-1]),i&&ht(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return nt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=zt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Fe-1?e.strstart:Fe-1,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function JI(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=ui){if(cn(e),e.lookahead<=ui&&t===dn)return nt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Fe&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+ui;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=ui-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Fe?(r=zt._tr_tally(e,1,e.match_length-Fe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function XI(e,t){for(var r;;){if(e.lookahead===0&&(cn(e),e.lookahead===0)){if(t===dn)return nt;break}if(e.match_length=0,r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ht(e,!1),e.strm.avail_out===0))return nt}return e.insert=0,t===hi?(ht(e,!0),e.strm.avail_out===0?hn:_a):e.last_lit&&(ht(e,!1),e.strm.avail_out===0)?nt:ff}function mr(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}var ba;ba=[new mr(0,0,0,0,YI),new mr(4,4,8,4,q0),new mr(4,5,16,8,q0),new mr(4,6,32,32,q0),new mr(4,4,16,16,ga),new mr(8,16,32,32,ga),new mr(8,16,128,128,ga),new mr(8,32,128,256,ga),new mr(32,128,258,1024,ga),new mr(32,258,258,4096,ga)];function QI(e){e.window_size=2*e.w_size,si(e.head),e.max_lazy_match=ba[e.level].max_lazy,e.good_match=ba[e.level].good_length,e.nice_match=ba[e.level].nice_length,e.max_chain_length=ba[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Fe-1,e.match_available=0,e.ins_h=0}function eO(){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=qu,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 wt.Buf16(WI*2),this.dyn_dtree=new wt.Buf16((2*ZI+1)*2),this.bl_tree=new wt.Buf16((2*HI+1)*2),si(this.dyn_ltree),si(this.dyn_dtree),si(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new wt.Buf16(KI+1),this.heap=new wt.Buf16(2*D0+1),si(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new wt.Buf16(2*D0+1),si(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Nx(e){var t;return!e||!e.state?li(e,Zt):(e.total_in=e.total_out=0,e.data_type=LI,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Du:ln,e.adler=t.wrap===2?0:1,t.last_flush=dn,zt._tr_init(t),wr)}function Px(e){var t=Nx(e);return t===wr&&QI(e.state),t}function tO(e,t){return!e||!e.state||e.state.wrap!==2?Zt:(e.state.gzhead=t,wr)}function Lx(e,t,r,i,n,a){if(!e)return Zt;var o=1;if(t===OI&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>CI||r!==qu||i<8||i>15||t<0||t>9||a<0||a>NI)return li(e,Zt);i===8&&(i=9);var s=new eO;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Fe-1)/Fe),s.window=new wt.Buf8(s.w_size*2),s.head=new wt.Buf16(s.hash_size),s.prev=new wt.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new wt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,Px(e)}function rO(e,t){return Lx(e,t,qu,UI,FI,PI)}function iO(e,t){var r,i,n,a;if(!e||!e.state||t>Tx||t<0)return e?li(e,Zt):Zt;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===of&&t!==hi)return li(e,e.avail_out===0?O0:Zt);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===Du)if(i.wrap===2)e.adler=0,ze(i,31),ze(i,139),ze(i,8),i.gzhead?(ze(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ze(i,i.gzhead.time&255),ze(i,i.gzhead.time>>8&255),ze(i,i.gzhead.time>>16&255),ze(i,i.gzhead.time>>24&255),ze(i,i.level===9?2:i.strategy>=ku||i.level<2?4:0),ze(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(ze(i,i.gzhead.extra.length&255),ze(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=oi(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=N0):(ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,0),ze(i,i.level===9?2:i.strategy>=ku||i.level<2?4:0),ze(i,VI),i.status=ln);else{var o=qu+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=ku||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=GI),o+=31-o%31,i.status=ln,af(i,o),i.strstart!==0&&(af(i,e.adler>>>16),af(i,e.adler&65535)),e.adler=1}if(i.status===N0)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size));)ze(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Tu)}else i.status=Tu;if(i.status===Tu)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,ze(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Iu)}else i.status=Iu;if(i.status===Iu)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),fi(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,ze(i,a)}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=oi(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Ou)}else i.status=Ou;if(i.status===Ou&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&fi(e),i.pending+2<=i.pending_buf_size&&(ze(i,e.adler&255),ze(i,e.adler>>8&255),e.adler=0,i.status=ln)):i.status=ln),i.pending!==0){if(fi(e),e.avail_out===0)return i.last_flush=-1,wr}else if(e.avail_in===0&&Ox(t)<=Ox(r)&&t!==hi)return li(e,O0);if(i.status===of&&e.avail_in!==0)return li(e,O0);if(e.avail_in!==0||i.lookahead!==0||t!==dn&&i.status!==of){var y=i.strategy===ku?XI(i,t):i.strategy===DI?JI(i,t):ba[i.level].func(i,t);if((y===hn||y===_a)&&(i.status=of),y===nt||y===hn)return e.avail_out===0&&(i.last_flush=-1),wr;if(y===ff&&(t===kI?zt._tr_align(i):t!==Tx&&(zt._tr_stored_block(i,0,0,!1),t===TI&&(si(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),fi(e),e.avail_out===0))return i.last_flush=-1,wr}return t!==hi?wr:i.wrap<=0?Ix:(i.wrap===2?(ze(i,e.adler&255),ze(i,e.adler>>8&255),ze(i,e.adler>>16&255),ze(i,e.adler>>24&255),ze(i,e.total_in&255),ze(i,e.total_in>>8&255),ze(i,e.total_in>>16&255),ze(i,e.total_in>>24&255)):(af(i,e.adler>>>16),af(i,e.adler&65535)),fi(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?wr:Ix)}function nO(e){var t;return!e||!e.state?Zt:(t=e.state.status,t!==Du&&t!==N0&&t!==Tu&&t!==Iu&&t!==Ou&&t!==ln&&t!==of?li(e,Zt):(e.state=null,t===ln?li(e,II):wr))}function aO(e,t){var r=t.length,i,n,a,o,s,y,_,x;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Du||i.lookahead))return Zt;for(o===1&&(e.adler=qx(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(si(i.head),i.strstart=0,i.block_start=0,i.insert=0),x=new wt.Buf8(i.w_size),wt.arraySet(x,t,r-i.w_size,i.w_size,0),t=x,r=i.w_size),s=e.avail_in,y=e.next_in,_=e.input,e.avail_in=r,e.next_in=0,e.input=t,cn(i);i.lookahead>=Fe;){n=i.strstart,a=i.lookahead-(Fe-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+Fe-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=Fe-1,cn(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Fe-1,i.match_available=0,e.next_in=y,e.input=_,e.avail_in=s,i.wrap=o,wr}xr.deflateInit=rO;xr.deflateInit2=Lx;xr.deflateReset=Px;xr.deflateResetKeep=Nx;xr.deflateSetHeader=tO;xr.deflate=iO;xr.deflateEnd=nO;xr.deflateSetDictionary=aO;xr.deflateInfo="pako deflate (from Nodeca project)"});var Fx=R((WU,Ux)=>{"use strict";m();var Nu=30,oO=12;Ux.exports=function(t,r){var i,n,a,o,s,y,_,x,B,k,T,O,D,U,N,j,H,W,Z,K,J,z,X,A,h;i=t.state,n=t.next_in,A=t.input,a=n+(t.avail_in-5),o=t.next_out,h=t.output,s=o-(r-t.avail_out),y=o+(t.avail_out-257),_=i.dmax,x=i.wsize,B=i.whave,k=i.wnext,T=i.window,O=i.hold,D=i.bits,U=i.lencode,N=i.distcode,j=(1<<i.lenbits)-1,H=(1<<i.distbits)-1;e:do{D<15&&(O+=A[n++]<<D,D+=8,O+=A[n++]<<D,D+=8),W=U[O&j];t:for(;;){if(Z=W>>>24,O>>>=Z,D-=Z,Z=W>>>16&255,Z===0)h[o++]=W&65535;else if(Z&16){K=W&65535,Z&=15,Z&&(D<Z&&(O+=A[n++]<<D,D+=8),K+=O&(1<<Z)-1,O>>>=Z,D-=Z),D<15&&(O+=A[n++]<<D,D+=8,O+=A[n++]<<D,D+=8),W=N[O&H];r:for(;;){if(Z=W>>>24,O>>>=Z,D-=Z,Z=W>>>16&255,Z&16){if(J=W&65535,Z&=15,D<Z&&(O+=A[n++]<<D,D+=8,D<Z&&(O+=A[n++]<<D,D+=8)),J+=O&(1<<Z)-1,J>_){t.msg="invalid distance too far back",i.mode=Nu;break e}if(O>>>=Z,D-=Z,Z=o-s,J>Z){if(Z=J-Z,Z>B&&i.sane){t.msg="invalid distance too far back",i.mode=Nu;break e}if(z=0,X=T,k===0){if(z+=x-Z,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}}else if(k<Z){if(z+=x+k-Z,Z-=k,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);if(z=0,k<K){Z=k,K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}}}else if(z+=k-Z,Z<K){K-=Z;do h[o++]=T[z++];while(--Z);z=o-J,X=h}for(;K>2;)h[o++]=X[z++],h[o++]=X[z++],h[o++]=X[z++],K-=3;K&&(h[o++]=X[z++],K>1&&(h[o++]=X[z++]))}else{z=o-J;do h[o++]=h[z++],h[o++]=h[z++],h[o++]=h[z++],K-=3;while(K>2);K&&(h[o++]=h[z++],K>1&&(h[o++]=h[z++]))}}else if((Z&64)===0){W=N[(W&65535)+(O&(1<<Z)-1)];continue r}else{t.msg="invalid distance code",i.mode=Nu;break e}break}}else if((Z&64)===0){W=U[(W&65535)+(O&(1<<Z)-1)];continue t}else if(Z&32){i.mode=oO;break e}else{t.msg="invalid literal/length code",i.mode=Nu;break e}break}}while(n<a&&o<y);K=D>>3,n-=K,D-=K<<3,O&=(1<<D)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<y?257+(y-o):257-(o-y),i.hold=O,i.bits=D}});var Gx=R((GU,Kx)=>{"use strict";m();var jx=Jo(),ma=15,zx=852,Zx=592,Hx=0,P0=1,Wx=2,fO=[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],sO=[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],uO=[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],lO=[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];Kx.exports=function(t,r,i,n,a,o,s,y){var _=y.bits,x=0,B=0,k=0,T=0,O=0,D=0,U=0,N=0,j=0,H=0,W,Z,K,J,z,X=null,A=0,h,b=new jx.Buf16(ma+1),d=new jx.Buf16(ma+1),f=null,l=0,v,g,p;for(x=0;x<=ma;x++)b[x]=0;for(B=0;B<n;B++)b[r[i+B]]++;for(O=_,T=ma;T>=1&&b[T]===0;T--);if(O>T&&(O=T),T===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,y.bits=1,0;for(k=1;k<T&&b[k]===0;k++);for(O<k&&(O=k),N=1,x=1;x<=ma;x++)if(N<<=1,N-=b[x],N<0)return-1;if(N>0&&(t===Hx||T!==1))return-1;for(d[1]=0,x=1;x<ma;x++)d[x+1]=d[x]+b[x];for(B=0;B<n;B++)r[i+B]!==0&&(s[d[r[i+B]]++]=B);if(t===Hx?(X=f=s,h=19):t===P0?(X=fO,A-=257,f=sO,l-=257,h=256):(X=uO,f=lO,h=-1),H=0,B=0,x=k,z=o,D=O,U=0,K=-1,j=1<<O,J=j-1,t===P0&&j>zx||t===Wx&&j>Zx)return 1;for(;;){v=x-U,s[B]<h?(g=0,p=s[B]):s[B]>h?(g=f[l+s[B]],p=X[A+s[B]]):(g=96,p=0),W=1<<x-U,Z=1<<D,k=Z;do Z-=W,a[z+(H>>U)+Z]=v<<24|g<<16|p|0;while(Z!==0);for(W=1<<x-1;H&W;)W>>=1;if(W!==0?(H&=W-1,H+=W):H=0,B++,--b[x]===0){if(x===T)break;x=r[i+s[B]]}if(x>O&&(H&J)!==K){for(U===0&&(U=O),z+=k,D=x-U,N=1<<D;D+U<T&&(N-=b[D+U],!(N<=0));)D++,N<<=1;if(j+=1<<D,t===P0&&j>zx||t===Wx&&j>Zx)return 1;K=H&J,a[K]=O<<24|D<<16|z-o|0}}return H!==0&&(a[z+H]=x-U<<24|64<<16|0),y.bits=O,0}});var RE=R(fr=>{"use strict";m();var Rt=Jo(),z0=T0(),Er=I0(),hO=Fx(),sf=Gx(),cO=0,_E=1,mE=2,Vx=4,dO=5,Pu=6,pn=0,pO=1,vO=2,Ht=-2,wE=-3,Z0=-4,yO=-5,$x=8,xE=1,Yx=2,Jx=3,Xx=4,Qx=5,eE=6,tE=7,rE=8,iE=9,nE=10,Uu=11,zr=12,L0=13,aE=14,C0=15,oE=16,fE=17,sE=18,uE=19,Lu=20,Cu=21,lE=22,hE=23,cE=24,dE=25,pE=26,U0=27,vE=28,yE=29,Je=30,H0=31,gO=32,bO=852,_O=592,mO=15,wO=mO;function gE(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function xO(){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 Rt.Buf16(320),this.work=new Rt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function EE(e){var t;return!e||!e.state?Ht:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=xE,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Rt.Buf32(bO),t.distcode=t.distdyn=new Rt.Buf32(_O),t.sane=1,t.back=-1,pn)}function SE(e){var t;return!e||!e.state?Ht:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,EE(e))}function ME(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ht:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,SE(e))}function AE(e,t){var r,i;return e?(i=new xO,e.state=i,i.window=null,r=ME(e,t),r!==pn&&(e.state=null),r):Ht}function EO(e){return AE(e,wO)}var bE=!0,F0,j0;function SO(e){if(bE){var t;for(F0=new Rt.Buf32(512),j0=new Rt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sf(_E,e.lens,0,288,F0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sf(mE,e.lens,0,32,j0,0,e.work,{bits:5}),bE=!1}e.lencode=F0,e.lenbits=9,e.distcode=j0,e.distbits=5}function BE(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Rt.Buf8(a.wsize)),i>=a.wsize?(Rt.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),Rt.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(Rt.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function MO(e,t){var r,i,n,a,o,s,y,_,x,B,k,T,O,D,U=0,N,j,H,W,Z,K,J,z,X=new Rt.Buf8(4),A,h,b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ht;r=e.state,r.mode===zr&&(r.mode=L0),o=e.next_out,n=e.output,y=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,_=r.hold,x=r.bits,B=s,k=y,z=pn;e:for(;;)switch(r.mode){case xE:if(r.wrap===0){r.mode=L0;break}for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.wrap&2&&_===35615){r.check=0,X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0),_=0,x=0,r.mode=Yx;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((_&255)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=Je;break}if((_&15)!==$x){e.msg="unknown compression method",r.mode=Je;break}if(_>>>=4,x-=4,J=(_&15)+8,r.wbits===0)r.wbits=J;else if(J>r.wbits){e.msg="invalid window size",r.mode=Je;break}r.dmax=1<<J,e.adler=r.check=1,r.mode=_&512?nE:zr,_=0,x=0;break;case Yx:for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.flags=_,(r.flags&255)!==$x){e.msg="unknown compression method",r.mode=Je;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Je;break}r.head&&(r.head.text=_>>8&1),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0,r.mode=Jx;case Jx:for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.head&&(r.head.time=_),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,X[2]=_>>>16&255,X[3]=_>>>24&255,r.check=Er(r.check,X,4,0)),_=0,x=0,r.mode=Xx;case Xx:for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.head&&(r.head.xflags=_&255,r.head.os=_>>8),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0,r.mode=Qx;case Qx:if(r.flags&1024){for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.length=_,r.head&&(r.head.extra_len=_),r.flags&512&&(X[0]=_&255,X[1]=_>>>8&255,r.check=Er(r.check,X,2,0)),_=0,x=0}else r.head&&(r.head.extra=null);r.mode=eE;case eE:if(r.flags&1024&&(T=r.length,T>s&&(T=s),T&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Rt.arraySet(r.head.extra,i,a,T,J)),r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,r.length-=T),r.length))break e;r.length=0,r.mode=tE;case tE:if(r.flags&2048){if(s===0)break e;T=0;do J=i[a+T++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J));while(J&&T<s);if(r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=rE;case rE:if(r.flags&4096){if(s===0)break e;T=0;do J=i[a+T++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J));while(J&&T<s);if(r.flags&512&&(r.check=Er(r.check,i,T,a)),s-=T,a+=T,J)break e}else r.head&&(r.head.comment=null);r.mode=iE;case iE:if(r.flags&512){for(;x<16;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Je;break}_=0,x=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=zr;break;case nE:for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}e.adler=r.check=gE(_),_=0,x=0,r.mode=Uu;case Uu:if(r.havedict===0)return e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,vO;e.adler=r.check=1,r.mode=zr;case zr:if(t===dO||t===Pu)break e;case L0:if(r.last){_>>>=x&7,x-=x&7,r.mode=U0;break}for(;x<3;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}switch(r.last=_&1,_>>>=1,x-=1,_&3){case 0:r.mode=aE;break;case 1:if(SO(r),r.mode=Lu,t===Pu){_>>>=2,x-=2;break e}break;case 2:r.mode=fE;break;case 3:e.msg="invalid block type",r.mode=Je}_>>>=2,x-=2;break;case aE:for(_>>>=x&7,x-=x&7;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if((_&65535)!==(_>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Je;break}if(r.length=_&65535,_=0,x=0,r.mode=C0,t===Pu)break e;case C0:r.mode=oE;case oE:if(T=r.length,T){if(T>s&&(T=s),T>y&&(T=y),T===0)break e;Rt.arraySet(n,i,a,T,o),s-=T,a+=T,y-=T,o+=T,r.length-=T;break}r.mode=zr;break;case fE:for(;x<14;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(r.nlen=(_&31)+257,_>>>=5,x-=5,r.ndist=(_&31)+1,_>>>=5,x-=5,r.ncode=(_&15)+4,_>>>=4,x-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Je;break}r.have=0,r.mode=sE;case sE:for(;r.have<r.ncode;){for(;x<3;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.lens[b[r.have++]]=_&7,_>>>=3,x-=3}for(;r.have<19;)r.lens[b[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},z=sf(cO,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,z){e.msg="invalid code lengths set",r.mode=Je;break}r.have=0,r.mode=uE;case uE:for(;r.have<r.nlen+r.ndist;){for(;U=r.lencode[_&(1<<r.lenbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(H<16)_>>>=N,x-=N,r.lens[r.have++]=H;else{if(H===16){for(h=N+2;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_>>>=N,x-=N,r.have===0){e.msg="invalid bit length repeat",r.mode=Je;break}J=r.lens[r.have-1],T=3+(_&3),_>>>=2,x-=2}else if(H===17){for(h=N+3;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=N,x-=N,J=0,T=3+(_&7),_>>>=3,x-=3}else{for(h=N+7;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=N,x-=N,J=0,T=11+(_&127),_>>>=7,x-=7}if(r.have+T>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Je;break}for(;T--;)r.lens[r.have++]=J}}if(r.mode===Je)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Je;break}if(r.lenbits=9,A={bits:r.lenbits},z=sf(_E,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,z){e.msg="invalid literal/lengths set",r.mode=Je;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},z=sf(mE,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,z){e.msg="invalid distances set",r.mode=Je;break}if(r.mode=Lu,t===Pu)break e;case Lu:r.mode=Cu;case Cu:if(s>=6&&y>=258){e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,hO(e,k),o=e.next_out,n=e.output,y=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,_=r.hold,x=r.bits,r.mode===zr&&(r.back=-1);break}for(r.back=0;U=r.lencode[_&(1<<r.lenbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(j&&(j&240)===0){for(W=N,Z=j,K=H;U=r.lencode[K+((_&(1<<W+Z)-1)>>W)],N=U>>>24,j=U>>>16&255,H=U&65535,!(W+N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=W,x-=W,r.back+=W}if(_>>>=N,x-=N,r.back+=N,r.length=H,j===0){r.mode=pE;break}if(j&32){r.back=-1,r.mode=zr;break}if(j&64){e.msg="invalid literal/length code",r.mode=Je;break}r.extra=j&15,r.mode=lE;case lE:if(r.extra){for(h=r.extra;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,x-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=hE;case hE:for(;U=r.distcode[_&(1<<r.distbits)-1],N=U>>>24,j=U>>>16&255,H=U&65535,!(N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if((j&240)===0){for(W=N,Z=j,K=H;U=r.distcode[K+((_&(1<<W+Z)-1)>>W)],N=U>>>24,j=U>>>16&255,H=U&65535,!(W+N<=x);){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}_>>>=W,x-=W,r.back+=W}if(_>>>=N,x-=N,r.back+=N,j&64){e.msg="invalid distance code",r.mode=Je;break}r.offset=H,r.extra=j&15,r.mode=cE;case cE:if(r.extra){for(h=r.extra;x<h;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,x-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Je;break}r.mode=dE;case dE:if(y===0)break e;if(T=k-y,r.offset>T){if(T=r.offset-T,T>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Je;break}T>r.wnext?(T-=r.wnext,O=r.wsize-T):O=r.wnext-T,T>r.length&&(T=r.length),D=r.window}else D=n,O=o-r.offset,T=r.length;T>y&&(T=y),y-=T,r.length-=T;do n[o++]=D[O++];while(--T);r.length===0&&(r.mode=Cu);break;case pE:if(y===0)break e;n[o++]=r.length,y--,r.mode=Cu;break;case U0:if(r.wrap){for(;x<32;){if(s===0)break e;s--,_|=i[a++]<<x,x+=8}if(k-=y,e.total_out+=k,r.total+=k,k&&(e.adler=r.check=r.flags?Er(r.check,n,k,o-k):z0(r.check,n,k,o-k)),k=y,(r.flags?_:gE(_))!==r.check){e.msg="incorrect data check",r.mode=Je;break}_=0,x=0}r.mode=vE;case vE:if(r.wrap&&r.flags){for(;x<32;){if(s===0)break e;s--,_+=i[a++]<<x,x+=8}if(_!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Je;break}_=0,x=0}r.mode=yE;case yE:z=pO;break e;case Je:z=wE;break e;case H0:return Z0;case gO:default:return Ht}return e.next_out=o,e.avail_out=y,e.next_in=a,e.avail_in=s,r.hold=_,r.bits=x,(r.wsize||k!==e.avail_out&&r.mode<Je&&(r.mode<U0||t!==Vx))&&BE(e,e.output,e.next_out,k-e.avail_out)?(r.mode=H0,Z0):(B-=e.avail_in,k-=e.avail_out,e.total_in+=B,e.total_out+=k,r.total+=k,r.wrap&&k&&(e.adler=r.check=r.flags?Er(r.check,n,k,e.next_out-k):z0(r.check,n,k,e.next_out-k)),e.data_type=r.bits+(r.last?64:0)+(r.mode===zr?128:0)+(r.mode===Lu||r.mode===C0?256:0),(B===0&&k===0||t===Vx)&&z===pn&&(z=yO),z)}function AO(e){if(!e||!e.state)return Ht;var t=e.state;return t.window&&(t.window=null),e.state=null,pn}function BO(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ht:(r.head=t,t.done=!1,pn)}function RO(e,t){var r=t.length,i,n,a;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Uu)?Ht:i.mode===Uu&&(n=1,n=z0(n,t,r,0),n!==i.check)?wE:(a=BE(e,t,r,r),a?(i.mode=H0,Z0):(i.havedict=1,pn))}fr.inflateReset=SE;fr.inflateReset2=ME;fr.inflateResetKeep=EE;fr.inflateInit=EO;fr.inflateInit2=AE;fr.inflate=MO;fr.inflateEnd=AO;fr.inflateGetHeader=BO;fr.inflateSetDictionary=RO;fr.inflateInfo="pako inflate (from Nodeca project)"});var TE=R((JU,kE)=>{"use strict";m();kE.exports={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_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}});var OE=R(F=>{"use strict";m();var kt=Co(),kO=rx(),uf=Cx(),vn=RE(),IE=TE();for(W0 in IE)F[W0]=IE[W0];var W0;F.NONE=0;F.DEFLATE=1;F.INFLATE=2;F.GZIP=3;F.GUNZIP=4;F.DEFLATERAW=5;F.INFLATERAW=6;F.UNZIP=7;var TO=31,IO=139;function gt(e){if(typeof e!="number"||e<F.DEFLATE||e>F.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}gt.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,kt(this.init_done,"close before init"),kt(this.mode<=F.UNZIP),this.mode===F.DEFLATE||this.mode===F.GZIP||this.mode===F.DEFLATERAW?uf.deflateEnd(this.strm):(this.mode===F.INFLATE||this.mode===F.GUNZIP||this.mode===F.INFLATERAW||this.mode===F.UNZIP)&&vn.inflateEnd(this.strm),this.mode=F.NONE,this.dictionary=null};gt.prototype.write=function(e,t,r,i,n,a,o){return this._write(!0,e,t,r,i,n,a,o)};gt.prototype.writeSync=function(e,t,r,i,n,a,o){return this._write(!1,e,t,r,i,n,a,o)};gt.prototype._write=function(e,t,r,i,n,a,o,s){if(kt.equal(arguments.length,8),kt(this.init_done,"write before init"),kt(this.mode!==F.NONE,"already finalized"),kt.equal(!1,this.write_in_progress,"write already in progress"),kt.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,kt.equal(!1,t===void 0,"must provide flush value"),this.write_in_progress=!0,t!==F.Z_NO_FLUSH&&t!==F.Z_PARTIAL_FLUSH&&t!==F.Z_SYNC_FLUSH&&t!==F.Z_FULL_FLUSH&&t!==F.Z_FINISH&&t!==F.Z_BLOCK)throw new Error("Invalid flush value");if(r==null&&(r=I.Buffer.alloc(0),n=0,i=0),this.strm.avail_in=n,this.strm.input=r,this.strm.next_in=i,this.strm.avail_out=s,this.strm.output=a,this.strm.next_out=o,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var y=this;return M.default.nextTick(function(){y._process(),y._after()}),this};gt.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]};gt.prototype._process=function(){var e=null;switch(this.mode){case F.DEFLATE:case F.GZIP:case F.DEFLATERAW:this.err=uf.deflate(this.strm,this.flush);break;case F.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(e===null)break;if(this.strm.input[e]===TO){if(this.gzip_id_bytes_read=1,e++,this.strm.avail_in===1)break}else{this.mode=F.INFLATE;break}case 1:if(e===null)break;this.strm.input[e]===IO?(this.gzip_id_bytes_read=2,this.mode=F.GUNZIP):this.mode=F.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case F.INFLATE:case F.GUNZIP:case F.INFLATERAW:for(this.err=vn.inflate(this.strm,this.flush),this.err===F.Z_NEED_DICT&&this.dictionary&&(this.err=vn.inflateSetDictionary(this.strm,this.dictionary),this.err===F.Z_OK?this.err=vn.inflate(this.strm,this.flush):this.err===F.Z_DATA_ERROR&&(this.err=F.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===F.GUNZIP&&this.err===F.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=vn.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}};gt.prototype._checkError=function(){switch(this.err){case F.Z_OK:case F.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===F.Z_FINISH)return this._error("unexpected end of file"),!1;break;case F.Z_STREAM_END:break;case F.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0};gt.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}};gt.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()};gt.prototype.init=function(e,t,r,i,n){kt(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),kt(e>=8&&e<=15,"invalid windowBits"),kt(t>=-1&&t<=9,"invalid compression level"),kt(r>=1&&r<=9,"invalid memlevel"),kt(i===F.Z_FILTERED||i===F.Z_HUFFMAN_ONLY||i===F.Z_RLE||i===F.Z_FIXED||i===F.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,r,i,n),this._setDictionary()};gt.prototype.params=function(){throw new Error("deflateParams Not supported")};gt.prototype.reset=function(){this._reset(),this._setDictionary()};gt.prototype._init=function(e,t,r,i,n){switch(this.level=e,this.windowBits=t,this.memLevel=r,this.strategy=i,this.flush=F.Z_NO_FLUSH,this.err=F.Z_OK,(this.mode===F.GZIP||this.mode===F.GUNZIP)&&(this.windowBits+=16),this.mode===F.UNZIP&&(this.windowBits+=32),(this.mode===F.DEFLATERAW||this.mode===F.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new kO,this.mode){case F.DEFLATE:case F.GZIP:case F.DEFLATERAW:this.err=uf.deflateInit2(this.strm,this.level,F.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case F.INFLATE:case F.GUNZIP:case F.INFLATERAW:case F.UNZIP:this.err=vn.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==F.Z_OK&&this._error("Init error"),this.dictionary=n,this.write_in_progress=!1,this.init_done=!0};gt.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=F.Z_OK,this.mode){case F.DEFLATE:case F.DEFLATERAW:this.err=uf.deflateSetDictionary(this.strm,this.dictionary);break;default:break}this.err!==F.Z_OK&&this._error("Failed to set dictionary")}};gt.prototype._reset=function(){switch(this.err=F.Z_OK,this.mode){case F.DEFLATE:case F.DEFLATERAW:case F.GZIP:this.err=uf.deflateReset(this.strm);break;case F.INFLATE:case F.INFLATERAW:case F.GUNZIP:this.err=vn.inflateReset(this.strm);break;default:break}this.err!==F.Z_OK&&this._error("Failed to reset stream")};F.Zlib=gt});var V0=R($=>{"use strict";m();var Sr=st().Buffer,PE=cs().Transform,te=OE(),ci=Gt(),lf=Co().ok,G0=st().kMaxLength,LE="Cannot create final Buffer. It would be larger than 0x"+G0.toString(16)+" bytes";te.Z_MIN_WINDOWBITS=8;te.Z_MAX_WINDOWBITS=15;te.Z_DEFAULT_WINDOWBITS=15;te.Z_MIN_CHUNK=64;te.Z_MAX_CHUNK=1/0;te.Z_DEFAULT_CHUNK=16*1024;te.Z_MIN_MEMLEVEL=1;te.Z_MAX_MEMLEVEL=9;te.Z_DEFAULT_MEMLEVEL=8;te.Z_MIN_LEVEL=-1;te.Z_MAX_LEVEL=9;te.Z_DEFAULT_LEVEL=te.Z_DEFAULT_COMPRESSION;var qE=Object.keys(te);for(Fu=0;Fu<qE.length;Fu++)ju=qE[Fu],ju.match(/^Z/)&&Object.defineProperty($,ju,{enumerable:!0,value:te[ju],writable:!1});var ju,Fu,Zu={Z_OK:te.Z_OK,Z_STREAM_END:te.Z_STREAM_END,Z_NEED_DICT:te.Z_NEED_DICT,Z_ERRNO:te.Z_ERRNO,Z_STREAM_ERROR:te.Z_STREAM_ERROR,Z_DATA_ERROR:te.Z_DATA_ERROR,Z_MEM_ERROR:te.Z_MEM_ERROR,Z_BUF_ERROR:te.Z_BUF_ERROR,Z_VERSION_ERROR:te.Z_VERSION_ERROR},DE=Object.keys(Zu);for(zu=0;zu<DE.length;zu++)K0=DE[zu],Zu[Zu[K0]]=K0;var K0,zu;Object.defineProperty($,"codes",{enumerable:!0,value:Object.freeze(Zu),writable:!1});$.Deflate=yn;$.Inflate=gn;$.Gzip=bn;$.Gunzip=_n;$.DeflateRaw=mn;$.InflateRaw=wn;$.Unzip=xn;$.createDeflate=function(e){return new yn(e)};$.createInflate=function(e){return new gn(e)};$.createDeflateRaw=function(e){return new mn(e)};$.createInflateRaw=function(e){return new wn(e)};$.createGzip=function(e){return new bn(e)};$.createGunzip=function(e){return new _n(e)};$.createUnzip=function(e){return new xn(e)};$.deflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new yn(t),e,r)};$.deflateSync=function(e,t){return Sn(new yn(t),e)};$.gzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new bn(t),e,r)};$.gzipSync=function(e,t){return Sn(new bn(t),e)};$.deflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new mn(t),e,r)};$.deflateRawSync=function(e,t){return Sn(new mn(t),e)};$.unzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new xn(t),e,r)};$.unzipSync=function(e,t){return Sn(new xn(t),e)};$.inflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new gn(t),e,r)};$.inflateSync=function(e,t){return Sn(new gn(t),e)};$.gunzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new _n(t),e,r)};$.gunzipSync=function(e,t){return Sn(new _n(t),e)};$.inflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),En(new wn(t),e,r)};$.inflateRawSync=function(e,t){return Sn(new wn(t),e)};function En(e,t,r){var i=[],n=0;e.on("error",o),e.on("end",s),e.end(t),a();function a(){for(var y;(y=e.read())!==null;)i.push(y),n+=y.length;e.once("readable",a)}function o(y){e.removeListener("end",s),e.removeListener("readable",a),r(y)}function s(){var y,_=null;n>=G0?_=new RangeError(LE):y=Sr.concat(i,n),i=[],e.close(),r(_,y)}}function Sn(e,t){if(typeof t=="string"&&(t=Sr.from(t)),!Sr.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function yn(e){if(!(this instanceof yn))return new yn(e);Qe.call(this,e,te.DEFLATE)}function gn(e){if(!(this instanceof gn))return new gn(e);Qe.call(this,e,te.INFLATE)}function bn(e){if(!(this instanceof bn))return new bn(e);Qe.call(this,e,te.GZIP)}function _n(e){if(!(this instanceof _n))return new _n(e);Qe.call(this,e,te.GUNZIP)}function mn(e){if(!(this instanceof mn))return new mn(e);Qe.call(this,e,te.DEFLATERAW)}function wn(e){if(!(this instanceof wn))return new wn(e);Qe.call(this,e,te.INFLATERAW)}function xn(e){if(!(this instanceof xn))return new xn(e);Qe.call(this,e,te.UNZIP)}function NE(e){return e===te.Z_NO_FLUSH||e===te.Z_PARTIAL_FLUSH||e===te.Z_SYNC_FLUSH||e===te.Z_FULL_FLUSH||e===te.Z_FINISH||e===te.Z_BLOCK}function Qe(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||$.Z_DEFAULT_CHUNK,PE.call(this,e),e.flush&&!NE(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!NE(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||te.Z_NO_FLUSH,this._finishFlushFlag=typeof e.finishFlush<"u"?e.finishFlush:te.Z_FINISH,e.chunkSize&&(e.chunkSize<$.Z_MIN_CHUNK||e.chunkSize>$.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<$.Z_MIN_WINDOWBITS||e.windowBits>$.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<$.Z_MIN_LEVEL||e.level>$.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<$.Z_MIN_MEMLEVEL||e.memLevel>$.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=$.Z_FILTERED&&e.strategy!=$.Z_HUFFMAN_ONLY&&e.strategy!=$.Z_RLE&&e.strategy!=$.Z_FIXED&&e.strategy!=$.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Sr.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new te.Zlib(t);var i=this;this._hadError=!1,this._handle.onerror=function(o,s){Hu(i),i._hadError=!0;var y=new Error(o);y.errno=s,y.code=$.codes[s],i.emit("error",y)};var n=$.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(n=e.level);var a=$.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(a=e.strategy),this._handle.init(e.windowBits||$.Z_DEFAULT_WINDOWBITS,n,e.memLevel||$.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=Sr.allocUnsafe(this._chunkSize),this._offset=0,this._level=n,this._strategy=a,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}ci.inherits(Qe,PE);Qe.prototype.params=function(e,t,r){if(e<$.Z_MIN_LEVEL||e>$.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=$.Z_FILTERED&&t!=$.Z_HUFFMAN_ONLY&&t!=$.Z_RLE&&t!=$.Z_FIXED&&t!=$.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var i=this;this.flush(te.Z_SYNC_FLUSH,function(){lf(i._handle,"zlib binding closed"),i._handle.params(e,t),i._hadError||(i._level=e,i._strategy=t,r&&r())})}else M.default.nextTick(r)};Qe.prototype.reset=function(){return lf(this._handle,"zlib binding closed"),this._handle.reset()};Qe.prototype._flush=function(e){this._transform(Sr.alloc(0),"",e)};Qe.prototype.flush=function(e,t){var r=this,i=this._writableState;(typeof e=="function"||e===void 0&&!t)&&(t=e,e=te.Z_FULL_FLUSH),i.ended?t&&M.default.nextTick(t):i.ending?t&&this.once("end",t):i.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(Sr.alloc(0),"",t))};Qe.prototype.close=function(e){Hu(this,e),M.default.nextTick(OO,this)};function Hu(e,t){t&&M.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function OO(e){e.emit("close")}Qe.prototype._transform=function(e,t,r){var i,n=this._writableState,a=n.ending||n.ended,o=a&&(!e||n.length===e.length);if(e!==null&&!Sr.isBuffer(e))return r(new Error("invalid input"));if(!this._handle)return r(new Error("zlib binding closed"));o?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=n.length&&(this._flushFlag=this._opts.flush||te.Z_NO_FLUSH)),this._processChunk(e,i,r)};Qe.prototype._processChunk=function(e,t,r){var i=e&&e.length,n=this._chunkSize-this._offset,a=0,o=this,s=typeof r=="function";if(!s){var y=[],_=0,x;this.on("error",function(D){x=D}),lf(this._handle,"zlib binding closed");do var B=this._handle.writeSync(t,e,a,i,this._buffer,this._offset,n);while(!this._hadError&&O(B[0],B[1]));if(this._hadError)throw x;if(_>=G0)throw Hu(this),new RangeError(LE);var k=Sr.concat(y,_);return Hu(this),k}lf(this._handle,"zlib binding closed");var T=this._handle.write(t,e,a,i,this._buffer,this._offset,n);T.buffer=e,T.callback=O;function O(D,U){if(this&&(this.buffer=null,this.callback=null),!o._hadError){var N=n-U;if(lf(N>=0,"have should not go down"),N>0){var j=o._buffer.slice(o._offset,o._offset+N);o._offset+=N,s?o.push(j):(y.push(j),_+=j.length)}if((U===0||o._offset>=o._chunkSize)&&(n=o._chunkSize,o._offset=0,o._buffer=Sr.allocUnsafe(o._chunkSize)),U===0){if(a+=i-D,i=D,!s)return!0;var H=o._handle.write(t,e,a,i,o._buffer,o._offset,o._chunkSize);H.callback=O,H.buffer=e;return}if(!s)return!1;r()}}};ci.inherits(yn,Qe);ci.inherits(gn,Qe);ci.inherits(bn,Qe);ci.inherits(_n,Qe);ci.inherits(mn,Qe);ci.inherits(wn,Qe);ci.inherits(xn,Qe)});var zE=R((nF,jE)=>{"use strict";m();var $0=lw(),iF=Js(),CE=V0(),qO=8*1024*1024;function UE(e,t){var r=t&&t.maxDecompressedBytes||qO;return CE.gunzipSync(I.Buffer.from(e,"base64"),{maxOutputLength:r})}async function FE(e,t){if(!t.expectedIssuerDid)throw new Error("expectedIssuerDid is required to verify a status list (issuer pinning); refusing to read revocation state from an unpinned/unverified JWT");var r=t.didResolver;if(!r){var i=t.issuerJwks||(t.issuerPublicJwk?{keys:[t.issuerPublicJwk]}:null);if(!i)throw new Error("Provide params.didResolver, params.issuerJwks, or params.issuerPublicJwk to verify the status list signature");r=async function(){return{jwks:i}}}var n=await $0.verifyVcJwt(e,{didResolver:r,expectedIssuerDid:t.expectedIssuerDid,allowedAlgs:t.allowedAlgs,allowLegacyDER:t.allowLegacyDER,clockToleranceSec:t.clockToleranceSec});if(!n.valid)throw new Error("Status list signature verification failed: "+(n.error||"invalid signature"));return n.payload}async function DO(e){if(!e.issuerDid||!e.privateJwk)throw new Error("issuerDid and privateJwk are required");var t=e.listId||e.issuerDid+"/status/"+Date.now(),r=e.listSize||1e5,i=Math.ceil(r/8),n=I.Buffer.alloc(i,0),a=V0(),o=a.gzipSync(n),s=o.toString("base64"),y={"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/vc/status-list/2021/v1"],type:["VerifiableCredential","StatusList2021Credential"],issuer:e.issuerDid,issuanceDate:new Date().toISOString(),credentialSubject:{id:t,type:"StatusList2021",statusPurpose:"revocation",encodedList:s}},_=await $0.issueVcJwt({issuerDid:e.issuerDid,subjectId:t,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:y.credentialSubject,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:_.jwt,listId:t}}async function NO(e){if(!e.listVcJwt||e.index===void 0||!e.status||!e.privateJwk)throw new Error("listVcJwt, index, status, and privateJwk are required");if(e.status==="suspended")throw new Error("status 'suspended' is not supported by this list: its statusPurpose is 'revocation', and suspension would be written to the same bit and read back as 'revoked'. Maintain a separate list for suspension until statusPurpose is configurable.");var t=await FE(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=UE(r,e),n=Math.floor(e.index/8),a=e.index%8;if(n>=i.length)throw new Error("Index out of range");var o=e.status==="revoked"?1:0;o===1?i[n]|=1<<a:i[n]&=~(1<<a);var s=CE.gzipSync(i),y=s.toString("base64"),_={id:t.vc.credentialSubject.id,type:"StatusList2021",statusPurpose:"revocation",encodedList:y},x=await $0.issueVcJwt({issuerDid:t.iss,subjectId:t.vc.credentialSubject.id,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:_,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:x.jwt}}async function PO(e){if(!e.listVcJwt||e.index===void 0)throw new Error("listVcJwt and index are required");var t=await FE(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=UE(r,e),n=Math.floor(e.index/8),a=e.index%8;if(n>=i.length)throw new Error("Index out of range");var o=i[n]>>a&1;return o===1?"revoked":"valid"}jE.exports={createStatusList:DO,updateStatusList:NO,getCredentialStatusEntry:PO}});var LO=R((oF,ZE)=>{m();ZE.exports=zE()});return LO();})();
|
|
74
74
|
if(typeof module!=="undefined"&&module.exports){module.exports=bsvStatusList}else if(typeof define==="function"&&define.amd){define([],function(){return bsvStatusList})}
|