Skip to main content

RUNTIME_JS

Constant RUNTIME_JS 

Source
pub const RUNTIME_JS: &str = "let wasm_bindgen = (function(exports) {\n    let script_src;\n    if (typeof document !== \'undefined\' && document.currentScript !== null) {\n        script_src = new URL(document.currentScript.src, location.href).toString();\n    }\n\n    /**\n     * Output of [`verify_and_extract_actr_package`].\n     *\n     * Kept as an opaque handle exposed to JS via getters. Avoids round-tripping\n     * binary bytes through JSON.\n     */\n    class ExtractedPackage {\n        static __wrap(ptr) {\n            ptr = ptr >>> 0;\n            const obj = Object.create(ExtractedPackage.prototype);\n            obj.__wbg_ptr = ptr;\n            ExtractedPackageFinalization.register(obj, obj.__wbg_ptr, obj);\n            return obj;\n        }\n        __destroy_into_raw() {\n            const ptr = this.__wbg_ptr;\n            this.__wbg_ptr = 0;\n            ExtractedPackageFinalization.unregister(this);\n            return ptr;\n        }\n        free() {\n            const ptr = this.__destroy_into_raw();\n            wasm.__wbg_extractedpackage_free(ptr, 0);\n        }\n        /**\n         * Verified binary bytes (WASM module) extracted from the `.actr` ZIP.\n         * @returns {Uint8Array}\n         */\n        get binary() {\n            const ret = wasm.extractedpackage_binary(this.__wbg_ptr);\n            var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();\n            wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);\n            return v1;\n        }\n        /**\n         * wasm-bindgen JS glue text extracted from `resources/*.js`, if any.\n         * Returns `None` when the package carries no glue (guest-bridge mode or\n         * pure-Rust packages).\n         * @returns {string | undefined}\n         */\n        get glue_js() {\n            const ret = wasm.extractedpackage_glue_js(this.__wbg_ptr);\n            let v1;\n            if (ret[0] !== 0) {\n                v1 = getStringFromWasm0(ret[0], ret[1]).slice();\n                wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);\n            }\n            return v1;\n        }\n        /**\n         * Verified package manifest, serialized as JSON. Fields mirror\n         * `actr_pack::PackageManifest`.\n         * @returns {string}\n         */\n        get manifest_json() {\n            let deferred1_0;\n            let deferred1_1;\n            try {\n                const ret = wasm.extractedpackage_manifest_json(this.__wbg_ptr);\n                deferred1_0 = ret[0];\n                deferred1_1 = ret[1];\n                return getStringFromWasm0(ret[0], ret[1]);\n            } finally {\n                wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n            }\n        }\n    }\n    if (Symbol.dispose) ExtractedPackage.prototype[Symbol.dispose] = ExtractedPackage.prototype.free;\n    exports.ExtractedPackage = ExtractedPackage;\n\n    /**\n     * Handle an RPC control request originating from the DOM side.\n     *\n     * Message flow in unified-dispatcher mode:\n     * - With `WORKLOAD`: `DOM -> workload.dispatch(route_key, payload, ctx) -> response`\n     *   - Local route: the workload processes locally and may call remote targets via `ctx.call_raw()`\n     *   - Remote route: the workload forwards to a remote actor via `ctx.call_raw()`\n     * - Without `WORKLOAD`: `DOM -> HostGate -> Gate -> WebRTC`\n     * @param {string} client_id\n     * @param {any} payload\n     * @returns {Promise<void>}\n     */\n    function handle_dom_control(client_id, payload) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.handle_dom_control(ptr0, len0, payload);\n        return ret;\n    }\n    exports.handle_dom_control = handle_dom_control;\n\n    /**\n     * @param {string} client_id\n     * @param {any} payload\n     */\n    function handle_dom_fast_path(client_id, payload) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.handle_dom_fast_path(ptr0, len0, payload);\n        if (ret[1]) {\n            throw takeFromExternrefTable0(ret[0]);\n        }\n    }\n    exports.handle_dom_fast_path = handle_dom_fast_path;\n\n    /**\n     * @param {string} client_id\n     * @param {any} payload\n     * @returns {Promise<void>}\n     */\n    function handle_dom_webrtc_event(client_id, payload) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.handle_dom_webrtc_event(ptr0, len0, payload);\n        return ret;\n    }\n    exports.handle_dom_webrtc_event = handle_dom_webrtc_event;\n\n    /**\n     * WIT `host.call(target, route_key, payload) -> result<list<u8>, actr-error>`\n     *\n     * The web runtime only supports `dest::actor` for typed calls today (it has\n     * no in-browser Shell/Local routing); other variants return\n     * `not-implemented`. Keeps the WIT contract uniform between server and\n     * browser \u{2014} the variant arm exists, it just isn\'t wired.\n     * @param {string} request_id\n     * @param {any} target\n     * @param {string} route_key\n     * @param {Uint8Array} payload\n     * @returns {Promise<Uint8Array>}\n     */\n    function host_call_async(request_id, target, route_key, payload) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(route_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ret = wasm.host_call_async(ptr0, len0, target, ptr1, len1, payload);\n        return ret;\n    }\n    exports.host_call_async = host_call_async;\n\n    /**\n     * WIT `host.call-raw(target, route_key, payload) -> result<list<u8>, actr-error>`\n     *\n     * Async; returns a Promise that resolves to a `Uint8Array` on success or\n     * rejects with a JS `Error` whose `actrErrorTag` names the WIT variant.\n     *\n     * The `request_id` first parameter identifies the owning dispatch and is\n     * threaded through by the guest-side wrapper\n     * (`actr_web_abi::guest::call_raw_with_request_id`). Two concurrent\n     * dispatches no longer share a single thread-local context slot \u{2014} they\n     * resolve their respective `RuntimeContext` via `DISPATCH_CTXS`.\n     * @param {string} request_id\n     * @param {any} target\n     * @param {string} route_key\n     * @param {Uint8Array} payload\n     * @returns {Promise<Uint8Array>}\n     */\n    function host_call_raw_async(request_id, target, route_key, payload) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(route_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ret = wasm.host_call_raw_async(ptr0, len0, target, ptr1, len1, payload);\n        return ret;\n    }\n    exports.host_call_raw_async = host_call_raw_async;\n\n    /**\n     * WIT `host.discover(target_type) -> result<actr-id, actr-error>`.\n     * @param {string} request_id\n     * @param {any} target_type\n     * @returns {Promise<any>}\n     */\n    function host_discover_async(request_id, target_type) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.host_discover_async(ptr0, len0, target_type);\n        return ret;\n    }\n    exports.host_discover_async = host_discover_async;\n\n    /**\n     * WIT `host.get-caller-id() -> option<actr-id>`. Returns `null` when the\n     * host did not install a caller for this dispatch (lifecycle hooks).\n     * @param {string} request_id\n     * @returns {any}\n     */\n    function host_get_caller_id(request_id) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.host_get_caller_id(ptr0, len0);\n        if (ret[2]) {\n            throw takeFromExternrefTable0(ret[1]);\n        }\n        return takeFromExternrefTable0(ret[0]);\n    }\n    exports.host_get_caller_id = host_get_caller_id;\n\n    /**\n     * WIT `host.get-request-id() -> string`.\n     *\n     * Retaining the `request_id` input here is deliberate: the input and output\n     * MUST match. It is asserted, giving us a cheap round-trip sanity check\n     * between the guest-side wrapper (which has the request_id in hand from the\n     * envelope) and the host-side dispatch table. The alternative \u{2014} omitting\n     * the parameter and treating it as a sentinel \u{2014} would break uniformity\n     * with the other 7 imports and require the WIT codegen to special-case it.\n     * @param {string} request_id\n     * @returns {string}\n     */\n    function host_get_request_id(request_id) {\n        let deferred3_0;\n        let deferred3_1;\n        try {\n            const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n            const len0 = WASM_VECTOR_LEN;\n            const ret = wasm.host_get_request_id(ptr0, len0);\n            var ptr2 = ret[0];\n            var len2 = ret[1];\n            if (ret[3]) {\n                ptr2 = 0; len2 = 0;\n                throw takeFromExternrefTable0(ret[2]);\n            }\n            deferred3_0 = ptr2;\n            deferred3_1 = len2;\n            return getStringFromWasm0(ptr2, len2);\n        } finally {\n            wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n        }\n    }\n    exports.host_get_request_id = host_get_request_id;\n\n    /**\n     * WIT `host.get-self-id() -> actr-id`.\n     * @param {string} request_id\n     * @returns {any}\n     */\n    function host_get_self_id(request_id) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.host_get_self_id(ptr0, len0);\n        if (ret[2]) {\n            throw takeFromExternrefTable0(ret[1]);\n        }\n        return takeFromExternrefTable0(ret[0]);\n    }\n    exports.host_get_self_id = host_get_self_id;\n\n    /**\n     * WIT `host.log-message(level, message)`.\n     *\n     * Maps to `log` crate levels. Levels outside the `trace/debug/info/warn/error`\n     * set silently fall through to `info`. The `request_id` parameter is carried\n     * for uniformity with the other host imports (and to annotate the log line);\n     * it does not gate execution \u{2014} logging from unknown dispatches still\n     * surfaces.\n     * @param {string} request_id\n     * @param {string} level\n     * @param {string} message\n     */\n    function host_log_message(request_id, level, message) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ptr2 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len2 = WASM_VECTOR_LEN;\n        wasm.host_log_message(ptr0, len0, ptr1, len1, ptr2, len2);\n    }\n    exports.host_log_message = host_log_message;\n\n    /**\n     * WIT `host.tell(target, route_key, payload) -> result<_, actr-error>`.\n     *\n     * Fire-and-forget semantics. The web runtime maps this to `call_raw` with\n     * `timeout_ms=0`; the result is discarded. Only `Dest::Actor` is wired.\n     * @param {string} request_id\n     * @param {any} target\n     * @param {string} route_key\n     * @param {Uint8Array} payload\n     * @returns {Promise<void>}\n     */\n    function host_tell_async(request_id, target, route_key, payload) {\n        const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(route_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ret = wasm.host_tell_async(ptr0, len0, target, ptr1, len1, payload);\n        return ret;\n    }\n    exports.host_tell_async = host_tell_async;\n\n    function init_global() {\n        const ret = wasm.init_global();\n        if (ret[1]) {\n            throw takeFromExternrefTable0(ret[0]);\n        }\n    }\n    exports.init_global = init_global;\n\n    /**\n     * Register a new client (browser tab) with the SW runtime.\n     *\n     * Each call creates an independent runtime with its own signaling connection,\n     * actor registration, and WebRTC state. This enables multiple browser tabs\n     * to work simultaneously without interfering with each other.\n     * @param {string} client_id\n     * @param {any} config\n     * @param {MessagePort} port\n     * @returns {Promise<void>}\n     */\n    function register_client(client_id, config, port) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.register_client(ptr0, len0, config, port);\n        return ret;\n    }\n    exports.register_client = register_client;\n\n    /**\n     * Register a dedicated DataChannel `MessagePort` received from the DOM side.\n     *\n     * After the DOM creates the DataChannel bridge:\n     * 1. DOM: `port1 <-> DataChannel` for bidirectional forwarding\n     * 2. DOM: transfers `port2` to the SW via a transferable object\n     * 3. SW: this function receives `port2`, builds `WebRtcConnection`, and injects it into `WirePool`\n     *\n     * After injection, `DestTransport` is awakened through `ReadyWatcher`, and\n     * subsequent outbound traffic is sent zero-copy through `DataLane::PostMessage(port)`.\n     * @param {string} client_id\n     * @param {string} peer_id\n     * @param {MessagePort} port\n     * @returns {Promise<void>}\n     */\n    function register_datachannel_port(client_id, peer_id, port) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(peer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ret = wasm.register_datachannel_port(ptr0, len0, ptr1, len1, port);\n        return ret;\n    }\n    exports.register_datachannel_port = register_datachannel_port;\n\n    /**\n     * Register a wasm-bindgen guest workload.\n     *\n     * `dispatch_fn` is a JS callback that forwards to the guest module\'s\n     * `dispatch` export (emitted by `actr-web-abi`\'s `__actr_workload_dispatch`).\n     * Its signature must match:\n     *\n     * ```text\n     * async (envelope: RpcEnvelopeJs) => Uint8Array\n     * ```\n     *\n     * where `RpcEnvelopeJs` is the camelCase record built by sw-host on the\n     * inbound side: `{ requestId: string, routeKey: string, payload: Uint8Array }`.\n     *\n     * The JS side is responsible for:\n     * 1. Instantiating the wasm-bindgen guest bundle (`<name>.wbg/guest.js` +\n     *    `_bg.wasm`) emitted by `tools/wit-compile-web` for the generated\n     *    `actr-web-abi` shim.\n     * 2. Installing the `actrHost*` JS globals that the guest imports \u{2014} they\n     *    proxy onto the `host_*_async` / `host_*` wasm-bindgen exports from\n     *    this crate (see `bindings/web/packages/web-sdk/src/actor.sw.js`).\n     * 3. Passing `(envelope) => guestBindgen.dispatch(envelope)` here as\n     *    `dispatch_fn`.\n     *\n     * When this function is invoked the runtime installs the `ServiceHandlerFn`\n     * used by [`WasmWorkload`], which the inbound dispatcher drives.\n     *\n     * # Naming\n     *\n     * Pre-Phase-8 this was `register_component_workload`, when the SW also\n     * supported a Component Model + `jco`-transpiled guest. With CM removed\n     * (Option U \u{a7}11), the WBG-only name is the accurate one.\n     * @param {Function} dispatch_fn\n     */\n    function register_guest_workload(dispatch_fn) {\n        wasm.register_guest_workload(dispatch_fn);\n    }\n    exports.register_guest_workload = register_guest_workload;\n\n    /**\n     * Unregister a client (browser tab) from the SW runtime.\n     *\n     * Closes the signaling WebSocket (so the signaling server removes\n     * the actor from its ServiceRegistry) and removes the client context.\n     * Background tasks (signaling relay, heartbeat) will naturally stop\n     * when the signaling connection drops.\n     * @param {string} client_id\n     * @returns {Promise<void>}\n     */\n    function unregister_client(client_id) {\n        const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ret = wasm.unregister_client(ptr0, len0);\n        return ret;\n    }\n    exports.unregister_client = unregister_client;\n\n    /**\n     * Verify a `.actr` package against the provided trust anchors and return\n     * its extracted parts.\n     *\n     * Browser-side equivalent of the `Hyper::verify_package` \u{2192} `load_binary`\n     * step on native. Always runs the full signature + binary hash chain;\n     * there is no \"skip verify\" escape hatch.\n     *\n     * # Parameters\n     * - `package_bytes` \u{2014} the raw `.actr` ZIP bytes\n     * - `trust_anchors_json` \u{2014} JSON array of `TrustAnchor` entries\n     *   (shape matches `actr_config::TrustAnchor`). The SW honours the first\n     *   usable `kind = \"static\"` entry; `kind = \"registry\"` entries cause a\n     *   hard error until the SW learns to do async AIS lookups.\n     *\n     * # Errors\n     * Raises a `JsError` with a descriptive message on:\n     * - malformed trust config\n     * - no usable static anchor (empty, missing `pubkey_b64`, or only `registry`)\n     * - invalid / wrong-size public key\n     * - signature mismatch, tampered binary, missing manifest, etc.\n     * @param {Uint8Array} package_bytes\n     * @param {string} trust_anchors_json\n     * @returns {ExtractedPackage}\n     */\n    function verify_and_extract_actr_package(package_bytes, trust_anchors_json) {\n        const ptr0 = passArray8ToWasm0(package_bytes, wasm.__wbindgen_malloc);\n        const len0 = WASM_VECTOR_LEN;\n        const ptr1 = passStringToWasm0(trust_anchors_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n        const len1 = WASM_VECTOR_LEN;\n        const ret = wasm.verify_and_extract_actr_package(ptr0, len0, ptr1, len1);\n        if (ret[2]) {\n            throw takeFromExternrefTable0(ret[1]);\n        }\n        return ExtractedPackage.__wrap(ret[0]);\n    }\n    exports.verify_and_extract_actr_package = verify_and_extract_actr_package;\n\n    function __wbg_get_imports() {\n        const import0 = {\n            __proto__: null,\n            __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {\n                const ret = Error(getStringFromWasm0(arg0, arg1));\n                return ret;\n            },\n            __wbg_Number_a5a435bd7bbec835: function(arg0) {\n                const ret = Number(arg0);\n                return ret;\n            },\n            __wbg_String_8564e559799eccda: function(arg0, arg1) {\n                const ret = String(arg1);\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {\n                const v = arg1;\n                const ret = typeof(v) === \'bigint\' ? v : undefined;\n                getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n            },\n            __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {\n                const v = arg0;\n                const ret = typeof(v) === \'boolean\' ? v : undefined;\n                return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n            },\n            __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {\n                const ret = debugString(arg1);\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {\n                const ret = arg0 in arg1;\n                return ret;\n            },\n            __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {\n                const ret = typeof(arg0) === \'bigint\';\n                return ret;\n            },\n            __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {\n                const ret = typeof(arg0) === \'function\';\n                return ret;\n            },\n            __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {\n                const ret = arg0 === null;\n                return ret;\n            },\n            __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {\n                const val = arg0;\n                const ret = typeof(val) === \'object\' && val !== null;\n                return ret;\n            },\n            __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {\n                const ret = typeof(arg0) === \'string\';\n                return ret;\n            },\n            __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {\n                const ret = arg0 === undefined;\n                return ret;\n            },\n            __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {\n                const ret = arg0 === arg1;\n                return ret;\n            },\n            __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {\n                const ret = arg0 == arg1;\n                return ret;\n            },\n            __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {\n                const obj = arg1;\n                const ret = typeof(obj) === \'number\' ? obj : undefined;\n                getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n            },\n            __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {\n                const obj = arg1;\n                const ret = typeof(obj) === \'string\' ? obj : undefined;\n                var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                var len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {\n                throw new Error(getStringFromWasm0(arg0, arg1));\n            },\n            __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {\n                arg0._wbg_cb_unref();\n            },\n            __wbg_abort_5ef96933660780b7: function(arg0) {\n                arg0.abort();\n            },\n            __wbg_addEventListener_2d985aa8a656f6dc: function() { return handleError(function (arg0, arg1, arg2, arg3) {\n                arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);\n            }, arguments); },\n            __wbg_add_31c3a85003d5143e: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.add(arg1, arg2);\n                return ret;\n            }, arguments); },\n            __wbg_add_7857847c343fb7de: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.add(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {\n                const ret = arg0.arrayBuffer();\n                return ret;\n            }, arguments); },\n            __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.call(arg1, arg2);\n                return ret;\n            }, arguments); },\n            __wbg_call_dcc2662fa17a72cf: function() { return handleError(function (arg0, arg1, arg2, arg3) {\n                const ret = arg0.call(arg1, arg2, arg3);\n                return ret;\n            }, arguments); },\n            __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.call(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_clearTimeout_113b1cde814ec762: function(arg0) {\n                const ret = clearTimeout(arg0);\n                return ret;\n            },\n            __wbg_clear_1885f7bf35006b0c: function() { return handleError(function (arg0) {\n                const ret = arg0.clear();\n                return ret;\n            }, arguments); },\n            __wbg_close_af26905c832a88cb: function() { return handleError(function (arg0) {\n                arg0.close();\n            }, arguments); },\n            __wbg_close_cbf870bdad0aad99: function(arg0) {\n                arg0.close();\n            },\n            __wbg_code_aea376e2d265a64f: function(arg0) {\n                const ret = arg0.code;\n                return ret;\n            },\n            __wbg_createIndex_323cb0213cc21d9b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n                const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3, arg4);\n                return ret;\n            }, arguments); },\n            __wbg_createIndex_38ef2e77937beaca: function() { return handleError(function (arg0, arg1, arg2, arg3) {\n                const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3);\n                return ret;\n            }, arguments); },\n            __wbg_createObjectStore_4709de9339ffc6c0: function() { return handleError(function (arg0, arg1, arg2, arg3) {\n                const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);\n                return ret;\n            }, arguments); },\n            __wbg_data_2e49deffd56e1b77: function(arg0) {\n                const ret = arg0.data;\n                return ret;\n            },\n            __wbg_data_a3d9ff9cdd801002: function(arg0) {\n                const ret = arg0.data;\n                return ret;\n            },\n            __wbg_debug_271c16e6de0bc226: function(arg0, arg1, arg2, arg3) {\n                console.debug(arg0, arg1, arg2, arg3);\n            },\n            __wbg_deleteIndex_9391b8bace7b0b18: function() { return handleError(function (arg0, arg1, arg2) {\n                arg0.deleteIndex(getStringFromWasm0(arg1, arg2));\n            }, arguments); },\n            __wbg_deleteObjectStore_65401ab024ac08c1: function() { return handleError(function (arg0, arg1, arg2) {\n                arg0.deleteObjectStore(getStringFromWasm0(arg1, arg2));\n            }, arguments); },\n            __wbg_delete_40db93c05c546fb9: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.delete(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_done_08ce71ee07e3bd17: function(arg0) {\n                const ret = arg0.done;\n                return ret;\n            },\n            __wbg_encodeURIComponent_92643eb91e22a715: function(arg0, arg1) {\n                const ret = encodeURIComponent(getStringFromWasm0(arg0, arg1));\n                return ret;\n            },\n            __wbg_entries_e8a20ff8c9757101: function(arg0) {\n                const ret = Object.entries(arg0);\n                return ret;\n            },\n            __wbg_error_1eece6b0039034ce: function(arg0, arg1, arg2, arg3) {\n                console.error(arg0, arg1, arg2, arg3);\n            },\n            __wbg_error_57ef6dadfcb01843: function(arg0) {\n                const ret = arg0.error;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_error_74898554122344a8: function() { return handleError(function (arg0) {\n                const ret = arg0.error;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            }, arguments); },\n            __wbg_error_8d9a8e04cd1d3588: function(arg0) {\n                console.error(arg0);\n            },\n            __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {\n                let deferred0_0;\n                let deferred0_1;\n                try {\n                    deferred0_0 = arg0;\n                    deferred0_1 = arg1;\n                    console.error(getStringFromWasm0(arg0, arg1));\n                } finally {\n                    wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n                }\n            },\n            __wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {\n                const ret = arg0.fetch(arg1);\n                return ret;\n            },\n            __wbg_getAll_1c496368e98193a6: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.getAll(arg1, arg2 >>> 0);\n                return ret;\n            }, arguments); },\n            __wbg_getAll_690f659b57ae2d51: function() { return handleError(function (arg0) {\n                const ret = arg0.getAll();\n                return ret;\n            }, arguments); },\n            __wbg_getAll_a959860fbb7a424a: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.getAll(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_getKey_9f5844b36e7326eb: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.getKey(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_getRandomValues_a1cf2e70b003a59d: function() { return handleError(function (arg0, arg1) {\n                globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));\n            }, arguments); },\n            __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {\n                const ret = Reflect.get(arg0, arg1);\n                return ret;\n            }, arguments); },\n            __wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {\n                const ret = Reflect.get(arg0, arg1);\n                return ret;\n            }, arguments); },\n            __wbg_get_6ac8c8119f577720: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.get(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_get_7873e3afa59bad00: function(arg0, arg1, arg2) {\n                const ret = arg1[arg2 >>> 0];\n                var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                var len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {\n                const ret = arg0[arg1 >>> 0];\n                return ret;\n            },\n            __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {\n                const ret = arg0[arg1 >>> 0];\n                return ret;\n            },\n            __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {\n                const ret = arg0[arg1];\n                return ret;\n            },\n            __wbg_indexNames_3a9be68017fb9405: function(arg0) {\n                const ret = arg0.indexNames;\n                return ret;\n            },\n            __wbg_index_f1b3b30c5d5af6fb: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.index(getStringFromWasm0(arg1, arg2));\n                return ret;\n            }, arguments); },\n            __wbg_info_0194681687b5ab04: function(arg0, arg1, arg2, arg3) {\n                console.info(arg0, arg1, arg2, arg3);\n            },\n            __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof ArrayBuffer;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_IdbDatabase_5f436cc89cc07f14: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof IDBDatabase;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_IdbFactory_efcffbfd9020e4ac: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof IDBFactory;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_IdbOpenDbRequest_10c2576001eb6613: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof IDBOpenDBRequest;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_IdbRequest_6a0e24572d4f1d46: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof IDBRequest;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_IdbTransaction_125db5cfd1c1bfd2: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof IDBTransaction;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof Map;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_Object_be1962063fcc0c9f: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof Object;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_Promise_7c3bdd7805c2c6e6: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof Promise;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof Response;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_ServiceWorkerGlobalScope_f90f3fc36442975e: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof ServiceWorkerGlobalScope;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {\n                let result;\n                try {\n                    result = arg0 instanceof Uint8Array;\n                } catch (_) {\n                    result = false;\n                }\n                const ret = result;\n                return ret;\n            },\n            __wbg_isArray_33b91feb269ff46e: function(arg0) {\n                const ret = Array.isArray(arg0);\n                return ret;\n            },\n            __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {\n                const ret = Number.isSafeInteger(arg0);\n                return ret;\n            },\n            __wbg_iterator_d8f549ec8fb061b1: function() {\n                const ret = Symbol.iterator;\n                return ret;\n            },\n            __wbg_keyPath_f17010debffed49a: function() { return handleError(function (arg0) {\n                const ret = arg0.keyPath;\n                return ret;\n            }, arguments); },\n            __wbg_length_02c4f6002306a824: function(arg0) {\n                const ret = arg0.length;\n                return ret;\n            },\n            __wbg_length_b3416cf66a5452c8: function(arg0) {\n                const ret = arg0.length;\n                return ret;\n            },\n            __wbg_length_ea16607d7b61445b: function(arg0) {\n                const ret = arg0.length;\n                return ret;\n            },\n            __wbg_log_524eedafa26daa59: function(arg0) {\n                console.log(arg0);\n            },\n            __wbg_log_70972330cfc941dd: function(arg0, arg1, arg2, arg3) {\n                console.log(arg0, arg1, arg2, arg3);\n            },\n            __wbg_multiEntry_fd907a11ddf44df1: function(arg0) {\n                const ret = arg0.multiEntry;\n                return ret;\n            },\n            __wbg_new_0837727332ac86ba: function() { return handleError(function () {\n                const ret = new Headers();\n                return ret;\n            }, arguments); },\n            __wbg_new_227d7c05414eb861: function() {\n                const ret = new Error();\n                return ret;\n            },\n            __wbg_new_5f486cdf45a04d78: function(arg0) {\n                const ret = new Uint8Array(arg0);\n                return ret;\n            },\n            __wbg_new_a70fbab9066b301f: function() {\n                const ret = new Array();\n                return ret;\n            },\n            __wbg_new_ab79df5bd7c26067: function() {\n                const ret = new Object();\n                return ret;\n            },\n            __wbg_new_c518c60af666645b: function() { return handleError(function () {\n                const ret = new AbortController();\n                return ret;\n            }, arguments); },\n            __wbg_new_d15cb560a6a0e5f0: function(arg0, arg1) {\n                const ret = new Error(getStringFromWasm0(arg0, arg1));\n                return ret;\n            },\n            __wbg_new_dd50bcc3f60ba434: function() { return handleError(function (arg0, arg1) {\n                const ret = new WebSocket(getStringFromWasm0(arg0, arg1));\n                return ret;\n            }, arguments); },\n            __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {\n                const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));\n                return ret;\n            },\n            __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {\n                try {\n                    var state0 = {a: arg0, b: arg1};\n                    var cb0 = (arg0, arg1) => {\n                        const a = state0.a;\n                        state0.a = 0;\n                        try {\n                            return wasm_bindgen__convert__closures_____invoke__h2b0ee5493c492460(a, state0.b, arg0, arg1);\n                        } finally {\n                            state0.a = a;\n                        }\n                    };\n                    const ret = new Promise(cb0);\n                    return ret;\n                } finally {\n                    state0.a = state0.b = 0;\n                }\n            },\n            __wbg_new_typed_bccac67128ed885a: function() {\n                const ret = new Array();\n                return ret;\n            },\n            __wbg_new_with_length_825018a1616e9e55: function(arg0) {\n                const ret = new Uint8Array(arg0 >>> 0);\n                return ret;\n            },\n            __wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);\n                return ret;\n            }, arguments); },\n            __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {\n                const ret = arg0.next();\n                return ret;\n            }, arguments); },\n            __wbg_next_e01a967809d1aa68: function(arg0) {\n                const ret = arg0.next;\n                return ret;\n            },\n            __wbg_now_16f0c993d5dd6c27: function() {\n                const ret = Date.now();\n                return ret;\n            },\n            __wbg_objectStoreNames_564985d2e9ae7523: function(arg0) {\n                const ret = arg0.objectStoreNames;\n                return ret;\n            },\n            __wbg_objectStore_f314ab152a5c7bd0: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));\n                return ret;\n            }, arguments); },\n            __wbg_open_e7a9d3d6344572f6: function() { return handleError(function (arg0, arg1, arg2, arg3) {\n                const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);\n                return ret;\n            }, arguments); },\n            __wbg_open_f3dc09caa3990bc4: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.open(getStringFromWasm0(arg1, arg2));\n                return ret;\n            }, arguments); },\n            __wbg_postMessage_c89a8b5edbf59ad0: function() { return handleError(function (arg0, arg1) {\n                arg0.postMessage(arg1);\n            }, arguments); },\n            __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {\n                Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n            },\n            __wbg_push_e87b0e732085a946: function(arg0, arg1) {\n                const ret = arg0.push(arg1);\n                return ret;\n            },\n            __wbg_put_ae369598c083f1f5: function() { return handleError(function (arg0, arg1) {\n                const ret = arg0.put(arg1);\n                return ret;\n            }, arguments); },\n            __wbg_put_f1673d719f93ce22: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.put(arg1, arg2);\n                return ret;\n            }, arguments); },\n            __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {\n                const ret = arg0.queueMicrotask;\n                return ret;\n            },\n            __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {\n                queueMicrotask(arg0);\n            },\n            __wbg_random_5bb86cae65a45bf6: function() {\n                const ret = Math.random();\n                return ret;\n            },\n            __wbg_readyState_1f1e7f1bdf9f4d42: function(arg0) {\n                const ret = arg0.readyState;\n                return ret;\n            },\n            __wbg_reason_cbcb9911796c4714: function(arg0, arg1) {\n                const ret = arg1.reason;\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg_resolve_ae8d83246e5bcc12: function(arg0) {\n                const ret = Promise.resolve(arg0);\n                return ret;\n            },\n            __wbg_result_c5baa2d3d690a01a: function() { return handleError(function (arg0) {\n                const ret = arg0.result;\n                return ret;\n            }, arguments); },\n            __wbg_send_d31a693c975dea74: function() { return handleError(function (arg0, arg1, arg2) {\n                arg0.send(getArrayU8FromWasm0(arg1, arg2));\n            }, arguments); },\n            __wbg_setTimeout_ef24d2fc3ad97385: function() { return handleError(function (arg0, arg1) {\n                const ret = setTimeout(arg0, arg1);\n                return ret;\n            }, arguments); },\n            __wbg_set_282384002438957f: function(arg0, arg1, arg2) {\n                arg0[arg1 >>> 0] = arg2;\n            },\n            __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {\n                arg0[arg1] = arg2;\n            },\n            __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = Reflect.set(arg0, arg1, arg2);\n                return ret;\n            }, arguments); },\n            __wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {\n                arg0.set(getArrayU8FromWasm0(arg1, arg2));\n            },\n            __wbg_set_auto_increment_ffc3cd6470763a4c: function(arg0, arg1) {\n                arg0.autoIncrement = arg1 !== 0;\n            },\n            __wbg_set_binaryType_3dcf8281ec100a8f: function(arg0, arg1) {\n                arg0.binaryType = __wbindgen_enum_BinaryType[arg1];\n            },\n            __wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {\n                arg0.body = arg1;\n            },\n            __wbg_set_e09648bea3f1af1e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n                arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n            }, arguments); },\n            __wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {\n                arg0.headers = arg1;\n            },\n            __wbg_set_key_path_3c45a8ff0b89e678: function(arg0, arg1) {\n                arg0.keyPath = arg1;\n            },\n            __wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {\n                arg0.method = getStringFromWasm0(arg1, arg2);\n            },\n            __wbg_set_multi_entry_38c253febe05d3be: function(arg0, arg1) {\n                arg0.multiEntry = arg1 !== 0;\n            },\n            __wbg_set_name_02d633afec2e2bf0: function(arg0, arg1, arg2) {\n                arg0.name = getStringFromWasm0(arg1, arg2);\n            },\n            __wbg_set_onabort_63885d8d7841a8d5: function(arg0, arg1) {\n                arg0.onabort = arg1;\n            },\n            __wbg_set_onclose_8da801226bdd7a7b: function(arg0, arg1) {\n                arg0.onclose = arg1;\n            },\n            __wbg_set_oncomplete_f31e6dc6d16c1ff8: function(arg0, arg1) {\n                arg0.oncomplete = arg1;\n            },\n            __wbg_set_onerror_8a268cb237177bba: function(arg0, arg1) {\n                arg0.onerror = arg1;\n            },\n            __wbg_set_onerror_901ca711f94a5bbb: function(arg0, arg1) {\n                arg0.onerror = arg1;\n            },\n            __wbg_set_onerror_c1ecd6233c533c08: function(arg0, arg1) {\n                arg0.onerror = arg1;\n            },\n            __wbg_set_onmessage_6f80ab771bf151aa: function(arg0, arg1) {\n                arg0.onmessage = arg1;\n            },\n            __wbg_set_onopen_34e3e24cf9337ddd: function(arg0, arg1) {\n                arg0.onopen = arg1;\n            },\n            __wbg_set_onsuccess_fca94ded107b64af: function(arg0, arg1) {\n                arg0.onsuccess = arg1;\n            },\n            __wbg_set_onupgradeneeded_860ce42184f987e7: function(arg0, arg1) {\n                arg0.onupgradeneeded = arg1;\n            },\n            __wbg_set_onversionchange_3d88930f82c97b92: function(arg0, arg1) {\n                arg0.onversionchange = arg1;\n            },\n            __wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {\n                arg0.signal = arg1;\n            },\n            __wbg_set_unique_a39d85db47f8e025: function(arg0, arg1) {\n                arg0.unique = arg1 !== 0;\n            },\n            __wbg_signal_166e1da31adcac18: function(arg0) {\n                const ret = arg0.signal;\n                return ret;\n            },\n            __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {\n                const ret = arg1.stack;\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {\n                const ret = typeof global === \'undefined\' ? null : global;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {\n                const ret = typeof globalThis === \'undefined\' ? null : globalThis;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_static_accessor_SELF_f207c857566db248: function() {\n                const ret = typeof self === \'undefined\' ? null : self;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {\n                const ret = typeof window === \'undefined\' ? null : window;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_statusText_bb47943caaee6050: function(arg0, arg1) {\n                const ret = arg1.statusText;\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg_status_318629ab93a22955: function(arg0) {\n                const ret = arg0.status;\n                return ret;\n            },\n            __wbg_target_7bc90f314634b37b: function(arg0) {\n                const ret = arg0.target;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_then_098abe61755d12f6: function(arg0, arg1) {\n                const ret = arg0.then(arg1);\n                return ret;\n            },\n            __wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {\n                const ret = arg0.then(arg1, arg2);\n                return ret;\n            },\n            __wbg_transaction_3223f7c8d0f40129: function() { return handleError(function (arg0, arg1, arg2) {\n                const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);\n                return ret;\n            }, arguments); },\n            __wbg_transaction_fda57653957fee06: function(arg0) {\n                const ret = arg0.transaction;\n                return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n            },\n            __wbg_unique_3329c63c37e586a7: function(arg0) {\n                const ret = arg0.unique;\n                return ret;\n            },\n            __wbg_url_778f9516ea867e17: function(arg0, arg1) {\n                const ret = arg1.url;\n                const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n                const len1 = WASM_VECTOR_LEN;\n                getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n                getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n            },\n            __wbg_value_21fc78aab0322612: function(arg0) {\n                const ret = arg0.value;\n                return ret;\n            },\n            __wbg_warn_809cad1bfc2b3a42: function(arg0, arg1, arg2, arg3) {\n                console.warn(arg0, arg1, arg2, arg3);\n            },\n            __wbg_wasClean_69f68dc4ed2d2cc7: function(arg0) {\n                const ret = arg0.wasClean;\n                return ret;\n            },\n            __wbindgen_cast_0000000000000001: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 310, function: Function { arguments: [NamedExternref(\"IDBVersionChangeEvent\")], shim_idx: 311, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3bf3d3c696600e7c, wasm_bindgen__convert__closures_____invoke__hdeffc77087617020);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000002: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [], shim_idx: 361, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hbc363433597dd1fa, wasm_bindgen__convert__closures_____invoke__had5d4e5f8f43e956);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000003: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 4, function: Function { arguments: [Externref], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h271f7150028f5177, wasm_bindgen__convert__closures_____invoke__h3071597815a5174c);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000004: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 4, function: Function { arguments: [NamedExternref(\"CloseEvent\")], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h271f7150028f5177, wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_3);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000005: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 4, function: Function { arguments: [NamedExternref(\"ExtendableMessageEvent\")], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h271f7150028f5177, wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_4);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000006: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 4, function: Function { arguments: [NamedExternref(\"MessageEvent\")], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h271f7150028f5177, wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_5);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000007: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 557, function: Function { arguments: [NamedExternref(\"Event\")], shim_idx: 558, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__ha0377a2cb4913500, wasm_bindgen__convert__closures_____invoke__h17b47eb22031d246);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000008: function(arg0, arg1) {\n                // Cast intrinsic for `Closure(Closure { dtor_idx: 620, function: Function { arguments: [Externref], shim_idx: 633, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.\n                const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h413b21eee601f26e, wasm_bindgen__convert__closures_____invoke__hc0c862ab144c6b49);\n                return ret;\n            },\n            __wbindgen_cast_0000000000000009: function(arg0) {\n                // Cast intrinsic for `F64 -> Externref`.\n                const ret = arg0;\n                return ret;\n            },\n            __wbindgen_cast_000000000000000a: function(arg0) {\n                // Cast intrinsic for `I64 -> Externref`.\n                const ret = arg0;\n                return ret;\n            },\n            __wbindgen_cast_000000000000000b: function(arg0, arg1) {\n                // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref(\"Uint8Array\")`.\n                const ret = getArrayU8FromWasm0(arg0, arg1);\n                return ret;\n            },\n            __wbindgen_cast_000000000000000c: function(arg0, arg1) {\n                // Cast intrinsic for `Ref(String) -> Externref`.\n                const ret = getStringFromWasm0(arg0, arg1);\n                return ret;\n            },\n            __wbindgen_cast_000000000000000d: function(arg0) {\n                // Cast intrinsic for `U64 -> Externref`.\n                const ret = BigInt.asUintN(64, arg0);\n                return ret;\n            },\n            __wbindgen_init_externref_table: function() {\n                const table = wasm.__wbindgen_externrefs;\n                const offset = table.grow(4);\n                table.set(0, undefined);\n                table.set(offset + 0, undefined);\n                table.set(offset + 1, null);\n                table.set(offset + 2, true);\n                table.set(offset + 3, false);\n            },\n        };\n        return {\n            __proto__: null,\n            \"./actr_sw_host_bg.js\": import0,\n        };\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__had5d4e5f8f43e956(arg0, arg1) {\n        wasm.wasm_bindgen__convert__closures_____invoke__had5d4e5f8f43e956(arg0, arg1);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__hdeffc77087617020(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__hdeffc77087617020(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h3071597815a5174c(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h3071597815a5174c(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_3(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_3(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_4(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_4(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_5(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h3071597815a5174c_5(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h17b47eb22031d246(arg0, arg1, arg2) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h17b47eb22031d246(arg0, arg1, arg2);\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__hc0c862ab144c6b49(arg0, arg1, arg2) {\n        const ret = wasm.wasm_bindgen__convert__closures_____invoke__hc0c862ab144c6b49(arg0, arg1, arg2);\n        if (ret[1]) {\n            throw takeFromExternrefTable0(ret[0]);\n        }\n    }\n\n    function wasm_bindgen__convert__closures_____invoke__h2b0ee5493c492460(arg0, arg1, arg2, arg3) {\n        wasm.wasm_bindgen__convert__closures_____invoke__h2b0ee5493c492460(arg0, arg1, arg2, arg3);\n    }\n\n\n    const __wbindgen_enum_BinaryType = [\"blob\", \"arraybuffer\"];\n\n\n    const __wbindgen_enum_IdbTransactionMode = [\"readonly\", \"readwrite\", \"versionchange\", \"readwriteflush\", \"cleanup\"];\n    const ExtractedPackageFinalization = (typeof FinalizationRegistry === \'undefined\')\n        ? { register: () => {}, unregister: () => {} }\n        : new FinalizationRegistry(ptr => wasm.__wbg_extractedpackage_free(ptr >>> 0, 1));\n\n    function addToExternrefTable0(obj) {\n        const idx = wasm.__externref_table_alloc();\n        wasm.__wbindgen_externrefs.set(idx, obj);\n        return idx;\n    }\n\n    const CLOSURE_DTORS = (typeof FinalizationRegistry === \'undefined\')\n        ? { register: () => {}, unregister: () => {} }\n        : new FinalizationRegistry(state => state.dtor(state.a, state.b));\n\n    function debugString(val) {\n        // primitive types\n        const type = typeof val;\n        if (type == \'number\' || type == \'boolean\' || val == null) {\n            return  `${val}`;\n        }\n        if (type == \'string\') {\n            return `\"${val}\"`;\n        }\n        if (type == \'symbol\') {\n            const description = val.description;\n            if (description == null) {\n                return \'Symbol\';\n            } else {\n                return `Symbol(${description})`;\n            }\n        }\n        if (type == \'function\') {\n            const name = val.name;\n            if (typeof name == \'string\' && name.length > 0) {\n                return `Function(${name})`;\n            } else {\n                return \'Function\';\n            }\n        }\n        // objects\n        if (Array.isArray(val)) {\n            const length = val.length;\n            let debug = \'[\';\n            if (length > 0) {\n                debug += debugString(val[0]);\n            }\n            for(let i = 1; i < length; i++) {\n                debug += \', \' + debugString(val[i]);\n            }\n            debug += \']\';\n            return debug;\n        }\n        // Test for built-in\n        const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n        let className;\n        if (builtInMatches && builtInMatches.length > 1) {\n            className = builtInMatches[1];\n        } else {\n            // Failed to match the standard \'[object ClassName]\'\n            return toString.call(val);\n        }\n        if (className == \'Object\') {\n            // we\'re a user defined class or Object\n            // JSON.stringify avoids problems with cycles, and is generally much\n            // easier than looping through ownProperties of `val`.\n            try {\n                return \'Object(\' + JSON.stringify(val) + \')\';\n            } catch (_) {\n                return \'Object\';\n            }\n        }\n        // errors\n        if (val instanceof Error) {\n            return `${val.name}: ${val.message}\\n${val.stack}`;\n        }\n        // TODO we could test for more things here, like `Set`s and `Map`s.\n        return className;\n    }\n\n    function getArrayU8FromWasm0(ptr, len) {\n        ptr = ptr >>> 0;\n        return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n    }\n\n    let cachedDataViewMemory0 = null;\n    function getDataViewMemory0() {\n        if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n            cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n        }\n        return cachedDataViewMemory0;\n    }\n\n    function getStringFromWasm0(ptr, len) {\n        ptr = ptr >>> 0;\n        return decodeText(ptr, len);\n    }\n\n    let cachedUint8ArrayMemory0 = null;\n    function getUint8ArrayMemory0() {\n        if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n            cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n        }\n        return cachedUint8ArrayMemory0;\n    }\n\n    function handleError(f, args) {\n        try {\n            return f.apply(this, args);\n        } catch (e) {\n            const idx = addToExternrefTable0(e);\n            wasm.__wbindgen_exn_store(idx);\n        }\n    }\n\n    function isLikeNone(x) {\n        return x === undefined || x === null;\n    }\n\n    function makeMutClosure(arg0, arg1, dtor, f) {\n        const state = { a: arg0, b: arg1, cnt: 1, dtor };\n        const real = (...args) => {\n\n            // First up with a closure we increment the internal reference\n            // count. This ensures that the Rust closure environment won\'t\n            // be deallocated while we\'re invoking it.\n            state.cnt++;\n            const a = state.a;\n            state.a = 0;\n            try {\n                return f(a, state.b, ...args);\n            } finally {\n                state.a = a;\n                real._wbg_cb_unref();\n            }\n        };\n        real._wbg_cb_unref = () => {\n            if (--state.cnt === 0) {\n                state.dtor(state.a, state.b);\n                state.a = 0;\n                CLOSURE_DTORS.unregister(state);\n            }\n        };\n        CLOSURE_DTORS.register(real, state, state);\n        return real;\n    }\n\n    function passArray8ToWasm0(arg, malloc) {\n        const ptr = malloc(arg.length * 1, 1) >>> 0;\n        getUint8ArrayMemory0().set(arg, ptr / 1);\n        WASM_VECTOR_LEN = arg.length;\n        return ptr;\n    }\n\n    function passStringToWasm0(arg, malloc, realloc) {\n        if (realloc === undefined) {\n            const buf = cachedTextEncoder.encode(arg);\n            const ptr = malloc(buf.length, 1) >>> 0;\n            getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n            WASM_VECTOR_LEN = buf.length;\n            return ptr;\n        }\n\n        let len = arg.length;\n        let ptr = malloc(len, 1) >>> 0;\n\n        const mem = getUint8ArrayMemory0();\n\n        let offset = 0;\n\n        for (; offset < len; offset++) {\n            const code = arg.charCodeAt(offset);\n            if (code > 0x7F) break;\n            mem[ptr + offset] = code;\n        }\n        if (offset !== len) {\n            if (offset !== 0) {\n                arg = arg.slice(offset);\n            }\n            ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n            const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n            const ret = cachedTextEncoder.encodeInto(arg, view);\n\n            offset += ret.written;\n            ptr = realloc(ptr, len, offset, 1) >>> 0;\n        }\n\n        WASM_VECTOR_LEN = offset;\n        return ptr;\n    }\n\n    function takeFromExternrefTable0(idx) {\n        const value = wasm.__wbindgen_externrefs.get(idx);\n        wasm.__externref_table_dealloc(idx);\n        return value;\n    }\n\n    let cachedTextDecoder = new TextDecoder(\'utf-8\', { ignoreBOM: true, fatal: true });\n    cachedTextDecoder.decode();\n    function decodeText(ptr, len) {\n        return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n    }\n\n    const cachedTextEncoder = new TextEncoder();\n\n    if (!(\'encodeInto\' in cachedTextEncoder)) {\n        cachedTextEncoder.encodeInto = function (arg, view) {\n            const buf = cachedTextEncoder.encode(arg);\n            view.set(buf);\n            return {\n                read: arg.length,\n                written: buf.length\n            };\n        };\n    }\n\n    let WASM_VECTOR_LEN = 0;\n\n    let wasmModule, wasm;\n    function __wbg_finalize_init(instance, module) {\n        wasm = instance.exports;\n        wasmModule = module;\n        cachedDataViewMemory0 = null;\n        cachedUint8ArrayMemory0 = null;\n        wasm.__wbindgen_start();\n        return wasm;\n    }\n\n    async function __wbg_load(module, imports) {\n        if (typeof Response === \'function\' && module instanceof Response) {\n            if (typeof WebAssembly.instantiateStreaming === \'function\') {\n                try {\n                    return await WebAssembly.instantiateStreaming(module, imports);\n                } catch (e) {\n                    const validResponse = module.ok && expectedResponseType(module.type);\n\n                    if (validResponse && module.headers.get(\'Content-Type\') !== \'application/wasm\') {\n                        console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n                    } else { throw e; }\n                }\n            }\n\n            const bytes = await module.arrayBuffer();\n            return await WebAssembly.instantiate(bytes, imports);\n        } else {\n            const instance = await WebAssembly.instantiate(module, imports);\n\n            if (instance instanceof WebAssembly.Instance) {\n                return { instance, module };\n            } else {\n                return instance;\n            }\n        }\n\n        function expectedResponseType(type) {\n            switch (type) {\n                case \'basic\': case \'cors\': case \'default\': return true;\n            }\n            return false;\n        }\n    }\n\n    function initSync(module) {\n        if (wasm !== undefined) return wasm;\n\n\n        if (module !== undefined) {\n            if (Object.getPrototypeOf(module) === Object.prototype) {\n                ({module} = module)\n            } else {\n                console.warn(\'using deprecated parameters for `initSync()`; pass a single object instead\')\n            }\n        }\n\n        const imports = __wbg_get_imports();\n        if (!(module instanceof WebAssembly.Module)) {\n            module = new WebAssembly.Module(module);\n        }\n        const instance = new WebAssembly.Instance(module, imports);\n        return __wbg_finalize_init(instance, module);\n    }\n\n    async function __wbg_init(module_or_path) {\n        if (wasm !== undefined) return wasm;\n\n\n        if (module_or_path !== undefined) {\n            if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n                ({module_or_path} = module_or_path)\n            } else {\n                console.warn(\'using deprecated parameters for the initialization function; pass a single object instead\')\n            }\n        }\n\n        if (module_or_path === undefined && script_src !== undefined) {\n            module_or_path = script_src.replace(/\\.js$/, \"_bg.wasm\");\n        }\n        const imports = __wbg_get_imports();\n\n        if (typeof module_or_path === \'string\' || (typeof Request === \'function\' && module_or_path instanceof Request) || (typeof URL === \'function\' && module_or_path instanceof URL)) {\n            module_or_path = fetch(module_or_path);\n        }\n\n        const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n        return __wbg_finalize_init(instance, module);\n    }\n\n    return Object.assign(__wbg_init, { initSync }, exports);\n})({ __proto__: null });\n";
Expand description

wasm-bindgen JS glue for the shared SW host.