kordweb 0.5.15 → 0.5.17
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 +2 -0
- package/klib.d.ts +61 -58
- package/klib.js +149 -109
- package/klib_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
[](https://crates.io/crates/kord)
|
|
4
4
|
[](https://crates.io/crates/kord)
|
|
5
5
|
[](https://github.com/twitchax/kord/releases)
|
|
6
|
+
[](https://crates.io/crates/kord)
|
|
7
|
+
[](https://www.npmjs.com/package/kordweb)
|
|
6
8
|
[](https://docs.rs/kord)
|
|
7
9
|
[](https://github.com/twitchax/kord)
|
|
8
10
|
[](https://opensource.org/licenses/MIT)
|
package/klib.d.ts
CHANGED
|
@@ -58,59 +58,6 @@ export enum KordExtension {
|
|
|
58
58
|
Add13 = 10,
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* The chord modifiers.
|
|
62
|
-
*/
|
|
63
|
-
export enum KordModifier {
|
|
64
|
-
/**
|
|
65
|
-
* Minor modifier.
|
|
66
|
-
*/
|
|
67
|
-
Minor = 0,
|
|
68
|
-
/**
|
|
69
|
-
* Flat 5 modifier.
|
|
70
|
-
*/
|
|
71
|
-
Flat5 = 1,
|
|
72
|
-
/**
|
|
73
|
-
* Sharp 5 modifier.
|
|
74
|
-
*/
|
|
75
|
-
Augmented5 = 2,
|
|
76
|
-
/**
|
|
77
|
-
* Major 7 modifier.
|
|
78
|
-
*/
|
|
79
|
-
Major7 = 3,
|
|
80
|
-
/**
|
|
81
|
-
* Dominant 7 modifier.
|
|
82
|
-
*/
|
|
83
|
-
Dominant7 = 4,
|
|
84
|
-
/**
|
|
85
|
-
* Dominant 9 modifier.
|
|
86
|
-
*/
|
|
87
|
-
Dominant9 = 5,
|
|
88
|
-
/**
|
|
89
|
-
* Dominant 11 modifier.
|
|
90
|
-
*/
|
|
91
|
-
Dominant11 = 6,
|
|
92
|
-
/**
|
|
93
|
-
* Dominant 13 modifier.
|
|
94
|
-
*/
|
|
95
|
-
Dominant13 = 7,
|
|
96
|
-
/**
|
|
97
|
-
* Flat 9 modifier.
|
|
98
|
-
*/
|
|
99
|
-
Flat9 = 8,
|
|
100
|
-
/**
|
|
101
|
-
* Sharp 9 modifier.
|
|
102
|
-
*/
|
|
103
|
-
Sharp9 = 9,
|
|
104
|
-
/**
|
|
105
|
-
* Sharp 11 modifier.
|
|
106
|
-
*/
|
|
107
|
-
Sharp11 = 10,
|
|
108
|
-
/**
|
|
109
|
-
* Diminished modifier.
|
|
110
|
-
*/
|
|
111
|
-
Diminished = 11,
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
61
|
* An enum representing the interval between two notes.
|
|
115
62
|
*/
|
|
116
63
|
export enum KordInterval {
|
|
@@ -308,6 +255,59 @@ export enum KordInterval {
|
|
|
308
255
|
ThreePerfectOctavesAndMajorSeventh = 47,
|
|
309
256
|
}
|
|
310
257
|
/**
|
|
258
|
+
* The chord modifiers.
|
|
259
|
+
*/
|
|
260
|
+
export enum KordModifier {
|
|
261
|
+
/**
|
|
262
|
+
* Minor modifier.
|
|
263
|
+
*/
|
|
264
|
+
Minor = 0,
|
|
265
|
+
/**
|
|
266
|
+
* Flat 5 modifier.
|
|
267
|
+
*/
|
|
268
|
+
Flat5 = 1,
|
|
269
|
+
/**
|
|
270
|
+
* Sharp 5 modifier.
|
|
271
|
+
*/
|
|
272
|
+
Augmented5 = 2,
|
|
273
|
+
/**
|
|
274
|
+
* Major 7 modifier.
|
|
275
|
+
*/
|
|
276
|
+
Major7 = 3,
|
|
277
|
+
/**
|
|
278
|
+
* Dominant 7 modifier.
|
|
279
|
+
*/
|
|
280
|
+
Dominant7 = 4,
|
|
281
|
+
/**
|
|
282
|
+
* Dominant 9 modifier.
|
|
283
|
+
*/
|
|
284
|
+
Dominant9 = 5,
|
|
285
|
+
/**
|
|
286
|
+
* Dominant 11 modifier.
|
|
287
|
+
*/
|
|
288
|
+
Dominant11 = 6,
|
|
289
|
+
/**
|
|
290
|
+
* Dominant 13 modifier.
|
|
291
|
+
*/
|
|
292
|
+
Dominant13 = 7,
|
|
293
|
+
/**
|
|
294
|
+
* Flat 9 modifier.
|
|
295
|
+
*/
|
|
296
|
+
Flat9 = 8,
|
|
297
|
+
/**
|
|
298
|
+
* Sharp 9 modifier.
|
|
299
|
+
*/
|
|
300
|
+
Sharp9 = 9,
|
|
301
|
+
/**
|
|
302
|
+
* Sharp 11 modifier.
|
|
303
|
+
*/
|
|
304
|
+
Sharp11 = 10,
|
|
305
|
+
/**
|
|
306
|
+
* Diminished modifier.
|
|
307
|
+
*/
|
|
308
|
+
Diminished = 11,
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
311
|
* The [`Chord`] wrapper.
|
|
312
312
|
*/
|
|
313
313
|
export class KordChord {
|
|
@@ -437,9 +437,9 @@ export class KordChord {
|
|
|
437
437
|
* @param {number} delay
|
|
438
438
|
* @param {number} length
|
|
439
439
|
* @param {number} fade_in
|
|
440
|
-
* @returns {
|
|
440
|
+
* @returns {Promise<void>}
|
|
441
441
|
*/
|
|
442
|
-
play(delay: number, length: number, fade_in: number):
|
|
442
|
+
play(delay: number, length: number, fade_in: number): Promise<void>;
|
|
443
443
|
/**
|
|
444
444
|
* Returns the clone of the [`Chord`].
|
|
445
445
|
* @returns {KordChord}
|
|
@@ -694,7 +694,7 @@ export interface InitOutput {
|
|
|
694
694
|
readonly kordchord_withSlash: (a: number, b: number) => number;
|
|
695
695
|
readonly kordchord_withOctave: (a: number, b: number, c: number) => void;
|
|
696
696
|
readonly kordchord_withCrunchy: (a: number, b: number) => number;
|
|
697
|
-
readonly kordchord_play: (a: number, b: number, c: number, d: number
|
|
697
|
+
readonly kordchord_play: (a: number, b: number, c: number, d: number) => number;
|
|
698
698
|
readonly kordchord_copy: (a: number) => number;
|
|
699
699
|
readonly __wbg_kordplaybackhandle_free: (a: number) => void;
|
|
700
700
|
readonly kordchord_minor: (a: number) => number;
|
|
@@ -721,15 +721,18 @@ export interface InitOutput {
|
|
|
721
721
|
readonly kordchord_add9: (a: number) => number;
|
|
722
722
|
readonly kordchord_add11: (a: number) => number;
|
|
723
723
|
readonly kordchord_add13: (a: number) => number;
|
|
724
|
-
readonly main: () => void;
|
|
725
724
|
readonly kordchord_toString: (a: number, b: number) => void;
|
|
725
|
+
readonly main: () => void;
|
|
726
726
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
727
727
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
728
728
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
729
|
-
readonly
|
|
729
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h747aa41a80ad2697: (a: number, b: number, c: number) => void;
|
|
730
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfedaf6d00b84e05a: (a: number, b: number) => void;
|
|
731
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9bbf27043e4e7e28: (a: number, b: number) => void;
|
|
730
732
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
731
733
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
732
734
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
735
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__h768f6593dd414d73: (a: number, b: number, c: number, d: number) => void;
|
|
733
736
|
readonly __wbindgen_start: () => void;
|
|
734
737
|
}
|
|
735
738
|
|
package/klib.js
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : (typeof webkitAudioContext !== 'undefined' ? webkitAudioContext : undefined));
|
|
2
2
|
let wasm;
|
|
3
3
|
|
|
4
|
+
const heap = new Array(128).fill(undefined);
|
|
5
|
+
|
|
6
|
+
heap.push(undefined, null, true, false);
|
|
7
|
+
|
|
8
|
+
function getObject(idx) { return heap[idx]; }
|
|
9
|
+
|
|
10
|
+
let heap_next = heap.length;
|
|
11
|
+
|
|
12
|
+
function dropObject(idx) {
|
|
13
|
+
if (idx < 132) return;
|
|
14
|
+
heap[idx] = heap_next;
|
|
15
|
+
heap_next = idx;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function takeObject(idx) {
|
|
19
|
+
const ret = getObject(idx);
|
|
20
|
+
dropObject(idx);
|
|
21
|
+
return ret;
|
|
22
|
+
}
|
|
23
|
+
|
|
4
24
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
5
25
|
|
|
6
26
|
cachedTextDecoder.decode();
|
|
@@ -18,12 +38,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
18
38
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
19
39
|
}
|
|
20
40
|
|
|
21
|
-
const heap = new Array(128).fill(undefined);
|
|
22
|
-
|
|
23
|
-
heap.push(undefined, null, true, false);
|
|
24
|
-
|
|
25
|
-
let heap_next = heap.length;
|
|
26
|
-
|
|
27
41
|
function addHeapObject(obj) {
|
|
28
42
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
43
|
const idx = heap_next;
|
|
@@ -33,20 +47,6 @@ function addHeapObject(obj) {
|
|
|
33
47
|
return idx;
|
|
34
48
|
}
|
|
35
49
|
|
|
36
|
-
function getObject(idx) { return heap[idx]; }
|
|
37
|
-
|
|
38
|
-
function dropObject(idx) {
|
|
39
|
-
if (idx < 132) return;
|
|
40
|
-
heap[idx] = heap_next;
|
|
41
|
-
heap_next = idx;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function takeObject(idx) {
|
|
45
|
-
const ret = getObject(idx);
|
|
46
|
-
dropObject(idx);
|
|
47
|
-
return ret;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
50
|
function isLikeNone(x) {
|
|
51
51
|
return x === undefined || x === null;
|
|
52
52
|
}
|
|
@@ -217,8 +217,16 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
217
217
|
CLOSURE_DTORS.register(real, state, state);
|
|
218
218
|
return real;
|
|
219
219
|
}
|
|
220
|
-
function __wbg_adapter_24(arg0, arg1) {
|
|
221
|
-
wasm.
|
|
220
|
+
function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
221
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h747aa41a80ad2697(arg0, arg1, addHeapObject(arg2));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function __wbg_adapter_27(arg0, arg1) {
|
|
225
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfedaf6d00b84e05a(arg0, arg1);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function __wbg_adapter_30(arg0, arg1) {
|
|
229
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9bbf27043e4e7e28(arg0, arg1);
|
|
222
230
|
}
|
|
223
231
|
|
|
224
232
|
/**
|
|
@@ -262,6 +270,10 @@ function handleError(f, args) {
|
|
|
262
270
|
function getArrayF32FromWasm0(ptr, len) {
|
|
263
271
|
return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
264
272
|
}
|
|
273
|
+
function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
|
|
274
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h768f6593dd414d73(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
275
|
+
}
|
|
276
|
+
|
|
265
277
|
/**
|
|
266
278
|
* An enum representing the extension of a chord.
|
|
267
279
|
*
|
|
@@ -315,58 +327,6 @@ Add11:9,"9":"Add11",
|
|
|
315
327
|
*/
|
|
316
328
|
Add13:10,"10":"Add13", });
|
|
317
329
|
/**
|
|
318
|
-
* The chord modifiers.
|
|
319
|
-
*/
|
|
320
|
-
export const KordModifier = Object.freeze({
|
|
321
|
-
/**
|
|
322
|
-
* Minor modifier.
|
|
323
|
-
*/
|
|
324
|
-
Minor:0,"0":"Minor",
|
|
325
|
-
/**
|
|
326
|
-
* Flat 5 modifier.
|
|
327
|
-
*/
|
|
328
|
-
Flat5:1,"1":"Flat5",
|
|
329
|
-
/**
|
|
330
|
-
* Sharp 5 modifier.
|
|
331
|
-
*/
|
|
332
|
-
Augmented5:2,"2":"Augmented5",
|
|
333
|
-
/**
|
|
334
|
-
* Major 7 modifier.
|
|
335
|
-
*/
|
|
336
|
-
Major7:3,"3":"Major7",
|
|
337
|
-
/**
|
|
338
|
-
* Dominant 7 modifier.
|
|
339
|
-
*/
|
|
340
|
-
Dominant7:4,"4":"Dominant7",
|
|
341
|
-
/**
|
|
342
|
-
* Dominant 9 modifier.
|
|
343
|
-
*/
|
|
344
|
-
Dominant9:5,"5":"Dominant9",
|
|
345
|
-
/**
|
|
346
|
-
* Dominant 11 modifier.
|
|
347
|
-
*/
|
|
348
|
-
Dominant11:6,"6":"Dominant11",
|
|
349
|
-
/**
|
|
350
|
-
* Dominant 13 modifier.
|
|
351
|
-
*/
|
|
352
|
-
Dominant13:7,"7":"Dominant13",
|
|
353
|
-
/**
|
|
354
|
-
* Flat 9 modifier.
|
|
355
|
-
*/
|
|
356
|
-
Flat9:8,"8":"Flat9",
|
|
357
|
-
/**
|
|
358
|
-
* Sharp 9 modifier.
|
|
359
|
-
*/
|
|
360
|
-
Sharp9:9,"9":"Sharp9",
|
|
361
|
-
/**
|
|
362
|
-
* Sharp 11 modifier.
|
|
363
|
-
*/
|
|
364
|
-
Sharp11:10,"10":"Sharp11",
|
|
365
|
-
/**
|
|
366
|
-
* Diminished modifier.
|
|
367
|
-
*/
|
|
368
|
-
Diminished:11,"11":"Diminished", });
|
|
369
|
-
/**
|
|
370
330
|
* An enum representing the interval between two notes.
|
|
371
331
|
*/
|
|
372
332
|
export const KordInterval = Object.freeze({
|
|
@@ -562,6 +522,58 @@ ThreePerfectOctavesAndMinorSeventh:46,"46":"ThreePerfectOctavesAndMinorSeventh",
|
|
|
562
522
|
* Three perfect octaves and a major seventh.
|
|
563
523
|
*/
|
|
564
524
|
ThreePerfectOctavesAndMajorSeventh:47,"47":"ThreePerfectOctavesAndMajorSeventh", });
|
|
525
|
+
/**
|
|
526
|
+
* The chord modifiers.
|
|
527
|
+
*/
|
|
528
|
+
export const KordModifier = Object.freeze({
|
|
529
|
+
/**
|
|
530
|
+
* Minor modifier.
|
|
531
|
+
*/
|
|
532
|
+
Minor:0,"0":"Minor",
|
|
533
|
+
/**
|
|
534
|
+
* Flat 5 modifier.
|
|
535
|
+
*/
|
|
536
|
+
Flat5:1,"1":"Flat5",
|
|
537
|
+
/**
|
|
538
|
+
* Sharp 5 modifier.
|
|
539
|
+
*/
|
|
540
|
+
Augmented5:2,"2":"Augmented5",
|
|
541
|
+
/**
|
|
542
|
+
* Major 7 modifier.
|
|
543
|
+
*/
|
|
544
|
+
Major7:3,"3":"Major7",
|
|
545
|
+
/**
|
|
546
|
+
* Dominant 7 modifier.
|
|
547
|
+
*/
|
|
548
|
+
Dominant7:4,"4":"Dominant7",
|
|
549
|
+
/**
|
|
550
|
+
* Dominant 9 modifier.
|
|
551
|
+
*/
|
|
552
|
+
Dominant9:5,"5":"Dominant9",
|
|
553
|
+
/**
|
|
554
|
+
* Dominant 11 modifier.
|
|
555
|
+
*/
|
|
556
|
+
Dominant11:6,"6":"Dominant11",
|
|
557
|
+
/**
|
|
558
|
+
* Dominant 13 modifier.
|
|
559
|
+
*/
|
|
560
|
+
Dominant13:7,"7":"Dominant13",
|
|
561
|
+
/**
|
|
562
|
+
* Flat 9 modifier.
|
|
563
|
+
*/
|
|
564
|
+
Flat9:8,"8":"Flat9",
|
|
565
|
+
/**
|
|
566
|
+
* Sharp 9 modifier.
|
|
567
|
+
*/
|
|
568
|
+
Sharp9:9,"9":"Sharp9",
|
|
569
|
+
/**
|
|
570
|
+
* Sharp 11 modifier.
|
|
571
|
+
*/
|
|
572
|
+
Sharp11:10,"10":"Sharp11",
|
|
573
|
+
/**
|
|
574
|
+
* Diminished modifier.
|
|
575
|
+
*/
|
|
576
|
+
Diminished:11,"11":"Diminished", });
|
|
565
577
|
|
|
566
578
|
const KordChordFinalization = new FinalizationRegistry(ptr => wasm.__wbg_kordchord_free(ptr));
|
|
567
579
|
/**
|
|
@@ -899,22 +911,11 @@ export class KordChord {
|
|
|
899
911
|
* @param {number} delay
|
|
900
912
|
* @param {number} length
|
|
901
913
|
* @param {number} fade_in
|
|
902
|
-
* @returns {
|
|
914
|
+
* @returns {Promise<void>}
|
|
903
915
|
*/
|
|
904
916
|
play(delay, length, fade_in) {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
wasm.kordchord_play(retptr, this.ptr, delay, length, fade_in);
|
|
908
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
909
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
910
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
911
|
-
if (r2) {
|
|
912
|
-
throw takeObject(r1);
|
|
913
|
-
}
|
|
914
|
-
return KordPlaybackHandle.__wrap(r0);
|
|
915
|
-
} finally {
|
|
916
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
917
|
-
}
|
|
917
|
+
const ret = wasm.kordchord_play(this.ptr, delay, length, fade_in);
|
|
918
|
+
return takeObject(ret);
|
|
918
919
|
}
|
|
919
920
|
/**
|
|
920
921
|
* Returns the clone of the [`Chord`].
|
|
@@ -1329,13 +1330,6 @@ const KordPlaybackHandleFinalization = new FinalizationRegistry(ptr => wasm.__wb
|
|
|
1329
1330
|
*/
|
|
1330
1331
|
export class KordPlaybackHandle {
|
|
1331
1332
|
|
|
1332
|
-
static __wrap(ptr) {
|
|
1333
|
-
const obj = Object.create(KordPlaybackHandle.prototype);
|
|
1334
|
-
obj.ptr = ptr;
|
|
1335
|
-
KordPlaybackHandleFinalization.register(obj, obj.ptr, obj);
|
|
1336
|
-
return obj;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
1333
|
__destroy_into_raw() {
|
|
1340
1334
|
const ptr = this.ptr;
|
|
1341
1335
|
this.ptr = 0;
|
|
@@ -1383,13 +1377,22 @@ async function load(module, imports) {
|
|
|
1383
1377
|
function getImports() {
|
|
1384
1378
|
const imports = {};
|
|
1385
1379
|
imports.wbg = {};
|
|
1380
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1381
|
+
takeObject(arg0);
|
|
1382
|
+
};
|
|
1383
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1384
|
+
const obj = takeObject(arg0).original;
|
|
1385
|
+
if (obj.cnt-- == 1) {
|
|
1386
|
+
obj.a = 0;
|
|
1387
|
+
return true;
|
|
1388
|
+
}
|
|
1389
|
+
const ret = false;
|
|
1390
|
+
return ret;
|
|
1391
|
+
};
|
|
1386
1392
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1387
1393
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1388
1394
|
return addHeapObject(ret);
|
|
1389
1395
|
};
|
|
1390
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1391
|
-
takeObject(arg0);
|
|
1392
|
-
};
|
|
1393
1396
|
imports.wbg.__wbg_kordnote_new = function(arg0) {
|
|
1394
1397
|
const ret = KordNote.__wrap(arg0);
|
|
1395
1398
|
return addHeapObject(ret);
|
|
@@ -1404,15 +1407,6 @@ function getImports() {
|
|
|
1404
1407
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
1405
1408
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1406
1409
|
};
|
|
1407
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1408
|
-
const obj = takeObject(arg0).original;
|
|
1409
|
-
if (obj.cnt-- == 1) {
|
|
1410
|
-
obj.a = 0;
|
|
1411
|
-
return true;
|
|
1412
|
-
}
|
|
1413
|
-
const ret = false;
|
|
1414
|
-
return ret;
|
|
1415
|
-
};
|
|
1416
1410
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
1417
1411
|
const ret = new Error();
|
|
1418
1412
|
return addHeapObject(ret);
|
|
@@ -1431,6 +1425,14 @@ function getImports() {
|
|
|
1431
1425
|
wasm.__wbindgen_free(arg0, arg1);
|
|
1432
1426
|
}
|
|
1433
1427
|
};
|
|
1428
|
+
imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function(arg0) {
|
|
1429
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
1430
|
+
return addHeapObject(ret);
|
|
1431
|
+
};
|
|
1432
|
+
imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function() { return handleError(function (arg0, arg1) {
|
|
1433
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
1434
|
+
return addHeapObject(ret);
|
|
1435
|
+
}, arguments) };
|
|
1434
1436
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1435
1437
|
const v = getObject(arg0);
|
|
1436
1438
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -1566,6 +1568,10 @@ function getImports() {
|
|
|
1566
1568
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
1567
1569
|
return ret;
|
|
1568
1570
|
};
|
|
1571
|
+
imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1572
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1573
|
+
return addHeapObject(ret);
|
|
1574
|
+
}, arguments) };
|
|
1569
1575
|
imports.wbg.__wbg_name_4e66d4cfa3e9270a = function(arg0) {
|
|
1570
1576
|
const ret = getObject(arg0).name;
|
|
1571
1577
|
return addHeapObject(ret);
|
|
@@ -1584,6 +1590,32 @@ function getImports() {
|
|
|
1584
1590
|
const ret = getObject(arg0).constructor;
|
|
1585
1591
|
return addHeapObject(ret);
|
|
1586
1592
|
};
|
|
1593
|
+
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
1594
|
+
try {
|
|
1595
|
+
var state0 = {a: arg0, b: arg1};
|
|
1596
|
+
var cb0 = (arg0, arg1) => {
|
|
1597
|
+
const a = state0.a;
|
|
1598
|
+
state0.a = 0;
|
|
1599
|
+
try {
|
|
1600
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
1601
|
+
} finally {
|
|
1602
|
+
state0.a = a;
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
const ret = new Promise(cb0);
|
|
1606
|
+
return addHeapObject(ret);
|
|
1607
|
+
} finally {
|
|
1608
|
+
state0.a = state0.b = 0;
|
|
1609
|
+
}
|
|
1610
|
+
};
|
|
1611
|
+
imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
|
|
1612
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1613
|
+
return addHeapObject(ret);
|
|
1614
|
+
};
|
|
1615
|
+
imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
|
|
1616
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1617
|
+
return addHeapObject(ret);
|
|
1618
|
+
};
|
|
1587
1619
|
imports.wbg.__wbg_set_6aa458a4ebdb65cb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1588
1620
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1589
1621
|
return ret;
|
|
@@ -1598,8 +1630,16 @@ function getImports() {
|
|
|
1598
1630
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1599
1631
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1600
1632
|
};
|
|
1601
|
-
imports.wbg.
|
|
1602
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1633
|
+
imports.wbg.__wbindgen_closure_wrapper1086 = function(arg0, arg1, arg2) {
|
|
1634
|
+
const ret = makeMutClosure(arg0, arg1, 469, __wbg_adapter_24);
|
|
1635
|
+
return addHeapObject(ret);
|
|
1636
|
+
};
|
|
1637
|
+
imports.wbg.__wbindgen_closure_wrapper1143 = function(arg0, arg1, arg2) {
|
|
1638
|
+
const ret = makeMutClosure(arg0, arg1, 506, __wbg_adapter_27);
|
|
1639
|
+
return addHeapObject(ret);
|
|
1640
|
+
};
|
|
1641
|
+
imports.wbg.__wbindgen_closure_wrapper1432 = function(arg0, arg1, arg2) {
|
|
1642
|
+
const ret = makeMutClosure(arg0, arg1, 656, __wbg_adapter_30);
|
|
1603
1643
|
return addHeapObject(ret);
|
|
1604
1644
|
};
|
|
1605
1645
|
|
package/klib_bg.wasm
CHANGED
|
Binary file
|