@spooky-sync/ssp-wasm 0.0.1-canary.11 → 0.0.1-canary.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +35 -0
- package/package.json +4 -3
- package/pkg/package.json +1 -1
- package/pkg/ssp_wasm.d.ts +94 -75
- package/pkg/ssp_wasm.js +392 -340
- package/pkg/ssp_wasm_bg.wasm +0 -0
- package/pkg/ssp_wasm_bg.wasm.d.ts +8 -7
package/AGENTS.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# `@spooky-sync/ssp-wasm` — agent guide
|
|
2
|
+
|
|
3
|
+
## What this package is
|
|
4
|
+
|
|
5
|
+
The browser-side stream processor: a Rust crate compiled to WebAssembly via `wasm-pack` that runs the same DBSP-style materialized-view circuit as the Rust `apps/ssp` server, but inside the user's tab. `@spooky-sync/core` instantiates it under the hood to power local reactive queries — you almost never touch this package directly.
|
|
6
|
+
|
|
7
|
+
## When you might touch it
|
|
8
|
+
|
|
9
|
+
- You're debugging why a local query doesn't update after a mutation. `ingest()` is where new records land.
|
|
10
|
+
- You're testing the surrealism (embedded WASM) generation mode of `spky generate` and need to inspect the bundled circuit.
|
|
11
|
+
- You're saving/restoring local state across page loads outside the built-in IndexedDB persistence path (`save_state` / `load_state`).
|
|
12
|
+
|
|
13
|
+
## Public API (`pkg/ssp_wasm.d.ts`)
|
|
14
|
+
|
|
15
|
+
- **`class Sp00kyProcessor`** (constructed once, stored on the client):
|
|
16
|
+
- `register_view(config: WasmViewConfig)` — register a materialized view by ID + SurQL + params.
|
|
17
|
+
- `unregister_view(id)` — remove a view.
|
|
18
|
+
- `ingest(table, op, id, record)` — push a row change; returns the affected views' deltas (`WasmViewUpdate[]`).
|
|
19
|
+
- `save_state()` / `load_state(json)` — serialize/restore the circuit.
|
|
20
|
+
- `free()` / `[Symbol.dispose]` — release WASM memory.
|
|
21
|
+
- **`init()`** — must be called once after the WASM module loads.
|
|
22
|
+
- Types: `WasmViewConfig`, `WasmViewUpdate`, `WasmIngestItem`.
|
|
23
|
+
|
|
24
|
+
## Build
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm --filter @spooky-sync/ssp-wasm build # wasm-pack build --target web --out-dir pkg
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Output is `pkg/`, which is the only directory shipped via `files`. The Rust source lives one level up in `packages/ssp/src/circuit/`.
|
|
31
|
+
|
|
32
|
+
## Pointers
|
|
33
|
+
|
|
34
|
+
- Server-side counterpart (same circuit, native build): `apps/ssp/`
|
|
35
|
+
- Sync engine that wires this in: `node_modules/@spooky-sync/core/AGENTS.md` → `src/modules/data/`
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spooky-sync/ssp-wasm",
|
|
3
|
-
"version": "0.0.1-canary.
|
|
3
|
+
"version": "0.0.1-canary.111",
|
|
4
4
|
"main": "pkg/ssp_wasm.js",
|
|
5
5
|
"types": "pkg/ssp_wasm.d.ts",
|
|
6
6
|
"files": [
|
|
7
|
-
"pkg"
|
|
7
|
+
"pkg",
|
|
8
|
+
"AGENTS.md"
|
|
8
9
|
],
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/mono424/
|
|
12
|
+
"url": "https://github.com/mono424/sp00ky.git",
|
|
12
13
|
"directory": "packages/ssp-wasm"
|
|
13
14
|
},
|
|
14
15
|
"publishConfig": {
|
package/pkg/package.json
CHANGED
package/pkg/ssp_wasm.d.ts
CHANGED
|
@@ -2,60 +2,78 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
4
|
export interface WasmViewUpdate {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
query_id: string;
|
|
6
|
+
result_hash: string;
|
|
7
|
+
result_data: [string, number][];
|
|
8
|
+
delta: {
|
|
9
|
+
additions: [string, number][];
|
|
10
|
+
removals: string[];
|
|
11
|
+
updates: [string, number][];
|
|
12
|
+
};
|
|
13
|
+
// Per-phase SSP processing time (ms). Ingest path: store_apply/circuit_step/
|
|
14
|
+
// transform. Register path: parse/plan/snapshot. Unused side is 0.
|
|
15
|
+
timing_store_apply_ms: number;
|
|
16
|
+
timing_circuit_step_ms: number;
|
|
17
|
+
timing_transform_ms: number;
|
|
18
|
+
timing_parse_ms: number;
|
|
19
|
+
timing_plan_ms: number;
|
|
20
|
+
timing_snapshot_ms: number;
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
export interface WasmViewConfig {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
id: string;
|
|
25
|
+
surql: string;
|
|
26
|
+
params?: Record<string, any>;
|
|
27
|
+
clientId: string;
|
|
28
|
+
ttl: string;
|
|
29
|
+
lastActiveAt: string;
|
|
30
|
+
safe_params?: Record<string, any>;
|
|
31
|
+
format?: 'flat' | 'tree' | 'streaming';
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
export interface WasmIngestItem {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
table: string;
|
|
36
|
+
op: string;
|
|
37
|
+
id: string;
|
|
38
|
+
record: any;
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
|
|
34
42
|
|
|
35
|
-
export class
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
export class Sp00kyProcessor {
|
|
44
|
+
free(): void;
|
|
45
|
+
[Symbol.dispose](): void;
|
|
46
|
+
/**
|
|
47
|
+
* Ingest a record into the stream processor
|
|
48
|
+
*/
|
|
49
|
+
ingest(table: string, op: string, id: string, record: any): any;
|
|
50
|
+
/**
|
|
51
|
+
* Load circuit state from a JSON string
|
|
52
|
+
*/
|
|
53
|
+
load_state(state: string): void;
|
|
54
|
+
constructor();
|
|
55
|
+
/**
|
|
56
|
+
* Register a new materialized view
|
|
57
|
+
*/
|
|
58
|
+
register_view(config: any): any;
|
|
59
|
+
/**
|
|
60
|
+
* Save the current circuit state as a JSON string
|
|
61
|
+
*/
|
|
62
|
+
save_state(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Seed per-table `select` permission predicates so `register_view` can
|
|
65
|
+
* inject them (and so non-`_00_` tables aren't default-denied).
|
|
66
|
+
*
|
|
67
|
+
* Expects a `{ [table]: whereText }` object, where `whereText` is the raw
|
|
68
|
+
* `WHERE` expression from the table's `PERMISSIONS FOR select` clause
|
|
69
|
+
* (e.g. `"true"`, or `"owner = $auth.id"`). Called once at boot after the
|
|
70
|
+
* schema is parsed — mirrors the native boot path that reads `INFO FOR DB`.
|
|
71
|
+
*/
|
|
72
|
+
set_permissions(permissions: any): void;
|
|
73
|
+
/**
|
|
74
|
+
* Unregister a view by ID
|
|
75
|
+
*/
|
|
76
|
+
unregister_view(id: string): void;
|
|
59
77
|
}
|
|
60
78
|
|
|
61
79
|
/**
|
|
@@ -66,43 +84,44 @@ export function init(): void;
|
|
|
66
84
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
67
85
|
|
|
68
86
|
export interface InitOutput {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
readonly memory: WebAssembly.Memory;
|
|
88
|
+
readonly __wbg_sp00kyprocessor_free: (a: number, b: number) => void;
|
|
89
|
+
readonly init: () => void;
|
|
90
|
+
readonly sp00kyprocessor_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any) => [number, number, number];
|
|
91
|
+
readonly sp00kyprocessor_load_state: (a: number, b: number, c: number) => [number, number];
|
|
92
|
+
readonly sp00kyprocessor_new: () => number;
|
|
93
|
+
readonly sp00kyprocessor_register_view: (a: number, b: any) => [number, number, number];
|
|
94
|
+
readonly sp00kyprocessor_save_state: (a: number) => [number, number, number, number];
|
|
95
|
+
readonly sp00kyprocessor_set_permissions: (a: number, b: any) => [number, number];
|
|
96
|
+
readonly sp00kyprocessor_unregister_view: (a: number, b: number, c: number) => void;
|
|
97
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
98
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
99
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
100
|
+
readonly __externref_table_alloc: () => number;
|
|
101
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
102
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
103
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
104
|
+
readonly __wbindgen_start: () => void;
|
|
86
105
|
}
|
|
87
106
|
|
|
88
107
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
89
108
|
|
|
90
109
|
/**
|
|
91
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
92
|
-
* a precompiled `WebAssembly.Module`.
|
|
93
|
-
*
|
|
94
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
95
|
-
*
|
|
96
|
-
* @returns {InitOutput}
|
|
97
|
-
*/
|
|
110
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
111
|
+
* a precompiled `WebAssembly.Module`.
|
|
112
|
+
*
|
|
113
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
114
|
+
*
|
|
115
|
+
* @returns {InitOutput}
|
|
116
|
+
*/
|
|
98
117
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
99
118
|
|
|
100
119
|
/**
|
|
101
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
102
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
103
|
-
*
|
|
104
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
105
|
-
*
|
|
106
|
-
* @returns {Promise<InitOutput>}
|
|
107
|
-
*/
|
|
120
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
121
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
122
|
+
*
|
|
123
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
124
|
+
*
|
|
125
|
+
* @returns {Promise<InitOutput>}
|
|
126
|
+
*/
|
|
108
127
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/pkg/ssp_wasm.js
CHANGED
|
@@ -1,4 +1,375 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./ssp_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
export class Sp00kyProcessor {
|
|
4
|
+
__destroy_into_raw() {
|
|
5
|
+
const ptr = this.__wbg_ptr;
|
|
6
|
+
this.__wbg_ptr = 0;
|
|
7
|
+
Sp00kyProcessorFinalization.unregister(this);
|
|
8
|
+
return ptr;
|
|
9
|
+
}
|
|
10
|
+
free() {
|
|
11
|
+
const ptr = this.__destroy_into_raw();
|
|
12
|
+
wasm.__wbg_sp00kyprocessor_free(ptr, 0);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Ingest a record into the stream processor
|
|
16
|
+
* @param {string} table
|
|
17
|
+
* @param {string} op
|
|
18
|
+
* @param {string} id
|
|
19
|
+
* @param {any} record
|
|
20
|
+
* @returns {any}
|
|
21
|
+
*/
|
|
22
|
+
ingest(table, op, id, record) {
|
|
23
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
24
|
+
const len0 = WASM_VECTOR_LEN;
|
|
25
|
+
const ptr1 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
26
|
+
const len1 = WASM_VECTOR_LEN;
|
|
27
|
+
const ptr2 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
28
|
+
const len2 = WASM_VECTOR_LEN;
|
|
29
|
+
const ret = wasm.sp00kyprocessor_ingest(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, record);
|
|
30
|
+
if (ret[2]) {
|
|
31
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
32
|
+
}
|
|
33
|
+
return takeFromExternrefTable0(ret[0]);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Load circuit state from a JSON string
|
|
37
|
+
* @param {string} state
|
|
38
|
+
*/
|
|
39
|
+
load_state(state) {
|
|
40
|
+
const ptr0 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
41
|
+
const len0 = WASM_VECTOR_LEN;
|
|
42
|
+
const ret = wasm.sp00kyprocessor_load_state(this.__wbg_ptr, ptr0, len0);
|
|
43
|
+
if (ret[1]) {
|
|
44
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
constructor() {
|
|
48
|
+
const ret = wasm.sp00kyprocessor_new();
|
|
49
|
+
this.__wbg_ptr = ret >>> 0;
|
|
50
|
+
Sp00kyProcessorFinalization.register(this, this.__wbg_ptr, this);
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Register a new materialized view
|
|
55
|
+
* @param {any} config
|
|
56
|
+
* @returns {any}
|
|
57
|
+
*/
|
|
58
|
+
register_view(config) {
|
|
59
|
+
const ret = wasm.sp00kyprocessor_register_view(this.__wbg_ptr, config);
|
|
60
|
+
if (ret[2]) {
|
|
61
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
62
|
+
}
|
|
63
|
+
return takeFromExternrefTable0(ret[0]);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Save the current circuit state as a JSON string
|
|
67
|
+
* @returns {string}
|
|
68
|
+
*/
|
|
69
|
+
save_state() {
|
|
70
|
+
let deferred2_0;
|
|
71
|
+
let deferred2_1;
|
|
72
|
+
try {
|
|
73
|
+
const ret = wasm.sp00kyprocessor_save_state(this.__wbg_ptr);
|
|
74
|
+
var ptr1 = ret[0];
|
|
75
|
+
var len1 = ret[1];
|
|
76
|
+
if (ret[3]) {
|
|
77
|
+
ptr1 = 0; len1 = 0;
|
|
78
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
79
|
+
}
|
|
80
|
+
deferred2_0 = ptr1;
|
|
81
|
+
deferred2_1 = len1;
|
|
82
|
+
return getStringFromWasm0(ptr1, len1);
|
|
83
|
+
} finally {
|
|
84
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Seed per-table `select` permission predicates so `register_view` can
|
|
89
|
+
* inject them (and so non-`_00_` tables aren't default-denied).
|
|
90
|
+
*
|
|
91
|
+
* Expects a `{ [table]: whereText }` object, where `whereText` is the raw
|
|
92
|
+
* `WHERE` expression from the table's `PERMISSIONS FOR select` clause
|
|
93
|
+
* (e.g. `"true"`, or `"owner = $auth.id"`). Called once at boot after the
|
|
94
|
+
* schema is parsed — mirrors the native boot path that reads `INFO FOR DB`.
|
|
95
|
+
* @param {any} permissions
|
|
96
|
+
*/
|
|
97
|
+
set_permissions(permissions) {
|
|
98
|
+
const ret = wasm.sp00kyprocessor_set_permissions(this.__wbg_ptr, permissions);
|
|
99
|
+
if (ret[1]) {
|
|
100
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Unregister a view by ID
|
|
105
|
+
* @param {string} id
|
|
106
|
+
*/
|
|
107
|
+
unregister_view(id) {
|
|
108
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
109
|
+
const len0 = WASM_VECTOR_LEN;
|
|
110
|
+
wasm.sp00kyprocessor_unregister_view(this.__wbg_ptr, ptr0, len0);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (Symbol.dispose) Sp00kyProcessor.prototype[Symbol.dispose] = Sp00kyProcessor.prototype.free;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Called when WASM module is loaded
|
|
117
|
+
*/
|
|
118
|
+
export function init() {
|
|
119
|
+
wasm.init();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function __wbg_get_imports() {
|
|
123
|
+
const import0 = {
|
|
124
|
+
__proto__: null,
|
|
125
|
+
__wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
|
|
126
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
127
|
+
return ret;
|
|
128
|
+
},
|
|
129
|
+
__wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
|
|
130
|
+
const ret = String(arg1);
|
|
131
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
132
|
+
const len1 = WASM_VECTOR_LEN;
|
|
133
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
134
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
135
|
+
},
|
|
136
|
+
__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
|
|
137
|
+
const v = arg1;
|
|
138
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
139
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
140
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
141
|
+
},
|
|
142
|
+
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
|
|
143
|
+
const v = arg0;
|
|
144
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
145
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
146
|
+
},
|
|
147
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
|
|
148
|
+
const ret = debugString(arg1);
|
|
149
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
150
|
+
const len1 = WASM_VECTOR_LEN;
|
|
151
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
152
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
153
|
+
},
|
|
154
|
+
__wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
|
|
155
|
+
const ret = arg0 in arg1;
|
|
156
|
+
return ret;
|
|
157
|
+
},
|
|
158
|
+
__wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
|
|
159
|
+
const ret = typeof(arg0) === 'bigint';
|
|
160
|
+
return ret;
|
|
161
|
+
},
|
|
162
|
+
__wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
|
|
163
|
+
const ret = typeof(arg0) === 'function';
|
|
164
|
+
return ret;
|
|
165
|
+
},
|
|
166
|
+
__wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
|
|
167
|
+
const val = arg0;
|
|
168
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
169
|
+
return ret;
|
|
170
|
+
},
|
|
171
|
+
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
|
|
172
|
+
const ret = arg0 === undefined;
|
|
173
|
+
return ret;
|
|
174
|
+
},
|
|
175
|
+
__wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
|
|
176
|
+
const ret = arg0 === arg1;
|
|
177
|
+
return ret;
|
|
178
|
+
},
|
|
179
|
+
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
|
|
180
|
+
const ret = arg0 == arg1;
|
|
181
|
+
return ret;
|
|
182
|
+
},
|
|
183
|
+
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
|
|
184
|
+
const obj = arg1;
|
|
185
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
186
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
187
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
188
|
+
},
|
|
189
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
|
|
190
|
+
const obj = arg1;
|
|
191
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
192
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
193
|
+
var len1 = WASM_VECTOR_LEN;
|
|
194
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
195
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
196
|
+
},
|
|
197
|
+
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
198
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
199
|
+
},
|
|
200
|
+
__wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
|
|
201
|
+
const ret = arg0.call(arg1);
|
|
202
|
+
return ret;
|
|
203
|
+
}, arguments); },
|
|
204
|
+
__wbg_done_57b39ecd9addfe81: function(arg0) {
|
|
205
|
+
const ret = arg0.done;
|
|
206
|
+
return ret;
|
|
207
|
+
},
|
|
208
|
+
__wbg_entries_58c7934c745daac7: function(arg0) {
|
|
209
|
+
const ret = Object.entries(arg0);
|
|
210
|
+
return ret;
|
|
211
|
+
},
|
|
212
|
+
__wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
|
|
213
|
+
const ret = arg0[arg1 >>> 0];
|
|
214
|
+
return ret;
|
|
215
|
+
},
|
|
216
|
+
__wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
|
|
217
|
+
const ret = Reflect.get(arg0, arg1);
|
|
218
|
+
return ret;
|
|
219
|
+
}, arguments); },
|
|
220
|
+
__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
|
|
221
|
+
let result;
|
|
222
|
+
try {
|
|
223
|
+
result = arg0 instanceof ArrayBuffer;
|
|
224
|
+
} catch (_) {
|
|
225
|
+
result = false;
|
|
226
|
+
}
|
|
227
|
+
const ret = result;
|
|
228
|
+
return ret;
|
|
229
|
+
},
|
|
230
|
+
__wbg_instanceof_Map_53af74335dec57f4: function(arg0) {
|
|
231
|
+
let result;
|
|
232
|
+
try {
|
|
233
|
+
result = arg0 instanceof Map;
|
|
234
|
+
} catch (_) {
|
|
235
|
+
result = false;
|
|
236
|
+
}
|
|
237
|
+
const ret = result;
|
|
238
|
+
return ret;
|
|
239
|
+
},
|
|
240
|
+
__wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
|
|
241
|
+
let result;
|
|
242
|
+
try {
|
|
243
|
+
result = arg0 instanceof Uint8Array;
|
|
244
|
+
} catch (_) {
|
|
245
|
+
result = false;
|
|
246
|
+
}
|
|
247
|
+
const ret = result;
|
|
248
|
+
return ret;
|
|
249
|
+
},
|
|
250
|
+
__wbg_isArray_d314bb98fcf08331: function(arg0) {
|
|
251
|
+
const ret = Array.isArray(arg0);
|
|
252
|
+
return ret;
|
|
253
|
+
},
|
|
254
|
+
__wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
|
|
255
|
+
const ret = Number.isSafeInteger(arg0);
|
|
256
|
+
return ret;
|
|
257
|
+
},
|
|
258
|
+
__wbg_iterator_6ff6560ca1568e55: function() {
|
|
259
|
+
const ret = Symbol.iterator;
|
|
260
|
+
return ret;
|
|
261
|
+
},
|
|
262
|
+
__wbg_length_32ed9a279acd054c: function(arg0) {
|
|
263
|
+
const ret = arg0.length;
|
|
264
|
+
return ret;
|
|
265
|
+
},
|
|
266
|
+
__wbg_length_35a7bace40f36eac: function(arg0) {
|
|
267
|
+
const ret = arg0.length;
|
|
268
|
+
return ret;
|
|
269
|
+
},
|
|
270
|
+
__wbg_log_6b5ca2e6124b2808: function(arg0) {
|
|
271
|
+
console.log(arg0);
|
|
272
|
+
},
|
|
273
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
274
|
+
const ret = new Object();
|
|
275
|
+
return ret;
|
|
276
|
+
},
|
|
277
|
+
__wbg_new_3eb36ae241fe6f44: function() {
|
|
278
|
+
const ret = new Array();
|
|
279
|
+
return ret;
|
|
280
|
+
},
|
|
281
|
+
__wbg_new_dd2b680c8bf6ae29: function(arg0) {
|
|
282
|
+
const ret = new Uint8Array(arg0);
|
|
283
|
+
return ret;
|
|
284
|
+
},
|
|
285
|
+
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
286
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
287
|
+
return ret;
|
|
288
|
+
},
|
|
289
|
+
__wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
|
|
290
|
+
const ret = arg0.next();
|
|
291
|
+
return ret;
|
|
292
|
+
}, arguments); },
|
|
293
|
+
__wbg_next_418f80d8f5303233: function(arg0) {
|
|
294
|
+
const ret = arg0.next;
|
|
295
|
+
return ret;
|
|
296
|
+
},
|
|
297
|
+
__wbg_now_2c95c9de01293173: function(arg0) {
|
|
298
|
+
const ret = arg0.now();
|
|
299
|
+
return ret;
|
|
300
|
+
},
|
|
301
|
+
__wbg_performance_7a3ffd0b17f663ad: function(arg0) {
|
|
302
|
+
const ret = arg0.performance;
|
|
303
|
+
return ret;
|
|
304
|
+
},
|
|
305
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
306
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
307
|
+
},
|
|
308
|
+
__wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
|
|
309
|
+
arg0[arg1] = arg2;
|
|
310
|
+
},
|
|
311
|
+
__wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
|
|
312
|
+
arg0[arg1 >>> 0] = arg2;
|
|
313
|
+
},
|
|
314
|
+
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
315
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
316
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
317
|
+
},
|
|
318
|
+
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
319
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
320
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
321
|
+
},
|
|
322
|
+
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
323
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
324
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
325
|
+
},
|
|
326
|
+
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
327
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
328
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
329
|
+
},
|
|
330
|
+
__wbg_value_0546255b415e96c1: function(arg0) {
|
|
331
|
+
const ret = arg0.value;
|
|
332
|
+
return ret;
|
|
333
|
+
},
|
|
334
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
335
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
336
|
+
const ret = arg0;
|
|
337
|
+
return ret;
|
|
338
|
+
},
|
|
339
|
+
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
340
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
341
|
+
const ret = arg0;
|
|
342
|
+
return ret;
|
|
343
|
+
},
|
|
344
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
345
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
346
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
347
|
+
return ret;
|
|
348
|
+
},
|
|
349
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
350
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
351
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
352
|
+
return ret;
|
|
353
|
+
},
|
|
354
|
+
__wbindgen_init_externref_table: function() {
|
|
355
|
+
const table = wasm.__wbindgen_externrefs;
|
|
356
|
+
const offset = table.grow(4);
|
|
357
|
+
table.set(0, undefined);
|
|
358
|
+
table.set(offset + 0, undefined);
|
|
359
|
+
table.set(offset + 1, null);
|
|
360
|
+
table.set(offset + 2, true);
|
|
361
|
+
table.set(offset + 3, false);
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
return {
|
|
365
|
+
__proto__: null,
|
|
366
|
+
"./ssp_wasm_bg.js": import0,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const Sp00kyProcessorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
371
|
+
? { register: () => {}, unregister: () => {} }
|
|
372
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sp00kyprocessor_free(ptr >>> 0, 1));
|
|
2
373
|
|
|
3
374
|
function addToExternrefTable0(obj) {
|
|
4
375
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -177,134 +548,33 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
177
548
|
read: arg.length,
|
|
178
549
|
written: buf.length
|
|
179
550
|
};
|
|
180
|
-
}
|
|
551
|
+
};
|
|
181
552
|
}
|
|
182
553
|
|
|
183
554
|
let WASM_VECTOR_LEN = 0;
|
|
184
555
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
SpookyProcessorFinalization.unregister(this);
|
|
194
|
-
return ptr;
|
|
195
|
-
}
|
|
196
|
-
free() {
|
|
197
|
-
const ptr = this.__destroy_into_raw();
|
|
198
|
-
wasm.__wbg_spookyprocessor_free(ptr, 0);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Load circuit state from a JSON string
|
|
202
|
-
* @param {string} state
|
|
203
|
-
*/
|
|
204
|
-
load_state(state) {
|
|
205
|
-
const ptr0 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
206
|
-
const len0 = WASM_VECTOR_LEN;
|
|
207
|
-
const ret = wasm.spookyprocessor_load_state(this.__wbg_ptr, ptr0, len0);
|
|
208
|
-
if (ret[1]) {
|
|
209
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Save the current circuit state as a JSON string
|
|
214
|
-
* @returns {string}
|
|
215
|
-
*/
|
|
216
|
-
save_state() {
|
|
217
|
-
let deferred2_0;
|
|
218
|
-
let deferred2_1;
|
|
219
|
-
try {
|
|
220
|
-
const ret = wasm.spookyprocessor_save_state(this.__wbg_ptr);
|
|
221
|
-
var ptr1 = ret[0];
|
|
222
|
-
var len1 = ret[1];
|
|
223
|
-
if (ret[3]) {
|
|
224
|
-
ptr1 = 0; len1 = 0;
|
|
225
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
226
|
-
}
|
|
227
|
-
deferred2_0 = ptr1;
|
|
228
|
-
deferred2_1 = len1;
|
|
229
|
-
return getStringFromWasm0(ptr1, len1);
|
|
230
|
-
} finally {
|
|
231
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Register a new materialized view
|
|
236
|
-
* @param {any} config
|
|
237
|
-
* @returns {any}
|
|
238
|
-
*/
|
|
239
|
-
register_view(config) {
|
|
240
|
-
const ret = wasm.spookyprocessor_register_view(this.__wbg_ptr, config);
|
|
241
|
-
if (ret[2]) {
|
|
242
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
243
|
-
}
|
|
244
|
-
return takeFromExternrefTable0(ret[0]);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Unregister a view by ID
|
|
248
|
-
* @param {string} id
|
|
249
|
-
*/
|
|
250
|
-
unregister_view(id) {
|
|
251
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
wasm.spookyprocessor_unregister_view(this.__wbg_ptr, ptr0, len0);
|
|
254
|
-
}
|
|
255
|
-
constructor() {
|
|
256
|
-
const ret = wasm.spookyprocessor_new();
|
|
257
|
-
this.__wbg_ptr = ret >>> 0;
|
|
258
|
-
SpookyProcessorFinalization.register(this, this.__wbg_ptr, this);
|
|
259
|
-
return this;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Ingest a record into the stream processor
|
|
263
|
-
* @param {string} table
|
|
264
|
-
* @param {string} op
|
|
265
|
-
* @param {string} id
|
|
266
|
-
* @param {any} record
|
|
267
|
-
* @returns {any}
|
|
268
|
-
*/
|
|
269
|
-
ingest(table, op, id, record) {
|
|
270
|
-
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
271
|
-
const len0 = WASM_VECTOR_LEN;
|
|
272
|
-
const ptr1 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
273
|
-
const len1 = WASM_VECTOR_LEN;
|
|
274
|
-
const ptr2 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
275
|
-
const len2 = WASM_VECTOR_LEN;
|
|
276
|
-
const ret = wasm.spookyprocessor_ingest(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, record);
|
|
277
|
-
if (ret[2]) {
|
|
278
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
279
|
-
}
|
|
280
|
-
return takeFromExternrefTable0(ret[0]);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
if (Symbol.dispose) SpookyProcessor.prototype[Symbol.dispose] = SpookyProcessor.prototype.free;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Called when WASM module is loaded
|
|
287
|
-
*/
|
|
288
|
-
export function init() {
|
|
289
|
-
wasm.init();
|
|
556
|
+
let wasmModule, wasm;
|
|
557
|
+
function __wbg_finalize_init(instance, module) {
|
|
558
|
+
wasm = instance.exports;
|
|
559
|
+
wasmModule = module;
|
|
560
|
+
cachedDataViewMemory0 = null;
|
|
561
|
+
cachedUint8ArrayMemory0 = null;
|
|
562
|
+
wasm.__wbindgen_start();
|
|
563
|
+
return wasm;
|
|
290
564
|
}
|
|
291
565
|
|
|
292
|
-
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
293
|
-
|
|
294
566
|
async function __wbg_load(module, imports) {
|
|
295
567
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
296
568
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
297
569
|
try {
|
|
298
570
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
299
571
|
} catch (e) {
|
|
300
|
-
const validResponse = module.ok &&
|
|
572
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
301
573
|
|
|
302
574
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
303
575
|
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);
|
|
304
576
|
|
|
305
|
-
} else {
|
|
306
|
-
throw e;
|
|
307
|
-
}
|
|
577
|
+
} else { throw e; }
|
|
308
578
|
}
|
|
309
579
|
}
|
|
310
580
|
|
|
@@ -319,237 +589,20 @@ async function __wbg_load(module, imports) {
|
|
|
319
589
|
return instance;
|
|
320
590
|
}
|
|
321
591
|
}
|
|
322
|
-
}
|
|
323
592
|
|
|
324
|
-
function
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
328
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
329
|
-
return ret;
|
|
330
|
-
};
|
|
331
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
332
|
-
const ret = String(arg1);
|
|
333
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
334
|
-
const len1 = WASM_VECTOR_LEN;
|
|
335
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
336
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
337
|
-
};
|
|
338
|
-
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
339
|
-
const v = arg1;
|
|
340
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
341
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
342
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
343
|
-
};
|
|
344
|
-
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
345
|
-
const v = arg0;
|
|
346
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
347
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
348
|
-
};
|
|
349
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
350
|
-
const ret = debugString(arg1);
|
|
351
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
352
|
-
const len1 = WASM_VECTOR_LEN;
|
|
353
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
354
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
355
|
-
};
|
|
356
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
357
|
-
const ret = arg0 in arg1;
|
|
358
|
-
return ret;
|
|
359
|
-
};
|
|
360
|
-
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
361
|
-
const ret = typeof(arg0) === 'bigint';
|
|
362
|
-
return ret;
|
|
363
|
-
};
|
|
364
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
365
|
-
const ret = typeof(arg0) === 'function';
|
|
366
|
-
return ret;
|
|
367
|
-
};
|
|
368
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
369
|
-
const val = arg0;
|
|
370
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
371
|
-
return ret;
|
|
372
|
-
};
|
|
373
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
374
|
-
const ret = arg0 === arg1;
|
|
375
|
-
return ret;
|
|
376
|
-
};
|
|
377
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
378
|
-
const ret = arg0 == arg1;
|
|
379
|
-
return ret;
|
|
380
|
-
};
|
|
381
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
382
|
-
const obj = arg1;
|
|
383
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
384
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
385
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
386
|
-
};
|
|
387
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
388
|
-
const obj = arg1;
|
|
389
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
390
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
391
|
-
var len1 = WASM_VECTOR_LEN;
|
|
392
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
393
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
394
|
-
};
|
|
395
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
396
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
397
|
-
};
|
|
398
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
399
|
-
const ret = arg0.call(arg1);
|
|
400
|
-
return ret;
|
|
401
|
-
}, arguments) };
|
|
402
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
403
|
-
const ret = arg0.done;
|
|
404
|
-
return ret;
|
|
405
|
-
};
|
|
406
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
407
|
-
const ret = Object.entries(arg0);
|
|
408
|
-
return ret;
|
|
409
|
-
};
|
|
410
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
411
|
-
const ret = arg0[arg1 >>> 0];
|
|
412
|
-
return ret;
|
|
413
|
-
};
|
|
414
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
415
|
-
const ret = Reflect.get(arg0, arg1);
|
|
416
|
-
return ret;
|
|
417
|
-
}, arguments) };
|
|
418
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
419
|
-
let result;
|
|
420
|
-
try {
|
|
421
|
-
result = arg0 instanceof ArrayBuffer;
|
|
422
|
-
} catch (_) {
|
|
423
|
-
result = false;
|
|
424
|
-
}
|
|
425
|
-
const ret = result;
|
|
426
|
-
return ret;
|
|
427
|
-
};
|
|
428
|
-
imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
|
|
429
|
-
let result;
|
|
430
|
-
try {
|
|
431
|
-
result = arg0 instanceof Map;
|
|
432
|
-
} catch (_) {
|
|
433
|
-
result = false;
|
|
434
|
-
}
|
|
435
|
-
const ret = result;
|
|
436
|
-
return ret;
|
|
437
|
-
};
|
|
438
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
439
|
-
let result;
|
|
440
|
-
try {
|
|
441
|
-
result = arg0 instanceof Uint8Array;
|
|
442
|
-
} catch (_) {
|
|
443
|
-
result = false;
|
|
593
|
+
function expectedResponseType(type) {
|
|
594
|
+
switch (type) {
|
|
595
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
444
596
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
};
|
|
448
|
-
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
449
|
-
const ret = Array.isArray(arg0);
|
|
450
|
-
return ret;
|
|
451
|
-
};
|
|
452
|
-
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
453
|
-
const ret = Number.isSafeInteger(arg0);
|
|
454
|
-
return ret;
|
|
455
|
-
};
|
|
456
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
457
|
-
const ret = Symbol.iterator;
|
|
458
|
-
return ret;
|
|
459
|
-
};
|
|
460
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
461
|
-
const ret = arg0.length;
|
|
462
|
-
return ret;
|
|
463
|
-
};
|
|
464
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
465
|
-
const ret = arg0.length;
|
|
466
|
-
return ret;
|
|
467
|
-
};
|
|
468
|
-
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
469
|
-
console.log(arg0);
|
|
470
|
-
};
|
|
471
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
472
|
-
const ret = new Object();
|
|
473
|
-
return ret;
|
|
474
|
-
};
|
|
475
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
476
|
-
const ret = new Array();
|
|
477
|
-
return ret;
|
|
478
|
-
};
|
|
479
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
480
|
-
const ret = new Uint8Array(arg0);
|
|
481
|
-
return ret;
|
|
482
|
-
};
|
|
483
|
-
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
484
|
-
const ret = arg0.next;
|
|
485
|
-
return ret;
|
|
486
|
-
};
|
|
487
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
488
|
-
const ret = arg0.next();
|
|
489
|
-
return ret;
|
|
490
|
-
}, arguments) };
|
|
491
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
492
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
493
|
-
};
|
|
494
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
495
|
-
arg0[arg1] = arg2;
|
|
496
|
-
};
|
|
497
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
498
|
-
arg0[arg1 >>> 0] = arg2;
|
|
499
|
-
};
|
|
500
|
-
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
501
|
-
const ret = arg0.value;
|
|
502
|
-
return ret;
|
|
503
|
-
};
|
|
504
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
505
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
506
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
507
|
-
return ret;
|
|
508
|
-
};
|
|
509
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
510
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
511
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
512
|
-
return ret;
|
|
513
|
-
};
|
|
514
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
515
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
516
|
-
const ret = arg0;
|
|
517
|
-
return ret;
|
|
518
|
-
};
|
|
519
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
520
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
521
|
-
const ret = arg0;
|
|
522
|
-
return ret;
|
|
523
|
-
};
|
|
524
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
525
|
-
const table = wasm.__wbindgen_externrefs;
|
|
526
|
-
const offset = table.grow(4);
|
|
527
|
-
table.set(0, undefined);
|
|
528
|
-
table.set(offset + 0, undefined);
|
|
529
|
-
table.set(offset + 1, null);
|
|
530
|
-
table.set(offset + 2, true);
|
|
531
|
-
table.set(offset + 3, false);
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
return imports;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function __wbg_finalize_init(instance, module) {
|
|
538
|
-
wasm = instance.exports;
|
|
539
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
540
|
-
cachedDataViewMemory0 = null;
|
|
541
|
-
cachedUint8ArrayMemory0 = null;
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
wasm.__wbindgen_start();
|
|
545
|
-
return wasm;
|
|
597
|
+
return false;
|
|
598
|
+
}
|
|
546
599
|
}
|
|
547
600
|
|
|
548
601
|
function initSync(module) {
|
|
549
602
|
if (wasm !== undefined) return wasm;
|
|
550
603
|
|
|
551
604
|
|
|
552
|
-
if (
|
|
605
|
+
if (module !== undefined) {
|
|
553
606
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
554
607
|
({module} = module)
|
|
555
608
|
} else {
|
|
@@ -569,7 +622,7 @@ async function __wbg_init(module_or_path) {
|
|
|
569
622
|
if (wasm !== undefined) return wasm;
|
|
570
623
|
|
|
571
624
|
|
|
572
|
-
if (
|
|
625
|
+
if (module_or_path !== undefined) {
|
|
573
626
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
574
627
|
({module_or_path} = module_or_path)
|
|
575
628
|
} else {
|
|
@@ -577,7 +630,7 @@ async function __wbg_init(module_or_path) {
|
|
|
577
630
|
}
|
|
578
631
|
}
|
|
579
632
|
|
|
580
|
-
if (
|
|
633
|
+
if (module_or_path === undefined) {
|
|
581
634
|
module_or_path = new URL('ssp_wasm_bg.wasm', import.meta.url);
|
|
582
635
|
}
|
|
583
636
|
const imports = __wbg_get_imports();
|
|
@@ -591,5 +644,4 @@ async function __wbg_init(module_or_path) {
|
|
|
591
644
|
return __wbg_finalize_init(instance, module);
|
|
592
645
|
}
|
|
593
646
|
|
|
594
|
-
export { initSync };
|
|
595
|
-
export default __wbg_init;
|
|
647
|
+
export { initSync, __wbg_init as default };
|
package/pkg/ssp_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
4
|
+
export const __wbg_sp00kyprocessor_free: (a: number, b: number) => void;
|
|
5
5
|
export const init: () => void;
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
6
|
+
export const sp00kyprocessor_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any) => [number, number, number];
|
|
7
|
+
export const sp00kyprocessor_load_state: (a: number, b: number, c: number) => [number, number];
|
|
8
|
+
export const sp00kyprocessor_new: () => number;
|
|
9
|
+
export const sp00kyprocessor_register_view: (a: number, b: any) => [number, number, number];
|
|
10
|
+
export const sp00kyprocessor_save_state: (a: number) => [number, number, number, number];
|
|
11
|
+
export const sp00kyprocessor_set_permissions: (a: number, b: any) => [number, number];
|
|
12
|
+
export const sp00kyprocessor_unregister_view: (a: number, b: number, c: number) => void;
|
|
12
13
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
13
14
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
14
15
|
export const __wbindgen_exn_store: (a: number) => void;
|