@iktos/rdkitjs
Version:
RDKit-js implementation based on RDKit's original c++ source and emscripten
1 lines • 174 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("lodash/isEmpty"))&&"object"==typeof e&&"default"in e?e.default:e,r=function(){var e="undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("mini.cjs.production.min.js",document.baseURI).href;return function(t){var r,n;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(e,t){r=e,n=t})),Object.getOwnPropertyDescriptor(t.ready,"_main")||(Object.defineProperty(t.ready,"_main",{configurable:!0,get:function(){de("You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_main",{configurable:!0,set:function(){de("You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_stackSave")||(Object.defineProperty(t.ready,"_stackSave",{configurable:!0,get:function(){de("You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_stackSave",{configurable:!0,set:function(){de("You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_stackRestore")||(Object.defineProperty(t.ready,"_stackRestore",{configurable:!0,get:function(){de("You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_stackRestore",{configurable:!0,set:function(){de("You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_stackAlloc")||(Object.defineProperty(t.ready,"_stackAlloc",{configurable:!0,get:function(){de("You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_stackAlloc",{configurable:!0,set:function(){de("You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"___data_end")||(Object.defineProperty(t.ready,"___data_end",{configurable:!0,get:function(){de("You are getting ___data_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"___data_end",{configurable:!0,set:function(){de("You are setting ___data_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"___wasm_call_ctors")||(Object.defineProperty(t.ready,"___wasm_call_ctors",{configurable:!0,get:function(){de("You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"___wasm_call_ctors",{configurable:!0,set:function(){de("You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_fflush")||(Object.defineProperty(t.ready,"_fflush",{configurable:!0,get:function(){de("You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_fflush",{configurable:!0,set:function(){de("You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"___errno_location")||(Object.defineProperty(t.ready,"___errno_location",{configurable:!0,get:function(){de("You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"___errno_location",{configurable:!0,set:function(){de("You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_malloc")||(Object.defineProperty(t.ready,"_malloc",{configurable:!0,get:function(){de("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_malloc",{configurable:!0,set:function(){de("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_free")||(Object.defineProperty(t.ready,"_free",{configurable:!0,get:function(){de("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_free",{configurable:!0,set:function(){de("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"___cxa_is_pointer_type")||(Object.defineProperty(t.ready,"___cxa_is_pointer_type",{configurable:!0,get:function(){de("You are getting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"___cxa_is_pointer_type",{configurable:!0,set:function(){de("You are setting ___cxa_is_pointer_type on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"___cxa_can_catch")||(Object.defineProperty(t.ready,"___cxa_can_catch",{configurable:!0,get:function(){de("You are getting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"___cxa_can_catch",{configurable:!0,set:function(){de("You are setting ___cxa_can_catch on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"__ZSt18uncaught_exceptionv")||(Object.defineProperty(t.ready,"__ZSt18uncaught_exceptionv",{configurable:!0,get:function(){de("You are getting __ZSt18uncaught_exceptionv on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"__ZSt18uncaught_exceptionv",{configurable:!0,set:function(){de("You are setting __ZSt18uncaught_exceptionv on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_setThrew")||(Object.defineProperty(t.ready,"_setThrew",{configurable:!0,get:function(){de("You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_setThrew",{configurable:!0,set:function(){de("You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_emscripten_main_thread_process_queued_calls")||(Object.defineProperty(t.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,get:function(){de("You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,set:function(){de("You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"__get_tzname")||(Object.defineProperty(t.ready,"__get_tzname",{configurable:!0,get:function(){de("You are getting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"__get_tzname",{configurable:!0,set:function(){de("You are setting __get_tzname on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"__get_daylight")||(Object.defineProperty(t.ready,"__get_daylight",{configurable:!0,get:function(){de("You are getting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"__get_daylight",{configurable:!0,set:function(){de("You are setting __get_daylight on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"__get_timezone")||(Object.defineProperty(t.ready,"__get_timezone",{configurable:!0,get:function(){de("You are getting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"__get_timezone",{configurable:!0,set:function(){de("You are setting __get_timezone on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_realloc")||(Object.defineProperty(t.ready,"_realloc",{configurable:!0,get:function(){de("You are getting _realloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_realloc",{configurable:!0,set:function(){de("You are setting _realloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_testSetjmp")||(Object.defineProperty(t.ready,"_testSetjmp",{configurable:!0,get:function(){de("You are getting _testSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_testSetjmp",{configurable:!0,set:function(){de("You are setting _testSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"_saveSetjmp")||(Object.defineProperty(t.ready,"_saveSetjmp",{configurable:!0,get:function(){de("You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"_saveSetjmp",{configurable:!0,set:function(){de("You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(t.ready,"onRuntimeInitialized")||(Object.defineProperty(t.ready,"onRuntimeInitialized",{configurable:!0,get:function(){de("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(t.ready,"onRuntimeInitialized",{configurable:!0,set:function(){de("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}));var o,i={};for(o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);var a,s,c,u,d="./this.program";if(a="object"==typeof window,s="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,u=!a&&!c&&!s,t.ENVIRONMENT)throw new Error("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 l,p,f,h,E="";if(c)E=s?require("path").dirname(E)+"/":__dirname+"/",l=function(e,t){return f||(f=require("fs")),h||(h=require("path")),e=h.normalize(e),f.readFileSync(e,t?null:"utf8")},p=function(e){var t=l(e,!0);return t.buffer||(t=new Uint8Array(t)),R(t.buffer),t},process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof _r))throw e})),process.on("unhandledRejection",de),t.inspect=function(){return"[Emscripten Module object]"};else if(u)"undefined"!=typeof read&&(l=function(e){return read(e)}),p=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(R("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!a&&!s)throw new Error("environment detection error");s?E=self.location.href:document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.lastIndexOf("/")+1):"",l=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s&&(p=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})}var _=t.print||console.log.bind(console),g=t.printErr||console.warn.bind(console);for(o in i)i.hasOwnProperty(o)&&(t[o]=i[o]);function T(e){T.shown||(T.shown={}),T.shown[e]||(T.shown[e]=1,g(e))}i=null,Object.getOwnPropertyDescriptor(t,"arguments")||Object.defineProperty(t,"arguments",{configurable:!0,get:function(){de("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),t.thisProgram&&(d=t.thisProgram),Object.getOwnPropertyDescriptor(t,"thisProgram")||Object.defineProperty(t,"thisProgram",{configurable:!0,get:function(){de("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t,"quit")||Object.defineProperty(t,"quit",{configurable:!0,get:function(){de("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),R(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),R(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),R(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),R(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),R(void 0===t.read,"Module.read option was removed (modify read_ in JS)"),R(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),R(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),R(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),R(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(t,"read")||Object.defineProperty(t,"read",{configurable:!0,get:function(){de("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t,"readAsync")||Object.defineProperty(t,"readAsync",{configurable:!0,get:function(){de("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t,"readBinary")||Object.defineProperty(t,"readBinary",{configurable:!0,get:function(){de("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t,"setWindowTitle")||Object.defineProperty(t,"setWindowTitle",{configurable:!0,get:function(){de("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}});var y,m,O,w=0,v=function(e){w=e};t.wasmBinary&&(y=t.wasmBinary),Object.getOwnPropertyDescriptor(t,"wasmBinary")||Object.defineProperty(t,"wasmBinary",{configurable:!0,get:function(){de("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(t,"noExitRuntime")||Object.defineProperty(t,"noExitRuntime",{configurable:!0,get:function(){de("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&de("no native wasm support detected");var D=!1;function R(e,t){e||de("Assertion failed: "+t)}var b="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&b)return b.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&T("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function A(e,t){return e?P(x,e,t):""}function M(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>=2097152&&T("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function S(e,t,r){return R("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),M(e,x,t,r)}function F(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var j,I,x,X,U,N,k,H,C,L="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Q(e,t){R(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&U[n];)++n;if((r=n<<1)-e>32&&L)return L.decode(x.subarray(e,r));for(var i=0,a="";;){var s=X[e+2*i>>1];if(0==s||i==t/2)return a;++i,a+=String.fromCharCode(s)}}function B(e,t,r){if(R(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),R("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);X[t>>1]=a,t+=2}return X[t>>1]=0,t-n}function W(e){return 2*e.length}function z(e,t){R(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=N[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function $(e,t,r){if(R(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),R("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),N[t>>2]=a,(t+=4)+4>o)break}return N[t>>2]=0,t-n}function Y(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function G(e){var t=F(e)+1,r=er(t);return r&&M(e,I,r,t),r}R(!0,"stack must start aligned"),t.TOTAL_STACK&&R(5242880===t.TOTAL_STACK,"the stack size can no longer be determined at runtime");var V,q=t.INITIAL_MEMORY||167772160;function Z(){R(!0),k[87733]=34821223,k[87734]=2310721022,N[0]=1668509029}function K(){var e=k[87733],t=k[87734];34821223==e&&2310721022==t||de("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==N[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")}Object.getOwnPropertyDescriptor(t,"INITIAL_MEMORY")||Object.defineProperty(t,"INITIAL_MEMORY",{configurable:!0,get:function(){de("Module.INITIAL_MEMORY has been replaced with plain INITIAL_INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),R(q>=5242880,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+q+"! (TOTAL_STACK=5242880)"),R("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"),(m=t.wasmMemory?t.wasmMemory:new WebAssembly.Memory({initial:q/65536,maximum:q/65536}))&&(j=m.buffer),R((q=j.byteLength)%65536==0),j=V=j,t.HEAP8=I=new Int8Array(V),t.HEAP16=X=new Int16Array(V),t.HEAP32=N=new Int32Array(V),t.HEAPU8=x=new Uint8Array(V),t.HEAPU16=U=new Uint16Array(V),t.HEAPU32=k=new Uint32Array(V),t.HEAPF32=H=new Float32Array(V),t.HEAPF64=C=new Float64Array(V),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var J=[],ee=[],te=[],re=[],ne=!1;R(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),R(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 oe=0,ie=null,ae=null,se={};function ce(e){oe++,t.monitorRunDependencies&&t.monitorRunDependencies(oe),e?(R(!se[e]),se[e]=1,null===ie&&"undefined"!=typeof setInterval&&(ie=setInterval((function(){if(D)return clearInterval(ie),void(ie=null);var e=!1;for(var t in se)e||(e=!0,g("still waiting on run dependencies:")),g("dependency: "+t);e&&g("(end of list)")}),1e4))):g("warning: run dependency added without ID")}function ue(e){if(oe--,t.monitorRunDependencies&&t.monitorRunDependencies(oe),e?(R(se[e]),delete se[e]):g("warning: run dependency removed without ID"),0==oe&&(null!==ie&&(clearInterval(ie),ie=null),ae)){var r=ae;ae=null,r()}}function de(e){t.onAbort&&t.onAbort(e),g(e+=""),D=!0,e="abort("+e+") at "+ve();var r=new WebAssembly.RuntimeError(e);throw n(r),r}function le(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}function pe(e){return le(e,"data:application/octet-stream;base64,")}function fe(e){return le(e,"file://")}function he(e,r){return function(){var n=e,o=r;return r||(o=t.asm),R(ne,"native function `"+n+"` called before runtime initialization"),R(!0,"native function `"+n+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),o[e]||R(o[e],"exported native function `"+n+"` not found"),o[e].apply(null,arguments)}}t.preloadedImages={},t.preloadedAudios={};var Ee,_e,ge,Te="RDKit_minimal.wasm";function ye(){try{if(y)return new Uint8Array(y);if(p)return p(Te);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}}function me(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?O.get(n)():O.get(n)(r.arg):n(void 0===r.arg?null:r.arg)}else r(t)}}function Oe(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t,r=(t=e,T("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t);return e===r?e:r+" ["+e+"]"}))}function we(e,r,n){return-1!=e.indexOf("j")?function(e,r,n){return R("dynCall_"+e in t,"bad function pointer type - no table for sig '"+e+"'"),R(n&&n.length?n.length===e.substring(1).replace(/j/g,"--").length:1==e.length),n&&n.length?t["dynCall_"+e].apply(null,[r].concat(n)):t["dynCall_"+e].call(null,r)}(e,r,n):O.get(r).apply(null,n)}function ve(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return t.extraStackTrace&&(e+="\n"+t.extraStackTrace()),Oe(e)}function De(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){N[this.ptr+8>>2]=e},this.get_type=function(){return N[this.ptr+8>>2]},this.set_destructor=function(e){N[this.ptr+0>>2]=e},this.get_destructor=function(){return N[this.ptr+0>>2]},this.set_refcount=function(e){N[this.ptr+4>>2]=e},this.set_caught=function(e){I[this.ptr+12>>0]=e=e?1:0},this.get_caught=function(){return 0!=I[this.ptr+12>>0]},this.set_rethrown=function(e){I[this.ptr+13>>0]=e=e?1:0},this.get_rethrown=function(){return 0!=I[this.ptr+13>>0]},this.init=function(e,t){this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){N[this.ptr+4>>2]=N[this.ptr+4>>2]+1},this.release_ref=function(){var e=N[this.ptr+4>>2];return N[this.ptr+4>>2]=e-1,R(e>0),1===e}}function Re(e){this.free=function(){tr(this.ptr),this.ptr=0},this.set_base_ptr=function(e){N[this.ptr>>2]=e},this.get_base_ptr=function(){return N[this.ptr>>2]},this.set_adjusted_ptr=function(e){N[this.ptr+4>>2]=e},this.get_adjusted_ptr=function(){return N[this.ptr+4>>2]},this.get_exception_ptr=function(){if(fr(this.get_exception_info().get_type()))return N[this.get_base_ptr()>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.get_base_ptr()},this.get_exception_info=function(){return new De(this.get_base_ptr())},void 0===e?(this.ptr=er(8),this.set_adjusted_ptr(0)):this.ptr=e}pe(Te)||(ge=Te,Te=t.locateFile?t.locateFile(ge,E):E+ge);var be=[],Pe=0;function Ae(e){try{return tr(new De(e).ptr)}catch(e){g("exception during cxa_free_exception: "+e)}}function Me(e){return N[rr()>>2]=e,e}var Se={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=Se.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Se.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=Se.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return Se.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Se.normalize(e.join("/"))},join2:function(e,t){return Se.normalize(e+"/"+t)}},Fe={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=Se.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=Fe.resolve(e).substr(1),t=Fe.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var c=[];for(s=a;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")}},je={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){je.ttys[e]={input:[],output:[],ops:t},Ue.registerDevice(e,je.stream_ops)},stream_ops:{open:function(e){var t=je.ttys[e.node.rdev];if(!t)throw new Ue.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ue.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Ue.ErrnoError(29)}if(void 0===s&&0===i)throw new Ue.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ue.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new Ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(c){var r=Buffer.alloc?Buffer.alloc(256):new Buffer(256),n=0;try{n=f.readSync(process.stdin.fd,r,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;n=0}t=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=qt(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(_(P(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(_(P(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(g(P(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(g(P(e.output,0)),e.output=[])}}},Ie={ops_table:null,mount:function(e){return Ie.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Ue.isBlkdev(r)||Ue.isFIFO(r))throw new Ue.ErrnoError(63);Ie.ops_table||(Ie.ops_table={dir:{node:{getattr:Ie.node_ops.getattr,setattr:Ie.node_ops.setattr,lookup:Ie.node_ops.lookup,mknod:Ie.node_ops.mknod,rename:Ie.node_ops.rename,unlink:Ie.node_ops.unlink,rmdir:Ie.node_ops.rmdir,readdir:Ie.node_ops.readdir,symlink:Ie.node_ops.symlink},stream:{llseek:Ie.stream_ops.llseek}},file:{node:{getattr:Ie.node_ops.getattr,setattr:Ie.node_ops.setattr},stream:{llseek:Ie.stream_ops.llseek,read:Ie.stream_ops.read,write:Ie.stream_ops.write,allocate:Ie.stream_ops.allocate,mmap:Ie.stream_ops.mmap,msync:Ie.stream_ops.msync}},link:{node:{getattr:Ie.node_ops.getattr,setattr:Ie.node_ops.setattr,readlink:Ie.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ie.node_ops.getattr,setattr:Ie.node_ops.setattr},stream:Ue.chrdev_stream_ops}});var o=Ue.createNode(e,t,r,n);return Ue.isDir(o.mode)?(o.node_ops=Ie.ops_table.dir.node,o.stream_ops=Ie.ops_table.dir.stream,o.contents={}):Ue.isFile(o.mode)?(o.node_ops=Ie.ops_table.file.node,o.stream_ops=Ie.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ue.isLink(o.mode)?(o.node_ops=Ie.ops_table.link.node,o.stream_ops=Ie.ops_table.link.stream):Ue.isChrdev(o.mode)&&(o.node_ops=Ie.ops_table.chrdev.node,o.stream_ops=Ie.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o),o},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r<e.usedBytes;++r)t.push(e.contents[r]);return t}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var r=e.contents;return e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length<t;)e.contents.push(0);e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Ue.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=Ue.isDir(e.mode)?4096:Ue.isFile(e.mode)?e.usedBytes:Ue.isLink(e.mode)?e.link.length:0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ie.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Ue.genericErrors[44]},mknod:function(e,t,r,n){return Ie.createNode(e,t,r,n)},rename:function(e,t,r){if(Ue.isDir(e.mode)){var n;try{n=Ue.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Ue.ErrnoError(55)}delete e.parent.contents[e.name],e.name=r,t.contents[r]=e,e.parent=t},unlink:function(e,t){delete e.contents[t]},rmdir:function(e,t){var r=Ue.lookupNode(e,t);for(var n in r.contents)throw new Ue.ErrnoError(55);delete e.contents[t]},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=Ie.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Ue.isLink(e.mode))throw new Ue.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(R(a>=0),a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(R(!(t instanceof ArrayBuffer)),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return R(0===o,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(Ie.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&Ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ue.ErrnoError(28);return n},allocate:function(e,t,r){Ie.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(R(0===t),!Ue.isFile(e.node.mode))throw new Ue.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==j){if((n>0||n+r<c.length)&&(c=c.subarray?c.subarray(n,n+r):Array.prototype.slice.call(c,n,n+r)),s=!0,!(a=function(e){for(var t=function(e,t){return t||(t=16),Math.ceil(e/t)*t}(e,16384),r=er(t);e<t;)I[r+e++]=0;return r}(r)))throw new Ue.ErrnoError(48);I.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!Ue.isFile(e.node.mode))throw new Ue.ErrnoError(43);return 2&o||Ie.stream_ops.write(e,t,0,n,r,!1),0}}},xe={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"},Xe={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},Ue={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(e){if(!(e instanceof Ue.ErrnoError))throw e+" : "+ve();return Me(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=Fe.resolve(Ue.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new Ue.ErrnoError(32);for(var o=Se.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),i=Ue.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=Ue.lookupNode(i,o[s]),a=Se.join2(a,o[s]),Ue.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;Ue.isLink(i.mode);){var d=Ue.readlink(a);if(a=Fe.resolve(Se.dirname(a),d),i=Ue.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new Ue.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var t;;){if(Ue.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Ue.nameTable.length},hashAddNode:function(e){var t=Ue.hashName(e.parent.id,e.name);e.name_next=Ue.nameTable[t],Ue.nameTable[t]=e},hashRemoveNode:function(e){var t=Ue.hashName(e.parent.id,e.name);if(Ue.nameTable[t]===e)Ue.nameTable[t]=e.name_next;else for(var r=Ue.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=Ue.mayLookup(e);if(r)throw new Ue.ErrnoError(r,e);for(var n=Ue.hashName(e.id,t),o=Ue.nameTable[n];o;o=o.name_next)if(o.parent.id===e.id&&o.name===t)return o;return Ue.lookup(e,t)},createNode:function(e,t,r,n){var o=new Ue.FSNode(e,t,r,n);return Ue.hashAddNode(o),o},destroyNode:function(e){Ue.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},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(e){var t=Ue.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return Ue.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){return Ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return Ue.lookupNode(e,t),20}catch(e){}return Ue.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=Ue.lookupNode(e,t)}catch(e){return e.errno}var o=Ue.nodePermissions(e,"wx");if(o)return o;if(r){if(!Ue.isDir(n.mode))return 54;if(Ue.isRoot(n)||Ue.getPath(n)===Ue.cwd())return 10}else if(Ue.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?Ue.isLink(e.mode)?32:Ue.isDir(e.mode)&&("r"!==Ue.flagsToPermissionString(t)||512&t)?31:Ue.nodePermissions(e,Ue.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){t=t||Ue.MAX_OPEN_FDS;for(var r=e=e||0;r<=t;r++)if(!Ue.streams[r])return r;throw new Ue.ErrnoError(33)},getStream:function(e){return Ue.streams[e]},createStream:function(e,t,r){Ue.FSStream||(Ue.FSStream=function(){},Ue.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Ue.FSStream;for(var o in e)n[o]=e[o];e=n;var i=Ue.nextfd(t,r);return e.fd=i,Ue.streams[i]=e,e},closeStream:function(e){Ue.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ue.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ue.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ue.devices[e]={stream_ops:t}},getDevice:function(e){return Ue.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ue.syncFSRequests++,Ue.syncFSRequests>1&&g("warning: "+Ue.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Ue.getMounts(Ue.root.mount),n=0;function o(e){return R(Ue.syncFSRequests>0),Ue.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&Ue.root)throw new Ue.ErrnoError(10);if(!o&&!i){var a=Ue.lookupPath(r,{follow_mount:!1});if(r=a.path,Ue.isMountpoint(n=a.node))throw new Ue.ErrnoError(10);if(!Ue.isDir(n.mode))throw new Ue.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?Ue.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:function(e){var t=Ue.lookupPath(e,{follow_mount:!1});if(!Ue.isMountpoint(t.node))throw new Ue.ErrnoError(28);var r=t.node,n=r.mounted,o=Ue.getMounts(n);Object.keys(Ue.nameTable).forEach((function(e){for(var t=Ue.nameTable[e];t;){var r=t.name_next;-1!==o.indexOf(t.mount)&&Ue.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);R(-1!==i),r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=Ue.lookupPath(e,{parent:!0}).node,o=Se.basename(e);if(!o||"."===o||".."===o)throw new Ue.ErrnoError(28);var i=Ue.mayCreate(n,o);if(i)throw new Ue.ErrnoError(i);if(!n.node_ops.mknod)throw new Ue.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,Ue.mknod(e,t|=32768,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,Ue.mknod(e,t|=16384,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{Ue.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),Ue.mknod(e,t|=8192,r)},symlink:function(e,t){if(!Fe.resolve(e))throw new Ue.ErrnoError(44);var r=Ue.lookupPath(t,{parent:!0}).node;if(!r)throw new Ue.ErrnoError(44);var n=Se.basename(t),o=Ue.mayCreate(r,n);if(o)throw new Ue.ErrnoError(o);if(!r.node_ops.symlink)throw new Ue.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=Se.dirname(e),i=Se.dirname(t),a=Se.basename(e),s=Se.basename(t);if(r=Ue.lookupPath(e,{parent:!0}).node,n=Ue.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ue.ErrnoError(44);if(r.mount!==n.mount)throw new Ue.ErrnoError(75);var c,u=Ue.lookupNode(r,a),d=Fe.relative(e,i);if("."!==d.charAt(0))throw new Ue.ErrnoError(28);if("."!==(d=Fe.relative(t,o)).charAt(0))throw new Ue.ErrnoError(55);try{c=Ue.lookupNode