@lemmabase/lemma-engine 0.9.8 → 0.9.9
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/README.md +21 -8
- package/lemma.bindings.d.ts +24 -13
- package/lemma.bindings.js +124 -94
- package/lemma.d.ts +24 -20
- package/lemma.iife.js +1 -1
- package/lemma_bg.wasm +0 -0
- package/lemma_bg.wasm.d.ts +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ const response = engine.run({ spec: 'pricing', data: { quantity: 50, is_vip: fal
|
|
|
35
35
|
// response.results.total → 800 eur
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
The `Response` carries every rule's value (or `veto` if no result could be computed). When inputs are still unbound, that rule includes `missing_data` (`string[]` input keys). Types,
|
|
38
|
+
The `Response` carries every rule's value (or `veto` if no result could be computed). When inputs are still unbound, that rule includes `missing_data` (`string[]` input keys). Types, filled literals, and suggestions are on `engine.show(...)` (`Show.data`) only, not on the evaluate response.
|
|
39
39
|
|
|
40
40
|
## Why use it from JavaScript?
|
|
41
41
|
|
|
@@ -112,33 +112,46 @@ A pre-wired Monaco adapter ships at `@lemmabase/lemma-engine/monaco`.
|
|
|
112
112
|
| Method | Description |
|
|
113
113
|
|--------|-------------|
|
|
114
114
|
| `load(code)` | Load inline Lemma source as a volatile workspace source |
|
|
115
|
-
| `load(sources)` | Load multiple sources in one planning pass (`Record<label, text>` or `[label, code][]`; object keys keep insertion order; `@org/pkg` keys tag
|
|
116
|
-
| `
|
|
115
|
+
| `load(sources)` | Load multiple sources in one planning pass (`Record<label, text>` or `[label, code][]`; object keys keep insertion order; `@org/pkg` keys tag LemmaBase repositories) |
|
|
116
|
+
| `Engine.withLimits(limits)` | Static: create engine with named limit overrides (unknown keys throw) |
|
|
117
|
+
| `Engine.fromSnapshot(bytes)` | Static: restore engine from `snapshot()` bytes (`Uint8Array`) |
|
|
118
|
+
| `install(name)` | Download a repository from LemmaBase; resolves with `{ source, id }`. Does not load. Rejects with `EngineError[]`. |
|
|
117
119
|
| `list()` | Slim catalog: `ResolvedRepository[]` with `repository` and temporal `specs` rows. Always includes embedded `lemma` / `spec units`. |
|
|
118
120
|
| `show(repo, name, effective?)` | Spec interface + temporal window; `repo` null for workspace. |
|
|
119
121
|
| `source(repo, spec?, effective?)` | Canonical Lemma source text. Omit `spec` for whole repository. |
|
|
120
122
|
| `run({ spec, repository?, effective?, data?, rules?, explain? })` | Evaluate. Omit `rules` for all rules; pass a non-empty array to scope. `[]` errors. Returns a `Response`. `explain: true` adds per-rule explanation trees. |
|
|
121
123
|
| `remove(repo, name, effective?)` | Remove a temporal spec slice. |
|
|
122
|
-
| `update(repo,
|
|
124
|
+
| `update(repo, code, attribute?)` | Upsert identities from `code`; Path/Dependency prune siblings with that label. |
|
|
123
125
|
| `limits()` | Resource limits for this engine. |
|
|
126
|
+
| `snapshot()` | Opaque bytes of parsed specs + plans + limits. Restore with `Engine.fromSnapshot`. |
|
|
124
127
|
| `quality()` | Structural quality recommendations across loaded specs (advisory only). |
|
|
125
128
|
| `format(code, attribute?)` | Canonical formatting; throws `EngineError` on parse error. |
|
|
126
129
|
|
|
127
130
|
Full TypeScript types are bundled - see `lemma.d.ts`.
|
|
128
131
|
|
|
129
|
-
|
|
132
|
+
Persist and restore without re-parsing (Node):
|
|
130
133
|
|
|
131
|
-
|
|
134
|
+
```javascript
|
|
135
|
+
import { writeFileSync, readFileSync } from 'node:fs';
|
|
136
|
+
|
|
137
|
+
const bytes = engine.snapshot();
|
|
138
|
+
writeFileSync('engine.lems', bytes);
|
|
139
|
+
const restored = Engine.fromSnapshot(readFileSync('engine.lems'));
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Install from LemmaBase
|
|
143
|
+
|
|
144
|
+
Specs that reference `uses … @org/pkg` need that repository available. `install` downloads via the host `fetch` (LemmaBase at `https://lemmabase.com`); call `load` with the repository id as the source label, then load your workspace:
|
|
132
145
|
|
|
133
146
|
```javascript
|
|
134
147
|
import { Lemma } from '@lemmabase/lemma-engine';
|
|
135
148
|
|
|
136
149
|
const engine = await Lemma();
|
|
137
|
-
const { source, id } = await engine.
|
|
150
|
+
const { source, id } = await engine.install('@iso/countries');
|
|
138
151
|
await engine.load({ [id]: source, 'app.lemma': sourceThatUsesStd });
|
|
139
152
|
```
|
|
140
153
|
|
|
141
|
-
In the browser,
|
|
154
|
+
In the browser, LemmaBase must allow your origin (CORS). Use `https` or `http://localhost` when using `install`.
|
|
142
155
|
|
|
143
156
|
## Status
|
|
144
157
|
|
package/lemma.bindings.d.ts
CHANGED
|
@@ -11,15 +11,19 @@ export type ReadableStreamType = "bytes";
|
|
|
11
11
|
export class Engine {
|
|
12
12
|
free(): void;
|
|
13
13
|
[Symbol.dispose](): void;
|
|
14
|
-
/**
|
|
15
|
-
* Download Lemma source for a registry identifier via [`crate::registry::LemmaBase`]. Returns `{ source, id }`.
|
|
16
|
-
* Does not load this [`WasmEngine`]; call [`Self::load`] with `{ [id]: source }`.
|
|
17
|
-
*/
|
|
18
|
-
fetch(name: string): Promise<any>;
|
|
19
14
|
/**
|
|
20
15
|
* Returns formatted source string on success; throws with error message on failure.
|
|
21
16
|
*/
|
|
22
17
|
format(code: string, attribute?: string | null): any;
|
|
18
|
+
/**
|
|
19
|
+
* Restore an engine from [`Engine::snapshot`] bytes.
|
|
20
|
+
*/
|
|
21
|
+
static fromSnapshot(bytes: Uint8Array): Engine;
|
|
22
|
+
/**
|
|
23
|
+
* Download Lemma source for a LemmaBase repository identifier via the host's
|
|
24
|
+
* global `fetch`. Returns `{ source, id }`. Does not load this engine.
|
|
25
|
+
*/
|
|
26
|
+
install(name: string): Promise<any>;
|
|
23
27
|
/**
|
|
24
28
|
* Resource limits configured for this engine.
|
|
25
29
|
*/
|
|
@@ -53,19 +57,23 @@ export class Engine {
|
|
|
53
57
|
*/
|
|
54
58
|
run(options: any): any;
|
|
55
59
|
/**
|
|
56
|
-
* Spec
|
|
60
|
+
* Spec data catalog and temporal window at `effective`. Lemma text is [`Self::source`].
|
|
57
61
|
*/
|
|
58
62
|
show(repository: string | null | undefined, spec: string, effective?: string | null): any;
|
|
63
|
+
/**
|
|
64
|
+
* Persist parsed specs + plans + limits as opaque bytes (see [`Engine::snapshot`]).
|
|
65
|
+
*/
|
|
66
|
+
snapshot(): Uint8Array;
|
|
59
67
|
/**
|
|
60
68
|
* Formatted canonical Lemma source. Omit `spec` for whole-repository text.
|
|
61
69
|
*/
|
|
62
70
|
source(repository?: string | null, spec?: string | null, effective?: string | null): string;
|
|
63
71
|
/**
|
|
64
|
-
* Replace
|
|
72
|
+
* Replace identities in `code` (atomic upsert; Path/Dependency prune siblings).
|
|
65
73
|
*
|
|
66
74
|
* `attribute` is the source label (path or `@owner/repo`). Omit for a volatile source.
|
|
67
75
|
*/
|
|
68
|
-
update(repository: string | null | undefined,
|
|
76
|
+
update(repository: string | null | undefined, code: string, attribute?: string | null): void;
|
|
69
77
|
/**
|
|
70
78
|
* Create an engine with custom [`crate::ResourceLimits`].
|
|
71
79
|
*
|
|
@@ -135,8 +143,9 @@ export interface InitOutput {
|
|
|
135
143
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
136
144
|
readonly intounderlyingsource_pull: (a: number, b: number) => number;
|
|
137
145
|
readonly __wbg_engine_free: (a: number, b: number) => void;
|
|
138
|
-
readonly engine_fetch: (a: number, b: number, c: number) => number;
|
|
139
146
|
readonly engine_format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
147
|
+
readonly engine_fromSnapshot: (a: number, b: number, c: number) => void;
|
|
148
|
+
readonly engine_install: (a: number, b: number, c: number) => number;
|
|
140
149
|
readonly engine_limits: (a: number, b: number) => void;
|
|
141
150
|
readonly engine_list: (a: number, b: number) => void;
|
|
142
151
|
readonly engine_load: (a: number, b: number, c: number) => void;
|
|
@@ -145,12 +154,14 @@ export interface InitOutput {
|
|
|
145
154
|
readonly engine_remove: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
146
155
|
readonly engine_run: (a: number, b: number, c: number) => void;
|
|
147
156
|
readonly engine_show: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
157
|
+
readonly engine_snapshot: (a: number, b: number) => void;
|
|
148
158
|
readonly engine_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
149
|
-
readonly engine_update: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number
|
|
159
|
+
readonly engine_update: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
150
160
|
readonly engine_withLimits: (a: number, b: number) => void;
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
161
|
+
readonly __wasm_bindgen_func_elem_13544: (a: number, b: number, c: number, d: number) => void;
|
|
162
|
+
readonly __wasm_bindgen_func_elem_2736: (a: number, b: number, c: number, d: number) => void;
|
|
163
|
+
readonly __wasm_bindgen_func_elem_13550: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
+
readonly __wasm_bindgen_func_elem_7929: (a: number, b: number) => void;
|
|
154
165
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
155
166
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
156
167
|
readonly __wbindgen_export3: (a: number) => void;
|
package/lemma.bindings.js
CHANGED
|
@@ -17,18 +17,6 @@ export class Engine {
|
|
|
17
17
|
const ptr = this.__destroy_into_raw();
|
|
18
18
|
wasm.__wbg_engine_free(ptr, 0);
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Download Lemma source for a registry identifier via [`crate::registry::LemmaBase`]. Returns `{ source, id }`.
|
|
22
|
-
* Does not load this [`WasmEngine`]; call [`Self::load`] with `{ [id]: source }`.
|
|
23
|
-
* @param {string} name
|
|
24
|
-
* @returns {Promise<any>}
|
|
25
|
-
*/
|
|
26
|
-
fetch(name) {
|
|
27
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
28
|
-
const len0 = WASM_VECTOR_LEN;
|
|
29
|
-
const ret = wasm.engine_fetch(this.__wbg_ptr, ptr0, len0);
|
|
30
|
-
return takeObject(ret);
|
|
31
|
-
}
|
|
32
20
|
/**
|
|
33
21
|
* Returns formatted source string on success; throws with error message on failure.
|
|
34
22
|
* @param {string} code
|
|
@@ -54,6 +42,40 @@ export class Engine {
|
|
|
54
42
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
55
43
|
}
|
|
56
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Restore an engine from [`Engine::snapshot`] bytes.
|
|
47
|
+
* @param {Uint8Array} bytes
|
|
48
|
+
* @returns {Engine}
|
|
49
|
+
*/
|
|
50
|
+
static fromSnapshot(bytes) {
|
|
51
|
+
try {
|
|
52
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
53
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
54
|
+
const len0 = WASM_VECTOR_LEN;
|
|
55
|
+
wasm.engine_fromSnapshot(retptr, ptr0, len0);
|
|
56
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
57
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
58
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
59
|
+
if (r2) {
|
|
60
|
+
throw takeObject(r1);
|
|
61
|
+
}
|
|
62
|
+
return Engine.__wrap(r0);
|
|
63
|
+
} finally {
|
|
64
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Download Lemma source for a LemmaBase repository identifier via the host's
|
|
69
|
+
* global `fetch`. Returns `{ source, id }`. Does not load this engine.
|
|
70
|
+
* @param {string} name
|
|
71
|
+
* @returns {Promise<any>}
|
|
72
|
+
*/
|
|
73
|
+
install(name) {
|
|
74
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
75
|
+
const len0 = WASM_VECTOR_LEN;
|
|
76
|
+
const ret = wasm.engine_install(this.__wbg_ptr, ptr0, len0);
|
|
77
|
+
return takeObject(ret);
|
|
78
|
+
}
|
|
57
79
|
/**
|
|
58
80
|
* Resource limits configured for this engine.
|
|
59
81
|
* @returns {any}
|
|
@@ -187,7 +209,7 @@ export class Engine {
|
|
|
187
209
|
}
|
|
188
210
|
}
|
|
189
211
|
/**
|
|
190
|
-
* Spec
|
|
212
|
+
* Spec data catalog and temporal window at `effective`. Lemma text is [`Self::source`].
|
|
191
213
|
* @param {string | null | undefined} repository
|
|
192
214
|
* @param {string} spec
|
|
193
215
|
* @param {string | null} [effective]
|
|
@@ -214,6 +236,28 @@ export class Engine {
|
|
|
214
236
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
215
237
|
}
|
|
216
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Persist parsed specs + plans + limits as opaque bytes (see [`Engine::snapshot`]).
|
|
241
|
+
* @returns {Uint8Array}
|
|
242
|
+
*/
|
|
243
|
+
snapshot() {
|
|
244
|
+
try {
|
|
245
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
246
|
+
wasm.engine_snapshot(retptr, this.__wbg_ptr);
|
|
247
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
248
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
249
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
250
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
251
|
+
if (r3) {
|
|
252
|
+
throw takeObject(r2);
|
|
253
|
+
}
|
|
254
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
255
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
256
|
+
return v1;
|
|
257
|
+
} finally {
|
|
258
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
217
261
|
/**
|
|
218
262
|
* Formatted canonical Lemma source. Omit `spec` for whole-repository text.
|
|
219
263
|
* @param {string | null} [repository]
|
|
@@ -252,29 +296,23 @@ export class Engine {
|
|
|
252
296
|
}
|
|
253
297
|
}
|
|
254
298
|
/**
|
|
255
|
-
* Replace
|
|
299
|
+
* Replace identities in `code` (atomic upsert; Path/Dependency prune siblings).
|
|
256
300
|
*
|
|
257
301
|
* `attribute` is the source label (path or `@owner/repo`). Omit for a volatile source.
|
|
258
302
|
* @param {string | null | undefined} repository
|
|
259
|
-
* @param {string} spec
|
|
260
|
-
* @param {string | null | undefined} effective
|
|
261
303
|
* @param {string} code
|
|
262
304
|
* @param {string | null} [attribute]
|
|
263
305
|
*/
|
|
264
|
-
update(repository,
|
|
306
|
+
update(repository, code, attribute) {
|
|
265
307
|
try {
|
|
266
308
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
267
309
|
var ptr0 = isLikeNone(repository) ? 0 : passStringToWasm0(repository, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
268
310
|
var len0 = WASM_VECTOR_LEN;
|
|
269
|
-
const ptr1 = passStringToWasm0(
|
|
311
|
+
const ptr1 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
270
312
|
const len1 = WASM_VECTOR_LEN;
|
|
271
|
-
var ptr2 = isLikeNone(
|
|
313
|
+
var ptr2 = isLikeNone(attribute) ? 0 : passStringToWasm0(attribute, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
272
314
|
var len2 = WASM_VECTOR_LEN;
|
|
273
|
-
|
|
274
|
-
const len3 = WASM_VECTOR_LEN;
|
|
275
|
-
var ptr4 = isLikeNone(attribute) ? 0 : passStringToWasm0(attribute, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
276
|
-
var len4 = WASM_VECTOR_LEN;
|
|
277
|
-
wasm.engine_update(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
315
|
+
wasm.engine_update(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
278
316
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
317
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
318
|
if (r1) {
|
|
@@ -509,10 +547,6 @@ function __wbg_get_imports() {
|
|
|
509
547
|
const ret = typeof(val) === 'object' && val !== null;
|
|
510
548
|
return ret;
|
|
511
549
|
},
|
|
512
|
-
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
513
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
514
|
-
return ret;
|
|
515
|
-
},
|
|
516
550
|
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
517
551
|
const ret = getObject(arg0) === undefined;
|
|
518
552
|
return ret;
|
|
@@ -545,6 +579,9 @@ function __wbg_get_imports() {
|
|
|
545
579
|
__wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
|
|
546
580
|
getObject(arg0)._wbg_cb_unref();
|
|
547
581
|
},
|
|
582
|
+
__wbg_abort_8bae0f33e7833997: function(arg0) {
|
|
583
|
+
getObject(arg0).abort();
|
|
584
|
+
},
|
|
548
585
|
__wbg_buffer_54b87055582c8a81: function(arg0) {
|
|
549
586
|
const ret = getObject(arg0).buffer;
|
|
550
587
|
return addHeapObject(ret);
|
|
@@ -569,6 +606,10 @@ function __wbg_get_imports() {
|
|
|
569
606
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
570
607
|
return addHeapObject(ret);
|
|
571
608
|
}, arguments); },
|
|
609
|
+
__wbg_call_e3b662382210db98: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
610
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
611
|
+
return addHeapObject(ret);
|
|
612
|
+
}, arguments); },
|
|
572
613
|
__wbg_close_1e6096d41f7ce5d0: function(arg0) {
|
|
573
614
|
const ret = getObject(arg0).close();
|
|
574
615
|
return addHeapObject(ret);
|
|
@@ -601,10 +642,6 @@ function __wbg_get_imports() {
|
|
|
601
642
|
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
602
643
|
}
|
|
603
644
|
},
|
|
604
|
-
__wbg_fetch_9b478faef8cda538: function(arg0) {
|
|
605
|
-
const ret = fetch(getObject(arg0));
|
|
606
|
-
return addHeapObject(ret);
|
|
607
|
-
},
|
|
608
645
|
__wbg_from_13e323c65fc8f464: function(arg0) {
|
|
609
646
|
const ret = Array.from(getObject(arg0));
|
|
610
647
|
return addHeapObject(ret);
|
|
@@ -625,6 +662,10 @@ function __wbg_get_imports() {
|
|
|
625
662
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
626
663
|
return addHeapObject(ret);
|
|
627
664
|
},
|
|
665
|
+
__wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
|
|
666
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
667
|
+
return addHeapObject(ret);
|
|
668
|
+
}, arguments); },
|
|
628
669
|
__wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
|
|
629
670
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
630
671
|
return addHeapObject(ret);
|
|
@@ -637,6 +678,10 @@ function __wbg_get_imports() {
|
|
|
637
678
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
638
679
|
return addHeapObject(ret);
|
|
639
680
|
},
|
|
681
|
+
__wbg_headers_cf9c80f30e2a4eff: function(arg0) {
|
|
682
|
+
const ret = getObject(arg0).headers;
|
|
683
|
+
return addHeapObject(ret);
|
|
684
|
+
},
|
|
640
685
|
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
641
686
|
let result;
|
|
642
687
|
try {
|
|
@@ -647,20 +692,20 @@ function __wbg_get_imports() {
|
|
|
647
692
|
const ret = result;
|
|
648
693
|
return ret;
|
|
649
694
|
},
|
|
650
|
-
|
|
695
|
+
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
651
696
|
let result;
|
|
652
697
|
try {
|
|
653
|
-
result = getObject(arg0) instanceof
|
|
698
|
+
result = getObject(arg0) instanceof Map;
|
|
654
699
|
} catch (_) {
|
|
655
700
|
result = false;
|
|
656
701
|
}
|
|
657
702
|
const ret = result;
|
|
658
703
|
return ret;
|
|
659
704
|
},
|
|
660
|
-
|
|
705
|
+
__wbg_instanceof_Object_33f20e6f12439f3e: function(arg0) {
|
|
661
706
|
let result;
|
|
662
707
|
try {
|
|
663
|
-
result = getObject(arg0) instanceof
|
|
708
|
+
result = getObject(arg0) instanceof Object;
|
|
664
709
|
} catch (_) {
|
|
665
710
|
result = false;
|
|
666
711
|
}
|
|
@@ -711,18 +756,6 @@ function __wbg_get_imports() {
|
|
|
711
756
|
const ret = getObject(arg0).length;
|
|
712
757
|
return ret;
|
|
713
758
|
},
|
|
714
|
-
__wbg_message_8326fb1d549bebc5: function(arg0) {
|
|
715
|
-
const ret = getObject(arg0).message;
|
|
716
|
-
return addHeapObject(ret);
|
|
717
|
-
},
|
|
718
|
-
__wbg_name_b0b4809690944614: function(arg0) {
|
|
719
|
-
const ret = getObject(arg0).name;
|
|
720
|
-
return addHeapObject(ret);
|
|
721
|
-
},
|
|
722
|
-
__wbg_new_08cb2fa678b17a48: function() { return handleError(function (arg0, arg1) {
|
|
723
|
-
const ret = new URL(getStringFromWasm0(arg0, arg1));
|
|
724
|
-
return addHeapObject(ret);
|
|
725
|
-
}, arguments); },
|
|
726
759
|
__wbg_new_0_3da9e97f24fc69be: function() {
|
|
727
760
|
const ret = new Date();
|
|
728
761
|
return addHeapObject(ret);
|
|
@@ -739,6 +772,10 @@ function __wbg_get_imports() {
|
|
|
739
772
|
const ret = new Array();
|
|
740
773
|
return addHeapObject(ret);
|
|
741
774
|
},
|
|
775
|
+
__wbg_new_4339b2a2675a03e3: function() { return handleError(function () {
|
|
776
|
+
const ret = new AbortController();
|
|
777
|
+
return addHeapObject(ret);
|
|
778
|
+
}, arguments); },
|
|
742
779
|
__wbg_new_b667d279fd5aa943: function(arg0, arg1) {
|
|
743
780
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
744
781
|
return addHeapObject(ret);
|
|
@@ -755,10 +792,6 @@ function __wbg_get_imports() {
|
|
|
755
792
|
const ret = new Object();
|
|
756
793
|
return addHeapObject(ret);
|
|
757
794
|
},
|
|
758
|
-
__wbg_new_f0787df90791d9ba: function() { return handleError(function () {
|
|
759
|
-
const ret = new URLSearchParams();
|
|
760
|
-
return addHeapObject(ret);
|
|
761
|
-
}, arguments); },
|
|
762
795
|
__wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
|
|
763
796
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
764
797
|
return addHeapObject(ret);
|
|
@@ -770,7 +803,7 @@ function __wbg_get_imports() {
|
|
|
770
803
|
const a = state0.a;
|
|
771
804
|
state0.a = 0;
|
|
772
805
|
try {
|
|
773
|
-
return
|
|
806
|
+
return __wasm_bindgen_func_elem_13550(a, state0.b, arg0, arg1);
|
|
774
807
|
} finally {
|
|
775
808
|
state0.a = a;
|
|
776
809
|
}
|
|
@@ -785,10 +818,6 @@ function __wbg_get_imports() {
|
|
|
785
818
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
786
819
|
return addHeapObject(ret);
|
|
787
820
|
},
|
|
788
|
-
__wbg_new_with_str_54bc0f9c32770e1e: function() { return handleError(function (arg0, arg1) {
|
|
789
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1));
|
|
790
|
-
return addHeapObject(ret);
|
|
791
|
-
}, arguments); },
|
|
792
821
|
__wbg_new_with_str_and_init_d95cbe11ce28e65e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
793
822
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
794
823
|
return addHeapObject(ret);
|
|
@@ -805,10 +834,6 @@ function __wbg_get_imports() {
|
|
|
805
834
|
const ret = getObject(arg0).next();
|
|
806
835
|
return addHeapObject(ret);
|
|
807
836
|
}, arguments); },
|
|
808
|
-
__wbg_ok_acc5e3fb89668864: function(arg0) {
|
|
809
|
-
const ret = getObject(arg0).ok;
|
|
810
|
-
return ret;
|
|
811
|
-
},
|
|
812
837
|
__wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
|
|
813
838
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
814
839
|
return addHeapObject(ret);
|
|
@@ -837,13 +862,9 @@ function __wbg_get_imports() {
|
|
|
837
862
|
__wbg_respond_510e32df8aeb6817: function() { return handleError(function (arg0, arg1) {
|
|
838
863
|
getObject(arg0).respond(arg1 >>> 0);
|
|
839
864
|
}, arguments); },
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
const len1 = WASM_VECTOR_LEN;
|
|
844
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
845
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
846
|
-
},
|
|
865
|
+
__wbg_set_0de9c62c23d04ad5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
866
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
867
|
+
}, arguments); },
|
|
847
868
|
__wbg_set_4d7dd76f3dae2926: function(arg0, arg1, arg2) {
|
|
848
869
|
getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
|
|
849
870
|
},
|
|
@@ -859,8 +880,12 @@ function __wbg_get_imports() {
|
|
|
859
880
|
__wbg_set_method_5532d59b92d76467: function(arg0, arg1, arg2) {
|
|
860
881
|
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
861
882
|
},
|
|
862
|
-
|
|
863
|
-
getObject(arg0).
|
|
883
|
+
__wbg_set_signal_c4ef8faddb4c1446: function(arg0, arg1) {
|
|
884
|
+
getObject(arg0).signal = getObject(arg1);
|
|
885
|
+
},
|
|
886
|
+
__wbg_signal_dad7cb35193abd31: function(arg0) {
|
|
887
|
+
const ret = getObject(arg0).signal;
|
|
888
|
+
return addHeapObject(ret);
|
|
864
889
|
},
|
|
865
890
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
866
891
|
const ret = getObject(arg1).stack;
|
|
@@ -905,17 +930,6 @@ function __wbg_get_imports() {
|
|
|
905
930
|
const ret = getObject(arg0).toString();
|
|
906
931
|
return addHeapObject(ret);
|
|
907
932
|
},
|
|
908
|
-
__wbg_toString_bac9199ff382784d: function(arg0) {
|
|
909
|
-
const ret = getObject(arg0).toString();
|
|
910
|
-
return addHeapObject(ret);
|
|
911
|
-
},
|
|
912
|
-
__wbg_url_f6cd241d61f89b82: function(arg0, arg1) {
|
|
913
|
-
const ret = getObject(arg1).url;
|
|
914
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
915
|
-
const len1 = WASM_VECTOR_LEN;
|
|
916
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
917
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
918
|
-
},
|
|
919
933
|
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
920
934
|
const ret = getObject(arg0).value;
|
|
921
935
|
return addHeapObject(ret);
|
|
@@ -929,31 +943,36 @@ function __wbg_get_imports() {
|
|
|
929
943
|
return addHeapObject(ret);
|
|
930
944
|
},
|
|
931
945
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
932
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
933
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
946
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1470, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
947
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_13544);
|
|
934
948
|
return addHeapObject(ret);
|
|
935
949
|
},
|
|
936
950
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
937
951
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IteratorResult<any>")], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
938
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
952
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2736);
|
|
939
953
|
return addHeapObject(ret);
|
|
940
954
|
},
|
|
941
|
-
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
955
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
956
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 913, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
957
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_7929);
|
|
958
|
+
return addHeapObject(ret);
|
|
959
|
+
},
|
|
960
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
942
961
|
// Cast intrinsic for `F64 -> Externref`.
|
|
943
962
|
const ret = arg0;
|
|
944
963
|
return addHeapObject(ret);
|
|
945
964
|
},
|
|
946
|
-
|
|
965
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
947
966
|
// Cast intrinsic for `I64 -> Externref`.
|
|
948
967
|
const ret = arg0;
|
|
949
968
|
return addHeapObject(ret);
|
|
950
969
|
},
|
|
951
|
-
|
|
970
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
952
971
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
953
972
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
954
973
|
return addHeapObject(ret);
|
|
955
974
|
},
|
|
956
|
-
|
|
975
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
957
976
|
// Cast intrinsic for `U64 -> Externref`.
|
|
958
977
|
const ret = BigInt.asUintN(64, arg0);
|
|
959
978
|
return addHeapObject(ret);
|
|
@@ -972,10 +991,14 @@ function __wbg_get_imports() {
|
|
|
972
991
|
};
|
|
973
992
|
}
|
|
974
993
|
|
|
975
|
-
function
|
|
994
|
+
function __wasm_bindgen_func_elem_7929(arg0, arg1) {
|
|
995
|
+
wasm.__wasm_bindgen_func_elem_7929(arg0, arg1);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
function __wasm_bindgen_func_elem_13544(arg0, arg1, arg2) {
|
|
976
999
|
try {
|
|
977
1000
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
978
|
-
wasm.
|
|
1001
|
+
wasm.__wasm_bindgen_func_elem_13544(retptr, arg0, arg1, addHeapObject(arg2));
|
|
979
1002
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
980
1003
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
981
1004
|
if (r1) {
|
|
@@ -986,10 +1009,10 @@ function __wasm_bindgen_func_elem_12589(arg0, arg1, arg2) {
|
|
|
986
1009
|
}
|
|
987
1010
|
}
|
|
988
1011
|
|
|
989
|
-
function
|
|
1012
|
+
function __wasm_bindgen_func_elem_2736(arg0, arg1, arg2) {
|
|
990
1013
|
try {
|
|
991
1014
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
992
|
-
wasm.
|
|
1015
|
+
wasm.__wasm_bindgen_func_elem_2736(retptr, arg0, arg1, addHeapObject(arg2));
|
|
993
1016
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
994
1017
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
995
1018
|
if (r1) {
|
|
@@ -1000,8 +1023,8 @@ function __wasm_bindgen_func_elem_2732(arg0, arg1, arg2) {
|
|
|
1000
1023
|
}
|
|
1001
1024
|
}
|
|
1002
1025
|
|
|
1003
|
-
function
|
|
1004
|
-
wasm.
|
|
1026
|
+
function __wasm_bindgen_func_elem_13550(arg0, arg1, arg2, arg3) {
|
|
1027
|
+
wasm.__wasm_bindgen_func_elem_13550(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1005
1028
|
}
|
|
1006
1029
|
|
|
1007
1030
|
|
|
@@ -1184,6 +1207,13 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
1184
1207
|
return real;
|
|
1185
1208
|
}
|
|
1186
1209
|
|
|
1210
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1211
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1212
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1213
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1214
|
+
return ptr;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1187
1217
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1188
1218
|
if (realloc === undefined) {
|
|
1189
1219
|
const buf = cachedTextEncoder.encode(arg);
|