libbpg/html/bpgdec.js

92 lines
186 KiB
JavaScript
Raw Normal View History

2015-01-16 12:46:18 +00:00
function b(a){throw a;}var h=void 0,i=!0,k=null,l;l||(l=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var r={},t;for(t in l)l.hasOwnProperty(t)&&(r[t]=l[t]);var u="object"===typeof process&&"function"===typeof require,v="object"===typeof window,aa="function"===typeof importScripts,w=!v&&!u&&!aa;
if(u){l.print||(l.print=function(a){process.stdout.write(a+"\n")});l.printErr||(l.printErr=function(a){process.stderr.write(a+"\n")});var ba=require("fs"),ca=require("path");l.read=function(a,d){var a=ca.normalize(a),c=ba.readFileSync(a);!c&&a!=ca.resolve(a)&&(a=path.join(__dirname,"..","src",a),c=ba.readFileSync(a));c&&!d&&(c=c.toString());return c};l.readBinary=function(a){return l.read(a,i)};l.load=function(a){da(read(a))};l.thisProgram=process.argv[1].replace(/\\/g,"/");l.arguments=process.argv.slice(2);
"undefined"!==typeof module&&(module.exports=l);process.on("uncaughtException",function(a){a instanceof ea||b(a)})}else w?(l.print||(l.print=print),"undefined"!=typeof printErr&&(l.printErr=printErr),l.read="undefined"!=typeof read?read:function(){b("no read() available (jsc?)")},l.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");x("object"===typeof a);return a},"undefined"!=typeof scriptArgs?l.arguments=scriptArgs:"undefined"!=typeof arguments&&
(l.arguments=arguments),this.Module=l,eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined")):v||aa?(l.read=function(a){var d=new XMLHttpRequest;d.open("GET",a,!1);d.send(k);return d.responseText},"undefined"!=typeof arguments&&(l.arguments=arguments),"undefined"!==typeof console?(l.print||(l.print=function(a){console.log(a)}),l.printErr||(l.printErr=function(a){console.log(a)})):l.print||(l.print=function(){}),v?window.Module=l:l.load=importScripts):
b("Unknown runtime environment. Where are we?");function da(a){eval.call(k,a)}!l.load&&l.read&&(l.load=function(a){da(l.read(a))});l.print||(l.print=function(){});l.printErr||(l.printErr=l.print);l.arguments||(l.arguments=[]);l.thisProgram||(l.thisProgram="./this.program");l.print=l.print;l.a=l.printErr;l.preRun=[];l.postRun=[];for(t in r)r.hasOwnProperty(t)&&(l[t]=r[t]);
var z={M:function(a){fa=a},J:function(){return fa},m:function(){return y},q:function(a){y=a},o:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?z.f:"i"===a[0]?(a=parseInt(a.substr(1)),x(0===a%8),a/8):0}},I:function(a){return Math.max(z.o(a),z.f)},O:16,Y:function(a,d,c){return!c&&("i64"==a||"double"==a)?8:!a?Math.min(d,8):Math.min(d||(a?z.I(a):0),z.f)},j:function(a,
d,c){return c&&c.length?(c.splice||(c=Array.prototype.slice.call(c)),c.splice(0,0,d),l["dynCall_"+a].apply(k,c)):l["dynCall_"+a].call(k,d)},c:[],t:function(a){for(var d=0;d<z.c.length;d++)if(!z.c[d])return z.c[d]=a,2*(1+d);b("Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.")},L:function(a){z.c[(a-2)/2]=k},Z:function(a,d){z.i||(z.i={});var c=z.i[a];if(c)return c;for(var c=[],e=0;e<d;e++)c.push(String.fromCharCode(36)+e);e=Pointer_stringify(a);'"'===e[0]&&
(e.indexOf('"',1)===e.length-1?e=e.substr(1,e.length-2):A("invalid EM_ASM input |"+e+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));try{var f=eval("(function(Module, FS) { return function("+c.join(",")+"){ "+e+" } })")(l,"undefined"!==typeof FS?FS:k)}catch(g){l.a("error in executing inline EM_ASM code: "+g+" on: \n\n"+e+"\n\nwith args |"+c+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),b(g)}return z.i[a]=f},e:function(a){z.e.l||
(z.e.l={});z.e.l[a]||(z.e.l[a]=1,l.a(a))},k:{},aa:function(a,d){x(d);z.k[d]||(z.k[d]={});var c=z.k[d];c[a]||(c[a]=function(){return z.j(d,a,arguments)});return c[a]},s:function(){var a=[],d=0;this.ea=function(c){c&=255;if(0==a.length){if(0==(c&128))return String.fromCharCode(c);a.push(c);d=192==(c&224)?1:224==(c&240)?2:3;return""}if(d&&(a.push(c),d--,0<d))return"";var c=a[0],e=a[1],f=a[2],g=a[3];2==a.length?c=String.fromCharCode((c&31)<<6|e&63):3==a.length?c=String.fromCharCode((c&15)<<12|(e&63)<<
6|f&63):(c=(c&7)<<18|(e&63)<<12|(f&63)<<6|g&63,c=String.fromCharCode(((c-65536)/1024|0)+55296,(c-65536)%1024+56320));a.length=0;return c};this.K=function(a){for(var a=unescape(encodeURIComponent(a)),d=[],f=0;f<a.length;f++)d.push(a.charCodeAt(f));return d}},$:function(){b("You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work")},d:function(a){var d=y;y=y+a|0;y=y+15&-16;return d},N:function(a){var d=B;B=B+a|0;B=B+15&-16;return d},
b:function(a){var d=C;C=C+a|0;C=C+15&-16;C>=E&&A("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+E+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.");return d},g:function(a,d){return Math.ceil(a/(d?d:16))*(d?d:16)},da:function(a,d,c){return c?+(a>>>0)+4294967296*+(d>>>0):+(a>>>0)+4294967296*+(d|0)},r:8,f:4,P:0};
l.Runtime=z;z.addFunction=z.t;z.removeFunction=z.L;var F=!1,G,ga,fa;function x(a,d){a||A("Assertion failed: "+d)}function ha(a){var d=l["_"+a];if(!d)try{d=eval("_"+a)}catch(c){}x(d,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return d}var ia,ja;
(function(){function a(a){a=a.toString().match(f).slice(1);return{arguments:a[0],body:a[1],returnValue:a[2]}}var d=0,c={stackSave:function(){d=z.m()},stackRestore:function(){z.q(d)},arrayToC:function(a){var c=z.d(a.length);ka(a,c);return c},stringToC:function(a){var c=0;a!==k&&(a!==h&&0!==a)&&(c=z.d((a.length<<2)+1),la(a,c));return c}},e={string:c.stringToC,array:c.arrayToC};ja=function(a,f,g,j){var a=ha(a),q=[];if(j)for(var n=0;n<j.length;n++){var L=e[g[n]];L?(0===d&&(d=z.m()),q[n]=L(j[n])):q[n]=
j[n]}g=a.apply(k,q);"string"===f&&(g=Pointer_stringify(g));0!==d&&c.stackRestore();return g};var f=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,g={},j;for(j in c)c.hasOwnProperty(j)&&(g[j]=a(c[j]));ia=function(c,d,e){var e=e||[],f=ha(c),c=e.every(function(a){return"number"===a}),j="string"!==d;if(j&&c)return f;var n=e.map(function(a,c){return"$"+c}),d="(function("+n.join(",")+") {",L=e.length;if(!c)for(var d=d+(g.stackSave.body+";"),D=0;D<L;D++){var sa=n[D],M=e[D];"number"!==
M&&(M=g[M+"ToC"],d+="var "+M.arguments+" = "+sa+";",d+=M.body+";",d+=sa+"="+M.returnValue+";")}e=a(function(){return f}).returnValue;d+="var ret = "+e+"("+n.join(",")+");";j||(e=a(function(){return Pointer_stringify}).returnValue,d+="ret = "+e+"(ret);");c||(d+=g.stackRestore.body+";");return eval(d+"return ret})")}})();l.cwrap=ia;l.ccall=ja;
function ma(a,d,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":H[a>>0]=d;break;case "i8":H[a>>0]=d;break;case "i16":I[a>>1]=d;break;case "i32":J[a>>2]=d;break;case "i64":ga=[d>>>0,(G=d,1<=+na(G)?0<G?(oa(+pa(G/4294967296),4294967295)|0)>>>0:~~+qa((G-+(~~G>>>0))/4294967296)>>>0:0)];J[a>>2]=ga[0];J[a+4>>2]=ga[1];break;case "float":N[a>>2]=d;break;case "double":O[a>>3]=d;break;default:A("invalid type for setValue: "+c)}}l.setValue=ma;
l.getValue=function(a,d){d=d||"i8";"*"===d.charAt(d.length-1)&&(d="i32");switch(d){case "i1":return H[a>>0];case "i8":return H[a>>0];case "i16":return I[a>>1];case "i32":return J[a>>2];case "i64":return J[a>>2];case "float":return N[a>>2];case "double":return O[a>>3];default:A("invalid type for setValue: "+d)}return k};var ra=2,ta=4;l.ALLOC_NORMAL=0;l.ALLOC_STACK=1;l.ALLOC_STATIC=ra;l.ALLOC_DYNAMIC=3;l.ALLOC_NONE=ta;
function P(a,d,c,e){var f,g;"number"===typeof a?(f=i,g=a):(f=!1,g=a.length);var j="string"===typeof d?d:k,c=c==ta?e:[ua,z.d,z.N,z.b][c===h?ra:c](Math.max(g,j?1:d.length));if(f){e=c;x(0==(c&3));for(a=c+(g&-4);e<a;e+=4)J[e>>2]=0;for(a=c+g;e<a;)H[e++>>0]=0;return c}if("i8"===j)return a.subarray||a.slice?Q.set(a,c):Q.set(new Uint8Array(a),c),c;for(var e=0,m,p;e<g;){var s=a[e];"function"===typeof s&&(s=z.ba(s));f=j||d[e];0===f?e++:("i64"==f&&(f="i32"),ma(c+e,s,f),p!==f&&(m=z.o(f),p=f),e+=m)}return c}
l.allocate=P;function va(){var a;a:{a=Error();if(!a.stack){try{b(Error(0))}catch(d){a=d}if(!a.stack){a="(no stack trace available)";break a}}a=a.stack.toString()}return a}l.stackTrace=function(){return va()};for(var H,Q,I,wa,J,xa,N,O,R=0,B=0,ya=0,y=0,za=0,Aa=0,C=0,Ba=l.TOTAL_STACK||5242880,E=l.TOTAL_MEMORY||33554432,S=65536;S<E||S<2*Ba;)S=16777216>S?2*S:S+16777216;S!==E&&(l.a("increasing TOTAL_MEMORY to "+S+" to be compliant with the asm.js spec"),E=S);
x("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"JS engine does not provide full typed array support");var T=new ArrayBuffer(E);H=new Int8Array(T);I=new Int16Array(T);J=new Int32Array(T);Q=new Uint8Array(T);wa=new Uint16Array(T);xa=new Uint32Array(T);N=new Float32Array(T);O=new Float64Array(T);J[0]=255;x(255===Q[0]&&0===Q[3],"Typed arrays 2 must be run on a little-endian system");l.HEAP=h;l.buffer=T;l.HEAP8=H;
l.HEAP16=I;l.HEAP32=J;l.HEAPU8=Q;l.HEAPU16=wa;l.HEAPU32=xa;l.HEAPF32=N;l.HEAPF64=O;function U(a){for(;0<a.length;){var d=a.shift();if("function"==typeof d)d();else{var c=d.X;"number"===typeof c?d.h===h?z.j("v",c):z.j("vi",c,[d.h]):c(d.h===h?k:d.h)}}}var Ca=[],Da=[],Ea=[],Fa=[],Ga=[],Ha=!1;function Ia(a){Ca.unshift(a)}l.addOnPreRun=l.U=Ia;l.addOnInit=l.R=function(a){Da.unshift(a)};l.addOnPreMain=l.T=function(a){Ea.unshift(a)};l.addOnExit=l.Q=function(a){Fa.unshift(a)};
function Ja(a){Ga.unshift(a)}l.addOnPostRun=l.S=Ja;function Ka(a,d,c){a=(new z.s).K(a);c&&(a.length=c);d||a.push(0);return a}l.intArrayFromString=Ka;l.intArrayToString=function(a){for(var d=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);d.push(String.fromCharCode(e))}return d.join("")};function la(a,d,c){a=Ka(a,c);for(c=0;c<a.length;)H[d+c>>0]=a[c],c+=1}l.writeStringToMemory=la;function ka(a,d){for(var c=0;c<a.length;c++)H[d+c>>0]=a[c]}l.writeArrayToMemory=ka;
l.writeAsciiToMemory=function(a,d,c){for(var e=0;e<a.length;e++)H[d+e>>0]=a.charCodeAt(e);c||(H[d+a.length>>0]=0)};if(!Math.imul||-5!==Math.imul(4294967295,5))Math.imul=function(a,d){var c=a&65535,e=d&65535;return c*e+((a>>>16)*e+c*(d>>>16)<<16)|0};Math.ca=Math.imul;var na=Math.abs,qa=Math.ceil,pa=Math.floor,oa=Math.min,V=0,La=k,W=k;function Ma(){V++;l.monitorRunDependencies&&l.monitorRunDependencies(V)}l.addRunDependency=Ma;
function Na(){V--;l.monitorRunDependencies&&l.monitorRunDependencies(V);if(0==V&&(La!==k&&(clearInterval(La),La=k),W)){var a=W;W=k;a()}}l.removeRunDependency=Na;l.preloadedImages={};l.preloadedAudios={};var X=k,R=8,B=R+6112;Da.push();
P([0,0,1,0,1,2,0,1,2,3,1,2,3,2,3,3,0,1,0,2,1,0,3,2,1,0,3,2,1,3,2,3,0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,2,3,4,5,6,7,3,4,5,6,7,4,5,6,7,5,6,7,6,7,7,0,1,0,2,1,0,3,2,1,0,4,3,2,1,0,5,4,3,2,1,0,6,5,4,3,2,1,0,7,6,5,4,3,2,1,0,7,6,5,4,3,2,1,7,6,5,4,3,2,7,6,5,4,3,7,6,5,4,7,6,5,7,6,7,40,45,51,57,64,72,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,34,0,0,0,34,0,0,0,35,0,0,0,35,0,0,0,36,0,0,0,36,0,0,0,37,0,0,0,37,0,0,0,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,
3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,0,0,0,0,0,0,0,2,5,9,1,4,8,12,3,7,11,14,6,10,13,15,0,0,0,0,0,0,0,0,0,2,1,3,0,0,0,0,0,2,5,9,14,20,27,35,1,4,8,13,19,26,34,42,3,7,12,18,25,33,41,48,6,11,17,24,32,40,47,53,10,16,23,31,39,46,52,57,15,22,30,38,45,51,
56,60,21,29,37,44,50,55,59,62,28,36,43,49,54,58,61,63,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,1,2,3,16,17,18,19,4,5,6,7,20,21,22,23,8,9,10,11,24,25,26,27,12,13,14,15,28,29,30,31,32,33,34,35,48,49,50,51,36,37,38,39,52,53,54,55,40,41,42,43,56,57,58,59,44,45,46,47,60,61,62,63,0,1,4,5,2,3,4,5,6,6,8,8,7,7,8,8,1,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,153,200,139,
141,157,154,154,154,154,154,154,154,154,184,154,154,154,184,63,139,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,153,138,138,111,141,94,138,182,154,139,139,139,139,139,139,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,91,171,134,141,111,111,125,110,110,94,124,108,124,107,125,141,179,153,125,107,125,141,179,153,125,107,125,141,179,153,125,140,139,182,182,152,136,152,136,153,136,139,111,
136,139,111,141,111,140,92,137,138,140,152,138,139,153,74,149,92,139,107,122,152,140,179,166,182,140,227,122,197,138,153,136,167,152,152,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,185,107,139,126,154,197,185,201,154,154,154,149,154,139,154,154,154,152,139,110,122,95,79,63,31,31,153,153,153,153,140,198,140,198,168,79,124,138,94,153,111,149,107,167,154,139,139,139,139,139,139,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,125,110,
94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,121,140,61,154,155,154,139,153,139,123,123,63,153,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,123,123,107,121,107,121,167,151,183,140,151,183,140,140,140,154,196,196,167,154,152,167,182,182,134,149,136,153,121,136,137,169,194,166,167,154,167,137,182,107,167,91,122,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,160,107,139,126,154,197,185,201,154,154,
154,134,154,139,154,154,183,152,139,154,137,95,79,63,31,31,153,153,153,153,169,198,169,198,168,79,224,167,122,153,111,149,92,167,154,139,139,139,139,139,139,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,121,140,61,154,170,154,139,153,139,123,123,63,124,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,138,138,122,121,122,121,167,151,183,140,151,183,140,140,140,154,196,167,167,154,
152,167,182,182,134,149,136,153,121,136,122,169,208,166,167,154,152,167,182,107,167,91,107,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24,0,0,29,30,31,32,33,33,34,34,35,35,36,36,37,37,
0,0,104,101,118,99,0,0,0,0,128,5,0,0,0,0,0,0,0,0,0,0,53,54,50,72,34,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,10,1,0,0,0,0,0,1,2,2,2,2,3,5,7,8,10,12,13,15,17,18,19,20,21,22,23,23,24,24,25,25,26,27,27,28,28,29,29,30,31,0,0,0,0,0,7,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,32,26,21,17,13,9,5,2,0,254,251,247,243,239,235,230,224,230,235,239,243,247,251,254,0,
2,5,9,13,17,21,26,32,0,0,0,0,0,0,0,0,240,154,249,114,252,138,253,30,254,122,254,197,254,0,255,197,254,122,254,30,254,138,253,114,252,154,249,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,90,90,90,89,88,87,85,83,82,80,78,75,73,70,67,64,61,57,54,50,46,43,38,36,31,25,22,18,13,9,4,1,2,0,3,4,0,0,0,255,0,1,0,0,255,0,1,255,255,1,1,1,255,255,1,16,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36,17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,
41,54,70,88,24,25,29,36,47,65,88,115,16,16,16,16,17,18,20,24,16,16,16,17,18,20,24,25,16,16,17,18,20,24,25,28,16,17,18,20,24,25,28,33,17,18,20,24,25,28,33,41,18,20,24,25,28,33,41,54,20,24,25,28,33,41,54,71,24,25,28,33,41,54,71,91,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,176,208,240,128,167,197,227,128,158,187,216,123,150,178,205,116,142,169,195,
111,135,160,185,105,128,152,175,100,122,144,166,95,116,137,158,90,110,130,150,85,104,123,142,81,99,117,135,77,94,111,128,73,89,105,122,69,85,100,116,66,80,95,110,62,76,90,104,59,72,86,99,56,69,81,94,53,65,77,89,51,62,73,85,48,59,69,80,46,56,66,76,43,53,63,72,41,50,59,69,39,48,56,65,37,45,54,62,35,43,51,59,33,41,48,56,32,39,46,53,30,37,43,50,29,35,41,48,27,33,39,45,26,31,37,43,24,30,35,41,23,28,33,39,22,27,32,37,21,26,30,35,20,24,29,33,19,23,27,31,18,22,26,30,17,21,25,28,16,20,23,27,15,19,22,25,14,
18,21,24,14,17,20,23,13,16,19,22,12,15,18,21,12,14,17,20,11,14,16,19,11,13,15,18,10,12,15,17,10,12,14,16,9,11,13,15,9,11,12,14,8,10,12,14,8,9,11,13,7,9,11,12,7,9,10,12,7,8,10,11,6,8,9,11,6,7,9,10,6,7,8,9,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,0,0,1,2,2,4,4,5,6,7,8,9,9,11,11,12,13,13,15,15,16,16,18,18,19,19,21,21,22,22,23,24,24,25,26,26,27,27,28,29,
29,30,30,30,31,32,32,33,33,33,34,34,35,35,35,36,36,36,37,37,37,38,38,63,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,0,255,255,255,127,0,0,0,0,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,54,0,0,0,0,0,0,0,3,1,1,0,36,120,37,120,38,120,0,0,0,0,0,0,56,0,0,0,0,0,0,0,3,1,0,16,36,120,37,120,38,120,0,0,0,0,0,0,58,0,0,0,0,0,0,0,3,0,0,16,36,120,37,120,38,120,0,0,0,0,0,0,32,0,0,0,0,0,0,0,1,0,0,0,36,120,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ta,z.r);var Oa=z.g(P(12,"i8",ra),8);x(0==Oa%8);l._llvm_bswap_i32=Pa;l._bitshift64Ashr=Qa;l._i64Subtract=Ra;function Y(a){Y.G||(C=C+4095&-4096,Y.G=i,x(z.b),Y.u=z.b,z.b=function(){A("cannot dynamically allocate, sbrk now has control")});var d=C;0!=a&&Y.u(a);return d}l._i64Add=Sa;l._strlen=Ta;l._memset=Ua;l._bitshift64Shl=Va;function Wa(a){l.exit(a)}
function Xa(a){return 0.5!==Math.abs(a%1)?Math.round(a):a+a%2+(0>a?1:-1)}l._memcpy=Ya;ya=y=z.g(B);za=ya+Ba;Aa=C=z.g(za);x(Aa<E,"TOTAL_MEMORY not big enough for stack");
var Za=P([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0],"i8",3),$a=P([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,
0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",3);l.v={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};
l.w={abort:A,assert:x,min:oa,invoke_iiii:function(a,d,c,e){try{return l.dynCall_iiii(a,d,c,e)}catch(f){"number"!==typeof f&&"longjmp"!==f&&b(f),Z.setThrew(1,0)}},invoke_viiiiiiiiii:function(a,d,c,e,f,g,j,m,p,s,K){try{l.dynCall_viiiiiiiiii(a,d,c,e,f,g,j,m,p,s,K)}catch(q){"number"!==typeof q&&"longjmp"!==q&&b(q),Z.setThrew(1,0)}},invoke_viiiiiii:function(a,d,c,e,f,g,j,m){try{l.dynCall_viiiiiii(a,d,c,e,f,g,j,m)}catch(p){"number"!==typeof p&&"longjmp"!==p&&b(p),Z.setThrew(1,0)}},invoke_viiiiiiiiiiiii:function(a,
d,c,e,f,g,j,m,p,s,K,q,n,L){try{l.dynCall_viiiiiiiiiiiii(a,d,c,e,f,g,j,m,p,s,K,q,n,L)}catch(D){"number"!==typeof D&&"longjmp"!==D&&b(D),Z.setThrew(1,0)}},invoke_vi:function(a,d){try{l.dynCall_vi(a,d)}catch(c){"number"!==typeof c&&"longjmp"!==c&&b(c),Z.setThrew(1,0)}},invoke_vii:function(a,d,c){try{l.dynCall_vii(a,d,c)}catch(e){"number"!==typeof e&&"longjmp"!==e&&b(e),Z.setThrew(1,0)}},invoke_iiiiiii:function(a,d,c,e,f,g,j){try{return l.dynCall_iiiiiii(a,d,c,e,f,g,j)}catch(m){"number"!==typeof m&&"longjmp"!==
m&&b(m),Z.setThrew(1,0)}},invoke_ii:function(a,d){try{return l.dynCall_ii(a,d)}catch(c){"number"!==typeof c&&"longjmp"!==c&&b(c),Z.setThrew(1,0)}},invoke_viii:function(a,d,c,e){try{l.dynCall_viii(a,d,c,e)}catch(f){"number"!==typeof f&&"longjmp"!==f&&b(f),Z.setThrew(1,0)}},invoke_iiiii:function(a,d,c,e,f){try{return l.dynCall_iiiii(a,d,c,e,f)}catch(g){"number"!==typeof g&&"longjmp"!==g&&b(g),Z.setThrew(1,0)}},invoke_viiiiii:function(a,d,c,e,f,g,j){try{l.dynCall_viiiiii(a,d,c,e,f,g,j)}catch(m){"number"!==
typeof m&&"longjmp"!==m&&b(m),Z.setThrew(1,0)}},invoke_iii:function(a,d,c){try{return l.dynCall_iii(a,d,c)}catch(e){"number"!==typeof e&&"longjmp"!==e&&b(e),Z.setThrew(1,0)}},invoke_iiiiii:function(a,d,c,e,f,g){try{return l.dynCall_iiiiii(a,d,c,e,f,g)}catch(j){"number"!==typeof j&&"longjmp"!==j&&b(j),Z.setThrew(1,0)}},invoke_viiii:function(a,d,c,e,f){try{l.dynCall_viiii(a,d,c,e,f)}catch(g){"number"!==typeof g&&"longjmp"!==g&&b(g),Z.setThrew(1,0)}},_lrint:function(){return Xa.apply(k,arguments)},_abort:function(){l.abort()},
_sbrk:Y,_emscripten_memcpy_big:function(a,d,c){Q.set(Q.subarray(d,d+c),a);return a},_rint:Xa,_exit:function(a){Wa(a)},__exit:Wa,STACKTOP:y,STACK_MAX:za,tempDoublePtr:Oa,ABORT:F,cttz_i8:$a,ctlz_i8:Za,NaN:NaN,Infinity:Infinity};// EMSCRIPTEN_START_ASM
var Z=(function(global,env,buffer) {
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=env.ctlz_i8|0;var o=0;var p=0;var q=0;var r=0;var s=+env.NaN,t=+env.Infinity;var u=0,v=0,w=0,x=0,y=0.0,z=0,A=0,B=0,C=0.0;var D=0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=global.Math.floor;var O=global.Math.abs;var P=global.Math.sqrt;var Q=global.Math.pow;var R=global.Math.cos;var S=global.Math.sin;var T=global.Math.tan;var U=global.Math.acos;var V=global.Math.asin;var W=global.Math.atan;var X=global.Math.atan2;var Y=global.Math.exp;var Z=global.Math.log;var _=global.Math.ceil;var $=global.Math.imul;var aa=env.abort;var ba=env.assert;var ca=env.min;var da=env.invoke_iiii;var ea=env.invoke_viiiiiiiiii;var fa=env.invoke_viiiiiii;var ga=env.invoke_viiiiiiiiiiiii;var ha=env.invoke_vi;var ia=env.invoke_vii;var ja=env.invoke_iiiiiii;var ka=env.invoke_ii;var la=env.invoke_viii;var ma=env.invoke_iiiii;var na=env.invoke_viiiiii;var oa=env.invoke_iii;var pa=env.invoke_iiiiii;var qa=env.invoke_viiii;var ra=env._lrint;var sa=env._abort;var ta=env._sbrk;var ua=env._emscripten_memcpy_big;var va=env._rint;var wa=env._exit;var xa=env.__exit;var ya=0.0;
// EMSCRIPTEN_START_FUNCS
function Na(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function Oa(){return i|0}function Pa(a){a=a|0;i=a}function Qa(a,b){a=a|0;b=b|0;if(!o){o=a;p=b}}function Ra(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function Sa(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function Ta(a){a=a|0;D=a}function Ua(){return D|0}function Va(b,d){b=b|0;d=d|0;var e=0,f=0;e=i;if(!(a[(c[b+204>>2]|0)+43>>0]|0)){i=e;return}f=c[(c[b+200>>2]|0)+13128>>2]|0;d=(d|0)%(f|0)|0;if((d|0)!=2?!((f|0)==2&(d|0)==0):0){i=e;return}ce(c[b+152>>2]|0,c[b+136>>2]|0,199)|0;i=e;return}function Wa(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;g=b+204|0;f=c[g>>2]|0;if((c[(c[f+1668>>2]|0)+(c[b+2500>>2]<<2)>>2]|0)==(d|0)){Xa(b);f=b+1449|0;if(a[f>>0]|0){j=c[g>>2]|0;if((a[j+42>>0]|0)!=0?(j=c[j+1676>>2]|0,(c[j+(d<<2)>>2]|0)!=(c[j+(d+ -1<<2)>>2]|0)):0)h=5}else h=5;if((h|0)==5)Ya(b);if(a[b+1448>>0]|0){i=e;return}if(!(a[(c[g>>2]|0)+43>>0]|0)){i=e;return}g=c[(c[b+200>>2]|0)+13128>>2]|0;if((d|0)%(g|0)|0){i=e;return}if((g|0)==1){Ya(b);i=e;return}if((a[f>>0]|0)!=1){i=e;return}ce(c[b+136>>2]|0,c[b+152>>2]|0,199)|0;i=e;return}if((a[f+42>>0]|0)!=0?(j=c[f+1676>>2]|0,(c[j+(d<<2)>>2]|0)!=(c[j+(d+ -1<<2)>>2]|0)):0){if((a[b+141>>0]|0)==1)Za(c[b+136>>2]|0);else Xa(b);Ya(b);f=c[g>>2]|0}if(!(a[f+43>>0]|0)){i=e;return}f=b+200|0;if((d|0)%(c[(c[f>>2]|0)+13128>>2]|0)|0){i=e;return}d=b+136|0;_a((c[d>>2]|0)+224|0)|0;if((a[b+141>>0]|0)==1)Za(c[d>>2]|0);else Xa(b);if((c[(c[f>>2]|0)+13128>>2]|0)==1){Ya(b);i=e;return}else{ce(c[d>>2]|0,c[b+152>>2]|0,199)|0;i=e;return}}function Xa(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;e=a+136|0;a=c[e>>2]|0;d=a+204|0;cd(d,1);g=a+212|0;f=c[g>>2]|0;h=0-f&7;if(h){cd(d,h);f=c[g>>2]|0}_c((c[e>>2]|0)+224|0,(c[d>>2]|0)+((f|0)/8|0)|0,(7-f+(c[a+216>>2]|0)|0)/8|0);i=b;return}function Ya(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;g=i;f=c[b+1440>>2]|0;e=2-f|0;e=(a[b+2060>>0]|0)==0|(f|0)==2?e:e^3;f=b+2112|0;b=b+136|0;h=0;do{j=d[680+(e*199|0)+h>>0]|0;l=a[f>>0]|0;k=l<<24>>24;if(l<<24>>24<0)k=0;else k=(k|0)>51?51:k;j=((j<<3&120)+ -16+(($(k,((j>>>4)*5|0)+ -45|0)|0)>>4)<<1)+ -127|0;j=j>>31^j;if((j|0)>124)j=j&1|124;a[(c[b>>2]|0)+h>>0]=j;h=h+1|0}while((h|0)!=199);a[(c[b>>2]|0)+199>>0]=0;a[(c[b>>2]|0)+200>>0]=0;a[(c[b>>2]|0)+201>>0]=0;a[(c[b>>2]|0)+202>>0]=0;i=g;return}function Za(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=a+224|0;e=c[a+240>>2]|0;f=c[d>>2]|0;e=(f&1|0)==0?e:e+ -1|0;e=(f&511|0)==0?e:e+ -1|0;a=(c[a+244>>2]|0)-e|0;if((a|0)<0){i=b;return}_c(d,e,a);i=b;return}function _a(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;f=a+4|0;d=c[f>>2]|0;e=d+ -2|0;c[f>>2]=e;g=c[a>>2]|0;if((g|0)>=(e<<17|0)){g=(c[a+16>>2]|0)-(c[a+12>>2]|0)|0;i=b;return g|0}d=(d+ -258|0)>>>31;c[f>>2]=e<<d;g=g<<d;c[a>>2]=g;if(g&65535){g=0;i=b;return g|0}Ab(a);g=0;i=b;return g|0}function $a(a){a=a|0;var b=0;b=i;a=c[a+136>>2]|0;a=ab(a+224|0,a)|0;i=b;return a|0}function ab(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;h=d[e>>0]|0;j=b+4|0;k=c[j>>2]|0;l=d[2880+((k<<1&384)+(h|512))>>0]|0;k=k-l|0;m=k<<17;n=c[b>>2]|0;g=m-n>>31;c[b>>2]=n-(g&m);c[j>>2]=(g&l-k)+k;h=g^h;a[e>>0]=a[h+4032>>0]|0;e=h&1;h=c[j>>2]|0;g=d[2880+h>>0]|0;c[j>>2]=h<<g;g=c[b>>2]<<g;c[b>>2]=g;if(g&65535){i=f;return e|0}j=b+16|0;h=c[j>>2]|0;c[b>>2]=(((d[h+1>>0]|0)<<1|(d[h>>0]|0)<<9)+ -65535<<7-(d[2880+((g+ -1^g)>>15)>>0]|0))+g;if(h>>>0>=(c[b+20>>2]|0)>>>0){i=f;return e|0}c[j>>2]=h+2;i=f;return e|0}function bb(a){a=a|0;var b=0,d=0;b=i;a=a+136|0;d=c[a>>2]|0;if(!(ab(d+224|0,d+1|0)|0)){d=0;i=b;return d|0}d=(cb((c[a>>2]|0)+224|0)|0)==0;d=d?1:2;i=b;return d|0}function cb(a){a=a|0;var b=0,d=0,e=0;b=i;d=c[a>>2]<<1;c[a>>2]=d;if(!(d&65534)){Ab(a);d=c[a>>2]|0}e=c[a+4>>2]<<17;if((d|0)<(e|0)){e=0;i=b;return e|0}c[a>>2]=d-e;e=1;i=b;return e|0}function db(a){a=a|0;var b=0,d=0;b=i;d=a+136|0;a=(cb((c[d>>2]|0)+224|0)|0)<<1;a=(cb((c[d>>2]|0)+224|0)|0|a)<<1;a=(cb((c[d>>2]|0)+224|0)|0|a)<<1;a=(cb((c[d>>2]|0)+224|0)|0|a)<<1;a=cb((c[d>>2]|0)+224|0)|0|a;i=b;return a|0}function eb(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[(c[a+20
function hc(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;d=d>>>1;f=1<<f;h=0-f|0;f=f+ -1|0;j=0;while(1){l=c;m=0;while(1){k=a+(m<<1)|0;n=(b[l>>1]|0)+(e[k>>1]|0)|0;if(n&h)n=0-n>>31&f;b[k>>1]=n;m=m+1|0;if((m|0)==16)break;else l=l+2|0}j=j+1|0;if((j|0)==16)break;else{c=c+32|0;a=a+(d<<1)|0}}i=g;return}function ic(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;d=d>>>1;f=1<<f;h=0-f|0;f=f+ -1|0;j=0;while(1){l=c;m=0;while(1){k=a+(m<<1)|0;n=(b[l>>1]|0)+(e[k>>1]|0)|0;if(n&h)n=0-n>>31&f;b[k>>1]=n;m=m+1|0;if((m|0)==32)break;else l=l+2|0}j=j+1|0;if((j|0)==32)break;else{c=c+64|0;a=a+(d<<1)|0}}i=g;return}function jc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;c=c<<16>>16;d=15-d-c|0;c=1<<c;if((d|0)>0){f=1<<d+ -1;if((c|0)>0){h=a;a=0}else{i=e;return}while(1){j=h;g=0;while(1){b[j>>1]=(b[j>>1]|0)+f>>d;g=g+1|0;if((g|0)==(c|0))break;else j=j+2|0}a=a+1|0;if((a|0)==(c|0))break;else h=h+(c<<1)|0}i=e;return}if((c|0)<=0){i=e;return}d=0-d|0;f=0;while(1){g=a;h=0;while(1){b[g>>1]=b[g>>1]<<d;h=h+1|0;if((h|0)==(c|0))break;else g=g+2|0}f=f+1|0;if((f|0)==(c|0))break;else a=a+(c<<1)|0}i=e;return}function kc(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0,j=0,k=0;f=i;c=1<<(c<<16>>16);if(d){d=c+ -1|0;if((d|0)<=0){i=f;return}g=(c|0)>0;h=0;do{if(g){j=0;do{k=a+(j+c<<1)|0;b[k>>1]=(e[k>>1]|0)+(e[a+(j<<1)>>1]|0);j=j+1|0}while((j|0)!=(c|0))}a=a+(c<<1)|0;h=h+1|0}while((h|0)!=(d|0));i=f;return}if((c|0)<=0){i=f;return}d=(c|0)>1;h=0;while(1){if(d){j=b[a>>1]|0;g=1;do{k=a+(g<<1)|0;j=(e[k>>1]|0)+(j&65535)&65535;b[k>>1]=j;g=g+1|0}while((g|0)!=(c|0))}h=h+1|0;if((h|0)==(c|0))break;else a=a+(c<<1)|0}i=f;return}function lc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;e=0;g=a;while(1){q=b[g>>1]|0;n=g+16|0;o=b[n>>1]|0;h=o+q|0;f=g+24|0;p=b[f>>1]|0;m=p+o|0;j=q-p|0;l=g+8|0;k=(b[l>>1]|0)*74|0;p=((q-o+p|0)*74|0)+64|0;o=p>>7;if((o+32768|0)>>>0>65535)o=p>>31^32767;b[n>>1]=o;o=(h*29|0)+64+(m*55|0)+k|0;n=o>>7;if((n+32768|0)>>>0>65535)n=o>>31^32767;b[g>>1]=n;m=($(m,-29)|0)+64+(j*55|0)+k|0;n=m>>7;if((n+32768|0)>>>0>65535)n=m>>31^32767;b[l>>1]=n;j=(h*55|0)+64+(j*29|0)-k|0;h=j>>7;if((h+32768|0)>>>0>65535)h=j>>31^32767;b[f>>1]=h;e=e+1|0;if((e|0)==4)break;else g=g+2|0}e=20-c|0;c=1<<e+ -1;g=0;while(1){p=b[a>>1]|0;n=a+4|0;q=b[n>>1]|0;l=q+p|0;f=a+6|0;o=b[f>>1]|0;m=o+q|0;h=p-o|0;k=a+2|0;j=(b[k>>1]|0)*74|0;o=((p-q+o|0)*74|0)+c>>e;if((o+32768|0)>>>0>65535)o=o>>31^32767;b[n>>1]=o;n=(l*29|0)+c+(m*55|0)+j>>e;if((n+32768|0)>>>0>65535)n=n>>31^32767;b[a>>1]=n;m=($(m,-29)|0)+c+(h*55|0)+j>>e;if((m+32768|0)>>>0>65535)m=m>>31^32767;b[k>>1]=m;h=(l*55|0)+c+(h*29|0)-j>>e;if((h+32768|0)>>>0>65535)h=h>>31^32767;b[f>>1]=h;g=g+1|0;if((g|0)==4)break;else a=a+8|0}i=d;return}function mc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=i;e=0;g=a;while(1){n=b[g>>1]<<6;k=g+16|0;m=b[k>>1]<<6;j=m+n|0;m=n-m|0;n=g+8|0;l=b[n>>1]|0;f=g+24|0;o=b[f>>1]|0;h=(o*36|0)+(l*83|0)|0;l=($(o,-83)|0)+(l*36|0)|0;o=j+64+h|0;p=o>>7;if((p+32768|0)>>>0>65535)p=o>>31^32767;b[g>>1]=p;p=m+64+l|0;o=p>>7;if((o+32768|0)>>>0>65535)o=p>>31^32767;b[n>>1]=o;l=m-l+64|0;m=l>>7;if((m+32768|0)>>>0>65535)m=l>>31^32767;b[k>>1]=m;j=j-h+64|0;h=j>>7;if((h+32768|0)>>>0>65535)h=j>>31^32767;b[f>>1]=h;e=e+1|0;if((e|0)==4)break;else g=g+2|0}e=20-d|0;d=1<<e+ -1;g=0;while(1){n=b[a>>1]<<6;k=a+4|0;o=b[k>>1]<<6;m=a+2|0;l=b[m>>1]|0;f=a+6|0;j=b[f>>1]|0;h=(j*36|0)+(l*83|0)|0;l=($(j,-83)|0)+(l*36|0)|0;j=o+n+d|0;p=j+h>>e;if((p+32768|0)>>>0>65535)p=p>>31^32767;b[a>>1]=p;n=n-o+d|0;o=n+l>>e;if((o+32768|0)>>>0>65535)o=o>>31^32767;b[m>>1]=o;l=n-l>>e;if((l+32768|0)>>>0>65535)l=l>>31^32767;b[k>>1]=l;h=j-h>>e;if((h+32768|0)>>>0>65535)h=h>>31^32767;b[f>>1]=h;g=g+1|0;if((g|0)==4)break;else a=a+8|0}i=c;return}function nc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;j=i;i=i+64|0;r=j+48|0;p=j+32|0;g=j+16|0;h=j;q=(e|0)>8;s=e+4|0;k=r+4|0;l=r+8|0;m=r+12|0;o=0;s=(s|0)>8?8:s;n=d;while(1){c[p+0>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;w=(s|0)>1;t=0;do{if(w){v=p+(t<<2)|0;u=c[v>>2]|0;x=1;do{u=($(b[n+(x<<3<<1)>>1]|0,a[1664+(x<<2<<5)+t>>0]|0)|0
// EMSCRIPTEN_END_FUNCS
var za=[we,Oc];var Aa=[xe,uc];var Ba=[ye,Pd,Qd,Rd,ec,xc,yc,Od];var Ca=[ze,vc,wc,ze];var Da=[Ae,Ob];var Ea=[Be,lc,qc,rc,sc,tc,Hc,sd];var Fa=[Ce,Mc];var Ga=[De,Lb,Nb,De];var Ha=[Ee,jc,kc,mc,nc,oc,pc,Ee];var Ia=[Fe,Mb];var Ja=[Ge,zc,Ac,Ge];var Ka=[He,Rb];var La=[Ie,Nc];var Ma=[Je,fc,gc,hc,ic,Je,Je,Je];return{_i64Subtract:Zd,_free:Td,_bpg_decoder_decode:Kd,_bpg_decoder_start:Id,_realloc:Ud,_i64Add:_d,_bpg_decoder_open:Jd,_bitshift64Ashr:Yd,_strlen:$d,_bpg_decoder_close:Md,_memset:ae,_malloc:Sd,_memcpy:ce,_bpg_decoder_get_line:Fd,_bpg_decoder_get_info:Ed,_llvm_bswap_i32:Xd,_bitshift64Shl:be,runPostSets:Wd,stackAlloc:Na,stackSave:Oa,stackRestore:Pa,setThrew:Qa,setTempRet0:Ta,getTempRet0:Ua,dynCall_iiii:ie,dynCall_viiiiiiiiii:je,dynCall_viiiiiii:ke,dynCall_viiiiiiiiiiiii:le,dynCall_vi:me,dynCall_vii:ne,dynCall_iiiiiii:oe,dynCall_ii:pe,dynCall_viii:qe,dynCall_iiiii:re,dynCall_viiiiii:se,dynCall_iii:te,dynCall_iiiiii:ue,dynCall_viiii:ve}})
// EMSCRIPTEN_END_ASM
(l.v,l.w,T),Ra=l._i64Subtract=Z._i64Subtract;l._free=Z._free;l._bpg_decoder_decode=Z._bpg_decoder_decode;l._bpg_decoder_start=Z._bpg_decoder_start;l._realloc=Z._realloc;var Sa=l._i64Add=Z._i64Add;l._bpg_decoder_open=Z._bpg_decoder_open;
var Qa=l._bitshift64Ashr=Z._bitshift64Ashr,Ta=l._strlen=Z._strlen;l._bpg_decoder_close=Z._bpg_decoder_close;var Ua=l._memset=Z._memset,ua=l._malloc=Z._malloc,Ya=l._memcpy=Z._memcpy;l._bpg_decoder_get_line=Z._bpg_decoder_get_line;l._bpg_decoder_get_info=Z._bpg_decoder_get_info;var Pa=l._llvm_bswap_i32=Z._llvm_bswap_i32,Va=l._bitshift64Shl=Z._bitshift64Shl;l.runPostSets=Z.runPostSets;l.dynCall_iiii=Z.dynCall_iiii;l.dynCall_viiiiiiiiii=Z.dynCall_viiiiiiiiii;l.dynCall_viiiiiii=Z.dynCall_viiiiiii;
l.dynCall_viiiiiiiiiiiii=Z.dynCall_viiiiiiiiiiiii;l.dynCall_vi=Z.dynCall_vi;l.dynCall_vii=Z.dynCall_vii;l.dynCall_iiiiiii=Z.dynCall_iiiiiii;l.dynCall_ii=Z.dynCall_ii;l.dynCall_viii=Z.dynCall_viii;l.dynCall_iiiii=Z.dynCall_iiiii;l.dynCall_viiiiii=Z.dynCall_viiiiii;l.dynCall_iii=Z.dynCall_iii;l.dynCall_iiiiii=Z.dynCall_iiiiii;l.dynCall_viiii=Z.dynCall_viiii;z.d=Z.stackAlloc;z.m=Z.stackSave;z.q=Z.stackRestore;z.M=Z.setTempRet0;z.J=Z.getTempRet0;
if(X)if("function"===typeof l.locateFile?X=l.locateFile(X):l.memoryInitializerPrefixURL&&(X=l.memoryInitializerPrefixURL+X),u||w){var ab=l.readBinary(X);Q.set(ab,R)}else Ma(),Browser.V(X,function(a){Q.set(a,R);Na()},function(){b("could not load memory initializer "+X)});function ea(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}ea.prototype=Error();var $=k,W=function bb(){!l.calledRun&&cb&&db();l.calledRun||(W=bb)};
function db(){function a(){if(!l.calledRun&&(l.calledRun=i,!F)){Ha||(Ha=i,U(Da));U(Ea);v&&$!==k&&l.a("pre-main prep time: "+(Date.now()-$)+" ms");if(l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;)Ja(l.postRun.shift());U(Ga)}}$===k&&($=Date.now());if(!(0<V)){if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;)Ia(l.preRun.shift());U(Ca);!(0<V)&&!l.calledRun&&(l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},
1);a()},1)):a())}}l.run=l.fa=db;l.exit=l.W=function(a){l.noExitRuntime||(F=i,y=h,U(Fa),u?(process.stdout.once("drain",function(){process.exit(a)}),console.log(" "),setTimeout(function(){process.exit(a)},500)):w&&"function"===typeof quit&&quit(a),b(new ea(a)))};function A(a){a&&(l.print(a),l.a(a));F=i;b("abort() at "+va()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.")}l.abort=l.abort=A;
if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.pop()();var cb=i;l.noInitialRun&&(cb=!1);db();window.BPGDecoder=function(a){this.H=a;this.onload=this.imageData=k};
window.BPGDecoder.prototype={p:l.cwrap("malloc","number",["number"]),n:l.cwrap("free","void",["number"]),D:l.cwrap("bpg_decoder_open","number",[]),A:l.cwrap("bpg_decoder_decode","number",["number","array","number"]),B:l.cwrap("bpg_decoder_get_info","number",["number","number"]),F:l.cwrap("bpg_decoder_start","number",["number","number"]),C:l.cwrap("bpg_decoder_get_line","number",["number","number"]),z:l.cwrap("bpg_decoder_close","void",["number"]),load:function(a){var d=new XMLHttpRequest,c=this;d.open("get",
a,i);d.responseType="arraybuffer";d.onload=function(){var a=new Uint8Array(d.response),f,g,j,m,p,s,K,q,n;f=c.D();if(0>c.A(f,a,a.length))console.log("could not decode image");else{j=c.p(36);c.B(f,j);a=l.HEAPU32;g=a[j>>2];a=a[j+4>>2];c.n(j);c.F(f,1);p=c.p(4*g);j=c.H.createImageData(g,a);K=j.data;m=0;s=l.HEAPU8;g*=4;for(n=0;n<a;n++){c.C(f,p);for(q=0;q<g;q=q+1|0)K[m]=s[p+q|0]|0,m=m+1|0}c.n(p);c.z(f);c.imageData=j;if(c.onload)c.onload()}};d.send()}};
window.onload=function(){var a,d,c,e,f,g,j;e=document.images;d=e.length;f=[];for(a=0;a<d;a++)c=e[a],g=c.src,".bpg"==g.substr(-4,4).toLowerCase()&&(f[f.length]=c);d=f.length;for(a=0;a<d;a++){c=f[a];g=c.src;e=document.createElement("canvas");c.id&&(e.id=c.id);c.className&&(e.className=c.className);if(j=c.getAttribute("width")|0)e.style.width=j+"px";if(j=c.getAttribute("height")|0)e.style.height=j+"px";c.parentNode.replaceChild(e,c);j=e.getContext("2d");c=new BPGDecoder(j);c.onload=function(a,c){var d=
this.imageData;a.width=d.width;a.height=d.height;c.putImageData(d,0,0)}.bind(c,e,j);c.load(g)}};