m:t:C;varG=0;varO=1===K?e[0].c*e[0].l:u*f.O;for(varS,T;G<O;){varU=b?Math.min(O-G,b):O;for(F=0;F<K;F++)e[F].m=0;A=0;if(1===K){vary=e[0];for(I=0;I<U;I++)R(y,64*((y.c+1)*(G/y.c|0)+G%y.c)),G++}elsefor(I=0;I<U;I++){for(F=0;F<K;F++)for(y=e[F],S=y.h,T=y.j,L=0;L<T;L++)for(M=0;M<S;M++)R(y,64*((y.c+1)*((G/u|0)*y.j+L)+(G%u*y.h+M)));G++}x=0;(y=N(a,d))&&y.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+y.f),d=y.offset);y=y&&y.F;if(!y||65280>=y)thrownewD("marker was not found");
if(65488<=y&&65495>=y)d+=2;elsebreak}(y=N(a,d))&&y.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+y.f),d=y.offset);returnd-v}functionY(a,d){for(varf=d.c,e=d.l,b=newInt16Array(64),B=0;B<e;B++)for(vark=0;k<f;k++){varl=64*((d.c+1)*B+k),r=b,n=d.G,q=d.a;if(!n)thrownewD("missing required Quantization Table.");for(varh=0;64>h;h+=8){varc=q[l+h];varC=q[l+h+1];varw=q[l+h+2];varp=q[l+h+3];varm=q[l+h+4];vart=q[l+h+5];varg=q[l+h+6];varu=q[l+h+7];c*=n[h];if(0===(C|
57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);g.prototype={parse:function(a){functiond(){vard=a[k]<<8|a[k+1];k+=2;returnd}functionf(){varb=d();b=k+b-2;varc=N(a,b,k);c&&c.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+c.f),b=c.offset);b=a.subarray(k,b);k+=b.length;returnb}functione(a){for(varb=Math.ceil(a.v/8/a.s),c=Math.ceil(a.g/8/a.u),d=0;d<a.b.length;d++){v=a.b[d];vare=Math.ceil(Math.ceil(a.v/8)*v.h/a.s),f=Math.ceil(Math.ceil(a.g/
8)*v.j/a.u);v.a=newInt16Array(64*c*v.j*(b*v.h+1));v.c=e;v.l=f}a.P=b;a.O=c}varb=(1<arguments.length&&void0!==arguments[1]?arguments[1]:{}).N,B=void0===b?null:b,k=0,l=null,r=0;b=[];varn=[],q=[],h=d();if(65496!==h)thrownewD("SOI not found");for(h=d();65497!==h;){switch(h){case65504:case65505:case65506:case65507:case65508:case65509:case65510:case65511:case65512:case65513:case65514:case65515:case65516:case65517:case65518:case65519:case65534:varc=f();65518===h&&65===c[0]&&100===
c[1]&&111===c[2]&&98===c[3]&&101===c[4]&&(l={version:c[5]<<8|c[6],Y:c[7]<<8|c[8],Z:c[9]<<8|c[10],W:c[11]});break;case65499:h=d()+k-2;for(varg;k<h;){varw=a[k++],p=newUint16Array(64);if(0===w>>4)for(c=0;64>c;c++)g=J[c],p[g]=a[k++];elseif(1===w>>4)for(c=0;64>c;c++)g=J[c],p[g]=d();elsethrownewD("DQT - invalid table spec");b[w&15]=p}break;case65472:case65473:case65474:if(m)thrownewD("Only single frame JPEGs supported");d();varm={};m.X=65473===h;m.S=65474===h;m.precision=a[k++];h=d();m.g=
p=a[k++];v.D=q[p>>4];v.o=n[p&15];g.push(v)}h=a[k++];w=a[k++];p=a[k++];try{varz=X(a,k,m,g,u,h,w,p>>4,p&15,c);k+=z}catch(x){if(xinstanceofP)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(a,{N:x.g});throwx;}break;case65500:k+=4;break;case65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&192<=a[k-2]&&254>=a[k-2])k-=3;elseif((c=N(a,k-2))&&c.f)(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+
f*(10.49593273432072*f+63.02378494754052*e+50.606957656360734*b-112.23884253719248)+e*(.03296041114873217*e+115.60384449646641*b-193.58209356861505)-b*(22.33816807309886*b+180.12613974708367);returna.subarray(0,g)},getData:function(a,d,f){if(4<this.i)thrownewD("Unsupported color mode");a=this.L(a,d);if(1===this.i&&f){f=a.length;d=newUint8ClampedArray(3*f);for(vare=0,b=0;b<f;b++){varg=a[b];d[e++]=g;d[e++]=g;d[e++]=g}returnd}if(3===this.i&&this.w())returnthis.I(a);if(4===this.i){if(this.w())returnf?