text: /*
  	pngtoy version 0.4.0 ALPHA
  
  	By Ken Nilsen / Epistemex (c) 2015
  	www.epistemex.com
  
  	MIT License (this header required)
  */
  function PngToy(b){b=b||{};this.doCRC=a(b.doCRC)?b.doCRC:!0;this.allowInvalid=a(b.allowInvalid)?b.allowInvalid:!1;this.url=null;this.buffer=null;this.view=null;this.chunks=null;this.debug={};function a(c){return typeof c==="boolean"}}PngToy.prototype={fetch:function(b){var a=this;a.url=b;a.buffer=a.chunks=a.view=null;a._pos=0;return new Promise(function(e,d){try{var f=new XMLHttpRequest();f.open("GET",b,!0);f.responseType="arraybuffer";f.onerror=function(g){d("Network error. "+g.message)};f.onload=function(){if(f.status===200){var h=new DataView(f.response),g;if(h.getUint32(0)===2303741511&&h.getUint32(4)===218765834){a.buffer=h.buffer;a.view=h;g=PngToy._getChunks(a.buffer,a.view,a.doCRC,a.allowInvalid);a.chunks=g.chunks||null;if(a.chunks||a.allowInvalid){e()}else{d(g.error)}}else{d("Not a PNG file.")}}else{d("Loading error:"+f.statusText)}};f.send()}catch(c){d(c.message)}})},get_IHDR:function(){return PngToy._IHDR(this)},get_IDAT:function(){return PngToy._IDAT(this)},get_PLTE:function(){return PngToy._PLTE(this)},get_sPLT:function(){return PngToy._sPLT(this)},get_tRNS:function(){return PngToy._tRNS(this)},get_iTXt:function(){return PngToy._iTXt(this)},get_tEXt:function(){return PngToy._tEXt(this)},get_zTXt:function(){return PngToy._zTXt(this)},get_iCCP:function(){return PngToy._iCCP(this)},get_gAMA:function(){return PngToy._gAMA(this)},get_cHRM:function(){return PngToy._cHRM(this)},get_sRGB:function(){return PngToy._sRGB(this)},get_hIST:function(){return PngToy._hIST(this)},get_sBIT:function(){return PngToy._sBIT(this)},get_pHYs:function(){return PngToy._pHYs(this)},get_bKGD:function(){return PngToy._bKGD(this)},get_tIME:function(){return PngToy._tIME(this)},get_IEND:function(){return !!PngToy._findChunk(this.chunks,"IEND")},get_oFFs:function(){return PngToy._oFFs(this)},get_sTER:function(){return PngToy._sTER(this)},get_sCAL:function(){return PngToy._sCAL(this)},get_pCAL:function(){return PngToy._pCAL(this)},toImage:function(){return new Promise(function(b,a){})},getGammaLUT:function(c,b,f){c=c||1;b=b||2.2;f=f||1;var a=new Uint8Array(256),e=0,d=1/(c*b*f);for(;e<256;e++){a[e]=(Math.pow(e/255,d)*255+0.5)|0}return a},guessDisplayGamma:function(){return(navigator.userAgent.indexOf("Mac OS")>-1)?1.8:2.2}};PngToy._blockSize=3000000;PngToy._delay=7;PngToy._getChunks=function(b,F,k,a){var x=this,C=8,v=b.byteLength,e=[],d,w,m,A,h,g,B,E,p,z,D,t=!0,y=["iTXT","tIME","tEXt","zTXt"],l=PngToy._findChunk;if(k&&!this.table){this.table=new Uint32Array(256);for(var q=0,u;q<256;q++){h=q>>>0;for(u=0;u<8;u++){h=(h&1)?3988292384^(h>>>1):h>>>1}this.table[q]=h}}while(C<v){w=o();m=n();if(w>2147483647&&!a){return{error:"Invalid chunk size."}}A=C;C=A+w;h=o();d=new PngToy.Chunk(m,A,w,h);if(k){c(d);if(!d.crcOk&&!a){return{error:"Invalid CRC in chunk "+m}}}if(d.isReserved&&!a){return{error:"Invalid chunk name: "+m}}e.push(d)}if(!a){if(!f("IHDR",1,1)){return{error:"Invalid number of IHDR chunks."}}if(!f("tIME",0,1)){return{error:"Invalid number of tIME chunks."}}if(!f("zTXt",0,-1)){return{error:"Invalid number of zTXt chunks."}}if(!f("tEXt",0,-1)){return{error:"Invalid number of tEXt chunks."}}if(!f("iTXt",0,-1)){return{error:"Invalid number of iTXt chunks."}}if(!f("pHYs",0,1)){return{error:"Invalid number of pHYs chunks."}}if(!f("sPLT",0,-1)){return{error:"Invalid number of sPLT chunks."}}if(!f("iCCP",0,1)){return{error:"Invalid number of iCCP chunks."}}if(!f("sRGB",0,1)){return{error:"Invalid number of sRGB chunks."}}if(!f("sBIT",0,1)){return{error:"Invalid number of sBIT chunks."}}if(!f("gAMA",0,1)){return{error:"Invalid number of gAMA chunks."}}if(!f("cHRM",0,1)){return{error:"Invalid number of cHRM chunks."}}if(!f("PLTE",0,1)){return{error:"Invalid number of PLTE chunks."}}if(!f("tRNS",0,1)){return{error:"Invalid number of tRNS chunks."}}if(!f("hIST",0,1)){return{error:"Invalid number of hIST chunks."}}if(!f("bKGD",0,1)){return{error:"Invalid number of bKGD chunks."}}if(!f("IDAT",1,-1)){return{error:"Invalid number of IDAT chunks."}}if(!f("IEND",1,1)){return{error:"Invalid number of IEND chunks."}}if(e[0].name!=="IHDR"||e[e.length-1].name!=="IEND"){return{error:"Invalid PNG chunk order."}}g=F.getUint8(l(e,"IHDR").offset+9);B=l(e,"PLTE");p=l(e,"hIST");E=l(e,"tRNS");z=l(e,"oFFs");D=l(e,"sTER");if(l(e,"iCCP")&&l(e,"sRGB")){return{error:"Both iCCP and sRGB cannot be present."}}if(g===3&&!B){return{error:"Missing PLTE chunk."}}if((g===0||g===4)&&B){return{error:"PLTE chunk should not appear with this color type."}}if((g===4||g===6)&&E){return{error:"tRNS chunk should not appear with this color type."}}if(p&&!B){return{error:"hIST chunk can only appear if a PLTE chunk is present."}}if(B){if(!r("PLTE","IDAT")){return{error:"Invalid chunk order for PLTE."}}if(p&&!s("PLTE","hIST","IDAT")){return{error:"Invalid chunk order for hIST."}}if(E&&!s("PLTE","tRNS","IDAT")){return{error:"Invalid chunk order for tRNS."}}if(l(e,"bKGD")&&!s("PLTE","bKGD","IDAT")){return{error:"Invalid chunk order for bKGD."}}if(!r("cHRM","PLTE")){return{error:"Invalid chunk order for cHRM."}}if(!r("gAMA","PLTE")){return{error:"Invalid chunk order for gAMA."}}if(!r("iCCP","PLTE")){return{error:"Invalid chunk order for iCCP."}}if(!r("sRGB","PLTE")){return{error:"Invalid chunk order for sRGB."}}}if(z&&!r("oFFs","IDAT")){return{error:"Invalid chunk order for oFFs."}}if(D&&!r("sTER","IDAT")){return{error:"Invalid chunk order for sTER."}}for(q=e.length-2;q>0;q--){if(t&&e[q].name!=="IDAT"&&y.indexOf(e[q].name)<0){t=!1}else{if(!t&&e[q].name==="IDAT"){return{error:"Invalid chunk inside IDAT chunk sequence."}}}}}return{chunks:e};function f(i,H,G){var j=PngToy._findChunks(e,i);return G<0?j.length>=H:j.length>=H&&j.length<=G}function s(j,G,i){return r(j,G)&&r(G,i)}function r(j,H){var G=-1,I=-1,J,K=e.length;for(J=0;J<K;J++){if(e[J].name===j){G=J}if(e[J].name===H){I=J}}return(G<I)}function c(j){var G=new Uint8Array(b,j.offset-4,j.length+4);j.crcOk=(j.crc===i(G));function i(H){var I=(-1>>>0),K=H.length,J;for(J=0;J<K;J++){I=(I>>>8)^x.table[(I^H[J])&255]}return(I^-1)>>>0}}function n(){var j=o(),i=String.fromCharCode;return i((j&4278190080)>>>24)+i((j&16711680)>>>16)+i((j&65280)>>>8)+i((j&255)>>>0)}function o(){var j=F.getUint32(C);C+=4;return j>>>0}};PngToy._getChunks.table=null;PngToy._findChunk=function(b,d){for(var c=0,a;a=b[c++];){if(a.name===d){return a}}return null};PngToy._findChunks=function(b,e){for(var c=0,d=[],a;a=b[c++];){if(a.name===e){d.push(a)}}return d};PngToy._getStr=function(j,e,d){var g="",c=e,a=-1,h,k=!1,b=String.fromCharCode,f=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"%&'()*+,-./:;<=>?_";d+=c;for(;c<d&&a;){a=j.getUint8(c++);if(a){h=b(a);if(f.indexOf(h)>-1){g+=h}else{k=!0}continue}break}return{offset:c,text:g,warning:k}};PngToy.Chunk=function(c,d,b,a){this.name=c;this.offset=d;this.length=b;this.crc=a;this.crcOk=!0;this.isCritical=!(c.charCodeAt(0)&32);this.isPrivate=!!(c.charCodeAt(1)&32);this.isReserved=!!(c.charCodeAt(2)&32);this.isCopySafe=!!(c.charCodeAt(3)&32)};PngToy._IHDR=function(d){var g=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"IHDR"),e,f;if(!b){return{error:"Critical - IHDR chunk is missing."}}e=b.offset;f={width:g.getUint32(e),height:g.getUint32(e+4),depth:g.getUint8(e+8),type:g.getUint8(e+9),compression:g.getUint8(e+10),filter:g.getUint8(e+11),interlaced:g.getUint8(e+12)};if(!a){if([0,2,3,4,6].indexOf(f.type)<0){return{error:"Invalid color type."}}switch(f.type){case 0:if([1,2,4,8,16].indexOf(f.depth)<0){return{error:"Invalid color depth."}}break;case 3:if([1,2,4,8].indexOf(f.depth)<0){return{error:"Invalid color depth."}}break;default:if([8,16].indexOf(f.depth)<0){return{error:"Invalid color depth."}}}if(!f.width||!f.height){return{error:"Invalid dimension."}}if(f.compression){return{error:"Invalid compression type."}}if(f.filter){return{error:"Invalid filter type."}}if(f.interlaced<0||f.interlaced>1){return{error:"Invalid interlace mode "+f.interlaced}}}return f};PngToy._IDAT=function(f){var b=f.buffer,d=f.chunks,a=f.allowInvalid,g=0,c,j,h=new pako.Inflate(),e=!1;for(;c=d[g++];){if(c.name==="IDAT"){e=!0;j=(d[g].name==="IEND");h.push(new Uint8Array(b,c.offset,c.length),j)}}if(!j&&!a){return{error:"Critical - missing IEND chunk."}}return e?(h.err?{error:h.msg}:{buffer:h.result}):(a?{buffer:null}:{error:"Critical - no IDAT chunk(s)."})};PngToy._PLTE=function(e){var b=e.buffer,d=e.chunks,a=e.allowInvalid,c=PngToy._findChunk(d,"PLTE"),f;if(!c){return null}f=new Uint8Array(b,c.offset,c.length);if(!a){if(f.length%3){return{error:"Invalid palette size."}}if(f.length<3||f.length>3*256){return{error:"Invalid number of palette entries."}}}return{palette:f,length:f.length/3}};PngToy._sPLT=function(d){var f=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunks(c,"sPLT"),e=[];if(!b.length){return null}b.forEach(function(h){var p={depth:null,name:null,palette:[],entries:0},m,o,l,q,g,n=[],k,j;o=h.offset;m=PngToy._getStr(f,o,80);p.name=m.text;o=m.offset;p.depth=f.getUint8(o++);q=p.depth===8?6:10;g=p.depth===8?1:2;l=h.length-(o-h.offset);j=q===6?f.getUint8.bind(f):f.getUint16.bind(f);for(k=0;k<l;k+=q){n.push(j(o+k),j(o+k+g),j(o+k+g*2),j(o+k+g*3),f.getUint16(o+k+g*4))}p.palette=n;p.entries=n.length/q;if(!a){if((p.depth===8&&l%6)||(p.depth===16&&l%10)){return{error:"Invalid sPLT chunk."}}}e.push(p)});return e};PngToy._tRNS=function(e){var b=e.buffer,d=e.chunks,a=e.allowInvalid,c=PngToy._findChunk(d,"tRNS"),g=PngToy._PLTE(e),f=PngToy._IHDR(e),h;if(!c){return null}if(!a){if(f.type===2&&(c.length%6)){return{error:"Invalid tRNS length."}}}switch(f.type){case 0:h={alphas:new Uint16Array(b.slice(c.offset,c.offset+c.length)),length:c.length>>1};break;case 2:h={alphas:new Uint16Array(b.slice(c.offset,c.offset+c.length)),length:c.length/6};break;case 3:h={alphas:new Uint8Array(b,c.offset,c.length),length:c.length};break;default:return a?{alphas:null,length:0}:{error:"tRNS chunk is not valid for this color type."}}if(!a&&g&&h.length>g.length){return{error:"tRNS chunk contains more entries than palette entries."}}return h};PngToy._hIST=function(e){var i=e.view,c=e.chunks,a=e.allowInvalid,b=PngToy._findChunk(c,"hIST"),g=PngToy._PLTE(e),d=[],h,f;if(!b){return null}if(!a&&b.length%2){return{error:"Invalid length of hIST chunk."}}h=b.offset;f=h+b.length;for(;h<f;h+=2){d.push(i.getUint16(h))}if(!a){if(d.length!==g.length){return{error:"hIST chunk must have same number of entries as PLTE chunk."}}}return{histogram:d}};PngToy._iTXt=function(d){var k=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunks(c,"iTXt"),h,j,g,e,l=!1,f=[];if(!b.length){return null}b.forEach(function(i){var n={};h=i.offset;g=PngToy._getStr(k,h,80);n.keyword=g.text;h=g.offset;if(g.warn){l=!0}n.hasCompression=k.getUint8(h);n.compression=k.getUint8(h+1);h+=2;g=PngToy._getStr(k,h,20);n.language=g.text.toLowerCase();h=g.offset;if(g.warn){l=!0}g=PngToy._getStr(k,h,80);n.keywordLang=g.text;h=g.offset;if(g.warn){l=!0}j=new Uint8Array(k.buffer,h,i.length-(h-i.offset));if(n.hasCompression===1){if(!a&&!n.compression){n={error:"Invalid compression type for iTXt."}}else{try{n.text=pako.inflate(j,{to:"string"})}catch(m){if(a){n.text=""}else{n={error:m}}}}}else{if(!n.hasCompression){g="";for(e=0;e<j.length;e++){g+=String.fromCharCode(j[e])}n.text=g}else{if(a){n.text=""}else{n={error:"Invalid compression flag."}}}}if(!a&&l){return{error:"One or more field contains illegal chars."}}f.push(n)});return f};PngToy._tEXt=function(d){var k=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunks(c,"tEXt"),l=!1,h,j,g,e,f=[];if(!b.length){return null}b.forEach(function(i){var m={};h=i.offset;g=PngToy._getStr(k,h,80);m.keyword=g.text;h=g.offset;if(g.warn){l=!0}j=new Uint8Array(k.buffer,h,i.length-(h-i.offset));g="";for(e=0;e<j.length;e++){g+=String.fromCharCode(j[e])}m.text=g;f.push(m);if(!a&&l){return{error:"One or more field contains illegal chars."}}});return f};PngToy._zTXt=function(d){var h=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunks(c,"zTXt"),i=!1,e=[],g,f;if(!b.length){return null}b.forEach(function(j){var l={};g=j.offset;f=PngToy._getStr(h,g,80);l.keyword=f.text;g=f.offset;if(f.warn){i=!0}if(h.getUint8(g++)&&!a){l={error:"Invalid compression type."}}else{try{l.text=pako.inflate(new Uint8Array(h.buffer,g,j.length-(g-j.offset)),{to:"string"})}catch(k){if(a){l.text=""}else{l={error:k}}}}if(!a&&i){return{error:"One or more field contains illegal chars."}}e.push(l)});return e};PngToy._iCCP=function(){var l=host.view,d=host.chunks,a=host.allowInvalid,c=PngToy._findChunk(d,"iCCP"),j,h,g,f,b,k={name:null,icc:null};if(!c){return null}j=c.offset;h=PngToy._getStr(l,j,80);g=h.text;j=h.offset;if(!a){for(f=0;f<g.length;f++){b=g.charCodeAt(f);if(!(b>31&&b<127)&&!(b>160&&b<256)){return{error:"ICC profile contains illegal chars in name."}}}}k.name=g;if(l.getUint8(j++)&&!a){return{error:"Invalid compression type."}}try{k.icc=pako.inflate(new Uint8Array(l.buffer,j,c.length-(j-c.offset)))}catch(e){if(!a){return{error:e}}}return k};PngToy._gAMA=function(e){var f=e.view,c=e.chunks,a=e.allowInvalid,b=PngToy._findChunk(c,"gAMA"),d;if(!b){return null}d=f.getUint32(b.offset)/100000;if(!a){}return{gamma:d}};PngToy._cHRM=function(d){var g=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"cHRM"),f,e;if(!b){return null}e=b.offset;f={whiteX:g.getUint32(e)/100000,whiteY:g.getUint32(e+4)/100000,redX:g.getUint32(e+8)/100000,redY:g.getUint32(e+12)/100000,greenX:g.getUint32(e+16)/100000,greenY:g.getUint32(e+20)/100000,blueX:g.getUint32(e+24)/100000,blueY:g.getUint32(e+28)/100000};if(!a){}return f};PngToy._sRGB=function(d){var g=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"sRGB"),e,f=["Perceptual","Relative colorimetric","Saturation","Absolute colorimetric"];if(!b){return null}e=g.getUint8(b.offset);if(!a){if(e<0||e>3){return{error:"Invalid range for sRGB render intent."}}}return{intent:e,desc:f[e]||null}};PngToy._pHYs=function(d){var g=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"pHYs"),e,f={};if(!b){return null}e=b.offset;f.ppuX=g.getUint32(e);f.ppuY=g.getUint32(e+4);f.unit=g.getUint8(e+8);if(f.unit===1){f.desc="Meters"}else{f.desc="ratio"}if(!a){if(f.ppuX>2147483647||f.ppuY>2147483647){return{error:"Invalid unit lengths."}}if(f.unit<0||f.unit>1){return{error:"Invalid unit for pHYs chunk."}}}else{f.ppuX&=2147483647;f.ppuY&=2147483647;f.unit&=1}return f};PngToy._bKGD=function(c){var e=c.view,b=c.chunks,a=PngToy._findChunk(b,"bKGD"),d=PngToy._IHDR(c);if(!a){return null}switch(d.type){case 0:case 4:return{background:[e.getUint16(a.offset)]};case 2:case 6:return{background:new Uint16Array(e.buffer,a.offset,6)};default:return{index:e.getUint8(a.offset)}}};PngToy._tIME=function(e){var h=e.view,c=e.chunks,a=e.allowInvalid,b=PngToy._findChunk(c,"tIME"),f,g;if(!b){return null}f=b.offset;g={year:h.getUint16(f),month:h.getUint8(f+2),day:h.getUint8(f+3),hour:h.getUint8(f+4),minute:h.getUint8(f+5),second:h.getUint8(f+6),date:null};if(!a){if(g.year<0||g.year>65535||g.month<1||g.month>12||g.day<1||g.day>31||g.hour<0||g.hour>23||g.minute<0||g.minute>59||g.second<0||g.second>60){return{error:"Invalid timestamp."}}}try{g.date=new Date(g.year,g.month-1,g.day,g.hour,g.minute,Math.min(59,g.second))}catch(d){if(!a){return{error:d}}}return g};PngToy._oFFs=function(d){var g=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"oFFs"),e,f={};if(!b){return null}e=b.offset;f.x=g.getInt32(e);f.y=g.getInt32(e+4);f.unit=g.getUint8(e+8);f.desc=["Pixels","Micrometers"][f.unit]||"Invalid";if(!a){if(f.unit<0||f.unit>1){return{error:"Invalid unit for oFFs chunk."}}}return f};PngToy._sCAL=function(d){var h=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"sCAL"),f,e,g={};if(!b.length){return null}f=b.offset;g.unit=h.getUint8(f++);g.desc=["meters","radians"][g.unit]||null;e=PngToy._getStr(h,f,100000);g.unitsX=e.text;f=e.offset;e=PngToy._getStr(h,f,b.length-(f-b.offset));g.unitsY=e.text;if(!a){if(g.unit<1||g.unit>2){return{error:"Invalid unit"}}}return g};PngToy._pCAL=function(d){var l=d.view,c=d.chunks,a=d.allowInvalid,b=PngToy._findChunk(c,"pCAL"),m=!1,j,g,k={},h=[],e=0,f;if(!b.length){return null}j=b.offset;g=PngToy._getStr(l,j,80);k.calName=g.text;j=g.offset;if(g.warn){m=!0}k.x0=l.getInt32(j);k.x1=l.getInt32(j+4);k.eqType=l.getUint8(j+8);k.eqDesc=["Linear mapping","Base-e exponential mapping","Arbitrary-base exponential mapping","Hyperbolic mapping"][k.eqType]||null;k.paramCount=l.getUint8(j+9);j+=10;g=PngToy._getStr(l,j,10000);k.unitName=g.text;j=g.offset;if(g.warn){m=!0}f=k.paramCount-1;for(;e<f;e++){g=PngToy._getStr(l,j,10000);h.push(g.text);j=g.offset;if(g.warn){m=!0}}g=PngToy._getStr(l,j,b.length-(j-b.offset));h.push(g.text);if(g.warn){m=!0}k.parameters=h;if(!a){if(k.x0===k.x1){return{error:"Invalid x0 or x1."}}if(h.length!==k.paramCount){return{error:"Mismatching parameter count and number of parameters."}}if(k.eqType<0||k.eqType>3){return{error:"Invalid equation type."}}if(m){return{error:"One or more text field contains illegal chars."}}}return k};PngToy.prototype.decode=function(){var a=this;return new Promise(function(R,Q){var D=a.get_IHDR(),aa=D.width,C=D.height,Z=D.type,n=D.depth,g=n/8,E=g===2,N=[1,0,3,1,2,0,4][Z],H=E?65535:255,m=N*g,G=aa*m,F=G+Math.ceil(m),T=a.get_IDAT().buffer,p=new Uint8Array(Math.max(1,Math.ceil(aa*m)*C)),A=[s,t,u,v,z],S=0,o=0,i=0,O=0,ac=0,P,f=T.byteLength,U=T.length,I=[0,4,0,2,0,1,0],J=[0,0,4,0,2,0,1],V=[8,8,4,4,2,2,1],W=[8,8,8,4,4,2,2],d=[8,4,4,2,2,1,1],c=[8,8,4,4,2,2,1],M,X,Y,K,e,b,ab;a.debug={pixelWidth:N,byteWidth:g,delta:m,lineLen:G,lineDlt:F,filters:[],preFilt:-1,postFilt:-1,srcPos:-1,srcLen:T.length,pass:0,x:-1,stepX:0,stepY:0,stepsX:0,stepsY:0};if(D.interlaced){M=ac=K=0;X=Y=e=b=8;setTimeout(l,PngToy._delay)}else{setTimeout(j,PngToy._delay)}function j(){try{var x,ae,y,ad=a.debug.filters,h=PngToy._blockSize;m=Math.ceil(m);while(ac<C&&h>0){y=T[S++];x=A[y];if(ad.indexOf(y)<0){ad.push(y)}ae=Math.min(f,S+G);i=o;while(S<ae){p[o]=x(T[S++],o-m,o-G,o-F)&H;o++}O=i;h-=G;ac++}(ac<C)?setTimeout(j,PngToy._delay):R(B())}catch(w){Q(w)}}function k(){try{var x,y,ae,h=PngToy._blockSize,ad=a.debug.filters,af,ak=(aa/X)|0,ah=(C/Y)|0,ai=ak*ah,ag=ak+1,aj=new Uint8Array(ai);ac=0;while(ac<ah){y=T[S++];if(ad.indexOf(y)<0){ad.push(y)}x=A[y];af=Math.min(f,Math.ceil(S+ag));i=ac*ag;O=Math.max(0,i-ag);ab=0;while(ab<ag){o=(i+ab*m)|0;ae=0;while(ae<N){P=x(T[S++],o-Math.ceil(m),o-ag,o-Math.ceil(F))&H;o++;ae++}ab+=m}h-=ag;ac++}if(ac<C){setTimeout(decodeI,PngToy._delay)}else{if(++M<7){ac=J[M];K=I[M];X=V[M];Y=W[M];e=d[M];b=c[M];setTimeout(decodeI,PngToy._delay)}else{R(B())}}}catch(w){Q(w)}}function l(){try{var af,ag,ak,w=PngToy._blockSize,ah=a.debug.filters,ap=(aa/X)|0,am=(C/Y)|0,an=ap*am,ao=new Uint8Array(an);while(ac<C){if(S>=U){ac=C;continue}ag=T[S++];if(ah.indexOf(ag)<0){ah.push(ag)}if(ag<0||ag>4){a.debug.preFilt=T[S-2];a.debug.postFilt=T[S];a.debug.srcPos=S;a.debug.pass=M;a.debug.x=ab;a.debug.stepX=X;a.debug.stepY=Y;a.debug.stepsX=aa/X;a.debug.stepsY=C/Y}af=A[ag];lineEnd=Math.min(f,Math.ceil(S+G));i=ac*G;O=Math.max(0,i-G);ab=K;while(ab<G){o=(i+ab*m)|0;ak=0;while(ak<N){P=af(T[S++],o-Math.ceil(m),o-G,o-Math.ceil(F))&H;for(var aj=0,h=Math.min(b,C-ac);aj<h;aj++){for(var ai=0,al=aj*G,x=Math.min(e,aa-ab);ai<x;ai++){p[o+al+ai*m]=P}}o++;ak++}ab+=X*m}w-=G;ac+=Y}if(ac<C){setTimeout(l,PngToy._delay)}else{if(++M<7){ac=J[M];K=I[M];X=V[M];Y=W[M];e=d[M];b=c[M];setTimeout(l,PngToy._delay)}else{R(B())}}function y(aq){return aq<i?0:ao[aq]>>>0}function ad(aq){return aq<O?0:ao[aq]>>>0}}catch(ae){Q(ae)}}function B(){return{bitmap:E?new Uint16Array(p.buffer):new Uint8Array(p.buffer),width:aa,height:C,byteWidth:g,pixelWidth:N,depth:D.depth,type:D.type}}function q(h){return h<i?0:p[h]>>>0}function r(h){return h<O?0:p[h]>>>0}function s(h){return h}function t(w,h){return w+q(h)}function u(x,h,w){return x+r(w)}function v(x,h,w){return x+((q(h)+r(w))>>>1)}function z(y,h,w,x){return y+L(q(h),r(w),r(x))}function L(h,w,x){var y=h+w-x,ad=Math.abs(y-h),ae=Math.abs(y-w),af=Math.abs(y-x);if(ad<=ae&&ad<=af){return h}if(ae<=af){return w}return x}})};PngToy.prototype.convertToRGBA=function(a,c){var b=this;c=c||{};return new Promise(function(O,N){if(a.type===6&&a.depth===8&&!c.useGamma){var R=c.ignoreAspectRatio?null:b.get_pHYs(),L=R?R.ppuY/(R.ppuX||1):1,M=R?R.ppuX/(R.ppuY||1):1;if(c.ignoreAspectRatio||(!c.ignoreAspectRatio&&L===1&&M===1)){O({bitmap:a.bitmap,width:a.width,height:a.height,ratioX:L,ratioY:M})}return}var J,S,H,k,G,d,U=a.width,D=a.height,T=a.type,g=a.depth,e=g/8,I=[1,0,3,1,2,0,4][T],l=p(T,g),Q=a.bitmap,j=new Uint8Array(U*D*4),P=0,i=0,E=Q.byteLength,K,F;if(a.type===3){J=b.get_PLTE();G=J?J.palette:[]}S=b.get_tRNS();d=S&&S.alphas?S.alphas:[];H=b.get_pHYs();k=b.get_gAMA();k=k?k.gamma:1;(function f(){var h=PngToy._blockSize,V=U*e*I,w=P+V;if(c.useGamma){F=F?F:b.getGammaLUT(k,c.gamma||1);while(P<E&&h>0){if(P>=w){P=Math.ceil(P);w=P+V}K=l();j[i++]=F[K[0]];j[i++]=F[K[1]];j[i++]=F[K[2]];j[i++]=K[3];h--}}else{while(P<E&&h>0){if(P>=w){P=Math.ceil(P);w=P+V}K=l();j[i++]=K[0];j[i++]=K[1];j[i++]=K[2];j[i++]=K[3];h--}}if(P<E){setTimeout(f,PngToy._delay)}else{O({bitmap:j,width:U,height:D,ratioX:H?H.ppuY/(H.ppuX||1):1,ratioY:H?H.ppuX/(H.ppuY||1):1})}})();function r(){var w=Q[P|0],V=(P-(P|0))/e,W=(w&(128>>V))?255:0,h=d.length?((d[0]>>>8)&(128>>V)===W?0:255):255;P+=e;return[W,W,W,h]}function t(){var w=Q[P|0],V=((P-(P|0))/e)<<1,W=(((w>>>V)&3)*85)&255,h=d.length?((((d[0]>>>8)&3)*85)&255===W?0:255):255;P+=e;return[W,W,W,h]}function u(){var w=Q[P|0],V=((P-(P|0))/e),W=V?(w&15)<<4:w&240,h=d.length?(((d[0]&3840)>>>4)===W?0:255):255;P+=e;return[W,W,W,h]}function m(){var h=Q[P|0],w=(P-(P|0))/e,V=(h&(128>>>w))?1:0,W=V*3;P+=e;return[G[W],G[W+1],G[W+2],255]}function n(){var w=Q[P|0],V=((P-(P|0))/e)<<1,W=((w<<V)&192)>>>6,X=W*3,h=W<d.length?d[W]:255;P+=e;return[G[X],G[X+1],G[X+2],h]}function o(){var w=Q[P|0],V=((P-(P|0))/e),W=V?w&15:(w&240)>>>4,X=W*3,h=W<d.length?d[W]:255;P+=e;return[G[X],G[X+1],G[X+2],h]}function q(){var w=Q[P++],h=d.length&&w===(d[0]>>>8)?0:255;w&=255;return[w,w,w,h]}function s(){var w=Q[P++],h=d.length&&d[0]===w?0:255;w&=255;return[w,w,w,h]}function z(){var Z=Q[P++],Y=Q[P++],X=Q[P++],W,V,w,h=255;if(d.length){W=d[0]>>>8;V=d[1]>>>8;w=d[2]>>>8;if(W===Z&&V===Y&&w===X){h=0}}return[Z&255,Y&255,X&255,h]}function B(){return[Q[P++],Q[P++],Q[P++],Q[P++]]}function A(){var W=Q[P++],V=Q[P++],w=Q[P++],h=d.length&&d[0]===W&&d[1]===V&&d[2]===w?0:255;return[W&255,V&255,w&255,h]}function v(){var h=Q[P++];return[h,h,h,Q[P++]]}function x(){var h=Q[P++]&255;return[h,h,h,Q[P++]&255]}function y(){var w=Q[P++],h=w*3;return[G[h],G[h+1],G[h+2],w<d.length?d[w]:255]}function C(){return[Q[P++]&255,Q[P++]&255,Q[P++]&255,Q[P++]&255]}function p(w,h){if(h===16){return[s,0,A,y,x,0,C][w]}else{if(h<8){switch(h){case 1:return w?m:r;case 2:return w?n:t;case 4:return w?o:u}}else{return[q,0,z,y,v,0,B][w]}}}})};PngToy.prototype.convertToCanvas=function(a,c){var b=this;c=c||{};return new Promise(function(e,d){b.convertToRGBA(a,c).then(function(f){try{var g=document.createElement("canvas"),i=g.getContext("2d");g.width=f.width;g.height=f.height;var l=i.createImageData(f.width,f.height);l.data.set(f.bitmap);i.putImageData(l,0,0);if((f.ratioY!==1||f.ratioX!==1)&&!c.ignoreAspectRatio){var m=document.createElement("canvas"),n=m.getContext("2d"),o,k;if(f.ratioY>=1){o=g.width;k=(g.height*f.ratioY)|0}else{if(f.ratioY<1){o=(g.width*f.ratioX)|0;k=g.height}}m.width=o;m.height=k;n.drawImage(g,0,0,o,k);g=m}e(g)}catch(j){d(j)}},d)})};(function(a){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=a()}else{if(typeof define==="function"&&define.amd){define([],a)}else{var b;if(typeof window!=="undefined"){b=window}else{if(typeof global!=="undefined"){b=global}else{if(typeof self!=="undefined"){b=self}else{b=this}}}b.pako=a()}}})(function(){var a,d,c;return(function b(k,f,h){function j(p,q){if(!f[p]){if(!k[p]){var i=typeof require=="function"&&require;if(!q&&i){return i(p,!0)}if(e){return e(p,!0)}var m=new Error("Cannot find module '"+p+"'");throw m.code="MODULE_NOT_FOUND",m}var n=f[p]={exports:{}};k[p][0].call(n.exports,function(l){var o=k[p][1][l];return j(o?o:l)},n,n.exports,b,k,f,h)}return f[p].exports}var e=typeof require=="function"&&require;for(var g=0;g<h.length;g++){j(h[g])}return j})({1:[function(i,h,e){var j=(typeof Uint8Array!=="undefined")&&(typeof Uint16Array!=="undefined")&&(typeof Int32Array!=="undefined");e.assign=function(k){var n=Array.prototype.slice.call(arguments,1);while(n.length){var m=n.shift();if(!m){continue}if(typeof(m)!=="object"){throw new TypeError(m+"must be non-object")}for(var l in m){if(m.hasOwnProperty(l)){k[l]=m[l]}}}return k};e.shrinkBuf=function(k,l){if(k.length===l){return k}if(k.subarray){return k.subarray(0,l)}k.length=l;return k};var f={arraySet:function(k,o,p,n,l){if(o.subarray&&k.subarray){k.set(o.subarray(p,p+n),l);return}for(var m=0;m<n;m++){k[l+m]=o[p+m]}},flattenChunks:function(m){var n,o,p,q,k,r;p=0;for(n=0,o=m.length;n<o;n++){p+=m[n].length}r=new Uint8Array(p);q=0;for(n=0,o=m.length;n<o;n++){k=m[n];r.set(k,q);q+=k.length}return r}};var g={arraySet:function(k,o,p,n,l){for(var m=0;m<n;m++){k[l+m]=o[p+m]}},flattenChunks:function(k){return[].concat.apply([],k)}};e.setTyped=function(k){if(k){e.Buf8=Uint8Array;e.Buf16=Uint16Array;e.Buf32=Int32Array;e.assign(e,f)}else{e.Buf8=Array;e.Buf16=Array;e.Buf32=Array;e.assign(e,g)}};e.setTyped(j)},{}],2:[function(l,k,h){var o=l("./common");var m=!0;var n=!0;try{String.fromCharCode.apply(null,[0])}catch(e){m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){n=!1}var f=new o.Buf8(256);for(var j=0;j<256;j++){f[j]=(j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1)}f[254]=f[254]=1;h.string2buf=function(v){var p,r,s,u,t,w=v.length,q=0;for(u=0;u<w;u++){r=v.charCodeAt(u);if((r&64512)===55296&&(u+1<w)){s=v.charCodeAt(u+1);if((s&64512)===56320){r=65536+((r-55296)<<10)+(s-56320);u++}}q+=r<128?1:r<2048?2:r<65536?3:4}p=new o.Buf8(q);for(t=0,u=0;t<q;u++){r=v.charCodeAt(u);if((r&64512)===55296&&(u+1<w)){s=v.charCodeAt(u+1);if((s&64512)===56320){r=65536+((r-55296)<<10)+(s-56320);u++}}if(r<128){p[t++]=r}else{if(r<2048){p[t++]=192|(r>>>6);p[t++]=128|(r&63)}else{if(r<65536){p[t++]=224|(r>>>12);p[t++]=128|(r>>>6&63);p[t++]=128|(r&63)}else{p[t++]=240|(r>>>18);p[t++]=128|(r>>>12&63);p[t++]=128|(r>>>6&63);p[t++]=128|(r&63)}}}}return p};function g(p,r){if(r<65537){if((p.subarray&&n)||(!p.subarray&&m)){return String.fromCharCode.apply(null,o.shrinkBuf(p,r))}}var s="";for(var q=0;q<r;q++){s+=String.fromCharCode(p[q])}return s}h.buf2binstring=function(i){return g(i,i.length)};h.binstring2buf=function(s){var p=new o.Buf8(s.length);for(var q=0,r=p.length;q<r;q++){p[q]=s.charCodeAt(q)}return p};h.buf2string=function(p,u){var s,v,q,r;var t=u||p.length;var w=new Array(t*2);for(v=0,s=0;s<t;){q=p[s++];if(q<128){w[v++]=q;continue}r=f[q];if(r>4){w[v++]=65533;s+=r-1;continue}q&=r===2?31:r===3?15:7;while(r>1&&s<t){q=(q<<6)|(p[s++]&63);r--}if(r>1){w[v++]=65533;continue}if(q<65536){w[v++]=q}else{q-=65536;w[v++]=55296|((q>>10)&1023);w[v++]=56320|(q&1023)}}return g(w,v)};h.utf8border=function(i,p){var q;p=p||i.length;if(p>i.length){p=i.length}q=p-1;while(q>=0&&(i[q]&192)===128){q--}if(q<0){return p}if(q===0){return p}return(q+f[i[q]]>p)?q:p}},{"./common":1}],3:[function(h,g,f){function e(i,j,k,m){var o=(i&65535)|0,p=((i>>>16)&65535)|0,l=0;while(k!==0){l=k>2000?2000:k;k-=l;do{o=(o+j[m++])|0;p=(p+o)|0}while(--l);o%=65521;p%=65521}return(o|(p<<16))|0}g.exports=e},{}],4:[function(g,f,e){f.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}},{}],5:[function(j,i,g){function h(){var l,p=[];for(var o=0;o<256;o++){l=o;for(var m=0;m<8;m++){l=((l&1)?(3988292384^(l>>>1)):(l>>>1))}p[o]=l}return p}var f=h();function e(l,k,o,p){var q=f,m=p+o;l=l^(-1);for(var n=p;n<m;n++){l=(l>>>8)^q[(l^k[n])&255]}return(l^(-1))}i.exports=e},{}],6:[function(h,g,e){function f(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=!1}g.exports=f},{}],7:[function(i,h,f){var e=30;var j=12;h.exports=function g(G,E){var F;var k;var y;var l;var m;var s;var r;var K;var H;var J;var I;var w;var n;var z;var o;var B;var q;var v;var C;var A;var p;var t;var u;var x,D;F=G.state;k=G.next_in;x=G.input;y=k+(G.avail_in-5);l=G.next_out;D=G.output;m=l-(E-G.avail_out);s=l+(G.avail_out-257);r=F.dmax;K=F.wsize;H=F.whave;J=F.wnext;I=F.window;w=F.hold;n=F.bits;z=F.lencode;o=F.distcode;B=(1<<F.lenbits)-1;q=(1<<F.distbits)-1;top:do{if(n<15){w+=x[k++]<<n;n+=8;w+=x[k++]<<n;n+=8}v=z[w&B];dolen:for(;;){C=v>>>24;w>>>=C;n-=C;C=(v>>>16)&255;if(C===0){D[l++]=v&65535}else{if(C&16){A=v&65535;C&=15;if(C){if(n<C){w+=x[k++]<<n;n+=8}A+=w&((1<<C)-1);w>>>=C;n-=C}if(n<15){w+=x[k++]<<n;n+=8;w+=x[k++]<<n;n+=8}v=o[w&q];dodist:for(;;){C=v>>>24;w>>>=C;n-=C;C=(v>>>16)&255;if(C&16){p=v&65535;C&=15;if(n<C){w+=x[k++]<<n;n+=8;if(n<C){w+=x[k++]<<n;n+=8}}p+=w&((1<<C)-1);if(p>r){G.msg="invalid distance too far back";F.mode=e;break top}w>>>=C;n-=C;C=l-m;if(p>C){C=p-C;if(C>H){if(F.sane){G.msg="invalid distance too far back";F.mode=e;break top}}t=0;u=I;if(J===0){t+=K-C;if(C<A){A-=C;do{D[l++]=I[t++]}while(--C);t=l-p;u=D}}else{if(J<C){t+=K+J-C;C-=J;if(C<A){A-=C;do{D[l++]=I[t++]}while(--C);t=0;if(J<A){C=J;A-=C;do{D[l++]=I[t++]}while(--C);t=l-p;u=D}}}else{t+=J-C;if(C<A){A-=C;do{D[l++]=I[t++]}while(--C);t=l-p;u=D}}}while(A>2){D[l++]=u[t++];D[l++]=u[t++];D[l++]=u[t++];A-=3}if(A){D[l++]=u[t++];if(A>1){D[l++]=u[t++]}}}else{t=l-p;do{D[l++]=D[t++];D[l++]=D[t++];D[l++]=D[t++];A-=3}while(A>2);if(A){D[l++]=D[t++];if(A>1){D[l++]=D[t++]}}}}else{if((C&64)===0){v=o[(v&65535)+(w&((1<<C)-1))];continue dodist}else{G.msg="invalid distance code";F.mode=e;break top}}break}}else{if((C&64)===0){v=z[(v&65535)+(w&((1<<C)-1))];continue dolen}else{if(C&32){F.mode=j;break top}else{G.msg="invalid literal/length code";F.mode=e;break top}}}}break}}while(k<y&&l<s);A=n>>3;k-=A;n-=A<<3;w&=(1<<n)-1;G.next_in=k;G.next_out=l;G.avail_in=(k<y?5+(y-k):5-(k-y));G.avail_out=(l<s?257+(s-l):257-(l-s));F.hold=w;F.bits=n;return}},{}],8:[function(ad,aa,y){var al=ad("../utils/common");var e=ad("./adler32");var m=ad("./crc32");var F=ad("./inffast");var G=ad("./inftrees");var i=0;var V=1;var t=2;var ar=4;var an=5;var ay=6;var av=0;var aw=1;var au=2;var ax=-2;var ap=-3;var at=-4;var ao=-5;var aq=8;var D=1;var B=2;var ah=3;var ac=4;var x=5;var z=6;var ab=7;var j=8;var C=9;var p=10;var o=11;var ai=12;var aj=13;var ae=14;var l=15;var k=16;var ag=17;var U=18;var h=19;var Q=20;var P=21;var R=22;var q=23;var r=24;var X=25;var W=26;var g=27;var T=28;var u=29;var f=30;var Z=31;var af=32;var w=852;var v=592;var Y=15;var n=Y;function az(aA){return(((aA>>>24)&255)+((aA>>>8)&65280)+((aA&65280)<<8)+((aA&255)<<24))}function O(){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 al.Buf16(320);this.work=new al.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function N(aB){var aA;if(!aB||!aB.state){return ax}aA=aB.state;aB.total_in=aB.total_out=aA.total=0;aB.msg="";if(aA.wrap){aB.adler=aA.wrap&1}aA.mode=D;aA.last=0;aA.havedict=0;aA.dmax=32768;aA.head=null;aA.hold=0;aA.bits=0;aA.lencode=aA.lendyn=new al.Buf32(w);aA.distcode=aA.distdyn=new al.Buf32(v);aA.sane=1;aA.back=-1;return av}function L(aB){var aA;if(!aB||!aB.state){return ax}aA=aB.state;aA.wsize=0;aA.whave=0;aA.wnext=0;return N(aB)}function M(aB,aC){var aD;var aA;if(!aB||!aB.state){return ax}aA=aB.state;if(aC<0){aD=0;aC=-aC}else{aD=(aC>>4)+1;if(aC<48){aC&=15}}if(aC&&(aC<8||aC>15)){return ax}if(aA.window!==null&&aA.wbits!==aC){aA.window=null}aA.wrap=aD;aA.wbits=aC;return L(aB)}function K(aC,aD){var aA;var aB;if(!aC){return ax}aB=new O();aC.state=aB;aB.window=null;aA=M(aC,aD);if(aA!==av){aC.state=null}return aA}function J(aA){return K(aA,n)}var am=!0;var S,s;function A(aA){if(am){var aB;S=new al.Buf32(512);s=new al.Buf32(32);aB=0;while(aB<144){aA.lens[aB++]=8}while(aB<256){aA.lens[aB++]=9}while(aB<280){aA.lens[aB++]=7}while(aB<288){aA.lens[aB++]=8}G(V,aA.lens,0,288,S,0,aA.work,{bits:9});aB=0;while(aB<32){aA.lens[aB++]=5}G(t,aA.lens,0,32,s,0,aA.work,{bits:5});am=!1}aA.lencode=S;aA.lenbits=9;aA.distcode=s;aA.distbits=5}function ak(aF,aD,aC,aA){var aB;var aE=aF.state;if(aE.window===null){aE.wsize=1<<aE.wbits;aE.wnext=0;aE.whave=0;aE.window=new al.Buf8(aE.wsize)}if(aA>=aE.wsize){al.arraySet(aE.window,aD,aC-aE.wsize,aE.wsize,0);aE.wnext=0;aE.whave=aE.wsize}else{aB=aE.wsize-aE.wnext;if(aB>aA){aB=aA}al.arraySet(aE.window,aD,aC-aA,aB,aE.wnext);aA-=aB;if(aA){al.arraySet(aE.window,aD,aC-aA,aA,0);aE.wnext=aA;aE.whave=aE.wsize}else{aE.wnext+=aB;if(aE.wnext===aE.wsize){aE.wnext=0}if(aE.whave<aE.wsize){aE.whave+=aB}}}return 0}function E(a2,aE){var a1;var aO,aY;var aV;var aZ;var aH,aS;var aN;var aC;var aA,aB;var aD;var aF;var aG;var aJ=0;var aK,aL,aM;var aP,aQ,aR;var aT;var a0;var aI=new al.Buf8(4);var aW;var aU;var aX=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a2||!a2.state||!a2.output||(!a2.input&&a2.avail_in!==0)){return ax}a1=a2.state;if(a1.mode===ai){a1.mode=aj}aZ=a2.next_out;aY=a2.output;aS=a2.avail_out;aV=a2.next_in;aO=a2.input;aH=a2.avail_in;aN=a1.hold;aC=a1.bits;aA=aH;aB=aS;a0=av;inf_leave:for(;;){switch(a1.mode){case D:if(a1.wrap===0){a1.mode=aj;break}while(aC<16){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if((a1.wrap&2)&&aN===35615){a1.check=0;aI[0]=aN&255;aI[1]=(aN>>>8)&255;a1.check=m(a1.check,aI,2,0);aN=0;aC=0;a1.mode=B;break}a1.flags=0;if(a1.head){a1.head.done=!1}if(!(a1.wrap&1)||(((aN&255)<<8)+(aN>>8))%31){a2.msg="incorrect header check";a1.mode=f;break}if((aN&15)!==aq){a2.msg="unknown compression method";a1.mode=f;break}aN>>>=4;aC-=4;aT=(aN&15)+8;if(a1.wbits===0){a1.wbits=aT}else{if(aT>a1.wbits){a2.msg="invalid window size";a1.mode=f;break}}a1.dmax=1<<aT;a2.adler=a1.check=1;a1.mode=aN&512?p:ai;aN=0;aC=0;break;case B:while(aC<16){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.flags=aN;if((a1.flags&255)!==aq){a2.msg="unknown compression method";a1.mode=f;break}if(a1.flags&57344){a2.msg="unknown header flags set";a1.mode=f;break}if(a1.head){a1.head.text=((aN>>8)&1)}if(a1.flags&512){aI[0]=aN&255;aI[1]=(aN>>>8)&255;a1.check=m(a1.check,aI,2,0)}aN=0;aC=0;a1.mode=ah;case ah:while(aC<32){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(a1.head){a1.head.time=aN}if(a1.flags&512){aI[0]=aN&255;aI[1]=(aN>>>8)&255;aI[2]=(aN>>>16)&255;aI[3]=(aN>>>24)&255;a1.check=m(a1.check,aI,4,0)}aN=0;aC=0;a1.mode=ac;case ac:while(aC<16){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(a1.head){a1.head.xflags=(aN&255);a1.head.os=(aN>>8)}if(a1.flags&512){aI[0]=aN&255;aI[1]=(aN>>>8)&255;a1.check=m(a1.check,aI,2,0)}aN=0;aC=0;a1.mode=x;case x:if(a1.flags&1024){while(aC<16){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.length=aN;if(a1.head){a1.head.extra_len=aN}if(a1.flags&512){aI[0]=aN&255;aI[1]=(aN>>>8)&255;a1.check=m(a1.check,aI,2,0)}aN=0;aC=0}else{if(a1.head){a1.head.extra=null}}a1.mode=z;case z:if(a1.flags&1024){aD=a1.length;if(aD>aH){aD=aH}if(aD){if(a1.head){aT=a1.head.extra_len-a1.length;if(!a1.head.extra){a1.head.extra=new Array(a1.head.extra_len)}al.arraySet(a1.head.extra,aO,aV,aD,aT)}if(a1.flags&512){a1.check=m(a1.check,aO,aD,aV)}aH-=aD;aV+=aD;a1.length-=aD}if(a1.length){break inf_leave}}a1.length=0;a1.mode=ab;case ab:if(a1.flags&2048){if(aH===0){break inf_leave}aD=0;do{aT=aO[aV+aD++];if(a1.head&&aT&&(a1.length<65536)){a1.head.name+=String.fromCharCode(aT)}}while(aT&&aD<aH);if(a1.flags&512){a1.check=m(a1.check,aO,aD,aV)}aH-=aD;aV+=aD;if(aT){break inf_leave}}else{if(a1.head){a1.head.name=null}}a1.length=0;a1.mode=j;case j:if(a1.flags&4096){if(aH===0){break inf_leave}aD=0;do{aT=aO[aV+aD++];if(a1.head&&aT&&(a1.length<65536)){a1.head.comment+=String.fromCharCode(aT)}}while(aT&&aD<aH);if(a1.flags&512){a1.check=m(a1.check,aO,aD,aV)}aH-=aD;aV+=aD;if(aT){break inf_leave}}else{if(a1.head){a1.head.comment=null}}a1.mode=C;case C:if(a1.flags&512){while(aC<16){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(aN!==(a1.check&65535)){a2.msg="header crc mismatch";a1.mode=f;break}aN=0;aC=0}if(a1.head){a1.head.hcrc=((a1.flags>>9)&1);a1.head.done=!0}a2.adler=a1.check=0;a1.mode=ai;break;case p:while(aC<32){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a2.adler=a1.check=az(aN);aN=0;aC=0;a1.mode=o;case o:if(a1.havedict===0){a2.next_out=aZ;a2.avail_out=aS;a2.next_in=aV;a2.avail_in=aH;a1.hold=aN;a1.bits=aC;return au}a2.adler=a1.check=1;a1.mode=ai;case ai:if(aE===an||aE===ay){break inf_leave}case aj:if(a1.last){aN>>>=aC&7;aC-=aC&7;a1.mode=g;break}while(aC<3){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.last=(aN&1);aN>>>=1;aC-=1;switch((aN&3)){case 0:a1.mode=ae;break;case 1:A(a1);a1.mode=Q;if(aE===ay){aN>>>=2;aC-=2;break inf_leave}break;case 2:a1.mode=ag;break;case 3:a2.msg="invalid block type";a1.mode=f}aN>>>=2;aC-=2;break;case ae:aN>>>=aC&7;aC-=aC&7;while(aC<32){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if((aN&65535)!==((aN>>>16)^65535)){a2.msg="invalid stored block lengths";a1.mode=f;break}a1.length=aN&65535;aN=0;aC=0;a1.mode=l;if(aE===ay){break inf_leave}case l:a1.mode=k;case k:aD=a1.length;if(aD){if(aD>aH){aD=aH}if(aD>aS){aD=aS}if(aD===0){break inf_leave}al.arraySet(aY,aO,aV,aD,aZ);aH-=aD;aV+=aD;aS-=aD;aZ+=aD;a1.length-=aD;break}a1.mode=ai;break;case ag:while(aC<14){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.nlen=(aN&31)+257;aN>>>=5;aC-=5;a1.ndist=(aN&31)+1;aN>>>=5;aC-=5;a1.ncode=(aN&15)+4;aN>>>=4;aC-=4;if(a1.nlen>286||a1.ndist>30){a2.msg="too many length or distance symbols";a1.mode=f;break}a1.have=0;a1.mode=U;case U:while(a1.have<a1.ncode){while(aC<3){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.lens[aX[a1.have++]]=(aN&7);aN>>>=3;aC-=3}while(a1.have<19){a1.lens[aX[a1.have++]]=0}a1.lencode=a1.lendyn;a1.lenbits=7;aW={bits:a1.lenbits};a0=G(i,a1.lens,0,19,a1.lencode,0,a1.work,aW);a1.lenbits=aW.bits;if(a0){a2.msg="invalid code lengths set";a1.mode=f;break}a1.have=0;a1.mode=h;case h:while(a1.have<a1.nlen+a1.ndist){for(;;){aJ=a1.lencode[aN&((1<<a1.lenbits)-1)];aK=aJ>>>24;aL=(aJ>>>16)&255;aM=aJ&65535;if((aK)<=aC){break}if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(aM<16){aN>>>=aK;aC-=aK;a1.lens[a1.have++]=aM}else{if(aM===16){aU=aK+2;while(aC<aU){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}aN>>>=aK;aC-=aK;if(a1.have===0){a2.msg="invalid bit length repeat";a1.mode=f;break}aT=a1.lens[a1.have-1];aD=3+(aN&3);aN>>>=2;aC-=2}else{if(aM===17){aU=aK+3;while(aC<aU){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}aN>>>=aK;aC-=aK;aT=0;aD=3+(aN&7);aN>>>=3;aC-=3}else{aU=aK+7;while(aC<aU){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}aN>>>=aK;aC-=aK;aT=0;aD=11+(aN&127);aN>>>=7;aC-=7}}if(a1.have+aD>a1.nlen+a1.ndist){a2.msg="invalid bit length repeat";a1.mode=f;break}while(aD--){a1.lens[a1.have++]=aT}}}if(a1.mode===f){break}if(a1.lens[256]===0){a2.msg="invalid code -- missing end-of-block";a1.mode=f;break}a1.lenbits=9;aW={bits:a1.lenbits};a0=G(V,a1.lens,0,a1.nlen,a1.lencode,0,a1.work,aW);a1.lenbits=aW.bits;if(a0){a2.msg="invalid literal/lengths set";a1.mode=f;break}a1.distbits=6;a1.distcode=a1.distdyn;aW={bits:a1.distbits};a0=G(t,a1.lens,a1.nlen,a1.ndist,a1.distcode,0,a1.work,aW);a1.distbits=aW.bits;if(a0){a2.msg="invalid distances set";a1.mode=f;break}a1.mode=Q;if(aE===ay){break inf_leave}case Q:a1.mode=P;case P:if(aH>=6&&aS>=258){a2.next_out=aZ;a2.avail_out=aS;a2.next_in=aV;a2.avail_in=aH;a1.hold=aN;a1.bits=aC;F(a2,aB);aZ=a2.next_out;aY=a2.output;aS=a2.avail_out;aV=a2.next_in;aO=a2.input;aH=a2.avail_in;aN=a1.hold;aC=a1.bits;if(a1.mode===ai){a1.back=-1}break}a1.back=0;for(;;){aJ=a1.lencode[aN&((1<<a1.lenbits)-1)];aK=aJ>>>24;aL=(aJ>>>16)&255;aM=aJ&65535;if(aK<=aC){break}if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(aL&&(aL&240)===0){aP=aK;aQ=aL;aR=aM;for(;;){aJ=a1.lencode[aR+((aN&((1<<(aP+aQ))-1))>>aP)];aK=aJ>>>24;aL=(aJ>>>16)&255;aM=aJ&65535;if((aP+aK)<=aC){break}if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}aN>>>=aP;aC-=aP;a1.back+=aP}aN>>>=aK;aC-=aK;a1.back+=aK;a1.length=aM;if(aL===0){a1.mode=W;break}if(aL&32){a1.back=-1;a1.mode=ai;break}if(aL&64){a2.msg="invalid literal/length code";a1.mode=f;break}a1.extra=aL&15;a1.mode=R;case R:if(a1.extra){aU=a1.extra;while(aC<aU){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.length+=aN&((1<<a1.extra)-1);aN>>>=a1.extra;aC-=a1.extra;a1.back+=a1.extra}a1.was=a1.length;a1.mode=q;case q:for(;;){aJ=a1.distcode[aN&((1<<a1.distbits)-1)];aK=aJ>>>24;aL=(aJ>>>16)&255;aM=aJ&65535;if((aK)<=aC){break}if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if((aL&240)===0){aP=aK;aQ=aL;aR=aM;for(;;){aJ=a1.distcode[aR+((aN&((1<<(aP+aQ))-1))>>aP)];aK=aJ>>>24;aL=(aJ>>>16)&255;aM=aJ&65535;if((aP+aK)<=aC){break}if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}aN>>>=aP;aC-=aP;a1.back+=aP}aN>>>=aK;aC-=aK;a1.back+=aK;if(aL&64){a2.msg="invalid distance code";a1.mode=f;break}a1.offset=aM;a1.extra=(aL)&15;a1.mode=r;case r:if(a1.extra){aU=a1.extra;while(aC<aU){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}a1.offset+=aN&((1<<a1.extra)-1);aN>>>=a1.extra;aC-=a1.extra;a1.back+=a1.extra}if(a1.offset>a1.dmax){a2.msg="invalid distance too far back";a1.mode=f;break}a1.mode=X;case X:if(aS===0){break inf_leave}aD=aB-aS;if(a1.offset>aD){aD=a1.offset-aD;if(aD>a1.whave){if(a1.sane){a2.msg="invalid distance too far back";a1.mode=f;break}}if(aD>a1.wnext){aD-=a1.wnext;aF=a1.wsize-aD}else{aF=a1.wnext-aD}if(aD>a1.length){aD=a1.length}aG=a1.window}else{aG=aY;aF=aZ-a1.offset;aD=a1.length}if(aD>aS){aD=aS}aS-=aD;a1.length-=aD;do{aY[aZ++]=aG[aF++]}while(--aD);if(a1.length===0){a1.mode=P}break;case W:if(aS===0){break inf_leave}aY[aZ++]=a1.length;aS--;a1.mode=P;break;case g:if(a1.wrap){while(aC<32){if(aH===0){break inf_leave}aH--;aN|=aO[aV++]<<aC;aC+=8}aB-=aS;a2.total_out+=aB;a1.total+=aB;if(aB){a2.adler=a1.check=(a1.flags?m(a1.check,aY,aB,aZ-aB):e(a1.check,aY,aB,aZ-aB))}aB=aS;if((a1.flags?aN:az(aN))!==a1.check){a2.msg="incorrect data check";a1.mode=f;break}aN=0;aC=0}a1.mode=T;case T:if(a1.wrap&&a1.flags){while(aC<32){if(aH===0){break inf_leave}aH--;aN+=aO[aV++]<<aC;aC+=8}if(aN!==(a1.total&4294967295)){a2.msg="incorrect length check";a1.mode=f;break}aN=0;aC=0}a1.mode=u;case u:a0=aw;break inf_leave;case f:a0=ap;break inf_leave;case Z:return at;case af:default:return ax}}a2.next_out=aZ;a2.avail_out=aS;a2.next_in=aV;a2.avail_in=aH;a1.hold=aN;a1.bits=aC;if(a1.wsize||(aB!==a2.avail_out&&a1.mode<f&&(a1.mode<g||aE!==ar))){if(ak(a2,a2.output,a2.next_out,aB-a2.avail_out)){a1.mode=Z;return at}}aA-=a2.avail_in;aB-=a2.avail_out;a2.total_in+=aA;a2.total_out+=aB;a1.total+=aB;if(a1.wrap&&aB){a2.adler=a1.check=(a1.flags?m(a1.check,aY,aB,a2.next_out-aB):e(a1.check,aY,aB,a2.next_out-aB))}a2.data_type=a1.bits+(a1.last?64:0)+(a1.mode===ai?128:0)+(a1.mode===Q||a1.mode===l?256:0);if(((aA===0&&aB===0)||aE===ar)&&a0===av){a0=ao}return a0}function H(aB){if(!aB||!aB.state){return ax}var aA=aB.state;if(aA.window){aA.window=null}aB.state=null;return av}function I(aC,aA){var aB;if(!aC||!aC.state){return ax}aB=aC.state;if((aB.wrap&2)===0){return ax}aB.head=aA;aA.done=!1;return av}y.inflateReset=L;y.inflateReset2=M;y.inflateResetKeep=N;y.inflateInit=J;y.inflateInit2=K;y.inflate=E;y.inflateEnd=H;y.inflateGetHeader=I;y.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(r,q,k){var s=r("../utils/common");var p=15;var j=852;var i=592;var e=0;var n=1;var h=2;var m=[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];var 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,72,78];var f=[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];var g=[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];q.exports=function l(Z,M,N,w,X,Y,ab,U){var v=U.bits;var L=0;var W=0;var R=0,Q=0;var V=0;var y=0;var z=0;var K=0;var aa=0;var H=0;var J;var D;var O;var P;var S;var t=null;var u=0;var A;var x=new s.Buf16(p+1);var T=new s.Buf16(p+1);var B=null;var C=0;var E,F,G;for(L=0;L<=p;L++){x[L]=0}for(W=0;W<w;W++){x[M[N+W]]++}V=v;for(Q=p;Q>=1;Q--){if(x[Q]!==0){break}}if(V>Q){V=Q}if(Q===0){X[Y++]=(1<<24)|(64<<16)|0;X[Y++]=(1<<24)|(64<<16)|0;U.bits=1;return 0}for(R=1;R<Q;R++){if(x[R]!==0){break}}if(V<R){V=R}K=1;for(L=1;L<=p;L++){K<<=1;K-=x[L];if(K<0){return -1}}if(K>0&&(Z===e||Q!==1)){return -1}T[1]=0;for(L=1;L<p;L++){T[L+1]=T[L]+x[L]}for(W=0;W<w;W++){if(M[N+W]!==0){ab[T[M[N+W]]++]=W}}if(Z===e){t=B=ab;A=19}else{if(Z===n){t=m;u-=257;B=o;C-=257;A=256}else{t=f;B=g;A=-1}}H=0;W=0;L=R;S=Y;y=V;z=0;O=-1;aa=1<<V;P=aa-1;if((Z===n&&aa>j)||(Z===h&&aa>i)){return 1}var I=0;for(;;){I++;E=L-z;if(ab[W]<A){F=0;G=ab[W]}else{if(ab[W]>A){F=B[C+ab[W]];G=t[u+ab[W]]}else{F=32+64;G=0}}J=1<<(L-z);D=1<<y;R=D;do{D-=J;X[S+(H>>z)+D]=(E<<24)|(F<<16)|G|0}while(D!==0);J=1<<(L-1);while(H&J){J>>=1}if(J!==0){H&=J-1;H+=J}else{H=0}W++;if(--x[L]===0){if(L===Q){break}L=M[N+ab[W]]}if(L>V&&(H&P)!==O){if(z===0){z=V}S+=R;y=L-z;K=1<<y;while(y+z<Q){K-=x[y+z];if(K<=0){break}y++;K<<=1}aa+=1<<y;if((Z===n&&aa>j)||(Z===h&&aa>i)){return 1}O=H&P;X[O]=(V<<24)|(y<<16)|(S-Y)|0}}if(H!==0){X[S+H]=((L-z)<<24)|(64<<16)|0}U.bits=V;return 0}},{"../utils/common":1}],10:[function(g,f,e){f.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"}},{}],11:[function(g,f,e){function h(){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}f.exports=h},{}],"/lib/inflate.js":[function(m,k,f){var q=m("./zlib/inflate.js");var p=m("./utils/common");var n=m("./utils/strings");var e=m("./zlib/constants");var l=m("./zlib/messages");var r=m("./zlib/zstream");var g=m("./zlib/gzheader");var o=Object.prototype.toString;var i=function(t){this.options=p.assign({chunkSize:16384,windowBits:0,to:""},t||{});var s=this.options;if(s.raw&&(s.windowBits>=0)&&(s.windowBits<16)){s.windowBits=-s.windowBits;if(s.windowBits===0){s.windowBits=-15}}if((s.windowBits>=0)&&(s.windowBits<16)&&!(t&&t.windowBits)){s.windowBits+=32}if((s.windowBits>15)&&(s.windowBits<48)){if((s.windowBits&15)===0){s.windowBits|=15}}this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new r();this.strm.avail_out=0;var u=q.inflateInit2(this.strm,s.windowBits);if(u!==e.Z_OK){throw new Error(l[u])}this.header=new g();q.inflateGetHeader(this.strm,this.header)};i.prototype.push=function(u,v){var y=this.strm;var t=this.options.chunkSize;var x,s;var w,z,A;if(this.ended){return !1}s=(v===~~v)?v:((v===!0)?e.Z_FINISH:e.Z_NO_FLUSH);if(typeof u==="string"){y.input=n.binstring2buf(u)}else{if(o.call(u)==="[object ArrayBuffer]"){y.input=new Uint8Array(u)}else{y.input=u}}y.next_in=0;y.avail_in=y.input.length;do{if(y.avail_out===0){y.output=new p.Buf8(t);y.next_out=0;y.avail_out=t}x=q.inflate(y,e.Z_NO_FLUSH);if(x!==e.Z_STREAM_END&&x!==e.Z_OK){this.onEnd(x);this.ended=!0;return !1}if(y.next_out){if(y.avail_out===0||x===e.Z_STREAM_END||(y.avail_in===0&&s===e.Z_FINISH)){if(this.options.to==="string"){w=n.utf8border(y.output,y.next_out);z=y.next_out-w;A=n.buf2string(y.output,w);y.next_out=z;y.avail_out=t-z;if(z){p.arraySet(y.output,y.output,w,z,0)}this.onData(A)}else{this.onData(p.shrinkBuf(y.output,y.next_out))}}}}while((y.avail_in>0)&&x!==e.Z_STREAM_END);if(x===e.Z_STREAM_END){s=e.Z_FINISH}if(s===e.Z_FINISH){x=q.inflateEnd(this.strm);this.onEnd(x);this.ended=!0;return x===e.Z_OK}return !0};i.prototype.onData=function(s){this.chunks.push(s)};i.prototype.onEnd=function(s){if(s===e.Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=p.flattenChunks(this.chunks)}}this.chunks=[];this.err=s;this.msg=this.strm.msg};function h(t,u){var s=new i(u);s.push(t,!0);if(s.err){throw s.msg}return s.result}function j(s,t){t=t||{};t.raw=!0;return h(s,t)}f.Inflate=i;f.inflate=h;f.inflateRaw=j;f.ungzip=h},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate.js":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")});function PngImage(){var n="",j=this,e=null,k=new PngToy(),a,b,o=0,i=0,c=!1;this.onload=null;this.onerror=null;Object.defineProperty(this,"src",{get:function(){return n},set:function(h){n=h;l()}});Object.defineProperty(this,"width",{get:function(){return o}});Object.defineProperty(this,"height",{get:function(){return i}});Object.defineProperty(this,"naturalWidth",{get:function(){return o}});Object.defineProperty(this,"naturalHeight",{get:function(){return i}});Object.defineProperty(this,"image",{get:function(){return b}});Object.defineProperty(this,"pngtoy",{get:function(){return k}});Object.defineProperty(this,"complete",{get:function(){return c}});function l(){k.fetch(n).then(f,g)}function f(h){k.decode(h).then(d,g)}function d(h){a=h;o=h.width;i=h.height;k.convertToCanvas(h,{ignoreAspectRatio:!1,useGamma:!1}).then(m.bind(j),g.bind(j))}function m(h){b=h;c=!0;if(j.onload){j.onload({timeStamp:Date.now()})}}function g(h){if(j.onerror){j.onerror({message:h,timeStamp:Date.now()})}}};