kordweb 0.5.14 → 0.5.15
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/klib.d.ts +65 -58
- package/klib.js +126 -129
- package/klib_bg.wasm +0 -0
- package/package.json +1 -1
package/klib.d.ts
CHANGED
|
@@ -58,6 +58,59 @@ 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
|
+
/**
|
|
61
114
|
* An enum representing the interval between two notes.
|
|
62
115
|
*/
|
|
63
116
|
export enum KordInterval {
|
|
@@ -255,59 +308,6 @@ export enum KordInterval {
|
|
|
255
308
|
ThreePerfectOctavesAndMajorSeventh = 47,
|
|
256
309
|
}
|
|
257
310
|
/**
|
|
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 {KordPlaybackHandle}
|
|
441
441
|
*/
|
|
442
|
-
play(delay: number, length: number, fade_in: number):
|
|
442
|
+
play(delay: number, length: number, fade_in: number): KordPlaybackHandle;
|
|
443
443
|
/**
|
|
444
444
|
* Returns the clone of the [`Chord`].
|
|
445
445
|
* @returns {KordChord}
|
|
@@ -645,6 +645,14 @@ export class KordNote {
|
|
|
645
645
|
*/
|
|
646
646
|
copy(): KordNote;
|
|
647
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* A handle to a [`Chord`] playback.
|
|
650
|
+
*
|
|
651
|
+
* Should be dropped to stop the playback, or after playback is finished.
|
|
652
|
+
*/
|
|
653
|
+
export class KordPlaybackHandle {
|
|
654
|
+
free(): void;
|
|
655
|
+
}
|
|
648
656
|
|
|
649
657
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
650
658
|
|
|
@@ -686,8 +694,9 @@ export interface InitOutput {
|
|
|
686
694
|
readonly kordchord_withSlash: (a: number, b: number) => number;
|
|
687
695
|
readonly kordchord_withOctave: (a: number, b: number, c: number) => void;
|
|
688
696
|
readonly kordchord_withCrunchy: (a: number, b: number) => number;
|
|
689
|
-
readonly kordchord_play: (a: number, b: number, c: number, d: number) =>
|
|
697
|
+
readonly kordchord_play: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
690
698
|
readonly kordchord_copy: (a: number) => number;
|
|
699
|
+
readonly __wbg_kordplaybackhandle_free: (a: number) => void;
|
|
691
700
|
readonly kordchord_minor: (a: number) => number;
|
|
692
701
|
readonly kordchord_flat5: (a: number) => number;
|
|
693
702
|
readonly kordchord_aug: (a: number) => number;
|
|
@@ -717,12 +726,10 @@ export interface InitOutput {
|
|
|
717
726
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
718
727
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
719
728
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
720
|
-
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4bf4f1a270d9cb63: (a: number, b: number, c: number) => void;
|
|
721
729
|
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb32af8e4ede5824: (a: number, b: number) => void;
|
|
722
730
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
723
731
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
724
732
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
725
|
-
readonly wasm_bindgen__convert__closures__invoke2_mut__h2d4abc1ddedd8c19: (a: number, b: number, c: number, d: number) => void;
|
|
726
733
|
readonly __wbindgen_start: () => void;
|
|
727
734
|
}
|
|
728
735
|
|
package/klib.js
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
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
|
-
|
|
24
4
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
25
5
|
|
|
26
6
|
cachedTextDecoder.decode();
|
|
@@ -38,6 +18,12 @@ function getStringFromWasm0(ptr, len) {
|
|
|
38
18
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
19
|
}
|
|
40
20
|
|
|
21
|
+
const heap = new Array(128).fill(undefined);
|
|
22
|
+
|
|
23
|
+
heap.push(undefined, null, true, false);
|
|
24
|
+
|
|
25
|
+
let heap_next = heap.length;
|
|
26
|
+
|
|
41
27
|
function addHeapObject(obj) {
|
|
42
28
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
43
29
|
const idx = heap_next;
|
|
@@ -47,6 +33,20 @@ function addHeapObject(obj) {
|
|
|
47
33
|
return idx;
|
|
48
34
|
}
|
|
49
35
|
|
|
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,11 +217,7 @@ 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._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4bf4f1a270d9cb63(arg0, arg1, addHeapObject(arg2));
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function __wbg_adapter_27(arg0, arg1) {
|
|
220
|
+
function __wbg_adapter_24(arg0, arg1) {
|
|
225
221
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfb32af8e4ede5824(arg0, arg1);
|
|
226
222
|
}
|
|
227
223
|
|
|
@@ -266,10 +262,6 @@ function handleError(f, args) {
|
|
|
266
262
|
function getArrayF32FromWasm0(ptr, len) {
|
|
267
263
|
return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
268
264
|
}
|
|
269
|
-
function __wbg_adapter_152(arg0, arg1, arg2, arg3) {
|
|
270
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2d4abc1ddedd8c19(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
265
|
/**
|
|
274
266
|
* An enum representing the extension of a chord.
|
|
275
267
|
*
|
|
@@ -323,6 +315,58 @@ Add11:9,"9":"Add11",
|
|
|
323
315
|
*/
|
|
324
316
|
Add13:10,"10":"Add13", });
|
|
325
317
|
/**
|
|
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
|
+
/**
|
|
326
370
|
* An enum representing the interval between two notes.
|
|
327
371
|
*/
|
|
328
372
|
export const KordInterval = Object.freeze({
|
|
@@ -518,58 +562,6 @@ ThreePerfectOctavesAndMinorSeventh:46,"46":"ThreePerfectOctavesAndMinorSeventh",
|
|
|
518
562
|
* Three perfect octaves and a major seventh.
|
|
519
563
|
*/
|
|
520
564
|
ThreePerfectOctavesAndMajorSeventh:47,"47":"ThreePerfectOctavesAndMajorSeventh", });
|
|
521
|
-
/**
|
|
522
|
-
* The chord modifiers.
|
|
523
|
-
*/
|
|
524
|
-
export const KordModifier = Object.freeze({
|
|
525
|
-
/**
|
|
526
|
-
* Minor modifier.
|
|
527
|
-
*/
|
|
528
|
-
Minor:0,"0":"Minor",
|
|
529
|
-
/**
|
|
530
|
-
* Flat 5 modifier.
|
|
531
|
-
*/
|
|
532
|
-
Flat5:1,"1":"Flat5",
|
|
533
|
-
/**
|
|
534
|
-
* Sharp 5 modifier.
|
|
535
|
-
*/
|
|
536
|
-
Augmented5:2,"2":"Augmented5",
|
|
537
|
-
/**
|
|
538
|
-
* Major 7 modifier.
|
|
539
|
-
*/
|
|
540
|
-
Major7:3,"3":"Major7",
|
|
541
|
-
/**
|
|
542
|
-
* Dominant 7 modifier.
|
|
543
|
-
*/
|
|
544
|
-
Dominant7:4,"4":"Dominant7",
|
|
545
|
-
/**
|
|
546
|
-
* Dominant 9 modifier.
|
|
547
|
-
*/
|
|
548
|
-
Dominant9:5,"5":"Dominant9",
|
|
549
|
-
/**
|
|
550
|
-
* Dominant 11 modifier.
|
|
551
|
-
*/
|
|
552
|
-
Dominant11:6,"6":"Dominant11",
|
|
553
|
-
/**
|
|
554
|
-
* Dominant 13 modifier.
|
|
555
|
-
*/
|
|
556
|
-
Dominant13:7,"7":"Dominant13",
|
|
557
|
-
/**
|
|
558
|
-
* Flat 9 modifier.
|
|
559
|
-
*/
|
|
560
|
-
Flat9:8,"8":"Flat9",
|
|
561
|
-
/**
|
|
562
|
-
* Sharp 9 modifier.
|
|
563
|
-
*/
|
|
564
|
-
Sharp9:9,"9":"Sharp9",
|
|
565
|
-
/**
|
|
566
|
-
* Sharp 11 modifier.
|
|
567
|
-
*/
|
|
568
|
-
Sharp11:10,"10":"Sharp11",
|
|
569
|
-
/**
|
|
570
|
-
* Diminished modifier.
|
|
571
|
-
*/
|
|
572
|
-
Diminished:11,"11":"Diminished", });
|
|
573
565
|
|
|
574
566
|
const KordChordFinalization = new FinalizationRegistry(ptr => wasm.__wbg_kordchord_free(ptr));
|
|
575
567
|
/**
|
|
@@ -907,11 +899,22 @@ export class KordChord {
|
|
|
907
899
|
* @param {number} delay
|
|
908
900
|
* @param {number} length
|
|
909
901
|
* @param {number} fade_in
|
|
910
|
-
* @returns {
|
|
902
|
+
* @returns {KordPlaybackHandle}
|
|
911
903
|
*/
|
|
912
904
|
play(delay, length, fade_in) {
|
|
913
|
-
|
|
914
|
-
|
|
905
|
+
try {
|
|
906
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
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
|
+
}
|
|
915
918
|
}
|
|
916
919
|
/**
|
|
917
920
|
* Returns the clone of the [`Chord`].
|
|
@@ -1318,6 +1321,34 @@ export class KordNote {
|
|
|
1318
1321
|
}
|
|
1319
1322
|
}
|
|
1320
1323
|
|
|
1324
|
+
const KordPlaybackHandleFinalization = new FinalizationRegistry(ptr => wasm.__wbg_kordplaybackhandle_free(ptr));
|
|
1325
|
+
/**
|
|
1326
|
+
* A handle to a [`Chord`] playback.
|
|
1327
|
+
*
|
|
1328
|
+
* Should be dropped to stop the playback, or after playback is finished.
|
|
1329
|
+
*/
|
|
1330
|
+
export class KordPlaybackHandle {
|
|
1331
|
+
|
|
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
|
+
__destroy_into_raw() {
|
|
1340
|
+
const ptr = this.ptr;
|
|
1341
|
+
this.ptr = 0;
|
|
1342
|
+
KordPlaybackHandleFinalization.unregister(this);
|
|
1343
|
+
return ptr;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
free() {
|
|
1347
|
+
const ptr = this.__destroy_into_raw();
|
|
1348
|
+
wasm.__wbg_kordplaybackhandle_free(ptr);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1321
1352
|
async function load(module, imports) {
|
|
1322
1353
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
1323
1354
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -1352,13 +1383,13 @@ async function load(module, imports) {
|
|
|
1352
1383
|
function getImports() {
|
|
1353
1384
|
const imports = {};
|
|
1354
1385
|
imports.wbg = {};
|
|
1355
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1356
|
-
takeObject(arg0);
|
|
1357
|
-
};
|
|
1358
1386
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1359
1387
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1360
1388
|
return addHeapObject(ret);
|
|
1361
1389
|
};
|
|
1390
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1391
|
+
takeObject(arg0);
|
|
1392
|
+
};
|
|
1362
1393
|
imports.wbg.__wbg_kordnote_new = function(arg0) {
|
|
1363
1394
|
const ret = KordNote.__wrap(arg0);
|
|
1364
1395
|
return addHeapObject(ret);
|
|
@@ -1367,6 +1398,12 @@ function getImports() {
|
|
|
1367
1398
|
const ret = KordChord.__wrap(arg0);
|
|
1368
1399
|
return addHeapObject(ret);
|
|
1369
1400
|
};
|
|
1401
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1402
|
+
const obj = getObject(arg1);
|
|
1403
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1404
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
1405
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1406
|
+
};
|
|
1370
1407
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1371
1408
|
const obj = takeObject(arg0).original;
|
|
1372
1409
|
if (obj.cnt-- == 1) {
|
|
@@ -1376,12 +1413,6 @@ function getImports() {
|
|
|
1376
1413
|
const ret = false;
|
|
1377
1414
|
return ret;
|
|
1378
1415
|
};
|
|
1379
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1380
|
-
const obj = getObject(arg1);
|
|
1381
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1382
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
1383
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1384
|
-
};
|
|
1385
1416
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
1386
1417
|
const ret = new Error();
|
|
1387
1418
|
return addHeapObject(ret);
|
|
@@ -1535,10 +1566,6 @@ function getImports() {
|
|
|
1535
1566
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
1536
1567
|
return ret;
|
|
1537
1568
|
};
|
|
1538
|
-
imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1539
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1540
|
-
return addHeapObject(ret);
|
|
1541
|
-
}, arguments) };
|
|
1542
1569
|
imports.wbg.__wbg_name_4e66d4cfa3e9270a = function(arg0) {
|
|
1543
1570
|
const ret = getObject(arg0).name;
|
|
1544
1571
|
return addHeapObject(ret);
|
|
@@ -1557,32 +1584,6 @@ function getImports() {
|
|
|
1557
1584
|
const ret = getObject(arg0).constructor;
|
|
1558
1585
|
return addHeapObject(ret);
|
|
1559
1586
|
};
|
|
1560
|
-
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
1561
|
-
try {
|
|
1562
|
-
var state0 = {a: arg0, b: arg1};
|
|
1563
|
-
var cb0 = (arg0, arg1) => {
|
|
1564
|
-
const a = state0.a;
|
|
1565
|
-
state0.a = 0;
|
|
1566
|
-
try {
|
|
1567
|
-
return __wbg_adapter_152(a, state0.b, arg0, arg1);
|
|
1568
|
-
} finally {
|
|
1569
|
-
state0.a = a;
|
|
1570
|
-
}
|
|
1571
|
-
};
|
|
1572
|
-
const ret = new Promise(cb0);
|
|
1573
|
-
return addHeapObject(ret);
|
|
1574
|
-
} finally {
|
|
1575
|
-
state0.a = state0.b = 0;
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
|
|
1579
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
1580
|
-
return addHeapObject(ret);
|
|
1581
|
-
};
|
|
1582
|
-
imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
|
|
1583
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
1584
|
-
return addHeapObject(ret);
|
|
1585
|
-
};
|
|
1586
1587
|
imports.wbg.__wbg_set_6aa458a4ebdb65cb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1587
1588
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1588
1589
|
return ret;
|
|
@@ -1597,12 +1598,8 @@ function getImports() {
|
|
|
1597
1598
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1598
1599
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1599
1600
|
};
|
|
1600
|
-
imports.wbg.
|
|
1601
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1602
|
-
return addHeapObject(ret);
|
|
1603
|
-
};
|
|
1604
|
-
imports.wbg.__wbindgen_closure_wrapper1420 = function(arg0, arg1, arg2) {
|
|
1605
|
-
const ret = makeMutClosure(arg0, arg1, 657, __wbg_adapter_27);
|
|
1601
|
+
imports.wbg.__wbindgen_closure_wrapper1390 = function(arg0, arg1, arg2) {
|
|
1602
|
+
const ret = makeMutClosure(arg0, arg1, 641, __wbg_adapter_24);
|
|
1606
1603
|
return addHeapObject(ret);
|
|
1607
1604
|
};
|
|
1608
1605
|
|
package/klib_bg.wasm
CHANGED
|
Binary file
|