UNPKG

sfs2x-api

Version:

Official JavaScript client API for SmartFoxServer 2X, the leading SDK to create large scale multiplayer games and MMOs

2 lines 354 kB
/*! For license information please see sfs2x-api-1.8.6.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SFS2X=e():t.SFS2X=e()}(this,(()=>(()=>{var t={314:function(){(function(){"use strict";function t(t){throw t}var e=void 0,n=!0,r=this;function o(t,n){var o,i=t.split("."),s=r;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(;i.length&&(o=i.shift());)i.length||n===e?s=s[o]?s[o]:s[o]={}:s[o]=n}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function s(e,n){this.index="number"==typeof n?n:0,this.i=0,this.buffer=e instanceof(i?Uint8Array:Array)?e:new(i?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}s.prototype.f=function(){var t,e=this.buffer,n=e.length,r=new(i?Uint8Array:Array)(n<<1);if(i)r.set(e);else for(t=0;t<n;++t)r[t]=e[t];return this.buffer=r},s.prototype.d=function(t,e,n){var r,o=this.buffer,i=this.index,s=this.i,a=o[i];if(n&&1<e&&(t=8<e?(y[255&t]<<24|y[t>>>8&255]<<16|y[t>>>16&255]<<8|y[t>>>24&255])>>32-e:y[t]>>8-e),8>e+s)a=a<<e|t,s+=e;else for(r=0;r<e;++r)a=a<<1|t>>e-r-1&1,8==++s&&(s=0,o[i++]=y[a],a=0,i===o.length&&(o=this.f()));o[i]=a,this.buffer=o,this.i=s,this.index=i},s.prototype.finish=function(){var t,e=this.buffer,n=this.index;return 0<this.i&&(e[n]<<=8-this.i,e[n]=y[e[n]],n++),i?t=e.subarray(0,n):(e.length=n,t=e),t};var a,u=new(i?Uint8Array:Array)(256);for(a=0;256>a;++a){for(var c=l=a,f=7,l=l>>>1;l;l>>>=1)c<<=1,c|=1&l,--f;u[a]=(c<<f&255)>>>0}var y=u;function h(t){this.buffer=new(i?Uint16Array:Array)(2*t),this.length=0}function p(t){var e,n,r,o,s,a,u,c,f,l,y=t.length,h=0,p=Number.POSITIVE_INFINITY;for(c=0;c<y;++c)t[c]>h&&(h=t[c]),t[c]<p&&(p=t[c]);for(e=1<<h,n=new(i?Uint32Array:Array)(e),r=1,o=0,s=2;r<=h;){for(c=0;c<y;++c)if(t[c]===r){for(a=0,u=o,f=0;f<r;++f)a=a<<1|1&u,u>>=1;for(l=r<<16|c,f=a;f<e;f+=s)n[f]=l;++o}++r,o<<=1,s<<=1}return[n,h,p]}function _(t,e){this.h=d,this.w=0,this.input=i&&t instanceof Array?new Uint8Array(t):t,this.b=0,e&&(e.lazy&&(this.w=e.lazy),"number"==typeof e.compressionType&&(this.h=e.compressionType),e.outputBuffer&&(this.a=i&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"==typeof e.outputIndex&&(this.b=e.outputIndex)),this.a||(this.a=new(i?Uint8Array:Array)(32768))}h.prototype.getParent=function(t){return 2*((t-2)/4|0)},h.prototype.push=function(t,e){var n,r,o,i=this.buffer;for(n=this.length,i[this.length++]=e,i[this.length++]=t;0<n&&(r=this.getParent(n),i[n]>i[r]);)o=i[n],i[n]=i[r],i[r]=o,o=i[n+1],i[n+1]=i[r+1],i[r+1]=o,n=r;return this.length},h.prototype.pop=function(){var t,e,n,r,o,i=this.buffer;for(e=i[0],t=i[1],this.length-=2,i[0]=i[this.length],i[1]=i[this.length+1],o=0;!((r=2*o+2)>=this.length)&&(r+2<this.length&&i[r+2]>i[r]&&(r+=2),i[r]>i[o]);)n=i[o],i[o]=i[r],i[r]=n,n=i[o+1],i[o+1]=i[r+1],i[r+1]=n,o=r;return{index:t,value:e,length:this.length}};var b,d=2,v={NONE:0,r:1,k:d,O:3},m=[];for(b=0;288>b;b++)switch(n){case 143>=b:m.push([b+48,8]);break;case 255>=b:m.push([b-144+400,9]);break;case 279>=b:m.push([b-256+0,7]);break;case 287>=b:m.push([b-280+192,8]);break;default:t("invalid literal: "+b)}function g(t,e){this.length=t,this.H=e}_.prototype.j=function(){var r,o,a,u,c=this.input;switch(this.h){case 0:for(a=0,u=c.length;a<u;){var f,l,y,h=o=i?c.subarray(a,a+65535):c.slice(a,a+65535),p=(a+=o.length)===u,_=e,b=e,v=this.a,g=this.b;if(i){for(v=new Uint8Array(this.a.buffer);v.length<=g+h.length+5;)v=new Uint8Array(v.length<<1);v.set(this.a)}if(f=p?1:0,v[g++]=0|f,y=65536+~(l=h.length)&65535,v[g++]=255&l,v[g++]=l>>>8&255,v[g++]=255&y,v[g++]=y>>>8&255,i)v.set(h,g),g+=h.length,v=v.subarray(0,g);else{for(_=0,b=h.length;_<b;++_)v[g++]=h[_];v.length=g}this.b=g,this.a=v}break;case 1:var E=new s(i?new Uint8Array(this.a.buffer):this.a,this.b);E.d(1,1,n),E.d(1,2,n);var O,R,I,T=S(this,c);for(O=0,R=T.length;O<R;O++)if(I=T[O],s.prototype.d.apply(E,m[I]),256<I)E.d(T[++O],T[++O],n),E.d(T[++O],5),E.d(T[++O],T[++O],n);else if(256===I)break;this.a=E.finish(),this.b=this.a.length;break;case d:var k,j,P,M,N,U,Y,B,L,D,C,F,K,x,V,G=new s(i?new Uint8Array(this.a.buffer):this.a,this.b),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=Array(19);for(k=d,G.d(1,1,n),G.d(k,2,n),j=S(this,c),Y=A(U=w(this.M,15)),L=A(B=w(this.L,7)),P=286;257<P&&0===U[P-1];P--);for(M=30;1<M&&0===B[M-1];M--);var H,X,J,W,$,Q,Z=P,tt=M,et=new(i?Uint32Array:Array)(Z+tt),nt=new(i?Uint32Array:Array)(316),rt=new(i?Uint8Array:Array)(19);for(H=X=0;H<Z;H++)et[X++]=U[H];for(H=0;H<tt;H++)et[X++]=B[H];if(!i)for(H=0,W=rt.length;H<W;++H)rt[H]=0;for(H=$=0,W=et.length;H<W;H+=X){for(X=1;H+X<W&&et[H+X]===et[H];++X);if(J=X,0===et[H])if(3>J)for(;0<J--;)nt[$++]=0,rt[0]++;else for(;0<J;)(Q=138>J?J:138)>J-3&&Q<J&&(Q=J-3),10>=Q?(nt[$++]=17,nt[$++]=Q-3,rt[17]++):(nt[$++]=18,nt[$++]=Q-11,rt[18]++),J-=Q;else if(nt[$++]=et[H],rt[et[H]]++,3>--J)for(;0<J--;)nt[$++]=et[H],rt[et[H]]++;else for(;0<J;)(Q=6>J?J:6)>J-3&&Q<J&&(Q=J-3),nt[$++]=16,nt[$++]=Q-3,rt[16]++,J-=Q}for(r=i?nt.subarray(0,$):nt.slice(0,$),D=w(rt,7),x=0;19>x;x++)z[x]=D[q[x]];for(N=19;4<N&&0===z[N-1];N--);for(C=A(D),G.d(P-257,5,n),G.d(M-1,5,n),G.d(N-4,4,n),x=0;x<N;x++)G.d(z[x],3,n);for(x=0,V=r.length;x<V;x++)if(F=r[x],G.d(C[F],D[F],n),16<=F){switch(x++,F){case 16:K=2;break;case 17:K=3;break;case 18:K=7;break;default:t("invalid code: "+F)}G.d(r[x],K,n)}var ot,it,st,at,ut,ct,ft,lt,yt=[Y,U],ht=[L,B];for(ut=yt[0],ct=yt[1],ft=ht[0],lt=ht[1],ot=0,it=j.length;ot<it;++ot)if(st=j[ot],G.d(ut[st],ct[st],n),256<st)G.d(j[++ot],j[++ot],n),at=j[++ot],G.d(ft[at],lt[at],n),G.d(j[++ot],j[++ot],n);else if(256===st)break;this.a=G.finish(),this.b=this.a.length;break;default:t("invalid compression type")}return this.a};var E=function(){function e(e){switch(n){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}var r,o,i=[];for(r=3;258>=r;r++)o=e(r),i[r]=o[2]<<24|o[1]<<16|o[0];return i}(),O=i?new Uint32Array(E):E;function S(r,o){function s(e,r){var o,i,s,a,u=e.H,c=[],f=0;switch(o=O[e.length],c[f++]=65535&o,c[f++]=o>>16&255,c[f++]=o>>24,n){case 1===u:i=[0,u-1,0];break;case 2===u:i=[1,u-2,0];break;case 3===u:i=[2,u-3,0];break;case 4===u:i=[3,u-4,0];break;case 6>=u:i=[4,u-5,1];break;case 8>=u:i=[5,u-7,1];break;case 12>=u:i=[6,u-9,2];break;case 16>=u:i=[7,u-13,2];break;case 24>=u:i=[8,u-17,3];break;case 32>=u:i=[9,u-25,3];break;case 48>=u:i=[10,u-33,4];break;case 64>=u:i=[11,u-49,4];break;case 96>=u:i=[12,u-65,5];break;case 128>=u:i=[13,u-97,5];break;case 192>=u:i=[14,u-129,6];break;case 256>=u:i=[15,u-193,6];break;case 384>=u:i=[16,u-257,7];break;case 512>=u:i=[17,u-385,7];break;case 768>=u:i=[18,u-513,8];break;case 1024>=u:i=[19,u-769,8];break;case 1536>=u:i=[20,u-1025,9];break;case 2048>=u:i=[21,u-1537,9];break;case 3072>=u:i=[22,u-2049,10];break;case 4096>=u:i=[23,u-3073,10];break;case 6144>=u:i=[24,u-4097,11];break;case 8192>=u:i=[25,u-6145,11];break;case 12288>=u:i=[26,u-8193,12];break;case 16384>=u:i=[27,u-12289,12];break;case 24576>=u:i=[28,u-16385,13];break;case 32768>=u:i=[29,u-24577,13];break;default:t("invalid distance")}for(o=i,c[f++]=o[0],c[f++]=o[1],c[f++]=o[2],s=0,a=c.length;s<a;++s)d[v++]=c[s];g[c[0]]++,E[c[3]]++,m=e.length+r-1,p=null}var a,u,c,f,l,y,h,p,_,b={},d=i?new Uint16Array(2*o.length):[],v=0,m=0,g=new(i?Uint32Array:Array)(286),E=new(i?Uint32Array:Array)(30),S=r.w;if(!i){for(c=0;285>=c;)g[c++]=0;for(c=0;29>=c;)E[c++]=0}for(g[256]=1,a=0,u=o.length;a<u;++a){for(c=l=0,f=3;c<f&&a+c!==u;++c)l=l<<8|o[a+c];if(b[l]===e&&(b[l]=[]),y=b[l],!(0<m--)){for(;0<y.length&&32768<a-y[0];)y.shift();if(a+3>=u){for(p&&s(p,-1),c=0,f=u-a;c<f;++c)_=o[a+c],d[v++]=_,++g[_];break}0<y.length?(h=R(o,a,y),p?p.length<h.length?(_=o[a-1],d[v++]=_,++g[_],s(h,0)):s(p,-1):h.length<S?p=h:s(h,0)):p?s(p,-1):(_=o[a],d[v++]=_,++g[_])}y.push(a)}return d[v++]=256,g[256]++,r.M=g,r.L=E,i?d.subarray(0,v):d}function R(t,e,n){var r,o,i,s,a,u,c=0,f=t.length;s=0,u=n.length;t:for(;s<u;s++){if(r=n[u-s-1],i=3,3<c){for(a=c;3<a;a--)if(t[r+a-1]!==t[e+a-1])continue t;i=c}for(;258>i&&e+i<f&&t[r+i]===t[e+i];)++i;if(i>c&&(o=r,c=i),258===i)break}return new g(c,e-o)}function w(t,e){var n,r,o,s,a,u=t.length,c=new h(572),f=new(i?Uint8Array:Array)(u);if(!i)for(s=0;s<u;s++)f[s]=0;for(s=0;s<u;++s)0<t[s]&&c.push(s,t[s]);if(n=Array(c.length/2),r=new(i?Uint32Array:Array)(c.length/2),1===n.length)return f[c.pop().index]=1,f;for(s=0,a=c.length/2;s<a;++s)n[s]=c.pop(),r[s]=n[s].value;for(o=function(t,e,n){function r(t){var n=p[t][_[t]];n===e?(r(t+1),r(t+1)):--y[n],++_[t]}var o,s,a,u,c,f=new(i?Uint16Array:Array)(n),l=new(i?Uint8Array:Array)(n),y=new(i?Uint8Array:Array)(e),h=Array(n),p=Array(n),_=Array(n),b=(1<<n)-e,d=1<<n-1;for(f[n-1]=e,s=0;s<n;++s)b<d?l[s]=0:(l[s]=1,b-=d),b<<=1,f[n-2-s]=(f[n-1-s]/2|0)+e;for(f[0]=l[0],h[0]=Array(f[0]),p[0]=Array(f[0]),s=1;s<n;++s)f[s]>2*f[s-1]+l[s]&&(f[s]=2*f[s-1]+l[s]),h[s]=Array(f[s]),p[s]=Array(f[s]);for(o=0;o<e;++o)y[o]=n;for(a=0;a<f[n-1];++a)h[n-1][a]=t[a],p[n-1][a]=a;for(o=0;o<n;++o)_[o]=0;for(1===l[n-1]&&(--y[0],++_[n-1]),s=n-2;0<=s;--s){for(u=o=0,c=_[s+1],a=0;a<f[s];a++)(u=h[s+1][c]+h[s+1][c+1])>t[o]?(h[s][a]=u,p[s][a]=e,c+=2):(h[s][a]=t[o],p[s][a]=o,++o);_[s]=0,1===l[s]&&r(s)}return y}(r,r.length,e),s=0,a=n.length;s<a;++s)f[n[s].index]=o[s];return f}function A(t){var e,n,r,o,s=new(i?Uint16Array:Array)(t.length),a=[],u=[],c=0;for(e=0,n=t.length;e<n;e++)a[t[e]]=1+(0|a[t[e]]);for(e=1,n=16;e<=n;e++)u[e]=c,c+=0|a[e],c<<=1;for(e=0,n=t.length;e<n;e++)for(c=u[t[e]],u[t[e]]+=1,r=s[e]=0,o=t[e];r<o;r++)s[e]=s[e]<<1|1&c,c>>>=1;return s}function I(e,n){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=i?new Uint8Array(e):e,this.s=!1,this.n=k,this.C=!1,!n&&(n={})||(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.C=n.resize)),this.n){case T:this.b=32768,this.a=new(i?Uint8Array:Array)(32768+this.m+258);break;case k:this.b=0,this.a=new(i?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:t(Error("invalid inflate mode"))}}var T=0,k=1,j={F:T,D:k};I.prototype.p=function(){for(;!this.s;){var r=J(this,3);switch(1&r&&(this.s=n),r>>>=1){case 0:var o=this.input,s=this.c,a=this.a,u=this.b,c=o.length,f=e,l=a.length,y=e;switch(this.e=this.g=0,s+1>=c&&t(Error("invalid uncompressed block header: LEN")),f=o[s++]|o[s++]<<8,s+1>=c&&t(Error("invalid uncompressed block header: NLEN")),f===~(o[s++]|o[s++]<<8)&&t(Error("invalid uncompressed block header: length verify")),s+f>o.length&&t(Error("input buffer is broken")),this.n){case T:for(;u+f>a.length;){if(f-=y=l-u,i)a.set(o.subarray(s,s+y),u),u+=y,s+=y;else for(;y--;)a[u++]=o[s++];this.b=u,a=this.f(),u=this.b}break;case k:for(;u+f>a.length;)a=this.f({v:2});break;default:t(Error("invalid inflate mode"))}if(i)a.set(o.subarray(s,s+f),u),u+=f,s+=f;else for(;f--;)a[u++]=o[s++];this.c=s,this.b=u,this.a=a;break;case 1:this.o(z,X);break;case 2:$(this);break;default:t(Error("unknown BTYPE: "+r))}}return this.t()};var P,M,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=i?new Uint16Array(N):N,Y=[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,258,258],B=i?new Uint16Array(Y):Y,L=[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,0,0],D=i?new Uint8Array(L):L,C=[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],F=i?new Uint16Array(C):C,K=[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],x=i?new Uint8Array(K):K,V=new(i?Uint8Array:Array)(288);for(P=0,M=V.length;P<M;++P)V[P]=143>=P?8:255>=P?9:279>=P?7:8;var G,q,z=p(V),H=new(i?Uint8Array:Array)(30);for(G=0,q=H.length;G<q;++G)H[G]=5;var X=p(H);function J(e,n){for(var r,o=e.g,i=e.e,s=e.input,a=e.c,u=s.length;i<n;)a>=u&&t(Error("input buffer is broken")),o|=s[a++]<<i,i+=8;return r=o&(1<<n)-1,e.g=o>>>n,e.e=i-n,e.c=a,r}function W(t,e){for(var n,r,o=t.g,i=t.e,s=t.input,a=t.c,u=s.length,c=e[0],f=e[1];i<f&&!(a>=u);)o|=s[a++]<<i,i+=8;return r=(n=c[o&(1<<f)-1])>>>16,t.g=o>>r,t.e=i-r,t.c=a,65535&n}function $(t){function e(t,e,n){var r,o,i,s=this.z;for(i=0;i<t;)switch(r=W(this,e),r){case 16:for(o=3+J(this,2);o--;)n[i++]=s;break;case 17:for(o=3+J(this,3);o--;)n[i++]=0;s=0;break;case 18:for(o=11+J(this,7);o--;)n[i++]=0;s=0;break;default:s=n[i++]=r}return this.z=s,n}var n,r,o,s,a=J(t,5)+257,u=J(t,5)+1,c=J(t,4)+4,f=new(i?Uint8Array:Array)(U.length);for(s=0;s<c;++s)f[U[s]]=J(t,3);if(!i)for(s=c,c=f.length;s<c;++s)f[U[s]]=0;n=p(f),r=new(i?Uint8Array:Array)(a),o=new(i?Uint8Array:Array)(u),t.z=0,t.o(p(e.call(t,a,n,r)),p(e.call(t,u,n,o)))}function Q(t){if("string"==typeof t){var e,n,r=t.split("");for(e=0,n=r.length;e<n;e++)r[e]=(255&r[e].charCodeAt(0))>>>0;t=r}for(var o,i=1,s=0,a=t.length,u=0;0<a;){a-=o=1024<a?1024:a;do{s+=i+=t[u++]}while(--o);i%=65521,s%=65521}return(s<<16|i)>>>0}function Z(e,n){var r,o;this.input=e,this.c=0,!n&&(n={})||(n.index&&(this.c=n.index),n.verify&&(this.N=n.verify)),r=e[this.c++],o=e[this.c++],(15&r)===tt?this.method=tt:t(Error("unsupported compression method")),0!=((r<<8)+o)%31&&t(Error("invalid fcheck flag:"+((r<<8)+o)%31)),32&o&&t(Error("fdict flag is not supported")),this.B=new I(e,{index:this.c,bufferSize:n.bufferSize,bufferType:n.bufferType,resize:n.resize})}I.prototype.o=function(t,e){var n=this.a,r=this.b;this.u=t;for(var o,i,s,a,u=n.length-258;256!==(o=W(this,t));)if(256>o)r>=u&&(this.b=r,n=this.f(),r=this.b),n[r++]=o;else for(a=B[i=o-257],0<D[i]&&(a+=J(this,D[i])),o=W(this,e),s=F[o],0<x[o]&&(s+=J(this,x[o])),r>=u&&(this.b=r,n=this.f(),r=this.b);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},I.prototype.J=function(t,e){var n=this.a,r=this.b;this.u=t;for(var o,i,s,a,u=n.length;256!==(o=W(this,t));)if(256>o)r>=u&&(u=(n=this.f()).length),n[r++]=o;else for(a=B[i=o-257],0<D[i]&&(a+=J(this,D[i])),o=W(this,e),s=F[o],0<x[o]&&(s+=J(this,x[o])),r+a>u&&(u=(n=this.f()).length);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},I.prototype.f=function(){var t,e,n=new(i?Uint8Array:Array)(this.b-32768),r=this.b-32768,o=this.a;if(i)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.l.push(n),this.q+=n.length,i)o.set(o.subarray(r,r+32768));else for(t=0;32768>t;++t)o[t]=o[r+t];return this.b=32768,o},I.prototype.K=function(t){var e,n,r,o=this.input.length/this.c+1|0,s=this.input,a=this.a;return t&&("number"==typeof t.v&&(o=t.v),"number"==typeof t.G&&(o+=t.G)),n=2>o?(r=(s.length-this.c)/this.u[2]/2*258|0)<a.length?a.length+r:a.length<<1:a.length*o,i?(e=new Uint8Array(n)).set(a):e=a,this.a=e},I.prototype.t=function(){var t,e,n,r,o,s=0,a=this.a,u=this.l,c=new(i?Uint8Array:Array)(this.q+(this.b-32768));if(0===u.length)return i?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(e=0,n=u.length;e<n;++e)for(r=0,o=(t=u[e]).length;r<o;++r)c[s++]=t[r];for(e=32768,n=this.b;e<n;++e)c[s++]=a[e];return this.l=[],this.buffer=c},I.prototype.I=function(){var t,e=this.b;return i?this.C?(t=new Uint8Array(e)).set(this.a.subarray(0,e)):t=this.a.subarray(0,e):(this.a.length>e&&(this.a.length=e),t=this.a),this.buffer=t},Z.prototype.p=function(){var e,n=this.input;return e=this.B.p(),this.c=this.B.c,this.N&&(n[this.c++]<<24|n[this.c++]<<16|n[this.c++]<<8|n[this.c++])>>>0!==Q(e)&&t(Error("invalid adler-32 checksum")),e};var tt=8;function et(t,e){this.input=t,this.a=new(i?Uint8Array:Array)(32768),this.h=nt.k;var n,r={};for(n in!e&&(e={})||"number"!=typeof e.compressionType||(this.h=e.compressionType),e)r[n]=e[n];r.outputBuffer=this.a,this.A=new _(this.input,r)}var nt=v;function rt(t,e){var n,r,i,s;if(Object.keys)n=Object.keys(e);else for(r in n=[],i=0,e)n[i++]=r;for(i=0,s=n.length;i<s;++i)o(t+"."+(r=n[i]),e[r])}et.prototype.j=function(){var e,n,r,o,s,a,u,c=0;if(u=this.a,(e=tt)===tt?n=Math.LOG2E*Math.log(32768)-8:t(Error("invalid compression method")),r=n<<4|e,u[c++]=r,e===tt)switch(this.h){case nt.NONE:s=0;break;case nt.r:s=1;break;case nt.k:s=2;break;default:t(Error("unsupported compression type"))}else t(Error("invalid compression method"));return o=s<<6,u[c++]=o|31-(256*r+o)%31,a=Q(this.input),this.A.b=c,c=(u=this.A.j()).length,i&&((u=new Uint8Array(u.buffer)).length<=c+4&&(this.a=new Uint8Array(u.length+4),this.a.set(u),u=this.a),u=u.subarray(0,c+4)),u[c++]=a>>24&255,u[c++]=a>>16&255,u[c++]=a>>8&255,u[c++]=255&a,u},o("Zlib.Inflate",Z),o("Zlib.Inflate.prototype.decompress",Z.prototype.p),rt("Zlib.Inflate.BufferType",{ADAPTIVE:j.D,BLOCK:j.F}),o("Zlib.Deflate",et),o("Zlib.Deflate.compress",(function(t,e){return new et(t,e).j()})),o("Zlib.Deflate.prototype.compress",et.prototype.j),rt("Zlib.Deflate.CompressionType",{NONE:nt.NONE,FIXED:nt.r,DYNAMIC:nt.k})}).call(this)},500:function(){!function(t){"use strict";function e(t,e,n){return e<=t&&t<=n}function n(t,e){return Math.floor(t/e)}var r=-1,o=-1;function i(t){var e=0;this.get=function(){return e>=t.length?r:Number(t[e])},this.offset=function(n){if((e+=n)<0)throw new Error("Seeking past start of the buffer");if(e>t.length)throw new Error("Seeking past EOF")},this.match=function(n){if(n.length>e+t.length)return!1;var r;for(r=0;r<n.length;r+=1)if(Number(t[e+r])!==n[r])return!1;return!0}}function s(t){var e=0;this.emit=function(n){var o,i=r;for(o=0;o<arguments.length;++o)i=Number(arguments[o]),t[e++]=i;return i}}function a(t){var n=0,r=function(){for(var n=[],r=0,o=t.length;r<t.length;){var i=t.charCodeAt(r);if(e(i,55296,57343))if(e(i,56320,57343))n.push(65533);else if(r===o-1)n.push(65533);else{var s=t.charCodeAt(r+1);if(e(s,56320,57343)){var a=1023&i,u=1023&s;r+=1,n.push(65536+(a<<10)+u)}else n.push(65533)}else n.push(i);r+=1}return n}();this.offset=function(t){if((n+=t)<0)throw new Error("Seeking past start of the buffer");if(n>r.length)throw new Error("Seeking past EOF")},this.get=function(){return n>=r.length?o:r[n]}}function u(){var t="";this.string=function(){return t},this.emit=function(e){e<=65535?t+=String.fromCharCode(e):(e-=65536,t+=String.fromCharCode(55296+(e>>10&1023)),t+=String.fromCharCode(56320+(1023&e)))}}function c(t,e){if(t)throw new Error("EncodingError");return e||65533}function f(t){throw new Error("EncodingError")}function l(t){if(t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(h,t))return h[t];throw new Error("EncodingError: Unknown encoding: "+t)}var y={},h={};function p(t,e){return(e||[])[t]||null}function _(t,e){var n=e.indexOf(t);return-1===n?null:n}[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["cp864","ibm864"],name:"ibm864"},{labels:["cp866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso_8859-2","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso_8859-3","iso-ir-109","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso_8859-4","iso-ir-110","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso_8859-5","iso-ir-144"],name:"iso-8859-5"},{labels:["arabic","csisolatinarabic","ecma-114","iso-8859-6","iso_8859-6","iso-ir-127"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso_8859-7","iso-ir-126"],name:"iso-8859-7"},{labels:["csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-i","iso-ir-138","iso_8859-8","visual"],name:"iso-8859-8"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14"],name:"iso-8859-14"},{labels:["iso-8859-15","iso_8859-15"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["iso-8859-11","tis-620","windows-874"],name:"windows-874"},{labels:["windows-1250","x-cp1250"],name:"windows-1250"},{labels:["windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ascii","ansi_x3.4-1968","csisolatin1","iso-8859-1","iso8859-1","iso_8859-1","l1","latin1","us-ascii","windows-1252"],name:"windows-1252"},{labels:["cp1253","windows-1253"],name:"windows-1253"},{labels:["csisolatin5","iso-8859-9","iso-ir-148","l5","latin5","windows-1254"],name:"windows-1254"},{labels:["cp1255","windows-1255"],name:"windows-1255"},{labels:["cp1256","windows-1256"],name:"windows-1256"},{labels:["windows-1257"],name:"windows-1257"},{labels:["cp1258","windows-1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gbk","gb_2312","gb_2312-80","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"},{labels:["hz-gb-2312"],name:"hz-gb-2312"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"},{labels:["csiso2022kr","iso-2022-kr"],name:"iso-2022-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["utf-16","utf-16le"],name:"utf-16"},{labels:["utf-16be"],name:"utf-16be"}],heading:"Legacy utf-16 encodings"}].forEach((function(t){t.encodings.forEach((function(t){y[t.name]=t,t.labels.forEach((function(e){h[e]=t}))}))}));var b=t["encoding-indexes"]||{};function d(t){var n=t.fatal,i=0,s=0,a=0,u=0;this.decode=function(t){var f=t.get();if(f===r)return 0!==s?c(n):o;if(t.offset(1),0===s){if(e(f,0,127))return f;if(e(f,194,223))s=1,u=128,i=f-192;else if(e(f,224,239))s=2,u=2048,i=f-224;else{if(!e(f,240,244))return c(n);s=3,u=65536,i=f-240}return i*=Math.pow(64,s),null}if(!e(f,128,191))return i=0,s=0,a=0,u=0,t.offset(-1),c(n);if(a+=1,i+=(f-128)*Math.pow(64,s-a),a!==s)return null;var l=i,y=u;return i=0,s=0,a=0,u=0,e(l,y,1114111)&&!e(l,55296,57343)?l:c(n)}}function v(t){t.fatal,this.encode=function(t,i){var s,a,u=i.get();if(u===o)return r;if(i.offset(1),e(u,55296,57343))return f();if(e(u,0,127))return t.emit(u);e(u,128,2047)?(s=1,a=192):e(u,2048,65535)?(s=2,a=224):e(u,65536,1114111)&&(s=3,a=240);for(var c=t.emit(n(u,Math.pow(64,s))+a);s>0;){var l=n(u,Math.pow(64,s-1));c=t.emit(128+l%64),s-=1}return c}}function m(t,n){var i=n.fatal;this.decode=function(n){var s=n.get();if(s===r)return o;if(n.offset(1),e(s,0,127))return s;var a=t[s-128];return null===a?c(i):a}}function g(t,n){n.fatal,this.encode=function(n,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return n.emit(s);var a=_(s,t);return null===a&&f(),n.emit(a+128)}}function E(t,n){var i=n.fatal,s=0,a=0,u=0;this.decode=function(n){var f,l=n.get();if(l===r&&0===s&&0===a&&0===u)return o;if(l!==r||0===s&&0===a&&0===u||(s=0,a=0,u=0,c(i)),n.offset(1),0!==u)return f=null,e(l,48,57)&&(f=function(t){if(t>39419&&t<189e3||t>1237575)return null;var e,n=0,r=0,o=b.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[0]<=t))break;n=i[0],r=i[1]}return r+t-n}(10*(126*(10*(s-129)+(a-48))+(u-129))+l-48)),s=0,a=0,u=0,null===f?(n.offset(-3),c(i)):f;if(0!==a)return e(l,129,254)?(u=l,null):(n.offset(-2),s=0,a=0,c(i));if(0!==s){if(e(l,48,57)&&t)return a=l,null;var y=s,h=null;s=0;var _=l<127?64:65;return(e(l,64,126)||e(l,128,254))&&(h=190*(y-129)+(l-_)),f=null===h?null:p(h,b.gbk),null===h&&n.offset(-1),null===f?c(i):f}return e(l,0,127)?l:128===l?8364:e(l,129,254)?(s=l,null):c(i)}}function O(t,i){i.fatal,this.encode=function(i,s){var a=s.get();if(a===o)return r;if(s.offset(1),e(a,0,127))return i.emit(a);var u=_(a,b.gbk);if(null!==u){var c=n(u,190)+129,l=u%190,y=l<63?64:65;return i.emit(c,l+y)}if(null===u&&!t)return f();u=function(t){var e,n=0,r=0,o=b.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[1]<=t))break;n=i[1],r=i[0]}return r+t-n}(a);var h=n(n(n(u,10),126),10),p=n(n(u-=10*h*126*10,10),126),d=n(u-=10*p*126,10),v=u-10*d;return i.emit(h+129,p+48,d+129,v+48)}}function S(t){var n=t.fatal,i=!1,s=0;this.decode=function(t){var a=t.get();if(a===r&&0===s)return o;if(a===r&&0!==s)return s=0,c(n);if(t.offset(1),126===s)return s=0,123===a?(i=!0,null):125===a?(i=!1,null):126===a?126:10===a?null:(t.offset(-1),c(n));if(0!==s){var u=s;s=0;var f=null;return e(a,33,126)&&(f=p(190*(u-1)+(a+63),b.gbk)),10===a&&(i=!1),null===f?c(n):f}return 126===a?(s=126,null):i?e(a,32,127)?(s=a,null):(10===a&&(i=!1),c(n)):e(a,0,127)?a:c(n)}}function R(t){t.fatal;var i=!1;this.encode=function(t,s){var a=s.get();if(a===o)return r;if(s.offset(1),e(a,0,127)&&i)return s.offset(-1),i=!1,t.emit(126,125);if(126===a)return t.emit(126,126);if(e(a,0,127))return t.emit(a);if(!i)return s.offset(-1),i=!0,t.emit(126,123);var u=_(a,b.gbk);if(null===u)return f();var c=n(u,190)+1,l=u%190-63;return e(c,33,126)&&e(l,33,126)?t.emit(c,l):f()}}function w(t){var n=t.fatal,i=0,s=null;this.decode=function(t){if(null!==s){var a=s;return s=null,a}var u=t.get();if(u===r&&0===i)return o;if(u===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var f=i,l=null;i=0;var y=u<127?64:98;if((e(u,64,126)||e(u,161,254))&&(l=157*(f-129)+(u-y)),1133===l)return s=772,202;if(1135===l)return s=780,202;if(1164===l)return s=772,234;if(1166===l)return s=780,234;var h=null===l?null:p(l,b.big5);return null===l&&t.offset(-1),null===h?c(n):h}return e(u,0,127)?u:e(u,129,254)?(i=u,null):c(n)}}function A(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);var a=_(s,b.big5);if(null===a)return f();var u=n(a,157)+129,c=a%157,l=c<63?64:98;return t.emit(u,c+l)}}function I(t){var n=t.fatal,i=0,s=0;this.decode=function(t){var a,u,f=t.get();return f===r?0===i&&0===s?o:(i=0,s=0,c(n)):(t.offset(1),0!==s?(a=s,s=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,b.jis0212)),e(f,161,254)||t.offset(-1),null===u?c(n):u):142===i&&e(f,161,223)?(i=0,65377+f-161):143===i&&e(f,161,254)?(i=0,s=f,null):0!==i?(a=i,i=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,b.jis0208)),e(f,161,254)||t.offset(-1),null===u?c(n):u):e(f,0,127)?f:142===f||143===f||e(f,161,254)?(i=f,null):c(n))}}function T(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(142,s-65377+161);var a=_(s,b.jis0208);if(null===a)return f();var u=n(a,94)+161,c=a%94+161;return t.emit(u,c)}}function k(t){var n=t.fatal,i=0,s=!1,a=0;this.decode=function(t){var u=t.get();switch(u!==r&&t.offset(1),i){default:case 0:return 27===u?(i=1,null):e(u,0,127)?u:u===r?o:c(n);case 1:return 36===u||40===u?(a=u,i=2,null):(u!==r&&t.offset(-1),i=0,c(n));case 2:var f=a;return a=0,36!==f||64!==u&&66!==u?36===f&&40===u?(i=3,null):40!==f||66!==u&&74!==u?40===f&&73===u?(i=6,null):(u===r?t.offset(-1):t.offset(-2),i=0,c(n)):(i=0,null):(s=!1,i=4,null);case 3:return 68===u?(s=!0,i=4,null):(u===r?t.offset(-2):t.offset(-3),i=0,c(n));case 4:return 10===u?(i=0,c(n,10)):27===u?(i=1,null):u===r?o:(a=u,i=5,null);case 5:if(i=4,u===r)return c(n);var l=null,y=94*(a-33)+u-33;return e(a,33,126)&&e(u,33,126)&&(l=p(y,!1===s?b.jis0208:b.jis0212)),null===l?c(n):l;case 6:return 27===u?(i=1,null):e(u,33,95)?65377+u-33:u===r?o:c(n)}}}function j(t){t.fatal;var i=0;this.encode=function(t,s){var a=s.get();if(a===o)return r;if(s.offset(1),(e(a,0,127)||165===a||8254===a)&&0!==i)return s.offset(-1),i=0,t.emit(27,40,66);if(e(a,0,127))return t.emit(a);if(165===a)return t.emit(92);if(8254===a)return t.emit(126);if(e(a,65377,65439)&&2!==i)return s.offset(-1),i=2,t.emit(27,40,73);if(e(a,65377,65439))return t.emit(a-65377-33);if(1!==i)return s.offset(-1),i=1,t.emit(27,36,66);var u=_(a,b.jis0208);if(null===u)return f();var c=n(u,94)+33,l=u%94+33;return t.emit(c,l)}}function P(t){var n=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===r&&0===i)return o;if(s===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var a=i;if(i=0,e(s,64,126)||e(s,128,252)){var u=p(188*(a-(a<160?129:193))+s-(s<127?64:65),b.jis0208);return null===u?c(n):u}return t.offset(-1),c(n)}return e(s,0,128)?s:e(s,161,223)?65377+s-161:e(s,129,159)||e(s,224,252)?(i=s,null):c(n)}}function M(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,128))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(s-65377+161);var a=_(s,b.jis0208);if(null===a)return f();var u=n(a,188),c=u<31?129:193,l=a%188,y=l<63?64:65;return t.emit(u+c,l+y)}}function N(t){var n=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===r&&0===i)return o;if(s===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var a=i,u=null;if(i=0,e(a,129,198)){var f=178*(a-129);e(s,65,90)?u=f+s-65:e(s,97,122)?u=f+26+s-97:e(s,129,254)&&(u=f+26+26+s-129)}e(a,199,253)&&e(s,161,254)&&(u=12460+94*(a-199)+(s-161));var l=null===u?null:p(u,b["euc-kr"]);return null===u&&t.offset(-1),null===l?c(n):l}return e(s,0,127)?s:e(s,129,253)?(i=s,null):c(n)}}function U(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);var a,u,c=_(s,b["euc-kr"]);if(null===c)return f();if(c<12460){a=n(c,178)+129;var l=(u=c%178)<26?65:u<52?71:77;return t.emit(a,u+l)}return a=n(c-=12460,94)+199,u=c%94+161,t.emit(a,u)}}function Y(t){var n=t.fatal,i=0,s=0;this.decode=function(t){var a=t.get();switch(a!==r&&t.offset(1),i){default:case 0:return 14===a?(i=4,null):15===a?null:27===a?(i=1,null):e(a,0,127)?a:a===r?o:c(n);case 1:return 36===a?(i=2,null):(a!==r&&t.offset(-1),i=0,c(n));case 2:return 41===a?(i=3,null):(a===r?t.offset(-1):t.offset(-2),i=0,c(n));case 3:return 67===a?(i=0,null):(a===r?t.offset(-2):t.offset(-3),i=0,c(n));case 4:return 10===a?(i=0,c(n,10)):14===a?null:15===a?(i=0,null):a===r?o:(s=a,i=5,null);case 5:if(i=4,a===r)return c(n);var u=null;return e(s,33,70)&&e(a,33,126)?u=p(178*(s-1)+26+26+a-1,b["euc-kr"]):e(s,71,126)&&e(a,33,126)&&(u=p(12460+94*(s-71)+(a-33),b["euc-kr"])),null!==u?u:c(n)}}}function B(t){t.fatal;var i=!1,s=0;this.encode=function(t,a){var u=a.get();if(u===o)return r;if(i||(i=!0,t.emit(27,36,41,67)),a.offset(1),e(u,0,127)&&0!==s)return a.offset(-1),s=0,t.emit(15);if(e(u,0,127))return t.emit(u);if(1!==s)return a.offset(-1),s=1,t.emit(14);var c,l,y=_(u,b["euc-kr"]);return null===y?f():y<12460?(l=y%178-26-26+1,e(c=n(y,178)+1,33,70)&&e(l,33,126)?t.emit(c,l):f()):(l=(y-=12460)%94+33,e(c=n(y,94)+71,71,126)&&e(l,33,126)?t.emit(c,l):f())}}function L(t,n){var i=n.fatal,s=null,a=null;this.decode=function(n){var u,f=n.get();if(f===r&&null===s&&null===a)return o;if(f===r&&(null!==s||null!==a))return c(i);if(n.offset(1),null===s)return s=f,null;if(u=t?(s<<8)+f:(f<<8)+s,s=null,null!==a){var l=a;return a=null,e(u,56320,57343)?65536+1024*(l-55296)+(u-56320):(n.offset(-2),c(i))}return e(u,55296,56319)?(a=u,null):e(u,56320,57343)?c(i):u}}function D(t,i){i.fatal,this.encode=function(i,s){function a(e){var n=e>>8,r=255&e;return t?i.emit(n,r):i.emit(r,n)}var u=s.get();if(u===o)return r;if(s.offset(1),e(u,55296,57343)&&f(),u<=65535)return a(u);var c=(u-65536)%1024+56320;return a(n(u-65536,1024)+55296),a(c)}}y["utf-8"].getEncoder=function(t){return new v(t)},y["utf-8"].getDecoder=function(t){return new d(t)},["ibm864","ibm866","iso-8859-2","iso-8859-3","iso-8859-4","iso-8859-5","iso-8859-6","iso-8859-7","iso-8859-8","iso-8859-10","iso-8859-13","iso-8859-14","iso-8859-15","iso-8859-16","koi8-r","koi8-u","macintosh","windows-874","windows-1250","windows-1251","windows-1252","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-1258","x-mac-cyrillic"].forEach((function(t){var e=y[t],n=b[t];e.getDecoder=function(t){return new m(n,t)},e.getEncoder=function(t){return new g(n,t)}})),y.gbk.getEncoder=function(t){return new O(!1,t)},y.gbk.getDecoder=function(t){return new E(!1,t)},y.gb18030.getEncoder=function(t){return new O(!0,t)},y.gb18030.getDecoder=function(t){return new E(!0,t)},y["hz-gb-2312"].getEncoder=function(t){return new R(t)},y["hz-gb-2312"].getDecoder=function(t){return new S(t)},y.big5.getEncoder=function(t){return new A(t)},y.big5.getDecoder=function(t){return new w(t)},y["euc-jp"].getEncoder=function(t){return new T(t)},y["euc-jp"].getDecoder=function(t){return new I(t)},y["iso-2022-jp"].getEncoder=function(t){return new j(t)},y["iso-2022-jp"].getDecoder=function(t){return new k(t)},y.shift_jis.getEncoder=function(t){return new M(t)},y.shift_jis.getDecoder=function(t){return new P(t)},y["euc-kr"].getEncoder=function(t){return new U(t)},y["euc-kr"].getDecoder=function(t){return new N(t)},y["iso-2022-kr"].getEncoder=function(t){return new B(t)},y["iso-2022-kr"].getDecoder=function(t){return new Y(t)},y["utf-16"].getEncoder=function(t){return new D(!1,t)},y["utf-16"].getDecoder=function(t){return new L(!1,t)},y["utf-16be"].getEncoder=function(t){return new D(!0,t)},y["utf-16be"].getDecoder=function(t){return new L(!0,t)};var C="utf-8";function F(e,n){return this&&this!==t?(e=e?String(e):C,n=Object(n),this._encoding=l(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(n.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new F(e,n)}function K(e,n){return this&&this!==t?(e=e?String(e):C,n=Object(n),this._encoding=l(e),this._streaming=!1,this._decoder=null,this._options={fatal:Boolean(n.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new K(e,n)}F.prototype={encode:function(t,e){t=t?String(t):"",e=Object(e),this._streaming||(this._encoder=this._encoding.getEncoder(this._options)),this._streaming=Boolean(e.stream);for(var n=[],i=new s(n),u=new a(t);u.get()!==o;)this._encoder.encode(i,u);if(!this._streaming){var c;do{c=this._encoder.encode(i,u)}while(c!==r);this._encoder=null}return new Uint8Array(n)}},K.prototype={decode:function(t,e){if(t&&!("buffer"in t&&"byteOffset"in t&&"byteLength"in t))throw new TypeError("Expected ArrayBufferView");t||(t=new Uint8Array(0)),e=Object(e),this._streaming||(this._decoder=this._encoding.getDecoder(this._options)),this._streaming=Boolean(e.stream);var n=new i(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),s=function(t,e){return e.match([255,254])?(e.offset(2),"utf-16"):e.match([254,255])?(e.offset(2),"utf-16be"):e.match([239,187,191])?(e.offset(3),"utf-8"):t}(this._encoding.name,n);if(l(s)!==this._encoding)throw new Error("BOM mismatch");for(var a,c=new u;n.get()!==r;)null!==(a=this._decoder.decode(n))&&a!==o&&c.emit(a);if(!this._streaming){do{null!==(a=this._decoder.decode(n))&&a!==o&&c.emit(a)}while(a!==o);this._decoder=null}return c.string()}},t.TextEncoder=t.TextEncoder||F,t.TextDecoder=t.TextDecoder||K}(this)},801:(t,e,n)=>{var r;t=n.nmd(t);var o=function(t,e,n){this._byteOffset=e||0,t instanceof ArrayBuffer?this.buffer=t:"object"==typeof t?(this.dataView=t,e&&(this._byteOffset+=e)):this.buffer=new ArrayBuffer(t||1),this.position=0,this.endianness=null==n?o.LITTLE_ENDIAN:n};o.prototype={},void 0===Uint8Array.prototype.BYTES_PER_ELEMENT&&(Uint8Array.prototype.BYTES_PER_ELEMENT=Uint8Array.BYTES_PER_ELEMENT,Int8Array.prototype.BYTES_PER_ELEMENT=Int8Array.BYTES_PER_ELEMENT,Uint8ClampedArray.prototype.BYTES_PER_ELEMENT=Uint8ClampedArray.BYTES_PER_ELEMENT,Uint16Array.prototype.BYTES_PER_ELEMENT=Uint16Array.BYTES_PER_ELEMENT,Int16Array.prototype.BYTES_PER_ELEMENT=Int16Array.BYTES_PER_ELEMENT,Uint32Array.prototype.BYTES_PER_ELEMENT=Uint32Array.BYTES_PER_ELEMENT,Int32Array.prototype.BYTES_PER_ELEMENT=Int32Array.BYTES_PER_ELEMENT,Float64Array.prototype.BYTES_PER_ELEMENT=Float64Array.BYTES_PER_ELEMENT),o.prototype.save=function(t){var e=new Blob(this.buffer),n=window.webkitURL||window.URL;if(!n||!n.createObjectURL)throw"DataStream.save: Can't create object URL.";var r=n.createObjectURL(e),o=document.createElement("a");o.setAttribute("href",r),o.setAttribute("download",t),o.click(),n.revokeObjectURL(r)},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._dynamicSize=!0,Object.defineProperty(o.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(t){t||this._trimAlloc(),this._dynamicSize=t}}),o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),o.prototype._realloc=function(t){if(this._dynamicSize){var e=this._byteOffset+this.position+t,n=this._buffer.byteLength;if(e<=n)e>this._byteLength&&(this._byteLength=e);else{for(n<1&&(n=1);e>n;)n*=2;var r=new ArrayBuffer(n),o=new Uint8Array(this._buffer);new Uint8Array(r,0,o.length).set(o),this.buffer=r,this._byteLength=e}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),n=new Uint8Array(this._buffer,0,e.length);e.set(n),this.buffer=t}},o.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},o.prototype.isEof=function(){return this.position>=this.byteLength},o.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var n=new Int32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var n=new Int16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=2*t,n},o.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var n=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var n=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=2*t,n},o.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var n=new Float64Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=8*t,n},o.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var n=new Float32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.readInt32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Int32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readInt16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var n=new Int16Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readInt8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Int8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readUint32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Uint32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readUint16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var n=new Uint16Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readUint8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Uint8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readFloat64Array=function(t,e){t=null==t?this.byteLength-this.position/8:t;var n=new Float64Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readFloat32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Float32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.writeInt32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Int32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeInt32(t[n],e)},o.prototype.writeInt16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Int16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt16Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeInt16(t[n],e)},o.prototype.writeInt8Array=function(t){if(this._realloc(1*t.length),t instanceof Int8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt8Array(t.length);else for(var e=0;e<t.length;e++)this.writeInt8(t[e])},o.prototype.writeUint32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Uint32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeUint32(t[n],e)},o.prototype.writeUint16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Uint16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint16Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeUint16(t[n],e)},o.prototype.writeUint8Array=function(t){if(this._realloc(1*t.length),t instanceof Uint8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint8Array(t.length);else for(var e=0;e<t.length;e++)this.writeUint8(t[e])},o.prototype.writeFloat64Array=function(t,e){if(this._realloc(8*t.length),t instanceof Float64Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat64Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeFloat64(t[n],e)},o.prototype.writeFloat32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Float32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeFloat32(t[n],e)},o.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},o.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},o.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},o.prototype.writeInt32=function(t,e){this._realloc(4),this._dataView.setInt32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeInt16=function(t,e){this._realloc(2),this._dataView.setInt16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeInt8=function(t){this._realloc(1),this._dataView.setInt8(this.position,t),this.position+=1},o.prototype.writeUint32=function(t,e){this._realloc(4),this._dataView.setUint32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeUint16=function(t,e){this._realloc(2),this._dataView.setUint16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeUint8=function(t){this._realloc(1),this._dataView.setUint8(this.position,t),this.position+=1},o.prototype.writeFloat32=function(t,e){this._realloc(4),this._dataView.setFloat32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeFloat64=function(t,e){this._realloc(8),this._dataView.setFloat64(this.position,t,null==e?this.endianness:e),this.position+=8},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(t,e,n,r,o){var i=new Uint8Array(t,e,o),s=new Uint8Array(n,r,o);i.set(s)},o.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},o.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},o.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),n=0;n<t.byteLength;n+=t.BYTES_PER_ELEMENT)for(var r=n+t.BYTES_PER_ELEMENT-1,o=n;r>o;r--,o++){var i=e[o];e[o]=e[r],e[r]=i}return t},o.createStringFromArray=function(t){for(var e=[],n=0;n<t.length;n+=32768)e.push(String.fromCharCode.apply(null,t.subarray(n,n+32768)));return e.join("")},o.prototype.failurePosition=0,o.prototype.readStruct=function(t){for(var e,n,r={},o=this.position,i=0;i<t.length;i+=2){if(e=t[i+1],null==(n=this.readType(e,r)))return 0==this.failurePosition&&(this.failurePosition=this.position),this.position=o,null;r[t[i]]=n}return r},o.prototype.readUCS2String=function(t,e){return o.createStringFromArray(this.readUint16Array(t,e))},o.prototype.writeUCS2String=function(t,e,n){null==n&&(n=t.length);for(var r=0;r<t.length&&r<n;r++)this.writeUint16(t.charCodeAt(r),e);for(;r<n;r++)this.writeUint16(0)},o.prototype.readString=function(t,e){return null==e||"ASCII"==e?o.createStringFromArray(this.mapUint8Array(null==t?this.byteLength-this.position:t)):new TextDecoder(e).decode(this.mapUint8Array(t))},o.prototype.writeString=function(t,e,n){if(null==e||"ASCII"==e)if(null!=n){var r=0,o=Math.min(t.length,n);for(r=0;r<o;r++)this.writeUint8(t.charCodeAt(r));for(;r<n;r++)this.writeUint8(0)}else for(r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));else this.writeUint8Array(new TextEncoder(e).encode(t.substring(0,n)))},o.prototype.readCString=function(t){var e=this.byteLength-this.position,n=new Uint8Array(this._buffer,this._byteOffset+this.position),r=e;null!=t&&(r=Math.min(t,e));for(var i=0;i<r&&0!=n[i];i++);var s=o.createStringFromArray(this.mapUint8Array(i));return null!=t?this.position+=r-i:i!=e&&(this.position+=1),s},o.prototype.writeCString=function(t,e){if(null!=e){var n=0,r=Math.min(t.length,e);for(n=0;n<r;n++)this.writeUint8(t.charCodeAt(n));for(;n<e;n++)this.writeUint8(0)}else{for(n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));this.writeUint8(0)}},o.prototype.readType=function(t,e){if("function"==typeof t)return t(this,e);if(!("object"!=typeof t||t instanceof Array))return t.get(this,e);if(t instanceof Array&&3!=t.length)return this.readStruct(t,e);var n=null,r=null,i="ASCII",s=this.position;if("string"==typeof t&