@fallen-8/studio 0.0.38 → 0.0.39
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/dist-lib/{Canvas3D-DEWoiNMD.js → Canvas3D-CafFy8T8.js} +1 -1
- package/dist-lib/{F8GraphCanvas-Cu6dtIgq.js → F8GraphCanvas-CMXizZ4K.js} +705 -674
- package/dist-lib/canvas.js +1 -1
- package/dist-lib/{cssMode-1gdBAwNQ.js → cssMode-Dd6oqVGH.js} +1 -1
- package/dist-lib/f8-studio.css +1 -1
- package/dist-lib/f8-studio.js +2 -2
- package/dist-lib/{freemarker2-DOQZLtnt.js → freemarker2-_7Qea7qU.js} +1 -1
- package/dist-lib/{handlebars-CIXlymxU.js → handlebars-BrjKnoRC.js} +1 -1
- package/dist-lib/{html--Bi9VDgI.js → html-CZOSsAmT.js} +1 -1
- package/dist-lib/{htmlMode-BqCrpeeP.js → htmlMode-DmeNRJyP.js} +1 -1
- package/dist-lib/{index-0ioFtrZM.js → index-CGOXemLg.js} +22977 -22317
- package/dist-lib/{javascript-BL3tIzUw.js → javascript-E9zK2eIG.js} +1 -1
- package/dist-lib/{jsonMode-FxM7KRm5.js → jsonMode-BmT8sixk.js} +1 -1
- package/dist-lib/{liquid-wB7unZht.js → liquid-mEomZ5zY.js} +1 -1
- package/dist-lib/{mdx-DmS41r19.js → mdx-poAEdYDh.js} +1 -1
- package/dist-lib/{python-C24igqMV.js → python-BkeUbXrt.js} +1 -1
- package/dist-lib/{razor-BRvioLVk.js → razor-CSXbiZmb.js} +1 -1
- package/dist-lib/{tsMode-zMn1qnUE.js → tsMode-jcKLVReC.js} +1 -1
- package/dist-lib/types/api/endpoints.d.ts +7 -7
- package/dist-lib/types/api/types.d.ts +8 -1
- package/dist-lib/types/canvas/InteractPanel.d.ts +19 -0
- package/dist-lib/types/lib/canvasCap.d.ts +10 -0
- package/dist-lib/types/lib/canvasInteract.d.ts +174 -0
- package/dist-lib/types/lib/fieldHelp.d.ts +7 -0
- package/dist-lib/types/lib/format.d.ts +1 -1
- package/dist-lib/types/lib/listCaps.d.ts +16 -2
- package/dist-lib/types/lib/neighborhood.d.ts +1 -0
- package/dist-lib/types/lib/vectorSearch.d.ts +19 -0
- package/dist-lib/types/state/instanceStore.d.ts +31 -2
- package/dist-lib/types/state/integrations.d.ts +10 -0
- package/dist-lib/{typescript-BIjKKvsW.js → typescript-BqWn12P7.js} +1 -1
- package/dist-lib/{xml-CT-uMOiT.js → xml-BkH9m6gQ.js} +1 -1
- package/dist-lib/{yaml-Dezcc_VH.js → yaml-DURIwCnM.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as ma, jsx as We } from "react/jsx-runtime";
|
|
2
|
-
import Dt, { createContext as di, useContext as fi, useRef as Be, useEffect as Qe, useImperativeHandle as gi, lazy as ya, useMemo as
|
|
3
|
-
const
|
|
2
|
+
import Dt, { createContext as di, useContext as fi, useRef as Be, useEffect as Qe, useImperativeHandle as gi, lazy as ya, useMemo as on, Suspense as ba } from "react";
|
|
3
|
+
const sn = (n) => {
|
|
4
4
|
let r;
|
|
5
5
|
const t = /* @__PURE__ */ new Set(), e = (l, c) => {
|
|
6
6
|
const h = typeof l == "function" ? l(r) : l;
|
|
@@ -10,7 +10,7 @@ const on = (n) => {
|
|
|
10
10
|
}
|
|
11
11
|
}, i = () => r, s = { setState: e, getState: i, getInitialState: () => u, subscribe: (l) => (t.add(l), () => t.delete(l)) }, u = r = n(e, i, s);
|
|
12
12
|
return s;
|
|
13
|
-
}, wa = ((n) => n ?
|
|
13
|
+
}, wa = ((n) => n ? sn(n) : sn), Ea = (n) => n;
|
|
14
14
|
function _a(n, r = Ea) {
|
|
15
15
|
const t = Dt.useSyncExternalStore(
|
|
16
16
|
n.subscribe,
|
|
@@ -40,12 +40,12 @@ function Sa(n, r) {
|
|
|
40
40
|
removeItem: (i) => t.removeItem(i)
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const Tr = (n) => (r) => {
|
|
44
44
|
try {
|
|
45
45
|
const t = n(r);
|
|
46
46
|
return t instanceof Promise ? t : {
|
|
47
47
|
then(e) {
|
|
48
|
-
return
|
|
48
|
+
return Tr(e)(t);
|
|
49
49
|
},
|
|
50
50
|
catch(e) {
|
|
51
51
|
return this;
|
|
@@ -57,7 +57,7 @@ const _r = (n) => (r) => {
|
|
|
57
57
|
return this;
|
|
58
58
|
},
|
|
59
59
|
catch(e) {
|
|
60
|
-
return
|
|
60
|
+
return Tr(e)(t);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -108,7 +108,7 @@ const _r = (n) => (r) => {
|
|
|
108
108
|
return p((C = e()) != null ? C : y);
|
|
109
109
|
});
|
|
110
110
|
const m = ((k = a.onRehydrateStorage) == null ? void 0 : k.call(a, (w = e()) != null ? w : y)) || void 0;
|
|
111
|
-
return
|
|
111
|
+
return Tr(c.getItem.bind(c))(a.name).then((p) => {
|
|
112
112
|
if (p)
|
|
113
113
|
if (typeof p.version == "number" && p.version !== a.version) {
|
|
114
114
|
if (a.migrate) {
|
|
@@ -160,7 +160,7 @@ const _r = (n) => (r) => {
|
|
|
160
160
|
l.delete(w);
|
|
161
161
|
})
|
|
162
162
|
}, a.skipHydration || R(), b || y;
|
|
163
|
-
}, Aa = Ra,
|
|
163
|
+
}, Aa = Ra, Sr = {
|
|
164
164
|
renderer: "2d",
|
|
165
165
|
layout2d: "force",
|
|
166
166
|
layout3d: "force",
|
|
@@ -205,23 +205,23 @@ function ka(n) {
|
|
|
205
205
|
}
|
|
206
206
|
return { ok: !0, vector: e };
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Mr = {
|
|
209
209
|
source: "vector",
|
|
210
210
|
vectorText: "",
|
|
211
211
|
queryText: "",
|
|
212
212
|
embeddingName: "default",
|
|
213
213
|
metric: "Cosine"
|
|
214
214
|
}, vi = {
|
|
215
|
-
|
|
215
|
+
...Mr,
|
|
216
216
|
enabled: !1,
|
|
217
217
|
minScoreEnabled: !1,
|
|
218
218
|
minScore: "0.7",
|
|
219
219
|
costBySimilarity: !1
|
|
220
220
|
};
|
|
221
|
-
function
|
|
221
|
+
function sc(n) {
|
|
222
222
|
return n.enabled && (n.minScoreEnabled || n.costBySimilarity);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function uc(n) {
|
|
225
225
|
return n.enabled && n.costBySimilarity;
|
|
226
226
|
}
|
|
227
227
|
function Ca(n, r) {
|
|
@@ -246,14 +246,14 @@ function Ca(n, r) {
|
|
|
246
246
|
}
|
|
247
247
|
return { ok: !0, spec: t };
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function lc(n) {
|
|
250
250
|
const r = n.trim();
|
|
251
251
|
if (!r)
|
|
252
252
|
return;
|
|
253
253
|
const t = Number(r);
|
|
254
254
|
return Number.isFinite(t) ? t : void 0;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function cc(n) {
|
|
257
257
|
const r = n.metric === "L2" ? "≤" : "≥", t = [`${n.metric} over '${n.embeddingName}' (d=${n.dimension})`];
|
|
258
258
|
n.minScore != null && t.push(`pre-filter ${r} ${n.minScore}`);
|
|
259
259
|
for (const e of n.patternThresholds ?? [])
|
|
@@ -262,7 +262,7 @@ function uc(n) {
|
|
|
262
262
|
n.embeddingIdentity ? `via ${n.embeddingBackend} · ${n.embeddingIdentity}` : `via ${n.embeddingBackend}`
|
|
263
263
|
), t.push("bound at creation — recalculate reuses the stored vector"), t.join(" · ");
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function hc(n, r) {
|
|
266
266
|
if (!n.enabled)
|
|
267
267
|
return { ok: !0, spec: void 0 };
|
|
268
268
|
const t = Ca(n, { providerEnabled: r.providerEnabled });
|
|
@@ -287,29 +287,29 @@ function lc(n, r) {
|
|
|
287
287
|
}
|
|
288
288
|
return { ok: !0, spec: e };
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const Rr = [
|
|
291
291
|
"vertexCreated",
|
|
292
292
|
"vertexRemoved",
|
|
293
293
|
"edgeCreated",
|
|
294
294
|
"edgeRemoved",
|
|
295
295
|
"propertySet",
|
|
296
296
|
"propertyRemoved"
|
|
297
|
-
],
|
|
298
|
-
kinds: [...
|
|
299
|
-
elements: [...
|
|
297
|
+
], Ar = ["vertex", "edge"], un = {
|
|
298
|
+
kinds: [...Rr],
|
|
299
|
+
elements: [...Ar],
|
|
300
300
|
labels: [],
|
|
301
301
|
keys: []
|
|
302
302
|
};
|
|
303
|
-
function
|
|
303
|
+
function dc(n, r) {
|
|
304
304
|
return n.kind === "resync" ? !0 : !(!r.kinds.includes(n.kind) || n.element !== void 0 && !r.elements.includes(n.element) || r.labels.length > 0 && (n.label === void 0 || !r.labels.includes(n.label)) || r.keys.length > 0 && (n.key === void 0 || !r.keys.includes(n.key)));
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function fc(n) {
|
|
307
307
|
return n.kinds.length > 0 && n.elements.length > 0;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function gc(n) {
|
|
310
310
|
return {
|
|
311
|
-
kinds: n.kinds.length ===
|
|
312
|
-
elements: n.elements.length ===
|
|
311
|
+
kinds: n.kinds.length === Rr.length ? void 0 : Rr.filter((r) => n.kinds.includes(r)),
|
|
312
|
+
elements: n.elements.length === Ar.length ? void 0 : Ar.filter((r) => n.elements.includes(r)),
|
|
313
313
|
labels: n.labels.length > 0 ? n.labels : void 0,
|
|
314
314
|
keys: n.keys.length > 0 ? n.keys : void 0
|
|
315
315
|
};
|
|
@@ -341,7 +341,7 @@ function La() {
|
|
|
341
341
|
}));
|
|
342
342
|
}
|
|
343
343
|
const xe = /* @__PURE__ */ new Map();
|
|
344
|
-
function
|
|
344
|
+
function pc(n, r) {
|
|
345
345
|
const t = He(n, r);
|
|
346
346
|
let e = xe.get(t);
|
|
347
347
|
return e || (e = La(), xe.set(t, e)), e;
|
|
@@ -375,17 +375,17 @@ const Fa = {
|
|
|
375
375
|
fontMono: "--font-mono"
|
|
376
376
|
};
|
|
377
377
|
let _t = {}, wt = 0;
|
|
378
|
-
function
|
|
378
|
+
function vc() {
|
|
379
379
|
return _t;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function mc(n) {
|
|
382
382
|
if (wt > 0 && n !== _t)
|
|
383
383
|
throw new Error(
|
|
384
384
|
"F8 Studio is already mounted. Two simultaneous Studio embeds are not supported (they share one instance registry and one set of persisted keys); unmount the first, or run the second in its own realm (iframe/worker)."
|
|
385
385
|
);
|
|
386
386
|
_t = n;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function yc() {
|
|
389
389
|
if (wt > 0)
|
|
390
390
|
throw new Error(
|
|
391
391
|
"F8 Studio is already mounted. Two simultaneous Studio embeds are not supported (they share one instance registry and one set of persisted keys); unmount the first, or run the second in its own realm (iframe/worker)."
|
|
@@ -396,7 +396,7 @@ function vc() {
|
|
|
396
396
|
n || (n = !0, wt -= 1);
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function bc() {
|
|
400
400
|
wt === 0 && (_t = {});
|
|
401
401
|
}
|
|
402
402
|
function Oa(n) {
|
|
@@ -410,11 +410,11 @@ function za(n) {
|
|
|
410
410
|
return r;
|
|
411
411
|
}
|
|
412
412
|
const Na = di({});
|
|
413
|
-
function
|
|
413
|
+
function wc() {
|
|
414
414
|
return fi(Na);
|
|
415
415
|
}
|
|
416
416
|
const Ua = di(void 0);
|
|
417
|
-
function
|
|
417
|
+
function Ec() {
|
|
418
418
|
return fi(Ua);
|
|
419
419
|
}
|
|
420
420
|
function Ke(n) {
|
|
@@ -423,12 +423,12 @@ function Ke(n) {
|
|
|
423
423
|
function mi(n) {
|
|
424
424
|
return n.label ?? n.edgePropertyId ?? null;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
427
|
-
function
|
|
426
|
+
const ln = 200;
|
|
427
|
+
function cn(n) {
|
|
428
428
|
const r = {};
|
|
429
429
|
for (const t of n ?? []) {
|
|
430
430
|
const e = t.propertyValue;
|
|
431
|
-
typeof e == "number" || typeof e == "boolean" ? r[t.propertyId] = e : typeof e == "string" && (r[t.propertyId] = e.length >
|
|
431
|
+
typeof e == "number" || typeof e == "boolean" ? r[t.propertyId] = e : typeof e == "string" && (r[t.propertyId] = e.length > ln ? e.slice(0, ln) : e);
|
|
432
432
|
}
|
|
433
433
|
return r;
|
|
434
434
|
}
|
|
@@ -438,7 +438,7 @@ function $a(n, r, t) {
|
|
|
438
438
|
e[a.id] = {
|
|
439
439
|
id: a.id,
|
|
440
440
|
label: a.label ?? null,
|
|
441
|
-
props:
|
|
441
|
+
props: cn(a.properties)
|
|
442
442
|
};
|
|
443
443
|
for (const a of r)
|
|
444
444
|
e[a.sourceVertex] || (e[a.sourceVertex] = { id: a.sourceVertex, label: null }), e[a.targetVertex] || (e[a.targetVertex] = { id: a.targetVertex, label: null }), i[a.id] = {
|
|
@@ -447,11 +447,11 @@ function $a(n, r, t) {
|
|
|
447
447
|
target: a.targetVertex,
|
|
448
448
|
edgePropertyId: a.edgePropertyId ?? null,
|
|
449
449
|
label: a.label ?? null,
|
|
450
|
-
props:
|
|
450
|
+
props: cn(a.properties)
|
|
451
451
|
};
|
|
452
452
|
return { nodes: e, edges: i };
|
|
453
453
|
}
|
|
454
|
-
const Ma = ["path", "subgraph", "stored"],
|
|
454
|
+
const Ma = ["path", "subgraph", "stored"], hn = "path", Ba = (n) => typeof n == "string" && Ma.includes(n), _c = (n) => n === "SubGraph" ? "subgraph" : "path", Kt = {
|
|
455
455
|
from: "",
|
|
456
456
|
to: "",
|
|
457
457
|
algorithm: "BLS",
|
|
@@ -505,7 +505,7 @@ const Lt = {
|
|
|
505
505
|
patterns: [],
|
|
506
506
|
filterSource: "inline",
|
|
507
507
|
storedQuery: "",
|
|
508
|
-
semanticQuery: {
|
|
508
|
+
semanticQuery: { ...Mr }
|
|
509
509
|
}, Xt = {
|
|
510
510
|
idInput: "",
|
|
511
511
|
lookupKind: "graphelement",
|
|
@@ -525,21 +525,32 @@ const Lt = {
|
|
|
525
525
|
showWriteBack: !1,
|
|
526
526
|
writeBack: !1,
|
|
527
527
|
writeBackKey: ""
|
|
528
|
-
},
|
|
528
|
+
}, ja = ["style", "find", "connect", "interact"], Va = (n) => typeof n == "string" && ja.includes(n), Zt = {
|
|
529
529
|
tab: "style",
|
|
530
530
|
findTerm: "",
|
|
531
531
|
findLabel: "",
|
|
532
532
|
findResultType: "Both",
|
|
533
533
|
connectMaxDepth: 3,
|
|
534
|
-
connectScope: "all"
|
|
534
|
+
connectScope: "all",
|
|
535
|
+
interactLabel: "",
|
|
536
|
+
interactPropKey: "",
|
|
537
|
+
interactPropTerm: "",
|
|
538
|
+
interactDegreeSource: "database",
|
|
539
|
+
interactDegreeDirection: "total",
|
|
540
|
+
interactDegreeOp: "over",
|
|
541
|
+
interactDegreeValue: "",
|
|
542
|
+
interactSemanticText: "",
|
|
543
|
+
interactSemanticIndexId: "",
|
|
544
|
+
interactSemanticDirection: "closer",
|
|
545
|
+
interactSemanticThreshold: ""
|
|
535
546
|
};
|
|
536
|
-
function
|
|
547
|
+
function qa(n) {
|
|
537
548
|
return pi()(
|
|
538
549
|
Aa(
|
|
539
550
|
(r) => ({
|
|
540
551
|
canvasNodes: {},
|
|
541
552
|
canvasEdges: {},
|
|
542
|
-
styleConfig: { ...
|
|
553
|
+
styleConfig: { ...Sr },
|
|
543
554
|
pathOverlay: null,
|
|
544
555
|
wholeGraphTruncation: null,
|
|
545
556
|
resultSets: [],
|
|
@@ -548,10 +559,10 @@ function ja(n) {
|
|
|
548
559
|
subgraphDraft: { ...Lt },
|
|
549
560
|
browserDraft: { ...Xt },
|
|
550
561
|
analyticsDraft: { ...Yt },
|
|
551
|
-
canvasToolsDraft: { ...
|
|
552
|
-
traverseTab:
|
|
562
|
+
canvasToolsDraft: { ...Zt },
|
|
563
|
+
traverseTab: hn,
|
|
553
564
|
scanPrefill: null,
|
|
554
|
-
feedFilter: { ...
|
|
565
|
+
feedFilter: { ...un },
|
|
555
566
|
inspectPrefill: null,
|
|
556
567
|
integrationWatch: null,
|
|
557
568
|
mergeIntoCanvas: (t, e) => r((i) => {
|
|
@@ -575,6 +586,16 @@ function ja(n) {
|
|
|
575
586
|
);
|
|
576
587
|
return { canvasNodes: a, canvasEdges: o };
|
|
577
588
|
}),
|
|
589
|
+
removeManyFromCanvas: (t) => r((e) => {
|
|
590
|
+
if (t.length === 0) return {};
|
|
591
|
+
const i = new Set(t), a = {};
|
|
592
|
+
for (const [s, u] of Object.entries(e.canvasNodes))
|
|
593
|
+
i.has(Number(s)) || (a[Number(s)] = u);
|
|
594
|
+
const o = {};
|
|
595
|
+
for (const [s, u] of Object.entries(e.canvasEdges))
|
|
596
|
+
!i.has(u.source) && !i.has(u.target) && (o[Number(s)] = u);
|
|
597
|
+
return { canvasNodes: a, canvasEdges: o };
|
|
598
|
+
}),
|
|
578
599
|
clearCanvas: () => r({
|
|
579
600
|
canvasNodes: {},
|
|
580
601
|
canvasEdges: {},
|
|
@@ -641,18 +662,26 @@ function ja(n) {
|
|
|
641
662
|
...Lt,
|
|
642
663
|
...e.subgraphDraft ?? {},
|
|
643
664
|
semanticQuery: {
|
|
644
|
-
|
|
665
|
+
...Mr,
|
|
645
666
|
...e.subgraphDraft?.semanticQuery ?? {}
|
|
646
667
|
}
|
|
647
668
|
},
|
|
648
669
|
browserDraft: { ...Xt, ...e.browserDraft ?? {} },
|
|
649
670
|
analyticsDraft: { ...Yt, ...e.analyticsDraft ?? {} },
|
|
650
|
-
canvasToolsDraft: {
|
|
671
|
+
canvasToolsDraft: {
|
|
672
|
+
...Zt,
|
|
673
|
+
...e.canvasToolsDraft ?? {},
|
|
674
|
+
// Normalized for the same reason as traverseTab below: the canvas tool strip renders
|
|
675
|
+
// one panel per known id, so a tab this build does not know (a workspace persisted by
|
|
676
|
+
// a newer Studio, a rolled-back container, hand-edited storage) would show a strip
|
|
677
|
+
// with nothing selected and an empty area under it.
|
|
678
|
+
tab: Va(e.canvasToolsDraft?.tab) ? e.canvasToolsDraft.tab : Zt.tab
|
|
679
|
+
},
|
|
651
680
|
// Normalized, not trusted: a tab id this build does not know (hand-edited storage,
|
|
652
681
|
// a renamed tab) would leave the Traverse screen with every panel hidden.
|
|
653
|
-
traverseTab: Ba(e.traverseTab) ? e.traverseTab :
|
|
654
|
-
styleConfig: { ...
|
|
655
|
-
feedFilter: { ...
|
|
682
|
+
traverseTab: Ba(e.traverseTab) ? e.traverseTab : hn,
|
|
683
|
+
styleConfig: { ...Sr, ...e.styleConfig ?? {} },
|
|
684
|
+
feedFilter: { ...un, ...e.feedFilter ?? {} },
|
|
656
685
|
// One-shots never rehydrate (see partialize); this also drops values
|
|
657
686
|
// persisted before the partialize existed.
|
|
658
687
|
scanPrefill: null,
|
|
@@ -668,16 +697,16 @@ function ja(n) {
|
|
|
668
697
|
);
|
|
669
698
|
}
|
|
670
699
|
const je = /* @__PURE__ */ new Map();
|
|
671
|
-
function
|
|
700
|
+
function Tc(n, r) {
|
|
672
701
|
const t = He(n, r);
|
|
673
702
|
let e = je.get(t);
|
|
674
|
-
return e || (e =
|
|
703
|
+
return e || (e = qa(t), je.set(t, e)), e;
|
|
675
704
|
}
|
|
676
|
-
function
|
|
705
|
+
function Sc(n, r) {
|
|
677
706
|
const t = He(n, r);
|
|
678
707
|
je.delete(t), localStorage.removeItem(Ke(t)), Ga(n, r);
|
|
679
708
|
}
|
|
680
|
-
function
|
|
709
|
+
function Rc(n) {
|
|
681
710
|
for (const r of [...je.keys()])
|
|
682
711
|
(r === n || r.startsWith(`${n}/`)) && je.delete(r);
|
|
683
712
|
for (let r = localStorage.length - 1; r >= 0; r--) {
|
|
@@ -686,13 +715,13 @@ function Tc(n) {
|
|
|
686
715
|
}
|
|
687
716
|
Ia(n);
|
|
688
717
|
}
|
|
689
|
-
function
|
|
718
|
+
function Ac(n, r, t) {
|
|
690
719
|
const e = He(n, r), i = He(n, t);
|
|
691
720
|
if (e === i) return;
|
|
692
721
|
const a = localStorage.getItem(Ke(e));
|
|
693
722
|
a !== null && (localStorage.setItem(Ke(i), a), localStorage.removeItem(Ke(e))), je.delete(e), je.delete(i), Pa(n, r, t);
|
|
694
723
|
}
|
|
695
|
-
function
|
|
724
|
+
function kc() {
|
|
696
725
|
je.clear();
|
|
697
726
|
}
|
|
698
727
|
const dn = [
|
|
@@ -727,17 +756,17 @@ function Bt(n) {
|
|
|
727
756
|
function yi(n) {
|
|
728
757
|
return n == null || n === "" ? Tt : Bt(String(n));
|
|
729
758
|
}
|
|
730
|
-
const
|
|
731
|
-
function
|
|
759
|
+
const Cc = "#39c5cf", xc = "#f778ba";
|
|
760
|
+
function Ka(n) {
|
|
732
761
|
const r = Math.min(1, Math.max(0, n)), t = [57, 197, 207], e = [247, 120, 186];
|
|
733
762
|
return `#${t.map((a, o) => Math.round(a + (e[o] - a) * r)).map((a) => a.toString(16).padStart(2, "0")).join("")}`;
|
|
734
763
|
}
|
|
735
|
-
const
|
|
764
|
+
const Xa = 5e3, Ya = {
|
|
736
765
|
nodeIds: /* @__PURE__ */ new Set(),
|
|
737
766
|
edgeIds: /* @__PURE__ */ new Set(),
|
|
738
767
|
active: !1,
|
|
739
768
|
dim: !1
|
|
740
|
-
},
|
|
769
|
+
}, Br = 5, Za = [3, 14], Qa = 1, Ja = [0.5, 5], eo = 11, to = 9, ro = 8, no = 3, io = "#4cc38a", ao = "#2a3240", oo = "#1a2029", so = "#2c3543";
|
|
741
770
|
function tt(n, r) {
|
|
742
771
|
return (n.props ?? {})[r];
|
|
743
772
|
}
|
|
@@ -749,12 +778,12 @@ function St(n) {
|
|
|
749
778
|
}
|
|
750
779
|
return null;
|
|
751
780
|
}
|
|
752
|
-
function
|
|
781
|
+
function uo(n) {
|
|
753
782
|
if (n == null || typeof n == "boolean") return null;
|
|
754
783
|
const r = String(n).trim();
|
|
755
784
|
return r ? /^(https?:\/\/|data:)/i.test(r) ? { kind: "url", value: r } : { kind: "emoji", value: [...r].slice(0, 8).join("") } : null;
|
|
756
785
|
}
|
|
757
|
-
function
|
|
786
|
+
function kr(n, r, t) {
|
|
758
787
|
if (r !== "property" || !t) return { kind: "label" };
|
|
759
788
|
const e = n.map((i) => tt(i, t)).filter((i) => i !== void 0 && i !== "");
|
|
760
789
|
if (e.length > 0 && e.every((i) => St(i) !== null)) {
|
|
@@ -776,7 +805,7 @@ function fn(n, r, t) {
|
|
|
776
805
|
const i = St(e);
|
|
777
806
|
if (i === null) return Tt;
|
|
778
807
|
const a = n.max - n.min;
|
|
779
|
-
return
|
|
808
|
+
return Ka(a === 0 ? 0.5 : (i - n.min) / a);
|
|
780
809
|
}
|
|
781
810
|
return yi(e);
|
|
782
811
|
}
|
|
@@ -801,15 +830,15 @@ function pn(n, r) {
|
|
|
801
830
|
const [t, e] = n;
|
|
802
831
|
return Rt(t) && Rt(e) ? n : r;
|
|
803
832
|
}
|
|
804
|
-
function
|
|
833
|
+
function lo(n, r) {
|
|
805
834
|
const [t, e] = r;
|
|
806
835
|
return Math.min(Math.max(n, Math.min(t, e)), Math.max(t, e));
|
|
807
836
|
}
|
|
808
837
|
function vn(n, r, t) {
|
|
809
|
-
return Rt(n) ? r :
|
|
838
|
+
return Rt(n) ? r : lo(r, t);
|
|
810
839
|
}
|
|
811
|
-
function
|
|
812
|
-
const r = Gt(n.nodeSize,
|
|
840
|
+
function co(n) {
|
|
841
|
+
const r = Gt(n.nodeSize, Br), t = pn(n.nodeSizeRange, Za), e = Gt(n.edgeWidth, Qa), i = pn(n.edgeWidthRange, Ja);
|
|
813
842
|
return {
|
|
814
843
|
nodeSize: r,
|
|
815
844
|
nodeSizeRange: t,
|
|
@@ -817,11 +846,11 @@ function uo(n) {
|
|
|
817
846
|
edgeWidth: e,
|
|
818
847
|
edgeWidthRange: i,
|
|
819
848
|
edgeWidthFallback: vn(n.edgeWidth, e, i),
|
|
820
|
-
labelSize: Gt(n.labelSize,
|
|
821
|
-
edgeLabelSize: Gt(n.edgeLabelSize,
|
|
849
|
+
labelSize: Gt(n.labelSize, eo),
|
|
850
|
+
edgeLabelSize: Gt(n.edgeLabelSize, to)
|
|
822
851
|
};
|
|
823
852
|
}
|
|
824
|
-
function
|
|
853
|
+
function ho(n) {
|
|
825
854
|
const r = /* @__PURE__ */ new Map(), t = (e) => {
|
|
826
855
|
let i = r.get(e);
|
|
827
856
|
return i || (i = { in: 0, out: 0 }, r.set(e, i)), i;
|
|
@@ -830,8 +859,8 @@ function lo(n) {
|
|
|
830
859
|
t(e.source).out++, t(e.target).in++;
|
|
831
860
|
return r;
|
|
832
861
|
}
|
|
833
|
-
function
|
|
834
|
-
const i = Object.values(n), a = Object.values(r), o =
|
|
862
|
+
function fo(n, r, t, e) {
|
|
863
|
+
const i = Object.values(n), a = Object.values(r), o = co(e), s = kr(i, e.nodeColorMode, e.nodeColorProperty), u = kr(a, e.edgeColorMode, e.edgeColorProperty), l = e.nodeSizeMode === "in-degree" || e.nodeSizeMode === "out-degree" || e.nodeSizeMode === "degree" ? ho(a) : null, c = (w) => {
|
|
835
864
|
switch (e.nodeSizeMode) {
|
|
836
865
|
case "property":
|
|
837
866
|
return e.nodeSizeProperty ? St(tt(w, e.nodeSizeProperty)) : null;
|
|
@@ -848,10 +877,10 @@ function co(n, r, t, e) {
|
|
|
848
877
|
}
|
|
849
878
|
}, h = e.nodeSizeMode === "fixed" ? () => o.nodeSize : gn(i.map(c), o.nodeSizeRange, o.nodeSizeFallback), v = (w) => e.edgeWidthMode === "property" && e.edgeWidthProperty ? St(tt(w, e.edgeWidthProperty)) : null, y = e.edgeWidthMode === "fixed" ? () => o.edgeWidth : gn(a.map(v), o.edgeWidthRange, o.edgeWidthFallback), b = {};
|
|
850
879
|
for (const w of i) {
|
|
851
|
-
const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ?
|
|
880
|
+
const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ? uo(tt(w, e.nodeImageProperty)) : null;
|
|
852
881
|
b[w.id] = {
|
|
853
|
-
color: E ?
|
|
854
|
-
size: k ? Math.max(m,
|
|
882
|
+
color: E ? ao : fn(s, w, Bt(w.label)),
|
|
883
|
+
size: k ? Math.max(m, ro) : m,
|
|
855
884
|
// A dimmed image would still pop against the dim palette — suppress it (FR-9).
|
|
856
885
|
image: E ? null : p,
|
|
857
886
|
zIndex: k ? 2 : 1,
|
|
@@ -860,19 +889,19 @@ function co(n, r, t, e) {
|
|
|
860
889
|
}
|
|
861
890
|
const R = {};
|
|
862
891
|
for (const w of a) {
|
|
863
|
-
const k = t.edgeIds.has(w.id), E = t.active && t.dim && !k, m = y(v(w)), p = mi(w), C = p ? Bt(p) :
|
|
892
|
+
const k = t.edgeIds.has(w.id), E = t.active && t.dim && !k, m = y(v(w)), p = mi(w), C = p ? Bt(p) : so;
|
|
864
893
|
R[w.id] = {
|
|
865
|
-
color: k ?
|
|
866
|
-
width: k ? Math.max(m,
|
|
894
|
+
color: k ? io : E ? oo : fn(u, w, C),
|
|
895
|
+
width: k ? Math.max(m, no) : m,
|
|
867
896
|
zIndex: k ? 2 : 0,
|
|
868
897
|
dimmed: E
|
|
869
898
|
};
|
|
870
899
|
}
|
|
871
900
|
return { nodes: b, edges: R, magnitudes: o };
|
|
872
901
|
}
|
|
873
|
-
const
|
|
874
|
-
function
|
|
875
|
-
const t = Object.values(n), e =
|
|
902
|
+
const go = 12;
|
|
903
|
+
function Dc(n, r) {
|
|
904
|
+
const t = Object.values(n), e = kr(t, r.nodeColorMode, r.nodeColorProperty);
|
|
876
905
|
if (e.kind === "gradient")
|
|
877
906
|
return { kind: "gradient", title: e.property, min: e.min, max: e.max };
|
|
878
907
|
const i = /* @__PURE__ */ new Map();
|
|
@@ -886,24 +915,24 @@ function Cc(n, r) {
|
|
|
886
915
|
const l = i.get(s);
|
|
887
916
|
l ? l.count++ : i.set(s, { color: u, count: 1 });
|
|
888
917
|
}
|
|
889
|
-
const a = [...i.entries()].map(([o, { color: s, count: u }]) => ({ key: o, color: s, count: u })).sort((o, s) => s.count - o.count).slice(0,
|
|
918
|
+
const a = [...i.entries()].map(([o, { color: s, count: u }]) => ({ key: o, color: s, count: u })).sort((o, s) => s.count - o.count).slice(0, go);
|
|
890
919
|
return {
|
|
891
920
|
kind: "categorical",
|
|
892
921
|
title: e.kind === "categorical" ? e.property : "labels",
|
|
893
922
|
entries: a
|
|
894
923
|
};
|
|
895
924
|
}
|
|
896
|
-
function
|
|
925
|
+
function Lc(n) {
|
|
897
926
|
const r = /* @__PURE__ */ new Set();
|
|
898
927
|
for (const t of n)
|
|
899
928
|
for (const e of Object.keys(t.props ?? {})) r.add(e);
|
|
900
929
|
return [...r].sort();
|
|
901
930
|
}
|
|
902
|
-
function
|
|
931
|
+
function Wr(n) {
|
|
903
932
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
904
933
|
}
|
|
905
934
|
var It = { exports: {} }, mn;
|
|
906
|
-
function
|
|
935
|
+
function po() {
|
|
907
936
|
if (mn) return It.exports;
|
|
908
937
|
mn = 1;
|
|
909
938
|
var n = typeof Reflect == "object" ? Reflect : null, r = n && typeof n.apply == "function" ? n.apply : function(C, L, g) {
|
|
@@ -1114,15 +1143,15 @@ function fo() {
|
|
|
1114
1143
|
}
|
|
1115
1144
|
return It.exports;
|
|
1116
1145
|
}
|
|
1117
|
-
var
|
|
1118
|
-
function
|
|
1146
|
+
var Hr = po();
|
|
1147
|
+
function vo() {
|
|
1119
1148
|
const n = arguments[0];
|
|
1120
1149
|
for (let r = 1, t = arguments.length; r < t; r++)
|
|
1121
1150
|
if (arguments[r])
|
|
1122
1151
|
for (const e in arguments[r]) n[e] = arguments[r][e];
|
|
1123
1152
|
return n;
|
|
1124
1153
|
}
|
|
1125
|
-
let ue =
|
|
1154
|
+
let ue = vo;
|
|
1126
1155
|
typeof Object.assign == "function" && (ue = Object.assign);
|
|
1127
1156
|
function _e(n, r, t, e) {
|
|
1128
1157
|
const i = n._nodes.get(r);
|
|
@@ -1155,7 +1184,7 @@ function Ae(n, r, t) {
|
|
|
1155
1184
|
function yn(n) {
|
|
1156
1185
|
return !(!he(n) || n.attributes && !Array.isArray(n.attributes));
|
|
1157
1186
|
}
|
|
1158
|
-
function
|
|
1187
|
+
function mo() {
|
|
1159
1188
|
let n = Math.floor(Math.random() * 256) & 255;
|
|
1160
1189
|
return () => n++;
|
|
1161
1190
|
}
|
|
@@ -1193,12 +1222,12 @@ function st() {
|
|
|
1193
1222
|
}
|
|
1194
1223
|
};
|
|
1195
1224
|
}
|
|
1196
|
-
class
|
|
1225
|
+
class jr extends Error {
|
|
1197
1226
|
constructor(r) {
|
|
1198
1227
|
super(), this.name = "GraphError", this.message = r;
|
|
1199
1228
|
}
|
|
1200
1229
|
}
|
|
1201
|
-
class H extends
|
|
1230
|
+
class H extends jr {
|
|
1202
1231
|
constructor(r) {
|
|
1203
1232
|
super(r), this.name = "InvalidArgumentsGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(
|
|
1204
1233
|
this,
|
|
@@ -1206,12 +1235,12 @@ class H extends Hr {
|
|
|
1206
1235
|
);
|
|
1207
1236
|
}
|
|
1208
1237
|
}
|
|
1209
|
-
class M extends
|
|
1238
|
+
class M extends jr {
|
|
1210
1239
|
constructor(r) {
|
|
1211
1240
|
super(r), this.name = "NotFoundGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, M.prototype.constructor);
|
|
1212
1241
|
}
|
|
1213
1242
|
}
|
|
1214
|
-
class Q extends
|
|
1243
|
+
class Q extends jr {
|
|
1215
1244
|
constructor(r) {
|
|
1216
1245
|
super(r), this.name = "UsageGraphError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Q.prototype.constructor);
|
|
1217
1246
|
}
|
|
@@ -1264,7 +1293,7 @@ ut.prototype.detachMulti = function() {
|
|
|
1264
1293
|
let t = "out", e = "in";
|
|
1265
1294
|
this.undirected && (t = e = "undirected"), this.previous === void 0 ? this.next === void 0 ? (delete this.source[t][r], delete this.target[e][n]) : (this.next.previous = void 0, this.source[t][r] = this.next, this.target[e][n] = this.next) : (this.previous.next = this.next, this.next !== void 0 && (this.next.previous = this.previous));
|
|
1266
1295
|
};
|
|
1267
|
-
const Ti = 0, Si = 1,
|
|
1296
|
+
const Ti = 0, Si = 1, yo = 2, Ri = 3;
|
|
1268
1297
|
function Ne(n, r, t, e, i, a, o) {
|
|
1269
1298
|
let s, u, l, c;
|
|
1270
1299
|
if (e = "" + e, t === Ti) {
|
|
@@ -1297,7 +1326,7 @@ function Ne(n, r, t, e, i, a, o) {
|
|
|
1297
1326
|
}
|
|
1298
1327
|
return [s, l, c];
|
|
1299
1328
|
}
|
|
1300
|
-
function
|
|
1329
|
+
function bo(n, r, t) {
|
|
1301
1330
|
n.prototype[r] = function(e, i, a) {
|
|
1302
1331
|
const [o, s] = Ne(
|
|
1303
1332
|
this,
|
|
@@ -1310,7 +1339,7 @@ function mo(n, r, t) {
|
|
|
1310
1339
|
return o.attributes[s];
|
|
1311
1340
|
};
|
|
1312
1341
|
}
|
|
1313
|
-
function
|
|
1342
|
+
function wo(n, r, t) {
|
|
1314
1343
|
n.prototype[r] = function(e, i) {
|
|
1315
1344
|
const [a] = Ne(
|
|
1316
1345
|
this,
|
|
@@ -1322,7 +1351,7 @@ function yo(n, r, t) {
|
|
|
1322
1351
|
return a.attributes;
|
|
1323
1352
|
};
|
|
1324
1353
|
}
|
|
1325
|
-
function
|
|
1354
|
+
function Eo(n, r, t) {
|
|
1326
1355
|
n.prototype[r] = function(e, i, a) {
|
|
1327
1356
|
const [o, s] = Ne(
|
|
1328
1357
|
this,
|
|
@@ -1335,7 +1364,7 @@ function bo(n, r, t) {
|
|
|
1335
1364
|
return o.attributes.hasOwnProperty(s);
|
|
1336
1365
|
};
|
|
1337
1366
|
}
|
|
1338
|
-
function
|
|
1367
|
+
function _o(n, r, t) {
|
|
1339
1368
|
n.prototype[r] = function(e, i, a, o) {
|
|
1340
1369
|
const [s, u, l] = Ne(
|
|
1341
1370
|
this,
|
|
@@ -1354,7 +1383,7 @@ function wo(n, r, t) {
|
|
|
1354
1383
|
}), this;
|
|
1355
1384
|
};
|
|
1356
1385
|
}
|
|
1357
|
-
function
|
|
1386
|
+
function To(n, r, t) {
|
|
1358
1387
|
n.prototype[r] = function(e, i, a, o) {
|
|
1359
1388
|
const [s, u, l] = Ne(
|
|
1360
1389
|
this,
|
|
@@ -1378,7 +1407,7 @@ function Eo(n, r, t) {
|
|
|
1378
1407
|
}), this;
|
|
1379
1408
|
};
|
|
1380
1409
|
}
|
|
1381
|
-
function
|
|
1410
|
+
function So(n, r, t) {
|
|
1382
1411
|
n.prototype[r] = function(e, i, a) {
|
|
1383
1412
|
const [o, s] = Ne(
|
|
1384
1413
|
this,
|
|
@@ -1396,7 +1425,7 @@ function _o(n, r, t) {
|
|
|
1396
1425
|
}), this;
|
|
1397
1426
|
};
|
|
1398
1427
|
}
|
|
1399
|
-
function
|
|
1428
|
+
function Ro(n, r, t) {
|
|
1400
1429
|
n.prototype[r] = function(e, i, a) {
|
|
1401
1430
|
const [o, s] = Ne(
|
|
1402
1431
|
this,
|
|
@@ -1417,7 +1446,7 @@ function To(n, r, t) {
|
|
|
1417
1446
|
}), this;
|
|
1418
1447
|
};
|
|
1419
1448
|
}
|
|
1420
|
-
function
|
|
1449
|
+
function Ao(n, r, t) {
|
|
1421
1450
|
n.prototype[r] = function(e, i, a) {
|
|
1422
1451
|
const [o, s] = Ne(
|
|
1423
1452
|
this,
|
|
@@ -1439,7 +1468,7 @@ function So(n, r, t) {
|
|
|
1439
1468
|
}), this;
|
|
1440
1469
|
};
|
|
1441
1470
|
}
|
|
1442
|
-
function
|
|
1471
|
+
function ko(n, r, t) {
|
|
1443
1472
|
n.prototype[r] = function(e, i, a) {
|
|
1444
1473
|
const [o, s] = Ne(
|
|
1445
1474
|
this,
|
|
@@ -1460,50 +1489,50 @@ function Ro(n, r, t) {
|
|
|
1460
1489
|
}), this;
|
|
1461
1490
|
};
|
|
1462
1491
|
}
|
|
1463
|
-
const
|
|
1492
|
+
const Co = [
|
|
1464
1493
|
{
|
|
1465
1494
|
name: (n) => `get${n}Attribute`,
|
|
1466
|
-
attacher:
|
|
1495
|
+
attacher: bo
|
|
1467
1496
|
},
|
|
1468
1497
|
{
|
|
1469
1498
|
name: (n) => `get${n}Attributes`,
|
|
1470
|
-
attacher:
|
|
1499
|
+
attacher: wo
|
|
1471
1500
|
},
|
|
1472
1501
|
{
|
|
1473
1502
|
name: (n) => `has${n}Attribute`,
|
|
1474
|
-
attacher:
|
|
1503
|
+
attacher: Eo
|
|
1475
1504
|
},
|
|
1476
1505
|
{
|
|
1477
1506
|
name: (n) => `set${n}Attribute`,
|
|
1478
|
-
attacher:
|
|
1507
|
+
attacher: _o
|
|
1479
1508
|
},
|
|
1480
1509
|
{
|
|
1481
1510
|
name: (n) => `update${n}Attribute`,
|
|
1482
|
-
attacher:
|
|
1511
|
+
attacher: To
|
|
1483
1512
|
},
|
|
1484
1513
|
{
|
|
1485
1514
|
name: (n) => `remove${n}Attribute`,
|
|
1486
|
-
attacher:
|
|
1515
|
+
attacher: So
|
|
1487
1516
|
},
|
|
1488
1517
|
{
|
|
1489
1518
|
name: (n) => `replace${n}Attributes`,
|
|
1490
|
-
attacher:
|
|
1519
|
+
attacher: Ro
|
|
1491
1520
|
},
|
|
1492
1521
|
{
|
|
1493
1522
|
name: (n) => `merge${n}Attributes`,
|
|
1494
|
-
attacher:
|
|
1523
|
+
attacher: Ao
|
|
1495
1524
|
},
|
|
1496
1525
|
{
|
|
1497
1526
|
name: (n) => `update${n}Attributes`,
|
|
1498
|
-
attacher:
|
|
1527
|
+
attacher: ko
|
|
1499
1528
|
}
|
|
1500
1529
|
];
|
|
1501
|
-
function
|
|
1502
|
-
|
|
1503
|
-
t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"),
|
|
1530
|
+
function xo(n) {
|
|
1531
|
+
Co.forEach(function({ name: r, attacher: t }) {
|
|
1532
|
+
t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"), yo), t(n, r("Opposite"), Ri);
|
|
1504
1533
|
});
|
|
1505
1534
|
}
|
|
1506
|
-
function
|
|
1535
|
+
function Do(n, r, t) {
|
|
1507
1536
|
n.prototype[r] = function(e, i) {
|
|
1508
1537
|
let a;
|
|
1509
1538
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1533,7 +1562,7 @@ function Co(n, r, t) {
|
|
|
1533
1562
|
return a.attributes[i];
|
|
1534
1563
|
};
|
|
1535
1564
|
}
|
|
1536
|
-
function
|
|
1565
|
+
function Lo(n, r, t) {
|
|
1537
1566
|
n.prototype[r] = function(e) {
|
|
1538
1567
|
let i;
|
|
1539
1568
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1563,7 +1592,7 @@ function xo(n, r, t) {
|
|
|
1563
1592
|
return i.attributes;
|
|
1564
1593
|
};
|
|
1565
1594
|
}
|
|
1566
|
-
function
|
|
1595
|
+
function Go(n, r, t) {
|
|
1567
1596
|
n.prototype[r] = function(e, i) {
|
|
1568
1597
|
let a;
|
|
1569
1598
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1593,7 +1622,7 @@ function Do(n, r, t) {
|
|
|
1593
1622
|
return a.attributes.hasOwnProperty(i);
|
|
1594
1623
|
};
|
|
1595
1624
|
}
|
|
1596
|
-
function
|
|
1625
|
+
function Io(n, r, t) {
|
|
1597
1626
|
n.prototype[r] = function(e, i, a) {
|
|
1598
1627
|
let o;
|
|
1599
1628
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1628,7 +1657,7 @@ function Lo(n, r, t) {
|
|
|
1628
1657
|
}), this;
|
|
1629
1658
|
};
|
|
1630
1659
|
}
|
|
1631
|
-
function
|
|
1660
|
+
function Po(n, r, t) {
|
|
1632
1661
|
n.prototype[r] = function(e, i, a) {
|
|
1633
1662
|
let o;
|
|
1634
1663
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1667,7 +1696,7 @@ function Go(n, r, t) {
|
|
|
1667
1696
|
}), this;
|
|
1668
1697
|
};
|
|
1669
1698
|
}
|
|
1670
|
-
function
|
|
1699
|
+
function Fo(n, r, t) {
|
|
1671
1700
|
n.prototype[r] = function(e, i) {
|
|
1672
1701
|
let a;
|
|
1673
1702
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1702,7 +1731,7 @@ function Io(n, r, t) {
|
|
|
1702
1731
|
}), this;
|
|
1703
1732
|
};
|
|
1704
1733
|
}
|
|
1705
|
-
function
|
|
1734
|
+
function Oo(n, r, t) {
|
|
1706
1735
|
n.prototype[r] = function(e, i) {
|
|
1707
1736
|
let a;
|
|
1708
1737
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1740,7 +1769,7 @@ function Po(n, r, t) {
|
|
|
1740
1769
|
}), this;
|
|
1741
1770
|
};
|
|
1742
1771
|
}
|
|
1743
|
-
function
|
|
1772
|
+
function zo(n, r, t) {
|
|
1744
1773
|
n.prototype[r] = function(e, i) {
|
|
1745
1774
|
let a;
|
|
1746
1775
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1779,7 +1808,7 @@ function Fo(n, r, t) {
|
|
|
1779
1808
|
}), this;
|
|
1780
1809
|
};
|
|
1781
1810
|
}
|
|
1782
|
-
function
|
|
1811
|
+
function No(n, r, t) {
|
|
1783
1812
|
n.prototype[r] = function(e, i) {
|
|
1784
1813
|
let a;
|
|
1785
1814
|
if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
|
|
@@ -1817,50 +1846,50 @@ function Oo(n, r, t) {
|
|
|
1817
1846
|
}), this;
|
|
1818
1847
|
};
|
|
1819
1848
|
}
|
|
1820
|
-
const
|
|
1849
|
+
const Uo = [
|
|
1821
1850
|
{
|
|
1822
1851
|
name: (n) => `get${n}Attribute`,
|
|
1823
|
-
attacher:
|
|
1852
|
+
attacher: Do
|
|
1824
1853
|
},
|
|
1825
1854
|
{
|
|
1826
1855
|
name: (n) => `get${n}Attributes`,
|
|
1827
|
-
attacher:
|
|
1856
|
+
attacher: Lo
|
|
1828
1857
|
},
|
|
1829
1858
|
{
|
|
1830
1859
|
name: (n) => `has${n}Attribute`,
|
|
1831
|
-
attacher:
|
|
1860
|
+
attacher: Go
|
|
1832
1861
|
},
|
|
1833
1862
|
{
|
|
1834
1863
|
name: (n) => `set${n}Attribute`,
|
|
1835
|
-
attacher:
|
|
1864
|
+
attacher: Io
|
|
1836
1865
|
},
|
|
1837
1866
|
{
|
|
1838
1867
|
name: (n) => `update${n}Attribute`,
|
|
1839
|
-
attacher:
|
|
1868
|
+
attacher: Po
|
|
1840
1869
|
},
|
|
1841
1870
|
{
|
|
1842
1871
|
name: (n) => `remove${n}Attribute`,
|
|
1843
|
-
attacher:
|
|
1872
|
+
attacher: Fo
|
|
1844
1873
|
},
|
|
1845
1874
|
{
|
|
1846
1875
|
name: (n) => `replace${n}Attributes`,
|
|
1847
|
-
attacher:
|
|
1876
|
+
attacher: Oo
|
|
1848
1877
|
},
|
|
1849
1878
|
{
|
|
1850
1879
|
name: (n) => `merge${n}Attributes`,
|
|
1851
|
-
attacher:
|
|
1880
|
+
attacher: zo
|
|
1852
1881
|
},
|
|
1853
1882
|
{
|
|
1854
1883
|
name: (n) => `update${n}Attributes`,
|
|
1855
|
-
attacher:
|
|
1884
|
+
attacher: No
|
|
1856
1885
|
}
|
|
1857
1886
|
];
|
|
1858
|
-
function
|
|
1859
|
-
|
|
1887
|
+
function $o(n) {
|
|
1888
|
+
Uo.forEach(function({ name: r, attacher: t }) {
|
|
1860
1889
|
t(n, r("Edge"), "mixed"), t(n, r("DirectedEdge"), "directed"), t(n, r("UndirectedEdge"), "undirected");
|
|
1861
1890
|
});
|
|
1862
1891
|
}
|
|
1863
|
-
const
|
|
1892
|
+
const Mo = [
|
|
1864
1893
|
{
|
|
1865
1894
|
name: "edges",
|
|
1866
1895
|
type: "mixed"
|
|
@@ -1894,7 +1923,7 @@ const Uo = [
|
|
|
1894
1923
|
type: "undirected"
|
|
1895
1924
|
}
|
|
1896
1925
|
];
|
|
1897
|
-
function
|
|
1926
|
+
function Bo(n, r, t, e) {
|
|
1898
1927
|
let i = !1;
|
|
1899
1928
|
for (const a in r) {
|
|
1900
1929
|
if (a === e) continue;
|
|
@@ -1910,7 +1939,7 @@ function $o(n, r, t, e) {
|
|
|
1910
1939
|
), n && i) return o.key;
|
|
1911
1940
|
}
|
|
1912
1941
|
}
|
|
1913
|
-
function
|
|
1942
|
+
function Wo(n, r, t, e) {
|
|
1914
1943
|
let i, a, o, s = !1;
|
|
1915
1944
|
for (const u in r)
|
|
1916
1945
|
if (u !== e) {
|
|
@@ -1929,7 +1958,7 @@ function Mo(n, r, t, e) {
|
|
|
1929
1958
|
} while (i !== void 0);
|
|
1930
1959
|
}
|
|
1931
1960
|
}
|
|
1932
|
-
function
|
|
1961
|
+
function Qt(n, r) {
|
|
1933
1962
|
const t = Object.keys(n), e = t.length;
|
|
1934
1963
|
let i, a = 0;
|
|
1935
1964
|
return {
|
|
@@ -1965,7 +1994,7 @@ function Zt(n, r) {
|
|
|
1965
1994
|
}
|
|
1966
1995
|
};
|
|
1967
1996
|
}
|
|
1968
|
-
function
|
|
1997
|
+
function Ho(n, r, t, e) {
|
|
1969
1998
|
const i = r[t];
|
|
1970
1999
|
if (!i) return;
|
|
1971
2000
|
const a = i.source, o = i.target;
|
|
@@ -1980,7 +2009,7 @@ function Bo(n, r, t, e) {
|
|
|
1980
2009
|
) && n)
|
|
1981
2010
|
return i.key;
|
|
1982
2011
|
}
|
|
1983
|
-
function
|
|
2012
|
+
function jo(n, r, t, e) {
|
|
1984
2013
|
let i = r[t];
|
|
1985
2014
|
if (!i) return;
|
|
1986
2015
|
let a = !1;
|
|
@@ -1997,7 +2026,7 @@ function Wo(n, r, t, e) {
|
|
|
1997
2026
|
i = i.next;
|
|
1998
2027
|
} while (i !== void 0);
|
|
1999
2028
|
}
|
|
2000
|
-
function
|
|
2029
|
+
function Jt(n, r) {
|
|
2001
2030
|
let t = n[r];
|
|
2002
2031
|
if (t.next !== void 0)
|
|
2003
2032
|
return {
|
|
@@ -2042,7 +2071,7 @@ function Qt(n, r) {
|
|
|
2042
2071
|
}
|
|
2043
2072
|
};
|
|
2044
2073
|
}
|
|
2045
|
-
function
|
|
2074
|
+
function Vo(n, r) {
|
|
2046
2075
|
if (n.size === 0) return [];
|
|
2047
2076
|
if (r === "mixed" || r === n.type)
|
|
2048
2077
|
return Array.from(n._edges.keys());
|
|
@@ -2071,7 +2100,7 @@ function Ai(n, r, t, e) {
|
|
|
2071
2100
|
), n && u) return c;
|
|
2072
2101
|
}
|
|
2073
2102
|
}
|
|
2074
|
-
function
|
|
2103
|
+
function qo(n, r) {
|
|
2075
2104
|
if (n.size === 0) return st();
|
|
2076
2105
|
const t = r !== "mixed" && r !== n.type, e = r === "undirected", i = n._edges.values();
|
|
2077
2106
|
return {
|
|
@@ -2097,8 +2126,8 @@ function jo(n, r) {
|
|
|
2097
2126
|
}
|
|
2098
2127
|
};
|
|
2099
2128
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const o = r ?
|
|
2129
|
+
function Vr(n, r, t, e, i, a) {
|
|
2130
|
+
const o = r ? Wo : Bo;
|
|
2102
2131
|
let s;
|
|
2103
2132
|
if (t !== "undirected" && (e !== "out" && (s = o(n, i.in, a), n && s) || e !== "in" && (s = o(
|
|
2104
2133
|
n,
|
|
@@ -2108,28 +2137,28 @@ function jr(n, r, t, e, i, a) {
|
|
|
2108
2137
|
), n && s)) || t !== "directed" && (s = o(n, i.undirected, a), n && s))
|
|
2109
2138
|
return s;
|
|
2110
2139
|
}
|
|
2111
|
-
function
|
|
2140
|
+
function Ko(n, r, t, e) {
|
|
2112
2141
|
const i = [];
|
|
2113
|
-
return
|
|
2142
|
+
return Vr(!1, n, r, t, e, function(a) {
|
|
2114
2143
|
i.push(a);
|
|
2115
2144
|
}), i;
|
|
2116
2145
|
}
|
|
2117
|
-
function
|
|
2146
|
+
function Xo(n, r, t) {
|
|
2118
2147
|
let e = st();
|
|
2119
|
-
return n !== "undirected" && (r !== "out" && typeof t.in < "u" && (e = ze(e,
|
|
2148
|
+
return n !== "undirected" && (r !== "out" && typeof t.in < "u" && (e = ze(e, Qt(t.in))), r !== "in" && typeof t.out < "u" && (e = ze(
|
|
2120
2149
|
e,
|
|
2121
|
-
|
|
2122
|
-
))), n !== "directed" && typeof t.undirected < "u" && (e = ze(e,
|
|
2150
|
+
Qt(t.out, r ? void 0 : t.key)
|
|
2151
|
+
))), n !== "directed" && typeof t.undirected < "u" && (e = ze(e, Qt(t.undirected))), e;
|
|
2123
2152
|
}
|
|
2124
|
-
function
|
|
2125
|
-
const s = t ?
|
|
2153
|
+
function qr(n, r, t, e, i, a, o) {
|
|
2154
|
+
const s = t ? jo : Ho;
|
|
2126
2155
|
let u;
|
|
2127
2156
|
if (r !== "undirected" && (typeof i.in < "u" && e !== "out" && (u = s(n, i.in, a, o), n && u) || typeof i.out < "u" && e !== "in" && (e || i.key !== a) && (u = s(n, i.out, a, o), n && u)) || r !== "directed" && typeof i.undirected < "u" && (u = s(n, i.undirected, a, o), n && u))
|
|
2128
2157
|
return u;
|
|
2129
2158
|
}
|
|
2130
|
-
function
|
|
2159
|
+
function Yo(n, r, t, e, i) {
|
|
2131
2160
|
const a = [];
|
|
2132
|
-
return
|
|
2161
|
+
return qr(
|
|
2133
2162
|
!1,
|
|
2134
2163
|
n,
|
|
2135
2164
|
r,
|
|
@@ -2141,19 +2170,19 @@ function Ko(n, r, t, e, i) {
|
|
|
2141
2170
|
}
|
|
2142
2171
|
), a;
|
|
2143
2172
|
}
|
|
2144
|
-
function
|
|
2173
|
+
function Zo(n, r, t, e) {
|
|
2145
2174
|
let i = st();
|
|
2146
|
-
return n !== "undirected" && (typeof t.in < "u" && r !== "out" && e in t.in && (i = ze(i,
|
|
2175
|
+
return n !== "undirected" && (typeof t.in < "u" && r !== "out" && e in t.in && (i = ze(i, Jt(t.in, e))), typeof t.out < "u" && r !== "in" && e in t.out && (r || t.key !== e) && (i = ze(i, Jt(t.out, e)))), n !== "directed" && typeof t.undirected < "u" && e in t.undirected && (i = ze(
|
|
2147
2176
|
i,
|
|
2148
|
-
|
|
2177
|
+
Jt(t.undirected, e)
|
|
2149
2178
|
)), i;
|
|
2150
2179
|
}
|
|
2151
|
-
function
|
|
2180
|
+
function Qo(n, r) {
|
|
2152
2181
|
const { name: t, type: e, direction: i } = r;
|
|
2153
2182
|
n.prototype[t] = function(a, o) {
|
|
2154
2183
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
|
|
2155
2184
|
return [];
|
|
2156
|
-
if (!arguments.length) return
|
|
2185
|
+
if (!arguments.length) return Vo(this, e);
|
|
2157
2186
|
if (arguments.length === 1) {
|
|
2158
2187
|
a = "" + a;
|
|
2159
2188
|
const s = this._nodes.get(a);
|
|
@@ -2161,7 +2190,7 @@ function Yo(n, r) {
|
|
|
2161
2190
|
throw new M(
|
|
2162
2191
|
`Graph.${t}: could not find the "${a}" node in the graph.`
|
|
2163
2192
|
);
|
|
2164
|
-
return
|
|
2193
|
+
return Ko(
|
|
2165
2194
|
this.multi,
|
|
2166
2195
|
e === "mixed" ? this.type : e,
|
|
2167
2196
|
i,
|
|
@@ -2179,7 +2208,7 @@ function Yo(n, r) {
|
|
|
2179
2208
|
throw new M(
|
|
2180
2209
|
`Graph.${t}: could not find the "${o}" target node in the graph.`
|
|
2181
2210
|
);
|
|
2182
|
-
return
|
|
2211
|
+
return Yo(
|
|
2183
2212
|
e,
|
|
2184
2213
|
this.multi,
|
|
2185
2214
|
i,
|
|
@@ -2192,7 +2221,7 @@ function Yo(n, r) {
|
|
|
2192
2221
|
);
|
|
2193
2222
|
};
|
|
2194
2223
|
}
|
|
2195
|
-
function
|
|
2224
|
+
function Jo(n, r) {
|
|
2196
2225
|
const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
|
|
2197
2226
|
n.prototype[a] = function(l, c, h) {
|
|
2198
2227
|
if (!(e !== "mixed" && this.type !== "mixed" && e !== this.type)) {
|
|
@@ -2205,7 +2234,7 @@ function Zo(n, r) {
|
|
|
2205
2234
|
throw new M(
|
|
2206
2235
|
`Graph.${a}: could not find the "${l}" node in the graph.`
|
|
2207
2236
|
);
|
|
2208
|
-
return
|
|
2237
|
+
return Vr(
|
|
2209
2238
|
!1,
|
|
2210
2239
|
this.multi,
|
|
2211
2240
|
e === "mixed" ? this.type : e,
|
|
@@ -2225,7 +2254,7 @@ function Zo(n, r) {
|
|
|
2225
2254
|
throw new M(
|
|
2226
2255
|
`Graph.${a}: could not find the "${c}" target node in the graph.`
|
|
2227
2256
|
);
|
|
2228
|
-
return
|
|
2257
|
+
return qr(
|
|
2229
2258
|
!1,
|
|
2230
2259
|
e,
|
|
2231
2260
|
this.multi,
|
|
@@ -2283,7 +2312,7 @@ function Zo(n, r) {
|
|
|
2283
2312
|
}), this[a].apply(this, l), v;
|
|
2284
2313
|
};
|
|
2285
2314
|
}
|
|
2286
|
-
function
|
|
2315
|
+
function es(n, r) {
|
|
2287
2316
|
const { name: t, type: e, direction: i } = r, a = "find" + t[0].toUpperCase() + t.slice(1, -1);
|
|
2288
2317
|
n.prototype[a] = function(u, l, c) {
|
|
2289
2318
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
|
|
@@ -2297,7 +2326,7 @@ function Qo(n, r) {
|
|
|
2297
2326
|
throw new M(
|
|
2298
2327
|
`Graph.${a}: could not find the "${u}" node in the graph.`
|
|
2299
2328
|
);
|
|
2300
|
-
return
|
|
2329
|
+
return Vr(
|
|
2301
2330
|
!0,
|
|
2302
2331
|
this.multi,
|
|
2303
2332
|
e === "mixed" ? this.type : e,
|
|
@@ -2317,7 +2346,7 @@ function Qo(n, r) {
|
|
|
2317
2346
|
throw new M(
|
|
2318
2347
|
`Graph.${a}: could not find the "${l}" target node in the graph.`
|
|
2319
2348
|
);
|
|
2320
|
-
return
|
|
2349
|
+
return qr(
|
|
2321
2350
|
!0,
|
|
2322
2351
|
e,
|
|
2323
2352
|
this.multi,
|
|
@@ -2342,12 +2371,12 @@ function Qo(n, r) {
|
|
|
2342
2371
|
return u.push((h, v, y, b, R, w, k) => !l(h, v, y, b, R, w, k)), !this[a].apply(this, u);
|
|
2343
2372
|
};
|
|
2344
2373
|
}
|
|
2345
|
-
function
|
|
2374
|
+
function ts(n, r) {
|
|
2346
2375
|
const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
|
|
2347
2376
|
n.prototype[a] = function(o, s) {
|
|
2348
2377
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
|
|
2349
2378
|
return st();
|
|
2350
|
-
if (!arguments.length) return
|
|
2379
|
+
if (!arguments.length) return qo(this, e);
|
|
2351
2380
|
if (arguments.length === 1) {
|
|
2352
2381
|
o = "" + o;
|
|
2353
2382
|
const u = this._nodes.get(o);
|
|
@@ -2355,7 +2384,7 @@ function Jo(n, r) {
|
|
|
2355
2384
|
throw new M(
|
|
2356
2385
|
`Graph.${a}: could not find the "${o}" node in the graph.`
|
|
2357
2386
|
);
|
|
2358
|
-
return
|
|
2387
|
+
return Xo(e, i, u);
|
|
2359
2388
|
}
|
|
2360
2389
|
if (arguments.length === 2) {
|
|
2361
2390
|
o = "" + o, s = "" + s;
|
|
@@ -2368,19 +2397,19 @@ function Jo(n, r) {
|
|
|
2368
2397
|
throw new M(
|
|
2369
2398
|
`Graph.${a}: could not find the "${s}" target node in the graph.`
|
|
2370
2399
|
);
|
|
2371
|
-
return
|
|
2400
|
+
return Zo(e, i, u, s);
|
|
2372
2401
|
}
|
|
2373
2402
|
throw new H(
|
|
2374
2403
|
`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`
|
|
2375
2404
|
);
|
|
2376
2405
|
};
|
|
2377
2406
|
}
|
|
2378
|
-
function
|
|
2379
|
-
|
|
2380
|
-
|
|
2407
|
+
function rs(n) {
|
|
2408
|
+
Mo.forEach((r) => {
|
|
2409
|
+
Qo(n, r), Jo(n, r), es(n, r), ts(n, r);
|
|
2381
2410
|
});
|
|
2382
2411
|
}
|
|
2383
|
-
const
|
|
2412
|
+
const ns = [
|
|
2384
2413
|
{
|
|
2385
2414
|
name: "neighbors",
|
|
2386
2415
|
type: "mixed"
|
|
@@ -2431,7 +2460,7 @@ function ht(n, r, t, e, i) {
|
|
|
2431
2460
|
if (n && c) return l.key;
|
|
2432
2461
|
}
|
|
2433
2462
|
}
|
|
2434
|
-
function
|
|
2463
|
+
function Kr(n, r, t, e, i) {
|
|
2435
2464
|
if (r !== "mixed") {
|
|
2436
2465
|
if (r === "undirected")
|
|
2437
2466
|
return ht(
|
|
@@ -2483,13 +2512,13 @@ function qr(n, r, t, e, i) {
|
|
|
2483
2512
|
), n && o))
|
|
2484
2513
|
return o;
|
|
2485
2514
|
}
|
|
2486
|
-
function
|
|
2515
|
+
function is(n, r, t) {
|
|
2487
2516
|
if (n !== "mixed") {
|
|
2488
2517
|
if (n === "undirected") return Object.keys(t.undirected);
|
|
2489
2518
|
if (typeof r == "string") return Object.keys(t[r]);
|
|
2490
2519
|
}
|
|
2491
2520
|
const e = [];
|
|
2492
|
-
return
|
|
2521
|
+
return Kr(!1, n, r, t, function(i) {
|
|
2493
2522
|
e.push(i);
|
|
2494
2523
|
}), e;
|
|
2495
2524
|
}
|
|
@@ -2518,7 +2547,7 @@ function dt(n, r, t) {
|
|
|
2518
2547
|
}
|
|
2519
2548
|
};
|
|
2520
2549
|
}
|
|
2521
|
-
function
|
|
2550
|
+
function as(n, r, t) {
|
|
2522
2551
|
if (n !== "mixed") {
|
|
2523
2552
|
if (n === "undirected")
|
|
2524
2553
|
return dt(null, t, t.undirected);
|
|
@@ -2538,7 +2567,7 @@ function ns(n, r, t) {
|
|
|
2538
2567
|
dt(i, t, t.undirected)
|
|
2539
2568
|
)), e;
|
|
2540
2569
|
}
|
|
2541
|
-
function
|
|
2570
|
+
function os(n, r) {
|
|
2542
2571
|
const { name: t, type: e, direction: i } = r;
|
|
2543
2572
|
n.prototype[t] = function(a) {
|
|
2544
2573
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
|
|
@@ -2549,14 +2578,14 @@ function is(n, r) {
|
|
|
2549
2578
|
throw new M(
|
|
2550
2579
|
`Graph.${t}: could not find the "${a}" node in the graph.`
|
|
2551
2580
|
);
|
|
2552
|
-
return
|
|
2581
|
+
return is(
|
|
2553
2582
|
e === "mixed" ? this.type : e,
|
|
2554
2583
|
i,
|
|
2555
2584
|
o
|
|
2556
2585
|
);
|
|
2557
2586
|
};
|
|
2558
2587
|
}
|
|
2559
|
-
function
|
|
2588
|
+
function ss(n, r) {
|
|
2560
2589
|
const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
|
|
2561
2590
|
n.prototype[a] = function(l, c) {
|
|
2562
2591
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
|
|
@@ -2566,7 +2595,7 @@ function as(n, r) {
|
|
|
2566
2595
|
throw new M(
|
|
2567
2596
|
`Graph.${a}: could not find the "${l}" node in the graph.`
|
|
2568
2597
|
);
|
|
2569
|
-
|
|
2598
|
+
Kr(
|
|
2570
2599
|
!1,
|
|
2571
2600
|
e === "mixed" ? this.type : e,
|
|
2572
2601
|
i,
|
|
@@ -2600,7 +2629,7 @@ function as(n, r) {
|
|
|
2600
2629
|
}), v;
|
|
2601
2630
|
};
|
|
2602
2631
|
}
|
|
2603
|
-
function
|
|
2632
|
+
function us(n, r) {
|
|
2604
2633
|
const { name: t, type: e, direction: i } = r, a = t[0].toUpperCase() + t.slice(1, -1), o = "find" + a;
|
|
2605
2634
|
n.prototype[o] = function(l, c) {
|
|
2606
2635
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
|
|
@@ -2610,7 +2639,7 @@ function os(n, r) {
|
|
|
2610
2639
|
throw new M(
|
|
2611
2640
|
`Graph.${o}: could not find the "${l}" node in the graph.`
|
|
2612
2641
|
);
|
|
2613
|
-
return
|
|
2642
|
+
return Kr(
|
|
2614
2643
|
!0,
|
|
2615
2644
|
e === "mixed" ? this.type : e,
|
|
2616
2645
|
i,
|
|
@@ -2627,7 +2656,7 @@ function os(n, r) {
|
|
|
2627
2656
|
return !this[o](l, (v, y) => !c(v, y));
|
|
2628
2657
|
};
|
|
2629
2658
|
}
|
|
2630
|
-
function
|
|
2659
|
+
function ls(n, r) {
|
|
2631
2660
|
const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
|
|
2632
2661
|
n.prototype[a] = function(o) {
|
|
2633
2662
|
if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
|
|
@@ -2638,16 +2667,16 @@ function ss(n, r) {
|
|
|
2638
2667
|
throw new M(
|
|
2639
2668
|
`Graph.${a}: could not find the "${o}" node in the graph.`
|
|
2640
2669
|
);
|
|
2641
|
-
return
|
|
2670
|
+
return as(
|
|
2642
2671
|
e === "mixed" ? this.type : e,
|
|
2643
2672
|
i,
|
|
2644
2673
|
s
|
|
2645
2674
|
);
|
|
2646
2675
|
};
|
|
2647
2676
|
}
|
|
2648
|
-
function
|
|
2649
|
-
|
|
2650
|
-
|
|
2677
|
+
function cs(n) {
|
|
2678
|
+
ns.forEach((r) => {
|
|
2679
|
+
os(n, r), ss(n, r), us(n, r), ls(n, r);
|
|
2651
2680
|
});
|
|
2652
2681
|
}
|
|
2653
2682
|
function Pt(n, r, t, e, i) {
|
|
@@ -2701,11 +2730,11 @@ function Pt(n, r, t, e, i) {
|
|
|
2701
2730
|
);
|
|
2702
2731
|
}
|
|
2703
2732
|
}
|
|
2704
|
-
function
|
|
2733
|
+
function hs(n, r) {
|
|
2705
2734
|
const t = { key: n };
|
|
2706
2735
|
return bi(r.attributes) || (t.attributes = ue({}, r.attributes)), t;
|
|
2707
2736
|
}
|
|
2708
|
-
function
|
|
2737
|
+
function ds(n, r, t) {
|
|
2709
2738
|
const e = {
|
|
2710
2739
|
key: r,
|
|
2711
2740
|
source: t.source.key,
|
|
@@ -2713,7 +2742,7 @@ function cs(n, r, t) {
|
|
|
2713
2742
|
};
|
|
2714
2743
|
return bi(t.attributes) || (e.attributes = ue({}, t.attributes)), n === "mixed" && t.undirected && (e.undirected = !0), e;
|
|
2715
2744
|
}
|
|
2716
|
-
function
|
|
2745
|
+
function fs(n) {
|
|
2717
2746
|
if (!he(n))
|
|
2718
2747
|
throw new H(
|
|
2719
2748
|
'Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.'
|
|
@@ -2727,7 +2756,7 @@ function hs(n) {
|
|
|
2727
2756
|
"Graph.import: invalid attributes. Attributes should be a plain object, null or omitted."
|
|
2728
2757
|
);
|
|
2729
2758
|
}
|
|
2730
|
-
function
|
|
2759
|
+
function gs(n) {
|
|
2731
2760
|
if (!he(n))
|
|
2732
2761
|
throw new H(
|
|
2733
2762
|
'Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.'
|
|
@@ -2749,12 +2778,12 @@ function ds(n) {
|
|
|
2749
2778
|
"Graph.import: invalid undirectedness information. Undirected should be boolean or omitted."
|
|
2750
2779
|
);
|
|
2751
2780
|
}
|
|
2752
|
-
const
|
|
2781
|
+
const ps = mo(), vs = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"]), bn = /* @__PURE__ */ new Set([
|
|
2753
2782
|
"domain",
|
|
2754
2783
|
"_events",
|
|
2755
2784
|
"_eventsCount",
|
|
2756
2785
|
"_maxListeners"
|
|
2757
|
-
]),
|
|
2786
|
+
]), ms = [
|
|
2758
2787
|
{
|
|
2759
2788
|
name: (n) => `${n}Edge`,
|
|
2760
2789
|
generateKey: !0
|
|
@@ -2780,12 +2809,12 @@ const fs = po(), gs = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"
|
|
|
2780
2809
|
name: (n) => `${n}UndirectedEdgeWithKey`,
|
|
2781
2810
|
type: "undirected"
|
|
2782
2811
|
}
|
|
2783
|
-
],
|
|
2812
|
+
], ys = {
|
|
2784
2813
|
allowSelfLoops: !0,
|
|
2785
2814
|
multi: !1,
|
|
2786
2815
|
type: "mixed"
|
|
2787
2816
|
};
|
|
2788
|
-
function
|
|
2817
|
+
function bs(n, r, t) {
|
|
2789
2818
|
if (t && !he(t))
|
|
2790
2819
|
throw new H(
|
|
2791
2820
|
`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`
|
|
@@ -2861,7 +2890,7 @@ function ki(n, r, t, e, i, a, o, s) {
|
|
|
2861
2890
|
const v = a === o;
|
|
2862
2891
|
return e ? (u.undirectedDegree++, l.undirectedDegree++, v && (u.undirectedLoops++, n._undirectedSelfLoopCount++)) : (u.outDegree++, l.inDegree++, v && (u.directedLoops++, n._directedSelfLoopCount++)), n.multi ? h.attachMulti() : h.attach(), e ? n._undirectedSize++ : n._directedSize++, c.key = i, n.emit("edgeAdded", c), i;
|
|
2863
2892
|
}
|
|
2864
|
-
function
|
|
2893
|
+
function ws(n, r, t, e, i, a, o, s, u) {
|
|
2865
2894
|
if (!e && n.type === "undirected")
|
|
2866
2895
|
throw new Q(
|
|
2867
2896
|
`Graph.${r}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`
|
|
@@ -2944,13 +2973,13 @@ function Je(n, r) {
|
|
|
2944
2973
|
undirected: a
|
|
2945
2974
|
});
|
|
2946
2975
|
}
|
|
2947
|
-
class ae extends
|
|
2976
|
+
class ae extends Hr.EventEmitter {
|
|
2948
2977
|
constructor(r) {
|
|
2949
|
-
if (super(), r = ue({},
|
|
2978
|
+
if (super(), r = ue({}, ys, r), typeof r.multi != "boolean")
|
|
2950
2979
|
throw new H(
|
|
2951
2980
|
`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${r.multi}".`
|
|
2952
2981
|
);
|
|
2953
|
-
if (!
|
|
2982
|
+
if (!vs.has(r.type))
|
|
2954
2983
|
throw new H(
|
|
2955
2984
|
`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${r.type}".`
|
|
2956
2985
|
);
|
|
@@ -2960,7 +2989,7 @@ class ae extends Wr.EventEmitter {
|
|
|
2960
2989
|
);
|
|
2961
2990
|
const t = r.type === "mixed" ? wi : r.type === "directed" ? Ei : _i;
|
|
2962
2991
|
Ee(this, "NodeDataClass", t);
|
|
2963
|
-
const e = "geid_" +
|
|
2992
|
+
const e = "geid_" + ps() + "_";
|
|
2964
2993
|
let i = 0;
|
|
2965
2994
|
const a = () => {
|
|
2966
2995
|
let o;
|
|
@@ -3698,7 +3727,7 @@ class ae extends Wr.EventEmitter {
|
|
|
3698
3727
|
* @throws {Error} - Will throw if the given attributes are not an object.
|
|
3699
3728
|
*/
|
|
3700
3729
|
addNode(r, t) {
|
|
3701
|
-
return
|
|
3730
|
+
return bs(this, r, t).key;
|
|
3702
3731
|
}
|
|
3703
3732
|
/**
|
|
3704
3733
|
* Method used to merge a node into the graph.
|
|
@@ -4288,11 +4317,11 @@ class ae extends Wr.EventEmitter {
|
|
|
4288
4317
|
const r = new Array(this._nodes.size);
|
|
4289
4318
|
let t = 0;
|
|
4290
4319
|
this._nodes.forEach((i, a) => {
|
|
4291
|
-
r[t++] =
|
|
4320
|
+
r[t++] = hs(a, i);
|
|
4292
4321
|
});
|
|
4293
4322
|
const e = new Array(this._edges.size);
|
|
4294
4323
|
return t = 0, this._edges.forEach((i, a) => {
|
|
4295
|
-
e[t++] =
|
|
4324
|
+
e[t++] = ds(this.type, a, i);
|
|
4296
4325
|
}), {
|
|
4297
4326
|
options: {
|
|
4298
4327
|
type: this.type,
|
|
@@ -4336,7 +4365,7 @@ class ae extends Wr.EventEmitter {
|
|
|
4336
4365
|
"Graph.import: invalid nodes. Expecting an array."
|
|
4337
4366
|
);
|
|
4338
4367
|
for (e = 0, i = a.length; e < i; e++) {
|
|
4339
|
-
o = a[e],
|
|
4368
|
+
o = a[e], fs(o);
|
|
4340
4369
|
const { key: u, attributes: l } = o;
|
|
4341
4370
|
t ? this.mergeNode(u, l) : this.addNode(u, l);
|
|
4342
4371
|
}
|
|
@@ -4348,7 +4377,7 @@ class ae extends Wr.EventEmitter {
|
|
|
4348
4377
|
"Graph.import: invalid edges. Expecting an array."
|
|
4349
4378
|
);
|
|
4350
4379
|
for (e = 0, i = a.length; e < i; e++) {
|
|
4351
|
-
s = a[e],
|
|
4380
|
+
s = a[e], gs(s);
|
|
4352
4381
|
const {
|
|
4353
4382
|
source: l,
|
|
4354
4383
|
target: c,
|
|
@@ -4467,9 +4496,9 @@ class ae extends Wr.EventEmitter {
|
|
|
4467
4496
|
}
|
|
4468
4497
|
}
|
|
4469
4498
|
typeof Symbol < "u" && (ae.prototype[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = ae.prototype.inspect);
|
|
4470
|
-
|
|
4499
|
+
ms.forEach((n) => {
|
|
4471
4500
|
["add", "merge", "update"].forEach((r) => {
|
|
4472
|
-
const t = n.name(r), e = r === "add" ? ki :
|
|
4501
|
+
const t = n.name(r), e = r === "add" ? ki : ws;
|
|
4473
4502
|
n.generateKey ? ae.prototype[t] = function(i, a, o) {
|
|
4474
4503
|
return e(
|
|
4475
4504
|
this,
|
|
@@ -4497,10 +4526,10 @@ ps.forEach((n) => {
|
|
|
4497
4526
|
};
|
|
4498
4527
|
});
|
|
4499
4528
|
});
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4529
|
+
xo(ae);
|
|
4530
|
+
$o(ae);
|
|
4531
|
+
rs(ae);
|
|
4532
|
+
cs(ae);
|
|
4504
4533
|
class Ci extends ae {
|
|
4505
4534
|
constructor(r) {
|
|
4506
4535
|
const t = ue({ type: "directed" }, r);
|
|
@@ -4588,7 +4617,7 @@ ae.MultiUndirectedGraph = Gi;
|
|
|
4588
4617
|
ae.InvalidArgumentsGraphError = H;
|
|
4589
4618
|
ae.NotFoundGraphError = M;
|
|
4590
4619
|
ae.UsageGraphError = Q;
|
|
4591
|
-
function
|
|
4620
|
+
function Es(n, r) {
|
|
4592
4621
|
if (typeof n != "object" || !n) return n;
|
|
4593
4622
|
var t = n[Symbol.toPrimitive];
|
|
4594
4623
|
if (t !== void 0) {
|
|
@@ -4599,7 +4628,7 @@ function bs(n, r) {
|
|
|
4599
4628
|
return String(n);
|
|
4600
4629
|
}
|
|
4601
4630
|
function Et(n) {
|
|
4602
|
-
var r =
|
|
4631
|
+
var r = Es(n, "string");
|
|
4603
4632
|
return typeof r == "symbol" ? r : r + "";
|
|
4604
4633
|
}
|
|
4605
4634
|
function ge(n, r) {
|
|
@@ -4631,22 +4660,22 @@ function Ii() {
|
|
|
4631
4660
|
return !!n;
|
|
4632
4661
|
})();
|
|
4633
4662
|
}
|
|
4634
|
-
function
|
|
4663
|
+
function _s(n) {
|
|
4635
4664
|
if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4636
4665
|
return n;
|
|
4637
4666
|
}
|
|
4638
|
-
function
|
|
4667
|
+
function Ts(n, r) {
|
|
4639
4668
|
if (r && (typeof r == "object" || typeof r == "function")) return r;
|
|
4640
4669
|
if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
4641
|
-
return
|
|
4670
|
+
return _s(n);
|
|
4642
4671
|
}
|
|
4643
4672
|
function Te(n, r, t) {
|
|
4644
|
-
return r = nt(r),
|
|
4673
|
+
return r = nt(r), Ts(n, Ii() ? Reflect.construct(r, t || [], nt(n).constructor) : r.apply(n, t));
|
|
4645
4674
|
}
|
|
4646
|
-
function
|
|
4647
|
-
return
|
|
4675
|
+
function Cr(n, r) {
|
|
4676
|
+
return Cr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
4648
4677
|
return t.__proto__ = e, t;
|
|
4649
|
-
},
|
|
4678
|
+
}, Cr(n, r);
|
|
4650
4679
|
}
|
|
4651
4680
|
function Se(n, r) {
|
|
4652
4681
|
if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -4658,12 +4687,12 @@ function Se(n, r) {
|
|
|
4658
4687
|
}
|
|
4659
4688
|
}), Object.defineProperty(n, "prototype", {
|
|
4660
4689
|
writable: !1
|
|
4661
|
-
}), r &&
|
|
4690
|
+
}), r && Cr(n, r);
|
|
4662
4691
|
}
|
|
4663
|
-
function
|
|
4692
|
+
function Ss(n) {
|
|
4664
4693
|
if (Array.isArray(n)) return n;
|
|
4665
4694
|
}
|
|
4666
|
-
function
|
|
4695
|
+
function Rs(n, r) {
|
|
4667
4696
|
var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
4668
4697
|
if (t != null) {
|
|
4669
4698
|
var e, i, a, o, s = [], u = !0, l = !1;
|
|
@@ -4684,26 +4713,26 @@ function Ts(n, r) {
|
|
|
4684
4713
|
return s;
|
|
4685
4714
|
}
|
|
4686
4715
|
}
|
|
4687
|
-
function
|
|
4716
|
+
function xr(n, r) {
|
|
4688
4717
|
(r == null || r > n.length) && (r = n.length);
|
|
4689
4718
|
for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
|
|
4690
4719
|
return e;
|
|
4691
4720
|
}
|
|
4692
4721
|
function Pi(n, r) {
|
|
4693
4722
|
if (n) {
|
|
4694
|
-
if (typeof n == "string") return
|
|
4723
|
+
if (typeof n == "string") return xr(n, r);
|
|
4695
4724
|
var t = {}.toString.call(n).slice(8, -1);
|
|
4696
|
-
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
4725
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? xr(n, r) : void 0;
|
|
4697
4726
|
}
|
|
4698
4727
|
}
|
|
4699
|
-
function
|
|
4728
|
+
function As() {
|
|
4700
4729
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4701
4730
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
4702
4731
|
}
|
|
4703
4732
|
function it(n, r) {
|
|
4704
|
-
return
|
|
4733
|
+
return Ss(n) || Rs(n, r) || Pi(n, r) || As();
|
|
4705
4734
|
}
|
|
4706
|
-
var
|
|
4735
|
+
var er = {
|
|
4707
4736
|
black: "#000000",
|
|
4708
4737
|
silver: "#C0C0C0",
|
|
4709
4738
|
gray: "#808080",
|
|
@@ -4852,13 +4881,13 @@ var Jt = {
|
|
|
4852
4881
|
snow: "#FFFAFA",
|
|
4853
4882
|
lightyellow: "#FFFFE0",
|
|
4854
4883
|
ivory: "#FFFFF0"
|
|
4855
|
-
}, Fi = new Int8Array(4),
|
|
4856
|
-
function
|
|
4884
|
+
}, Fi = new Int8Array(4), tr = new Int32Array(Fi.buffer, 0, 1), ks = new Float32Array(Fi.buffer, 0, 1), Cs = /^\s*rgba?\s*\(/, xs = /^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;
|
|
4885
|
+
function Ds(n) {
|
|
4857
4886
|
var r = 0, t = 0, e = 0, i = 1;
|
|
4858
4887
|
if (n[0] === "#")
|
|
4859
4888
|
n.length === 4 ? (r = parseInt(n.charAt(1) + n.charAt(1), 16), t = parseInt(n.charAt(2) + n.charAt(2), 16), e = parseInt(n.charAt(3) + n.charAt(3), 16)) : (r = parseInt(n.charAt(1) + n.charAt(2), 16), t = parseInt(n.charAt(3) + n.charAt(4), 16), e = parseInt(n.charAt(5) + n.charAt(6), 16)), n.length === 9 && (i = parseInt(n.charAt(7) + n.charAt(8), 16) / 255);
|
|
4860
|
-
else if (
|
|
4861
|
-
var a = n.match(
|
|
4889
|
+
else if (Cs.test(n)) {
|
|
4890
|
+
var a = n.match(xs);
|
|
4862
4891
|
a && (r = +a[1], t = +a[2], e = +a[3], a[4] && (i = +a[4]));
|
|
4863
4892
|
}
|
|
4864
4893
|
return {
|
|
@@ -4869,23 +4898,23 @@ function Cs(n) {
|
|
|
4869
4898
|
};
|
|
4870
4899
|
}
|
|
4871
4900
|
var rt = {};
|
|
4872
|
-
for (var Ft in
|
|
4873
|
-
rt[Ft] = Ye(
|
|
4901
|
+
for (var Ft in er)
|
|
4902
|
+
rt[Ft] = Ye(er[Ft]), rt[er[Ft]] = rt[Ft];
|
|
4874
4903
|
function Oi(n, r, t, e, i) {
|
|
4875
|
-
return
|
|
4904
|
+
return tr[0] = e << 24 | t << 16 | r << 8 | n, tr[0] = tr[0] & 4278190079, ks[0];
|
|
4876
4905
|
}
|
|
4877
4906
|
function Ye(n) {
|
|
4878
4907
|
if (n = n.toLowerCase(), typeof rt[n] < "u") return rt[n];
|
|
4879
|
-
var r =
|
|
4908
|
+
var r = Ds(n), t = r.r, e = r.g, i = r.b, a = r.a;
|
|
4880
4909
|
a = a * 255 | 0;
|
|
4881
4910
|
var o = Oi(t, e, i, a);
|
|
4882
4911
|
return rt[n] = o, o;
|
|
4883
4912
|
}
|
|
4884
|
-
var
|
|
4913
|
+
var rr = {};
|
|
4885
4914
|
function zi(n) {
|
|
4886
|
-
if (typeof
|
|
4915
|
+
if (typeof rr[n] < "u") return rr[n];
|
|
4887
4916
|
var r = (n & 16711680) >>> 16, t = (n & 65280) >>> 8, e = n & 255, i = 255, a = Oi(r, t, e, i);
|
|
4888
|
-
return
|
|
4917
|
+
return rr[n] = a, a;
|
|
4889
4918
|
}
|
|
4890
4919
|
function _n(n, r, t, e) {
|
|
4891
4920
|
return t + (r << 8) + (n << 16);
|
|
@@ -4925,32 +4954,32 @@ function j(n) {
|
|
|
4925
4954
|
}
|
|
4926
4955
|
return n;
|
|
4927
4956
|
}
|
|
4928
|
-
function
|
|
4957
|
+
function Ls(n, r) {
|
|
4929
4958
|
for (; !{}.hasOwnProperty.call(n, r) && (n = nt(n)) !== null; ) ;
|
|
4930
4959
|
return n;
|
|
4931
4960
|
}
|
|
4932
|
-
function
|
|
4933
|
-
return
|
|
4934
|
-
var e =
|
|
4961
|
+
function Dr() {
|
|
4962
|
+
return Dr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
|
|
4963
|
+
var e = Ls(n, r);
|
|
4935
4964
|
if (e) {
|
|
4936
4965
|
var i = Object.getOwnPropertyDescriptor(e, r);
|
|
4937
4966
|
return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
|
|
4938
4967
|
}
|
|
4939
|
-
},
|
|
4968
|
+
}, Dr.apply(null, arguments);
|
|
4940
4969
|
}
|
|
4941
4970
|
function Ni(n, r, t, e) {
|
|
4942
|
-
var i =
|
|
4971
|
+
var i = Dr(nt(n.prototype), r, t);
|
|
4943
4972
|
return typeof i == "function" ? function(a) {
|
|
4944
4973
|
return i.apply(t, a);
|
|
4945
4974
|
} : i;
|
|
4946
4975
|
}
|
|
4947
|
-
function
|
|
4976
|
+
function Gs(n) {
|
|
4948
4977
|
return n.normalized ? 1 : n.size;
|
|
4949
4978
|
}
|
|
4950
|
-
function
|
|
4979
|
+
function nr(n) {
|
|
4951
4980
|
var r = 0;
|
|
4952
4981
|
return n.forEach(function(t) {
|
|
4953
|
-
return r +=
|
|
4982
|
+
return r += Gs(t);
|
|
4954
4983
|
}), r;
|
|
4955
4984
|
}
|
|
4956
4985
|
function Ui(n, r, t) {
|
|
@@ -4967,13 +4996,13 @@ function Ui(n, r, t) {
|
|
|
4967
4996
|
}
|
|
4968
4997
|
return i;
|
|
4969
4998
|
}
|
|
4970
|
-
function
|
|
4999
|
+
function Is(n, r) {
|
|
4971
5000
|
return Ui("VERTEX", n, r);
|
|
4972
5001
|
}
|
|
4973
|
-
function
|
|
5002
|
+
function Ps(n, r) {
|
|
4974
5003
|
return Ui("FRAGMENT", n, r);
|
|
4975
5004
|
}
|
|
4976
|
-
function
|
|
5005
|
+
function Fs(n, r) {
|
|
4977
5006
|
var t = n.createProgram();
|
|
4978
5007
|
if (t === null)
|
|
4979
5008
|
throw new Error("loadProgram: error while creating the program.");
|
|
@@ -4992,12 +5021,12 @@ function Rn(n) {
|
|
|
4992
5021
|
r.deleteShader(i), r.deleteShader(a), r.deleteProgram(e), r.deleteBuffer(t);
|
|
4993
5022
|
}
|
|
4994
5023
|
var An = `#define PICKING_MODE
|
|
4995
|
-
`,
|
|
5024
|
+
`, Os = N(N(N(N(N(N(N(N({}, WebGL2RenderingContext.BOOL, 1), WebGL2RenderingContext.BYTE, 1), WebGL2RenderingContext.UNSIGNED_BYTE, 1), WebGL2RenderingContext.SHORT, 2), WebGL2RenderingContext.UNSIGNED_SHORT, 2), WebGL2RenderingContext.INT, 4), WebGL2RenderingContext.UNSIGNED_INT, 4), WebGL2RenderingContext.FLOAT, 4), $i = /* @__PURE__ */ (function() {
|
|
4996
5025
|
function n(r, t, e) {
|
|
4997
5026
|
ge(this, n), N(this, "array", new Float32Array()), N(this, "constantArray", new Float32Array()), N(this, "capacity", 0), N(this, "verticesCount", 0);
|
|
4998
5027
|
var i = this.getDefinition();
|
|
4999
|
-
if (this.VERTICES = i.VERTICES, this.VERTEX_SHADER_SOURCE = i.VERTEX_SHADER_SOURCE, this.FRAGMENT_SHADER_SOURCE = i.FRAGMENT_SHADER_SOURCE, this.UNIFORMS = i.UNIFORMS, this.ATTRIBUTES = i.ATTRIBUTES, this.METHOD = i.METHOD, this.CONSTANT_ATTRIBUTES = "CONSTANT_ATTRIBUTES" in i ? i.CONSTANT_ATTRIBUTES : [], this.CONSTANT_DATA = "CONSTANT_DATA" in i ? i.CONSTANT_DATA : [], this.isInstanced = "CONSTANT_ATTRIBUTES" in i, this.ATTRIBUTES_ITEMS_COUNT =
|
|
5000
|
-
var a =
|
|
5028
|
+
if (this.VERTICES = i.VERTICES, this.VERTEX_SHADER_SOURCE = i.VERTEX_SHADER_SOURCE, this.FRAGMENT_SHADER_SOURCE = i.FRAGMENT_SHADER_SOURCE, this.UNIFORMS = i.UNIFORMS, this.ATTRIBUTES = i.ATTRIBUTES, this.METHOD = i.METHOD, this.CONSTANT_ATTRIBUTES = "CONSTANT_ATTRIBUTES" in i ? i.CONSTANT_ATTRIBUTES : [], this.CONSTANT_DATA = "CONSTANT_DATA" in i ? i.CONSTANT_DATA : [], this.isInstanced = "CONSTANT_ATTRIBUTES" in i, this.ATTRIBUTES_ITEMS_COUNT = nr(this.ATTRIBUTES), this.STRIDE = this.VERTICES * this.ATTRIBUTES_ITEMS_COUNT, this.renderer = e, this.normalProgram = this.getProgramInfo("normal", r, i.VERTEX_SHADER_SOURCE, i.FRAGMENT_SHADER_SOURCE, null), this.pickProgram = t ? this.getProgramInfo("pick", r, An + i.VERTEX_SHADER_SOURCE, An + i.FRAGMENT_SHADER_SOURCE, t) : null, this.isInstanced) {
|
|
5029
|
+
var a = nr(this.CONSTANT_ATTRIBUTES);
|
|
5001
5030
|
if (this.CONSTANT_DATA.length !== this.VERTICES) throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES, " items, received ").concat(this.CONSTANT_DATA.length, " instead)"));
|
|
5002
5031
|
this.constantArray = new Float32Array(this.CONSTANT_DATA.length * a);
|
|
5003
5032
|
for (var o = 0; o < this.CONSTANT_DATA.length; o++) {
|
|
@@ -5018,7 +5047,7 @@ var An = `#define PICKING_MODE
|
|
|
5018
5047
|
value: function(t, e, i, a, o) {
|
|
5019
5048
|
var s = this.getDefinition(), u = e.createBuffer();
|
|
5020
5049
|
if (u === null) throw new Error("Program: error while creating the WebGL buffer.");
|
|
5021
|
-
var l =
|
|
5050
|
+
var l = Is(e, i), c = Ps(e, a), h = Fs(e, [l, c]), v = {};
|
|
5022
5051
|
s.UNIFORMS.forEach(function(R) {
|
|
5023
5052
|
var w = e.getUniformLocation(h, R);
|
|
5024
5053
|
w && (v[R] = w);
|
|
@@ -5073,12 +5102,12 @@ var An = `#define PICKING_MODE
|
|
|
5073
5102
|
}, {
|
|
5074
5103
|
key: "bindAttribute",
|
|
5075
5104
|
value: function(t, e, i, a) {
|
|
5076
|
-
var o =
|
|
5105
|
+
var o = Os[t.type];
|
|
5077
5106
|
if (typeof o != "number") throw new Error('Program.bind: yet unsupported attribute type "'.concat(t.type, '"'));
|
|
5078
5107
|
var s = e.attributeLocations[t.name], u = e.gl;
|
|
5079
5108
|
if (s !== -1) {
|
|
5080
5109
|
u.enableVertexAttribArray(s);
|
|
5081
|
-
var l = this.isInstanced ? (a ? this.ATTRIBUTES_ITEMS_COUNT :
|
|
5110
|
+
var l = this.isInstanced ? (a ? this.ATTRIBUTES_ITEMS_COUNT : nr(this.CONSTANT_ATTRIBUTES)) * Float32Array.BYTES_PER_ELEMENT : this.ATTRIBUTES_ITEMS_COUNT * Float32Array.BYTES_PER_ELEMENT;
|
|
5082
5111
|
if (u.vertexAttribPointer(s, t.size, t.type, t.normalized || !1, l, i), this.isInstanced && a)
|
|
5083
5112
|
if (u instanceof WebGL2RenderingContext)
|
|
5084
5113
|
u.vertexAttribDivisor(s, 1);
|
|
@@ -5185,7 +5214,7 @@ var An = `#define PICKING_MODE
|
|
|
5185
5214
|
}
|
|
5186
5215
|
}]);
|
|
5187
5216
|
})($i);
|
|
5188
|
-
function
|
|
5217
|
+
function zs(n, r) {
|
|
5189
5218
|
return /* @__PURE__ */ (function() {
|
|
5190
5219
|
function t(e, i, a) {
|
|
5191
5220
|
ge(this, t), N(this, "drawLabel", r), this.programs = n.map(function(o) {
|
|
@@ -5223,7 +5252,7 @@ function Fs(n, r) {
|
|
|
5223
5252
|
}]);
|
|
5224
5253
|
})();
|
|
5225
5254
|
}
|
|
5226
|
-
function
|
|
5255
|
+
function Ns(n, r, t, e, i) {
|
|
5227
5256
|
var a = i.edgeLabelSize, o = i.edgeLabelFont, s = i.edgeLabelWeight, u = i.edgeLabelColor.attribute ? r[i.edgeLabelColor.attribute] || i.edgeLabelColor.color || "#000" : i.edgeLabelColor.color, l = r.label;
|
|
5228
5257
|
if (l) {
|
|
5229
5258
|
n.fillStyle = u, n.font = "".concat(s, " ").concat(a, "px ").concat(o);
|
|
@@ -5248,7 +5277,7 @@ function Bi(n, r, t) {
|
|
|
5248
5277
|
n.fillStyle = o, n.font = "".concat(a, " ").concat(e, "px ").concat(i), n.fillText(r.label, r.x + r.size + 3, r.y + e / 3);
|
|
5249
5278
|
}
|
|
5250
5279
|
}
|
|
5251
|
-
function
|
|
5280
|
+
function Us(n, r, t) {
|
|
5252
5281
|
var e = t.labelSize, i = t.labelFont, a = t.labelWeight;
|
|
5253
5282
|
n.font = "".concat(a, " ").concat(e, "px ").concat(i), n.fillStyle = "#FFF", n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 8, n.shadowColor = "#000";
|
|
5254
5283
|
var o = 2;
|
|
@@ -5259,7 +5288,7 @@ function zs(n, r, t) {
|
|
|
5259
5288
|
n.beginPath(), n.arc(r.x, r.y, r.size + o, 0, Math.PI * 2), n.closePath(), n.fill();
|
|
5260
5289
|
n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 0, Bi(n, r, t);
|
|
5261
5290
|
}
|
|
5262
|
-
var
|
|
5291
|
+
var $s = (
|
|
5263
5292
|
/*glsl*/
|
|
5264
5293
|
`
|
|
5265
5294
|
precision highp float;
|
|
@@ -5294,7 +5323,7 @@ void main(void) {
|
|
|
5294
5323
|
#endif
|
|
5295
5324
|
}
|
|
5296
5325
|
`
|
|
5297
|
-
),
|
|
5326
|
+
), Ms = $s, Bs = (
|
|
5298
5327
|
/*glsl*/
|
|
5299
5328
|
`
|
|
5300
5329
|
attribute vec4 a_id;
|
|
@@ -5338,7 +5367,7 @@ void main() {
|
|
|
5338
5367
|
v_color.a *= bias;
|
|
5339
5368
|
}
|
|
5340
5369
|
`
|
|
5341
|
-
),
|
|
5370
|
+
), Ws = Bs, Wi = WebGLRenderingContext, kn = Wi.UNSIGNED_BYTE, ir = Wi.FLOAT, Hs = ["u_sizeRatio", "u_correctionRatio", "u_matrix"], At = /* @__PURE__ */ (function(n) {
|
|
5342
5371
|
function r() {
|
|
5343
5372
|
return ge(this, r), Te(this, r, arguments);
|
|
5344
5373
|
}
|
|
@@ -5347,18 +5376,18 @@ void main() {
|
|
|
5347
5376
|
value: function() {
|
|
5348
5377
|
return {
|
|
5349
5378
|
VERTICES: 3,
|
|
5350
|
-
VERTEX_SHADER_SOURCE:
|
|
5351
|
-
FRAGMENT_SHADER_SOURCE:
|
|
5379
|
+
VERTEX_SHADER_SOURCE: Ws,
|
|
5380
|
+
FRAGMENT_SHADER_SOURCE: Ms,
|
|
5352
5381
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
5353
|
-
UNIFORMS:
|
|
5382
|
+
UNIFORMS: Hs,
|
|
5354
5383
|
ATTRIBUTES: [{
|
|
5355
5384
|
name: "a_position",
|
|
5356
5385
|
size: 2,
|
|
5357
|
-
type:
|
|
5386
|
+
type: ir
|
|
5358
5387
|
}, {
|
|
5359
5388
|
name: "a_size",
|
|
5360
5389
|
size: 1,
|
|
5361
|
-
type:
|
|
5390
|
+
type: ir
|
|
5362
5391
|
}, {
|
|
5363
5392
|
name: "a_color",
|
|
5364
5393
|
size: 4,
|
|
@@ -5373,7 +5402,7 @@ void main() {
|
|
|
5373
5402
|
CONSTANT_ATTRIBUTES: [{
|
|
5374
5403
|
name: "a_angle",
|
|
5375
5404
|
size: 1,
|
|
5376
|
-
type:
|
|
5405
|
+
type: ir
|
|
5377
5406
|
}],
|
|
5378
5407
|
CONSTANT_DATA: [[r.ANGLE_1], [r.ANGLE_2], [r.ANGLE_3]]
|
|
5379
5408
|
};
|
|
@@ -5395,7 +5424,7 @@ void main() {
|
|
|
5395
5424
|
N(At, "ANGLE_1", 0);
|
|
5396
5425
|
N(At, "ANGLE_2", 2 * Math.PI / 3);
|
|
5397
5426
|
N(At, "ANGLE_3", 4 * Math.PI / 3);
|
|
5398
|
-
var
|
|
5427
|
+
var js = (
|
|
5399
5428
|
/*glsl*/
|
|
5400
5429
|
`
|
|
5401
5430
|
precision mediump float;
|
|
@@ -5406,7 +5435,7 @@ void main(void) {
|
|
|
5406
5435
|
gl_FragColor = v_color;
|
|
5407
5436
|
}
|
|
5408
5437
|
`
|
|
5409
|
-
),
|
|
5438
|
+
), Vs = js, qs = (
|
|
5410
5439
|
/*glsl*/
|
|
5411
5440
|
`
|
|
5412
5441
|
attribute vec2 a_position;
|
|
@@ -5475,7 +5504,7 @@ void main() {
|
|
|
5475
5504
|
v_color.a *= bias;
|
|
5476
5505
|
}
|
|
5477
5506
|
`
|
|
5478
|
-
),
|
|
5507
|
+
), Ks = qs, Hi = WebGLRenderingContext, Cn = Hi.UNSIGNED_BYTE, Ot = Hi.FLOAT, Xs = ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness", "u_lengthToThicknessRatio", "u_widenessToThicknessRatio"], Vt = {
|
|
5479
5508
|
extremity: "target",
|
|
5480
5509
|
lengthToThicknessRatio: 2.5,
|
|
5481
5510
|
widenessToThicknessRatio: 2
|
|
@@ -5491,10 +5520,10 @@ function ji(n) {
|
|
|
5491
5520
|
value: function() {
|
|
5492
5521
|
return {
|
|
5493
5522
|
VERTICES: 3,
|
|
5494
|
-
VERTEX_SHADER_SOURCE:
|
|
5495
|
-
FRAGMENT_SHADER_SOURCE:
|
|
5523
|
+
VERTEX_SHADER_SOURCE: Ks,
|
|
5524
|
+
FRAGMENT_SHADER_SOURCE: Vs,
|
|
5496
5525
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
5497
|
-
UNIFORMS:
|
|
5526
|
+
UNIFORMS: Xs,
|
|
5498
5527
|
ATTRIBUTES: [{
|
|
5499
5528
|
name: "a_position",
|
|
5500
5529
|
size: 2,
|
|
@@ -5548,7 +5577,7 @@ function ji(n) {
|
|
|
5548
5577
|
})(jt);
|
|
5549
5578
|
}
|
|
5550
5579
|
ji();
|
|
5551
|
-
var
|
|
5580
|
+
var Ys = (
|
|
5552
5581
|
/*glsl*/
|
|
5553
5582
|
`
|
|
5554
5583
|
precision mediump float;
|
|
@@ -5577,7 +5606,7 @@ void main(void) {
|
|
|
5577
5606
|
#endif
|
|
5578
5607
|
}
|
|
5579
5608
|
`
|
|
5580
|
-
), Vi =
|
|
5609
|
+
), Vi = Ys, Zs = (
|
|
5581
5610
|
/*glsl*/
|
|
5582
5611
|
`
|
|
5583
5612
|
attribute vec4 a_id;
|
|
@@ -5648,11 +5677,11 @@ void main() {
|
|
|
5648
5677
|
v_color.a *= bias;
|
|
5649
5678
|
}
|
|
5650
5679
|
`
|
|
5651
|
-
),
|
|
5680
|
+
), Qs = Zs, qi = WebGLRenderingContext, xn = qi.UNSIGNED_BYTE, qe = qi.FLOAT, Js = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness", "u_lengthToThicknessRatio"], eu = {
|
|
5652
5681
|
lengthToThicknessRatio: Vt.lengthToThicknessRatio
|
|
5653
5682
|
};
|
|
5654
5683
|
function Ki(n) {
|
|
5655
|
-
var r = j(j({},
|
|
5684
|
+
var r = j(j({}, eu), {});
|
|
5656
5685
|
return /* @__PURE__ */ (function(t) {
|
|
5657
5686
|
function e() {
|
|
5658
5687
|
return ge(this, e), Te(this, e, arguments);
|
|
@@ -5662,10 +5691,10 @@ function Ki(n) {
|
|
|
5662
5691
|
value: function() {
|
|
5663
5692
|
return {
|
|
5664
5693
|
VERTICES: 6,
|
|
5665
|
-
VERTEX_SHADER_SOURCE:
|
|
5694
|
+
VERTEX_SHADER_SOURCE: Qs,
|
|
5666
5695
|
FRAGMENT_SHADER_SOURCE: Vi,
|
|
5667
5696
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
5668
|
-
UNIFORMS:
|
|
5697
|
+
UNIFORMS: Js,
|
|
5669
5698
|
ATTRIBUTES: [{
|
|
5670
5699
|
name: "a_positionStart",
|
|
5671
5700
|
size: 2,
|
|
@@ -5733,10 +5762,10 @@ function Ki(n) {
|
|
|
5733
5762
|
})(jt);
|
|
5734
5763
|
}
|
|
5735
5764
|
Ki();
|
|
5736
|
-
function
|
|
5737
|
-
return
|
|
5765
|
+
function tu(n) {
|
|
5766
|
+
return zs([Ki(), ji()]);
|
|
5738
5767
|
}
|
|
5739
|
-
var
|
|
5768
|
+
var ru = tu(), Xi = ru, nu = (
|
|
5740
5769
|
/*glsl*/
|
|
5741
5770
|
`
|
|
5742
5771
|
attribute vec4 a_id;
|
|
@@ -5804,7 +5833,7 @@ void main() {
|
|
|
5804
5833
|
v_color.a *= bias;
|
|
5805
5834
|
}
|
|
5806
5835
|
`
|
|
5807
|
-
),
|
|
5836
|
+
), iu = nu, Yi = WebGLRenderingContext, Dn = Yi.UNSIGNED_BYTE, ft = Yi.FLOAT, au = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness"], Zi = /* @__PURE__ */ (function(n) {
|
|
5808
5837
|
function r() {
|
|
5809
5838
|
return ge(this, r), Te(this, r, arguments);
|
|
5810
5839
|
}
|
|
@@ -5813,10 +5842,10 @@ void main() {
|
|
|
5813
5842
|
value: function() {
|
|
5814
5843
|
return {
|
|
5815
5844
|
VERTICES: 6,
|
|
5816
|
-
VERTEX_SHADER_SOURCE:
|
|
5845
|
+
VERTEX_SHADER_SOURCE: iu,
|
|
5817
5846
|
FRAGMENT_SHADER_SOURCE: Vi,
|
|
5818
5847
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
5819
|
-
UNIFORMS:
|
|
5848
|
+
UNIFORMS: au,
|
|
5820
5849
|
ATTRIBUTES: [{
|
|
5821
5850
|
name: "a_positionStart",
|
|
5822
5851
|
size: 2,
|
|
@@ -5872,43 +5901,43 @@ void main() {
|
|
|
5872
5901
|
a.uniformMatrix3fv(s, !1, e.matrix), a.uniform1f(u, e.zoomRatio), a.uniform1f(v, e.sizeRatio), a.uniform1f(h, e.correctionRatio), a.uniform1f(c, e.pixelRatio), a.uniform1f(l, e.antiAliasingFeather), a.uniform1f(y, e.minEdgeThickness);
|
|
5873
5902
|
}
|
|
5874
5903
|
}]);
|
|
5875
|
-
})(jt),
|
|
5904
|
+
})(jt), Xr = /* @__PURE__ */ (function(n) {
|
|
5876
5905
|
function r() {
|
|
5877
5906
|
var t;
|
|
5878
5907
|
return ge(this, r), t = Te(this, r), t.rawEmitter = t, t;
|
|
5879
5908
|
}
|
|
5880
5909
|
return Se(r, n), pe(r);
|
|
5881
|
-
})(
|
|
5910
|
+
})(Hr.EventEmitter), ar, Ln;
|
|
5882
5911
|
function Ze() {
|
|
5883
|
-
return Ln || (Ln = 1,
|
|
5912
|
+
return Ln || (Ln = 1, ar = function(r) {
|
|
5884
5913
|
return r !== null && typeof r == "object" && typeof r.addUndirectedEdgeWithKey == "function" && typeof r.dropNode == "function" && typeof r.multi == "boolean";
|
|
5885
|
-
}),
|
|
5914
|
+
}), ar;
|
|
5886
5915
|
}
|
|
5887
|
-
var
|
|
5888
|
-
const
|
|
5889
|
-
var
|
|
5916
|
+
var ou = Ze();
|
|
5917
|
+
const su = /* @__PURE__ */ Wr(ou);
|
|
5918
|
+
var uu = function(r) {
|
|
5890
5919
|
return r;
|
|
5891
|
-
},
|
|
5920
|
+
}, lu = function(r) {
|
|
5892
5921
|
return r * r;
|
|
5893
|
-
},
|
|
5922
|
+
}, cu = function(r) {
|
|
5894
5923
|
return r * (2 - r);
|
|
5895
|
-
},
|
|
5924
|
+
}, hu = function(r) {
|
|
5896
5925
|
return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1);
|
|
5897
|
-
},
|
|
5926
|
+
}, du = function(r) {
|
|
5898
5927
|
return r * r * r;
|
|
5899
|
-
},
|
|
5928
|
+
}, fu = function(r) {
|
|
5900
5929
|
return --r * r * r + 1;
|
|
5901
|
-
},
|
|
5930
|
+
}, gu = function(r) {
|
|
5902
5931
|
return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2);
|
|
5903
|
-
},
|
|
5904
|
-
linear:
|
|
5905
|
-
quadraticIn:
|
|
5906
|
-
quadraticOut:
|
|
5907
|
-
quadraticInOut:
|
|
5908
|
-
cubicIn:
|
|
5909
|
-
cubicOut:
|
|
5910
|
-
cubicInOut:
|
|
5911
|
-
},
|
|
5932
|
+
}, pu = {
|
|
5933
|
+
linear: uu,
|
|
5934
|
+
quadraticIn: lu,
|
|
5935
|
+
quadraticOut: cu,
|
|
5936
|
+
quadraticInOut: hu,
|
|
5937
|
+
cubicIn: du,
|
|
5938
|
+
cubicOut: fu,
|
|
5939
|
+
cubicInOut: gu
|
|
5940
|
+
}, vu = {
|
|
5912
5941
|
easing: "quadraticInOut",
|
|
5913
5942
|
duration: 150
|
|
5914
5943
|
};
|
|
@@ -5929,29 +5958,29 @@ function $e(n, r) {
|
|
|
5929
5958
|
var t = n[0], e = n[1], i = n[2], a = n[3], o = n[4], s = n[5], u = n[6], l = n[7], c = n[8], h = r[0], v = r[1], y = r[2], b = r[3], R = r[4], w = r[5], k = r[6], E = r[7], m = r[8];
|
|
5930
5959
|
return n[0] = h * t + v * a + y * u, n[1] = h * e + v * o + y * l, n[2] = h * i + v * s + y * c, n[3] = b * t + R * a + w * u, n[4] = b * e + R * o + w * l, n[5] = b * i + R * s + w * c, n[6] = k * t + E * a + m * u, n[7] = k * e + E * o + m * l, n[8] = k * i + E * s + m * c, n;
|
|
5931
5960
|
}
|
|
5932
|
-
function
|
|
5961
|
+
function Lr(n, r) {
|
|
5933
5962
|
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, e = n[0], i = n[1], a = n[3], o = n[4], s = n[6], u = n[7], l = r.x, c = r.y;
|
|
5934
5963
|
return {
|
|
5935
5964
|
x: l * e + c * a + s * t,
|
|
5936
5965
|
y: l * i + c * o + u * t
|
|
5937
5966
|
};
|
|
5938
5967
|
}
|
|
5939
|
-
function
|
|
5968
|
+
function mu(n, r) {
|
|
5940
5969
|
var t = n.height / n.width, e = r.height / r.width;
|
|
5941
5970
|
return t < 1 && e > 1 || t > 1 && e < 1 ? 1 : Math.min(Math.max(e, 1 / e), Math.max(1 / t, t));
|
|
5942
5971
|
}
|
|
5943
5972
|
function gt(n, r, t, e, i) {
|
|
5944
|
-
var a = n.angle, o = n.ratio, s = n.x, u = n.y, l = r.width, c = r.height, h = ke(), v = Math.min(l, c) - 2 * e, y =
|
|
5973
|
+
var a = n.angle, o = n.ratio, s = n.x, u = n.y, l = r.width, c = r.height, h = ke(), v = Math.min(l, c) - 2 * e, y = mu(r, t);
|
|
5945
5974
|
return i ? ($e(h, In(ke(), s, u)), $e(h, zt(ke(), o)), $e(h, Gn(ke(), a)), $e(h, zt(ke(), l / v / 2 / y, c / v / 2 / y))) : ($e(h, zt(ke(), 2 * (v / l) * y, 2 * (v / c) * y)), $e(h, Gn(ke(), -a)), $e(h, zt(ke(), 1 / o)), $e(h, In(ke(), -s, -u))), h;
|
|
5946
5975
|
}
|
|
5947
|
-
function
|
|
5948
|
-
var e =
|
|
5976
|
+
function yu(n, r, t) {
|
|
5977
|
+
var e = Lr(n, {
|
|
5949
5978
|
x: Math.cos(r.angle),
|
|
5950
5979
|
y: Math.sin(r.angle)
|
|
5951
5980
|
}, 0), i = e.x, a = e.y;
|
|
5952
5981
|
return 1 / Math.sqrt(Math.pow(i, 2) + Math.pow(a, 2)) / t.width;
|
|
5953
5982
|
}
|
|
5954
|
-
function
|
|
5983
|
+
function bu(n) {
|
|
5955
5984
|
if (!n.order) return {
|
|
5956
5985
|
x: [0, 1],
|
|
5957
5986
|
y: [0, 1]
|
|
@@ -5965,14 +5994,14 @@ function mu(n) {
|
|
|
5965
5994
|
y: [e, i]
|
|
5966
5995
|
};
|
|
5967
5996
|
}
|
|
5968
|
-
function
|
|
5969
|
-
if (!
|
|
5997
|
+
function wu(n) {
|
|
5998
|
+
if (!su(n)) throw new Error("Sigma: invalid graph instance.");
|
|
5970
5999
|
n.forEachNode(function(r, t) {
|
|
5971
6000
|
if (!Number.isFinite(t.x) || !Number.isFinite(t.y))
|
|
5972
6001
|
throw new Error("Sigma: Coordinates of node ".concat(r, " are invalid. A node must have a numeric 'x' and 'y' attribute."));
|
|
5973
6002
|
});
|
|
5974
6003
|
}
|
|
5975
|
-
function
|
|
6004
|
+
function Eu(n, r, t) {
|
|
5976
6005
|
var e = document.createElement(n);
|
|
5977
6006
|
if (r)
|
|
5978
6007
|
for (var i in r)
|
|
@@ -6009,13 +6038,13 @@ function On(n) {
|
|
|
6009
6038
|
};
|
|
6010
6039
|
}, c.ratio = s, c;
|
|
6011
6040
|
}
|
|
6012
|
-
function
|
|
6041
|
+
function Gr(n) {
|
|
6013
6042
|
"@babel/helpers - typeof";
|
|
6014
|
-
return
|
|
6043
|
+
return Gr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
6015
6044
|
return typeof r;
|
|
6016
6045
|
} : function(r) {
|
|
6017
6046
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
6018
|
-
},
|
|
6047
|
+
}, Gr(n);
|
|
6019
6048
|
}
|
|
6020
6049
|
function zn(n, r) {
|
|
6021
6050
|
var t = r.size;
|
|
@@ -6028,7 +6057,7 @@ function zn(n, r) {
|
|
|
6028
6057
|
});
|
|
6029
6058
|
}
|
|
6030
6059
|
}
|
|
6031
|
-
function
|
|
6060
|
+
function or(n) {
|
|
6032
6061
|
n = n || {};
|
|
6033
6062
|
for (var r = 0, t = arguments.length <= 1 ? 0 : arguments.length - 1; r < t; r++) {
|
|
6034
6063
|
var e = r + 1 < 1 || arguments.length <= r + 1 ? void 0 : arguments[r + 1];
|
|
@@ -6036,7 +6065,7 @@ function ar(n) {
|
|
|
6036
6065
|
}
|
|
6037
6066
|
return n;
|
|
6038
6067
|
}
|
|
6039
|
-
var
|
|
6068
|
+
var Yr = {
|
|
6040
6069
|
// Performance
|
|
6041
6070
|
hideEdgesOnMove: !1,
|
|
6042
6071
|
hideLabelsOnMove: !1,
|
|
@@ -6061,9 +6090,9 @@ var Xr = {
|
|
|
6061
6090
|
attribute: "color"
|
|
6062
6091
|
},
|
|
6063
6092
|
stagePadding: 30,
|
|
6064
|
-
defaultDrawEdgeLabel:
|
|
6093
|
+
defaultDrawEdgeLabel: Ns,
|
|
6065
6094
|
defaultDrawNodeLabel: Bi,
|
|
6066
|
-
defaultDrawNodeHover:
|
|
6095
|
+
defaultDrawNodeHover: Us,
|
|
6067
6096
|
minEdgeThickness: 1.7,
|
|
6068
6097
|
antiAliasingFeather: 1,
|
|
6069
6098
|
// Mouse and touch settings
|
|
@@ -6103,22 +6132,22 @@ var Xr = {
|
|
|
6103
6132
|
nodeProgramClasses: {},
|
|
6104
6133
|
nodeHoverProgramClasses: {},
|
|
6105
6134
|
edgeProgramClasses: {}
|
|
6106
|
-
},
|
|
6135
|
+
}, _u = {
|
|
6107
6136
|
circle: At
|
|
6108
|
-
},
|
|
6137
|
+
}, Tu = {
|
|
6109
6138
|
arrow: Xi,
|
|
6110
6139
|
line: Zi
|
|
6111
6140
|
};
|
|
6112
|
-
function
|
|
6141
|
+
function sr(n) {
|
|
6113
6142
|
if (typeof n.labelDensity != "number" || n.labelDensity < 0)
|
|
6114
6143
|
throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");
|
|
6115
6144
|
var r = n.minCameraRatio, t = n.maxCameraRatio;
|
|
6116
6145
|
if (typeof r == "number" && typeof t == "number" && t < r)
|
|
6117
6146
|
throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.");
|
|
6118
6147
|
}
|
|
6119
|
-
function
|
|
6120
|
-
var r =
|
|
6121
|
-
return r.nodeProgramClasses =
|
|
6148
|
+
function Su(n) {
|
|
6149
|
+
var r = or({}, Yr, n);
|
|
6150
|
+
return r.nodeProgramClasses = or({}, _u, r.nodeProgramClasses), r.edgeProgramClasses = or({}, Tu, r.edgeProgramClasses), r;
|
|
6122
6151
|
}
|
|
6123
6152
|
var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
|
|
6124
6153
|
function r() {
|
|
@@ -6234,7 +6263,7 @@ var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
|
|
|
6234
6263
|
return i.animate(e, a, y);
|
|
6235
6264
|
});
|
|
6236
6265
|
if (this.enabled) {
|
|
6237
|
-
var s = j(j({},
|
|
6266
|
+
var s = j(j({}, vu), a), u = this.validateState(e), l = typeof s.easing == "function" ? s.easing : pu[s.easing], c = Date.now(), h = this.getState(), v = function() {
|
|
6238
6267
|
var b = (Date.now() - c) / s.duration;
|
|
6239
6268
|
if (b >= 1) {
|
|
6240
6269
|
i.nextFrame = null, i.setState(u), i.animationCallback && (i.animationCallback.call(null), i.animationCallback = void 0);
|
|
@@ -6302,7 +6331,7 @@ var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
|
|
|
6302
6331
|
return i.setState(e);
|
|
6303
6332
|
}
|
|
6304
6333
|
}]);
|
|
6305
|
-
})(
|
|
6334
|
+
})(Xr);
|
|
6306
6335
|
function De(n, r) {
|
|
6307
6336
|
var t = r.getBoundingClientRect();
|
|
6308
6337
|
return {
|
|
@@ -6330,14 +6359,14 @@ function pt(n) {
|
|
|
6330
6359
|
});
|
|
6331
6360
|
return r;
|
|
6332
6361
|
}
|
|
6333
|
-
function
|
|
6362
|
+
function Ru(n, r) {
|
|
6334
6363
|
return j(j({}, Fe(n, r)), {}, {
|
|
6335
6364
|
delta: Qi(n)
|
|
6336
6365
|
});
|
|
6337
6366
|
}
|
|
6338
|
-
var
|
|
6367
|
+
var Au = 2;
|
|
6339
6368
|
function Ut(n) {
|
|
6340
|
-
for (var r = [], t = 0, e = Math.min(n.length,
|
|
6369
|
+
for (var r = [], t = 0, e = Math.min(n.length, Au); t < e; t++) r.push(n[t]);
|
|
6341
6370
|
return r;
|
|
6342
6371
|
}
|
|
6343
6372
|
function vt(n, r, t) {
|
|
@@ -6367,12 +6396,12 @@ var Ji = /* @__PURE__ */ (function(n) {
|
|
|
6367
6396
|
return ge(this, r), i = Te(this, r), i.container = t, i.renderer = e, i;
|
|
6368
6397
|
}
|
|
6369
6398
|
return Se(r, n), pe(r);
|
|
6370
|
-
})(
|
|
6371
|
-
return j(j({}, n), {}, N({}, r,
|
|
6372
|
-
}, {}),
|
|
6399
|
+
})(Xr), ku = ["doubleClickTimeout", "doubleClickZoomingDuration", "doubleClickZoomingRatio", "dragTimeout", "draggedEventsTolerance", "inertiaDuration", "inertiaRatio", "zoomDuration", "zoomingRatio"], Cu = ku.reduce(function(n, r) {
|
|
6400
|
+
return j(j({}, n), {}, N({}, r, Yr[r]));
|
|
6401
|
+
}, {}), xu = /* @__PURE__ */ (function(n) {
|
|
6373
6402
|
function r(t, e) {
|
|
6374
6403
|
var i;
|
|
6375
|
-
return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "draggedEvents", 0), N(i, "downStartTime", null), N(i, "lastMouseX", null), N(i, "lastMouseY", null), N(i, "isMouseDown", !1), N(i, "isMoving", !1), N(i, "movingTimeout", null), N(i, "startCameraState", null), N(i, "clicks", 0), N(i, "doubleClickTimeout", null), N(i, "currentWheelDirection", 0), N(i, "settings",
|
|
6404
|
+
return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "draggedEvents", 0), N(i, "downStartTime", null), N(i, "lastMouseX", null), N(i, "lastMouseY", null), N(i, "isMouseDown", !1), N(i, "isMoving", !1), N(i, "movingTimeout", null), N(i, "startCameraState", null), N(i, "clicks", 0), N(i, "doubleClickTimeout", null), N(i, "currentWheelDirection", 0), N(i, "settings", Cu), i.handleClick = i.handleClick.bind(i), i.handleRightClick = i.handleRightClick.bind(i), i.handleDown = i.handleDown.bind(i), i.handleUp = i.handleUp.bind(i), i.handleMove = i.handleMove.bind(i), i.handleWheel = i.handleWheel.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleEnter = i.handleEnter.bind(i), t.addEventListener("click", i.handleClick, {
|
|
6376
6405
|
capture: !1
|
|
6377
6406
|
}), t.addEventListener("contextmenu", i.handleRightClick, {
|
|
6378
6407
|
capture: !1
|
|
@@ -6507,7 +6536,7 @@ var Ji = /* @__PURE__ */ (function(n) {
|
|
|
6507
6536
|
if (!(!this.enabled || !a.enabledZooming)) {
|
|
6508
6537
|
var o = Qi(e);
|
|
6509
6538
|
if (o) {
|
|
6510
|
-
var s =
|
|
6539
|
+
var s = Ru(e, this.container);
|
|
6511
6540
|
if (this.emit("wheel", s), s.sigmaDefaultPrevented) {
|
|
6512
6541
|
e.preventDefault(), e.stopPropagation();
|
|
6513
6542
|
return;
|
|
@@ -6528,12 +6557,12 @@ var Ji = /* @__PURE__ */ (function(n) {
|
|
|
6528
6557
|
this.settings = e;
|
|
6529
6558
|
}
|
|
6530
6559
|
}]);
|
|
6531
|
-
})(Ji),
|
|
6532
|
-
return j(j({}, n), {}, N({}, r,
|
|
6533
|
-
}, {}),
|
|
6560
|
+
})(Ji), Du = ["dragTimeout", "inertiaDuration", "inertiaRatio", "doubleClickTimeout", "doubleClickZoomingRatio", "doubleClickZoomingDuration", "tapMoveTolerance"], Lu = Du.reduce(function(n, r) {
|
|
6561
|
+
return j(j({}, n), {}, N({}, r, Yr[r]));
|
|
6562
|
+
}, {}), Gu = /* @__PURE__ */ (function(n) {
|
|
6534
6563
|
function r(t, e) {
|
|
6535
6564
|
var i;
|
|
6536
|
-
return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "isMoving", !1), N(i, "hasMoved", !1), N(i, "touchMode", 0), N(i, "startTouchesPositions", []), N(i, "lastTouches", []), N(i, "lastTap", null), N(i, "settings",
|
|
6565
|
+
return ge(this, r), i = Te(this, r, [t, e]), N(i, "enabled", !0), N(i, "isMoving", !1), N(i, "hasMoved", !1), N(i, "touchMode", 0), N(i, "startTouchesPositions", []), N(i, "lastTouches", []), N(i, "lastTap", null), N(i, "settings", Lu), i.handleStart = i.handleStart.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleMove = i.handleMove.bind(i), t.addEventListener("touchstart", i.handleStart, {
|
|
6537
6566
|
capture: !1
|
|
6538
6567
|
}), t.addEventListener("touchcancel", i.handleLeave, {
|
|
6539
6568
|
capture: !1
|
|
@@ -6681,20 +6710,20 @@ var Ji = /* @__PURE__ */ (function(n) {
|
|
|
6681
6710
|
}
|
|
6682
6711
|
}]);
|
|
6683
6712
|
})(Ji);
|
|
6684
|
-
function
|
|
6685
|
-
if (Array.isArray(n)) return
|
|
6713
|
+
function Iu(n) {
|
|
6714
|
+
if (Array.isArray(n)) return xr(n);
|
|
6686
6715
|
}
|
|
6687
|
-
function
|
|
6716
|
+
function Pu(n) {
|
|
6688
6717
|
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
6689
6718
|
}
|
|
6690
|
-
function
|
|
6719
|
+
function Fu() {
|
|
6691
6720
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
6692
6721
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6693
6722
|
}
|
|
6694
6723
|
function Un(n) {
|
|
6695
|
-
return
|
|
6724
|
+
return Iu(n) || Pu(n) || Pi(n) || Fu();
|
|
6696
6725
|
}
|
|
6697
|
-
function
|
|
6726
|
+
function Ou(n, r) {
|
|
6698
6727
|
if (n == null) return {};
|
|
6699
6728
|
var t = {};
|
|
6700
6729
|
for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
|
|
@@ -6703,9 +6732,9 @@ function Pu(n, r) {
|
|
|
6703
6732
|
}
|
|
6704
6733
|
return t;
|
|
6705
6734
|
}
|
|
6706
|
-
function
|
|
6735
|
+
function ur(n, r) {
|
|
6707
6736
|
if (n == null) return {};
|
|
6708
|
-
var t, e, i =
|
|
6737
|
+
var t, e, i = Ou(n, r);
|
|
6709
6738
|
if (Object.getOwnPropertySymbols) {
|
|
6710
6739
|
var a = Object.getOwnPropertySymbols(n);
|
|
6711
6740
|
for (e = 0; e < a.length; e++) t = a[e], r.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
|
|
@@ -6762,21 +6791,21 @@ var $n = /* @__PURE__ */ (function() {
|
|
|
6762
6791
|
}
|
|
6763
6792
|
}]);
|
|
6764
6793
|
})();
|
|
6765
|
-
function
|
|
6794
|
+
function zu(n) {
|
|
6766
6795
|
var r = n.graph, t = n.hoveredNode, e = n.highlightedNodes, i = n.displayedNodeLabels, a = [];
|
|
6767
6796
|
return r.forEachEdge(function(o, s, u, l) {
|
|
6768
6797
|
(u === t || l === t || e.has(u) || e.has(l) || i.has(u) && i.has(l)) && a.push(o);
|
|
6769
6798
|
}), a;
|
|
6770
6799
|
}
|
|
6771
6800
|
var Bn = 150, Wn = 50, Oe = Object.prototype.hasOwnProperty;
|
|
6772
|
-
function
|
|
6801
|
+
function Nu(n, r, t) {
|
|
6773
6802
|
if (!Oe.call(t, "x") || !Oe.call(t, "y")) throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(r, '". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));
|
|
6774
6803
|
return t.color || (t.color = n.defaultNodeColor), !t.label && t.label !== "" && (t.label = null), t.label !== void 0 && t.label !== null ? t.label = "" + t.label : t.label = null, t.size || (t.size = 2), Oe.call(t, "hidden") || (t.hidden = !1), Oe.call(t, "highlighted") || (t.highlighted = !1), Oe.call(t, "forceLabel") || (t.forceLabel = !1), (!t.type || t.type === "") && (t.type = n.defaultNodeType), t.zIndex || (t.zIndex = 0), t;
|
|
6775
6804
|
}
|
|
6776
|
-
function
|
|
6805
|
+
function Uu(n, r, t) {
|
|
6777
6806
|
return t.color || (t.color = n.defaultEdgeColor), t.label || (t.label = ""), t.size || (t.size = 0.5), Oe.call(t, "hidden") || (t.hidden = !1), Oe.call(t, "forceLabel") || (t.forceLabel = !1), (!t.type || t.type === "") && (t.type = n.defaultEdgeType), t.zIndex || (t.zIndex = 0), t;
|
|
6778
6807
|
}
|
|
6779
|
-
var
|
|
6808
|
+
var $u = /* @__PURE__ */ (function(n) {
|
|
6780
6809
|
function r(t, e) {
|
|
6781
6810
|
var i, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6782
6811
|
if (ge(this, r), i = Te(this, r), N(i, "elements", {}), N(i, "canvasContexts", {}), N(i, "webGLContexts", {}), N(i, "pickingLayers", /* @__PURE__ */ new Set()), N(i, "textures", {}), N(i, "frameBuffers", {}), N(i, "activeListeners", {}), N(i, "labelGrid", new Mn()), N(i, "nodeDataCache", {}), N(i, "edgeDataCache", {}), N(i, "nodeProgramIndex", {}), N(i, "edgeProgramIndex", {}), N(i, "nodesWithForcedLabels", /* @__PURE__ */ new Set()), N(i, "edgesWithForcedLabels", /* @__PURE__ */ new Set()), N(i, "nodeExtent", {
|
|
@@ -6785,7 +6814,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
6785
6814
|
}), N(i, "nodeZExtent", [1 / 0, -1 / 0]), N(i, "edgeZExtent", [1 / 0, -1 / 0]), N(i, "matrix", ke()), N(i, "invMatrix", ke()), N(i, "correctionRatio", 1), N(i, "customBBox", null), N(i, "normalizationFunction", On({
|
|
6786
6815
|
x: [0, 1],
|
|
6787
6816
|
y: [0, 1]
|
|
6788
|
-
})), N(i, "graphToViewportRatio", 1), N(i, "itemIDsIndex", {}), N(i, "nodeIndices", {}), N(i, "edgeIndices", {}), N(i, "width", 0), N(i, "height", 0), N(i, "pixelRatio", Pn()), N(i, "pickingDownSizingRatio", 2 * i.pixelRatio), N(i, "displayedNodeLabels", /* @__PURE__ */ new Set()), N(i, "displayedEdgeLabels", /* @__PURE__ */ new Set()), N(i, "highlightedNodes", /* @__PURE__ */ new Set()), N(i, "hoveredNode", null), N(i, "hoveredEdge", null), N(i, "renderFrame", null), N(i, "renderHighlightedNodesFrame", null), N(i, "needToProcess", !1), N(i, "checkEdgesEventsFrame", null), N(i, "nodePrograms", {}), N(i, "nodeHoverPrograms", {}), N(i, "edgePrograms", {}), i.settings =
|
|
6817
|
+
})), N(i, "graphToViewportRatio", 1), N(i, "itemIDsIndex", {}), N(i, "nodeIndices", {}), N(i, "edgeIndices", {}), N(i, "width", 0), N(i, "height", 0), N(i, "pixelRatio", Pn()), N(i, "pickingDownSizingRatio", 2 * i.pixelRatio), N(i, "displayedNodeLabels", /* @__PURE__ */ new Set()), N(i, "displayedEdgeLabels", /* @__PURE__ */ new Set()), N(i, "highlightedNodes", /* @__PURE__ */ new Set()), N(i, "hoveredNode", null), N(i, "hoveredEdge", null), N(i, "renderFrame", null), N(i, "renderHighlightedNodesFrame", null), N(i, "needToProcess", !1), N(i, "checkEdgesEventsFrame", null), N(i, "nodePrograms", {}), N(i, "nodeHoverPrograms", {}), N(i, "edgePrograms", {}), i.settings = Su(a), sr(i.settings), wu(t), !(e instanceof HTMLElement)) throw new Error("Sigma: container should be an html element.");
|
|
6789
6818
|
i.graph = t, i.container = e, i.createWebGLContext("edges", {
|
|
6790
6819
|
picking: a.enableEdgeEvents
|
|
6791
6820
|
}), i.createCanvasContext("edgeLabels"), i.createWebGLContext("nodes", {
|
|
@@ -6800,7 +6829,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
6800
6829
|
i.registerNodeProgram(o, i.settings.nodeProgramClasses[o], i.settings.nodeHoverProgramClasses[o]);
|
|
6801
6830
|
for (var s in i.settings.edgeProgramClasses)
|
|
6802
6831
|
i.registerEdgeProgram(s, i.settings.edgeProgramClasses[s]);
|
|
6803
|
-
return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new
|
|
6832
|
+
return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new xu(i.elements.mouse, i), i.mouseCaptor.setSettings(i.settings), i.touchCaptor = new Gu(i.elements.mouse, i), i.touchCaptor.setSettings(i.settings), i.bindEventHandlers(), i.bindGraphHandlers(), i.handleSettingsUpdate(), i.refresh(), i;
|
|
6804
6833
|
}
|
|
6805
6834
|
return Se(r, n), pe(r, [{
|
|
6806
6835
|
key: "registerNodeProgram",
|
|
@@ -6829,11 +6858,11 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
6829
6858
|
key: "unregisterNodeProgram",
|
|
6830
6859
|
value: function(e) {
|
|
6831
6860
|
if (this.nodePrograms[e]) {
|
|
6832
|
-
var i = this.nodePrograms, a = i[e], o =
|
|
6861
|
+
var i = this.nodePrograms, a = i[e], o = ur(i, [e].map(Et));
|
|
6833
6862
|
a.kill(), this.nodePrograms = o;
|
|
6834
6863
|
}
|
|
6835
6864
|
if (this.nodeHoverPrograms[e]) {
|
|
6836
|
-
var s = this.nodeHoverPrograms, u = s[e], l =
|
|
6865
|
+
var s = this.nodeHoverPrograms, u = s[e], l = ur(s, [e].map(Et));
|
|
6837
6866
|
u.kill(), this.nodePrograms = l;
|
|
6838
6867
|
}
|
|
6839
6868
|
return this;
|
|
@@ -6848,7 +6877,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
6848
6877
|
key: "unregisterEdgeProgram",
|
|
6849
6878
|
value: function(e) {
|
|
6850
6879
|
if (this.edgePrograms[e]) {
|
|
6851
|
-
var i = this.edgePrograms, a = i[e], o =
|
|
6880
|
+
var i = this.edgePrograms, a = i[e], o = ur(i, [e].map(Et));
|
|
6852
6881
|
a.kill(), this.edgePrograms = o;
|
|
6853
6882
|
}
|
|
6854
6883
|
return this;
|
|
@@ -7120,7 +7149,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7120
7149
|
var e = this;
|
|
7121
7150
|
this.emit("beforeProcess");
|
|
7122
7151
|
var i = this.graph, a = this.settings, o = this.getDimensions();
|
|
7123
|
-
if (this.nodeExtent =
|
|
7152
|
+
if (this.nodeExtent = bu(this.graph), !this.settings.autoRescale) {
|
|
7124
7153
|
var s = o.width, u = o.height, l = this.nodeExtent, c = l.x, h = l.y;
|
|
7125
7154
|
this.nodeExtent = {
|
|
7126
7155
|
x: [(c[0] + c[1]) / 2 - s / 2, (c[0] + c[1]) / 2 + s / 2],
|
|
@@ -7186,7 +7215,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7186
7215
|
value: function(e) {
|
|
7187
7216
|
var i = this, a = this.settings;
|
|
7188
7217
|
if (this.camera.minRatio = a.minCameraRatio, this.camera.maxRatio = a.maxCameraRatio, this.camera.enabledZooming = a.enableCameraZooming, this.camera.enabledPanning = a.enableCameraPanning, this.camera.enabledRotation = a.enableCameraRotation, a.cameraPanBoundaries ? this.camera.clean = function(c) {
|
|
7189
|
-
return i.cleanCameraState(c, a.cameraPanBoundaries &&
|
|
7218
|
+
return i.cleanCameraState(c, a.cameraPanBoundaries && Gr(a.cameraPanBoundaries) === "object" ? a.cameraPanBoundaries : {});
|
|
7190
7219
|
} : this.camera.clean = null, this.camera.setState(this.camera.validateState(this.camera.getState())), e) {
|
|
7191
7220
|
if (e.edgeProgramClasses !== a.edgeProgramClasses) {
|
|
7192
7221
|
for (var o in a.edgeProgramClasses)
|
|
@@ -7290,7 +7319,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7290
7319
|
if (!this.settings.renderEdgeLabels) return this;
|
|
7291
7320
|
var e = this.canvasContexts.edgeLabels;
|
|
7292
7321
|
e.clearRect(0, 0, this.width, this.height);
|
|
7293
|
-
var i =
|
|
7322
|
+
var i = zu({
|
|
7294
7323
|
graph: this.graph,
|
|
7295
7324
|
hoveredNode: this.hoveredNode,
|
|
7296
7325
|
displayedNodeLabels: this.displayedNodeLabels,
|
|
@@ -7389,7 +7418,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7389
7418
|
return e.resetWebGLTexture(w);
|
|
7390
7419
|
}), !this.graph.order) return i();
|
|
7391
7420
|
var a = this.mouseCaptor, o = this.camera.isAnimated() || a.isMoving || a.draggedEvents || a.currentWheelDirection, s = this.camera.getState(), u = this.getDimensions(), l = this.getGraphDimensions(), c = this.getStagePadding();
|
|
7392
|
-
this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio =
|
|
7421
|
+
this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio = yu(this.matrix, s, u), this.graphToViewportRatio = this.getGraphToViewportRatio();
|
|
7393
7422
|
var h = this.getRenderParams();
|
|
7394
7423
|
for (var v in this.nodePrograms) {
|
|
7395
7424
|
var y = this.nodePrograms[v];
|
|
@@ -7412,7 +7441,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7412
7441
|
value: function(e) {
|
|
7413
7442
|
var i = Object.assign({}, this.graph.getNodeAttributes(e));
|
|
7414
7443
|
this.settings.nodeReducer && (i = this.settings.nodeReducer(e, i));
|
|
7415
|
-
var a =
|
|
7444
|
+
var a = Nu(this.settings, e, i);
|
|
7416
7445
|
this.nodeDataCache[e] = a, this.nodesWithForcedLabels.delete(e), a.forceLabel && !a.hidden && this.nodesWithForcedLabels.add(e), this.highlightedNodes.delete(e), a.highlighted && !a.hidden && this.highlightedNodes.add(e), this.settings.zIndex && (a.zIndex < this.nodeZExtent[0] && (this.nodeZExtent[0] = a.zIndex), a.zIndex > this.nodeZExtent[1] && (this.nodeZExtent[1] = a.zIndex));
|
|
7417
7446
|
}
|
|
7418
7447
|
/**
|
|
@@ -7447,7 +7476,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7447
7476
|
value: function(e) {
|
|
7448
7477
|
var i = Object.assign({}, this.graph.getEdgeAttributes(e));
|
|
7449
7478
|
this.settings.edgeReducer && (i = this.settings.edgeReducer(e, i));
|
|
7450
|
-
var a =
|
|
7479
|
+
var a = Uu(this.settings, e, i);
|
|
7451
7480
|
this.edgeDataCache[e] = a, this.edgesWithForcedLabels.delete(e), a.forceLabel && !a.hidden && this.edgesWithForcedLabels.add(e), this.settings.zIndex && (a.zIndex < this.edgeZExtent[0] && (this.edgeZExtent[0] = a.zIndex), a.zIndex > this.edgeZExtent[1] && (this.edgeZExtent[1] = a.zIndex));
|
|
7452
7481
|
}
|
|
7453
7482
|
/**
|
|
@@ -7607,7 +7636,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7607
7636
|
value: function(e, i) {
|
|
7608
7637
|
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
7609
7638
|
if (this.elements[e]) throw new Error('Sigma: a layer named "'.concat(e, '" already exists'));
|
|
7610
|
-
var o =
|
|
7639
|
+
var o = Eu(i, {
|
|
7611
7640
|
position: "absolute"
|
|
7612
7641
|
}, {
|
|
7613
7642
|
class: "sigma-".concat(e)
|
|
@@ -7865,7 +7894,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7865
7894
|
key: "setSetting",
|
|
7866
7895
|
value: function(e, i) {
|
|
7867
7896
|
var a = j({}, this.settings);
|
|
7868
|
-
return this.settings[e] = i,
|
|
7897
|
+
return this.settings[e] = i, sr(this.settings), this.handleSettingsUpdate(a), this.scheduleRefresh(), this;
|
|
7869
7898
|
}
|
|
7870
7899
|
/**
|
|
7871
7900
|
* Method updating the value of a given setting key using the provided function.
|
|
@@ -7890,7 +7919,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
7890
7919
|
key: "setSettings",
|
|
7891
7920
|
value: function(e) {
|
|
7892
7921
|
var i = j({}, this.settings);
|
|
7893
|
-
return this.settings = j(j({}, this.settings), e),
|
|
7922
|
+
return this.settings = j(j({}, this.settings), e), sr(this.settings), this.handleSettingsUpdate(i), this.scheduleRefresh(), this;
|
|
7894
7923
|
}
|
|
7895
7924
|
/**
|
|
7896
7925
|
* Method used to resize the renderer.
|
|
@@ -8065,7 +8094,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
8065
8094
|
}, {
|
|
8066
8095
|
key: "framedGraphToViewport",
|
|
8067
8096
|
value: function(e) {
|
|
8068
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !!i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding()) : this.matrix, s =
|
|
8097
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !!i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding()) : this.matrix, s = Lr(o, e);
|
|
8069
8098
|
return {
|
|
8070
8099
|
x: (1 + s.x) * this.width / 2,
|
|
8071
8100
|
y: (1 - s.y) * this.height / 2
|
|
@@ -8081,7 +8110,7 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
8081
8110
|
}, {
|
|
8082
8111
|
key: "viewportToFramedGraph",
|
|
8083
8112
|
value: function(e) {
|
|
8084
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding(), !0) : this.invMatrix, s =
|
|
8113
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = !!i.cameraState || !!i.viewportDimensions || !i.graphDimensions, o = i.matrix ? i.matrix : a ? gt(i.cameraState || this.camera.getState(), i.viewportDimensions || this.getDimensions(), i.graphDimensions || this.getGraphDimensions(), i.padding || this.getStagePadding(), !0) : this.invMatrix, s = Lr(o, {
|
|
8085
8114
|
x: e.x / this.width * 2 - 1,
|
|
8086
8115
|
y: 1 - e.y / this.height * 2
|
|
8087
8116
|
});
|
|
@@ -8222,36 +8251,36 @@ var Nu = /* @__PURE__ */ (function(n) {
|
|
|
8222
8251
|
return e;
|
|
8223
8252
|
}
|
|
8224
8253
|
}]);
|
|
8225
|
-
})(
|
|
8226
|
-
function
|
|
8254
|
+
})(Xr), Mu = $u;
|
|
8255
|
+
function Ir(n, r) {
|
|
8227
8256
|
(r == null || r > n.length) && (r = n.length);
|
|
8228
8257
|
for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
|
|
8229
8258
|
return e;
|
|
8230
8259
|
}
|
|
8231
|
-
function
|
|
8232
|
-
if (Array.isArray(n)) return
|
|
8260
|
+
function Bu(n) {
|
|
8261
|
+
if (Array.isArray(n)) return Ir(n);
|
|
8233
8262
|
}
|
|
8234
|
-
function
|
|
8263
|
+
function Wu(n) {
|
|
8235
8264
|
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
8236
8265
|
}
|
|
8237
|
-
function
|
|
8266
|
+
function Hu(n, r) {
|
|
8238
8267
|
if (n) {
|
|
8239
|
-
if (typeof n == "string") return
|
|
8268
|
+
if (typeof n == "string") return Ir(n, r);
|
|
8240
8269
|
var t = {}.toString.call(n).slice(8, -1);
|
|
8241
|
-
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
8270
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ir(n, r) : void 0;
|
|
8242
8271
|
}
|
|
8243
8272
|
}
|
|
8244
|
-
function
|
|
8273
|
+
function ju() {
|
|
8245
8274
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
8246
8275
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
8247
8276
|
}
|
|
8248
|
-
function
|
|
8249
|
-
return
|
|
8277
|
+
function Zr(n) {
|
|
8278
|
+
return Bu(n) || Wu(n) || Hu(n) || ju();
|
|
8250
8279
|
}
|
|
8251
|
-
function
|
|
8280
|
+
function Qr(n, r) {
|
|
8252
8281
|
if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
|
|
8253
8282
|
}
|
|
8254
|
-
function
|
|
8283
|
+
function Vu(n, r) {
|
|
8255
8284
|
if (typeof n != "object" || !n) return n;
|
|
8256
8285
|
var t = n[Symbol.toPrimitive];
|
|
8257
8286
|
if (t !== void 0) {
|
|
@@ -8262,17 +8291,17 @@ function Hu(n, r) {
|
|
|
8262
8291
|
return (r === "string" ? String : Number)(n);
|
|
8263
8292
|
}
|
|
8264
8293
|
function ea(n) {
|
|
8265
|
-
var r =
|
|
8294
|
+
var r = Vu(n, "string");
|
|
8266
8295
|
return typeof r == "symbol" ? r : r + "";
|
|
8267
8296
|
}
|
|
8268
|
-
function
|
|
8297
|
+
function qu(n, r) {
|
|
8269
8298
|
for (var t = 0; t < r.length; t++) {
|
|
8270
8299
|
var e = r[t];
|
|
8271
8300
|
e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, ea(e.key), e);
|
|
8272
8301
|
}
|
|
8273
8302
|
}
|
|
8274
|
-
function
|
|
8275
|
-
return r &&
|
|
8303
|
+
function Jr(n, r, t) {
|
|
8304
|
+
return r && qu(n.prototype, r), Object.defineProperty(n, "prototype", {
|
|
8276
8305
|
writable: !1
|
|
8277
8306
|
}), n;
|
|
8278
8307
|
}
|
|
@@ -8295,37 +8324,37 @@ function Ce(n) {
|
|
|
8295
8324
|
if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8296
8325
|
return n;
|
|
8297
8326
|
}
|
|
8298
|
-
function
|
|
8327
|
+
function Ku(n, r) {
|
|
8299
8328
|
if (r && (typeof r == "object" || typeof r == "function")) return r;
|
|
8300
8329
|
if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
8301
8330
|
return Ce(n);
|
|
8302
8331
|
}
|
|
8303
8332
|
function ra(n, r, t) {
|
|
8304
|
-
return r = at(r),
|
|
8333
|
+
return r = at(r), Ku(n, ta() ? Reflect.construct(r, t || [], at(n).constructor) : r.apply(n, t));
|
|
8305
8334
|
}
|
|
8306
|
-
function
|
|
8335
|
+
function Xu(n, r) {
|
|
8307
8336
|
for (; !{}.hasOwnProperty.call(n, r) && (n = at(n)) !== null; ) ;
|
|
8308
8337
|
return n;
|
|
8309
8338
|
}
|
|
8310
|
-
function
|
|
8311
|
-
return
|
|
8312
|
-
var e =
|
|
8339
|
+
function Pr() {
|
|
8340
|
+
return Pr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
|
|
8341
|
+
var e = Xu(n, r);
|
|
8313
8342
|
if (e) {
|
|
8314
8343
|
var i = Object.getOwnPropertyDescriptor(e, r);
|
|
8315
8344
|
return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
|
|
8316
8345
|
}
|
|
8317
|
-
},
|
|
8346
|
+
}, Pr.apply(null, arguments);
|
|
8318
8347
|
}
|
|
8319
8348
|
function Hn(n, r, t, e) {
|
|
8320
|
-
var i =
|
|
8349
|
+
var i = Pr(at(n.prototype), r, t);
|
|
8321
8350
|
return typeof i == "function" ? function(a) {
|
|
8322
8351
|
return i.apply(t, a);
|
|
8323
8352
|
} : i;
|
|
8324
8353
|
}
|
|
8325
|
-
function
|
|
8326
|
-
return
|
|
8354
|
+
function Fr(n, r) {
|
|
8355
|
+
return Fr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
8327
8356
|
return t.__proto__ = e, t;
|
|
8328
|
-
},
|
|
8357
|
+
}, Fr(n, r);
|
|
8329
8358
|
}
|
|
8330
8359
|
function na(n, r) {
|
|
8331
8360
|
if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -8337,7 +8366,7 @@ function na(n, r) {
|
|
|
8337
8366
|
}
|
|
8338
8367
|
}), Object.defineProperty(n, "prototype", {
|
|
8339
8368
|
writable: !1
|
|
8340
|
-
}), r &&
|
|
8369
|
+
}), r && Fr(n, r);
|
|
8341
8370
|
}
|
|
8342
8371
|
function fe(n, r, t) {
|
|
8343
8372
|
return (r = ea(r)) in n ? Object.defineProperty(n, r, {
|
|
@@ -8347,7 +8376,7 @@ function fe(n, r, t) {
|
|
|
8347
8376
|
writable: !0
|
|
8348
8377
|
}) : n[r] = t, n;
|
|
8349
8378
|
}
|
|
8350
|
-
function
|
|
8379
|
+
function Yu(n, r) {
|
|
8351
8380
|
if (n == null) return {};
|
|
8352
8381
|
var t = {};
|
|
8353
8382
|
for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
|
|
@@ -8356,9 +8385,9 @@ function Ku(n, r) {
|
|
|
8356
8385
|
}
|
|
8357
8386
|
return t;
|
|
8358
8387
|
}
|
|
8359
|
-
function
|
|
8388
|
+
function Zu(n, r) {
|
|
8360
8389
|
if (n == null) return {};
|
|
8361
|
-
var t, e, i =
|
|
8390
|
+
var t, e, i = Yu(n, r);
|
|
8362
8391
|
if (Object.getOwnPropertySymbols) {
|
|
8363
8392
|
var a = Object.getOwnPropertySymbols(n);
|
|
8364
8393
|
for (e = 0; e < a.length; e++) t = a[e], r.includes(t) || {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
|
|
@@ -8386,7 +8415,7 @@ function me(n) {
|
|
|
8386
8415
|
}
|
|
8387
8416
|
return n;
|
|
8388
8417
|
}
|
|
8389
|
-
function
|
|
8418
|
+
function Qu(n) {
|
|
8390
8419
|
var r = n.texturesCount, t = (
|
|
8391
8420
|
/*glsl*/
|
|
8392
8421
|
`
|
|
@@ -8441,7 +8470,7 @@ void main(void) {
|
|
|
8441
8470
|
bool noTextureFound = false;
|
|
8442
8471
|
vec4 texel;
|
|
8443
8472
|
|
|
8444
|
-
`).concat(
|
|
8473
|
+
`).concat(Zr(new Array(r)).map(function(e, i) {
|
|
8445
8474
|
return "if (index == ".concat(i, ") texel = texture2D(u_atlas[").concat(i, "], (v_texture.xy + coordinateInTexture * v_texture.zw), -1.0);");
|
|
8446
8475
|
}).join(`
|
|
8447
8476
|
else `) + `else {
|
|
@@ -8493,7 +8522,7 @@ void main(void) {
|
|
|
8493
8522
|
);
|
|
8494
8523
|
return t;
|
|
8495
8524
|
}
|
|
8496
|
-
var
|
|
8525
|
+
var Ju = (
|
|
8497
8526
|
/*glsl*/
|
|
8498
8527
|
`
|
|
8499
8528
|
attribute vec4 a_id;
|
|
@@ -8545,7 +8574,7 @@ void main() {
|
|
|
8545
8574
|
v_color.a *= bias;
|
|
8546
8575
|
}
|
|
8547
8576
|
`
|
|
8548
|
-
),
|
|
8577
|
+
), el = Ju;
|
|
8549
8578
|
function Xe() {
|
|
8550
8579
|
Xe = function() {
|
|
8551
8580
|
return r;
|
|
@@ -8838,7 +8867,7 @@ function Vn(n, r, t, e, i, a, o) {
|
|
|
8838
8867
|
}
|
|
8839
8868
|
s.done ? r(u) : Promise.resolve(u).then(e, i);
|
|
8840
8869
|
}
|
|
8841
|
-
function
|
|
8870
|
+
function en(n) {
|
|
8842
8871
|
return function() {
|
|
8843
8872
|
var r = this, t = arguments;
|
|
8844
8873
|
return new Promise(function(e, i) {
|
|
@@ -8853,7 +8882,7 @@ function Jr(n) {
|
|
|
8853
8882
|
});
|
|
8854
8883
|
};
|
|
8855
8884
|
}
|
|
8856
|
-
var
|
|
8885
|
+
var tn = {
|
|
8857
8886
|
size: {
|
|
8858
8887
|
mode: "max",
|
|
8859
8888
|
value: 512
|
|
@@ -8863,8 +8892,8 @@ var en = {
|
|
|
8863
8892
|
maxTextureSize: 4096,
|
|
8864
8893
|
debounceTimeout: 500,
|
|
8865
8894
|
crossOrigin: "anonymous"
|
|
8866
|
-
},
|
|
8867
|
-
function
|
|
8895
|
+
}, tl = 1;
|
|
8896
|
+
function Or(n) {
|
|
8868
8897
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = r.crossOrigin;
|
|
8869
8898
|
return new Promise(function(e, i) {
|
|
8870
8899
|
var a = new Image();
|
|
@@ -8879,11 +8908,11 @@ function Fr(n) {
|
|
|
8879
8908
|
}), t && a.setAttribute("crossOrigin", t), a.src = n;
|
|
8880
8909
|
});
|
|
8881
8910
|
}
|
|
8882
|
-
function
|
|
8883
|
-
return
|
|
8911
|
+
function rl(n) {
|
|
8912
|
+
return zr.apply(this, arguments);
|
|
8884
8913
|
}
|
|
8885
|
-
function
|
|
8886
|
-
return
|
|
8914
|
+
function zr() {
|
|
8915
|
+
return zr = en(/* @__PURE__ */ Xe().mark(function n(r) {
|
|
8887
8916
|
var t, e, i, a, o, s, u, l, c, h, v, y, b, R = arguments;
|
|
8888
8917
|
return Xe().wrap(function(k) {
|
|
8889
8918
|
for (; ; ) switch (k.prev = k.next) {
|
|
@@ -8913,7 +8942,7 @@ function Or() {
|
|
|
8913
8942
|
case 19:
|
|
8914
8943
|
return typeof e == "number" && (u.setAttribute("width", "" + e), u.setAttribute("height", "" + e)), h = new XMLSerializer().serializeToString(s), v = new Blob([h], {
|
|
8915
8944
|
type: "image/svg+xml"
|
|
8916
|
-
}), y = URL.createObjectURL(v), b =
|
|
8945
|
+
}), y = URL.createObjectURL(v), b = Or(y), b.finally(function() {
|
|
8917
8946
|
return URL.revokeObjectURL(y);
|
|
8918
8947
|
}), k.abrupt("return", b);
|
|
8919
8948
|
case 26:
|
|
@@ -8921,13 +8950,13 @@ function Or() {
|
|
|
8921
8950
|
return k.stop();
|
|
8922
8951
|
}
|
|
8923
8952
|
}, n);
|
|
8924
|
-
})),
|
|
8953
|
+
})), zr.apply(this, arguments);
|
|
8925
8954
|
}
|
|
8926
|
-
function
|
|
8927
|
-
return
|
|
8955
|
+
function nl(n) {
|
|
8956
|
+
return Nr.apply(this, arguments);
|
|
8928
8957
|
}
|
|
8929
|
-
function
|
|
8930
|
-
return
|
|
8958
|
+
function Nr() {
|
|
8959
|
+
return Nr = en(/* @__PURE__ */ Xe().mark(function n(r) {
|
|
8931
8960
|
var t, e, i, a, o, s, u = arguments;
|
|
8932
8961
|
return Xe().wrap(function(c) {
|
|
8933
8962
|
for (; ; ) switch (c.prev = c.next) {
|
|
@@ -8936,7 +8965,7 @@ function zr() {
|
|
|
8936
8965
|
c.next = 16;
|
|
8937
8966
|
break;
|
|
8938
8967
|
}
|
|
8939
|
-
return c.prev = 3, c.next = 6,
|
|
8968
|
+
return c.prev = 3, c.next = 6, rl(r, {
|
|
8940
8969
|
size: i,
|
|
8941
8970
|
crossOrigin: a
|
|
8942
8971
|
});
|
|
@@ -8944,7 +8973,7 @@ function zr() {
|
|
|
8944
8973
|
s = c.sent, c.next = 14;
|
|
8945
8974
|
break;
|
|
8946
8975
|
case 9:
|
|
8947
|
-
return c.prev = 9, c.t0 = c.catch(3), c.next = 13,
|
|
8976
|
+
return c.prev = 9, c.t0 = c.catch(3), c.next = 13, Or(r, {
|
|
8948
8977
|
crossOrigin: a
|
|
8949
8978
|
});
|
|
8950
8979
|
case 13:
|
|
@@ -8953,7 +8982,7 @@ function zr() {
|
|
|
8953
8982
|
c.next = 19;
|
|
8954
8983
|
break;
|
|
8955
8984
|
case 16:
|
|
8956
|
-
return c.next = 18,
|
|
8985
|
+
return c.next = 18, Or(r, {
|
|
8957
8986
|
crossOrigin: a
|
|
8958
8987
|
});
|
|
8959
8988
|
case 18:
|
|
@@ -8965,9 +8994,9 @@ function zr() {
|
|
|
8965
8994
|
return c.stop();
|
|
8966
8995
|
}
|
|
8967
8996
|
}, n, null, [[3, 9]]);
|
|
8968
|
-
})),
|
|
8997
|
+
})), Nr.apply(this, arguments);
|
|
8969
8998
|
}
|
|
8970
|
-
function
|
|
8999
|
+
function il(n, r, t) {
|
|
8971
9000
|
var e = t.objectFit, i = t.size, a = t.correctCentering, o = e === "contain" ? Math.max(n.width, n.height) : Math.min(n.width, n.height), s = i.mode === "auto" ? o : i.mode === "force" ? i.value : Math.min(i.value, o), u = (n.width - o) / 2, l = (n.height - o) / 2;
|
|
8972
9001
|
if (a) {
|
|
8973
9002
|
var c = r.getCorrectionOffset(n, o);
|
|
@@ -8980,9 +9009,9 @@ function rl(n, r, t) {
|
|
|
8980
9009
|
destinationSize: s
|
|
8981
9010
|
};
|
|
8982
9011
|
}
|
|
8983
|
-
function
|
|
9012
|
+
function al(n, r, t) {
|
|
8984
9013
|
for (var e = r.canvas, i = e.width, a = e.height, o = [], s = t.x, u = t.y, l = t.rowHeight, c = t.maxRowWidth, h = {}, v = 0, y = n.length; v < y; v++) {
|
|
8985
|
-
var b = n[v], R = b.key, w = b.image, k = b.sourceSize, E = b.sourceX, m = b.sourceY, p = b.destinationSize, C = p +
|
|
9014
|
+
var b = n[v], R = b.key, w = b.image, k = b.sourceSize, E = b.sourceX, m = b.sourceY, p = b.destinationSize, C = p + tl;
|
|
8986
9015
|
u + C > a || s + C > i && u + C + l > a || (s + C > i && (c = Math.max(c, s), s = 0, u += l, l = C), o.push({
|
|
8987
9016
|
key: R,
|
|
8988
9017
|
image: w,
|
|
@@ -9014,10 +9043,10 @@ function nl(n, r, t) {
|
|
|
9014
9043
|
}
|
|
9015
9044
|
};
|
|
9016
9045
|
}
|
|
9017
|
-
function
|
|
9046
|
+
function ol(n, r, t) {
|
|
9018
9047
|
var e = n.atlas, i = n.textures, a = n.cursor, o = {
|
|
9019
9048
|
atlas: me({}, e),
|
|
9020
|
-
textures:
|
|
9049
|
+
textures: Zr(i.slice(0, -1)),
|
|
9021
9050
|
cursor: me({}, a)
|
|
9022
9051
|
}, s = [];
|
|
9023
9052
|
for (var u in r) {
|
|
@@ -9030,7 +9059,7 @@ function il(n, r, t) {
|
|
|
9030
9059
|
}
|
|
9031
9060
|
}
|
|
9032
9061
|
for (var v = function() {
|
|
9033
|
-
var b =
|
|
9062
|
+
var b = al(s, t, o.cursor), R = b.atlas, w = b.texture, k = b.cursor;
|
|
9034
9063
|
o.cursor = k;
|
|
9035
9064
|
var E = [];
|
|
9036
9065
|
s.forEach(function(m) {
|
|
@@ -9047,13 +9076,13 @@ function il(n, r, t) {
|
|
|
9047
9076
|
v();
|
|
9048
9077
|
return o;
|
|
9049
9078
|
}
|
|
9050
|
-
var
|
|
9079
|
+
var sl = /* @__PURE__ */ (function() {
|
|
9051
9080
|
function n() {
|
|
9052
|
-
|
|
9081
|
+
Qr(this, n), this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d", {
|
|
9053
9082
|
willReadFrequently: !0
|
|
9054
9083
|
});
|
|
9055
9084
|
}
|
|
9056
|
-
return
|
|
9085
|
+
return Jr(n, [{
|
|
9057
9086
|
key: "getCorrectionOffset",
|
|
9058
9087
|
value: function(t, e) {
|
|
9059
9088
|
this.canvas.width = e, this.canvas.height = e, this.context.clearRect(0, 0, e, e), this.context.drawImage(t, 0, 0, e, e);
|
|
@@ -9075,16 +9104,16 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9075
9104
|
na(r, n);
|
|
9076
9105
|
function r() {
|
|
9077
9106
|
var t, e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9078
|
-
return
|
|
9107
|
+
return Qr(this, r), t = ra(this, r), fe(Ce(t), "canvas", document.createElement("canvas")), fe(Ce(t), "ctx", t.canvas.getContext("2d", {
|
|
9079
9108
|
willReadFrequently: !0
|
|
9080
|
-
})), fe(Ce(t), "corrector", new
|
|
9109
|
+
})), fe(Ce(t), "corrector", new sl()), fe(Ce(t), "imageStates", {}), fe(Ce(t), "textures", [t.ctx.getImageData(0, 0, 1, 1)]), fe(Ce(t), "lastTextureCursor", {
|
|
9081
9110
|
x: 0,
|
|
9082
9111
|
y: 0,
|
|
9083
9112
|
rowHeight: 0,
|
|
9084
9113
|
maxRowWidth: 0
|
|
9085
|
-
}), fe(Ce(t), "atlas", {}), t.options = me(me({},
|
|
9114
|
+
}), fe(Ce(t), "atlas", {}), t.options = me(me({}, tn), e), t.canvas.width = t.options.maxTextureSize, t.canvas.height = t.options.maxTextureSize, t;
|
|
9086
9115
|
}
|
|
9087
|
-
return
|
|
9116
|
+
return Jr(r, [{
|
|
9088
9117
|
key: "scheduleGenerateTexture",
|
|
9089
9118
|
value: function() {
|
|
9090
9119
|
var e = this;
|
|
@@ -9095,7 +9124,7 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9095
9124
|
}, {
|
|
9096
9125
|
key: "generateTextures",
|
|
9097
9126
|
value: function() {
|
|
9098
|
-
var e =
|
|
9127
|
+
var e = ol({
|
|
9099
9128
|
atlas: this.atlas,
|
|
9100
9129
|
textures: this.textures,
|
|
9101
9130
|
cursor: this.lastTextureCursor
|
|
@@ -9109,7 +9138,7 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9109
9138
|
}, {
|
|
9110
9139
|
key: "registerImage",
|
|
9111
9140
|
value: (function() {
|
|
9112
|
-
var t =
|
|
9141
|
+
var t = en(/* @__PURE__ */ Xe().mark(function i(a) {
|
|
9113
9142
|
var o, s;
|
|
9114
9143
|
return Xe().wrap(function(l) {
|
|
9115
9144
|
for (; ; ) switch (l.prev = l.next) {
|
|
@@ -9122,7 +9151,7 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9122
9151
|
case 2:
|
|
9123
9152
|
return this.imageStates[a] = {
|
|
9124
9153
|
status: "loading"
|
|
9125
|
-
}, l.prev = 3, o = this.options.size, l.next = 7,
|
|
9154
|
+
}, l.prev = 3, o = this.options.size, l.next = 7, nl(a, {
|
|
9126
9155
|
size: o.mode === "force" ? o.value : void 0,
|
|
9127
9156
|
crossOrigin: this.options.crossOrigin || void 0
|
|
9128
9157
|
});
|
|
@@ -9130,7 +9159,7 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9130
9159
|
s = l.sent, this.imageStates[a] = me({
|
|
9131
9160
|
status: "ready",
|
|
9132
9161
|
image: s
|
|
9133
|
-
},
|
|
9162
|
+
}, il(s, this.corrector, this.options)), this.scheduleGenerateTexture(), l.next = 15;
|
|
9134
9163
|
break;
|
|
9135
9164
|
case 12:
|
|
9136
9165
|
l.prev = 12, l.t0 = l.catch(3), this.imageStates[a] = {
|
|
@@ -9158,9 +9187,9 @@ var al = /* @__PURE__ */ (function() {
|
|
|
9158
9187
|
return this.textures;
|
|
9159
9188
|
}
|
|
9160
9189
|
}]), r;
|
|
9161
|
-
})(
|
|
9190
|
+
})(Hr.EventEmitter);
|
|
9162
9191
|
fe($t, "NEW_TEXTURE_EVENT", "newTexture");
|
|
9163
|
-
var
|
|
9192
|
+
var ul = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding", "colorAttribute", "imageAttribute"], ia = WebGLRenderingContext, qn = ia.UNSIGNED_BYTE, mt = ia.FLOAT, ll = me(me({}, tn), {}, {
|
|
9164
9193
|
drawingMode: "background",
|
|
9165
9194
|
keepWithinCircle: !0,
|
|
9166
9195
|
drawLabel: void 0,
|
|
@@ -9168,35 +9197,35 @@ var ol = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding"
|
|
|
9168
9197
|
padding: 0,
|
|
9169
9198
|
colorAttribute: "color",
|
|
9170
9199
|
imageAttribute: "image"
|
|
9171
|
-
}),
|
|
9172
|
-
function
|
|
9173
|
-
var r, t = document.createElement("canvas").getContext("webgl"), e = Math.min(t.getParameter(t.MAX_TEXTURE_SIZE),
|
|
9200
|
+
}), cl = ["u_sizeRatio", "u_correctionRatio", "u_cameraAngle", "u_percentagePadding", "u_matrix", "u_colorizeImages", "u_keepWithinCircle", "u_atlas"];
|
|
9201
|
+
function rn(n) {
|
|
9202
|
+
var r, t = document.createElement("canvas").getContext("webgl"), e = Math.min(t.getParameter(t.MAX_TEXTURE_SIZE), tn.maxTextureSize);
|
|
9174
9203
|
t.canvas.remove();
|
|
9175
|
-
var i = me(me(me({},
|
|
9204
|
+
var i = me(me(me({}, ll), {
|
|
9176
9205
|
maxTextureSize: e
|
|
9177
|
-
}), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v =
|
|
9206
|
+
}), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v = Zu(i, ul), y = new $t(v);
|
|
9178
9207
|
return r = /* @__PURE__ */ (function(b) {
|
|
9179
9208
|
na(R, b);
|
|
9180
9209
|
function R(w, k, E) {
|
|
9181
9210
|
var m;
|
|
9182
|
-
return
|
|
9211
|
+
return Qr(this, R), m = ra(this, R, [w, k, E]), fe(Ce(m), "drawLabel", o), fe(Ce(m), "drawHover", a), fe(Ce(m), "textureManagerCallback", null), m.textureManagerCallback = function(p) {
|
|
9183
9212
|
var C = p.atlas, L = p.textures, g = L.length !== m.textures.length;
|
|
9184
9213
|
m.atlas = C, m.textureImages = L, g && m.upgradeShaders(), m.bindTextures(), m.latestRenderParams && m.render(m.latestRenderParams), m.renderer && m.renderer.refresh && m.renderer.refresh();
|
|
9185
9214
|
}, y.on($t.NEW_TEXTURE_EVENT, m.textureManagerCallback), m.atlas = y.getAtlas(), m.textureImages = y.getTextures(), m.textures = m.textureImages.map(function() {
|
|
9186
9215
|
return w.createTexture();
|
|
9187
9216
|
}), m.bindTextures(), m;
|
|
9188
9217
|
}
|
|
9189
|
-
return
|
|
9218
|
+
return Jr(R, [{
|
|
9190
9219
|
key: "getDefinition",
|
|
9191
9220
|
value: function() {
|
|
9192
9221
|
return {
|
|
9193
9222
|
VERTICES: 3,
|
|
9194
|
-
VERTEX_SHADER_SOURCE:
|
|
9195
|
-
FRAGMENT_SHADER_SOURCE:
|
|
9223
|
+
VERTEX_SHADER_SOURCE: el,
|
|
9224
|
+
FRAGMENT_SHADER_SOURCE: Qu({
|
|
9196
9225
|
texturesCount: y.getTextures().length
|
|
9197
9226
|
}),
|
|
9198
9227
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
9199
|
-
UNIFORMS:
|
|
9228
|
+
UNIFORMS: cl,
|
|
9200
9229
|
ATTRIBUTES: [{
|
|
9201
9230
|
name: "a_position",
|
|
9202
9231
|
size: 2,
|
|
@@ -9280,15 +9309,15 @@ function tn(n) {
|
|
|
9280
9309
|
key: "setUniforms",
|
|
9281
9310
|
value: function(k, E) {
|
|
9282
9311
|
var m = E.gl, p = E.uniformLocations, C = p.u_sizeRatio, L = p.u_correctionRatio, g = p.u_matrix, x = p.u_atlas, S = p.u_colorizeImages, D = p.u_keepWithinCircle, O = p.u_cameraAngle, P = p.u_percentagePadding;
|
|
9283
|
-
this.latestRenderParams = k, m.uniform1f(L, k.correctionRatio), m.uniform1f(C, u ? k.sizeRatio : k.sizeRatio / Math.SQRT2), m.uniform1f(O, k.cameraAngle), m.uniform1f(P, l), m.uniformMatrix3fv(g, !1, k.matrix), m.uniform1iv(x,
|
|
9312
|
+
this.latestRenderParams = k, m.uniform1f(L, k.correctionRatio), m.uniform1f(C, u ? k.sizeRatio : k.sizeRatio / Math.SQRT2), m.uniform1f(O, k.cameraAngle), m.uniform1f(P, l), m.uniformMatrix3fv(g, !1, k.matrix), m.uniform1iv(x, Zr(new Array(this.textureImages.length)).map(function(_, W) {
|
|
9284
9313
|
return W;
|
|
9285
9314
|
})), m.uniform1i(S, s === "color" ? 1 : 0), m.uniform1i(D, u ? 1 : 0);
|
|
9286
9315
|
}
|
|
9287
9316
|
}]), R;
|
|
9288
9317
|
})(Mi), fe(r, "ANGLE_1", 0), fe(r, "ANGLE_2", 2 * Math.PI / 3), fe(r, "ANGLE_3", 4 * Math.PI / 3), fe(r, "textureManager", y), r;
|
|
9289
9318
|
}
|
|
9290
|
-
|
|
9291
|
-
|
|
9319
|
+
rn();
|
|
9320
|
+
rn({
|
|
9292
9321
|
keepWithinCircle: !1,
|
|
9293
9322
|
size: {
|
|
9294
9323
|
mode: "force",
|
|
@@ -9297,7 +9326,7 @@ tn({
|
|
|
9297
9326
|
drawingMode: "color",
|
|
9298
9327
|
correctCentering: !0
|
|
9299
9328
|
});
|
|
9300
|
-
function
|
|
9329
|
+
function hl(n, r) {
|
|
9301
9330
|
if (typeof n != "object" || !n) return n;
|
|
9302
9331
|
var t = n[Symbol.toPrimitive];
|
|
9303
9332
|
if (t !== void 0) {
|
|
@@ -9308,7 +9337,7 @@ function ll(n, r) {
|
|
|
9308
9337
|
return (r === "string" ? String : Number)(n);
|
|
9309
9338
|
}
|
|
9310
9339
|
function aa(n) {
|
|
9311
|
-
var r =
|
|
9340
|
+
var r = hl(n, "string");
|
|
9312
9341
|
return typeof r == "symbol" ? r : r + "";
|
|
9313
9342
|
}
|
|
9314
9343
|
function oa(n, r, t) {
|
|
@@ -9340,17 +9369,17 @@ function ot(n) {
|
|
|
9340
9369
|
}
|
|
9341
9370
|
return n;
|
|
9342
9371
|
}
|
|
9343
|
-
function
|
|
9372
|
+
function dl(n, r) {
|
|
9344
9373
|
if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
|
|
9345
9374
|
}
|
|
9346
|
-
function
|
|
9375
|
+
function fl(n, r) {
|
|
9347
9376
|
for (var t = 0; t < r.length; t++) {
|
|
9348
9377
|
var e = r[t];
|
|
9349
9378
|
e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, aa(e.key), e);
|
|
9350
9379
|
}
|
|
9351
9380
|
}
|
|
9352
|
-
function
|
|
9353
|
-
return r &&
|
|
9381
|
+
function gl(n, r, t) {
|
|
9382
|
+
return r && fl(n.prototype, r), Object.defineProperty(n, "prototype", {
|
|
9354
9383
|
writable: !1
|
|
9355
9384
|
}), n;
|
|
9356
9385
|
}
|
|
@@ -9373,20 +9402,20 @@ function ua(n) {
|
|
|
9373
9402
|
if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
9374
9403
|
return n;
|
|
9375
9404
|
}
|
|
9376
|
-
function
|
|
9405
|
+
function pl(n, r) {
|
|
9377
9406
|
if (r && (typeof r == "object" || typeof r == "function")) return r;
|
|
9378
9407
|
if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
9379
9408
|
return ua(n);
|
|
9380
9409
|
}
|
|
9381
|
-
function
|
|
9382
|
-
return r = Wt(r),
|
|
9410
|
+
function vl(n, r, t) {
|
|
9411
|
+
return r = Wt(r), pl(n, sa() ? Reflect.construct(r, t || [], Wt(n).constructor) : r.apply(n, t));
|
|
9383
9412
|
}
|
|
9384
|
-
function
|
|
9385
|
-
return
|
|
9413
|
+
function Ur(n, r) {
|
|
9414
|
+
return Ur = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
9386
9415
|
return t.__proto__ = e, t;
|
|
9387
|
-
},
|
|
9416
|
+
}, Ur(n, r);
|
|
9388
9417
|
}
|
|
9389
|
-
function
|
|
9418
|
+
function ml(n, r) {
|
|
9390
9419
|
if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
|
|
9391
9420
|
n.prototype = Object.create(r && r.prototype, {
|
|
9392
9421
|
constructor: {
|
|
@@ -9396,32 +9425,32 @@ function pl(n, r) {
|
|
|
9396
9425
|
}
|
|
9397
9426
|
}), Object.defineProperty(n, "prototype", {
|
|
9398
9427
|
writable: !1
|
|
9399
|
-
}), r &&
|
|
9428
|
+
}), r && Ur(n, r);
|
|
9400
9429
|
}
|
|
9401
|
-
function
|
|
9430
|
+
function $r(n, r) {
|
|
9402
9431
|
(r == null || r > n.length) && (r = n.length);
|
|
9403
9432
|
for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
|
|
9404
9433
|
return e;
|
|
9405
9434
|
}
|
|
9406
|
-
function
|
|
9407
|
-
if (Array.isArray(n)) return
|
|
9435
|
+
function yl(n) {
|
|
9436
|
+
if (Array.isArray(n)) return $r(n);
|
|
9408
9437
|
}
|
|
9409
|
-
function
|
|
9438
|
+
function bl(n) {
|
|
9410
9439
|
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
9411
9440
|
}
|
|
9412
|
-
function
|
|
9441
|
+
function wl(n, r) {
|
|
9413
9442
|
if (n) {
|
|
9414
|
-
if (typeof n == "string") return
|
|
9443
|
+
if (typeof n == "string") return $r(n, r);
|
|
9415
9444
|
var t = {}.toString.call(n).slice(8, -1);
|
|
9416
|
-
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
9445
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? $r(n, r) : void 0;
|
|
9417
9446
|
}
|
|
9418
9447
|
}
|
|
9419
|
-
function
|
|
9448
|
+
function El() {
|
|
9420
9449
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
9421
9450
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
9422
9451
|
}
|
|
9423
|
-
function
|
|
9424
|
-
return
|
|
9452
|
+
function lr(n) {
|
|
9453
|
+
return yl(n) || bl(n) || wl(n) || El();
|
|
9425
9454
|
}
|
|
9426
9455
|
function la(n, r, t, e) {
|
|
9427
9456
|
var i = Math.pow(1 - n, 2) * r.x + 2 * (1 - n) * n * t.x + Math.pow(n, 2) * e.x, a = Math.pow(1 - n, 2) * r.y + 2 * (1 - n) * n * t.y + Math.pow(n, 2) * e.y;
|
|
@@ -9430,14 +9459,14 @@ function la(n, r, t, e) {
|
|
|
9430
9459
|
y: a
|
|
9431
9460
|
};
|
|
9432
9461
|
}
|
|
9433
|
-
function
|
|
9462
|
+
function _l(n, r, t) {
|
|
9434
9463
|
for (var e = 20, i = 0, a = n, o = 0; o < e; o++) {
|
|
9435
9464
|
var s = la((o + 1) / e, n, r, t);
|
|
9436
9465
|
i += Math.sqrt(Math.pow(a.x - s.x, 2) + Math.pow(a.y - s.y, 2)), a = s;
|
|
9437
9466
|
}
|
|
9438
9467
|
return i;
|
|
9439
9468
|
}
|
|
9440
|
-
function
|
|
9469
|
+
function Tl(n) {
|
|
9441
9470
|
var r = n.curvatureAttribute, t = n.defaultCurvature, e = n.keepLabelUpright, i = e === void 0 ? !0 : e;
|
|
9442
9471
|
return function(a, o, s, u, l) {
|
|
9443
9472
|
var c = l.edgeLabelSize, h = o[r] || t, v = l.edgeLabelFont, y = l.edgeLabelWeight, b = l.edgeLabelColor.attribute ? o[l.edgeLabelColor.attribute] || l.edgeLabelColor.color || "#000" : l.edgeLabelColor.color, R = o.label;
|
|
@@ -9460,7 +9489,7 @@ function El(n) {
|
|
|
9460
9489
|
}, $ = {
|
|
9461
9490
|
x: m,
|
|
9462
9491
|
y: p
|
|
9463
|
-
}, I =
|
|
9492
|
+
}, I = _l(U, d, $);
|
|
9464
9493
|
if (!(I < s.size + u.size)) {
|
|
9465
9494
|
var A = a.measureText(R).width, z = I - s.size - u.size;
|
|
9466
9495
|
if (A > z) {
|
|
@@ -9481,7 +9510,7 @@ function El(n) {
|
|
|
9481
9510
|
}
|
|
9482
9511
|
};
|
|
9483
9512
|
}
|
|
9484
|
-
function
|
|
9513
|
+
function Sl(n) {
|
|
9485
9514
|
var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
|
|
9486
9515
|
/*glsl*/
|
|
9487
9516
|
`
|
|
@@ -9563,7 +9592,7 @@ void main(void) {
|
|
|
9563
9592
|
);
|
|
9564
9593
|
return i;
|
|
9565
9594
|
}
|
|
9566
|
-
function
|
|
9595
|
+
function Rl(n) {
|
|
9567
9596
|
var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
|
|
9568
9597
|
/*glsl*/
|
|
9569
9598
|
`
|
|
@@ -9680,17 +9709,17 @@ void main() {
|
|
|
9680
9709
|
);
|
|
9681
9710
|
return i;
|
|
9682
9711
|
}
|
|
9683
|
-
var
|
|
9712
|
+
var nn = 0.25, Al = {
|
|
9684
9713
|
arrowHead: null,
|
|
9685
9714
|
curvatureAttribute: "curvature",
|
|
9686
|
-
defaultCurvature:
|
|
9687
|
-
},
|
|
9715
|
+
defaultCurvature: nn
|
|
9716
|
+
}, kl = {
|
|
9688
9717
|
edgeIndexAttribute: "parallelIndex",
|
|
9689
9718
|
edgeMinIndexAttribute: "parallelMinIndex",
|
|
9690
9719
|
edgeMaxIndexAttribute: "parallelMaxIndex"
|
|
9691
9720
|
};
|
|
9692
|
-
function
|
|
9693
|
-
var t = ot(ot({},
|
|
9721
|
+
function Cl(n, r) {
|
|
9722
|
+
var t = ot(ot({}, kl), {}), e = {}, i = {}, a = {}, o = 0;
|
|
9694
9723
|
n.forEachNode(function(L) {
|
|
9695
9724
|
e[L] = ++o + "";
|
|
9696
9725
|
}), n.forEachEdge(function(L, g, x, S) {
|
|
@@ -9723,24 +9752,24 @@ function Al(n, r) {
|
|
|
9723
9752
|
}
|
|
9724
9753
|
}
|
|
9725
9754
|
var ca = WebGLRenderingContext, Xn = ca.UNSIGNED_BYTE, Me = ca.FLOAT;
|
|
9726
|
-
function
|
|
9727
|
-
var r = ot(ot({},
|
|
9755
|
+
function an(n) {
|
|
9756
|
+
var r = ot(ot({}, Al), n || {}), t = r, e = t.arrowHead, i = t.curvatureAttribute, a = t.drawLabel, o = e?.extremity === "target" || e?.extremity === "both", s = e?.extremity === "source" || e?.extremity === "both", u = ["u_matrix", "u_sizeRatio", "u_dimensions", "u_pixelRatio", "u_feather", "u_minEdgeThickness"].concat(lr(e ? ["u_lengthToThicknessRatio", "u_widenessToThicknessRatio"] : []));
|
|
9728
9757
|
return /* @__PURE__ */ (function(l) {
|
|
9729
|
-
|
|
9758
|
+
ml(c, l);
|
|
9730
9759
|
function c() {
|
|
9731
9760
|
var h;
|
|
9732
|
-
|
|
9761
|
+
dl(this, c);
|
|
9733
9762
|
for (var v = arguments.length, y = new Array(v), b = 0; b < v; b++)
|
|
9734
9763
|
y[b] = arguments[b];
|
|
9735
|
-
return h =
|
|
9764
|
+
return h = vl(this, c, [].concat(y)), oa(ua(h), "drawLabel", a || Tl(r)), h;
|
|
9736
9765
|
}
|
|
9737
|
-
return
|
|
9766
|
+
return gl(c, [{
|
|
9738
9767
|
key: "getDefinition",
|
|
9739
9768
|
value: function() {
|
|
9740
9769
|
return {
|
|
9741
9770
|
VERTICES: 6,
|
|
9742
|
-
VERTEX_SHADER_SOURCE:
|
|
9743
|
-
FRAGMENT_SHADER_SOURCE:
|
|
9771
|
+
VERTEX_SHADER_SOURCE: Rl(r),
|
|
9772
|
+
FRAGMENT_SHADER_SOURCE: Sl(r),
|
|
9744
9773
|
METHOD: WebGLRenderingContext.TRIANGLES,
|
|
9745
9774
|
UNIFORMS: u,
|
|
9746
9775
|
ATTRIBUTES: [{
|
|
@@ -9751,11 +9780,11 @@ function nn(n) {
|
|
|
9751
9780
|
name: "a_target",
|
|
9752
9781
|
size: 2,
|
|
9753
9782
|
type: Me
|
|
9754
|
-
}].concat(
|
|
9783
|
+
}].concat(lr(o ? [{
|
|
9755
9784
|
name: "a_targetSize",
|
|
9756
9785
|
size: 1,
|
|
9757
9786
|
type: Me
|
|
9758
|
-
}] : []),
|
|
9787
|
+
}] : []), lr(s ? [{
|
|
9759
9788
|
name: "a_sourceSize",
|
|
9760
9789
|
size: 1,
|
|
9761
9790
|
type: Me
|
|
@@ -9798,7 +9827,7 @@ function nn(n) {
|
|
|
9798
9827
|
}, {
|
|
9799
9828
|
key: "processVisibleItem",
|
|
9800
9829
|
value: function(v, y, b, R, w) {
|
|
9801
|
-
var k, E = w.size || 1, m = b.x, p = b.y, C = R.x, L = R.y, g = Ye(w.color), x = (k = w[i]) !== null && k !== void 0 ? k :
|
|
9830
|
+
var k, E = w.size || 1, m = b.x, p = b.y, C = R.x, L = R.y, g = Ye(w.color), x = (k = w[i]) !== null && k !== void 0 ? k : nn, S = this.array;
|
|
9802
9831
|
S[y++] = m, S[y++] = p, S[y++] = C, S[y++] = L, o && (S[y++] = R.size), s && (S[y++] = b.size), S[y++] = E, S[y++] = x, S[y++] = g, S[y++] = v;
|
|
9803
9832
|
}
|
|
9804
9833
|
}, {
|
|
@@ -9813,17 +9842,17 @@ function nn(n) {
|
|
|
9813
9842
|
}]), c;
|
|
9814
9843
|
})(jt);
|
|
9815
9844
|
}
|
|
9816
|
-
var
|
|
9845
|
+
var xl = an(), Dl = an({
|
|
9817
9846
|
arrowHead: Vt
|
|
9818
9847
|
});
|
|
9819
|
-
|
|
9848
|
+
an({
|
|
9820
9849
|
arrowHead: ot(ot({}, Vt), {}, {
|
|
9821
9850
|
extremity: "both"
|
|
9822
9851
|
})
|
|
9823
9852
|
});
|
|
9824
|
-
var et = {},
|
|
9853
|
+
var et = {}, cr, Yn;
|
|
9825
9854
|
function qt() {
|
|
9826
|
-
if (Yn) return
|
|
9855
|
+
if (Yn) return cr;
|
|
9827
9856
|
Yn = 1;
|
|
9828
9857
|
function n(t) {
|
|
9829
9858
|
return !t || typeof t != "object" || typeof t == "function" || Array.isArray(t) || t instanceof Set || t instanceof Map || t instanceof RegExp || t instanceof Date;
|
|
@@ -9841,11 +9870,11 @@ function qt() {
|
|
|
9841
9870
|
}
|
|
9842
9871
|
return i;
|
|
9843
9872
|
}
|
|
9844
|
-
return
|
|
9873
|
+
return cr = r, cr;
|
|
9845
9874
|
}
|
|
9846
|
-
var
|
|
9847
|
-
function
|
|
9848
|
-
if (Zn) return
|
|
9875
|
+
var hr, Zn;
|
|
9876
|
+
function Ll() {
|
|
9877
|
+
if (Zn) return hr;
|
|
9849
9878
|
Zn = 1;
|
|
9850
9879
|
function n(t) {
|
|
9851
9880
|
return function(e, i) {
|
|
@@ -9853,13 +9882,13 @@ function xl() {
|
|
|
9853
9882
|
};
|
|
9854
9883
|
}
|
|
9855
9884
|
var r = n(Math.random);
|
|
9856
|
-
return r.createRandom = n,
|
|
9885
|
+
return r.createRandom = n, hr = r, hr;
|
|
9857
9886
|
}
|
|
9858
|
-
var
|
|
9859
|
-
function
|
|
9860
|
-
if (Qn) return
|
|
9887
|
+
var dr, Qn;
|
|
9888
|
+
function Gl() {
|
|
9889
|
+
if (Qn) return dr;
|
|
9861
9890
|
Qn = 1;
|
|
9862
|
-
var n =
|
|
9891
|
+
var n = Ll().createRandom;
|
|
9863
9892
|
function r(e) {
|
|
9864
9893
|
var i = n(e);
|
|
9865
9894
|
return function(a) {
|
|
@@ -9870,13 +9899,13 @@ function Dl() {
|
|
|
9870
9899
|
};
|
|
9871
9900
|
}
|
|
9872
9901
|
var t = r(Math.random);
|
|
9873
|
-
return t.createShuffleInPlace = r,
|
|
9902
|
+
return t.createShuffleInPlace = r, dr = t, dr;
|
|
9874
9903
|
}
|
|
9875
|
-
var
|
|
9876
|
-
function
|
|
9877
|
-
if (Jn) return
|
|
9904
|
+
var fr, Jn;
|
|
9905
|
+
function Il() {
|
|
9906
|
+
if (Jn) return fr;
|
|
9878
9907
|
Jn = 1;
|
|
9879
|
-
var n = qt(), r = Ze(), t =
|
|
9908
|
+
var n = qt(), r = Ze(), t = Gl(), e = {
|
|
9880
9909
|
attributes: {
|
|
9881
9910
|
x: "x",
|
|
9882
9911
|
y: "y"
|
|
@@ -10066,11 +10095,11 @@ function Ll() {
|
|
|
10066
10095
|
return O;
|
|
10067
10096
|
}
|
|
10068
10097
|
var L = C.bind(null, !1);
|
|
10069
|
-
return L.assign = C.bind(null, !0),
|
|
10098
|
+
return L.assign = C.bind(null, !0), fr = L, fr;
|
|
10070
10099
|
}
|
|
10071
|
-
var
|
|
10072
|
-
function
|
|
10073
|
-
if (ei) return
|
|
10100
|
+
var gr, ei;
|
|
10101
|
+
function Pl() {
|
|
10102
|
+
if (ei) return gr;
|
|
10074
10103
|
ei = 1;
|
|
10075
10104
|
var n = qt(), r = Ze(), t = {
|
|
10076
10105
|
dimensions: ["x", "y"],
|
|
@@ -10107,11 +10136,11 @@ function Gl() {
|
|
|
10107
10136
|
);
|
|
10108
10137
|
}
|
|
10109
10138
|
var i = e.bind(null, !1);
|
|
10110
|
-
return i.assign = e.bind(null, !0),
|
|
10139
|
+
return i.assign = e.bind(null, !0), gr = i, gr;
|
|
10111
10140
|
}
|
|
10112
|
-
var
|
|
10113
|
-
function
|
|
10114
|
-
if (ti) return
|
|
10141
|
+
var pr, ti;
|
|
10142
|
+
function Fl() {
|
|
10143
|
+
if (ti) return pr;
|
|
10115
10144
|
ti = 1;
|
|
10116
10145
|
var n = qt(), r = Ze(), t = {
|
|
10117
10146
|
dimensions: ["x", "y"],
|
|
@@ -10150,11 +10179,11 @@ function Il() {
|
|
|
10150
10179
|
);
|
|
10151
10180
|
}
|
|
10152
10181
|
var i = e.bind(null, !1);
|
|
10153
|
-
return i.assign = e.bind(null, !0),
|
|
10182
|
+
return i.assign = e.bind(null, !0), pr = i, pr;
|
|
10154
10183
|
}
|
|
10155
|
-
var
|
|
10156
|
-
function
|
|
10157
|
-
if (ri) return
|
|
10184
|
+
var vr, ri;
|
|
10185
|
+
function Ol() {
|
|
10186
|
+
if (ri) return vr;
|
|
10158
10187
|
ri = 1;
|
|
10159
10188
|
var n = qt(), r = Ze(), t = Math.PI / 180, e = {
|
|
10160
10189
|
dimensions: ["x", "y"],
|
|
@@ -10202,15 +10231,15 @@ function Pl() {
|
|
|
10202
10231
|
);
|
|
10203
10232
|
}
|
|
10204
10233
|
var a = i.bind(null, !1);
|
|
10205
|
-
return a.assign = i.bind(null, !0),
|
|
10234
|
+
return a.assign = i.bind(null, !0), vr = a, vr;
|
|
10206
10235
|
}
|
|
10207
10236
|
var ni;
|
|
10208
|
-
function
|
|
10209
|
-
return ni || (ni = 1, et.circlepack =
|
|
10237
|
+
function zl() {
|
|
10238
|
+
return ni || (ni = 1, et.circlepack = Il(), et.circular = Pl(), et.random = Fl(), et.rotation = Ol()), et;
|
|
10210
10239
|
}
|
|
10211
|
-
var
|
|
10212
|
-
function
|
|
10213
|
-
return ii || (ii = 1,
|
|
10240
|
+
var mr = zl(), yr, ii;
|
|
10241
|
+
function Nl() {
|
|
10242
|
+
return ii || (ii = 1, yr = function() {
|
|
10214
10243
|
var r, t, e = {};
|
|
10215
10244
|
(function() {
|
|
10216
10245
|
var a = 0, o = 1, s = 2, u = 3, l = 4, c = 5, h = 6, v = 7, y = 8, b = 9, R = 0, w = 1, k = 2, E = 0, m = 1, p = 2, C = 3, L = 4, g = 5, x = 6, S = 7, D = 8, O = 3, P = 10, _ = 3, W = 9, K = 10;
|
|
@@ -10313,7 +10342,7 @@ function Ol() {
|
|
|
10313
10342
|
[r.buffer]
|
|
10314
10343
|
);
|
|
10315
10344
|
});
|
|
10316
|
-
}),
|
|
10345
|
+
}), yr;
|
|
10317
10346
|
}
|
|
10318
10347
|
var yt = {}, ai;
|
|
10319
10348
|
function ha() {
|
|
@@ -10453,9 +10482,9 @@ function da() {
|
|
|
10453
10482
|
return i.revokeObjectURL(o), s;
|
|
10454
10483
|
}, Pe;
|
|
10455
10484
|
}
|
|
10456
|
-
var
|
|
10485
|
+
var br, si;
|
|
10457
10486
|
function fa() {
|
|
10458
|
-
return si || (si = 1,
|
|
10487
|
+
return si || (si = 1, br = {
|
|
10459
10488
|
linLogMode: !1,
|
|
10460
10489
|
outboundAttractionDistribution: !1,
|
|
10461
10490
|
adjustSizes: !1,
|
|
@@ -10466,13 +10495,13 @@ function fa() {
|
|
|
10466
10495
|
slowDown: 1,
|
|
10467
10496
|
barnesHutOptimize: !1,
|
|
10468
10497
|
barnesHutTheta: 0.5
|
|
10469
|
-
}),
|
|
10498
|
+
}), br;
|
|
10470
10499
|
}
|
|
10471
|
-
var
|
|
10472
|
-
function
|
|
10473
|
-
if (ui) return
|
|
10500
|
+
var wr, ui;
|
|
10501
|
+
function Ul() {
|
|
10502
|
+
if (ui) return wr;
|
|
10474
10503
|
ui = 1;
|
|
10475
|
-
var n =
|
|
10504
|
+
var n = Nl(), r = Ze(), t = ha().createEdgeWeightGetter, e = da(), i = fa();
|
|
10476
10505
|
function a(o, s) {
|
|
10477
10506
|
if (s = s || {}, !r(o))
|
|
10478
10507
|
throw new Error(
|
|
@@ -10519,16 +10548,16 @@ function zl() {
|
|
|
10519
10548
|
}, a.prototype.kill = function() {
|
|
10520
10549
|
if (this.killed) return this;
|
|
10521
10550
|
this.running = !1, this.killed = !0, this.matrices = null, this.worker.terminate(), this.graph.removeListener("nodeAdded", this.handleGraphUpdate), this.graph.removeListener("edgeAdded", this.handleGraphUpdate), this.graph.removeListener("nodeDropped", this.handleGraphUpdate), this.graph.removeListener("edgeDropped", this.handleGraphUpdate);
|
|
10522
|
-
},
|
|
10551
|
+
}, wr = a, wr;
|
|
10523
10552
|
}
|
|
10524
|
-
var
|
|
10525
|
-
const
|
|
10526
|
-
var
|
|
10527
|
-
function
|
|
10528
|
-
if (li) return
|
|
10553
|
+
var $l = Ul();
|
|
10554
|
+
const Ml = /* @__PURE__ */ Wr($l);
|
|
10555
|
+
var Er, li;
|
|
10556
|
+
function Bl() {
|
|
10557
|
+
if (li) return Er;
|
|
10529
10558
|
li = 1;
|
|
10530
10559
|
var n = 0, r = 1, t = 2, e = 3, i = 4, a = 5, o = 6, s = 7, u = 8, l = 9, c = 0, h = 1, v = 2, y = 0, b = 1, R = 2, w = 3, k = 4, E = 5, m = 6, p = 7, C = 8, L = 3, g = 10, x = 3, S = 9, D = 10;
|
|
10531
|
-
return
|
|
10560
|
+
return Er = function(P, _, W) {
|
|
10532
10561
|
var K, T, f, d, U, $, I, A, z, Z, te = _.length, oe = W.length, ne = P.adjustSizes, V = P.barnesHutTheta * P.barnesHutTheta, se, ee, re, J, le, q, B, G = [];
|
|
10533
10562
|
for (f = 0; f < te; f += g)
|
|
10534
10563
|
_[f + i] = _[f + t], _[f + a] = _[f + e], _[f + t] = 0, _[f + e] = 0;
|
|
@@ -10615,13 +10644,13 @@ function $l() {
|
|
|
10615
10644
|
)
|
|
10616
10645
|
), Ge = _[f + n] + _[f + t] * (we / P.slowDown), _[f + n] = Ge, Ie = _[f + r] + _[f + e] * (we / P.slowDown), _[f + r] = Ie);
|
|
10617
10646
|
return {};
|
|
10618
|
-
},
|
|
10647
|
+
}, Er;
|
|
10619
10648
|
}
|
|
10620
|
-
var
|
|
10621
|
-
function
|
|
10622
|
-
if (ci) return
|
|
10649
|
+
var _r, ci;
|
|
10650
|
+
function Wl() {
|
|
10651
|
+
if (ci) return _r;
|
|
10623
10652
|
ci = 1;
|
|
10624
|
-
var n = Ze(), r = ha().createEdgeWeightGetter, t =
|
|
10653
|
+
var n = Ze(), r = ha().createEdgeWeightGetter, t = Bl(), e = da(), i = fa();
|
|
10625
10654
|
function a(u, l, c) {
|
|
10626
10655
|
if (!n(l))
|
|
10627
10656
|
throw new Error(
|
|
@@ -10664,11 +10693,11 @@ function Ml() {
|
|
|
10664
10693
|
};
|
|
10665
10694
|
}
|
|
10666
10695
|
var s = a.bind(null, !1);
|
|
10667
|
-
return s.assign = a.bind(null, !0), s.inferSettings = o,
|
|
10696
|
+
return s.assign = a.bind(null, !0), s.inferSettings = o, _r = s, _r;
|
|
10668
10697
|
}
|
|
10669
|
-
var
|
|
10670
|
-
const
|
|
10671
|
-
function
|
|
10698
|
+
var Hl = Wl();
|
|
10699
|
+
const jl = /* @__PURE__ */ Wr(Hl), bt = 64, hi = /* @__PURE__ */ new Map();
|
|
10700
|
+
function Vl(n) {
|
|
10672
10701
|
const r = document.createElement("canvas");
|
|
10673
10702
|
r.width = bt, r.height = bt;
|
|
10674
10703
|
const t = r.getContext("2d");
|
|
@@ -10676,39 +10705,39 @@ function Hl(n) {
|
|
|
10676
10705
|
const e = [...n].length, i = Math.floor(bt * (e <= 2 ? 0.78 : e <= 4 ? 0.4 : 0.22));
|
|
10677
10706
|
return t.font = `${i}px "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif`, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = "#cdd6e4", t.fillText(n, bt / 2, bt / 2 + 2), r.toDataURL("image/png");
|
|
10678
10707
|
}
|
|
10679
|
-
function
|
|
10708
|
+
function ql(n) {
|
|
10680
10709
|
if (n.kind === "url") return n.value;
|
|
10681
10710
|
let r = hi.get(n.value);
|
|
10682
|
-
return r === void 0 && (r =
|
|
10711
|
+
return r === void 0 && (r = Vl(n.value), hi.set(n.value, r)), r;
|
|
10683
10712
|
}
|
|
10684
|
-
const
|
|
10685
|
-
function
|
|
10686
|
-
return Math.max(n,
|
|
10713
|
+
const Kl = 9;
|
|
10714
|
+
function Xl(n) {
|
|
10715
|
+
return Math.max(n, Kl);
|
|
10687
10716
|
}
|
|
10688
10717
|
const ga = 4;
|
|
10689
|
-
function
|
|
10718
|
+
function Yl(n) {
|
|
10690
10719
|
return Math.cbrt(Math.max(n, 0)) * ga;
|
|
10691
10720
|
}
|
|
10692
|
-
function
|
|
10721
|
+
function Gc(n, r, t, e) {
|
|
10693
10722
|
if (n <= 0) return 0;
|
|
10694
10723
|
const i = t * Math.PI / 360, a = e / (2 * Math.tan(i));
|
|
10695
10724
|
return r / n * a;
|
|
10696
10725
|
}
|
|
10697
|
-
function
|
|
10698
|
-
return Math.pow(n /
|
|
10726
|
+
function Ic(n) {
|
|
10727
|
+
return Math.pow(n / Br, 3);
|
|
10699
10728
|
}
|
|
10700
|
-
const
|
|
10701
|
-
function
|
|
10729
|
+
const Pc = 2 * ga / Br, Fc = 50, Zl = 60;
|
|
10730
|
+
function Ql(n, r, t) {
|
|
10702
10731
|
const e = Math.min(n.width, n.height), i = Number.isFinite(t) ? t : r, a = Math.min(Math.max(i, 0), Math.max(r, pa(e))), o = e - 2 * r, s = e - 2 * a;
|
|
10703
10732
|
return o > 0 && s > 0 ? o / s : 1;
|
|
10704
10733
|
}
|
|
10705
|
-
function
|
|
10734
|
+
function Oc(n, r, t, e, i) {
|
|
10706
10735
|
if (!(t > 0) || !(e > 0)) return 0;
|
|
10707
10736
|
let a = 0;
|
|
10708
10737
|
for (const l of n) {
|
|
10709
10738
|
const { x: c = Number.NaN, y: h = Number.NaN, z: v = Number.NaN } = l;
|
|
10710
10739
|
if (!Number.isFinite(c) || !Number.isFinite(h) || !Number.isFinite(v)) continue;
|
|
10711
|
-
const y =
|
|
10740
|
+
const y = Yl(l.val);
|
|
10712
10741
|
a = Math.max(
|
|
10713
10742
|
a,
|
|
10714
10743
|
Math.abs(c) + y,
|
|
@@ -10725,7 +10754,7 @@ function Pc(n, r, t, e, i) {
|
|
|
10725
10754
|
);
|
|
10726
10755
|
return Number.isFinite(u) ? u : 0;
|
|
10727
10756
|
}
|
|
10728
|
-
function
|
|
10757
|
+
function zc(n, r) {
|
|
10729
10758
|
const t = Math.hypot(n.x, n.y, n.z);
|
|
10730
10759
|
if (!(t > 0)) return { x: 0, y: 0, z: r };
|
|
10731
10760
|
const e = r / t;
|
|
@@ -10734,23 +10763,23 @@ function Fc(n, r) {
|
|
|
10734
10763
|
function pa(n) {
|
|
10735
10764
|
return Math.max(n, 0) * 0.4;
|
|
10736
10765
|
}
|
|
10737
|
-
function
|
|
10738
|
-
const t = Number.isFinite(n) ? n :
|
|
10766
|
+
function Nc(n, r) {
|
|
10767
|
+
const t = Number.isFinite(n) ? n : Zl;
|
|
10739
10768
|
return Math.min(Math.max(t, 0), pa(r));
|
|
10740
10769
|
}
|
|
10741
|
-
function
|
|
10770
|
+
function Jl(n, r, t) {
|
|
10742
10771
|
const e = Number.isFinite(n) ? n : r;
|
|
10743
10772
|
return Math.max(e, t);
|
|
10744
10773
|
}
|
|
10745
|
-
function
|
|
10774
|
+
function ec(n) {
|
|
10746
10775
|
return Rt(n);
|
|
10747
10776
|
}
|
|
10748
10777
|
function va(n, r) {
|
|
10749
10778
|
if (n < 0) return -va(-n, r);
|
|
10750
|
-
const t = 3.5, e = t * (1 - Math.exp(-r / t)) *
|
|
10779
|
+
const t = 3.5, e = t * (1 - Math.exp(-r / t)) * nn;
|
|
10751
10780
|
return r === 0 ? 0 : e * n / r;
|
|
10752
10781
|
}
|
|
10753
|
-
function
|
|
10782
|
+
function tc({
|
|
10754
10783
|
nodes: n,
|
|
10755
10784
|
edges: r,
|
|
10756
10785
|
styles: t,
|
|
@@ -10765,7 +10794,7 @@ function Jl({
|
|
|
10765
10794
|
}, [a]), Qe(() => {
|
|
10766
10795
|
const b = s.current;
|
|
10767
10796
|
if (!b) return;
|
|
10768
|
-
const R = h.current, w = new
|
|
10797
|
+
const R = h.current, w = new Mu(R, b, {
|
|
10769
10798
|
allowInvalidContainer: !0,
|
|
10770
10799
|
// Off by default in Sigma v3 - without it clickEdge never fires, breaking edge
|
|
10771
10800
|
// selection on the canvas and edge hops in the adjacency preview.
|
|
@@ -10784,13 +10813,13 @@ function Jl({
|
|
|
10784
10813
|
zIndex: !0,
|
|
10785
10814
|
nodeProgramClasses: {
|
|
10786
10815
|
circle: At,
|
|
10787
|
-
image:
|
|
10816
|
+
image: rn()
|
|
10788
10817
|
},
|
|
10789
10818
|
edgeProgramClasses: {
|
|
10790
10819
|
line: Zi,
|
|
10791
10820
|
arrow: Xi,
|
|
10792
|
-
curved:
|
|
10793
|
-
curvedArrow:
|
|
10821
|
+
curved: xl,
|
|
10822
|
+
curvedArrow: Dl
|
|
10794
10823
|
}
|
|
10795
10824
|
});
|
|
10796
10825
|
u.current = w, w.on("clickNode", ({ node: E }) => v.current({ kind: "node", id: Number(E) })), w.on("clickEdge", ({ edge: E }) => {
|
|
@@ -10802,11 +10831,11 @@ function Jl({
|
|
|
10802
10831
|
k.disconnect(), l.current?.kill(), l.current = null, w.kill(), u.current = null;
|
|
10803
10832
|
};
|
|
10804
10833
|
}, []), Qe(() => {
|
|
10805
|
-
const b = h.current, w = Object.keys(n).length + Object.keys(r).length <=
|
|
10834
|
+
const b = h.current, w = Object.keys(n).length + Object.keys(r).length <= Xa, k = /* @__PURE__ */ new Set();
|
|
10806
10835
|
for (const m of Object.values(n)) {
|
|
10807
10836
|
const p = String(m.id);
|
|
10808
10837
|
k.add(p);
|
|
10809
|
-
const C = t.nodes[m.id], L = C.image ?
|
|
10838
|
+
const C = t.nodes[m.id], L = C.image ? ql(C.image) : null, g = {
|
|
10810
10839
|
label: w && e.showNodeLabels ? m.label ? `${m.label} #${m.id}` : `#${m.id}` : null,
|
|
10811
10840
|
color: C.color,
|
|
10812
10841
|
size: C.size,
|
|
@@ -10840,7 +10869,7 @@ function Jl({
|
|
|
10840
10869
|
}
|
|
10841
10870
|
for (const m of b.edges())
|
|
10842
10871
|
E.has(m) || b.dropEdge(m);
|
|
10843
|
-
|
|
10872
|
+
Cl(b), b.forEachEdge((m, p) => {
|
|
10844
10873
|
const C = p.parallelIndex, L = p.parallelMaxIndex;
|
|
10845
10874
|
typeof C == "number" ? b.mergeEdgeAttributes(m, {
|
|
10846
10875
|
type: e.edgeArrows ? "curvedArrow" : "curved",
|
|
@@ -10857,16 +10886,16 @@ function Jl({
|
|
|
10857
10886
|
const w = u.current;
|
|
10858
10887
|
if (!w) return;
|
|
10859
10888
|
w.resize();
|
|
10860
|
-
const k = w.getStagePadding(), E =
|
|
10889
|
+
const k = w.getStagePadding(), E = Ql(w.getDimensions(), k, R ?? k);
|
|
10861
10890
|
w.getCamera().animate(
|
|
10862
10891
|
{ x: 0.5, y: 0.5, ratio: E, angle: 0 },
|
|
10863
10892
|
// Floor of 1: sigma cannot take a zero duration (fitDurationMs says why).
|
|
10864
|
-
{ duration:
|
|
10893
|
+
{ duration: Jl(b, rc, 1) }
|
|
10865
10894
|
), w.scheduleRender();
|
|
10866
10895
|
},
|
|
10867
10896
|
getCameraRatio: () => u.current?.getCamera().ratio ?? 1,
|
|
10868
10897
|
setCameraRatio: (b) => {
|
|
10869
|
-
|
|
10898
|
+
ec(b) && u.current?.getCamera().animate({ ratio: b }, { duration: 1 });
|
|
10870
10899
|
}
|
|
10871
10900
|
}),
|
|
10872
10901
|
[]
|
|
@@ -10884,13 +10913,13 @@ function Jl({
|
|
|
10884
10913
|
if (l.current?.stop(), b.order > 0)
|
|
10885
10914
|
switch (e.layout2d) {
|
|
10886
10915
|
case "circular":
|
|
10887
|
-
|
|
10916
|
+
mr.circular.assign(b, { scale: 100 });
|
|
10888
10917
|
break;
|
|
10889
10918
|
case "circlepack":
|
|
10890
|
-
|
|
10919
|
+
mr.circlepack.assign(b, { hierarchyAttributes: ["group"] });
|
|
10891
10920
|
break;
|
|
10892
10921
|
case "random":
|
|
10893
|
-
|
|
10922
|
+
mr.random.assign(b, { scale: 100 });
|
|
10894
10923
|
break;
|
|
10895
10924
|
case "grid": {
|
|
10896
10925
|
const w = [...b.nodes()].sort((E, m) => Number(E) - Number(m)), k = Math.max(1, Math.ceil(Math.sqrt(w.length)));
|
|
@@ -10905,8 +10934,8 @@ function Jl({
|
|
|
10905
10934
|
}
|
|
10906
10935
|
if (b.order === 0) return;
|
|
10907
10936
|
if (!l.current) {
|
|
10908
|
-
const w =
|
|
10909
|
-
l.current = new
|
|
10937
|
+
const w = jl.inferSettings(b);
|
|
10938
|
+
l.current = new Ml(b, { settings: w });
|
|
10910
10939
|
}
|
|
10911
10940
|
l.current.start();
|
|
10912
10941
|
const R = window.setTimeout(() => l.current?.stop(), 5e3);
|
|
@@ -10923,7 +10952,7 @@ function Jl({
|
|
|
10923
10952
|
if (!k || !E)
|
|
10924
10953
|
b.style.display = "none";
|
|
10925
10954
|
else {
|
|
10926
|
-
const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C =
|
|
10955
|
+
const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C = Xl(k.scaleSize(E.size));
|
|
10927
10956
|
b.style.display = "block", b.style.left = `${m}px`, b.style.top = `${p}px`, b.style.setProperty("--eclipse-r", `${C}px`);
|
|
10928
10957
|
}
|
|
10929
10958
|
R = requestAnimationFrame(w);
|
|
@@ -10945,8 +10974,8 @@ function Jl({
|
|
|
10945
10974
|
/* @__PURE__ */ We("div", { ref: c, className: "eclipse-highlight", style: { display: "none" }, "aria-hidden": !0 })
|
|
10946
10975
|
] });
|
|
10947
10976
|
}
|
|
10948
|
-
const
|
|
10949
|
-
function
|
|
10977
|
+
const rc = 600, nc = ya(() => import("./Canvas3D-CafFy8T8.js").then((n) => ({ default: n.Canvas3D })));
|
|
10978
|
+
function ic({
|
|
10950
10979
|
nodes: n,
|
|
10951
10980
|
edges: r,
|
|
10952
10981
|
config: t,
|
|
@@ -10956,7 +10985,7 @@ function rc({
|
|
|
10956
10985
|
onSelect: o,
|
|
10957
10986
|
ref: s
|
|
10958
10987
|
}) {
|
|
10959
|
-
const u = a && a.kind === "node" ? a.id : null, l =
|
|
10988
|
+
const u = a && a.kind === "node" ? a.id : null, l = on(() => {
|
|
10960
10989
|
if (e) {
|
|
10961
10990
|
const h = /* @__PURE__ */ new Set(), v = /* @__PURE__ */ new Set();
|
|
10962
10991
|
for (const y of e.pathElements)
|
|
@@ -10968,9 +10997,9 @@ function rc({
|
|
|
10968
10997
|
edgeIds: new Set(i.edgeIds),
|
|
10969
10998
|
active: !0,
|
|
10970
10999
|
dim: !1
|
|
10971
|
-
} :
|
|
10972
|
-
}, [e, i]), c =
|
|
10973
|
-
() =>
|
|
11000
|
+
} : Ya;
|
|
11001
|
+
}, [e, i]), c = on(
|
|
11002
|
+
() => fo(n, r, l, t),
|
|
10974
11003
|
[n, r, l, t]
|
|
10975
11004
|
);
|
|
10976
11005
|
return t.renderer === "3d" ? /* @__PURE__ */ We(
|
|
@@ -10978,7 +11007,7 @@ function rc({
|
|
|
10978
11007
|
{
|
|
10979
11008
|
fallback: /* @__PURE__ */ We("div", { className: "bg-ink text-fg-faint flex h-full w-full items-center justify-center text-[11px]", children: "loading 3D renderer…" }),
|
|
10980
11009
|
children: /* @__PURE__ */ We(
|
|
10981
|
-
|
|
11010
|
+
nc,
|
|
10982
11011
|
{
|
|
10983
11012
|
nodes: n,
|
|
10984
11013
|
edges: r,
|
|
@@ -10991,7 +11020,7 @@ function rc({
|
|
|
10991
11020
|
)
|
|
10992
11021
|
}
|
|
10993
11022
|
) : /* @__PURE__ */ We(
|
|
10994
|
-
|
|
11023
|
+
tc,
|
|
10995
11024
|
{
|
|
10996
11025
|
nodes: n,
|
|
10997
11026
|
edges: r,
|
|
@@ -11003,10 +11032,10 @@ function rc({
|
|
|
11003
11032
|
}
|
|
11004
11033
|
);
|
|
11005
11034
|
}
|
|
11006
|
-
function
|
|
11035
|
+
function Uc({
|
|
11007
11036
|
nodes: n,
|
|
11008
11037
|
edges: r,
|
|
11009
|
-
config: t =
|
|
11038
|
+
config: t = Sr,
|
|
11010
11039
|
pathOverlay: e = null,
|
|
11011
11040
|
highlight: i = null,
|
|
11012
11041
|
onSelect: a,
|
|
@@ -11023,7 +11052,7 @@ function zc({
|
|
|
11023
11052
|
}),
|
|
11024
11053
|
[]
|
|
11025
11054
|
), /* @__PURE__ */ We("div", { className: "f8-studio", style: za(o), children: /* @__PURE__ */ We(
|
|
11026
|
-
|
|
11055
|
+
ic,
|
|
11027
11056
|
{
|
|
11028
11057
|
nodes: n,
|
|
11029
11058
|
edges: r,
|
|
@@ -11038,70 +11067,72 @@ function zc({
|
|
|
11038
11067
|
}
|
|
11039
11068
|
export {
|
|
11040
11069
|
Ba as $,
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11070
|
+
gc as A,
|
|
11071
|
+
fc as B,
|
|
11072
|
+
Ec as C,
|
|
11073
|
+
Sr as D,
|
|
11074
|
+
to as E,
|
|
11075
|
+
Uc as F,
|
|
11076
|
+
Rr as G,
|
|
11077
|
+
Ar as H,
|
|
11049
11078
|
xa as I,
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11079
|
+
wc as J,
|
|
11080
|
+
Sc as K,
|
|
11081
|
+
eo as L,
|
|
11082
|
+
Ac as M,
|
|
11083
|
+
Br as N,
|
|
11084
|
+
Rc as O,
|
|
11085
|
+
no as P,
|
|
11057
11086
|
$a as Q,
|
|
11058
|
-
|
|
11059
|
-
|
|
11087
|
+
ic as R,
|
|
11088
|
+
Pc as S,
|
|
11060
11089
|
ka as T,
|
|
11061
11090
|
Wa as U,
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11091
|
+
lc as V,
|
|
11092
|
+
hc as W,
|
|
11093
|
+
sc as X,
|
|
11094
|
+
uc as Y,
|
|
11066
11095
|
Ca as Z,
|
|
11067
|
-
|
|
11068
|
-
|
|
11096
|
+
cc as _,
|
|
11097
|
+
Qa as a,
|
|
11069
11098
|
Ma as a0,
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11099
|
+
_c as a1,
|
|
11100
|
+
ho as a2,
|
|
11101
|
+
Dc as a3,
|
|
11102
|
+
Lc as a4,
|
|
11103
|
+
Cc as a5,
|
|
11104
|
+
xc as a6,
|
|
11105
|
+
ja as a7,
|
|
11077
11106
|
mc as a8,
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
Zl as
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11107
|
+
kc as a9,
|
|
11108
|
+
bc as aa,
|
|
11109
|
+
yc as ab,
|
|
11110
|
+
Na as ac,
|
|
11111
|
+
Ua as ad,
|
|
11112
|
+
za as ae,
|
|
11113
|
+
Ja as b,
|
|
11114
|
+
Za as c,
|
|
11115
|
+
ro as d,
|
|
11116
|
+
Oc as e,
|
|
11117
|
+
Nc as f,
|
|
11118
|
+
Wr as g,
|
|
11119
|
+
Zl as h,
|
|
11120
|
+
Fc as i,
|
|
11121
|
+
Jl as j,
|
|
11122
|
+
ec as k,
|
|
11123
|
+
Ic as l,
|
|
11124
|
+
ql as m,
|
|
11094
11125
|
mi as n,
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11126
|
+
rc as o,
|
|
11127
|
+
Xl as p,
|
|
11128
|
+
Gc as q,
|
|
11098
11129
|
pi as r,
|
|
11099
|
-
|
|
11130
|
+
zc as s,
|
|
11100
11131
|
Aa as t,
|
|
11101
11132
|
Oa as u,
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11133
|
+
vc as v,
|
|
11134
|
+
Yl as w,
|
|
11135
|
+
Tc as x,
|
|
11136
|
+
pc as y,
|
|
11137
|
+
dc as z
|
|
11107
11138
|
};
|