Agriculture-front-end/public/Cesium/ThirdParty/Workers/inflate.js
2023-04-16 22:33:44 +08:00

1 line
22 KiB
JavaScript

!function(i){var e=-2,t=-3,n=-5,a=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],r=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],_=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],l=[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],d=[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,112,112],s=[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],o=[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],f=15;function b(){var i,e,a,r,_,b;function u(i,e,l,d,s,o,u,x,w,c,v){var h,k,m,y,g,p,A,I,E,S,U,z,D,M,L;S=0,g=l;do{a[i[e+S]]++,S++,g--}while(0!==g);if(a[0]==l)return u[0]=-1,x[0]=0,0;for(I=x[0],p=1;p<=f&&0===a[p];p++);for(A=p,I<p&&(I=p),g=f;0!==g&&0===a[g];g--);for(m=g,I>g&&(I=g),x[0]=I,M=1<<p;p<g;p++,M<<=1)if((M-=a[p])<0)return t;if((M-=a[g])<0)return t;for(a[g]+=M,b[1]=p=0,S=1,D=2;0!=--g;)b[D]=p+=a[S],D++,S++;g=0,S=0;do{0!==(p=i[e+S])&&(v[b[p]++]=g),S++}while(++g<l);for(l=b[m],b[0]=g=0,S=0,y=-1,z=-I,_[0]=0,U=0,L=0;A<=m;A++)for(h=a[A];0!=h--;){for(;A>z+I;){if(y++,L=(L=m-(z+=I))>I?I:L,(k=1<<(p=A-z))>h+1&&(k-=h+1,D=A,p<L))for(;++p<L&&!((k<<=1)<=a[++D]);)k-=a[D];if(L=1<<p,c[0]+L>1440)return t;_[y]=U=c[0],c[0]+=L,0!==y?(b[y]=g,r[0]=p,r[1]=I,p=g>>>z-I,r[2]=U-_[y-1]-p,w.set(r,3*(_[y-1]+p))):u[0]=U}for(r[1]=A-z,S>=l?r[0]=192:v[S]<d?(r[0]=v[S]<256?0:96,r[2]=v[S++]):(r[0]=o[v[S]-d]+16+64,r[2]=s[v[S++]-d]),k=1<<A-z,p=g>>>z;p<L;p+=k)w.set(r,3*(U+p));for(p=1<<A-1;0!=(g&p);p>>>=1)g^=p;for(g^=p,E=(1<<z)-1;(g&E)!=b[y];)y--,E=(1<<(z-=I))-1}return 0!==M&&1!=m?n:0}function x(t){var n;for(i||(i=[],e=[],a=new Int32Array(16),r=[],_=new Int32Array(f),b=new Int32Array(16)),e.length<t&&(e=[]),n=0;n<t;n++)e[n]=0;for(n=0;n<16;n++)a[n]=0;for(n=0;n<3;n++)r[n]=0;_.set(a.subarray(0,f),0),b.set(a.subarray(0,16),0)}this.inflate_trees_bits=function(a,r,_,l,d){var s;return x(19),i[0]=0,(s=u(a,0,19,19,null,null,_,r,l,i,e))==t?d.msg="oversubscribed dynamic bit lengths tree":s!=n&&0!==r[0]||(d.msg="incomplete dynamic bit lengths tree",s=t),s},this.inflate_trees_dynamic=function(a,r,_,f,b,w,c,v,h){var k;return x(288),i[0]=0,0!=(k=u(_,0,a,257,l,d,w,f,v,i,e))||0===f[0]?(k==t?h.msg="oversubscribed literal/length tree":-4!=k&&(h.msg="incomplete literal/length tree",k=t),k):(x(288),0!=(k=u(_,a,r,0,s,o,c,b,v,i,e))||0===b[0]&&a>257?(k==t?h.msg="oversubscribed distance tree":k==n?(h.msg="incomplete distance tree",k=t):-4!=k&&(h.msg="empty distance tree with lengths",k=t),k):0)}}b.inflate_trees_fixed=function(i,e,t,n){return i[0]=9,e[0]=5,t[0]=r,n[0]=_,0};function u(){var i,n,r,_,l=this,d=0,s=0,o=0,f=0,b=0,u=0,x=0,w=0,c=0,v=0;function h(i,e,n,r,_,l,d,s){var o,f,b,u,x,w,c,v,h,k,m,y,g,p,A,I;c=s.next_in_index,v=s.avail_in,x=d.bitb,w=d.bitk,k=(h=d.write)<d.read?d.read-h-1:d.end-h,m=a[i],y=a[e];do{for(;w<20;)v--,x|=(255&s.read_byte(c++))<<w,w+=8;if(0!==(u=(f=n)[I=3*((b=r)+(o=x&m))]))for(;;){if(x>>=f[I+1],w-=f[I+1],0!=(16&u)){for(u&=15,g=f[I+2]+(x&a[u]),x>>=u,w-=u;w<15;)v--,x|=(255&s.read_byte(c++))<<w,w+=8;for(u=(f=_)[I=3*((b=l)+(o=x&y))];;){if(x>>=f[I+1],w-=f[I+1],0!=(16&u)){for(u&=15;w<u;)v--,x|=(255&s.read_byte(c++))<<w,w+=8;if(p=f[I+2]+(x&a[u]),x>>=u,w-=u,k-=g,h>=p)h-(A=h-p)>0&&2>h-A?(d.window[h++]=d.window[A++],d.window[h++]=d.window[A++],g-=2):(d.window.set(d.window.subarray(A,A+2),h),h+=2,A+=2,g-=2);else{A=h-p;do{A+=d.end}while(A<0);if(g>(u=d.end-A)){if(g-=u,h-A>0&&u>h-A)do{d.window[h++]=d.window[A++]}while(0!=--u);else d.window.set(d.window.subarray(A,A+u),h),h+=u,A+=u,u=0;A=0}}if(h-A>0&&g>h-A)do{d.window[h++]=d.window[A++]}while(0!=--g);else d.window.set(d.window.subarray(A,A+g),h),h+=g,A+=g,g=0;break}if(0!=(64&u))return s.msg="invalid distance code",v+=g=w>>3<(g=s.avail_in-v)?w>>3:g,c-=g,w-=g<<3,d.bitb=x,d.bitk=w,s.avail_in=v,s.total_in+=c-s.next_in_index,s.next_in_index=c,d.write=h,t;o+=f[I+2],u=f[I=3*(b+(o+=x&a[u]))]}break}if(0!=(64&u))return 0!=(32&u)?(v+=g=w>>3<(g=s.avail_in-v)?w>>3:g,c-=g,w-=g<<3,d.bitb=x,d.bitk=w,s.avail_in=v,s.total_in+=c-s.next_in_index,s.next_in_index=c,d.write=h,1):(s.msg="invalid literal/length code",v+=g=w>>3<(g=s.avail_in-v)?w>>3:g,c-=g,w-=g<<3,d.bitb=x,d.bitk=w,s.avail_in=v,s.total_in+=c-s.next_in_index,s.next_in_index=c,d.write=h,t);if(o+=f[I+2],0===(u=f[I=3*(b+(o+=x&a[u]))])){x>>=f[I+1],w-=f[I+1],d.window[h++]=f[I+2],k--;break}}else x>>=f[I+1],w-=f[I+1],d.window[h++]=f[I+2],k--}while(k>=258&&v>=10);return v+=g=w>>3<(g=s.avail_in-v)?w>>3:g,c-=g,w-=g<<3,d.bitb=x,d.bitk=w,s.avail_in=v,s.total_in+=c-s.next_in_index,s.next_in_index=c,d.write=h,0}l.init=function(e,t,a,l,d,s){i=0,x=e,w=t,r=a,c=l,_=d,v=s,n=null},l.proc=function(l,k,m){var y,g,p,A,I,E,S,U=0,z=0,D=0;for(D=k.next_in_index,A=k.avail_in,U=l.bitb,z=l.bitk,E=(I=l.write)<l.read?l.read-I-1:l.end-I;;)switch(i){case 0:if(E>=258&&A>=10&&(l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,m=h(x,w,r,c,_,v,l,k),D=k.next_in_index,A=k.avail_in,U=l.bitb,z=l.bitk,E=(I=l.write)<l.read?l.read-I-1:l.end-I,0!=m)){i=1==m?7:9;break}o=x,n=r,s=c,i=1;case 1:for(y=o;z<y;){if(0===A)return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);m=0,A--,U|=(255&k.read_byte(D++))<<z,z+=8}if(U>>>=n[(g=3*(s+(U&a[y])))+1],z-=n[g+1],0===(p=n[g])){f=n[g+2],i=6;break}if(0!=(16&p)){b=15&p,d=n[g+2],i=2;break}if(0==(64&p)){o=p,s=g/3+n[g+2];break}if(0!=(32&p)){i=7;break}return i=9,k.msg="invalid literal/length code",m=t,l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);case 2:for(y=b;z<y;){if(0===A)return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);m=0,A--,U|=(255&k.read_byte(D++))<<z,z+=8}d+=U&a[y],U>>=y,z-=y,o=w,n=_,s=v,i=3;case 3:for(y=o;z<y;){if(0===A)return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);m=0,A--,U|=(255&k.read_byte(D++))<<z,z+=8}if(U>>=n[(g=3*(s+(U&a[y])))+1],z-=n[g+1],0!=(16&(p=n[g]))){b=15&p,u=n[g+2],i=4;break}if(0==(64&p)){o=p,s=g/3+n[g+2];break}return i=9,k.msg="invalid distance code",m=t,l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);case 4:for(y=b;z<y;){if(0===A)return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);m=0,A--,U|=(255&k.read_byte(D++))<<z,z+=8}u+=U&a[y],U>>=y,z-=y,i=5;case 5:for(S=I-u;S<0;)S+=l.end;for(;0!==d;){if(0===E&&(I==l.end&&0!==l.read&&(E=(I=0)<l.read?l.read-I-1:l.end-I),0===E&&(l.write=I,m=l.inflate_flush(k,m),E=(I=l.write)<l.read?l.read-I-1:l.end-I,I==l.end&&0!==l.read&&(E=(I=0)<l.read?l.read-I-1:l.end-I),0===E)))return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);l.window[I++]=l.window[S++],E--,S==l.end&&(S=0),d--}i=0;break;case 6:if(0===E&&(I==l.end&&0!==l.read&&(E=(I=0)<l.read?l.read-I-1:l.end-I),0===E&&(l.write=I,m=l.inflate_flush(k,m),E=(I=l.write)<l.read?l.read-I-1:l.end-I,I==l.end&&0!==l.read&&(E=(I=0)<l.read?l.read-I-1:l.end-I),0===E)))return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);m=0,l.window[I++]=f,E--,i=0;break;case 7:if(z>7&&(z-=8,A++,D--),l.write=I,m=l.inflate_flush(k,m),E=(I=l.write)<l.read?l.read-I-1:l.end-I,l.read!=l.write)return l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);i=8;case 8:return m=1,l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);case 9:return m=t,l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m);default:return m=e,l.bitb=U,l.bitk=z,k.avail_in=A,k.total_in+=D-k.next_in_index,k.next_in_index=D,l.write=I,l.inflate_flush(k,m)}},l.free=function(){}}var x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function w(i,r){var _,l=this,d=0,s=0,o=0,f=0,w=[0],c=[0],v=new u,h=0,k=new Int32Array(4320),m=new b;l.bitk=0,l.bitb=0,l.window=new Uint8Array(r),l.end=r,l.read=0,l.write=0,l.reset=function(i,e){e&&(e[0]=0),6==d&&v.free(i),d=0,l.bitk=0,l.bitb=0,l.read=l.write=0},l.reset(i,null),l.inflate_flush=function(i,e){var t,a,r;return a=i.next_out_index,(t=((r=l.read)<=l.write?l.write:l.end)-r)>i.avail_out&&(t=i.avail_out),0!==t&&e==n&&(e=0),i.avail_out-=t,i.total_out+=t,i.next_out.set(l.window.subarray(r,r+t),a),a+=t,(r+=t)==l.end&&(r=0,l.write==l.end&&(l.write=0),(t=l.write-r)>i.avail_out&&(t=i.avail_out),0!==t&&e==n&&(e=0),i.avail_out-=t,i.total_out+=t,i.next_out.set(l.window.subarray(r,r+t),a),a+=t,r+=t),i.next_out_index=a,l.read=r,e},l.proc=function(i,n){var r,u,y,g,p,A,I,E;for(g=i.next_in_index,p=i.avail_in,u=l.bitb,y=l.bitk,I=(A=l.write)<l.read?l.read-A-1:l.end-A;;)switch(d){case 0:for(;y<3;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}switch(h=1&(r=7&u),r>>>1){case 0:u>>>=3,u>>>=r=7&(y-=3),y-=r,d=1;break;case 1:var S=[],U=[],z=[[]],D=[[]];b.inflate_trees_fixed(S,U,z,D),v.init(S[0],U[0],z[0],0,D[0],0),u>>>=3,y-=3,d=6;break;case 2:u>>>=3,y-=3,d=3;break;case 3:return u>>>=3,y-=3,d=9,i.msg="invalid block type",n=t,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n)}break;case 1:for(;y<32;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}if((~u>>>16&65535)!=(65535&u))return d=9,i.msg="invalid stored block lengths",n=t,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);s=65535&u,u=y=0,d=0!==s?2:0!==h?7:0;break;case 2:if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);if(0===I&&(A==l.end&&0!==l.read&&(I=(A=0)<l.read?l.read-A-1:l.end-A),0===I&&(l.write=A,n=l.inflate_flush(i,n),I=(A=l.write)<l.read?l.read-A-1:l.end-A,A==l.end&&0!==l.read&&(I=(A=0)<l.read?l.read-A-1:l.end-A),0===I)))return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);if(n=0,(r=s)>p&&(r=p),r>I&&(r=I),l.window.set(i.read_buf(g,r),A),g+=r,p-=r,A+=r,I-=r,0!=(s-=r))break;d=0!==h?7:0;break;case 3:for(;y<14;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}if(o=r=16383&u,(31&r)>29||(r>>5&31)>29)return d=9,i.msg="too many length or distance symbols",n=t,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);if(r=258+(31&r)+(r>>5&31),!_||_.length<r)_=[];else for(E=0;E<r;E++)_[E]=0;u>>>=14,y-=14,f=0,d=4;case 4:for(;f<4+(o>>>10);){for(;y<3;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}_[x[f++]]=7&u,u>>>=3,y-=3}for(;f<19;)_[x[f++]]=0;if(w[0]=7,0!=(r=m.inflate_trees_bits(_,w,c,k,i)))return(n=r)==t&&(_=null,d=9),l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);f=0,d=5;case 5:for(;f<258+(31&(r=o))+(r>>5&31);){var M,L;for(r=w[0];y<r;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}if(r=k[3*(c[0]+(u&a[r]))+1],(L=k[3*(c[0]+(u&a[r]))+2])<16)u>>>=r,y-=r,_[f++]=L;else{for(E=18==L?7:L-14,M=18==L?11:3;y<r+E;){if(0===p)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);n=0,p--,u|=(255&i.read_byte(g++))<<y,y+=8}if(y-=r,M+=(u>>>=r)&a[E],u>>>=E,y-=E,(E=f)+M>258+(31&(r=o))+(r>>5&31)||16==L&&E<1)return _=null,d=9,i.msg="invalid bit length repeat",n=t,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);L=16==L?_[E-1]:0;do{_[E++]=L}while(0!=--M);f=E}}c[0]=-1;var P=[],j=[],q=[],B=[];if(P[0]=9,j[0]=6,r=o,0!=(r=m.inflate_trees_dynamic(257+(31&r),1+(r>>5&31),_,P,j,q,B,k,i)))return r==t&&(_=null,d=9),n=r,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);v.init(P[0],j[0],k,q[0],k,B[0]),d=6;case 6:if(l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,1!=(n=v.proc(l,i,n)))return l.inflate_flush(i,n);if(n=0,v.free(i),g=i.next_in_index,p=i.avail_in,u=l.bitb,y=l.bitk,I=(A=l.write)<l.read?l.read-A-1:l.end-A,0===h){d=0;break}d=7;case 7:if(l.write=A,n=l.inflate_flush(i,n),I=(A=l.write)<l.read?l.read-A-1:l.end-A,l.read!=l.write)return l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);d=8;case 8:return n=1,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);case 9:return n=t,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n);default:return n=e,l.bitb=u,l.bitk=y,i.avail_in=p,i.total_in+=g-i.next_in_index,i.next_in_index=g,l.write=A,l.inflate_flush(i,n)}},l.free=function(i){l.reset(i,null),l.window=null,k=null},l.set_dictionary=function(i,e,t){l.window.set(i.subarray(e,e+t),0),l.read=l.write=t},l.sync_point=function(){return 1==d?1:0}}var c,v=13,h=[0,0,255,255];function k(){var i=this;function a(i){return i&&i.istate?(i.total_in=i.total_out=0,i.msg=null,i.istate.mode=7,i.istate.blocks.reset(i,null),0):e}i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0,i.inflateEnd=function(e){return i.blocks&&i.blocks.free(e),i.blocks=null,0},i.inflateInit=function(t,n){return t.msg=null,i.blocks=null,n<8||n>15?(i.inflateEnd(t),e):(i.wbits=n,t.istate.blocks=new w(t,1<<n),a(t),0)},i.inflate=function(i,a){var r,_;if(!i||!i.istate||!i.next_in)return e;for(a=4==a?n:0,r=n;;)switch(i.istate.mode){case 0:if(0===i.avail_in)return r;if(r=a,i.avail_in--,i.total_in++,8!=(15&(i.istate.method=i.read_byte(i.next_in_index++)))){i.istate.mode=v,i.msg="unknown compression method",i.istate.marker=5;break}if(8+(i.istate.method>>4)>i.istate.wbits){i.istate.mode=v,i.msg="invalid window size",i.istate.marker=5;break}i.istate.mode=1;case 1:if(0===i.avail_in)return r;if(r=a,i.avail_in--,i.total_in++,_=255&i.read_byte(i.next_in_index++),((i.istate.method<<8)+_)%31!=0){i.istate.mode=v,i.msg="incorrect header check",i.istate.marker=5;break}if(0==(32&_)){i.istate.mode=7;break}i.istate.mode=2;case 2:if(0===i.avail_in)return r;r=a,i.avail_in--,i.total_in++,i.istate.need=(255&i.read_byte(i.next_in_index++))<<24&4278190080,i.istate.mode=3;case 3:if(0===i.avail_in)return r;r=a,i.avail_in--,i.total_in++,i.istate.need+=(255&i.read_byte(i.next_in_index++))<<16&16711680,i.istate.mode=4;case 4:if(0===i.avail_in)return r;r=a,i.avail_in--,i.total_in++,i.istate.need+=(255&i.read_byte(i.next_in_index++))<<8&65280,i.istate.mode=5;case 5:return 0===i.avail_in?r:(r=a,i.avail_in--,i.total_in++,i.istate.need+=255&i.read_byte(i.next_in_index++),i.istate.mode=6,2);case 6:return i.istate.mode=v,i.msg="need dictionary",i.istate.marker=0,e;case 7:if((r=i.istate.blocks.proc(i,r))==t){i.istate.mode=v,i.istate.marker=0;break}if(0==r&&(r=a),1!=r)return r;r=a,i.istate.blocks.reset(i,i.istate.was),i.istate.mode=12;case 12:return 1;case v:return t;default:return e}},i.inflateSetDictionary=function(i,t,n){var a=0,r=n;return i&&i.istate&&6==i.istate.mode?(r>=1<<i.istate.wbits&&(a=n-(r=(1<<i.istate.wbits)-1)),i.istate.blocks.set_dictionary(t,a,r),i.istate.mode=7,0):e},i.inflateSync=function(i){var r,_,l,d,s;if(!i||!i.istate)return e;if(i.istate.mode!=v&&(i.istate.mode=v,i.istate.marker=0),0===(r=i.avail_in))return n;for(_=i.next_in_index,l=i.istate.marker;0!==r&&l<4;)i.read_byte(_)==h[l]?l++:l=0!==i.read_byte(_)?0:4-l,_++,r--;return i.total_in+=_-i.next_in_index,i.next_in_index=_,i.avail_in=r,i.istate.marker=l,4!=l?t:(d=i.total_in,s=i.total_out,a(i),i.total_in=d,i.total_out=s,i.istate.mode=7,0)},i.inflateSyncPoint=function(i){return i&&i.istate&&i.istate.blocks?i.istate.blocks.sync_point():e}}function m(){}function y(){var i=new m,e=new Uint8Array(512),t=!1;i.inflateInit(),i.next_out=e,this.append=function(a,r){var _,l,d=[],s=0,o=0,f=0;if(0!==a.length){i.next_in_index=0,i.next_in=a,i.avail_in=a.length;do{if(i.next_out_index=0,i.avail_out=512,0!==i.avail_in||t||(i.next_in_index=0,t=!0),_=i.inflate(0),t&&_==n)return-1;if(0!=_&&1!=_)throw"inflating: "+i.msg;if((t||1==_)&&i.avail_in==a.length)return-1;i.next_out_index&&(512==i.next_out_index?d.push(new Uint8Array(e)):d.push(new Uint8Array(e.subarray(0,i.next_out_index)))),f+=i.next_out_index,r&&i.next_in_index>0&&i.next_in_index!=s&&(r(i.next_in_index),s=i.next_in_index)}while(i.avail_in>0||0===i.avail_out);return l=new Uint8Array(f),d.forEach((function(i){l.set(i,o),o+=i.length})),l}},this.flush=function(){i.inflateEnd()}}m.prototype={inflateInit:function(i){var e=this;return e.istate=new k,i||(i=15),e.istate.inflateInit(e,i)},inflate:function(i){var t=this;return t.istate?t.istate.inflate(t,i):e},inflateEnd:function(){var i=this;if(!i.istate)return e;var t=i.istate.inflateEnd(i);return i.istate=null,t},inflateSync:function(){var i=this;return i.istate?i.istate.inflateSync(i):e},inflateSetDictionary:function(i,t){var n=this;return n.istate?n.istate.inflateSetDictionary(n,i,t):e},read_byte:function(i){return this.next_in.subarray(i,i+1)[0]},read_buf:function(i,e){return this.next_in.subarray(i,i+e)}},i.zip?i.zip.Inflater=y:(c=new y,i.addEventListener("message",(function(e){var t=e.data;t.append&&i.postMessage({onappend:!0,data:c.append(t.data,(function(e){i.postMessage({progress:!0,current:e})}))}),t.flush&&(c.flush(),i.postMessage({onflush:!0}))}),!1))}(this);