diff --git a/js/c++/Makefile b/js/c++/Makefile new file mode 100644 index 0000000..c2b5ea7 --- /dev/null +++ b/js/c++/Makefile @@ -0,0 +1,17 @@ +CXX=emcc +CXXFLAGS=-sENVIRONMENT=web -sSINGLE_FILE -sMODULARIZE -sWASM_ASYNC_COMPILATION=0 -lembind --closure 1 + +all: utils.js powders.js + +%.js: %.cpp + $(CXX) $(CXXFLAGS) -sEXPORT_NAME=create_$* -o $@.out $< + cat $@.out $@.in > ../$@ + +powders.js: powders.cpp + +utils.js: utils.cpp + +.PHONY: clean +clean: + rm -f utils.js.out powders.js.out + diff --git a/js/c++/powders.cpp b/js/c++/powders.cpp new file mode 100644 index 0000000..a88f9fc --- /dev/null +++ b/js/c++/powders.cpp @@ -0,0 +1,12 @@ +#ifdef __EMSCRIPTEN__ +#include +using namespace emscripten; +#endif + +#include "powders.h" + + +#ifdef __EMSCRIPTEN__ +EMSCRIPTEN_BINDINGS(powders) { +} +#endif diff --git a/js/c++/powders.h b/js/c++/powders.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/js/c++/powders.h @@ -0,0 +1 @@ +#pragma once diff --git a/js/c++/powders.js.in b/js/c++/powders.js.in new file mode 100644 index 0000000..9facaff --- /dev/null +++ b/js/c++/powders.js.in @@ -0,0 +1,237 @@ + +const _module_powders = create_powders(); + +let powderIDs = new Map(); +let powderNames = new Map(); +let _powderID = 0; +for (const x of skp_elements) { + for (let i = 1; i <= 6; ++i) { + // Support both upper and lowercase, I guess. + powderIDs.set(x.toUpperCase()+i, _powderID); + powderIDs.set(x+i, _powderID); + powderNames.set(_powderID, x+i); + _powderID++; + } +} + +// Ordering: [dmgMin, dmgMax, convert, defPlus, defMinus (+6 mod 5)] +class Powder { + constructor(min, max, convert, defPlus, defMinus) { + this.min = min; + this.max = max; + this.convert = convert; + this.defPlus = defPlus; + this.defMinus = defMinus; + } +} +function _p(a,b,c,d,e) { return new Powder(a,b,c,d,e); } //bruh moment + +let powderStats = [ + _p(3,6,17,2,1), _p(5,8,21,4,2), _p(6,10,25,8,3), _p(7,10,31,14,5), _p(9,11,38,22,9), _p(11,13,46,30,13), + _p(1,8,9,3,1), _p(1,12,11,5,1), _p(2,15,13,9,2), _p(3,15,17,14,4), _p(4,17,22,20,7), _p(5,20,28,28,10), + _p(3,4,13,3,1), _p(4,6,15,6,1), _p(5,8,17,11,2), _p(6,8,21,18,4), _p(7,10,26,28,7), _p(9,11,32,40,10), + _p(2,5,14,3,1), _p(4,8,16,5,2), _p(5,9,19,9,3), _p(6,9,24,16,5), _p(8,10,30,25,9), _p(10,12,37,36,13), + _p(2,6,11,3,1), _p(3,10,14,6,2), _p(4,11,17,10,3), _p(5,11,22,16,5), _p(7,12,28,24,9), _p(8,14,35,34,13) +]; + +class PowderIngredient { + constructor(durability, skpReq) { + this.durability = durability; + this.skpReq = skpReq; + } +} +function _pi(a,b) { return new PowderIngredient(a,b)} + +let powderIngreds = [ + _pi(-35,0),_pi(-52.5,0),_pi(-70,10),_pi(-91,20),_pi(-112,28),_pi(-133,36) +]; +//Ordering: [weapon special name, weapon special effects, armor special name, armor special effects] +class PowderSpecial{ + constructor(wSpName, wSpEff, aSpName, aSpEff, cap){ + this.weaponSpecialName = wSpName; + this.weaponSpecialEffects = wSpEff; + this.armorSpecialName = aSpName; + this.armorSpecialEffects = aSpEff; + this.cap = cap; + } +} +function _ps(a,b,c,d,e) { return new PowderSpecial(a,b,c,d,e); } //bruh moment + +let powderSpecialStats = [ + _ps("Quake",new Map([["Radius",[4.5,5,5.5,6,6.5]], ["Damage",[240,280,320,360,400]] ]),"Rage",new Map([ ["Damage", [0.2,0.4,0.6,0.8,1.0]],["Description", "% " + "\u2764" + " Missing below 75%"] ]),300), //e + _ps("Chain Lightning",new Map([ ["Chains", [5,6,7,8,9]], ["Damage", [200,225,250,275,300]] ]),"Kill Streak",new Map([ ["Damage", [3,4.5,6,7.5,9]],["Duration", [5,5,5,5,5]],["Description", "Mob Killed"] ]),150), //t + _ps("Curse",new Map([ ["Duration", [4,4,4,4,4]],["Damage Boost", [10,15,20,25,30]] ]),"Concentration",new Map([ ["Damage", [0.05,0.1,0.15,0.2,0.25]],["Duration",[1,1,1,1,1]],["Description", "Mana Used"] ]),100), //w + _ps("Courage",new Map([ ["Duration", [4,4,4,4,4]],["Damage", [60, 70, 80, 90, 100]],["Damage Boost", [10,12.5,15,17.5,20]] ]),"Endurance",new Map([ ["Damage", [2,3,4,5,6]],["Duration", [8,8,8,8,8]],["Description", "Hit Taken"] ]),100), //f + _ps("Wind Prison",new Map([ ["Duration", [3,3.5,4,4.5,5]],["Damage Boost", [100,125,150,175,200]],["Knockback", [8,12,16,20,24]] ]),"Dodge",new Map([ ["Damage",[2,3,4,5,6]],["Duration",[2,3,4,5,6]],["Description","Near Mobs"] ]),150) //a +]; + +/** + * Apply armor powders. + * Encoding shortcut assumes that all powders give +def to one element + * and -def to the element "behind" it in cycle ETWFA, which is true + * as of now and unlikely to change in the near future. + */ +function applyArmorPowders(expandedItem) { + const powders = expandedItem.get('powders'); + for(const id of powders){ + let powder = powderStats[id]; + let name = powderNames.get(id).charAt(0); + let prevName = skp_elements[(skp_elements.indexOf(name) + 4 )% 5]; + expandedItem.set(name+"Def", (expandedItem.get(name+"Def") || 0) + powder["defPlus"]); + expandedItem.set(prevName+"Def", (expandedItem.get(prevName+"Def") || 0) - powder["defMinus"]); + } +} + +const damage_keys = [ "nDam_", "eDam_", "tDam_", "wDam_", "fDam_", "aDam_" ]; +const damage_present_key = 'damagePresent'; +/** + * Apply weapon powders. MUTATES THE ITEM! + * Adds entries for `damage_keys` and `damage_present_key` + * For normal items, `damage_keys` is 6x2 list (elem: [min, max]) + * For crafted items, `damage_keys` is 6x2x2 list (elem: [minroll: [min, max], maxroll: [min, max]]) + */ +function apply_weapon_powders(item) { + let present; + if (item.get("tier") !== "Crafted") { + let weapon_result = calc_weapon_powder(item); + let damages = weapon_result[0]; + present = weapon_result[1]; + for (const i in damage_keys) { + item.set(damage_keys[i], damages[i]); + } + } else { + let base_low = [item.get("nDamBaseLow"),item.get("eDamBaseLow"),item.get("tDamBaseLow"),item.get("wDamBaseLow"),item.get("fDamBaseLow"),item.get("aDamBaseLow")]; + let results_low = calc_weapon_powder(item, base_low); + let damage_low = results_low[0]; + let base_high = [item.get("nDamBaseHigh"),item.get("eDamBaseHigh"),item.get("tDamBaseHigh"),item.get("wDamBaseHigh"),item.get("fDamBaseHigh"),item.get("aDamBaseHigh")]; + let results_high = calc_weapon_powder(item, base_high); + let damage_high = results_high[0]; + present = results_high[1]; + + for (const i in damage_keys) { + item.set(damage_keys[i], [damage_low[i], damage_high[i]]); + } + } + item.set(damage_present_key, present); +} + +/** + * Calculate weapon damage from powder. + * + * Params: + * weapon: Weapon to apply powder to + * damageBases: used by crafted + * + * Return: + * [damages, damage_present] + */ +function calc_weapon_powder(weapon, damageBases) { + let powders = weapon.get("powders").slice(); + + // Array of neutral + ewtfa damages. Each entry is a pair (min, max). + let damages = [ + weapon.get('nDam').split('-').map(Number), + weapon.get('eDam').split('-').map(Number), + weapon.get('tDam').split('-').map(Number), + weapon.get('wDam').split('-').map(Number), + weapon.get('fDam').split('-').map(Number), + weapon.get('aDam').split('-').map(Number) + ]; + + // Applying spell conversions + let neutralBase = damages[0].slice(); + let neutralRemainingRaw = damages[0].slice(); + + //powder application for custom crafted weapons is inherently fucked because there is no base. Unsure what to do. + + //Powder application for Crafted weapons - this implementation is RIGHT YEAAAAAAAAA + //1st round - apply each as ingred, 2nd round - apply as normal + if (weapon.get("tier") === "Crafted" && !weapon.get("custom")) { + for (const p of powders.concat(weapon.get("ingredPowders"))) { + let powder = powderStats[p]; //use min, max, and convert + let element = Math.floor((p+0.01)/6); //[0,4], the +0.01 attempts to prevent division error + let diff = Math.floor(damageBases[0] * powder.convert/100); + damageBases[0] -= diff; + damageBases[element+1] += diff + Math.floor( (powder.min + powder.max) / 2 ); + } + //update all damages + for (let i = 0; i < damages.length; i++) { + damages[i] = [Math.floor(damageBases[i] * 0.9), Math.floor(damageBases[i] * 1.1)]; + } + neutralRemainingRaw = damages[0].slice(); + neutralBase = damages[0].slice(); + } + + //apply powders to weapon (1.21 fked implementation) + let powder_apply_order = []; + let powder_apply_map = new Map(); + for (const powderID of powders) { + const powder = powderStats[powderID]; + // Bitwise to force conversion to integer (integer division). + const element = (powderID/6) | 0; + const conversion_ratio = powder.convert/100; + + if (powder_apply_map.has(element)) { + let apply_info = powder_apply_map.get(element); + apply_info.conv += conversion_ratio; + apply_info.min += powder.min; + apply_info.max += powder.max; + } + else { + let apply_info = { + conv: conversion_ratio, + min: powder.min, + max: powder.max + }; + powder_apply_order.push(element); + powder_apply_map.set(element, apply_info); + } + } + for (const element of powder_apply_order) { + const apply_info = powder_apply_map.get(element); + const conversion_ratio = apply_info.conv; + const min_diff = Math.min(neutralRemainingRaw[0], conversion_ratio * neutralRemainingRaw[0]); + const max_diff = Math.min(neutralRemainingRaw[1], conversion_ratio * neutralRemainingRaw[1]); + neutralRemainingRaw[0] -= min_diff; + neutralRemainingRaw[1] -= max_diff; + damages[element+1][0] += min_diff; + damages[element+1][1] += max_diff; + damages[element+1][0] += apply_info.min; + damages[element+1][1] += apply_info.max; + } + + /* + //apply powders to weapon + for (const powderID of powders) { + const powder = powderStats[powderID]; + // Bitwise to force conversion to integer (integer division). + const element = (powderID/6) | 0; + let conversionRatio = powder.convert/100; + if (neutralRemainingRaw[1] > 0) { + let min_diff = Math.min(neutralRemainingRaw[0], conversionRatio * neutralBase[0]); + let max_diff = Math.min(neutralRemainingRaw[1], conversionRatio * neutralBase[1]); + + damages[element+1][0] = Math.floor(round_near(damages[element+1][0] + min_diff)); + damages[element+1][1] = Math.floor(round_near(damages[element+1][1] + max_diff)); + neutralRemainingRaw[0] = Math.floor(round_near(neutralRemainingRaw[0] - min_diff)); + neutralRemainingRaw[1] = Math.floor(round_near(neutralRemainingRaw[1] - max_diff)); + //damages[element+1][0] += min_diff; + //damages[element+1][1] += max_diff; + //neutralRemainingRaw[0] -= min_diff; + //neutralRemainingRaw[1] -= max_diff; + } + damages[element+1][0] += powder.min; + damages[element+1][1] += powder.max; + } + */ + + // The ordering of these two blocks decides whether neutral is present when converted away or not. + damages[0] = neutralRemainingRaw; + + // The ordering of these two blocks decides whether neutral is present when converted away or not. + let present_elements = [] + for (const damage of damages) { + present_elements.push(damage[1] > 0); + } + return [damages, present_elements]; +} diff --git a/js/c++/powders.js.out b/js/c++/powders.js.out new file mode 100644 index 0000000..db68119 --- /dev/null +++ b/js/c++/powders.js.out @@ -0,0 +1,859 @@ + +var create_powders = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + + return ( +function(create_powders = {}) { + +var e; +e || (e = typeof create_powders !== 'undefined' ? create_powders : {}); +var aa, p; +e.ready = new Promise(function(a, b) { + aa = a; + p = b; +}); +["_main", "___getTypeName", "__embind_initialize_bindings", "_fflush", "onRuntimeInitialized"].forEach(a => { + Object.getOwnPropertyDescriptor(e.ready, a) || Object.defineProperty(e.ready, a, {get:() => q("You are getting " + a + " 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"), set:() => q("You are setting " + a + " 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 ba = Object.assign({}, e); +if (e.ENVIRONMENT) { + throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)"); +} +var t = ""; +"undefined" != typeof document && document.currentScript && (t = document.currentScript.src); +_scriptDir && (t = _scriptDir); +0 !== t.indexOf("blob:") ? t = t.substr(0, t.replace(/[?#].*/, "").lastIndexOf("/") + 1) : t = ""; +if ("object" != typeof window && "function" != typeof importScripts) { + throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)"); +} +var ca = e.print || console.log.bind(console), u = e.printErr || console.warn.bind(console); +Object.assign(e, ba); +ba = null; +Object.getOwnPropertyDescriptor(e, "fetchSettings") && q("`Module.fetchSettings` was supplied but `fetchSettings` not included in INCOMING_MODULE_JS_API"); +v("arguments", "arguments_"); +v("thisProgram", "thisProgram"); +v("quit", "quit_"); +w("undefined" == typeof e.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"); +w("undefined" == typeof e.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"); +w("undefined" == typeof e.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"); +w("undefined" == typeof e.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"); +w("undefined" == typeof e.read, "Module.read option was removed (modify read_ in JS)"); +w("undefined" == typeof e.readAsync, "Module.readAsync option was removed (modify readAsync in JS)"); +w("undefined" == typeof e.readBinary, "Module.readBinary option was removed (modify readBinary in JS)"); +w("undefined" == typeof e.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"); +w("undefined" == typeof e.TOTAL_MEMORY, "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"); +v("read", "read_"); +v("readAsync", "readAsync"); +v("readBinary", "readBinary"); +v("setWindowTitle", "setWindowTitle"); +w(!0, "worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."); +w(!0, "node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."); +w(!0, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."); +var x; +e.wasmBinary && (x = e.wasmBinary); +v("wasmBinary", "wasmBinary"); +var noExitRuntime = e.noExitRuntime || !0; +v("noExitRuntime", "noExitRuntime"); +"object" != typeof WebAssembly && q("no native wasm support detected"); +var y, z = !1; +function w(a, b) { + a || q("Assertion failed" + (b ? ": " + b : "")); +} +var da = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0; +function ea(a, b, c) { + var d = b + c; + for (c = b; a[c] && !(c >= d);) { + ++c; + } + if (16 < c - b && a.buffer && da) { + return da.decode(a.subarray(b, c)); + } + for (d = ""; b < c;) { + var f = a[b++]; + if (f & 128) { + var g = a[b++] & 63; + if (192 == (f & 224)) { + d += String.fromCharCode((f & 31) << 6 | g); + } else { + var k = a[b++] & 63; + 224 == (f & 240) ? f = (f & 15) << 12 | g << 6 | k : (240 != (f & 248) && A("Invalid UTF-8 leading byte " + B(f) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), f = (f & 7) << 18 | g << 12 | k << 6 | a[b++] & 63); + 65536 > f ? d += String.fromCharCode(f) : (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)); + } + } else { + d += String.fromCharCode(f); + } + } + return d; +} +var C, D, E, F, G, H, fa, ha; +w(!e.STACK_SIZE, "STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"); +w("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"); +w(!e.wasmMemory, "Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"); +w(!e.INITIAL_MEMORY, "Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"); +var ja; +function ka() { + var a = la(); + w(0 == (a & 3)); + 0 == a && (a += 4); + H[a >> 2] = 34821223; + H[a + 4 >> 2] = 2310721022; + H[0] = 1668509029; +} +function I() { + if (!z) { + var a = la(); + 0 == a && (a += 4); + var b = H[a >> 2], c = H[a + 4 >> 2]; + 34821223 == b && 2310721022 == c || q("Stack overflow! Stack cookie has been overwritten at " + B(a) + ", expected hex dwords 0x89BACDFE and 0x2135467, but received " + B(c) + " " + B(b)); + 1668509029 !== H[0] && q("Runtime error: The application has corrupted its heap memory area (address zero)!"); + } +} +var ma = new Int16Array(1), na = new Int8Array(ma.buffer); +ma[0] = 25459; +if (115 !== na[0] || 99 !== na[1]) { + throw "Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"; +} +var oa = [], pa = [], qa = [], K = !1; +function ra() { + var a = e.preRun.shift(); + oa.unshift(a); +} +w(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +w(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +w(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +w(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 L = 0, M = null, N = null, O = {}; +function sa() { + L++; + e.monitorRunDependencies && e.monitorRunDependencies(L); + w(!O["wasm-instantiate"]); + O["wasm-instantiate"] = 1; + null === M && "undefined" != typeof setInterval && (M = setInterval(function() { + if (z) { + clearInterval(M), M = null; + } else { + var a = !1, b; + for (b in O) { + a || (a = !0, u("still waiting on run dependencies:")), u("dependency: " + b); + } + a && u("(end of list)"); + } + }, 10000)); +} +function q(a) { + if (e.onAbort) { + e.onAbort(a); + } + a = "Aborted(" + a + ")"; + u(a); + z = !0; + a = new WebAssembly.RuntimeError(a); + p(a); + throw a; +} +function ta() { + q("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM"); +} +e.FS_createDataFile = function() { + ta(); +}; +e.FS_createPreloadedFile = function() { + ta(); +}; +function ua(a) { + return a.startsWith("data:application/octet-stream;base64,"); +} +function P(a) { + var b = va; + return function() { + var c = b; + b || (c = e.asm); + w(K, "native function `" + a + "` called before runtime initialization"); + c[a] || w(c[a], "exported native function `" + a + "` not found"); + return c[a].apply(null, arguments); + }; +} +var Q; +Q = "data:application/octet-stream;base64,AGFzbQEAAAAB+4CAg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QCEBwEAZgAAAKwGAQCQBwEAZAAAAKwGAQCcBwEAAAAAAJgGAQAGAAAACwAAAAgAAAAJAAAADAAAAA0AAAAOAAAADwAAAAAAAAAgCAEABgAAABAAAAAIAAAACQAAAAwAAAARAAAAEgAAABMAAABOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UAAAAA2AcBAPgHAQCYBgEAU3Q5dHlwZV9pbmZvAAAAALAHAQAsCAEAAEHIkAQLnAEACwEAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAA9AoBAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAIAQA="; +if (!ua(Q)) { + var wa = Q; + Q = e.locateFile ? e.locateFile(wa, t) : t + wa; +} +function xa(a) { + var b = Q; + try { + a: { + try { + if (b == Q && x) { + var c = new Uint8Array(x); + break a; + } + if (ua(b)) { + try { + var d = ya(b.slice(37)), f = new Uint8Array(d.length); + for (b = 0; b < d.length; ++b) { + f[b] = d.charCodeAt(b); + } + var g = f; + } catch (l) { + throw Error("Converting base64 string to bytes failed."); + } + var k = g; + } else { + k = void 0; + } + if (k) { + c = k; + break a; + } + throw "sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"; + } catch (l) { + q(l); + } + c = void 0; + } + var h = new WebAssembly.Module(c); + var m = new WebAssembly.Instance(h, a); + } catch (l) { + throw a = l.toString(), u("failed to compile wasm module: " + a), (a.includes("imported Memory") || a.includes("memory import")) && u("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."), l; + } + return [m, h]; +} +function v(a, b) { + Object.getOwnPropertyDescriptor(e, a) || Object.defineProperty(e, a, {configurable:!0, get:function() { + q("Module." + a + " has been replaced with plain " + b + " (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"); + }}); +} +function za(a) { + return "FS_createPath" === a || "FS_createDataFile" === a || "FS_createPreloadedFile" === a || "FS_unlink" === a || "addRunDependency" === a || "FS_createLazyFile" === a || "FS_createDevice" === a || "removeRunDependency" === a; +} +(function(a, b) { + "undefined" !== typeof globalThis && Object.defineProperty(globalThis, a, {configurable:!0, get:function() { + A("`" + a + "` is not longer defined by emscripten. " + b); + }}); +})("buffer", "Please use HEAP8.buffer or wasmMemory.buffer"); +function Aa(a) { + Object.getOwnPropertyDescriptor(e, a) || Object.defineProperty(e, a, {configurable:!0, get:function() { + var b = "'" + a + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"; + za(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"); + q(b); + }}); +} +function Ba(a) { + for (; 0 < a.length;) { + a.shift()(e); + } +} +function B(a) { + w("number" === typeof a); + return "0x" + a.toString(16).padStart(8, "0"); +} +function A(a) { + R || (R = {}); + R[a] || (R[a] = 1, u(a)); +} +var R; +function Ca(a) { + switch(a) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + throw new TypeError("Unknown type size: " + a); + } +} +var Da = void 0; +function S(a) { + for (var b = ""; D[a];) { + b += Da[D[a++]]; + } + return b; +} +var Ea = {}, Fa = {}, Ga = {}; +function Ha(a) { + if (void 0 === a) { + return "_unknown"; + } + a = a.replace(/[^a-zA-Z0-9_]/g, "$"); + var b = a.charCodeAt(0); + return 48 <= b && 57 >= b ? "_" + a : a; +} +function Ia(a, b) { + a = Ha(a); + return {[a]:function() { + return b.apply(this, arguments); + }}[a]; +} +function Ja(a) { + var b = Error, c = Ia(a, function(d) { + this.name = a; + this.message = d; + d = Error(d).stack; + void 0 !== d && (this.stack = this.toString() + "\n" + d.replace(/^Error(:[^\n]*)?\n/, "")); + }); + c.prototype = Object.create(b.prototype); + c.prototype.constructor = c; + c.prototype.toString = function() { + return void 0 === this.message ? this.name : this.name + ": " + this.message; + }; + return c; +} +var Ka = void 0; +function U(a) { + throw new Ka(a); +} +function V(a, b, c = {}) { + if (!("argPackAdvance" in b)) { + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + } + var d = b.name; + a || U('type "' + d + '" must have a positive integer typeid pointer'); + if (Fa.hasOwnProperty(a)) { + if (c.h) { + return; + } + U("Cannot register type '" + d + "' twice"); + } + Fa[a] = b; + delete Ga[a]; + Ea.hasOwnProperty(a) && (b = Ea[a], delete Ea[a], b.forEach(f => f())); +} +var La = [], W = [{}, {value:void 0}, {value:null}, {value:!0}, {value:!1}], Ma = a => { + switch(a) { + case void 0: + return 1; + case null: + return 2; + case !0: + return 3; + case !1: + return 4; + default: + var b = La.length ? La.pop() : W.length; + W[b] = {i:1, value:a}; + return b; + } +}; +function Na(a) { + return this.fromWireType(G[a >> 2]); +} +function Oa(a) { + if (null === a) { + return "null"; + } + var b = typeof a; + return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a; +} +function Pa(a, b) { + switch(b) { + case 2: + return function(c) { + return this.fromWireType(fa[c >> 2]); + }; + case 3: + return function(c) { + return this.fromWireType(ha[c >> 3]); + }; + default: + throw new TypeError("Unknown float type: " + a); + } +} +function Qa(a, b, c) { + switch(b) { + case 0: + return c ? function(d) { + return C[d]; + } : function(d) { + return D[d]; + }; + case 1: + return c ? function(d) { + return E[d >> 1]; + } : function(d) { + return F[d >> 1]; + }; + case 2: + return c ? function(d) { + return G[d >> 2]; + } : function(d) { + return H[d >> 2]; + }; + default: + throw new TypeError("Unknown integer type: " + a); + } +} +var Ra = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0; +function Sa(a, b) { + w(0 == a % 2, "Pointer passed to UTF16ToString must be aligned to two bytes!"); + var c = a >> 1; + for (var d = c + b / 2; !(c >= d) && F[c];) { + ++c; + } + c <<= 1; + if (32 < c - a && Ra) { + return Ra.decode(D.subarray(a, c)); + } + c = ""; + for (d = 0; !(d >= b / 2); ++d) { + var f = E[a + 2 * d >> 1]; + if (0 == f) { + break; + } + c += String.fromCharCode(f); + } + return c; +} +function Ta(a, b, c) { + w(0 == b % 2, "Pointer passed to stringToUTF16 must be aligned to two bytes!"); + w("number" == typeof c, "stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"); + void 0 === c && (c = 2147483647); + if (2 > c) { + return 0; + } + c -= 2; + var d = b; + c = c < 2 * a.length ? c / 2 : a.length; + for (var f = 0; f < c; ++f) { + E[b >> 1] = a.charCodeAt(f), b += 2; + } + E[b >> 1] = 0; + return b - d; +} +function Ua(a) { + return 2 * a.length; +} +function Va(a, b) { + w(0 == a % 4, "Pointer passed to UTF32ToString must be aligned to four bytes!"); + for (var c = 0, d = ""; !(c >= b / 4);) { + var f = G[a + 4 * c >> 2]; + if (0 == f) { + break; + } + ++c; + 65536 <= f ? (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)) : d += String.fromCharCode(f); + } + return d; +} +function Wa(a, b, c) { + w(0 == b % 4, "Pointer passed to stringToUTF32 must be aligned to four bytes!"); + w("number" == typeof c, "stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"); + void 0 === c && (c = 2147483647); + if (4 > c) { + return 0; + } + var d = b; + c = d + c - 4; + 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; + } + G[b >> 2] = g; + b += 4; + if (b + 4 > c) { + break; + } + } + G[b >> 2] = 0; + return b - d; +} +function Xa(a) { + for (var b = 0, c = 0; c < a.length; ++c) { + var d = a.charCodeAt(c); + 55296 <= d && 57343 >= d && ++c; + b += 4; + } + return b; +} +for (var Ya = [null, [], []], Za = Array(256), X = 0; 256 > X; ++X) { + Za[X] = String.fromCharCode(X); +} +Da = Za; +Ka = e.BindingError = Ja("BindingError"); +e.InternalError = Ja("InternalError"); +e.count_emval_handles = function() { + for (var a = 0, b = 5; b < W.length; ++b) { + void 0 !== W[b] && ++a; + } + return a; +}; +e.get_first_emval = function() { + for (var a = 5; a < W.length; ++a) { + if (void 0 !== W[a]) { + return W[a]; + } + } + return null; +}; +var ya = "function" == typeof atob ? atob : function(a) { + var b = "", c = 0; + a = a.replace(/[^A-Za-z0-9\+\/=]/g, ""); + do { + var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + d = d << 2 | f >> 4; + f = (f & 15) << 4 | g >> 2; + var h = (g & 3) << 6 | k; + b += String.fromCharCode(d); + 64 !== g && (b += String.fromCharCode(f)); + 64 !== k && (b += String.fromCharCode(h)); + } while (c < a.length); + return b; +}, ab = {_embind_register_bigint:function() { +}, _embind_register_bool:function(a, b, c, d, f) { + var g = Ca(c); + b = S(b); + V(a, {name:b, fromWireType:function(k) { + return !!k; + }, toWireType:function(k, h) { + return h ? d : f; + }, argPackAdvance:8, readValueFromPointer:function(k) { + if (1 === c) { + var h = C; + } else if (2 === c) { + h = E; + } else if (4 === c) { + h = G; + } else { + throw new TypeError("Unknown boolean type size: " + b); + } + return this.fromWireType(h[k >> g]); + }, g:null,}); +}, _embind_register_emval:function(a, b) { + b = S(b); + V(a, {name:b, fromWireType:function(c) { + c || U("Cannot use deleted val. handle = " + c); + var d = W[c].value; + 4 < c && 0 === --W[c].i && (W[c] = void 0, La.push(c)); + return d; + }, toWireType:function(c, d) { + return Ma(d); + }, argPackAdvance:8, readValueFromPointer:Na, g:null,}); +}, _embind_register_float:function(a, b, c) { + c = Ca(c); + b = S(b); + V(a, {name:b, fromWireType:function(d) { + return d; + }, toWireType:function(d, f) { + if ("number" != typeof f && "boolean" != typeof f) { + throw new TypeError('Cannot convert "' + Oa(f) + '" to ' + this.name); + } + return f; + }, argPackAdvance:8, readValueFromPointer:Pa(b, c), g:null,}); +}, _embind_register_integer:function(a, b, c, d, f) { + b = S(b); + -1 === f && (f = 4294967295); + var g = Ca(c), k = l => l; + if (0 === d) { + var h = 32 - 8 * c; + k = l => l << h >>> h; + } + var m = (l, n) => { + if ("number" != typeof l && "boolean" != typeof l) { + throw new TypeError('Cannot convert "' + Oa(l) + '" to ' + n); + } + if (l < d || l > f) { + throw new TypeError('Passing a number "' + Oa(l) + '" from JS side to C/C++ side to an argument of type "' + b + '", which is outside the valid range [' + d + ", " + f + "]!"); + } + }; + c = b.includes("unsigned") ? function(l, n) { + m(n, this.name); + return n >>> 0; + } : function(l, n) { + m(n, this.name); + return n; + }; + V(a, {name:b, fromWireType:k, toWireType:c, argPackAdvance:8, readValueFromPointer:Qa(b, g, 0 !== d), g:null,}); +}, _embind_register_memory_view:function(a, b, c) { + function d(g) { + g >>= 2; + var k = H; + return new f(k.buffer, k[g + 1], k[g]); + } + var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b]; + c = S(c); + V(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {h:!0,}); +}, _embind_register_std_string:function(a, b) { + b = S(b); + var c = "std::string" === b; + V(a, {name:b, fromWireType:function(d) { + var f = H[d >> 2], g = d + 4; + if (c) { + for (var k = g, h = 0; h <= f; ++h) { + var m = g + h; + if (h == f || 0 == D[m]) { + var l = k; + k = m - k; + w("number" == typeof l); + l = l ? ea(D, l, k) : ""; + if (void 0 === n) { + var n = l; + } else { + n += String.fromCharCode(0), n += l; + } + k = m + 1; + } + } + } else { + n = Array(f); + for (h = 0; h < f; ++h) { + n[h] = String.fromCharCode(D[g + h]); + } + n = n.join(""); + } + Y(d); + return n; + }, toWireType:function(d, f) { + f instanceof ArrayBuffer && (f = new Uint8Array(f)); + var g = "string" == typeof f; + g || f instanceof Uint8Array || f instanceof Uint8ClampedArray || f instanceof Int8Array || U("Cannot pass non-string to std::string"); + if (c && g) { + for (var k = 0, h = 0; h < f.length; ++h) { + var m = f.charCodeAt(h); + 127 >= m ? k++ : 2047 >= m ? k += 2 : 55296 <= m && 57343 >= m ? (k += 4, ++h) : k += 3; + } + m = k; + } else { + m = f.length; + } + k = $a(4 + m + 1); + h = k + 4; + H[k >> 2] = m; + if (c && g) { + if (g = m + 1, w("number" == typeof g, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), m = D, 0 < g) { + g = h + g - 1; + for (var l = 0; l < f.length; ++l) { + var n = f.charCodeAt(l); + if (55296 <= n && 57343 >= n) { + var r = f.charCodeAt(++l); + n = 65536 + ((n & 1023) << 10) | r & 1023; + } + if (127 >= n) { + if (h >= g) { + break; + } + m[h++] = n; + } else { + if (2047 >= n) { + if (h + 1 >= g) { + break; + } + m[h++] = 192 | n >> 6; + } else { + if (65535 >= n) { + if (h + 2 >= g) { + break; + } + m[h++] = 224 | n >> 12; + } else { + if (h + 3 >= g) { + break; + } + 1114111 < n && A("Invalid Unicode code point " + B(n) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."); + m[h++] = 240 | n >> 18; + m[h++] = 128 | n >> 12 & 63; + } + m[h++] = 128 | n >> 6 & 63; + } + m[h++] = 128 | n & 63; + } + } + m[h] = 0; + } + } else { + if (g) { + for (g = 0; g < m; ++g) { + l = f.charCodeAt(g), 255 < l && (Y(h), U("String has UTF-16 code units that do not fit in 8 bits")), D[h + g] = l; + } + } else { + for (g = 0; g < m; ++g) { + D[h + g] = f[g]; + } + } + } + null !== d && d.push(Y, k); + return k; + }, argPackAdvance:8, readValueFromPointer:Na, g:function(d) { + Y(d); + },}); +}, _embind_register_std_wstring:function(a, b, c) { + c = S(c); + if (2 === b) { + var d = Sa; + var f = Ta; + var g = Ua; + var k = () => F; + var h = 1; + } else { + 4 === b && (d = Va, f = Wa, g = Xa, k = () => H, h = 2); + } + V(a, {name:c, fromWireType:function(m) { + for (var l = H[m >> 2], n = k(), r, J = m + 4, T = 0; T <= l; ++T) { + var ia = m + 4 + T * b; + if (T == l || 0 == n[ia >> h]) { + J = d(J, ia - J), void 0 === r ? r = J : (r += String.fromCharCode(0), r += J), J = ia + b; + } + } + Y(m); + return r; + }, toWireType:function(m, l) { + "string" != typeof l && U("Cannot pass non-string to C++ string type " + c); + var n = g(l), r = $a(4 + n + b); + H[r >> 2] = n >> h; + f(l, r + 4, n + b); + null !== m && m.push(Y, r); + return r; + }, argPackAdvance:8, readValueFromPointer:Na, g:function(m) { + Y(m); + },}); +}, _embind_register_void:function(a, b) { + b = S(b); + V(a, {j:!0, name:b, argPackAdvance:0, fromWireType:function() { + }, toWireType:function() { + },}); +}, emscripten_memcpy_big:function(a, b, c) { + D.copyWithin(a, b, b + c); +}, emscripten_resize_heap:function(a) { + q("Cannot enlarge memory arrays to size " + (a >>> 0) + " bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value " + C.length + ", (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0"); +}, fd_close:function() { + q("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM"); +}, fd_seek:function() { + return 70; +}, fd_write:function(a, b, c, d) { + for (var f = 0, g = 0; g < c; g++) { + var k = H[b >> 2], h = H[b + 4 >> 2]; + b += 8; + for (var m = 0; m < h; m++) { + var l = a, n = D[k + m], r = Ya[l]; + w(r); + 0 === n || 10 === n ? ((1 === l ? ca : u)(ea(r, 0)), r.length = 0) : r.push(n); + } + f += h; + } + H[d >> 2] = f; + return 0; +}}, va = function() { + function a(c) { + c = c.exports; + e.asm = c; + y = e.asm.memory; + w(y, "memory not found in wasm exports"); + var d = y.buffer; + e.HEAP8 = C = new Int8Array(d); + e.HEAP16 = E = new Int16Array(d); + e.HEAP32 = G = new Int32Array(d); + e.HEAPU8 = D = new Uint8Array(d); + e.HEAPU16 = F = new Uint16Array(d); + e.HEAPU32 = H = new Uint32Array(d); + e.HEAPF32 = fa = new Float32Array(d); + e.HEAPF64 = ha = new Float64Array(d); + ja = e.asm.__indirect_function_table; + w(ja, "table not found in wasm exports"); + pa.unshift(e.asm.__wasm_call_ctors); + L--; + e.monitorRunDependencies && e.monitorRunDependencies(L); + w(O["wasm-instantiate"]); + delete O["wasm-instantiate"]; + 0 == L && (null !== M && (clearInterval(M), M = null), N && (d = N, N = null, d())); + return c; + } + var b = {env:ab, wasi_snapshot_preview1:ab,}; + sa(); + if (e.instantiateWasm) { + try { + return e.instantiateWasm(b, a); + } catch (c) { + u("Module.instantiateWasm callback failed with error: " + c), p(c); + } + } + b = xa(b); + return a(b[0]); +}(); +e.___getTypeName = P("__getTypeName"); +e.__embind_initialize_bindings = P("_embind_initialize_bindings"); +e._fflush = P("fflush"); +var $a = P("malloc"), Y = P("free"), bb = va.emscripten_stack_init, la = va.emscripten_stack_get_end; +e.dynCall_jiji = P("dynCall_jiji"); +"zeroMemory stringToNewUTF8 exitJS emscripten_realloc_buffer setErrNo inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr getHostByName getRandomDevice traverseStack convertPCtoSourceLocation readEmAsmArgs jstoi_q jstoi_s getExecutableName listenOnce autoResumeAudioContext dynCallLegacy getDynCaller dynCall handleException runtimeKeepalivePush runtimeKeepalivePop callUserCallback maybeExit safeSetTimeout asmjsMangle asyncLoad alignMemory mmapAlloc HandleAllocator getNativeTypeSize STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertU32PairToI53 getCFunc ccall cwrap uleb128Encode sigToWasmTypes generateFuncType convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction reallyNegative unSign strLen reSign formatString intArrayFromString AsciiToString stringToAscii allocateUTF8 allocateUTF8OnStack writeStringToMemory writeArrayToMemory writeAsciiToMemory getSocketFromFD getSocketAddress registerKeyEventCallback maybeCStringToJsString findEventTarget findCanvasEventTarget getBoundingClientRect fillMouseEventData registerMouseEventCallback registerWheelEventCallback registerUiEventCallback registerFocusEventCallback fillDeviceOrientationEventData registerDeviceOrientationEventCallback fillDeviceMotionEventData registerDeviceMotionEventCallback screenOrientation fillOrientationChangeEventData registerOrientationChangeEventCallback fillFullscreenChangeEventData registerFullscreenChangeEventCallback JSEvents_requestFullscreen JSEvents_resizeCanvasForFullscreen registerRestoreOldStyle hideEverythingExceptGivenElement restoreHiddenElements setLetterbox softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData battery registerBatteryEventCallback setCanvasElementSize getCanvasElementSize demangle demangleAll jsStackTrace stackTrace getEnvStrings checkWasiClock createDyncallWrapper setImmediateWrapped clearImmediateWrapped polyfillSetImmediate getPromise makePromise makePromiseCallback ExceptionInfo exception_addRef exception_decRef setMainLoop _setNetworkCallback heapObjectForWebGLType heapAccessShiftForWebGLHeap emscriptenWebGLGet computeUnpackAlignedImageSize emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib writeGLArray SDL_unicode SDL_ttfContext SDL_audio GLFW_Window runAndAbortIfError ALLOC_NORMAL ALLOC_STACK allocate init_embind throwUnboundTypeError ensureOverloadTable exposePublicSymbol replacePublicSymbol getBasestPointer registerInheritedInstance unregisterInheritedInstance getInheritedInstance getInheritedInstanceCount getLiveInheritedInstances getTypeName heap32VectorToArray requireRegisteredType enumReadValueFromPointer runDestructors new_ craftInvokerFunction embind__requireFunction genericPointerToWireType constNoSmartPtrRawPointerToWireType nonConstNoSmartPtrRawPointerToWireType init_RegisteredPointer RegisteredPointer RegisteredPointer_getPointee RegisteredPointer_destructor RegisteredPointer_deleteObject RegisteredPointer_fromWireType runDestructor releaseClassHandle detachFinalizer attachFinalizer makeClassHandle init_ClassHandle ClassHandle ClassHandle_isAliasOf throwInstanceAlreadyDeleted ClassHandle_clone ClassHandle_delete ClassHandle_isDeleted ClassHandle_deleteLater flushPendingDeletes setDelayFunction RegisteredClass shallowCopyInternalPointer downcastPointer upcastPointer validateThis getStringOrSymbol craftEmvalAllocator emval_get_global emval_lookupTypes emval_allocateDestructors emval_addMethodCaller".split(" ").forEach(function(a) { + "undefined" === typeof globalThis || Object.getOwnPropertyDescriptor(globalThis, a) || Object.defineProperty(globalThis, a, {configurable:!0, get:function() { + var b = "`" + a + "` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line", c = a; + c.startsWith("_") || (c = "$" + a); + b += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=" + c + ")"; + za(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"); + A(b); + }}); + Aa(a); +}); +"run UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 addOnPreRun addOnInit addOnPreMain addOnExit addOnPostRun addRunDependency removeRunDependency FS_createFolder FS_createPath FS_createDataFile FS_createPreloadedFile FS_createLazyFile FS_createLink FS_createDevice FS_unlink out err callMain abort keepRuntimeAlive wasmMemory stackAlloc stackSave stackRestore getTempRet0 setTempRet0 writeStackCookie checkStackCookie intArrayFromBase64 tryParseAsDataURI ptrToString getHeapMax abortOnCannotGrowMemory ENV ERRNO_CODES ERRNO_MESSAGES DNS Protocols Sockets timers warnOnce UNWIND_CACHE readEmAsmArgsArray convertI32PairToI53Checked freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS intArrayToString UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 SYSCALLS JSEvents specialHTMLTargets currentFullscreenStrategy restoreOldWindowedStyle ExitStatus flush_NO_FILESYSTEM dlopenMissingError promiseMap uncaughtExceptionCount exceptionLast exceptionCaught Browser wget FS MEMFS TTY PIPEFS SOCKFS tempFixedLengthArray miniTempWebGLFloatBuffers GL AL SDL SDL_gfx GLUT EGL GLFW GLEW IDBStore InternalError BindingError UnboundTypeError PureVirtualError throwInternalError throwBindingError extendError createNamedFunction embindRepr registeredInstances registeredTypes awaitingDependencies typeDependencies registeredPointers registerType whenDependentTypesAreResolved embind_charCodes embind_init_charCodes readLatin1String getShiftFromSize integerReadValueFromPointer floatReadValueFromPointer simpleReadValueFromPointer tupleRegistrations structRegistrations finalizationRegistry detachFinalizer_deps deletionQueue delayFunction char_0 char_9 makeLegalFunctionName emval_handle_array emval_free_list emval_symbols init_emval count_emval_handles get_first_emval Emval emval_newers emval_methodCallers emval_registeredMethods".split(" ").forEach(Aa); +var Z; +N = function cb() { + Z || db(); + Z || (N = cb); +}; +function db() { + function a() { + if (!Z && (Z = !0, e.calledRun = !0, !z)) { + w(!K); + K = !0; + I(); + Ba(pa); + aa(e); + if (e.onRuntimeInitialized) { + e.onRuntimeInitialized(); + } + w(!e._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'); + I(); + if (e.postRun) { + for ("function" == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length;) { + var b = e.postRun.shift(); + qa.unshift(b); + } + } + Ba(qa); + } + } + if (!(0 < L)) { + bb(); + ka(); + if (e.preRun) { + for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) { + ra(); + } + } + Ba(oa); + 0 < L || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + e.setStatus(""); + }, 1); + a(); + }, 1)) : a(), I()); + } +} +if (e.preInit) { + for ("function" == typeof e.preInit && (e.preInit = [e.preInit]); 0 < e.preInit.length;) { + e.preInit.pop()(); + } +} +db(); + + + + return create_powders +} + +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = create_powders; +else if (typeof define === 'function' && define['amd']) + define([], function() { return create_powders; }); +else if (typeof exports === 'object') + exports["create_powders"] = create_powders; diff --git a/js/c++/utils.cpp b/js/c++/utils.cpp new file mode 100644 index 0000000..b39d533 --- /dev/null +++ b/js/c++/utils.cpp @@ -0,0 +1,50 @@ +#ifdef __EMSCRIPTEN__ +#include +using namespace emscripten; +#endif + +#include "utils.h" +#include + +/** + * Clamp number between low and high values. + * + * @param num: value to clamp + * @param low + * @param high + * + * @return clamped value + */ +float clamp(float num, float low, float high) { + return std::min(std::max(num, low), high); +} + +// Permutations in js reference (also cool algorithm): +// https://stackoverflow.com/a/41068709 +//function perm(a){ +// if (a.length == 0) return [[]]; +// var r = [[a[0]]], +// t = [], +// s = []; +// if (a.length == 1) return r; +// for (var i = 1, la = a.length; i < la; i++){ +// for (var j = 0, lr = r.length; j < lr; j++){ +// r[j].push(a[i]); +// t.push(r[j]); +// for(var k = 1, lrj = r[j].length; k < lrj; k++){ +// for (var l = 0; l < lrj; l++) s[l] = r[j][(k+l)%lrj]; +// t[t.length] = s; +// s = []; +// } +// } +// r = t; +// t = []; +// } +// return r; +//} + +#ifdef __EMSCRIPTEN__ +EMSCRIPTEN_BINDINGS(utils) { + function("clamp", &clamp); +} +#endif diff --git a/js/c++/utils.h b/js/c++/utils.h new file mode 100644 index 0000000..7a87738 --- /dev/null +++ b/js/c++/utils.h @@ -0,0 +1,12 @@ +#pragma once + +/** + * Clamp number between low and high values. + * + * @param num: value to clamp + * @param low + * @param high + * + * @return clamped value + */ +float clamp(float num, float low, float high); diff --git a/js/c++/utils.js.in b/js/c++/utils.js.in new file mode 100644 index 0000000..c918f4c --- /dev/null +++ b/js/c++/utils.js.in @@ -0,0 +1,999 @@ +let getUrl = window.location; +const url_base = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1]; + +const _module_utils = create_utils(); +const clamp = _module_utils.clamp; + +// huge regex :doom: +// replace with navigator.userAgentData.mobile once it has wider support +const isMobile = function() { + let check = false; + (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); + return check; +}(); // runs immediately, so mobileCheck is a boolean not a function + +const zip2 = (a, b) => a.map((k, i) => [k, b[i]]); +const zip3 = (a, b, c) => a.map((k, i) => [k, b[i], c[i]]); + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +// Permutations in js reference (also cool algorithm): +// https://stackoverflow.com/a/41068709 +function perm(a){ + if (a.length == 0) return [[]]; + var r = [[a[0]]], + t = [], + s = []; + if (a.length == 1) return r; + for (var i = 1, la = a.length; i < la; i++){ + for (var j = 0, lr = r.length; j < lr; j++){ + r[j].push(a[i]); + t.push(r[j]); + for(var k = 1, lrj = r[j].length; k < lrj; k++){ + for (var l = 0; l < lrj; l++) s[l] = r[j][(k+l)%lrj]; + t[t.length] = s; + s = []; + } + } + r = t; + t = []; + } + return r; +} + +function round_near(value) { + let eps = 0.00000001; + if (Math.abs(value - Math.round(value)) < eps) { + return Math.round(value); + } + return value; +} + +function setText(id, text) { + document.getElementById(id).textContent = text; +} + +function setHTML(id, html) { + document.getElementById(id).innerHTML = html; +} + +function setValue(id, value) { + let el = document.getElementById(id); + if (el == null) { + console.log("WARN tried to set text value of id {"+id+"} to ["+value+"] but did not exist!"); + return; + } + el.value = value; + el.dispatchEvent(new Event("change")); +} + +function getValue(id) { + return document.getElementById(id).value; +} + +function log(b, n) { + return Math.log(n) / Math.log(b); +} + +// Base 64 encoding tools +// https://stackoverflow.com/a/27696695 +// Modified for fixed precision + +// Base64.fromInt(-2147483648); // gives "200000" +// Base64.toInt("200000"); // gives -2147483648 +Base64 = (function () { + var digitsStr = + // 0 8 16 24 32 40 48 56 63 + // v v v v v v v v v + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-"; + var digits = digitsStr.split(''); + var digitsMap = {}; + for (var i = 0; i < digits.length; i++) { + digitsMap[digits[i]] = i; + } + return { + fromIntV: function(int32) { + var result = ''; + while (true) { + result = digits[int32 & 0x3f] + result; + int32 >>>= 6; + if (int32 === 0) + break; + } + return result; + }, + fromIntN: function(int32, n) { + var result = ''; + for (let i = 0; i < n; ++i) { + result = digits[int32 & 0x3f] + result; + int32 >>= 6; + } + return result; + }, + toInt: function(digitsStr) { + var result = 0; + var digits = digitsStr.split(''); + for (var i = 0; i < digits.length; i++) { + result = (result << 6) + digitsMap[digits[i]]; + } + return result; + }, + toIntSigned: function(digitsStr) { + var result = 0; + var digits = digitsStr.split(''); + if (digits[0] && (digitsMap[digits[0]] & 0x20)) { + result = -1; + } + for (var i = 0; i < digits.length; i++) { + result = (result << 6) + digitsMap[digits[i]]; + } + return result; + } + }; +})(); + + +/** A class used to represent an arbitrary length bit vector. Very useful for encoding and decoding. + * + */ + class BitVector { + + /** Constructs an arbitrary-length bit vector. + * @class + * @param {String | Number} data - The data to append. + * @param {Number} length - A set length for the data. Ignored if data is a string. + * + * The structure of the Uint32Array should be [[last, ..., first], ..., [last, ..., first], [empty space, last, ..., first]] + */ + constructor(data, length) { + let bit_vec = []; + + if (typeof data === "string") { + let int = 0; + let bv_idx = 0; + length = data.length * 6; + + for (let i = 0; i < data.length; i++) { + let char = Base64.toInt(data[i]); + let pre_pos = bv_idx % 32; + int |= (char << bv_idx); + bv_idx += 6; + let post_pos = bv_idx % 32; + if (post_pos < pre_pos) { //we have to have filled up the integer + bit_vec.push(int); + int = (char >>> (6 - post_pos)); + } + + if (i == data.length - 1 && post_pos != 0) { + bit_vec.push(int); + } + } + } else if (typeof data === "number") { + if (typeof length === "undefined") + if (length < 0) { + throw new RangeError("BitVector must have nonnegative length."); + } + + //convert to int just in case + data = Math.round(data); + + //range of numbers that won't fit in a uint32 + if (data > 2**32 - 1 || data < -(2 ** 32 - 1)) { + throw new RangeError("Numerical data has to fit within a 32-bit integer range to instantiate a BitVector."); + } + bit_vec.push(data); + } else { + throw new TypeError("BitVector must be instantiated with a Number or a B64 String"); + } + + this.length = length; + this.bits = new Uint32Array(bit_vec); + } + + /** Return value of bit at index idx. + * + * @param {Number} idx - The index to read + * + * @returns The bit value at position idx + */ + read_bit(idx) { + if (idx < 0 || idx >= this.length) { + throw new RangeError("Cannot read bit outside the range of the BitVector. ("+idx+" > "+this.length+")"); + } + return ((this.bits[Math.floor(idx / 32)] & (1 << idx)) == 0 ? 0 : 1); + } + + /** Returns an integer value (if possible) made from the range of bits [start, end). Undefined behavior if the range to read is too big. + * + * @param {Number} start - The index to start slicing from. Inclusive. + * @param {Number} end - The index to end slicing at. Exclusive. + * + * @returns An integer representation of the sliced bits. + */ + slice(start, end) { + //TO NOTE: JS shifting is ALWAYS in mod 32. a << b will do a << (b mod 32) implicitly. + + if (end < start) { + throw new RangeError("Cannot slice a range where the end is before the start."); + } else if (end == start) { + return 0; + } else if (end - start > 32) { + //requesting a slice of longer than 32 bits (safe integer "length") + throw new RangeError("Cannot slice a range of longer than 32 bits (unsafe to store in an integer)."); + } + + let res = 0; + if (Math.floor((end - 1) / 32) == Math.floor(start / 32)) { + //the range is within 1 uint32 section - do some relatively fast bit twiddling + res = (this.bits[Math.floor(start / 32)] & ~((((~0) << ((end - 1))) << 1) | ~((~0) << (start)))) >>> (start % 32); + } else { + //the number of bits in the uint32s + let start_pos = (start % 32); + let int_idx = Math.floor(start/32); + res = (this.bits[int_idx] & ((~0) << (start))) >>> (start_pos); + res |= (this.bits[int_idx + 1] & ~((~0) << (end))) << (32 - start_pos); + } + + return res; + + // General code - slow + // for (let i = start; i < end; i++) { + // res |= (get_bit(i) << (i - start)); + // } + } + + /** Assign bit at index idx to 1. + * + * @param {Number} idx - The index to set. + */ + set_bit(idx) { + if (idx < 0 || idx >= this.length) { + throw new RangeError("Cannot set bit outside the range of the BitVector."); + } + this.bits[Math.floor(idx / 32)] |= (1 << idx % 32); + } + + /** Assign bit at index idx to 0. + * + * @param {Number} idx - The index to clear. + */ + clear_bit(idx) { + if (idx < 0 || idx >= this.length) { + throw new RangeError("Cannot clear bit outside the range of the BitVector."); + } + this.bits[Math.floor(idx / 32)] &= ~(1 << idx % 32); + } + + /** Creates a string version of the bit vector in B64. Does not keep the order of elements a sensible human readable format. + * + * @returns A b64 string representation of the BitVector. + */ + toB64() { + if (this.length == 0) { + return ""; + } + let b64_str = ""; + let i = 0; + while (i < this.length) { + b64_str += Base64.fromIntV(this.slice(i, i + 6), 1); + i += 6; + } + + return b64_str; + } + + /** Returns a BitVector in bitstring format. Probably only useful for dev debugging. + * + * @returns A bit string representation of the BitVector. Goes from higher-indexed bits to lower-indexed bits. (n ... 0) + */ + toString() { + let ret_str = ""; + for (let i = 0; i < this.length; i++) { + ret_str = (this.read_bit(i) == 0 ? "0": "1") + ret_str; + } + return ret_str; + } + + /** Returns a BitVector in bitstring format. Probably only useful for dev debugging. + * + * @returns A bit string representation of the BitVector. Goes from lower-indexed bits to higher-indexed bits. (0 ... n) + */ + toStringR() { + let ret_str = ""; + for (let i = 0; i < this.length; i++) { + ret_str += (this.read_bit(i) == 0 ? "0": "1"); + } + return ret_str; + } + + /** Appends data to the BitVector. + * + * @param {Number | String} data - The data to append. + * @param {Number} length - The length, in bits, of the new data. This is ignored if data is a string. + */ + append(data, length) { + if (length < 0) { + throw new RangeError("BitVector length must increase by a nonnegative number."); + } + + let bit_vec = []; + for (const uint of this.bits) { + bit_vec.push(uint); + } + if (typeof data === "string") { + let int = bit_vec[bit_vec.length - 1]; + let bv_idx = this.length; + length = data.length * 6; + let updated_curr = false; + for (let i = 0; i < data.length; i++) { + let char = Base64.toInt(data[i]); + let pre_pos = bv_idx % 32; + int |= (char << bv_idx); + bv_idx += 6; + let post_pos = bv_idx % 32; + if (post_pos < pre_pos) { //we have to have filled up the integer + if (bit_vec.length == this.bits.length && !updated_curr) { + bit_vec[bit_vec.length - 1] = int; + updated_curr = true; + } else { + bit_vec.push(int); + } + int = (char >>> (6 - post_pos)); + } + + if (i == data.length - 1) { + if (bit_vec.length == this.bits.length && !updated_curr) { + bit_vec[bit_vec.length - 1] = int; + } else if (post_pos != 0) { + bit_vec.push(int); + } + } + } + } else if (typeof data === "number") { + //convert to int just in case + let int = Math.round(data); + + //range of numbers that "could" fit in a uint32 -> [0, 2^32) U [-2^31, 2^31) + if (data > 2**32 - 1 || data < -(2 ** 31)) { + throw new RangeError("Numerical data has to fit within a 32-bit integer range to instantiate a BitVector."); + } + //could be split between multiple new ints + //reminder that shifts implicitly mod 32 + bit_vec[bit_vec.length - 1] |= ((int & ~((~0) << length)) << (this.length)); + if (((this.length - 1) % 32 + 1) + length > 32) { + bit_vec.push(int >>> (32 - this.length)); + } + } else { + throw new TypeError("BitVector must be appended with a Number or a B64 String"); + } + + this.bits = new Uint32Array(bit_vec); + this.length += length; + } +}; + + +/* + Turns a raw stat and a % stat into a final stat on the basis that - raw and >= 100% becomes 0 and + raw and <=-100% becomes negative. + Pct would be 0.80 for 80%, -1.20 for 120%, etc + Example Outputs: + raw: -100 + pct: +0.20, output = -80 + pct: +1.20, output = 0 + pct: -0.20, output = -120 + pct: -1.20, output = -220 + + raw: +100 + pct: +0.20, output = 120 + pct: +1.20, output = 220 + pct: -0.20, output = 80 + pct: -1.20, output = -20 +*/ +function rawToPct(raw, pct){ + final = 0; + if (raw < 0){ + final = (Math.min(0, raw - (raw * pct) )); + }else if(raw > 0){ + final = raw + (raw * pct); + }else{ //do nothing - final's already 0 + } + return final; +} + +/* + * Clipboard utilities + * From: https://stackoverflow.com/a/30810322 + */ +function fallbackCopyTextToClipboard(text) { + var textArea = document.createElement("textarea"); + + // + // *** This styling is an extra step which is likely not required. *** + // + // Why is it here? To ensure: + // 1. the element is able to have focus and selection. + // 2. if the element was to flash render it has minimal visual impact. + // 3. less flakyness with selection and copying which **might** occur if + // the textarea element is not visible. + // + // The likelihood is the element won't even render, not even a + // flash, so some of these are just precautions. However in + // Internet Explorer the element is visible whilst the popup + // box asking the user for permission for the web page to + // copy to the clipboard. + // + + // Place in the top-left corner of screen regardless of scroll position. + textArea.style.position = 'fixed'; + textArea.style.top = 0; + textArea.style.left = 0; + + // Ensure it has a small width and height. Setting to 1px / 1em + // doesn't work as this gives a negative w/h on some browsers. + textArea.style.width = '2em'; + textArea.style.height = '2em'; + + // We don't need padding, reducing the size if it does flash render. + textArea.style.padding = 0; + + // Clean up any borders. + textArea.style.border = 'none'; + textArea.style.outline = 'none'; + textArea.style.boxShadow = 'none'; + + // Avoid flash of the white box if rendered for any reason. + textArea.style.background = 'transparent'; + + + textArea.value = text; + + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + + try { + var successful = document.execCommand('copy'); + var msg = successful ? 'successful' : 'unsuccessful'; + console.log('Copying text command was ' + msg); + } catch (err) { + console.log('Oops, unable to copy'); + } + + document.body.removeChild(textArea); +} + +function copyTextToClipboard(text) { + if (!navigator.clipboard) { + fallbackCopyTextToClipboard(text); + return; + } + navigator.clipboard.writeText(text).then(function() { + console.log('Async: Copying to clipboard was successful!'); + }, function(err) { + console.error('Async: Could not copy text: ', err); + }); +} + +/** + * Generates a random color using the #(R)(G)(B) format. + */ +function randomColor() { + return '#' + Math.round(Math.random() * 0xFFFFFF).toString(16); +} + +/** + * Generates a random color, but lightning must be relatively high (>0.5). + * + * @returns a random color in RGB 6-bit form. + */ +function randomColorLight() { + return randomColorHSL([0,1],[0,1],[0.5,1]); +} + +/** Generates a random color given HSL restrictions. + * + * @returns a random color in RGB 6-bit form. + */ +function randomColorHSL(h,s,l) { + var letters = '0123456789abcdef'; + let h_var = h[0] + (h[1]-h[0])*Math.random(); //hue + let s_var = s[0] + (s[1]-s[0])*Math.random(); //saturation + let l_var = l[0] + (l[1]-l[0])*Math.random(); //lightness + let rgb = hslToRgb(h_var,s_var,l_var); + let color = "#"; + for (const c of rgb) { + color += letters[Math.floor(c/16)] + letters[c%16]; + } + return color; +} + +/** + * Converts an HSL color value to RGB. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes h, s, and l are contained in the set [0, 1] and + * returns r, g, and b in the set [0, 255]. Not written by wynnbuilder devs. + * + * @param {number} h The hue + * @param {number} s The saturation + * @param {number} l The lightness + * @return {Array} The RGB representation + */ + function hslToRgb(h, s, l){ + var r, g, b; + + if(s == 0){ + r = g = b = l; // achromatic + }else{ + var hue2rgb = function hue2rgb(p, q, t){ + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; +} + +/** Creates a tooltip. + * + * @param {DOM Element} elem - the element to make a tooltip + * @param {String} element_type - the HTML element type that the tooltiptext should be. + * @param {String} tooltiptext - the text to display in the tooltip. + * @param {DOM Element} parent - the parent elem. optional. + * @param {String[]} classList - a list of classes to add to the element. + */ +function createTooltip(elem, element_type, tooltiptext, parent, classList) { + elem = document.createElement(element_type); + elem.classList.add("tooltiptext"); + if (tooltiptext.includes("\n")) { + let texts = tooltiptext.split("\n"); + for (const t of texts) { + let child = document.createElement(element_type); + child.textContent = t; + elem.appendChild(child); + } + } else { + elem.textContent = tooltiptext; + } + for (const c of classList) { + elem.classList.add(c); + } + if (parent) { + parent.classList.add("tooltip"); + parent.appendChild(elem); + } + return elem; +} + +/** A generic function that toggles the on and off state of a button. + * + * @param {String} button_id - the id name of the button. + */ +function toggleButton(button_id) { + let elem = document.getElementById(button_id); + if (elem.tagName === "BUTTON") { + if (elem.classList.contains("toggleOn")) { //toggle the pressed button off + elem.classList.remove("toggleOn"); + } else { + elem.classList.add("toggleOn"); + } + } +} + +/** + * If the input object is undefined, make it "match" the target type + * with default value (0 or empty str). + */ +function matchType(object, target) { + if (typeof object === 'undefined') { + switch (target) { + case 'string': + return ""; + case 'number': + return 0; + case 'undefined': + return undefined; + default: + throw new Error(`Incomparable type ${target}`); + } + } + return object; +} + +/** A utility function that reloads the page forcefully. + * + */ +async function hardReload() { + //https://gist.github.com/rmehner/b9a41d9f659c9b1c3340 + try { + const dbs = await window.indexedDB.databases(); + await dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }); + } catch (error) { + // Hacky patch for firefox... + console.log(error); + const db_names = ['item_db', 'ing_db', 'map_db', 'tome_db']; + await db_names.forEach(db => { window.indexedDB.deleteDatabase(db) }); + } + + location.reload(true); +} + + +function capitalizeFirst(str) { + return str[0].toUpperCase() + str.substring(1); +} + +/** https://stackoverflow.com/questions/16839698/jquery-getscript-alternative-in-native-javascript + * If we ever want to write something that needs to import other js files + */ +const getScript = url => new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.src = url; + script.async = true; + + script.onerror = reject; + + script.onload = script.onreadystatechange = function () { + const loadState = this.readyState; + + if (loadState && loadState !== 'loaded' && loadState !== 'complete') return + + script.onload = script.onreadystatechange = null; + + resolve(); + } + + document.head.appendChild(script); +}) + +/* +GENERIC TEST FUNCTIONS +*/ +/** The generic assert function. Fails on all "false-y" values. Useful for non-object equality checks, boolean value checks, and existence checks. + * + * @param {*} arg - argument to assert. + * @param {String} msg - the error message to throw. + */ + function assert(arg, msg) { + if (!arg) { + throw new Error(msg ? msg : "Assert failed."); + } +} + +/** Asserts object equality of the 2 parameters. For loose and strict asserts, use assert(). + * + * @param {*} arg1 - first argument to compare. + * @param {*} arg2 - second argument to compare. + * @param {String} msg - the error message to throw. + */ +function assert_equals(arg1, arg2, msg) { + if (!Object.is(arg1, arg2)) { + throw new Error(msg ? msg : "Assert Equals failed. " + arg1 + " is not " + arg2 + "."); + } +} + +/** Asserts object inequality of the 2 parameters. For loose and strict asserts, use assert(). + * + * @param {*} arg1 - first argument to compare. + * @param {*} arg2 - second argument to compare. + * @param {String} msg - the error message to throw. + */ + function assert_not_equals(arg1, arg2, msg) { + if (Object.is(arg1, arg2)) { + throw new Error(msg ? msg : "Assert Not Equals failed. " + arg1 + " is " + arg2 + "."); + } +} + +/** Asserts proximity between 2 arguments. Should be used for any floating point datatype. + * + * @param {*} arg1 - first argument to compare. + * @param {*} arg2 - second argument to compare. + * @param {Number} epsilon - the margin of error (<= del difference is ok). Defaults to -1E5. + * @param {String} msg - the error message to throw. + */ +function assert_near(arg1, arg2, epsilon = 1E-5, msg) { + if (Math.abs(arg1 - arg2) > epsilon) { + throw new Error(msg ? msg : "Assert Near failed. " + arg1 + " is not within " + epsilon + " of " + arg2 + "."); + } +} + +/** Asserts that the input argument is null. + * + * @param {*} arg - the argument to test for null. + * @param {String} msg - the error message to throw. + */ +function assert_null(arg, msg) { + if (arg !== null) { + throw new Error(msg ? msg : "Assert Near failed. " + arg + " is not null."); + } +} + +/** Asserts that the input argument is undefined. + * + * @param {*} arg - the argument to test for undefined. + * @param {String} msg - the error message to throw. + */ + function assert_undefined(arg, msg) { + if (arg !== undefined) { + throw new Error(msg ? msg : "Assert Near failed. " + arg + " is not undefined."); + } +} + +/** Asserts that there is an error when a callback function is run. + * + * @param {Function} func_binding - a function binding to run. Can be passed in with func.bind(null, arg1, ..., argn) + * @param {String} msg - the error message to throw. + */ +function assert_error(func_binding, msg) { + try { + func_binding(); + } catch (err) { + return; + } + throw new Error(msg ? msg : "Function didn't throw an error."); +} + +/** + * Deep copy object/array of basic types. + */ +function deepcopy(obj, refs=undefined) { + if (refs === undefined) { + refs = new Map(); + } + if (typeof(obj) !== 'object' || obj === null) { // null or value type + return obj; + } + let ret = Array.isArray(obj) ? [] : {}; + for (let key in obj) { + let val; + try { + val = obj[key]; + } catch (exc) { + console.trace(); + val = undefined; + } + if (typeof(obj) === 'object') { + if (refs.has(val)) { + ret[key] = refs.get(val); + } + else { + refs.set(val, val); + ret[key] = deepcopy(val, refs); + } + } + else { + ret[key] = val; + } + } + return ret; +} + + +/** + * + */ +function gen_slider_labeled({label_name, label_classlist = [], min = 0, max = 100, step = 1, default_val = min, id = undefined, color = "#FFFFFF", classlist = []}) { + let slider_container = document.createElement("div"); + slider_container.classList.add("col"); + + let buf_col = document.createElement("div"); + + let label = document.createElement("div"); + label.classList.add(...label_classlist); + label.textContent = label_name + ": " + default_val; + + let slider = gen_slider(min, max, step, default_val, id, color, classlist, label); + + //we set IDs here because the slider's id is potentially only meaningful after gen_slider() is called + label.id = slider.id + "_label"; + slider_container.id = slider.id + "-container"; + + buf_col.append(slider, label); + slider_container.appendChild(buf_col); + + return slider_container; +} + +/** Creates a slider input (input type = range) given styling parameters + * + * @param {Number | String} min - The minimum value for the slider. defaults to 0 + * @param {Number | String} max - The maximum value for the slider. defaults to 100 + * @param {Number | String} step - The granularity between possible values. defaults to 1 + * @param {Number | String} default_val - The default value to set the slider to. + * @param {String} id - The element ID to use for the slider. defaults to the current date time + * @param {String} color - The hex color to use for the slider. Needs the # character. + * @param {Array} classlist - A list of classes to add to the slider. + * @returns + */ +function gen_slider(min = 0, max = 100, step = 1, default_val = min, id = undefined, color = "#FFFFFF", classlist = [], label = undefined) { + //simple attribute vals + let slider = document.createElement("input"); + slider.type = "range"; + slider.min = min; + slider.max = max; + slider.step = step; + slider.value = default_val; + slider.autocomplete = "off"; + if (id) { + if (document.getElementById(id)) { + throw new Error("ID " + id + " already exists within the DOM.") + } else { + slider.id = id; + } + } else { + slider.id = new Date().toLocaleTimeString(); + } + slider.color = color; + slider.classList.add(...classlist); //special spread operator - + //necessary for display purposes + slider.style.webkitAppearance = "none"; + slider.style.borderRadius = "30px"; + slider.style.height = "0.5rem"; + slider.classList.add("px-0", "slider"); + + //set up recoloring + slider.addEventListener("change", function(e) { + recolor_slider(slider, label); + }); + //do recoloring for the default val + let pct = Math.round(100 * (parseInt(slider.value) - parseInt(slider.min)) / (parseInt(slider.max) - parseInt(slider.min))); + slider.style.background = `rgba(0, 0, 0, 0) linear-gradient(to right, ${color}, ${color} ${pct}%, #AAAAAA ${pct}%, #AAAAAA 100%)`; + + //return slider + return slider; +} + +/** Recolors a slider. If the corresponding label exists, also update that. + * + * @param {slider} slider - the slider element + * @param {label} label - the label element + */ +function recolor_slider(slider, label) { + let color = slider.color; + let pct = Math.round(100 * (parseInt(slider.value) - parseInt(slider.min)) / (parseInt(slider.max) - parseInt(slider.min))); + slider.style.background = `rgba(0, 0, 0, 0) linear-gradient(to right, ${color}, ${color} ${pct}%, #AAAAAA ${pct}%, #AAAAAA 100%)`; + + if (label) { + //convention is that the number goes at the end... I parse by separating it at ':' + label.textContent = label.textContent.split(":")[0] + ": " + slider.value; + } +} + +/** + * Shorthand for making an element in html. + * + * @param {String} type : type of element + * @param {List[String]} classlist : css classes for element + * @param {Map[String, String]} args : Properties for the element + */ +function make_elem(type, classlist = [], args = {}) { + const ret_elem = document.createElement(type); + ret_elem.classList.add(...classlist); + for (const i in args) { + if (i === 'style') { + const style_obj = args[i]; + if (typeof style_obj === 'string' || style_obj instanceof String) { + ret_elem.style = style_obj; + continue; + } + for (const k in style_obj) { + ret_elem.style[k] = style_obj[k]; + } + continue; + } + ret_elem[i] = args[i]; + } + return ret_elem; +} + +/** + * Nodes must have: + * node: { + * parents: List[node] + * children: List[node] + * } + * + * This function will define: "visited, assigned, scc" properties + * Assuming a connected graph. (only one root) + */ +function make_SCC_graph(root_node, nodes) { + for (const node of nodes) { + node.visited = false; + node.assigned = false; + node.scc = null; + } + const res = [] + /* + * SCC graph construction. + * https://en.wikipedia.org/wiki/Kosaraju%27s_algorithm + */ + function visit(u, res) { + if (u.visited) { return; } + u.visited = true; + for (const child of u.children) { + if (!child.visited) { visit(child, res); } + } + res.push(u); + } + visit(root_node, res); + res.reverse(); + const sccs = []; + function assign(node, cur_scc) { + if (node.assigned) { return; } + cur_scc.nodes.push(node); + node.scc = cur_scc; + node.assigned = true; + for (const parent of node.parents) { + assign(parent, cur_scc); + } + } + for (const node of res) { + if (node.assigned) { continue; } + const cur_scc = { + nodes: [], + children: new Set(), + parents: new Set() + }; + assign(node, cur_scc); + sccs.push(cur_scc); + } + for (const scc of sccs) { + for (const node of scc.nodes) { + for (const child of node.children) { + scc.children.add(child.scc); + } + for (const parent of node.parents) { + scc.parents.add(parent.scc); + } + } + } + return sccs; +} + + +// Toggles display of a certain element, given the ID. +function toggle_tab(tab) { + let elem = document.getElementById(tab); + if (elem.style.display == "none") { + elem.style.display = ""; + } else { + elem.style.display = "none"; + } +} + +// Toggle display of a certain tab, in a group of tabs, given the target tab ID, and a list of associated tabs. +// Also sets visual display of an element with ID of target + "-btn" to selected. +function show_tab(target, tabs) { + //hide all tabs, then show the tab of the div clicked and highlight the correct button + for (const i in tabs) { + document.getElementById(tabs[i]).style.display = "none"; + document.getElementById(tabs[i] + "-btn").classList.remove("selected-btn"); + } + document.getElementById(target).style.display = ""; + document.getElementById(target + "-btn").classList.add("selected-btn"); +} + +// mobile navbar appearance control +let scrollPos = 0 +if (screen.width < 992) { + document.addEventListener('scroll', (e) => { + if (document.documentElement.scrollTop - scrollPos > 20) { + document.getElementById("mobile-navbar").style.display = "none"; + document.getElementById("mobile-navbar-dropdown").style.display = "none"; + } else if (document.documentElement.scrollTop - scrollPos < -50 || scrollPos < 70) { + document.getElementById("mobile-navbar").style.display = ""; + } + scrollPos = document.documentElement.scrollTop; + }); +} diff --git a/js/c++/utils.js.out b/js/c++/utils.js.out new file mode 100644 index 0000000..59169c8 --- /dev/null +++ b/js/c++/utils.js.out @@ -0,0 +1,1019 @@ + +var create_utils = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + + return ( +function(create_utils = {}) { + +var e; +e || (e = typeof create_utils !== 'undefined' ? create_utils : {}); +var aa, ba; +e.ready = new Promise(function(a, b) { + aa = a; + ba = b; +}); +["_main", "___getTypeName", "__embind_initialize_bindings", "_fflush", "onRuntimeInitialized"].forEach(a => { + Object.getOwnPropertyDescriptor(e.ready, a) || Object.defineProperty(e.ready, a, {get:() => p("You are getting " + a + " 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"), set:() => p("You are setting " + a + " 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 ca = Object.assign({}, e); +if (e.ENVIRONMENT) { + throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)"); +} +var t = ""; +"undefined" != typeof document && document.currentScript && (t = document.currentScript.src); +_scriptDir && (t = _scriptDir); +0 !== t.indexOf("blob:") ? t = t.substr(0, t.replace(/[?#].*/, "").lastIndexOf("/") + 1) : t = ""; +if ("object" != typeof window && "function" != typeof importScripts) { + throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)"); +} +var da = e.print || console.log.bind(console), v = e.printErr || console.warn.bind(console); +Object.assign(e, ca); +ca = null; +Object.getOwnPropertyDescriptor(e, "fetchSettings") && p("`Module.fetchSettings` was supplied but `fetchSettings` not included in INCOMING_MODULE_JS_API"); +w("arguments", "arguments_"); +w("thisProgram", "thisProgram"); +w("quit", "quit_"); +x("undefined" == typeof e.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"); +x("undefined" == typeof e.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"); +x("undefined" == typeof e.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"); +x("undefined" == typeof e.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"); +x("undefined" == typeof e.read, "Module.read option was removed (modify read_ in JS)"); +x("undefined" == typeof e.readAsync, "Module.readAsync option was removed (modify readAsync in JS)"); +x("undefined" == typeof e.readBinary, "Module.readBinary option was removed (modify readBinary in JS)"); +x("undefined" == typeof e.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"); +x("undefined" == typeof e.TOTAL_MEMORY, "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"); +w("read", "read_"); +w("readAsync", "readAsync"); +w("readBinary", "readBinary"); +w("setWindowTitle", "setWindowTitle"); +x(!0, "worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."); +x(!0, "node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."); +x(!0, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."); +var ea; +e.wasmBinary && (ea = e.wasmBinary); +w("wasmBinary", "wasmBinary"); +var noExitRuntime = e.noExitRuntime || !0; +w("noExitRuntime", "noExitRuntime"); +"object" != typeof WebAssembly && p("no native wasm support detected"); +var fa, y = !1; +function x(a, b) { + a || p("Assertion failed" + (b ? ": " + b : "")); +} +var ha = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0; +function ia(a, b, c) { + var d = b + c; + for (c = b; a[c] && !(c >= d);) { + ++c; + } + if (16 < c - b && a.buffer && ha) { + return ha.decode(a.subarray(b, c)); + } + for (d = ""; b < c;) { + var f = a[b++]; + if (f & 128) { + var h = a[b++] & 63; + if (192 == (f & 224)) { + d += String.fromCharCode((f & 31) << 6 | h); + } else { + var m = a[b++] & 63; + 224 == (f & 240) ? f = (f & 15) << 12 | h << 6 | m : (240 != (f & 248) && z("Invalid UTF-8 leading byte " + A(f) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), f = (f & 7) << 18 | h << 12 | m << 6 | a[b++] & 63); + 65536 > f ? d += String.fromCharCode(f) : (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)); + } + } else { + d += String.fromCharCode(f); + } + } + return d; +} +var B, C, D, E, H, I, ja, ka; +x(!e.STACK_SIZE, "STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"); +x("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"); +x(!e.wasmMemory, "Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"); +x(!e.INITIAL_MEMORY, "Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"); +var J; +function la() { + var a = ma(); + x(0 == (a & 3)); + 0 == a && (a += 4); + I[a >> 2] = 34821223; + I[a + 4 >> 2] = 2310721022; + I[0] = 1668509029; +} +function na() { + if (!y) { + var a = ma(); + 0 == a && (a += 4); + var b = I[a >> 2], c = I[a + 4 >> 2]; + 34821223 == b && 2310721022 == c || p("Stack overflow! Stack cookie has been overwritten at " + A(a) + ", expected hex dwords 0x89BACDFE and 0x2135467, but received " + A(c) + " " + A(b)); + 1668509029 !== I[0] && p("Runtime error: The application has corrupted its heap memory area (address zero)!"); + } +} +var oa = new Int16Array(1), pa = new Int8Array(oa.buffer); +oa[0] = 25459; +if (115 !== pa[0] || 99 !== pa[1]) { + throw "Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"; +} +var qa = [], ra = [], sa = [], ta = !1; +function ua() { + var a = e.preRun.shift(); + qa.unshift(a); +} +x(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +x(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +x(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"); +x(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 L = 0, M = null, N = null, O = {}; +function va() { + L++; + e.monitorRunDependencies && e.monitorRunDependencies(L); + x(!O["wasm-instantiate"]); + O["wasm-instantiate"] = 1; + null === M && "undefined" != typeof setInterval && (M = setInterval(function() { + if (y) { + clearInterval(M), M = null; + } else { + var a = !1, b; + for (b in O) { + a || (a = !0, v("still waiting on run dependencies:")), v("dependency: " + b); + } + a && v("(end of list)"); + } + }, 10000)); +} +function p(a) { + if (e.onAbort) { + e.onAbort(a); + } + a = "Aborted(" + a + ")"; + v(a); + y = !0; + a = new WebAssembly.RuntimeError(a); + ba(a); + throw a; +} +function wa() { + p("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM"); +} +e.FS_createDataFile = function() { + wa(); +}; +e.FS_createPreloadedFile = function() { + wa(); +}; +function xa(a) { + return a.startsWith("data:application/octet-stream;base64,"); +} +function P(a) { + var b = ya; + return function() { + var c = b; + b || (c = e.asm); + x(ta, "native function `" + a + "` called before runtime initialization"); + c[a] || x(c[a], "exported native function `" + a + "` not found"); + return c[a].apply(null, arguments); + }; +} +var R; +R = "data:application/octet-stream;base64,AGFzbQEAAAABlIGAgAAWYAF/AX9gAX8AYAAAYAABf2ADf39/AX9gBX9/f39/AGACf38Bf2AEf39/fwBgBn9/f39/fwBgAn9/AGADf39/AGADf35/AX5gB39/f39/f38AYAR/f39/AX9gA319fQF9YAV/f39/fwF/YAR/fX19AX1gAX0BfWABfwF9YAR/f35/AX5gBX9/f35+AGAEf35/fwF/AtaDgIAADwNlbnYZX2VtYmluZF9yZWdpc3Rlcl9mdW5jdGlvbgAMA2VudhVfZW1iaW5kX3JlZ2lzdGVyX3ZvaWQACQNlbnYVX2VtYmluZF9yZWdpc3Rlcl9ib29sAAUDZW52GF9lbWJpbmRfcmVnaXN0ZXJfaW50ZWdlcgAFA2VudhZfZW1iaW5kX3JlZ2lzdGVyX2Zsb2F0AAoDZW52G19lbWJpbmRfcmVnaXN0ZXJfc3RkX3N0cmluZwAJA2VudhxfZW1iaW5kX3JlZ2lzdGVyX3N0ZF93c3RyaW5nAAoDZW52Fl9lbWJpbmRfcmVnaXN0ZXJfZW12YWwACQNlbnYcX2VtYmluZF9yZWdpc3Rlcl9tZW1vcnlfdmlldwAKA2VudhVlbXNjcmlwdGVuX21lbWNweV9iaWcACgNlbnYWZW1zY3JpcHRlbl9yZXNpemVfaGVhcAAAFndhc2lfc25hcHNob3RfcHJldmlldzEIZmRfY2xvc2UAABZ3YXNpX3NuYXBzaG90X3ByZXZpZXcxCGZkX3dyaXRlAA0DZW52F19lbWJpbmRfcmVnaXN0ZXJfYmlnaW50AAwWd2FzaV9zbmFwc2hvdF9wcmV2aWV3MQdmZF9zZWVrAA8D1YC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3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAAAACAEAIAgBAMAGAQBTdDl0eXBlX2luZm8AAAAA2AcBAFQIAQAAQfCQBAucATALAQAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAcAAAAcCwEAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAP//////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeAgBAA=="; +if (!xa(R)) { + var za = R; + R = e.locateFile ? e.locateFile(za, t) : t + za; +} +function Aa(a) { + var b = R; + try { + a: { + try { + if (b == R && ea) { + var c = new Uint8Array(ea); + break a; + } + if (xa(b)) { + try { + var d = Ba(b.slice(37)), f = new Uint8Array(d.length); + for (b = 0; b < d.length; ++b) { + f[b] = d.charCodeAt(b); + } + var h = f; + } catch (n) { + throw Error("Converting base64 string to bytes failed."); + } + var m = h; + } else { + m = void 0; + } + if (m) { + c = m; + break a; + } + throw "sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"; + } catch (n) { + p(n); + } + c = void 0; + } + var k = new WebAssembly.Module(c); + var g = new WebAssembly.Instance(k, a); + } catch (n) { + throw a = n.toString(), v("failed to compile wasm module: " + a), (a.includes("imported Memory") || a.includes("memory import")) && v("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."), n; + } + return [g, k]; +} +function w(a, b) { + Object.getOwnPropertyDescriptor(e, a) || Object.defineProperty(e, a, {configurable:!0, get:function() { + p("Module." + a + " has been replaced with plain " + b + " (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"); + }}); +} +function Ca(a) { + return "FS_createPath" === a || "FS_createDataFile" === a || "FS_createPreloadedFile" === a || "FS_unlink" === a || "addRunDependency" === a || "FS_createLazyFile" === a || "FS_createDevice" === a || "removeRunDependency" === a; +} +(function(a, b) { + "undefined" !== typeof globalThis && Object.defineProperty(globalThis, a, {configurable:!0, get:function() { + z("`" + a + "` is not longer defined by emscripten. " + b); + }}); +})("buffer", "Please use HEAP8.buffer or wasmMemory.buffer"); +function Da(a) { + Object.getOwnPropertyDescriptor(e, a) || Object.defineProperty(e, a, {configurable:!0, get:function() { + var b = "'" + a + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"; + Ca(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"); + p(b); + }}); +} +function Ea(a) { + for (; 0 < a.length;) { + a.shift()(e); + } +} +function A(a) { + x("number" === typeof a); + return "0x" + a.toString(16).padStart(8, "0"); +} +function z(a) { + S || (S = {}); + S[a] || (S[a] = 1, v(a)); +} +var S; +function Fa(a) { + switch(a) { + case 1: + return 0; + case 2: + return 1; + case 4: + return 2; + case 8: + return 3; + default: + throw new TypeError("Unknown type size: " + a); + } +} +var Ga = void 0; +function T(a) { + for (var b = ""; C[a];) { + b += Ga[C[a++]]; + } + return b; +} +var U = {}, V = {}, Ha = {}; +function Ia(a) { + if (void 0 === a) { + return "_unknown"; + } + a = a.replace(/[^a-zA-Z0-9_]/g, "$"); + var b = a.charCodeAt(0); + return 48 <= b && 57 >= b ? "_" + a : a; +} +function Ja(a, b) { + a = Ia(a); + return {[a]:function() { + return b.apply(this, arguments); + }}[a]; +} +function Ka(a) { + var b = Error, c = Ja(a, function(d) { + this.name = a; + this.message = d; + d = Error(d).stack; + void 0 !== d && (this.stack = this.toString() + "\n" + d.replace(/^Error(:[^\n]*)?\n/, "")); + }); + c.prototype = Object.create(b.prototype); + c.prototype.constructor = c; + c.prototype.toString = function() { + return void 0 === this.message ? this.name : this.name + ": " + this.message; + }; + return c; +} +var La = void 0; +function W(a) { + throw new La(a); +} +var Ma = void 0; +function Na(a, b) { + function c(k) { + k = b(k); + if (k.length !== d.length) { + throw new Ma("Mismatched type converter count"); + } + for (var g = 0; g < d.length; ++g) { + X(d[g], k[g]); + } + } + var d = []; + d.forEach(function(k) { + Ha[k] = a; + }); + var f = Array(a.length), h = [], m = 0; + a.forEach((k, g) => { + V.hasOwnProperty(k) ? f[g] = V[k] : (h.push(k), U.hasOwnProperty(k) || (U[k] = []), U[k].push(() => { + f[g] = V[k]; + ++m; + m === h.length && c(f); + })); + }); + 0 === h.length && c(f); +} +function X(a, b, c = {}) { + if (!("argPackAdvance" in b)) { + throw new TypeError("registerType registeredInstance requires argPackAdvance"); + } + var d = b.name; + a || W('type "' + d + '" must have a positive integer typeid pointer'); + if (V.hasOwnProperty(a)) { + if (c.j) { + return; + } + W("Cannot register type '" + d + "' twice"); + } + V[a] = b; + delete Ha[a]; + U.hasOwnProperty(a) && (b = U[a], delete U[a], b.forEach(f => f())); +} +var Oa = [], Y = [{}, {value:void 0}, {value:null}, {value:!0}, {value:!1}], Pa = a => { + switch(a) { + case void 0: + return 1; + case null: + return 2; + case !0: + return 3; + case !1: + return 4; + default: + var b = Oa.length ? Oa.pop() : Y.length; + Y[b] = {l:1, value:a}; + return b; + } +}; +function Qa(a) { + return this.fromWireType(H[a >> 2]); +} +function Ta(a) { + if (null === a) { + return "null"; + } + var b = typeof a; + return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a; +} +function Ua(a, b) { + switch(b) { + case 2: + return function(c) { + return this.fromWireType(ja[c >> 2]); + }; + case 3: + return function(c) { + return this.fromWireType(ka[c >> 3]); + }; + default: + throw new TypeError("Unknown float type: " + a); + } +} +function Va(a) { + var b = Function; + if (!(b instanceof Function)) { + throw new TypeError("new_ called with constructor type " + typeof b + " which is not a function"); + } + var c = Ja(b.name || "unknownFunctionName", function() { + }); + c.prototype = b.prototype; + c = new c(); + a = b.apply(c, a); + return a instanceof Object ? a : c; +} +function Wa(a) { + for (; a.length;) { + var b = a.pop(); + a.pop()(b); + } +} +function Xa(a, b) { + var c = e; + if (void 0 === c[a].g) { + var d = c[a]; + c[a] = function() { + c[a].g.hasOwnProperty(arguments.length) || W("Function '" + b + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + c[a].g + ")!"); + return c[a].g[arguments.length].apply(this, arguments); + }; + c[a].g = []; + c[a].g[d.i] = d; + } +} +function Ya(a, b, c) { + e.hasOwnProperty(a) ? ((void 0 === c || void 0 !== e[a].g && void 0 !== e[a].g[c]) && W("Cannot register public name '" + a + "' twice"), Xa(a, a), e.hasOwnProperty(c) && W("Cannot register multiple overloads of a function with the same number of arguments (" + c + ")!"), e[a].g[c] = b) : (e[a] = b, void 0 !== c && (e[a].o = c)); +} +function Za(a, b) { + for (var c = [], d = 0; d < a; d++) { + c.push(I[b + 4 * d >> 2]); + } + return c; +} +var $a = []; +function ab(a) { + var b = $a[a]; + b || (a >= $a.length && ($a.length = a + 1), $a[a] = b = J.get(a)); + x(J.get(a) == b, "JavaScript-side Wasm function table mirror is out of date!"); + return b; +} +function bb(a, b) { + x(a.includes("j") || a.includes("p"), "getDynCaller should only be called with i64 sigs"); + var c = []; + return function() { + c.length = 0; + Object.assign(c, arguments); + if (a.includes("j")) { + x("dynCall_" + a in e, "bad function pointer type - dynCall function not found for sig '" + a + "'"); + c && c.length ? x(c.length === a.substring(1).replace(/j/g, "--").length) : x(1 == a.length); + var d = e["dynCall_" + a]; + d = c && c.length ? d.apply(null, [b].concat(c)) : d.call(null, b); + } else { + x(ab(b), "missing table entry in dynCall: " + b), d = ab(b).apply(null, c); + } + return d; + }; +} +function cb(a, b) { + a = T(a); + var c = a.includes("j") ? bb(a, b) : ab(b); + "function" != typeof c && W("unknown function pointer with signature " + a + ": " + b); + return c; +} +var db = void 0; +function eb(a) { + a = fb(a); + var b = T(a); + Z(a); + return b; +} +function gb(a, b) { + function c(h) { + f[h] || V[h] || (Ha[h] ? Ha[h].forEach(c) : (d.push(h), f[h] = !0)); + } + var d = [], f = {}; + b.forEach(c); + throw new db(a + ": " + d.map(eb).join([", "])); +} +function hb(a, b, c) { + switch(b) { + case 0: + return c ? function(d) { + return B[d]; + } : function(d) { + return C[d]; + }; + case 1: + return c ? function(d) { + return D[d >> 1]; + } : function(d) { + return E[d >> 1]; + }; + case 2: + return c ? function(d) { + return H[d >> 2]; + } : function(d) { + return I[d >> 2]; + }; + default: + throw new TypeError("Unknown integer type: " + a); + } +} +var ib = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0; +function jb(a, b) { + x(0 == a % 2, "Pointer passed to UTF16ToString must be aligned to two bytes!"); + var c = a >> 1; + for (var d = c + b / 2; !(c >= d) && E[c];) { + ++c; + } + c <<= 1; + if (32 < c - a && ib) { + return ib.decode(C.subarray(a, c)); + } + c = ""; + for (d = 0; !(d >= b / 2); ++d) { + var f = D[a + 2 * d >> 1]; + if (0 == f) { + break; + } + c += String.fromCharCode(f); + } + return c; +} +function kb(a, b, c) { + x(0 == b % 2, "Pointer passed to stringToUTF16 must be aligned to two bytes!"); + x("number" == typeof c, "stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"); + void 0 === c && (c = 2147483647); + if (2 > c) { + return 0; + } + c -= 2; + var d = b; + c = c < 2 * a.length ? c / 2 : a.length; + for (var f = 0; f < c; ++f) { + D[b >> 1] = a.charCodeAt(f), b += 2; + } + D[b >> 1] = 0; + return b - d; +} +function lb(a) { + return 2 * a.length; +} +function mb(a, b) { + x(0 == a % 4, "Pointer passed to UTF32ToString must be aligned to four bytes!"); + for (var c = 0, d = ""; !(c >= b / 4);) { + var f = H[a + 4 * c >> 2]; + if (0 == f) { + break; + } + ++c; + 65536 <= f ? (f -= 65536, d += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)) : d += String.fromCharCode(f); + } + return d; +} +function nb(a, b, c) { + x(0 == b % 4, "Pointer passed to stringToUTF32 must be aligned to four bytes!"); + x("number" == typeof c, "stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"); + void 0 === c && (c = 2147483647); + if (4 > c) { + return 0; + } + var d = b; + c = d + c - 4; + for (var f = 0; f < a.length; ++f) { + var h = a.charCodeAt(f); + if (55296 <= h && 57343 >= h) { + var m = a.charCodeAt(++f); + h = 65536 + ((h & 1023) << 10) | m & 1023; + } + H[b >> 2] = h; + b += 4; + if (b + 4 > c) { + break; + } + } + H[b >> 2] = 0; + return b - d; +} +function ob(a) { + for (var b = 0, c = 0; c < a.length; ++c) { + var d = a.charCodeAt(c); + 55296 <= d && 57343 >= d && ++c; + b += 4; + } + return b; +} +for (var pb = [null, [], []], qb = Array(256), rb = 0; 256 > rb; ++rb) { + qb[rb] = String.fromCharCode(rb); +} +Ga = qb; +La = e.BindingError = Ka("BindingError"); +Ma = e.InternalError = Ka("InternalError"); +e.count_emval_handles = function() { + for (var a = 0, b = 5; b < Y.length; ++b) { + void 0 !== Y[b] && ++a; + } + return a; +}; +e.get_first_emval = function() { + for (var a = 5; a < Y.length; ++a) { + if (void 0 !== Y[a]) { + return Y[a]; + } + } + return null; +}; +db = e.UnboundTypeError = Ka("UnboundTypeError"); +var Ba = "function" == typeof atob ? atob : function(a) { + var b = "", c = 0; + a = a.replace(/[^A-Za-z0-9\+\/=]/g, ""); + do { + var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + var m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++)); + d = d << 2 | f >> 4; + f = (f & 15) << 4 | h >> 2; + var k = (h & 3) << 6 | m; + b += String.fromCharCode(d); + 64 !== h && (b += String.fromCharCode(f)); + 64 !== m && (b += String.fromCharCode(k)); + } while (c < a.length); + return b; +}, tb = {_embind_register_bigint:function() { +}, _embind_register_bool:function(a, b, c, d, f) { + var h = Fa(c); + b = T(b); + X(a, {name:b, fromWireType:function(m) { + return !!m; + }, toWireType:function(m, k) { + return k ? d : f; + }, argPackAdvance:8, readValueFromPointer:function(m) { + if (1 === c) { + var k = B; + } else if (2 === c) { + k = D; + } else if (4 === c) { + k = H; + } else { + throw new TypeError("Unknown boolean type size: " + b); + } + return this.fromWireType(k[m >> h]); + }, h:null,}); +}, _embind_register_emval:function(a, b) { + b = T(b); + X(a, {name:b, fromWireType:function(c) { + c || W("Cannot use deleted val. handle = " + c); + var d = Y[c].value; + 4 < c && 0 === --Y[c].l && (Y[c] = void 0, Oa.push(c)); + return d; + }, toWireType:function(c, d) { + return Pa(d); + }, argPackAdvance:8, readValueFromPointer:Qa, h:null,}); +}, _embind_register_float:function(a, b, c) { + c = Fa(c); + b = T(b); + X(a, {name:b, fromWireType:function(d) { + return d; + }, toWireType:function(d, f) { + if ("number" != typeof f && "boolean" != typeof f) { + throw new TypeError('Cannot convert "' + Ta(f) + '" to ' + this.name); + } + return f; + }, argPackAdvance:8, readValueFromPointer:Ua(b, c), h:null,}); +}, _embind_register_function:function(a, b, c, d, f, h, m) { + var k = Za(b, c); + a = T(a); + f = cb(d, f); + Ya(a, function() { + gb("Cannot call " + a + " due to unbound types", k); + }, b - 1); + Na(k, function(g) { + var n = a, l = a; + g = [g[0], null].concat(g.slice(1)); + var r = f, u = g.length; + 2 > u && W("argTypes array size mismatch! Must at least get return value and 'this' types!"); + x(!m, "Async bindings are only supported with JSPI."); + for (var F = null !== g[1] && !1, G = !1, q = 1; q < g.length; ++q) { + if (null !== g[q] && void 0 === g[q].h) { + G = !0; + break; + } + } + var Ra = "void" !== g[0].name, K = "", Q = ""; + for (q = 0; q < u - 2; ++q) { + K += (0 !== q ? ", " : "") + "arg" + q, Q += (0 !== q ? ", " : "") + "arg" + q + "Wired"; + } + l = "return function " + Ia(l) + "(" + K + ") {\nif (arguments.length !== " + (u - 2) + ") {\nthrowBindingError('function " + l + " called with ' + arguments.length + ' arguments, expected " + (u - 2) + " args!');\n}\n"; + G && (l += "var destructors = [];\n"); + var Sa = G ? "destructors" : "null"; + K = "throwBindingError invoker fn runDestructors retType classParam".split(" "); + r = [W, r, h, Wa, g[0], g[1]]; + F && (l += "var thisWired = classParam.toWireType(" + Sa + ", this);\n"); + for (q = 0; q < u - 2; ++q) { + l += "var arg" + q + "Wired = argType" + q + ".toWireType(" + Sa + ", arg" + q + "); // " + g[q + 2].name + "\n", K.push("argType" + q), r.push(g[q + 2]); + } + F && (Q = "thisWired" + (0 < Q.length ? ", " : "") + Q); + l += (Ra || m ? "var rv = " : "") + "invoker(fn" + (0 < Q.length ? ", " : "") + Q + ");\n"; + if (G) { + l += "runDestructors(destructors);\n"; + } else { + for (q = F ? 1 : 2; q < g.length; ++q) { + u = 1 === q ? "thisWired" : "arg" + (q - 2) + "Wired", null !== g[q].h && (l += u + "_dtor(" + u + "); // " + g[q].name + "\n", K.push(u + "_dtor"), r.push(g[q].h)); + } + } + Ra && (l += "var ret = retType.fromWireType(rv);\nreturn ret;\n"); + K.push(l + "}\n"); + g = Va(K).apply(null, r); + q = b - 1; + if (!e.hasOwnProperty(n)) { + throw new Ma("Replacing nonexistant public symbol"); + } + void 0 !== e[n].g && void 0 !== q ? e[n].g[q] = g : (e[n] = g, e[n].i = q); + return []; + }); +}, _embind_register_integer:function(a, b, c, d, f) { + b = T(b); + -1 === f && (f = 4294967295); + var h = Fa(c), m = n => n; + if (0 === d) { + var k = 32 - 8 * c; + m = n => n << k >>> k; + } + var g = (n, l) => { + if ("number" != typeof n && "boolean" != typeof n) { + throw new TypeError('Cannot convert "' + Ta(n) + '" to ' + l); + } + if (n < d || n > f) { + throw new TypeError('Passing a number "' + Ta(n) + '" from JS side to C/C++ side to an argument of type "' + b + '", which is outside the valid range [' + d + ", " + f + "]!"); + } + }; + c = b.includes("unsigned") ? function(n, l) { + g(l, this.name); + return l >>> 0; + } : function(n, l) { + g(l, this.name); + return l; + }; + X(a, {name:b, fromWireType:m, toWireType:c, argPackAdvance:8, readValueFromPointer:hb(b, h, 0 !== d), h:null,}); +}, _embind_register_memory_view:function(a, b, c) { + function d(h) { + h >>= 2; + var m = I; + return new f(m.buffer, m[h + 1], m[h]); + } + var f = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b]; + c = T(c); + X(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {j:!0,}); +}, _embind_register_std_string:function(a, b) { + b = T(b); + var c = "std::string" === b; + X(a, {name:b, fromWireType:function(d) { + var f = I[d >> 2], h = d + 4; + if (c) { + for (var m = h, k = 0; k <= f; ++k) { + var g = h + k; + if (k == f || 0 == C[g]) { + var n = m; + m = g - m; + x("number" == typeof n); + n = n ? ia(C, n, m) : ""; + if (void 0 === l) { + var l = n; + } else { + l += String.fromCharCode(0), l += n; + } + m = g + 1; + } + } + } else { + l = Array(f); + for (k = 0; k < f; ++k) { + l[k] = String.fromCharCode(C[h + k]); + } + l = l.join(""); + } + Z(d); + return l; + }, toWireType:function(d, f) { + f instanceof ArrayBuffer && (f = new Uint8Array(f)); + var h = "string" == typeof f; + h || f instanceof Uint8Array || f instanceof Uint8ClampedArray || f instanceof Int8Array || W("Cannot pass non-string to std::string"); + if (c && h) { + for (var m = 0, k = 0; k < f.length; ++k) { + var g = f.charCodeAt(k); + 127 >= g ? m++ : 2047 >= g ? m += 2 : 55296 <= g && 57343 >= g ? (m += 4, ++k) : m += 3; + } + g = m; + } else { + g = f.length; + } + m = sb(4 + g + 1); + k = m + 4; + I[m >> 2] = g; + if (c && h) { + if (h = g + 1, x("number" == typeof h, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), g = C, 0 < h) { + h = k + h - 1; + for (var n = 0; n < f.length; ++n) { + var l = f.charCodeAt(n); + if (55296 <= l && 57343 >= l) { + var r = f.charCodeAt(++n); + l = 65536 + ((l & 1023) << 10) | r & 1023; + } + if (127 >= l) { + if (k >= h) { + break; + } + g[k++] = l; + } else { + if (2047 >= l) { + if (k + 1 >= h) { + break; + } + g[k++] = 192 | l >> 6; + } else { + if (65535 >= l) { + if (k + 2 >= h) { + break; + } + g[k++] = 224 | l >> 12; + } else { + if (k + 3 >= h) { + break; + } + 1114111 < l && z("Invalid Unicode code point " + A(l) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."); + g[k++] = 240 | l >> 18; + g[k++] = 128 | l >> 12 & 63; + } + g[k++] = 128 | l >> 6 & 63; + } + g[k++] = 128 | l & 63; + } + } + g[k] = 0; + } + } else { + if (h) { + for (h = 0; h < g; ++h) { + n = f.charCodeAt(h), 255 < n && (Z(k), W("String has UTF-16 code units that do not fit in 8 bits")), C[k + h] = n; + } + } else { + for (h = 0; h < g; ++h) { + C[k + h] = f[h]; + } + } + } + null !== d && d.push(Z, m); + return m; + }, argPackAdvance:8, readValueFromPointer:Qa, h:function(d) { + Z(d); + },}); +}, _embind_register_std_wstring:function(a, b, c) { + c = T(c); + if (2 === b) { + var d = jb; + var f = kb; + var h = lb; + var m = () => E; + var k = 1; + } else { + 4 === b && (d = mb, f = nb, h = ob, m = () => I, k = 2); + } + X(a, {name:c, fromWireType:function(g) { + for (var n = I[g >> 2], l = m(), r, u = g + 4, F = 0; F <= n; ++F) { + var G = g + 4 + F * b; + if (F == n || 0 == l[G >> k]) { + u = d(u, G - u), void 0 === r ? r = u : (r += String.fromCharCode(0), r += u), u = G + b; + } + } + Z(g); + return r; + }, toWireType:function(g, n) { + "string" != typeof n && W("Cannot pass non-string to C++ string type " + c); + var l = h(n), r = sb(4 + l + b); + I[r >> 2] = l >> k; + f(n, r + 4, l + b); + null !== g && g.push(Z, r); + return r; + }, argPackAdvance:8, readValueFromPointer:Qa, h:function(g) { + Z(g); + },}); +}, _embind_register_void:function(a, b) { + b = T(b); + X(a, {m:!0, name:b, argPackAdvance:0, fromWireType:function() { + }, toWireType:function() { + },}); +}, emscripten_memcpy_big:function(a, b, c) { + C.copyWithin(a, b, b + c); +}, emscripten_resize_heap:function(a) { + p("Cannot enlarge memory arrays to size " + (a >>> 0) + " bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value " + B.length + ", (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0"); +}, fd_close:function() { + p("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM"); +}, fd_seek:function() { + return 70; +}, fd_write:function(a, b, c, d) { + for (var f = 0, h = 0; h < c; h++) { + var m = I[b >> 2], k = I[b + 4 >> 2]; + b += 8; + for (var g = 0; g < k; g++) { + var n = a, l = C[m + g], r = pb[n]; + x(r); + 0 === l || 10 === l ? ((1 === n ? da : v)(ia(r, 0)), r.length = 0) : r.push(l); + } + f += k; + } + I[d >> 2] = f; + return 0; +}}, ya = function() { + function a(c) { + c = c.exports; + e.asm = c; + fa = e.asm.memory; + x(fa, "memory not found in wasm exports"); + var d = fa.buffer; + e.HEAP8 = B = new Int8Array(d); + e.HEAP16 = D = new Int16Array(d); + e.HEAP32 = H = new Int32Array(d); + e.HEAPU8 = C = new Uint8Array(d); + e.HEAPU16 = E = new Uint16Array(d); + e.HEAPU32 = I = new Uint32Array(d); + e.HEAPF32 = ja = new Float32Array(d); + e.HEAPF64 = ka = new Float64Array(d); + J = e.asm.__indirect_function_table; + x(J, "table not found in wasm exports"); + ra.unshift(e.asm.__wasm_call_ctors); + L--; + e.monitorRunDependencies && e.monitorRunDependencies(L); + x(O["wasm-instantiate"]); + delete O["wasm-instantiate"]; + 0 == L && (null !== M && (clearInterval(M), M = null), N && (d = N, N = null, d())); + return c; + } + var b = {env:tb, wasi_snapshot_preview1:tb,}; + va(); + if (e.instantiateWasm) { + try { + return e.instantiateWasm(b, a); + } catch (c) { + v("Module.instantiateWasm callback failed with error: " + c), ba(c); + } + } + b = Aa(b); + return a(b[0]); +}(), fb = e.___getTypeName = P("__getTypeName"); +e.__embind_initialize_bindings = P("_embind_initialize_bindings"); +e._fflush = P("fflush"); +var sb = P("malloc"), Z = P("free"), ub = ya.emscripten_stack_init, ma = ya.emscripten_stack_get_end; +e.dynCall_jiji = P("dynCall_jiji"); +"zeroMemory stringToNewUTF8 exitJS emscripten_realloc_buffer setErrNo inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr getHostByName getRandomDevice traverseStack convertPCtoSourceLocation readEmAsmArgs jstoi_q jstoi_s getExecutableName listenOnce autoResumeAudioContext handleException runtimeKeepalivePush runtimeKeepalivePop callUserCallback maybeExit safeSetTimeout asmjsMangle asyncLoad alignMemory mmapAlloc HandleAllocator getNativeTypeSize STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertU32PairToI53 getCFunc ccall cwrap uleb128Encode sigToWasmTypes generateFuncType convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction reallyNegative unSign strLen reSign formatString intArrayFromString AsciiToString stringToAscii allocateUTF8 allocateUTF8OnStack writeStringToMemory writeArrayToMemory writeAsciiToMemory getSocketFromFD getSocketAddress registerKeyEventCallback maybeCStringToJsString findEventTarget findCanvasEventTarget getBoundingClientRect fillMouseEventData registerMouseEventCallback registerWheelEventCallback registerUiEventCallback registerFocusEventCallback fillDeviceOrientationEventData registerDeviceOrientationEventCallback fillDeviceMotionEventData registerDeviceMotionEventCallback screenOrientation fillOrientationChangeEventData registerOrientationChangeEventCallback fillFullscreenChangeEventData registerFullscreenChangeEventCallback JSEvents_requestFullscreen JSEvents_resizeCanvasForFullscreen registerRestoreOldStyle hideEverythingExceptGivenElement restoreHiddenElements setLetterbox softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData battery registerBatteryEventCallback setCanvasElementSize getCanvasElementSize demangle demangleAll jsStackTrace stackTrace getEnvStrings checkWasiClock createDyncallWrapper setImmediateWrapped clearImmediateWrapped polyfillSetImmediate getPromise makePromise makePromiseCallback ExceptionInfo exception_addRef exception_decRef setMainLoop _setNetworkCallback heapObjectForWebGLType heapAccessShiftForWebGLHeap emscriptenWebGLGet computeUnpackAlignedImageSize emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib writeGLArray SDL_unicode SDL_ttfContext SDL_audio GLFW_Window runAndAbortIfError ALLOC_NORMAL ALLOC_STACK allocate init_embind getBasestPointer registerInheritedInstance unregisterInheritedInstance getInheritedInstance getInheritedInstanceCount getLiveInheritedInstances requireRegisteredType enumReadValueFromPointer genericPointerToWireType constNoSmartPtrRawPointerToWireType nonConstNoSmartPtrRawPointerToWireType init_RegisteredPointer RegisteredPointer RegisteredPointer_getPointee RegisteredPointer_destructor RegisteredPointer_deleteObject RegisteredPointer_fromWireType runDestructor releaseClassHandle detachFinalizer attachFinalizer makeClassHandle init_ClassHandle ClassHandle ClassHandle_isAliasOf throwInstanceAlreadyDeleted ClassHandle_clone ClassHandle_delete ClassHandle_isDeleted ClassHandle_deleteLater flushPendingDeletes setDelayFunction RegisteredClass shallowCopyInternalPointer downcastPointer upcastPointer validateThis getStringOrSymbol craftEmvalAllocator emval_get_global emval_lookupTypes emval_allocateDestructors emval_addMethodCaller".split(" ").forEach(function(a) { + "undefined" === typeof globalThis || Object.getOwnPropertyDescriptor(globalThis, a) || Object.defineProperty(globalThis, a, {configurable:!0, get:function() { + var b = "`" + a + "` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line", c = a; + c.startsWith("_") || (c = "$" + a); + b += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=" + c + ")"; + Ca(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"); + z(b); + }}); + Da(a); +}); +"run UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 addOnPreRun addOnInit addOnPreMain addOnExit addOnPostRun addRunDependency removeRunDependency FS_createFolder FS_createPath FS_createDataFile FS_createPreloadedFile FS_createLazyFile FS_createLink FS_createDevice FS_unlink out err callMain abort keepRuntimeAlive wasmMemory stackAlloc stackSave stackRestore getTempRet0 setTempRet0 writeStackCookie checkStackCookie intArrayFromBase64 tryParseAsDataURI ptrToString getHeapMax abortOnCannotGrowMemory ENV ERRNO_CODES ERRNO_MESSAGES DNS Protocols Sockets timers warnOnce UNWIND_CACHE readEmAsmArgsArray dynCallLegacy getDynCaller dynCall convertI32PairToI53Checked freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS intArrayToString UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 SYSCALLS JSEvents specialHTMLTargets currentFullscreenStrategy restoreOldWindowedStyle ExitStatus flush_NO_FILESYSTEM dlopenMissingError promiseMap uncaughtExceptionCount exceptionLast exceptionCaught Browser wget FS MEMFS TTY PIPEFS SOCKFS tempFixedLengthArray miniTempWebGLFloatBuffers GL AL SDL SDL_gfx GLUT EGL GLFW GLEW IDBStore InternalError BindingError UnboundTypeError PureVirtualError throwInternalError throwBindingError throwUnboundTypeError ensureOverloadTable exposePublicSymbol replacePublicSymbol extendError createNamedFunction embindRepr registeredInstances registeredTypes awaitingDependencies typeDependencies registeredPointers registerType whenDependentTypesAreResolved embind_charCodes embind_init_charCodes readLatin1String getTypeName heap32VectorToArray getShiftFromSize integerReadValueFromPointer floatReadValueFromPointer simpleReadValueFromPointer runDestructors new_ craftInvokerFunction embind__requireFunction tupleRegistrations structRegistrations finalizationRegistry detachFinalizer_deps deletionQueue delayFunction char_0 char_9 makeLegalFunctionName emval_handle_array emval_free_list emval_symbols init_emval count_emval_handles get_first_emval Emval emval_newers emval_methodCallers emval_registeredMethods".split(" ").forEach(Da); +var vb; +N = function wb() { + vb || xb(); + vb || (N = wb); +}; +function xb() { + function a() { + if (!vb && (vb = !0, e.calledRun = !0, !y)) { + x(!ta); + ta = !0; + na(); + Ea(ra); + aa(e); + if (e.onRuntimeInitialized) { + e.onRuntimeInitialized(); + } + x(!e._main, 'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'); + na(); + if (e.postRun) { + for ("function" == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length;) { + var b = e.postRun.shift(); + sa.unshift(b); + } + } + Ea(sa); + } + } + if (!(0 < L)) { + ub(); + la(); + if (e.preRun) { + for ("function" == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length;) { + ua(); + } + } + Ea(qa); + 0 < L || (e.setStatus ? (e.setStatus("Running..."), setTimeout(function() { + setTimeout(function() { + e.setStatus(""); + }, 1); + a(); + }, 1)) : a(), na()); + } +} +if (e.preInit) { + for ("function" == typeof e.preInit && (e.preInit = [e.preInit]); 0 < e.preInit.length;) { + e.preInit.pop()(); + } +} +xb(); + + + + return create_utils +} + +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = create_utils; +else if (typeof define === 'function' && define['amd']) + define([], function() { return create_utils; }); +else if (typeof exports === 'object') + exports["create_utils"] = create_utils;