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