commit 8f6069474591d447c6426a1cb7bee07407907096 Author: Luke Hubmayer-Werner Date: Sat Apr 18 23:04:50 2020 +0930 Initial commit diff --git a/LD46.html b/LD46.html new file mode 100644 index 0000000..b787c41 --- /dev/null +++ b/LD46.html @@ -0,0 +1,268 @@ + + + + + + + + + + + + + HTML5 canvas appears to be unsupported in the current browser.
+ Please try updating or use a different browser. +
+
+ + + +
+ + + + + + diff --git a/LD46.js b/LD46.js new file mode 100644 index 0000000..771c488 --- /dev/null +++ b/LD46.js @@ -0,0 +1,419 @@ +var Engine = { + RuntimeEnvironment: function(Module, exposedLibs) { + // The above is concatenated with generated code, and acts as the start of + // a wrapper for said code. See engine.js for the other part of the + // wrapper. + +var Module=typeof Module!=="undefined"?Module:{};var IDHandler=function(){var ids={};var size=0;this.has=function(id){return ids.hasOwnProperty(id)};this.add=function(obj){size+=1;var id=crypto.getRandomValues(new Int32Array(32))[0];ids[id]=obj;return id};this.get=function(id){return ids[id]};this.remove=function(id){size-=1;delete ids[id]};this.size=function(){return size};this.ids=ids};Module.IDHandler=new IDHandler;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}read_=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end>_emscripten_get_heap_size()){abort()}HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){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:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function makeBigInt(low,high,unsigned){return unsigned?+(low>>>0)+ +(high>>>0)*4294967296:+(low>>>0)+ +(high|0)*4294967296}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(typeof WebAssembly!=="object"){err("no native wasm support detected")}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for getValue: "+type)}return null}var wasmMemory;var wasmTable=new WebAssembly.Table({"initial":38907,"maximum":38907+0,"element":"anyfunc"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];if(!ch)return str;str+=String.fromCharCode(ch)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var PAGE_SIZE=16384;var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var DYNAMIC_BASE=7362080,DYNAMICTOP_PTR=2119008;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_TOTAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";out(what);err(what);ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="godot.javascript.opt.debug.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={"env":asmLibraryArg,"wasi_unstable":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;var ASM_CONSTS=[function(){_audioDriver_audioContext=new(window.AudioContext||window.webkitAudioContext);_audioDriver_audioInput=null;_audioDriver_inputStream=null;_audioDriver_scriptNode=null},function($0){var channelCount=_audioDriver_audioContext.destination.channelCount;try{_audioDriver_scriptNode=_audioDriver_audioContext.createScriptProcessor(0,2,channelCount)}catch(e){_audioDriver_scriptNode=_audioDriver_audioContext.createScriptProcessor(4096,2,channelCount)}_audioDriver_scriptNode.connect(_audioDriver_audioContext.destination);return _audioDriver_scriptNode.bufferSize},function($0){var INTERNAL_BUFFER_PTR=$0;var audioDriverMixFunction=cwrap("audio_driver_js_mix");var audioDriverProcessCapture=cwrap("audio_driver_process_capture",null,["number"]);_audioDriver_scriptNode.onaudioprocess=function(audioProcessingEvent){audioDriverMixFunction();var input=audioProcessingEvent.inputBuffer;var output=audioProcessingEvent.outputBuffer;var internalBuffer=HEAPF32.subarray(INTERNAL_BUFFER_PTR/HEAPF32.BYTES_PER_ELEMENT,INTERNAL_BUFFER_PTR/HEAPF32.BYTES_PER_ELEMENT+output.length*output.numberOfChannels);for(var channel=0;channel>3]);buf+=8}else if(c=="i"){buf=align_to(buf,4);args.push(HEAP32[buf>>2]);buf+=4}}return ASM_CONSTS[code].apply(null,args)}__ATINIT__.push({func:function(){___wasm_call_ctors()}});function demangle(func){return func}function demangleAll(text){var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ___lock(){}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}function ___map_file(pathname,size){___setErrNo(63);return-1}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+lengthe2.timestamp){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=function(e){done(this.error);e.preventDefault()};transaction.oncomplete=function(e){if(!errored){callback(null)}};create.sort().forEach(function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(29)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(28)}return position}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(path,opts){path=PATH_FS.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 2}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 2}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 2}return 0},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:function(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(29)}return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(29)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},getStreamFromFD:function(fd){if(!fd)fd=SYSCALLS.get();var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall10(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr();FS.unlink(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){var streaming=type==1;if(protocol){assert(streaming==(protocol==6))}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:FS.modeStringToFlags("r+"),seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr==="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=ENVIRONMENT_IS_NODE?{"protocol":subProtocols.toString()}:subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_WEB){WebSocketConstructor=window["WebSocket"]}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!=="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data==="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}else{data=new Uint8Array(data)}}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,flags){if(!flags.binary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return ERRNO_CODES.EINVAL}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>>0}function __inet_pton6_raw(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.indexOf("::")===0){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=parseInt(words[words.length-4])+parseInt(words[words.length-3])*256;words[words.length-3]=parseInt(words[words.length-2])+parseInt(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function __inet_ntop6_raw(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=__inet_ntop4_raw(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=__inet_ntop4_raw(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=__inet_ntop6_raw(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function __write_sockaddr(sa,family,addr,port){switch(family){case 2:addr=__inet_pton4_raw(addr);HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=__inet_pton6_raw(addr);HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);HEAP32[sa+4>>2]=0;HEAP32[sa+24>>2]=0;break;default:return{errno:5}}return{}}function ___syscall102(which,varargs){SYSCALLS.varargs=varargs;try{var call=SYSCALLS.get(),socketvararg=SYSCALLS.get();SYSCALLS.varargs=socketvararg;var getSocketFromFD=function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(8);return socket};var getSocketAddress=function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};switch(call){case 1:{var domain=SYSCALLS.get(),type=SYSCALLS.get(),protocol=SYSCALLS.get();var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}case 2:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.bind(sock,info.addr,info.port);return 0}case 3:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.connect(sock,info.addr,info.port);return 0}case 4:{var sock=getSocketFromFD(),backlog=SYSCALLS.get();sock.sock_ops.listen(sock,backlog);return 0}case 5:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var newsock=sock.sock_ops.accept(sock);if(addr){var res=__write_sockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport)}return newsock.stream.fd}case 6:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var res=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport);return 0}case 7:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();if(!sock.daddr){return-53}var res=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport);return 0}case 11:{var sock=getSocketFromFD(),message=SYSCALLS.get(),length=SYSCALLS.get(),flags=SYSCALLS.get(),dest=getSocketAddress(true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}else{return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}}case 12:{var sock=getSocketFromFD(),buf=SYSCALLS.get(),len=SYSCALLS.get(),flags=SYSCALLS.get(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var res=__write_sockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}case 14:{return-50}case 15:{var sock=getSocketFromFD(),level=SYSCALLS.get(),optname=SYSCALLS.get(),optval=SYSCALLS.get(),optlen=SYSCALLS.get();if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}case 16:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var addr,port;var name=HEAP32[message>>2];var namelen=HEAP32[message+4>>2];if(name){var info=__read_sockaddr(name,namelen);if(info.errno)return-info.errno;port=info.port;addr=DNS.lookup_addr(info.addr)||info.addr}var total=0;for(var i=0;i>2]}var view=new Uint8Array(total);var offset=0;for(var i=0;i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];for(var j=0;j>0]}}return sock.sock_ops.sendmsg(sock,view,0,total,addr,port)}case 17:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var total=0;for(var i=0;i>2]}var msg=sock.sock_ops.recvmsg(sock,total);if(!msg)return 0;var name=HEAP32[message>>2];if(name){var res=__write_sockaddr(name,sock.family,DNS.lookup_name(msg.addr),msg.port)}var bytesRead=0;var bytesRemaining=msg.buffer.byteLength;for(var i=0;bytesRemaining>0&&i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];if(!iovlen){continue}var length=Math.min(iovlen,bytesRemaining);var buf=msg.buffer.subarray(bytesRead,bytesRead+length);HEAPU8.set(buf,iovbase+bytesRead);bytesRead+=length;bytesRemaining-=length}return bytesRead}default:abort("unsupported socketcall syscall "+call)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall12(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr();FS.chdir(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[result>>2]=tempI64[0],HEAP32[result+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall142(which,varargs){SYSCALLS.varargs=varargs;try{var nfds=SYSCALLS.get(),readfds=SYSCALLS.get(),writefds=SYSCALLS.get(),exceptfds=SYSCALLS.get(),timeout=SYSCALLS.get();var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall15(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),mode=SYSCALLS.get();FS.chmod(path,mode);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall168(which,varargs){SYSCALLS.varargs=varargs;try{var fds=SYSCALLS.get(),nfds=SYSCALLS.get(),timeout=SYSCALLS.get();var nonzero=0;for(var i=0;i>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall183(which,varargs){SYSCALLS.varargs=varargs;try{var buf=SYSCALLS.get(),size=SYSCALLS.get();if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd);if(size>>0,(tempDouble=id,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:___setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall268(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),size=SYSCALLS.get(),buf=SYSCALLS.get();HEAP32[buf+4>>2]=4096;HEAP32[buf+40>>2]=4096;HEAP32[buf+8>>2]=1e6;HEAP32[buf+12>>2]=5e5;HEAP32[buf+16>>2]=5e5;HEAP32[buf+20>>2]=FS.nextInode;HEAP32[buf+24>>2]=1e6;HEAP32[buf+28>>2]=42;HEAP32[buf+44>>2]=2;HEAP32[buf+36>>2]=255;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall3(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),buf=SYSCALLS.get(),count=SYSCALLS.get();return FS.read(stream,HEAP8,buf,count)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall33(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),amode=SYSCALLS.get();return SYSCALLS.doAccess(path,amode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall38(which,varargs){SYSCALLS.varargs=varargs;try{var old_path=SYSCALLS.getStr(),new_path=SYSCALLS.getStr();FS.rename(old_path,new_path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall39(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),mode=SYSCALLS.get();return SYSCALLS.doMkdir(path,mode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall4(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),buf=SYSCALLS.get(),count=SYSCALLS.get();return FS.write(stream,HEAP8,buf,count)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall40(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr();FS.rmdir(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function __emscripten_syscall_munmap(addr,len){if(addr===-1||len===0){return-28}var info=SYSCALLS.mappings[addr];if(!info)return 0;if(len===info.len){var stream=FS.getStream(info.fd);SYSCALLS.doMsync(addr,stream,len,info.flags);FS.munmap(stream);SYSCALLS.mappings[addr]=null;if(info.allocated){_free(info.malloc)}}return 0}function ___syscall91(which,varargs){SYSCALLS.varargs=varargs;try{var addr=SYSCALLS.get(),len=SYSCALLS.get();return __emscripten_syscall_munmap(addr,len)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___unlock(){}function _abort(){abort()}function _emscripten_get_now(){abort()}function _emscripten_get_now_is_monotonic(){return 0||typeof performance==="object"&&performance&&typeof performance["now"]==="function"}function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if(clk_id===1&&_emscripten_get_now_is_monotonic()){now=_emscripten_get_now()}else{___setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function _dlopen(){abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function _dlclose(){return _dlopen.apply(null,arguments)}function _dlerror(){return _dlopen.apply(null,arguments)}function _dlsym(){return _dlopen.apply(null,arguments)}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){noExitRuntime=true;assert(!Browser.mainLoop.func,"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.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}if(Browser.mainLoop.method==="timeout"&&Module.ctx){err("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!=="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);if(vrDevice){canvasContainer.requestFullscreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullscreen()}},requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){err("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.");Browser.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};return Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){noExitRuntime=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){noExitRuntime=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){return _emscripten_GetProcAddress(name_)}var JSEvents={keyEvent:0,mouseEvent:0,wheelEvent:0,uiEvent:0,focusEvent:0,deviceOrientationEvent:0,deviceMotionEvent:0,fullscreenChangeEvent:0,pointerlockChangeEvent:0,visibilityChangeEvent:0,touchEvent:0,previousFullscreenElement:null,previousScreenX:null,previousScreenY:null,removeEventListenersRegistered:false,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i0||pageYOffset>0){return[pageXOffset,pageYOffset]}if(typeof document.documentElement.scrollLeft!=="undefined"||typeof document.documentElement.scrollTop!=="undefined"){return[document.documentElement.scrollLeft,document.documentElement.scrollTop]}return[document.body.scrollLeft|0,document.body.scrollTop|0]},getNodeNameForTarget:function(target){if(!target)return"";if(target==window)return"#window";if(target==screen)return"#screen";return target&&target.nodeName?target.nodeName:""},tick:function(){if(window["performance"]&&window["performance"]["now"])return window["performance"]["now"]();else return Date.now()},fullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}};function __setLetterbox(element,topBottom,leftRight){if(JSEvents.isInternetExplorer()){element.style.marginLeft=element.style.marginRight=leftRight+"px";element.style.marginTop=element.style.marginBottom=topBottom+"px"}else{element.style.paddingLeft=element.style.paddingRight=leftRight+"px";element.style.paddingTop=element.style.paddingBottom=topBottom+"px"}}function __hideEverythingExceptGivenElement(onlyVisibleElement){var child=onlyVisibleElement;var parent=child.parentNode;var hiddenElements=[];while(child!=document.body){var children=parent.children;for(var i=0;i>2]=canvas.width;HEAP32[height>>2]=canvas.height}function __get_canvas_element_size(target){var stackTop=stackSave();var w=stackAlloc(8);var h=w+4;var targetInt=stackAlloc(target.id.length+1);stringToUTF8(target.id,targetInt,target.id.length+1);var ret=_emscripten_get_canvas_element_size(targetInt,w,h);var size=[HEAP32[w>>2],HEAP32[h>>2]];stackRestore(stackTop);return size}function _emscripten_set_canvas_element_size(target,width,height){var canvas=__findCanvasEventTarget(target);if(!canvas)return-4;canvas.width=width;canvas.height=height;return 0}function __set_canvas_element_size(target,width,height){if(!target.controlTransferredOffscreen){target.width=width;target.height=height}else{var stackTop=stackSave();var targetInt=stackAlloc(target.id.length+1);stringToUTF8(target.id,targetInt,target.id.length+1);_emscripten_set_canvas_element_size(targetInt,width,height);stackRestore(stackTop)}}function __registerRestoreOldStyle(canvas){var canvasSize=__get_canvas_element_size(canvas);var oldWidth=canvasSize[0];var oldHeight=canvasSize[1];var oldCssWidth=canvas.style.width;var oldCssHeight=canvas.style.height;var oldBackgroundColor=canvas.style.backgroundColor;var oldDocumentBackgroundColor=document.body.style.backgroundColor;var oldPaddingLeft=canvas.style.paddingLeft;var oldPaddingRight=canvas.style.paddingRight;var oldPaddingTop=canvas.style.paddingTop;var oldPaddingBottom=canvas.style.paddingBottom;var oldMarginLeft=canvas.style.marginLeft;var oldMarginRight=canvas.style.marginRight;var oldMarginTop=canvas.style.marginTop;var oldMarginBottom=canvas.style.marginBottom;var oldDocumentBodyMargin=document.body.style.margin;var oldDocumentOverflow=document.documentElement.style.overflow;var oldDocumentScroll=document.body.scroll;var oldImageRendering=canvas.style.imageRendering;function restoreOldStyle(){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(!fullscreenElement){document.removeEventListener("fullscreenchange",restoreOldStyle);document.removeEventListener("mozfullscreenchange",restoreOldStyle);document.removeEventListener("webkitfullscreenchange",restoreOldStyle);document.removeEventListener("MSFullscreenChange",restoreOldStyle);__set_canvas_element_size(canvas,oldWidth,oldHeight);canvas.style.width=oldCssWidth;canvas.style.height=oldCssHeight;canvas.style.backgroundColor=oldBackgroundColor;if(!oldDocumentBackgroundColor)document.body.style.backgroundColor="white";document.body.style.backgroundColor=oldDocumentBackgroundColor;canvas.style.paddingLeft=oldPaddingLeft;canvas.style.paddingRight=oldPaddingRight;canvas.style.paddingTop=oldPaddingTop;canvas.style.paddingBottom=oldPaddingBottom;canvas.style.marginLeft=oldMarginLeft;canvas.style.marginRight=oldMarginRight;canvas.style.marginTop=oldMarginTop;canvas.style.marginBottom=oldMarginBottom;document.body.style.margin=oldDocumentBodyMargin;document.documentElement.style.overflow=oldDocumentOverflow;document.body.scroll=oldDocumentScroll;canvas.style.imageRendering=oldImageRendering;if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,oldWidth,oldHeight);if(__currentFullscreenStrategy.canvasResizedCallback){dynCall_iiii(__currentFullscreenStrategy.canvasResizedCallback,37,0,__currentFullscreenStrategy.canvasResizedCallbackUserData)}}}document.addEventListener("fullscreenchange",restoreOldStyle);document.addEventListener("mozfullscreenchange",restoreOldStyle);document.addEventListener("webkitfullscreenchange",restoreOldStyle);document.addEventListener("MSFullscreenChange",restoreOldStyle);return restoreOldStyle}function __restoreHiddenElements(hiddenElements){for(var i=0;ix*h)w=h*x/y|0;topMargin=(screenHeight-h)/2|0}if(inPixelPerfectFullscreenMode){__set_canvas_element_size(canvas,w,h);if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,w,h)}if(inHiDPIFullscreenMode){topMargin/=dpr;w/=dpr;h/=dpr;w=Math.round(w*1e4)/1e4;h=Math.round(h*1e4)/1e4;topMargin=Math.round(topMargin*1e4)/1e4}if(inCenteredWithoutScalingFullscreenMode){var t=(innerHeight-parseInt(canvas.style.height))/2;var b=(innerWidth-parseInt(canvas.style.width))/2;__setLetterbox(canvas,t,b)}else{canvas.style.width=w+"px";canvas.style.height=h+"px";var b=(innerWidth-w)/2;__setLetterbox(canvas,topMargin,b)}if(!inCenteredWithoutScalingFullscreenMode&&__currentFullscreenStrategy.canvasResizedCallback){dynCall_iiii(__currentFullscreenStrategy.canvasResizedCallback,37,0,__currentFullscreenStrategy.canvasResizedCallbackUserData)}}function _JSEvents_resizeCanvasForFullscreen(target,strategy){var restoreOldStyle=__registerRestoreOldStyle(target);var cssWidth=strategy.softFullscreen?innerWidth:screen.width;var cssHeight=strategy.softFullscreen?innerHeight:screen.height;var rect=target.getBoundingClientRect();var windowedCssWidth=rect.right-rect.left;var windowedCssHeight=rect.bottom-rect.top;var canvasSize=__get_canvas_element_size(target);var windowedRttWidth=canvasSize[0];var windowedRttHeight=canvasSize[1];if(strategy.scaleMode==3){__setLetterbox(target,(cssHeight-windowedCssHeight)/2,(cssWidth-windowedCssWidth)/2);cssWidth=windowedCssWidth;cssHeight=windowedCssHeight}else if(strategy.scaleMode==2){if(cssWidth*windowedRttHeight>2];strategy.canvasResolutionScaleMode=HEAP32[fullscreenStrategy+4>>2];strategy.filteringMode=HEAP32[fullscreenStrategy+8>>2];strategy.canvasResizedCallback=HEAP32[fullscreenStrategy+12>>2];strategy.canvasResizedCallbackUserData=HEAP32[fullscreenStrategy+16>>2];strategy.target=target;strategy.softFullscreen=true;var restoreOldStyle=_JSEvents_resizeCanvasForFullscreen(target,strategy);document.documentElement.style.overflow="hidden";document.body.scroll="no";document.body.style.margin="0px";var hiddenElements=__hideEverythingExceptGivenElement(target);function restoreWindowedState(){restoreOldStyle();__restoreHiddenElements(hiddenElements);removeEventListener("resize",__softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){dynCall_iiii(strategy.canvasResizedCallback,37,0,strategy.canvasResizedCallbackUserData)}__currentFullscreenStrategy=0}__restoreOldWindowedStyle=restoreWindowedState;__currentFullscreenStrategy=strategy;addEventListener("resize",__softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){dynCall_iiii(strategy.canvasResizedCallback,37,0,strategy.canvasResizedCallbackUserData)}return 0}function _JSEvents_requestFullscreen(target,strategy){if(strategy.scaleMode!=0||strategy.canvasResolutionScaleMode!=0){_JSEvents_resizeCanvasForFullscreen(target,strategy)}if(target.requestFullscreen){target.requestFullscreen()}else if(target.msRequestFullscreen){target.msRequestFullscreen()}else if(target.mozRequestFullScreen){target.mozRequestFullScreen()}else if(target.mozRequestFullscreen){target.mozRequestFullscreen()}else if(target.webkitRequestFullscreen){target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else{return JSEvents.fullscreenEnabled()?-3:-1}if(strategy.canvasResizedCallback){dynCall_iiii(strategy.canvasResizedCallback,37,0,strategy.canvasResizedCallbackUserData)}return 0}function _emscripten_exit_fullscreen(){if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(_JSEvents_requestFullscreen);var d=__specialEventTargets[1];if(d.exitFullscreen){d.fullscreenElement&&d.exitFullscreen()}else if(d.msExitFullscreen){d.msFullscreenElement&&d.msExitFullscreen()}else if(d.mozCancelFullScreen){d.mozFullScreenElement&&d.mozCancelFullScreen()}else if(d.webkitExitFullscreen){d.webkitFullscreenElement&&d.webkitExitFullscreen()}else{return-1}if(__currentFullscreenStrategy.canvasResizedCallback){dynCall_iiii(__currentFullscreenStrategy.canvasResizedCallback,37,0,__currentFullscreenStrategy.canvasResizedCallbackUserData);__currentFullscreenStrategy=0}return 0}function __requestPointerLock(target){if(target.requestPointerLock){target.requestPointerLock()}else if(target.mozRequestPointerLock){target.mozRequestPointerLock()}else if(target.webkitRequestPointerLock){target.webkitRequestPointerLock()}else if(target.msRequestPointerLock){target.msRequestPointerLock()}else{if(document.body.requestPointerLock||document.body.mozRequestPointerLock||document.body.webkitRequestPointerLock||document.body.msRequestPointerLock){return-3}else{return-1}}return 0}function _emscripten_exit_pointerlock(){JSEvents.removeDeferredCalls(__requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else if(document.msExitPointerLock){document.msExitPointerLock()}else if(document.mozExitPointerLock){document.mozExitPointerLock()}else if(document.webkitExitPointerLock){document.webkitExitPointerLock()}else{return-1}return 0}function _emscripten_exit_soft_fullscreen(){if(__restoreOldWindowedStyle)__restoreOldWindowedStyle();__restoreOldWindowedStyle=null;return 0}function _emscripten_get_element_css_size(target,width,height){target=target?__findEventTarget(target):Module["canvas"];if(!target)return-4;if(target.getBoundingClientRect){var rect=target.getBoundingClientRect();HEAPF64[width>>3]=rect.right-rect.left;HEAPF64[height>>3]=rect.bottom-rect.top}else{HEAPF64[width>>3]=target.clientWidth;HEAPF64[height>>3]=target.clientHeight}return 0}function __fillFullscreenChangeEventData(eventStruct,e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function _emscripten_get_fullscreen_status(fullscreenStatus){if(!JSEvents.fullscreenEnabled())return-1;__fillFullscreenChangeEventData(fullscreenStatus);return 0}function __fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;__fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_num_gamepads(){return JSEvents.lastGamepadState.length}function __fillPointerlockChangeEventData(eventStruct,e){var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP32[eventStruct>>2]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement&&pointerLockElement.id?pointerLockElement.id:"";stringToUTF8(nodeName,eventStruct+4,128);stringToUTF8(id,eventStruct+132,128)}function _emscripten_get_pointerlock_status(pointerlockStatus){if(pointerlockStatus)__fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:{},currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],queries:[],samplers:[],transformFeedbacks:[],syncs:[],programInfos:{},stringCache:{},stringiCache:{},unpackAlignment:4,init:function(){GL.miniTempBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=_malloc(8);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};function getChromeVersion(){var raw=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return raw?parseInt(raw[2],10):false}context.supportsWebGL2EntryPoints=context.version>=2&&(getChromeVersion()===false||getChromeVersion()>=58);if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;_free(GL.contexts[contextHandle]);GL.contexts[contextHandle]=null},acquireInstancedArraysExtension:function(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}},acquireVertexArrayObjectExtension:function(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)}}},acquireDrawBuffersExtension:function(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){ext["drawBuffersWEBGL"](n,bufs)}}},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){GL.acquireInstancedArraysExtension(GLctx);GL.acquireVertexArrayObjectExtension(GLctx);GL.acquireDrawBuffersExtension(GLctx)}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2"];var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2)}function _emscripten_glClearBufferiv(buffer,drawbuffer,value){GLctx["clearBufferiv"](buffer,drawbuffer,HEAP32,value>>2)}function _emscripten_glClearBufferuiv(buffer,drawbuffer,value){GLctx["clearBufferuiv"](buffer,drawbuffer,HEAPU32,value>>2)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearDepthf(x0){GLctx["clearDepth"](x0)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function _emscripten_glClientWaitSync(sync,flags,timeoutLo,timeoutHi){timeoutLo=timeoutLo>>>0;timeoutHi=timeoutHi>>>0;var timeout=timeoutLo==4294967295&&timeoutHi==4294967295?-1:makeBigInt(timeoutLo,timeoutHi,true);return GLctx.clientWaitSync(GL.syncs[sync],flags,timeout)}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,data?HEAPU8.subarray(data,data+imageSize):null)}}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,data?HEAPU8.subarray(data,data+imageSize):null)}}function _emscripten_glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _emscripten_glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){GLctx["copyTexSubImage3D"](x0,x1,x2,x3,x4,x5,x6,x7,x8)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueries(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx["deleteQuery"](query);GL.queries[id]=null}}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx["deleteSampler"](sampler);sampler.name=0;GL.samplers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteTransformFeedbacks(n,ids){for(var i=0;i>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx["deleteTransformFeedback"](transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedARB(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedEXT(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedNV(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersEXT(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedARB(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedEXT(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedNV(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQuery(x0){GLctx["endQuery"](x0)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _emscripten_glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFlushMappedBufferRange(){err("missing function: emscripten_glFlushMappedBufferRange");abort(-1)}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueries(n,ids){__glGenObject(n,ids,"createQuery",GL.queries)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenTransformFeedbacks(n,ids){__glGenObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;var numBytesWrittenExclNull=bufSize>0&&name?stringToUTF8(info.name,name,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;var numBytesWrittenExclNull=bufSize>0&&name?stringToUTF8(info.name,name,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];switch(pname){case 35393:var name=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return;default:var result=GLctx["getActiveUniformBlockParameter"](program,uniformBlockIndex,pname);if(!result)return;if(typeof result=="number"){HEAP32[params>>2]=result}else{for(var i=0;i>2]=result[i]}}}}function _emscripten_glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i>2])}var result=GLctx["getActiveUniforms"](program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 35097:case 36389:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[p>>2]=tempI64[0],HEAP32[p+4>>2]=tempI64[1];break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}tempI64=[GLctx.getBufferParameter(target,value)>>>0,(tempDouble=GLctx.getBufferParameter(target,value),+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[data>>2]=tempI64[0],HEAP32[data+4>>2]=tempI64[1]}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetBufferPointerv(){err("missing function: emscripten_glGetBufferPointerv");abort(-1)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFragDataLocation(program,name){return GLctx["getFragDataLocation"](GL.programs[program],UTF8ToString(name))}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx["getIndexedParameter"](target,index);var ret;switch(typeof result){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[data>>2]=tempI64[0],HEAP32[data+4>>2]=tempI64[1];break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data>>0]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}}function _emscripten_glGetInteger64i_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,1)}function _emscripten_glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)}function _emscripten_glGetIntegeri_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,0)}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx["getInternalformatParameter"](target,internalformat,pname);if(ret===null)return;for(var i=0;i>2]=ret[i]}}function _emscripten_glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}tempI64=[ret>>>0,(tempDouble=ret,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[params>>2]=tempI64[0],HEAP32[params+4>>2]=tempI64[1]}function _emscripten_glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx["getQueryParameter"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx["getQuery"](target,pname)}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAPF32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAP32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(GLctx.VERSION);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _emscripten_glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _emscripten_glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);HEAP32[length>>2]=ret;if(ret!==null&&length)HEAP32[length>>2]=1}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx["getTransformFeedbackVarying"](program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _emscripten_glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i>2]));var result=GLctx["getUniformIndices"](program,names);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case 2:HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetUniformuiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribIuiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glInvalidateFramebuffer(target,numAttachments,attachments){var list=__tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateFramebuffer"](target,list)}function _emscripten_glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=__tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateSubFramebuffer"](target,list,x,y,width,height)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx["isQuery"](query)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx["isSampler"](sampler)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsSync(sync){var sync=GL.syncs[sync];if(!sync)return 0;return GLctx.isSync(sync)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsTransformFeedback(id){return GLctx["isTransformFeedback"](GL.transformFeedbacks[id])}function _emscripten_glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glMapBufferRange(){err("missing function: emscripten_glMapBufferRange");abort(-1)}function _emscripten_glPauseTransformFeedback(){GLctx["pauseTransformFeedback"]()}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}function _emscripten_glProgramParameteri(program,pname,value){GL.recordError(1280)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function _emscripten_glReadBuffer(x0){GLctx["readBuffer"](x0)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}var __colorChannelsInGlTextureFormat={6402:1,6403:1,6406:1,6407:3,6408:4,6409:1,6410:2,33319:2,33320:2,35904:3,35906:4,36244:1,36248:3,36249:4};var __sizeOfGlTextureElementType={5120:1,5121:1,5122:2,5123:2,5124:4,5125:4,5126:4,5131:2,32819:2,32820:2,33635:2,33640:4,34042:4,35899:4,35902:4,36193:2};function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var sizePerPixel=__colorChannelsInGlTextureFormat[format]*__sizeOfGlTextureElementType[type];if(!sizePerPixel){GL.recordError(1280);return}var bytes=__computeUnpackAlignedImageSize(width,height,sizePerPixel,GL.unpackAlignment);var end=pixels+bytes;switch(type){case 5120:return HEAP8.subarray(pixels,end);case 5121:return HEAPU8.subarray(pixels,end);case 5122:return HEAP16.subarray(pixels>>1,end>>1);case 5124:return HEAP32.subarray(pixels>>2,end>>2);case 5126:return HEAPF32.subarray(pixels>>2,end>>2);case 5125:case 34042:case 35902:case 33640:case 35899:return HEAPU32.subarray(pixels>>2,end>>2);case 5123:case 33635:case 32819:case 32820:case 36193:case 5131:return HEAPU16.subarray(pixels>>1,end>>1);default:GL.recordError(1280)}}function __heapObjectForWebGLType(type){switch(type){case 5120:return HEAP8;case 5121:return HEAPU8;case 5122:return HEAP16;case 5123:case 33635:case 32819:case 32820:case 36193:case 5131:return HEAPU16;case 5124:return HEAP32;case 5125:case 34042:case 35902:case 33640:case 35899:case 34042:return HEAPU32;case 5126:return HEAPF32}}var __heapAccessShiftForWebGLType={5122:1,5123:1,5124:2,5125:2,5126:2,5131:1,32819:1,32820:1,33635:1,33640:2,34042:2,35899:2,35902:2,36193:1};function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{GLctx.readPixels(x,y,width,height,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _emscripten_glResumeTransformFeedback(){GLctx["resumeTransformFeedback"]()}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glSamplerParameterf(sampler,pname,param){GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteri(sampler,pname,param){GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels!=0){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels!=0){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _emscripten_glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx["texStorage3D"](x0,x1,x2,x3,x4,x5)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels!=0){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels!=0){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _emscripten_glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform1fv(GL.uniforms[location],HEAPF32,value>>2,count);return}if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform1iv(GL.uniforms[location],HEAP32,value>>2,count);return}GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _emscripten_glUniform1ui(location,v0){GLctx.uniform1ui(GL.uniforms[location],v0)}function _emscripten_glUniform1uiv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform1uiv(GL.uniforms[location],HEAPU32,value>>2,count)}else{GLctx.uniform1uiv(GL.uniforms[location],HEAPU32.subarray(value>>2,value+count*4>>2))}}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform2fv(GL.uniforms[location],HEAPF32,value>>2,count*2);return}if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform2iv(GL.uniforms[location],HEAP32,value>>2,count*2);return}GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _emscripten_glUniform2ui(location,v0,v1){GLctx.uniform2ui(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2uiv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform2uiv(GL.uniforms[location],HEAPU32,value>>2,count*2)}else{GLctx.uniform2uiv(GL.uniforms[location],HEAPU32.subarray(value>>2,value+count*8>>2))}}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform3fv(GL.uniforms[location],HEAPF32,value>>2,count*3);return}if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform3iv(GL.uniforms[location],HEAP32,value>>2,count*3);return}GLctx.uniform3iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*12>>2))}function _emscripten_glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3uiv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform3uiv(GL.uniforms[location],HEAPU32,value>>2,count*3)}else{GLctx.uniform3uiv(GL.uniforms[location],HEAPU32.subarray(value>>2,value+count*12>>2))}}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform4iv(GL.uniforms[location],HEAP32,value>>2,count*4);return}GLctx.uniform4iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*16>>2))}function _emscripten_glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4uiv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform4uiv(GL.uniforms[location],HEAPU32,value>>2,count*4)}else{GLctx.uniform4uiv(GL.uniforms[location],HEAPU32.subarray(value>>2,value+count*16>>2))}}function _emscripten_glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*4);return}if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix2x3fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix2x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}else{GLctx.uniformMatrix2x3fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*24>>2))}}function _emscripten_glUniformMatrix2x4fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix2x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}else{GLctx.uniformMatrix2x4fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*32>>2))}}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*9);return}if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3x2fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix3x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}else{GLctx.uniformMatrix3x2fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*24>>2))}}function _emscripten_glUniformMatrix3x4fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix3x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}else{GLctx.uniformMatrix3x4fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*48>>2))}}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4x2fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix4x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}else{GLctx.uniformMatrix4x2fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*32>>2))}}function _emscripten_glUniformMatrix4x3fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix4x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}else{GLctx.uniformMatrix4x3fv(GL.uniforms[location],!!transpose,HEAPF32.subarray(value>>2,value+count*48>>2))}}function _emscripten_glUnmapBuffer(){err("missing function: emscripten_glUnmapBuffer");abort(-1)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorARB(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorEXT(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorNV(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribI4i(x0,x1,x2,x3,x4){GLctx["vertexAttribI4i"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])}function _emscripten_glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])}function _emscripten_glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_glWaitSync(sync,flags,timeoutLo,timeoutHi){timeoutLo=timeoutLo>>>0;timeoutHi=timeoutHi>>>0;var timeout=timeoutLo==4294967295&&timeoutHi==4294967295?-1:makeBigInt(timeoutLo,timeoutHi,true);GLctx.waitSync(GL.syncs[sync],flags,timeout)}var setjmpId=0;function _saveSetjmp(env,label,table,size){env=env|0;label=label|0;table=table|0;size=size|0;var i=0;setjmpId=setjmpId+1|0;HEAP32[env>>2]=setjmpId;while((i|0)<(size|0)){if((HEAP32[table+(i<<3)>>2]|0)==0){HEAP32[table+(i<<3)>>2]=setjmpId;HEAP32[table+((i<<3)+4)>>2]=label;HEAP32[table+((i<<3)+8)>>2]=0;setTempRet0(size|0);return table|0}i=i+1|0}size=size*2|0;table=_realloc(table|0,8*(size+1|0)|0)|0;table=_saveSetjmp(env|0,label|0,table|0,size|0)|0;setTempRet0(size|0);return table|0}function _testSetjmp(id,table,size){id=id|0;table=table|0;size=size|0;var i=0,curr=0;while((i|0)<(size|0)){curr=HEAP32[table+(i<<3)>>2]|0;if((curr|0)==0)break;if((curr|0)==(id|0)){return HEAP32[table+((i<<3)+4)>>2]|0}i=i+1|0}return 0}function _longjmp(env,value){_setThrew(env,value||1);throw"longjmp"}function _emscripten_longjmp(env,value){_longjmp(env,value)}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function __emscripten_do_request_fullscreen(target,strategy){if(!JSEvents.fullscreenEnabled())return-1;if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestFullscreen&&!target.msRequestFullscreen&&!target.mozRequestFullScreen&&!target.mozRequestFullscreen&&!target.webkitRequestFullscreen){return-3}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(strategy.deferUntilInEventHandler){JSEvents.deferCall(_JSEvents_requestFullscreen,1,[target,strategy]);return 1}else{return-2}}return _JSEvents_requestFullscreen(target,strategy)}function _emscripten_request_fullscreen_strategy(target,deferUntilInEventHandler,fullscreenStrategy){var strategy={};strategy.scaleMode=HEAP32[fullscreenStrategy>>2];strategy.canvasResolutionScaleMode=HEAP32[fullscreenStrategy+4>>2];strategy.filteringMode=HEAP32[fullscreenStrategy+8>>2];strategy.deferUntilInEventHandler=deferUntilInEventHandler;strategy.canvasResizedCallback=HEAP32[fullscreenStrategy+12>>2];strategy.canvasResizedCallbackUserData=HEAP32[fullscreenStrategy+16>>2];__currentFullscreenStrategy=strategy;return __emscripten_do_request_fullscreen(target,strategy)}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){if(!target)target="#canvas";target=__findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.mozRequestPointerLock&&!target.webkitRequestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(__requestPointerLock,2,[target]);return 1}else{return-2}}return __requestPointerLock(target)}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize>2]=e.location;HEAP32[keyEventData+68>>2]=e.ctrlKey;HEAP32[keyEventData+72>>2]=e.shiftKey;HEAP32[keyEventData+76>>2]=e.altKey;HEAP32[keyEventData+80>>2]=e.metaKey;HEAP32[keyEventData+84>>2]=e.repeat;stringToUTF8(e.locale?e.locale:"",keyEventData+88,32);stringToUTF8(e.char?e.char:"",keyEventData+120,32);HEAP32[keyEventData+152>>2]=e.charCode;HEAP32[keyEventData+156>>2]=e.keyCode;HEAP32[keyEventData+160>>2]=e.which;if(dynCall_iiii(callbackfunc,eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:__findEventTarget(target),allowsDeferredCalls:JSEvents.isInternetExplorer()?false:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keydown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,2,"keydown",targetThread);return 0}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function _emscripten_set_keyup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerKeyEventCallback(target,userData,useCapture,callbackfunc,3,"keyup",targetThread);return 0}function __fillMouseEventData(eventStruct,e,target){HEAPF64[eventStruct>>3]=JSEvents.tick();HEAP32[eventStruct+8>>2]=e.screenX;HEAP32[eventStruct+12>>2]=e.screenY;HEAP32[eventStruct+16>>2]=e.clientX;HEAP32[eventStruct+20>>2]=e.clientY;HEAP32[eventStruct+24>>2]=e.ctrlKey;HEAP32[eventStruct+28>>2]=e.shiftKey;HEAP32[eventStruct+32>>2]=e.altKey;HEAP32[eventStruct+36>>2]=e.metaKey;HEAP16[eventStruct+40>>1]=e.button;HEAP16[eventStruct+42>>1]=e.buttons;HEAP32[eventStruct+44>>2]=e["movementX"]||e["mozMovementX"]||e["webkitMovementX"]||e.screenX-JSEvents.previousScreenX;HEAP32[eventStruct+48>>2]=e["movementY"]||e["mozMovementY"]||e["webkitMovementY"]||e.screenY-JSEvents.previousScreenY;if(Module["canvas"]){var rect=Module["canvas"].getBoundingClientRect();HEAP32[eventStruct+60>>2]=e.clientX-rect.left;HEAP32[eventStruct+64>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+60>>2]=0;HEAP32[eventStruct+64>>2]=0}if(target){var rect=JSEvents.getBoundingClientRectOrZeros(target);HEAP32[eventStruct+52>>2]=e.clientX-rect.left;HEAP32[eventStruct+56>>2]=e.clientY-rect.top}else{HEAP32[eventStruct+52>>2]=0;HEAP32[eventStruct+56>>2]=0}if(e.type!=="wheel"&&e.type!=="mousewheel"){JSEvents.previousScreenX=e.screenX;JSEvents.previousScreenY=e.screenY}}function __registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(72);target=__findEventTarget(target);var mouseEventHandlerFunc=function(ev){var e=ev||event;__fillMouseEventData(JSEvents.mouseEvent,e,target);if(dynCall_iiii(callbackfunc,eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};if(JSEvents.isInternetExplorer()&&eventTypeString=="mousedown")eventHandler.allowsDeferredCalls=false;JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_mousedown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,5,"mousedown",targetThread);return 0}function _emscripten_set_mousemove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,8,"mousemove",targetThread);return 0}function _emscripten_set_mouseup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerMouseEventCallback(target,userData,useCapture,callbackfunc,6,"mouseup",targetThread);return 0}function __registerTouchEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.touchEvent)JSEvents.touchEvent=_malloc(1684);target=__findEventTarget(target);var touchEventHandlerFunc=function(ev){var e=ev||event;var touches={};for(var i=0;i>2]=e.ctrlKey;HEAP32[ptr+8>>2]=e.shiftKey;HEAP32[ptr+12>>2]=e.altKey;HEAP32[ptr+16>>2]=e.metaKey;ptr+=20;var canvasRect=Module["canvas"]?Module["canvas"].getBoundingClientRect():undefined;var targetRect=JSEvents.getBoundingClientRectOrZeros(target);var numTouches=0;for(var i in touches){var t=touches[i];HEAP32[ptr>>2]=t.identifier;HEAP32[ptr+4>>2]=t.screenX;HEAP32[ptr+8>>2]=t.screenY;HEAP32[ptr+12>>2]=t.clientX;HEAP32[ptr+16>>2]=t.clientY;HEAP32[ptr+20>>2]=t.pageX;HEAP32[ptr+24>>2]=t.pageY;HEAP32[ptr+28>>2]=t.changed;HEAP32[ptr+32>>2]=t.onTarget;if(canvasRect){HEAP32[ptr+44>>2]=t.clientX-canvasRect.left;HEAP32[ptr+48>>2]=t.clientY-canvasRect.top}else{HEAP32[ptr+44>>2]=0;HEAP32[ptr+48>>2]=0}HEAP32[ptr+36>>2]=t.clientX-targetRect.left;HEAP32[ptr+40>>2]=t.clientY-targetRect.top;ptr+=52;if(++numTouches>=32){break}}HEAP32[touchEvent>>2]=numTouches;if(dynCall_iiii(callbackfunc,eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread);return 0}function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread);return 0}function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread);return 0}function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){__registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread);return 0}function __registerWheelEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.wheelEvent)JSEvents.wheelEvent=_malloc(104);var wheelHandlerFunc=function(ev){var e=ev||event;var wheelEvent=JSEvents.wheelEvent;__fillMouseEventData(wheelEvent,e,target);HEAPF64[wheelEvent+72>>3]=e["deltaX"];HEAPF64[wheelEvent+80>>3]=e["deltaY"];HEAPF64[wheelEvent+88>>3]=e["deltaZ"];HEAP32[wheelEvent+96>>2]=e["deltaMode"];if(dynCall_iiii(callbackfunc,eventTypeId,wheelEvent,userData))e.preventDefault()};var mouseWheelHandlerFunc=function(ev){var e=ev||event;__fillMouseEventData(JSEvents.wheelEvent,e,target);HEAPF64[JSEvents.wheelEvent+72>>3]=e["wheelDeltaX"]||0;HEAPF64[JSEvents.wheelEvent+80>>3]=-(e["wheelDeltaY"]||e["wheelDelta"]);HEAPF64[JSEvents.wheelEvent+88>>3]=0;HEAP32[JSEvents.wheelEvent+96>>2]=0;var shouldCancel=dynCall_iiii(callbackfunc,eventTypeId,JSEvents.wheelEvent,userData);if(shouldCancel){e.preventDefault()}};var eventHandler={target:target,allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:eventTypeString=="wheel"?wheelHandlerFunc:mouseWheelHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_wheel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target=__findEventTarget(target);if(typeof target.onwheel!=="undefined"){__registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"wheel",targetThread);return 0}else if(typeof target.onmousewheel!=="undefined"){__registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"mousewheel",targetThread);return 0}else{return-1}}var __emscripten_webgl_power_preferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(target,attributes){var contextAttributes={};var a=attributes>>2;contextAttributes["alpha"]=!!HEAP32[a+(0>>2)];contextAttributes["depth"]=!!HEAP32[a+(4>>2)];contextAttributes["stencil"]=!!HEAP32[a+(8>>2)];contextAttributes["antialias"]=!!HEAP32[a+(12>>2)];contextAttributes["premultipliedAlpha"]=!!HEAP32[a+(16>>2)];contextAttributes["preserveDrawingBuffer"]=!!HEAP32[a+(20>>2)];var powerPreference=HEAP32[a+(24>>2)];contextAttributes["powerPreference"]=__emscripten_webgl_power_preferences[powerPreference];contextAttributes["failIfMajorPerformanceCaveat"]=!!HEAP32[a+(28>>2)];contextAttributes.majorVersion=HEAP32[a+(32>>2)];contextAttributes.minorVersion=HEAP32[a+(36>>2)];contextAttributes.enableExtensionsByDefault=HEAP32[a+(40>>2)];contextAttributes.explicitSwapControl=HEAP32[a+(44>>2)];contextAttributes.proxyContextToMainThread=HEAP32[a+(48>>2)];contextAttributes.renderViaOffscreenBackBuffer=HEAP32[a+(52>>2)];var canvas=__findCanvasEventTarget(target);if(!canvas){return 0}if(contextAttributes.explicitSwapControl){return 0}var contextHandle=GL.createContext(canvas,contextAttributes);return contextHandle}function _emscripten_webgl_create_context(a0,a1){return _emscripten_webgl_do_create_context(a0,a1)}function _emscripten_webgl_init_context_attributes(attributes){var a=attributes>>2;for(var i=0;i<56>>2;++i){HEAP32[a+i]=0}HEAP32[a+(0>>2)]=HEAP32[a+(4>>2)]=HEAP32[a+(12>>2)]=HEAP32[a+(16>>2)]=HEAP32[a+(32>>2)]=HEAP32[a+(40>>2)]=1}function _emscripten_webgl_make_context_current(contextHandle){var success=GL.makeContextCurrent(contextHandle);return success?0:-5}function _emscripten_get_environ(){if(!_emscripten_get_environ.strings){var ENV={};ENV["USER"]=ENV["LOGNAME"]="web_user";ENV["PATH"]="/";ENV["PWD"]="/";ENV["HOME"]="/home/web_user";ENV["LANG"]=(typeof navigator==="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";ENV["_"]=thisProgram;var strings=[];for(var key in ENV){strings.push(key+"="+ENV[key])}_emscripten_get_environ.strings=strings}return _emscripten_get_environ.strings}function _environ_get(__environ,environ_buf){var strings=_emscripten_get_environ();var bufSize=0;strings.forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(environ_count,environ_buf_size){var strings=_emscripten_get_environ();HEAP32[environ_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[environ_buf_size>>2]=bufSize;return 0}function _exit(status){exit(status)}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}var GAI_ERRNO_MESSAGES={};function _gai_strerror(val){var buflen=256;if(!_gai_strerror.buffer){_gai_strerror.buffer=_malloc(buflen);GAI_ERRNO_MESSAGES["0"]="Success";GAI_ERRNO_MESSAGES[""+-1]="Invalid value for 'ai_flags' field";GAI_ERRNO_MESSAGES[""+-2]="NAME or SERVICE is unknown";GAI_ERRNO_MESSAGES[""+-3]="Temporary failure in name resolution";GAI_ERRNO_MESSAGES[""+-4]="Non-recoverable failure in name res";GAI_ERRNO_MESSAGES[""+-6]="'ai_family' not supported";GAI_ERRNO_MESSAGES[""+-7]="'ai_socktype' not supported";GAI_ERRNO_MESSAGES[""+-8]="SERVICE not supported for 'ai_socktype'";GAI_ERRNO_MESSAGES[""+-10]="Memory allocation failure";GAI_ERRNO_MESSAGES[""+-11]="System error returned in 'errno'";GAI_ERRNO_MESSAGES[""+-12]="Argument buffer overflow"}var msg="Unknown error";if(val in GAI_ERRNO_MESSAGES){if(GAI_ERRNO_MESSAGES[val].length>buflen-1){msg="Message too long"}else{msg=GAI_ERRNO_MESSAGES[val]}}writeAsciiToMemory(msg,_gai_strerror.buffer);return _gai_strerror.buffer}function _getTempRet0(){return getTempRet0()|0}function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var res;salen=family===10?28:16;addr=family===10?__inet_ntop6_raw(addr):__inet_ntop4_raw(addr);sa=_malloc(salen);res=__write_sockaddr(sa,family,addr,port);assert(!res.errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAP32[ai+24>>2]=canon;HEAP32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=__inet_pton4_raw(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=__inet_pton6_raw(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAP32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=__inet_pton4_raw(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=__read_sockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}function _gettimeofday(ptr){var now=Date.now();HEAP32[ptr>>2]=now/1e3|0;HEAP32[ptr+4>>2]=now%1e3*1e3|0;return 0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBeginTransformFeedback(x0){GLctx["beginTransformFeedback"](x0)}function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindBufferBase(target,index,buffer){GLctx["bindBufferBase"](target,index,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBindVertexArray(vao){GLctx["bindVertexArray"](GL.vaos[vao])}function _glBlendEquation(x0){GLctx["blendEquation"](x0)}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBlendFuncSeparate(x0,x1,x2,x3){GLctx["blendFuncSeparate"](x0,x1,x2,x3)}function _glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){GLctx["blitFramebuffer"](x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)}function _glBufferData(target,size,data,usage){if(GL.currentContext.supportsWebGL2EntryPoints){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _glBufferSubData(target,offset,size,data){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearBufferfv(buffer,drawbuffer,value){GLctx["clearBufferfv"](buffer,drawbuffer,HEAPF32,value>>2)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,data?HEAPU8.subarray(data,data+imageSize):null)}}function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,data?HEAPU8.subarray(data,data+imageSize):null)}}function _glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDepthMask(flag){GLctx.depthMask(!!flag)}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _glDrawBuffers(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _glFinish(){GLctx["finish"]()}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(GLctx.VERSION);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?parseInt(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]}GLctx["invalidateFramebuffer"](target,list)}function _glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _glReadBuffer(x0){GLctx["readBuffer"](x0)}function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{GLctx.readPixels(x,y,width,height,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels!=0){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels!=0){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.supportsWebGL2EntryPoints){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels!=0){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels!=0){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,__heapObjectForWebGLType(type),pixels>>(__heapAccessShiftForWebGLType[type]|0))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _glUniform1iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform1iv(GL.uniforms[location],HEAP32,value>>2,count);return}GLctx.uniform1iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*4>>2))}function _glUniform1ui(location,v0){GLctx.uniform1ui(GL.uniforms[location],v0)}function _glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _glUniform2fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform2fv(GL.uniforms[location],HEAPF32,value>>2,count*2);return}if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _glUniform2iv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform2iv(GL.uniforms[location],HEAP32,value>>2,count*2);return}GLctx.uniform2iv(GL.uniforms[location],HEAP32.subarray(value>>2,value+count*8>>2))}function _glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _glUniform3fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform3fv(GL.uniforms[location],HEAPF32,value>>2,count*3);return}if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _glUniform4fv(location,count,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*4);return}if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*9);return}if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.supportsWebGL2EntryPoints){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferViews[16*count-1];for(var i=0;i<16*count;i+=16){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2];view[i+9]=HEAPF32[value+(4*i+36)>>2];view[i+10]=HEAPF32[value+(4*i+40)>>2];view[i+11]=HEAPF32[value+(4*i+44)>>2];view[i+12]=HEAPF32[value+(4*i+48)>>2];view[i+13]=HEAPF32[value+(4*i+52)>>2];view[i+14]=HEAPF32[value+(4*i+56)>>2];view[i+15]=HEAPF32[value+(4*i+60)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var ___tm_current=2119056;var ___tm_timezone=(stringToUTF8("GMT",2119104,4),2119104);function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+40>>2]=___tm_timezone;return tmPtr}function _gmtime(time){return _gmtime_r(time,___tm_current)}var GodotHTTPRequest={requests:[],getUnusedRequestId:function(){var idMax=GodotHTTPRequest.requests.length;for(var potentialId=0;potentialId0?UTF8ToString(user):null;password=password>0?UTF8ToString(password):null;GodotHTTPRequest.requests[xhrId].open(UTF8ToString(method),UTF8ToString(url),true,user,password)}function _godot_xhr_reset(xhrId){GodotHTTPRequest.requests[xhrId]=new XMLHttpRequest;GodotHTTPRequest.setupRequest(GodotHTTPRequest.requests[xhrId])}function _godot_xhr_send_data(xhrId,ptr,len){if(!ptr){err("Failed to send data per XHR: null pointer");return}if(len<0){err("Failed to send data per XHR: buffer length less than 0");return}GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr,ptr+len))}function _godot_xhr_send_string(xhrId,strPtr){if(!strPtr){err("Failed to send string per XHR: null pointer");return}GodotHTTPRequest.requests[xhrId].send(UTF8ToString(strPtr))}function _godot_xhr_set_request_header(xhrId,header,value){GodotHTTPRequest.requests[xhrId].setRequestHeader(UTF8ToString(header),UTF8ToString(value))}function _inet_addr(ptr){var addr=__inet_pton4_raw(UTF8ToString(ptr));if(addr===null){return-1}return addr}function _kill(pid,sig){___setErrNo(ERRNO_CODES.EPERM);return-1}function _tzset(){if(_tzset.called)return;_tzset.called=true;HEAP32[__get_timezone()>>2]=(new Date).getTimezoneOffset()*60;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);HEAP32[__get_daylight()>>2]=Number(winter.getTimezoneOffset()!=summer.getTimezoneOffset());function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocate(intArrayFromString(winterName),"i8",ALLOC_NORMAL);var summerNamePtr=allocate(intArrayFromString(summerName),"i8",ALLOC_NORMAL);if(summer.getTimezoneOffset()>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _localtime(time){return _localtime_r(time,___tm_current)}function _usleep(useconds){var msec=useconds/1e3;if((ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&self["performance"]&&self["performance"]["now"]){var start=self["performance"]["now"]();while(self["performance"]["now"]()-start>2];var nanoseconds=HEAP32[rqtp+4>>2];if(nanoseconds<0||nanoseconds>999999999||seconds<0){___setErrNo(28);return-1}if(rmtp!==0){HEAP32[rmtp>>2]=0;HEAP32[rmtp+4>>2]=0}return _usleep(seconds*1e6+nanoseconds/1e3)}function _round(d){d=+d;return d>=+0?+Math_floor(d+ +.5):+Math_ceil(d-+.5)}function _setTempRet0($i){setTempRet0($i|0)}function _sigaction(signum,act,oldact){return 0}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]);return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 85:var maxHeapSize=2*1024*1024*1024-65536;return maxHeapSize/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(28);return-1}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function _wait(stat_loc){___setErrNo(12);return-1}function _waitpid(){return _wait.apply(null,arguments)}FS.staticInit();if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance==="object"&&performance&&typeof performance["now"]==="function"){_emscripten_get_now=function(){return performance["now"]()}}else{_emscripten_get_now=Date.now}Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){err("Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.");Module["requestFullScreen"]=Module["requestFullscreen"];Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullscreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"a":___assert_fail,"Ob":___lock,"Ci":___map_file,"Bi":___syscall10,"ra":___syscall102,"Ai":___syscall12,"zi":___syscall140,"yi":___syscall142,"xi":___syscall145,"wi":___syscall15,"vi":___syscall168,"ui":___syscall183,"ti":___syscall195,"si":___syscall20,"ri":___syscall220,"Z":___syscall221,"qi":___syscall268,"pi":___syscall3,"oi":___syscall33,"ni":___syscall38,"mi":___syscall39,"li":___syscall4,"ki":___syscall40,"Nb":___syscall5,"rb":___syscall54,"ji":___syscall91,"Ra":___unlock,"qa":_abort,"ab":_clock_gettime,"fi":_dlclose,"qb":_dlerror,"ei":_dlopen,"di":_dlsym,"Mb":_eglGetProcAddress,"z":_emscripten_asm_const_iii,"Lb":_emscripten_enter_soft_fullscreen,"ci":_emscripten_exit_fullscreen,"Kb":_emscripten_exit_pointerlock,"pb":_emscripten_exit_soft_fullscreen,"ob":_emscripten_get_canvas_element_size,"bi":_emscripten_get_element_css_size,"ai":_emscripten_get_fullscreen_status,"$h":_emscripten_get_gamepad_status,"_h":_emscripten_get_now,"Zh":_emscripten_get_num_gamepads,"Yh":_emscripten_get_pointerlock_status,"Xh":_emscripten_glActiveTexture,"Wh":_emscripten_glAttachShader,"Vh":_emscripten_glBeginQuery,"Uh":_emscripten_glBeginQueryEXT,"Th":_emscripten_glBeginTransformFeedback,"Sh":_emscripten_glBindAttribLocation,"Rh":_emscripten_glBindBuffer,"Qh":_emscripten_glBindBufferBase,"Ph":_emscripten_glBindBufferRange,"Oh":_emscripten_glBindFramebuffer,"Nh":_emscripten_glBindRenderbuffer,"Mh":_emscripten_glBindSampler,"Lh":_emscripten_glBindTexture,"Kh":_emscripten_glBindTransformFeedback,"Jh":_emscripten_glBindVertexArray,"Ih":_emscripten_glBindVertexArrayOES,"Hh":_emscripten_glBlendColor,"Gh":_emscripten_glBlendEquation,"Fh":_emscripten_glBlendEquationSeparate,"Eh":_emscripten_glBlendFunc,"Dh":_emscripten_glBlendFuncSeparate,"Ch":_emscripten_glBlitFramebuffer,"Bh":_emscripten_glBufferData,"Ah":_emscripten_glBufferSubData,"zh":_emscripten_glCheckFramebufferStatus,"yh":_emscripten_glClear,"xh":_emscripten_glClearBufferfi,"wh":_emscripten_glClearBufferfv,"vh":_emscripten_glClearBufferiv,"uh":_emscripten_glClearBufferuiv,"th":_emscripten_glClearColor,"sh":_emscripten_glClearDepthf,"rh":_emscripten_glClearStencil,"qh":_emscripten_glClientWaitSync,"ph":_emscripten_glColorMask,"oh":_emscripten_glCompileShader,"nh":_emscripten_glCompressedTexImage2D,"mh":_emscripten_glCompressedTexImage3D,"lh":_emscripten_glCompressedTexSubImage2D,"kh":_emscripten_glCompressedTexSubImage3D,"jh":_emscripten_glCopyBufferSubData,"ih":_emscripten_glCopyTexImage2D,"hh":_emscripten_glCopyTexSubImage2D,"gh":_emscripten_glCopyTexSubImage3D,"fh":_emscripten_glCreateProgram,"eh":_emscripten_glCreateShader,"dh":_emscripten_glCullFace,"ch":_emscripten_glDeleteBuffers,"bh":_emscripten_glDeleteFramebuffers,"ah":_emscripten_glDeleteProgram,"$g":_emscripten_glDeleteQueries,"_g":_emscripten_glDeleteQueriesEXT,"Zg":_emscripten_glDeleteRenderbuffers,"Yg":_emscripten_glDeleteSamplers,"Xg":_emscripten_glDeleteShader,"Wg":_emscripten_glDeleteSync,"Vg":_emscripten_glDeleteTextures,"Ug":_emscripten_glDeleteTransformFeedbacks,"Tg":_emscripten_glDeleteVertexArrays,"Sg":_emscripten_glDeleteVertexArraysOES,"Rg":_emscripten_glDepthFunc,"Qg":_emscripten_glDepthMask,"Pg":_emscripten_glDepthRangef,"Og":_emscripten_glDetachShader,"Ng":_emscripten_glDisable,"Mg":_emscripten_glDisableVertexAttribArray,"Lg":_emscripten_glDrawArrays,"Kg":_emscripten_glDrawArraysInstanced,"Jg":_emscripten_glDrawArraysInstancedANGLE,"Ig":_emscripten_glDrawArraysInstancedARB,"Hg":_emscripten_glDrawArraysInstancedEXT,"Gg":_emscripten_glDrawArraysInstancedNV,"Fg":_emscripten_glDrawBuffers,"Eg":_emscripten_glDrawBuffersEXT,"Dg":_emscripten_glDrawBuffersWEBGL,"Cg":_emscripten_glDrawElements,"Bg":_emscripten_glDrawElementsInstanced,"Ag":_emscripten_glDrawElementsInstancedANGLE,"zg":_emscripten_glDrawElementsInstancedARB,"yg":_emscripten_glDrawElementsInstancedEXT,"xg":_emscripten_glDrawElementsInstancedNV,"wg":_emscripten_glDrawRangeElements,"vg":_emscripten_glEnable,"ug":_emscripten_glEnableVertexAttribArray,"tg":_emscripten_glEndQuery,"sg":_emscripten_glEndQueryEXT,"rg":_emscripten_glEndTransformFeedback,"qg":_emscripten_glFenceSync,"pg":_emscripten_glFinish,"og":_emscripten_glFlush,"ng":_emscripten_glFlushMappedBufferRange,"mg":_emscripten_glFramebufferRenderbuffer,"lg":_emscripten_glFramebufferTexture2D,"kg":_emscripten_glFramebufferTextureLayer,"jg":_emscripten_glFrontFace,"ig":_emscripten_glGenBuffers,"hg":_emscripten_glGenFramebuffers,"gg":_emscripten_glGenQueries,"fg":_emscripten_glGenQueriesEXT,"eg":_emscripten_glGenRenderbuffers,"dg":_emscripten_glGenSamplers,"cg":_emscripten_glGenTextures,"bg":_emscripten_glGenTransformFeedbacks,"ag":_emscripten_glGenVertexArrays,"$f":_emscripten_glGenVertexArraysOES,"_f":_emscripten_glGenerateMipmap,"Zf":_emscripten_glGetActiveAttrib,"Yf":_emscripten_glGetActiveUniform,"Xf":_emscripten_glGetActiveUniformBlockName,"Wf":_emscripten_glGetActiveUniformBlockiv,"Vf":_emscripten_glGetActiveUniformsiv,"Uf":_emscripten_glGetAttachedShaders,"Tf":_emscripten_glGetAttribLocation,"Sf":_emscripten_glGetBooleanv,"Rf":_emscripten_glGetBufferParameteri64v,"Qf":_emscripten_glGetBufferParameteriv,"Pf":_emscripten_glGetBufferPointerv,"Of":_emscripten_glGetError,"Nf":_emscripten_glGetFloatv,"Mf":_emscripten_glGetFragDataLocation,"Lf":_emscripten_glGetFramebufferAttachmentParameteriv,"Kf":_emscripten_glGetInteger64i_v,"Jf":_emscripten_glGetInteger64v,"If":_emscripten_glGetIntegeri_v,"Hf":_emscripten_glGetIntegerv,"Gf":_emscripten_glGetInternalformativ,"Ff":_emscripten_glGetProgramBinary,"Ef":_emscripten_glGetProgramInfoLog,"Df":_emscripten_glGetProgramiv,"Cf":_emscripten_glGetQueryObjecti64vEXT,"Bf":_emscripten_glGetQueryObjectivEXT,"Af":_emscripten_glGetQueryObjectui64vEXT,"zf":_emscripten_glGetQueryObjectuiv,"yf":_emscripten_glGetQueryObjectuivEXT,"xf":_emscripten_glGetQueryiv,"wf":_emscripten_glGetQueryivEXT,"vf":_emscripten_glGetRenderbufferParameteriv,"uf":_emscripten_glGetSamplerParameterfv,"tf":_emscripten_glGetSamplerParameteriv,"sf":_emscripten_glGetShaderInfoLog,"rf":_emscripten_glGetShaderPrecisionFormat,"qf":_emscripten_glGetShaderSource,"pf":_emscripten_glGetShaderiv,"of":_emscripten_glGetString,"nf":_emscripten_glGetStringi,"mf":_emscripten_glGetSynciv,"lf":_emscripten_glGetTexParameterfv,"kf":_emscripten_glGetTexParameteriv,"jf":_emscripten_glGetTransformFeedbackVarying,"hf":_emscripten_glGetUniformBlockIndex,"gf":_emscripten_glGetUniformIndices,"ff":_emscripten_glGetUniformLocation,"ef":_emscripten_glGetUniformfv,"df":_emscripten_glGetUniformiv,"cf":_emscripten_glGetUniformuiv,"bf":_emscripten_glGetVertexAttribIiv,"af":_emscripten_glGetVertexAttribIuiv,"$e":_emscripten_glGetVertexAttribPointerv,"_e":_emscripten_glGetVertexAttribfv,"Ze":_emscripten_glGetVertexAttribiv,"Ye":_emscripten_glHint,"Xe":_emscripten_glInvalidateFramebuffer,"We":_emscripten_glInvalidateSubFramebuffer,"Ve":_emscripten_glIsBuffer,"Ue":_emscripten_glIsEnabled,"Te":_emscripten_glIsFramebuffer,"Se":_emscripten_glIsProgram,"Re":_emscripten_glIsQuery,"Qe":_emscripten_glIsQueryEXT,"Pe":_emscripten_glIsRenderbuffer,"Oe":_emscripten_glIsSampler,"Ne":_emscripten_glIsShader,"Me":_emscripten_glIsSync,"Le":_emscripten_glIsTexture,"Ke":_emscripten_glIsTransformFeedback,"Je":_emscripten_glIsVertexArray,"Ie":_emscripten_glIsVertexArrayOES,"He":_emscripten_glLineWidth,"Ge":_emscripten_glLinkProgram,"Fe":_emscripten_glMapBufferRange,"Ee":_emscripten_glPauseTransformFeedback,"De":_emscripten_glPixelStorei,"Ce":_emscripten_glPolygonOffset,"Be":_emscripten_glProgramBinary,"Ae":_emscripten_glProgramParameteri,"ze":_emscripten_glQueryCounterEXT,"ye":_emscripten_glReadBuffer,"xe":_emscripten_glReadPixels,"we":_emscripten_glReleaseShaderCompiler,"ve":_emscripten_glRenderbufferStorage,"ue":_emscripten_glRenderbufferStorageMultisample,"te":_emscripten_glResumeTransformFeedback,"se":_emscripten_glSampleCoverage,"re":_emscripten_glSamplerParameterf,"qe":_emscripten_glSamplerParameterfv,"pe":_emscripten_glSamplerParameteri,"oe":_emscripten_glSamplerParameteriv,"ne":_emscripten_glScissor,"me":_emscripten_glShaderBinary,"le":_emscripten_glShaderSource,"ke":_emscripten_glStencilFunc,"je":_emscripten_glStencilFuncSeparate,"ie":_emscripten_glStencilMask,"he":_emscripten_glStencilMaskSeparate,"ge":_emscripten_glStencilOp,"fe":_emscripten_glStencilOpSeparate,"ee":_emscripten_glTexImage2D,"de":_emscripten_glTexImage3D,"ce":_emscripten_glTexParameterf,"be":_emscripten_glTexParameterfv,"ae":_emscripten_glTexParameteri,"$d":_emscripten_glTexParameteriv,"_d":_emscripten_glTexStorage2D,"Zd":_emscripten_glTexStorage3D,"Yd":_emscripten_glTexSubImage2D,"Xd":_emscripten_glTexSubImage3D,"Wd":_emscripten_glTransformFeedbackVaryings,"Vd":_emscripten_glUniform1f,"Ud":_emscripten_glUniform1fv,"Td":_emscripten_glUniform1i,"Sd":_emscripten_glUniform1iv,"Rd":_emscripten_glUniform1ui,"Qd":_emscripten_glUniform1uiv,"Pd":_emscripten_glUniform2f,"Od":_emscripten_glUniform2fv,"Nd":_emscripten_glUniform2i,"Md":_emscripten_glUniform2iv,"Ld":_emscripten_glUniform2ui,"Kd":_emscripten_glUniform2uiv,"Jd":_emscripten_glUniform3f,"Id":_emscripten_glUniform3fv,"Hd":_emscripten_glUniform3i,"Gd":_emscripten_glUniform3iv,"Fd":_emscripten_glUniform3ui,"Ed":_emscripten_glUniform3uiv,"Dd":_emscripten_glUniform4f,"Cd":_emscripten_glUniform4fv,"Bd":_emscripten_glUniform4i,"Ad":_emscripten_glUniform4iv,"zd":_emscripten_glUniform4ui,"yd":_emscripten_glUniform4uiv,"xd":_emscripten_glUniformBlockBinding,"wd":_emscripten_glUniformMatrix2fv,"vd":_emscripten_glUniformMatrix2x3fv,"ud":_emscripten_glUniformMatrix2x4fv,"td":_emscripten_glUniformMatrix3fv,"sd":_emscripten_glUniformMatrix3x2fv,"rd":_emscripten_glUniformMatrix3x4fv,"qd":_emscripten_glUniformMatrix4fv,"pd":_emscripten_glUniformMatrix4x2fv,"od":_emscripten_glUniformMatrix4x3fv,"nd":_emscripten_glUnmapBuffer,"md":_emscripten_glUseProgram,"ld":_emscripten_glValidateProgram,"kd":_emscripten_glVertexAttrib1f,"jd":_emscripten_glVertexAttrib1fv,"id":_emscripten_glVertexAttrib2f,"hd":_emscripten_glVertexAttrib2fv,"gd":_emscripten_glVertexAttrib3f,"fd":_emscripten_glVertexAttrib3fv,"ed":_emscripten_glVertexAttrib4f,"dd":_emscripten_glVertexAttrib4fv,"cd":_emscripten_glVertexAttribDivisor,"bd":_emscripten_glVertexAttribDivisorANGLE,"ad":_emscripten_glVertexAttribDivisorARB,"$c":_emscripten_glVertexAttribDivisorEXT,"_c":_emscripten_glVertexAttribDivisorNV,"Zc":_emscripten_glVertexAttribI4i,"Yc":_emscripten_glVertexAttribI4iv,"Xc":_emscripten_glVertexAttribI4ui,"Wc":_emscripten_glVertexAttribI4uiv,"Vc":_emscripten_glVertexAttribIPointer,"Uc":_emscripten_glVertexAttribPointer,"Tc":_emscripten_glViewport,"Sc":_emscripten_glWaitSync,"J":_emscripten_longjmp,"Rc":_emscripten_memcpy_big,"Qc":_emscripten_request_fullscreen_strategy,"Pc":_emscripten_request_pointerlock,"Oc":_emscripten_resize_heap,"Nc":_emscripten_sample_gamepad_data,"Jb":_emscripten_set_canvas_element_size,"Mc":_emscripten_set_fullscreenchange_callback_on_thread,"Lc":_emscripten_set_gamepadconnected_callback_on_thread,"Kc":_emscripten_set_gamepaddisconnected_callback_on_thread,"Jc":_emscripten_set_keydown_callback_on_thread,"Ic":_emscripten_set_keypress_callback_on_thread,"Hc":_emscripten_set_keyup_callback_on_thread,"Gc":_emscripten_set_main_loop,"Fc":_emscripten_set_mousedown_callback_on_thread,"Ec":_emscripten_set_mousemove_callback_on_thread,"Dc":_emscripten_set_mouseup_callback_on_thread,"Cc":_emscripten_set_touchcancel_callback_on_thread,"Bc":_emscripten_set_touchend_callback_on_thread,"Ac":_emscripten_set_touchmove_callback_on_thread,"zc":_emscripten_set_touchstart_callback_on_thread,"yc":_emscripten_set_wheel_callback_on_thread,"xc":_emscripten_webgl_create_context,"wc":_emscripten_webgl_init_context_attributes,"vc":_emscripten_webgl_make_context_current,"ii":_environ_get,"hi":_environ_sizes_get,"uc":_exit,"Da":_fd_close,"gi":_fd_write,"nb":_gai_strerror,"n":_getTempRet0,"mb":_getaddrinfo,"tc":_getnameinfo,"Ib":_gettimeofday,"c":_glActiveTexture,"$a":_glAttachShader,"lb":_glBeginTransformFeedback,"Hb":_glBindAttribLocation,"d":_glBindBuffer,"W":_glBindBufferBase,"f":_glBindFramebuffer,"ha":_glBindRenderbuffer,"b":_glBindTexture,"o":_glBindVertexArray,"Q":_glBlendEquation,"$":_glBlendFunc,"P":_glBlendFuncSeparate,"pa":_glBlitFramebuffer,"u":_glBufferData,"t":_glBufferSubData,"O":_glCheckFramebufferStatus,"N":_glClear,"Ca":_glClearBufferfv,"V":_glClearColor,"ga":_glClearDepthf,"U":_glColorMask,"_a":_glCompileShader,"Gb":_glCompressedTexImage2D,"sc":_glCompressedTexImage3D,"rc":_glCompressedTexSubImage2D,"kb":_glCompressedTexSubImage3D,"qc":_glCopyBufferSubData,"jb":_glCopyTexSubImage2D,"Fb":_glCreateProgram,"Za":_glCreateShader,"Ba":_glCullFace,"R":_glDeleteBuffers,"K":_glDeleteFramebuffers,"X":_glDeleteProgram,"ea":_glDeleteRenderbuffers,"M":_glDeleteShader,"F":_glDeleteTextures,"ka":_glDeleteVertexArrays,"da":_glDepthFunc,"L":_glDepthMask,"q":_glDisable,"p":_glDisableVertexAttribArray,"x":_glDrawArrays,"ya":_glDrawArraysInstanced,"Qa":_glDrawBuffers,"S":_glDrawElements,"xa":_glDrawElementsInstanced,"B":_glEnable,"j":_glEnableVertexAttribArray,"ib":_glEndTransformFeedback,"pc":_glFinish,"fa":_glFramebufferRenderbuffer,"E":_glFramebufferTexture2D,"Eb":_glFramebufferTextureLayer,"Db":_glFrontFace,"G":_glGenBuffers,"I":_glGenFramebuffers,"oa":_glGenRenderbuffers,"C":_glGenTextures,"_":_glGenVertexArrays,"Y":_glGenerateMipmap,"oc":_glGetFloatv,"wa":_glGetIntegerv,"Cb":_glGetProgramInfoLog,"Ya":_glGetProgramiv,"Xa":_glGetShaderInfoLog,"Aa":_glGetShaderiv,"Wa":_glGetString,"nc":_glGetStringi,"mc":_glGetUniformBlockIndex,"Ha":_glGetUniformLocation,"lc":_glInvalidateFramebuffer,"Bb":_glLinkProgram,"va":_glPixelStorei,"ua":_glReadBuffer,"hb":_glReadPixels,"na":_glRenderbufferStorage,"Pa":_glRenderbufferStorageMultisample,"ca":_glScissor,"Va":_glShaderSource,"A":_glTexImage2D,"Oa":_glTexImage3D,"k":_glTexParameterf,"g":_glTexParameteri,"kc":_glTexStorage2D,"Na":_glTexSubImage2D,"Ua":_glTexSubImage3D,"jc":_glTransformFeedbackVaryings,"i":_glUniform1f,"l":_glUniform1i,"gb":_glUniform1iv,"Ab":_glUniform1ui,"fb":_glUniform2f,"m":_glUniform2fv,"Ka":_glUniform2i,"ta":_glUniform2iv,"eb":_glUniform3f,"ba":_glUniform3fv,"Ja":_glUniform3i,"Ga":_glUniform4f,"w":_glUniform4fv,"Ia":_glUniform4i,"ic":_glUniformBlockBinding,"zb":_glUniformMatrix2fv,"yb":_glUniformMatrix3fv,"h":_glUniformMatrix4fv,"ja":_glUseProgram,"v":_glVertexAttrib4f,"T":_glVertexAttrib4fv,"D":_glVertexAttribDivisor,"Ta":_glVertexAttribI4ui,"Fa":_glVertexAttribIPointer,"e":_glVertexAttribPointer,"y":_glViewport,"xb":_gmtime,"hc":_godot_xhr_free,"gc":_godot_xhr_get_ready_state,"fc":_godot_xhr_get_response,"ec":_godot_xhr_get_response_headers,"dc":_godot_xhr_get_response_headers_length,"cc":_godot_xhr_get_response_length,"bc":_godot_xhr_get_status,"ac":_godot_xhr_new,"wb":_godot_xhr_open,"db":_godot_xhr_reset,"$b":_godot_xhr_send_data,"_b":_godot_xhr_send_string,"Zb":_godot_xhr_set_request_header,"Yb":_inet_addr,"vb":invoke_i,"ma":invoke_ii,"la":invoke_iii,"Ma":invoke_iiii,"cb":invoke_iiiii,"Xb":invoke_iiiiii,"Wb":invoke_iiiiiii,"ub":invoke_iiiiiiiiii,"Ub":invoke_iiiij,"Ea":invoke_v,"H":invoke_vi,"za":invoke_vii,"sa":invoke_viii,"ia":invoke_viiii,"tb":invoke_viiiiiii,"Vb":_kill,"bb":_localtime,"memory":wasmMemory,"Tb":_nanosleep,"La":_round,"aa":_saveSetjmp,"s":_setTempRet0,"Sb":_sigaction,"sb":_strftime,"Rb":_strftime_l,"Qb":_sysconf,"table":wasmTable,"r":_testSetjmp,"Sa":_time,"Pb":_waitpid};var asm=createWasm();Module["asm"]=asm;var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return Module["asm"]["Di"].apply(null,arguments)};var _audio_driver_js_mix=Module["_audio_driver_js_mix"]=function(){return Module["asm"]["Ei"].apply(null,arguments)};var _audio_driver_process_capture=Module["_audio_driver_process_capture"]=function(){return Module["asm"]["Fi"].apply(null,arguments)};var _resize_poolbytearray_and_open_write=Module["_resize_poolbytearray_and_open_write"]=function(){return Module["asm"]["Gi"].apply(null,arguments)};var _main_after_fs_sync=Module["_main_after_fs_sync"]=function(){return Module["asm"]["Hi"].apply(null,arguments)};var _main=Module["_main"]=function(){return Module["asm"]["Ii"].apply(null,arguments)};var _update_clipboard=Module["_update_clipboard"]=function(){return Module["asm"]["Ji"].apply(null,arguments)};var _send_notification=Module["_send_notification"]=function(){return Module["asm"]["Ki"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["Li"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["Mi"].apply(null,arguments)};var _htonl=Module["_htonl"]=function(){return Module["asm"]["Ni"].apply(null,arguments)};var _htons=Module["_htons"]=function(){return Module["asm"]["Oi"].apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return Module["asm"]["Pi"].apply(null,arguments)};var _realloc=Module["_realloc"]=function(){return Module["asm"]["Qi"].apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["Ri"].apply(null,arguments)};var __emrtc_on_ch_error=Module["__emrtc_on_ch_error"]=function(){return Module["asm"]["Si"].apply(null,arguments)};var __emrtc_on_ch_open=Module["__emrtc_on_ch_open"]=function(){return Module["asm"]["Ti"].apply(null,arguments)};var __emrtc_on_ch_close=Module["__emrtc_on_ch_close"]=function(){return Module["asm"]["Ui"].apply(null,arguments)};var __emrtc_on_ch_message=Module["__emrtc_on_ch_message"]=function(){return Module["asm"]["Vi"].apply(null,arguments)};var __emrtc_on_ice_candidate=Module["__emrtc_on_ice_candidate"]=function(){return Module["asm"]["Wi"].apply(null,arguments)};var __emrtc_session_description_created=Module["__emrtc_session_description_created"]=function(){return Module["asm"]["Xi"].apply(null,arguments)};var __emrtc_on_connection_state_changed=Module["__emrtc_on_connection_state_changed"]=function(){return Module["asm"]["Yi"].apply(null,arguments)};var __emrtc_on_error=Module["__emrtc_on_error"]=function(){return Module["asm"]["Zi"].apply(null,arguments)};var __emrtc_emit_channel=Module["__emrtc_emit_channel"]=function(){return Module["asm"]["_i"].apply(null,arguments)};var __esws_on_connect=Module["__esws_on_connect"]=function(){return Module["asm"]["$i"].apply(null,arguments)};var __esws_on_message=Module["__esws_on_message"]=function(){return Module["asm"]["aj"].apply(null,arguments)};var __esws_on_error=Module["__esws_on_error"]=function(){return Module["asm"]["bj"].apply(null,arguments)};var __esws_on_close=Module["__esws_on_close"]=function(){return Module["asm"]["cj"].apply(null,arguments)};var __get_tzname=Module["__get_tzname"]=function(){return Module["asm"]["dj"].apply(null,arguments)};var __get_daylight=Module["__get_daylight"]=function(){return Module["asm"]["ej"].apply(null,arguments)};var __get_timezone=Module["__get_timezone"]=function(){return Module["asm"]["fj"].apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return Module["asm"]["gj"].apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){return Module["asm"]["hj"].apply(null,arguments)};var dynCall_i=Module["dynCall_i"]=function(){return Module["asm"]["ij"].apply(null,arguments)};var dynCall_ii=Module["dynCall_ii"]=function(){return Module["asm"]["jj"].apply(null,arguments)};var dynCall_iii=Module["dynCall_iii"]=function(){return Module["asm"]["kj"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["lj"].apply(null,arguments)};var dynCall_iiiii=Module["dynCall_iiiii"]=function(){return Module["asm"]["mj"].apply(null,arguments)};var dynCall_iiiiii=Module["dynCall_iiiiii"]=function(){return Module["asm"]["nj"].apply(null,arguments)};var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=function(){return Module["asm"]["oj"].apply(null,arguments)};var dynCall_iiiiiiiiii=Module["dynCall_iiiiiiiiii"]=function(){return Module["asm"]["pj"].apply(null,arguments)};var dynCall_iiiij=Module["dynCall_iiiij"]=function(){return Module["asm"]["qj"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["rj"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["sj"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["tj"].apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){return Module["asm"]["uj"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["vj"].apply(null,arguments)};var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=function(){return Module["asm"]["wj"].apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return Module["asm"]["xj"].apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return Module["asm"]["yj"].apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return Module["asm"]["zj"].apply(null,arguments)};function invoke_vi(index,a1){var sp=stackSave();try{dynCall_vi(index,a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{dynCall_vii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return dynCall_ii(index,a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{dynCall_v(index)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return dynCall_iii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_iiiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return dynCall_iiiiii(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{dynCall_viiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return dynCall_iiii(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return dynCall_i(index)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{dynCall_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{dynCall_viii(index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return dynCall_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return dynCall_iiiiiii(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiij(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return dynCall_iiiij(index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}Module["asm"]=asm;Module["callMain"]=callMain;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}var calledMain=false;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args){args=args||[];var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(thisProgram);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=Module["_main"](argc,argv);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){noExitRuntime=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);quit_(1,e)}}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&noExitRuntime&&status===0){return}if(noExitRuntime){}else{ABORT=true;EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status)}quit_(status,new ExitStatus(status))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=false;if(Module["noInitialRun"])shouldRunNow=false;noExitRuntime=true;run(); + + // The following is concatenated with generated code, and acts as the end + // of a wrapper for said code. See pre.js for the other part of the + // wrapper. + exposedLibs['PATH'] = PATH; + exposedLibs['FS'] = FS; + return Module; + }, +}; + +(function() { + var engine = Engine; + + var DOWNLOAD_ATTEMPTS_MAX = 4; + + var basePath = null; + var wasmFilenameExtensionOverride = null; + var engineLoadPromise = null; + + var loadingFiles = {}; + + function getPathLeaf(path) { + + while (path.endsWith('/')) + path = path.slice(0, -1); + return path.slice(path.lastIndexOf('/') + 1); + } + + function getBasePath(path) { + + if (path.endsWith('/')) + path = path.slice(0, -1); + if (path.lastIndexOf('.') > path.lastIndexOf('/')) + path = path.slice(0, path.lastIndexOf('.')); + return path; + } + + function getBaseName(path) { + + return getPathLeaf(getBasePath(path)); + } + + Engine = function Engine() { + + this.rtenv = null; + + var LIBS = {}; + + var initPromise = null; + var unloadAfterInit = true; + + var preloadedFiles = []; + + var resizeCanvasOnStart = true; + var progressFunc = null; + var preloadProgressTracker = {}; + var lastProgress = { loaded: 0, total: 0 }; + + var canvas = null; + var executableName = null; + var locale = null; + var stdout = null; + var stderr = null; + + this.init = function(newBasePath) { + + if (!initPromise) { + initPromise = Engine.load(newBasePath).then( + instantiate.bind(this) + ); + requestAnimationFrame(animateProgress); + if (unloadAfterInit) + initPromise.then(Engine.unloadEngine); + } + return initPromise; + }; + + function instantiate(wasmBuf) { + + var rtenvProps = { + engine: this, + ENV: {}, + }; + if (typeof stdout === 'function') + rtenvProps.print = stdout; + if (typeof stderr === 'function') + rtenvProps.printErr = stderr; + rtenvProps.instantiateWasm = function(imports, onSuccess) { + WebAssembly.instantiate(wasmBuf, imports).then(function(result) { + onSuccess(result.instance); + }); + return {}; + }; + + return new Promise(function(resolve, reject) { + rtenvProps.onRuntimeInitialized = resolve; + rtenvProps.onAbort = reject; + rtenvProps.thisProgram = executableName; + rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS); + }); + } + + this.preloadFile = function(pathOrBuffer, destPath) { + + if (pathOrBuffer instanceof ArrayBuffer) { + pathOrBuffer = new Uint8Array(pathOrBuffer); + } else if (ArrayBuffer.isView(pathOrBuffer)) { + pathOrBuffer = new Uint8Array(pathOrBuffer.buffer); + } + if (pathOrBuffer instanceof Uint8Array) { + preloadedFiles.push({ + path: destPath, + buffer: pathOrBuffer + }); + return Promise.resolve(); + } else if (typeof pathOrBuffer === 'string') { + return loadPromise(pathOrBuffer, preloadProgressTracker).then(function(xhr) { + preloadedFiles.push({ + path: destPath || pathOrBuffer, + buffer: xhr.response + }); + }); + } else { + throw Promise.reject("Invalid object for preloading"); + } + }; + + this.start = function() { + + return this.init().then( + Function.prototype.apply.bind(synchronousStart, this, arguments) + ); + }; + + this.startGame = function(execName, mainPack) { + + executableName = execName; + var mainArgs = [ '--main-pack', getPathLeaf(mainPack) ]; + + return Promise.all([ + this.init(getBasePath(execName)), + this.preloadFile(mainPack, getPathLeaf(mainPack)) + ]).then( + Function.prototype.apply.bind(synchronousStart, this, mainArgs) + ); + }; + + function synchronousStart() { + + if (canvas instanceof HTMLCanvasElement) { + this.rtenv.canvas = canvas; + } else { + var firstCanvas = document.getElementsByTagName('canvas')[0]; + if (firstCanvas instanceof HTMLCanvasElement) { + this.rtenv.canvas = firstCanvas; + } else { + throw new Error("No canvas found"); + } + } + + var actualCanvas = this.rtenv.canvas; + // canvas can grab focus on click + if (actualCanvas.tabIndex < 0) { + actualCanvas.tabIndex = 0; + } + // necessary to calculate cursor coordinates correctly + actualCanvas.style.padding = 0; + actualCanvas.style.borderWidth = 0; + actualCanvas.style.borderStyle = 'none'; + // disable right-click context menu + actualCanvas.addEventListener('contextmenu', function(ev) { + ev.preventDefault(); + }, false); + // until context restoration is implemented + actualCanvas.addEventListener('webglcontextlost', function(ev) { + alert("WebGL context lost, please reload the page"); + ev.preventDefault(); + }, false); + + if (locale) { + this.rtenv.locale = locale; + } else { + this.rtenv.locale = navigator.languages ? navigator.languages[0] : navigator.language; + } + this.rtenv.locale = this.rtenv.locale.split('.')[0]; + this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart; + + preloadedFiles.forEach(function(file) { + var dir = LIBS.PATH.dirname(file.path); + try { + LIBS.FS.stat(dir); + } catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + LIBS.FS.mkdirTree(dir); + } + // With memory growth, canOwn should be false. + LIBS.FS.createDataFile(file.path, null, new Uint8Array(file.buffer), true, true, false); + }, this); + + preloadedFiles = null; + initPromise = null; + this.rtenv.callMain(arguments); + } + + this.setProgressFunc = function(func) { + progressFunc = func; + }; + + this.setResizeCanvasOnStart = function(enabled) { + resizeCanvasOnStart = enabled; + }; + + function animateProgress() { + + var loaded = 0; + var total = 0; + var totalIsValid = true; + var progressIsFinal = true; + + [loadingFiles, preloadProgressTracker].forEach(function(tracker) { + Object.keys(tracker).forEach(function(file) { + if (!tracker[file].final) + progressIsFinal = false; + if (!totalIsValid || tracker[file].total === 0) { + totalIsValid = false; + total = 0; + } else { + total += tracker[file].total; + } + loaded += tracker[file].loaded; + }); + }); + if (loaded !== lastProgress.loaded || total !== lastProgress.total) { + lastProgress.loaded = loaded; + lastProgress.total = total; + if (typeof progressFunc === 'function') + progressFunc(loaded, total); + } + if (!progressIsFinal) + requestAnimationFrame(animateProgress); + } + + this.setCanvas = function(elem) { + canvas = elem; + }; + + this.setExecutableName = function(newName) { + + executableName = newName; + }; + + this.setLocale = function(newLocale) { + + locale = newLocale; + }; + + this.setUnloadAfterInit = function(enabled) { + + if (enabled && !unloadAfterInit && initPromise) { + initPromise.then(Engine.unloadEngine); + } + unloadAfterInit = enabled; + }; + + this.setStdoutFunc = function(func) { + + var print = function(text) { + if (arguments.length > 1) { + text = Array.prototype.slice.call(arguments).join(" "); + } + func(text); + }; + if (this.rtenv) + this.rtenv.print = print; + stdout = print; + }; + + this.setStderrFunc = function(func) { + + var printErr = function(text) { + if (arguments.length > 1) + text = Array.prototype.slice.call(arguments).join(" "); + func(text); + }; + if (this.rtenv) + this.rtenv.printErr = printErr; + stderr = printErr; + }; + + + }; // Engine() + + Engine.RuntimeEnvironment = engine.RuntimeEnvironment; + + Engine.isWebGLAvailable = function(majorVersion = 1) { + + var testContext = false; + try { + var testCanvas = document.createElement('canvas'); + if (majorVersion === 1) { + testContext = testCanvas.getContext('webgl') || testCanvas.getContext('experimental-webgl'); + } else if (majorVersion === 2) { + testContext = testCanvas.getContext('webgl2') || testCanvas.getContext('experimental-webgl2'); + } + } catch (e) {} + return !!testContext; + }; + + Engine.setWebAssemblyFilenameExtension = function(override) { + + if (String(override).length === 0) { + throw new Error('Invalid WebAssembly filename extension override'); + } + wasmFilenameExtensionOverride = String(override); + } + + Engine.load = function(newBasePath) { + + if (newBasePath !== undefined) basePath = getBasePath(newBasePath); + if (engineLoadPromise === null) { + if (typeof WebAssembly !== 'object') + return Promise.reject(new Error("Browser doesn't support WebAssembly")); + // TODO cache/retrieve module to/from idb + engineLoadPromise = loadPromise(basePath + '.' + (wasmFilenameExtensionOverride || 'wasm')).then(function(xhr) { + return xhr.response; + }); + engineLoadPromise = engineLoadPromise.catch(function(err) { + engineLoadPromise = null; + throw err; + }); + } + return engineLoadPromise; + }; + + Engine.unload = function() { + engineLoadPromise = null; + }; + + function loadPromise(file, tracker) { + if (tracker === undefined) + tracker = loadingFiles; + return new Promise(function(resolve, reject) { + loadXHR(resolve, reject, file, tracker); + }); + } + + function loadXHR(resolve, reject, file, tracker) { + + var xhr = new XMLHttpRequest; + xhr.open('GET', file); + if (!file.endsWith('.js')) { + xhr.responseType = 'arraybuffer'; + } + ['loadstart', 'progress', 'load', 'error', 'abort'].forEach(function(ev) { + xhr.addEventListener(ev, onXHREvent.bind(xhr, resolve, reject, file, tracker)); + }); + xhr.send(); + } + + function onXHREvent(resolve, reject, file, tracker, ev) { + + if (this.status >= 400) { + + if (this.status < 500 || ++tracker[file].attempts >= DOWNLOAD_ATTEMPTS_MAX) { + reject(new Error("Failed loading file '" + file + "': " + this.statusText)); + this.abort(); + return; + } else { + setTimeout(loadXHR.bind(null, resolve, reject, file, tracker), 1000); + } + } + + switch (ev.type) { + case 'loadstart': + if (tracker[file] === undefined) { + tracker[file] = { + total: ev.total, + loaded: ev.loaded, + attempts: 0, + final: false, + }; + } + break; + + case 'progress': + tracker[file].loaded = ev.loaded; + tracker[file].total = ev.total; + break; + + case 'load': + tracker[file].final = true; + resolve(this); + break; + + case 'error': + if (++tracker[file].attempts >= DOWNLOAD_ATTEMPTS_MAX) { + tracker[file].final = true; + reject(new Error("Failed loading file '" + file + "'")); + } else { + setTimeout(loadXHR.bind(null, resolve, reject, file, tracker), 1000); + } + break; + + case 'abort': + tracker[file].final = true; + reject(new Error("Loading file '" + file + "' was aborted.")); + break; + } + } +})(); diff --git a/LD46.pck b/LD46.pck new file mode 100644 index 0000000..ec05ddc Binary files /dev/null and b/LD46.pck differ diff --git a/LD46.png b/LD46.png new file mode 100644 index 0000000..766b0b6 Binary files /dev/null and b/LD46.png differ diff --git a/LD46.png.import b/LD46.png.import new file mode 100644 index 0000000..1401b17 --- /dev/null +++ b/LD46.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/LD46.png-9f075517b7d77b51e5947dc133b0204f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://LD46.png" +dest_files=[ "res://.import/LD46.png-9f075517b7d77b51e5947dc133b0204f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/LD46.wasm b/LD46.wasm new file mode 100644 index 0000000..eff838b Binary files /dev/null and b/LD46.wasm differ diff --git a/Main.tscn b/Main.tscn new file mode 100644 index 0000000..5395514 --- /dev/null +++ b/Main.tscn @@ -0,0 +1,296 @@ +[gd_scene load_steps=22 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] +[ext_resource path="res://assets/TileSet.tres" type="TileSet" id=2] +[ext_resource path="res://assets/sprites/smelter.tres" type="Texture" id=3] +[ext_resource path="res://assets/sprites/forge.tres" type="Texture" id=4] +[ext_resource path="res://assets/sprites/lathe.tres" type="Texture" id=5] +[ext_resource path="res://assets/sprites/welder.tres" type="Texture" id=6] +[ext_resource path="res://assets/belt.shader" type="Shader" id=7] +[ext_resource path="res://assets/machine.shader" type="Shader" id=8] +[ext_resource path="res://assets/sprites/arrow_in.tres" type="Texture" id=9] +[ext_resource path="res://assets/sprites/arrow_out.tres" type="Texture" id=10] +[ext_resource path="res://assets/sprites/iron_stock.tres" type="Texture" id=11] +[ext_resource path="res://assets/sprites/iron_ore.tres" type="Texture" id=12] +[ext_resource path="res://assets/sprites/iron_rod.tres" type="Texture" id=13] +[ext_resource path="res://assets/sprites/iron_ladder.tres" type="Texture" id=14] +[ext_resource path="res://item.gd" type="Script" id=15] + +[sub_resource type="ShaderMaterial" id=3] +shader = ExtResource( 7 ) +shader_param/rps = 1.0 + +[sub_resource type="TileSet" id=1] +0/name = "belt" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 8, 240, 8, 8 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 +1/name = "widebelt1" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 8, 224, 8, 8 ) +1/tile_mode = 0 +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +1/shape_one_way = false +1/shape_one_way_margin = 0.0 +1/shapes = [ ] +1/z_index = 0 +2/name = "widebelt2" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/modulate = Color( 1, 1, 1, 1 ) +2/region = Rect2( 8, 232, 8, 8 ) +2/tile_mode = 0 +2/occluder_offset = Vector2( 0, 0 ) +2/navigation_offset = Vector2( 0, 0 ) +2/shape_offset = Vector2( 0, 0 ) +2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +2/shape_one_way = false +2/shape_one_way_margin = 0.0 +2/shapes = [ ] +2/z_index = 0 +3/name = "widebelt3" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/modulate = Color( 1, 1, 1, 1 ) +3/region = Rect2( 8, 248, 8, 8 ) +3/tile_mode = 0 +3/occluder_offset = Vector2( 0, 0 ) +3/navigation_offset = Vector2( 0, 0 ) +3/shape_offset = Vector2( 0, 0 ) +3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +3/shape_one_way = false +3/shape_one_way_margin = 0.0 +3/shapes = [ ] +3/z_index = 0 +4/name = "channel" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/modulate = Color( 1, 1, 1, 1 ) +4/region = Rect2( 8, 152, 8, 8 ) +4/tile_mode = 0 +4/occluder_offset = Vector2( 0, 0 ) +4/navigation_offset = Vector2( 0, 0 ) +4/shape_offset = Vector2( 0, 0 ) +4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +4/shape_one_way = false +4/shape_one_way_margin = 0.0 +4/shapes = [ ] +4/z_index = 0 + +[sub_resource type="ShaderMaterial" id=6] +shader = ExtResource( 8 ) +shader_param/rps = 1.0 +shader_param/bg_color = Vector3( 0.251, 0.251, 0.251 ) + +[sub_resource type="ShaderMaterial" id=7] +shader = ExtResource( 8 ) +shader_param/rps = 1.0 +shader_param/bg_color = Vector3( 0.251, 0.251, 0.251 ) + +[sub_resource type="ShaderMaterial" id=4] +shader = ExtResource( 8 ) +shader_param/rps = 1.0 +shader_param/bg_color = Vector3( 0.251, 0.251, 0.251 ) + +[sub_resource type="ShaderMaterial" id=5] +shader = ExtResource( 8 ) +shader_param/rps = 1.0 +shader_param/bg_color = Vector3( 0.251, 0.251, 0.251 ) + +[node name="Main" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 2 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( -1, 3, 7, -65536, 3, 196612, -65535, 3, 196612, -65534, 3, 196612, -65533, 3, 196612, -65532, 3, 196612, -65531, 3, 196612, -65530, 3, 196612, -65529, 3, 196612, -65528, 3, 196612, -65527, 3, 196612, -65526, 3, 196612, -65525, 3, 196612, -65524, 3, 196612, -65523, 3, 196612, -65522, 3, 196612, -65521, 3, 196612, -65520, 3, 196612, -65519, 3, 196612, -65518, 3, 196612, -65517, 3, 196612, -65516, 3, 196612, -65515, 3, 196612, -65514, 3, 196612, -65513, 3, 196612, -65512, 3, 196612, -65511, 3, 196612, -65510, 3, 196612, -65509, 3, 196612, -65508, 3, 196612, -65507, 3, 196612, -65506, 3, 196612, -65505, 3, 196612, -65504, 3, 196612, -65503, 3, 196612, -65502, 3, 196612, -65501, 3, 196612, -65500, 3, 196612, -65499, 3, 196612, -65498, 3, 196612, -65497, 3, 196612, -65496, 3, 196612, -65495, 3, 196612, -65494, 3, 196612, -65493, 3, 196612, -65492, 3, 196612, -65491, 3, 196612, -65490, 3, 196612, -65489, 3, 196612, -65488, 3, 196612, -65487, 3, 196612, -65486, 3, 196612, -65485, 3, 196612, -65484, 3, 196612, -65483, 3, 196612, -65482, 3, 196612, -65481, 3, 196612, -65480, 3, 196612, -65479, 3, 196612, -65478, 3, 196612, -65477, 3, 196612, -65476, 3, 196612, -65475, 3, 196612, -65474, 3, 196612, -65473, 3, 196612, -65472, 3, 196612, -65471, 3, 196612, -65470, 3, 196612, -65469, 3, 196612, -65468, 3, 196612, -65467, 3, 196612, -65466, 3, 196612, -65465, 3, 196612, -65464, 3, 196612, -65463, 3, 196612, -65462, 3, 196612, -65461, 3, 196612, -65460, 3, 196612, -65459, 3, 196612, -65458, 3, 196612, -65457, 3, 196612, -65456, 3, 8, 65535, 3, 131076, 0, 3, 131078, 1, 3, 131078, 2, 3, 131078, 3, 3, 131078, 4, 3, 131078, 5, 3, 131078, 6, 3, 131078, 7, 3, 131078, 8, 3, 131078, 9, 3, 131078, 10, 3, 131078, 11, 3, 131078, 12, 3, 131078, 13, 3, 131078, 14, 3, 131078, 15, 3, 131078, 16, 3, 131078, 17, 3, 131078, 18, 3, 131078, 19, 3, 131078, 20, 3, 131078, 21, 3, 131078, 22, 3, 131078, 23, 3, 131078, 24, 3, 131078, 25, 3, 131078, 26, 3, 131078, 27, 3, 131078, 28, 3, 131078, 29, 3, 131078, 30, 3, 131078, 31, 3, 131078, 32, 3, 131078, 33, 3, 131078, 34, 3, 131078, 35, 3, 131078, 36, 3, 131078, 37, 3, 131078, 38, 3, 131080, 39, 3, 131080, 40, 3, 131078, 41, 3, 131078, 42, 3, 131080, 43, 3, 131080, 44, 3, 131078, 45, 3, 131080, 46, 3, 131080, 47, 3, 131078, 48, 3, 131078, 49, 3, 131078, 50, 3, 131078, 51, 3, 131080, 52, 3, 131078, 53, 3, 131080, 54, 3, 131080, 55, 3, 131078, 56, 3, 131080, 57, 3, 131078, 58, 3, 131080, 59, 3, 131078, 60, 3, 131078, 61, 3, 131078, 62, 3, 131078, 63, 3, 131080, 64, 3, 131080, 65, 3, 131080, 66, 3, 131078, 67, 3, 131078, 68, 3, 131078, 69, 3, 131078, 70, 3, 131078, 71, 3, 131080, 72, 3, 131078, 73, 3, 131080, 74, 3, 131080, 75, 3, 131078, 76, 3, 131078, 77, 3, 131080, 78, 3, 131080, 79, 3, 131078, 80, 3, 131077, 131071, 3, 131076, 65536, 3, 131078, 65537, 3, 131072, 65538, 3, 196613, 65539, 3, 196613, 65540, 3, 196613, 65541, 3, 196613, 65542, 3, 196613, 65543, 3, 196613, 65544, 3, 196613, 65545, 3, 196613, 65546, 3, 196613, 65547, 3, 196613, 65548, 3, 196613, 65549, 3, 196613, 65550, 3, 196613, 65551, 3, 196613, 65552, 3, 196613, 65553, 3, 196613, 65554, 3, 196613, 65555, 3, 196613, 65556, 3, 196613, 65557, 3, 196613, 65558, 3, 196613, 65559, 3, 196613, 65560, 3, 196613, 65561, 3, 196613, 65562, 3, 196613, 65563, 3, 196613, 65564, 3, 196613, 65565, 3, 196613, 65566, 3, 196613, 65567, 3, 196613, 65568, 3, 196613, 65569, 3, 196613, 65570, 3, 196613, 65571, 3, 131073, 65572, 3, 131078, 65573, 3, 131078, 65574, 3, 131078, 65575, 3, 131078, 65576, 3, 131078, 65577, 3, 131080, 65578, 3, 131078, 65579, 3, 131080, 65580, 3, 131078, 65581, 3, 131080, 65582, 3, 131080, 65583, 3, 131080, 65584, 3, 131080, 65585, 3, 131078, 65586, 3, 131080, 65587, 3, 131078, 65588, 3, 131080, 65589, 3, 131080, 65590, 3, 131080, 65591, 3, 131080, 65592, 3, 131078, 65593, 3, 131080, 65594, 3, 131080, 65595, 3, 131078, 65596, 3, 131080, 65597, 3, 131078, 65598, 3, 131080, 65599, 3, 131078, 65600, 3, 131078, 65601, 3, 131078, 65602, 3, 131078, 65603, 3, 131078, 65604, 3, 131078, 65605, 3, 131080, 65606, 3, 131080, 65607, 3, 131078, 65608, 3, 131080, 65609, 3, 131080, 65610, 3, 131080, 65611, 3, 131080, 65612, 3, 131080, 65613, 3, 131080, 65614, 3, 131080, 65615, 3, 131078, 65616, 3, 131077, 196607, 3, 131076, 131072, 3, 131078, 131073, 3, 131077, 131074, 1, 0, 131075, 1, 0, 131076, 1, 0, 131077, 1, 0, 131078, 1, 0, 131079, 1, 0, 131080, 1, 0, 131081, 1, 0, 131082, 1, 0, 131083, 1, 0, 131084, 1, 0, 131085, 1, 0, 131086, 1, 0, 131087, 1, 0, 131088, 1, 0, 131089, 1, 0, 131090, 1, 0, 131091, 1, 0, 131092, 1, 0, 131093, 1, 0, 131094, 1, 0, 131095, 1, 0, 131096, 1, 0, 131097, 1, 0, 131098, 1, 0, 131099, 1, 0, 131100, 1, 0, 131101, 1, 0, 131102, 1, 0, 131103, 1, 0, 131104, 1, 0, 131105, 1, 0, 131106, 1, 0, 131107, 3, 131076, 131108, 3, 131078, 131109, 3, 131078, 131110, 3, 131080, 131111, 3, 131080, 131112, 3, 131080, 131113, 3, 131078, 131114, 3, 131080, 131115, 3, 131078, 131116, 3, 131080, 131117, 3, 131078, 131118, 3, 131078, 131119, 3, 131078, 131120, 3, 131080, 131121, 3, 131078, 131122, 3, 131078, 131123, 3, 131078, 131124, 3, 131078, 131125, 3, 131080, 131126, 3, 131078, 131127, 3, 131080, 131128, 3, 131078, 131129, 3, 131078, 131130, 3, 131078, 131131, 3, 131080, 131132, 3, 131080, 131133, 3, 131080, 131134, 3, 131078, 131135, 3, 131080, 131136, 3, 131080, 131137, 3, 131078, 131138, 3, 131080, 131139, 3, 131080, 131140, 3, 131078, 131141, 3, 131078, 131142, 3, 131080, 131143, 3, 131080, 131144, 3, 131080, 131145, 3, 131078, 131146, 3, 131078, 131147, 3, 131078, 131148, 3, 131078, 131149, 3, 131080, 131150, 3, 131080, 131151, 3, 131080, 131152, 3, 131077, 262143, 3, 131076, 196608, 3, 131078, 196609, 3, 131077, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 196621, 1, 0, 196622, 1, 0, 196623, 1, 0, 196624, 1, 0, 196625, 1, 0, 196626, 1, 0, 196627, 1, 0, 196628, 1, 0, 196629, 1, 0, 196630, 1, 0, 196631, 1, 0, 196632, 1, 0, 196633, 1, 0, 196634, 1, 0, 196635, 1, 0, 196636, 1, 0, 196637, 1, 0, 196638, 1, 0, 196639, 1, 0, 196640, 1, 0, 196641, 1, 0, 196642, 1, 0, 196643, 3, 131076, 196644, 3, 131078, 196645, 3, 131080, 196646, 3, 131080, 196647, 3, 131078, 196648, 3, 131078, 196649, 3, 131080, 196650, 3, 131078, 196651, 3, 131078, 196652, 3, 131078, 196653, 3, 131080, 196654, 3, 131078, 196655, 3, 131078, 196656, 3, 131080, 196657, 3, 131078, 196658, 3, 131078, 196659, 3, 131078, 196660, 3, 131080, 196661, 3, 131080, 196662, 3, 131078, 196663, 3, 131078, 196664, 3, 131078, 196665, 3, 131080, 196666, 3, 131078, 196667, 3, 131080, 196668, 3, 131080, 196669, 3, 131080, 196670, 3, 131080, 196671, 3, 131078, 196672, 3, 131080, 196673, 3, 131080, 196674, 3, 131080, 196675, 3, 131078, 196676, 3, 131078, 196677, 3, 131078, 196678, 3, 131080, 196679, 3, 131080, 196680, 3, 131078, 196681, 3, 131080, 196682, 3, 131080, 196683, 3, 131078, 196684, 3, 131078, 196685, 3, 131078, 196686, 3, 131080, 196687, 3, 131078, 196688, 3, 131077, 327679, 3, 131076, 262144, 3, 131078, 262145, 3, 131077, 262146, 1, 0, 262147, 1, 0, 262148, 1, 0, 262149, 3, 0, 262150, 3, 2, 262151, 3, 2, 262152, 3, 262148, 262153, 3, 196612, 262154, 3, 8, 262155, 1, 0, 262156, 1, 0, 262157, 1, 0, 262158, 1, 0, 262159, 1, 0, 262160, 1, 0, 262161, 1, 0, 262162, 1, 0, 262163, 1, 0, 262164, 1, 0, 262165, 1, 0, 262166, 1, 0, 262167, 1, 0, 262168, 1, 0, 262169, 1, 0, 262170, 1, 0, 262171, 1, 0, 262172, 1, 0, 262173, 1, 0, 262174, 1, 0, 262175, 1, 0, 262176, 1, 0, 262177, 1, 0, 262178, 1, 0, 262179, 3, 131076, 262180, 3, 131078, 262181, 3, 131080, 262182, 3, 131078, 262183, 3, 131078, 262184, 3, 131080, 262185, 3, 131078, 262186, 3, 131078, 262187, 3, 131078, 262188, 3, 131078, 262189, 3, 131078, 262190, 3, 131078, 262191, 3, 131080, 262192, 3, 131080, 262193, 3, 131080, 262194, 3, 131080, 262195, 3, 131078, 262196, 3, 131078, 262197, 3, 131080, 262198, 3, 131080, 262199, 3, 131078, 262200, 3, 131078, 262201, 3, 131078, 262202, 3, 131080, 262203, 3, 131080, 262204, 3, 131078, 262205, 3, 131078, 262206, 3, 131080, 262207, 3, 131078, 262208, 3, 131080, 262209, 3, 131080, 262210, 3, 131080, 262211, 3, 131080, 262212, 3, 131080, 262213, 3, 131078, 262214, 3, 131080, 262215, 3, 131080, 262216, 3, 131078, 262217, 3, 131078, 262218, 3, 131078, 262219, 3, 131078, 262220, 3, 131080, 262221, 3, 131080, 262222, 3, 131078, 262223, 3, 131078, 262224, 3, 131077, 393215, 3, 131076, 327680, 3, 131078, 327681, 3, 131077, 327682, 1, 0, 327683, 1, 0, 327684, 1, 0, 327685, 3, 6, 327686, 1, 0, 327687, 1, 0, 327688, 3, 65543, 327689, 3, 196613, 327690, 3, 65544, 327691, 1, 0, 327692, 1, 0, 327693, 1, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 1, 0, 327700, 1, 0, 327701, 1, 0, 327702, 1, 0, 327703, 1, 0, 327704, 1, 0, 327705, 1, 0, 327706, 1, 0, 327707, 1, 0, 327708, 1, 0, 327709, 1, 0, 327710, 1, 0, 327711, 1, 0, 327712, 1, 0, 327713, 1, 0, 327714, 1, 0, 327715, 3, 131076, 327716, 3, 131078, 327717, 3, 131078, 327718, 3, 131078, 327719, 3, 131080, 327720, 3, 131078, 327721, 3, 131080, 327722, 3, 131080, 327723, 3, 131078, 327724, 3, 131078, 327725, 3, 131080, 327726, 3, 131080, 327727, 3, 131078, 327728, 3, 131078, 327729, 3, 131080, 327730, 3, 131080, 327731, 3, 131078, 327732, 3, 131078, 327733, 3, 131078, 327734, 3, 131080, 327735, 3, 131078, 327736, 3, 131078, 327737, 3, 131078, 327738, 3, 131078, 327739, 3, 131078, 327740, 3, 131078, 327741, 3, 131080, 327742, 3, 131078, 327743, 3, 131080, 327744, 3, 131078, 327745, 3, 131080, 327746, 3, 131080, 327747, 3, 131080, 327748, 3, 131078, 327749, 3, 131080, 327750, 3, 131080, 327751, 3, 131080, 327752, 3, 131080, 327753, 3, 131080, 327754, 3, 131078, 327755, 3, 131080, 327756, 3, 131078, 327757, 3, 131078, 327758, 3, 131078, 327759, 3, 131078, 327760, 3, 131077, 458751, 3, 131076, 393216, 3, 131078, 393217, 3, 131077, 393218, 1, 0, 393219, 1, 0, 393220, 1, 0, 393221, 1, 0, 393222, 1, 0, 393223, 1, 0, 393224, 1, 0, 393225, 1, 0, 393226, 1, 0, 393227, 1, 0, 393228, 1, 0, 393229, 1, 0, 393230, 1, 0, 393231, 1, 0, 393232, 1, 0, 393233, 1, 0, 393234, 1, 0, 393235, 1, 0, 393236, 1, 0, 393237, 1, 0, 393238, 1, 0, 393239, 1, 0, 393240, 1, 0, 393241, 1, 0, 393242, 1, 0, 393243, 1, 0, 393244, 1, 0, 393245, 1, 0, 393246, 1, 0, 393247, 1, 0, 393248, 1, 0, 393249, 1, 0, 393250, 1, 0, 393251, 3, 131076, 393252, 3, 131078, 393253, 3, 131080, 393254, 3, 131078, 393255, 3, 131080, 393256, 3, 131078, 393257, 3, 131078, 393258, 3, 131080, 393259, 3, 131080, 393260, 3, 131080, 393261, 3, 131078, 393262, 3, 131080, 393263, 3, 131080, 393264, 3, 131080, 393265, 3, 131080, 393266, 3, 131080, 393267, 3, 131080, 393268, 3, 131078, 393269, 3, 131078, 393270, 3, 131080, 393271, 3, 131080, 393272, 3, 131080, 393273, 3, 131080, 393274, 3, 131078, 393275, 3, 131080, 393276, 3, 131080, 393277, 3, 131078, 393278, 3, 131078, 393279, 3, 131078, 393280, 3, 131078, 393281, 3, 131080, 393282, 3, 131080, 393283, 3, 131078, 393284, 3, 131078, 393285, 3, 131078, 393286, 3, 131078, 393287, 3, 131078, 393288, 3, 131078, 393289, 3, 131080, 393290, 3, 131078, 393291, 3, 131080, 393292, 3, 131078, 393293, 3, 131078, 393294, 3, 131080, 393295, 3, 131080, 393296, 3, 131077, 524287, 3, 131076, 458752, 3, 131078, 458753, 3, 131077, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 1, 0, 458763, 1, 0, 458764, 1, 0, 458765, 1, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 458772, 1, 0, 458773, 1, 0, 458774, 1, 0, 458775, 1, 0, 458776, 1, 0, 458777, 1, 0, 458778, 1, 0, 458779, 1, 0, 458780, 1, 0, 458781, 1, 0, 458782, 1, 0, 458783, 1, 0, 458784, 1, 0, 458785, 1, 0, 458786, 1, 0, 458787, 3, 131076, 458788, 3, 131078, 458789, 3, 131080, 458790, 3, 131078, 458791, 3, 131078, 458792, 3, 131080, 458793, 3, 131080, 458794, 3, 131078, 458795, 3, 131080, 458796, 3, 131078, 458797, 3, 131080, 458798, 3, 131078, 458799, 3, 131080, 458800, 3, 131080, 458801, 3, 131080, 458802, 3, 131080, 458803, 3, 131080, 458804, 3, 131078, 458805, 3, 131080, 458806, 3, 131080, 458807, 3, 131080, 458808, 3, 131078, 458809, 3, 131080, 458810, 3, 131078, 458811, 3, 131080, 458812, 3, 131078, 458813, 3, 131078, 458814, 3, 131078, 458815, 3, 131080, 458816, 3, 131080, 458817, 3, 131078, 458818, 3, 131078, 458819, 3, 131080, 458820, 3, 131078, 458821, 3, 131078, 458822, 3, 131078, 458823, 3, 131080, 458824, 3, 131080, 458825, 3, 131080, 458826, 3, 131078, 458827, 3, 131078, 458828, 3, 131078, 458829, 3, 131080, 458830, 3, 131080, 458831, 3, 131080, 458832, 3, 131077, 589823, 3, 131076, 524288, 3, 131078, 524289, 3, 131077, 524290, 1, 0, 524291, 1, 0, 524292, 1, 0, 524293, 1, 0, 524294, 1, 0, 524295, 1, 0, 524296, 1, 0, 524297, 1, 0, 524298, 1, 0, 524299, 1, 0, 524300, 1, 0, 524301, 1, 0, 524302, 1, 0, 524303, 1, 0, 524304, 1, 0, 524305, 1, 0, 524306, 1, 0, 524307, 1, 0, 524308, 1, 0, 524309, 1, 0, 524310, 1, 0, 524311, 1, 0, 524312, 1, 0, 524313, 1, 0, 524314, 1, 0, 524315, 1, 0, 524316, 1, 0, 524317, 1, 0, 524318, 1, 0, 524319, 1, 0, 524320, 1, 0, 524321, 1, 0, 524322, 1, 0, 524323, 3, 131076, 524324, 3, 131078, 524325, 3, 131078, 524326, 3, 131080, 524327, 3, 131078, 524328, 3, 131078, 524329, 3, 131080, 524330, 3, 131078, 524331, 3, 131078, 524332, 3, 131078, 524333, 3, 131080, 524334, 3, 131078, 524335, 3, 131078, 524336, 3, 131080, 524337, 3, 131080, 524338, 3, 131080, 524339, 3, 131080, 524340, 3, 131078, 524341, 3, 131078, 524342, 3, 131078, 524343, 3, 131078, 524344, 3, 131078, 524345, 3, 131080, 524346, 3, 131078, 524347, 3, 131080, 524348, 3, 131080, 524349, 3, 131080, 524350, 3, 131078, 524351, 3, 131078, 524352, 3, 131078, 524353, 3, 131080, 524354, 3, 131078, 524355, 3, 131078, 524356, 3, 131080, 524357, 3, 131080, 524358, 3, 131078, 524359, 3, 131078, 524360, 3, 131078, 524361, 3, 131078, 524362, 3, 131078, 524363, 3, 131078, 524364, 3, 131080, 524365, 3, 131080, 524366, 3, 131080, 524367, 3, 131078, 524368, 3, 131077, 655359, 3, 131076, 589824, 3, 131078, 589825, 3, 131077, 589826, 1, 0, 589827, 1, 0, 589828, 1, 0, 589829, 3, 65541, 589830, 1, 0, 589831, 1, 0, 589832, 1, 0, 589833, 1, 0, 589834, 3, 65541, 589835, 1, 0, 589836, 1, 0, 589837, 1, 0, 589838, 1, 0, 589839, 1, 0, 589840, 1, 0, 589841, 1, 0, 589842, 1, 0, 589843, 1, 0, 589844, 1, 0, 589845, 1, 0, 589846, 1, 0, 589847, 1, 0, 589848, 1, 0, 589849, 1, 0, 589850, 1, 0, 589851, 1, 0, 589852, 1, 0, 589853, 1, 0, 589854, 1, 0, 589855, 1, 0, 589856, 1, 0, 589857, 1, 0, 589858, 1, 0, 589859, 3, 131076, 589860, 3, 131078, 589861, 3, 131078, 589862, 3, 131080, 589863, 3, 131080, 589864, 3, 131080, 589865, 3, 131078, 589866, 3, 131078, 589867, 3, 131080, 589868, 3, 131080, 589869, 3, 131078, 589870, 3, 131080, 589871, 3, 131078, 589872, 3, 131078, 589873, 3, 131078, 589874, 3, 131080, 589875, 3, 131080, 589876, 3, 131078, 589877, 3, 131080, 589878, 3, 131080, 589879, 3, 131080, 589880, 3, 131078, 589881, 3, 131080, 589882, 3, 131078, 589883, 3, 131080, 589884, 3, 131080, 589885, 3, 131080, 589886, 3, 131080, 589887, 3, 131080, 589888, 3, 131078, 589889, 3, 131080, 589890, 3, 131080, 589891, 3, 131080, 589892, 3, 131080, 589893, 3, 131078, 589894, 3, 131078, 589895, 3, 131078, 589896, 3, 131080, 589897, 3, 131078, 589898, 3, 131080, 589899, 3, 131080, 589900, 3, 131078, 589901, 3, 131080, 589902, 3, 131080, 589903, 3, 131078, 589904, 3, 131077, 720895, 3, 131076, 655360, 3, 131078, 655361, 3, 131077, 655362, 1, 0, 655363, 1, 0, 655364, 1, 0, 655365, 3, 65538, 655366, 1, 0, 655367, 1, 0, 655368, 1, 0, 655369, 1, 0, 655370, 3, 65538, 655371, 1, 0, 655372, 1, 0, 655373, 1, 0, 655374, 1, 0, 655375, 1, 0, 655376, 1, 0, 655377, 1, 0, 655378, 1, 0, 655379, 1, 0, 655380, 1, 0, 655381, 1, 0, 655382, 1, 0, 655383, 1, 0, 655384, 1, 0, 655385, 1, 0, 655386, 1, 0, 655387, 1, 0, 655388, 1, 0, 655389, 1, 0, 655390, 1, 0, 655391, 1, 0, 655392, 1, 0, 655393, 1, 0, 655394, 1, 0, 655395, 3, 131076, 655396, 3, 131078, 655397, 3, 131078, 655398, 3, 131078, 655399, 3, 131080, 655400, 3, 131080, 655401, 3, 131078, 655402, 3, 131080, 655403, 3, 131078, 655404, 3, 131080, 655405, 3, 131078, 655406, 3, 131078, 655407, 3, 131078, 655408, 3, 131080, 655409, 3, 131080, 655410, 3, 131078, 655411, 3, 131080, 655412, 3, 131078, 655413, 3, 131080, 655414, 3, 131078, 655415, 3, 131080, 655416, 3, 131080, 655417, 3, 131078, 655418, 3, 131080, 655419, 3, 131078, 655420, 3, 131080, 655421, 3, 131080, 655422, 3, 131080, 655423, 3, 131080, 655424, 3, 131080, 655425, 3, 131078, 655426, 3, 131078, 655427, 3, 131080, 655428, 3, 131080, 655429, 3, 131078, 655430, 3, 131080, 655431, 3, 131080, 655432, 3, 131078, 655433, 3, 131080, 655434, 3, 131080, 655435, 3, 131078, 655436, 3, 131078, 655437, 3, 131078, 655438, 3, 131080, 655439, 3, 131080, 655440, 3, 131077, 786431, 3, 131076, 720896, 3, 131078, 720897, 3, 131077, 720898, 1, 0, 720899, 1, 0, 720900, 1, 0, 720901, 3, 65538, 720902, 1, 0, 720903, 1, 0, 720904, 1, 0, 720905, 1, 0, 720906, 3, 65538, 720907, 1, 0, 720908, 1, 0, 720909, 1, 0, 720910, 1, 0, 720911, 1, 0, 720912, 1, 0, 720913, 1, 0, 720914, 1, 0, 720915, 1, 0, 720916, 1, 0, 720917, 1, 0, 720918, 1, 0, 720919, 1, 0, 720920, 1, 0, 720921, 1, 0, 720922, 1, 0, 720923, 1, 0, 720924, 1, 0, 720925, 1, 0, 720926, 1, 0, 720927, 1, 0, 720928, 1, 0, 720929, 1, 0, 720930, 1, 0, 720931, 3, 131076, 720932, 3, 131078, 720933, 3, 131080, 720934, 3, 131080, 720935, 3, 131080, 720936, 3, 131080, 720937, 3, 131080, 720938, 3, 131078, 720939, 3, 131080, 720940, 3, 131080, 720941, 3, 131080, 720942, 3, 131080, 720943, 3, 131078, 720944, 3, 131078, 720945, 3, 131078, 720946, 3, 131078, 720947, 3, 131078, 720948, 3, 131080, 720949, 3, 131080, 720950, 3, 131080, 720951, 3, 131080, 720952, 3, 131080, 720953, 3, 131078, 720954, 3, 131080, 720955, 3, 131080, 720956, 3, 131080, 720957, 3, 131078, 720958, 3, 131078, 720959, 3, 131078, 720960, 3, 131080, 720961, 3, 131078, 720962, 3, 131080, 720963, 3, 131080, 720964, 3, 131078, 720965, 3, 131080, 720966, 3, 131080, 720967, 3, 131080, 720968, 3, 131078, 720969, 3, 131080, 720970, 3, 131080, 720971, 3, 131080, 720972, 3, 131080, 720973, 3, 131080, 720974, 3, 131080, 720975, 3, 131078, 720976, 3, 131077, 851967, 3, 131076, 786432, 3, 131078, 786433, 3, 131077, 786434, 1, 0, 786435, 1, 0, 786436, 1, 0, 786437, 3, 65538, 786438, 1, 0, 786439, 1, 0, 786440, 1, 0, 786441, 1, 0, 786442, 3, 65538, 786443, 1, 0, 786444, 1, 0, 786445, 1, 0, 786446, 1, 0, 786447, 1, 0, 786448, 1, 0, 786449, 1, 0, 786450, 1, 0, 786451, 1, 0, 786452, 1, 0, 786453, 1, 0, 786454, 1, 0, 786455, 1, 0, 786456, 1, 0, 786457, 1, 0, 786458, 1, 0, 786459, 1, 0, 786460, 1, 0, 786461, 1, 0, 786462, 1, 0, 786463, 1, 0, 786464, 1, 0, 786465, 1, 0, 786466, 1, 0, 786467, 3, 131076, 786468, 3, 131078, 786469, 3, 131078, 786470, 3, 131080, 786471, 3, 131080, 786472, 3, 131080, 786473, 3, 131080, 786474, 3, 131080, 786475, 3, 131080, 786476, 3, 131080, 786477, 3, 131080, 786478, 3, 131080, 786479, 3, 131080, 786480, 3, 131078, 786481, 3, 131080, 786482, 3, 131080, 786483, 3, 131078, 786484, 3, 131080, 786485, 3, 131080, 786486, 3, 131078, 786487, 3, 131080, 786488, 3, 131080, 786489, 3, 131078, 786490, 3, 131080, 786491, 3, 131080, 786492, 3, 131078, 786493, 3, 131080, 786494, 3, 131078, 786495, 3, 131080, 786496, 3, 131080, 786497, 3, 131080, 786498, 3, 131078, 786499, 3, 131080, 786500, 3, 131080, 786501, 3, 131078, 786502, 3, 131080, 786503, 3, 131078, 786504, 3, 131078, 786505, 3, 131080, 786506, 3, 131080, 786507, 3, 131078, 786508, 3, 131078, 786509, 3, 131078, 786510, 3, 131078, 786511, 3, 131080, 786512, 3, 131077, 917503, 3, 131076, 851968, 3, 131078, 851969, 3, 131077, 851970, 1, 0, 851971, 1, 0, 851972, 1, 0, 851973, 3, 65538, 851974, 1, 0, 851975, 1, 0, 851976, 1, 0, 851977, 1, 0, 851978, 3, 65538, 851979, 1, 0, 851980, 1, 0, 851981, 1, 0, 851982, 1, 0, 851983, 1, 0, 851984, 1, 0, 851985, 1, 0, 851986, 1, 0, 851987, 1, 0, 851988, 1, 0, 851989, 1, 0, 851990, 1, 0, 851991, 1, 0, 851992, 1, 0, 851993, 1, 0, 851994, 1, 0, 851995, 1, 0, 851996, 1, 0, 851997, 1, 0, 851998, 1, 0, 851999, 1, 0, 852000, 1, 0, 852001, 1, 0, 852002, 1, 0, 852003, 3, 131076, 852004, 3, 131078, 852005, 3, 131078, 852006, 3, 131078, 852007, 3, 131080, 852008, 3, 131078, 852009, 3, 131080, 852010, 3, 131078, 852011, 3, 131080, 852012, 3, 131080, 852013, 3, 131080, 852014, 3, 131080, 852015, 3, 131080, 852016, 3, 131080, 852017, 3, 131080, 852018, 3, 131080, 852019, 3, 131078, 852020, 3, 131080, 852021, 3, 131080, 852022, 3, 131078, 852023, 3, 131080, 852024, 3, 131078, 852025, 3, 131080, 852026, 3, 131080, 852027, 3, 131078, 852028, 3, 131080, 852029, 3, 131080, 852030, 3, 131080, 852031, 3, 131078, 852032, 3, 131078, 852033, 3, 131080, 852034, 3, 131080, 852035, 3, 131080, 852036, 3, 131080, 852037, 3, 131080, 852038, 3, 131080, 852039, 3, 131080, 852040, 3, 131078, 852041, 3, 131080, 852042, 3, 131078, 852043, 3, 131078, 852044, 3, 131078, 852045, 3, 131078, 852046, 3, 131078, 852047, 3, 131078, 852048, 3, 131077, 983039, 3, 131076, 917504, 3, 131078, 917505, 3, 131077, 917506, 1, 0, 917507, 1, 0, 917508, 1, 0, 917509, 3, 65538, 917510, 1, 0, 917511, 1, 0, 917512, 1, 0, 917513, 1, 0, 917514, 3, 65538, 917515, 1, 0, 917516, 1, 0, 917517, 1, 0, 917518, 1, 0, 917519, 1, 0, 917520, 1, 0, 917521, 1, 0, 917522, 1, 0, 917523, 1, 0, 917524, 1, 0, 917525, 1, 0, 917526, 1, 0, 917527, 1, 0, 917528, 1, 0, 917529, 1, 0, 917530, 1, 0, 917531, 1, 0, 917532, 1, 0, 917533, 1, 0, 917534, 1, 0, 917535, 1, 0, 917536, 1, 0, 917537, 1, 0, 917538, 1, 0, 917539, 3, 131076, 917540, 3, 131078, 917541, 3, 131078, 917542, 3, 131078, 917543, 3, 131078, 917544, 3, 131080, 917545, 3, 131078, 917546, 3, 131078, 917547, 3, 131080, 917548, 3, 131078, 917549, 3, 131078, 917550, 3, 131078, 917551, 3, 131080, 917552, 3, 131080, 917553, 3, 131080, 917554, 3, 131078, 917555, 3, 131080, 917556, 3, 131078, 917557, 3, 131078, 917558, 3, 131078, 917559, 3, 131080, 917560, 3, 131080, 917561, 3, 131080, 917562, 3, 131078, 917563, 3, 131078, 917564, 3, 131078, 917565, 3, 131078, 917566, 3, 131078, 917567, 3, 131078, 917568, 3, 131080, 917569, 3, 131080, 917570, 3, 131080, 917571, 3, 131078, 917572, 3, 131078, 917573, 3, 131080, 917574, 3, 131080, 917575, 3, 131080, 917576, 3, 131080, 917577, 3, 131080, 917578, 3, 131080, 917579, 3, 131078, 917580, 3, 131080, 917581, 3, 131080, 917582, 3, 131080, 917583, 3, 131080, 917584, 3, 131077, 1048575, 3, 131076, 983040, 3, 131078, 983041, 3, 131077, 983042, 1, 0, 983043, 1, 0, 983044, 1, 0, 983045, 3, 65538, 983046, 1, 0, 983047, 1, 0, 983048, 1, 0, 983049, 1, 0, 983050, 3, 65538, 983051, 1, 0, 983052, 1, 0, 983053, 1, 0, 983054, 1, 0, 983055, 1, 0, 983056, 1, 0, 983057, 1, 0, 983058, 1, 0, 983059, 1, 0, 983060, 1, 0, 983061, 1, 0, 983062, 1, 0, 983063, 1, 0, 983064, 1, 0, 983065, 1, 0, 983066, 1, 0, 983067, 1, 0, 983068, 1, 0, 983069, 1, 0, 983070, 1, 0, 983071, 1, 0, 983072, 1, 0, 983073, 1, 0, 983074, 1, 0, 983075, 3, 131076, 983076, 3, 131078, 983077, 3, 131078, 983078, 3, 131080, 983079, 3, 131080, 983080, 3, 131078, 983081, 3, 131080, 983082, 3, 131078, 983083, 3, 131078, 983084, 3, 131080, 983085, 3, 131078, 983086, 3, 131080, 983087, 3, 131078, 983088, 3, 131080, 983089, 3, 131078, 983090, 3, 131078, 983091, 3, 131080, 983092, 3, 131080, 983093, 3, 131078, 983094, 3, 131078, 983095, 3, 131080, 983096, 3, 131078, 983097, 3, 131078, 983098, 3, 131080, 983099, 3, 131078, 983100, 3, 131080, 983101, 3, 131080, 983102, 3, 131080, 983103, 3, 131078, 983104, 3, 131078, 983105, 3, 131078, 983106, 3, 131080, 983107, 3, 131080, 983108, 3, 131080, 983109, 3, 131078, 983110, 3, 131080, 983111, 3, 131080, 983112, 3, 131078, 983113, 3, 131080, 983114, 3, 131078, 983115, 3, 131080, 983116, 3, 131078, 983117, 3, 131078, 983118, 3, 131080, 983119, 3, 131080, 983120, 3, 131077, 1114111, 3, 131076, 1048576, 3, 131078, 1048577, 3, 131077, 1048578, 1, 0, 1048579, 1, 0, 1048580, 1, 0, 1048581, 3, 65538, 1048582, 1, 0, 1048583, 1, 0, 1048584, 1, 0, 1048585, 1, 0, 1048586, 3, 65538, 1048587, 1, 0, 1048588, 1, 0, 1048589, 1, 0, 1048590, 1, 0, 1048591, 1, 0, 1048592, 1, 0, 1048593, 1, 0, 1048594, 1, 0, 1048595, 1, 0, 1048596, 1, 0, 1048597, 1, 0, 1048598, 1, 0, 1048599, 1, 0, 1048600, 1, 0, 1048601, 1, 0, 1048602, 1, 0, 1048603, 1, 0, 1048604, 1, 0, 1048605, 1, 0, 1048606, 1, 0, 1048607, 1, 0, 1048608, 1, 0, 1048609, 1, 0, 1048610, 1, 0, 1048611, 3, 131076, 1048612, 3, 131078, 1048613, 3, 131078, 1048614, 3, 131080, 1048615, 3, 131078, 1048616, 3, 131078, 1048617, 3, 131078, 1048618, 3, 131080, 1048619, 3, 131080, 1048620, 3, 131078, 1048621, 3, 131080, 1048622, 3, 131078, 1048623, 3, 131078, 1048624, 3, 131078, 1048625, 3, 131078, 1048626, 3, 131078, 1048627, 3, 131080, 1048628, 3, 131080, 1048629, 3, 131078, 1048630, 3, 131078, 1048631, 3, 131080, 1048632, 3, 131080, 1048633, 3, 131080, 1048634, 3, 131078, 1048635, 3, 131080, 1048636, 3, 131080, 1048637, 3, 131078, 1048638, 3, 131078, 1048639, 3, 131080, 1048640, 3, 131078, 1048641, 3, 131080, 1048642, 3, 131080, 1048643, 3, 131080, 1048644, 3, 131080, 1048645, 3, 131078, 1048646, 3, 131080, 1048647, 3, 131080, 1048648, 3, 131080, 1048649, 3, 131080, 1048650, 3, 131080, 1048651, 3, 131078, 1048652, 3, 131080, 1048653, 3, 131080, 1048654, 3, 131078, 1048655, 3, 131080, 1048656, 3, 131077, 1179647, 3, 131076, 1114112, 3, 131078, 1114113, 3, 131077, 1114114, 1, 0, 1114115, 1, 0, 1114116, 1, 0, 1114117, 3, 65538, 1114118, 1, 0, 1114119, 1, 0, 1114120, 1, 0, 1114121, 1, 0, 1114122, 3, 65538, 1114123, 1, 0, 1114124, 1, 0, 1114125, 1, 0, 1114126, 1, 0, 1114127, 1, 0, 1114128, 1, 0, 1114129, 1, 0, 1114130, 1, 0, 1114131, 1, 0, 1114132, 1, 0, 1114133, 1, 0, 1114134, 1, 0, 1114135, 1, 0, 1114136, 1, 0, 1114137, 1, 0, 1114138, 1, 0, 1114139, 1, 0, 1114140, 1, 0, 1114141, 1, 0, 1114142, 1, 0, 1114143, 1, 0, 1114144, 1, 0, 1114145, 1, 0, 1114146, 1, 0, 1114147, 3, 131076, 1114148, 3, 131078, 1114149, 3, 131080, 1114150, 3, 131078, 1114151, 3, 131078, 1114152, 3, 131078, 1114153, 3, 131078, 1114154, 3, 131080, 1114155, 3, 131078, 1114156, 3, 131078, 1114157, 3, 131080, 1114158, 3, 131078, 1114159, 3, 131078, 1114160, 3, 131078, 1114161, 3, 131078, 1114162, 3, 131078, 1114163, 3, 131078, 1114164, 3, 131078, 1114165, 3, 131078, 1114166, 3, 131080, 1114167, 3, 131078, 1114168, 3, 131078, 1114169, 3, 131080, 1114170, 3, 131078, 1114171, 3, 131080, 1114172, 3, 131080, 1114173, 3, 131078, 1114174, 3, 131078, 1114175, 3, 131078, 1114176, 3, 131078, 1114177, 3, 131078, 1114178, 3, 131078, 1114179, 3, 131078, 1114180, 3, 131080, 1114181, 3, 131080, 1114182, 3, 131078, 1114183, 3, 131078, 1114184, 3, 131078, 1114185, 3, 131080, 1114186, 3, 131078, 1114187, 3, 131080, 1114188, 3, 131080, 1114189, 3, 131078, 1114190, 3, 131080, 1114191, 3, 131080, 1114192, 3, 131077, 1245183, 3, 131076, 1179648, 3, 131078, 1179649, 3, 131077, 1179650, 1, 0, 1179651, 1, 0, 1179652, 1, 0, 1179653, 3, 65538, 1179654, 1, 0, 1179655, 1, 0, 1179656, 1, 0, 1179657, 1, 0, 1179658, 3, 65538, 1179659, 1, 0, 1179660, 1, 0, 1179661, 1, 0, 1179662, 1, 0, 1179663, 1, 0, 1179664, 1, 0, 1179665, 1, 0, 1179666, 1, 0, 1179667, 1, 0, 1179668, 1, 0, 1179669, 1, 0, 1179670, 1, 0, 1179671, 1, 0, 1179672, 1, 0, 1179673, 1, 0, 1179674, 1, 0, 1179675, 1, 0, 1179676, 1, 0, 1179677, 1, 0, 1179678, 1, 0, 1179679, 1, 0, 1179680, 1, 0, 1179681, 1, 0, 1179682, 1, 0, 1179683, 3, 131076, 1179684, 3, 131078, 1179685, 3, 131078, 1179686, 3, 131078, 1179687, 3, 131078, 1179688, 3, 131078, 1179689, 3, 131080, 1179690, 3, 131080, 1179691, 3, 131078, 1179692, 3, 131078, 1179693, 3, 131078, 1179694, 3, 131078, 1179695, 3, 131080, 1179696, 3, 131078, 1179697, 3, 131078, 1179698, 3, 131080, 1179699, 3, 131080, 1179700, 3, 131078, 1179701, 3, 131078, 1179702, 3, 131080, 1179703, 3, 131078, 1179704, 3, 131080, 1179705, 3, 131078, 1179706, 3, 131080, 1179707, 3, 131080, 1179708, 3, 131080, 1179709, 3, 131080, 1179710, 3, 131078, 1179711, 3, 131080, 1179712, 3, 131080, 1179713, 3, 131080, 1179714, 3, 131080, 1179715, 3, 131078, 1179716, 3, 131078, 1179717, 3, 131080, 1179718, 3, 131080, 1179719, 3, 131078, 1179720, 3, 131078, 1179721, 3, 131080, 1179722, 3, 131078, 1179723, 3, 131080, 1179724, 3, 131078, 1179725, 3, 131080, 1179726, 3, 131080, 1179727, 3, 131078, 1179728, 3, 131077, 1310719, 3, 131076, 1245184, 3, 131078, 1245185, 3, 131077, 1245186, 1, 0, 1245187, 1, 0, 1245188, 1, 0, 1245189, 3, 65538, 1245190, 1, 0, 1245191, 1, 0, 1245192, 1, 0, 1245193, 1, 0, 1245194, 3, 65538, 1245195, 1, 0, 1245196, 1, 0, 1245197, 1, 0, 1245198, 1, 0, 1245199, 1, 0, 1245200, 1, 0, 1245201, 1, 0, 1245202, 1, 0, 1245203, 1, 0, 1245204, 1, 0, 1245205, 1, 0, 1245206, 1, 0, 1245207, 1, 0, 1245208, 1, 0, 1245209, 1, 0, 1245210, 1, 0, 1245211, 1, 0, 1245212, 1, 0, 1245213, 1, 0, 1245214, 1, 0, 1245215, 1, 0, 1245216, 1, 0, 1245217, 1, 0, 1245218, 1, 0, 1245219, 3, 131076, 1245220, 3, 131078, 1245221, 3, 131080, 1245222, 3, 131078, 1245223, 3, 131080, 1245224, 3, 131080, 1245225, 3, 131078, 1245226, 3, 131080, 1245227, 3, 131080, 1245228, 3, 131080, 1245229, 3, 131080, 1245230, 3, 131078, 1245231, 3, 131078, 1245232, 3, 131078, 1245233, 3, 131080, 1245234, 3, 131078, 1245235, 3, 131080, 1245236, 3, 131078, 1245237, 3, 131078, 1245238, 3, 131080, 1245239, 3, 131080, 1245240, 3, 131080, 1245241, 3, 131078, 1245242, 3, 131078, 1245243, 3, 131078, 1245244, 3, 131080, 1245245, 3, 131078, 1245246, 3, 131078, 1245247, 3, 131080, 1245248, 3, 131078, 1245249, 3, 131078, 1245250, 3, 131078, 1245251, 3, 131080, 1245252, 3, 131080, 1245253, 3, 131078, 1245254, 3, 131080, 1245255, 3, 131078, 1245256, 3, 131078, 1245257, 3, 131080, 1245258, 3, 131080, 1245259, 3, 131080, 1245260, 3, 131080, 1245261, 3, 131078, 1245262, 3, 131078, 1245263, 3, 131080, 1245264, 3, 131077, 1376255, 3, 131076, 1310720, 3, 131078, 1310721, 3, 131077, 1310722, 1, 0, 1310723, 1, 0, 1310724, 1, 0, 1310725, 3, 65538, 1310726, 1, 0, 1310727, 1, 0, 1310728, 1, 0, 1310729, 1, 0, 1310730, 3, 65538, 1310731, 1, 0, 1310732, 1, 0, 1310733, 1, 0, 1310734, 1, 0, 1310735, 1, 0, 1310736, 1, 0, 1310737, 1, 0, 1310738, 1, 0, 1310739, 1, 0, 1310740, 1, 0, 1310741, 1, 0, 1310742, 1, 0, 1310743, 1, 0, 1310744, 1, 0, 1310745, 1, 0, 1310746, 1, 0, 1310747, 1, 0, 1310748, 1, 0, 1310749, 1, 0, 1310750, 1, 0, 1310751, 1, 0, 1310752, 1, 0, 1310753, 1, 0, 1310754, 1, 0, 1310755, 3, 131076, 1310756, 3, 131078, 1310757, 3, 131078, 1310758, 3, 131080, 1310759, 3, 131080, 1310760, 3, 131078, 1310761, 3, 131080, 1310762, 3, 131080, 1310763, 3, 131078, 1310764, 3, 131080, 1310765, 3, 131078, 1310766, 3, 131078, 1310767, 3, 131080, 1310768, 3, 131078, 1310769, 3, 131080, 1310770, 3, 131078, 1310771, 3, 131080, 1310772, 3, 131078, 1310773, 3, 131080, 1310774, 3, 131078, 1310775, 3, 131080, 1310776, 3, 131080, 1310777, 3, 131080, 1310778, 3, 131078, 1310779, 3, 131078, 1310780, 3, 131078, 1310781, 3, 131078, 1310782, 3, 131078, 1310783, 3, 131080, 1310784, 3, 131078, 1310785, 3, 131078, 1310786, 3, 131080, 1310787, 3, 131078, 1310788, 3, 131078, 1310789, 3, 131078, 1310790, 3, 131078, 1310791, 3, 131080, 1310792, 3, 131080, 1310793, 3, 131078, 1310794, 3, 131078, 1310795, 3, 131080, 1310796, 3, 131080, 1310797, 3, 131080, 1310798, 3, 131080, 1310799, 3, 131078, 1310800, 3, 131077, 1441791, 3, 131076, 1376256, 3, 131078, 1376257, 3, 131077, 1376258, 1, 0, 1376259, 1, 0, 1376260, 1, 0, 1376261, 3, 65538, 1376262, 1, 0, 1376263, 1, 0, 1376264, 1, 0, 1376265, 1, 0, 1376266, 3, 65538, 1376267, 1, 0, 1376268, 1, 0, 1376269, 1, 0, 1376270, 1, 0, 1376271, 1, 0, 1376272, 1, 0, 1376273, 1, 0, 1376274, 1, 0, 1376275, 1, 0, 1376276, 1, 0, 1376277, 1, 0, 1376278, 1, 0, 1376279, 1, 0, 1376280, 1, 0, 1376281, 1, 0, 1376282, 1, 0, 1376283, 1, 0, 1376284, 1, 0, 1376285, 1, 0, 1376286, 1, 0, 1376287, 1, 0, 1376288, 1, 0, 1376289, 1, 0, 1376290, 1, 0, 1376291, 3, 131076, 1376292, 3, 131078, 1376293, 3, 131078, 1376294, 3, 131080, 1376295, 3, 131080, 1376296, 3, 131078, 1376297, 3, 131078, 1376298, 3, 131080, 1376299, 3, 131078, 1376300, 3, 131078, 1376301, 3, 131078, 1376302, 3, 131080, 1376303, 3, 131080, 1376304, 3, 131078, 1376305, 3, 131078, 1376306, 3, 131080, 1376307, 3, 131078, 1376308, 3, 131078, 1376309, 3, 131078, 1376310, 3, 131078, 1376311, 3, 131080, 1376312, 3, 131080, 1376313, 3, 131078, 1376314, 3, 131080, 1376315, 3, 131078, 1376316, 3, 131078, 1376317, 3, 131080, 1376318, 3, 131080, 1376319, 3, 131080, 1376320, 3, 131078, 1376321, 3, 131080, 1376322, 3, 131080, 1376323, 3, 131080, 1376324, 3, 131078, 1376325, 3, 131080, 1376326, 3, 131078, 1376327, 3, 131078, 1376328, 3, 131078, 1376329, 3, 131078, 1376330, 3, 131080, 1376331, 3, 131078, 1376332, 3, 131080, 1376333, 3, 131080, 1376334, 3, 131078, 1376335, 3, 131080, 1376336, 3, 131077, 1507327, 3, 131076, 1441792, 3, 131078, 1441793, 3, 131077, 1441794, 1, 0, 1441795, 1, 0, 1441796, 1, 0, 1441797, 3, 65538, 1441798, 1, 0, 1441799, 1, 0, 1441800, 1, 0, 1441801, 1, 0, 1441802, 3, 65538, 1441803, 1, 0, 1441804, 1, 0, 1441805, 1, 0, 1441806, 1, 0, 1441807, 1, 0, 1441808, 1, 0, 1441809, 1, 0, 1441810, 1, 0, 1441811, 1, 0, 1441812, 1, 0, 1441813, 1, 0, 1441814, 1, 0, 1441815, 1, 0, 1441816, 1, 0, 1441817, 1, 0, 1441818, 1, 0, 1441819, 1, 0, 1441820, 1, 0, 1441821, 1, 0, 1441822, 1, 0, 1441823, 1, 0, 1441824, 1, 0, 1441825, 1, 0, 1441826, 1, 0, 1441827, 3, 131076, 1441828, 3, 131078, 1441829, 3, 131080, 1441830, 3, 131078, 1441831, 3, 131078, 1441832, 3, 131078, 1441833, 3, 131078, 1441834, 3, 131078, 1441835, 3, 131078, 1441836, 3, 131078, 1441837, 3, 131078, 1441838, 3, 131078, 1441839, 3, 131080, 1441840, 3, 131080, 1441841, 3, 131078, 1441842, 3, 131080, 1441843, 3, 131080, 1441844, 3, 131078, 1441845, 3, 131080, 1441846, 3, 131078, 1441847, 3, 131078, 1441848, 3, 131080, 1441849, 3, 131080, 1441850, 3, 131078, 1441851, 3, 131080, 1441852, 3, 131078, 1441853, 3, 131080, 1441854, 3, 131078, 1441855, 3, 131080, 1441856, 3, 131080, 1441857, 3, 131078, 1441858, 3, 131080, 1441859, 3, 131080, 1441860, 3, 131080, 1441861, 3, 131080, 1441862, 3, 131078, 1441863, 3, 131078, 1441864, 3, 131078, 1441865, 3, 131078, 1441866, 3, 131078, 1441867, 3, 131080, 1441868, 3, 131078, 1441869, 3, 131078, 1441870, 3, 131080, 1441871, 3, 131078, 1441872, 3, 131077, 1572863, 3, 131076, 1507328, 3, 131078, 1507329, 3, 131077, 1507330, 1, 0, 1507331, 1, 0, 1507332, 1, 0, 1507333, 3, 65538, 1507334, 1, 0, 1507335, 1, 0, 1507336, 1, 0, 1507337, 1, 0, 1507338, 3, 65538, 1507339, 1, 0, 1507340, 1, 0, 1507341, 1, 0, 1507342, 1, 0, 1507343, 1, 0, 1507344, 1, 0, 1507345, 1, 0, 1507346, 1, 0, 1507347, 1, 0, 1507348, 1, 0, 1507349, 1, 0, 1507350, 1, 0, 1507351, 1, 0, 1507352, 1, 0, 1507353, 1, 0, 1507354, 1, 0, 1507355, 1, 0, 1507356, 1, 0, 1507357, 1, 0, 1507358, 1, 0, 1507359, 1, 0, 1507360, 1, 0, 1507361, 1, 0, 1507362, 1, 0, 1507363, 3, 131076, 1507364, 3, 131078, 1507365, 3, 131078, 1507366, 3, 131080, 1507367, 3, 131080, 1507368, 3, 131080, 1507369, 3, 131080, 1507370, 3, 131080, 1507371, 3, 131080, 1507372, 3, 131080, 1507373, 3, 131078, 1507374, 3, 131080, 1507375, 3, 131080, 1507376, 3, 131080, 1507377, 3, 131078, 1507378, 3, 131078, 1507379, 3, 131078, 1507380, 3, 131078, 1507381, 3, 131080, 1507382, 3, 131080, 1507383, 3, 131080, 1507384, 3, 131078, 1507385, 3, 131080, 1507386, 3, 131080, 1507387, 3, 131078, 1507388, 3, 131078, 1507389, 3, 131078, 1507390, 3, 131080, 1507391, 3, 131080, 1507392, 3, 131078, 1507393, 3, 131080, 1507394, 3, 131078, 1507395, 3, 131078, 1507396, 3, 131080, 1507397, 3, 131080, 1507398, 3, 131080, 1507399, 3, 131080, 1507400, 3, 131078, 1507401, 3, 131078, 1507402, 3, 131078, 1507403, 3, 131078, 1507404, 3, 131080, 1507405, 3, 131080, 1507406, 3, 131080, 1507407, 3, 131078, 1507408, 3, 131077, 1638399, 3, 131076, 1572864, 3, 131078, 1572865, 3, 131077, 1572866, 1, 0, 1572867, 1, 0, 1572868, 1, 0, 1572869, 3, 65538, 1572870, 1, 0, 1572871, 1, 0, 1572872, 1, 0, 1572873, 1, 0, 1572874, 3, 65538, 1572875, 1, 0, 1572876, 1, 0, 1572877, 1, 0, 1572878, 1, 0, 1572879, 1, 0, 1572880, 1, 0, 1572881, 1, 0, 1572882, 1, 0, 1572883, 1, 0, 1572884, 1, 0, 1572885, 1, 0, 1572886, 1, 0, 1572887, 1, 0, 1572888, 1, 0, 1572889, 1, 0, 1572890, 1, 0, 1572891, 1, 0, 1572892, 1, 0, 1572893, 1, 0, 1572894, 1, 0, 1572895, 1, 0, 1572896, 1, 0, 1572897, 1, 0, 1572898, 1, 0, 1572899, 3, 131076, 1572900, 3, 131078, 1572901, 3, 131078, 1572902, 3, 131080, 1572903, 3, 131078, 1572904, 3, 131078, 1572905, 3, 131080, 1572906, 3, 131080, 1572907, 3, 131078, 1572908, 3, 131078, 1572909, 3, 131080, 1572910, 3, 131080, 1572911, 3, 131078, 1572912, 3, 131078, 1572913, 3, 131078, 1572914, 3, 131080, 1572915, 3, 131078, 1572916, 3, 131078, 1572917, 3, 131080, 1572918, 3, 131080, 1572919, 3, 131078, 1572920, 3, 131078, 1572921, 3, 131078, 1572922, 3, 131080, 1572923, 3, 131078, 1572924, 3, 131080, 1572925, 3, 131078, 1572926, 3, 131080, 1572927, 3, 131080, 1572928, 3, 131080, 1572929, 3, 131078, 1572930, 3, 131078, 1572931, 3, 131078, 1572932, 3, 131080, 1572933, 3, 131080, 1572934, 3, 131080, 1572935, 3, 131078, 1572936, 3, 131080, 1572937, 3, 131078, 1572938, 3, 131080, 1572939, 3, 131078, 1572940, 3, 131080, 1572941, 3, 131078, 1572942, 3, 131080, 1572943, 3, 131078, 1572944, 3, 131077, 1703935, 3, 131076, 1638400, 3, 131078, 1638401, 3, 131077, 1638402, 1, 0, 1638403, 1, 0, 1638404, 1, 0, 1638405, 3, 65538, 1638406, 1, 0, 1638407, 1, 0, 1638408, 1, 0, 1638409, 1, 0, 1638410, 3, 65538, 1638411, 1, 0, 1638412, 1, 0, 1638413, 1, 0, 1638414, 1, 0, 1638415, 1, 0, 1638416, 1, 0, 1638417, 1, 0, 1638418, 1, 0, 1638419, 1, 0, 1638420, 1, 0, 1638421, 1, 0, 1638422, 1, 0, 1638423, 1, 0, 1638424, 1, 0, 1638425, 1, 0, 1638426, 1, 0, 1638427, 1, 0, 1638428, 1, 0, 1638429, 1, 0, 1638430, 1, 0, 1638431, 1, 0, 1638432, 1, 0, 1638433, 1, 0, 1638434, 1, 0, 1638435, 3, 131076, 1638436, 3, 131078, 1638437, 3, 131078, 1638438, 3, 131080, 1638439, 3, 131078, 1638440, 3, 131080, 1638441, 3, 131080, 1638442, 3, 131078, 1638443, 3, 131078, 1638444, 3, 131078, 1638445, 3, 131080, 1638446, 3, 131078, 1638447, 3, 131080, 1638448, 3, 131078, 1638449, 3, 131080, 1638450, 3, 131078, 1638451, 3, 131078, 1638452, 3, 131078, 1638453, 3, 131078, 1638454, 3, 131078, 1638455, 3, 131080, 1638456, 3, 131078, 1638457, 3, 131078, 1638458, 3, 131078, 1638459, 3, 131080, 1638460, 3, 131080, 1638461, 3, 131080, 1638462, 3, 131078, 1638463, 3, 131080, 1638464, 3, 131080, 1638465, 3, 131078, 1638466, 3, 131080, 1638467, 3, 131080, 1638468, 3, 131080, 1638469, 3, 131078, 1638470, 3, 131080, 1638471, 3, 131080, 1638472, 3, 131080, 1638473, 3, 131080, 1638474, 3, 131078, 1638475, 3, 131078, 1638476, 3, 131078, 1638477, 3, 131078, 1638478, 3, 131080, 1638479, 3, 131080, 1638480, 3, 131077, 1769471, 3, 131076, 1703936, 3, 131078, 1703937, 3, 131077, 1703938, 1, 0, 1703939, 1, 0, 1703940, 1, 0, 1703941, 3, 65538, 1703942, 1, 0, 1703943, 1, 0, 1703944, 1, 0, 1703945, 1, 0, 1703946, 3, 65538, 1703947, 1, 0, 1703948, 1, 0, 1703949, 1, 0, 1703950, 1, 0, 1703951, 1, 0, 1703952, 1, 0, 1703953, 1, 0, 1703954, 1, 0, 1703955, 1, 0, 1703956, 1, 0, 1703957, 1, 0, 1703958, 1, 0, 1703959, 1, 0, 1703960, 1, 0, 1703961, 1, 0, 1703962, 1, 0, 1703963, 1, 0, 1703964, 1, 0, 1703965, 1, 0, 1703966, 1, 0, 1703967, 1, 0, 1703968, 1, 0, 1703969, 1, 0, 1703970, 1, 0, 1703971, 3, 131076, 1703972, 3, 131078, 1703973, 3, 131078, 1703974, 3, 131078, 1703975, 3, 131078, 1703976, 3, 131080, 1703977, 3, 131080, 1703978, 3, 131080, 1703979, 3, 131080, 1703980, 3, 131078, 1703981, 3, 131078, 1703982, 3, 131080, 1703983, 3, 131080, 1703984, 3, 131078, 1703985, 3, 131080, 1703986, 3, 131078, 1703987, 3, 131080, 1703988, 3, 131078, 1703989, 3, 131078, 1703990, 3, 131080, 1703991, 3, 131078, 1703992, 3, 131078, 1703993, 3, 131080, 1703994, 3, 131078, 1703995, 3, 131080, 1703996, 3, 131080, 1703997, 3, 131080, 1703998, 3, 131078, 1703999, 3, 131080, 1704000, 3, 131080, 1704001, 3, 131078, 1704002, 3, 131080, 1704003, 3, 131080, 1704004, 3, 131080, 1704005, 3, 131078, 1704006, 3, 131078, 1704007, 3, 131080, 1704008, 3, 131078, 1704009, 3, 131080, 1704010, 3, 131080, 1704011, 3, 131078, 1704012, 3, 131080, 1704013, 3, 131080, 1704014, 3, 131078, 1704015, 3, 131078, 1704016, 3, 131077, 1835007, 3, 131076, 1769472, 3, 131078, 1769473, 3, 131077, 1769474, 1, 0, 1769475, 1, 0, 1769476, 1, 0, 1769477, 3, 65538, 1769478, 1, 0, 1769479, 1, 0, 1769480, 1, 0, 1769481, 1, 0, 1769482, 3, 65538, 1769483, 1, 0, 1769484, 1, 0, 1769485, 1, 0, 1769486, 1, 0, 1769487, 1, 0, 1769488, 1, 0, 1769489, 1, 0, 1769490, 1, 0, 1769491, 1, 0, 1769492, 1, 0, 1769493, 1, 0, 1769494, 1, 0, 1769495, 1, 0, 1769496, 1, 0, 1769497, 1, 0, 1769498, 1, 0, 1769499, 1, 0, 1769500, 1, 0, 1769501, 1, 0, 1769502, 1, 0, 1769503, 1, 0, 1769504, 1, 0, 1769505, 1, 0, 1769506, 1, 0, 1769507, 3, 131076, 1769508, 3, 131078, 1769509, 3, 131080, 1769510, 3, 131080, 1769511, 3, 131080, 1769512, 3, 131078, 1769513, 3, 131078, 1769514, 3, 131078, 1769515, 3, 131078, 1769516, 3, 131078, 1769517, 3, 131080, 1769518, 3, 131078, 1769519, 3, 131078, 1769520, 3, 131080, 1769521, 3, 131080, 1769522, 3, 131080, 1769523, 3, 131080, 1769524, 3, 131080, 1769525, 3, 131078, 1769526, 3, 131078, 1769527, 3, 131080, 1769528, 3, 131078, 1769529, 3, 131078, 1769530, 3, 131078, 1769531, 3, 131080, 1769532, 3, 131080, 1769533, 3, 131080, 1769534, 3, 131078, 1769535, 3, 131080, 1769536, 3, 131080, 1769537, 3, 131080, 1769538, 3, 131080, 1769539, 3, 131080, 1769540, 3, 131078, 1769541, 3, 131080, 1769542, 3, 131080, 1769543, 3, 131078, 1769544, 3, 131080, 1769545, 3, 131080, 1769546, 3, 131080, 1769547, 3, 131080, 1769548, 3, 131078, 1769549, 3, 131078, 1769550, 3, 131078, 1769551, 3, 131078, 1769552, 3, 131077, 1900543, 3, 131076, 1835008, 3, 131078, 1835009, 3, 131077, 1835010, 1, 0, 1835011, 1, 0, 1835012, 1, 0, 1835013, 3, 65538, 1835014, 1, 0, 1835015, 1, 0, 1835016, 1, 0, 1835017, 1, 0, 1835018, 3, 65538, 1835019, 1, 0, 1835020, 1, 0, 1835021, 1, 0, 1835022, 1, 0, 1835023, 1, 0, 1835024, 1, 0, 1835025, 1, 0, 1835026, 1, 0, 1835027, 1, 0, 1835028, 1, 0, 1835029, 1, 0, 1835030, 1, 0, 1835031, 1, 0, 1835032, 1, 0, 1835033, 1, 0, 1835034, 1, 0, 1835035, 1, 0, 1835036, 1, 0, 1835037, 1, 0, 1835038, 1, 0, 1835039, 1, 0, 1835040, 1, 0, 1835041, 1, 0, 1835042, 1, 0, 1835043, 3, 131076, 1835044, 3, 131078, 1835045, 3, 131080, 1835046, 3, 131080, 1835047, 3, 131078, 1835048, 3, 131080, 1835049, 3, 131080, 1835050, 3, 131080, 1835051, 3, 131080, 1835052, 3, 131078, 1835053, 3, 131080, 1835054, 3, 131080, 1835055, 3, 131078, 1835056, 3, 131078, 1835057, 3, 131078, 1835058, 3, 131080, 1835059, 3, 131080, 1835060, 3, 131078, 1835061, 3, 131078, 1835062, 3, 131078, 1835063, 3, 131078, 1835064, 3, 131080, 1835065, 3, 131080, 1835066, 3, 131080, 1835067, 3, 131080, 1835068, 3, 131078, 1835069, 3, 131080, 1835070, 3, 131080, 1835071, 3, 131080, 1835072, 3, 131078, 1835073, 3, 131080, 1835074, 3, 131080, 1835075, 3, 131080, 1835076, 3, 131078, 1835077, 3, 131080, 1835078, 3, 131080, 1835079, 3, 131080, 1835080, 3, 131080, 1835081, 3, 131078, 1835082, 3, 131078, 1835083, 3, 131080, 1835084, 3, 131080, 1835085, 3, 131080, 1835086, 3, 131078, 1835087, 3, 131078, 1835088, 3, 131077, 1966079, 3, 131076, 1900544, 3, 131078, 1900545, 3, 131077, 1900546, 1, 0, 1900547, 1, 0, 1900548, 1, 0, 1900549, 3, 65538, 1900550, 1, 0, 1900551, 1, 0, 1900552, 1, 0, 1900553, 1, 0, 1900554, 3, 65538, 1900555, 1, 0, 1900556, 1, 0, 1900557, 1, 0, 1900558, 1, 0, 1900559, 1, 0, 1900560, 1, 0, 1900561, 1, 0, 1900562, 1, 0, 1900563, 1, 0, 1900564, 1, 0, 1900565, 1, 0, 1900566, 1, 0, 1900567, 1, 0, 1900568, 1, 0, 1900569, 1, 0, 1900570, 1, 0, 1900571, 1, 0, 1900572, 1, 0, 1900573, 1, 0, 1900574, 1, 0, 1900575, 1, 0, 1900576, 1, 0, 1900577, 1, 0, 1900578, 1, 0, 1900579, 3, 131076, 1900580, 3, 131078, 1900581, 3, 131078, 1900582, 3, 131078, 1900583, 3, 131080, 1900584, 3, 131080, 1900585, 3, 131080, 1900586, 3, 131080, 1900587, 3, 131080, 1900588, 3, 131080, 1900589, 3, 131080, 1900590, 3, 131080, 1900591, 3, 131078, 1900592, 3, 131080, 1900593, 3, 131080, 1900594, 3, 131080, 1900595, 3, 131078, 1900596, 3, 131080, 1900597, 3, 131080, 1900598, 3, 131080, 1900599, 3, 131080, 1900600, 3, 131078, 1900601, 3, 131078, 1900602, 3, 131080, 1900603, 3, 131078, 1900604, 3, 131080, 1900605, 3, 131080, 1900606, 3, 131078, 1900607, 3, 131080, 1900608, 3, 131080, 1900609, 3, 131080, 1900610, 3, 131078, 1900611, 3, 131078, 1900612, 3, 131078, 1900613, 3, 131078, 1900614, 3, 131080, 1900615, 3, 131078, 1900616, 3, 131078, 1900617, 3, 131080, 1900618, 3, 131080, 1900619, 3, 131080, 1900620, 3, 131080, 1900621, 3, 131078, 1900622, 3, 131080, 1900623, 3, 131080, 1900624, 3, 131077, 2031615, 3, 131076, 1966080, 3, 131078, 1966081, 3, 131077, 1966082, 1, 0, 1966083, 1, 0, 1966084, 1, 0, 1966085, 3, 6, 1966086, 1, 0, 1966087, 1, 0, 1966088, 1, 0, 1966089, 1, 0, 1966090, 3, 65538, 1966091, 1, 0, 1966092, 1, 0, 1966093, 1, 0, 1966094, 1, 0, 1966095, 1, 0, 1966096, 1, 0, 1966097, 1, 0, 1966098, 1, 0, 1966099, 1, 0, 1966100, 1, 0, 1966101, 1, 0, 1966102, 1, 0, 1966103, 1, 0, 1966104, 1, 0, 1966105, 1, 0, 1966106, 1, 0, 1966107, 1, 0, 1966108, 1, 0, 1966109, 1, 0, 1966110, 1, 0, 1966111, 1, 0, 1966112, 1, 0, 1966113, 1, 0, 1966114, 1, 0, 1966115, 3, 131076, 1966116, 3, 131078, 1966117, 3, 131080, 1966118, 3, 131080, 1966119, 3, 131078, 1966120, 3, 131078, 1966121, 3, 131080, 1966122, 3, 131078, 1966123, 3, 131078, 1966124, 3, 131080, 1966125, 3, 131078, 1966126, 3, 131080, 1966127, 3, 131080, 1966128, 3, 131078, 1966129, 3, 131078, 1966130, 3, 131080, 1966131, 3, 131078, 1966132, 3, 131080, 1966133, 3, 131078, 1966134, 3, 131080, 1966135, 3, 131078, 1966136, 3, 131078, 1966137, 3, 131080, 1966138, 3, 131080, 1966139, 3, 131078, 1966140, 3, 131080, 1966141, 3, 131080, 1966142, 3, 131078, 1966143, 3, 131078, 1966144, 3, 131078, 1966145, 3, 131078, 1966146, 3, 131080, 1966147, 3, 131080, 1966148, 3, 131078, 1966149, 3, 131078, 1966150, 3, 131080, 1966151, 3, 131078, 1966152, 3, 131080, 1966153, 3, 131078, 1966154, 3, 131080, 1966155, 3, 131078, 1966156, 3, 131078, 1966157, 3, 131078, 1966158, 3, 131080, 1966159, 3, 131080, 1966160, 3, 131077, 2097151, 3, 131076, 2031616, 3, 131078, 2031617, 3, 131077, 2031618, 1, 0, 2031619, 1, 0, 2031620, 1, 0, 2031621, 1, 0, 2031622, 1, 0, 2031623, 1, 0, 2031624, 1, 0, 2031625, 1, 0, 2031626, 3, 65538, 2031627, 1, 0, 2031628, 1, 0, 2031629, 1, 0, 2031630, 1, 0, 2031631, 1, 0, 2031632, 1, 0, 2031633, 1, 0, 2031634, 1, 0, 2031635, 1, 0, 2031636, 1, 0, 2031637, 1, 0, 2031638, 1, 0, 2031639, 1, 0, 2031640, 1, 0, 2031641, 1, 0, 2031642, 1, 0, 2031643, 1, 0, 2031644, 1, 0, 2031645, 1, 0, 2031646, 1, 0, 2031647, 1, 0, 2031648, 1, 0, 2031649, 1, 0, 2031650, 1, 0, 2031651, 3, 131076, 2031652, 3, 131078, 2031653, 3, 131078, 2031654, 3, 131080, 2031655, 3, 131080, 2031656, 3, 131080, 2031657, 3, 131078, 2031658, 3, 131080, 2031659, 3, 131078, 2031660, 3, 131078, 2031661, 3, 131080, 2031662, 3, 131080, 2031663, 3, 131080, 2031664, 3, 131080, 2031665, 3, 131080, 2031666, 3, 131080, 2031667, 3, 131078, 2031668, 3, 131078, 2031669, 3, 131078, 2031670, 3, 131078, 2031671, 3, 131078, 2031672, 3, 131080, 2031673, 3, 131078, 2031674, 3, 131078, 2031675, 3, 131080, 2031676, 3, 131080, 2031677, 3, 131080, 2031678, 3, 131080, 2031679, 3, 131078, 2031680, 3, 131080, 2031681, 3, 131080, 2031682, 3, 131080, 2031683, 3, 131080, 2031684, 3, 131080, 2031685, 3, 131080, 2031686, 3, 131080, 2031687, 3, 131078, 2031688, 3, 131078, 2031689, 3, 131080, 2031690, 3, 131080, 2031691, 3, 131080, 2031692, 3, 131078, 2031693, 3, 131080, 2031694, 3, 131078, 2031695, 3, 131080, 2031696, 3, 131077, 2162687, 3, 131076, 2097152, 3, 131078, 2097153, 3, 131077, 2097154, 1, 0, 2097155, 1, 0, 2097156, 1, 0, 2097157, 1, 0, 2097158, 1, 0, 2097159, 1, 0, 2097160, 1, 0, 2097161, 3, 65542, 2097162, 3, 131079, 2097163, 3, 5, 2097164, 1, 0, 2097165, 1, 0, 2097166, 1, 0, 2097167, 1, 0, 2097168, 1, 0, 2097169, 1, 0, 2097170, 1, 0, 2097171, 1, 0, 2097172, 1, 0, 2097173, 1, 0, 2097174, 1, 0, 2097175, 1, 0, 2097176, 1, 0, 2097177, 1, 0, 2097178, 1, 0, 2097179, 1, 0, 2097180, 1, 0, 2097181, 1, 0, 2097182, 1, 0, 2097183, 1, 0, 2097184, 1, 0, 2097185, 1, 0, 2097186, 1, 0, 2097187, 3, 131076, 2097188, 3, 131078, 2097189, 3, 131080, 2097190, 3, 131078, 2097191, 3, 131078, 2097192, 3, 131080, 2097193, 3, 131080, 2097194, 3, 131078, 2097195, 3, 131080, 2097196, 3, 131078, 2097197, 3, 131080, 2097198, 3, 131078, 2097199, 3, 131078, 2097200, 3, 131078, 2097201, 3, 131078, 2097202, 3, 131078, 2097203, 3, 131078, 2097204, 3, 131080, 2097205, 3, 131078, 2097206, 3, 131078, 2097207, 3, 131078, 2097208, 3, 131080, 2097209, 3, 131080, 2097210, 3, 131078, 2097211, 3, 131078, 2097212, 3, 131080, 2097213, 3, 131080, 2097214, 3, 131080, 2097215, 3, 131080, 2097216, 3, 131080, 2097217, 3, 131078, 2097218, 3, 131080, 2097219, 3, 131078, 2097220, 3, 131080, 2097221, 3, 131078, 2097222, 3, 131080, 2097223, 3, 131080, 2097224, 3, 131078, 2097225, 3, 131078, 2097226, 3, 131080, 2097227, 3, 131080, 2097228, 3, 131078, 2097229, 3, 131078, 2097230, 3, 131078, 2097231, 3, 131080, 2097232, 3, 131077, 2228223, 3, 131076, 2162688, 3, 131078, 2162689, 3, 131077, 2162690, 1, 0, 2162691, 1, 0, 2162692, 1, 0, 2162693, 1, 0, 2162694, 1, 0, 2162695, 1, 0, 2162696, 1, 0, 2162697, 1, 0, 2162698, 3, 65538, 2162699, 1, 0, 2162700, 1, 0, 2162701, 1, 0, 2162702, 1, 0, 2162703, 1, 0, 2162704, 1, 0, 2162705, 1, 0, 2162706, 1, 0, 2162707, 1, 0, 2162708, 1, 0, 2162709, 1, 0, 2162710, 1, 0, 2162711, 1, 0, 2162712, 1, 0, 2162713, 1, 0, 2162714, 1, 0, 2162715, 1, 0, 2162716, 1, 0, 2162717, 1, 0, 2162718, 1, 0, 2162719, 1, 0, 2162720, 1, 0, 2162721, 1, 0, 2162722, 1, 0, 2162723, 3, 131076, 2162724, 3, 131078, 2162725, 3, 131078, 2162726, 3, 131078, 2162727, 3, 131080, 2162728, 3, 131078, 2162729, 3, 131078, 2162730, 3, 131078, 2162731, 3, 131080, 2162732, 3, 131080, 2162733, 3, 131080, 2162734, 3, 131080, 2162735, 3, 131078, 2162736, 3, 131078, 2162737, 3, 131080, 2162738, 3, 131080, 2162739, 3, 131080, 2162740, 3, 131080, 2162741, 3, 131078, 2162742, 3, 131080, 2162743, 3, 131078, 2162744, 3, 131080, 2162745, 3, 131080, 2162746, 3, 131078, 2162747, 3, 131078, 2162748, 3, 131078, 2162749, 3, 131080, 2162750, 3, 131080, 2162751, 3, 131078, 2162752, 3, 131080, 2162753, 3, 131080, 2162754, 3, 131080, 2162755, 3, 131080, 2162756, 3, 131080, 2162757, 3, 131080, 2162758, 3, 131078, 2162759, 3, 131078, 2162760, 3, 131080, 2162761, 3, 131080, 2162762, 3, 131080, 2162763, 3, 131078, 2162764, 3, 131080, 2162765, 3, 131078, 2162766, 3, 131078, 2162767, 3, 131080, 2162768, 3, 131077, 2293759, 3, 131076, 2228224, 3, 131078, 2228225, 3, 131077, 2228226, 1, 0, 2228227, 1, 0, 2228228, 1, 0, 2228229, 1, 0, 2228230, 1, 0, 2228231, 1, 0, 2228232, 1, 0, 2228233, 1, 0, 2228234, 3, 65539, 2228235, 3, 2, 2228236, 3, 5, 2228237, 1, 0, 2228238, 1, 0, 2228239, 1, 0, 2228240, 1, 0, 2228241, 1, 0, 2228242, 1, 0, 2228243, 1, 0, 2228244, 1, 0, 2228245, 1, 0, 2228246, 1, 0, 2228247, 1, 0, 2228248, 1, 0, 2228249, 1, 0, 2228250, 1, 0, 2228251, 1, 0, 2228252, 1, 0, 2228253, 1, 0, 2228254, 1, 0, 2228255, 1, 0, 2228256, 1, 0, 2228257, 1, 0, 2228258, 1, 0, 2228259, 3, 131076, 2228260, 3, 131078, 2228261, 3, 131080, 2228262, 3, 131078, 2228263, 3, 131080, 2228264, 3, 131078, 2228265, 3, 131078, 2228266, 3, 131078, 2228267, 3, 131080, 2228268, 3, 131080, 2228269, 3, 131080, 2228270, 3, 131080, 2228271, 3, 131078, 2228272, 3, 131078, 2228273, 3, 131078, 2228274, 3, 131080, 2228275, 3, 131080, 2228276, 3, 131080, 2228277, 3, 131080, 2228278, 3, 131080, 2228279, 3, 131078, 2228280, 3, 131080, 2228281, 3, 131080, 2228282, 3, 131080, 2228283, 3, 131078, 2228284, 3, 131078, 2228285, 3, 131078, 2228286, 3, 131080, 2228287, 3, 131078, 2228288, 3, 131080, 2228289, 3, 131080, 2228290, 3, 131080, 2228291, 3, 131078, 2228292, 3, 131080, 2228293, 3, 131078, 2228294, 3, 131080, 2228295, 3, 131080, 2228296, 3, 131078, 2228297, 3, 131078, 2228298, 3, 131078, 2228299, 3, 131078, 2228300, 3, 131080, 2228301, 3, 131080, 2228302, 3, 131080, 2228303, 3, 131080, 2228304, 3, 131077, 2359295, 3, 131076, 2293760, 3, 131078, 2293761, 3, 131077, 2293762, 1, 0, 2293763, 1, 0, 2293764, 1, 0, 2293765, 3, 65541, 2293766, 1, 0, 2293767, 1, 0, 2293768, 1, 0, 2293769, 1, 0, 2293770, 3, 6, 2293771, 1, 0, 2293772, 1, 0, 2293773, 1, 0, 2293774, 1, 0, 2293775, 1, 0, 2293776, 1, 0, 2293777, 1, 0, 2293778, 1, 0, 2293779, 1, 0, 2293780, 1, 0, 2293781, 1, 0, 2293782, 1, 0, 2293783, 1, 0, 2293784, 1, 0, 2293785, 1, 0, 2293786, 1, 0, 2293787, 1, 0, 2293788, 1, 0, 2293789, 1, 0, 2293790, 1, 0, 2293791, 1, 0, 2293792, 1, 0, 2293793, 1, 0, 2293794, 1, 0, 2293795, 3, 131076, 2293796, 3, 131078, 2293797, 3, 131080, 2293798, 3, 131078, 2293799, 3, 131080, 2293800, 3, 131078, 2293801, 3, 131078, 2293802, 3, 131080, 2293803, 3, 131078, 2293804, 3, 131078, 2293805, 3, 131080, 2293806, 3, 131080, 2293807, 3, 131080, 2293808, 3, 131080, 2293809, 3, 131080, 2293810, 3, 131080, 2293811, 3, 131080, 2293812, 3, 131080, 2293813, 3, 131080, 2293814, 3, 131078, 2293815, 3, 131080, 2293816, 3, 131078, 2293817, 3, 131080, 2293818, 3, 131078, 2293819, 3, 131080, 2293820, 3, 131078, 2293821, 3, 131080, 2293822, 3, 131078, 2293823, 3, 131080, 2293824, 3, 131078, 2293825, 3, 131078, 2293826, 3, 131078, 2293827, 3, 131080, 2293828, 3, 131080, 2293829, 3, 131080, 2293830, 3, 131078, 2293831, 3, 131078, 2293832, 3, 131080, 2293833, 3, 131078, 2293834, 3, 131080, 2293835, 3, 131078, 2293836, 3, 131078, 2293837, 3, 131078, 2293838, 3, 131080, 2293839, 3, 131078, 2293840, 3, 131077, 2424831, 3, 131076, 2359296, 3, 131078, 2359297, 3, 131077, 2359298, 1, 0, 2359299, 1, 0, 2359300, 1, 0, 2359301, 3, 65538, 2359302, 1, 0, 2359303, 1, 0, 2359304, 1, 0, 2359305, 1, 0, 2359306, 1, 0, 2359307, 1, 0, 2359308, 1, 0, 2359309, 1, 0, 2359310, 1, 0, 2359311, 1, 0, 2359312, 1, 0, 2359313, 1, 0, 2359314, 1, 0, 2359315, 1, 0, 2359316, 1, 0, 2359317, 1, 0, 2359318, 1, 0, 2359319, 1, 0, 2359320, 1, 0, 2359321, 1, 0, 2359322, 1, 0, 2359323, 1, 0, 2359324, 1, 0, 2359325, 1, 0, 2359326, 1, 0, 2359327, 1, 0, 2359328, 1, 0, 2359329, 1, 0, 2359330, 1, 0, 2359331, 3, 131076, 2359332, 3, 131078, 2359333, 3, 131078, 2359334, 3, 131078, 2359335, 3, 131078, 2359336, 3, 131078, 2359337, 3, 131080, 2359338, 3, 131080, 2359339, 3, 131078, 2359340, 3, 131080, 2359341, 3, 131080, 2359342, 3, 131078, 2359343, 3, 131080, 2359344, 3, 131078, 2359345, 3, 131078, 2359346, 3, 131080, 2359347, 3, 131080, 2359348, 3, 131078, 2359349, 3, 131078, 2359350, 3, 131078, 2359351, 3, 131080, 2359352, 3, 131080, 2359353, 3, 131080, 2359354, 3, 131080, 2359355, 3, 131078, 2359356, 3, 131078, 2359357, 3, 131080, 2359358, 3, 131078, 2359359, 3, 131080, 2359360, 3, 131078, 2359361, 3, 131080, 2359362, 3, 131080, 2359363, 3, 131080, 2359364, 3, 131080, 2359365, 3, 131080, 2359366, 3, 131078, 2359367, 3, 131080, 2359368, 3, 131080, 2359369, 3, 131080, 2359370, 3, 131080, 2359371, 3, 131078, 2359372, 3, 131078, 2359373, 3, 131080, 2359374, 3, 131080, 2359375, 3, 131078, 2359376, 3, 131077, 2490367, 3, 131076, 2424832, 3, 131078, 2424833, 3, 131077, 2424834, 1, 0, 2424835, 1, 0, 2424836, 1, 0, 2424837, 3, 65538, 2424838, 1, 0, 2424839, 1, 0, 2424840, 1, 0, 2424841, 1, 0, 2424842, 1, 0, 2424843, 1, 0, 2424844, 1, 0, 2424845, 1, 0, 2424846, 1, 0, 2424847, 1, 0, 2424848, 1, 0, 2424849, 1, 0, 2424850, 1, 0, 2424851, 1, 0, 2424852, 1, 0, 2424853, 1, 0, 2424854, 1, 0, 2424855, 1, 0, 2424856, 1, 0, 2424857, 1, 0, 2424858, 1, 0, 2424859, 1, 0, 2424860, 1, 0, 2424861, 1, 0, 2424862, 1, 0, 2424863, 1, 0, 2424864, 1, 0, 2424865, 1, 0, 2424866, 1, 0, 2424867, 3, 131076, 2424868, 3, 131078, 2424869, 3, 131080, 2424870, 3, 131080, 2424871, 3, 131080, 2424872, 3, 131080, 2424873, 3, 131078, 2424874, 3, 131078, 2424875, 3, 131078, 2424876, 3, 131080, 2424877, 3, 131080, 2424878, 3, 131078, 2424879, 3, 131080, 2424880, 3, 131080, 2424881, 3, 131080, 2424882, 3, 131078, 2424883, 3, 131078, 2424884, 3, 131078, 2424885, 3, 131080, 2424886, 3, 131078, 2424887, 3, 131080, 2424888, 3, 131080, 2424889, 3, 131080, 2424890, 3, 131080, 2424891, 3, 131078, 2424892, 3, 131080, 2424893, 3, 131078, 2424894, 3, 131078, 2424895, 3, 131080, 2424896, 3, 131080, 2424897, 3, 131080, 2424898, 3, 131080, 2424899, 3, 131080, 2424900, 3, 131078, 2424901, 3, 131080, 2424902, 3, 131078, 2424903, 3, 131080, 2424904, 3, 131078, 2424905, 3, 131080, 2424906, 3, 131080, 2424907, 3, 131080, 2424908, 3, 131078, 2424909, 3, 131078, 2424910, 3, 131078, 2424911, 3, 131078, 2424912, 3, 131077, 2555903, 3, 131076, 2490368, 3, 131078, 2490369, 3, 131077, 2490370, 1, 0, 2490371, 1, 0, 2490372, 1, 0, 2490373, 3, 65538, 2490374, 1, 0, 2490375, 1, 0, 2490376, 1, 0, 2490377, 1, 0, 2490378, 1, 0, 2490379, 1, 0, 2490380, 1, 0, 2490381, 1, 0, 2490382, 1, 0, 2490383, 1, 0, 2490384, 1, 0, 2490385, 1, 0, 2490386, 1, 0, 2490387, 1, 0, 2490388, 1, 0, 2490389, 1, 0, 2490390, 1, 0, 2490391, 1, 0, 2490392, 1, 0, 2490393, 1, 0, 2490394, 1, 0, 2490395, 1, 0, 2490396, 1, 0, 2490397, 1, 0, 2490398, 1, 0, 2490399, 1, 0, 2490400, 1, 0, 2490401, 1, 0, 2490402, 1, 0, 2490403, 3, 131076, 2490404, 3, 131078, 2490405, 3, 131080, 2490406, 3, 131078, 2490407, 3, 131080, 2490408, 3, 131080, 2490409, 3, 131078, 2490410, 3, 131078, 2490411, 3, 131078, 2490412, 3, 131078, 2490413, 3, 131080, 2490414, 3, 131078, 2490415, 3, 131078, 2490416, 3, 131078, 2490417, 3, 131080, 2490418, 3, 131078, 2490419, 3, 131078, 2490420, 3, 131078, 2490421, 3, 131080, 2490422, 3, 131080, 2490423, 3, 131078, 2490424, 3, 131078, 2490425, 3, 131080, 2490426, 3, 131080, 2490427, 3, 131078, 2490428, 3, 131078, 2490429, 3, 131080, 2490430, 3, 131078, 2490431, 3, 131078, 2490432, 3, 131078, 2490433, 3, 131078, 2490434, 3, 131078, 2490435, 3, 131078, 2490436, 3, 131078, 2490437, 3, 131078, 2490438, 3, 131078, 2490439, 3, 131080, 2490440, 3, 131078, 2490441, 3, 131078, 2490442, 3, 131078, 2490443, 3, 131078, 2490444, 3, 131078, 2490445, 3, 131080, 2490446, 3, 131080, 2490447, 3, 131080, 2490448, 3, 131077, 2621439, 3, 131076, 2555904, 3, 131078, 2555905, 3, 131077, 2555906, 1, 0, 2555907, 1, 0, 2555908, 1, 0, 2555909, 3, 65538, 2555910, 1, 0, 2555911, 1, 0, 2555912, 1, 0, 2555913, 1, 0, 2555914, 1, 0, 2555915, 1, 0, 2555916, 1, 0, 2555917, 1, 0, 2555918, 1, 0, 2555919, 1, 0, 2555920, 1, 0, 2555921, 1, 0, 2555922, 1, 0, 2555923, 1, 0, 2555924, 1, 0, 2555925, 1, 0, 2555926, 1, 0, 2555927, 1, 0, 2555928, 1, 0, 2555929, 1, 0, 2555930, 1, 0, 2555931, 1, 0, 2555932, 1, 0, 2555933, 1, 0, 2555934, 1, 0, 2555935, 1, 0, 2555936, 1, 0, 2555937, 1, 0, 2555938, 1, 0, 2555939, 3, 131076, 2555940, 3, 131078, 2555941, 3, 131078, 2555942, 3, 131078, 2555943, 3, 131080, 2555944, 3, 131080, 2555945, 3, 131078, 2555946, 3, 131080, 2555947, 3, 131078, 2555948, 3, 131078, 2555949, 3, 131080, 2555950, 3, 131078, 2555951, 3, 131078, 2555952, 3, 131080, 2555953, 3, 131080, 2555954, 3, 131078, 2555955, 3, 131078, 2555956, 3, 131080, 2555957, 3, 131078, 2555958, 3, 131080, 2555959, 3, 131078, 2555960, 3, 131080, 2555961, 3, 131078, 2555962, 3, 131078, 2555963, 3, 131078, 2555964, 3, 131080, 2555965, 3, 131078, 2555966, 3, 131078, 2555967, 3, 131080, 2555968, 3, 131080, 2555969, 3, 131078, 2555970, 3, 131080, 2555971, 3, 131080, 2555972, 3, 131080, 2555973, 3, 131078, 2555974, 3, 131080, 2555975, 3, 131080, 2555976, 3, 131080, 2555977, 3, 131078, 2555978, 3, 131080, 2555979, 3, 131080, 2555980, 3, 131078, 2555981, 3, 131078, 2555982, 3, 131080, 2555983, 3, 131078, 2555984, 3, 131077, 2686975, 3, 131076, 2621440, 3, 131078, 2621441, 3, 131077, 2621442, 1, 0, 2621443, 1, 0, 2621444, 1, 0, 2621445, 3, 65536, 2621446, 3, 2, 2621447, 3, 2, 2621448, 3, 2, 2621449, 3, 5, 2621450, 1, 0, 2621451, 1, 0, 2621452, 1, 0, 2621453, 1, 0, 2621454, 3, 65542, 2621455, 3, 2, 2621456, 3, 2, 2621457, 3, 2, 2621458, 3, 2, 2621459, 3, 1, 2621460, 1, 0, 2621461, 1, 0, 2621462, 1, 0, 2621463, 3, 0, 2621464, 3, 2, 2621465, 3, 2, 2621466, 3, 2, 2621467, 3, 2, 2621468, 3, 5, 2621469, 1, 0, 2621470, 1, 0, 2621471, 1, 0, 2621472, 1, 0, 2621473, 1, 0, 2621474, 1, 0, 2621475, 3, 131076, 2621476, 3, 131078, 2621477, 3, 131078, 2621478, 3, 131080, 2621479, 3, 131080, 2621480, 3, 131078, 2621481, 3, 131078, 2621482, 3, 131080, 2621483, 3, 131080, 2621484, 3, 131080, 2621485, 3, 131080, 2621486, 3, 131080, 2621487, 3, 131080, 2621488, 3, 131080, 2621489, 3, 131080, 2621490, 3, 131080, 2621491, 3, 131080, 2621492, 3, 131080, 2621493, 3, 131078, 2621494, 3, 131080, 2621495, 3, 131080, 2621496, 3, 131080, 2621497, 3, 131080, 2621498, 3, 131080, 2621499, 3, 131078, 2621500, 3, 131080, 2621501, 3, 131080, 2621502, 3, 131080, 2621503, 3, 131078, 2621504, 3, 131080, 2621505, 3, 131078, 2621506, 3, 131078, 2621507, 3, 131080, 2621508, 3, 131080, 2621509, 3, 131078, 2621510, 3, 131080, 2621511, 3, 131078, 2621512, 3, 131080, 2621513, 3, 131078, 2621514, 3, 131078, 2621515, 3, 131080, 2621516, 3, 131080, 2621517, 3, 131080, 2621518, 3, 131080, 2621519, 3, 131080, 2621520, 3, 131077, 2752511, 3, 131076, 2686976, 3, 131078, 2686977, 3, 131077, 2686978, 1, 0, 2686979, 1, 0, 2686980, 1, 0, 2686981, 1, 0, 2686982, 1, 0, 2686983, 1, 0, 2686984, 1, 0, 2686985, 1, 0, 2686986, 1, 0, 2686987, 1, 0, 2686988, 1, 0, 2686989, 1, 0, 2686990, 1, 0, 2686991, 1, 0, 2686992, 1, 0, 2686993, 1, 0, 2686994, 1, 0, 2686995, 3, 65536, 2686996, 3, 2, 2686997, 3, 2, 2686998, 3, 2, 2686999, 3, 65537, 2687000, 1, 0, 2687001, 1, 0, 2687002, 1, 0, 2687003, 1, 0, 2687004, 1, 0, 2687005, 1, 0, 2687006, 1, 0, 2687007, 1, 0, 2687008, 1, 0, 2687009, 1, 0, 2687010, 1, 0, 2687011, 3, 131076, 2687012, 3, 131078, 2687013, 3, 131078, 2687014, 3, 131080, 2687015, 3, 131080, 2687016, 3, 131080, 2687017, 3, 131080, 2687018, 3, 131078, 2687019, 3, 131078, 2687020, 3, 131078, 2687021, 3, 131078, 2687022, 3, 131080, 2687023, 3, 131080, 2687024, 3, 131078, 2687025, 3, 131080, 2687026, 3, 131080, 2687027, 3, 131078, 2687028, 3, 131080, 2687029, 3, 131080, 2687030, 3, 131078, 2687031, 3, 131080, 2687032, 3, 131080, 2687033, 3, 131078, 2687034, 3, 131080, 2687035, 3, 131078, 2687036, 3, 131078, 2687037, 3, 131080, 2687038, 3, 131078, 2687039, 3, 131078, 2687040, 3, 131078, 2687041, 3, 131078, 2687042, 3, 131078, 2687043, 3, 131078, 2687044, 3, 131078, 2687045, 3, 131078, 2687046, 3, 131080, 2687047, 3, 131080, 2687048, 3, 131080, 2687049, 3, 131080, 2687050, 3, 131078, 2687051, 3, 131080, 2687052, 3, 131078, 2687053, 3, 131078, 2687054, 3, 131078, 2687055, 3, 131080, 2687056, 3, 131077, 2818047, 3, 131076, 2752512, 3, 131078, 2752513, 3, 131077, 2752514, 1, 0, 2752515, 1, 0, 2752516, 1, 0, 2752517, 1, 0, 2752518, 1, 0, 2752519, 1, 0, 2752520, 1, 0, 2752521, 1, 0, 2752522, 1, 0, 2752523, 1, 0, 2752524, 1, 0, 2752525, 1, 0, 2752526, 1, 0, 2752527, 1, 0, 2752528, 1, 0, 2752529, 1, 0, 2752530, 1, 0, 2752531, 1, 0, 2752532, 1, 0, 2752533, 1, 0, 2752534, 1, 0, 2752535, 1, 0, 2752536, 1, 0, 2752537, 1, 0, 2752538, 1, 0, 2752539, 1, 0, 2752540, 1, 0, 2752541, 1, 0, 2752542, 1, 0, 2752543, 1, 0, 2752544, 1, 0, 2752545, 1, 0, 2752546, 1, 0, 2752547, 3, 131076, 2752548, 3, 131078, 2752549, 3, 131078, 2752550, 3, 131080, 2752551, 3, 131078, 2752552, 3, 131080, 2752553, 3, 131078, 2752554, 3, 131080, 2752555, 3, 131078, 2752556, 3, 131080, 2752557, 3, 131080, 2752558, 3, 131080, 2752559, 3, 131078, 2752560, 3, 131080, 2752561, 3, 131078, 2752562, 3, 131080, 2752563, 3, 131080, 2752564, 3, 131078, 2752565, 3, 131080, 2752566, 3, 131078, 2752567, 3, 131078, 2752568, 3, 131078, 2752569, 3, 131078, 2752570, 3, 131080, 2752571, 3, 131080, 2752572, 3, 131078, 2752573, 3, 131080, 2752574, 3, 131078, 2752575, 3, 131080, 2752576, 3, 131078, 2752577, 3, 131080, 2752578, 3, 131080, 2752579, 3, 131078, 2752580, 3, 131080, 2752581, 3, 131078, 2752582, 3, 131080, 2752583, 3, 131078, 2752584, 3, 131080, 2752585, 3, 131078, 2752586, 3, 131080, 2752587, 3, 131078, 2752588, 3, 131078, 2752589, 3, 131080, 2752590, 3, 131078, 2752591, 3, 131078, 2752592, 3, 131077, 2883583, 3, 131076, 2818048, 3, 131078, 2818049, 3, 131077, 2818050, 1, 0, 2818051, 1, 0, 2818052, 1, 0, 2818053, 1, 0, 2818054, 1, 0, 2818055, 1, 0, 2818056, 1, 0, 2818057, 1, 0, 2818058, 1, 0, 2818059, 1, 0, 2818060, 1, 0, 2818061, 1, 0, 2818062, 1, 0, 2818063, 1, 0, 2818064, 1, 0, 2818065, 1, 0, 2818066, 1, 0, 2818067, 1, 0, 2818068, 1, 0, 2818069, 1, 0, 2818070, 1, 0, 2818071, 1, 0, 2818072, 1, 0, 2818073, 1, 0, 2818074, 1, 0, 2818075, 1, 0, 2818076, 1, 0, 2818077, 1, 0, 2818078, 1, 0, 2818079, 1, 0, 2818080, 1, 0, 2818081, 1, 0, 2818082, 1, 0, 2818083, 3, 131076, 2818084, 3, 131078, 2818085, 3, 131078, 2818086, 3, 131080, 2818087, 3, 131080, 2818088, 3, 131080, 2818089, 3, 131080, 2818090, 3, 131078, 2818091, 3, 131080, 2818092, 3, 131078, 2818093, 3, 131080, 2818094, 3, 131078, 2818095, 3, 131078, 2818096, 3, 131080, 2818097, 3, 131080, 2818098, 3, 131078, 2818099, 3, 131080, 2818100, 3, 131078, 2818101, 3, 131080, 2818102, 3, 131080, 2818103, 3, 131080, 2818104, 3, 131078, 2818105, 3, 131078, 2818106, 3, 131080, 2818107, 3, 131078, 2818108, 3, 131078, 2818109, 3, 131078, 2818110, 3, 131080, 2818111, 3, 131080, 2818112, 3, 131078, 2818113, 3, 131080, 2818114, 3, 131078, 2818115, 3, 131080, 2818116, 3, 131078, 2818117, 3, 131078, 2818118, 3, 131078, 2818119, 3, 131078, 2818120, 3, 131078, 2818121, 3, 131080, 2818122, 3, 131078, 2818123, 3, 131078, 2818124, 3, 131080, 2818125, 3, 131078, 2818126, 3, 131080, 2818127, 3, 131080, 2818128, 3, 131077, 2949119, 3, 131076, 2883584, 3, 131078, 2883585, 3, 196608, 2883586, 3, 196612, 2883587, 3, 196612, 2883588, 3, 196612, 2883589, 3, 196612, 2883590, 3, 196612, 2883591, 3, 196612, 2883592, 3, 196612, 2883593, 3, 196612, 2883594, 3, 196612, 2883595, 3, 196612, 2883596, 3, 196612, 2883597, 3, 196612, 2883598, 3, 196612, 2883599, 3, 196612, 2883600, 3, 196612, 2883601, 3, 196612, 2883602, 3, 196612, 2883603, 3, 196612, 2883604, 3, 196612, 2883605, 3, 196612, 2883606, 3, 196612, 2883607, 3, 196612, 2883608, 3, 196612, 2883609, 3, 196612, 2883610, 3, 196612, 2883611, 3, 196612, 2883612, 3, 196612, 2883613, 3, 196612, 2883614, 3, 196612, 2883615, 3, 196612, 2883616, 3, 196612, 2883617, 3, 196612, 2883618, 3, 196612, 2883619, 3, 196609, 2883620, 3, 131078, 2883621, 3, 131078, 2883622, 3, 131080, 2883623, 3, 131078, 2883624, 3, 131078, 2883625, 3, 131078, 2883626, 3, 131078, 2883627, 3, 131078, 2883628, 3, 131078, 2883629, 3, 131080, 2883630, 3, 131080, 2883631, 3, 131080, 2883632, 3, 131078, 2883633, 3, 131078, 2883634, 3, 131080, 2883635, 3, 131078, 2883636, 3, 131078, 2883637, 3, 131080, 2883638, 3, 131078, 2883639, 3, 131078, 2883640, 3, 131078, 2883641, 3, 131078, 2883642, 3, 131078, 2883643, 3, 131080, 2883644, 3, 131080, 2883645, 3, 131078, 2883646, 3, 131078, 2883647, 3, 131078, 2883648, 3, 131078, 2883649, 3, 131080, 2883650, 3, 131078, 2883651, 3, 131080, 2883652, 3, 131078, 2883653, 3, 131080, 2883654, 3, 131080, 2883655, 3, 131080, 2883656, 3, 131078, 2883657, 3, 131080, 2883658, 3, 131080, 2883659, 3, 131080, 2883660, 3, 131080, 2883661, 3, 131078, 2883662, 3, 131078, 2883663, 3, 131080, 2883664, 3, 131077, 3014655, 3, 65543, 2949120, 3, 196613, 2949121, 3, 196613, 2949122, 3, 196613, 2949123, 3, 196613, 2949124, 3, 196613, 2949125, 3, 196613, 2949126, 3, 196613, 2949127, 3, 196613, 2949128, 3, 196613, 2949129, 3, 196613, 2949130, 3, 196613, 2949131, 3, 196613, 2949132, 3, 196613, 2949133, 3, 196613, 2949134, 3, 196613, 2949135, 3, 196613, 2949136, 3, 196613, 2949137, 3, 196613, 2949138, 3, 196613, 2949139, 3, 196613, 2949140, 3, 196613, 2949141, 3, 196613, 2949142, 3, 196613, 2949143, 3, 196613, 2949144, 3, 196613, 2949145, 3, 196613, 2949146, 3, 196613, 2949147, 3, 196613, 2949148, 3, 196613, 2949149, 3, 196613, 2949150, 3, 196613, 2949151, 3, 196613, 2949152, 3, 196613, 2949153, 3, 196613, 2949154, 3, 196613, 2949155, 3, 196613, 2949156, 3, 196613, 2949157, 3, 196613, 2949158, 3, 196613, 2949159, 3, 196613, 2949160, 3, 196613, 2949161, 3, 196613, 2949162, 3, 196613, 2949163, 3, 196613, 2949164, 3, 196613, 2949165, 3, 196613, 2949166, 3, 196613, 2949167, 3, 196613, 2949168, 3, 196613, 2949169, 3, 196613, 2949170, 3, 196613, 2949171, 3, 196613, 2949172, 3, 196613, 2949173, 3, 196613, 2949174, 3, 196613, 2949175, 3, 196613, 2949176, 3, 196613, 2949177, 3, 196613, 2949178, 3, 196613, 2949179, 3, 196613, 2949180, 3, 196613, 2949181, 3, 196613, 2949182, 3, 196613, 2949183, 3, 196613, 2949184, 3, 196613, 2949185, 3, 196613, 2949186, 3, 196613, 2949187, 3, 196613, 2949188, 3, 196613, 2949189, 3, 196613, 2949190, 3, 196613, 2949191, 3, 196613, 2949192, 3, 196613, 2949193, 3, 196613, 2949194, 3, 196613, 2949195, 3, 196613, 2949196, 3, 196613, 2949197, 3, 196613, 2949198, 3, 196613, 2949199, 3, 196613, 2949200, 3, 65544 ) +__meta__ = { +"_edit_lock_": true +} + +[node name="BeltTiles" type="TileMap" parent="TileMap"] +material = SubResource( 3 ) +tile_set = SubResource( 1 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 262161, -1610612734, 0, 262162, -1610612733, 0, 262163, -1610612733, 0, 262164, -1610612733, 0, 262165, -1610612735, 0, 327697, -1610612734, 0, 327698, -1610612733, 0, 327699, -1610612733, 0, 327700, -1610612733, 0, 327701, -1610612735, 0, 393233, -1610612734, 0, 393234, -1610612733, 0, 393235, -1610612733, 0, 393236, -1610612733, 0, 393237, -1610612735, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, -1610612736, 0, 458769, -1610612734, 0, 458770, -1610612733, 0, 458771, -1610612733, 0, 458772, -1610612733, 0, 458773, -1610612735, 0, 524300, -1610612736, 0, 524305, -1610612734, 0, 524306, -1610612733, 0, 524307, -1610612733, 0, 524308, -1610612733, 0, 524309, -1610612735, 0, 589836, -1610612736, 0, 589841, -1610612734, 0, 589842, -1610612733, 0, 589843, -1610612733, 0, 589844, -1610612733, 0, 589845, -1610612735, 0, 655372, -1610612736, 0, 655377, -1610612734, 0, 655378, -1610612733, 0, 655379, -1610612733, 0, 655380, -1610612733, 0, 655381, -1610612735, 0, 720908, -1610612736, 0, 720913, -1610612734, 0, 720914, -1610612733, 0, 720915, -1610612733, 0, 720916, -1610612735, 0, 720917, -1610612736, 0, 786444, -1610612736, 0, 786449, -1610612734, 0, 786450, -1610612733, 0, 786451, -1610612733, 0, 786452, -1610612735, 0, 786453, -1610612736, 0, 851980, -1610612736, 0, 851985, -1610612734, 0, 851986, -1610612733, 0, 851987, -1610612733, 0, 851988, -1610612735, 0, 851989, -1610612736, 0, 917516, -1610612736, 0, 917521, -1610612734, 0, 917522, -1610612733, 0, 917523, -1610612735, 0, 917524, -1610612736, 0, 917525, -1610612736, 0, 983052, -1610612736, 0, 983057, -1610612734, 0, 983058, -1610612733, 0, 983059, -1610612735, 0, 983060, -1610612736, 0, 983061, -1610612736, 0, 1048588, -1610612736, 0, 1048593, -1610612734, 0, 1048594, -1610612733, 0, 1048595, -1610612735, 0, 1048596, -1610612736, 0, 1048597, -1610612736, 0, 1048601, 0, 0, 1048602, -1610612736, 0, 1114124, -1610612736, 0, 1114129, -1610612734, 0, 1114130, -1610612733, 0, 1114131, -1610612735, 0, 1114132, -1610612736, 0, 1114133, -1610612736, 0, 1114137, -1073741824, 0, 1114138, 0, 0, 1114139, 0, 0, 1114140, 0, 0, 1114141, 0, 0, 1114142, -1610612736, 0, 1179660, -1610612736, 0, 1179665, -1610612734, 0, 1179666, -1610612733, 0, 1179667, -1610612735, 0, 1179668, -1610612736, 0, 1179669, -1610612736, 0, 1179673, -1073741824, 0, 1179674, -1610612734, 0, 1179675, -1610612735, 0, 1179676, 1610612736, 0, 1179677, 1610612736, 0, 1179678, -1610612736, 0, 1245201, -1610612734, 0, 1245202, -1610612735, 0, 1245203, -1610612736, 0, 1245204, -1610612736, 0, 1245205, -1610612736, 0, 1245209, -1073741824, 0, 1245210, -1610612734, 0, 1245211, -1610612735, 0, 1245213, -1073741824, 0, 1245214, 0, 0, 1245215, 0, 0, 1245216, -1610612736, 0, 1310737, -1610612734, 0, 1310738, -1610612735, 0, 1310739, -1610612736, 0, 1310740, -1610612736, 0, 1310741, -1610612736, 0, 1310745, -1073741824, 0, 1310746, -1610612734, 0, 1310747, -1610612735, 0, 1310749, -1073741824, 0, 1310750, -1610612736, 0, 1310751, 1610612736, 0, 1310752, -1610612736, 0, 1376273, -1610612734, 0, 1376274, -1610612735, 0, 1376275, -1610612736, 0, 1376276, -1610612736, 0, 1376277, -1610612736, 0, 1376281, -1073741824, 0, 1376282, -1610612734, 0, 1376283, -1610612735, 0, 1376285, -1073741824, 0, 1376286, 1610612736, 0, 1376287, -1073741824, 0, 1376288, 1610612736, 0, 1441809, -1610612734, 0, 1441810, -1610612735, 0, 1441811, -1610612736, 0, 1441812, -1610612736, 0, 1441813, -1610612736, 0, 1441817, -1073741824, 0, 1441818, 1610612736, 0, 1441819, 1610612736, 0, 1703957, -1610612736, 0, 1769493, -1610612736, 0, 1835027, 0, 0, 1835028, 0, 0, 1835030, 1610612736, 0, 1835031, 1610612736, 0, 1900565, -1073741824, 0, 1966101, -1073741824, 0, 2162690, 0, 0, 2162691, 0, 0, 2162692, 0, 0, 2162693, 0, 0, 2162694, 0, 0, 2162695, -1610612736, 0, 2228231, -1610612736, 0, 2293767, -1610612736, 0, 2359303, -1610612736, 0, 2424839, -1610612736, 0, 2490381, 0, 0, 2490382, 0, 0, 2490383, 0, 0, 2490395, 1, 0, 2490396, 1, 0, 2490397, 1, 0, 2490398, 1, 0, 2490399, 1, 0, 2490400, 1, 0, 2490401, 1, 0, 2490402, 1, 0, 2555913, 4, 0, 2555924, 0, 0, 2555925, 0, 0, 2555926, 0, 0, 2555931, 2, 0, 2555932, 2, 0, 2555933, 2, 0, 2555934, 2, 0, 2555935, 2, 0, 2555936, 2, 0, 2555937, 2, 0, 2555938, 2, 0 ) +__meta__ = { +"_edit_lock_": true +} + +[node name="SprSmelter" type="Sprite" parent="TileMap"] +material = SubResource( 6 ) +position = Vector2( 48, 304 ) +texture = ExtResource( 1 ) +centered = false +region_enabled = true +region_rect = Rect2( 32, 240, 24, 16 ) + +[node name="SprForge" type="Sprite" parent="TileMap"] +material = SubResource( 7 ) +position = Vector2( 80, 304 ) +texture = ExtResource( 1 ) +centered = false +region_enabled = true +region_rect = Rect2( 56, 240, 24, 16 ) + +[node name="SprWelder" type="Sprite" parent="TileMap"] +material = SubResource( 4 ) +position = Vector2( 184, 304 ) +texture = ExtResource( 6 ) +centered = false + +[node name="SprLathe" type="Sprite" parent="TileMap"] +material = SubResource( 5 ) +position = Vector2( 128, 304 ) +texture = ExtResource( 5 ) +centered = false +region_rect = Rect2( 80, 240, 32, 16 ) + +[node name="SprOre" type="Sprite" parent="TileMap"] +position = Vector2( 56, 288 ) +texture = ExtResource( 12 ) +centered = false +region_rect = Rect2( 80, 240, 32, 16 ) + +[node name="SprStock" type="Sprite" parent="TileMap"] +position = Vector2( 108, 304 ) +texture = ExtResource( 11 ) +centered = false +region_rect = Rect2( 80, 240, 32, 16 ) + +[node name="SprRod" type="Sprite" parent="TileMap"] +position = Vector2( 164, 312 ) +texture = ExtResource( 13 ) +centered = false +region_rect = Rect2( 80, 240, 32, 16 ) + +[node name="SprLadder" type="Sprite" parent="TileMap"] +position = Vector2( 232, 312 ) +texture = ExtResource( 14 ) +region_rect = Rect2( 80, 240, 32, 16 ) +script = ExtResource( 15 ) + +[node name="Sprite4" type="Sprite" parent="TileMap"] +position = Vector2( 56, 304 ) +texture = ExtResource( 1 ) +centered = false +offset = Vector2( 0, -4 ) +region_enabled = true +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite5" type="Sprite" parent="TileMap"] +position = Vector2( 80, 320 ) +rotation = 4.71239 +texture = ExtResource( 9 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite10" type="Sprite" parent="TileMap"] +position = Vector2( 128, 312 ) +rotation = 4.71239 +texture = ExtResource( 9 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite11" type="Sprite" parent="TileMap"] +position = Vector2( 184, 320 ) +rotation = 4.71239 +texture = ExtResource( 9 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite7" type="Sprite" parent="TileMap"] +position = Vector2( 216, 320 ) +rotation = 4.71239 +texture = ExtResource( 10 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite8" type="Sprite" parent="TileMap"] +position = Vector2( 216, 312 ) +rotation = 4.71239 +texture = ExtResource( 10 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite12" type="Sprite" parent="TileMap"] +position = Vector2( 160, 320 ) +rotation = 4.71239 +texture = ExtResource( 10 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite13" type="Sprite" parent="TileMap"] +position = Vector2( 104, 312 ) +rotation = 4.71239 +texture = ExtResource( 10 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Sprite14" type="Sprite" parent="TileMap"] +position = Vector2( 72, 320 ) +rotation = 4.71239 +texture = ExtResource( 10 ) +centered = false +offset = Vector2( 0, -4 ) +region_rect = Rect2( 16, 232, 8, 8 ) + +[node name="Control" type="Control" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="HBoxContainer" type="HBoxContainer" parent="Control"] +margin_right = 124.0 +margin_bottom = 16.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Smelter" type="TextureRect" parent="Control/HBoxContainer"] +margin_right = 24.0 +margin_bottom = 16.0 +texture = ExtResource( 3 ) + +[node name="Forge" type="TextureRect" parent="Control/HBoxContainer"] +margin_left = 28.0 +margin_right = 52.0 +margin_bottom = 16.0 +texture = ExtResource( 4 ) + +[node name="Lathe" type="TextureRect" parent="Control/HBoxContainer"] +margin_left = 56.0 +margin_right = 88.0 +margin_bottom = 16.0 +texture = ExtResource( 5 ) + +[node name="Welder" type="TextureRect" parent="Control/HBoxContainer"] +margin_left = 92.0 +margin_right = 124.0 +margin_bottom = 16.0 +texture = ExtResource( 6 ) diff --git a/assets/NotoSans-Regular.ttf b/assets/NotoSans-Regular.ttf new file mode 100644 index 0000000..a1b8994 Binary files /dev/null and b/assets/NotoSans-Regular.ttf differ diff --git a/assets/NotoSans.tres b/assets/NotoSans.tres new file mode 100644 index 0000000..5c8c209 --- /dev/null +++ b/assets/NotoSans.tres @@ -0,0 +1,4 @@ +[gd_resource type="DynamicFontData" format=2] + +[resource] +font_path = "res://assets/NotoSans-Regular.ttf" diff --git a/assets/TileSet.tres b/assets/TileSet.tres new file mode 100644 index 0000000..462e56e --- /dev/null +++ b/assets/TileSet.tres @@ -0,0 +1,493 @@ +[gd_resource type="TileSet" load_steps=52 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=13] +points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=14] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=15] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=16] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=17] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=18] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=19] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=20] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=21] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=22] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=23] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=24] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=25] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=26] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=27] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=28] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=29] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=30] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=31] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=32] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=33] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=34] +points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=35] +points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=36] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=37] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=38] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=39] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=40] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=41] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=42] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=43] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=44] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=45] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=46] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=47] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=48] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=49] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=50] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=51] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[resource] +1/name = "Floor" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 0, 48, 8, 8 ) +1/tile_mode = 0 +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +1/shape_one_way = false +1/shape_one_way_margin = 0.0 +1/shapes = [ ] +1/z_index = 0 +3/name = "Wall" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/modulate = Color( 1, 1, 1, 1 ) +3/region = Rect2( 0, 0, 72, 48 ) +3/tile_mode = 1 +3/autotile/bitmask_mode = 1 +3/autotile/bitmask_flags = [ Vector2( 0, 0 ), 176, Vector2( 0, 1 ), 50, Vector2( 0, 2 ), 255, Vector2( 0, 3 ), 507, Vector2( 0, 4 ), 442, Vector2( 0, 5 ), 190, Vector2( 1, 0 ), 152, Vector2( 1, 1 ), 26, Vector2( 1, 2 ), 447, Vector2( 1, 3 ), 510, Vector2( 1, 4 ), 250, Vector2( 1, 5 ), 187, Vector2( 2, 0 ), 56, Vector2( 2, 1 ), 146, Vector2( 2, 2 ), 191, Vector2( 2, 3 ), 251, Vector2( 2, 4 ), 434, Vector2( 2, 5 ), 182, Vector2( 3, 0 ), 184, Vector2( 3, 1 ), 178, Vector2( 3, 2 ), 506, Vector2( 3, 3 ), 446, Vector2( 3, 4 ), 218, Vector2( 3, 5 ), 155, Vector2( 4, 0 ), 58, Vector2( 4, 1 ), 154, Vector2( 4, 2 ), 438, Vector2( 4, 3 ), 504, Vector2( 4, 4 ), 440, Vector2( 4, 5 ), 62, Vector2( 5, 0 ), 24, Vector2( 5, 1 ), 144, Vector2( 5, 2 ), 219, Vector2( 5, 3 ), 63, Vector2( 5, 4 ), 248, Vector2( 5, 5 ), 59, Vector2( 6, 0 ), 18, Vector2( 6, 1 ), 48, Vector2( 6, 2 ), 511, Vector2( 6, 3 ), 16, Vector2( 6, 4 ), 443, Vector2( 6, 5 ), 254, Vector2( 7, 0 ), 432, Vector2( 7, 1 ), 54, Vector2( 7, 2 ), 186, Vector2( 8, 0 ), 216, Vector2( 8, 1 ), 27, Vector2( 8, 2 ), 511 ] +3/autotile/icon_coordinate = Vector2( 6, 3 ) +3/autotile/tile_size = Vector2( 8, 8 ) +3/autotile/spacing = 0 +3/autotile/occluder_map = [ ] +3/autotile/navpoly_map = [ ] +3/autotile/priority_map = [ ] +3/autotile/z_index_map = [ ] +3/occluder_offset = Vector2( 0, 0 ) +3/navigation_offset = Vector2( 0, 0 ) +3/shape_offset = Vector2( 0, 0 ) +3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +3/shape = SubResource( 2 ) +3/shape_one_way = false +3/shape_one_way_margin = 1.0 +3/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 3 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 4 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 5 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 6 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 7 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 8 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 9 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 8, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 10 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 11 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 12 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 13 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 14 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 15 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 16 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 17 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 18 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 8, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 19 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 20 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 21 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 22 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 23 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 24 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 25 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 26 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 27 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 8, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 28 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 29 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 30 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 31 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 32 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 33 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 34 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 35 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 36 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 8, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 37 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 38 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 39 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 40 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 41 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 42 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 43 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 4 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 44 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 45 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 46 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 47 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 48 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 49 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 50 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 5 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 51 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +3/z_index = 0 diff --git a/assets/UI_module_names.tres b/assets/UI_module_names.tres new file mode 100644 index 0000000..ee8488a --- /dev/null +++ b/assets/UI_module_names.tres @@ -0,0 +1,6 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[sub_resource type="DynamicFontData" id=1] + +[resource] +font_data = SubResource( 1 ) diff --git a/assets/belt.shader b/assets/belt.shader new file mode 100644 index 0000000..d05f436 --- /dev/null +++ b/assets/belt.shader @@ -0,0 +1,6 @@ +shader_type canvas_item; +uniform float rps = 1.0; + +void vertex() { + UV.x -= mod(TIME*rps, 1.0)/32.0; +} \ No newline at end of file diff --git a/assets/machine.shader b/assets/machine.shader new file mode 100644 index 0000000..31103cd --- /dev/null +++ b/assets/machine.shader @@ -0,0 +1,14 @@ +shader_type canvas_item; +uniform float rps = 1.0; +uniform vec3 bg_color = vec3(0.251); + +void vertex() { + UV.y -= floor(mod(TIME*rps, 1.0)*4.0)/16.0; +} + +void fragment(){ +// if (COLOR.rgb == bg_color){ +// COLOR.r = 1.0; +// } +// else COLOR = COLOR; +} \ No newline at end of file diff --git a/assets/sprites/2x2_belt.tres b/assets/sprites/2x2_belt.tres new file mode 100644 index 0000000..aab2a50 --- /dev/null +++ b/assets/sprites/2x2_belt.tres @@ -0,0 +1,16 @@ +[gd_resource type="AnimatedTexture" load_steps=5 format=2] + +[ext_resource path="res://assets/sprites/2x2belt_0.tres" type="Texture" id=1] +[ext_resource path="res://assets/sprites/2x2belt_2.tres" type="Texture" id=2] +[ext_resource path="res://assets/sprites/2x2belt_1.tres" type="Texture" id=3] +[ext_resource path="res://assets/sprites/2x2belt_3.tres" type="Texture" id=4] + +[resource] +frames = 4 +frame_0/texture = ExtResource( 1 ) +frame_1/texture = ExtResource( 3 ) +frame_1/delay_sec = 0.0 +frame_2/texture = ExtResource( 2 ) +frame_2/delay_sec = 0.0 +frame_3/texture = ExtResource( 4 ) +frame_3/delay_sec = 0.0 diff --git a/assets/sprites/2x2belt_0.tres b/assets/sprites/2x2belt_0.tres new file mode 100644 index 0000000..5a25f76 --- /dev/null +++ b/assets/sprites/2x2belt_0.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 224, 16, 16 ) diff --git a/assets/sprites/2x2belt_1.tres b/assets/sprites/2x2belt_1.tres new file mode 100644 index 0000000..22225c3 --- /dev/null +++ b/assets/sprites/2x2belt_1.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 208, 16, 16 ) diff --git a/assets/sprites/2x2belt_2.tres b/assets/sprites/2x2belt_2.tres new file mode 100644 index 0000000..8f95548 --- /dev/null +++ b/assets/sprites/2x2belt_2.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 192, 16, 16 ) diff --git a/assets/sprites/2x2belt_3.tres b/assets/sprites/2x2belt_3.tres new file mode 100644 index 0000000..4a9f782 --- /dev/null +++ b/assets/sprites/2x2belt_3.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 176, 16, 16 ) diff --git a/assets/sprites/2x2belt_asprite.tres b/assets/sprites/2x2belt_asprite.tres new file mode 100644 index 0000000..5a55bd8 --- /dev/null +++ b/assets/sprites/2x2belt_asprite.tres @@ -0,0 +1,27 @@ +[gd_resource type="SpriteFrames" load_steps=6 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 0, 224, 16, 16 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 0, 208, 16, 16 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 0, 192, 16, 16 ) + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 176, 16, 16 ) + +[resource] +animations = [ { +"frames": [ SubResource( 4 ), SubResource( 3 ), SubResource( 2 ), SubResource( 1 ) ], +"loop": true, +"name": "default", +"speed": 10.0 +} ] diff --git a/assets/sprites/arrow_in.tres b/assets/sprites/arrow_in.tres new file mode 100644 index 0000000..e213d91 --- /dev/null +++ b/assets/sprites/arrow_in.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 16, 232, 8, 8 ) diff --git a/assets/sprites/arrow_out.tres b/assets/sprites/arrow_out.tres new file mode 100644 index 0000000..a0900cc --- /dev/null +++ b/assets/sprites/arrow_out.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 24, 232, 8, 8 ) diff --git a/assets/sprites/belt_0.tres b/assets/sprites/belt_0.tres new file mode 100644 index 0000000..9c78cad --- /dev/null +++ b/assets/sprites/belt_0.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 168, 8, 8 ) diff --git a/assets/sprites/belt_1.tres b/assets/sprites/belt_1.tres new file mode 100644 index 0000000..a14c458 --- /dev/null +++ b/assets/sprites/belt_1.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 8, 168, 8, 8 ) diff --git a/assets/sprites/belt_2.tres b/assets/sprites/belt_2.tres new file mode 100644 index 0000000..573a894 --- /dev/null +++ b/assets/sprites/belt_2.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 0, 160, 8, 8 ) diff --git a/assets/sprites/belt_3.tres b/assets/sprites/belt_3.tres new file mode 100644 index 0000000..d17ec35 --- /dev/null +++ b/assets/sprites/belt_3.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 8, 160, 8, 8 ) diff --git a/assets/sprites/belt_asprite.tres b/assets/sprites/belt_asprite.tres new file mode 100644 index 0000000..98e3944 --- /dev/null +++ b/assets/sprites/belt_asprite.tres @@ -0,0 +1,27 @@ +[gd_resource type="SpriteFrames" load_steps=6 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 168, 8, 8 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 8, 168, 8, 8 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 0, 160, 8, 8 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 8, 160, 8, 8 ) + +[resource] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ], +"loop": true, +"name": "default", +"speed": 10.0 +} ] diff --git a/assets/sprites/forge.tres b/assets/sprites/forge.tres new file mode 100644 index 0000000..4c53829 --- /dev/null +++ b/assets/sprites/forge.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 56, 240, 24, 16 ) diff --git a/assets/sprites/iron_ladder.tres b/assets/sprites/iron_ladder.tres new file mode 100644 index 0000000..529bb66 --- /dev/null +++ b/assets/sprites/iron_ladder.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 16, 192, 16, 16 ) diff --git a/assets/sprites/iron_ore.tres b/assets/sprites/iron_ore.tres new file mode 100644 index 0000000..0d90459 --- /dev/null +++ b/assets/sprites/iron_ore.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 16, 224, 8, 8 ) diff --git a/assets/sprites/iron_rod.tres b/assets/sprites/iron_rod.tres new file mode 100644 index 0000000..3ab1a8c --- /dev/null +++ b/assets/sprites/iron_rod.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 16, 208, 16, 8 ) diff --git a/assets/sprites/iron_stock.tres b/assets/sprites/iron_stock.tres new file mode 100644 index 0000000..3d004be --- /dev/null +++ b/assets/sprites/iron_stock.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 16, 216, 16, 8 ) diff --git a/assets/sprites/iron_swarf.tres b/assets/sprites/iron_swarf.tres new file mode 100644 index 0000000..489cdbf --- /dev/null +++ b/assets/sprites/iron_swarf.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 24, 224, 8, 8 ) diff --git a/assets/sprites/lathe.tres b/assets/sprites/lathe.tres new file mode 100644 index 0000000..fcaf6df --- /dev/null +++ b/assets/sprites/lathe.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 80, 240, 32, 16 ) diff --git a/assets/sprites/smelter.tres b/assets/sprites/smelter.tres new file mode 100644 index 0000000..5c82644 --- /dev/null +++ b/assets/sprites/smelter.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 32, 240, 24, 16 ) diff --git a/assets/sprites/welder.tres b/assets/sprites/welder.tres new file mode 100644 index 0000000..8c6e1ca --- /dev/null +++ b/assets/sprites/welder.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=2] + +[ext_resource path="res://spritesheet.png" type="Texture" id=1] + +[resource] +atlas = ExtResource( 1 ) +region = Rect2( 112, 240, 32, 16 ) diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..1c5368f --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,222 @@ +[preset.0] + +name="HTML5" +platform="HTML5" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="./LD46.html" +patch_list=PoolStringArray( ) +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/custom_html_shell="" +html/head_include="" +custom_template/release="" +custom_template/debug="" + +[preset.1] + +name="Android" +platform="Android" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +patch_list=PoolStringArray( ) +script_export_mode=1 +script_encryption_key="" + +[preset.1.options] + +graphics/32_bits_framebuffer=true +xr_features/xr_mode=0 +xr_features/degrees_of_freedom=0 +xr_features/hand_tracking=0 +one_click_deploy/clear_previous_install=false +custom_template/debug="" +custom_template/release="" +custom_template/use_custom_build=false +command_line/extra_args="" +version/code=1 +version/name="1.0" +package/unique_name="org.godotengine.$genname" +package/name="" +package/signed=true +screen/immersive_mode=true +screen/orientation=0 +screen/support_small=true +screen/support_normal=true +screen/support_large=true +screen/support_xlarge=true +screen/opengl_debug=false +launcher_icons/main_192x192="" +launcher_icons/adaptive_foreground_432x432="" +launcher_icons/adaptive_background_432x432="" +keystore/debug="" +keystore/debug_user="" +keystore/debug_password="" +keystore/release="" +keystore/release_user="" +keystore/release_password="" +apk_expansion/enable=false +apk_expansion/SALT="" +apk_expansion/public_key="" +architectures/armeabi-v7a=true +architectures/arm64-v8a=true +architectures/x86=false +architectures/x86_64=false +permissions/custom_permissions=PoolStringArray( ) +permissions/access_checkin_properties=false +permissions/access_coarse_location=false +permissions/access_fine_location=false +permissions/access_location_extra_commands=false +permissions/access_mock_location=false +permissions/access_network_state=false +permissions/access_surface_flinger=false +permissions/access_wifi_state=false +permissions/account_manager=false +permissions/add_voicemail=false +permissions/authenticate_accounts=false +permissions/battery_stats=false +permissions/bind_accessibility_service=false +permissions/bind_appwidget=false +permissions/bind_device_admin=false +permissions/bind_input_method=false +permissions/bind_nfc_service=false +permissions/bind_notification_listener_service=false +permissions/bind_print_service=false +permissions/bind_remoteviews=false +permissions/bind_text_service=false +permissions/bind_vpn_service=false +permissions/bind_wallpaper=false +permissions/bluetooth=false +permissions/bluetooth_admin=false +permissions/bluetooth_privileged=false +permissions/brick=false +permissions/broadcast_package_removed=false +permissions/broadcast_sms=false +permissions/broadcast_sticky=false +permissions/broadcast_wap_push=false +permissions/call_phone=false +permissions/call_privileged=false +permissions/camera=false +permissions/capture_audio_output=false +permissions/capture_secure_video_output=false +permissions/capture_video_output=false +permissions/change_component_enabled_state=false +permissions/change_configuration=false +permissions/change_network_state=false +permissions/change_wifi_multicast_state=false +permissions/change_wifi_state=false +permissions/clear_app_cache=false +permissions/clear_app_user_data=false +permissions/control_location_updates=false +permissions/delete_cache_files=false +permissions/delete_packages=false +permissions/device_power=false +permissions/diagnostic=false +permissions/disable_keyguard=false +permissions/dump=false +permissions/expand_status_bar=false +permissions/factory_test=false +permissions/flashlight=false +permissions/force_back=false +permissions/get_accounts=false +permissions/get_package_size=false +permissions/get_tasks=false +permissions/get_top_activity_info=false +permissions/global_search=false +permissions/hardware_test=false +permissions/inject_events=false +permissions/install_location_provider=false +permissions/install_packages=false +permissions/install_shortcut=false +permissions/internal_system_window=false +permissions/internet=false +permissions/kill_background_processes=false +permissions/location_hardware=false +permissions/manage_accounts=false +permissions/manage_app_tokens=false +permissions/manage_documents=false +permissions/master_clear=false +permissions/media_content_control=false +permissions/modify_audio_settings=false +permissions/modify_phone_state=false +permissions/mount_format_filesystems=false +permissions/mount_unmount_filesystems=false +permissions/nfc=false +permissions/persistent_activity=false +permissions/process_outgoing_calls=false +permissions/read_calendar=false +permissions/read_call_log=false +permissions/read_contacts=false +permissions/read_external_storage=false +permissions/read_frame_buffer=false +permissions/read_history_bookmarks=false +permissions/read_input_state=false +permissions/read_logs=false +permissions/read_phone_state=false +permissions/read_profile=false +permissions/read_sms=false +permissions/read_social_stream=false +permissions/read_sync_settings=false +permissions/read_sync_stats=false +permissions/read_user_dictionary=false +permissions/reboot=false +permissions/receive_boot_completed=false +permissions/receive_mms=false +permissions/receive_sms=false +permissions/receive_wap_push=false +permissions/record_audio=false +permissions/reorder_tasks=false +permissions/restart_packages=false +permissions/send_respond_via_message=false +permissions/send_sms=false +permissions/set_activity_watcher=false +permissions/set_alarm=false +permissions/set_always_finish=false +permissions/set_animation_scale=false +permissions/set_debug_app=false +permissions/set_orientation=false +permissions/set_pointer_speed=false +permissions/set_preferred_applications=false +permissions/set_process_limit=false +permissions/set_time=false +permissions/set_time_zone=false +permissions/set_wallpaper=false +permissions/set_wallpaper_hints=false +permissions/signal_persistent_processes=false +permissions/status_bar=false +permissions/subscribed_feeds_read=false +permissions/subscribed_feeds_write=false +permissions/system_alert_window=false +permissions/transmit_ir=false +permissions/uninstall_shortcut=false +permissions/update_device_stats=false +permissions/use_credentials=false +permissions/use_sip=false +permissions/vibrate=false +permissions/wake_lock=false +permissions/write_apn_settings=false +permissions/write_calendar=false +permissions/write_call_log=false +permissions/write_contacts=false +permissions/write_external_storage=false +permissions/write_gservices=false +permissions/write_history_bookmarks=false +permissions/write_profile=false +permissions/write_secure_settings=false +permissions/write_settings=false +permissions/write_sms=false +permissions/write_social_stream=false +permissions/write_sync_settings=false +permissions/write_user_dictionary=false diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/favicon.png differ diff --git a/favicon.png.import b/favicon.png.import new file mode 100644 index 0000000..8346332 --- /dev/null +++ b/favicon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://favicon.png" +dest_files=[ "res://.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..96cbf46 --- /dev/null +++ b/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/item.gd b/item.gd new file mode 100644 index 0000000..40c83f0 --- /dev/null +++ b/item.gd @@ -0,0 +1,62 @@ +extends Sprite + +var held = false +onready var beltmap = $"../BeltTiles" + +var dir_vectors = [Vector2(1,0), Vector2(0,-1), Vector2(-1,0), Vector2(0,1)] + +var cx := 5 # offset for edge feet +var cy := 5 # offset for edge feet +var foot_vectors = [Vector2(0,0), Vector2(cx,cy), Vector2(cx,-cy), Vector2(-cx,-cy), Vector2(-cx,cy)] +var foot_weights = [3, 1, 1, 1, 1] +var total_weight = 7 +#var stuck_vec = null +#var stuck_dir = -1 # For going off the end of belts + + +func get_belt_direction(tx, ty): + var xflip = beltmap.is_cell_x_flipped(tx, ty) + var tp = beltmap.is_cell_transposed(tx, ty) + return int(tp) + int(xflip)*2 + +func get_belt_rect(vec): + var origin = beltmap.map_to_world(vec) + return Rect2(to_local(origin), Vector2(8, 8)) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + var belt_speed = delta * 8 + + var direction = Vector2(0, 0) + for i in len(foot_vectors): + var vec = beltmap.world_to_map(position + foot_vectors[i]) + if beltmap.get_cell(vec.x, vec.y) >= 0: + direction += dir_vectors[get_belt_direction(vec.x, vec.y)] * foot_weights[i] + position += direction/total_weight * belt_speed + +# var vec = beltmap.world_to_map(position) +# if stuck_vec: +# if get_rect().intersects(get_belt_rect(stuck_vec)): +# position += dir_vectors[stuck_dir] * belt_speed +# return +# else: +# stuck_vec = null +# stuck_dir = -1 + +# var tx = vec[0] +# var ty = vec[1] +# if beltmap.get_cell(tx, ty) >= 0: +# stuck_dir = get_belt_direction(tx, ty) +# stuck_vec = vec +# position += dir_vectors[stuck_dir] * belt_speed + + +func _input(event): + if event is InputEventMouseButton: + if not event.pressed: + held = false + elif get_rect().has_point(to_local(event.position)): + held = true + elif event is InputEventMouseMotion: + if held: + position += event.relative diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..4641082 --- /dev/null +++ b/project.godot @@ -0,0 +1,38 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +_global_script_classes=[ ] +_global_script_class_icons={ + +} + +[application] + +config/name="LD46" +run/main_scene="res://Main.tscn" +config/icon="res://icon.png" + +[debug] + +settings/fps/force_fps=60 + +[display] + +window/size/width=480 +window/size/height=360 +window/stretch/mode="2d" +window/stretch/aspect="keep" + +[rendering] + +quality/driver/driver_name="GLES2" +vram_compression/import_etc=true +vram_compression/import_etc2=false +environment/default_environment="res://default_env.tres" diff --git a/spritesheet.png b/spritesheet.png new file mode 100644 index 0000000..525af8a Binary files /dev/null and b/spritesheet.png differ diff --git a/spritesheet.png.import b/spritesheet.png.import new file mode 100644 index 0000000..b5f62dd --- /dev/null +++ b/spritesheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/spritesheet.png-59f7dfdebfc035c80a63445e3bd8a9bd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://spritesheet.png" +dest_files=[ "res://.import/spritesheet.png-59f7dfdebfc035c80a63445e3bd8a9bd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/spritesheet.xcf b/spritesheet.xcf new file mode 100644 index 0000000..5921f95 Binary files /dev/null and b/spritesheet.xcf differ