egraph 5.0.0 → 6.0.0-alpha.1

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.
@@ -1,819 +0,0 @@
1
-
2
- let wasm;
3
-
4
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
5
-
6
- cachedTextDecoder.decode();
7
-
8
- let cachegetUint8Memory0 = null;
9
- function getUint8Memory0() {
10
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
11
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
12
- }
13
- return cachegetUint8Memory0;
14
- }
15
-
16
- function getStringFromWasm0(ptr, len) {
17
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
18
- }
19
-
20
- const heap = new Array(32).fill(undefined);
21
-
22
- heap.push(undefined, null, true, false);
23
-
24
- let heap_next = heap.length;
25
-
26
- function addHeapObject(obj) {
27
- if (heap_next === heap.length) heap.push(heap.length + 1);
28
- const idx = heap_next;
29
- heap_next = heap[idx];
30
-
31
- heap[idx] = obj;
32
- return idx;
33
- }
34
-
35
- function getObject(idx) { return heap[idx]; }
36
-
37
- function dropObject(idx) {
38
- if (idx < 36) return;
39
- heap[idx] = heap_next;
40
- heap_next = idx;
41
- }
42
-
43
- function takeObject(idx) {
44
- const ret = getObject(idx);
45
- dropObject(idx);
46
- return ret;
47
- }
48
-
49
- let WASM_VECTOR_LEN = 0;
50
-
51
- let cachedTextEncoder = new TextEncoder('utf-8');
52
-
53
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
54
- ? function (arg, view) {
55
- return cachedTextEncoder.encodeInto(arg, view);
56
- }
57
- : function (arg, view) {
58
- const buf = cachedTextEncoder.encode(arg);
59
- view.set(buf);
60
- return {
61
- read: arg.length,
62
- written: buf.length
63
- };
64
- });
65
-
66
- function passStringToWasm0(arg, malloc, realloc) {
67
-
68
- if (realloc === undefined) {
69
- const buf = cachedTextEncoder.encode(arg);
70
- const ptr = malloc(buf.length);
71
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
72
- WASM_VECTOR_LEN = buf.length;
73
- return ptr;
74
- }
75
-
76
- let len = arg.length;
77
- let ptr = malloc(len);
78
-
79
- const mem = getUint8Memory0();
80
-
81
- let offset = 0;
82
-
83
- for (; offset < len; offset++) {
84
- const code = arg.charCodeAt(offset);
85
- if (code > 0x7F) break;
86
- mem[ptr + offset] = code;
87
- }
88
-
89
- if (offset !== len) {
90
- if (offset !== 0) {
91
- arg = arg.slice(offset);
92
- }
93
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
94
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
95
- const ret = encodeString(arg, view);
96
-
97
- offset += ret.written;
98
- }
99
-
100
- WASM_VECTOR_LEN = offset;
101
- return ptr;
102
- }
103
-
104
- let cachegetInt32Memory0 = null;
105
- function getInt32Memory0() {
106
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
107
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
108
- }
109
- return cachegetInt32Memory0;
110
- }
111
-
112
- function isLikeNone(x) {
113
- return x === undefined || x === null;
114
- }
115
-
116
- let cachegetFloat64Memory0 = null;
117
- function getFloat64Memory0() {
118
- if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
119
- cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
120
- }
121
- return cachegetFloat64Memory0;
122
- }
123
-
124
- function debugString(val) {
125
- // primitive types
126
- const type = typeof val;
127
- if (type == 'number' || type == 'boolean' || val == null) {
128
- return `${val}`;
129
- }
130
- if (type == 'string') {
131
- return `"${val}"`;
132
- }
133
- if (type == 'symbol') {
134
- const description = val.description;
135
- if (description == null) {
136
- return 'Symbol';
137
- } else {
138
- return `Symbol(${description})`;
139
- }
140
- }
141
- if (type == 'function') {
142
- const name = val.name;
143
- if (typeof name == 'string' && name.length > 0) {
144
- return `Function(${name})`;
145
- } else {
146
- return 'Function';
147
- }
148
- }
149
- // objects
150
- if (Array.isArray(val)) {
151
- const length = val.length;
152
- let debug = '[';
153
- if (length > 0) {
154
- debug += debugString(val[0]);
155
- }
156
- for(let i = 1; i < length; i++) {
157
- debug += ', ' + debugString(val[i]);
158
- }
159
- debug += ']';
160
- return debug;
161
- }
162
- // Test for built-in
163
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
164
- let className;
165
- if (builtInMatches.length > 1) {
166
- className = builtInMatches[1];
167
- } else {
168
- // Failed to match the standard '[object ClassName]'
169
- return toString.call(val);
170
- }
171
- if (className == 'Object') {
172
- // we're a user defined class or Object
173
- // JSON.stringify avoids problems with cycles, and is generally much
174
- // easier than looping through ownProperties of `val`.
175
- try {
176
- return 'Object(' + JSON.stringify(val) + ')';
177
- } catch (_) {
178
- return 'Object';
179
- }
180
- }
181
- // errors
182
- if (val instanceof Error) {
183
- return `${val.name}: ${val.message}\n${val.stack}`;
184
- }
185
- // TODO we could test for more things here, like `Set`s and `Map`s.
186
- return className;
187
- }
188
-
189
- function _assertClass(instance, klass) {
190
- if (!(instance instanceof klass)) {
191
- throw new Error(`expected instance of ${klass.name}`);
192
- }
193
- return instance.ptr;
194
- }
195
- /**
196
- * @param {Graph} graph
197
- * @returns {any}
198
- */
199
- export function initialPlacement(graph) {
200
- _assertClass(graph, Graph);
201
- var ret = wasm.initialPlacement(graph.ptr);
202
- return takeObject(ret);
203
- }
204
-
205
- /**
206
- * @param {Graph} graph
207
- * @returns {Array<any>}
208
- */
209
- export function forceConnected(graph) {
210
- _assertClass(graph, Graph);
211
- var ret = wasm.forceConnected(graph.ptr);
212
- return takeObject(ret);
213
- }
214
-
215
- /**
216
- * @param {Graph} graph
217
- * @returns {Array<any>}
218
- */
219
- export function forceNonconnected(graph) {
220
- _assertClass(graph, Graph);
221
- var ret = wasm.forceNonconnected(graph.ptr);
222
- return takeObject(ret);
223
- }
224
-
225
- let stack_pointer = 32;
226
-
227
- function addBorrowedObject(obj) {
228
- if (stack_pointer == 1) throw new Error('out of js stack');
229
- heap[--stack_pointer] = obj;
230
- return stack_pointer;
231
- }
232
- /**
233
- * @param {Graph} graph
234
- * @param {Function} group_accessor
235
- * @returns {Array<any>}
236
- */
237
- export function forceGrouped(graph, group_accessor) {
238
- try {
239
- _assertClass(graph, Graph);
240
- var ret = wasm.forceGrouped(graph.ptr, addBorrowedObject(group_accessor));
241
- return takeObject(ret);
242
- } finally {
243
- heap[stack_pointer++] = undefined;
244
- }
245
- }
246
-
247
- let cachegetUint32Memory0 = null;
248
- function getUint32Memory0() {
249
- if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) {
250
- cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer);
251
- }
252
- return cachegetUint32Memory0;
253
- }
254
-
255
- function passArrayJsValueToWasm0(array, malloc) {
256
- const ptr = malloc(array.length * 4);
257
- const mem = getUint32Memory0();
258
- for (let i = 0; i < array.length; i++) {
259
- mem[ptr / 4 + i] = addHeapObject(array[i]);
260
- }
261
- WASM_VECTOR_LEN = array.length;
262
- return ptr;
263
- }
264
- /**
265
- * @param {Graph} graph
266
- * @param {any} coordinates
267
- * @param {Function} _length
268
- * @param {number} eps
269
- * @param {number} width
270
- * @param {number} height
271
- * @returns {any}
272
- */
273
- export function kamadaKawai(graph, coordinates, _length, eps, width, height) {
274
- _assertClass(graph, Graph);
275
- var ret = wasm.kamadaKawai(graph.ptr, addHeapObject(coordinates), addHeapObject(_length), eps, width, height);
276
- return takeObject(ret);
277
- }
278
-
279
- /**
280
- * @param {Graph} graph
281
- * @param {number} min_size
282
- * @param {number} step_iteration
283
- * @param {Function} _shrink_node
284
- * @param {Function} _shrink_edge
285
- * @param {Function} _link_distance_accessor
286
- * @returns {any}
287
- */
288
- export function fm3(graph, min_size, step_iteration, _shrink_node, _shrink_edge, _link_distance_accessor) {
289
- _assertClass(graph, Graph);
290
- var ret = wasm.fm3(graph.ptr, min_size, step_iteration, addHeapObject(_shrink_node), addHeapObject(_shrink_edge), addHeapObject(_link_distance_accessor));
291
- return takeObject(ret);
292
- }
293
-
294
- /**
295
- * @param {Graph} graph
296
- * @param {any} coordinates
297
- * @returns {any}
298
- */
299
- export function fdeb(graph, coordinates) {
300
- try {
301
- _assertClass(graph, Graph);
302
- var ret = wasm.fdeb(graph.ptr, addBorrowedObject(coordinates));
303
- return takeObject(ret);
304
- } finally {
305
- heap[stack_pointer++] = undefined;
306
- }
307
- }
308
-
309
- function handleError(f) {
310
- return function () {
311
- try {
312
- return f.apply(this, arguments);
313
-
314
- } catch (e) {
315
- wasm.__wbindgen_exn_store(addHeapObject(e));
316
- }
317
- };
318
- }
319
- /**
320
- */
321
- export class CenterForce {
322
-
323
- free() {
324
- const ptr = this.ptr;
325
- this.ptr = 0;
326
-
327
- wasm.__wbg_centerforce_free(ptr);
328
- }
329
- /**
330
- */
331
- constructor() {
332
- var ret = wasm.centerforce_new();
333
- return Force.__wrap(ret);
334
- }
335
- }
336
- /**
337
- */
338
- export class Force {
339
-
340
- static __wrap(ptr) {
341
- const obj = Object.create(Force.prototype);
342
- obj.ptr = ptr;
343
-
344
- return obj;
345
- }
346
-
347
- free() {
348
- const ptr = this.ptr;
349
- this.ptr = 0;
350
-
351
- wasm.__wbg_force_free(ptr);
352
- }
353
- }
354
- /**
355
- */
356
- export class Graph {
357
-
358
- static __wrap(ptr) {
359
- const obj = Object.create(Graph.prototype);
360
- obj.ptr = ptr;
361
-
362
- return obj;
363
- }
364
-
365
- free() {
366
- const ptr = this.ptr;
367
- this.ptr = 0;
368
-
369
- wasm.__wbg_graph_free(ptr);
370
- }
371
- /**
372
- */
373
- constructor() {
374
- var ret = wasm.graph_new();
375
- return Graph.__wrap(ret);
376
- }
377
- /**
378
- * @returns {number}
379
- */
380
- nodeCount() {
381
- var ret = wasm.graph_nodeCount(this.ptr);
382
- return ret >>> 0;
383
- }
384
- /**
385
- * @returns {number}
386
- */
387
- edgeCount() {
388
- var ret = wasm.graph_edgeCount(this.ptr);
389
- return ret >>> 0;
390
- }
391
- /**
392
- * @param {any} value
393
- * @returns {number}
394
- */
395
- addNode(value) {
396
- var ret = wasm.graph_addNode(this.ptr, addHeapObject(value));
397
- return ret >>> 0;
398
- }
399
- /**
400
- * @param {number} a
401
- * @returns {any}
402
- */
403
- nodeWeight(a) {
404
- var ret = wasm.graph_nodeWeight(this.ptr, a);
405
- return takeObject(ret);
406
- }
407
- /**
408
- * @param {number} a
409
- * @param {number} b
410
- * @param {any} value
411
- * @returns {number}
412
- */
413
- addEdge(a, b, value) {
414
- var ret = wasm.graph_addEdge(this.ptr, a, b, addHeapObject(value));
415
- return ret >>> 0;
416
- }
417
- /**
418
- * @param {number} e
419
- * @returns {any}
420
- */
421
- edgeWeight(e) {
422
- var ret = wasm.graph_edgeWeight(this.ptr, e);
423
- return takeObject(ret);
424
- }
425
- /**
426
- * @param {number} e
427
- * @returns {Array<any>}
428
- */
429
- edgeEndpoints(e) {
430
- var ret = wasm.graph_edgeEndpoints(this.ptr, e);
431
- return takeObject(ret);
432
- }
433
- /**
434
- * @param {number} a
435
- * @returns {any}
436
- */
437
- removeNode(a) {
438
- var ret = wasm.graph_removeNode(this.ptr, a);
439
- return takeObject(ret);
440
- }
441
- /**
442
- * @param {number} e
443
- * @returns {any}
444
- */
445
- removeEdge(e) {
446
- var ret = wasm.graph_removeEdge(this.ptr, e);
447
- return takeObject(ret);
448
- }
449
- /**
450
- * @param {number} a
451
- * @returns {Array<any>}
452
- */
453
- neighbors(a) {
454
- var ret = wasm.graph_neighbors(this.ptr, a);
455
- return takeObject(ret);
456
- }
457
- /**
458
- * @param {number} a
459
- * @param {number} dir
460
- * @returns {Array<any>}
461
- */
462
- neighborsDirected(a, dir) {
463
- var ret = wasm.graph_neighborsDirected(this.ptr, a, dir);
464
- return takeObject(ret);
465
- }
466
- /**
467
- * @param {number} a
468
- * @returns {Array<any>}
469
- */
470
- neighborsUndirected(a) {
471
- var ret = wasm.graph_neighborsUndirected(this.ptr, a);
472
- return takeObject(ret);
473
- }
474
- /**
475
- * @param {number} a
476
- * @returns {Array<any>}
477
- */
478
- edges(a) {
479
- var ret = wasm.graph_edges(this.ptr, a);
480
- return takeObject(ret);
481
- }
482
- /**
483
- * @param {number} a
484
- * @param {number} b
485
- * @returns {boolean}
486
- */
487
- containsEdge(a, b) {
488
- var ret = wasm.graph_containsEdge(this.ptr, a, b);
489
- return ret !== 0;
490
- }
491
- /**
492
- * @param {number} a
493
- * @param {number} b
494
- * @returns {number}
495
- */
496
- findEdge(a, b) {
497
- var ret = wasm.graph_findEdge(this.ptr, a, b);
498
- return ret >>> 0;
499
- }
500
- /**
501
- * @param {number} dir
502
- * @returns {Array<any>}
503
- */
504
- externals(dir) {
505
- var ret = wasm.graph_externals(this.ptr, dir);
506
- return takeObject(ret);
507
- }
508
- /**
509
- * @returns {Array<any>}
510
- */
511
- nodeIndices() {
512
- var ret = wasm.graph_nodeIndices(this.ptr);
513
- return takeObject(ret);
514
- }
515
- /**
516
- * @returns {Array<any>}
517
- */
518
- edgeIndices() {
519
- var ret = wasm.graph_edgeIndices(this.ptr);
520
- return takeObject(ret);
521
- }
522
- }
523
- /**
524
- */
525
- export class LinkForce {
526
-
527
- free() {
528
- const ptr = this.ptr;
529
- this.ptr = 0;
530
-
531
- wasm.__wbg_linkforce_free(ptr);
532
- }
533
- /**
534
- * @param {Graph} graph
535
- */
536
- constructor(graph) {
537
- _assertClass(graph, Graph);
538
- var ret = wasm.linkforce_new(graph.ptr);
539
- return Force.__wrap(ret);
540
- }
541
- }
542
- /**
543
- */
544
- export class ManyBodyForce {
545
-
546
- free() {
547
- const ptr = this.ptr;
548
- this.ptr = 0;
549
-
550
- wasm.__wbg_manybodyforce_free(ptr);
551
- }
552
- /**
553
- * @param {Graph} graph
554
- */
555
- constructor(graph) {
556
- _assertClass(graph, Graph);
557
- var ret = wasm.manybodyforce_new(graph.ptr);
558
- return Force.__wrap(ret);
559
- }
560
- }
561
- /**
562
- */
563
- export class Simulation {
564
-
565
- static __wrap(ptr) {
566
- const obj = Object.create(Simulation.prototype);
567
- obj.ptr = ptr;
568
-
569
- return obj;
570
- }
571
-
572
- free() {
573
- const ptr = this.ptr;
574
- this.ptr = 0;
575
-
576
- wasm.__wbg_simulation_free(ptr);
577
- }
578
- /**
579
- * @param {Graph} graph
580
- * @param {Function} f
581
- */
582
- constructor(graph, f) {
583
- try {
584
- _assertClass(graph, Graph);
585
- var ret = wasm.simulation_new(graph.ptr, addBorrowedObject(f));
586
- return Simulation.__wrap(ret);
587
- } finally {
588
- heap[stack_pointer++] = undefined;
589
- }
590
- }
591
- /**
592
- * @param {any[]} js_forces
593
- * @returns {any}
594
- */
595
- run(js_forces) {
596
- var ptr0 = passArrayJsValueToWasm0(js_forces, wasm.__wbindgen_malloc);
597
- var len0 = WASM_VECTOR_LEN;
598
- var ret = wasm.simulation_run(this.ptr, ptr0, len0);
599
- return takeObject(ret);
600
- }
601
- /**
602
- * @param {number} n
603
- * @param {any[]} js_forces
604
- * @returns {any}
605
- */
606
- runStep(n, js_forces) {
607
- var ptr0 = passArrayJsValueToWasm0(js_forces, wasm.__wbindgen_malloc);
608
- var len0 = WASM_VECTOR_LEN;
609
- var ret = wasm.simulation_runStep(this.ptr, n, ptr0, len0);
610
- return takeObject(ret);
611
- }
612
- /**
613
- * @returns {boolean}
614
- */
615
- isFinished() {
616
- var ret = wasm.simulation_isFinished(this.ptr);
617
- return ret !== 0;
618
- }
619
- /**
620
- * @param {number} alpha_start
621
- */
622
- reset(alpha_start) {
623
- wasm.simulation_reset(this.ptr, alpha_start);
624
- }
625
- /**
626
- * @returns {number}
627
- */
628
- get alphaStart() {
629
- var ret = wasm.simulation_alpha(this.ptr);
630
- return ret;
631
- }
632
- /**
633
- * @param {number} value
634
- */
635
- set alphaStart(value) {
636
- wasm.simulation_reset(this.ptr, value);
637
- }
638
- /**
639
- * @returns {number}
640
- */
641
- get alphaMin() {
642
- var ret = wasm.simulation_alpha_min(this.ptr);
643
- return ret;
644
- }
645
- /**
646
- * @param {number} value
647
- */
648
- set alphaMin(value) {
649
- wasm.simulation_set_alpha_min(this.ptr, value);
650
- }
651
- /**
652
- * @returns {number}
653
- */
654
- get alphaTarget() {
655
- var ret = wasm.simulation_alpha_target(this.ptr);
656
- return ret;
657
- }
658
- /**
659
- * @param {number} value
660
- */
661
- set alphaTarget(value) {
662
- wasm.simulation_set_alpha_target(this.ptr, value);
663
- }
664
- /**
665
- * @returns {number}
666
- */
667
- get velocityDecay() {
668
- var ret = wasm.simulation_velocity_decay(this.ptr);
669
- return ret;
670
- }
671
- /**
672
- * @param {number} value
673
- */
674
- set velocityDecay(value) {
675
- wasm.simulation_set_velocity_decay(this.ptr, value);
676
- }
677
- /**
678
- * @returns {number}
679
- */
680
- get iterations() {
681
- var ret = wasm.simulation_iterations(this.ptr);
682
- return ret >>> 0;
683
- }
684
- /**
685
- * @param {number} value
686
- */
687
- set iterations(value) {
688
- wasm.simulation_set_iterations(this.ptr, value);
689
- }
690
- }
691
-
692
- async function load(module, imports) {
693
- if (typeof Response === 'function' && module instanceof Response) {
694
-
695
- if (typeof WebAssembly.instantiateStreaming === 'function') {
696
- try {
697
- return await WebAssembly.instantiateStreaming(module, imports);
698
-
699
- } catch (e) {
700
- if (module.headers.get('Content-Type') != 'application/wasm') {
701
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
702
-
703
- } else {
704
- throw e;
705
- }
706
- }
707
- }
708
-
709
- const bytes = await module.arrayBuffer();
710
- return await WebAssembly.instantiate(bytes, imports);
711
-
712
- } else {
713
-
714
- const instance = await WebAssembly.instantiate(module, imports);
715
-
716
- if (instance instanceof WebAssembly.Instance) {
717
- return { instance, module };
718
-
719
- } else {
720
- return instance;
721
- }
722
- }
723
- }
724
-
725
- async function init(input) {
726
- if (typeof input === 'undefined') {
727
- input = import.meta.url.replace(/\.js$/, '_bg.wasm');
728
- }
729
- const imports = {};
730
- imports.wbg = {};
731
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
732
- var ret = getStringFromWasm0(arg0, arg1);
733
- return addHeapObject(ret);
734
- };
735
- imports.wbg.__wbindgen_number_new = function(arg0) {
736
- var ret = arg0;
737
- return addHeapObject(ret);
738
- };
739
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
740
- takeObject(arg0);
741
- };
742
- imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
743
- const obj = getObject(arg1);
744
- var ret = JSON.stringify(obj === undefined ? null : obj);
745
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
746
- var len0 = WASM_VECTOR_LEN;
747
- getInt32Memory0()[arg0 / 4 + 1] = len0;
748
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
749
- };
750
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
751
- var ret = getObject(arg0);
752
- return addHeapObject(ret);
753
- };
754
- imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
755
- var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
756
- return addHeapObject(ret);
757
- };
758
- imports.wbg.__wbg_get_a8b9619536c590d4 = function(arg0, arg1) {
759
- var ret = getObject(arg0)[arg1 >>> 0];
760
- return addHeapObject(ret);
761
- };
762
- imports.wbg.__wbg_get_4bab9404e99a1f85 = handleError(function(arg0, arg1) {
763
- var ret = Reflect.get(getObject(arg0), getObject(arg1));
764
- return addHeapObject(ret);
765
- });
766
- imports.wbg.__wbg_new_1abc33d4f9ba3e80 = function() {
767
- var ret = new Array();
768
- return addHeapObject(ret);
769
- };
770
- imports.wbg.__wbg_push_44968dcdf4cfbb43 = function(arg0, arg1) {
771
- var ret = getObject(arg0).push(getObject(arg1));
772
- return ret;
773
- };
774
- imports.wbg.__wbg_call_7a2b5e98ac536644 = handleError(function(arg0, arg1, arg2) {
775
- var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
776
- return addHeapObject(ret);
777
- });
778
- imports.wbg.__wbg_new_dc5b27cfd2149b8f = function() {
779
- var ret = new Object();
780
- return addHeapObject(ret);
781
- };
782
- imports.wbg.__wbg_set_3afd31f38e771338 = handleError(function(arg0, arg1, arg2) {
783
- var ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
784
- return ret;
785
- });
786
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
787
- const obj = getObject(arg1);
788
- var ret = typeof(obj) === 'number' ? obj : undefined;
789
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
790
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
791
- };
792
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
793
- var ret = debugString(getObject(arg1));
794
- var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
795
- var len0 = WASM_VECTOR_LEN;
796
- getInt32Memory0()[arg0 / 4 + 1] = len0;
797
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
798
- };
799
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
800
- throw new Error(getStringFromWasm0(arg0, arg1));
801
- };
802
- imports.wbg.__wbindgen_rethrow = function(arg0) {
803
- throw takeObject(arg0);
804
- };
805
-
806
- if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
807
- input = fetch(input);
808
- }
809
-
810
- const { instance, module } = await load(await input, imports);
811
-
812
- wasm = instance.exports;
813
- init.__wbindgen_wasm_module = module;
814
-
815
- return wasm;
816
- }
817
-
818
- export default init;
819
-