libbpg/html/bpgdec8.js

93 lines
188 KiB
JavaScript
Raw Normal View History

2015-01-16 12:48:11 +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 s={},t;for(t in l)l.hasOwnProperty(t)&&(s[t]=l[t]);var u="object"===typeof process&&"function"===typeof require,v="object"===typeof window,aa="function"===typeof importScripts,ba=!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 ca=require("fs"),da=require("path");l.read=function(a,d){var a=da.normalize(a),c=ca.readFileSync(a);!c&&a!=da.resolve(a)&&(a=path.join(__dirname,"..","src",a),c=ca.readFileSync(a));c&&!d&&(c=c.toString());return c};l.readBinary=function(a){return l.read(a,i)};l.load=function(a){ea(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 fa||b(a)})}else ba?(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");w("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 ea(a){eval.call(k,a)}!l.load&&l.read&&(l.load=function(a){ea(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 s)s.hasOwnProperty(t)&&(l[t]=s[t]);
var z={P:function(a){ga=a},M:function(){return ga},m:function(){return y},s:function(a){y=a},p: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)),w(0===a%8),a/8):0}},L:function(a){return Math.max(z.p(a),z.f)},R:16,aa:function(a,d,c){return!c&&("i64"==a||"double"==a)?8:!a?Math.min(d,8):Math.min(d||(a?z.L(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:[],v: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.")},O:function(a){z.c[(a-2)/2]=k},ba: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):B("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(j){l.a("error in executing inline EM_ASM code: "+j+" on: \n\n"+e+"\n\nwith args |"+c+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),b(j)}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:{},da:function(a,d){w(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]},u:function(){var a=[],d=0;this.ha=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],j=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|j&63,c=String.fromCharCode(((c-65536)/1024|0)+55296,(c-65536)%1024+56320));a.length=0;return c};this.N=function(a){for(var a=unescape(encodeURIComponent(a)),d=[],f=0;f<a.length;f++)d.push(a.charCodeAt(f));return d}},ca: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},Q:function(a){var d=C;C=C+a|0;C=C+15&-16;return d},
b:function(a){var d=D;D=D+a|0;D=D+15&-16;D>=E&&B("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)},ga:function(a,d,c){return c?+(a>>>0)+4294967296*+(d>>>0):+(a>>>0)+4294967296*+(d|0)},t:8,f:4,S:0};
l.Runtime=z;z.addFunction=z.v;z.removeFunction=z.O;var H=!1,I,ha,ga;function w(a,d){a||B("Assertion failed: "+d)}function ia(a){var d=l["_"+a];if(!d)try{d=eval("_"+a)}catch(c){}w(d,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return d}var ja,ka;
(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.s(d)},arrayToC:function(a){var c=z.d(a.length);la(a,c);return c},stringToC:function(a){var c=0;a!==k&&(a!==h&&0!==a)&&(c=z.d((a.length<<2)+1),ma(a,c));return c}},e={string:c.stringToC,array:c.arrayToC};ka=function(a,f,g,j){var a=ia(a),F=[];if(j)for(var n=0;n<j.length;n++){var q=e[g[n]];q?(0===d&&(d=z.m()),F[n]=q(j[n])):F[n]=
j[n]}g=a.apply(k,F);"string"===f&&(g=Pointer_stringify(g));0!==d&&c.stackRestore();return g};var f=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,j={},g;for(g in c)c.hasOwnProperty(g)&&(j[g]=a(c[g]));ja=function(c,d,e){var e=e||[],f=ia(c),c=e.every(function(a){return"number"===a}),g="string"!==d;if(g&&c)return f;var n=e.map(function(a,c){return"$"+c}),d="(function("+n.join(",")+") {",q=e.length;if(!c)for(var d=d+(j.stackSave.body+";"),K=0;K<q;K++){var G=n[K],x=e[K];"number"!==
x&&(x=j[x+"ToC"],d+="var "+x.arguments+" = "+G+";",d+=x.body+";",d+=G+"="+x.returnValue+";")}e=a(function(){return f}).returnValue;d+="var ret = "+e+"("+n.join(",")+");";g||(e=a(function(){return Pointer_stringify}).returnValue,d+="ret = "+e+"(ret);");c||(d+=j.stackRestore.body+";");return eval(d+"return ret})")}})();l.cwrap=ja;l.ccall=ka;
function na(a,d,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":J[a>>0]=d;break;case "i8":J[a>>0]=d;break;case "i16":L[a>>1]=d;break;case "i32":M[a>>2]=d;break;case "i64":ha=[d>>>0,(I=d,1<=+oa(I)?0<I?(pa(+qa(I/4294967296),4294967295)|0)>>>0:~~+ra((I-+(~~I>>>0))/4294967296)>>>0:0)];M[a>>2]=ha[0];M[a+4>>2]=ha[1];break;case "float":N[a>>2]=d;break;case "double":O[a>>3]=d;break;default:B("invalid type for setValue: "+c)}}l.setValue=na;
l.getValue=function(a,d){d=d||"i8";"*"===d.charAt(d.length-1)&&(d="i32");switch(d){case "i1":return J[a>>0];case "i8":return J[a>>0];case "i16":return L[a>>1];case "i32":return M[a>>2];case "i64":return M[a>>2];case "float":return N[a>>2];case "double":return O[a>>3];default:B("invalid type for setValue: "+d)}return k};var sa=2,ta=4;l.ALLOC_NORMAL=0;l.ALLOC_STACK=1;l.ALLOC_STATIC=sa;l.ALLOC_DYNAMIC=3;l.ALLOC_NONE=ta;
function P(a,d,c,e){var f,j;"number"===typeof a?(f=i,j=a):(f=!1,j=a.length);var g="string"===typeof d?d:k,c=c==ta?e:[va,z.d,z.Q,z.b][c===h?sa:c](Math.max(j,g?1:d.length));if(f){e=c;w(0==(c&3));for(a=c+(j&-4);e<a;e+=4)M[e>>2]=0;for(a=c+j;e<a;)J[e++>>0]=0;return c}if("i8"===g)return a.subarray||a.slice?Q.set(a,c):Q.set(new Uint8Array(a),c),c;for(var e=0,m,p;e<j;){var r=a[e];"function"===typeof r&&(r=z.ea(r));f=g||d[e];0===f?e++:("i64"==f&&(f="i32"),na(c+e,r,f),p!==f&&(m=z.p(f),p=f),e+=m)}return c}
2015-10-27 10:46:00 +00:00
l.allocate=P;function wa(){var a=Error();if(!a.stack){try{b(Error(0))}catch(d){a=d}if(!a.stack)return"(no stack trace available)"}return a.stack.toString()}l.stackTrace=function(){return wa()};for(var J,Q,L,xa,M,ya,N,O,R=0,C=0,za=0,y=0,Aa=0,Ba=0,D=0,Ca=l.TOTAL_STACK||5242880,E=l.TOTAL_MEMORY||33554432,S=65536;S<E||S<2*Ca;)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);
2015-01-16 12:48:11 +00:00
w("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);J=new Int8Array(T);L=new Int16Array(T);M=new Int32Array(T);Q=new Uint8Array(T);xa=new Uint16Array(T);ya=new Uint32Array(T);N=new Float32Array(T);O=new Float64Array(T);M[0]=255;w(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=J;
l.HEAP16=L;l.HEAP32=M;l.HEAPU8=Q;l.HEAPU16=xa;l.HEAPU32=ya;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.$;"number"===typeof c?d.h===h?z.j("v",c):z.j("vi",c,[d.h]):c(d.h===h?k:d.h)}}}var Da=[],Ea=[],Fa=[],Ga=[],Ha=[],Ia=!1;function Ja(a){Da.unshift(a)}l.addOnPreRun=l.X=Ja;l.addOnInit=l.U=function(a){Ea.unshift(a)};l.addOnPreMain=l.W=function(a){Fa.unshift(a)};l.addOnExit=l.T=function(a){Ga.unshift(a)};
function Ka(a){Ha.unshift(a)}l.addOnPostRun=l.V=Ka;function La(a,d,c){a=(new z.u).N(a);c&&(a.length=c);d||a.push(0);return a}l.intArrayFromString=La;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 ma(a,d,c){a=La(a,c);for(c=0;c<a.length;)J[d+c>>0]=a[c],c+=1}l.writeStringToMemory=ma;function la(a,d){for(var c=0;c<a.length;c++)J[d+c>>0]=a[c]}l.writeArrayToMemory=la;
l.writeAsciiToMemory=function(a,d,c){for(var e=0;e<a.length;e++)J[d+e>>0]=a.charCodeAt(e);c||(J[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.fa=Math.imul;var oa=Math.abs,ra=Math.ceil,qa=Math.floor,pa=Math.min,V=0,Ma=k,X=k;function Na(){V++;l.monitorRunDependencies&&l.monitorRunDependencies(V)}l.addRunDependency=Na;
function Oa(){V--;l.monitorRunDependencies&&l.monitorRunDependencies(V);if(0==V&&(Ma!==k&&(clearInterval(Ma),Ma=k),X)){var a=X;X=k;a()}}l.removeRunDependency=Oa;l.preloadedImages={};l.preloadedAudios={};var Y=k,R=8,C=R+6112;Ea.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,176,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,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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,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,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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,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,0,0,0,0,0,0,0,0,3,1,1,0,36,56,37,56,38,56,0,0,0,0,0,0,4,0,0,0,0,0,0,0,3,1,0,16,36,56,37,56,38,56,0,0,0,0,0,0,5,0,0,0,0,0,0,0,3,0,0,16,36,56,37,56,38,56,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1,0,0,0,36,56,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,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],"i8",ta,z.t);var Pa=z.g(P(12,"i8",sa),8);w(0==Pa%8);l._bitshift64Ashr=Ra;l._i64Subtract=Sa;function Z(a){Z.J||(D=D+4095&-4096,Z.J=i,w(z.b),Z.w=z.b,z.b=function(){B("cannot dynamically allocate, sbrk now has control")});var d=D;0!=a&&Z.w(a);return d}l._i64Add=Ta;l._strlen=Ua;l._memset=Va;l._bitshift64Shl=Wa;l._llvm_bswap_i32=Xa;
function Ya(a){return 0.5!==Math.abs(a%1)?Math.round(a):a+a%2+(0>a?1:-1)}l._memcpy=Za;za=y=z.g(C);Aa=za+Ca;Ba=D=z.g(Aa);w(Ba<E,"TOTAL_MEMORY not big enough for stack");
var $a=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),ab=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.z={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};
l.A={abort:B,assert:w,min:pa,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),$.setThrew(1,0)}},invoke_viiiii:function(a,d,c,e,f,j){try{l.dynCall_viiiii(a,d,c,e,f,j)}catch(g){"number"!==typeof g&&"longjmp"!==g&&b(g),$.setThrew(1,0)}},invoke_vi:function(a,d){try{l.dynCall_vi(a,d)}catch(c){"number"!==typeof c&&"longjmp"!==c&&b(c),$.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),$.setThrew(1,0)}},invoke_iiiiiii:function(a,d,c,e,f,j,g){try{return l.dynCall_iiiiiii(a,d,c,e,f,j,g)}catch(m){"number"!==typeof m&&"longjmp"!==m&&b(m),$.setThrew(1,0)}},invoke_viiiiiiiiiiii:function(a,d,c,e,f,j,g,m,p,r,A,F,n){try{l.dynCall_viiiiiiiiiiii(a,d,c,e,f,j,g,m,p,r,A,F,n)}catch(q){"number"!==typeof q&&"longjmp"!==q&&b(q),$.setThrew(1,0)}},invoke_ii:function(a,d){try{return l.dynCall_ii(a,d)}catch(c){"number"!==typeof c&&"longjmp"!==c&&b(c),$.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),$.setThrew(1,0)}},invoke_viiiiiiiii:function(a,d,c,e,f,j,g,m,p,r){try{l.dynCall_viiiiiiiii(a,d,c,e,f,j,g,m,p,r)}catch(A){"number"!==typeof A&&"longjmp"!==A&&b(A),$.setThrew(1,0)}},invoke_iiiii:function(a,d,c,e,f){try{return l.dynCall_iiiii(a,d,c,e,f)}catch(j){"number"!==typeof j&&"longjmp"!==j&&b(j),$.setThrew(1,0)}},invoke_viiiiii:function(a,d,c,e,f,j,g){try{l.dynCall_viiiiii(a,d,c,e,f,j,g)}catch(m){"number"!==typeof m&&
"longjmp"!==m&&b(m),$.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),$.setThrew(1,0)}},invoke_iiiiii:function(a,d,c,e,f,j){try{return l.dynCall_iiiiii(a,d,c,e,f,j)}catch(g){"number"!==typeof g&&"longjmp"!==g&&b(g),$.setThrew(1,0)}},invoke_viiiiiii:function(a,d,c,e,f,j,g,m){try{l.dynCall_viiiiiii(a,d,c,e,f,j,g,m)}catch(p){"number"!==typeof p&&"longjmp"!==p&&b(p),$.setThrew(1,0)}},_sbrk:Z,_lrint:function(){return Ya.apply(k,
arguments)},_abort:function(){l.abort()},_emscripten_memcpy_big:function(a,d,c){Q.set(Q.subarray(d,d+c),a);return a},_rint:Ya,STACKTOP:y,STACK_MAX:Aa,tempDoublePtr:Pa,ABORT:H,cttz_i8:ab,ctlz_i8:$a,NaN:NaN,Infinity:Infinity};// EMSCRIPTEN_START_ASM
var $=(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_viiiii;var fa=env.invoke_vi;var ga=env.invoke_vii;var ha=env.invoke_iiiiiii;var ia=env.invoke_viiiiiiiiiiii;var ja=env.invoke_ii;var ka=env.invoke_viii;var la=env.invoke_viiiiiiiii;var ma=env.invoke_iiiii;var na=env.invoke_viiiiii;var oa=env.invoke_iii;var pa=env.invoke_iiiiii;var qa=env.invoke_viiiiiii;var ra=env._sbrk;var sa=env._lrint;var ta=env._abort;var ua=env._emscripten_memcpy_big;var va=env._rint;var wa=0.0;
// EMSCRIPTEN_START_FUNCS
2015-10-27 10:46:00 +00:00
function La(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function Ma(){return i|0}function Na(a){a=a|0;i=a}function Oa(a,b){a=a|0;b=b|0;if(!o){o=a;p=b}}function Pa(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 Qa(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 Ra(a){a=a|0;D=a}function Sa(){return D|0}function Ta(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}fe(c[b+152>>2]|0,c[b+136>>2]|0,199)|0;i=e;return}function Ua(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)){Va(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)Wa(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){Wa(b);i=e;return}if((a[f>>0]|0)!=1){i=e;return}fe(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)Xa(c[b+136>>2]|0);else Va(b);Wa(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;Ya((c[d>>2]|0)+224|0)|0;if((a[b+141>>0]|0)==1)Xa(c[d>>2]|0);else Va(b);if((c[(c[f>>2]|0)+13128>>2]|0)==1){Wa(b);i=e;return}else{fe(c[d>>2]|0,c[b+152>>2]|0,199)|0;i=e;return}}function Va(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;ad(d,1);g=a+212|0;f=c[g>>2]|0;h=0-f&7;if(h){ad(d,h);f=c[g>>2]|0}Yc((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 Wa(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 Xa(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}Yc(d,e,a);i=b;return}function Ya(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}yb(a);g=0;i=b;return g|0}function Za(a){a=a|0;var b=0;b=i;a=c[a+136>>2]|0;a=_a(a+224|0,a)|0;i=b;return a|0}function _a(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 $a(a){a=a|0;var b=0,d=0;b=i;a=a+136|0;d=c[a>>2]|0;if(!(_a(d+224|0,d+1|0)|0)){d=0;i=b;return d|0}d=(ab((c[a>>2]|0)+224|0)|0)==0;d=d?1:2;i=b;return d|0}function ab(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)){yb(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 bb(a){a=a|0;var b=0,d=0;b=i;d=a+136|0;a=(ab((c[d>>2]|0)+224|0)|0)<<1;a=(ab((c[d>>2]|0)+224|0)|0|a)<<1;a=(ab((c[d>>2]|0)+224|0)|0|a)<<1;a=(ab((c[d>>2]|0)+224|0)|0|a)<<1;a=ab((c[d>>2]|0)+224|0)|0|a;i=b;return a|0}function cb(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[(c[a+20
2015-01-16 12:48:11 +00:00
2015-10-27 10:46:00 +00:00
function ic(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 jc(a){a=a|0;var c=0,d=0,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;d=a;while(1){p=b[d>>1]|0;m=d+16|0;n=b[m>>1]|0;g=n+p|0;f=d+24|0;o=b[f>>1]|0;l=o+n|0;j=p-o|0;h=d+8|0;k=(b[h>>1]|0)*74|0;o=((p-n+o|0)*74|0)+64|0;n=o>>7;if((n+32768|0)>>>0>65535)n=o>>31^32767;b[m>>1]=n;m=(g*29|0)+64+(l*55|0)+k|0;n=m>>7;if((n+32768|0)>>>0>65535)n=m>>31^32767;b[d>>1]=n;l=($(l,-29)|0)+64+(j*55|0)+k|0;m=l>>7;if((m+32768|0)>>>0>65535)m=l>>31^32767;b[h>>1]=m;g=(g*55|0)+64+(j*29|0)-k|0;h=g>>7;if((h+32768|0)>>>0>65535)h=g>>31^32767;b[f>>1]=h;e=e+1|0;if((e|0)==4){d=0;break}else d=d+2|0}while(1){p=b[a>>1]|0;l=a+4|0;m=b[l>>1]|0;g=m+p|0;e=a+6|0;n=b[e>>1]|0;k=n+m|0;h=p-n|0;f=a+2|0;j=(b[f>>1]|0)*74|0;n=((p-m+n|0)*74|0)+2048|0;m=n>>12;if((m+32768|0)>>>0>65535)m=n>>31^32767;b[l>>1]=m;l=(g*29|0)+2048+(k*55|0)+j|0;m=l>>12;if((m+32768|0)>>>0>65535)m=l>>31^32767;b[a>>1]=m;k=($(k,-29)|0)+2048+(h*55|0)+j|0;l=k>>12;if((l+32768|0)>>>0>65535)l=k>>31^32767;b[f>>1]=l;f=(g*55|0)+2048+(h*29|0)-j|0;g=f>>12;if((g+32768|0)>>>0>65535)g=f>>31^32767;b[e>>1]=g;d=d+1|0;if((d|0)==4)break;else a=a+8|0}i=c;return}function kc(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;c=i;f=0;e=a;while(1){l=b[e>>1]<<6;j=e+16|0;k=b[j>>1]<<6;g=k+l|0;k=l-k|0;l=e+8|0;m=b[l>>1]|0;d=e+24|0;n=b[d>>1]|0;h=(n*36|0)+(m*83|0)|0;m=($(n,-83)|0)+(m*36|0)|0;n=g+64+h|0;o=n>>7;if((o+32768|0)>>>0>65535)o=n>>31^32767;b[e>>1]=o;o=k+64+m|0;n=o>>7;if((n+32768|0)>>>0>65535)n=o>>31^32767;b[l>>1]=n;l=k-m+64|0;k=l>>7;if((k+32768|0)>>>0>65535)k=l>>31^32767;b[j>>1]=k;h=g-h+64|0;g=h>>7;if((g+32768|0)>>>0>65535)g=h>>31^32767;b[d>>1]=g;f=f+1|0;if((f|0)==4){e=0;break}else e=e+2|0}while(1){k=b[a>>1]<<6;h=a+4|0;l=b[h>>1]<<6;g=l+k|0;l=k-l|0;k=a+2|0;j=b[k>>1]|0;d=a+6|0;m=b[d>>1]|0;f=(m*36|0)+(j*83|0)|0;j=($(m,-83)|0)+(j*36|0)|0;m=g+2048+f|0;n=m>>12;if((n+32768|0)>>>0>65535)n=m>>31^32767;b[a>>1]=n;m=l+2048+j|0;n=m>>12;if((n+32768|0)>>>0>65535)n=m>>31^32767;b[k>>1]=n;k=l-j+2048|0;j=k>>12;if((j+32768|0)>>>0>65535)j=k>>31^32767;b[h>>1]=j;f=g-f+2048|0;g=f>>12;if((g+32768|0)>>>0>65535)g=f>>31^32767;b[d>>1]=g;e=e+1|0;if((e|0)==4)break;else a=a+8|0}i=c;return}function lc(d,e){d=d|0;e=e|0;var f=0,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;h=i;i=i+64|0;j=h+48|0;p=h+32|0;f=h+16|0;g=h;q=(e|0)>8;r=e+4|0;k=j+4|0;l=j+8|0;m=j+12|0;o=0;r=(r|0)>8?8:r;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=(r|0)>1;s=0;do{if(w){t=p+(s<<2)|0;v=c[t>>2]|0;u=1;do{v=($(b[n+(u<<3<<1)>>1]|0,a[1664+(u<<2<<5)+s>>0]|0)|0)+v|0;u=u+2|0}while((u|0)<(r|0));c[t>>2]=v}s=s+1|0}while((s|0)!=4);v=b[n>>1]<<6;u=b[n+64>>1]<<6;w=u+v|0;u=v-u|0;v=b[n+32>>1]|0;t=b[n+96>>1]|0;s=(t*36|0)+(v*83|0)|0;v=($(t,-83)|0)+(v*36|0)|0;t=s+w|0;c[j>>2]=t;c[k>>2]=v+u;c[l>>2]=u-v;c[m>>2]=w-s;s=0;while(1){u=c[p+(s<<2)>>2]|0;v=t+64+u|0;w=v>>7;if((w+32768|0)>>>0>65535)w=v>>31^32767;b[n+(s<<3<<1)>>1]=w;t=t-u+64|0;u=t>>7;if((u+32768|0)>>>0>65535)u=t>>31^32767;b[n+(7-s<<3<<1)>>1]=u;s=s+1|0;if((s|0)==4)break;t=c[j+(s<<2)>>2]|0}if((r|0)<8)r=(o&3|0)==0&(o|0)!=0?r+ -4|0:r;o=o+1|0;if((o|0)==8)break;else n=n+2|0}j=q?8:e;n=(j|0)>1;k=f+4|0;l=f+8|0;m=f+12|0;o=0;while(1){c[g+0>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;e=0;do{if(n){r=g+(e<<2)|0;p=c[r>>2]|0;q=1;do{p=($(b[d+(q<<1)>>1]|0,a[1664+(q<<2<<5)+e>>0]|0)|0)+p|0;q=q+2|0}while((q|0)<(j|0));c[r>>2]=p}e=e+1|0}while((e|0)!=4);v=b[d>>1]<<6;u=b[d+8>>1]<<6;w=u+v|0;u=v-u|0;v=b[d+4>>1]|0;p=b[d+12>>1]|0;e=(p*36|0)+(v*83|0)|0;v=($(p,-83)|0)+(v*36|0)|0;p=e+w|0;c[f>>2]=p;c[k>>2]=v+u;c[l>>2]=u-v;c[m>>2]=w-e;e=0;while(1){q=c[g+(e<<2)>>2]|0;r=p+2048+q|0;s=r>>12;if((s+32768|0)>>>0>65535)s=r>>31^32767;b[d+(e<<1)>>1]=s
2015-01-16 12:48:11 +00:00
// EMSCRIPTEN_END_FUNCS
var xa=[ze,Mc];var ya=[Ae,xc,yc,Ae];var za=[Be,Mb,jc,oc,pc,qc,rc,Be];var Aa=[Ce,hc,kc,lc,mc,nc,Fc,rd];var Ba=[De,Kc];var Ca=[Ee,tc,uc,Ee];var Da=[Fe,Jb,Lb,Fe];var Ea=[Ge,dc,ec,fc,gc,ic,Ge,Ge];var Fa=[He,sc];var Ga=[Ie,Kb];var Ha=[Je,cc,vc,wc];var Ia=[Ke,Pb];var Ja=[Le,Lc];var Ka=[Me,Sd,Td,Ud,Rd,Me,Me,Me];return{_i64Subtract:$d,_free:Wd,_bpg_decoder_decode:Kd,_bpg_decoder_start:Ed,_realloc:Xd,_i64Add:ae,_bpg_decoder_open:Jd,_bitshift64Ashr:_d,_strlen:be,_bpg_decoder_get_info:Dd,_memset:ce,_malloc:Vd,_memcpy:fe,_bpg_decoder_get_line:Gd,_bpg_decoder_close:Md,_bpg_decoder_get_frame_duration:Fd,_llvm_bswap_i32:ee,_bitshift64Shl:de,runPostSets:Zd,stackAlloc:La,stackSave:Ma,stackRestore:Na,setThrew:Oa,setTempRet0:Ra,getTempRet0:Sa,dynCall_iiii:le,dynCall_viiiii:me,dynCall_vi:ne,dynCall_vii:oe,dynCall_iiiiiii:pe,dynCall_viiiiiiiiiiii:qe,dynCall_ii:re,dynCall_viii:se,dynCall_viiiiiiiii:te,dynCall_iiiii:ue,dynCall_viiiiii:ve,dynCall_iii:we,dynCall_iiiiii:xe,dynCall_viiiiiii:ye}})
// EMSCRIPTEN_END_ASM
(l.z,l.A,T),Sa=l._i64Subtract=$._i64Subtract;l._free=$._free;l._bpg_decoder_decode=$._bpg_decoder_decode;l._bpg_decoder_start=$._bpg_decoder_start;l._realloc=$._realloc;var Ta=l._i64Add=$._i64Add;l._bpg_decoder_open=$._bpg_decoder_open;
var Ra=l._bitshift64Ashr=$._bitshift64Ashr,Ua=l._strlen=$._strlen;l._bpg_decoder_get_info=$._bpg_decoder_get_info;var Va=l._memset=$._memset,va=l._malloc=$._malloc,Za=l._memcpy=$._memcpy;l._bpg_decoder_get_line=$._bpg_decoder_get_line;l._bpg_decoder_close=$._bpg_decoder_close;l._bpg_decoder_get_frame_duration=$._bpg_decoder_get_frame_duration;var Xa=l._llvm_bswap_i32=$._llvm_bswap_i32,Wa=l._bitshift64Shl=$._bitshift64Shl;l.runPostSets=$.runPostSets;l.dynCall_iiii=$.dynCall_iiii;l.dynCall_viiiii=$.dynCall_viiiii;
l.dynCall_vi=$.dynCall_vi;l.dynCall_vii=$.dynCall_vii;l.dynCall_iiiiiii=$.dynCall_iiiiiii;l.dynCall_viiiiiiiiiiii=$.dynCall_viiiiiiiiiiii;l.dynCall_ii=$.dynCall_ii;l.dynCall_viii=$.dynCall_viii;l.dynCall_viiiiiiiii=$.dynCall_viiiiiiiii;l.dynCall_iiiii=$.dynCall_iiiii;l.dynCall_viiiiii=$.dynCall_viiiiii;l.dynCall_iii=$.dynCall_iii;l.dynCall_iiiiii=$.dynCall_iiiiii;l.dynCall_viiiiiii=$.dynCall_viiiiiii;z.d=$.stackAlloc;z.m=$.stackSave;z.s=$.stackRestore;z.P=$.setTempRet0;z.M=$.getTempRet0;
if(Y)if("function"===typeof l.locateFile?Y=l.locateFile(Y):l.memoryInitializerPrefixURL&&(Y=l.memoryInitializerPrefixURL+Y),u||ba){var bb=l.readBinary(Y);Q.set(bb,R)}else Na(),Browser.Y(Y,function(a){Q.set(a,R);Oa()},function(){b("could not load memory initializer "+Y)});function fa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}fa.prototype=Error();var cb=k,X=function db(){!l.calledRun&&eb&&fb();l.calledRun||(X=db)};
function fb(){function a(){if(!l.calledRun&&(l.calledRun=i,!H)){Ia||(Ia=i,U(Ea));U(Fa);v&&cb!==k&&l.a("pre-main prep time: "+(Date.now()-cb)+" ms");if(l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;)Ka(l.postRun.shift());U(Ha)}}cb===k&&(cb=Date.now());if(!(0<V)){if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;)Ja(l.preRun.shift());U(Da);!(0<V)&&!l.calledRun&&(l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},
1);a()},1)):a())}}l.run=l.ia=fb;l.exit=l.Z=function(a){l.noExitRuntime||(H=i,y=h,U(Ga),u?(process.stdout.once("drain",function(){process.exit(a)}),console.log(" "),setTimeout(function(){process.exit(a)},500)):ba&&"function"===typeof quit&&quit(a),b(new fa(a)))};function B(a){a&&(l.print(a),l.a(a));H=i;b("abort() at "+wa()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.")}l.abort=l.abort=B;
if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.pop()();var eb=i;l.noInitialRun&&(eb=!1);fb();window.BPGDecoder=function(a){this.K=a;this.frames=this.onload=this.imageData=k;this.loop_count=0};
window.BPGDecoder.prototype={r:l.cwrap("malloc","number",["number"]),o:l.cwrap("free","void",["number"]),H:l.cwrap("bpg_decoder_open","number",[]),C:l.cwrap("bpg_decoder_decode","number",["number","array","number"]),F:l.cwrap("bpg_decoder_get_info","number",["number","number"]),I:l.cwrap("bpg_decoder_start","number",["number","number"]),D:l.cwrap("bpg_decoder_get_frame_duration","void",["number","number","number"]),G:l.cwrap("bpg_decoder_get_line","number",["number","number"]),B: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,j,g,m,p,r,A,F,n,q,K,G,x,ua,W,Qa;f=c.H();if(0>c.C(f,a,a.length))console.log("could not decode image");else{g=c.r(20);c.F(f,g);n=l.HEAPU8;m=l.HEAPU16;q=l.HEAPU32;a=q[g>>2];j=q[g+4>>2];Qa=m[g+16>>1];A=4*a;r=c.r(A);F=0;for(W=[];!(0>c.I(f,1));){c.D(f,g,g+4);ua=1E3*q[g>>2]/q[g+4>>2];m=c.K.createImageData(a,j);K=m.data;for(x=p=0;x<j;x++){c.G(f,
r);for(G=0;G<A;G=G+1|0)K[p]=n[r+G|0]|0,p=p+1|0}W[F++]={img:m,duration:ua}}c.o(r);c.o(g);c.B(f);c.loop_count=Qa;c.frames=W;c.imageData=W[0].img;if(c.onload)c.onload()}};d.send()}};
window.onload=function(){var a,d,c,e,f,j,g;e=document.images;d=e.length;f=[];for(a=0;a<d;a++)c=e[a],j=c.src,".bpg"==j.substr(-4,4).toLowerCase()&&(f[f.length]=c);d=f.length;for(a=0;a<d;a++){c=f[a];j=c.src;e=document.createElement("canvas");c.id&&(e.id=c.id);c.className&&(e.className=c.className);if(g=c.getAttribute("width")|0)e.style.width=g+"px";if(g=c.getAttribute("height")|0)e.style.height=g+"px";c.parentNode.replaceChild(e,c);g=e.getContext("2d");c=new BPGDecoder(g);c.onload=function(a,c){function d(){var a=
e.n;++a>=f.length&&(0==e.loop_count||e.q<e.loop_count?(a=0,e.q++):a=-1);0<=a&&(e.n=a,c.putImageData(f[a].img,0,0),setTimeout(d,f[a].duration))}var e=this,f=this.frames,g=f[0].img;a.width=g.width;a.height=g.height;c.putImageData(g,0,0);1<f.length&&(e.n=0,e.q=0,setTimeout(d,f[0].duration))}.bind(c,e,g);c.load(j)}};