
var Godot = (() => {
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
  
  return (
function(Godot) {
  Godot = Godot || {};


var aa = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) {
  if (a == Array.prototype || a == Object.prototype) {
    return a;
  }
  a[b] = c.value;
  return a;
};
function ba(a) {
  a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global,];
  for (var b = 0; b < a.length; ++b) {
    var c = a[b];
    if (c && c.Math == Math) {
      return c;
    }
  }
  throw Error("Cannot find global object");
}
var ca = ba(this);
function da(a, b) {
  if (b) {
    a: {
      var c = ca;
      a = a.split(".");
      for (var d = 0; d < a.length - 1; d++) {
        var e = a[d];
        if (!(e in c)) {
          break a;
        }
        c = c[e];
      }
      a = a[a.length - 1];
      d = c[a];
      b = b(d);
      b != d && null != b && aa(c, a, {configurable:!0, writable:!0, value:b});
    }
  }
}
da("Object.values", function(a) {
  return a ? a : function(b) {
    var c = [], d;
    for (d in b) {
      Object.prototype.hasOwnProperty.call(b, d) && c.push(b[d]);
    }
    return c;
  };
});
da("Array.prototype.includes", function(a) {
  return a ? a : function(b, c) {
    var d = this;
    d instanceof String && (d = String(d));
    var e = d.length;
    c = c || 0;
    for (0 > c && (c = Math.max(c + e, 0)); c < e; c++) {
      var f = d[c];
      if (f === b || Object.is(f, b)) {
        return !0;
      }
    }
    return !1;
  };
});
da("String.prototype.padStart", function(a) {
  return a ? a : function(b, c) {
    if (null == this) {
      throw new TypeError("The 'this' value for String.prototype.padStart must not be null or undefined");
    }
    b -= this.length;
    c = void 0 !== c ? String(c) : " ";
    return (0 < b && c ? c.repeat(Math.ceil(b / c.length)).substring(0, b) : "") + this;
  };
});
function h() {
  m.buffer != ea && fa(m.buffer);
  return ha;
}
function ia() {
  m.buffer != ea && fa(m.buffer);
  return ja;
}
function ka() {
  m.buffer != ea && fa(m.buffer);
  return na;
}
function oa() {
  m.buffer != ea && fa(m.buffer);
  return pa;
}
function n() {
  m.buffer != ea && fa(m.buffer);
  return qa;
}
function r() {
  m.buffer != ea && fa(m.buffer);
  return ra;
}
function sa() {
  m.buffer != ea && fa(m.buffer);
  return va;
}
function wa() {
  m.buffer != ea && fa(m.buffer);
  return xa;
}
var t;
t || (t = typeof Godot !== 'undefined' ? Godot : {});
var ya, za;
t.ready = new Promise(function(a, b) {
  ya = a;
  za = b;
});
"_main __emscripten_thread_init __emscripten_thread_exit __emscripten_thread_crashed __emscripten_tls_init _pthread_self executeNotifiedProxyingQueue establishStackSpace invokeEntryPoint PThread _emscripten_webgl_commit_frame __Z14godot_web_mainiPPc _fflush __emwebxr_on_input_event __emwebxr_on_simple_event __emscripten_proxy_execute_task_queue onRuntimeInitialized".split(" ").forEach(a => {
  Object.getOwnPropertyDescriptor(t.ready, a) || Object.defineProperty(t.ready, a, {get:() => Aa("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:() => Aa("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({}, t), Ca = [], Da = "./this.program", Ea = (a, b) => {
  throw b;
}, Fa = "object" == typeof window, Ga = "function" == typeof importScripts, Ha = "object" == typeof process && "object" == typeof process.dd && "string" == typeof process.dd.node, Ia = !Fa && !Ha && !Ga;
if (t.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 v = t.ENVIRONMENT_IS_PTHREAD || !1, Ja = "";
function Ka(a) {
  return t.locateFile ? t.locateFile(a, Ja) : Ja + a;
}
var La;
if (Ia) {
  if ("object" == typeof process && "function" === typeof require || "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?)");
  }
  La = function(a) {
    if ("function" == typeof readbuffer) {
      return new Uint8Array(readbuffer(a));
    }
    a = read(a, "binary");
    w("object" == typeof a);
    return a;
  };
  "undefined" != typeof scriptArgs ? Ca = scriptArgs : "undefined" != typeof arguments && (Ca = arguments);
  "function" == typeof quit && (Ea = (a, b) => {
    if (Ma) {
      throw b;
    }
    if (!(b instanceof Na)) {
      var c = b;
      b && "object" == typeof b && b.stack && (c = [b, b.stack]);
      y("exiting due to exception: " + c);
    }
    quit(a);
  });
  "undefined" != typeof print && ("undefined" == typeof console && (console = {}), console.log = print, console.warn = console.error = "undefined" != typeof printErr ? printErr : print);
} else if (Fa || Ga) {
  Ga ? Ja = self.location.href : "undefined" != typeof document && document.currentScript && (Ja = document.currentScript.src);
  _scriptDir && (Ja = _scriptDir);
  0 !== Ja.indexOf("blob:") ? Ja = Ja.substr(0, Ja.replace(/[?#].*/, "").lastIndexOf("/") + 1) : Ja = "";
  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?)");
  }
  Ga && (La = a => {
    var b = new XMLHttpRequest();
    b.open("GET", a, !1);
    b.responseType = "arraybuffer";
    b.send(null);
    return new Uint8Array(b.response);
  });
} else {
  throw Error("environment detection error");
}
var Oa = t.print || console.log.bind(console), y = t.printErr || console.warn.bind(console);
Object.assign(t, Ba);
Ba = null;
Object.getOwnPropertyDescriptor(t, "fetchSettings") && Aa("`Module.fetchSettings` was supplied but `fetchSettings` not included in INCOMING_MODULE_JS_API");
t.arguments && (Ca = t.arguments);
Pa("arguments", "arguments_");
t.thisProgram && (Da = t.thisProgram);
Pa("thisProgram", "thisProgram");
t.quit && (Ea = t.quit);
Pa("quit", "quit_");
w("undefined" == typeof t.memoryInitializerPrefixURL, "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
w("undefined" == typeof t.pthreadMainPrefixURL, "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
w("undefined" == typeof t.cdInitializerPrefixURL, "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
w("undefined" == typeof t.filePackagePrefixURL, "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
w("undefined" == typeof t.read, "Module.read option was removed (modify read_ in JS)");
w("undefined" == typeof t.readAsync, "Module.readAsync option was removed (modify readAsync in JS)");
w("undefined" == typeof t.readBinary, "Module.readBinary option was removed (modify readBinary in JS)");
w("undefined" == typeof t.setWindowTitle, "Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
w("undefined" == typeof t.TOTAL_MEMORY, "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");
Pa("read", "read_");
Pa("readAsync", "readAsync");
Pa("readBinary", "readBinary");
Pa("setWindowTitle", "setWindowTitle");
w(Fa || Ga || Ha, "Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)");
w(!Ha, "node environment detected but not enabled at build time.  Add 'node' to `-sENVIRONMENT` to enable.");
w(!Ia, "shell environment detected but not enabled at build time.  Add 'shell' to `-sENVIRONMENT` to enable.");
function Pa(a, b) {
  Object.getOwnPropertyDescriptor(t, a) || Object.defineProperty(t, a, {configurable:!0, get:function() {
    Aa("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 Qa(a) {
  return "FS_createPath" === a || "FS_createDataFile" === a || "FS_createPreloadedFile" === a || "FS_unlink" === a || "addRunDependency" === a || "FS_createLazyFile" === a || "FS_createDevice" === a || "removeRunDependency" === a;
}
var Ra = 0, Sa;
t.wasmBinary && (Sa = t.wasmBinary);
Pa("wasmBinary", "wasmBinary");
var noExitRuntime = t.noExitRuntime || !1;
Pa("noExitRuntime", "noExitRuntime");
"object" != typeof WebAssembly && Aa("no native wasm support detected");
var m, Ta, Ua = !1, Va;
function w(a, b) {
  a || Aa("Assertion failed" + (b ? ": " + b : ""));
}
var Wa = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0;
function Xa(a, b, c) {
  var d = b + c;
  for (c = b; a[c] && !(c >= d);) {
    ++c;
  }
  if (16 < c - b && a.buffer && Wa) {
    return Wa.decode(a.buffer instanceof SharedArrayBuffer ? a.slice(b, c) : a.subarray(b, c));
  }
  for (d = ""; b < c;) {
    var e = a[b++];
    if (e & 128) {
      var f = a[b++] & 63;
      if (192 == (e & 224)) {
        d += String.fromCharCode((e & 31) << 6 | f);
      } else {
        var g = a[b++] & 63;
        224 == (e & 240) ? e = (e & 15) << 12 | f << 6 | g : (240 != (e & 248) && Ya("Invalid UTF-8 leading byte 0x" + e.toString(16) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), e = (e & 7) << 18 | f << 12 | g << 6 | a[b++] & 63);
        65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
      }
    } else {
      d += String.fromCharCode(e);
    }
  }
  return d;
}
function A(a, b) {
  return a ? Xa(ia(), a, b) : "";
}
function Za(a, b, c, d) {
  if (!(0 < d)) {
    return 0;
  }
  var e = c;
  d = c + d - 1;
  for (var f = 0; f < a.length; ++f) {
    var g = a.charCodeAt(f);
    if (55296 <= g && 57343 >= g) {
      var k = a.charCodeAt(++f);
      g = 65536 + ((g & 1023) << 10) | k & 1023;
    }
    if (127 >= g) {
      if (c >= d) {
        break;
      }
      b[c++] = g;
    } else {
      if (2047 >= g) {
        if (c + 1 >= d) {
          break;
        }
        b[c++] = 192 | g >> 6;
      } else {
        if (65535 >= g) {
          if (c + 2 >= d) {
            break;
          }
          b[c++] = 224 | g >> 12;
        } else {
          if (c + 3 >= d) {
            break;
          }
          1114111 < g && Ya("Invalid Unicode code point 0x" + g.toString(16) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");
          b[c++] = 240 | g >> 18;
          b[c++] = 128 | g >> 12 & 63;
        }
        b[c++] = 128 | g >> 6 & 63;
      }
      b[c++] = 128 | g & 63;
    }
  }
  b[c] = 0;
  return c - e;
}
function $a(a, b, c) {
  w("number" == typeof c, "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
  return Za(a, ia(), b, c);
}
function ab(a) {
  for (var b = 0, c = 0; c < a.length; ++c) {
    var d = a.charCodeAt(c);
    127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
  }
  return b;
}
var ea, ha, ja, na, pa, qa, ra, va, xa;
v && (ea = t.buffer);
function fa(a) {
  ea = a;
  t.HEAP8 = ha = new Int8Array(a);
  t.HEAP16 = na = new Int16Array(a);
  t.HEAP32 = qa = new Int32Array(a);
  t.HEAPU8 = ja = new Uint8Array(a);
  t.HEAPU16 = pa = new Uint16Array(a);
  t.HEAPU32 = ra = new Uint32Array(a);
  t.HEAPF32 = va = new Float32Array(a);
  t.HEAPF64 = xa = new Float64Array(a);
}
t.TOTAL_STACK && w(5242880 === t.TOTAL_STACK, "the stack size can no longer be determined at runtime");
var bb = t.INITIAL_MEMORY || 67108864;
Pa("INITIAL_MEMORY", "INITIAL_MEMORY");
w(5242880 <= bb, "INITIAL_MEMORY should be larger than TOTAL_STACK, was " + bb + "! (TOTAL_STACK=5242880)");
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");
if (v) {
  m = t.wasmMemory, ea = t.buffer;
} else {
  if (t.wasmMemory) {
    m = t.wasmMemory;
  } else {
    if (m = new WebAssembly.Memory({initial:bb / 65536, maximum:32768, shared:!0}), !(m.buffer instanceof SharedArrayBuffer)) {
      throw y("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"), Ha && console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"), Error("bad memory");
    }
  }
}
m && (ea = m.buffer);
bb = ea.byteLength;
w(0 === bb % 65536);
fa(ea);
var cb;
function db() {
  var a = eb();
  w(0 == (a & 3));
  n()[a >> 2] = 34821223;
  n()[a + 4 >> 2] = 2310721022;
  r()[0] = 1668509029;
}
function fb() {
  if (!Ua) {
    var a = eb(), b = r()[a >> 2], c = r()[a + 4 >> 2];
    34821223 == b && 2310721022 == c || Aa("Stack overflow! Stack cookie has been overwritten at 0x" + a.toString(16) + ", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x" + c.toString(16) + " 0x" + b.toString(16));
    1668509029 !== r()[0] && Aa("Runtime error: The application has corrupted its heap memory area (address zero)!");
  }
}
var gb = new Int16Array(1), hb = new Int8Array(gb.buffer);
gb[0] = 25459;
if (115 !== hb[0] || 99 !== hb[1]) {
  throw "Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";
}
var ib = [], jb = [], kb = [], lb = [], mb = [], nb = !1, ob = !1, Ma = 0;
function pb() {
  return noExitRuntime || 0 < Ma;
}
function qb() {
  w(!nb);
  nb = !0;
  if (!v) {
    fb();
    if (!t.noFSInit && !sb) {
      w(!sb, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
      sb = !0;
      tb();
      t.stdin = t.stdin;
      t.stdout = t.stdout;
      t.stderr = t.stderr;
      t.stdin ? ub("stdin", t.stdin) : vb("/dev/tty", "/dev/stdin");
      t.stdout ? ub("stdout", null, t.stdout) : vb("/dev/tty", "/dev/stdout");
      t.stderr ? ub("stderr", null, t.stderr) : vb("/dev/tty1", "/dev/stderr");
      var a = wb("/dev/stdin", 0), b = wb("/dev/stdout", 1), c = wb("/dev/stderr", 1);
      w(0 === a.m, "invalid handle for stdin (" + a.m + ")");
      w(1 === b.m, "invalid handle for stdout (" + b.m + ")");
      w(2 === c.m, "invalid handle for stderr (" + c.m + ")");
    }
    xb = !1;
    yb.root = zb(yb, null);
    Ab(jb);
  }
}
function Bb() {
  var a = t.preRun.shift();
  ib.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 Cb = 0, Db = null, Eb = null, Fb = {};
function Gb() {
  Cb++;
  t.monitorRunDependencies && t.monitorRunDependencies(Cb);
  w(!Fb["wasm-instantiate"]);
  Fb["wasm-instantiate"] = 1;
  null === Db && "undefined" != typeof setInterval && (Db = setInterval(function() {
    if (Ua) {
      clearInterval(Db), Db = null;
    } else {
      var a = !1, b;
      for (b in Fb) {
        a || (a = !0, y("still waiting on run dependencies:")), y("dependency: " + b);
      }
      a && y("(end of list)");
    }
  }, 1e4));
}
function Aa(a) {
  if (v) {
    postMessage({cmd:"onAbort", arg:a});
  } else {
    if (t.onAbort) {
      t.onAbort(a);
    }
  }
  a = "Aborted(" + a + ")";
  y(a);
  Ua = !0;
  Va = 1;
  a = new WebAssembly.RuntimeError(a);
  za(a);
  throw a;
}
function Hb() {
  return Ib.startsWith("data:application/octet-stream;base64,");
}
function B(a) {
  return function() {
    var b = t.asm;
    w(nb, "native function `" + a + "` called before runtime initialization");
    w(!ob, "native function `" + a + "` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
    b[a] || w(b[a], "exported native function `" + a + "` not found");
    return b[a].apply(null, arguments);
  };
}
var Ib;
Ib = "godot.web.editor.wasm32.wasm";
Hb() || (Ib = Ka(Ib));
function Jb() {
  var a = Ib;
  try {
    if (a == Ib && Sa) {
      return new Uint8Array(Sa);
    }
    if (La) {
      return La(a);
    }
    throw "both async and sync fetching of the wasm failed";
  } catch (b) {
    Aa(b);
  }
}
function Kb() {
  return Sa || !Fa && !Ga || "function" != typeof fetch ? Promise.resolve().then(function() {
    return Jb();
  }) : fetch(Ib, {credentials:"same-origin"}).then(function(a) {
    if (!a.ok) {
      throw "failed to load wasm binary file at '" + Ib + "'";
    }
    return a.arrayBuffer();
  }).catch(function() {
    return Jb();
  });
}
var C, F, Lb = {};
function Na(a) {
  this.name = "ExitStatus";
  this.message = "Program terminated with exit(" + a + ")";
  this.status = a;
}
function Mb(a) {
  w(!v, "Internal Error! cleanupThread() can only ever be called from main application thread!");
  w(a, "Internal Error! Null pthread_ptr in cleanupThread!");
  a = G.J[a];
  w(a);
  G.Kb(a);
}
function Nb(a) {
  w(!v, "Internal Error! spawnThread() can only ever be called from main application thread!");
  w(a.B, "Internal error, no pthread ptr!");
  var b = G.nc();
  if (!b) {
    return 6;
  }
  w(!b.B, "Internal error!");
  G.ia.push(b);
  G.J[a.B] = b;
  b.B = a.B;
  var c = {cmd:"run", start_routine:a.Tc, arg:a.lb, pthread_ptr:a.B};
  b.ua = () => {
    c.time = performance.now();
    b.postMessage(c, a.ad);
  };
  b.loaded && (b.ua(), delete b.ua);
  return 0;
}
var Ob = (a, b) => {
  for (var c = 0, d = a.length - 1; 0 <= d; d--) {
    var e = a[d];
    "." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
  }
  if (b) {
    for (; c; c--) {
      a.unshift("..");
    }
  }
  return a;
}, Pb = a => {
  var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
  (a = Ob(a.split("/").filter(d => !!d), !b).join("/")) || b || (a = ".");
  a && c && (a += "/");
  return (b ? "/" : "") + a;
}, Qb = a => {
  var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
  a = b[0];
  b = b[1];
  if (!a && !b) {
    return ".";
  }
  b && (b = b.substr(0, b.length - 1));
  return a + b;
}, Rb = a => {
  if ("/" === a) {
    return "/";
  }
  a = Pb(a);
  a = a.replace(/\/$/, "");
  var b = a.lastIndexOf("/");
  return -1 === b ? a : a.substr(b + 1);
};
function Sb() {
  if ("object" == typeof crypto && "function" == typeof crypto.getRandomValues) {
    var a = new Uint8Array(1);
    return () => {
      crypto.getRandomValues(a);
      return a[0];
    };
  }
  return () => Aa("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
}
function Tb() {
  for (var a = "", b = !1, c = arguments.length - 1; -1 <= c && !b; c--) {
    b = 0 <= c ? arguments[c] : Ub;
    if ("string" != typeof b) {
      throw new TypeError("Arguments to path.resolve must be strings");
    }
    if (!b) {
      return "";
    }
    a = b + "/" + a;
    b = "/" === b.charAt(0);
  }
  a = Ob(a.split("/").filter(d => !!d), !b).join("/");
  return (b ? "/" : "") + a || ".";
}
var Vb = (a, b) => {
  function c(g) {
    for (var k = 0; k < g.length && "" === g[k]; k++) {
    }
    for (var l = g.length - 1; 0 <= l && "" === g[l]; l--) {
    }
    return k > l ? [] : g.slice(k, l - k + 1);
  }
  a = Tb(a).substr(1);
  b = Tb(b).substr(1);
  a = c(a.split("/"));
  b = c(b.split("/"));
  for (var d = Math.min(a.length, b.length), e = d, f = 0; f < d; f++) {
    if (a[f] !== b[f]) {
      e = f;
      break;
    }
  }
  d = [];
  for (f = e; f < a.length; f++) {
    d.push("..");
  }
  d = d.concat(b.slice(e));
  return d.join("/");
};
function Wb(a, b) {
  var c = Array(ab(a) + 1);
  a = Za(a, c, 0, c.length);
  b && (c.length = a);
  return c;
}
var Xb = [];
function Yb(a, b) {
  Xb[a] = {input:[], A:[], fa:b};
  Zb(a, $b);
}
var $b = {open:function(a) {
  var b = Xb[a.node.ra];
  if (!b) {
    throw new H(43);
  }
  a.o = b;
  a.seekable = !1;
}, close:function(a) {
  a.o.fa.flush(a.o);
}, flush:function(a) {
  a.o.fa.flush(a.o);
}, read:function(a, b, c, d) {
  if (!a.o || !a.o.fa.wb) {
    throw new H(60);
  }
  for (var e = 0, f = 0; f < d; f++) {
    try {
      var g = a.o.fa.wb(a.o);
    } catch (k) {
      throw new H(29);
    }
    if (void 0 === g && 0 === e) {
      throw new H(6);
    }
    if (null === g || void 0 === g) {
      break;
    }
    e++;
    b[c + f] = g;
  }
  e && (a.node.timestamp = Date.now());
  return e;
}, write:function(a, b, c, d) {
  if (!a.o || !a.o.fa.$a) {
    throw new H(60);
  }
  try {
    for (var e = 0; e < d; e++) {
      a.o.fa.$a(a.o, b[c + e]);
    }
  } catch (f) {
    throw new H(29);
  }
  d && (a.node.timestamp = Date.now());
  return e;
}}, ac = {wb:function(a) {
  if (!a.input.length) {
    var b = null;
    "undefined" != typeof window && "function" == typeof window.prompt ? (b = window.prompt("Input: "), null !== b && (b += "\n")) : "function" == typeof readline && (b = readline(), null !== b && (b += "\n"));
    if (!b) {
      return null;
    }
    a.input = Wb(b, !0);
  }
  return a.input.shift();
}, $a:function(a, b) {
  null === b || 10 === b ? (Oa(Xa(a.A, 0)), a.A = []) : 0 != b && a.A.push(b);
}, flush:function(a) {
  a.A && 0 < a.A.length && (Oa(Xa(a.A, 0)), a.A = []);
}}, bc = {$a:function(a, b) {
  null === b || 10 === b ? (y(Xa(a.A, 0)), a.A = []) : 0 != b && a.A.push(b);
}, flush:function(a) {
  a.A && 0 < a.A.length && (y(Xa(a.A, 0)), a.A = []);
}}, J = {L:null, u:function() {
  return J.createNode(null, "/", 16895, 0);
}, createNode:function(a, b, c, d) {
  if (24576 === (c & 61440) || 4096 === (c & 61440)) {
    throw new H(63);
  }
  J.L || (J.L = {dir:{node:{K:J.g.K, D:J.g.D, na:J.g.na, Fa:J.g.Fa, Ja:J.g.Ja, Qa:J.g.Qa, La:J.g.La, Ia:J.g.Ia, Ma:J.g.Ma}, stream:{Z:J.j.Z}}, file:{node:{K:J.g.K, D:J.g.D}, stream:{Z:J.j.Z, read:J.j.read, write:J.j.write, jb:J.j.jb, Bb:J.j.Bb, Cb:J.j.Cb}}, link:{node:{K:J.g.K, D:J.g.D, ta:J.g.ta}, stream:{}}, ob:{node:{K:J.g.K, D:J.g.D}, stream:cc}});
  c = dc(a, b, c, d);
  16384 === (c.mode & 61440) ? (c.g = J.L.dir.node, c.j = J.L.dir.stream, c.l = {}) : 32768 === (c.mode & 61440) ? (c.g = J.L.file.node, c.j = J.L.file.stream, c.s = 0, c.l = null) : 40960 === (c.mode & 61440) ? (c.g = J.L.link.node, c.j = J.L.link.stream) : 8192 === (c.mode & 61440) && (c.g = J.L.ob.node, c.j = J.L.ob.stream);
  c.timestamp = Date.now();
  a && (a.l[b] = c, a.timestamp = c.timestamp);
  return c;
}, lc:function(a) {
  return a.l ? a.l.subarray ? a.l.subarray(0, a.s) : new Uint8Array(a.l) : new Uint8Array(0);
}, ub:function(a, b) {
  var c = a.l ? a.l.length : 0;
  c >= b || (b = Math.max(b, c * (1048576 > c ? 2 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.l, a.l = new Uint8Array(b), 0 < a.s && a.l.set(c.subarray(0, a.s), 0));
}, Qc:function(a, b) {
  if (a.s != b) {
    if (0 == b) {
      a.l = null, a.s = 0;
    } else {
      var c = a.l;
      a.l = new Uint8Array(b);
      c && a.l.set(c.subarray(0, Math.min(b, a.s)));
      a.s = b;
    }
  }
}, g:{K:function(a) {
  var b = {};
  b.fc = 8192 === (a.mode & 61440) ? a.id : 1;
  b.Xa = a.id;
  b.mode = a.mode;
  b.Fc = 1;
  b.uid = 0;
  b.tc = 0;
  b.ra = a.ra;
  16384 === (a.mode & 61440) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.s : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
  b.mb = new Date(a.timestamp);
  b.pa = new Date(a.timestamp);
  b.qb = new Date(a.timestamp);
  b.Xb = 4096;
  b.Yb = Math.ceil(b.size / b.Xb);
  return b;
}, D:function(a, b) {
  void 0 !== b.mode && (a.mode = b.mode);
  void 0 !== b.timestamp && (a.timestamp = b.timestamp);
  void 0 !== b.size && J.Qc(a, b.size);
}, na:function() {
  throw ec[44];
}, Fa:function(a, b, c, d) {
  return J.createNode(a, b, c, d);
}, Ja:function(a, b, c) {
  if (16384 === (a.mode & 61440)) {
    try {
      var d = fc(b, c);
    } catch (f) {
    }
    if (d) {
      for (var e in d.l) {
        throw new H(55);
      }
    }
  }
  delete a.parent.l[a.name];
  a.parent.timestamp = Date.now();
  a.name = c;
  b.l[c] = a;
  b.timestamp = a.parent.timestamp;
  a.parent = b;
}, Qa:function(a, b) {
  delete a.l[b];
  a.timestamp = Date.now();
}, La:function(a, b) {
  var c = fc(a, b), d;
  for (d in c.l) {
    throw new H(55);
  }
  delete a.l[b];
  a.timestamp = Date.now();
}, Ia:function(a) {
  var b = [".", ".."], c;
  for (c in a.l) {
    a.l.hasOwnProperty(c) && b.push(c);
  }
  return b;
}, Ma:function(a, b, c) {
  a = J.createNode(a, b, 41471, 0);
  a.link = c;
  return a;
}, ta:function(a) {
  if (40960 !== (a.mode & 61440)) {
    throw new H(28);
  }
  return a.link;
}}, j:{read:function(a, b, c, d, e) {
  var f = a.node.l;
  if (e >= a.node.s) {
    return 0;
  }
  a = Math.min(a.node.s - e, d);
  w(0 <= a);
  if (8 < a && f.subarray) {
    b.set(f.subarray(e, e + a), c);
  } else {
    for (d = 0; d < a; d++) {
      b[c + d] = f[e + d];
    }
  }
  return a;
}, write:function(a, b, c, d, e, f) {
  w(!(b instanceof ArrayBuffer));
  b.buffer === h().buffer && (f = !1);
  if (!d) {
    return 0;
  }
  a = a.node;
  a.timestamp = Date.now();
  if (b.subarray && (!a.l || a.l.subarray)) {
    if (f) {
      return w(0 === e, "canOwn must imply no weird position inside the file"), a.l = b.subarray(c, c + d), a.s = d;
    }
    if (0 === a.s && 0 === e) {
      return a.l = b.slice(c, c + d), a.s = d;
    }
    if (e + d <= a.s) {
      return a.l.set(b.subarray(c, c + d), e), d;
    }
  }
  J.ub(a, e + d);
  if (a.l.subarray && b.subarray) {
    a.l.set(b.subarray(c, c + d), e);
  } else {
    for (f = 0; f < d; f++) {
      a.l[e + f] = b[c + f];
    }
  }
  a.s = Math.max(a.s, e + d);
  return d;
}, Z:function(a, b, c) {
  1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.s);
  if (0 > b) {
    throw new H(28);
  }
  return b;
}, jb:function(a, b, c) {
  J.ub(a.node, b + c);
  a.node.s = Math.max(a.node.s, b + c);
}, Bb:function(a, b, c, d, e) {
  if (32768 !== (a.node.mode & 61440)) {
    throw new H(43);
  }
  a = a.node.l;
  if (e & 2 || a.buffer !== ea) {
    if (0 < c || c + b < a.length) {
      a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
    }
    c = !0;
    Aa("internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported");
    b = void 0;
    if (!b) {
      throw new H(48);
    }
    h().set(a, b);
  } else {
    c = !1, b = a.byteOffset;
  }
  return {aa:b, gd:c};
}, Cb:function(a, b, c, d, e) {
  if (32768 !== (a.node.mode & 61440)) {
    throw new H(43);
  }
  if (e & 2) {
    return 0;
  }
  J.j.write(a, b, 0, d, c, !1);
  return 0;
}}}, K = {W:{}, indexedDB:() => {
  if ("undefined" != typeof indexedDB) {
    return indexedDB;
  }
  var a = null;
  "object" == typeof window && (a = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB);
  w(a, "IDBFS used, but indexedDB not supported");
  return a;
}, Sb:21, V:"FILE_DATA", u:function(a) {
  return J.u.apply(null, arguments);
}, Nb:(a, b, c) => {
  K.mc(a, (d, e) => {
    if (d) {
      return c(d);
    }
    K.oc(a, (f, g) => {
      if (f) {
        return c(f);
      }
      K.Mc(b ? g : e, b ? e : g, c);
    });
  });
}, Jc:() => {
  Object.values(K.W).forEach(a => a.close());
  K.W = {};
}, kc:(a, b) => {
  var c = K.W[a];
  if (c) {
    return b(null, c);
  }
  try {
    var d = K.indexedDB().open(a, K.Sb);
  } catch (e) {
    return b(e);
  }
  if (!d) {
    return b("Unable to connect to IndexedDB");
  }
  d.onupgradeneeded = e => {
    var f = e.target.result;
    e = e.target.transaction;
    var g;
    f.objectStoreNames.contains(K.V) ? g = e.objectStore(K.V) : g = f.createObjectStore(K.V);
    g.indexNames.contains("timestamp") || g.createIndex("timestamp", "timestamp", {unique:!1});
  };
  d.onsuccess = () => {
    c = d.result;
    K.W[a] = c;
    b(null, c);
  };
  d.onerror = e => {
    b(this.error);
    e.preventDefault();
  };
}, mc:(a, b) => {
  function c(k) {
    return "." !== k && ".." !== k;
  }
  function d(k) {
    return l => Pb(k + "/" + l);
  }
  var e = {};
  for (a = gc(a.oa).filter(c).map(d(a.oa)); a.length;) {
    var f = a.pop();
    try {
      var g = hc(f);
    } catch (k) {
      return b(k);
    }
    16384 === (g.mode & 61440) && a.push.apply(a, gc(f).filter(c).map(d(f)));
    e[f] = {timestamp:g.pa};
  }
  return b(null, {type:"local", entries:e});
}, oc:(a, b) => {
  var c = {};
  K.kc(a.oa, (d, e) => {
    if (d) {
      return b(d);
    }
    try {
      var f = e.transaction([K.V], "readonly");
      f.onerror = g => {
        b(this.error);
        g.preventDefault();
      };
      f.objectStore(K.V).index("timestamp").openKeyCursor().onsuccess = g => {
        g = g.target.result;
        if (!g) {
          return b(null, {type:"remote", db:e, entries:c});
        }
        c[g.primaryKey] = {timestamp:g.key};
        g.continue();
      };
    } catch (g) {
      return b(g);
    }
  });
}, Cc:(a, b) => {
  try {
    var c = ic(a).node;
    var d = hc(a);
  } catch (e) {
    return b(e);
  }
  return 16384 === (d.mode & 61440) ? b(null, {timestamp:d.pa, mode:d.mode}) : 32768 === (d.mode & 61440) ? (c.l = J.lc(c), b(null, {timestamp:d.pa, mode:d.mode, contents:c.l})) : b(Error("node type not supported"));
}, Uc:(a, b, c) => {
  try {
    if (16384 === (b.mode & 61440)) {
      jc(a, b.mode);
    } else if (32768 === (b.mode & 61440)) {
      kc(a, b.contents, {nb:!0});
    } else {
      return c(Error("node type not supported"));
    }
    mc(a, b.mode);
    var d = b.timestamp, e = b.timestamp, f = ic(a, {U:!0}).node;
    f.g.D(f, {timestamp:Math.max(d, e)});
  } catch (g) {
    return c(g);
  }
  c(null);
}, Oc:(a, b) => {
  try {
    var c = hc(a);
    16384 === (c.mode & 61440) ? nc(a) : 32768 === (c.mode & 61440) && oc(a);
  } catch (d) {
    return b(d);
  }
  b(null);
}, Dc:(a, b, c) => {
  a = a.get(b);
  a.onsuccess = d => {
    c(null, d.target.result);
  };
  a.onerror = d => {
    c(this.error);
    d.preventDefault();
  };
}, Vc:(a, b, c, d) => {
  try {
    var e = a.put(c, b);
  } catch (f) {
    d(f);
    return;
  }
  e.onsuccess = () => {
    d(null);
  };
  e.onerror = f => {
    d(this.error);
    f.preventDefault();
  };
}, Pc:(a, b, c) => {
  a = a.delete(b);
  a.onsuccess = () => {
    c(null);
  };
  a.onerror = d => {
    c(this.error);
    d.preventDefault();
  };
}, Mc:(a, b, c) => {
  function d(u) {
    if (u && !k) {
      return k = !0, c(u);
    }
  }
  var e = 0, f = [];
  Object.keys(a.entries).forEach(function(u) {
    var z = a.entries[u], D = b.entries[u];
    D && z.timestamp.getTime() == D.timestamp.getTime() || (f.push(u), e++);
  });
  var g = [];
  Object.keys(b.entries).forEach(function(u) {
    a.entries[u] || (g.push(u), e++);
  });
  if (!e) {
    return c(null);
  }
  var k = !1, l = ("remote" === a.type ? a.db : b.db).transaction([K.V], "readwrite"), p = l.objectStore(K.V);
  l.onerror = u => {
    d(this.error);
    u.preventDefault();
  };
  l.oncomplete = () => {
    k || c(null);
  };
  f.sort().forEach(u => {
    "local" === b.type ? K.Dc(p, u, (z, D) => {
      if (z) {
        return d(z);
      }
      K.Uc(u, D, d);
    }) : K.Cc(u, (z, D) => {
      if (z) {
        return d(z);
      }
      K.Vc(p, u, D, d);
    });
  });
  g.sort().reverse().forEach(u => {
    "local" === b.type ? K.Oc(u, d) : K.Pc(p, u, d);
  });
}}, pc = {0:"Success", 1:"Arg list too long", 2:"Permission denied", 3:"Address already in use", 4:"Address not available", 5:"Address family not supported by protocol family", 6:"No more processes", 7:"Socket already connected", 8:"Bad file number", 9:"Trying to read unreadable message", 10:"Mount device busy", 11:"Operation canceled", 12:"No children", 13:"Connection aborted", 14:"Connection refused", 15:"Connection reset by peer", 16:"File locking deadlock error", 17:"Destination address required", 
18:"Math arg out of domain of func", 19:"Quota exceeded", 20:"File exists", 21:"Bad address", 22:"File too large", 23:"Host is unreachable", 24:"Identifier removed", 25:"Illegal byte sequence", 26:"Connection already in progress", 27:"Interrupted system call", 28:"Invalid argument", 29:"I/O error", 30:"Socket is already connected", 31:"Is a directory", 32:"Too many symbolic links", 33:"Too many open files", 34:"Too many links", 35:"Message too long", 36:"Multihop attempted", 37:"File or path name too long", 
38:"Network interface is not configured", 39:"Connection reset by network", 40:"Network is unreachable", 41:"Too many open files in system", 42:"No buffer space available", 43:"No such device", 44:"No such file or directory", 45:"Exec format error", 46:"No record locks available", 47:"The link has been severed", 48:"Not enough core", 49:"No message of desired type", 50:"Protocol not available", 51:"No space left on device", 52:"Function not implemented", 53:"Socket is not connected", 54:"Not a directory", 
55:"Directory not empty", 56:"State not recoverable", 57:"Socket operation on non-socket", 59:"Not a typewriter", 60:"No such device or address", 61:"Value too large for defined data type", 62:"Previous owner died", 63:"Not super-user", 64:"Broken pipe", 65:"Protocol error", 66:"Unknown protocol", 67:"Protocol wrong type for socket", 68:"Math result not representable", 69:"Read only file system", 70:"Illegal seek", 71:"No such process", 72:"Stale file handle", 73:"Connection timed out", 74:"Text file busy", 
75:"Cross-device link", 100:"Device not a stream", 101:"Bad font file fmt", 102:"Invalid slot", 103:"Invalid request code", 104:"No anode", 105:"Block device required", 106:"Channel number out of range", 107:"Level 3 halted", 108:"Level 3 reset", 109:"Link number out of range", 110:"Protocol driver not attached", 111:"No CSI structure available", 112:"Level 2 halted", 113:"Invalid exchange", 114:"Invalid request descriptor", 115:"Exchange full", 116:"No data (for no delay io)", 117:"Timer expired", 
118:"Out of streams resources", 119:"Machine is not on the network", 120:"Package not installed", 121:"The object is remote", 122:"Advertise error", 123:"Srmount error", 124:"Communication error on send", 125:"Cross mount point (not really error)", 126:"Given log. name not unique", 127:"f.d. invalid for this operation", 128:"Remote address changed", 129:"Can   access a needed shared lib", 130:"Accessing a corrupted shared lib", 131:".lib section in a.out corrupted", 132:"Attempting to link in too many libs", 
133:"Attempting to exec a shared library", 135:"Streams pipe error", 136:"Too many users", 137:"Socket type not supported", 138:"Not supported", 139:"Protocol family not supported", 140:"Can't send after socket shutdown", 141:"Too many references", 142:"Host is down", 148:"No medium (in tape drive)", 156:"Level 2 not synchronized"}, qc = {}, rc = null, sc = {}, tc = [], uc = 1, vc = null, Ub = "/", xb = !0, H = null, ec = {}, wc = 0, ic = (a, b = {}) => {
  a = Tb(Ub, a);
  if (!a) {
    return {path:"", node:null};
  }
  b = Object.assign({Va:!0, bb:0}, b);
  if (8 < b.bb) {
    throw new H(32);
  }
  a = Ob(a.split("/").filter(g => !!g), !1);
  for (var c = rc, d = "/", e = 0; e < a.length; e++) {
    var f = e === a.length - 1;
    if (f && b.parent) {
      break;
    }
    c = fc(c, a[e]);
    d = Pb(d + "/" + a[e]);
    c.I && (!f || f && b.Va) && (c = c.I.root);
    if (!f || b.U) {
      for (f = 0; 40960 === (c.mode & 61440);) {
        if (c = xc(d), d = Tb(Qb(d), c), c = ic(d, {bb:b.bb + 1}).node, 40 < f++) {
          throw new H(32);
        }
      }
    }
  }
  return {path:d, node:c};
}, yc = a => {
  for (var b;;) {
    if (a === a.parent) {
      return a = a.u.oa, b ? "/" !== a[a.length - 1] ? a + "/" + b : a + b : a;
    }
    b = b ? a.name + "/" + b : a.name;
    a = a.parent;
  }
}, zc = (a, b) => {
  for (var c = 0, d = 0; d < b.length; d++) {
    c = (c << 5) - c + b.charCodeAt(d) | 0;
  }
  return (a + c >>> 0) % vc.length;
}, Ac = a => {
  var b = zc(a.parent.id, a.name);
  a.$ = vc[b];
  vc[b] = a;
}, Bc = a => {
  var b = zc(a.parent.id, a.name);
  if (vc[b] === a) {
    vc[b] = a.$;
  } else {
    for (b = vc[b]; b;) {
      if (b.$ === a) {
        b.$ = a.$;
        break;
      }
      b = b.$;
    }
  }
}, fc = (a, b) => {
  var c;
  if (c = (c = Cc(a, "x")) ? c : a.g.na ? 0 : 2) {
    throw new H(c, a);
  }
  for (c = vc[zc(a.id, b)]; c; c = c.$) {
    var d = c.name;
    if (c.parent.id === a.id && d === b) {
      return c;
    }
  }
  return a.g.na(a, b);
}, dc = (a, b, c, d) => {
  w("object" == typeof a);
  a = new Dc(a, b, c, d);
  Ac(a);
  return a;
}, Ec = {r:0, "r+":2, w:577, "w+":578, a:1089, "a+":1090}, Fc = a => {
  var b = ["r", "w", "rw"][a & 3];
  a & 512 && (b += "w");
  return b;
}, Cc = (a, b) => {
  if (xb) {
    return 0;
  }
  if (!b.includes("r") || a.mode & 292) {
    if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) {
      return 2;
    }
  } else {
    return 2;
  }
  return 0;
}, Gc = (a, b) => {
  try {
    return fc(a, b), 20;
  } catch (c) {
  }
  return Cc(a, "wx");
}, Hc = (a, b, c) => {
  try {
    var d = fc(a, b);
  } catch (e) {
    return e.h;
  }
  if (a = Cc(a, "wx")) {
    return a;
  }
  if (c) {
    if (16384 !== (d.mode & 61440)) {
      return 54;
    }
    if (d === d.parent || yc(d) === Ub) {
      return 10;
    }
  } else {
    if (16384 === (d.mode & 61440)) {
      return 31;
    }
  }
  return 0;
}, Ic = (a = 0) => {
  for (; 4096 >= a; a++) {
    if (!tc[a]) {
      return a;
    }
  }
  throw new H(33);
}, Kc = (a, b) => {
  Jc || (Jc = function() {
    this.T = {};
  }, Jc.prototype = {}, Object.defineProperties(Jc.prototype, {object:{get:function() {
    return this.node;
  }, set:function(c) {
    this.node = c;
  }}, flags:{get:function() {
    return this.T.flags;
  }, set:function(c) {
    this.T.flags = c;
  }}, position:{get:function() {
    return this.T.position;
  }, set:function(c) {
    this.T.position = c;
  }}}));
  a = Object.assign(new Jc(), a);
  b = Ic(b);
  a.m = b;
  return tc[b] = a;
}, cc = {open:a => {
  a.j = sc[a.node.ra].j;
  a.j.open && a.j.open(a);
}, Z:() => {
  throw new H(70);
}}, Zb = (a, b) => {
  sc[a] = {j:b};
}, Lc = a => {
  var b = [];
  for (a = [a]; a.length;) {
    var c = a.pop();
    b.push(c);
    a.push.apply(a, c.Ga);
  }
  return b;
}, Mc = (a, b) => {
  function c(g) {
    w(0 < wc);
    wc--;
    return b(g);
  }
  function d(g) {
    if (g) {
      if (!d.ic) {
        return d.ic = !0, c(g);
      }
    } else {
      ++f >= e.length && c(null);
    }
  }
  "function" == typeof a && (b = a, a = !1);
  wc++;
  1 < wc && y("warning: " + wc + " FS.syncfs operations in flight at once, probably just doing extra work");
  var e = Lc(rc.u), f = 0;
  e.forEach(g => {
    if (!g.type.Nb) {
      return d(null);
    }
    g.type.Nb(g, a, d);
  });
}, zb = (a, b) => {
  if ("string" == typeof a) {
    throw a;
  }
  var c = "/" === b, d = !b;
  if (c && rc) {
    throw new H(10);
  }
  if (!c && !d) {
    var e = ic(b, {Va:!1});
    b = e.path;
    e = e.node;
    if (e.I) {
      throw new H(10);
    }
    if (16384 !== (e.mode & 61440)) {
      throw new H(54);
    }
  }
  b = {type:a, Cd:{}, oa:b, Ga:[]};
  a = a.u(b);
  a.u = b;
  b.root = a;
  c ? rc = a : e && (e.I = b, e.u && e.u.Ga.push(b));
  return a;
}, Nc = a => {
  a = ic(a, {Va:!1});
  if (!a.node.I) {
    throw new H(28);
  }
  a = a.node;
  var b = a.I, c = Lc(b);
  Object.keys(vc).forEach(d => {
    for (d = vc[d]; d;) {
      var e = d.$;
      c.includes(d.u) && Bc(d);
      d = e;
    }
  });
  a.I = null;
  b = a.u.Ga.indexOf(b);
  w(-1 !== b);
  a.u.Ga.splice(b, 1);
}, Oc = (a, b, c) => {
  var d = ic(a, {parent:!0}).node;
  a = Rb(a);
  if (!a || "." === a || ".." === a) {
    throw new H(28);
  }
  var e = Gc(d, a);
  if (e) {
    throw new H(e);
  }
  if (!d.g.Fa) {
    throw new H(63);
  }
  return d.g.Fa(d, a, b, c);
}, Pc = (a, b) => Oc(a, (void 0 !== b ? b : 511) & 1023 | 16384, 0), jc = (a, b) => {
  a = a.split("/");
  for (var c = "", d = 0; d < a.length; ++d) {
    if (a[d]) {
      c += "/" + a[d];
      try {
        Pc(c, b);
      } catch (e) {
        if (20 != e.h) {
          throw e;
        }
      }
    }
  }
}, Qc = (a, b, c) => {
  "undefined" == typeof c && (c = b, b = 438);
  Oc(a, b | 8192, c);
}, vb = (a, b) => {
  if (!Tb(a)) {
    throw new H(44);
  }
  var c = ic(b, {parent:!0}).node;
  if (!c) {
    throw new H(44);
  }
  b = Rb(b);
  var d = Gc(c, b);
  if (d) {
    throw new H(d);
  }
  if (!c.g.Ma) {
    throw new H(63);
  }
  c.g.Ma(c, b, a);
}, nc = a => {
  var b = ic(a, {parent:!0}).node;
  a = Rb(a);
  var c = fc(b, a), d = Hc(b, a, !0);
  if (d) {
    throw new H(d);
  }
  if (!b.g.La) {
    throw new H(63);
  }
  if (c.I) {
    throw new H(10);
  }
  b.g.La(b, a);
  Bc(c);
}, gc = a => {
  a = ic(a, {U:!0}).node;
  if (!a.g.Ia) {
    throw new H(54);
  }
  return a.g.Ia(a);
}, oc = a => {
  var b = ic(a, {parent:!0}).node;
  if (!b) {
    throw new H(44);
  }
  a = Rb(a);
  var c = fc(b, a), d = Hc(b, a, !1);
  if (d) {
    throw new H(d);
  }
  if (!b.g.Qa) {
    throw new H(63);
  }
  if (c.I) {
    throw new H(10);
  }
  b.g.Qa(b, a);
  Bc(c);
}, xc = a => {
  a = ic(a).node;
  if (!a) {
    throw new H(44);
  }
  if (!a.g.ta) {
    throw new H(28);
  }
  return Tb(yc(a.parent), a.g.ta(a));
}, hc = (a, b) => {
  a = ic(a, {U:!b}).node;
  if (!a) {
    throw new H(44);
  }
  if (!a.g.K) {
    throw new H(63);
  }
  return a.g.K(a);
}, Rc = a => hc(a, !0), mc = (a, b) => {
  a = "string" == typeof a ? ic(a, {U:!0}).node : a;
  if (!a.g.D) {
    throw new H(63);
  }
  a.g.D(a, {mode:b & 4095 | a.mode & -4096, timestamp:Date.now()});
}, wb = (a, b, c) => {
  if ("" === a) {
    throw new H(44);
  }
  if ("string" == typeof b) {
    var d = Ec[b];
    if ("undefined" == typeof d) {
      throw Error("Unknown file open mode: " + b);
    }
    b = d;
  }
  c = b & 64 ? ("undefined" == typeof c ? 438 : c) & 4095 | 32768 : 0;
  if ("object" == typeof a) {
    var e = a;
  } else {
    a = Pb(a);
    try {
      e = ic(a, {U:!(b & 131072)}).node;
    } catch (f) {
    }
  }
  d = !1;
  if (b & 64) {
    if (e) {
      if (b & 128) {
        throw new H(20);
      }
    } else {
      e = Oc(a, c, 0), d = !0;
    }
  }
  if (!e) {
    throw new H(44);
  }
  8192 === (e.mode & 61440) && (b &= -513);
  if (b & 65536 && 16384 !== (e.mode & 61440)) {
    throw new H(54);
  }
  if (!d && (c = e ? 40960 === (e.mode & 61440) ? 32 : 16384 === (e.mode & 61440) && ("r" !== Fc(b) || b & 512) ? 31 : Cc(e, Fc(b)) : 44)) {
    throw new H(c);
  }
  if (b & 512 && !d) {
    c = e;
    c = "string" == typeof c ? ic(c, {U:!0}).node : c;
    if (!c.g.D) {
      throw new H(63);
    }
    if (16384 === (c.mode & 61440)) {
      throw new H(31);
    }
    if (32768 !== (c.mode & 61440)) {
      throw new H(28);
    }
    if (d = Cc(c, "w")) {
      throw new H(d);
    }
    c.g.D(c, {size:0, timestamp:Date.now()});
  }
  b &= -131713;
  e = Kc({node:e, path:yc(e), flags:b, seekable:!0, position:0, j:e.j, bd:[], error:!1});
  e.j.open && e.j.open(e);
  !t.logReadFiles || b & 1 || (Sc || (Sc = {}), a in Sc || (Sc[a] = 1));
  return e;
}, Tc = a => {
  if (null === a.m) {
    throw new H(8);
  }
  a.X && (a.X = null);
  try {
    a.j.close && a.j.close(a);
  } catch (b) {
    throw b;
  } finally {
    tc[a.m] = null;
  }
  a.m = null;
}, Uc = (a, b, c) => {
  if (null === a.m) {
    throw new H(8);
  }
  if (!a.seekable || !a.j.Z) {
    throw new H(70);
  }
  if (0 != c && 1 != c && 2 != c) {
    throw new H(28);
  }
  a.position = a.j.Z(a, b, c);
  a.bd = [];
  return a.position;
}, Vc = (a, b, c, d, e, f) => {
  if (0 > d || 0 > e) {
    throw new H(28);
  }
  if (null === a.m) {
    throw new H(8);
  }
  if (0 === (a.flags & 2097155)) {
    throw new H(8);
  }
  if (16384 === (a.node.mode & 61440)) {
    throw new H(31);
  }
  if (!a.j.write) {
    throw new H(28);
  }
  a.seekable && a.flags & 1024 && Uc(a, 0, 2);
  var g = "undefined" != typeof e;
  if (!g) {
    e = a.position;
  } else if (!a.seekable) {
    throw new H(70);
  }
  b = a.j.write(a, b, c, d, e, f);
  g || (a.position += b);
  return b;
}, kc = (a, b, c = {}) => {
  c.flags = c.flags || 577;
  a = wb(a, c.flags, c.mode);
  if ("string" == typeof b) {
    var d = new Uint8Array(ab(b) + 1);
    b = Za(b, d, 0, d.length);
    Vc(a, d, 0, b, void 0, c.nb);
  } else if (ArrayBuffer.isView(b)) {
    Vc(a, b, 0, b.byteLength, void 0, c.nb);
  } else {
    throw Error("Unsupported data type");
  }
  Tc(a);
}, tb = () => {
  H || (H = function(a, b) {
    this.node = b;
    this.Rc = function(c) {
      this.h = c;
      for (var d in qc) {
        if (qc[d] === c) {
          this.code = d;
          break;
        }
      }
    };
    this.Rc(a);
    this.message = pc[a];
    this.stack && (Object.defineProperty(this, "stack", {value:Error().stack, writable:!0}), this.stack = Wc(this.stack));
  }, H.prototype = Error(), H.prototype.constructor = H, [44].forEach(a => {
    ec[a] = new H(a);
    ec[a].stack = "<generic error, no stack>";
  }));
}, sb, Xc = (a, b) => {
  var c = 0;
  a && (c |= 365);
  b && (c |= 146);
  return c;
}, ub = (a, b, c) => {
  a = Pb("/dev/" + a);
  var d = Xc(!!b, !!c);
  Yc || (Yc = 64);
  var e = Yc++ << 8 | 0;
  Zb(e, {open:f => {
    f.seekable = !1;
  }, close:() => {
    c && c.buffer && c.buffer.length && c(10);
  }, read:(f, g, k, l) => {
    for (var p = 0, u = 0; u < l; u++) {
      try {
        var z = b();
      } catch (D) {
        throw new H(29);
      }
      if (void 0 === z && 0 === p) {
        throw new H(6);
      }
      if (null === z || void 0 === z) {
        break;
      }
      p++;
      g[k + u] = z;
    }
    p && (f.node.timestamp = Date.now());
    return p;
  }, write:(f, g, k, l) => {
    for (var p = 0; p < l; p++) {
      try {
        c(g[k + p]);
      } catch (u) {
        throw new H(29);
      }
    }
    l && (f.node.timestamp = Date.now());
    return p;
  }});
  Qc(a, d, e);
}, Yc, L = {}, Jc, Sc;
function Zc(a, b, c) {
  if ("/" === b.charAt(0)) {
    return b;
  }
  if (-100 === a) {
    a = Ub;
  } else {
    a = tc[a];
    if (!a) {
      throw new H(8);
    }
    a = a.path;
  }
  if (0 == b.length) {
    if (!c) {
      throw new H(44);
    }
    return a;
  }
  return Pb(a + "/" + b);
}
function $c(a, b, c) {
  try {
    var d = a(b);
  } catch (e) {
    if (e && e.node && Pb(b) !== Pb(yc(e.node))) {
      return -54;
    }
    throw e;
  }
  n()[c >> 2] = d.fc;
  n()[c + 8 >> 2] = d.Xa;
  n()[c + 12 >> 2] = d.mode;
  n()[c + 16 >> 2] = d.Fc;
  n()[c + 20 >> 2] = d.uid;
  n()[c + 24 >> 2] = d.tc;
  n()[c + 28 >> 2] = d.ra;
  F = [d.size >>> 0, (C = d.size, 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
  n()[c + 40 >> 2] = F[0];
  n()[c + 44 >> 2] = F[1];
  n()[c + 48 >> 2] = 4096;
  n()[c + 52 >> 2] = d.Yb;
  F = [Math.floor(d.mb.getTime() / 1e3) >>> 0, (C = Math.floor(d.mb.getTime() / 1e3), 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
  n()[c + 56 >> 2] = F[0];
  n()[c + 60 >> 2] = F[1];
  n()[c + 64 >> 2] = 0;
  F = [Math.floor(d.pa.getTime() / 1e3) >>> 0, (C = Math.floor(d.pa.getTime() / 1e3), 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
  n()[c + 72 >> 2] = F[0];
  n()[c + 76 >> 2] = F[1];
  n()[c + 80 >> 2] = 0;
  F = [Math.floor(d.qb.getTime() / 1e3) >>> 0, (C = Math.floor(d.qb.getTime() / 1e3), 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
  n()[c + 88 >> 2] = F[0];
  n()[c + 92 >> 2] = F[1];
  n()[c + 96 >> 2] = 0;
  F = [d.Xa >>> 0, (C = d.Xa, 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
  n()[c + 104 >> 2] = F[0];
  n()[c + 108 >> 2] = F[1];
  return 0;
}
var ad = void 0;
function bd() {
  w(void 0 != ad);
  ad += 4;
  return n()[ad - 4 >> 2];
}
function cd(a) {
  a = tc[a];
  if (!a) {
    throw new H(8);
  }
  return a;
}
function dd(a) {
  if (v) {
    return M(1, 1, a);
  }
  Va = a;
  if (!pb()) {
    G.Ob();
    if (t.onExit) {
      t.onExit(a);
    }
    Ua = !0;
  }
  Ea(a, new Na(a));
}
function ed(a, b) {
  Va = a;
  if (!b && v) {
    throw fd(a), "unwind";
  }
  if (!pb() && (fb(), !v)) {
    gd();
    Ab(lb);
    sb = !1;
    hd(0);
    for (var c = 0; c < tc.length; c++) {
      var d = tc[c];
      d && Tc(d);
    }
    K.Jc();
    G.Ob();
    ob = !0;
  }
  pb() && !b && (b = "program exited (with status: " + a + "), but keepRuntimeAlive() is set (counter=" + Ma + ") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)", za(b), y(b));
  dd(a);
}
function jd(a) {
  if (a instanceof Na || "unwind" == a) {
    return Va;
  }
  Ea(1, a);
}
var G = {O:[], ia:[], Na:[], J:{}, Wa:function() {
  v ? G.zc() : G.yc();
}, yc:function() {
  for (var a = 0; 8 > a; ++a) {
    G.kb();
  }
}, zc:function() {
  G.receiveObjectTransfer = G.Lc;
  G.threadInitTLS = G.Pb;
  G.setExitStatus = G.Mb;
  noExitRuntime = !1;
}, Mb:function(a) {
  Va = a;
}, Ob:function() {
  w(!v, "Internal Error! terminateAllThreads() can only ever be called from main application thread!");
  for (var a in G.J) {
    var b = G.J[a];
    b && G.Kb(b);
  }
  w(0 === Object.keys(G.J).length);
  w(0 === G.ia.length);
  for (a = 0; a < G.O.length; ++a) {
    b = G.O[a], w(!b.B), b.terminate();
  }
  G.O = [];
}, Kb:function(a) {
  var b = a.B;
  delete G.J[b];
  G.O.push(a);
  G.ia.splice(G.ia.indexOf(a), 1);
  a.B = 0;
  kd(b);
}, Lc:function() {
}, Pb:function() {
  for (var a in G.Na) {
    if (G.Na.hasOwnProperty(a)) {
      G.Na[a]();
    }
  }
}, Ab:function(a, b) {
  a.onmessage = c => {
    c = c.data;
    var d = c.cmd;
    a.B && (G.ec = a.B);
    if (c.targetThread && c.targetThread != ld()) {
      var e = G.J[c.Jd];
      e ? e.postMessage(c, c.transferList) : y('Internal error! Worker sent a message "' + d + '" to target pthread ' + c.targetThread + ", but that thread no longer exists!");
    } else {
      if ("processProxyingQueue" === d) {
        md(c.queue);
      } else if ("spawnThread" === d) {
        Nb(c);
      } else if ("cleanupThread" === d) {
        Mb(c.thread);
      } else if ("killThread" === d) {
        c = c.thread, w(!v, "Internal Error! killThread() can only ever be called from main application thread!"), w(c, "Internal Error! Null pthread_ptr in killThread!"), d = G.J[c], delete G.J[c], d.terminate(), kd(c), G.ia.splice(G.ia.indexOf(d), 1), d.B = 0;
      } else if ("cancelThread" === d) {
        c = c.thread, w(!v, "Internal Error! cancelThread() can only ever be called from main application thread!"), w(c, "Internal Error! Null pthread_ptr in cancelThread!"), G.J[c].postMessage({cmd:"cancel"});
      } else if ("loaded" === d) {
        a.loaded = !0, b && b(a), a.ua && (a.ua(), delete a.ua);
      } else if ("print" === d) {
        Oa("Thread " + c.threadId + ": " + c.text);
      } else if ("printErr" === d) {
        y("Thread " + c.threadId + ": " + c.text);
      } else if ("alert" === d) {
        alert("Thread " + c.threadId + ": " + c.text);
      } else if ("setimmediate" === c.target) {
        a.postMessage(c);
      } else if ("onAbort" === d) {
        if (t.onAbort) {
          t.onAbort(c.arg);
        }
      } else {
        d && y("worker sent an unknown command " + d);
      }
    }
    G.ec = void 0;
  };
  a.onerror = c => {
    var d = "worker sent an error!";
    a.B && (d = "Pthread 0x" + a.B.toString(16).padStart(8, "0") + " sent an error!");
    y(d + " " + c.filename + ":" + c.lineno + ": " + c.message);
    throw c;
  };
  w(m instanceof WebAssembly.Memory, "WebAssembly memory should have been loaded by now!");
  w(Ta instanceof WebAssembly.Module, "WebAssembly Module should have been loaded by now!");
  a.postMessage({cmd:"load", urlOrBlob:t.mainScriptUrlOrBlob || _scriptDir, wasmMemory:m, wasmModule:Ta});
}, kb:function() {
  var a = Ka("godot.web.editor.wasm32.worker.js");
  G.O.push(new Worker(a));
}, nc:function() {
  0 == G.O.length && (y("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."), G.kb(), G.Ab(G.O[0]));
  return G.O.pop();
}};
t.PThread = G;
function Ab(a) {
  for (; 0 < a.length;) {
    a.shift()(t);
  }
}
function nd(a) {
  var b = od();
  a = a();
  pd(b);
  return a;
}
function Wc(a) {
  return a.replace(/\b_Z[\w\d_]+/g, function(b) {
    Ya("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling");
    return b === b ? b : b + " [" + b + "]";
  });
}
t.establishStackSpace = function() {
  var a = ld(), b = n()[a + 44 >> 2];
  a = n()[a + 48 >> 2];
  a = b - a;
  w(0 != b);
  w(0 != a);
  w(b > a, "stackTop must be higher then stackMax");
  qd(b, a);
  pd(b);
  db();
};
function fd(a) {
  if (v) {
    return M(2, 0, a);
  }
  try {
    ed(a);
  } catch (b) {
    jd(b);
  }
}
function rd(a, b = "i8") {
  b.endsWith("*") && (b = "*");
  switch(b) {
    case "i1":
      return h()[a >> 0];
    case "i8":
      return h()[a >> 0];
    case "i16":
      return ka()[a >> 1];
    case "i32":
      return n()[a >> 2];
    case "i64":
      return n()[a >> 2];
    case "float":
      return sa()[a >> 2];
    case "double":
      return wa()[a >> 3];
    case "*":
      return r()[a >> 2];
    default:
      Aa("invalid type for getValue: " + b);
  }
  return null;
}
var sd = [];
function td(a) {
  var b = sd[a];
  b || (a >= sd.length && (sd.length = a + 1), sd[a] = b = cb.get(a));
  w(cb.get(a) == b, "JavaScript-side Wasm function table mirror is out of date!");
  return b;
}
t.invokeEntryPoint = function(a, b) {
  a = td(a)(b);
  fb();
  pb() ? G.Mb(a) : ud(a);
};
function N(a, b, c = "i8") {
  c.endsWith("*") && (c = "*");
  switch(c) {
    case "i1":
      h()[a >> 0] = b;
      break;
    case "i8":
      h()[a >> 0] = b;
      break;
    case "i16":
      ka()[a >> 1] = b;
      break;
    case "i32":
      n()[a >> 2] = b;
      break;
    case "i64":
      F = [b >>> 0, (C = b, 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
      n()[a >> 2] = F[0];
      n()[a + 4 >> 2] = F[1];
      break;
    case "float":
      sa()[a >> 2] = b;
      break;
    case "double":
      wa()[a >> 3] = b;
      break;
    case "*":
      r()[a >> 2] = b;
      break;
    default:
      Aa("invalid type for setValue: " + c);
  }
}
function vd(a, b) {
  w(0 <= a.length, "writeArrayToMemory array must have a length (should be an array or typed array)");
  h().set(a, b);
}
function wd(a) {
  this.aa = a - 24;
  this.Ec = function(b) {
    r()[this.aa + 4 >> 2] = b;
  };
  this.yb = function(b) {
    r()[this.aa + 8 >> 2] = b;
  };
  this.Ac = function() {
    n()[this.aa >> 2] = 0;
  };
  this.xb = function() {
    var b = 0;
    h()[this.aa + 12 >> 0] = b;
  };
  this.Bc = function() {
    var b = 0;
    h()[this.aa + 13 >> 0] = b;
  };
  this.Wa = function(b, c) {
    this.T();
    this.Ec(b);
    this.yb(c);
    this.Ac();
    this.xb();
    this.Bc();
  };
  this.T = function() {
    r()[this.aa + 16 >> 2] = 0;
  };
}
var xd = 0;
function yd(a, b, c, d) {
  return v ? M(3, 1, a, b, c, d) : zd(a, b, c, d);
}
function zd(a, b, c, d) {
  if ("undefined" == typeof SharedArrayBuffer) {
    return y("Current environment does not support SharedArrayBuffer, pthreads are not available!"), 6;
  }
  var e = [];
  if (v && 0 === e.length) {
    return yd(a, b, c, d);
  }
  a = {Tc:c, B:a, lb:d, ad:e};
  return v ? (a.kd = "spawnThread", postMessage(a, e), 0) : Nb(a);
}
function Ad(a, b, c, d, e) {
  if (v) {
    return M(4, 1, a, b, c, d, e);
  }
  try {
    w(64 >= a, "nfds must be less than or equal to 64");
    w(!d, "exceptfds not supported");
    e = 0;
    for (var f = b ? n()[b >> 2] : 0, g = b ? n()[b + 4 >> 2] : 0, k = c ? n()[c >> 2] : 0, l = c ? n()[c + 4 >> 2] : 0, p = d ? n()[d >> 2] : 0, u = d ? n()[d + 4 >> 2] : 0, z = 0, D = 0, q = 0, E = 0, x = 0, P = 0, I = (b ? n()[b >> 2] : 0) | (c ? n()[c >> 2] : 0) | (d ? n()[d >> 2] : 0), rb = (b ? n()[b + 4 >> 2] : 0) | (c ? n()[c + 4 >> 2] : 0) | (d ? n()[d + 4 >> 2] : 0), la = 0; la < a; la++) {
      var R = 1 << la % 32;
      if (32 > la ? I & R : rb & R) {
        var ta = tc[la];
        if (!ta) {
          throw new H(8);
        }
        var ma = 5;
        ta.j.ga && (ma = ta.j.ga(ta));
        ma & 1 && (32 > la ? f & R : g & R) && (32 > la ? z |= R : D |= R, e++);
        ma & 4 && (32 > la ? k & R : l & R) && (32 > la ? q |= R : E |= R, e++);
        ma & 2 && (32 > la ? p & R : u & R) && (32 > la ? x |= R : P |= R, e++);
      }
    }
    b && (n()[b >> 2] = z, n()[b + 4 >> 2] = D);
    c && (n()[c >> 2] = q, n()[c + 4 >> 2] = E);
    d && (n()[d >> 2] = x, n()[d + 4 >> 2] = P);
    return e;
  } catch (ua) {
    if ("undefined" == typeof L || !(ua instanceof H)) {
      throw ua;
    }
    return -ua.h;
  }
}
var yb = {u:function() {
  t.websocket = t.websocket && "object" === typeof t.websocket ? t.websocket : {};
  t.websocket.Ra = {};
  t.websocket.on = function(a, b) {
    "function" === typeof b && (this.Ra[a] = b);
    return this;
  };
  t.websocket.ea = function(a, b) {
    "function" === typeof this.Ra[a] && this.Ra[a].call(this, b);
  };
  return dc(null, "/", 16895, 0);
}, cc:function(a, b, c) {
  b &= -526337;
  if (1 == b && c && 6 != c) {
    throw new H(66);
  }
  a = {family:a, type:b, protocol:c, M:null, error:null, qa:{}, pending:[], ha:[], F:yb.G};
  b = yb.Ha();
  c = dc(yb.root, b, 49152, 0);
  c.ja = a;
  b = Kc({path:b, node:c, flags:2, seekable:!1, j:yb.j});
  a.stream = b;
  return a;
}, pc:function(a) {
  return (a = tc[a]) && 49152 === (a.node.mode & 49152) ? a.node.ja : null;
}, j:{ga:function(a) {
  a = a.node.ja;
  return a.F.ga(a);
}, Ba:function(a, b, c) {
  a = a.node.ja;
  return a.F.Ba(a, b, c);
}, read:function(a, b, c, d) {
  a = a.node.ja;
  d = a.F.Ib(a, d);
  if (!d) {
    return 0;
  }
  b.set(d.buffer, c);
  return d.buffer.length;
}, write:function(a, b, c, d) {
  a = a.node.ja;
  return a.F.Lb(a, b, c, d);
}, close:function(a) {
  a = a.node.ja;
  a.F.close(a);
}}, Ha:function() {
  yb.Ha.current || (yb.Ha.current = 0);
  return "socket[" + yb.Ha.current++ + "]";
}, G:{pb:function(a, b, c) {
  if ("object" == typeof b) {
    var d = b;
    c = b = null;
  }
  if (d) {
    if (d.hb) {
      b = d.hb.Fd, c = d.hb.Gd;
    } else {
      c = /ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url);
      if (!c) {
        throw Error("WebSocket URL must be in the format ws(s)://address:port");
      }
      b = c[1];
      c = parseInt(c[2], 10);
    }
  } else {
    try {
      var e = t.websocket && "object" === typeof t.websocket, f = "ws://";
      e && "string" === typeof t.websocket.url && (f = t.websocket.url);
      if ("ws://" === f || "wss://" === f) {
        var g = b.split("/");
        f = f + g[0] + ":" + c + "/" + g.slice(1).join("/");
      }
      g = "binary";
      e && "string" === typeof t.websocket.subprotocol && (g = t.websocket.subprotocol);
      var k = void 0;
      "null" !== g && (k = g = g.replace(/^ +| +$/g, "").split(/ *, */));
      e && null === t.websocket.subprotocol && (k = void 0);
      d = new WebSocket(f, k);
      d.binaryType = "arraybuffer";
    } catch (l) {
      throw new H(23);
    }
  }
  b = {v:b, port:c, i:d, za:[]};
  yb.G.ib(a, b);
  yb.G.vc(a, b);
  2 === a.type && "undefined" != typeof a.ka && b.za.push(new Uint8Array([255, 255, 255, 255, 112, 111, 114, 116, (a.ka & 65280) >> 8, a.ka & 255]));
  return b;
}, Aa:function(a, b, c) {
  return a.qa[b + ":" + c];
}, ib:function(a, b) {
  a.qa[b.v + ":" + b.port] = b;
}, Jb:function(a, b) {
  delete a.qa[b.v + ":" + b.port];
}, vc:function(a, b) {
  function c() {
    t.websocket.ea("open", a.stream.m);
    try {
      for (var f = b.za.shift(); f;) {
        b.i.send(f), f = b.za.shift();
      }
    } catch (g) {
      b.i.close();
    }
  }
  function d(f) {
    if ("string" == typeof f) {
      f = (new TextEncoder()).encode(f);
    } else {
      w(void 0 !== f.byteLength);
      if (0 == f.byteLength) {
        return;
      }
      f = new Uint8Array(f);
    }
    var g = e;
    e = !1;
    g && 10 === f.length && 255 === f[0] && 255 === f[1] && 255 === f[2] && 255 === f[3] && 112 === f[4] && 111 === f[5] && 114 === f[6] && 116 === f[7] ? (f = f[8] << 8 | f[9], yb.G.Jb(a, b), b.port = f, yb.G.ib(a, b)) : (a.ha.push({v:b.v, port:b.port, data:f}), t.websocket.ea("message", a.stream.m));
  }
  var e = !0;
  Ha ? (b.i.Za("open", c), b.i.Za("message", function(f, g) {
    g && d((new Uint8Array(f)).buffer);
  }), b.i.Za("close", function() {
    t.websocket.ea("close", a.stream.m);
  }), b.i.Za("error", function() {
    a.error = 14;
    t.websocket.ea("error", [a.stream.m, a.error, "ECONNREFUSED: Connection refused"]);
  })) : (b.i.onopen = c, b.i.onclose = function() {
    t.websocket.ea("close", a.stream.m);
  }, b.i.onmessage = function(f) {
    d(f.data);
  }, b.i.onerror = function() {
    a.error = 14;
    t.websocket.ea("error", [a.stream.m, a.error, "ECONNREFUSED: Connection refused"]);
  });
}, ga:function(a) {
  if (1 === a.type && a.M) {
    return a.pending.length ? 65 : 0;
  }
  var b = 0, c = 1 === a.type ? yb.G.Aa(a, a.R, a.S) : null;
  if (a.ha.length || !c || c && c.i.readyState === c.i.CLOSING || c && c.i.readyState === c.i.CLOSED) {
    b |= 65;
  }
  if (!c || c && c.i.readyState === c.i.OPEN) {
    b |= 4;
  }
  if (c && c.i.readyState === c.i.CLOSING || c && c.i.readyState === c.i.CLOSED) {
    b |= 16;
  }
  return b;
}, Ba:function(a, b, c) {
  switch(b) {
    case 21531:
      return b = 0, a.ha.length && (b = a.ha[0].data.length), n()[c >> 2] = b, 0;
    default:
      return 28;
  }
}, close:function(a) {
  if (a.M) {
    try {
      a.M.close();
    } catch (e) {
    }
    a.M = null;
  }
  for (var b = Object.keys(a.qa), c = 0; c < b.length; c++) {
    var d = a.qa[b[c]];
    try {
      d.i.close();
    } catch (e) {
    }
    yb.G.Jb(a, d);
  }
  return 0;
}, bind:function(a, b, c) {
  if ("undefined" != typeof a.eb || "undefined" != typeof a.ka) {
    throw new H(28);
  }
  a.eb = b;
  a.ka = c;
  if (2 === a.type) {
    a.M && (a.M.close(), a.M = null);
    try {
      a.F.zb(a, 0);
    } catch (d) {
      if (!(d instanceof H)) {
        throw d;
      }
      if (138 !== d.h) {
        throw d;
      }
    }
  }
}, connect:function(a, b, c) {
  if (a.M) {
    throw new H(138);
  }
  if ("undefined" != typeof a.R && "undefined" != typeof a.S) {
    var d = yb.G.Aa(a, a.R, a.S);
    if (d) {
      if (d.i.readyState === d.i.CONNECTING) {
        throw new H(7);
      }
      throw new H(30);
    }
  }
  b = yb.G.pb(a, b, c);
  a.R = b.v;
  a.S = b.port;
  throw new H(26);
}, zb:function() {
  if (!Ha) {
    throw new H(138);
  }
}, accept:function(a) {
  if (!a.M || !a.pending.length) {
    throw new H(28);
  }
  var b = a.pending.shift();
  b.stream.flags = a.stream.flags;
  return b;
}, wd:function(a, b) {
  if (b) {
    if (void 0 === a.R || void 0 === a.S) {
      throw new H(53);
    }
    b = a.R;
    a = a.S;
  } else {
    b = a.eb || 0, a = a.ka || 0;
  }
  return {v:b, port:a};
}, Lb:function(a, b, c, d, e, f) {
  if (2 === a.type) {
    if (void 0 === e || void 0 === f) {
      e = a.R, f = a.S;
    }
    if (void 0 === e || void 0 === f) {
      throw new H(17);
    }
  } else {
    e = a.R, f = a.S;
  }
  var g = yb.G.Aa(a, e, f);
  if (1 === a.type) {
    if (!g || g.i.readyState === g.i.CLOSING || g.i.readyState === g.i.CLOSED) {
      throw new H(53);
    }
    if (g.i.readyState === g.i.CONNECTING) {
      throw new H(6);
    }
  }
  ArrayBuffer.isView(b) && (c += b.byteOffset, b = b.buffer);
  var k;
  b instanceof SharedArrayBuffer ? k = (new Uint8Array(new Uint8Array(b.slice(c, c + d)))).buffer : k = b.slice(c, c + d);
  if (2 === a.type && (!g || g.i.readyState !== g.i.OPEN)) {
    return g && g.i.readyState !== g.i.CLOSING && g.i.readyState !== g.i.CLOSED || (g = yb.G.pb(a, e, f)), g.za.push(k), d;
  }
  try {
    return g.i.send(k), d;
  } catch (l) {
    throw new H(28);
  }
}, Ib:function(a, b) {
  if (1 === a.type && a.M) {
    throw new H(53);
  }
  var c = a.ha.shift();
  if (!c) {
    if (1 === a.type) {
      a = yb.G.Aa(a, a.R, a.S);
      if (!a) {
        throw new H(53);
      }
      if (a.i.readyState === a.i.CLOSING || a.i.readyState === a.i.CLOSED) {
        return null;
      }
    }
    throw new H(6);
  }
  var d = c.data.byteLength || c.data.length, e = c.data.byteOffset || 0, f = c.data.buffer || c.data;
  b = Math.min(b, d);
  var g = {buffer:new Uint8Array(f, e, b), v:c.v, port:c.port};
  1 === a.type && b < d && (c.data = new Uint8Array(f, e + b, d - b), a.ha.unshift(c));
  return g;
}}};
function Bd(a) {
  a = yb.pc(a);
  if (!a) {
    throw new H(8);
  }
  return a;
}
function Cd(a) {
  a = a.split(".");
  for (var b = 0; 4 > b; b++) {
    var c = Number(a[b]);
    if (isNaN(c)) {
      return null;
    }
    a[b] = c;
  }
  return (a[0] | a[1] << 8 | a[2] << 16 | a[3] << 24) >>> 0;
}
function Dd(a) {
  var b, c, d = [];
  if (!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(a)) {
    return null;
  }
  if ("::" === a) {
    return [0, 0, 0, 0, 0, 0, 0, 0];
  }
  a = a.startsWith("::") ? a.replace("::", "Z:") : a.replace("::", ":Z:");
  0 < a.indexOf(".") ? (a = a.replace(RegExp("[.]", "g"), ":"), a = a.split(":"), a[a.length - 4] = parseInt(a[a.length - 4]) + 256 * parseInt(a[a.length - 3]), a[a.length - 3] = parseInt(a[a.length - 2]) + 256 * parseInt(a[a.length - 1]), a = a.slice(0, a.length - 2)) : a = a.split(":");
  for (b = c = 0; b < a.length; b++) {
    if ("string" == typeof a[b]) {
      if ("Z" === a[b]) {
        for (c = 0; c < 8 - a.length + 1; c++) {
          d[b + c] = 0;
        }
        --c;
      } else {
        d[b + c] = Ed(parseInt(a[b], 16));
      }
    } else {
      d[b + c] = a[b];
    }
  }
  return [d[1] << 16 | d[0], d[3] << 16 | d[2], d[5] << 16 | d[4], d[7] << 16 | d[6]];
}
function Fd(a, b, c, d, e) {
  switch(b) {
    case 2:
      c = Cd(c);
      ia().fill(0, a, a + 16);
      e && (n()[e >> 2] = 16);
      ka()[a >> 1] = b;
      n()[a + 4 >> 2] = c;
      ka()[a + 2 >> 1] = Ed(d);
      break;
    case 10:
      c = Dd(c);
      ia().fill(0, a, a + 28);
      e && (n()[e >> 2] = 28);
      n()[a >> 2] = b;
      n()[a + 8 >> 2] = c[0];
      n()[a + 12 >> 2] = c[1];
      n()[a + 16 >> 2] = c[2];
      n()[a + 20 >> 2] = c[3];
      ka()[a + 2 >> 1] = Ed(d);
      break;
    default:
      return 5;
  }
  return 0;
}
var Gd = 1, Hd = {}, Id = {};
function Jd(a) {
  var b = Cd(a);
  if (null !== b) {
    return a;
  }
  b = Dd(a);
  if (null !== b) {
    return a;
  }
  Hd[a] ? b = Hd[a] : (b = Gd++, w(65535 > b, "exceeded max address mappings of 65535"), b = "172.29." + (b & 255) + "." + (b & 65280), Id[b] = a, Hd[a] = b);
  return b;
}
function Kd(a, b, c, d) {
  if (v) {
    return M(5, 1, a, b, c, d);
  }
  try {
    var e = Bd(a), f = e.F.accept(e);
    if (b) {
      var g = Fd(b, f.family, Jd(f.R), f.S, c);
      w(!g);
    }
    return f.stream.m;
  } catch (k) {
    if ("undefined" == typeof L || !(k instanceof H)) {
      throw k;
    }
    return -k.h;
  }
}
function Ld(a) {
  return (a & 255) + "." + (a >> 8 & 255) + "." + (a >> 16 & 255) + "." + (a >> 24 & 255);
}
function Md(a) {
  var b = "", c, d = 0, e = 0, f = 0, g = 0;
  a = [a[0] & 65535, a[0] >> 16, a[1] & 65535, a[1] >> 16, a[2] & 65535, a[2] >> 16, a[3] & 65535, a[3] >> 16];
  var k = !0;
  for (c = 0; 5 > c; c++) {
    if (0 !== a[c]) {
      k = !1;
      break;
    }
  }
  if (k) {
    c = Ld(a[6] | a[7] << 16);
    if (-1 === a[5]) {
      return "::ffff:" + c;
    }
    if (0 === a[5]) {
      return "0.0.0.0" === c && (c = ""), "0.0.0.1" === c && (c = "1"), "::" + c;
    }
  }
  for (c = 0; 8 > c; c++) {
    0 === a[c] && (1 < c - e && (g = 0), e = c, g++), g > d && (d = g, f = c - d + 1);
  }
  for (c = 0; 8 > c; c++) {
    1 < d && 0 === a[c] && c >= f && c < f + d ? c === f && (b += ":", 0 === f && (b += ":")) : (b += Number(Nd(a[c] & 65535)).toString(16), b += 7 > c ? ":" : "");
  }
  return b;
}
function Od(a, b) {
  var c = ka()[a >> 1], d = Nd(oa()[a + 2 >> 1]);
  switch(c) {
    case 2:
      if (16 !== b) {
        return {h:28};
      }
      a = n()[a + 4 >> 2];
      a = Ld(a);
      break;
    case 10:
      if (28 !== b) {
        return {h:28};
      }
      a = [n()[a + 8 >> 2], n()[a + 12 >> 2], n()[a + 16 >> 2], n()[a + 20 >> 2]];
      a = Md(a);
      break;
    default:
      return {h:5};
  }
  return {family:c, v:a, port:d};
}
function Pd(a, b, c) {
  if (c && 0 === a) {
    return null;
  }
  a = Od(a, b);
  if (a.h) {
    throw new H(a.h);
  }
  b = a.v;
  a.v = (Id[b] ? Id[b] : null) || a.v;
  return a;
}
function Qd(a, b, c) {
  if (v) {
    return M(6, 1, a, b, c);
  }
  try {
    var d = Bd(a), e = Pd(b, c);
    d.F.bind(d, e.v, e.port);
    return 0;
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function Rd(a) {
  if (v) {
    return M(7, 1, a);
  }
  try {
    a = A(a);
    var b = ic(a, {U:!0});
    if (null === b.node) {
      throw new H(44);
    }
    if (16384 !== (b.node.mode & 61440)) {
      throw new H(54);
    }
    var c = Cc(b.node, "x");
    if (c) {
      throw new H(c);
    }
    Ub = b.path;
    return 0;
  } catch (d) {
    if ("undefined" == typeof L || !(d instanceof H)) {
      throw d;
    }
    return -d.h;
  }
}
function Sd(a, b) {
  if (v) {
    return M(8, 1, a, b);
  }
  try {
    return a = A(a), mc(a, b), 0;
  } catch (c) {
    if ("undefined" == typeof L || !(c instanceof H)) {
      throw c;
    }
    return -c.h;
  }
}
function Td(a, b, c) {
  if (v) {
    return M(9, 1, a, b, c);
  }
  try {
    var d = Bd(a), e = Pd(b, c);
    d.F.connect(d, e.v, e.port);
    return 0;
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function Ud(a, b, c, d) {
  if (v) {
    return M(10, 1, a, b, c, d);
  }
  try {
    b = A(b);
    w(0 === d);
    b = Zc(a, b);
    if (c & -8) {
      return -28;
    }
    var e = ic(b, {U:!0}).node;
    if (!e) {
      return -44;
    }
    a = "";
    c & 4 && (a += "r");
    c & 2 && (a += "w");
    c & 1 && (a += "x");
    return a && Cc(e, a) ? -2 : 0;
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function Vd(a, b, c) {
  if (v) {
    return M(11, 1, a, b, c);
  }
  ad = c;
  try {
    var d = cd(a);
    switch(b) {
      case 0:
        var e = bd();
        return 0 > e ? -28 : Kc(d, e).m;
      case 1:
      case 2:
        return 0;
      case 3:
        return d.flags;
      case 4:
        return e = bd(), d.flags |= e, 0;
      case 5:
        return e = bd(), ka()[e + 0 >> 1] = 2, 0;
      case 6:
      case 7:
        return 0;
      case 16:
      case 8:
        return -28;
      case 9:
        return n()[Wd() >> 2] = 28, -1;
      default:
        return -28;
    }
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function Xd(a, b) {
  if (v) {
    return M(12, 1, a, b);
  }
  try {
    if (0 === b) {
      return -28;
    }
    var c = Ub, d = ab(c) + 1;
    if (b < d) {
      return -68;
    }
    $a(c, a, b);
    return d;
  } catch (e) {
    if ("undefined" == typeof L || !(e instanceof H)) {
      throw e;
    }
    return -e.h;
  }
}
function Yd(a, b, c) {
  if (v) {
    return M(13, 1, a, b, c);
  }
  try {
    var d = cd(a);
    d.X || (d.X = gc(d.path));
    a = 0;
    for (var e = Uc(d, 0, 1), f = Math.floor(e / 280); f < d.X.length && a + 280 <= c;) {
      var g = d.X[f];
      if ("." === g) {
        var k = d.node.id;
        var l = 4;
      } else if (".." === g) {
        k = ic(d.path, {parent:!0}).node.id, l = 4;
      } else {
        var p = fc(d.node, g);
        k = p.id;
        l = 8192 === (p.mode & 61440) ? 2 : 16384 === (p.mode & 61440) ? 4 : 40960 === (p.mode & 61440) ? 10 : 8;
      }
      w(k);
      F = [k >>> 0, (C = k, 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
      n()[b + a >> 2] = F[0];
      n()[b + a + 4 >> 2] = F[1];
      F = [280 * (f + 1) >>> 0, (C = 280 * (f + 1), 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
      n()[b + a + 8 >> 2] = F[0];
      n()[b + a + 12 >> 2] = F[1];
      ka()[b + a + 16 >> 1] = 280;
      h()[b + a + 18 >> 0] = l;
      $a(g, b + a + 19, 256);
      a += 280;
      f += 1;
    }
    Uc(d, 280 * f, 0);
    return a;
  } catch (u) {
    if ("undefined" == typeof L || !(u instanceof H)) {
      throw u;
    }
    return -u.h;
  }
}
function Zd(a, b, c) {
  if (v) {
    return M(14, 1, a, b, c);
  }
  try {
    y("__syscall_getsockname " + a);
    var d = Bd(a), e = Fd(b, d.family, Jd(d.eb || "0.0.0.0"), d.ka, c);
    w(!e);
    return 0;
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function $d(a, b, c, d, e) {
  if (v) {
    return M(15, 1, a, b, c, d, e);
  }
  try {
    var f = Bd(a);
    return 1 === b && 4 === c ? (n()[d >> 2] = f.error, n()[e >> 2] = 4, f.error = null, 0) : -50;
  } catch (g) {
    if ("undefined" == typeof L || !(g instanceof H)) {
      throw g;
    }
    return -g.h;
  }
}
function ae(a, b, c) {
  if (v) {
    return M(16, 1, a, b, c);
  }
  ad = c;
  try {
    var d = cd(a);
    switch(b) {
      case 21509:
      case 21505:
        return d.o ? 0 : -59;
      case 21510:
      case 21511:
      case 21512:
      case 21506:
      case 21507:
      case 21508:
        return d.o ? 0 : -59;
      case 21519:
        if (!d.o) {
          return -59;
        }
        var e = bd();
        return n()[e >> 2] = 0;
      case 21520:
        return d.o ? -28 : -59;
      case 21531:
        a = e = bd();
        if (!d.j.Ba) {
          throw new H(59);
        }
        return d.j.Ba(d, b, a);
      case 21523:
        return d.o ? 0 : -59;
      case 21524:
        return d.o ? 0 : -59;
      default:
        return -28;
    }
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function be(a, b) {
  if (v) {
    return M(17, 1, a, b);
  }
  try {
    var c = Bd(a);
    c.F.zb(c, b);
    return 0;
  } catch (d) {
    if ("undefined" == typeof L || !(d instanceof H)) {
      throw d;
    }
    return -d.h;
  }
}
function ce(a, b) {
  if (v) {
    return M(18, 1, a, b);
  }
  try {
    return a = A(a), $c(Rc, a, b);
  } catch (c) {
    if ("undefined" == typeof L || !(c instanceof H)) {
      throw c;
    }
    return -c.h;
  }
}
function de(a, b, c) {
  if (v) {
    return M(19, 1, a, b, c);
  }
  try {
    return b = A(b), b = Zc(a, b), b = Pb(b), "/" === b[b.length - 1] && (b = b.substr(0, b.length - 1)), Pc(b, c), 0;
  } catch (d) {
    if ("undefined" == typeof L || !(d instanceof H)) {
      throw d;
    }
    return -d.h;
  }
}
function ee(a, b, c, d) {
  if (v) {
    return M(20, 1, a, b, c, d);
  }
  try {
    b = A(b);
    var e = d & 256, f = d & 4096;
    d &= -4353;
    w(!d, d);
    b = Zc(a, b, f);
    return $c(e ? Rc : hc, b, c);
  } catch (g) {
    if ("undefined" == typeof L || !(g instanceof H)) {
      throw g;
    }
    return -g.h;
  }
}
function fe(a, b, c, d) {
  if (v) {
    return M(21, 1, a, b, c, d);
  }
  ad = d;
  try {
    b = A(b);
    b = Zc(a, b);
    var e = d ? bd() : 0;
    return wb(b, c, e).m;
  } catch (f) {
    if ("undefined" == typeof L || !(f instanceof H)) {
      throw f;
    }
    return -f.h;
  }
}
function ge(a, b, c) {
  if (v) {
    return M(22, 1, a, b, c);
  }
  try {
    for (var d = c = 0; d < b; d++) {
      var e = a + 8 * d, f = n()[e >> 2], g = ka()[e + 4 >> 1], k = 32, l = tc[f];
      l && (k = 5, l.j.ga && (k = l.j.ga(l)));
      (k &= g | 24) && c++;
      ka()[e + 6 >> 1] = k;
    }
    return c;
  } catch (p) {
    if ("undefined" == typeof L || !(p instanceof H)) {
      throw p;
    }
    return -p.h;
  }
}
function he(a, b, c, d) {
  if (v) {
    return M(23, 1, a, b, c, d);
  }
  try {
    b = A(b);
    b = Zc(a, b);
    if (0 >= d) {
      return -28;
    }
    var e = xc(b), f = Math.min(d, ab(e)), g = h()[c + f];
    $a(e, c, d + 1);
    h()[c + f] = g;
    return f;
  } catch (k) {
    if ("undefined" == typeof L || !(k instanceof H)) {
      throw k;
    }
    return -k.h;
  }
}
function ie(a, b, c, d, e, f) {
  if (v) {
    return M(24, 1, a, b, c, d, e, f);
  }
  try {
    var g = Bd(a), k = g.F.Ib(g, c);
    if (!k) {
      return 0;
    }
    if (e) {
      var l = Fd(e, g.family, Jd(k.v), k.port, f);
      w(!l);
    }
    ia().set(k.buffer, b);
    return k.buffer.byteLength;
  } catch (p) {
    if ("undefined" == typeof L || !(p instanceof H)) {
      throw p;
    }
    return -p.h;
  }
}
function je(a, b, c, d) {
  if (v) {
    return M(25, 1, a, b, c, d);
  }
  try {
    b = A(b);
    d = A(d);
    b = Zc(a, b);
    d = Zc(c, d);
    a = b;
    var e = Qb(a), f = Qb(d), g = Rb(a), k = Rb(d);
    var l = ic(a, {parent:!0});
    var p = l.node;
    l = ic(d, {parent:!0});
    var u = l.node;
    if (!p || !u) {
      throw new H(44);
    }
    if (p.u !== u.u) {
      throw new H(75);
    }
    var z = fc(p, g), D = Vb(a, f);
    if ("." !== D.charAt(0)) {
      throw new H(28);
    }
    D = Vb(d, e);
    if ("." !== D.charAt(0)) {
      throw new H(55);
    }
    try {
      var q = fc(u, k);
    } catch (P) {
    }
    if (z !== q) {
      var E = 16384 === (z.mode & 61440), x = Hc(p, g, E);
      if (x) {
        throw new H(x);
      }
      if (x = q ? Hc(u, k, E) : Gc(u, k)) {
        throw new H(x);
      }
      if (!p.g.Ja) {
        throw new H(63);
      }
      if (z.I || q && q.I) {
        throw new H(10);
      }
      if (u !== p && (x = Cc(p, "w"))) {
        throw new H(x);
      }
      Bc(z);
      try {
        p.g.Ja(z, u, k);
      } catch (P) {
        throw P;
      } finally {
        Ac(z);
      }
    }
    return 0;
  } catch (P) {
    if ("undefined" == typeof L || !(P instanceof H)) {
      throw P;
    }
    return -P.h;
  }
}
function ke(a) {
  if (v) {
    return M(26, 1, a);
  }
  try {
    return a = A(a), nc(a), 0;
  } catch (b) {
    if ("undefined" == typeof L || !(b instanceof H)) {
      throw b;
    }
    return -b.h;
  }
}
function le(a, b, c, d, e, f) {
  if (v) {
    return M(27, 1, a, b, c, d, e, f);
  }
  try {
    var g = Bd(a), k = Pd(e, f, !0);
    return k ? g.F.Lb(g, h(), b, c, k.v, k.port) : Vc(g.stream, h(), b, c);
  } catch (l) {
    if ("undefined" == typeof L || !(l instanceof H)) {
      throw l;
    }
    return -l.h;
  }
}
function me(a, b, c) {
  if (v) {
    return M(28, 1, a, b, c);
  }
  try {
    var d = yb.cc(a, b, c);
    w(64 > d.stream.m);
    return d.stream.m;
  } catch (e) {
    if ("undefined" == typeof L || !(e instanceof H)) {
      throw e;
    }
    return -e.h;
  }
}
function ne(a, b) {
  if (v) {
    return M(29, 1, a, b);
  }
  try {
    return a = A(a), $c(hc, a, b);
  } catch (c) {
    if ("undefined" == typeof L || !(c instanceof H)) {
      throw c;
    }
    return -c.h;
  }
}
function oe(a, b, c) {
  if (v) {
    return M(30, 1, a, b, c);
  }
  try {
    return A(a), w(64 === b), n()[c + 4 >> 2] = 4096, n()[c + 40 >> 2] = 4096, n()[c + 8 >> 2] = 1e6, n()[c + 12 >> 2] = 5e5, n()[c + 16 >> 2] = 5e5, n()[c + 20 >> 2] = uc, n()[c + 24 >> 2] = 1e6, n()[c + 28 >> 2] = 42, n()[c + 44 >> 2] = 2, n()[c + 36 >> 2] = 255, 0;
  } catch (d) {
    if ("undefined" == typeof L || !(d instanceof H)) {
      throw d;
    }
    return -d.h;
  }
}
function pe(a, b) {
  if (v) {
    return M(31, 1, a, b);
  }
  try {
    return a = A(a), b = A(b), vb(a, b), 0;
  } catch (c) {
    if ("undefined" == typeof L || !(c instanceof H)) {
      throw c;
    }
    return -c.h;
  }
}
function qe(a, b, c) {
  if (v) {
    return M(32, 1, a, b, c);
  }
  try {
    return b = A(b), b = Zc(a, b), 0 === c ? oc(b) : 512 === c ? nc(b) : Aa("Invalid flags passed to unlinkat"), 0;
  } catch (d) {
    if ("undefined" == typeof L || !(d instanceof H)) {
      throw d;
    }
    return -d.h;
  }
}
function md(a) {
  Atomics.store(n(), a >> 2, 1);
  ld() && re(a);
  Atomics.compareExchange(n(), a >> 2, 1, 0);
}
t.executeNotifiedProxyingQueue = md;
function se(a) {
  return r()[a >> 2] + 4294967296 * n()[a + 4 >> 2];
}
function te(a) {
  var b = ab(a) + 1, c = ue(b);
  c && Za(a, h(), c, b);
  return c;
}
function ve(a, b, c) {
  function d(p) {
    return (p = p.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? p[1] : "GMT";
  }
  if (v) {
    return M(33, 1, a, b, c);
  }
  var e = (new Date()).getFullYear(), f = new Date(e, 0, 1), g = new Date(e, 6, 1);
  e = f.getTimezoneOffset();
  var k = g.getTimezoneOffset(), l = Math.max(e, k);
  n()[a >> 2] = 60 * l;
  n()[b >> 2] = Number(e != k);
  a = d(f);
  b = d(g);
  a = te(a);
  b = te(b);
  k < e ? (r()[c >> 2] = a, r()[c + 4 >> 2] = b) : (r()[c >> 2] = b, r()[c + 4 >> 2] = a);
}
function we(a, b, c) {
  we.$b || (we.$b = !0, ve(a, b, c));
}
function xe(a, b) {
  ye = a;
  ze = b;
  if (Ae) {
    if (Be || (Ma += 1, Be = !0), 0 == a) {
      Ce = function() {
        var d = Math.max(0, De + b - Ee()) | 0;
        setTimeout(Fe, d);
      }, Ge = "timeout";
    } else if (1 == a) {
      Ce = function() {
        He(Fe);
      }, Ge = "rAF";
    } else if (2 == a) {
      if ("undefined" == typeof setImmediate) {
        var c = [];
        addEventListener("message", d => {
          if ("setimmediate" === d.data || "setimmediate" === d.data.target) {
            d.stopPropagation(), c.shift()();
          }
        }, !0);
        setImmediate = function(d) {
          c.push(d);
          Ga ? (void 0 === t.setImmediates && (t.setImmediates = []), t.setImmediates.push(d), postMessage({target:"setimmediate"})) : postMessage("setimmediate", "*");
        };
      }
      Ce = function() {
        setImmediate(Fe);
      };
      Ge = "immediate";
    }
  } else {
    y("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.");
  }
}
var Ee;
Ee = v ? () => performance.now() - t.__performance_now_clock_drift : () => performance.now();
function Ie() {
  if (!pb()) {
    try {
      v ? ud(Va) : ed(Va);
    } catch (a) {
      jd(a);
    }
  }
}
function Je(a, b, c, d, e) {
  function f() {
    return g < Ke ? (w(0 < Ma), --Ma, Ie(), !1) : !0;
  }
  w(!Ae, "emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");
  Ae = a;
  Le = d;
  var g = Ke;
  Be = !1;
  Fe = function() {
    if (!Ua) {
      if (0 < Me.length) {
        var k = Date.now(), l = Me.shift();
        l.td(l.lb);
        if (Ne) {
          var p = Ne, u = 0 == p % 1 ? p - 1 : Math.floor(p);
          Ne = l.nd ? u : (8 * p + (u + .5)) / 9;
        }
        Oa('main loop blocker "' + l.name + '" took ' + (Date.now() - k) + " ms");
        t.setStatus && (k = t.statusMessage || "Please wait...", l = Ne, p = Oe.rd, l ? l < p ? t.setStatus(k + " (" + (p - l) + "/" + p + ")") : t.setStatus(k) : t.setStatus(""));
        f() && setTimeout(Fe, 0);
      } else {
        f() && (Pe = Pe + 1 | 0, 1 == ye && 1 < ze && 0 != Pe % ze ? Ce() : (0 == ye && (De = Ee()), "timeout" === Ge && t.la && (Ya("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"), Ge = ""), Ua || t.preMainLoop && !1 === t.preMainLoop() || (Qe(a), t.postMainLoop && t.postMainLoop()), fb(), f() && ("object" == typeof SDL && 
        SDL.audio && SDL.audio.Ic && SDL.audio.Ic(), Ce())));
      }
    }
  };
  e || (b && 0 < b ? xe(0, 1e3 / b) : xe(1, 1), Ce());
  if (c) {
    throw "unwind";
  }
}
function Qe(a) {
  if (ob || Ua) {
    y("user callback triggered after runtime exited or application aborted.  Ignoring.");
  } else {
    try {
      a(), Ie();
    } catch (b) {
      jd(b);
    }
  }
}
function Re(a) {
  Ma += 1;
  setTimeout(function() {
    w(0 < Ma);
    --Ma;
    Qe(a);
  }, 1e4);
}
function Ya(a) {
  Se || (Se = {});
  Se[a] || (Se[a] = 1, y(a));
}
var Se, Be = !1, Ce = null, Ge = "", Ke = 0, Ae = null, Le = 0, ye = 0, ze = 0, Pe = 0, Me = [];
function Te() {
  Ke++;
  var a = ye, b = ze, c = Ae;
  Ae = null;
  Je(c, 0, !1, Le, !0);
  xe(a, b);
  Ce();
}
var Oe = {}, De, Fe, Ne, Ue = !1, Ve = !1, We = [];
function Xe() {
  function a() {
    Ve = document.pointerLockElement === t.canvas || document.mozPointerLockElement === t.canvas || document.webkitPointerLockElement === t.canvas || document.msPointerLockElement === t.canvas;
  }
  t.preloadPlugins || (t.preloadPlugins = []);
  if (!Ye) {
    Ye = !0;
    try {
      Ze = !0;
    } catch (c) {
      Ze = !1, y("warning: no blob constructor, cannot create blobs with mimetypes");
    }
    $e = "undefined" != typeof MozBlobBuilder ? MozBlobBuilder : "undefined" != typeof WebKitBlobBuilder ? WebKitBlobBuilder : Ze ? null : y("warning: no BlobBuilder");
    af = "undefined" != typeof window ? window.URL ? window.URL : window.webkitURL : void 0;
    t.Fb || "undefined" != typeof af || (y("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."), t.Fb = !0);
    t.preloadPlugins.push({canHandle:function(c) {
      return !t.Fb && /\.(jpg|jpeg|png|bmp)$/i.test(c);
    }, handle:function(c, d, e, f) {
      var g = null;
      if (Ze) {
        try {
          g = new Blob([c], {type:bf(d)}), g.size !== c.length && (g = new Blob([(new Uint8Array(c)).buffer], {type:bf(d)}));
        } catch (p) {
          Ya("Blob constructor present but fails: " + p + "; falling back to blob builder");
        }
      }
      g || (g = new $e(), g.append((new Uint8Array(c)).buffer), g = g.getBlob());
      var k = af.createObjectURL(g);
      w("string" == typeof k, "createObjectURL must return a url as a string");
      var l = new Image();
      l.onload = () => {
        w(l.complete, "Image " + d + " could not be decoded");
        var p = document.createElement("canvas");
        p.width = l.width;
        p.height = l.height;
        p.getContext("2d").drawImage(l, 0, 0);
        af.revokeObjectURL(k);
        e && e(c);
      };
      l.onerror = () => {
        Oa("Image " + k + " could not be decoded");
        f && f();
      };
      l.src = k;
    }});
    t.preloadPlugins.push({canHandle:function(c) {
      return !t.Bd && c.substr(-4) in {".ogg":1, ".wav":1, ".mp3":1};
    }, handle:function(c, d, e, f) {
      function g() {
        l || (l = !0, e && e(c));
      }
      function k() {
        l || (l = !0, new Audio(), f && f());
      }
      var l = !1;
      if (Ze) {
        try {
          var p = new Blob([c], {type:bf(d)});
        } catch (z) {
          return k();
        }
        p = af.createObjectURL(p);
        w("string" == typeof p, "createObjectURL must return a url as a string");
        var u = new Audio();
        u.addEventListener("canplaythrough", () => g(u), !1);
        u.onerror = function() {
          if (!l) {
            y("warning: browser could not fully decode audio " + d + ", trying slower base64 approach");
            for (var z = "", D = 0, q = 0, E = 0; E < c.length; E++) {
              for (D = D << 8 | c[E], q += 8; 6 <= q;) {
                var x = D >> q - 6 & 63;
                q -= 6;
                z += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[x];
              }
            }
            2 == q ? (z += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(D & 3) << 4], z += "==") : 4 == q && (z += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(D & 15) << 2], z += "=");
            u.src = "data:audio/x-" + d.substr(-3) + ";base64," + z;
            g(u);
          }
        };
        u.src = p;
        Re(function() {
          g(u);
        });
      } else {
        return k();
      }
    }});
    var b = t.canvas;
    b && (b.requestPointerLock = b.requestPointerLock || b.mozRequestPointerLock || b.webkitRequestPointerLock || b.msRequestPointerLock || (() => {
    }), b.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock || document.msExitPointerLock || (() => {
    }), b.exitPointerLock = b.exitPointerLock.bind(document), document.addEventListener("pointerlockchange", a, !1), document.addEventListener("mozpointerlockchange", a, !1), document.addEventListener("webkitpointerlockchange", a, !1), document.addEventListener("mspointerlockchange", a, !1), t.elementPointerLock && b.addEventListener("click", c => {
      !Ve && t.canvas.requestPointerLock && (t.canvas.requestPointerLock(), c.preventDefault());
    }, !1));
  }
}
function cf(a, b, c, d) {
  if (b && t.la && a == t.canvas) {
    return t.la;
  }
  var e;
  if (b) {
    var f = {antialias:!1, alpha:!1, Ya:"undefined" != typeof WebGL2RenderingContext ? 2 : 1};
    if (d) {
      for (var g in d) {
        f[g] = d[g];
      }
    }
    if ("undefined" != typeof df && (e = ef(a, f))) {
      var k = ff[e].C;
    }
  } else {
    k = a.getContext("2d");
  }
  if (!k) {
    return null;
  }
  c && (b || w("undefined" == typeof O, "cannot set in module if GLctx is used, but we are a non-GL context that would replace it"), t.la = k, b && gf(e), t.Md = b, We.forEach(function(l) {
    l();
  }), Xe());
  return k;
}
var hf = !1, jf = void 0, kf = void 0;
function lf(a, b) {
  function c() {
    Ue = !1;
    var f = d.parentNode;
    (document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.webkitFullscreenElement || document.webkitCurrentFullScreenElement) === f ? (d.exitFullscreen = mf, jf && d.requestPointerLock(), Ue = !0, kf ? ("undefined" != typeof SDL && (f = r()[SDL.screen >> 2], f |= 8388608, n()[SDL.screen >> 2] = f), nf(t.canvas), of()) : nf(d)) : (f.parentNode.insertBefore(d, f), f.parentNode.removeChild(f), kf ? ("undefined" != typeof SDL && (f = r()[SDL.screen >> 
    2], f &= -8388609, n()[SDL.screen >> 2] = f), nf(t.canvas), of()) : nf(d));
    if (t.onFullScreen) {
      t.onFullScreen(Ue);
    }
    if (t.onFullscreen) {
      t.onFullscreen(Ue);
    }
  }
  jf = a;
  kf = b;
  "undefined" == typeof jf && (jf = !0);
  "undefined" == typeof kf && (kf = !1);
  var d = t.canvas;
  hf || (hf = !0, document.addEventListener("fullscreenchange", c, !1), document.addEventListener("mozfullscreenchange", c, !1), document.addEventListener("webkitfullscreenchange", c, !1), document.addEventListener("MSFullscreenChange", c, !1));
  var e = document.createElement("div");
  d.parentNode.insertBefore(e, d);
  e.appendChild(d);
  e.requestFullscreen = e.requestFullscreen || e.mozRequestFullScreen || e.msRequestFullscreen || (e.webkitRequestFullscreen ? () => e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : null) || (e.webkitRequestFullScreen ? () => e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) : null);
  e.requestFullscreen();
}
function mf() {
  if (!Ue) {
    return !1;
  }
  (document.exitFullscreen || document.cancelFullScreen || document.mozCancelFullScreen || document.msExitFullscreen || document.webkitCancelFullScreen || function() {
  }).apply(document, []);
  return !0;
}
var pf = 0;
function He(a) {
  if ("function" == typeof requestAnimationFrame) {
    requestAnimationFrame(a);
  } else {
    var b = Date.now();
    if (0 === pf) {
      pf = b + 1e3 / 60;
    } else {
      for (; b + 2 >= pf;) {
        pf += 1e3 / 60;
      }
    }
    setTimeout(a, Math.max(pf - b, 0));
  }
}
function bf(a) {
  return {jpg:"image/jpeg", jpeg:"image/jpeg", png:"image/png", bmp:"image/bmp", ogg:"audio/ogg", wav:"audio/wav", mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".") + 1)];
}
var qf = [];
function of() {
  var a = t.canvas;
  qf.forEach(function(b) {
    b(a.width, a.height);
  });
}
function nf(a, b, c) {
  b && c ? (a.ed = b, a.wc = c) : (b = a.ed, c = a.wc);
  var d = b, e = c;
  t.forcedAspectRatio && 0 < t.forcedAspectRatio && (d / e < t.forcedAspectRatio ? d = Math.round(e * t.forcedAspectRatio) : e = Math.round(d / t.forcedAspectRatio));
  if ((document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.webkitFullscreenElement || document.webkitCurrentFullScreenElement) === a.parentNode && "undefined" != typeof screen) {
    var f = Math.min(screen.width / d, screen.height / e);
    d = Math.round(d * f);
    e = Math.round(e * f);
  }
  kf ? (a.width != d && (a.width = d), a.height != e && (a.height = e), "undefined" != typeof a.style && (a.style.removeProperty("width"), a.style.removeProperty("height"))) : (a.width != b && (a.width = b), a.height != c && (a.height = c), "undefined" != typeof a.style && (d != b || e != c ? (a.style.setProperty("width", d + "px", "important"), a.style.setProperty("height", e + "px", "important")) : (a.style.removeProperty("width"), a.style.removeProperty("height"))));
}
var Ye, Ze, $e, af;
function rf(a) {
  if (v) {
    return M(34, 1, a);
  }
  noExitRuntime = !1;
  Ma = 0;
  ed(a);
}
function sf(a) {
  var b = a.getExtension("ANGLE_instanced_arrays");
  b && (a.vertexAttribDivisor = function(c, d) {
    b.vertexAttribDivisorANGLE(c, d);
  }, a.drawArraysInstanced = function(c, d, e, f) {
    b.drawArraysInstancedANGLE(c, d, e, f);
  }, a.drawElementsInstanced = function(c, d, e, f, g) {
    b.drawElementsInstancedANGLE(c, d, e, f, g);
  });
}
function tf(a) {
  var b = a.getExtension("OES_vertex_array_object");
  b && (a.createVertexArray = function() {
    return b.createVertexArrayOES();
  }, a.deleteVertexArray = function(c) {
    b.deleteVertexArrayOES(c);
  }, a.bindVertexArray = function(c) {
    b.bindVertexArrayOES(c);
  }, a.isVertexArray = function(c) {
    return b.isVertexArrayOES(c);
  });
}
function uf(a) {
  var b = a.getExtension("WEBGL_draw_buffers");
  b && (a.drawBuffers = function(c, d) {
    b.drawBuffersWEBGL(c, d);
  });
}
function vf(a) {
  a.od = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
}
function wf(a) {
  a.xd = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
}
function xf(a) {
  a.Ad = a.getExtension("WEBGL_multi_draw");
}
var yf = 1, zf = [], Af = [], Bf = [], Cf = [], Df = [], Ef = [], ff = {}, Ff = [], Gf = [], Hf = {}, If = {}, Jf = 4;
function Q(a) {
  Kf || (Kf = a);
}
function Lf(a) {
  for (var b = yf++, c = a.length; c < b; c++) {
    a[c] = null;
  }
  return b;
}
function ef(a, b) {
  b.Ka && (b.preserveDrawingBuffer = !0);
  var c = 1 < b.Ya ? a.getContext("webgl2", b) : a.getContext("webgl", b);
  if (c) {
    a = ue(8);
    n()[a + 4 >> 2] = ld();
    var d = {uc:a, attributes:b, version:b.Ya, C:c};
    c.canvas && (c.canvas.Tb = d);
    ff[a] = d;
    ("undefined" == typeof b.tb || b.tb) && Mf(d);
    if (b.Ka) {
      b = d.C;
      c = b.createFramebuffer();
      b.bindFramebuffer(36160, c);
      d.Ta = c;
      d.Ua = !1;
      b.getContextAttributes().antialias ? d.Ua = !0 : (c = navigator.userAgent.toLowerCase().match(/firefox\/(\d\d)/), null != c && (d.Ua = 67 > c[1]));
      d.ma = b.createTexture();
      d.xa = b.createRenderbuffer();
      Nf(d);
      b.bindTexture(3553, d.ma);
      b.texParameteri(3553, 10241, 9728);
      b.texParameteri(3553, 10240, 9728);
      b.texParameteri(3553, 10242, 33071);
      b.texParameteri(3553, 10243, 33071);
      b.texImage2D(3553, 0, 6408, b.canvas.width, b.canvas.height, 0, 6408, 5121, null);
      b.framebufferTexture2D(36160, 36064, 3553, d.ma, 0);
      b.bindTexture(3553, null);
      b.bindRenderbuffer(36161, d.xa);
      b.renderbufferStorage(36161, 33189, b.canvas.width, b.canvas.height);
      b.framebufferRenderbuffer(36160, 36096, 36161, d.xa);
      b.bindRenderbuffer(36161, null);
      c = b.createBuffer();
      b.bindBuffer(34962, c);
      b.bufferData(34962, new Float32Array([-1, -1, -1, 1, 1, -1, 1, 1]), 35044);
      b.bindBuffer(34962, null);
      d.Wb = c;
      c = b.createShader(35633);
      b.shaderSource(c, "attribute vec2 pos;varying lowp vec2 tex;void main() { tex = pos * 0.5 + vec2(0.5,0.5); gl_Position = vec4(pos, 0.0, 1.0); }");
      b.compileShader(c);
      var e = b.createShader(35632);
      b.shaderSource(e, "varying lowp vec2 tex;uniform sampler2D sampler;void main() { gl_FragColor = texture2D(sampler, tex); }");
      b.compileShader(e);
      var f = b.createProgram();
      b.attachShader(f, c);
      b.attachShader(f, e);
      b.linkProgram(f);
      d.Vb = f;
      d.H = b.getAttribLocation(f, "pos");
      b.useProgram(f);
      b.uniform1i(b.getUniformLocation(f, "sampler"), 0);
      b.useProgram(null);
      d.ya = void 0;
      b.createVertexArray && (d.ya = b.createVertexArray(), b.bindVertexArray(d.ya), b.enableVertexAttribArray(d.H), b.bindVertexArray(null));
    }
  } else {
    a = 0;
  }
  return a;
}
function Nf(a) {
  var b = a.C;
  if (a.ma) {
    var c = b.getParameter(32873);
    b.bindTexture(3553, a.ma);
    b.texImage2D(3553, 0, 6408, b.drawingBufferWidth, b.drawingBufferHeight, 0, 6408, 5121, null);
    b.bindTexture(3553, c);
  }
  a.xa && (c = b.getParameter(36007), b.bindRenderbuffer(36161, a.xa), b.renderbufferStorage(36161, 33189, b.drawingBufferWidth, b.drawingBufferHeight), b.bindRenderbuffer(36161, c));
}
function Of() {
  var a = S, b = a.C, c = b.getParameter(3089);
  c && b.disable(3089);
  var d = b.getParameter(36006);
  if (b.blitFramebuffer && !a.Ua) {
    b.bindFramebuffer(36008, a.Ta), b.bindFramebuffer(36009, null), b.blitFramebuffer(0, 0, b.canvas.width, b.canvas.height, 0, 0, b.canvas.width, b.canvas.height, 16384, 9728);
  } else {
    b.bindFramebuffer(36160, null);
    var e = b.getParameter(35725);
    b.useProgram(a.Vb);
    var f = b.getParameter(34964);
    b.bindBuffer(34962, a.Wb);
    var g = b.getParameter(34016);
    b.activeTexture(33984);
    var k = b.getParameter(32873);
    b.bindTexture(3553, a.ma);
    var l = b.getParameter(3042);
    l && b.disable(3042);
    var p = b.getParameter(2884);
    p && b.disable(2884);
    var u = b.getParameter(2929);
    u && b.disable(2929);
    var z = b.getParameter(2960);
    z && b.disable(2960);
    function rb() {
      b.vertexAttribPointer(a.H, 2, 5126, !1, 0, 0);
      b.drawArrays(5, 0, 4);
    }
    if (a.ya) {
      var D = b.getParameter(34229);
      b.bindVertexArray(a.ya);
      rb();
      b.bindVertexArray(D);
    } else {
      D = {buffer:b.getVertexAttrib(a.H, 34975), size:b.getVertexAttrib(a.H, 34339), Wc:b.getVertexAttrib(a.H, 34340), type:b.getVertexAttrib(a.H, 34341), Gc:b.getVertexAttrib(a.H, 34922), Dd:b.getVertexAttribOffset(a.H, 34373)};
      for (var q = b.getParameter(34921), E = [], x = 0; x < q; ++x) {
        var P = b.getVertexAttrib(x, 34338), I = x == a.H;
        P && !I && b.disableVertexAttribArray(x);
        !P && I && b.enableVertexAttribArray(x);
        E[x] = P;
      }
      rb();
      for (x = 0; x < q; ++x) {
        P = E[x], I = x == a.H, P && !I && b.enableVertexAttribArray(x), !P && I && b.disableVertexAttribArray(x);
      }
      b.bindBuffer(34962, D.buffer);
      b.vertexAttribPointer(a.H, D.size, D.type, D.Gc, D.Wc, D.offset);
    }
    z && b.enable(2960);
    u && b.enable(2929);
    p && b.enable(2884);
    l && b.enable(3042);
    b.bindTexture(3553, k);
    b.activeTexture(g);
    b.bindBuffer(34962, f);
    b.useProgram(e);
  }
  b.bindFramebuffer(36160, d);
  c && b.enable(3089);
}
function gf(a) {
  S = ff[a];
  t.la = O = S && S.C;
  return !(a && !O);
}
function Mf(a) {
  a || (a = S);
  if (!a.xc) {
    a.xc = !0;
    var b = a.C;
    sf(b);
    tf(b);
    uf(b);
    vf(b);
    wf(b);
    2 <= a.version && (b.sb = b.getExtension("EXT_disjoint_timer_query_webgl2"));
    if (2 > a.version || !b.sb) {
      b.sb = b.getExtension("EXT_disjoint_timer_query");
    }
    xf(b);
    (b.getSupportedExtensions() || []).forEach(function(c) {
      c.includes("lose_context") || c.includes("debug") || b.getExtension(c);
    });
  }
}
var df = {}, S, Kf;
function Pf(a, b, c, d) {
  for (var e = 0; e < a; e++) {
    var f = O[c](), g = f && Lf(d);
    f ? (f.name = g, d[g] = f) : Q(1282);
    n()[b + 4 * e >> 2] = g;
  }
}
function Qf(a, b, c) {
  if (b) {
    var d = void 0;
    switch(a) {
      case 36346:
        d = 1;
        break;
      case 36344:
        0 != c && 1 != c && Q(1280);
        return;
      case 34814:
      case 36345:
        d = 0;
        break;
      case 34466:
        var e = O.getParameter(34467);
        d = e ? e.length : 0;
        break;
      case 33309:
        if (2 > S.version) {
          Q(1282);
          return;
        }
        d = 2 * (O.getSupportedExtensions() || []).length;
        break;
      case 33307:
      case 33308:
        if (2 > S.version) {
          Q(1280);
          return;
        }
        d = 33307 == a ? 3 : 0;
    }
    if (void 0 === d) {
      switch(e = O.getParameter(a), typeof e) {
        case "number":
          d = e;
          break;
        case "boolean":
          d = e ? 1 : 0;
          break;
        case "string":
          Q(1280);
          return;
        case "object":
          if (null === e) {
            switch(a) {
              case 34964:
              case 35725:
              case 34965:
              case 36006:
              case 36007:
              case 32873:
              case 34229:
              case 36662:
              case 36663:
              case 35053:
              case 35055:
              case 36010:
              case 35097:
              case 35869:
              case 32874:
              case 36389:
              case 35983:
              case 35368:
              case 34068:
                d = 0;
                break;
              default:
                Q(1280);
                return;
            }
          } else {
            if (e instanceof Float32Array || e instanceof Uint32Array || e instanceof Int32Array || e instanceof Array) {
              for (var f = 0; f < e.length; ++f) {
                switch(c) {
                  case 0:
                    n()[b + 4 * f >> 2] = e[f];
                    break;
                  case 2:
                    sa()[b + 4 * f >> 2] = e[f];
                    break;
                  case 4:
                    h()[b + f >> 0] = e[f] ? 1 : 0;
                }
              }
              return;
            }
            try {
              d = e.name | 0;
            } catch (g) {
              Q(1280);
              y("GL_INVALID_ENUM in glGet" + c + "v: Unknown object returned from WebGL getParameter(" + a + ")! (error: " + g + ")");
              return;
            }
          }
          break;
        default:
          Q(1280);
          y("GL_INVALID_ENUM in glGet" + c + "v: Native code calling glGet" + c + "v(" + a + ") and it returns " + e + " of type " + typeof e + "!");
          return;
      }
    }
    switch(c) {
      case 1:
        c = d;
        r()[b >> 2] = c;
        r()[b + 4 >> 2] = (c - r()[b >> 2]) / 4294967296;
        0 <= c ? f = r()[b >> 2] + 4294967296 * r()[b + 4 >> 2] : f = se(b);
        f != c && Ya("writeI53ToI64() out of range: serialized JS Number " + c + " to Wasm heap as bytes lo=0x" + r()[b >> 2].toString(16) + ", hi=0x" + r()[b + 4 >> 2].toString(16) + ", which deserializes back to " + f + " instead!");
        break;
      case 0:
        n()[b >> 2] = d;
        break;
      case 2:
        sa()[b >> 2] = d;
        break;
      case 4:
        h()[b >> 0] = d ? 1 : 0;
    }
  } else {
    Q(1281);
  }
}
function Rf(a) {
  var b = ab(a) + 1, c = ue(b);
  $a(a, c, b);
  return c;
}
function Sf(a) {
  return "]" == a.slice(-1) && a.lastIndexOf("[");
}
function Tf(a) {
  a -= 5120;
  return 0 == a ? h() : 1 == a ? ia() : 2 == a ? ka() : 4 == a ? n() : 6 == a ? sa() : 5 == a || 28922 == a || 28520 == a || 30779 == a || 30782 == a ? r() : oa();
}
function Uf(a) {
  var b = O.dc;
  if (b) {
    var c = b.va[a];
    "number" == typeof c && (b.va[a] = c = O.getUniformLocation(b, b.Qb[a] + (0 < c ? "[" + c + "]" : "")));
    return c;
  }
  Q(1282);
}
var Vf = [];
function M(a, b) {
  var c = arguments.length - 2, d = arguments;
  if (19 < c) {
    throw "emscripten_proxy_to_main_thread_js: Too many arguments " + c + " to proxied function idx=" + a + ", maximum supported is 19!";
  }
  return nd(function() {
    for (var e = Wf(8 * c), f = e >> 3, g = 0; g < c; g++) {
      var k = d[2 + g];
      wa()[f + g] = k;
    }
    return Xf(a, c, e, b);
  });
}
var Yf = [];
function Zf(a) {
  if (v) {
    return M(35, 1, a);
  }
  S == a && (S = 0);
  S === ff[a] && (S = null);
  if ("object" == typeof $f) {
    for (var b = ff[a].C.canvas, c = 0; c < ag.length; ++c) {
      if (ag[c].target == b) {
        var d = c--, e = ag[d];
        e.target.removeEventListener(e.qd, e.pd, e.Ld);
        ag.splice(d, 1);
      }
    }
  }
  ff[a] && ff[a].C.canvas && (ff[a].C.canvas.Tb = void 0);
  T(ff[a].uc);
  ff[a] = null;
}
function bg(a, b) {
  return v ? M(36, 1, a, b) : cg(a, b);
}
var ag = [], $f = {}, dg = ["default", "low-power", "high-performance"], eg = [0, "undefined" != typeof document ? document : 0, "undefined" != typeof window ? window : 0];
function cg(a, b) {
  w(b);
  var c = b >> 2, d = n()[c + 6];
  c = {alpha:!!n()[c], depth:!!n()[c + 1], stencil:!!n()[c + 2], antialias:!!n()[c + 3], premultipliedAlpha:!!n()[c + 4], preserveDrawingBuffer:!!n()[c + 5], powerPreference:dg[d], failIfMajorPerformanceCaveat:!!n()[c + 7], Ya:n()[c + 8], yd:n()[c + 9], tb:n()[c + 10], vb:n()[c + 11], Gb:n()[c + 12], Ka:n()[c + 13]};
  d = a;
  d = 2 < d ? A(d) : d;
  d = eg[d] || ("undefined" != typeof document ? document.querySelector(d) : void 0);
  if (v && (2 === c.Gb || !d && 1 === c.Gb)) {
    return "undefined" == typeof OffscreenCanvas && (n()[b + 52 >> 2] = 1, n()[b + 20 >> 2] = 1), bg(a, b);
  }
  if (!d) {
    return 0;
  }
  c.vb && !c.Ka && (c.Ka = !0);
  return ef(d, c);
}
function fg(a, b) {
  if (v) {
    return M(37, 1, a, b);
  }
  a = ff[a];
  b = A(b);
  b.startsWith("GL_") && (b = b.substr(3));
  "ANGLE_instanced_arrays" == b && sf(O);
  "OES_vertex_array_object" == b && tf(O);
  "WEBGL_draw_buffers" == b && uf(O);
  "WEBGL_draw_instanced_base_vertex_base_instance" == b && vf(O);
  "WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && wf(O);
  "WEBGL_multi_draw" == b && xf(O);
  return !!a.C.getExtension(b);
}
var gg = {};
function hg() {
  if (!ig) {
    var a = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:Da || "./this.program"}, b;
    for (b in gg) {
      void 0 === gg[b] ? delete a[b] : a[b] = gg[b];
    }
    var c = [];
    for (b in a) {
      c.push(b + "=" + a[b]);
    }
    ig = c;
  }
  return ig;
}
var ig;
function jg(a, b) {
  if (v) {
    return M(38, 1, a, b);
  }
  var c = 0;
  hg().forEach(function(d, e) {
    var f = b + c;
    e = r()[a + 4 * e >> 2] = f;
    for (f = 0; f < d.length; ++f) {
      w(d.charCodeAt(f) === (d.charCodeAt(f) & 255)), h()[e++ >> 0] = d.charCodeAt(f);
    }
    h()[e >> 0] = 0;
    c += d.length + 1;
  });
  return 0;
}
function kg(a, b) {
  if (v) {
    return M(39, 1, a, b);
  }
  var c = hg();
  r()[a >> 2] = c.length;
  var d = 0;
  c.forEach(function(e) {
    d += e.length + 1;
  });
  r()[b >> 2] = d;
  return 0;
}
function lg(a) {
  if (v) {
    return M(40, 1, a);
  }
  try {
    var b = cd(a);
    Tc(b);
    return 0;
  } catch (c) {
    if ("undefined" == typeof L || !(c instanceof H)) {
      throw c;
    }
    return c.h;
  }
}
function mg(a, b) {
  if (v) {
    return M(41, 1, a, b);
  }
  try {
    var c = cd(a), d = c.o ? 2 : 16384 === (c.mode & 61440) ? 3 : 40960 === (c.mode & 61440) ? 7 : 4;
    h()[b >> 0] = d;
    return 0;
  } catch (e) {
    if ("undefined" == typeof L || !(e instanceof H)) {
      throw e;
    }
    return e.h;
  }
}
function ng(a, b, c, d) {
  if (v) {
    return M(42, 1, a, b, c, d);
  }
  try {
    a: {
      var e = cd(a);
      a = b;
      for (var f = b = 0; f < c; f++) {
        var g = r()[a >> 2], k = r()[a + 4 >> 2];
        a += 8;
        var l = e, p = h(), u = g, z = k, D = void 0;
        if (0 > z || 0 > D) {
          throw new H(28);
        }
        if (null === l.m) {
          throw new H(8);
        }
        if (1 === (l.flags & 2097155)) {
          throw new H(8);
        }
        if (16384 === (l.node.mode & 61440)) {
          throw new H(31);
        }
        if (!l.j.read) {
          throw new H(28);
        }
        var q = "undefined" != typeof D;
        if (!q) {
          D = l.position;
        } else if (!l.seekable) {
          throw new H(70);
        }
        var E = l.j.read(l, p, u, z, D);
        q || (l.position += E);
        var x = E;
        if (0 > x) {
          var P = -1;
          break a;
        }
        b += x;
        if (x < k) {
          break;
        }
      }
      P = b;
    }
    n()[d >> 2] = P;
    return 0;
  } catch (I) {
    if ("undefined" == typeof L || !(I instanceof H)) {
      throw I;
    }
    return I.h;
  }
}
function og(a, b, c, d, e) {
  if (v) {
    return M(43, 1, a, b, c, d, e);
  }
  try {
    w(b == b >>> 0 || b == (b | 0));
    w(c === (c | 0));
    var f = c + 2097152 >>> 0 < 4194305 - !!b ? (b >>> 0) + 4294967296 * c : NaN;
    if (isNaN(f)) {
      return 61;
    }
    var g = cd(a);
    Uc(g, f, d);
    F = [g.position >>> 0, (C = g.position, 1 <= +Math.abs(C) ? 0 < C ? (Math.min(+Math.floor(C / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((C - +(~~C >>> 0)) / 4294967296) >>> 0 : 0)];
    n()[e >> 2] = F[0];
    n()[e + 4 >> 2] = F[1];
    g.X && 0 === f && 0 === d && (g.X = null);
    return 0;
  } catch (k) {
    if ("undefined" == typeof L || !(k instanceof H)) {
      throw k;
    }
    return k.h;
  }
}
function pg(a, b, c, d) {
  if (v) {
    return M(44, 1, a, b, c, d);
  }
  try {
    a: {
      var e = cd(a);
      a = b;
      for (var f = b = 0; f < c; f++) {
        var g = r()[a >> 2], k = r()[a + 4 >> 2];
        a += 8;
        var l = Vc(e, h(), g, k);
        if (0 > l) {
          var p = -1;
          break a;
        }
        b += l;
      }
      p = b;
    }
    r()[d >> 2] = p;
    return 0;
  } catch (u) {
    if ("undefined" == typeof L || !(u instanceof H)) {
      throw u;
    }
    return u.h;
  }
}
function qg(a, b, c, d) {
  function e(z, D, q, E, x, P) {
    var I = 10 === z ? 28 : 16;
    x = 10 === z ? Md(x) : Ld(x);
    I = ue(I);
    x = Fd(I, z, x, P);
    w(!x);
    x = ue(32);
    n()[x + 4 >> 2] = z;
    n()[x + 8 >> 2] = D;
    n()[x + 12 >> 2] = q;
    n()[x + 24 >> 2] = E;
    r()[x + 20 >> 2] = I;
    10 === z ? n()[x + 16 >> 2] = 28 : n()[x + 16 >> 2] = 16;
    n()[x + 28 >> 2] = 0;
    return x;
  }
  if (v) {
    return M(45, 1, a, b, c, d);
  }
  var f = 0, g = 0, k = 0, l = 0, p = 0, u = 0;
  c && (k = n()[c >> 2], l = n()[c + 4 >> 2], p = n()[c + 8 >> 2], u = n()[c + 12 >> 2]);
  p && !u && (u = 2 === p ? 17 : 6);
  !p && u && (p = 17 === u ? 2 : 1);
  0 === u && (u = 6);
  0 === p && (p = 1);
  if (!a && !b) {
    return -2;
  }
  if (k & -1088 || 0 !== c && n()[c >> 2] & 2 && !a) {
    return -1;
  }
  if (k & 32) {
    return -2;
  }
  if (0 !== p && 1 !== p && 2 !== p) {
    return -7;
  }
  if (0 !== l && 2 !== l && 10 !== l) {
    return -6;
  }
  if (b && (b = A(b), g = parseInt(b, 10), isNaN(g))) {
    return k & 1024 ? -2 : -8;
  }
  if (!a) {
    return 0 === l && (l = 2), 0 === (k & 1) && (2 === l ? f = rg(2130706433) : f = [0, 0, 0, 1]), a = e(l, p, u, null, f, g), r()[d >> 2] = a, 0;
  }
  a = A(a);
  f = Cd(a);
  if (null !== f) {
    if (0 === l || 2 === l) {
      l = 2;
    } else if (10 === l && k & 8) {
      f = [0, 0, rg(65535), f], l = 10;
    } else {
      return -2;
    }
  } else {
    if (f = Dd(a), null !== f) {
      if (0 === l || 10 === l) {
        l = 10;
      } else {
        return -2;
      }
    }
  }
  if (null != f) {
    return a = e(l, p, u, a, f, g), r()[d >> 2] = a, 0;
  }
  if (k & 4) {
    return -2;
  }
  a = Jd(a);
  f = Cd(a);
  0 === l ? l = 2 : 10 === l && (f = [0, 0, rg(65535), f]);
  a = e(l, p, u, null, f, g);
  r()[d >> 2] = a;
  return 0;
}
function U(a) {
  return cb.get(a);
}
function V() {
  y.apply(null, Array.from(arguments));
}
function sg() {
  Oa.apply(null, Array.from(arguments));
}
function tg(a, b) {
  N(a, b, "*");
}
function ug(a, b, c) {
  const d = a.BYTES_PER_ELEMENT;
  return a.subarray(b / d, b / d + c);
}
function vg(a, b, c) {
  const d = a.BYTES_PER_ELEMENT;
  return a.slice(b / d, b / d + c);
}
function wg(a, b) {
  const c = [];
  ug(n(), a, b).forEach(function(d) {
    c.push(A(d));
  });
  return c;
}
function W(a) {
  const b = ab(a) + 1, c = ue(b);
  $a(a, c, b);
  return c;
}
function xg(a) {
  const b = a.length, c = ue(4 * b);
  for (let d = 0; d < b; d++) {
    n()[(c >> 2) + d] = W(a[d]);
  }
  return c;
}
function yg(a, b) {
  for (let c = 0; c < b; c++) {
    T(n()[(a >> 2) + c]);
  }
  T(a);
}
var X = null, zg = "en", Ag = 2, Bg = !1, Cg = !1, Dg = null, Eg = null, Fg = !1, Gg = !1, Hg = [];
function Ig() {
  Hg.forEach(function(a) {
    try {
      Nc(a);
    } catch (b) {
      sg("Already unmounted", b);
    }
    Fg && K.W[a] && (K.W[a].close(), delete K.W[a]);
  });
  Hg = [];
  Gg = Fg = !1;
}
function Jg() {
  if (Gg) {
    return V("Already syncing!"), Promise.resolve();
  }
  Gg = !0;
  return new Promise(function(a) {
    Mc(!1, function(b) {
      b && V(`Failed to save IDB file system: ${b.message}`);
      Gg = !1;
      a(b);
    });
  });
}
function Kg(a, b) {
  const c = a.lastIndexOf("/");
  let d = "/";
  0 < c && (d = a.slice(0, c));
  try {
    hc(d);
  } catch (e) {
    44 !== e.h && V(e), jc(d);
  }
  kc(a, new Uint8Array(b));
}
function Lg() {
}
var Mg = [], Ng = null;
function Og(a) {
  Ng.then(function() {
    const b = [];
    Mg.forEach(function(c) {
      b.push(new Promise(c));
    });
    return Promise.all(b);
  }).then(function() {
    return Jg();
  }).then(function() {
    setTimeout(function() {
      a();
    }, 0);
  });
}
var Pg = null, Qg = null, Rg = null, Sg = 0;
function Tg(a, b, c) {
  const d = {};
  a && (d.sampleRate = a);
  const e = new (window.AudioContext || window.webkitAudioContext)(d);
  Pg = e;
  e.onstatechange = function() {
    let f = 0;
    switch(e.state) {
      case "suspended":
        f = 0;
        break;
      case "running":
        f = 1;
        break;
      case "closed":
        f = 2;
    }
    b(f);
  };
  e.onstatechange();
  Sg = setInterval(function() {
    let f = 0;
    e.Ub && (f += Pg.Ub);
    e.Hc && (f += Pg.Hc);
    c(f);
  }, 1e3);
  Mg.push(Ug);
  return e.destination.channelCount;
}
function Vg(a) {
  function b(c) {
    try {
      Qg = Pg.createMediaStreamSource(c), a(Qg);
    } catch (d) {
      V("Failed creaating input.", d);
    }
  }
  if (Qg) {
    return 0;
  }
  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    navigator.mediaDevices.getUserMedia({audio:!0}).then(b, function(c) {
      V("Error getting user media.", c);
    });
  } else {
    navigator.getUserMedia || (navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.T);
    if (!navigator.getUserMedia) {
      return V("getUserMedia not available."), 1;
    }
    navigator.getUserMedia({audio:!0}, b, function(c) {
      sg(c);
    });
  }
  return 0;
}
function Ug(a) {
  const b = Pg;
  Pg = null;
  if (b) {
    Sg && (clearInterval(Sg), Sg = 0);
    Qg && (Qg.disconnect(), Qg = null);
    var c = Promise.resolve();
    Rg && (c = Rg.close());
    c.then(function() {
      return b.close();
    }).then(function() {
      b.onstatechange = null;
      a();
    }).catch(function(d) {
      b.onstatechange = null;
      V("Error closing AudioContext", d);
      a();
    });
  } else {
    a();
  }
}
function Wg() {
  return v ? M(46, 1) : Vg(function(a) {
    a.connect(Rg.rc());
  });
}
function Xg() {
  if (v) {
    return M(47, 1);
  }
  if (Qg) {
    const a = Qg.mediaStream.getTracks();
    for (let b = 0; b < a.length; b++) {
      a[b].stop();
    }
    Qg.disconnect();
    Qg = null;
  }
}
function Yg() {
  return v ? M(48, 1) : window.AudioContext || window.webkitAudioContext ? 1 : 0;
}
var Zg = {promise:null, P:null, cb:null, create:function(a) {
  const b = t.locateFile("godot.audio.worklet.js");
  Zg.promise = Pg.audioWorklet.addModule(b).then(function() {
    Zg.P = new AudioWorkletNode(Pg, "godot-processor", {outputChannelCount:[a]});
    return Promise.resolve();
  });
  Rg = Zg;
}, start:function(a, b, c) {
  Zg.promise.then(function() {
    const d = Zg.P;
    d.connect(Pg.destination);
    d.port.postMessage({cmd:"start", data:[c, a, b]});
    d.port.onmessage = function(e) {
      V(e.data);
    };
  });
}, Id:function(a, b, c, d, e, f) {
  Zg.cb = new function() {
    let g = 0, k = 0, l = 0;
    const p = new Float32Array(b);
    this.Kc = function(u) {
      const z = ug(sa(), d, e), D = k;
      let q = u.length, E = 0;
      k + q >= e && (E = e - k, z.set(u.subarray(0, E), k), q -= E, k = 0);
      q && z.set(u.subarray(E, q), k);
      f(D, u.length);
      k += q;
    };
    this.bc = function(u) {
      var z = Zg.P.port;
      l += u;
      if (0 !== l) {
        u = ug(sa(), a, b);
        var D = u.length, q = l;
        c(g, l);
        if (g + l >= D) {
          const E = D - g;
          p.set(u.subarray(g, D));
          l -= E;
          g = 0;
        }
        0 < l && p.set(u.subarray(g, g + l), q - l);
        z.postMessage({cmd:"chunk", data:p.subarray(0, q)});
        g += l;
        l = 0;
      }
    };
  }();
  Zg.promise.then(function() {
    const g = Zg.P, k = vg(sa(), a, b);
    g.connect(Pg.destination);
    g.port.postMessage({cmd:"start_nothreads", data:[k, e]});
    g.port.onmessage = function(l) {
      Zg.P && ("read" === l.data.cmd ? Zg.cb.bc(l.data.data) : "input" === l.data.cmd ? (l = l.data.data, l.length > e ? V("Input chunk is too big") : Zg.cb.Kc(l)) : V(l.data));
    };
  });
}, rc:function() {
  return Zg.P;
}, close:function() {
  return new Promise(function(a) {
    null !== Zg.promise && Zg.promise.then(function() {
      Zg.P.port.postMessage({cmd:"stop", data:null});
      Zg.P.disconnect();
      Zg.P.port.onmessage = null;
      Zg.P = null;
      Zg.promise = null;
      a();
    }).catch(function(b) {
      V(b);
    });
  });
}}, $g = "default", ah = !0, bh = {};
function ch(a) {
  let b = $g = a;
  a in bh && (a = bh[a], b = `url("${a.url}") ${a.x} ${a.y}, default`);
  ah && (X.style.cursor = b);
}
function dh() {
  X.style.cursor = "";
  $g = "default";
  ah = !0;
  Object.keys(bh).forEach(function(a) {
    URL.revokeObjectURL(bh[a]);
    delete bh[a];
  });
}
var eh = [];
function fh(a, b, c, d) {
  return -1 !== eh.findIndex(function(e) {
    return e.target === a && e.event === b && e.method === c && e.capture === d;
  });
}
function Y(a, b, c, d) {
  fh(a, b, c, d) || (eh.push(new function(e, f, g, k) {
    this.target = e;
    this.event = f;
    this.method = g;
    this.capture = k;
  }(a, b, c, d)), a.addEventListener(b, c, d));
}
function gh() {
  eh.forEach(function(a) {
    a.target.removeEventListener(a.event, a.method, a.capture);
  });
  eh.length = 0;
}
var hh = [0, 0], ih = !0;
function jh() {
  const a = document.fullscreenElement || document.xb || document.webkitFullscreenElement || document.msFullscreenElement;
  return a ? a === X : document.T || document.mozFullScreen || document.yb;
}
function kh() {
  if (!(document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled)) {
    return 1;
  }
  const a = X;
  try {
    const b = (a.requestFullscreen || a.msRequestFullscreen || a.mozRequestFullScreen || a.zd || a.webkitRequestFullscreen).call(a);
    b && b.catch(function() {
    });
  } catch (b) {
    return 1;
  }
  return 0;
}
function lh() {
  if (!jh()) {
    return 0;
  }
  try {
    const a = document.exitFullscreen();
    a && a.catch(function() {
    });
  } catch (a) {
    return 1;
  }
  return 0;
}
function mh() {
  var a = nh();
  (a = ff[a]) && Nf(a);
}
function oh() {
  var a = jh();
  const b = 2 === Ag, c = X;
  let d = hh[0], e = hh[1];
  if (0 === Ag) {
    return c.width !== d || c.height !== e ? (hh = [c.width, c.height], mh(), 1) : 0;
  }
  var f = ih ? window.devicePixelRatio || 1 : 1;
  if (a || b) {
    d = window.innerWidth * f, e = window.innerHeight * f;
  }
  a = `${d / f}px`;
  f = `${e / f}px`;
  return c.style.width !== a || c.style.height !== f || c.width !== d || c.height !== e ? (c.width = d, c.height = e, c.style.width = a, c.style.height = f, mh(), 1) : 0;
}
var ph = null, qh = null;
function rh(a) {
  function b(c) {
    const d = document.createElement(c);
    d.style.display = "none";
    d.style.position = "absolute";
    d.style.zIndex = "-1";
    d.style.background = "transparent";
    d.style.padding = "0px";
    d.style.margin = "0px";
    d.style.overflow = "hidden";
    d.style.width = "0px";
    d.style.height = "0px";
    d.style.border = "0px";
    d.style.outline = "none";
    d.Hb = !0;
    d.disabled = !0;
    Y(d, "input", function() {
      const e = W(d.value);
      a(e, d.selectionEnd);
      T(e);
    }, !1);
    Y(d, "blur", function() {
      d.style.display = "none";
      d.Hb = !0;
      d.disabled = !0;
    }, !1);
    X.insertAdjacentElement("beforebegin", d);
    return d;
  }
  ph = b("input");
  qh = b("textarea");
  sh();
}
function th() {
  ph && qh && [ph, qh].forEach(function(a) {
    a.blur();
    a.style.display = "none";
    a.value = "";
  });
}
function sh() {
  function a(c) {
    c.style.left = `${b.left}px`;
    c.style.top = `${b.top}px`;
    c.style.width = `${b.width}px`;
    c.style.height = `${b.height}px`;
  }
  if (ph && qh) {
    var b = X.getBoundingClientRect();
    a(ph);
    a(qh);
  }
}
var uh = "", vh = 0, Z = {};
function wh(a) {
  const b = ++vh;
  Z[b] = a;
  return b;
}
function xh(a) {
  delete Z[a];
}
function yh(a, b) {
  if (a = Z[a]) {
    b.value && a.Sa.push(b.value), a.ab = !1, a.done = b.done;
  }
}
function zh(a, b) {
  if (a = Z[a]) {
    var c = !1;
    b.headers.forEach(function(d, e) {
      d = d.toLowerCase().trim();
      "transfer-encoding" === e.toLowerCase().trim() && "chunked" === d && (c = !0);
    });
    a.status = b.status;
    a.response = b;
    a.sa = b.body.getReader();
    a.ac = c;
  }
}
function Ah(a, b) {
  V(b);
  if (a = Z[a]) {
    a.error = b;
  }
}
function Bh(a, b, c, d) {
  const e = {request:null, response:null, sa:null, error:null, done:!1, ab:!1, status:0, Sa:[], Zb:-1}, f = wh(e);
  e.request = fetch(b, {method:a, headers:c, body:d});
  e.request.then(zh.bind(null, f)).catch(Ah.bind(null, f));
  return f;
}
function Ch(a) {
  const b = Z[a];
  b && (xh(a), b.request && b.request.then(function(c) {
    c.abort();
  }).catch(function() {
  }));
}
var Dh = [];
function Eh() {
  try {
    const a = navigator.getGamepads();
    return a ? a : [];
  } catch (a) {
    return [];
  }
}
function Fh(a) {
  function b(d) {
    if (d.mapping) {
      var e = d.mapping;
    } else {
      var f = navigator.userAgent;
      e = "Unknown";
      0 <= f.indexOf("Android") ? e = "Android" : 0 <= f.indexOf("Linux") ? e = "Linux" : 0 <= f.indexOf("iPhone") ? e = "iOS" : 0 <= f.indexOf("Macintosh") ? e = "MacOSX" : 0 <= f.indexOf("Windows") && (e = "Windows");
      var g = d.id, k = /vendor: ([0-9a-f]{4}) product: ([0-9a-f]{4})/i, l = /^([0-9a-f]+)-([0-9a-f]+)-/i, p = f = "";
      k.test(g) ? (g = k.exec(g), f = g[1].padStart(4, "0"), p = g[2].padStart(4, "0")) : l.test(g) && (g = l.exec(g), f = g[1].padStart(4, "0"), p = g[2].padStart(4, "0"));
      e = f && p ? e + f + p : `${e}Unknown`;
    }
    f = e;
    e = W(d.id);
    f = W(f);
    a(d.index, 1, e, f);
    T(e);
    T(f);
  }
  Dh = [];
  const c = Eh();
  for (let d = 0; d < c.length; d++) {
    c[d] && b(c[d]);
  }
  Y(window, "gamepadconnected", function(d) {
    d.gamepad && b(d.gamepad);
  }, !1);
  Y(window, "gamepaddisconnected", function(d) {
    d.gamepad && a(d.gamepad.index, 0);
  }, !1);
}
var Gh = [], Hh = [];
function Ih(a) {
  a.isDirectory ? Jh(a) : a.isFile ? Kh(a) : V("Unrecognized entry...", a);
}
function Jh(a) {
  Gh.push(new Promise(function(b) {
    a.createReader().readEntries(function(c) {
      for (let d = 0; d < c.length; d++) {
        Ih(c[d]);
      }
      b();
    });
  }));
}
function Kh(a) {
  Gh.push(new Promise(function(b, c) {
    a.file(function(d) {
      const e = new FileReader();
      e.onload = function() {
        const f = {path:d.Ed || d.webkitRelativePath, name:d.name, type:d.type, size:d.size, data:e.result};
        f.path || (f.path = f.name);
        Hh.push(f);
        b();
      };
      e.onerror = function() {
        sg("Error reading file");
        c();
      };
      e.readAsArrayBuffer(d);
    }, function() {
      sg("Error!");
      c();
    });
  }));
}
function Lh(a, b) {
  0 === Gh.length ? a() : Gh.pop().then(function() {
    setTimeout(function() {
      Lh(a, b);
    }, 0);
  });
}
function Mh(a, b) {
  a.preventDefault();
  if (a.dataTransfer.items) {
    for (let c = 0; c < a.dataTransfer.items.length; c++) {
      const d = a.dataTransfer.items[c];
      let e = null;
      "getAsEntry" in d ? e = d.vd() : "webkitGetAsEntry" in d && (e = d.webkitGetAsEntry());
      e && Ih(e);
    }
  } else {
    V("File upload not supported");
  }
  (new Promise(Lh)).then(function() {
    const c = `/tmp/drop-${parseInt(1073741824 * Math.random(), 10)}/`, d = [], e = [];
    Pc(c.slice(0, -1));
    Hh.forEach(f => {
      const g = f.path;
      Kg(c + g, f.data);
      f = g.indexOf("/");
      if (-1 === f) {
        d.push(c + g);
      } else {
        const k = g.substr(0, f);
        f = k.indexOf("/");
        0 > f && -1 === d.indexOf(c + k) && d.push(c + k);
      }
      e.push(c + g);
    });
    Gh = [];
    Hh = [];
    b(d);
    Cg ? Mg.push(function(f) {
      Nh(e, c);
      f();
    }) : Nh(e, c);
  });
}
function Nh(a, b) {
  const c = [b.substr(0, b.length - 1)];
  a.forEach(function(d) {
    oc(d);
    d = d.replace(b, "");
    let e = d.lastIndexOf("/");
    for (; 0 < e;) {
      d = d.substr(0, e), -1 === c.indexOf(b + d) && c.push(b + d), e = d.lastIndexOf("/");
    }
  });
  c.sort(function(d, e) {
    d = (d.match(/\//g) || []).length;
    e = (e.match(/\//g) || []).length;
    return d > e ? -1 : d < e ? 1 : 0;
  }).forEach(function(d) {
    nc(d);
  });
}
function Oh(a) {
  return function(b) {
    Mh(b, a);
  };
}
function Ph(a) {
  return a.shiftKey + 0 + (a.altKey + 0 << 1) + (a.ctrlKey + 0 << 2) + (a.metaKey + 0 << 3);
}
function Qh(a, b) {
  const c = X;
  return [c.width / b.width * (a.clientX - b.x), c.height / b.height * (a.clientY - b.y)];
}
var Rh = !1;
function Sh(a, b) {
  b && b.active && (b.waiting && (Rh = !0, a()), Y(b, "updatefound", function() {
    const c = b.installing;
    Y(c, "statechange", function() {
      "installed" === c.state && (Rh = !0, a());
    });
  }));
}
function Th(a, b, c, d, e) {
  if (a = Z[a]) {
    a.binaryType = "arraybuffer", a.onopen = function() {
      b();
    }, a.onclose = function() {
      e();
    }, a.onerror = function() {
      d();
    }, a.onmessage = function(f) {
      let g = 0;
      if (f.data instanceof ArrayBuffer) {
        f = new Uint8Array(f.data);
      } else {
        if (f.data instanceof Blob) {
          V("Blob type not supported");
          return;
        }
        if ("string" === typeof f.data) {
          g = 1;
          var k = new TextEncoder("utf-8");
          f = new Uint8Array(k.encode(f.data));
        } else {
          V("Unknown message type");
          return;
        }
      }
      k = f.length * f.BYTES_PER_ELEMENT;
      const l = ue(k);
      ia().set(f, l);
      c(l, k, g);
      T(l);
    };
  }
}
function Uh(a) {
  if (a = Z[a]) {
    a.onopen = null, a.onmessage = null, a.onerror = null, a.onclose = null, a.close();
  }
}
function Vh(a, b, c) {
  return (a = Z[a]) && void 0 !== a[b] ? a[b] : c;
}
var Wh = {Eb:0, md:1, connected:2, hc:3, jc:4, closed:5}, Xh = {Eb:0, jd:1, connected:2, ld:2, hc:3, jc:4, closed:5}, Yh = {Eb:0, ud:1, complete:2}, Zh = {Hd:0, "have-local-offer":1, "have-remote-offer":2, "have-local-pranswer":3, "have-remote-pranswer":4, closed:5};
function $h(a, b, c, d, e, f) {
  let g = null;
  try {
    g = new RTCPeerConnection(a);
  } catch (l) {
    return V(l), 0;
  }
  const k = wh(g);
  "connectionState" in g && void 0 !== g.connectionState ? g.onconnectionstatechange = function() {
    Z[k] && b(Wh[g.connectionState] || 0);
  } : g.oniceconnectionstatechange = function() {
    Z[k] && b(Xh[g.iceConnectionState] || 0);
  };
  g.onicegatheringstatechange = function() {
    Z[k] && d(Yh[g.iceGatheringState] || 0);
  };
  g.onsignalingstatechange = function() {
    Z[k] && c(Zh[g.signalingState] || 0);
  };
  g.onicecandidate = function(l) {
    if (Z[k] && (l = l.candidate) && l.candidate) {
      var p = W(l.candidate), u = W(l.sdpMid);
      e(u, l.sdpMLineIndex, p);
      T(p);
      T(u);
    }
  };
  g.ondatachannel = function(l) {
    Z[k] && (l = wh(l.channel), f(l));
  };
  return k;
}
function ai(a, b, c) {
  Z[a] && (a = W(c.type), c = W(c.sdp), b(a, c), T(a), T(c));
}
function bi(a, b) {
  if (a = Z[a]) {
    a = W(a.protocol), b(a), T(a);
  }
}
function ci(a, b, c) {
  if (Z[a]) {
    a = 0;
    if (c.data instanceof ArrayBuffer) {
      c = new Uint8Array(c.data);
    } else {
      if (c.data instanceof Blob) {
        V("Blob type not supported");
        return;
      }
      if ("string" === typeof c.data) {
        a = 1;
        var d = new TextEncoder("utf-8");
        c = new Uint8Array(d.encode(c.data));
      } else {
        V("Unknown message type");
        return;
      }
    }
    d = c.length * c.BYTES_PER_ELEMENT;
    var e = ue(d);
    ia().set(c, e);
    b(e, d, a);
    T(e);
  }
}
function di(a, b) {
  Z[a] && b();
}
function ei(a, b, c) {
  Z[a] && (a = W(c.reason), b(c.code, a, c.wasClean ? 1 : 0), T(a));
}
function fi(a, b, c) {
  (a = Z[a]) && a.readyState < a.CLOSING && (c = A(c), a.close(b, c));
}
var gi = null, hi = null;
function ii(a) {
  const b = wh(this);
  gi.set(a, b);
  let c = 1;
  this.Nc = function() {
    c++;
  };
  this.cd = function() {
    c--;
    0 === c && (xh(b), gi.delete(a));
  };
  this.sc = function() {
    return a;
  };
  this.qc = function() {
    return b;
  };
}
function ji(a) {
  const b = gi.get(a);
  if (void 0 === b) {
    return (new ii(a)).qc();
  }
  Z[b].Nc();
  return b;
}
function ki(a) {
  a = Z[a];
  if (void 0 !== a) {
    return a.sc();
  }
}
function li(a, b) {
  switch(a) {
    case 0:
      return null;
    case 1:
      return !!rd(b, "i64");
    case 2:
      return rd(b, "i64");
    case 3:
      return rd(b, "double");
    case 4:
      return A(rd(b, "*"));
    case 24:
      return ki(rd(b, "i64"));
  }
}
function mi(a, b) {
  if (void 0 === a || null === a) {
    return 0;
  }
  const c = typeof a;
  if ("boolean" === c) {
    return N(b, a, "i64"), 1;
  }
  if ("number" === c) {
    if (Number.isInteger(a)) {
      return N(b, a, "i64"), 2;
    }
    N(b, a, "double");
    return 3;
  }
  if ("string" === c) {
    return a = W(a), N(b, a, "*"), 4;
  }
  a = ji(a);
  N(b, a, "i64");
  return 24;
}
function ni(a, b, c, d, e, f) {
  if (v) {
    return M(49, 1, a, b, c, d, e, f);
  }
  const g = S;
  if ("undefined" === typeof g.Db) {
    const k = g.C.getExtension("OVR_multiview2");
    if (!k) {
      console.error("Trying to call glFramebufferTextureMultiviewOVR() without the OVR_multiview2 extension");
      return;
    }
    g.Db = k;
  }
  g.Db.sd(a, b, Cf[c], d, e, f);
}
var oi = null, pi = null, qi = null, ri = null, si = null, ti = null, ui = a => {
  pi && qi ? pi.requestAnimationFrame(function(b, c) {
    ri = c;
    si = c.getViewerPose(qi);
    a(b);
    si = ri = null;
  }) : ti(a);
}, vi = () => {
  Ce = null;
  Ke++;
  window.setTimeout(function() {
    Te();
  }, 0);
}, wi = [], xi = () => {
  if (pi && ri) {
    var a = 2, b = [];
    pi.inputSources.forEach(c => {
      "tracked-pointer" === c.targetRayMode ? "right" === c.handedness ? b[1] = c : "left" !== c.handedness && b[0] || (b[0] = c) : b[a++] = c;
    });
    wi = b;
  }
};
function yi(a) {
  if (v) {
    return M(50, 1, a);
  }
  if (pi && si) {
    var b = pi.renderState.baseLayer, c = si.views, d = oi;
    a = Cf[a];
    var e = d.getParameter(d.FRAMEBUFFER_BINDING), f = d.getParameter(d.READ_FRAMEBUFFER_BINDING), g = d.getParameter(d.fd), k = d.getParameter(d.DRAW_FRAMEBUFFER_BINDING);
    d.bindFramebuffer(d.FRAMEBUFFER, null);
    for (let l = 0; l < c.length; l++) {
      const p = b.getViewport(c[l]), u = d.createFramebuffer();
      d.bindFramebuffer(d.READ_FRAMEBUFFER, u);
      1 < c.length ? d.framebufferTextureLayer(d.READ_FRAMEBUFFER, d.COLOR_ATTACHMENT0, a, 0, l) : d.framebufferTexture2D(d.READ_FRAMEBUFFER, d.COLOR_ATTACHMENT0, d.TEXTURE_2D, a, 0);
      d.readBuffer(d.COLOR_ATTACHMENT0);
      d.bindFramebuffer(d.DRAW_FRAMEBUFFER, b.framebuffer);
      d.blitFramebuffer(0, 0, p.width, p.height, p.x, p.y + p.height, p.x + p.width, p.y, d.COLOR_BUFFER_BIT, d.NEAREST);
      d.bindFramebuffer(d.READ_FRAMEBUFFER, null);
      d.deleteFramebuffer(u);
    }
    d.bindFramebuffer(d.FRAMEBUFFER, e);
    d.bindFramebuffer(d.READ_FRAMEBUFFER, f);
    d.readBuffer(g);
    d.bindFramebuffer(d.DRAW_FRAMEBUFFER, k);
  }
}
function zi() {
  if (v) {
    return M(51, 1);
  }
  if (!qi || !qi.boundsGeometry) {
    return 0;
  }
  const a = qi.boundsGeometry.length;
  if (0 === a) {
    return 0;
  }
  const b = ue(4 * (3 * a + 1));
  N(b, a, "i32");
  for (let c = 0; c < a; c++) {
    const d = qi.boundsGeometry[c];
    N(b + 4 * (3 * c + 1), d.x, "float");
    N(b + 4 * (3 * c + 2), d.y, "float");
    N(b + 4 * (3 * c + 3), d.z, "float");
  }
  return b;
}
function Ai(a) {
  if (v) {
    return M(52, 1, a);
  }
  if (0 === wi.length) {
    return 0;
  }
  a = wi[a];
  if (!a || !a.gamepad) {
    return 0;
  }
  const b = a.gamepad.axes.length, c = ue(4 * (b + 1));
  N(c, b, "i32");
  for (let d = 0; d < b; d++) {
    let e = a.gamepad.axes[d];
    if (1 === d || 3 === d) {
      e *= -1;
    }
    N(c + 4 + 4 * d, e, "float");
  }
  return c;
}
function Bi(a) {
  if (v) {
    return M(53, 1, a);
  }
  if (0 === wi.length) {
    return 0;
  }
  a = wi[a];
  if (!a || !a.gamepad) {
    return 0;
  }
  const b = a.gamepad.buttons.length, c = ue(4 * (b + 1));
  N(c, b, "i32");
  for (let d = 0; d < b; d++) {
    N(c + 4 + 4 * d, a.gamepad.buttons[d].value, "float");
  }
  return c;
}
function Ci() {
  return v ? M(54, 1) : pi && ri ? wi.length : 0;
}
function Di(a) {
  if (v) {
    return M(55, 1, a);
  }
  if (!pi || !ri) {
    return 0;
  }
  a = wi[a];
  if (!a) {
    return 0;
  }
  a = ri.getPose(a.targetRaySpace, qi);
  if (!a) {
    return 0;
  }
  a = a.transform.matrix;
  const b = ue(64);
  for (let c = 0; 16 > c; c++) {
    N(b + 4 * c, a[c], "float");
  }
  return b;
}
function Ei(a) {
  if (v) {
    return M(56, 1, a);
  }
  if (!pi || !si) {
    return 0;
  }
  a = si.views[2 === a ? 1 : 0].projectionMatrix;
  const b = ue(64);
  for (let c = 0; 16 > c; c++) {
    N(b + 4 * c, a[c], "float");
  }
  return b;
}
function Fi() {
  if (v) {
    return M(57, 1);
  }
  if (!pi || !si) {
    return 0;
  }
  const a = pi.renderState.baseLayer.getViewport(si.views[0]), b = ue(8);
  N(b + 0, a.width, "i32");
  N(b + 4, a.height, "i32");
  return b;
}
function Gi(a) {
  if (v) {
    return M(58, 1, a);
  }
  if (!pi || !si) {
    return 0;
  }
  var b = si.views;
  a = 0 === a ? si.transform.matrix : b[a - 1].transform.matrix;
  b = ue(64);
  for (let c = 0; 16 > c; c++) {
    N(b + 4 * c, a[c], "float");
  }
  return b;
}
function Hi() {
  return v ? M(59, 1) : pi && si ? si.views.length : 0;
}
function Ii() {
  return v ? M(60, 1) : pi && pi.visibilityState ? W(pi.visibilityState) : 0;
}
function Ji(a, b, c, d, e, f, g, k, l, p) {
  if (v) {
    return M(61, 1, a, b, c, d, e, f, g, k, l, p);
  }
  null === ti && (ti = He);
  He = ui;
  a = A(a);
  b = A(b).split(",").map(I => I.trim()).filter(I => "" !== I);
  c = A(c).split(",").map(I => I.trim()).filter(I => "" !== I);
  const u = A(d).split(",").map(I => I.trim()), z = U(e), D = U(f), q = U(g), E = U(k), x = U(l), P = U(p);
  d = {};
  0 < b.length && (d.requiredFeatures = b);
  0 < c.length && (d.optionalFeatures = c);
  navigator.xr.requestSession(a, d).then(function(I) {
    pi = I;
    I.addEventListener("end", function() {
      D();
    });
    I.addEventListener("inputsourceschange", function(R) {
      let ta = !1;
      [R.added, R.removed].forEach(ma => {
        ma.forEach(ua => {
          "tracked-pointer" === ua.targetRayMode && (ta = !0);
        });
      });
      ta && E();
    });
    "selectstart select selectend squeezestart squeeze squeezeend".split(" ").forEach(R => {
      I.addEventListener(R, function(ta) {
        const ma = W(R);
        x(ma, wi.indexOf(ta.inputSource));
        T(ma);
      });
    });
    I.addEventListener("visibilitychange", function() {
      const R = W("visibility_state_changed");
      P(R);
      T(R);
    });
    const rb = nh(), la = ff[rb].C;
    oi = la;
    la.makeXRCompatible().then(function() {
      function R(ma, ua) {
        qi = ma;
        ma.onreset = function() {
          const lc = W("reference_space_reset");
          P(lc);
          T(lc);
        };
        vi();
        window.setTimeout(function() {
          const lc = W(ua);
          z(lc);
          T(lc);
        }, 0);
      }
      function ta() {
        const ma = u.shift();
        I.requestReferenceSpace(ma).then(ua => {
          R(ua, ma);
        }).catch(() => {
          if (0 === u.length) {
            const ua = W("Unable to get any of the requested reference space types");
            q(ua);
            T(ua);
          } else {
            ta();
          }
        });
      }
      I.updateRenderState({baseLayer:new XRWebGLLayer(I, la)});
      ta();
    }).catch(function(R) {
      R = W(`Unable to make WebGL context compatible with WebXR: ${R}`);
      q(R);
      T(R);
    });
  }).catch(function(I) {
    I = W(`Unable to start session: ${I}`);
    q(I);
    T(I);
  });
}
function Ki(a) {
  return v ? M(62, 1, a) : pi && ri ? !!wi[a] : !1;
}
function Li(a, b) {
  if (v) {
    return M(63, 1, a, b);
  }
  const c = A(a), d = U(b);
  navigator.xr ? navigator.xr.isSessionSupported(c).then(function(e) {
    const f = W(c);
    d(f, e ? 1 : 0);
    T(f);
  }) : (a = W(c), d(a, 0), T(a));
}
function Mi() {
  return v ? M(64, 1) : !!navigator.xr;
}
function Ni() {
  if (v) {
    return M(65, 1);
  }
  xi();
}
function Oi() {
  if (v) {
    return M(66, 1);
  }
  pi && pi.end().catch(() => {
  });
  si = ri = qi = pi = null;
  null === ti && (ti = He);
  He = ti;
  vi();
}
function Pi(a) {
  return 0 === a % 4 && (0 !== a % 100 || 0 === a % 400);
}
var Qi = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ri = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Si(a, b, c, d) {
  function e(q, E, x) {
    for (q = "number" == typeof q ? q.toString() : q || ""; q.length < E;) {
      q = x[0] + q;
    }
    return q;
  }
  function f(q, E) {
    return e(q, E, "0");
  }
  function g(q, E) {
    function x(I) {
      return 0 > I ? -1 : 0 < I ? 1 : 0;
    }
    var P;
    0 === (P = x(q.getFullYear() - E.getFullYear())) && 0 === (P = x(q.getMonth() - E.getMonth())) && (P = x(q.getDate() - E.getDate()));
    return P;
  }
  function k(q) {
    switch(q.getDay()) {
      case 0:
        return new Date(q.getFullYear() - 1, 11, 29);
      case 1:
        return q;
      case 2:
        return new Date(q.getFullYear(), 0, 3);
      case 3:
        return new Date(q.getFullYear(), 0, 2);
      case 4:
        return new Date(q.getFullYear(), 0, 1);
      case 5:
        return new Date(q.getFullYear() - 1, 11, 31);
      case 6:
        return new Date(q.getFullYear() - 1, 11, 30);
    }
  }
  function l(q) {
    var E = q.ba;
    for (q = new Date((new Date(q.ca + 1900, 0, 1)).getTime()); 0 < E;) {
      var x = q.getMonth(), P = (Pi(q.getFullYear()) ? Qi : Ri)[x];
      if (E > P - q.getDate()) {
        E -= P - q.getDate() + 1, q.setDate(1), 11 > x ? q.setMonth(x + 1) : (q.setMonth(0), q.setFullYear(q.getFullYear() + 1));
      } else {
        q.setDate(q.getDate() + E);
        break;
      }
    }
    x = new Date(q.getFullYear() + 1, 0, 4);
    E = k(new Date(q.getFullYear(), 0, 4));
    x = k(x);
    return 0 >= g(E, q) ? 0 >= g(x, q) ? q.getFullYear() + 1 : q.getFullYear() : q.getFullYear() - 1;
  }
  var p = n()[d + 40 >> 2];
  d = {Zc:n()[d >> 2], Yc:n()[d + 4 >> 2], Oa:n()[d + 8 >> 2], fb:n()[d + 12 >> 2], Pa:n()[d + 16 >> 2], ca:n()[d + 20 >> 2], N:n()[d + 24 >> 2], ba:n()[d + 28 >> 2], Kd:n()[d + 32 >> 2], Xc:n()[d + 36 >> 2], $c:p ? A(p) : ""};
  c = A(c);
  p = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y"};
  for (var u in p) {
    c = c.replace(new RegExp(u, "g"), p[u]);
  }
  var z = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), D = "January February March April May June July August September October November December".split(" ");
  p = {"%a":function(q) {
    return z[q.N].substring(0, 3);
  }, "%A":function(q) {
    return z[q.N];
  }, "%b":function(q) {
    return D[q.Pa].substring(0, 3);
  }, "%B":function(q) {
    return D[q.Pa];
  }, "%C":function(q) {
    return f((q.ca + 1900) / 100 | 0, 2);
  }, "%d":function(q) {
    return f(q.fb, 2);
  }, "%e":function(q) {
    return e(q.fb, 2, " ");
  }, "%g":function(q) {
    return l(q).toString().substring(2);
  }, "%G":function(q) {
    return l(q);
  }, "%H":function(q) {
    return f(q.Oa, 2);
  }, "%I":function(q) {
    q = q.Oa;
    0 == q ? q = 12 : 12 < q && (q -= 12);
    return f(q, 2);
  }, "%j":function(q) {
    for (var E = 0, x = 0; x <= q.Pa - 1; E += (Pi(q.ca + 1900) ? Qi : Ri)[x++]) {
    }
    return f(q.fb + E, 3);
  }, "%m":function(q) {
    return f(q.Pa + 1, 2);
  }, "%M":function(q) {
    return f(q.Yc, 2);
  }, "%n":function() {
    return "\n";
  }, "%p":function(q) {
    return 0 <= q.Oa && 12 > q.Oa ? "AM" : "PM";
  }, "%S":function(q) {
    return f(q.Zc, 2);
  }, "%t":function() {
    return "\t";
  }, "%u":function(q) {
    return q.N || 7;
  }, "%U":function(q) {
    return f(Math.floor((q.ba + 7 - q.N) / 7), 2);
  }, "%V":function(q) {
    var E = Math.floor((q.ba + 7 - (q.N + 6) % 7) / 7);
    2 >= (q.N + 371 - q.ba - 2) % 7 && E++;
    if (E) {
      53 == E && (x = (q.N + 371 - q.ba) % 7, 4 == x || 3 == x && Pi(q.ca) || (E = 1));
    } else {
      E = 52;
      var x = (q.N + 7 - q.ba - 1) % 7;
      (4 == x || 5 == x && Pi(q.ca % 400 - 1)) && E++;
    }
    return f(E, 2);
  }, "%w":function(q) {
    return q.N;
  }, "%W":function(q) {
    return f(Math.floor((q.ba + 7 - (q.N + 6) % 7) / 7), 2);
  }, "%y":function(q) {
    return (q.ca + 1900).toString().substring(2);
  }, "%Y":function(q) {
    return q.ca + 1900;
  }, "%z":function(q) {
    q = q.Xc;
    var E = 0 <= q;
    q = Math.abs(q) / 60;
    return (E ? "+" : "-") + String("0000" + (q / 60 * 100 + q % 60)).slice(-4);
  }, "%Z":function(q) {
    return q.$c;
  }, "%%":function() {
    return "%";
  }};
  c = c.replace(/%%/g, "\x00\x00");
  for (u in p) {
    c.includes(u) && (c = c.replace(new RegExp(u, "g"), p[u](d)));
  }
  c = c.replace(/\0\0/g, "%");
  u = Wb(c, !1);
  if (u.length > b) {
    return 0;
  }
  vd(u, a);
  return u.length - 1;
}
"undefined" != typeof TextDecoder && new TextDecoder("utf-16le");
function Ti(a) {
  var b = t["_" + a];
  w(b, "Cannot call unknown function " + a + ", make sure it is exported");
  return b;
}
function Ui(a, b, c, d) {
  var e = {string:p => {
    var u = 0;
    if (null !== p && void 0 !== p && 0 !== p) {
      var z = (p.length << 2) + 1;
      u = Wf(z);
      $a(p, u, z);
    }
    return u;
  }, array:p => {
    var u = Wf(p.length);
    vd(p, u);
    return u;
  }};
  a = Ti(a);
  var f = [], g = 0;
  w("array" !== b, 'Return type should not be "array".');
  if (d) {
    for (var k = 0; k < d.length; k++) {
      var l = e[c[k]];
      l ? (0 === g && (g = od()), f[k] = l(d[k])) : f[k] = d[k];
    }
  }
  c = a.apply(null, f);
  return c = function(p) {
    0 !== g && pd(g);
    return "string" === b ? A(p) : "boolean" === b ? !!p : p;
  }(c);
}
G.Wa();
function Dc(a, b, c, d) {
  a || (a = this);
  this.parent = a;
  this.u = a.u;
  this.I = null;
  this.id = uc++;
  this.name = b;
  this.mode = c;
  this.g = {};
  this.j = {};
  this.ra = d;
}
Object.defineProperties(Dc.prototype, {read:{get:function() {
  return 365 === (this.mode & 365);
}, set:function(a) {
  a ? this.mode |= 365 : this.mode &= -366;
}}, write:{get:function() {
  return 146 === (this.mode & 146);
}, set:function(a) {
  a ? this.mode |= 146 : this.mode &= -147;
}}});
tb();
vc = Array(4096);
zb(J, "/");
Pc("/tmp");
Pc("/home");
Pc("/home/web_user");
(() => {
  Pc("/dev");
  Zb(259, {read:() => 0, write:(b, c, d, e) => e});
  Qc("/dev/null", 259);
  Yb(1280, ac);
  Yb(1536, bc);
  Qc("/dev/tty", 1280);
  Qc("/dev/tty1", 1536);
  var a = Sb();
  ub("random", a);
  ub("urandom", a);
  Pc("/dev/shm");
  Pc("/dev/shm/tmp");
})();
(() => {
  Pc("/proc");
  var a = Pc("/proc/self");
  Pc("/proc/self/fd");
  zb({u:() => {
    var b = dc(a, "fd", 16895, 73);
    b.g = {na:(c, d) => {
      var e = tc[+d];
      if (!e) {
        throw new H(8);
      }
      c = {parent:null, u:{oa:"fake"}, g:{ta:() => e.path}};
      return c.parent = c;
    }};
    return b;
  }}, "/proc/self/fd");
})();
qc = {EPERM:63, ENOENT:44, ESRCH:71, EINTR:27, EIO:29, ENXIO:60, E2BIG:1, ENOEXEC:45, EBADF:8, ECHILD:12, EAGAIN:6, EWOULDBLOCK:6, ENOMEM:48, EACCES:2, EFAULT:21, ENOTBLK:105, EBUSY:10, EEXIST:20, EXDEV:75, ENODEV:43, ENOTDIR:54, EISDIR:31, EINVAL:28, ENFILE:41, EMFILE:33, ENOTTY:59, ETXTBSY:74, EFBIG:22, ENOSPC:51, ESPIPE:70, EROFS:69, EMLINK:34, EPIPE:64, EDOM:18, ERANGE:68, ENOMSG:49, EIDRM:24, ECHRNG:106, EL2NSYNC:156, EL3HLT:107, EL3RST:108, ELNRNG:109, EUNATCH:110, ENOCSI:111, EL2HLT:112, EDEADLK:16, 
ENOLCK:46, EBADE:113, EBADR:114, EXFULL:115, ENOANO:104, EBADRQC:103, EBADSLT:102, EDEADLOCK:16, EBFONT:101, ENOSTR:100, ENODATA:116, ETIME:117, ENOSR:118, ENONET:119, ENOPKG:120, EREMOTE:121, ENOLINK:47, EADV:122, ESRMNT:123, ECOMM:124, EPROTO:65, EMULTIHOP:36, EDOTDOT:125, EBADMSG:9, ENOTUNIQ:126, EBADFD:127, EREMCHG:128, ELIBACC:129, ELIBBAD:130, ELIBSCN:131, ELIBMAX:132, ELIBEXEC:133, ENOSYS:52, ENOTEMPTY:55, ENAMETOOLONG:37, ELOOP:32, EOPNOTSUPP:138, EPFNOSUPPORT:139, ECONNRESET:15, ENOBUFS:42, 
EAFNOSUPPORT:5, EPROTOTYPE:67, ENOTSOCK:57, ENOPROTOOPT:50, ESHUTDOWN:140, ECONNREFUSED:14, EADDRINUSE:3, ECONNABORTED:13, ENETUNREACH:40, ENETDOWN:38, ETIMEDOUT:73, EHOSTDOWN:142, EHOSTUNREACH:23, EINPROGRESS:26, EALREADY:7, EDESTADDRREQ:17, EMSGSIZE:35, EPROTONOSUPPORT:66, ESOCKTNOSUPPORT:137, EADDRNOTAVAIL:4, ENETRESET:39, EISCONN:30, ENOTCONN:53, ETOOMANYREFS:141, EUSERS:136, EDQUOT:19, ESTALE:72, ENOTSUP:138, ENOMEDIUM:148, EILSEQ:25, EOVERFLOW:61, ECANCELED:11, ENOTRECOVERABLE:56, EOWNERDEAD:62, 
ESTRPIPE:135};
t.requestFullscreen = function(a, b) {
  lf(a, b);
};
t.requestFullScreen = function() {
  Aa("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)");
};
t.requestAnimationFrame = function(a) {
  He(a);
};
t.setCanvasSize = function(a, b, c) {
  nf(t.canvas, a, b);
  c || of();
};
t.pauseMainLoop = function() {
  Ce = null;
  Ke++;
};
t.resumeMainLoop = function() {
  Te();
};
t.getUserMedia = function() {
  window.getUserMedia || (window.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia);
  window.getUserMedia(void 0);
};
t.createContext = function(a, b, c, d) {
  return cf(a, b, c, d);
};
for (var O, Vi = new Float32Array(288), Wi = 0; 288 > Wi; ++Wi) {
  Vf[Wi] = Vi.subarray(0, Wi + 1);
}
t.request_quit = function() {
  Lg();
};
t.onExit = function(a) {
  const b = Eg;
  Ig();
  X = null;
  zg = "en";
  Ag = 2;
  Cg = Bg = !1;
  Eg = Dg = null;
  b && b(a);
};
Ng = Promise.resolve();
t.initConfig = function(a) {
  Ag = a.canvasResizePolicy;
  X = a.canvas;
  zg = a.locale || zg;
  Bg = a.virtualKeyboard;
  Cg = !!a.persistentDrops;
  Dg = a.onExecute;
  Eg = a.onExit;
  a.focusCanvas && X.focus();
};
t.initFS = function(a) {
  Fg = !1;
  if (!Array.isArray(a)) {
    return Promise.reject(Error("Persistent paths must be an array"));
  }
  if (!a.length) {
    return Promise.resolve();
  }
  Hg = a.slice();
  Hg.forEach(function(b) {
    try {
      hc(b);
    } catch (c) {
      44 !== c.h && V(c), jc(b);
    }
    zb(K, b);
  });
  return new Promise(function(b) {
    Mc(!0, function(c) {
      c ? (Hg = [], Fg = !1, sg(`IndexedDB not available: ${c.message}`)) : Fg = !0;
      b(c);
    });
  });
};
t.copyToFS = Kg;
Mg.push(function(a) {
  dh();
  a();
});
Mg.push(function(a) {
  gh();
  a();
});
Mg.push(function(a) {
  ph && (ph.remove(), ph = null);
  qh && (qh.remove(), qh = null);
  a();
});
gi = new Map();
var Xi = [null, dd, fd, yd, Ad, Kd, Qd, Rd, Sd, Td, Ud, Vd, Xd, Yd, Zd, $d, ae, be, ce, de, ee, fe, ge, he, ie, je, ke, le, me, ne, oe, pe, qe, ve, rf, Zf, bg, fg, jg, kg, lg, mg, ng, og, pg, qg, Wg, Xg, Yg, ni, yi, zi, Ai, Bi, Ci, Di, Ei, Fi, Gi, Hi, Ii, Ji, Ki, Li, Mi, Ni, Oi], ij = {__assert_fail:function(a, b, c, d) {
  Aa("Assertion failed: " + A(a) + ", at: " + [b ? A(b) : "unknown filename", c, d ? A(d) : "unknown function"]);
}, __call_sighandler:function(a, b) {
  td(a)(b);
}, __cxa_allocate_exception:function(a) {
  return ue(a + 24) + 24;
}, __cxa_throw:function(a, b, c) {
  (new wd(a)).Wa(b, c);
  xd++;
  throw a + " - Exception catching is disabled, this exception cannot be caught. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch.";
}, __emscripten_init_main_thread_js:function(a) {
  Yi(a, !Ga, 1, !Fa);
  G.Pb();
}, __emscripten_thread_cleanup:function(a) {
  v ? postMessage({cmd:"cleanupThread", thread:a}) : Mb(a);
}, __pthread_create_js:zd, __syscall__newselect:Ad, __syscall_accept4:Kd, __syscall_bind:Qd, __syscall_chdir:Rd, __syscall_chmod:Sd, __syscall_connect:Td, __syscall_faccessat:Ud, __syscall_fcntl64:Vd, __syscall_getcwd:Xd, __syscall_getdents64:Yd, __syscall_getsockname:Zd, __syscall_getsockopt:$d, __syscall_ioctl:ae, __syscall_listen:be, __syscall_lstat64:ce, __syscall_mkdirat:de, __syscall_newfstatat:ee, __syscall_openat:fe, __syscall_poll:ge, __syscall_readlinkat:he, __syscall_recvfrom:ie, __syscall_renameat:je, 
__syscall_rmdir:ke, __syscall_sendto:le, __syscall_socket:me, __syscall_stat64:ne, __syscall_statfs64:oe, __syscall_symlink:pe, __syscall_unlinkat:qe, _dlinit:function() {
}, _dlopen_js:function() {
  Aa("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking");
}, _dlsym_js:function() {
  Aa("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking");
}, _emscripten_date_now:function() {
  return Date.now();
}, _emscripten_default_pthread_stack_size:function() {
  return 2097152;
}, _emscripten_get_now_is_monotonic:function() {
  return !0;
}, _emscripten_notify_task_queue:function(a, b, c, d) {
  if (a == b) {
    setTimeout(() => md(d));
  } else if (v) {
    postMessage({targetThread:a, cmd:"processProxyingQueue", queue:d});
  } else {
    b = G.J[a];
    if (!b) {
      y("Cannot send message to thread with ID " + a + ", unknown thread ID!");
      return;
    }
    b.postMessage({cmd:"processProxyingQueue", queue:d});
  }
  return 1;
}, _emscripten_proxied_gl_context_activated_from_main_browser_thread:function(a) {
  O = t.la = S = a;
}, _emscripten_set_offscreencanvas_size:function() {
  y("emscripten_set_offscreencanvas_size: Build with -sOFFSCREENCANVAS_SUPPORT=1 to enable transferring canvases to pthreads.");
  return -1;
}, _emscripten_throw_longjmp:function() {
  throw Infinity;
}, _gmtime_js:function(a, b) {
  a = new Date(1e3 * se(a));
  n()[b >> 2] = a.getUTCSeconds();
  n()[b + 4 >> 2] = a.getUTCMinutes();
  n()[b + 8 >> 2] = a.getUTCHours();
  n()[b + 12 >> 2] = a.getUTCDate();
  n()[b + 16 >> 2] = a.getUTCMonth();
  n()[b + 20 >> 2] = a.getUTCFullYear() - 1900;
  n()[b + 24 >> 2] = a.getUTCDay();
  a = (a.getTime() - Date.UTC(a.getUTCFullYear(), 0, 1, 0, 0, 0, 0)) / 864E5 | 0;
  n()[b + 28 >> 2] = a;
}, _localtime_js:function(a, b) {
  a = new Date(1e3 * se(a));
  n()[b >> 2] = a.getSeconds();
  n()[b + 4 >> 2] = a.getMinutes();
  n()[b + 8 >> 2] = a.getHours();
  n()[b + 12 >> 2] = a.getDate();
  n()[b + 16 >> 2] = a.getMonth();
  n()[b + 20 >> 2] = a.getFullYear() - 1900;
  n()[b + 24 >> 2] = a.getDay();
  var c = new Date(a.getFullYear(), 0, 1), d = (a.getTime() - c.getTime()) / 864E5 | 0;
  n()[b + 28 >> 2] = d;
  n()[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
  d = (new Date(a.getFullYear(), 6, 1)).getTimezoneOffset();
  c = c.getTimezoneOffset();
  a = (d != c && a.getTimezoneOffset() == Math.min(c, d)) | 0;
  n()[b + 32 >> 2] = a;
}, _tzset_js:we, abort:function() {
  Aa("native code called abort()");
}, emscripten_cancel_main_loop:function() {
  Ce = null;
  Ke++;
  Ae = null;
}, emscripten_check_blocking_allowed:function() {
  Ga || Ya("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread");
}, emscripten_console_error:function(a) {
  w("number" == typeof a);
  console.error(A(a));
}, emscripten_force_exit:rf, emscripten_get_now:Ee, emscripten_glActiveTexture:function(a) {
  O.activeTexture(a);
}, emscripten_glAttachShader:function(a, b) {
  O.attachShader(Af[a], Df[b]);
}, emscripten_glBindBuffer:function(a, b) {
  35051 == a ? O.rb = b : 35052 == a && (O.da = b);
  O.bindBuffer(a, zf[b]);
}, emscripten_glBindBufferBase:function(a, b, c) {
  O.bindBufferBase(a, b, zf[c]);
}, emscripten_glBindBufferRange:function(a, b, c, d, e) {
  O.bindBufferRange(a, b, zf[c], d, e);
}, emscripten_glBindFramebuffer:function(a, b) {
  O.bindFramebuffer(a, b ? Bf[b] : S.Ta);
}, emscripten_glBindTexture:function(a, b) {
  O.bindTexture(a, Cf[b]);
}, emscripten_glBindVertexArray:function(a) {
  O.bindVertexArray(Ef[a]);
}, emscripten_glBlendColor:function(a, b, c, d) {
  O.blendColor(a, b, c, d);
}, emscripten_glBlendEquation:function(a) {
  O.blendEquation(a);
}, emscripten_glBlendFunc:function(a, b) {
  O.blendFunc(a, b);
}, emscripten_glBlendFuncSeparate:function(a, b, c, d) {
  O.blendFuncSeparate(a, b, c, d);
}, emscripten_glBlitFramebuffer:function(a, b, c, d, e, f, g, k, l, p) {
  O.blitFramebuffer(a, b, c, d, e, f, g, k, l, p);
}, emscripten_glBufferData:function(a, b, c, d) {
  2 <= S.version ? c && b ? O.bufferData(a, ia(), d, c, b) : O.bufferData(a, b, d) : O.bufferData(a, c ? ia().subarray(c, c + b) : b, d);
}, emscripten_glBufferSubData:function(a, b, c, d) {
  2 <= S.version ? c && O.bufferSubData(a, b, ia(), d, c) : O.bufferSubData(a, b, ia().subarray(d, d + c));
}, emscripten_glCheckFramebufferStatus:function(a) {
  return O.checkFramebufferStatus(a);
}, emscripten_glClear:function(a) {
  O.clear(a);
}, emscripten_glClearBufferfv:function(a, b, c) {
  O.clearBufferfv(a, b, sa(), c >> 2);
}, emscripten_glClearColor:function(a, b, c, d) {
  O.clearColor(a, b, c, d);
}, emscripten_glClearDepthf:function(a) {
  O.clearDepth(a);
}, emscripten_glColorMask:function(a, b, c, d) {
  O.colorMask(!!a, !!b, !!c, !!d);
}, emscripten_glCompileShader:function(a) {
  O.compileShader(Df[a]);
}, emscripten_glCompressedTexImage2D:function(a, b, c, d, e, f, g, k) {
  2 <= S.version ? O.da || !g ? O.compressedTexImage2D(a, b, c, d, e, f, g, k) : O.compressedTexImage2D(a, b, c, d, e, f, ia(), k, g) : O.compressedTexImage2D(a, b, c, d, e, f, k ? ia().subarray(k, k + g) : null);
}, emscripten_glCreateProgram:function() {
  var a = Lf(Af), b = O.createProgram();
  b.name = a;
  b.Ea = b.Ca = b.Da = 0;
  b.gb = 1;
  Af[a] = b;
  return a;
}, emscripten_glCreateShader:function(a) {
  var b = Lf(Df);
  Df[b] = O.createShader(a);
  return b;
}, emscripten_glCullFace:function(a) {
  O.cullFace(a);
}, emscripten_glDeleteBuffers:function(a, b) {
  for (var c = 0; c < a; c++) {
    var d = n()[b + 4 * c >> 2], e = zf[d];
    e && (O.deleteBuffer(e), e.name = 0, zf[d] = null, d == O.rb && (O.rb = 0), d == O.da && (O.da = 0));
  }
}, emscripten_glDeleteFramebuffers:function(a, b) {
  for (var c = 0; c < a; ++c) {
    var d = n()[b + 4 * c >> 2], e = Bf[d];
    e && (O.deleteFramebuffer(e), e.name = 0, Bf[d] = null);
  }
}, emscripten_glDeleteProgram:function(a) {
  if (a) {
    var b = Af[a];
    b ? (O.deleteProgram(b), b.name = 0, Af[a] = null) : Q(1281);
  }
}, emscripten_glDeleteQueries:function(a, b) {
  for (var c = 0; c < a; c++) {
    var d = n()[b + 4 * c >> 2], e = Ff[d];
    e && (O.deleteQuery(e), Ff[d] = null);
  }
}, emscripten_glDeleteShader:function(a) {
  if (a) {
    var b = Df[a];
    b ? (O.deleteShader(b), Df[a] = null) : Q(1281);
  }
}, emscripten_glDeleteSync:function(a) {
  if (a) {
    var b = Gf[a];
    b ? (O.deleteSync(b), b.name = 0, Gf[a] = null) : Q(1281);
  }
}, emscripten_glDeleteTextures:function(a, b) {
  for (var c = 0; c < a; c++) {
    var d = n()[b + 4 * c >> 2], e = Cf[d];
    e && (O.deleteTexture(e), e.name = 0, Cf[d] = null);
  }
}, emscripten_glDeleteVertexArrays:function(a, b) {
  for (var c = 0; c < a; c++) {
    var d = n()[b + 4 * c >> 2];
    O.deleteVertexArray(Ef[d]);
    Ef[d] = null;
  }
}, emscripten_glDepthFunc:function(a) {
  O.depthFunc(a);
}, emscripten_glDepthMask:function(a) {
  O.depthMask(!!a);
}, emscripten_glDisable:function(a) {
  O.disable(a);
}, emscripten_glDisableVertexAttribArray:function(a) {
  O.disableVertexAttribArray(a);
}, emscripten_glDrawArrays:function(a, b, c) {
  O.drawArrays(a, b, c);
}, emscripten_glDrawArraysInstanced:function(a, b, c, d) {
  O.drawArraysInstanced(a, b, c, d);
}, emscripten_glDrawElements:function(a, b, c, d) {
  O.drawElements(a, b, c, d);
}, emscripten_glDrawElementsInstanced:function(a, b, c, d, e) {
  O.drawElementsInstanced(a, b, c, d, e);
}, emscripten_glEnable:function(a) {
  O.enable(a);
}, emscripten_glEnableVertexAttribArray:function(a) {
  O.enableVertexAttribArray(a);
}, emscripten_glFenceSync:function(a, b) {
  return (a = O.fenceSync(a, b)) ? (b = Lf(Gf), a.name = b, Gf[b] = a, b) : 0;
}, emscripten_glFinish:function() {
  O.finish();
}, emscripten_glFramebufferTexture2D:function(a, b, c, d, e) {
  O.framebufferTexture2D(a, b, c, Cf[d], e);
}, emscripten_glFramebufferTextureLayer:function(a, b, c, d, e) {
  O.framebufferTextureLayer(a, b, Cf[c], d, e);
}, emscripten_glGenBuffers:function(a, b) {
  Pf(a, b, "createBuffer", zf);
}, emscripten_glGenFramebuffers:function(a, b) {
  Pf(a, b, "createFramebuffer", Bf);
}, emscripten_glGenQueries:function(a, b) {
  Pf(a, b, "createQuery", Ff);
}, emscripten_glGenTextures:function(a, b) {
  Pf(a, b, "createTexture", Cf);
}, emscripten_glGenVertexArrays:function(a, b) {
  Pf(a, b, "createVertexArray", Ef);
}, emscripten_glGenerateMipmap:function(a) {
  O.generateMipmap(a);
}, emscripten_glGetFloatv:function(a, b) {
  Qf(a, b, 2);
}, emscripten_glGetIntegerv:function(a, b) {
  Qf(a, b, 0);
}, emscripten_glGetProgramInfoLog:function(a, b, c, d) {
  a = O.getProgramInfoLog(Af[a]);
  null === a && (a = "(unknown error)");
  b = 0 < b && d ? $a(a, d, b) : 0;
  c && (n()[c >> 2] = b);
}, emscripten_glGetProgramiv:function(a, b, c) {
  if (c) {
    if (a >= yf) {
      Q(1281);
    } else {
      if (a = Af[a], 35716 == b) {
        a = O.getProgramInfoLog(a), null === a && (a = "(unknown error)"), n()[c >> 2] = a.length + 1;
      } else if (35719 == b) {
        if (!a.Ea) {
          for (b = 0; b < O.getProgramParameter(a, 35718); ++b) {
            a.Ea = Math.max(a.Ea, O.getActiveUniform(a, b).name.length + 1);
          }
        }
        n()[c >> 2] = a.Ea;
      } else if (35722 == b) {
        if (!a.Ca) {
          for (b = 0; b < O.getProgramParameter(a, 35721); ++b) {
            a.Ca = Math.max(a.Ca, O.getActiveAttrib(a, b).name.length + 1);
          }
        }
        n()[c >> 2] = a.Ca;
      } else if (35381 == b) {
        if (!a.Da) {
          for (b = 0; b < O.getProgramParameter(a, 35382); ++b) {
            a.Da = Math.max(a.Da, O.getActiveUniformBlockName(a, b).length + 1);
          }
        }
        n()[c >> 2] = a.Da;
      } else {
        n()[c >> 2] = O.getProgramParameter(a, b);
      }
    }
  } else {
    Q(1281);
  }
}, emscripten_glGetShaderInfoLog:function(a, b, c, d) {
  a = O.getShaderInfoLog(Df[a]);
  null === a && (a = "(unknown error)");
  b = 0 < b && d ? $a(a, d, b) : 0;
  c && (n()[c >> 2] = b);
}, emscripten_glGetShaderiv:function(a, b, c) {
  c ? 35716 == b ? (a = O.getShaderInfoLog(Df[a]), null === a && (a = "(unknown error)"), a = a ? a.length + 1 : 0, n()[c >> 2] = a) : 35720 == b ? (a = (a = O.getShaderSource(Df[a])) ? a.length + 1 : 0, n()[c >> 2] = a) : n()[c >> 2] = O.getShaderParameter(Df[a], b) : Q(1281);
}, emscripten_glGetString:function(a) {
  var b = Hf[a];
  if (!b) {
    switch(a) {
      case 7939:
        b = O.getSupportedExtensions() || [];
        b = b.concat(b.map(function(d) {
          return "GL_" + d;
        }));
        b = Rf(b.join(" "));
        break;
      case 7936:
      case 7937:
      case 37445:
      case 37446:
        (b = O.getParameter(a)) || Q(1280);
        b = b && Rf(b);
        break;
      case 7938:
        b = O.getParameter(7938);
        b = 2 <= S.version ? "OpenGL ES 3.0 (" + b + ")" : "OpenGL ES 2.0 (" + b + ")";
        b = Rf(b);
        break;
      case 35724:
        b = O.getParameter(35724);
        var c = b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);
        null !== c && (3 == c[1].length && (c[1] += "0"), b = "OpenGL ES GLSL ES " + c[1] + " (" + b + ")");
        b = Rf(b);
        break;
      default:
        Q(1280);
    }
    Hf[a] = b;
  }
  return b;
}, emscripten_glGetStringi:function(a, b) {
  if (2 > S.version) {
    return Q(1282), 0;
  }
  var c = If[a];
  if (c) {
    return 0 > b || b >= c.length ? (Q(1281), 0) : c[b];
  }
  switch(a) {
    case 7939:
      return c = O.getSupportedExtensions() || [], c = c.concat(c.map(function(d) {
        return "GL_" + d;
      })), c = c.map(function(d) {
        return Rf(d);
      }), c = If[a] = c, 0 > b || b >= c.length ? (Q(1281), 0) : c[b];
    default:
      return Q(1280), 0;
  }
}, emscripten_glGetSynciv:function(a, b, c, d, e) {
  0 > c ? Q(1281) : e ? (a = O.getSyncParameter(Gf[a], b), null !== a && (n()[e >> 2] = a, d && (n()[d >> 2] = 1))) : Q(1281);
}, emscripten_glGetUniformBlockIndex:function(a, b) {
  return O.getUniformBlockIndex(Af[a], A(b));
}, emscripten_glGetUniformLocation:function(a, b) {
  b = A(b);
  if (a = Af[a]) {
    var c = a, d = c.va, e = c.Rb, f;
    if (!d) {
      for (c.va = d = {}, c.Qb = {}, f = 0; f < O.getProgramParameter(c, 35718); ++f) {
        var g = O.getActiveUniform(c, f);
        var k = g.name;
        g = g.size;
        var l = Sf(k);
        l = 0 < l ? k.slice(0, l) : k;
        var p = c.gb;
        c.gb += g;
        e[l] = [g, p];
        for (k = 0; k < g; ++k) {
          d[p] = k, c.Qb[p++] = l;
        }
      }
    }
    c = a.va;
    d = 0;
    e = b;
    f = Sf(b);
    0 < f && (d = parseInt(b.slice(f + 1)) >>> 0, e = b.slice(0, f));
    if ((e = a.Rb[e]) && d < e[0] && (d += e[1], c[d] = c[d] || O.getUniformLocation(a, b))) {
      return d;
    }
  } else {
    Q(1281);
  }
  return -1;
}, emscripten_glLinkProgram:function(a) {
  a = Af[a];
  O.linkProgram(a);
  a.va = 0;
  a.Rb = {};
}, emscripten_glPixelStorei:function(a, b) {
  3317 == a && (Jf = b);
  O.pixelStorei(a, b);
}, emscripten_glReadBuffer:function(a) {
  O.readBuffer(a);
}, emscripten_glScissor:function(a, b, c, d) {
  O.scissor(a, b, c, d);
}, emscripten_glShaderSource:function(a, b, c, d) {
  for (var e = "", f = 0; f < b; ++f) {
    var g = d ? n()[d + 4 * f >> 2] : -1;
    e += A(n()[c + 4 * f >> 2], 0 > g ? void 0 : g);
  }
  O.shaderSource(Df[a], e);
}, emscripten_glTexImage2D:function(a, b, c, d, e, f, g, k, l) {
  if (2 <= S.version) {
    if (O.da) {
      O.texImage2D(a, b, c, d, e, f, g, k, l);
    } else if (l) {
      var p = Tf(k);
      O.texImage2D(a, b, c, d, e, f, g, k, p, l >> 31 - Math.clz32(p.BYTES_PER_ELEMENT));
    } else {
      O.texImage2D(a, b, c, d, e, f, g, k, null);
    }
  } else {
    p = O;
    var u = p.texImage2D;
    if (l) {
      var z = Tf(k), D = 31 - Math.clz32(z.BYTES_PER_ELEMENT), q = Jf;
      l = z.subarray(l >> D, l + e * (d * ({5:3, 6:4, 8:2, 29502:3, 29504:4, 26917:2, 26918:2, 29846:3, 29847:4}[g - 6402] || 1) * (1 << D) + q - 1 & -q) >> D);
    } else {
      l = null;
    }
    u.call(p, a, b, c, d, e, f, g, k, l);
  }
}, emscripten_glTexImage3D:function(a, b, c, d, e, f, g, k, l, p) {
  if (O.da) {
    O.texImage3D(a, b, c, d, e, f, g, k, l, p);
  } else if (p) {
    var u = Tf(l);
    O.texImage3D(a, b, c, d, e, f, g, k, l, u, p >> 31 - Math.clz32(u.BYTES_PER_ELEMENT));
  } else {
    O.texImage3D(a, b, c, d, e, f, g, k, l, null);
  }
}, emscripten_glTexParameterf:function(a, b, c) {
  O.texParameterf(a, b, c);
}, emscripten_glTexParameteri:function(a, b, c) {
  O.texParameteri(a, b, c);
}, emscripten_glTexStorage2D:function(a, b, c, d, e) {
  O.texStorage2D(a, b, c, d, e);
}, emscripten_glTexSubImage3D:function(a, b, c, d, e, f, g, k, l, p, u) {
  if (O.da) {
    O.texSubImage3D(a, b, c, d, e, f, g, k, l, p, u);
  } else if (u) {
    var z = Tf(p);
    O.texSubImage3D(a, b, c, d, e, f, g, k, l, p, z, u >> 31 - Math.clz32(z.BYTES_PER_ELEMENT));
  } else {
    O.texSubImage3D(a, b, c, d, e, f, g, k, l, p, null);
  }
}, emscripten_glUniform1f:function(a, b) {
  O.uniform1f(Uf(a), b);
}, emscripten_glUniform1i:function(a, b) {
  O.uniform1i(Uf(a), b);
}, emscripten_glUniform1uiv:function(a, b, c) {
  b && O.uniform1uiv(Uf(a), r(), c >> 2, b);
}, emscripten_glUniform3fv:function(a, b, c) {
  if (2 <= S.version) {
    b && O.uniform3fv(Uf(a), sa(), c >> 2, 3 * b);
  } else {
    if (96 >= b) {
      for (var d = Vf[3 * b - 1], e = 0; e < 3 * b; e += 3) {
        d[e] = sa()[c + 4 * e >> 2], d[e + 1] = sa()[c + (4 * e + 4) >> 2], d[e + 2] = sa()[c + (4 * e + 8) >> 2];
      }
    } else {
      d = sa().subarray(c >> 2, c + 12 * b >> 2);
    }
    O.uniform3fv(Uf(a), d);
  }
}, emscripten_glUniform4f:function(a, b, c, d, e) {
  O.uniform4f(Uf(a), b, c, d, e);
}, emscripten_glUniform4fv:function(a, b, c) {
  if (2 <= S.version) {
    b && O.uniform4fv(Uf(a), sa(), c >> 2, 4 * b);
  } else {
    if (72 >= b) {
      var d = Vf[4 * b - 1], e = sa();
      c >>= 2;
      for (var f = 0; f < 4 * b; f += 4) {
        var g = c + f;
        d[f] = e[g];
        d[f + 1] = e[g + 1];
        d[f + 2] = e[g + 2];
        d[f + 3] = e[g + 3];
      }
    } else {
      d = sa().subarray(c >> 2, c + 16 * b >> 2);
    }
    O.uniform4fv(Uf(a), d);
  }
}, emscripten_glUniformBlockBinding:function(a, b, c) {
  a = Af[a];
  O.uniformBlockBinding(a, b, c);
}, emscripten_glUniformMatrix4fv:function(a, b, c, d) {
  if (2 <= S.version) {
    b && O.uniformMatrix4fv(Uf(a), !!c, sa(), d >> 2, 16 * b);
  } else {
    if (18 >= b) {
      var e = Vf[16 * b - 1], f = sa();
      d >>= 2;
      for (var g = 0; g < 16 * b; g += 16) {
        var k = d + g;
        e[g] = f[k];
        e[g + 1] = f[k + 1];
        e[g + 2] = f[k + 2];
        e[g + 3] = f[k + 3];
        e[g + 4] = f[k + 4];
        e[g + 5] = f[k + 5];
        e[g + 6] = f[k + 6];
        e[g + 7] = f[k + 7];
        e[g + 8] = f[k + 8];
        e[g + 9] = f[k + 9];
        e[g + 10] = f[k + 10];
        e[g + 11] = f[k + 11];
        e[g + 12] = f[k + 12];
        e[g + 13] = f[k + 13];
        e[g + 14] = f[k + 14];
        e[g + 15] = f[k + 15];
      }
    } else {
      e = sa().subarray(d >> 2, d + 64 * b >> 2);
    }
    O.uniformMatrix4fv(Uf(a), !!c, e);
  }
}, emscripten_glUseProgram:function(a) {
  a = Af[a];
  O.useProgram(a);
  O.dc = a;
}, emscripten_glVertexAttrib4f:function(a, b, c, d, e) {
  O.vertexAttrib4f(a, b, c, d, e);
}, emscripten_glVertexAttribDivisor:function(a, b) {
  O.vertexAttribDivisor(a, b);
}, emscripten_glVertexAttribIPointer:function(a, b, c, d, e) {
  O.vertexAttribIPointer(a, b, c, d, e);
}, emscripten_glVertexAttribPointer:function(a, b, c, d, e, f) {
  O.vertexAttribPointer(a, b, c, !!d, e, f);
}, emscripten_glViewport:function(a, b, c, d) {
  O.viewport(a, b, c, d);
}, emscripten_memcpy_big:function(a, b, c) {
  ia().copyWithin(a, b, b + c);
}, emscripten_num_logical_cores:function() {
  return navigator.hardwareConcurrency;
}, emscripten_receive_on_main_thread_js:function(a, b, c) {
  Yf.length = b;
  c >>= 3;
  for (var d = 0; d < b; d++) {
    Yf[d] = wa()[c + d];
  }
  a = 0 > a ? Lb[-a - 1] : Xi[a];
  w(a.length == b, "Call args mismatch in emscripten_receive_on_main_thread_js");
  return a.apply(null, Yf);
}, emscripten_resize_heap:function(a) {
  var b = ia().length;
  a >>>= 0;
  if (a <= b) {
    return !1;
  }
  if (2147483648 < a) {
    return y("Cannot enlarge memory, asked to go up to " + a + " bytes, but the limit is 2147483648 bytes!"), !1;
  }
  for (var c = 1; 4 >= c; c *= 2) {
    var d = b * (1 + .2 / c);
    d = Math.min(d, a + 100663296);
    var e = Math;
    d = Math.max(a, d);
    e = e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536);
    a: {
      d = e;
      try {
        m.grow(d - ea.byteLength + 65535 >>> 16);
        fa(m.buffer);
        var f = 1;
        break a;
      } catch (g) {
        y("emscripten_realloc_buffer: Attempted to grow heap from " + ea.byteLength + " bytes to " + d + " bytes, but got error: " + g);
      }
      f = void 0;
    }
    if (f) {
      return !0;
    }
  }
  y("Failed to grow the heap from " + b + " bytes to " + e + " bytes, not enough memory!");
  return !1;
}, emscripten_set_main_loop:function(a, b, c) {
  a = td(a);
  Je(a, b, c);
}, emscripten_supports_offscreencanvas:function() {
  return 0;
}, emscripten_unwind_to_js_event_loop:function() {
  throw "unwind";
}, emscripten_webgl_destroy_context:Zf, emscripten_webgl_do_commit_frame:function() {
  return S && S.C ? S.Ta ? (Of(), 0) : S.attributes.vb ? 0 : -3 : -3;
}, emscripten_webgl_do_create_context:cg, emscripten_webgl_enable_extension:fg, emscripten_webgl_init_context_attributes:function(a) {
  w(a);
  for (var b = a >> 2, c = 0; 14 > c; ++c) {
    n()[b + c] = 0;
  }
  n()[b] = n()[b + 1] = n()[b + 3] = n()[b + 4] = n()[b + 8] = n()[b + 10] = 1;
  Ga && (n()[a + 48 >> 2] = 1);
}, emscripten_webgl_make_context_current_calling_thread:function(a) {
  return gf(a) ? 0 : -5;
}, environ_get:jg, environ_sizes_get:kg, exit:ed, fd_close:lg, fd_fdstat_get:mg, fd_read:ng, fd_seek:og, fd_write:pg, getTempRet0:function() {
  return Ra;
}, getaddrinfo:qg, getnameinfo:function(a, b, c, d, e, f, g) {
  b = Od(a, b);
  if (b.h) {
    return -6;
  }
  a = b.port;
  var k = b.v;
  b = !1;
  if (c && d) {
    var l;
    if (g & 1 || !(l = Id[k] ? Id[k] : null)) {
      if (g & 8) {
        return -2;
      }
    } else {
      k = l;
    }
    c = $a(k, c, d);
    c + 1 >= d && (b = !0);
  }
  e && f && (c = $a("" + a, e, f), c + 1 >= f && (b = !0));
  return b ? -12 : 0;
}, glGetBufferSubData:function(a, b, c, d) {
  d ? c && O.getBufferSubData(a, b, ia(), d, c) : Q(1281);
}, godot_audio_capture_start:Wg, godot_audio_capture_stop:Xg, godot_audio_has_worklet:function() {
  return Pg && Pg.audioWorklet ? 1 : 0;
}, godot_audio_init:function(a, b, c, d) {
  b = U(c);
  d = U(d);
  c = rd(a, "i32");
  d = Tg(c, b, d);
  N(a, Pg.sampleRate, "i32");
  return d;
}, godot_audio_is_available:Yg, godot_audio_resume:function() {
  Pg && "running" !== Pg.state && Pg.resume();
}, godot_audio_worklet_create:function(a) {
  try {
    Zg.create(a);
  } catch (b) {
    return V("Error starting AudioDriverWorklet", b), 1;
  }
  return 0;
}, godot_audio_worklet_start:function(a, b, c, d, e) {
  c = ug(sa(), c, d);
  a = ug(sa(), a, b);
  e = ug(n(), e, 4);
  Zg.start(a, c, e);
}, godot_audio_worklet_state_add:function(a, b, c) {
  return Atomics.add(n(), (a >> 2) + b, c);
}, godot_audio_worklet_state_get:function(a, b) {
  return Atomics.load(n(), (a >> 2) + b);
}, godot_audio_worklet_state_wait:function(a, b, c, d) {
  Atomics.wait(n(), (a >> 2) + b, c, d);
  return Atomics.load(n(), (a >> 2) + b);
}, godot_js_config_canvas_id_get:function(a, b) {
  Za(`#${X.id}`, h(), a, b);
}, godot_js_config_locale_get:function(a, b) {
  Za(zg, h(), a, b);
}, godot_js_display_alert:function(a) {
  window.alert(A(a));
}, godot_js_display_canvas_focus:function() {
  X.focus();
}, godot_js_display_canvas_is_focused:function() {
  return document.activeElement === X;
}, godot_js_display_clipboard_get:function(a) {
  const b = U(a);
  try {
    navigator.clipboard.readText().then(function(c) {
      c = W(c);
      b(c);
      T(c);
    }).catch(function() {
    });
  } catch (c) {
  }
}, godot_js_display_clipboard_set:function(a) {
  a = A(a);
  if (!navigator.clipboard || !navigator.clipboard.writeText) {
    return 1;
  }
  navigator.clipboard.writeText(a).catch(function(b) {
    V("Setting OS clipboard is only possible from an input callback for the Web plafrom. Exception:", b);
  });
  return 0;
}, godot_js_display_cursor_is_hidden:function() {
  return !ah;
}, godot_js_display_cursor_is_locked:function() {
  return document.pointerLockElement === X ? 1 : 0;
}, godot_js_display_cursor_lock_set:function(a) {
  a ? (a = X, a.requestPointerLock && a.requestPointerLock()) : document.exitPointerLock && document.exitPointerLock();
}, godot_js_display_cursor_set_custom_shape:function(a, b, c, d, e) {
  a = A(a);
  const f = bh[a];
  0 < c ? (b = new Blob([vg(ia(), b, c)], {type:"image/png"}), b = URL.createObjectURL(b), bh[a] = {url:b, x:d, y:e}) : delete bh[a];
  a === $g && ch($g);
  f && URL.revokeObjectURL(f.url);
}, godot_js_display_cursor_set_shape:function(a) {
  ch(A(a));
}, godot_js_display_cursor_set_visible:function(a) {
  a = 0 !== a;
  a !== ah && ((ah = a) ? ch($g) : X.style.cursor = "none");
}, godot_js_display_desired_size_set:function(a, b) {
  hh = [a, b];
  oh();
}, godot_js_display_fullscreen_cb:function(a) {
  function b(e) {
    e.target === c && d(jh());
  }
  const c = X, d = U(a);
  Y(document, "fullscreenchange", b, !1);
  Y(document, "mozfullscreenchange", b, !1);
  Y(document, "webkitfullscreenchange", b, !1);
}, godot_js_display_fullscreen_exit:function() {
  return lh();
}, godot_js_display_fullscreen_request:function() {
  return kh();
}, godot_js_display_has_webgl:function(a) {
  if (1 !== a && 2 !== a) {
    return !1;
  }
  try {
    return !!document.createElement("canvas").getContext(2 === a ? "webgl2" : "webgl");
  } catch (b) {
  }
  return !1;
}, godot_js_display_is_swap_ok_cancel:function() {
  return -1 !== ["Windows", "Win64", "Win32", "WinCE"].indexOf(navigator.platform || "") ? 1 : 0;
}, godot_js_display_notification_cb:function(a, b, c, d, e) {
  const f = X, g = U(a), k = [b, c, d, e];
  ["mouseover", "mouseleave", "focus", "blur"].forEach(function(l, p) {
    Y(f, l, function() {
      g(k[p]);
    }, !0);
  });
}, godot_js_display_pixel_ratio_get:function() {
  return ih ? window.devicePixelRatio || 1 : 1;
}, godot_js_display_screen_dpi_get:function() {
  const a = Math.round(96 * window.devicePixelRatio);
  return 96 <= a ? a : 96;
}, godot_js_display_screen_size_get:function(a, b) {
  const c = ih ? window.devicePixelRatio || 1 : 1;
  N(a, window.screen.width * c, "i32");
  N(b, window.screen.height * c, "i32");
}, godot_js_display_setup_canvas:function(a, b, c, d) {
  const e = X;
  Y(e, "contextmenu", function(f) {
    f.preventDefault();
  }, !1);
  Y(e, "webglcontextlost", function(f) {
    alert("WebGL context lost, please reload the page");
    f.preventDefault();
  }, !1);
  ih = !!d;
  switch(Ag) {
    case 0:
      hh = [e.width, e.height];
      break;
    case 1:
      hh = [a, b];
      break;
    default:
      e.style.position = "absolute", e.style.top = 0, e.style.left = 0;
  }
  oh();
  c && kh();
}, godot_js_display_size_update:function() {
  const a = oh();
  a && sh();
  return a;
}, godot_js_display_touchscreen_is_available:function() {
  return "ontouchstart" in window;
}, godot_js_display_tts_available:function() {
  return "speechSynthesis" in window;
}, godot_js_display_vk_available:function() {
  return Bg && "ontouchstart" in window;
}, godot_js_display_vk_cb:function(a) {
  a = U(a);
  Bg && "ontouchstart" in window && rh(a);
}, godot_js_display_vk_hide:function() {
  th();
}, godot_js_display_vk_show:function(a, b, c, d) {
  a = A(a);
  c = 0 < c ? c : 0;
  d = 0 < d ? d : c;
  if (ph && qh) {
    "" === ph.style.display && "" === qh.style.display || th();
    sh();
    var e = ph;
    switch(b) {
      case 0:
        e.type = "text";
        e.Y = "";
        break;
      case 1:
        e = qh;
        break;
      case 2:
        e.type = "text";
        e.Y = "numeric";
        break;
      case 3:
        e.type = "text";
        e.Y = "decimal";
        break;
      case 4:
        e.type = "tel";
        e.Y = "";
        break;
      case 5:
        e.type = "email";
        e.Y = "";
        break;
      case 6:
        e.type = "password";
        e.Y = "";
        break;
      case 7:
        e.type = "url";
        e.Y = "";
        break;
      default:
        e.type = "text", e.Y = "";
    }
    e.Hb = !1;
    e.disabled = !1;
    e.value = a;
    e.style.display = "block";
    e.focus();
    e.setSelectionRange(c, d);
  }
}, godot_js_display_window_blur_cb:function(a) {
  const b = U(a);
  Y(window, "blur", function() {
    b();
  }, !1);
}, godot_js_display_window_icon_set:function(a, b) {
  let c = document.getElementById("-gd-engine-icon");
  null === c && (c = document.createElement("link"), c.rel = "icon", c.id = "-gd-engine-icon", document.head.appendChild(c));
  const d = uh;
  a = new Blob([vg(ia(), a, b)], {type:"image/png"});
  uh = URL.createObjectURL(a);
  c.href = uh;
  d && URL.revokeObjectURL(d);
}, godot_js_display_window_size_get:function(a, b) {
  N(a, X.width, "i32");
  N(b, X.height, "i32");
}, godot_js_display_window_title_set:function(a) {
  document.title = A(a);
}, godot_js_eval:function(a, b, c, d, e, f) {
  b = A(a);
  a = null;
  try {
    a = (0,eval)(b);
  } catch (g) {
    V(g);
  }
  switch(typeof a) {
    case "boolean":
      return N(c, a, "i32"), 1;
    case "number":
      return N(c, a, "double"), 3;
    case "string":
      return tg(c, W(a)), 4;
    case "object":
      if (null !== a && (!ArrayBuffer.isView(a) || a instanceof Uint8Array ? a instanceof ArrayBuffer && (a = new Uint8Array(a)) : a = new Uint8Array(a.buffer), a instanceof Uint8Array)) {
        return c = U(f)(d, e, a.length), ia().set(a, c), 20;
      }
  }
  return 0;
}, godot_js_fetch_body_length_get:function(a) {
  return (a = Z[a]) && a.response ? a.Zb : -1;
}, godot_js_fetch_create:function(a, b, c, d, e, f) {
  a = A(a);
  b = A(b);
  c = wg(c, d);
  e = f ? vg(h(), e, f) : null;
  return Bh(a, b, c.map(function(g) {
    const k = g.indexOf(":");
    return 0 >= k ? [] : [g.slice(0, k).trim(), g.slice(k + 1).trim()];
  }).filter(function(g) {
    return 2 === g.length;
  }), e);
}, godot_js_fetch_free:function(a) {
  Ch(a);
}, godot_js_fetch_http_status_get:function(a) {
  return (a = Z[a]) && a.response ? a.status : 0;
}, godot_js_fetch_is_chunked:function(a) {
  return (a = Z[a]) && a.response ? a.ac ? 1 : 0 : -1;
}, godot_js_fetch_read_chunk:function(a, b, c) {
  const d = Z[a];
  if (!d || !d.response) {
    return 0;
  }
  let e = c;
  const f = d.Sa;
  for (; e && f.length;) {
    const l = d.Sa[0];
    if (l.length > e) {
      var g = h(), k = l.slice(0, e);
      g.set(k, b / k.BYTES_PER_ELEMENT);
      f[0] = l.slice(e);
      e = 0;
    } else {
      h().set(l, b / l.BYTES_PER_ELEMENT), e -= l.length, f.pop();
    }
  }
  f.length || (b = Z[a]) && b.sa && !b.ab && (b.done ? b.sa = null : (b.ab = !0, b.sa.read().then(yh.bind(null, a)).catch(Ah.bind(null, a))));
  return c - e;
}, godot_js_fetch_read_headers:function(a, b, c) {
  a = Z[a];
  if (!a || !a.response) {
    return 1;
  }
  b = U(b);
  const d = [];
  a.response.headers.forEach(function(e, f) {
    d.push(`${f}:${e}`);
  });
  a = xg(d);
  b(d.length, a, c);
  yg(a, d.length);
  return 0;
}, godot_js_fetch_state_get:function(a) {
  a = Z[a];
  return !a || a.error ? -1 : a.response ? a.sa ? 1 : a.done ? 2 : -1 : 0;
}, godot_js_input_drop_files_cb:function(a) {
  const b = U(a);
  a = X;
  Y(a, "dragover", function(c) {
    c.preventDefault();
  }, !1);
  Y(a, "drop", Oh(function(c) {
    var d = c || [];
    d.length && (c = d.length, d = xg(d), b(d, c), yg(d, c));
  }));
}, godot_js_input_gamepad_cb:function(a) {
  a = U(a);
  Fh(a);
}, godot_js_input_gamepad_sample:function() {
  const a = Eh(), b = [];
  for (let d = 0; d < a.length; d++) {
    const e = a[d];
    if (!e) {
      b.push(null);
      continue;
    }
    const f = {Sc:"standard" === e.mapping, buttons:[], axes:[], connected:e.connected};
    for (var c = 0; c < e.buttons.length; c++) {
      f.buttons.push(e.buttons[c].value);
    }
    for (c = 0; c < e.axes.length; c++) {
      f.axes.push(e.axes[c]);
    }
    b.push(f);
  }
  Dh = b;
  return 0;
}, godot_js_input_gamepad_sample_count:function() {
  return Dh.length;
}, godot_js_input_gamepad_sample_get:function(a, b, c, d, e, f) {
  var g = Dh;
  a = a < g.length ? g[a] : null;
  if (!a || !a.connected) {
    return 1;
  }
  g = a.buttons;
  const k = 16 > g.length ? g.length : 16;
  for (let l = 0; l < k; l++) {
    N(b + (l << 2), g[l], "float");
  }
  N(c, k, "i32");
  b = a.axes;
  c = 10 > b.length ? b.length : 10;
  for (g = 0; g < c; g++) {
    N(d + (g << 2), b[g], "float");
  }
  N(e, c, "i32");
  N(f, a.Sc ? 1 : 0, "i32");
  return 0;
}, godot_js_input_key_cb:function(a, b, c) {
  function d(f, g) {
    const k = Ph(g);
    Za(g.code, h(), b, 32);
    Za(g.key, h(), c, 32);
    e(f, g.repeat, k);
    g.preventDefault();
  }
  const e = U(a);
  Y(X, "keydown", d.bind(null, 1), !1);
  Y(X, "keyup", d.bind(null, 0), !1);
}, godot_js_input_mouse_button_cb:function(a) {
  function b(e, f) {
    var g = d.getBoundingClientRect();
    g = Qh(f, g);
    const k = Ph(f);
    e && X.focus();
    c(e, f.button, g[0], g[1], k) && f.preventDefault();
  }
  const c = U(a), d = X;
  Y(d, "mousedown", b.bind(null, 1), !1);
  Y(window, "mouseup", b.bind(null, 0), !1);
}, godot_js_input_mouse_move_cb:function(a) {
  const b = U(a), c = X;
  Y(window, "mousemove", function(d) {
    const e = c.getBoundingClientRect(), f = Qh(d, e);
    b(f[0], f[1], c.width / e.width * d.movementX, c.height / e.height * d.movementY, Ph(d));
  }, !1);
}, godot_js_input_mouse_wheel_cb:function(a) {
  const b = U(a);
  Y(X, "wheel", function(c) {
    b(c.deltaX || 0, c.deltaY || 0) && c.preventDefault();
  }, !1);
}, godot_js_input_paste_cb:function(a) {
  const b = U(a);
  Y(window, "paste", function(c) {
    c = c.clipboardData.getData("text");
    c = W(c);
    b(c);
    T(c);
  }, !1);
}, godot_js_input_touch_cb:function(a, b, c) {
  function d(g, k) {
    0 === g && X.focus();
    const l = f.getBoundingClientRect(), p = k.changedTouches;
    for (let u = 0; u < p.length; u++) {
      const z = p[u], D = Qh(z, l);
      N(c + 16 * u, D[0], "double");
      N(c + 8 * (2 * u + 1), D[1], "double");
      N(b + 4 * u, z.identifier, "i32");
    }
    e(g, p.length);
    k.cancelable && k.preventDefault();
  }
  const e = U(a), f = X;
  Y(f, "touchstart", d.bind(null, 0), !1);
  Y(f, "touchend", d.bind(null, 1), !1);
  Y(f, "touchcancel", d.bind(null, 1), !1);
  Y(f, "touchmove", d.bind(null, 2), !1);
}, godot_js_input_vibrate_handheld:function(a) {
  "function" !== typeof navigator.vibrate ? sg("This browser does not support vibration.") : navigator.vibrate(a);
}, godot_js_os_download_buffer:function(a, b, c, d) {
  a = vg(h(), a, b);
  c = A(c);
  d = A(d);
  d = window.URL.createObjectURL(new Blob([a], {type:d}));
  a = document.createElement("a");
  a.href = d;
  a.download = c;
  a.style.display = "none";
  document.body.appendChild(a);
  a.click();
  a.remove();
  window.URL.revokeObjectURL(d);
}, godot_js_os_execute:function(a) {
  a = A(a);
  a = JSON.parse(a);
  return Dg ? (Dg(a), 0) : 1;
}, godot_js_os_finish_async:function(a) {
  a = U(a);
  Og(a);
}, godot_js_os_fs_is_persistent:function() {
  return Fg ? 1 : 0;
}, godot_js_os_fs_sync:function(a) {
  const b = U(a);
  Ng = Jg();
  Ng.then(function() {
    b();
  });
}, godot_js_os_hw_concurrency_get:function() {
  const a = navigator.hardwareConcurrency || 1;
  return 2 > a ? a : 2;
}, godot_js_os_request_quit_cb:function(a) {
  Lg = U(a);
}, godot_js_os_shell_open:function(a) {
  window.open(A(a), "_blank");
}, godot_js_pwa_cb:function(a) {
  "serviceWorker" in navigator && (a = U(a), navigator.serviceWorker.getRegistration().then(Sh.bind(null, a)));
}, godot_js_pwa_update:function() {
  return "serviceWorker" in navigator && Rh ? (navigator.serviceWorker.getRegistration().then(function(a) {
    a && a.waiting && a.waiting.postMessage("update");
  }), 0) : 1;
}, godot_js_rtc_datachannel_close:function(a) {
  Z[a] && Uh(a);
}, godot_js_rtc_datachannel_connect:function(a, b, c, d, e, f) {
  c = U(c).bind(null, b);
  d = U(d).bind(null, b);
  e = U(e).bind(null, b);
  b = U(f).bind(null, b);
  Th(a, c, d, e, b);
}, godot_js_rtc_datachannel_destroy:function(a) {
  Uh(a);
  xh(a);
}, godot_js_rtc_datachannel_get_buffered_amount:function(a) {
  return Vh(a, "bufferedAmount", 0);
}, godot_js_rtc_datachannel_id_get:function(a) {
  return Vh(a, "id", 65535);
}, godot_js_rtc_datachannel_is_negotiated:function(a) {
  return Vh(a, "negotiated", 65535);
}, godot_js_rtc_datachannel_is_ordered:function(a) {
  return Vh(a, "ordered", !0);
}, godot_js_rtc_datachannel_label_get:function(a) {
  return (a = Z[a]) && a.label ? W(a.label) : 0;
}, godot_js_rtc_datachannel_max_packet_lifetime_get:function(a) {
  return (a = Z[a]) ? void 0 !== a.maxPacketLifeTime ? a.maxPacketLifeTime : void 0 !== a.maxRetransmitTime ? a.maxRetransmitTime : 65535 : 65535;
}, godot_js_rtc_datachannel_max_retransmits_get:function(a) {
  return Vh(a, "maxRetransmits", 65535);
}, godot_js_rtc_datachannel_protocol_get:function(a) {
  return (a = Z[a]) && a.protocol ? W(a.protocol) : 0;
}, godot_js_rtc_datachannel_ready_state_get:function(a) {
  a = Z[a];
  if (!a) {
    return 3;
  }
  switch(a.readyState) {
    case "connecting":
      return 0;
    case "open":
      return 1;
    case "closing":
      return 2;
    default:
      return 3;
  }
}, godot_js_rtc_datachannel_send:function(a, b, c, d) {
  a = Z[a];
  if (!a) {
    return 1;
  }
  const e = new Uint8Array(c);
  for (let f = 0; f < c; f++) {
    e[f] = rd(b + f, "i8");
  }
  d ? a.send(e.buffer) : (b = (new TextDecoder("utf-8")).decode(e), a.send(b));
  return 0;
}, godot_js_rtc_pc_close:function(a) {
  (a = Z[a]) && a.close();
}, godot_js_rtc_pc_create:function(a, b, c, d, e, f, g) {
  function k(l) {
    return U(l).bind(null, b);
  }
  return $h(JSON.parse(A(a)), k(c), k(e), k(d), k(f), k(g));
}, godot_js_rtc_pc_datachannel_create:function(a, b, c) {
  try {
    const d = Z[a];
    if (!d) {
      return 0;
    }
    const e = A(b), f = JSON.parse(A(c)), g = d.createDataChannel(e, f);
    return wh(g);
  } catch (d) {
    return V(d), 0;
  }
}, godot_js_rtc_pc_destroy:function(a) {
  const b = Z[a];
  b && (b.onconnectionstatechange = null, b.oniceconnectionstatechange = null, b.onicegatheringstatechange = null, b.onsignalingstatechange = null, b.onicecandidate = null, b.ondatachannel = null, xh(a));
}, godot_js_rtc_pc_ice_candidate_add:function(a, b, c, d) {
  if (a = Z[a]) {
    b = A(b), d = A(d), a.addIceCandidate(new RTCIceCandidate({candidate:d, sdpMid:b, sdpMlineIndex:c}));
  }
}, godot_js_rtc_pc_local_description_set:function(a, b, c, d, e) {
  const f = Z[a];
  if (f) {
    b = A(b);
    c = A(c);
    var g = U(e).bind(null, d);
    f.setLocalDescription({sdp:c, type:b}).catch(function(k) {
      Z[a] && (V(k), g());
    });
  }
}, godot_js_rtc_pc_offer_create:function(a, b, c, d) {
  const e = Z[a];
  if (e) {
    var f = U(c).bind(null, b), g = U(d).bind(null, b);
    e.createOffer().then(function(k) {
      ai(a, f, k);
    }).catch(function(k) {
      Z[a] && (V(k), g());
    });
  }
}, godot_js_rtc_pc_remote_description_set:function(a, b, c, d, e, f) {
  const g = Z[a];
  if (g) {
    var k = A(b);
    b = A(c);
    var l = U(f).bind(null, d), p = U(e).bind(null, d);
    g.setRemoteDescription({sdp:b, type:k}).then(function() {
      return "offer" !== k ? Promise.resolve() : g.createAnswer().then(function(u) {
        ai(a, p, u);
      });
    }).catch(function(u) {
      Z[a] && (V(u), l());
    });
  }
}, godot_js_tts_get_voices:function(a) {
  a = U(a);
  try {
    const b = [], c = window.speechSynthesis.getVoices();
    for (let e = 0; e < c.length; e++) {
      b.push(`${c[e].lang};${c[e].name}`);
    }
    const d = xg(b);
    a(b.length, d);
    yg(d, b.length);
  } catch (b) {
  }
}, godot_js_tts_is_paused:function() {
  return window.speechSynthesis.paused;
}, godot_js_tts_is_speaking:function() {
  return window.speechSynthesis.T;
}, godot_js_tts_pause:function() {
  window.speechSynthesis.pause();
}, godot_js_tts_resume:function() {
  window.speechSynthesis.resume();
}, godot_js_tts_speak:function(a, b, c, d, e, f, g) {
  g = U(g);
  a = new SpeechSynthesisUtterance(A(a));
  a.rate = e;
  a.pitch = d;
  a.volume = c / 100;
  a.addEventListener("end", function(k) {
    k.currentTarget.wa(1, k.currentTarget.id, 0);
  });
  a.addEventListener("start", function(k) {
    k.currentTarget.wa(0, k.currentTarget.id, 0);
  });
  a.addEventListener("error", function(k) {
    k.currentTarget.wa(2, k.currentTarget.id, 0);
  });
  a.addEventListener("boundary", function(k) {
    k.currentTarget.wa(3, k.currentTarget.id, k.hd);
  });
  a.id = f;
  a.wa = g;
  b = A(b);
  c = window.speechSynthesis.getVoices();
  for (d = 0; d < c.length; d++) {
    if (c[d].name === b) {
      a.voice = c[d];
      break;
    }
  }
  window.speechSynthesis.resume();
  window.speechSynthesis.speak(a);
}, godot_js_tts_stop:function() {
  window.speechSynthesis.cancel();
  window.speechSynthesis.resume();
}, godot_js_websocket_buffered_amount:function(a) {
  return (a = Z[a]) ? a.bufferedAmount : 0;
}, godot_js_websocket_close:function(a, b, c) {
  c = A(c);
  fi(a, b, c);
}, godot_js_websocket_create:function(a, b, c, d, e, f, g) {
  d = U(d).bind(null, a);
  e = U(e).bind(null, a);
  f = U(f).bind(null, a);
  a = U(g).bind(null, a);
  b = A(b);
  c = A(c);
  g = null;
  try {
    g = c ? new WebSocket(b, c.split(",")) : new WebSocket(b);
  } catch (k) {
    return 0;
  }
  g.binaryType = "arraybuffer";
  c = g;
  b = wh(c);
  c.onopen = bi.bind(null, b, d);
  c.onmessage = ci.bind(null, b, e);
  c.onerror = di.bind(null, b, f);
  c.onclose = ei.bind(null, b, a);
  return b;
}, godot_js_websocket_destroy:function(a) {
  const b = Z[a];
  b && (fi(a, 3001, "destroyed"), xh(a), b.onopen = null, b.onmessage = null, b.onerror = null, b.onclose = null);
}, godot_js_websocket_send:function(a, b, c, d) {
  const e = new Uint8Array(c);
  let f;
  for (f = 0; f < c; f++) {
    e[f] = rd(b + f, "i8");
  }
  b = e.buffer;
  d || (b = (new TextDecoder("utf-8")).decode(e));
  (a = Z[a]) && a.readyState === a.OPEN ? (a.send(b), a = 0) : a = 1;
  return a;
}, godot_js_wrapper_create_cb:function(a, b) {
  const c = U(b);
  let d = 0;
  return d = ji(function() {
    if (ki(d)) {
      hi = null;
      var e = Array.from(arguments);
      c(a, ji(e), e.length);
      e = hi;
      hi = null;
      return e;
    }
  });
}, godot_js_wrapper_create_object:function(a, b, c, d, e, f, g) {
  a = A(a);
  if ("undefined" === typeof window[a]) {
    return -1;
  }
  d = U(d);
  g = U(g);
  const k = Array(c);
  for (let l = 0; l < c; l++) {
    const p = d(b, l, e, f), u = rd(f, "*");
    k[l] = li(p, e);
    u && g(f, p);
  }
  try {
    const l = new window[a](...k);
    return mi(l, e);
  } catch (l) {
    return V(`Error calling constructor ${a} with args:`, k, "error:", l), -1;
  }
}, godot_js_wrapper_interface_get:function(a) {
  a = A(a);
  return "undefined" !== typeof window[a] ? ji(window[a]) : 0;
}, godot_js_wrapper_object_call:function(a, b, c, d, e, f, g, k) {
  a = ki(a);
  if (void 0 === a) {
    return -1;
  }
  b = A(b);
  e = U(e);
  k = U(k);
  const l = Array(d);
  for (let p = 0; p < d; p++) {
    const u = e(c, p, f, g), z = rd(g, "*");
    l[p] = li(u, f);
    z && k(g, u);
  }
  try {
    const p = a[b](...l);
    return mi(p, f);
  } catch (p) {
    return V(`Error calling method ${b} on:`, a, "error:", p), -1;
  }
}, godot_js_wrapper_object_get:function(a, b, c) {
  a = ki(a);
  if (void 0 === a) {
    return 0;
  }
  if (c) {
    c = A(c);
    try {
      return mi(a[c], b);
    } catch (d) {
      return V(`Error getting variable ${c} on object`, a), 0;
    }
  }
  return mi(a, b);
}, godot_js_wrapper_object_getvar:function(a, b, c) {
  a = ki(a);
  if (void 0 === a) {
    return -1;
  }
  b = li(b, c);
  if (void 0 === b || null === b) {
    return -1;
  }
  try {
    return mi(a[b], c);
  } catch (d) {
    return V(`Error getting variable ${b} on object`, a, d), -1;
  }
}, godot_js_wrapper_object_set:function(a, b, c, d) {
  a = ki(a);
  if (void 0 !== a) {
    b = A(b);
    try {
      a[b] = li(c, d);
    } catch (e) {
      V(`Error setting variable ${b} on object`, a);
    }
  }
}, godot_js_wrapper_object_set_cb_ret:function(a, b) {
  hi = li(a, b);
}, godot_js_wrapper_object_setvar:function(a, b, c, d, e) {
  a = ki(a);
  if (void 0 === a) {
    return -1;
  }
  b = li(b, c);
  try {
    return a[b] = li(d, e), 0;
  } catch (f) {
    return V(`Error setting variable ${b} on object`, a), -1;
  }
}, godot_js_wrapper_object_unref:function(a) {
  a = Z[a];
  void 0 !== a && a.cd();
}, godot_webgl2_glFramebufferTextureMultiviewOVR:ni, godot_webxr_commit:yi, godot_webxr_get_bounds_geometry:zi, godot_webxr_get_controller_axes:Ai, godot_webxr_get_controller_buttons:Bi, godot_webxr_get_controller_count:Ci, godot_webxr_get_controller_transform:Di, godot_webxr_get_projection_for_eye:Ei, godot_webxr_get_render_target_size:Fi, godot_webxr_get_transform_for_eye:Gi, godot_webxr_get_view_count:Hi, godot_webxr_get_visibility_state:Ii, godot_webxr_initialize:Ji, godot_webxr_is_controller_connected:Ki, 
godot_webxr_is_session_supported:Li, godot_webxr_is_supported:Mi, godot_webxr_sample_controller_data:Ni, godot_webxr_uninitialize:Oi, invoke_ii:Zi, invoke_iii:$i, invoke_iiii:aj, invoke_iiiii:bj, invoke_iiiiiii:cj, invoke_vi:dj, invoke_vii:ej, invoke_viii:fj, invoke_viiii:gj, invoke_viiiiiii:hj, memory:m || t.wasmMemory, setTempRet0:function(a) {
  Ra = a;
}, strftime:Si, strftime_l:function(a, b, c, d) {
  return Si(a, b, c, d);
}};
(function() {
  function a(f, g) {
    t.asm = f.exports;
    G.Na.push(t.asm._emscripten_tls_init);
    cb = t.asm.__indirect_function_table;
    w(cb, "table not found in wasm exports");
    jb.unshift(t.asm.__wasm_call_ctors);
    Ta = g;
    if (!v) {
      var k = G.O.length;
      G.O.forEach(function(l) {
        G.Ab(l, function() {
          if (!--k && (Cb--, t.monitorRunDependencies && t.monitorRunDependencies(Cb), w(Fb["wasm-instantiate"]), delete Fb["wasm-instantiate"], 0 == Cb && (null !== Db && (clearInterval(Db), Db = null), Eb))) {
            var p = Eb;
            Eb = null;
            p();
          }
        });
      });
    }
  }
  function b(f) {
    w(t === e, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
    e = null;
    a(f.instance, f.module);
  }
  function c(f) {
    return Kb().then(function(g) {
      return WebAssembly.instantiate(g, d);
    }).then(function(g) {
      return g;
    }).then(f, function(g) {
      y("failed to asynchronously prepare wasm: " + g);
      Ib.startsWith("file://") && y("warning: Loading from a file URI (" + Ib + ") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing");
      Aa(g);
    });
  }
  var d = {env:ij, wasi_snapshot_preview1:ij};
  v || Gb();
  var e = t;
  if (t.instantiateWasm) {
    try {
      return t.instantiateWasm(d, a);
    } catch (f) {
      return y("Module.instantiateWasm callback failed with error: " + f), !1;
    }
  }
  (function() {
    return Sa || "function" != typeof WebAssembly.instantiateStreaming || Hb() || "function" != typeof fetch ? c(b) : fetch(Ib, {credentials:"same-origin"}).then(function(f) {
      return WebAssembly.instantiateStreaming(f, d).then(b, function(g) {
        y("wasm streaming compile failed: " + g);
        y("falling back to ArrayBuffer instantiation");
        return c(b);
      });
    });
  })().catch(za);
  return {};
})();
t.___wasm_call_ctors = B("__wasm_call_ctors");
t._emscripten_webgl_make_context_current = B("emscripten_webgl_make_context_current");
t._emscripten_webgl_commit_frame = B("emscripten_webgl_commit_frame");
var T = t._free = B("free");
t.__Z14godot_web_mainiPPc = B("_Z14godot_web_mainiPPc");
t._main = B("__main_argc_argv");
var ue = t._malloc = B("malloc"), rg = t._htonl = B("htonl"), Ed = t._htons = B("htons"), Nd = t._ntohs = B("ntohs"), hd = t._fflush = B("fflush"), Wd = t.___errno_location = B("__errno_location");
t.__emwebxr_on_input_event = B("_emwebxr_on_input_event");
t.__emwebxr_on_simple_event = B("_emwebxr_on_simple_event");
var ld = t._pthread_self = B("pthread_self");
t.__emscripten_tls_init = B("_emscripten_tls_init");
var nh = t._emscripten_webgl_get_current_context = B("emscripten_webgl_get_current_context");
t._emscripten_dispatch_to_thread_ = B("emscripten_dispatch_to_thread_");
var gd = t.___funcs_on_exit = B("__funcs_on_exit");
t.___dl_seterr = B("__dl_seterr");
var Yi = t.__emscripten_thread_init = B("_emscripten_thread_init");
t.__emscripten_thread_crashed = B("_emscripten_thread_crashed");
t._emscripten_main_thread_process_queued_calls = B("emscripten_main_thread_process_queued_calls");
t._raise = B("raise");
t._emscripten_main_browser_thread_id = B("emscripten_main_browser_thread_id");
var Xf = t._emscripten_run_in_main_runtime_thread_js = B("emscripten_run_in_main_runtime_thread_js");
t._emscripten_stack_get_base = function() {
  return (t._emscripten_stack_get_base = t.asm.emscripten_stack_get_base).apply(null, arguments);
};
var eb = t._emscripten_stack_get_end = function() {
  return (eb = t._emscripten_stack_get_end = t.asm.emscripten_stack_get_end).apply(null, arguments);
}, re = t.__emscripten_proxy_execute_task_queue = B("_emscripten_proxy_execute_task_queue"), kd = t.__emscripten_thread_free_data = B("_emscripten_thread_free_data"), ud = t.__emscripten_thread_exit = B("_emscripten_thread_exit"), jj = t._setThrew = B("setThrew");
t._saveSetjmp = B("saveSetjmp");
var kj = t._emscripten_stack_init = function() {
  return (kj = t._emscripten_stack_init = t.asm.emscripten_stack_init).apply(null, arguments);
}, qd = t._emscripten_stack_set_limits = function() {
  return (qd = t._emscripten_stack_set_limits = t.asm.emscripten_stack_set_limits).apply(null, arguments);
};
t._emscripten_stack_get_free = function() {
  return (t._emscripten_stack_get_free = t.asm.emscripten_stack_get_free).apply(null, arguments);
};
var od = t.stackSave = B("stackSave"), pd = t.stackRestore = B("stackRestore"), Wf = t.stackAlloc = B("stackAlloc");
t.___cxa_is_pointer_type = B("__cxa_is_pointer_type");
t.dynCall_vij = B("dynCall_vij");
t.dynCall_ji = B("dynCall_ji");
t.dynCall_viiij = B("dynCall_viiij");
t.dynCall_jiiii = B("dynCall_jiiii");
t.dynCall_viiiiifiijii = B("dynCall_viiiiifiijii");
t.dynCall_viiiiifiiijjii = B("dynCall_viiiiifiiijjii");
t.dynCall_viiiiifiiijii = B("dynCall_viiiiifiiijii");
t.dynCall_viiiiifiiiijjii = B("dynCall_viiiiifiiiijjii");
t.dynCall_jii = B("dynCall_jii");
t.dynCall_viij = B("dynCall_viij");
t.dynCall_viiiij = B("dynCall_viiiij");
t.dynCall_viiiiijj = B("dynCall_viiiiijj");
t.dynCall_viiiijii = B("dynCall_viiiijii");
t.dynCall_viji = B("dynCall_viji");
t.dynCall_vijii = B("dynCall_vijii");
t.dynCall_vijiii = B("dynCall_vijiii");
t.dynCall_vijiiii = B("dynCall_vijiiii");
t.dynCall_iij = B("dynCall_iij");
t.dynCall_viiijii = B("dynCall_viiijii");
t.dynCall_vijiiiiiidddd = B("dynCall_vijiiiiiidddd");
t.dynCall_jij = B("dynCall_jij");
t.dynCall_jiij = B("dynCall_jiij");
t.dynCall_jiijiiii = B("dynCall_jiijiiii");
t.dynCall_jiii = B("dynCall_jiii");
t.dynCall_jiiji = B("dynCall_jiiji");
t.dynCall_jiiiji = B("dynCall_jiiiji");
t.dynCall_iijiiii = B("dynCall_iijiiii");
t.dynCall_jijjjiiiiiiii = B("dynCall_jijjjiiiiiiii");
t.dynCall_jiji = B("dynCall_jiji");
t.dynCall_viijiiiiiifiii = B("dynCall_viijiiiiiifiii");
t.dynCall_jiiiiiii = B("dynCall_jiiiiiii");
t.dynCall_viiji = B("dynCall_viiji");
t.dynCall_vijj = B("dynCall_vijj");
t.dynCall_vijf = B("dynCall_vijf");
t.dynCall_vijji = B("dynCall_vijji");
t.dynCall_vijjii = B("dynCall_vijjii");
t.dynCall_fij = B("dynCall_fij");
t.dynCall_vijiffifff = B("dynCall_vijiffifff");
t.dynCall_vijff = B("dynCall_vijff");
t.dynCall_vijiffff = B("dynCall_vijiffff");
t.dynCall_vijjf = B("dynCall_vijjf");
t.dynCall_vijij = B("dynCall_vijij");
t.dynCall_vijif = B("dynCall_vijif");
t.dynCall_vijiiifi = B("dynCall_vijiiifi");
t.dynCall_vijiifi = B("dynCall_vijiifi");
t.dynCall_vijiif = B("dynCall_vijiif");
t.dynCall_vijifi = B("dynCall_vijifi");
t.dynCall_vijijiii = B("dynCall_vijijiii");
t.dynCall_vijijiiii = B("dynCall_vijijiiii");
t.dynCall_vijijiiif = B("dynCall_vijijiiif");
t.dynCall_vijijii = B("dynCall_vijijii");
t.dynCall_vijiijiiiiii = B("dynCall_vijiijiiiiii");
t.dynCall_vijiiijf = B("dynCall_vijiiijf");
t.dynCall_vijiiij = B("dynCall_vijiiij");
t.dynCall_vijiiiiiiji = B("dynCall_vijiiiiiiji");
t.dynCall_vijjj = B("dynCall_vijjj");
t.dynCall_vijdddd = B("dynCall_vijdddd");
t.dynCall_vijififi = B("dynCall_vijififi");
t.dynCall_iiiij = B("dynCall_iiiij");
t.dynCall_iijji = B("dynCall_iijji");
t.dynCall_viijj = B("dynCall_viijj");
t.dynCall_jiiiiii = B("dynCall_jiiiiii");
t.dynCall_viiiiji = B("dynCall_viiiiji");
t.dynCall_dij = B("dynCall_dij");
t.dynCall_vijd = B("dynCall_vijd");
t.dynCall_iiij = B("dynCall_iiij");
t.dynCall_ij = B("dynCall_ij");
t.dynCall_iiiijf = B("dynCall_iiiijf");
t.dynCall_viijiiii = B("dynCall_viijiiii");
t.dynCall_viijiii = B("dynCall_viijiii");
t.dynCall_iiji = B("dynCall_iiji");
t.dynCall_vijiiiii = B("dynCall_vijiiiii");
t.dynCall_viijd = B("dynCall_viijd");
t.dynCall_diij = B("dynCall_diij");
t.dynCall_viiiji = B("dynCall_viiiji");
t.dynCall_viiijj = B("dynCall_viiijj");
t.dynCall_viijji = B("dynCall_viijji");
t.dynCall_jiiij = B("dynCall_jiiij");
t.dynCall_viijii = B("dynCall_viijii");
t.dynCall_jiijjj = B("dynCall_jiijjj");
t.dynCall_viiijiji = B("dynCall_viiijiji");
t.dynCall_viiijjiji = B("dynCall_viiijjiji");
t.dynCall_viijiji = B("dynCall_viijiji");
t.dynCall_iiiiijiii = B("dynCall_iiiiijiii");
t.dynCall_iiiiiij = B("dynCall_iiiiiij");
t.dynCall_jiijj = B("dynCall_jiijj");
t.dynCall_diidj = B("dynCall_diidj");
t.dynCall_viiiijij = B("dynCall_viiiijij");
t.dynCall_viiidjj = B("dynCall_viiidjj");
t.dynCall_viidj = B("dynCall_viidj");
t.dynCall_iiijj = B("dynCall_iiijj");
t.dynCall_jiid = B("dynCall_jiid");
t.dynCall_viiiiddji = B("dynCall_viiiiddji");
t.dynCall_vijiiiiiiiii = B("dynCall_vijiiiiiiiii");
t.dynCall_vijiiiffi = B("dynCall_vijiiiffi");
t.dynCall_vijiiifii = B("dynCall_vijiiifii");
t.dynCall_viijfii = B("dynCall_viijfii");
t.dynCall_viiiiiiiiiiijjjjjjifiiiiii = B("dynCall_viiiiiiiiiiijjjjjjifiiiiii");
t.dynCall_viiiiiji = B("dynCall_viiiiiji");
t.dynCall_vijifff = B("dynCall_vijifff");
t.dynCall_fiji = B("dynCall_fiji");
t.dynCall_vijiiffifffi = B("dynCall_vijiiffifffi");
t.dynCall_iijj = B("dynCall_iijj");
t.dynCall_iijjfj = B("dynCall_iijjfj");
t.dynCall_vijiji = B("dynCall_vijiji");
t.dynCall_jijii = B("dynCall_jijii");
t.dynCall_vijid = B("dynCall_vijid");
t.dynCall_vijiiffiiiii = B("dynCall_vijiiffiiiii");
t.dynCall_vijiiiiii = B("dynCall_vijiiiiii");
t.dynCall_vijiff = B("dynCall_vijiff");
t.dynCall_vijiiiiiii = B("dynCall_vijiiiiiii");
t.dynCall_jiiifi = B("dynCall_jiiifi");
t.dynCall_viiiifijii = B("dynCall_viiiifijii");
t.dynCall_viiiifiijjii = B("dynCall_viiiifiijjii");
t.dynCall_vijiiifiijii = B("dynCall_vijiiifiijii");
t.dynCall_vijiiifiiijjii = B("dynCall_vijiiifiiijjii");
t.dynCall_vijiiifiiijii = B("dynCall_vijiiifiiijii");
t.dynCall_vijiiifiiiijjii = B("dynCall_vijiiifiiiijjii");
t.dynCall_fijiiii = B("dynCall_fijiiii");
t.dynCall_fijiiiii = B("dynCall_fijiiiii");
t.dynCall_iijii = B("dynCall_iijii");
t.dynCall_iijiijiiiii = B("dynCall_iijiijiiiii");
t.dynCall_iijijiiiii = B("dynCall_iijijiiiii");
t.dynCall_vijijj = B("dynCall_vijijj");
t.dynCall_vijiiijj = B("dynCall_vijiiijj");
t.dynCall_vijiijj = B("dynCall_vijiijj");
t.dynCall_vijjiji = B("dynCall_vijjiji");
t.dynCall_vijjiijii = B("dynCall_vijjiijii");
t.dynCall_fijii = B("dynCall_fijii");
t.dynCall_jijj = B("dynCall_jijj");
t.dynCall_jiiif = B("dynCall_jiiif");
t.dynCall_vijfff = B("dynCall_vijfff");
t.dynCall_vijfiff = B("dynCall_vijfiff");
t.dynCall_vijffffi = B("dynCall_vijffffi");
t.dynCall_vijiiffi = B("dynCall_vijiiffi");
t.dynCall_vijiifffffff = B("dynCall_vijiifffffff");
t.dynCall_vijifiifffffifff = B("dynCall_vijifiifffffifff");
t.dynCall_vijiiffffiffffj = B("dynCall_vijiiffffiffffj");
t.dynCall_vijiifff = B("dynCall_vijiifff");
t.dynCall_vijiffffffff = B("dynCall_vijiffffffff");
t.dynCall_vijiifiififff = B("dynCall_vijiifiififff");
t.dynCall_vijifffij = B("dynCall_vijifffij");
t.dynCall_viijjjiifjii = B("dynCall_viijjjiifjii");
t.dynCall_vijjjii = B("dynCall_vijjjii");
t.dynCall_fijj = B("dynCall_fijj");
t.dynCall_iijjiii = B("dynCall_iijjiii");
t.dynCall_iiiiij = B("dynCall_iiiiij");
t.dynCall_iiiiijj = B("dynCall_iiiiijj");
t.dynCall_iiiiiijj = B("dynCall_iiiiiijj");
function ej(a, b, c) {
  var d = od();
  try {
    td(a)(b, c);
  } catch (e) {
    pd(d);
    if (e !== e + 0) {
      throw e;
    }
    jj(1, 0);
  }
}
function dj(a, b) {
  var c = od();
  try {
    td(a)(b);
  } catch (d) {
    pd(c);
    if (d !== d + 0) {
      throw d;
    }
    jj(1, 0);
  }
}
function fj(a, b, c, d) {
  var e = od();
  try {
    td(a)(b, c, d);
  } catch (f) {
    pd(e);
    if (f !== f + 0) {
      throw f;
    }
    jj(1, 0);
  }
}
function Zi(a, b) {
  var c = od();
  try {
    return td(a)(b);
  } catch (d) {
    pd(c);
    if (d !== d + 0) {
      throw d;
    }
    jj(1, 0);
  }
}
function gj(a, b, c, d, e) {
  var f = od();
  try {
    td(a)(b, c, d, e);
  } catch (g) {
    pd(f);
    if (g !== g + 0) {
      throw g;
    }
    jj(1, 0);
  }
}
function $i(a, b, c) {
  var d = od();
  try {
    return td(a)(b, c);
  } catch (e) {
    pd(d);
    if (e !== e + 0) {
      throw e;
    }
    jj(1, 0);
  }
}
function aj(a, b, c, d) {
  var e = od();
  try {
    return td(a)(b, c, d);
  } catch (f) {
    pd(e);
    if (f !== f + 0) {
      throw f;
    }
    jj(1, 0);
  }
}
function bj(a, b, c, d, e) {
  var f = od();
  try {
    return td(a)(b, c, d, e);
  } catch (g) {
    pd(f);
    if (g !== g + 0) {
      throw g;
    }
    jj(1, 0);
  }
}
function hj(a, b, c, d, e, f, g, k) {
  var l = od();
  try {
    td(a)(b, c, d, e, f, g, k);
  } catch (p) {
    pd(l);
    if (p !== p + 0) {
      throw p;
    }
    jj(1, 0);
  }
}
function cj(a, b, c, d, e, f, g) {
  var k = od();
  try {
    return td(a)(b, c, d, e, f, g);
  } catch (l) {
    pd(k);
    if (l !== l + 0) {
      throw l;
    }
    jj(1, 0);
  }
}
t.callMain = lj;
t.keepRuntimeAlive = pb;
t.wasmMemory = m;
t.cwrap = function(a, b, c) {
  return function() {
    return Ui(a, b, c, arguments);
  };
};
t.ExitStatus = Na;
t.PThread = G;
"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 getLEB getFunctionTables alignFunctionTables registerFunctions prettyPrint getCompilerSetting print printErr getTempRet0 setTempRet0 abort stackSave stackRestore stackAlloc GROWABLE_HEAP_I8 GROWABLE_HEAP_U8 GROWABLE_HEAP_I16 GROWABLE_HEAP_U16 GROWABLE_HEAP_I32 GROWABLE_HEAP_U32 GROWABLE_HEAP_F32 GROWABLE_HEAP_F64 writeStackCookie checkStackCookie ptrToString zeroMemory stringToNewUTF8 exitJS getHeapMax emscripten_realloc_buffer ENV ERRNO_CODES ERRNO_MESSAGES setErrNo inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr DNS getHostByName Protocols Sockets getRandomDevice warnOnce traverseStack UNWIND_CACHE convertPCtoSourceLocation readAsmConstArgsArray readAsmConstArgs mainThreadEM_ASM jstoi_q jstoi_s getExecutableName listenOnce autoResumeAudioContext dynCallLegacy getDynCaller dynCall handleException runtimeKeepalivePush runtimeKeepalivePop callUserCallback maybeExit safeSetTimeout asmjsMangle asyncLoad alignMemory mmapAlloc writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertI32PairToI53Checked convertU32PairToI53 getCFunc ccall uleb128Encode sigToWasmTypes convertJsFunctionToWasm freeTableIndexes functionsInTableMap getEmptyTableSlot updateTableMap addFunction removeFunction reallyNegative unSign strLen reSign formatString setValue getValue PATH PATH_FS intArrayFromString intArrayToString AsciiToString stringToAscii UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 allocateUTF8 allocateUTF8OnStack writeStringToMemory writeArrayToMemory writeAsciiToMemory SYSCALLS getSocketFromFD getSocketAddress JSEvents registerKeyEventCallback specialHTMLTargets 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 currentFullscreenStrategy restoreOldWindowedStyle softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData battery registerBatteryEventCallback setCanvasElementSize getCanvasElementSize demangle demangleAll jsStackTrace stackTrace getEnvStrings checkWasiClock doReadv doWritev dlopenMissingError setImmediateWrapped clearImmediateWrapped polyfillSetImmediate uncaughtExceptionCount exceptionLast exceptionCaught ExceptionInfo exception_addRef exception_decRef Browser setMainLoop wget FS MEMFS TTY PIPEFS SOCKFS _setNetworkCallback tempFixedLengthArray miniTempWebGLFloatBuffers heapObjectForWebGLType heapAccessShiftForWebGLHeap GL emscriptenWebGLGet computeUnpackAlignedImageSize emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib writeGLArray AL SDL_unicode SDL_ttfContext SDL_audio SDL SDL_gfx GLUT EGL GLFW_Window GLFW GLEW IDBStore runAndAbortIfError emscriptenWebGLGetIndexed ALLOC_NORMAL ALLOC_STACK allocate killThread cleanupThread registerTLSInit cancelThread spawnThread exitOnMainThread invokeEntryPoint executeNotifiedProxyingQueue GodotWebXR GodotWebSocket GodotRTCDataChannel GodotRTCPeerConnection GodotAudio GodotAudioWorklet GodotAudioScript GodotDisplayVK GodotDisplayCursor GodotDisplayScreen GodotDisplay GodotFetch IDHandler GodotConfig GodotFS GodotOS GodotEventListeners GodotPWA GodotRuntime GodotInputGamepads GodotInputDragDrop GodotInput GodotWebGL2 GodotJSWrapper IDBFS".split(" ").forEach(function(a) {
  Object.getOwnPropertyDescriptor(t, a) || Object.defineProperty(t, a, {configurable:!0, get:function() {
    var b = "'" + a + "' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";
    Qa(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
    Aa(b);
  }});
});
"getHostByName traverseStack convertPCtoSourceLocation readAsmConstArgs mainThreadEM_ASM jstoi_s listenOnce autoResumeAudioContext dynCallLegacy getDynCaller dynCall asmjsMangle writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling convertI32PairToI53 convertU32PairToI53 reallyNegative unSign strLen reSign formatString registerKeyEventCallback 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 checkWasiClock setImmediateWrapped clearImmediateWrapped polyfillSetImmediate exception_addRef exception_decRef _setNetworkCallback emscriptenWebGLGetUniform emscriptenWebGLGetVertexAttrib writeGLArray SDL_unicode SDL_ttfContext SDL_audio GLFW_Window runAndAbortIfError emscriptenWebGLGetIndexed".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";
    Qa(a) && (b += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");
    Ya(b);
  }});
});
var mj;
Eb = function nj() {
  mj || oj();
  mj || (Eb = nj);
};
function lj(a) {
  w(0 == Cb, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
  w(0 == ib.length, "cannot call main when preRun functions remain to be called");
  var b = t._main;
  a = a || [];
  a.unshift(Da);
  var c = a.length, d = Wf(4 * (c + 1)), e = d >> 2;
  a.forEach(g => {
    var k = n(), l = e++, p = ab(g) + 1, u = Wf(p);
    Za(g, h(), u, p);
    k[l] = u;
  });
  n()[e] = 0;
  try {
    var f = b(c, d);
    ed(f, !0);
    return f;
  } catch (g) {
    return jd(g);
  }
}
function oj() {
  function a() {
    if (!mj && (mj = !0, t.calledRun = !0, !Ua)) {
      qb();
      fb();
      v || Ab(kb);
      ya(t);
      if (t.onRuntimeInitialized) {
        t.onRuntimeInitialized();
      }
      pj && lj(b);
      fb();
      if (!v) {
        if (t.postRun) {
          for ("function" == typeof t.postRun && (t.postRun = [t.postRun]); t.postRun.length;) {
            var c = t.postRun.shift();
            mb.unshift(c);
          }
        }
        Ab(mb);
      }
    }
  }
  var b = b || Ca;
  if (!(0 < Cb)) {
    if (v || (w(!v), kj(), db()), v) {
      ya(t), qb(), postMessage({cmd:"loaded"});
    } else {
      w(!v);
      if (t.preRun) {
        for ("function" == typeof t.preRun && (t.preRun = [t.preRun]); t.preRun.length;) {
          Bb();
        }
      }
      Ab(ib);
      0 < Cb || (t.setStatus ? (t.setStatus("Running..."), setTimeout(function() {
        setTimeout(function() {
          t.setStatus("");
        }, 1);
        a();
      }, 1)) : a(), fb());
    }
  }
}
if (t.preInit) {
  for ("function" == typeof t.preInit && (t.preInit = [t.preInit]); 0 < t.preInit.length;) {
    t.preInit.pop()();
  }
}
var pj = !1;
t.noInitialRun && (pj = !1);
oj();



  return Godot.ready
}
);
})();
if (typeof exports === 'object' && typeof module === 'object')
  module.exports = Godot;
else if (typeof define === 'function' && define['amd'])
  define([], function() { return Godot; });
else if (typeof exports === 'object')
  exports["Godot"] = Godot;

function t(c=1){try{return!!document.createElement("canvas").getContext(["webgl","webgl2"][c-1])}catch(l){}return!1}function u(){return"fetch"in window&&"Response"in window&&"body"in window.Response.prototype}function v(){return!0===window.isSecureContext}function w(){return!0===window.crossOriginIsolated}function x(){return"SharedArrayBuffer"in window}function y(){return"AudioContext"in window&&"audioWorklet"in AudioContext.prototype}
function z(){const c=[];t(2)||c.push("WebGL2");u()||c.push("Fetch");v()||c.push("Secure Context");w()||c.push("Cross Origin Isolation");x()||c.push("SharedArrayBuffer");return c};function A(){function c(){let a=0,d=0,m=!0,h=!0;Object.keys(n).forEach(function(e){e=n[e];e.done||(h=!1);m&&0!==e.total?d+=e.total:(m=!1,d=0);a+=e.loaded});if(a!==g||d!==p)g=a,p=d,"function"===typeof f&&f(a,d);h||requestAnimationFrame(c)}function l(a,d){function m(e,q){return e.read().then(function(r){if(d.done)return Promise.resolve();r.value&&(q.enqueue(r.value),d.loaded+=r.value.length);if(!r.done)return m(e,q);d.done=!0;return Promise.resolve()})}const h=a.body.getReader();return new Response(new ReadableStream({start:function(e){m(h,
e).then(function(){e.close()})}}),{headers:a.headers})}function k(a,d,m,h){d[a]={total:m||0,loaded:0,done:!1};return fetch(a).then(function(e){if(!e.ok)return Promise.reject(Error(`Failed loading file '${a}'`));e=l(e,d[a]);return h?Promise.resolve(e):e.arrayBuffer()})}function b(a,d=1){return a().catch(function(m){return 1>=d?Promise.reject(m):new Promise(function(h,e){setTimeout(function(){b(a,d-1).then(h).catch(e)},1E3)})})}const n={};var g=0,p=0;let f=null;this.R=c;this.S=function(a){f=a};this.o=
function(a,d,m=!1){return b(k.bind(null,a,n,d,m),4)};this.i=[];this.B=function(a,d,m){let h=null;if("string"===typeof a){const e=this;return this.o(a,m).then(function(q){e.i.push({path:d||a,buffer:q});return Promise.resolve()})}a instanceof ArrayBuffer?h=new Uint8Array(a):ArrayBuffer.isView(a)&&(h=new Uint8Array(a.buffer));return h?(this.i.push({path:d,buffer:a}),Promise.resolve()):Promise.reject(Error("Invalid object for preloading"))}};function B(c){function l(k){this.update(k)}l.prototype={M:!0,canvas:null,l:"",D:null,locale:null,s:2,j:[],v:!0,u:!1,serviceWorker:"",L:["/userfs"],K:!1,A:[],m:[],F:null,G:null,J:null,H:function(){console.log.apply(console,Array.from(arguments))},I:function(k){console.error.apply(console,Array.from(arguments))}};l.prototype.update=function(k){function b(g,p){return"undefined"===typeof n[g]?p:n[g]}const n=k||{};this.M=b("unloadAfterInit",this.M);this.I=b("onPrintError",this.I);this.H=b("onPrint",this.H);
this.J=b("onProgress",this.J);this.canvas=b("canvas",this.canvas);this.l=b("executable",this.l);this.D=b("mainPack",this.D);this.locale=b("locale",this.locale);this.s=b("canvasResizePolicy",this.s);this.L=b("persistentPaths",this.L);this.K=b("persistentDrops",this.K);this.u=b("experimentalVK",this.u);this.v=b("focusCanvas",this.v);this.serviceWorker=b("serviceWorker",this.serviceWorker);this.A=b("gdnativeLibs",this.A);this.m=b("fileSizes",this.m);this.j=b("args",this.j);this.F=b("onExecute",this.F);
this.G=b("onExit",this.G)};l.prototype.P=function(k,b){let n=b;return{print:this.H,printErr:this.I,thisProgram:this.l,noExitRuntime:!0,dynamicLibraries:[`${k}.side.wasm`],instantiateWasm:function(g,p){function f(a){p(a.instance,a.module)}"undefined"!==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(Promise.resolve(n),g).then(f):n.arrayBuffer().then(function(a){WebAssembly.instantiate(a,g).then(f)});n=null;return{}},locateFile:function(g){return g.endsWith(".worker.js")?`${k}.worker.js`:
g.endsWith(".audio.worklet.js")?`${k}.audio.worklet.js`:g.endsWith(".js")?`${k}.js`:g.endsWith(".side.wasm")?`${k}.side.wasm`:g.endsWith(".wasm")?`${k}.wasm`:g}}};l.prototype.O=function(k){if(!(this.canvas instanceof HTMLCanvasElement)){var b=document.getElementsByTagName("canvas");b.length&&b[0]instanceof HTMLCanvasElement&&(this.canvas=b[0]);if(!this.canvas)throw Error("No canvas found in page");}0>this.canvas.tabIndex&&(this.canvas.tabIndex=0);b=this.locale;b||(b=navigator.languages?navigator.languages[0]:
navigator.language,b=b.split(".")[0]);b=b.replace("-","_");const n=this.G;return{canvas:this.canvas,canvasResizePolicy:this.s,locale:b,persistentDrops:this.K,virtualKeyboard:this.u,focusCanvas:this.v,onExecute:this.F,onExit:function(g){k();"function"===typeof n&&n(g)}}};return new l(c)};const C=function(){function c(p){this.g=new B(p);this.h=null}function l(p){c.prototype={C:function(f){if(g)return g;if(null==b){if(!f)return g=Promise.reject(Error("A base path must be provided when calling `init` and the engine is not loaded."));c.load(f,this.g.m[`${f}.wasm`])}const a=this;k.S(this.g.J);return g=function(d){return new Promise(function(m){d.then(function(h){h=new Response(h.clone().body,{headers:[["content-type","application/wasm"]]});Godot(a.g.P(n,h)).then(function(e){e.initFS(a.g.L).then(function(){a.h=
e;a.g.M&&c.i();m()})})})})}(b)},N:function(f,a){return k.B(f,a,this.g.m[f])},start:function(f){this.g.update(f);const a=this;return a.C().then(function(){if(!a.h)return Promise.reject(Error("The engine must be initialized before it can be started"));let d={};try{d=a.g.O(function(){a.h=null})}catch(h){return Promise.reject(h)}a.h.initConfig(d);const m=[];a.g.A.forEach(function(h){m.push(a.h.loadDynamicLibrary(h,{loadAsync:!0}))});return Promise.all(m).then(function(){return new Promise(function(h){k.i.forEach(function(e){a.h.copyToFS(e.path,
e.buffer)});k.i.length=0;a.h.callMain(a.g.j);g=null;a.g.serviceWorker&&"serviceWorker"in navigator&&navigator.serviceWorker.register(a.g.serviceWorker);h()})})})},B:function(f){this.g.update(f);f=this.g.l;const a=this.g.D||`${f}.pck`;this.g.j=["--main-pack",a].concat(this.g.j);const d=this;return Promise.all([this.C(f),this.N(a,a)]).then(function(){return d.start.apply(d)})},i:function(f,a){if(null==this.h)throw Error("Engine must be inited before copying files");this.h.copyToFS(f,a)},o:function(){this.h&&
this.h.request_quit()}};c.prototype.init=c.prototype.C;c.prototype.preloadFile=c.prototype.N;c.prototype.start=c.prototype.start;c.prototype.startGame=c.prototype.B;c.prototype.copyToFS=c.prototype.i;c.prototype.requestQuit=c.prototype.o;c.prototype.load=c.load;c.prototype.unload=c.i;return new c(p)}const k=new A;let b=null,n="",g=null;c.load=function(p,f){null==b&&(n=p,b=k.o(`${n}.wasm`,f,!0),requestAnimationFrame(k.R));return b};c.i=function(){b=null};l.load=c.load;l.unload=c.i;l.isWebGLAvailable=
t;l.isFetchAvailable=u;l.isSecureContext=v;l.isCrossOriginIsolated=w;l.isSharedArrayBufferAvailable=x;l.isAudioWorkletAvailable=y;l.getMissingFeatures=z;return l}();"undefined"!==typeof window&&(window.Engine=C);
