Commit 141a4ebc authored by Jacob Durrant's avatar Jacob Durrant
Browse files

Mock vina params now mostly alphabetized.

parent e1a006ca
/**
* Webina Copyright 2019 Jacob Durrant
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is part of Webina, released under the Apache 2.0 License. See
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2019 Jacob D. Durrant.
// There are a few variables and functions from vina.js that I want to easily
// access from here.
var VERSION = "1.0.0"; // Replaced by compile script.
console.log("Webina JavaScript Library " + VERSION);
var WEBINA_Module;
// A shiv for decodeBase64.
var decodeBase64 = "function" == typeof atob ? atob : function (r) {
var e, t, a, i, n, o, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", m = "", s = 0;
for (r = r.replace(/[^A-Za-z0-9\+\/\=]/g, ""); e = f.indexOf(r.charAt(s++)) << 2 | (i = f.indexOf(r.charAt(s++))) >> 4, t = (15 & i) << 4 | (n = f.indexOf(r.charAt(s++))) >> 2, a = (3 & n) << 6 | (o = f.indexOf(r.charAt(s++))), m += String.fromCharCode(e), 64 !== n && (m += String.fromCharCode(t)), 64 !== o && (m += String.fromCharCode(a)), s < r.length;)
return m;
};
// Make Webina global namespace.
var Webina = (function () {
return {
WEBINA_ENVIRONMENT_IS_NODE: window["WEBINA_ENVIRONMENT_IS_NODE"],
WEBINA_lengthBytesUTF8: window["WEBINA_lengthBytesUTF8"],
WEBINA_stringToUTF8Array: window["WEBINA_stringToUTF8Array"],
WEBINA_assert: window["WEBINA_assert"],
WEBINA_ASSERTIONS: 1,
WEBINA_DATA_URI_PREFIX: "data:application/octet-stream;base64,",
WEBINA_BASE_URL: "./",
FS: window["FS"],
start: function start(vinaParams, receptorPDBQTTxt, ligandPDBQTTxt, onDone, onError, baseUrl) {
var _this = this;
// baseUrl = undefined; // For debugging.
var baseUrlMsg = "\nWEBINA\n======\n\n";
if (baseUrl !== undefined) {
if (baseUrl.slice(baseUrl.length - 1) !== "/") {
baseUrl += "/";
}
this.WEBINA_BASE_URL = baseUrl;
baseUrlMsg += "User specified baseUrl: " + baseUrl + "\n";
}
else {
baseUrlMsg += "No baseUrl specified, so using ./\n\n";
baseUrlMsg += "Use Webina.start() to specify the baseUrl:\n";
baseUrlMsg += " function start(vinaParams, receptorPDBQTTxt, \n";
baseUrlMsg += " ligandPDBQTTxt, onDone, \n";
baseUrlMsg += " onError, baseUrl)\n";
}
baseUrlMsg += "\nExpecting files at the following locations:\n";
for (var i = 0; i < 5; i++) {
var fileName = ["Webina.min.js", "vina.html.mem",
"vina.min.js", "vina.worker.min.js",
"vina.wasm"][i];
baseUrlMsg += " " + (baseUrl === undefined ? "./" : baseUrl) + fileName + "\n";
}
baseUrlMsg += "\n";
if (baseUrl !== undefined) {
console.log(baseUrlMsg);
}
else {
console.warn(baseUrlMsg);
}
if (onError === undefined) {
onError = function () {
console.log("Webina encountered an error! Does your browser support WebAssembly?");
};
}
// Create a module object for WASM.
WEBINA_Module = {
"preRun": [],
"postRun": [],
"stdOut": "",
"stdErr": "",
"print": function () {
return function (e) {
1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")),
window["WEBINA_Module"]["stdOut"] += e + "\n";
};
}(),
"printErr": function (e) {
// 1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")), console.error(e)
1 < arguments.length && (e = Array.prototype.slice.call(arguments).join(" ")),
window["WEBINA_Module"]["stdErr"] += e + "\n";
},
"setStatus": function (e) {
if (e === "") {
// This happens when it is done running.
if (onDone !== undefined) {
var outTxt = new TextDecoder("utf-8").decode(window["FS"]["readFile"]('ligand_out.pdbqt'));
var stdOut = window["WEBINA_Module"]["stdOut"];
var stdErr = window["WEBINA_Module"]["stdErr"];
onDone(outTxt, stdOut, stdErr);
}
}
},
"onError": onError,
"catchError": function (n) {
onError(n);
// throw n; // Don't throw the errr. You're catching it now.
},
"receptorPDBQTTxt": receptorPDBQTTxt,
"ligandPDBQTTxt": ligandPDBQTTxt
};
if (vinaParams["receptor"] !== undefined) {
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.");
}
if (vinaParams["receptor"] !== undefined) {
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.");
}
// Receptor and ligand files are always the same.
WEBINA_Module['arguments'] = [
'--receptor', '/receptor.pdbqt',
'--ligand', '/ligand.pdbqt',
];
// For some reason, WebAssembly always uses one more processor
// than specified. Compensate for that here. But sometimes it
// doesn't, so commenting out... Confusing.
// if ((vinaParams["cpu"] !== undefined) && (vinaParams["cpu"] > 1)) {
// vinaParams["cpu"] = vinaParams["cpu"] - 1;
// }
// Add in the remaining values. Note that there is no validation here.
var paramNames = Object.keys(vinaParams);
var paramNamesLen = paramNames.length;
for (var i = 0; i < paramNamesLen; i++) {
var key = paramNames[i];
var val = vinaParams[key];
WEBINA_Module['arguments'].push('--' + key);
if (typeof (val) !== "boolean") {
WEBINA_Module['arguments'].push(String(val));
}
}
window["WEBINA_Module"] = WEBINA_Module;
// Initialize the memory
var memoryInitializer = this.WEBINA_BASE_URL + "vina.html.mem";
memoryInitializer = WEBINA_Module["locateFile"] ? WEBINA_Module["locateFile"](memoryInitializer, "") : memoryInitializer, WEBINA_Module["memoryInitializerRequestURL"] = memoryInitializer;
var meminitXHR = WEBINA_Module["memoryInitializerRequest"] = new XMLHttpRequest;
meminitXHR.onloadend = function () {
if (meminitXHR.status === 404) {
var msg = "Unable to access " + memoryInitializer + ". See JavaScript console for warnings. The \"baseUrl\" variable passed to Webina is likely incorrect.";
WEBINA_Module["catchError"]({ "message": msg });
console.warn(msg);
}
else {
var script = document.createElement("script");
script.src = _this.WEBINA_BASE_URL + "vina.js";
document.body.appendChild(script);
}
};
meminitXHR.open("GET", memoryInitializer, !0);
meminitXHR.responseType = "arraybuffer";
meminitXHR.send(null);
},
isDataURI: function (r) {
return String.prototype.startsWith ? r.startsWith(this.WEBINA_DATA_URI_PREFIX) : 0 === r.indexOf(this.WEBINA_DATA_URI_PREFIX);
},
intArrayFromBase64: function (e) {
if ("boolean" == typeof this.WEBINA_ENVIRONMENT_IS_NODE && this.WEBINA_ENVIRONMENT_IS_NODE) {
var t;
try {
t = Buffer.from(e, "base64");
}
catch (r) {
t = new Buffer(e, "base64");
}
return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
}
try {
for (var r = decodeBase64(e), a = new Uint8Array(r.length), i = 0; i < r.length; ++i)
a[i] = r.charCodeAt(i);
return a;
}
catch (r) {
throw new Error("Converting base64 string to bytes failed.");
}
},
// Not used?
tryParseAsDataURI: function (r) {
if (this.isDataURI(r))
return this.intArrayFromBase64(r.slice(this.WEBINA_DATA_URI_PREFIX.length));
},
// Not used?
intArrayFromString: function (r, e, t) {
var a = 0 < t ? t : this.WEBINA_lengthBytesUTF8(r) + 1, i = new Array(a), n = this.WEBINA_stringToUTF8Array(r, i, 0, i.length);
return e && (i.length = n), i;
},
// Not used?
intArrayToString: function (r) {
for (var e = [], t = 0; t < r.length; t++) {
var a = r[t];
255 < a && (this.WEBINA_ASSERTIONS && this.WEBINA_assert(!1, "Character code " + a + " (" + String.fromCharCode(a) + ") at offset " + t + " not in 0x00-0xFF."), a &= 255), e.push(String.fromCharCode(a));
}
return e.join("");
}
};
})();
/**
* Webina Copyright 2019 Jacob Durrant
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$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(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(b){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(b||"")+"_"+c++,b)}var c=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
$jscomp.iteratorFromArray=function(a,c){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var b=0,d={next:function(){if(b<a.length){var e=b++;return{value:c(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
$jscomp.polyfill=function(a,c,b,d){if(c){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");var VERSION="1.0.0";console.log("Webina JavaScript Library "+VERSION);
var WEBINA_Module,decodeBase64="function"==typeof atob?atob:function(a){var c,b,d,e,f,m,g="",h=0;for(a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++))<<2|(e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)))>>4,b=(15&e)<<4|(f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)))>>2,d=(3&f)<<6|(m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++))),
g+=String.fromCharCode(c),64!==f&&(g+=String.fromCharCode(b)),64!==m&&(g+=String.fromCharCode(d)),h<a.length;)return g},Webina=function(){return{WEBINA_ENVIRONMENT_IS_NODE:window.WEBINA_ENVIRONMENT_IS_NODE,WEBINA_lengthBytesUTF8:window.WEBINA_lengthBytesUTF8,WEBINA_stringToUTF8Array:window.WEBINA_stringToUTF8Array,WEBINA_assert:window.WEBINA_assert,WEBINA_ASSERTIONS:1,WEBINA_DATA_URI_PREFIX:"data:application/octet-stream;base64,",WEBINA_BASE_URL:"./",FS:window.FS,start:function(a,c,b,d,e,f){var m=
this,g="\nWEBINA\n======\n\n";void 0!==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(var h=0;5>h;h++)g+=" "+(void 0===f?"./":f)+["Webina.min.min.js","vina.html.mem","vina.min.min.js",
"vina.worker.min.min.js","vina.wasm"][h]+"\n";g+="\n";void 0!==f?console.log(g):console.warn(g);void 0===e&&(e=function(){console.log("Webina encountered an error! Does your browser support WebAssembly?")});WEBINA_Module={preRun:[],postRun:[],stdOut:"",stdErr:"",print:function(){return function(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&&void 0!==d&&(a=(new TextDecoder("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};void 0!==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.");void 0!==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.");
WEBINA_Module.arguments=["--receptor","/receptor.pdbqt","--ligand","/ligand.pdbqt"];c=Object.keys(a);b=c.length;for(h=0;h<b;h++)f=c[h],g=a[f],WEBINA_Module.arguments.push("--"+f),"boolean"!==typeof g&&WEBINA_Module.arguments.push(String(g));window.WEBINA_Module=WEBINA_Module;var k=this.WEBINA_BASE_URL+"vina.html.mem";k=WEBINA_Module.locateFile?WEBINA_Module.locateFile(k,""):k;WEBINA_Module.memoryInitializerRequestURL=k;var l=WEBINA_Module.memoryInitializerRequest=new XMLHttpRequest;l.onloadend=function(){if(404===
l.status){var a="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)}else a=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){return String.prototype.startsWith?a.startsWith(this.WEBINA_DATA_URI_PREFIX):0===a.indexOf(this.WEBINA_DATA_URI_PREFIX)},
intArrayFromBase64:function(a){if("boolean"==typeof this.WEBINA_ENVIRONMENT_IS_NODE&&this.WEBINA_ENVIRONMENT_IS_NODE){try{var c=Buffer.from(a,"base64")}catch(e){c=new Buffer(a,"base64")}return new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}try{var b=decodeBase64(a),d=new Uint8Array(b.length);for(a=0;a<b.length;++a)d[a]=b.charCodeAt(a);return d}catch(e){throw Error("Converting base64 string to bytes failed.");}},tryParseAsDataURI:function(a){if(this.isDataURI(a))return this.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);return c&&(b.length=a),b},intArrayToString:function(a){for(var c=[],b=0;b<a.length;b++){var d=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))}return c.join("")}}}();
This source diff could not be displayed because it is too large. You can view the blob instead.
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Math.imul",function(a){return a?a:function(a,c){a=Number(a);c=Number(c);var b=a&65535,e=c&65535;return b*e+((a>>>16&65535)*e+b*(c>>>16&65535)<<16>>>0)|0}},"es6","es3");
$jscomp.polyfill("Math.fround",function(a){if(a)return a;if($jscomp.SIMPLE_FROUND_POLYFILL||"function"!==typeof Float32Array)return function(a){return a};var b=new Float32Array(1);return function(a){b[0]=a;return b[0]}},"es6","es3");
$jscomp.polyfill("Math.clz32",function(a){return a?a:function(a){a=Number(a)>>>0;if(0===a)return 32;var b=0;0===(a&4294901760)&&(a<<=16,b+=16);0===(a&4278190080)&&(a<<=8,b+=8);0===(a&4026531840)&&(a<<=4,b+=4);0===(a&3221225472)&&(a<<=2,b+=2);0===(a&2147483648)&&b++;return b}},"es6","es3");$jscomp.polyfill("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||0===a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}},"es6","es3");
$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(a){function b(){this.batch_=null}function c(a){return a instanceof e?a:new e(function(b,c){b(a)})}if(a&&!$jscomp.FORCE_POLYFILL_PROMISE)return a;b.prototype.asyncExecute=function(a){if(null==this.batch_){this.batch_=[];var b=this;this.asyncExecuteFunction(function(){b.executeBatch_()})}this.batch_.push(a)};var d=$jscomp.global.setTimeout;b.prototype.asyncExecuteFunction=function(a){d(a,0)};b.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var a=
this.batch_;this.batch_=[];for(var b=0;b<a.length;++b){var c=a[b];a[b]=null;try{c()}catch(h){this.asyncThrow_(h)}}}this.batch_=null};b.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a;})};var e=function(a){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var b=this.createResolveAndReject_();try{a(b.resolve,b.reject)}catch(l){b.reject(l)}};e.prototype.createResolveAndReject_=function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c=!1;
return{resolve:a(this.resolveTo_),reject:a(this.reject_)}};e.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof e)this.settleSameAsPromise_(a);else{a:switch(typeof a){case "object":var b=null!=a;break a;case "function":b=!0;break a;default:b=!1}b?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};e.prototype.resolveToNonPromiseObj_=function(a){var b=void 0;try{b=a.then}catch(l){this.reject_(l);return}"function"==typeof b?
this.settleSameAsThenable_(b,a):this.fulfill_(a)};e.prototype.reject_=function(a){this.settle_(2,a)};e.prototype.fulfill_=function(a){this.settle_(1,a)};e.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};e.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=0;a<this.onSettledCallbacks_.length;++a)f.asyncExecute(this.onSettledCallbacks_[a]);
this.onSettledCallbacks_=null}};var f=new b;e.prototype.settleSameAsPromise_=function(a){var b=this.createResolveAndReject_();a.callWhenSettled_(b.resolve,b.reject)};e.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(h){c.reject(h)}};e.prototype.then=function(a,b){function c(a,b){return"function"==typeof a?function(b){try{d(a(b))}catch(r){f(r)}}:b}var d,f,g=new e(function(a,b){d=a;f=b});this.callWhenSettled_(c(a,d),c(b,f));return g};
e.prototype.catch=function(a){return this.then(void 0,a)};e.prototype.callWhenSettled_=function(a,b){function c(){switch(d.state_){case 1:a(d.result_);break;case 2:b(d.result_);break;default:throw Error("Unexpected state: "+d.state_);}}var d=this;null==this.onSettledCallbacks_?f.asyncExecute(c):this.onSettledCallbacks_.push(c)};e.resolve=c;e.reject=function(a){return new e(function(b,c){c(a)})};e.race=function(a){return new e(function(b,d){for(var e=$jscomp.makeIterator(a),f=e.next();!f.done;f=e.next())c(f.value).callWhenSettled_(b,
d)})};e.all=function(a){var b=$jscomp.makeIterator(a),d=b.next();return d.done?c([]):new e(function(a,e){function f(b){return function(c){g[b]=c;p--;0==p&&a(g)}}var g=[],p=0;do g.push(void 0),p++,c(d.value).callWhenSettled_(f(g.length-1),e),d=b.next();while(!d.done)})};return e},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$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(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(c||"")+"_"+b++,c)}var b=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
$jscomp.polyfill("Array.prototype.entries",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a,c){return[a,c]})}},"es6","es3");var WEBINA_Module="undefined"!==typeof WEBINA_Module?WEBINA_Module:{};WEBINA_Module.expectedDataFileDownloads||(WEBINA_Module.expectedDataFileDownloads=0,WEBINA_Module.finishedDataFileDownloads=0);WEBINA_Module.expectedDataFileDownloads++;
(function(){(function(a){function b(){function a(a,b){data=(new TextEncoder).encode(a);WEBINA_Module.FS_createDataFile("/",b,data,!0,!0,!1)}a(WEBINA_Module.ligandPDBQTTxt,"ligand.pdbqt");a(WEBINA_Module.receptorPDBQTTxt,"receptor.pdbqt")}WEBINA_Module.calledRun?b():(WEBINA_Module.preRun||(WEBINA_Module.preRun=[]),WEBINA_Module.preRun.push(b))})({files:[]})})();var moduleOverrides={},key;for(key in WEBINA_Module)WEBINA_Module.hasOwnProperty(key)&&(moduleOverrides[key]=WEBINA_Module[key]);
var arguments_=[],thisProgram="./this.program",quit_=function(a,b){throw b;},ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,WEBINA_ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_HAS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;ENVIRONMENT_IS_WEB="object"===typeof window;ENVIRONMENT_IS_WORKER="function"===typeof importScripts;WEBINA_ENVIRONMENT_IS_NODE=(ENVIRONMENT_HAS_NODE="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;
ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!WEBINA_ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(WEBINA_Module.ENVIRONMENT)throw Error("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)");var ENVIRONMENT_IS_PTHREAD=WEBINA_Module.ENVIRONMENT_IS_PTHREAD||!1;if(!ENVIRONMENT_IS_PTHREAD)var PthreadWorkerInit={};
var _scriptDir="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0,scriptDirectory="";function locateFile(a){return WEBINA_Module.locateFile?WEBINA_Module.locateFile(a,scriptDirectory):scriptDirectory+a}var read_,readAsync,readBinary,setWindowTitle;
if(WEBINA_ENVIRONMENT_IS_NODE){scriptDirectory=__dirname+"/";var nodeFS,nodePath;read_=function(a,b){nodeFS||(nodeFS=require("fs"));nodePath||(nodePath=require("path"));a=nodePath.normalize(a);a=nodeFS.readFileSync(a);return b?a:a.toString()};readBinary=function(a){a=read_(a,!0);a.buffer||(a=new Uint8Array(a));WEBINA_assert(a.buffer);return a};1<process.argv.length&&(thisProgram=process.argv[1].replace(/\\/g,"/"));arguments_=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=WEBINA_Module);
process.on("uncaughtException",function(a){if(!(a instanceof ExitStatus))throw a;});process.on("unhandledRejection",abort);quit_=function(a){process.exit(a)};WEBINA_Module.inspect=function(){return"[Emscripten WEBINA_Module object]"}}else if(ENVIRONMENT_IS_SHELL)"undefined"!=typeof read&&(read_=function(a){return read(a)}),readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");WEBINA_assert("object"===typeof a);return a},"undefined"!=typeof scriptArgs?
arguments_=scriptArgs:"undefined"!=typeof arguments&&(arguments_=arguments),"function"===typeof quit&&(quit_=function(a){quit(a)}),"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?
scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",read_=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),readAsync=function(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):
c()};d.onerror=c;d.send(null)},setWindowTitle=function(a){document.title=a};else throw Error("environment detection error");var out=WEBINA_Module.print||console.log.bind(console),err=WEBINA_Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(WEBINA_Module[key]=moduleOverrides[key]);moduleOverrides=null;WEBINA_Module.arguments&&(arguments_=WEBINA_Module.arguments);
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"===typeof WEBINA_Module.memoryInitializerPrefixURL,"WEBINA_Module.memoryInitializerPrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeof WEBINA_Module.pthreadMainPrefixURL,"WEBINA_Module.pthreadMainPrefixURL option was removed, use WEBINA_Module.locateFile instead");
WEBINA_assert("undefined"===typeof WEBINA_Module.cdInitializerPrefixURL,"WEBINA_Module.cdInitializerPrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeof WEBINA_Module.filePackagePrefixURL,"WEBINA_Module.filePackagePrefixURL option was removed, use WEBINA_Module.locateFile instead");WEBINA_assert("undefined"===typeof WEBINA_Module.read,"WEBINA_Module.read option was removed (modify read_ in JS)");
WEBINA_assert("undefined"===typeof WEBINA_Module.readAsync,"WEBINA_Module.readAsync option was removed (modify readAsync in JS)");WEBINA_assert("undefined"===typeof WEBINA_Module.readBinary,"WEBINA_Module.readBinary option was removed (modify readBinary in JS)");WEBINA_assert("undefined"===typeof WEBINA_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")};
function dynamicAlloc(a){WEBINA_assert(DYNAMICTOP_PTR);WEBINA_assert(!ENVIRONMENT_IS_PTHREAD);var b=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;return b}
function getNativeTypeSize(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:if("*"===a[a.length-1])return 4;if("i"===a[0]){var b=parseInt(a.substr(1));WEBINA_assert(0===b%8,"getNativeTypeSize invalid bits "+b+", type "+a);return b/8}return 0}}function warnOnce(a){warnOnce.shown||(warnOnce.shown={});warnOnce.shown[a]||(warnOnce.shown[a]=1,err(a))}
var asm2wasmImports={"f64-rem":function(a,b){return a%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")}});var noExitRuntime;
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"!==typeof WebAssembly&&abort("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");
function setValue(a,b,c,d){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":HEAP8[a>>0]=b;break;case "i8":HEAP8[a>>0]=b;break;case "i16":HEAP16[a>>1]=b;break;case "i32":HEAP32[a>>2]=b;break;case "i64":tempI64=[b>>>0,(tempDouble=b,1<=+Math_abs(tempDouble)?0<tempDouble?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];HEAP32[a>>2]=tempI64[0];HEAP32[a+4>>2]=tempI64[1];break;case "float":HEAPF32[a>>2]=b;
break;case "double":HEAPF64[a>>3]=b;break;default:abort("invalid type for setValue: "+c)}}var wasmMemory,wasmTable=new WebAssembly.Table({initial:1388,maximum:1388,element:"anyfunc"}),wasmModule,ABORT=!1,EXITSTATUS=0;function WEBINA_assert(a,b){a||abort("Assertion failed: "+b)}var ALLOC_NONE=3;
function allocate(a,b,c,d){if("number"===typeof a){var e=!0;var f=a}else e=!1,f=a.length;var g="string"===typeof b?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;return c}if("i8"===g)return a.subarray||a.slice?HEAPU8.set(a,c):HEAPU8.set(new Uint8Array(a),c),c;d=0;for(var k,l;d<f;){var h=a[d];e=g||b[d];0===e?d++:(WEBINA_assert(e,"Must know what type to store in allocate!"),
"i64"==e&&(e="i32"),setValue(c+d,h,e),l!==e&&(k=getNativeTypeSize(e),l=e),d+=k)}return c}function getMemory(a){return runtimeInitialized?_malloc(a):dynamicAlloc(a)}
function UTF8ArrayToString(a,b,c){c=b+c;for(var d="";!(b>=c);){var e=a[b++];if(!e)break;if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;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&
1023))}}else d+=String.fromCharCode(e)}return d}function UTF8ToString(a,b){return a?UTF8ArrayToString(HEAPU8,a,b):""}
function WEBINA_stringToUTF8Array(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=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;return c-e}function stringToUTF8(a,b,c){WEBINA_assert("number"==typeof c,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return WEBINA_stringToUTF8Array(a,HEAPU8,b,c)}
function WEBINA_lengthBytesUTF8(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function allocateUTF8(a){var b=WEBINA_lengthBytesUTF8(a)+1,c=_malloc(b);c&&WEBINA_stringToUTF8Array(a,HEAP8,c,b);return c}function allocateUTF8OnStack(a){var b=WEBINA_lengthBytesUTF8(a)+1,c=stackAlloc(b);WEBINA_stringToUTF8Array(a,HEAP8,c,b);return c}
function writeArrayToMemory(a,b){WEBINA_assert(0<=a.length,"writeArrayToMemory array must have a length (should be an array or typed array)");HEAP8.set(a,b)}function writeAsciiToMemory(a,b,c){for(var d=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)}var WASM_PAGE_SIZE=65536,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;
function updateGlobalBufferAndViews(a){buffer=a;WEBINA_Module.HEAP8=HEAP8=new Int8Array(a);WEBINA_Module.HEAP16=HEAP16=new Int16Array(a);WEBINA_Module.HEAP32=HEAP32=new Int32Array(a);WEBINA_Module.HEAPU8=HEAPU8=new Uint8Array(a);WEBINA_Module.HEAPU16=HEAPU16=new Uint16Array(a);WEBINA_Module.HEAPU32=HEAPU32=new Uint32Array(a);WEBINA_Module.HEAPF32=HEAPF32=new Float32Array(a);WEBINA_Module.HEAPF64=HEAPF64=new Float64Array(a)}
if(!ENVIRONMENT_IS_PTHREAD){var STACK_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")}var TOTAL_STACK=5242880;WEBINA_Module.TOTAL_STACK&&WEBINA_assert(TOTAL_STACK===WEBINA_Module.TOTAL_STACK,"the stack size can no longer be determined at runtime");var INITIAL_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"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support");
if(!ENVIRONMENT_IS_PTHREAD)if(WEBINA_Module.wasmMemory)wasmMemory=WEBINA_Module.wasmMemory;else try{wasmMemory=new WebAssembly.Memory({initial:INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE,maximum:INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE,shared:!0}),WEBINA_assert(wasmMemory.buffer instanceof SharedArrayBuffer,"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."})}
wasmMemory&&(buffer=wasmMemory.buffer);INITIAL_TOTAL_MEMORY=buffer.byteLength;WEBINA_assert(0===INITIAL_TOTAL_MEMORY%WASM_PAGE_SIZE);updateGlobalBufferAndViews(buffer);ENVIRONMENT_IS_PTHREAD||(HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE);function writeStackCookie(){WEBINA_assert(0==(STACK_MAX&3));HEAPU32[(STACK_MAX>>2)-1]=34821223;HEAPU32[(STACK_MAX>>2)-2]=2310721022;HEAP32[0]=1668509029}
function checkStackCookie(){var a=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)!")}
function abortStackOverflow(a){abort("Stack overflow! Attempted to allocate "+a+" bytes on the stack, but stack has only "+(STACK_MAX-stackSave()+a)+" bytes available!")}(function(){var a=new Int16Array(1),b=new Int8Array(a.buffer);a[0]=25459;if(115!==b[0]||99!==b[1])throw"Runtime error: expected the system to be little-endian!";})();
function abortFnPtrError(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.")}
function callRuntimeCallbacks(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?WEBINA_Module.dynCall_v(c):WEBINA_Module.dynCall_vi(c,b.arg):c(void 0===b.arg?null:b.arg)}}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;ENVIRONMENT_IS_PTHREAD&&(runtimeInitialized=!0);
function preRun(){if(!ENVIRONMENT_IS_PTHREAD){if(WEBINA_Module.preRun)for("function"==typeof WEBINA_Module.preRun&&(WEBINA_Module.preRun=[WEBINA_Module.preRun]);WEBINA_Module.preRun.length;)addOnPreRun(WEBINA_Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}}function initRuntime(){checkStackCookie();WEBINA_assert(!runtimeInitialized);runtimeInitialized=!0;WEBINA_Module.noFSInit||FS.init.initialized||FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}
function preMain(){checkStackCookie();ENVIRONMENT_IS_PTHREAD||(FS.ignorePermissions=!1,callRuntimeCallbacks(__ATMAIN__))}function exitRuntime(){checkStackCookie();ENVIRONMENT_IS_PTHREAD||(runtimeExited=!0)}
function postRun(){checkStackCookie();if(!ENVIRONMENT_IS_PTHREAD){if(WEBINA_Module.postRun)for("function"==typeof WEBINA_Module.postRun&&(WEBINA_Module.postRun=[WEBINA_Module.postRun]);WEBINA_Module.postRun.length;)addOnPostRun(WEBINA_Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}}function addOnPreRun(a){__ATPRERUN__.unshift(a)}function addOnPostRun(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");
var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null,runDependencyTracking={};function getUniqueRunDependency(a){for(var b=a;runDependencyTracking[a];)a=b+Math.random();return a}
function addRunDependency(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"!==typeof setInterval&&(runDependencyWatcher=setInterval(function(){if(ABORT)clearInterval(runDependencyWatcher),runDependencyWatcher=null;else{var a=!1,c;for(c in runDependencyTracking)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")}
function removeRunDependency(a){runDependencies--;WEBINA_Module.monitorRunDependencies&&WEBINA_Module.monitorRunDependencies(runDependencies);a?(WEBINA_assert(runDependencyTracking[a]),delete runDependencyTracking[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={};function abort(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();}var memoryInitializer=null;ENVIRONMENT_IS_PTHREAD||addOnPreRun(function(){"undefined"!==typeof SharedArrayBuffer&&(addRunDependency("pthreads"),PThread.allocateUnusedWorkers(20,function(){removeRunDependency("pthreads")}))});var dataURIPrefix="data:application/octet-stream;base64,";
function isDataURI(a){return String.prototype.startsWith?a.startsWith(dataURIPrefix):0===a.indexOf(dataURIPrefix)}var wasmBinaryFile="vina.wasm";isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));function getBinary(){try{if(wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(wasmBinaryFile);throw"both async and sync fetching of the wasm failed";}catch(a){abort(a)}}
function getBinaryPromise(){return wasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!==typeof fetch?new Promise(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+"'";return a.arrayBuffer()}).catch(function(){return getBinary()})}
function createWasm(){function a(a,b){WEBINA_Module.asm=a.exports;wasmModule=b;ENVIRONMENT_IS_PTHREAD||removeRunDependency("wasm-instantiate")}function b(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)}function c(a){return getBinaryPromise().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){err("failed to asynchronously prepare wasm: "+
a);abort(a)})}var d={env:asmLibraryArg,wasi_unstable:asmLibraryArg,global:{NaN:NaN,Infinity:Infinity},"global.Math":Math,asm2wasm:asm2wasmImports};ENVIRONMENT_IS_PTHREAD||addRunDependency("wasm-instantiate");var e=WEBINA_Module;if(WEBINA_Module.instantiateWasm)try{return WEBINA_Module.instantiateWasm(d,a)}catch(f){return err("WEBINA_Module.instantiateWasm callback failed with error: "+f),!1}(function(){if(wasmBinary||"function"!==typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||
"function"!==typeof fetch)return c(b);fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(a){return WebAssembly.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;
var tempDouble,tempI64,ASM_CONSTS=[function(){postMessage({cmd:"processQueuedMainThreadWork"})},function(a){if(ENVIRONMENT_IS_PTHREAD)postMessage({targetThread:a,cmd:"processThreadQueue"});else{if(!PThread.pthreads[a]||!PThread.pthreads[a].worker)return 0;PThread.pthreads[a].worker.postMessage({cmd:"processThreadQueue"})}return 1},function(){return!!WEBINA_Module.canvas},function(){noExitRuntime=!0},function(){throw"Canceled!";}];function _emscripten_asm_const_i(a){return ASM_CONSTS[a]()}
function _emscripten_asm_const_ii(a,b){return ASM_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");var tempDoublePtr;ENVIRONMENT_IS_PTHREAD||(tempDoublePtr=85120);WEBINA_assert(0==tempDoublePtr%8);function demangle(a){warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return a}
function demangleAll(a){return a.replace(/\b__Z[\w\d_]+/g,function(a){var b=demangle(a);return a===b?a:b+" ["+a+"]"})}function jsStackTrace(){var a=Error();if(!a.stack){try{throw Error(0);}catch(b){a=b}if(!a.stack)return"(no stack trace available)"}return a.stack.toString()}function stackTrace(){var a=jsStackTrace();WEBINA_Module.extraStackTrace&&(a+="\n"+WEBINA_Module.extraStackTrace());return demangleAll(a)}
function ___assert_fail(a,b,c,d){abort("Assertion failed: "+UTF8ToString(a)+", at: "+[b?UTF8ToString(b):"unknown filename",c,d?UTF8ToString(d):"unknown function"])}var ENV={};
function ___buildEnvironment(a){if(___buildEnvironment.called){var b=HEAP32[a>>2];var c=HEAP32[b>>2]}else ___buildEnvironment.called=!0,ENV.USER="web_user",ENV.LOGNAME="web_user",ENV.PATH="/",ENV.PWD="/",ENV.HOME="/home/web_user",ENV.LANG=("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",ENV._=thisProgram,c=getMemory(1024),b=getMemory(256),HEAP32[b>>2]=c,HEAP32[a>>2]=b;a=[];var d=0,e;for(e in ENV)if("string"===typeof ENV[e]){var f=e+"="+ENV[e];
a.push(f);d+=f.length}if(1024<d)throw Error("Environment size exceeded TOTAL_ENV_SIZE!");for(e=0;e<a.length;e++)f=a[e],writeAsciiToMemory(f,c),HEAP32[b+4*e>>2]=c,c+=f.length+1;HEAP32[b+4*a.length>>2]=0}
var PROCINFO={ppid:1,pid:42,sid:42,pgid:42},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},__main_thread_futex_wait_address;
ENVIRONMENT_IS_PTHREAD?__main_thread_futex_wait_address=PthreadWorkerInit.__main_thread_futex_wait_address:PthreadWorkerInit.__main_thread_futex_wait_address=__main_thread_futex_wait_address=85104;
function _emscripten_futex_wake(a,b){if(0>=a||a>HEAP8.length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=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))return 1;a=Atomics.notify(HEAP32,a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;}
var PThread={MAIN_THREAD_ID:1,mainThreadInfo:{schedPolicy:0,schedPrio:0},preallocatedWorkers:[],unusedWorkers:[],runningWorkers:[],initRuntime:function(){__register_pthread_ptr(PThread.mainThreadBlock,!ENVIRONMENT_IS_WORKER,1);_emscripten_register_main_browser_thread_id(PThread.mainThreadBlock)},initMainThreadBlock:function(){if(!ENVIRONMENT_IS_PTHREAD){PThread.preallocatedWorkers=PThread.createNewWorkers(20);PThread.mainThreadBlock=84320;for(var a=0;61>a;++a)HEAPU32[PThread.mainThreadBlock/4+a]=
0;HEAP32[PThread.mainThreadBlock+24>>2]=PThread.mainThreadBlock;a=PThread.mainThreadBlock+168;HEAP32[a>>2]=a;for(a=0;128>a;++a)HEAPU32[21144+a]=0;Atomics.store(HEAPU32,PThread.mainThreadBlock+116>>2,84576);Atomics.store(HEAPU32,PThread.mainThreadBlock+52>>2,PThread.mainThreadBlock);Atomics.store(HEAPU32,PThread.mainThreadBlock+56>>2,PROCINFO.pid)}},pthreads:{},exitHandlers:null,setThreadStatus:function(){},runExitHandlers:function(){if(null!==PThread.exitHandlers){for(;0<PThread.exitHandlers.length;)PThread.exitHandlers.pop()();
PThread.exitHandlers=null}ENVIRONMENT_IS_PTHREAD&&threadInfoStruct&&___pthread_tsd_run_dtors()},threadExit:function(a){var b=_pthread_self();b&&(Atomics.store(HEAPU32,b+4>>2,a),Atomics.store(HEAPU32,b+0>>2,1),Atomics.store(HEAPU32,b+72>>2,1),Atomics.store(HEAPU32,b+76>>2,0),PThread.runExitHandlers(),_emscripten_futex_wake(b+0,2147483647),__register_pthread_ptr(0,0,0),threadInfoStruct=0,ENVIRONMENT_IS_PTHREAD&&postMessage({cmd:"exit"}))},threadCancel:function(){PThread.runExitHandlers();Atomics.store(HEAPU32,
threadInfoStruct+4>>2,-1);Atomics.store(HEAPU32,threadInfoStruct+0>>2,1);_emscripten_futex_wake(threadInfoStruct+0,2147483647);threadInfoStruct=selfThreadId=0;__register_pthread_ptr(0,0,0);postMessage({cmd:"cancelDone"})},terminateAllThreads:function(){for(var a in PThread.pthreads){var b=PThread.pthreads[a];b&&(PThread.freeThreadData(b),b.worker&&b.worker.terminate())}PThread.pthreads={};for(a=0;a<PThread.preallocatedWorkers.length;++a){var c=PThread.preallocatedWorkers[a];WEBINA_assert(!c.pthread);
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){var b=HEAP32[a.threadInfoStruct+116>>2];HEAP32[a.threadInfoStruct+
116>>2]=0;_free(b);_free(a.threadInfoStruct)}a.threadInfoStruct=0;a.allocatedOwnStack&&a.stackBase&&_free(a.stackBase);a.stackBase=0;a.worker&&(a.worker.pthread=null)}},returnWorkerToPool:function(a){delete PThread.pthreads[a.pthread.thread];PThread.unusedWorkers.push(a);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(a),1);PThread.freeThreadData(a.pthread);a.pthread=void 0},receiveObjectTransfer:function(a){},allocateUnusedWorkers:function(a,b){if("undefined"!==typeof SharedArrayBuffer){var c=
[],d=a;if(0<PThread.preallocatedWorkers.length){var e=Math.min(PThread.preallocatedWorkers.length,a);c=c.concat(PThread.preallocatedWorkers.splice(0,e));d-=e}0<d&&(c=c.concat(PThread.createNewWorkers(d)));PThread.attachListenerToWorkers(c,b);for(b=0;b<a;++b)d=c[b],e=getMemory(8),d.postMessage({cmd:"load",urlOrBlob:WEBINA_Module.mainScriptUrlOrBlob||_scriptDir,wasmMemory:wasmMemory,wasmModule:wasmModule,tempDoublePtr:e,DYNAMIC_BASE:DYNAMIC_BASE,DYNAMICTOP_PTR:DYNAMICTOP_PTR,PthreadWorkerInit:PthreadWorkerInit}),
PThread.unusedWorkers.push(d)}},attachListenerToWorkers:function(a,b){for(var c=0,d=a.length,e=0;e<d;++e)(function(a){a.onmessage=function(e){var f=e.data;a.pthread&&(PThread.currentProxiedOperationCallerThread=a.pthread.threadInfoStruct);if(f.targetThread&&f.targetThread!=_pthread_self()){var g=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!")}else if("processQueuedMainThreadWork"===
f.cmd)_emscripten_main_thread_process_queued_calls();else if("spawnThread"===f.cmd)__spawn_thread(e.data);else if("cleanupThread"===f.cmd)__cleanup_thread(f.thread);else if("killThread"===f.cmd)__kill_thread(f.thread);else if("cancelThread"===f.cmd)__cancel_thread(f.thread);else if("loaded"===f.cmd)a.loaded=!0,a.runPthread&&(a.runPthread(),delete a.runPthread),++c,c===d&&b&&b();else if("print"===f.cmd)out("Thread "+f.threadId+": "+f.text);else if("printErr"===f.cmd)err("Thread "+f.threadId+": "+f.text);
else if("alert"===f.cmd)alert("Thread "+f.threadId+": "+f.text);else if("exit"===f.cmd)a.pthread&&Atomics.load(HEAPU32,a.pthread.thread+80>>2)&&PThread.returnWorkerToPool(a);else if("exitProcess"===f.cmd){noExitRuntime=!1;try{exit(f.returnCode)}catch(h){if(h instanceof ExitStatus)return;throw h;}}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=void 0};a.onerror=function(a){err("pthread sent an error! "+a.filename+":"+a.lineno+": "+a.message)}})(a[e])},createNewWorkers:function(a){if("undefined"===typeof SharedArrayBuffer)return[];var b=locateFile("vina.worker.min.js");for(var c=[],d=0;d<a;++d)c.push(new Worker(b));return c},getNewWorker:function(){0==PThread.unusedWorkers.length&&PThread.allocateUnusedWorkers(1);return 0<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});return a}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");return a}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;throw a+" - 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(){}
function ___map_file(a,b){___setErrNo(63);return-1}
var PATH={splitPath:function(a){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1)},normalizeArray:function(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},normalize:function(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=PATH.normalizeArray(a.split("/").filter(function(a){return!!a}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+
a},dirname:function(a){var b=PATH.splitPath(a);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},basename:function(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},extname:function(a){return PATH.splitPath(a)[3]},join:function(){var a=Array.prototype.slice.call(arguments,0);return PATH.normalize(a.join("/"))},join2:function(a,b){return PATH.normalize(a+"/"+b)}},PATH_FS={resolve:function(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=
0<=c?arguments[c]:FS.cwd();if("string"!==typeof b)throw new TypeError("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){function c(a){for(var b=0;b<a.length&&""===a[b];b++);for(var c=a.length-1;0<=c&&""===a[c];c--);return b>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("/"));
for(var d=Math.min(a.length,b.length),e=d,f=0;f<d;f++)if(a[f]!==b[f]){e=f;break}d=[];for(f=e;f<a.length;f++)d.push("..");d=d.concat(b.slice(e));return d.join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(a,b){TTY.ttys[a]={input:[],output:[],ops:b};FS.registerDevice(a,TTY.stream_ops)},stream_ops:{open:function(a){var b=TTY.ttys[a.node.rdev];b||WEBINA_Module.catchError(new FS.ErrnoError(43));a.tty=b;a.seekable=!1},close:function(a){a.tty.ops.flush(a.tty)},flush:function(a){a.tty.ops.flush(a.tty)},
read:function(a,b,c,d,e){a.tty&&a.tty.ops.get_char||WEBINA_Module.catchError(new FS.ErrnoError(60));for(var f=e=0;f<d;f++){try{var g=a.tty.ops.get_char(a.tty)}catch(k){WEBINA_Module.catchError(new FS.ErrnoError(29))}void 0===g&&0===e&&WEBINA_Module.catchError(new FS.ErrnoError(6));if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d,e){a.tty&&a.tty.ops.put_char||WEBINA_Module.catchError(new FS.ErrnoError(60));try{for(e=0;e<d;e++)a.tty.ops.put_char(a.tty,
b[c+e])}catch(f){WEBINA_Module.catchError(new FS.ErrnoError(29))}d&&(a.node.timestamp=Date.now());return e}},default_tty_ops:{get_char:function(a){if(!a.input.length){var b=null;if(WEBINA_ENVIRONMENT_IS_NODE){b=Buffer.alloc?Buffer.alloc(256):new Buffer(256);var c=0;try{c=fs.readSync(process.stdin.fd,b,0,256,null)}catch(d){if(-1!=d.toString().indexOf("EOF"))c=0;else throw d;}b=0<c?b.slice(0,c).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),
null!==b&&(b+="\n")):"function"==typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=intArrayFromString(b,!0)}return a.input.shift()},put_char:function(a,b){null===b||10===b?(out(UTF8ArrayToString(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(out(UTF8ArrayToString(a.output,0)),a.output=[])}},default_tty1_ops:{put_char:function(a,b){null===b||10===b?(err(UTF8ArrayToString(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},
flush:function(a){a.output&&0<a.output.length&&(err(UTF8ArrayToString(a.output,0)),a.output=[])}}},MEMFS={ops_table:null,mount:function(a){return MEMFS.createNode(null,"/",16895,0)},createNode:function(a,b,c,d){(FS.isBlkdev(c)||FS.isFIFO(c))&&WEBINA_Module.catchError(new FS.ErrnoError(63));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}});c=FS.createNode(a,b,c,d);FS.isDir(c.mode)?(c.node_ops=MEMFS.ops_table.dir.node,c.stream_ops=MEMFS.ops_table.dir.stream,c.contents={}):FS.isFile(c.mode)?(c.node_ops=MEMFS.ops_table.file.node,c.stream_ops=MEMFS.ops_table.file.stream,c.usedBytes=0,c.contents=null):FS.isLink(c.mode)?(c.node_ops=MEMFS.ops_table.link.node,c.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(c.mode)&&(c.node_ops=
MEMFS.ops_table.chrdev.node,c.stream_ops=MEMFS.ops_table.chrdev.stream);c.timestamp=Date.now();a&&(a.contents[b]=c);return c},getFileDataAsRegularArray:function(a){if(a.contents&&a.contents.subarray){for(var b=[],c=0;c<a.usedBytes;++c)b.push(a.contents[c]);return b}return a.contents},getFileDataAsTypedArray:function(a){return a.contents?a.contents.subarray?a.contents.subarray(0,a.usedBytes):new Uint8Array(a.contents):new Uint8Array},expandFileStorage:function(a,b){var c=a.contents?a.contents.length:
0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)|0),0!=c&&(b=Math.max(b,256)),c=a.contents,a.contents=new Uint8Array(b),0<a.usedBytes&&a.contents.set(c.subarray(0,a.usedBytes),0))},resizeFileStorage:function(a,b){if(a.usedBytes!=b)if(0==b)a.contents=null,a.usedBytes=0;else{if(!a.contents||a.contents.subarray){var c=a.contents;a.contents=new Uint8Array(new ArrayBuffer(b));c&&a.contents.set(c.subarray(0,Math.min(b,a.usedBytes)))}else if(a.contents||(a.contents=[]),a.contents.length>b)a.contents.length=b;
else for(;a.contents.length<b;)a.contents.push(0);a.usedBytes=b}},node_ops:{getattr:function(a){var b={};b.dev=FS.isChrdev(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;FS.isDir(a.mode)?b.size=4096:FS.isFile(a.mode)?b.size=a.usedBytes:FS.isLink(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.blksize=4096;b.blocks=Math.ceil(b.size/b.blksize);return b},setattr:function(a,b){void 0!==b.mode&&