MeshCentral/public/scripts/zlib-inflate-min.js

1 line
27 KiB
JavaScript
Raw Normal View History

2022-10-27 14:13:23 -04:00
"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js"),function(){var Y=11,q=29,C=[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],O=[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,203,69],T=[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],y=[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];function G(t,a){for(var i,s,o,l,e,b,v,p,n,d,r,h,c,f,u,m,_,k,g,w,x=t.next,Z=2==a?t.distbits:t.lenbits,I=t.work,L=t.lens,B=2==a?t.nlen:0,R=t.codes,E=1==a?t.nlen:2==a?t.ndist:19,A=new Array(16),S=new Array(16),z=0;z<=15;z++)A[z]=0;for(i=0;i<E;i++)A[L[B+i]]++;for(l=Z,o=15;1<=o&&0==A[o];o--);if(o<l&&(l=o),0==o)R[x++]=f={op:64,bits:1,val:0},R[x++]=f,2==a?t.distbits=1:t.lenbits=1,t.next=x;else{for(s=1;s<o&&0==A[s];s++);for(l<s&&(l=s),z=v=1;z<=15;z++)if((v=(v<<=1)-A[z])<0)return-1;if(0<v&&(0==a||1!=o))return t.next=x,-1;for(S[1]=0,z=1;z<15;z++)S[z+1]=S[z]+A[z];for(i=0;i<E;i++)0!=L[B+i]&&(I[S[L[B+i]]++]=i);switch(a){case 0:m=k=I,g=_=0,w=19;break;case 1:m=C,k=O,g=_=-257,w=256;break;default:m=T,k=y,g=_=0,w=-1}if(z=s,u=x,b=i=n=0,h=-1,c=(p=1<<(e=l))-1,1==a&&852<=p||2==a&&592<=p)return t.next=x,1;for(;;){for(f={op:0,bits:z-b,val:0},I[i]<w?f.val=I[i]:I[i]>w?(f.op=k[g+I[i]],f.val=m[_+I[i]]):f.op=96,d=1<<z-b,s=r=1<<e;R[u+(n>>>b)+(r-=d)]=f,0!=r;);for(d=1<<z-1;n&d;)d>>>=1;if(n=0!=d?(n&d-1)+d:0,i++,0==--A[z]){if(z==o)break;z=L[B+I[i]]}if(l<z&&(n&c)!=h){for(u+=s,v=1<<(e=z-(b=0==b?l:b));e+b<o&&!((v-=A[e+b])<=0);)e++,v<<=1;if(p+=1<<e,1==a&&852<=p||2==a&&592<=p)return t.next=x,1;R[x+(h=n&c)]={op:e,bits:l,val:u-x}}}0!=n&&(R[u+n]={op:64,bits:z-b,val:0}),t.next=x+p,2==a?t.distbits=l:t.lenbits=l}return 0}function i(t){for(var a=new Array(t),i=0;i<t;i++)a[i]=0;return a}function l(t,a,i){return t&&a in t?t[a]:i}function o(){return 0}function s(){this.mode=0,this.last=0,this.wrap=0,this.havedict=0,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=0,this.distcode=0,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=0,this.lens=i(320),this.work=i(288),this.codes=new Array(1444);for(var t={op:0,bits:0,val:0},a=0;a<1444;a++)this.codes[a]=t;this.sane=0,this.back=0,this.was=0}ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ",ZLIB.inflateResetKeep=function(t){var a;return t&&t.state?(a=t.state,t.total_in=t.total_out=a.total=0,t.msg=null,a.wrap&&(t.adler=1&a.wrap),a.mode=0,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=0,a.distcode=0,a.next=0,a.sane=1,a.back=-1,ZLIB.Z_OK):ZLIB.Z_STREAM_ERROR},ZLIB.inflateReset=function(t,a){var i,s;return!t||!t.state||(s=t.state,(a=void 0===a?15:a)<0?(i=0,a=-a):(i=1+(a>>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15<a))?ZLIB.Z_STREAM_ERROR:(s.window&&s.wbits!=a&&(s.window=null),s.wrap=i,s.wbits=a,s.wsize=0,s.whave=0,s.wnext=0,ZLIB.inflateResetKeep(t))},ZLIB.inflateInit=function(t){var a=new ZLIB.z_stream;return a.state=new s,ZLIB.inflateReset(a,t),a},ZLIB.inflatePrime=function(t,a,i){if(!t||!t.state)return ZLIB.Z_STREAM_ERROR;if(t=t.state,a<0)t.hold=0,t.bits=0;else{if(16<a||32<t.bits+a)return ZLIB.Z_STREAM_ERROR;t.hold+=(i&=(1<<a)-1)<<t.bits,t.bits+=a}return ZLIB.Z_OK};var J=null,Q=null;function V(t,a){t.state.check=t.checksum_function(t.state.check,[255&a,a>>>8&255],0,2)}function W(t,a){a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits}function X(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function $(t){t.hold=0,t.bits=0}function tt(t){return 0!=t.have&&(t.have--,t.hold+=(255&t.strm.input_data.charC