@scalable-vector-audio/sva-wasm 0.3.2 → 0.5.0
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/package.json +1 -1
- package/sva_wasm.d.ts +71 -3
- package/sva_wasm.js +286 -11
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/sva_wasm.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
export class Checkpoint {
|
|
5
|
+
private constructor();
|
|
6
|
+
free(): void;
|
|
7
|
+
[Symbol.dispose](): void;
|
|
8
|
+
readonly position: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
export class Composition {
|
|
5
12
|
free(): void;
|
|
6
13
|
[Symbol.dispose](): void;
|
|
@@ -9,6 +16,7 @@ export class Composition {
|
|
|
9
16
|
* Empties the memory tier only: a persistent pack outlives it by design.
|
|
10
17
|
*/
|
|
11
18
|
clear_cache(): void;
|
|
19
|
+
clear_volatile(): void;
|
|
12
20
|
insert(path: string, text: string): void;
|
|
13
21
|
constructor(name?: string | null);
|
|
14
22
|
/**
|
|
@@ -17,9 +25,18 @@ export class Composition {
|
|
|
17
25
|
*/
|
|
18
26
|
static persistent(name: string | null | undefined, cache: string, max_bytes?: number | null): Promise<Composition>;
|
|
19
27
|
/**
|
|
20
|
-
* Unset, `target` is `master`; `
|
|
28
|
+
* Unset, `target` is `master`; `until` is the horizon in seconds, or `"silent"` to end
|
|
29
|
+
* where every later sample is provably under `2^-bits` (default the profile's own), by
|
|
30
|
+
* `max_secs` at the latest. `rate` is the observation rate. What reads a `volatile`
|
|
31
|
+
* parameter is kept in a slot, never in either store.
|
|
32
|
+
*/
|
|
33
|
+
render(target: string | null | undefined, rate: number | null | undefined, until: any, volatile?: string[] | null, bits?: number | null, max_secs?: number | null): Rendering;
|
|
34
|
+
/**
|
|
35
|
+
* A stream of `target` (`master` unset) at `rate`, `block` samples a block, each key of
|
|
36
|
+
* `bindings` a named argument on the target. `until: "silent"` ends it at the first block
|
|
37
|
+
* whose end proves every later sample under `2^-bits`, throwing past `max_secs`.
|
|
21
38
|
*/
|
|
22
|
-
|
|
39
|
+
stream(target: string | null | undefined, rate: number | null | undefined, block: number, bindings: any, until: any, bits?: number | null, max_secs?: number | null): Stream;
|
|
23
40
|
/**
|
|
24
41
|
* The memory tier's, as `cache_max_bytes` is; `persistent_bytes` is the pack's.
|
|
25
42
|
*/
|
|
@@ -31,6 +48,8 @@ export class Composition {
|
|
|
31
48
|
*/
|
|
32
49
|
readonly persistent_bytes: number;
|
|
33
50
|
readonly persistent_max_bytes: number;
|
|
51
|
+
volatile_max_bytes: number;
|
|
52
|
+
readonly volatile_bytes: number;
|
|
34
53
|
}
|
|
35
54
|
|
|
36
55
|
export class Rendering {
|
|
@@ -52,23 +71,64 @@ export class Rendering {
|
|
|
52
71
|
readonly target: string;
|
|
53
72
|
}
|
|
54
73
|
|
|
74
|
+
/**
|
|
75
|
+
* A target block by block, for a player that cannot know how long a note is held.
|
|
76
|
+
*/
|
|
77
|
+
export class Stream {
|
|
78
|
+
private constructor();
|
|
79
|
+
free(): void;
|
|
80
|
+
[Symbol.dispose](): void;
|
|
81
|
+
checkpoint(): Checkpoint;
|
|
82
|
+
/**
|
|
83
|
+
* Writes the next block into `out`, component `c` from `c * block`, and returns the
|
|
84
|
+
* samples each component took: `block`, fewer where silence ends inside it, `0` after.
|
|
85
|
+
*/
|
|
86
|
+
next(out: Float32Array): number;
|
|
87
|
+
/**
|
|
88
|
+
* `until` as `stream` takes it, `max_secs` counted from the checkpoint.
|
|
89
|
+
*/
|
|
90
|
+
resume(checkpoint: Checkpoint, bindings: any, until: any, bits?: number | null, max_secs?: number | null): Stream;
|
|
91
|
+
readonly block: number;
|
|
92
|
+
readonly channels: number;
|
|
93
|
+
readonly end: number | undefined;
|
|
94
|
+
readonly position: number;
|
|
95
|
+
readonly sample_rate: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function builtins(): any;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* `sva-cli outline`'s `data`.
|
|
102
|
+
*/
|
|
103
|
+
export function outline(text: string): any;
|
|
104
|
+
|
|
55
105
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
56
106
|
|
|
57
107
|
export interface InitOutput {
|
|
58
108
|
readonly memory: WebAssembly.Memory;
|
|
109
|
+
readonly __wbg_checkpoint_free: (a: number, b: number) => void;
|
|
59
110
|
readonly __wbg_composition_free: (a: number, b: number) => void;
|
|
60
111
|
readonly __wbg_rendering_free: (a: number, b: number) => void;
|
|
112
|
+
readonly __wbg_stream_free: (a: number, b: number) => void;
|
|
113
|
+
readonly builtins: () => [number, number, number];
|
|
114
|
+
readonly checkpoint_position: (a: number) => number;
|
|
61
115
|
readonly composition_bound_cache: (a: number, b: number) => void;
|
|
62
116
|
readonly composition_cache_bytes: (a: number) => number;
|
|
63
117
|
readonly composition_cache_max_bytes: (a: number) => number;
|
|
64
118
|
readonly composition_clear_cache: (a: number) => void;
|
|
119
|
+
readonly composition_clear_volatile: (a: number) => void;
|
|
65
120
|
readonly composition_insert: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
66
121
|
readonly composition_is_persistent: (a: number) => number;
|
|
67
122
|
readonly composition_new: (a: number, b: number) => number;
|
|
68
123
|
readonly composition_persistent: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
69
124
|
readonly composition_persistent_bytes: (a: number) => number;
|
|
70
125
|
readonly composition_persistent_max_bytes: (a: number) => number;
|
|
71
|
-
readonly composition_render: (a: number, b: number, c: number, d: number, e:
|
|
126
|
+
readonly composition_render: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
127
|
+
readonly composition_set_volatile_max_bytes: (a: number, b: number) => void;
|
|
128
|
+
readonly composition_stream: (a: number, b: number, c: number, d: number, e: number, f: any, g: any, h: number, i: number, j: number) => [number, number, number];
|
|
129
|
+
readonly composition_volatile_bytes: (a: number) => number;
|
|
130
|
+
readonly composition_volatile_max_bytes: (a: number) => number;
|
|
131
|
+
readonly outline: (a: number, b: number) => [number, number, number];
|
|
72
132
|
readonly rendering_channels: (a: number) => number;
|
|
73
133
|
readonly rendering_duration_secs: (a: number) => number;
|
|
74
134
|
readonly rendering_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
@@ -76,6 +136,14 @@ export interface InitOutput {
|
|
|
76
136
|
readonly rendering_samples: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
77
137
|
readonly rendering_stats: (a: number) => [number, number, number];
|
|
78
138
|
readonly rendering_target: (a: number) => [number, number];
|
|
139
|
+
readonly stream_block: (a: number) => number;
|
|
140
|
+
readonly stream_channels: (a: number) => number;
|
|
141
|
+
readonly stream_checkpoint: (a: number) => number;
|
|
142
|
+
readonly stream_end: (a: number) => [number, number];
|
|
143
|
+
readonly stream_next: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
144
|
+
readonly stream_position: (a: number) => number;
|
|
145
|
+
readonly stream_resume: (a: number, b: number, c: any, d: any, e: number, f: number, g: number) => [number, number, number];
|
|
146
|
+
readonly stream_sample_rate: (a: number) => number;
|
|
79
147
|
readonly wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95: (a: number, b: number, c: any, d: any) => void;
|
|
80
148
|
readonly wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150: (a: number, b: number, c: any) => [number, number];
|
|
81
149
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
package/sva_wasm.js
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
/* @ts-self-types="./sva_wasm.d.ts" */
|
|
2
2
|
|
|
3
|
+
export class Checkpoint {
|
|
4
|
+
static __wrap(ptr) {
|
|
5
|
+
const obj = Object.create(Checkpoint.prototype);
|
|
6
|
+
obj.__wbg_ptr = ptr;
|
|
7
|
+
CheckpointFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8
|
+
return obj;
|
|
9
|
+
}
|
|
10
|
+
__destroy_into_raw() {
|
|
11
|
+
const ptr = this.__wbg_ptr;
|
|
12
|
+
this.__wbg_ptr = 0;
|
|
13
|
+
CheckpointFinalization.unregister(this);
|
|
14
|
+
return ptr;
|
|
15
|
+
}
|
|
16
|
+
free() {
|
|
17
|
+
const ptr = this.__destroy_into_raw();
|
|
18
|
+
wasm.__wbg_checkpoint_free(ptr, 0);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @returns {number}
|
|
22
|
+
*/
|
|
23
|
+
get position() {
|
|
24
|
+
const ret = wasm.checkpoint_position(this.__wbg_ptr);
|
|
25
|
+
return ret;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (Symbol.dispose) Checkpoint.prototype[Symbol.dispose] = Checkpoint.prototype.free;
|
|
29
|
+
|
|
3
30
|
export class Composition {
|
|
4
31
|
static __wrap(ptr) {
|
|
5
32
|
const obj = Object.create(Composition.prototype);
|
|
@@ -44,6 +71,9 @@ export class Composition {
|
|
|
44
71
|
clear_cache() {
|
|
45
72
|
wasm.composition_clear_cache(this.__wbg_ptr);
|
|
46
73
|
}
|
|
74
|
+
clear_volatile() {
|
|
75
|
+
wasm.composition_clear_volatile(this.__wbg_ptr);
|
|
76
|
+
}
|
|
47
77
|
/**
|
|
48
78
|
* @param {string} path
|
|
49
79
|
* @param {string} text
|
|
@@ -105,21 +135,71 @@ export class Composition {
|
|
|
105
135
|
return ret;
|
|
106
136
|
}
|
|
107
137
|
/**
|
|
108
|
-
* Unset, `target` is `master`; `
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
138
|
+
* Unset, `target` is `master`; `until` is the horizon in seconds, or `"silent"` to end
|
|
139
|
+
* where every later sample is provably under `2^-bits` (default the profile's own), by
|
|
140
|
+
* `max_secs` at the latest. `rate` is the observation rate. What reads a `volatile`
|
|
141
|
+
* parameter is kept in a slot, never in either store.
|
|
142
|
+
* @param {string | null | undefined} target
|
|
143
|
+
* @param {number | null | undefined} rate
|
|
144
|
+
* @param {any} until
|
|
145
|
+
* @param {string[] | null} [volatile]
|
|
146
|
+
* @param {number | null} [bits]
|
|
147
|
+
* @param {number | null} [max_secs]
|
|
112
148
|
* @returns {Rendering}
|
|
113
149
|
*/
|
|
114
|
-
render(target, rate,
|
|
150
|
+
render(target, rate, until, volatile, bits, max_secs) {
|
|
115
151
|
var ptr0 = isLikeNone(target) ? 0 : passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
116
152
|
var len0 = WASM_VECTOR_LEN;
|
|
117
|
-
|
|
153
|
+
var ptr1 = isLikeNone(volatile) ? 0 : passArrayJsValueToWasm0(volatile, wasm.__wbindgen_malloc);
|
|
154
|
+
var len1 = WASM_VECTOR_LEN;
|
|
155
|
+
const ret = wasm.composition_render(this.__wbg_ptr, ptr0, len0, isLikeNone(rate) ? Number.MAX_SAFE_INTEGER : (rate) >>> 0, until, ptr1, len1, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
118
156
|
if (ret[2]) {
|
|
119
157
|
throw takeFromExternrefTable0(ret[1]);
|
|
120
158
|
}
|
|
121
159
|
return Rendering.__wrap(ret[0]);
|
|
122
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* @param {number} max_bytes
|
|
163
|
+
*/
|
|
164
|
+
set volatile_max_bytes(max_bytes) {
|
|
165
|
+
wasm.composition_set_volatile_max_bytes(this.__wbg_ptr, max_bytes);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* A stream of `target` (`master` unset) at `rate`, `block` samples a block, each key of
|
|
169
|
+
* `bindings` a named argument on the target. `until: "silent"` ends it at the first block
|
|
170
|
+
* whose end proves every later sample under `2^-bits`, throwing past `max_secs`.
|
|
171
|
+
* @param {string | null | undefined} target
|
|
172
|
+
* @param {number | null | undefined} rate
|
|
173
|
+
* @param {number} block
|
|
174
|
+
* @param {any} bindings
|
|
175
|
+
* @param {any} until
|
|
176
|
+
* @param {number | null} [bits]
|
|
177
|
+
* @param {number | null} [max_secs]
|
|
178
|
+
* @returns {Stream}
|
|
179
|
+
*/
|
|
180
|
+
stream(target, rate, block, bindings, until, bits, max_secs) {
|
|
181
|
+
var ptr0 = isLikeNone(target) ? 0 : passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
182
|
+
var len0 = WASM_VECTOR_LEN;
|
|
183
|
+
const ret = wasm.composition_stream(this.__wbg_ptr, ptr0, len0, isLikeNone(rate) ? Number.MAX_SAFE_INTEGER : (rate) >>> 0, block, bindings, until, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
184
|
+
if (ret[2]) {
|
|
185
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
186
|
+
}
|
|
187
|
+
return Stream.__wrap(ret[0]);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @returns {number}
|
|
191
|
+
*/
|
|
192
|
+
get volatile_bytes() {
|
|
193
|
+
const ret = wasm.composition_volatile_bytes(this.__wbg_ptr);
|
|
194
|
+
return ret;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @returns {number}
|
|
198
|
+
*/
|
|
199
|
+
get volatile_max_bytes() {
|
|
200
|
+
const ret = wasm.composition_volatile_max_bytes(this.__wbg_ptr);
|
|
201
|
+
return ret;
|
|
202
|
+
}
|
|
123
203
|
}
|
|
124
204
|
if (Symbol.dispose) Composition.prototype[Symbol.dispose] = Composition.prototype.free;
|
|
125
205
|
|
|
@@ -220,9 +300,135 @@ export class Rendering {
|
|
|
220
300
|
}
|
|
221
301
|
}
|
|
222
302
|
if (Symbol.dispose) Rendering.prototype[Symbol.dispose] = Rendering.prototype.free;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* A target block by block, for a player that cannot know how long a note is held.
|
|
306
|
+
*/
|
|
307
|
+
export class Stream {
|
|
308
|
+
static __wrap(ptr) {
|
|
309
|
+
const obj = Object.create(Stream.prototype);
|
|
310
|
+
obj.__wbg_ptr = ptr;
|
|
311
|
+
StreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
312
|
+
return obj;
|
|
313
|
+
}
|
|
314
|
+
__destroy_into_raw() {
|
|
315
|
+
const ptr = this.__wbg_ptr;
|
|
316
|
+
this.__wbg_ptr = 0;
|
|
317
|
+
StreamFinalization.unregister(this);
|
|
318
|
+
return ptr;
|
|
319
|
+
}
|
|
320
|
+
free() {
|
|
321
|
+
const ptr = this.__destroy_into_raw();
|
|
322
|
+
wasm.__wbg_stream_free(ptr, 0);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @returns {number}
|
|
326
|
+
*/
|
|
327
|
+
get block() {
|
|
328
|
+
const ret = wasm.stream_block(this.__wbg_ptr);
|
|
329
|
+
return ret >>> 0;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @returns {number}
|
|
333
|
+
*/
|
|
334
|
+
get channels() {
|
|
335
|
+
const ret = wasm.stream_channels(this.__wbg_ptr);
|
|
336
|
+
return ret >>> 0;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* @returns {Checkpoint}
|
|
340
|
+
*/
|
|
341
|
+
checkpoint() {
|
|
342
|
+
const ret = wasm.stream_checkpoint(this.__wbg_ptr);
|
|
343
|
+
return Checkpoint.__wrap(ret);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @returns {number | undefined}
|
|
347
|
+
*/
|
|
348
|
+
get end() {
|
|
349
|
+
const ret = wasm.stream_end(this.__wbg_ptr);
|
|
350
|
+
return ret[0] === 0 ? undefined : ret[1];
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Writes the next block into `out`, component `c` from `c * block`, and returns the
|
|
354
|
+
* samples each component took: `block`, fewer where silence ends inside it, `0` after.
|
|
355
|
+
* @param {Float32Array} out
|
|
356
|
+
* @returns {number}
|
|
357
|
+
*/
|
|
358
|
+
next(out) {
|
|
359
|
+
var ptr0 = passArrayF32ToWasm0(out, wasm.__wbindgen_malloc);
|
|
360
|
+
var len0 = WASM_VECTOR_LEN;
|
|
361
|
+
const ret = wasm.stream_next(this.__wbg_ptr, ptr0, len0, out);
|
|
362
|
+
if (ret[2]) {
|
|
363
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
364
|
+
}
|
|
365
|
+
return ret[0] >>> 0;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* @returns {number}
|
|
369
|
+
*/
|
|
370
|
+
get position() {
|
|
371
|
+
const ret = wasm.stream_position(this.__wbg_ptr);
|
|
372
|
+
return ret;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* `until` as `stream` takes it, `max_secs` counted from the checkpoint.
|
|
376
|
+
* @param {Checkpoint} checkpoint
|
|
377
|
+
* @param {any} bindings
|
|
378
|
+
* @param {any} until
|
|
379
|
+
* @param {number | null} [bits]
|
|
380
|
+
* @param {number | null} [max_secs]
|
|
381
|
+
* @returns {Stream}
|
|
382
|
+
*/
|
|
383
|
+
resume(checkpoint, bindings, until, bits, max_secs) {
|
|
384
|
+
_assertClass(checkpoint, Checkpoint);
|
|
385
|
+
const ret = wasm.stream_resume(this.__wbg_ptr, checkpoint.__wbg_ptr, bindings, until, isLikeNone(bits) ? Number.MAX_SAFE_INTEGER : (bits) >>> 0, !isLikeNone(max_secs), isLikeNone(max_secs) ? 0 : max_secs);
|
|
386
|
+
if (ret[2]) {
|
|
387
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
388
|
+
}
|
|
389
|
+
return Stream.__wrap(ret[0]);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @returns {number}
|
|
393
|
+
*/
|
|
394
|
+
get sample_rate() {
|
|
395
|
+
const ret = wasm.stream_sample_rate(this.__wbg_ptr);
|
|
396
|
+
return ret >>> 0;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (Symbol.dispose) Stream.prototype[Symbol.dispose] = Stream.prototype.free;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* @returns {any}
|
|
403
|
+
*/
|
|
404
|
+
export function builtins() {
|
|
405
|
+
const ret = wasm.builtins();
|
|
406
|
+
if (ret[2]) {
|
|
407
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
408
|
+
}
|
|
409
|
+
return takeFromExternrefTable0(ret[0]);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* `sva-cli outline`'s `data`.
|
|
414
|
+
* @param {string} text
|
|
415
|
+
* @returns {any}
|
|
416
|
+
*/
|
|
417
|
+
export function outline(text) {
|
|
418
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
419
|
+
const len0 = WASM_VECTOR_LEN;
|
|
420
|
+
const ret = wasm.outline(ptr0, len0);
|
|
421
|
+
if (ret[2]) {
|
|
422
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
423
|
+
}
|
|
424
|
+
return takeFromExternrefTable0(ret[0]);
|
|
425
|
+
}
|
|
223
426
|
function __wbg_get_imports() {
|
|
224
427
|
const import0 = {
|
|
225
428
|
__proto__: null,
|
|
429
|
+
__wbg___wbindgen_copy_to_typed_array_cccd104be8cf0b8d: function(arg0, arg1, arg2) {
|
|
430
|
+
new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));
|
|
431
|
+
},
|
|
226
432
|
__wbg___wbindgen_is_falsy_4502df4d571fca70: function(arg0) {
|
|
227
433
|
const ret = !arg0;
|
|
228
434
|
return ret;
|
|
@@ -231,10 +437,20 @@ function __wbg_get_imports() {
|
|
|
231
437
|
const ret = typeof(arg0) === 'function';
|
|
232
438
|
return ret;
|
|
233
439
|
},
|
|
440
|
+
__wbg___wbindgen_is_null_5160b3e381865372: function(arg0) {
|
|
441
|
+
const ret = arg0 === null;
|
|
442
|
+
return ret;
|
|
443
|
+
},
|
|
234
444
|
__wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
|
|
235
445
|
const ret = arg0 === undefined;
|
|
236
446
|
return ret;
|
|
237
447
|
},
|
|
448
|
+
__wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
|
|
449
|
+
const obj = arg1;
|
|
450
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
451
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
452
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
453
|
+
},
|
|
238
454
|
__wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
|
|
239
455
|
const obj = arg1;
|
|
240
456
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -264,9 +480,17 @@ function __wbg_get_imports() {
|
|
|
264
480
|
const ret = arg0.createSyncAccessHandle();
|
|
265
481
|
return ret;
|
|
266
482
|
},
|
|
483
|
+
__wbg_entries_972a87586902cf87: function(arg0) {
|
|
484
|
+
const ret = Object.entries(arg0);
|
|
485
|
+
return ret;
|
|
486
|
+
},
|
|
267
487
|
__wbg_flush_91458c8278aae724: function() { return handleError(function (arg0) {
|
|
268
488
|
arg0.flush();
|
|
269
489
|
}, arguments); },
|
|
490
|
+
__wbg_from_a39669ce566077da: function(arg0) {
|
|
491
|
+
const ret = Array.from(arg0);
|
|
492
|
+
return ret;
|
|
493
|
+
},
|
|
270
494
|
__wbg_getDirectoryHandle_df6fb6f1fc6240ed: function(arg0, arg1, arg2, arg3) {
|
|
271
495
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
272
496
|
return ret;
|
|
@@ -287,6 +511,14 @@ function __wbg_get_imports() {
|
|
|
287
511
|
const ret = Reflect.get(arg0, arg1);
|
|
288
512
|
return ret;
|
|
289
513
|
}, arguments); },
|
|
514
|
+
__wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
|
|
515
|
+
const ret = arg0[arg1 >>> 0];
|
|
516
|
+
return ret;
|
|
517
|
+
},
|
|
518
|
+
__wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
|
|
519
|
+
const ret = arg0[arg1 >>> 0];
|
|
520
|
+
return ret;
|
|
521
|
+
},
|
|
290
522
|
__wbg_instanceof_FileSystemDirectoryHandle_a5c1bdaafba684ca: function(arg0) {
|
|
291
523
|
let result;
|
|
292
524
|
try {
|
|
@@ -307,6 +539,16 @@ function __wbg_get_imports() {
|
|
|
307
539
|
const ret = result;
|
|
308
540
|
return ret;
|
|
309
541
|
},
|
|
542
|
+
__wbg_instanceof_Object_87732cb922ac2e2c: function(arg0) {
|
|
543
|
+
let result;
|
|
544
|
+
try {
|
|
545
|
+
result = arg0 instanceof Object;
|
|
546
|
+
} catch (_) {
|
|
547
|
+
result = false;
|
|
548
|
+
}
|
|
549
|
+
const ret = result;
|
|
550
|
+
return ret;
|
|
551
|
+
},
|
|
310
552
|
__wbg_instanceof_WorkerGlobalScope_0c1a6411473b843f: function(arg0) {
|
|
311
553
|
let result;
|
|
312
554
|
try {
|
|
@@ -321,11 +563,15 @@ function __wbg_get_imports() {
|
|
|
321
563
|
const ret = arg0.keys();
|
|
322
564
|
return ret;
|
|
323
565
|
},
|
|
566
|
+
__wbg_length_4e1adc0d42e23620: function(arg0) {
|
|
567
|
+
const ret = arg0.length;
|
|
568
|
+
return ret;
|
|
569
|
+
},
|
|
324
570
|
__wbg_navigator_d25c0f071226f233: function(arg0) {
|
|
325
571
|
const ret = arg0.navigator;
|
|
326
572
|
return ret;
|
|
327
573
|
},
|
|
328
|
-
|
|
574
|
+
__wbg_new_60a94df323701352: function(arg0, arg1) {
|
|
329
575
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
330
576
|
return ret;
|
|
331
577
|
},
|
|
@@ -373,7 +619,7 @@ function __wbg_get_imports() {
|
|
|
373
619
|
const ret = arg0.next();
|
|
374
620
|
return ret;
|
|
375
621
|
}, arguments); },
|
|
376
|
-
|
|
622
|
+
__wbg_parse_673c654d2b233b97: function() { return handleError(function (arg0, arg1) {
|
|
377
623
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
378
624
|
return ret;
|
|
379
625
|
}, arguments); },
|
|
@@ -409,10 +655,10 @@ function __wbg_get_imports() {
|
|
|
409
655
|
__wbg_set_create_8c556c6febf6436c: function(arg0, arg1) {
|
|
410
656
|
arg0.create = arg1 !== 0;
|
|
411
657
|
},
|
|
412
|
-
|
|
658
|
+
__wbg_set_name_f2e0b4f6b6b3d728: function(arg0, arg1, arg2) {
|
|
413
659
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
414
660
|
},
|
|
415
|
-
|
|
661
|
+
__wbg_set_refusal_0a35a4ef06d51ed7: function(arg0, arg1) {
|
|
416
662
|
arg0.refusal = arg1;
|
|
417
663
|
},
|
|
418
664
|
__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
|
|
@@ -447,7 +693,7 @@ function __wbg_get_imports() {
|
|
|
447
693
|
return ret;
|
|
448
694
|
}, arguments); },
|
|
449
695
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
450
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
696
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 99, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
451
697
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd55bb211d6a08150);
|
|
452
698
|
return ret;
|
|
453
699
|
},
|
|
@@ -483,12 +729,18 @@ function wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95(arg0, arg
|
|
|
483
729
|
wasm.wasm_bindgen__convert__closures_____invoke__h76bd71bceeca2b95(arg0, arg1, arg2, arg3);
|
|
484
730
|
}
|
|
485
731
|
|
|
732
|
+
const CheckpointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
733
|
+
? { register: () => {}, unregister: () => {} }
|
|
734
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_checkpoint_free(ptr, 1));
|
|
486
735
|
const CompositionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
487
736
|
? { register: () => {}, unregister: () => {} }
|
|
488
737
|
: new FinalizationRegistry(ptr => wasm.__wbg_composition_free(ptr, 1));
|
|
489
738
|
const RenderingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
490
739
|
? { register: () => {}, unregister: () => {} }
|
|
491
740
|
: new FinalizationRegistry(ptr => wasm.__wbg_rendering_free(ptr, 1));
|
|
741
|
+
const StreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
742
|
+
? { register: () => {}, unregister: () => {} }
|
|
743
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_stream_free(ptr, 1));
|
|
492
744
|
|
|
493
745
|
function addToExternrefTable0(obj) {
|
|
494
746
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -496,6 +748,12 @@ function addToExternrefTable0(obj) {
|
|
|
496
748
|
return idx;
|
|
497
749
|
}
|
|
498
750
|
|
|
751
|
+
function _assertClass(instance, klass) {
|
|
752
|
+
if (!(instance instanceof klass)) {
|
|
753
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
499
757
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
500
758
|
? { register: () => {}, unregister: () => {} }
|
|
501
759
|
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
@@ -579,6 +837,23 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
579
837
|
return real;
|
|
580
838
|
}
|
|
581
839
|
|
|
840
|
+
function passArrayF32ToWasm0(arg, malloc) {
|
|
841
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
842
|
+
getFloat32ArrayMemory0().set(arg, ptr / 4);
|
|
843
|
+
WASM_VECTOR_LEN = arg.length;
|
|
844
|
+
return ptr;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
848
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
849
|
+
for (let i = 0; i < array.length; i++) {
|
|
850
|
+
const add = addToExternrefTable0(array[i]);
|
|
851
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
852
|
+
}
|
|
853
|
+
WASM_VECTOR_LEN = array.length;
|
|
854
|
+
return ptr;
|
|
855
|
+
}
|
|
856
|
+
|
|
582
857
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
583
858
|
if (realloc === undefined) {
|
|
584
859
|
const buf = cachedTextEncoder.encode(arg);
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|