$jscomp.SymbolClass=function(a,c){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:c})};$jscomp.SymbolClass.prototype.toString=function(){returnthis.$jscomp$symbol$id_};$jscomp.Symbol=function(){functiona(b){if(thisinstanceofa)thrownewTypeError("Symbol is not a constructor");returnnew$jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(b||"")+"_"+c++,b)}varc=0;returna}();
g="\nWEBINA\n======\n\n";void0!==f?("/"!==f.slice(f.length-1)&&(f+="/"),this.WEBINA_BASE_URL=f,g+="User specified baseUrl: "+f+"\n"):g+="No baseUrl specified, so using ./\n\nUse Webina.start() to specify the baseUrl:\n function start(vinaParams, receptorPDBQTTxt, \n ligandPDBQTTxt, onDone, \n onError, baseUrl)\n";g+="\nExpecting files at the following locations:\n";for(varh=0;5>h;h++)g+=""+(void0===f?"./":f)+["Webina.min.min.js","vina.html.mem","vina.min.min.js",
"vina.worker.min.min.js","vina.wasm"][h]+"\n";g+="\n";void0!==f?console.log(g):console.warn(g);void0===e&&(e=function(){console.log("Webina encountered an error! Does your browser support WebAssembly?")});WEBINA_Module={preRun:[],postRun:[],stdOut:"",stdErr:"",print:function(){returnfunction(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments).join(""));window.WEBINA_Module.stdOut+=a+"\n"}}(),printErr:function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments).join(""));window.WEBINA_Module.stdErr+=
a+"\n"},setStatus:function(a){""===a&&void0!==d&&(a=(newTextDecoder("utf-8")).decode(window.FS.readFile("ligand_out.pdbqt")),d(a,window.WEBINA_Module.stdOut,window.WEBINA_Module.stdErr))},onError:e,catchError:function(a){e(a)},receptorPDBQTTxt:c,ligandPDBQTTxt:b};void0!==a.receptor&&console.warn("Webina does not support Vina's --receptor parameter. Instead, pass the content of the receptor file as a string to the webina.start() function.");void0!==a.receptor&&console.warn("Webina does not support Vina's --ligand parameter. Instead, pass the content of the ligand file as a string to the webina.start() function.");
l.status){vara="Unable to access "+k+'. See JavaScript console for warnings. The "baseUrl" variable passed to Webina is likely incorrect.';WEBINA_Module.catchError({message:a});console.warn(a)}elsea=document.createElement("script"),a.src=m.WEBINA_BASE_URL+"vina.min.js",document.body.appendChild(a)};l.open("GET",k,!0);l.responseType="arraybuffer";l.send(null)},isDataURI:function(a){returnString.prototype.startsWith?a.startsWith(this.WEBINA_DATA_URI_PREFIX):0===a.indexOf(this.WEBINA_DATA_URI_PREFIX)},
intArrayFromBase64:function(a){if("boolean"==typeofthis.WEBINA_ENVIRONMENT_IS_NODE&&this.WEBINA_ENVIRONMENT_IS_NODE){try{varc=Buffer.from(a,"base64")}catch(e){c=newBuffer(a,"base64")}returnnewUint8Array(c.buffer,c.byteOffset,c.byteLength)}try{varb=decodeBase64(a),d=newUint8Array(b.length);for(a=0;a<b.length;++a)d[a]=b.charCodeAt(a);returnd}catch(e){throwError("Converting base64 string to bytes failed.");}},tryParseAsDataURI:function(a){if(this.isDataURI(a))returnthis.intArrayFromBase64(a.slice(this.WEBINA_DATA_URI_PREFIX.length))},
intArrayFromString:function(a,c,b){b=0<b?b:this.WEBINA_lengthBytesUTF8(a)+1;b=Array(b);a=this.WEBINA_stringToUTF8Array(a,b,0,b.length);returnc&&(b.length=a),b},intArrayToString:function(a){for(varc=[],b=0;b<a.length;b++){vard=a[b];255<d&&(this.WEBINA_ASSERTIONS&&this.WEBINA_assert(!1,"Character code "+d+" ("+String.fromCharCode(d)+") at offset "+b+" not in 0x00-0xFF."),d&=255);c.push(String.fromCharCode(d))}returnc.join("")}}}();
$jscomp.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};$jscomp.SymbolClass.prototype.toString=function(){returnthis.$jscomp$symbol$id_};$jscomp.Symbol=function(){functiona(c){if(thisinstanceofa)thrownewTypeError("Symbol is not a constructor");returnnew$jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(c||"")+"_"+b++,c)}varb=0;returna}();
ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!WEBINA_ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(WEBINA_Module.ENVIRONMENT)throwError("WEBINA_Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");varENVIRONMENT_IS_PTHREAD=WEBINA_Module.ENVIRONMENT_IS_PTHREAD||!1;if(!ENVIRONMENT_IS_PTHREAD)varPthreadWorkerInit={};
Object.getOwnPropertyDescriptor(WEBINA_Module,"arguments")||Object.defineProperty(WEBINA_Module,"arguments",{configurable:!0,get:function(){abort("WEBINA_Module.arguments has been replaced with plain arguments_")}});WEBINA_Module.thisProgram&&(thisProgram=WEBINA_Module.thisProgram);Object.getOwnPropertyDescriptor(WEBINA_Module,"thisProgram")||Object.defineProperty(WEBINA_Module,"thisProgram",{configurable:!0,get:function(){abort("WEBINA_Module.thisProgram has been replaced with plain thisProgram")}});
WEBINA_Module.quit&&(quit_=WEBINA_Module.quit);Object.getOwnPropertyDescriptor(WEBINA_Module,"quit")||Object.defineProperty(WEBINA_Module,"quit",{configurable:!0,get:function(){abort("WEBINA_Module.quit has been replaced with plain quit_")}});WEBINA_assert("undefined"===typeofWEBINA_Module.memoryInitializerPrefixURL,"WEBINA_Module.memoryInitializerPrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeofWEBINA_Module.pthreadMainPrefixURL,"WEBINA_Module.pthreadMainPrefixURL option was removed, use WEBINA_Module.locateFile instead");
WEBINA_assert("undefined"===typeofWEBINA_Module.cdInitializerPrefixURL,"WEBINA_Module.cdInitializerPrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeofWEBINA_Module.filePackagePrefixURL,"WEBINA_Module.filePackagePrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeofWEBINA_Module.read,"WEBINA_Module.read option was removed (modify read_ in JS)");
WEBINA_assert("undefined"===typeofWEBINA_Module.readAsync,"WEBINA_Module.readAsync option was removed (modify readAsync in JS)");WEBINA_assert("undefined"===typeofWEBINA_Module.readBinary,"WEBINA_Module.readBinary option was removed (modify readBinary in JS)");WEBINA_assert("undefined"===typeofWEBINA_Module.setWindowTitle,"WEBINA_Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
Object.getOwnPropertyDescriptor(WEBINA_Module,"read")||Object.defineProperty(WEBINA_Module,"read",{configurable:!0,get:function(){abort("WEBINA_Module.read has been replaced with plain read_")}});Object.getOwnPropertyDescriptor(WEBINA_Module,"readAsync")||Object.defineProperty(WEBINA_Module,"readAsync",{configurable:!0,get:function(){abort("WEBINA_Module.readAsync has been replaced with plain readAsync")}});
Object.getOwnPropertyDescriptor(WEBINA_Module,"readBinary")||Object.defineProperty(WEBINA_Module,"readBinary",{configurable:!0,get:function(){abort("WEBINA_Module.readBinary has been replaced with plain readBinary")}});WEBINA_assert(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER,"Pthreads do not work in non-browser environments yet (need Web Workers, or an alternative to them)");stackSave=stackRestore=stackAlloc=function(){abort("cannot use the stack before compiled code is ready to run, and has provided stack access")};
functiondynamicAlloc(a){WEBINA_assert(DYNAMICTOP_PTR);WEBINA_assert(!ENVIRONMENT_IS_PTHREAD);varb=HEAP32[DYNAMICTOP_PTR>>2];a=b+a+15&-16;a>_emscripten_get_heap_size()&&abort("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly");HEAP32[DYNAMICTOP_PTR>>2]=a;returnb}
functiongetNativeTypeSize(a){switch(a){case"i1":case"i8":return1;case"i16":return2;case"i32":return4;case"i64":return8;case"float":return4;case"double":return8;default:if("*"===a[a.length-1])return4;if("i"===a[0]){varb=parseInt(a.substr(1));WEBINA_assert(0===b%8,"getNativeTypeSize invalid bits "+b+", type "+a);returnb/8}return0}}functionwarnOnce(a){warnOnce.shown||(warnOnce.shown={});warnOnce.shown[a]||(warnOnce.shown[a]=1,err(a))}
varasm2wasmImports={"f64-rem":function(a,b){returna%b},"debugger":function(){debugger}},functionPointers=[],tempRet0=0,setTempRet0=function(a){tempRet0=a},GLOBAL_BASE=1024,wasmBinary;WEBINA_Module.wasmBinary&&(wasmBinary=WEBINA_Module.wasmBinary);Object.getOwnPropertyDescriptor(WEBINA_Module,"wasmBinary")||Object.defineProperty(WEBINA_Module,"wasmBinary",{configurable:!0,get:function(){abort("WEBINA_Module.wasmBinary has been replaced with plain wasmBinary")}});varnoExitRuntime;
WEBINA_Module.noExitRuntime&&(noExitRuntime=WEBINA_Module.noExitRuntime);Object.getOwnPropertyDescriptor(WEBINA_Module,"noExitRuntime")||Object.defineProperty(WEBINA_Module,"noExitRuntime",{configurable:!0,get:function(){abort("WEBINA_Module.noExitRuntime has been replaced with plain noExitRuntime")}});"object"!==typeofWebAssembly&&abort("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
break;case"double":HEAPF64[a>>3]=b;break;default:abort("invalid type for setValue: "+c)}}varwasmMemory,wasmTable=newWebAssembly.Table({initial:1388,maximum:1388,element:"anyfunc"}),wasmModule,ABORT=!1,EXITSTATUS=0;functionWEBINA_assert(a,b){a||abort("Assertion failed: "+b)}varALLOC_NONE=3;
functionallocate(a,b,c,d){if("number"===typeofa){vare=!0;varf=a}elsee=!1,f=a.length;varg="string"===typeofb?b:null;c=c==ALLOC_NONE?d:[_malloc,stackAlloc,dynamicAlloc][c](Math.max(f,g?1:b.length));if(e){d=c;WEBINA_assert(0==(c&3));for(a=c+(f&-4);d<a;d+=4)HEAP32[d>>2]=0;for(a=c+f;d<a;)HEAP8[d++>>0]=0;returnc}if("i8"===g)returna.subarray||a.slice?HEAPU8.set(a,c):HEAPU8.set(newUint8Array(a),c),c;d=0;for(vark,l;d<f;){varh=a[d];e=g||b[d];0===e?d++:(WEBINA_assert(e,"Must know what type to store in allocate!"),
functionUTF8ArrayToString(a,b,c){c=b+c;for(vard="";!(b>=c);){vare=a[b++];if(!e)break;if(e&128){varf=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{varg=a[b++]&63;224==(e&240)?e=(e&15)<<12|f<<6|g:(240!=(e&248)&&warnOnce("Invalid UTF-8 leading byte 0x"+e.toString(16)+" encountered when deserializing a UTF-8 string on the asm.min.js/wasm heap to a JS string!"),e=(e&7)<<18|f<<12|g<<6|a[b++]&63);65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&
functionWEBINA_stringToUTF8Array(a,b,c,d){if(!(0<d))return0;vare=c;d=c+d-1;for(varf=0;f<a.length;++f){varg=a.charCodeAt(f);if(55296<=g&&57343>=g){vark=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;2097152<=g&&warnOnce("Invalid Unicode code point 0x"+g.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.min.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");
b[c++]=240|g>>18;b[c++]=128|g>>12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0;returnc-e}functionstringToUTF8(a,b,c){WEBINA_assert("number"==typeofc,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");returnWEBINA_stringToUTF8Array(a,HEAPU8,b,c)}
functionwriteArrayToMemory(a,b){WEBINA_assert(0<=a.length,"writeArrayToMemory array must have a length (should be an array or typed array)");HEAP8.set(a,b)}functionwriteAsciiToMemory(a,b,c){for(vard=0;d<a.length;++d)WEBINA_assert(a.charCodeAt(d)===a.charCodeAt(d)&255),HEAP8[b++>>0]=a.charCodeAt(d);c||(HEAP8[b>>0]=0)}varWASM_PAGE_SIZE=65536,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;
if(!ENVIRONMENT_IS_PTHREAD){varSTACK_BASE=85136,STACK_MAX=5328016,DYNAMIC_BASE=5328016,DYNAMICTOP_PTR=84128;WEBINA_assert(0===STACK_BASE%16,"stack must start aligned");WEBINA_assert(0===DYNAMIC_BASE%16,"heap must start aligned")}varTOTAL_STACK=5242880;WEBINA_Module.TOTAL_STACK&&WEBINA_assert(TOTAL_STACK===WEBINA_Module.TOTAL_STACK,"the stack size can no longer be determined at runtime");varINITIAL_TOTAL_MEMORY=WEBINA_Module.TOTAL_MEMORY||1073741824;
Object.getOwnPropertyDescriptor(WEBINA_Module,"TOTAL_MEMORY")||Object.defineProperty(WEBINA_Module,"TOTAL_MEMORY",{configurable:!0,get:function(){abort("WEBINA_Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}});WEBINA_assert(INITIAL_TOTAL_MEMORY>=TOTAL_STACK,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+INITIAL_TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")");
WEBINA_assert("undefined"!==typeofInt32Array&&"undefined"!==typeofFloat64Array&&void0!==Int32Array.prototype.subarray&&void0!==Int32Array.prototype.set,"JS engine does not provide full typed array support");
if(!ENVIRONMENT_IS_PTHREAD)if(WEBINA_Module.wasmMemory)wasmMemory=WEBINA_Module.wasmMemory;elsetry{wasmMemory=newWebAssembly.Memory({initial:INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE,maximum:INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE,shared:!0}),WEBINA_assert(wasmMemory.bufferinstanceofSharedArrayBuffer,"requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag")}catch(a){WEBINA_Module.catchError({message:"Problem using shared memory, likely because your browser does not have WebAssembly threads support. Please use a different browser, such as Google Chrome."})}
functioncheckStackCookie(){vara=HEAPU32[(STACK_MAX>>2)-1],b=HEAPU32[(STACK_MAX>>2)-2];34821223==a&&2310721022==b||abort("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+b.toString(16)+""+a.toString(16));1668509029!==HEAP32[0]&&abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}
functionabortStackOverflow(a){abort("Stack overflow! Attempted to allocate "+a+" bytes on the stack, but stack has only "+(STACK_MAX-stackSave()+a)+" bytes available!")}(function(){vara=newInt16Array(1),b=newInt8Array(a.buffer);a[0]=25459;if(115!==b[0]||99!==b[1])throw"Runtime error: expected the system to be little-endian!";})();
functionabortFnPtrError(a,b){abort("Invalid function pointer "+a+" called with signature '"+b+"'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). Build with WEBINA_ASSERTIONS=2 for more info.")}
functionpostRun(){checkStackCookie();if(!ENVIRONMENT_IS_PTHREAD){if(WEBINA_Module.postRun)for("function"==typeofWEBINA_Module.postRun&&(WEBINA_Module.postRun=[WEBINA_Module.postRun]);WEBINA_Module.postRun.length;)addOnPostRun(WEBINA_Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}}functionaddOnPreRun(a){__ATPRERUN__.unshift(a)}functionaddOnPostRun(a){__ATPOSTRUN__.unshift(a)}WEBINA_assert(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
WEBINA_assert(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");WEBINA_assert(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");WEBINA_assert(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
functionaddRunDependency(a){WEBINA_assert(!ENVIRONMENT_IS_PTHREAD,"addRunDependency cannot be used in a pthread worker");runDependencies++;WEBINA_Module.monitorRunDependencies&&WEBINA_Module.monitorRunDependencies(runDependencies);a?(WEBINA_assert(!runDependencyTracking[a]),runDependencyTracking[a]=1,null===runDependencyWatcher&&"undefined"!==typeofsetInterval&&(runDependencyWatcher=setInterval(function(){if(ABORT)clearInterval(runDependencyWatcher),runDependencyWatcher=null;else{vara=!1,c;for(cinrunDependencyTracking)a||
(a=!0,err("still waiting on run dependencies:")),err("dependency: "+c);a&&err("(end of list)")}},1E4))):err("warning: run dependency added without ID")}
functionremoveRunDependency(a){runDependencies--;WEBINA_Module.monitorRunDependencies&&WEBINA_Module.monitorRunDependencies(runDependencies);a?(WEBINA_assert(runDependencyTracking[a]),deleterunDependencyTracking[a]):err("warning: run dependency removed without ID");0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled&&(a=dependenciesFulfilled,dependenciesFulfilled=null,a()))}WEBINA_Module.preloadedImages={};
WEBINA_Module.preloadedAudios={};functionabort(a){if(WEBINA_Module.onAbort)WEBINA_Module.onAbort(a);ENVIRONMENT_IS_PTHREAD&&console.error("Pthread aborting at "+Error().stack);a+="";out(a);err(a);ABORT=!0;EXITSTATUS=1;throw"abort("+a+") at "+stackTrace();}varmemoryInitializer=null;ENVIRONMENT_IS_PTHREAD||addOnPreRun(function(){"undefined"!==typeofSharedArrayBuffer&&(addRunDependency("pthreads"),PThread.allocateUnusedWorkers(20,function(){removeRunDependency("pthreads")}))});vardataURIPrefix="data:application/octet-stream;base64,";
functionisDataURI(a){returnString.prototype.startsWith?a.startsWith(dataURIPrefix):0===a.indexOf(dataURIPrefix)}varwasmBinaryFile="vina.wasm";isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));functiongetBinary(){try{if(wasmBinary)returnnewUint8Array(wasmBinary);if(readBinary)returnreadBinary(wasmBinaryFile);throw"both async and sync fetching of the wasm failed";}catch(a){abort(a)}}
functiongetBinaryPromise(){returnwasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!==typeoffetch?newPromise(function(a,b){a(getBinary())}):fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";returna.arrayBuffer()}).catch(function(){returngetBinary()})}
functioncreateWasm(){functiona(a,b){WEBINA_Module.asm=a.exports;wasmModule=b;ENVIRONMENT_IS_PTHREAD||removeRunDependency("wasm-instantiate")}functionb(b){WEBINA_assert(WEBINA_Module===e,"the WEBINA_Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");e=null;a(b.instance,b.module)}functionc(a){returngetBinaryPromise().then(function(a){returnWebAssembly.instantiate(a,d)}).then(a,function(a){err("failed to asynchronously prepare wasm: "+
a);abort(a)})}vard={env:asmLibraryArg,wasi_unstable:asmLibraryArg,global:{NaN:NaN,Infinity:Infinity},"global.Math":Math,asm2wasm:asm2wasmImports};ENVIRONMENT_IS_PTHREAD||addRunDependency("wasm-instantiate");vare=WEBINA_Module;if(WEBINA_Module.instantiateWasm)try{returnWEBINA_Module.instantiateWasm(d,a)}catch(f){returnerr("WEBINA_Module.instantiateWasm callback failed with error: "+f),!1}(function(){if(wasmBinary||"function"!==typeofWebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||
"function"!==typeoffetch)returnc(b);fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(a){returnWebAssembly.instantiateStreaming(a,d).then(b,function(a){err("wasm streaming compile failed: "+a);err("falling back to ArrayBuffer instantiation");c(b)})})})();return{}}WEBINA_Module.asm=createWasm;
function_emscripten_asm_const_ii(a,b){returnASM_CONSTS[a](b)}function_initPthreadsJS(){PThread.initRuntime()}ENVIRONMENT_IS_PTHREAD||__ATINIT__.push({func:function(){globalCtors()}});ENVIRONMENT_IS_PTHREAD||(memoryInitializer=Webina.WEBINA_BASE_URL+"vina.html.mem");vartempDoublePtr;ENVIRONMENT_IS_PTHREAD||(tempDoublePtr=85120);WEBINA_assert(0==tempDoublePtr%8);functiondemangle(a){warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");returna}
function_emscripten_futex_wake(a,b){if(0>=a||a>HEAP8.length||a&1||0>b)return-28;if(0==b)return0;2147483647<=b&&(b=Infinity);varc=Atomics.load(HEAP32,__main_thread_futex_wait_address>>2),d=0;if(c==a&&Atomics.compareExchange(HEAP32,__main_thread_futex_wait_address>>2,c,0)==c&&(--b,d=1,0>=b))return1;a=Atomics.notify(HEAP32,a>>2,b);if(0<=a)returna+d;throw"Atomics.notify returned an unexpected value "+a;}
c.terminate()}PThread.preallocatedWorkers=[];for(a=0;a<PThread.unusedWorkers.length;++a)c=PThread.unusedWorkers[a],WEBINA_assert(!c.pthread),c.terminate();PThread.unusedWorkers=[];for(a=0;a<PThread.runningWorkers.length;++a)c=PThread.runningWorkers[a],b=c.pthread,WEBINA_assert(b,"This Worker should have a pthread it is executing"),PThread.freeThreadData(b),c.terminate();PThread.runningWorkers=[]},freeThreadData:function(a){if(a){if(a.threadInfoStruct){varb=HEAP32[a.threadInfoStruct+116>>2];HEAP32[a.threadInfoStruct+
PThread.unusedWorkers.push(d)}},attachListenerToWorkers:function(a,b){for(varc=0,d=a.length,e=0;e<d;++e)(function(a){a.onmessage=function(e){varf=e.data;a.pthread&&(PThread.currentProxiedOperationCallerThread=a.pthread.threadInfoStruct);if(f.targetThread&&f.targetThread!=_pthread_self()){varg=PThread.pthreads[f.targetThread];g?g.worker.postMessage(e.data,f.transferList):console.error('Internal error! Worker sent a message "'+f.cmd+'" to target pthread '+f.targetThread+", but that thread no longer exists!")}elseif("processQueuedMainThreadWork"===
elseif("alert"===f.cmd)alert("Thread "+f.threadId+": "+f.text);elseif("exit"===f.cmd)a.pthread&&Atomics.load(HEAPU32,a.pthread.thread+80>>2)&&PThread.returnWorkerToPool(a);elseif("exitProcess"===f.cmd){noExitRuntime=!1;try{exit(f.returnCode)}catch(h){if(hinstanceofExitStatus)return;throwh;}}else"cancelDone"===f.cmd?PThread.returnWorkerToPool(a):"objectTransfer"===f.cmd?PThread.receiveObjectTransfer(e.data):"setimmediate"===e.data.target?a.postMessage(e.data):err("worker sent an unknown command "+
f.cmd);PThread.currentProxiedOperationCallerThread=void0};a.onerror=function(a){err("pthread sent an error! "+a.filename+":"+a.lineno+": "+a.message)}})(a[e])},createNewWorkers:function(a){if("undefined"===typeofSharedArrayBuffer)return[];varb=locateFile("vina.worker.min.js");for(varc=[],d=0;d<a;++d)c.push(newWorker(b));returnc},getNewWorker:function(){0==PThread.unusedWorkers.length&&PThread.allocateUnusedWorkers(1);return0<PThread.unusedWorkers.length?PThread.unusedWorkers.pop():null},busySpinWait:function(a){for(a=
performance.now()+a;performance.now()<a;);}};function___call_main(a,b){a=_main(a,b);noExitRuntime||postMessage({cmd:"exitProcess",returnCode:a});returna}function_emscripten_get_now(){abort()}function___setErrNo(a){WEBINA_Module.___errno_location?HEAP32[WEBINA_Module.___errno_location()>>2]=a:err("failed to set errno from JS");returna}function___cxa_allocate_exception(a){return_malloc(a)}var___exception_infos={},___exception_last=0;
function___cxa_throw(a,b,c){___exception_infos[a]={ptr:a,adjusted:[a],type:b,destructor:c,refcount:0,caught:!1,rethrown:!1};___exception_last=a;"uncaught_exception"in__ZSt18uncaught_exceptionv?__ZSt18uncaught_exceptionv.uncaught_exceptions++:__ZSt18uncaught_exceptionv.uncaught_exceptions=1;throwa+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";}function___lock(){}
0<=c?arguments[c]:FS.cwd();if("string"!==typeofb)thrownewTypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=PATH.normalizeArray(a.split("/").filter(function(a){return!!a}),!b).join("/");return(b?"/":"")+a||"."},relative:function(a,b){functionc(a){for(varb=0;b<a.length&&""===a[b];b++);for(varc=a.length-1;0<=c&&""===a[c];c--);returnb>c?[]:a.slice(b,c-b+1)}a=PATH_FS.resolve(a).substr(1);b=PATH_FS.resolve(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));
Math.min(a.node.usedBytes-e,d);WEBINA_assert(0<=a);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);elsefor(d=0;d<a;d++)b[c+d]=f[e+d];returna},write:function(a,b,c,d,e,f){if(!d)return0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.contents||a.contents.subarray)){if(f)returnWEBINA_assert(0===e,"canOwn must imply no weird position inside the file"),a.contents=b.subarray(c,c+d),a.usedBytes=d;if(0===a.usedBytes&&0===e)returna.contents=newUint8Array(b.subarray(c,c+d)),a.usedBytes=d;if(e+d<=a.usedBytes)returna.contents.set(b.subarray(c,
b,0,d,c,!1);return0}}},IDBFS={dbs:{},indexedDB:function(){if("undefined"!==typeofindexedDB)returnindexedDB;vara=null;"object"===typeofwindow&&(a=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB);WEBINA_assert(a,"IDBFS used, but indexedDB not supported");returna},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(a){returnMEMFS.mount.apply(null,arguments)},syncfs:function(a,b,c){IDBFS.getLocalSet(a,function(d,e){if(d)returnc(d);IDBFS.getRemoteSet(a,function(a,
d){if(a)returnc(a);IDBFS.reconcile(b?d:e,b?e:d,c)})})},getDB:function(a,b){varc=IDBFS.dbs[a];if(c)returnb(null,c);try{vard=IDBFS.indexedDB().open(a,IDBFS.DB_VERSION)}catch(e){returnb(e)}if(!d)returnb("Unable to connect to IndexedDB");d.onupgradeneeded=function(a){varb=a.target.result;a=a.target.transaction;b=b.objectStoreNames.contains(IDBFS.DB_STORE_NAME)?a.objectStore(IDBFS.DB_STORE_NAME):b.createObjectStore(IDBFS.DB_STORE_NAME);b.indexNames.contains("timestamp")||b.createIndex("timestamp",
FS.lookupPath(a).node;vard=FS.stat(a)}catch(e){returnb(e)}returnFS.isDir(d.mode)?b(null,{timestamp:d.mtime,mode:d.mode}):FS.isFile(d.mode)?(c.contents=MEMFS.getFileDataAsTypedArray(c),b(null,{timestamp:d.mtime,mode:d.mode,contents:c.contents})):b(Error("node type not supported"))},storeLocalEntry:function(a,b,c){try{if(FS.isDir(b.mode))FS.mkdir(a,b.mode);elseif(FS.isFile(b.mode))FS.writeFile(a,b.contents,{canOwn:!0});elsereturnc(Error("node type not supported"));FS.chmod(a,b.mode);FS.utime(a,
0>b&&WEBINA_Module.catchError(newFS.ErrnoError(28));returnb}}},ERRNO_MESSAGES={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",
17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",
38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",
56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",
101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",
120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",
137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(a){if(!(ainstanceof
(a&61440)},isChrdev:function(a){return8192===(a&61440)},isBlkdev:function(a){return24576===(a&61440)},isFIFO:function(a){return4096===(a&61440)},isSocket:function(a){return49152===(a&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(a){varb=FS.flagModes[a];if("undefined"===typeofb)throwError("Unknown file open mode: "+a);returnb},flagsToPermissionString:function(a){varb=
c.mounts)}returnb},syncfs:function(a,b){functionc(a){WEBINA_assert(0<FS.syncFSRequests);FS.syncFSRequests--;returnb(a)}functiond(a){if(a){if(!d.errored)returnd.errored=!0,c(a)}else++f>=e.length&&c(null)}"function"===typeofa&&(b=a,a=!1);FS.syncFSRequests++;1<FS.syncFSRequests&&console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");vare=FS.getMounts(FS.root.mount),f=0;e.forEach(function(b){if(!b.type.syncfs)returnd(null);b.type.syncfs(b,
try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(a,b)}catch(m){console.log("FS.trackingDelegate['willMovePath']('"+a+"', '"+b+"') threw an exception: "+m.message)}FS.hashRemoveNode(g);try{k.node_ops.rename(g,l,f)}catch(m){throwm;}finally{FS.hashAddNode(g)}try{if(FS.trackingDelegate.onMovePath)FS.trackingDelegate.onMovePath(a,b)}catch(m){console.log("FS.trackingDelegate['onMovePath']('"+a+"', '"+b+"') threw an exception: "+m.message)}}},rmdir:function(a){varb=FS.lookupPath(a,
{parent:!0}).node,c=PATH.basename(a),d=FS.lookupNode(b,c),e=FS.mayDelete(b,c,!0);e&&WEBINA_Module.catchError(newFS.ErrnoError(e));b.node_ops.rmdir||WEBINA_Module.catchError(newFS.ErrnoError(63));FS.isMountpoint(d)&&WEBINA_Module.catchError(newFS.ErrnoError(10));try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(a)}catch(f){console.log("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+f.message)}b.node_ops.rmdir(b,c);FS.destroyNode(d);try{if(FS.trackingDelegate.onDeletePath)FS.trackingDelegate.onDeletePath(a)}catch(f){console.log("FS.trackingDelegate['onDeletePath']('"+
a+"') threw an exception: "+f.message)}},readdir:function(a){a=FS.lookupPath(a,{follow:!0}).node;a.node_ops.readdir||WEBINA_Module.catchError(newFS.ErrnoError(54));returna.node_ops.readdir(a)},unlink:function(a){varb=FS.lookupPath(a,{parent:!0}).node,c=PATH.basename(a),d=FS.lookupNode(b,c),e=FS.mayDelete(b,c,!1);e&&WEBINA_Module.catchError(newFS.ErrnoError(e));b.node_ops.unlink||WEBINA_Module.catchError(newFS.ErrnoError(63));FS.isMountpoint(d)&&WEBINA_Module.catchError(newFS.ErrnoError(10));
try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(a)}catch(f){console.log("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+f.message)}b.node_ops.unlink(b,c);FS.destroyNode(d);try{if(FS.trackingDelegate.onDeletePath)FS.trackingDelegate.onDeletePath(a)}catch(f){console.log("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+f.message)}},readlink:function(a){(a=FS.lookupPath(a).node)||WEBINA_Module.catchError(newFS.ErrnoError(44));a.node_ops.readlink||