-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
122 lines (122 loc) · 53.9 KB
/
index.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
var h;h||(h=typeof Module !== 'undefined' ? Module : {});var aa=Object.assign({},h),ba=[],ca="./this.program",da=(a,b)=>{throw b;},k="",ea;"undefined"!=typeof document&&document.currentScript&&(k=document.currentScript.src);k=0!==k.indexOf("blob:")?k.substr(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1):"";ea=a=>{document.title=a};var fa=h.print||console.log.bind(console),l=h.printErr||console.warn.bind(console);Object.assign(h,aa);aa=null;h.arguments&&(ba=h.arguments);
h.thisProgram&&(ca=h.thisProgram);h.quit&&(da=h.quit);var ha;h.wasmBinary&&(ha=h.wasmBinary);var noExitRuntime=h.noExitRuntime||!0;"object"!=typeof WebAssembly&&p("no native wasm support detected");var ia,ja=!1,ka="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function la(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ka)return ka.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function r(a,b){return a?la(t,a,b):""}
function ma(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var m=a.charCodeAt(++f);g=65536+((g&1023)<<10)|m&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0;return c-e}function v(a,b,c){return ma(a,t,b,c)}
function na(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b}var x,t,oa,pa,y,z,A,B,qa,ra=[],ta=[],ua=[],va=[],wa=[];function xa(){var a=h.preRun.shift();ra.unshift(a)}var C=0,ya=null,za=null;function p(a){if(h.onAbort)h.onAbort(a);a="Aborted("+a+")";l(a);ja=!0;throw new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");}function Aa(){return D.startsWith("data:application/octet-stream;base64,")}var D;
D="index.wasm";if(!Aa()){var Ba=D;D=h.locateFile?h.locateFile(Ba,k):k+Ba}function Ca(){var a=D;try{if(a==D&&ha)return new Uint8Array(ha);throw"both async and sync fetching of the wasm failed";}catch(b){p(b)}}function Da(){return ha||"function"!=typeof fetch?Promise.resolve().then(function(){return Ca()}):fetch(D,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+D+"'";return a.arrayBuffer()}).catch(function(){return Ca()})}
var Ea,Fa,Ja={92320:()=>"undefined"!==typeof AudioContext||"undefined"!==typeof webkitAudioContext?!0:!1,92467:()=>"undefined"!==typeof navigator.mediaDevices&&"undefined"!==typeof navigator.mediaDevices.getUserMedia||"undefined"!==typeof navigator.webkitGetUserMedia?!0:!1,92701:a=>{"undefined"===typeof h.SDL2&&(h.SDL2={});var b=h.SDL2;a?b.capture={}:b.audio={};b.$d||("undefined"!==typeof AudioContext?b.$d=new AudioContext:"undefined"!==typeof webkitAudioContext&&(b.$d=new webkitAudioContext),b.$d&&
Ga(b.$d));return void 0===b.$d?-1:0},93194:()=>h.SDL2.$d.sampleRate,93262:(a,b,c,d)=>{function e(){}function f(m){void 0!==g.capture.pe&&(clearTimeout(g.capture.pe),g.capture.pe=void 0);g.capture.se=g.$d.createMediaStreamSource(m);g.capture.be=g.$d.createScriptProcessor(b,a,1);g.capture.be.onaudioprocess=function(n){void 0!==g&&void 0!==g.capture&&(n.outputBuffer.getChannelData(0).fill(0),g.capture.xe=n.inputBuffer,Ha(c,[d]))};g.capture.se.connect(g.capture.be);g.capture.be.connect(g.$d.destination);
g.capture.stream=m}var g=h.SDL2;g.capture.te=g.$d.createBuffer(a,b,g.$d.sampleRate);g.capture.te.getChannelData(0).fill(0);g.capture.pe=setTimeout(function(){g.capture.xe=g.capture.te;Ha(c,[d])},b/g.$d.sampleRate*1E3);void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(f).catch(e):void 0!==navigator.webkitGetUserMedia&&navigator.webkitGetUserMedia({audio:!0,video:!1},f,e)},94914:(a,b,c,d)=>{var e=h.SDL2;e.audio.be=
e.$d.createScriptProcessor(b,0,a);e.audio.be.onaudioprocess=function(f){void 0!==e&&void 0!==e.audio&&(e.audio.Ce=f.outputBuffer,Ha(c,[d]))};e.audio.be.connect(e.$d.destination)},95324:(a,b)=>{for(var c=h.SDL2,d=c.capture.xe.numberOfChannels,e=0;e<d;++e){var f=c.capture.xe.getChannelData(e);if(f.length!=b)throw"Web Audio capture buffer length mismatch! Destination size: "+f.length+" samples vs expected "+b+" samples!";if(1==d)for(var g=0;g<b;++g)Ia(a+4*g,f[g]);else for(g=0;g<b;++g)Ia(a+4*(g*d+e),
f[g])}},95929:(a,b)=>{for(var c=h.SDL2,d=c.audio.Ce.numberOfChannels,e=0;e<d;++e){var f=c.audio.Ce.getChannelData(e);if(f.length!=b)throw"Web Audio output buffer length mismatch! Destination size: "+f.length+" samples vs expected "+b+" samples!";for(var g=0;g<b;++g)f[g]=A[a+(g*d+e<<2)>>2]}},96409:a=>{var b=h.SDL2;if(a){void 0!==b.capture.pe&&clearTimeout(b.capture.pe);if(void 0!==b.capture.stream){a=b.capture.stream.getAudioTracks();for(var c=0;c<a.length;c++)b.capture.stream.removeTrack(a[c]);b.capture.stream=
void 0}void 0!==b.capture.be&&(b.capture.be.onaudioprocess=function(){},b.capture.be.disconnect(),b.capture.be=void 0);void 0!==b.capture.se&&(b.capture.se.disconnect(),b.capture.se=void 0);void 0!==b.capture.te&&(b.capture.te=void 0);b.capture=void 0}else void 0!=b.audio.be&&(b.audio.be.disconnect(),b.audio.be=void 0),b.audio=void 0;void 0!==b.$d&&void 0===b.audio&&void 0===b.capture&&(b.$d.close(),b.$d=void 0)},97581:(a,b,c)=>{h.SDL2||(h.SDL2={});var d=h.SDL2;d.Me!==h.canvas&&(d.ge=h.createContext(h.canvas,
!1,!0),d.Me=h.canvas);if(d.w!==a||d.Ue!==b||d.We!==d.ge)d.image=d.ge.createImageData(a,b),d.w=a,d.Ue=b,d.We=d.ge;a=d.image.data;b=c>>2;var e=0;if("undefined"!==typeof CanvasPixelArray&&a instanceof CanvasPixelArray)for(c=a.length;e<c;){var f=y[b];a[e]=f&255;a[e+1]=f>>8&255;a[e+2]=f>>16&255;a[e+3]=255;b++;e+=4}else if(d.Oe!==a&&(d.Ne=new Int32Array(a.buffer),d.Pe=new Uint8Array(a.buffer),d.Oe=a),a=d.Ne,c=a.length,a.set(y.subarray(b,b+c)),a=d.Pe,b=3,e=b+4*c,0==c%8)for(;b<e;)a[b]=255,b=b+4|0,a[b]=255,
b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0,a[b]=255,b=b+4|0;else for(;b<e;)a[b]=255,b=b+4|0;d.ge.putImageData(d.image,0,0)},99050:(a,b,c,d,e)=>{var f=document.createElement("canvas");f.width=a;f.height=b;var g=f.getContext("2d");a=g.createImageData(a,b);b=a.data;e>>=2;var m=0,n;if("undefined"!==typeof CanvasPixelArray&&b instanceof CanvasPixelArray)for(n=b.length;m<n;){var q=y[e];b[m]=q&255;b[m+1]=q>>8&255;b[m+2]=q>>16&255;b[m+3]=q>>24&255;e++;m+=
4}else b=new Int32Array(b.buffer),n=b.length,b.set(y.subarray(e,e+n));g.putImageData(a,0,0);c=0===c&&0===d?"url("+f.toDataURL()+"), auto":"url("+f.toDataURL()+") "+c+" "+d+", auto";d=E(c.length+1);v(c,d,c.length+1);return d},100039:a=>{h.canvas&&(h.canvas.style.cursor=r(a))},100122:()=>{h.canvas&&(h.canvas.style.cursor="none")},100191:()=>window.innerWidth,100221:()=>window.innerHeight};function Ka(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}
function La(a,b,c){a.addEventListener(b,c,{once:!0})}function Ga(a){var b;b||(b=[document,document.getElementById("canvas")]);["keydown","mousedown","touchstart"].forEach(function(c){b.forEach(function(d){d&&La(d,c,()=>{"suspended"===a.state&&a.resume()})})})}function Ma(a){for(;0<a.length;)a.shift()(h)}var Na=[];function F(a){var b=Na[a];b||(a>=Na.length&&(Na.length=a+1),Na[a]=b=qa.get(a));return b}
function Ha(a,b){if("vi".includes("j")){var c=h.dynCall_vi;b&&b.length?c.apply(null,[a].concat(b)):c.call(null,a)}else F(a).apply(null,b)}
function Ia(a,b){var c="float";c.endsWith("*")&&(c="*");switch(c){case "i1":x[a>>0]=b;break;case "i8":x[a>>0]=b;break;case "i16":oa[a>>1]=b;break;case "i32":y[a>>2]=b;break;case "i64":Fa=[b>>>0,(Ea=b,1<=+Math.abs(Ea)?0<Ea?(Math.min(+Math.floor(Ea/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Ea-+(~~Ea>>>0))/4294967296)>>>0:0)];y[a>>2]=Fa[0];y[a+4>>2]=Fa[1];break;case "float":A[a>>2]=b;break;case "double":B[a>>3]=b;break;case "*":z[a>>2]=b;break;default:p("invalid type for setValue: "+c)}}
function Oa(a,b){Pa=a;Qa=b;if(Ra)if(Sa||(Sa=!0),0==a)G=function(){var d=Math.max(0,Ta+b-Ua())|0;setTimeout(Va,d)};else if(1==a)G=function(){Wa(Va)};else if(2==a){if("undefined"==typeof setImmediate){var c=[];addEventListener("message",d=>{if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);setImmediate=function(d){c.push(d);postMessage("setimmediate","*")}}G=function(){setImmediate(Va)}}}var Ua;Ua=()=>performance.now();
function Xa(a,b,c,d,e){!Ra||p("emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Ra=a;Ya=d;var f=Za;Sa=!1;Va=function(){if(!ja)if(0<$a.length){var g=Date.now(),m=$a.shift();m.ff(m.bf);if(ab){var n=ab,q=0==n%1?n-1:Math.floor(n);ab=m.df?q:(8*n+(q+.5))/9}fa('main loop blocker "'+m.name+'" took '+(Date.now()-g)+" ms");h.setStatus&&(g=h.statusMessage||"Please wait...",
m=ab,n=bb.ef,m?m<n?h.setStatus(g+" ("+(n-m)+"/"+n+")"):h.setStatus(g):h.setStatus(""));f<Za||setTimeout(Va,0)}else f<Za||(cb=cb+1|0,1==Pa&&1<Qa&&0!=cb%Qa?G():(0==Pa&&(Ta=Ua()),ja||h.preMainLoop&&!1===h.preMainLoop()||(db(a),h.postMainLoop&&h.postMainLoop()),f<Za||("object"==typeof SDL&&SDL.audio&&SDL.audio.Ye&&SDL.audio.Ye(),G())))};e||(b&&0<b?Oa(0,1E3/b):Oa(1,1),G());if(c)throw"unwind";}function eb(a){a instanceof Ka||"unwind"==a||da(1,a)}function db(a){if(!ja)try{a()}catch(b){eb(b)}}
function fb(a){setTimeout(function(){db(a)},1E4)}function gb(a){hb||(hb={});hb[a]||(hb[a]=1,l(a))}var hb,Sa=!1,G=null,Za=0,Ra=null,Ya=0,Pa=0,Qa=0,cb=0,$a=[],bb={},Ta,Va,ab,ib=!1,jb=!1,kb=[];
function mb(){function a(){jb=document.pointerLockElement===h.canvas||document.mozPointerLockElement===h.canvas||document.webkitPointerLockElement===h.canvas||document.msPointerLockElement===h.canvas}h.preloadPlugins||(h.preloadPlugins=[]);if(!nb){nb=!0;try{ob=!0}catch(c){ob=!1,l("warning: no blob constructor, cannot create blobs with mimetypes")}pb="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:ob?null:l("warning: no BlobBuilder");qb="undefined"!=
typeof window?window.URL?window.URL:window.webkitURL:void 0;h.Ge||"undefined"!=typeof qb||(l("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),h.Ge=!0);h.preloadPlugins.push({canHandle:function(c){return!h.Ge&&/\.(jpg|jpeg|png|bmp)$/i.test(c)},handle:function(c,d,e,f){var g=null;if(ob)try{g=new Blob([c],{type:rb(d)}),g.size!==c.length&&(g=new Blob([(new Uint8Array(c)).buffer],{type:rb(d)}))}catch(q){gb("Blob constructor present but fails: "+
q+"; falling back to blob builder")}g||(g=new pb,g.append((new Uint8Array(c)).buffer),g=g.getBlob());var m=qb.createObjectURL(g),n=new Image;n.onload=()=>{n.complete||p("Image "+d+" could not be decoded");var q=document.createElement("canvas");q.width=n.width;q.height=n.height;q.getContext("2d").drawImage(n,0,0);qb.revokeObjectURL(m);e&&e(c)};n.onerror=()=>{fa("Image "+m+" could not be decoded");f&&f()};n.src=m}});h.preloadPlugins.push({canHandle:function(c){return!h.lf&&c.substr(-4)in{".ogg":1,".wav":1,
".mp3":1}},handle:function(c,d,e,f){function g(){n||(n=!0,e&&e(c))}function m(){n||(n=!0,new Audio,f&&f())}var n=!1;if(ob){try{var q=new Blob([c],{type:rb(d)})}catch(w){return m()}q=qb.createObjectURL(q);var u=new Audio;u.addEventListener("canplaythrough",()=>g(u),!1);u.onerror=function(){if(!n){l("warning: browser could not fully decode audio "+d+", trying slower base64 approach");for(var w="",O=0,K=0,sa=0;sa<c.length;sa++)for(O=O<<8|c[sa],K+=8;6<=K;){var lb=O>>K-6&63;K-=6;w+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[lb]}2==
K?(w+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(O&3)<<4],w+="=="):4==K&&(w+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(O&15)<<2],w+="=");u.src="data:audio/x-"+d.substr(-3)+";base64,"+w;g(u)}};u.src=q;fb(function(){g(u)})}else return m()}});var b=h.canvas;b&&(b.requestPointerLock=b.requestPointerLock||b.mozRequestPointerLock||b.webkitRequestPointerLock||b.msRequestPointerLock||(()=>{}),b.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||
document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),b.exitPointerLock=b.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),h.elementPointerLock&&b.addEventListener("click",c=>{!jb&&h.canvas.requestPointerLock&&(h.canvas.requestPointerLock(),c.preventDefault())},!1))}}
function sb(a,b,c,d){if(b&&h.ge&&a==h.canvas)return h.ge;var e;if(b){var f={antialias:!1,alpha:!1,Fe:1};if(d)for(var g in d)f[g]=d[g];if("undefined"!=typeof tb&&(e=ub(a,f)))var m=H[e].ke}else m=a.getContext("2d");if(!m)return null;c&&(b||"undefined"==typeof I||p("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.ge=m,b&&vb(e),h.$e=b,kb.forEach(function(n){n()}),mb());return m}var wb=!1,xb=void 0,yb=void 0;
function zb(a,b){function c(){ib=!1;var f=d.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===f?(d.exitFullscreen=Ab,xb&&d.requestPointerLock(),ib=!0,yb?("undefined"!=typeof SDL&&(y[SDL.screen>>2]=z[SDL.screen>>2]|8388608),Bb(h.canvas),Cb()):Bb(d)):(f.parentNode.insertBefore(d,f),f.parentNode.removeChild(f),yb?("undefined"!=typeof SDL&&(y[SDL.screen>>2]=z[SDL.screen>>2]&
-8388609),Bb(h.canvas),Cb()):Bb(d));if(h.onFullScreen)h.onFullScreen(ib);if(h.onFullscreen)h.onFullscreen(ib)}xb=a;yb=b;"undefined"==typeof xb&&(xb=!0);"undefined"==typeof yb&&(yb=!1);var d=h.canvas;wb||(wb=!0,document.addEventListener("fullscreenchange",c,!1),document.addEventListener("mozfullscreenchange",c,!1),document.addEventListener("webkitfullscreenchange",c,!1),document.addEventListener("MSFullscreenChange",c,!1));var e=document.createElement("div");d.parentNode.insertBefore(e,d);e.appendChild(d);
e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||(e.webkitRequestFullscreen?()=>e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(e.webkitRequestFullScreen?()=>e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null);e.requestFullscreen()}
function Ab(){if(!ib)return!1;(document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]);return!0}var Db=0;function Wa(a){if("function"==typeof requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===Db)Db=b+1E3/60;else for(;b+2>=Db;)Db+=1E3/60;setTimeout(a,Math.max(Db-b,0))}}
function rb(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var Eb=[];function Cb(){var a=h.canvas;Eb.forEach(function(b){b(a.width,a.height)})}
function Bb(a,b,c){b&&c?(a.af=b,a.Ve=c):(b=a.af,c=a.Ve);var d=b,e=c;h.forcedAspectRatio&&0<h.forcedAspectRatio&&(d/e<h.forcedAspectRatio?d=Math.round(e*h.forcedAspectRatio):e=Math.round(d/h.forcedAspectRatio));if((document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===a.parentNode&&"undefined"!=typeof screen){var f=Math.min(screen.width/d,screen.height/e);d=Math.round(d*f);e=Math.round(e*
f)}yb?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))}
var nb,ob,pb,qb,J=12288,Fb=!1,Gb=0,Hb=0,Ib=0,L={alpha:!1,depth:!1,stencil:!1,antialias:!1},Jb={},Kb;function Lb(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,e,f){b.drawArraysInstancedANGLE(c,d,e,f)},a.drawElementsInstanced=function(c,d,e,f,g){b.drawElementsInstancedANGLE(c,d,e,f,g)})}
function Mb(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function Nb(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}var Ob=1,M=[],N=[],Pb=[],Qb=[],Rb=[],P=[],Sb=[],H=[],Q=[],Tb={},Ub=4;
function R(a){Vb||(Vb=a)}function S(a){for(var b=Ob++,c=a.length;c<b;c++)a[c]=null;return b}function Wb(a,b,c){for(var d="",e=0;e<a;++e){var f=c?y[c+4*e>>2]:-1;d+=r(y[b+4*e>>2],0>f?void 0:f)}return d}function ub(a,b){a.qe||(a.qe=a.getContext,a.getContext=function(d,e){e=a.qe(d,e);return"webgl"==d==e instanceof WebGLRenderingContext?e:null});var c=a.getContext("webgl",b);return c?Xb(c,b):0}
function Xb(a,b){var c=S(H),d={gf:c,attributes:b,version:b.Fe,ke:a};a.canvas&&(a.canvas.oe=d);H[c]=d;("undefined"==typeof b.Re||b.Re)&&Yb(d);return c}function vb(a){Zb=H[a];h.ge=I=Zb&&Zb.ke}function Yb(a){a||(a=Zb);if(!a.Xe){a.Xe=!0;var b=a.ke;Lb(b);Mb(b);Nb(b);b.ee=b.getExtension("EXT_disjoint_timer_query");b.kf=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(c){c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}}var tb={},Vb,Zb;
function $b(a){var b=na(a)+1,c=E(b);c&&ma(a,x,c,b);return c}var ac=[];function bc(a,b){ac.length=0;var c;for(b>>=2;c=t[a++];)b+=105!=c&b,ac.push(105==c?y[b]:B[b++>>1]),++b;return ac}function cc(a){var b=dc();a=a();ec(b);return a}var fc=0;function gc(){for(var a=T.length-1;0<=a;--a)hc(a);T=[];U=[]}var U=[];
function ic(a,b,c){function d(g,m){if(g.length!=m.length)return!1;for(var n in g)if(g[n]!=m[n])return!1;return!0}for(var e in U){var f=U[e];if(f.ze==a&&d(f.Ae,c))return}U.push({ze:a,Ie:b,Ae:c});U.sort(function(g,m){return g.Ie<m.Ie})}function jc(a){for(var b=0;b<U.length;++b)U[b].ze==a&&(U.splice(b,1),--b)}function kc(){if(fc&&lc.me)for(var a=0;a<U.length;++a){var b=U[a];U.splice(a,1);--a;b.ze.apply(null,b.Ae)}}var T=[];
function hc(a){var b=T[a];b.target.removeEventListener(b.ae,b.Se,b.ce);T.splice(a,1)}function V(a){function b(d){++fc;lc=a;kc();a.fe(d);kc();--fc}if(a.de)a.Se=b,a.target.addEventListener(a.ae,b,a.ce),T.push(a),mc||(va.push(gc),mc=!0);else for(var c=0;c<T.length;++c)T[c].target==a.target&&T[c].ae==a.ae&&hc(c--)}function nc(a){return a?a==window?"#window":a==screen?"#screen":a&&a.nodeName?a.nodeName:"":""}function oc(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}
var pc={},mc,lc,qc,rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc={},Dc=[0,document,window];function W(a){a=2<a?r(a):a;return Dc[a]||document.querySelector(a)}function Ec(a){return cc(function(){var b=Fc(8),c=b+4,d=Fc(a.id.length+1);v(a.id,d,a.id.length+1);if(d=W(d))y[b>>2]=d.width,y[c>>2]=d.height;return[y[b>>2],y[c>>2]]})}function Gc(a,b,c){a=W(a);if(!a)return-4;a.width=b;a.height=c;return 0}
function Hc(a,b,c){a.cf?cc(function(){var d=Fc(a.id.length+1);v(a.id,d,a.id.length+1);Gc(d,b,c)}):(a.width=b,a.height=c)}
function Ic(a){function b(){document.fullscreenElement||document.webkitFullscreenElement||(document.removeEventListener("fullscreenchange",b),document.removeEventListener("webkitfullscreenchange",b),Hc(a,d,e),a.style.width=f,a.style.height=g,a.style.backgroundColor=m,n||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=n,a.style.paddingLeft=q,a.style.paddingRight=u,a.style.paddingTop=w,a.style.paddingBottom=O,a.style.marginLeft=K,a.style.marginRight=sa,a.style.marginTop=
lb,a.style.marginBottom=pd,document.body.style.margin=qd,document.documentElement.style.overflow=rd,document.body.scroll=sd,a.style.le=td,a.oe&&a.oe.ke.viewport(0,0,d,e),Cc.re&&F(Cc.re)(37,0,Cc.Be))}var c=Ec(a),d=c[0],e=c[1],f=a.style.width,g=a.style.height,m=a.style.backgroundColor,n=document.body.style.backgroundColor,q=a.style.paddingLeft,u=a.style.paddingRight,w=a.style.paddingTop,O=a.style.paddingBottom,K=a.style.marginLeft,sa=a.style.marginRight,lb=a.style.marginTop,pd=a.style.marginBottom,
qd=document.body.style.margin,rd=document.documentElement.style.overflow,sd=document.body.scroll,td=a.style.le;document.addEventListener("fullscreenchange",b);document.addEventListener("webkitfullscreenchange",b)}function Jc(a,b,c){a.style.paddingLeft=a.style.paddingRight=c+"px";a.style.paddingTop=a.style.paddingBottom=b+"px"}function Kc(a){return 0>Dc.indexOf(a)?a.getBoundingClientRect():{left:0,top:0}}
function Lc(a,b){if(0!=b.ye||0!=b.we){Ic(a);var c=b.Ze?innerWidth:screen.width,d=b.Ze?innerHeight:screen.height,e=Kc(a),f=e.width;e=e.height;var g=Ec(a),m=g[0];g=g[1];3==b.ye?(Jc(a,(d-e)/2,(c-f)/2),c=f,d=e):2==b.ye&&(c*g<m*d?(f=g*c/m,Jc(a,(d-f)/2,0),d=f):(f=m*d/g,Jc(a,0,(c-f)/2),c=f));a.style.backgroundColor||(a.style.backgroundColor="black");document.body.style.backgroundColor||(document.body.style.backgroundColor="black");a.style.width=c+"px";a.style.height=d+"px";1==b.Te&&(a.style.le="optimizeSpeed",
a.style.le="-moz-crisp-edges",a.style.le="-o-crisp-edges",a.style.le="-webkit-optimize-contrast",a.style.le="optimize-contrast",a.style.le="crisp-edges",a.style.le="pixelated");f=2==b.we?devicePixelRatio:1;0!=b.we&&(c=c*f|0,d=d*f|0,Hc(a,c,d),a.oe&&a.oe.ke.viewport(0,0,c,d))}if(a.requestFullscreen)a.requestFullscreen();else if(a.webkitRequestFullscreen)a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return oc()?-3:-1;Cc=b;b.re&&F(b.re)(37,0,b.Be);return 0}
function Mc(a){if(a.requestPointerLock)a.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0}
function Nc(a,b){B[a>>3]=b.timestamp;for(var c=0;c<b.axes.length;++c)B[a+8*c+16>>3]=b.axes[c];for(c=0;c<b.buttons.length;++c)B[a+8*c+528>>3]="object"==typeof b.buttons[c]?b.buttons[c].value:b.buttons[c];for(c=0;c<b.buttons.length;++c)y[a+4*c+1040>>2]="object"==typeof b.buttons[c]?b.buttons[c].pressed:1==b.buttons[c];y[a+1296>>2]=b.connected;y[a+1300>>2]=b.index;y[a+8>>2]=b.axes.length;y[a+12>>2]=b.buttons.length;v(b.id,a+1304,64);v(b.mapping,a+1368,64)}var Oc=[];
function Pc(a,b,c,d){for(var e=0;e<a;e++){var f=I[c](),g=f&&S(d);f?(f.name=g,d[g]=f):R(1282);y[b+4*e>>2]=g}}function Qc(a,b,c,d,e,f,g,m){b=N[b];if(a=I[a](b,c))d=m&&v(a.name,m,d),e&&(y[e>>2]=d),f&&(y[f>>2]=a.size),g&&(y[g>>2]=a.type)}function Rc(a,b){z[a>>2]=b;z[a+4>>2]=(b-z[a>>2])/4294967296}
function Sc(a,b,c){if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&R(1280);return;case 36345:d=0;break;case 34466:var e=I.getParameter(34467);d=e?e.length:0}if(void 0===d)switch(e=I.getParameter(a),typeof e){case "number":d=e;break;case "boolean":d=e?1:0;break;case "string":R(1280);return;case "object":if(null===e)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:d=0;break;default:R(1280);return}else{if(e instanceof Float32Array||
e instanceof Uint32Array||e instanceof Int32Array||e instanceof Array){for(a=0;a<e.length;++a)switch(c){case 0:y[b+4*a>>2]=e[a];break;case 2:A[b+4*a>>2]=e[a];break;case 4:x[b+a>>0]=e[a]?1:0}return}try{d=e.name|0}catch(f){R(1280);l("GL_INVALID_ENUM in glGet"+c+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+f+")");return}}break;default:R(1280);l("GL_INVALID_ENUM in glGet"+c+"v: Native code calling glGet"+c+"v("+a+") and it returns "+e+" of type "+typeof e+"!");return}switch(c){case 1:Rc(b,
d);break;case 0:y[b>>2]=d;break;case 2:A[b>>2]=d;break;case 4:x[b>>0]=d?1:0}}else R(1281)}function Tc(a){var b=na(a)+1,c=E(b);v(a,c,b);return c}function Uc(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function Vc(a){var b=a.ne,c=a.ve,d;if(!b)for(a.ne=b={},a.Je={},d=0;d<I.getProgramParameter(a,35718);++d){var e=I.getActiveUniform(a,d);var f=e.name;e=e.size;var g=Uc(f);g=0<g?f.slice(0,g):f;var m=a.ue;a.ue+=e;c[g]=[e,m];for(f=0;f<e;++f)b[m]=f,a.Je[m++]=g}}
function X(a){var b=I.De;if(b){var c=b.ne[a];"number"==typeof c&&(b.ne[a]=c=I.getUniformLocation(b,b.Je[a]+(0<c?"["+c+"]":"")));return c}R(1282)}function Wc(a,b,c,d){if(c)if(a=N[a],Vc(a),a=I.getUniform(a,X(b)),"number"==typeof a||"boolean"==typeof a)switch(d){case 0:y[c>>2]=a;break;case 2:A[c>>2]=a}else for(b=0;b<a.length;b++)switch(d){case 0:y[c+4*b>>2]=a[b];break;case 2:A[c+4*b>>2]=a[b]}else R(1281)}
function Xc(a,b,c,d){if(c)if(a=I.getVertexAttrib(a,b),34975==b)y[c>>2]=a&&a.name;else if("number"==typeof a||"boolean"==typeof a)switch(d){case 0:y[c>>2]=a;break;case 2:A[c>>2]=a;break;case 5:y[c>>2]=Math.fround(a)}else for(b=0;b<a.length;b++)switch(d){case 0:y[c+4*b>>2]=a[b];break;case 2:A[c+4*b>>2]=a[b];break;case 5:y[c+4*b>>2]=Math.fround(a[b])}else R(1281)}
function Yc(a,b,c,d,e){a-=5120;a=1==a?t:4==a?y:6==a?A:5==a||28922==a?z:pa;var f=31-Math.clz32(a.BYTES_PER_ELEMENT),g=Ub;return a.subarray(e>>f,e+d*(c*({5:3,6:4,8:2,29502:3,29504:4}[b-6402]||1)*(1<<f)+g-1&-g)>>f)}var Y=[],Zc=[];function $c(a,b){if(!oc())return-1;a=W(a);return a?a.requestFullscreen||a.webkitRequestFullscreen?fc&&lc.me?Lc(a,b):b.Qe?(ic(Lc,1,[a,b]),1):-2:-3:-4}
function ad(a,b){var c={target:W(2),ae:"beforeunload",de:b,fe:function(d=event){var e=F(b)(28,0,a);e&&(e=r(e));if(e)return d.preventDefault(),d.returnValue=e},ce:!0};V(c)}function bd(a,b,c,d,e,f){rc||(rc=E(256));a={target:W(a),ae:f,de:d,fe:function(g=event){var m=g.target.id?g.target.id:"",n=rc;v(nc(g.target),n+0,128);v(m,n+128,128);F(d)(e,n,b)&&g.preventDefault()},ce:c};V(a)}
function cd(a,b,c,d,e){tc||(tc=E(280));V({target:a,ae:e,de:d,fe:function(f=event){var g=tc,m=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,n=!!m;y[g>>2]=n;y[g+4>>2]=oc();var q=n?m:sc,u=q&&q.id?q.id:"";v(nc(q),g+8,128);v(u,g+136,128);y[g+264>>2]=q?q.clientWidth:0;y[g+268>>2]=q?q.clientHeight:0;y[g+272>>2]=screen.width;y[g+276>>2]=screen.height;n&&(sc=m);F(d)(19,g,b)&&f.preventDefault()},ce:c})}
function dd(a,b,c,d,e){uc||(uc=E(1432));b={target:W(2),me:!0,ae:e,de:c,fe:function(f=event){var g=uc;Nc(g,f.gamepad);F(c)(d,g,a)&&f.preventDefault()},ce:b};V(b)}
function ed(a,b,c,d,e,f){vc||(vc=E(176));a={target:W(a),me:!0,ae:f,de:d,fe:function(g){var m=vc;B[m>>3]=g.timeStamp;var n=m>>2;y[n+2]=g.location;y[n+3]=g.ctrlKey;y[n+4]=g.shiftKey;y[n+5]=g.altKey;y[n+6]=g.metaKey;y[n+7]=g.repeat;y[n+8]=g.charCode;y[n+9]=g.keyCode;y[n+10]=g.which;v(g.key||"",m+44,32);v(g.code||"",m+76,32);v(g.char||"",m+108,32);v(g.locale||"",m+140,32);F(d)(e,m,b)&&g.preventDefault()},ce:c};V(a)}
function fd(a,b,c){B[a>>3]=b.timeStamp;a>>=2;y[a+2]=b.screenX;y[a+3]=b.screenY;y[a+4]=b.clientX;y[a+5]=b.clientY;y[a+6]=b.ctrlKey;y[a+7]=b.shiftKey;y[a+8]=b.altKey;y[a+9]=b.metaKey;oa[2*a+20]=b.button;oa[2*a+21]=b.buttons;y[a+11]=b.movementX;y[a+12]=b.movementY;c=Kc(c);y[a+13]=b.clientX-c.left;y[a+14]=b.clientY-c.top}
function gd(a,b,c,d,e,f){wc||(wc=E(72));a=W(a);V({target:a,me:"mousemove"!=f&&"mouseenter"!=f&&"mouseleave"!=f,ae:f,de:d,fe:function(g=event){fd(wc,g,a);F(d)(e,wc,b)&&g.preventDefault()},ce:c})}function hd(a,b,c,d,e){xc||(xc=E(260));V({target:a,ae:e,de:d,fe:function(f=event){var g=xc,m=document.pointerLockElement||document.qe||document.Le||document.Ke;y[g>>2]=!!m;var n=m&&m.id?m.id:"";v(nc(m),g+4,128);v(n,g+132,128);F(d)(20,g,b)&&f.preventDefault()},ce:c})}
function jd(a,b,c,d){yc||(yc=E(36));a=W(a);V({target:a,ae:"resize",de:d,fe:function(e=event){if(e.target==a){var f=document.body;if(f){var g=yc;y[g>>2]=e.detail;y[g+4>>2]=f.clientWidth;y[g+8>>2]=f.clientHeight;y[g+12>>2]=innerWidth;y[g+16>>2]=innerHeight;y[g+20>>2]=outerWidth;y[g+24>>2]=outerHeight;y[g+28>>2]=pageXOffset;y[g+32>>2]=pageYOffset;F(d)(10,g,b)&&e.preventDefault()}}},ce:c})}
function kd(a,b,c,d,e,f){zc||(zc=E(1696));a=W(a);V({target:a,me:"touchstart"==f||"touchend"==f,ae:f,de:d,fe:function(g){for(var m,n={},q=g.touches,u=0;u<q.length;++u)m=q[u],m.Ee=m.He=0,n[m.identifier]=m;for(u=0;u<g.changedTouches.length;++u)m=g.changedTouches[u],m.Ee=1,n[m.identifier]=m;for(u=0;u<g.targetTouches.length;++u)n[g.targetTouches[u].identifier].He=1;q=zc;B[q>>3]=g.timeStamp;var w=q>>2;y[w+3]=g.ctrlKey;y[w+4]=g.shiftKey;y[w+5]=g.altKey;y[w+6]=g.metaKey;w+=7;var O=Kc(a),K=0;for(u in n)if(m=
n[u],y[w]=m.identifier,y[w+1]=m.screenX,y[w+2]=m.screenY,y[w+3]=m.clientX,y[w+4]=m.clientY,y[w+5]=m.pageX,y[w+6]=m.pageY,y[w+7]=m.Ee,y[w+8]=m.He,y[w+9]=m.clientX-O.left,y[w+10]=m.clientY-O.top,w+=13,31<++K)break;y[q+8>>2]=K;F(d)(e,q,b)&&g.preventDefault()},ce:c})}
function ld(a,b,c){var d=Dc[1];Ac||(Ac=E(8));V({target:d,ae:"visibilitychange",de:c,fe:function(e=event){var f=Ac,g=["hidden","visible","prerender","unloaded"].indexOf(document.visibilityState);y[f>>2]=document.hidden;y[f+4>>2]=g;F(c)(21,f,a)&&e.preventDefault()},ce:b})}
function md(a,b,c,d){Bc||(Bc=E(104));V({target:a,me:!0,ae:"wheel",de:d,fe:function(e=event){var f=Bc;fd(f,e,a);B[f+72>>3]=e.deltaX;B[f+80>>3]=e.deltaY;B[f+88>>3]=e.deltaZ;y[f+96>>2]=e.deltaMode;F(d)(9,f,b)&&e.preventDefault()},ce:c})}var nd={};
function od(){if(!ud){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ca||"./this.program"},b;for(b in nd)void 0===nd[b]?delete a[b]:a[b]=nd[b];var c=[];for(b in a)c.push(b+"="+a[b]);ud=c}return ud}var ud,vd=[null,[],[]];function wd(a){if(!noExitRuntime){if(h.onExit)h.onExit(a);ja=!0}da(a,new Ka(a))}h.requestFullscreen=function(a,b){zb(a,b)};
h.requestAnimationFrame=function(a){Wa(a)};h.setCanvasSize=function(a,b,c){Bb(h.canvas,a,b);c||Cb()};h.pauseMainLoop=function(){G=null;Za++};h.resumeMainLoop=function(){Za++;var a=Pa,b=Qa,c=Ra;Ra=null;Xa(c,0,!1,Ya,!0);Oa(a,b);G()};h.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia);window.getUserMedia(void 0)};h.createContext=function(a,b,c,d){return sb(a,b,c,d)};for(var I,Z=0;32>Z;++Z)Oc.push(Array(Z));var xd=new Float32Array(288);
for(Z=0;288>Z;++Z)Y[Z]=xd.subarray(0,Z+1);var yd=new Int32Array(288);for(Z=0;288>Z;++Z)Zc[Z]=yd.subarray(0,Z+1);
var zd={aa:function(){return 0},ab:function(){return 0},bb:function(){},cb:function(){return!0},Na:function(a){if(12448==a)return J=12288,1;J=12300;return 0},Qa:function(a,b,c,d,e){if(62E3!=a)J=12296,c=0;else{if(b)for(;;){a=y[b>>2];if(12321==a)L.alpha=0<y[b+4>>2];else if(12325==a)L.depth=0<y[b+4>>2];else if(12326==a)L.stencil=0<y[b+4>>2];else if(12337==a)a=y[b+4>>2],L.antialias=0<a;else if(12338==a)a=y[b+4>>2],L.antialias=1==a;else if(12544==a)L.hf=12547!=y[b+4>>2];else if(12344==a)break;b+=8}c&&
d||e?(e&&(y[e>>2]=1),c&&0<d&&(y[c>>2]=62002),J=12288,c=1):(J=12300,c=0)}return c},Da:function(a,b,c,d){if(62E3!=a)return J=12296,0;for(a=1;;){b=y[d>>2];if(12440==b)a=y[d+4>>2];else if(12344==b)break;else return J=12292,0;d+=8}if(2!=a)return J=12293,0;L.Fe=a-1;L.jf=0;Kb=ub(h.canvas,L);if(0!=Kb)return J=12288,vb(Kb),h.$e=!0,kb.forEach(function(e){e()}),vb(null),62004;J=12297;return 0},Fa:function(a,b){if(62E3!=a)return J=12296,0;if(62002!=b)return J=12293,0;J=12288;return 62006},Ea:function(a,b){if(62E3!=
a)return J=12296,0;if(62004!=b)return J=12294,0;a=Kb;Zb===H[a]&&(Zb=null);if("object"==typeof pc)for(var c=H[a].ke.canvas,d=0;d<T.length;++d)T[d].target!=c||hc(d--);H[a]&&H[a].ke.canvas&&(H[a].ke.canvas.oe=void 0);H[a]=null;J=12288;Gb==b&&(Gb=0);return 1},Ga:function(a,b){if(62E3!=a)return J=12296,0;if(62006!=b)return J=12301,1;Hb==b&&(Hb=0);Ib==b&&(Ib=0);J=12288;return 1},Ra:function(a,b,c,d){if(62E3!=a)return J=12296,0;if(62002!=b)return J=12293,0;if(!d)return J=12300,0;J=12288;switch(c){case 12320:return y[d>>
2]=L.alpha?32:24,1;case 12321:return y[d>>2]=L.alpha?8:0,1;case 12322:return y[d>>2]=8,1;case 12323:return y[d>>2]=8,1;case 12324:return y[d>>2]=8,1;case 12325:return y[d>>2]=L.depth?24:0,1;case 12326:return y[d>>2]=L.stencil?8:0,1;case 12327:return y[d>>2]=12344,1;case 12328:return y[d>>2]=62002,1;case 12329:return y[d>>2]=0,1;case 12330:return y[d>>2]=4096,1;case 12331:return y[d>>2]=16777216,1;case 12332:return y[d>>2]=4096,1;case 12333:return y[d>>2]=0,1;case 12334:return y[d>>2]=0,1;case 12335:return y[d>>
2]=12344,1;case 12337:return y[d>>2]=L.antialias?4:0,1;case 12338:return y[d>>2]=L.antialias?1:0,1;case 12339:return y[d>>2]=4,1;case 12340:return y[d>>2]=12344,1;case 12341:case 12342:case 12343:return y[d>>2]=-1,1;case 12345:case 12346:return y[d>>2]=0,1;case 12347:return y[d>>2]=0,1;case 12348:return y[d>>2]=1;case 12349:case 12350:return y[d>>2]=0,1;case 12351:return y[d>>2]=12430,1;case 12352:return y[d>>2]=4,1;case 12354:return y[d>>2]=0,1;default:return J=12292,0}},T:function(){J=12288;return 62E3},
Ca:function(){return J},Oa:function(a,b,c){if(62E3!=a)return J=12296,0;b&&(y[b>>2]=1);c&&(y[c>>2]=4);Fb=!0;J=12288;return 1},Ha:function(a,b,c,d){if(62E3!=a)return J=12296,0;if(0!=d&&62004!=d)return J=12294,0;if(0!=c&&62006!=c||0!=b&&62006!=b)return J=12301,0;vb(d?Kb:null);Gb=d;Ib=b;Hb=c;J=12288;return 1},Ba:function(a,b){if(62E3!=a)return J=12296,0;J=12288;if(Jb[b])return Jb[b];switch(b){case 12371:a=$b("Emscripten");break;case 12372:a=$b("1.4 Emscripten EGL");break;case 12373:a=$b("");break;case 12429:a=
$b("OpenGL_ES");break;default:return J=12300,0}return Jb[b]=a},Ia:function(){if(Fb)if(h.ge)if(h.ge.isContextLost())J=12302;else return J=12288,1;else J=12290;else J=12289;return 0},Ja:function(a,b){if(62E3!=a)return J=12296,0;0==b?Oa(0,0):Oa(1,b);J=12288;return 1},Pa:function(a){if(62E3!=a)return J=12296,0;Ib=Hb=Gb=0;Fb=!1;J=12288;return 1},Ma:function(){J=12288;return 1},La:function(){J=12288;return 1},Ua:function(a,b,c){b=bc(b,c);return Ja[a].apply(null,b)},g:function(a,b,c){b=bc(b,c);return Ja[a].apply(null,
b)},ba:function(){return Date.now()},wa:function(){if(!oc())return-1;jc(Lc);var a=Dc[1];if(a.exitFullscreen)a.fullscreenElement&&a.exitFullscreen();else if(a.webkitExitFullscreen)a.webkitFullscreenElement&&a.webkitExitFullscreen();else return-1;return 0},za:function(){jc(Mc);if(document.exitPointerLock)document.exitPointerLock();else return-1;return 0},n:function(){return devicePixelRatio},k:function(a,b,c){a=W(a);if(!a)return-4;a=Kc(a);B[b>>3]=a.width;B[c>>3]=a.height;return 0},W:function(a,b){if(0>
a||a>=qc.length)return-5;if(!qc[a])return-7;Nc(b,qc[a]);return 0},A:Ua,Ta:function(){return qc.length},Aa:function(a,b){y[a>>2]=screen.width;y[b>>2]=screen.height},Nd:function(a){I.activeTexture(a)},Md:function(a,b){I.attachShader(N[a],P[b])},sa:function(a,b){I.ee.beginQueryEXT(a,Q[b])},Ld:function(a,b,c){I.bindAttribLocation(N[a],b,r(c))},Kd:function(a,b){I.bindBuffer(a,M[b])},Jd:function(a,b){I.bindFramebuffer(a,Pb[b])},Id:function(a,b){I.bindRenderbuffer(a,Qb[b])},Hd:function(a,b){I.bindTexture(a,
Rb[b])},ka:function(a){I.bindVertexArray(Sb[a])},Gd:function(a,b,c,d){I.blendColor(a,b,c,d)},Fd:function(a){I.blendEquation(a)},Ed:function(a,b){I.blendEquationSeparate(a,b)},Dd:function(a,b){I.blendFunc(a,b)},Cd:function(a,b,c,d){I.blendFuncSeparate(a,b,c,d)},Bd:function(a,b,c,d){I.bufferData(a,c?t.subarray(c,c+b):b,d)},Ad:function(a,b,c,d){I.bufferSubData(a,b,t.subarray(d,d+c))},zd:function(a){return I.checkFramebufferStatus(a)},yd:function(a){I.clear(a)},xd:function(a,b,c,d){I.clearColor(a,b,c,
d)},wd:function(a){I.clearDepth(a)},vd:function(a){I.clearStencil(a)},ud:function(a,b,c,d){I.colorMask(!!a,!!b,!!c,!!d)},td:function(a){I.compileShader(P[a])},sd:function(a,b,c,d,e,f,g,m){I.compressedTexImage2D(a,b,c,d,e,f,m?t.subarray(m,m+g):null)},rd:function(a,b,c,d,e,f,g,m,n){I.compressedTexSubImage2D(a,b,c,d,e,f,g,n?t.subarray(n,n+m):null)},qd:function(a,b,c,d,e,f,g,m){I.copyTexImage2D(a,b,c,d,e,f,g,m)},pd:function(a,b,c,d,e,f,g,m){I.copyTexSubImage2D(a,b,c,d,e,f,g,m)},od:function(){var a=S(N),
b=I.createProgram();b.name=a;b.je=b.he=b.ie=0;b.ue=1;N[a]=b;return a},nd:function(a){var b=S(P);P[b]=I.createShader(a);return b},md:function(a){I.cullFace(a)},ld:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=M[d];e&&(I.deleteBuffer(e),e.name=0,M[d]=null)}},kd:function(a,b){for(var c=0;c<a;++c){var d=y[b+4*c>>2],e=Pb[d];e&&(I.deleteFramebuffer(e),e.name=0,Pb[d]=null)}},jd:function(a){if(a){var b=N[a];b?(I.deleteProgram(b),b.name=0,N[a]=null):R(1281)}},ua:function(a,b){for(var c=0;c<a;c++){var d=
y[b+4*c>>2],e=Q[d];e&&(I.ee.deleteQueryEXT(e),Q[d]=null)}},id:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=Qb[d];e&&(I.deleteRenderbuffer(e),e.name=0,Qb[d]=null)}},hd:function(a){if(a){var b=P[a];b?(I.deleteShader(b),P[a]=null):R(1281)}},gd:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2],e=Rb[d];e&&(I.deleteTexture(e),e.name=0,Rb[d]=null)}},ja:function(a,b){for(var c=0;c<a;c++){var d=y[b+4*c>>2];I.deleteVertexArray(Sb[d]);Sb[d]=null}},fd:function(a){I.depthFunc(a)},ed:function(a){I.depthMask(!!a)},
dd:function(a,b){I.depthRange(a,b)},cd:function(a,b){I.detachShader(N[a],P[b])},bd:function(a){I.disable(a)},ad:function(a){I.disableVertexAttribArray(a)},$c:function(a,b,c){I.drawArrays(a,b,c)},fa:function(a,b,c,d){I.drawArraysInstanced(a,b,c,d)},ga:function(a,b){for(var c=Oc[a],d=0;d<a;d++)c[d]=y[b+4*d>>2];I.drawBuffers(c)},_c:function(a,b,c,d){I.drawElements(a,b,c,d)},Pd:function(a,b,c,d,e){I.drawElementsInstanced(a,b,c,d,e)},Zc:function(a){I.enable(a)},Yc:function(a){I.enableVertexAttribArray(a)},
ra:function(a){I.ee.endQueryEXT(a)},Xc:function(){I.finish()},Wc:function(){I.flush()},Vc:function(a,b,c,d){I.framebufferRenderbuffer(a,b,c,Qb[d])},Uc:function(a,b,c,d,e){I.framebufferTexture2D(a,b,c,Rb[d],e)},Tc:function(a){I.frontFace(a)},Sc:function(a,b){Pc(a,b,"createBuffer",M)},Qc:function(a,b){Pc(a,b,"createFramebuffer",Pb)},va:function(a,b){for(var c=0;c<a;c++){var d=I.ee.createQueryEXT();if(!d){for(R(1282);c<a;)y[b+4*c++>>2]=0;break}var e=S(Q);d.name=e;Q[e]=d;y[b+4*c>>2]=e}},Pc:function(a,
b){Pc(a,b,"createRenderbuffer",Qb)},Oc:function(a,b){Pc(a,b,"createTexture",Rb)},ia:function(a,b){Pc(a,b,"createVertexArray",Sb)},Rc:function(a){I.generateMipmap(a)},Nc:function(a,b,c,d,e,f,g){Qc("getActiveAttrib",a,b,c,d,e,f,g)},Mc:function(a,b,c,d,e,f,g){Qc("getActiveUniform",a,b,c,d,e,f,g)},Lc:function(a,b,c,d){a=I.getAttachedShaders(N[a]);var e=a.length;e>b&&(e=b);y[c>>2]=e;for(b=0;b<e;++b)y[d+4*b>>2]=P.indexOf(a[b])},Kc:function(a,b){return I.getAttribLocation(N[a],r(b))},Ic:function(a,b){Sc(a,
b,4)},Hc:function(a,b,c){c?y[c>>2]=I.getBufferParameter(a,b):R(1281)},Gc:function(){var a=I.getError()||Vb;Vb=0;return a},Fc:function(a,b){Sc(a,b,2)},Ec:function(a,b,c,d){a=I.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;y[d>>2]=a},Dc:function(a,b){Sc(a,b,0)},Bc:function(a,b,c,d){a=I.getProgramInfoLog(N[a]);null===a&&(a="(unknown error)");b=0<b&&d?v(a,d,b):0;c&&(y[c>>2]=b)},Cc:function(a,b,c){if(c)if(a>=Ob)R(1281);else if(a=N[a],35716==
b)a=I.getProgramInfoLog(a),null===a&&(a="(unknown error)"),y[c>>2]=a.length+1;else if(35719==b){if(!a.je)for(b=0;b<I.getProgramParameter(a,35718);++b)a.je=Math.max(a.je,I.getActiveUniform(a,b).name.length+1);y[c>>2]=a.je}else if(35722==b){if(!a.he)for(b=0;b<I.getProgramParameter(a,35721);++b)a.he=Math.max(a.he,I.getActiveAttrib(a,b).name.length+1);y[c>>2]=a.he}else if(35381==b){if(!a.ie)for(b=0;b<I.getProgramParameter(a,35382);++b)a.ie=Math.max(a.ie,I.getActiveUniformBlockName(a,b).length+1);y[c>>
2]=a.ie}else y[c>>2]=I.getProgramParameter(a,b);else R(1281)},ma:function(a,b,c){if(c){a=I.ee.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;Rc(c,d)}else R(1281)},oa:function(a,b,c){if(c){a=I.ee.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;y[c>>2]=d}else R(1281)},la:function(a,b,c){if(c){a=I.ee.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;Rc(c,d)}else R(1281)},na:function(a,b,c){if(c){a=I.ee.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?
d=a?1:0:d=a;y[c>>2]=d}else R(1281)},pa:function(a,b,c){c?y[c>>2]=I.ee.getQueryEXT(a,b):R(1281)},Ac:function(a,b,c){c?y[c>>2]=I.getRenderbufferParameter(a,b):R(1281)},yc:function(a,b,c,d){a=I.getShaderInfoLog(P[a]);null===a&&(a="(unknown error)");b=0<b&&d?v(a,d,b):0;c&&(y[c>>2]=b)},xc:function(a,b,c,d){a=I.getShaderPrecisionFormat(a,b);y[c>>2]=a.rangeMin;y[c+4>>2]=a.rangeMax;y[d>>2]=a.precision},wc:function(a,b,c,d){if(a=I.getShaderSource(P[a]))b=0<b&&d?v(a,d,b):0,c&&(y[c>>2]=b)},zc:function(a,b,c){c?
35716==b?(a=I.getShaderInfoLog(P[a]),null===a&&(a="(unknown error)"),y[c>>2]=a?a.length+1:0):35720==b?(a=I.getShaderSource(P[a]),y[c>>2]=a?a.length+1:0):y[c>>2]=I.getShaderParameter(P[a],b):R(1281)},vc:function(a){var b=Tb[a];if(!b){switch(a){case 7939:b=I.getSupportedExtensions()||[];b=b.concat(b.map(function(d){return"GL_"+d}));b=Tc(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=I.getParameter(a))||R(1280);b=b&&Tc(b);break;case 7938:b=Tc("OpenGL ES 2.0 ("+I.getParameter(7938)+")");
break;case 35724:b=I.getParameter(35724);var c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b="OpenGL ES GLSL ES "+c[1]+" ("+b+")");b=Tc(b);break;default:R(1280)}Tb[a]=b}return b},uc:function(a,b,c){c?A[c>>2]=I.getTexParameter(a,b):R(1281)},tc:function(a,b,c){c?y[c>>2]=I.getTexParameter(a,b):R(1281)},qc:function(a,b){b=r(b);if(a=N[a]){Vc(a);var c=a.ne,d=0,e=b,f=Uc(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.ve[e])&&d<e[0]&&(d+=e[1],
c[d]=c[d]||I.getUniformLocation(a,b)))return d}else R(1281);return-1},sc:function(a,b,c){Wc(a,b,c,2)},rc:function(a,b,c){Wc(a,b,c,0)},mc:function(a,b,c){c?y[c>>2]=I.getVertexAttribOffset(a,b):R(1281)},pc:function(a,b,c){Xc(a,b,c,2)},nc:function(a,b,c){Xc(a,b,c,5)},lc:function(a,b){I.hint(a,b)},kc:function(a){return(a=M[a])?I.isBuffer(a):0},jc:function(a){return I.isEnabled(a)},ic:function(a){return(a=Pb[a])?I.isFramebuffer(a):0},hc:function(a){return(a=N[a])?I.isProgram(a):0},ta:function(a){return(a=
Q[a])?I.ee.isQueryEXT(a):0},gc:function(a){return(a=Qb[a])?I.isRenderbuffer(a):0},fc:function(a){return(a=P[a])?I.isShader(a):0},ec:function(a){return(a=Rb[a])?I.isTexture(a):0},ha:function(a){return(a=Sb[a])?I.isVertexArray(a):0},dc:function(a){I.lineWidth(a)},cc:function(a){a=N[a];I.linkProgram(a);a.ne=0;a.ve={}},bc:function(a,b){3317==a&&(Ub=b);I.pixelStorei(a,b)},ac:function(a,b){I.polygonOffset(a,b)},qa:function(a,b){I.ee.queryCounterEXT(Q[a],b)},$b:function(a,b,c,d,e,f,g){(g=Yc(f,e,c,d,g))?
I.readPixels(a,b,c,d,e,f,g):R(1280)},_b:function(){},Zb:function(a,b,c,d){I.renderbufferStorage(a,b,c,d)},Yb:function(a,b){I.sampleCoverage(a,!!b)},Xb:function(a,b,c,d){I.scissor(a,b,c,d)},Wb:function(){R(1280)},Vb:function(a,b,c,d){b=Wb(b,c,d);I.shaderSource(P[a],b)},Ub:function(a,b,c){I.stencilFunc(a,b,c)},Tb:function(a,b,c,d){I.stencilFuncSeparate(a,b,c,d)},Sb:function(a){I.stencilMask(a)},Rb:function(a,b){I.stencilMaskSeparate(a,b)},Qb:function(a,b,c){I.stencilOp(a,b,c)},Pb:function(a,b,c,d){I.stencilOpSeparate(a,
b,c,d)},Ob:function(a,b,c,d,e,f,g,m,n){I.texImage2D(a,b,c,d,e,f,g,m,n?Yc(m,g,d,e,n):null)},Nb:function(a,b,c){I.texParameterf(a,b,c)},Mb:function(a,b,c){I.texParameterf(a,b,A[c>>2])},Lb:function(a,b,c){I.texParameteri(a,b,c)},Kb:function(a,b,c){I.texParameteri(a,b,y[c>>2])},Jb:function(a,b,c,d,e,f,g,m,n){var q=null;n&&(q=Yc(m,g,e,f,n));I.texSubImage2D(a,b,c,d,e,f,g,m,q)},Ib:function(a,b){I.uniform1f(X(a),b)},Hb:function(a,b,c){if(288>=b)for(var d=Y[b-1],e=0;e<b;++e)d[e]=A[c+4*e>>2];else d=A.subarray(c>>
2,c+4*b>>2);I.uniform1fv(X(a),d)},Gb:function(a,b){I.uniform1i(X(a),b)},Fb:function(a,b,c){if(288>=b)for(var d=Zc[b-1],e=0;e<b;++e)d[e]=y[c+4*e>>2];else d=y.subarray(c>>2,c+4*b>>2);I.uniform1iv(X(a),d)},Eb:function(a,b,c){I.uniform2f(X(a),b,c)},Db:function(a,b,c){if(144>=b)for(var d=Y[2*b-1],e=0;e<2*b;e+=2)d[e]=A[c+4*e>>2],d[e+1]=A[c+(4*e+4)>>2];else d=A.subarray(c>>2,c+8*b>>2);I.uniform2fv(X(a),d)},Cb:function(a,b,c){I.uniform2i(X(a),b,c)},Bb:function(a,b,c){if(144>=b)for(var d=Zc[2*b-1],e=0;e<2*
b;e+=2)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2];else d=y.subarray(c>>2,c+8*b>>2);I.uniform2iv(X(a),d)},Ab:function(a,b,c,d){I.uniform3f(X(a),b,c,d)},zb:function(a,b,c){if(96>=b)for(var d=Y[3*b-1],e=0;e<3*b;e+=3)d[e]=A[c+4*e>>2],d[e+1]=A[c+(4*e+4)>>2],d[e+2]=A[c+(4*e+8)>>2];else d=A.subarray(c>>2,c+12*b>>2);I.uniform3fv(X(a),d)},yb:function(a,b,c,d){I.uniform3i(X(a),b,c,d)},xb:function(a,b,c){if(96>=b)for(var d=Zc[3*b-1],e=0;e<3*b;e+=3)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2],d[e+2]=y[c+(4*e+8)>>2];
else d=y.subarray(c>>2,c+12*b>>2);I.uniform3iv(X(a),d)},wb:function(a,b,c,d,e){I.uniform4f(X(a),b,c,d,e)},vb:function(a,b,c){if(72>=b){var d=Y[4*b-1],e=A;c>>=2;for(var f=0;f<4*b;f+=4){var g=c+f;d[f]=e[g];d[f+1]=e[g+1];d[f+2]=e[g+2];d[f+3]=e[g+3]}}else d=A.subarray(c>>2,c+16*b>>2);I.uniform4fv(X(a),d)},ub:function(a,b,c,d,e){I.uniform4i(X(a),b,c,d,e)},tb:function(a,b,c){if(72>=b)for(var d=Zc[4*b-1],e=0;e<4*b;e+=4)d[e]=y[c+4*e>>2],d[e+1]=y[c+(4*e+4)>>2],d[e+2]=y[c+(4*e+8)>>2],d[e+3]=y[c+(4*e+12)>>2];
else d=y.subarray(c>>2,c+16*b>>2);I.uniform4iv(X(a),d)},sb:function(a,b,c,d){if(72>=b)for(var e=Y[4*b-1],f=0;f<4*b;f+=4)e[f]=A[d+4*f>>2],e[f+1]=A[d+(4*f+4)>>2],e[f+2]=A[d+(4*f+8)>>2],e[f+3]=A[d+(4*f+12)>>2];else e=A.subarray(d>>2,d+16*b>>2);I.uniformMatrix2fv(X(a),!!c,e)},rb:function(a,b,c,d){if(32>=b)for(var e=Y[9*b-1],f=0;f<9*b;f+=9)e[f]=A[d+4*f>>2],e[f+1]=A[d+(4*f+4)>>2],e[f+2]=A[d+(4*f+8)>>2],e[f+3]=A[d+(4*f+12)>>2],e[f+4]=A[d+(4*f+16)>>2],e[f+5]=A[d+(4*f+20)>>2],e[f+6]=A[d+(4*f+24)>>2],e[f+7]=
A[d+(4*f+28)>>2],e[f+8]=A[d+(4*f+32)>>2];else e=A.subarray(d>>2,d+36*b>>2);I.uniformMatrix3fv(X(a),!!c,e)},qb:function(a,b,c,d){if(18>=b){var e=Y[16*b-1],f=A;d>>=2;for(var g=0;g<16*b;g+=16){var m=d+g;e[g]=f[m];e[g+1]=f[m+1];e[g+2]=f[m+2];e[g+3]=f[m+3];e[g+4]=f[m+4];e[g+5]=f[m+5];e[g+6]=f[m+6];e[g+7]=f[m+7];e[g+8]=f[m+8];e[g+9]=f[m+9];e[g+10]=f[m+10];e[g+11]=f[m+11];e[g+12]=f[m+12];e[g+13]=f[m+13];e[g+14]=f[m+14];e[g+15]=f[m+15]}}else e=A.subarray(d>>2,d+64*b>>2);I.uniformMatrix4fv(X(a),!!c,e)},pb:function(a){a=
N[a];I.useProgram(a);I.De=a},ob:function(a){I.validateProgram(N[a])},nb:function(a,b){I.vertexAttrib1f(a,b)},mb:function(a,b){I.vertexAttrib1f(a,A[b>>2])},lb:function(a,b,c){I.vertexAttrib2f(a,b,c)},kb:function(a,b){I.vertexAttrib2f(a,A[b>>2],A[b+4>>2])},jb:function(a,b,c,d){I.vertexAttrib3f(a,b,c,d)},ib:function(a,b){I.vertexAttrib3f(a,A[b>>2],A[b+4>>2],A[b+8>>2])},hb:function(a,b,c,d,e){I.vertexAttrib4f(a,b,c,d,e)},gb:function(a,b){I.vertexAttrib4f(a,A[b>>2],A[b+4>>2],A[b+8>>2],A[b+12>>2])},Od:function(a,
b){I.vertexAttribDivisor(a,b)},fb:function(a,b,c,d,e,f){I.vertexAttribPointer(a,b,c,!!d,e,f)},eb:function(a,b,c,d){I.viewport(a,b,c,d)},v:function(){return 0},db:function(a,b,c){t.copyWithin(a,b,b+c)},xa:function(a,b,c){return $c(a,{ye:y[c>>2],we:y[c+4>>2],Te:y[c+8>>2],Qe:b,re:y[c+12>>2],Be:y[c+16>>2]})},S:function(a,b){a=W(a);return a?a.requestPointerLock?fc&&lc.me?Mc(a):b?(ic(Mc,2,[a]),1):-2:-1:-4},Ya:function(){p("OOM")},a:function(a){eval(r(a))},X:function(){return(qc=navigator.getGamepads?navigator.getGamepads():
navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1},C:function(a,b,c){if("undefined"==typeof onbeforeunload)return-1;if(1!==c)return-5;ad(a,b);return 0},L:function(a,b,c,d){bd(a,b,c,d,12,"blur");return 0},m:Gc,t:function(a,b,c){a=W(a);if(!a)return-4;a.style.width=b+"px";a.style.height=c+"px";return 0},M:function(a,b,c,d){bd(a,b,c,d,13,"focus");return 0},E:function(a,b,c,d){if(!oc())return-1;a=W(a);if(!a)return-4;cd(a,b,c,d,"fullscreenchange");cd(a,b,c,d,"webkitfullscreenchange");
return 0},V:function(a,b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;dd(a,b,c,26,"gamepadconnected");return 0},U:function(a,b,c){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;dd(a,b,c,27,"gamepaddisconnected");return 0},H:function(a,b,c,d){ed(a,b,c,d,2,"keydown");return 0},F:function(a,b,c,d){ed(a,b,c,d,1,"keypress");return 0},G:function(a,b,c,d){ed(a,b,c,d,3,"keyup");return 0},Va:function(a,b,c){a=F(a);Xa(a,b,c)},R:function(a,b,c,d){gd(a,b,c,d,5,"mousedown");
return 0},P:function(a,b,c,d){gd(a,b,c,d,33,"mouseenter");return 0},O:function(a,b,c,d){gd(a,b,c,d,34,"mouseleave");return 0},y:function(a,b,c,d){gd(a,b,c,d,8,"mousemove");return 0},Q:function(a,b,c,d){gd(a,b,c,d,6,"mouseup");return 0},I:function(a,b,c,d){if(!document||!document.body||!(document.body.requestPointerLock||document.body.qe||document.body.Le||document.body.Ke))return-1;a=W(a);if(!a)return-4;hd(a,b,c,d,"pointerlockchange");hd(a,b,c,d,"mozpointerlockchange");hd(a,b,c,d,"webkitpointerlockchange");
hd(a,b,c,d,"mspointerlockchange");return 0},z:function(a,b,c,d){jd(a,b,c,d);return 0},J:function(a,b,c,d){kd(a,b,c,d,25,"touchcancel");return 0},w:function(a,b,c,d){kd(a,b,c,d,23,"touchend");return 0},x:function(a,b,c,d){kd(a,b,c,d,24,"touchmove");return 0},K:function(a,b,c,d){kd(a,b,c,d,22,"touchstart");return 0},D:function(a,b,c){ld(a,b,c);return 0},N:function(a,b,c,d){a=W(a);return"undefined"!=typeof a.onwheel?(md(a,b,c,d),0):-1},ya:function(a){ea(r(a))},u:function(){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep";
},Za:function(a,b){var c=0;od().forEach(function(d,e){var f=b+c;e=z[a+4*e>>2]=f;for(f=0;f<d.length;++f)x[e++>>0]=d.charCodeAt(f);x[e>>0]=0;c+=d.length+1});return 0},_a:function(a,b){var c=od();z[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});z[b>>2]=d;return 0},_:function(){return 52},$a:function(){return 52},Xa:function(){return 70},$:function(a,b,c,d){for(var e=0,f=0;f<c;f++){var g=z[b>>2],m=z[b+4>>2];b+=8;for(var n=0;n<m;n++){var q=t[g+n],u=vd[a];0===q||10===q?((1===a?fa:l)(la(u,
0)),u.length=0):u.push(q)}e+=m}z[d>>2]=e;return 0},s:function(a,b){I.attachShader(N[a],P[b])},b:function(a,b){I.bindBuffer(a,M[b])},h:function(a,b,c,d){I.bufferData(a,c?t.subarray(c,c+b):b,d)},oc:function(a){I.clear(a)},Wa:function(a,b,c,d){I.clearColor(a,b,c,d)},p:function(a){I.compileShader(P[a])},B:function(){var a=S(N),b=I.createProgram();b.name=a;b.je=b.he=b.ie=0;b.ue=1;N[a]=b;return a},r:function(a){var b=S(P);P[b]=I.createShader(a);return b},Ka:function(a){if(a){var b=N[a];b?(I.deleteProgram(b),
b.name=0,N[a]=null):R(1281)}},f:function(a,b,c,d){I.drawElements(a,b,c,d)},Z:function(a){I.enable(a)},c:function(a){I.enableVertexAttribArray(a)},i:function(a,b){Pc(a,b,"createBuffer",M)},o:function(a,b){return I.getAttribLocation(N[a],r(b))},Sa:function(a,b,c,d){a=I.getProgramInfoLog(N[a]);null===a&&(a="(unknown error)");b=0<b&&d?v(a,d,b):0;c&&(y[c>>2]=b)},Y:function(a,b,c){if(c)if(a>=Ob)R(1281);else if(a=N[a],35716==b)a=I.getProgramInfoLog(a),null===a&&(a="(unknown error)"),y[c>>2]=a.length+1;else if(35719==
b){if(!a.je)for(b=0;b<I.getProgramParameter(a,35718);++b)a.je=Math.max(a.je,I.getActiveUniform(a,b).name.length+1);y[c>>2]=a.je}else if(35722==b){if(!a.he)for(b=0;b<I.getProgramParameter(a,35721);++b)a.he=Math.max(a.he,I.getActiveAttrib(a,b).name.length+1);y[c>>2]=a.he}else if(35381==b){if(!a.ie)for(b=0;b<I.getProgramParameter(a,35382);++b)a.ie=Math.max(a.ie,I.getActiveUniformBlockName(a,b).length+1);y[c>>2]=a.ie}else y[c>>2]=I.getProgramParameter(a,b);else R(1281)},j:function(a,b){b=r(b);if(a=N[a]){Vc(a);
var c=a.ne,d=0,e=b,f=Uc(b);0<f&&(d=parseInt(b.slice(f+1))>>>0,e=b.slice(0,f));if((e=a.ve[e])&&d<e[0]&&(d+=e[1],c[d]=c[d]||I.getUniformLocation(a,b)))return d}else R(1281);return-1},ea:function(a){a=N[a];I.linkProgram(a);a.ne=0;a.ve={}},q:function(a,b,c,d){b=Wb(b,c,d);I.shaderSource(P[a],b)},ca:function(a,b){I.uniform1f(X(a),b)},e:function(a,b,c,d){I.uniform3f(X(a),b,c,d)},l:function(a,b,c,d){if(18>=b){var e=Y[16*b-1],f=A;d>>=2;for(var g=0;g<16*b;g+=16){var m=d+g;e[g]=f[m];e[g+1]=f[m+1];e[g+2]=f[m+
2];e[g+3]=f[m+3];e[g+4]=f[m+4];e[g+5]=f[m+5];e[g+6]=f[m+6];e[g+7]=f[m+7];e[g+8]=f[m+8];e[g+9]=f[m+9];e[g+10]=f[m+10];e[g+11]=f[m+11];e[g+12]=f[m+12];e[g+13]=f[m+13];e[g+14]=f[m+14];e[g+15]=f[m+15]}}else e=A.subarray(d>>2,d+64*b>>2);I.uniformMatrix4fv(X(a),!!c,e)},da:function(a){a=N[a];I.useProgram(a);I.De=a},d:function(a,b,c,d,e,f){I.vertexAttribPointer(a,b,c,!!d,e,f)},Jc:function(a,b,c,d){I.viewport(a,b,c,d)}};
(function(){function a(e){h.asm=e.exports;ia=h.asm.Qd;e=ia.buffer;h.HEAP8=x=new Int8Array(e);h.HEAP16=oa=new Int16Array(e);h.HEAP32=y=new Int32Array(e);h.HEAPU8=t=new Uint8Array(e);h.HEAPU16=pa=new Uint16Array(e);h.HEAPU32=z=new Uint32Array(e);h.HEAPF32=A=new Float32Array(e);h.HEAPF64=B=new Float64Array(e);qa=h.asm.Ud;ta.unshift(h.asm.Rd);C--;h.monitorRunDependencies&&h.monitorRunDependencies(C);0==C&&(null!==ya&&(clearInterval(ya),ya=null),za&&(e=za,za=null,e()))}function b(e){a(e.instance)}function c(e){return Da().then(function(f){return WebAssembly.instantiate(f,
d)}).then(function(f){return f}).then(e,function(f){l("failed to asynchronously prepare wasm: "+f);p(f)})}var d={a:zd};C++;h.monitorRunDependencies&&h.monitorRunDependencies(C);if(h.instantiateWasm)try{return h.instantiateWasm(d,a)}catch(e){return l("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return ha||"function"!=typeof WebAssembly.instantiateStreaming||Aa()||"function"!=typeof fetch?c(b):fetch(D,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,
d).then(b,function(f){l("wasm streaming compile failed: "+f);l("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();function E(){return(E=h.asm.Sd).apply(null,arguments)}var Ad=h._main=function(){return(Ad=h._main=h.asm.Td).apply(null,arguments)};function dc(){return(dc=h.asm.Vd).apply(null,arguments)}function ec(){return(ec=h.asm.Wd).apply(null,arguments)}function Fc(){return(Fc=h.asm.Xd).apply(null,arguments)}
h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.Yd).apply(null,arguments)};h.dynCall_ji=function(){return(h.dynCall_ji=h.asm.Zd).apply(null,arguments)};var Bd;za=function Cd(){Bd||Dd();Bd||(za=Cd)};function Ed(a=[]){var b=Ad;a.unshift(ca);var c=a.length,d=Fc(4*(c+1)),e=d>>2;a.forEach(g=>{var m=y,n=e++,q=na(g)+1,u=Fc(q);ma(g,x,u,q);m[n]=u});y[e]=0;try{var f=b(c,d);wd(f)}catch(g){eb(g)}}
function Dd(){var a=ba;function b(){if(!Bd&&(Bd=!0,h.calledRun=!0,!ja)){Ma(ta);Ma(ua);if(h.onRuntimeInitialized)h.onRuntimeInitialized();Fd&&Ed(a);if(h.postRun)for("function"==typeof h.postRun&&(h.postRun=[h.postRun]);h.postRun.length;){var c=h.postRun.shift();wa.unshift(c)}Ma(wa)}}if(!(0<C)){if(h.preRun)for("function"==typeof h.preRun&&(h.preRun=[h.preRun]);h.preRun.length;)xa();Ma(ra);0<C||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1);b()},
1)):b())}}if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();var Fd=!0;h.noInitialRun&&(Fd=!1);Dd();