@fallen-8/studio 0.0.37 → 0.0.38

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.
Files changed (40) hide show
  1. package/dist-lib/{Canvas3D-CmDAo5BT.js → Canvas3D-DEWoiNMD.js} +1 -1
  2. package/dist-lib/{F8GraphCanvas-COQKIUas.js → F8GraphCanvas-Cu6dtIgq.js} +667 -659
  3. package/dist-lib/canvas.js +1 -1
  4. package/dist-lib/{cssMode-Cm-p9yGb.js → cssMode-1gdBAwNQ.js} +1 -1
  5. package/dist-lib/f8-studio.css +1 -1
  6. package/dist-lib/f8-studio.js +2 -2
  7. package/dist-lib/{freemarker2-DU-Ctapi.js → freemarker2-DOQZLtnt.js} +1 -1
  8. package/dist-lib/{handlebars-BsqZtC5a.js → handlebars-CIXlymxU.js} +1 -1
  9. package/dist-lib/{html-CUyknR5b.js → html--Bi9VDgI.js} +1 -1
  10. package/dist-lib/{htmlMode-DjyPljE2.js → htmlMode-BqCrpeeP.js} +1 -1
  11. package/dist-lib/{index-BQbFjItv.js → index-0ioFtrZM.js} +24086 -23585
  12. package/dist-lib/{javascript-CVQBymBa.js → javascript-BL3tIzUw.js} +1 -1
  13. package/dist-lib/{jsonMode-B3hcJ0l3.js → jsonMode-FxM7KRm5.js} +1 -1
  14. package/dist-lib/{liquid-DLrt4Cls.js → liquid-wB7unZht.js} +1 -1
  15. package/dist-lib/{mdx-DePkemui.js → mdx-DmS41r19.js} +1 -1
  16. package/dist-lib/{python-CUe0bWsE.js → python-C24igqMV.js} +1 -1
  17. package/dist-lib/{razor-DD_zUh3z.js → razor-BRvioLVk.js} +1 -1
  18. package/dist-lib/{tsMode-Ae3UtOmp.js → tsMode-zMn1qnUE.js} +1 -1
  19. package/dist-lib/types/api/client.d.ts +49 -0
  20. package/dist-lib/types/api/endpoints.d.ts +49 -3
  21. package/dist-lib/types/api/types.d.ts +65 -3
  22. package/dist-lib/types/components/ConfigurationSurface.d.ts +23 -2
  23. package/dist-lib/types/components/ErrorBox.d.ts +6 -0
  24. package/dist-lib/types/components/SemanticBlockEditor.d.ts +4 -1
  25. package/dist-lib/types/components/SemanticQueryEditor.d.ts +8 -1
  26. package/dist-lib/types/components/SettingRow.d.ts +14 -0
  27. package/dist-lib/types/delegate/nl/NlDraftStats.d.ts +13 -0
  28. package/dist-lib/types/delegate/nl/config.d.ts +5 -4
  29. package/dist-lib/types/delegate/nl/generate.d.ts +6 -0
  30. package/dist-lib/types/lib/fieldHelp.d.ts +3 -1
  31. package/dist-lib/types/lib/fileLimits.d.ts +69 -0
  32. package/dist-lib/types/lib/format.d.ts +8 -0
  33. package/dist-lib/types/lib/modelProvenance.d.ts +26 -0
  34. package/dist-lib/types/lib/vectorIndexCreate.d.ts +49 -0
  35. package/dist-lib/types/state/instanceStore.d.ts +28 -2
  36. package/dist-lib/types/state/integrations.d.ts +11 -1
  37. package/dist-lib/{typescript-LNGesWYR.js → typescript-BIjKKvsW.js} +1 -1
  38. package/dist-lib/{xml-BuD_-6ib.js → xml-CT-uMOiT.js} +1 -1
  39. package/dist-lib/{yaml-DCzPbyTS.js → yaml-Dezcc_VH.js} +1 -1
  40. package/package.json +1 -1
@@ -218,10 +218,10 @@ const $r = {
218
218
  minScore: "0.7",
219
219
  costBySimilarity: !1
220
220
  };
221
- function nc(n) {
221
+ function ac(n) {
222
222
  return n.enabled && (n.minScoreEnabled || n.costBySimilarity);
223
223
  }
224
- function ic(n) {
224
+ function oc(n) {
225
225
  return n.enabled && n.costBySimilarity;
226
226
  }
227
227
  function Ca(n, r) {
@@ -246,21 +246,23 @@ function Ca(n, r) {
246
246
  }
247
247
  return { ok: !0, spec: t };
248
248
  }
249
- function ac(n) {
249
+ function sc(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 oc(n) {
256
+ function uc(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 ?? [])
260
260
  t.push(`step ${e.pattern} ${r} ${e.minScore}`);
261
- return n.queryText && t.push(`from text "${n.queryText}"`), t.push("bound at creation — recalculate reuses the stored vector"), t.join(" · ");
261
+ return n.queryText && t.push(`from text "${n.queryText}"`), n.embeddingBackend && t.push(
262
+ n.embeddingIdentity ? `via ${n.embeddingBackend} · ${n.embeddingIdentity}` : `via ${n.embeddingBackend}`
263
+ ), t.push("bound at creation — recalculate reuses the stored vector"), t.join(" · ");
262
264
  }
263
- function sc(n, r) {
265
+ function lc(n, r) {
264
266
  if (!n.enabled)
265
267
  return { ok: !0, spec: void 0 };
266
268
  const t = Ca(n, { providerEnabled: r.providerEnabled });
@@ -298,13 +300,13 @@ const Sr = [
298
300
  labels: [],
299
301
  keys: []
300
302
  };
301
- function uc(n, r) {
303
+ function cc(n, r) {
302
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)));
303
305
  }
304
- function lc(n) {
306
+ function hc(n) {
305
307
  return n.kinds.length > 0 && n.elements.length > 0;
306
308
  }
307
- function cc(n) {
309
+ function dc(n) {
308
310
  return {
309
311
  kinds: n.kinds.length === Sr.length ? void 0 : Sr.filter((r) => n.kinds.includes(r)),
310
312
  elements: n.elements.length === Rr.length ? void 0 : Rr.filter((r) => n.elements.includes(r)),
@@ -339,7 +341,7 @@ function La() {
339
341
  }));
340
342
  }
341
343
  const xe = /* @__PURE__ */ new Map();
342
- function hc(n, r) {
344
+ function fc(n, r) {
343
345
  const t = He(n, r);
344
346
  let e = xe.get(t);
345
347
  return e || (e = La(), xe.set(t, e)), e;
@@ -348,11 +350,11 @@ function Ga(n, r) {
348
350
  const t = He(n, r);
349
351
  xe.get(t)?.getState().clear(), xe.delete(t);
350
352
  }
351
- function Pa(n) {
353
+ function Ia(n) {
352
354
  for (const [r, t] of [...xe.entries()])
353
355
  (r === n || r.startsWith(`${n}/`)) && (t.getState().clear(), xe.delete(r));
354
356
  }
355
- function Ia(n, r, t) {
357
+ function Pa(n, r, t) {
356
358
  const e = He(n, r), i = He(n, t);
357
359
  if (e === i) return;
358
360
  const a = xe.get(e);
@@ -373,17 +375,17 @@ const Fa = {
373
375
  fontMono: "--font-mono"
374
376
  };
375
377
  let _t = {}, wt = 0;
376
- function dc() {
378
+ function gc() {
377
379
  return _t;
378
380
  }
379
- function fc(n) {
381
+ function pc(n) {
380
382
  if (wt > 0 && n !== _t)
381
383
  throw new Error(
382
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)."
383
385
  );
384
386
  _t = n;
385
387
  }
386
- function gc() {
388
+ function vc() {
387
389
  if (wt > 0)
388
390
  throw new Error(
389
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)."
@@ -394,7 +396,7 @@ function gc() {
394
396
  n || (n = !0, wt -= 1);
395
397
  };
396
398
  }
397
- function pc() {
399
+ function mc() {
398
400
  wt === 0 && (_t = {});
399
401
  }
400
402
  function Oa(n) {
@@ -408,11 +410,11 @@ function za(n) {
408
410
  return r;
409
411
  }
410
412
  const Na = di({});
411
- function vc() {
413
+ function yc() {
412
414
  return fi(Na);
413
415
  }
414
416
  const Ua = di(void 0);
415
- function mc() {
417
+ function bc() {
416
418
  return fi(Ua);
417
419
  }
418
420
  function Ke(n) {
@@ -449,7 +451,7 @@ function $a(n, r, t) {
449
451
  };
450
452
  return { nodes: e, edges: i };
451
453
  }
452
- const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n == "string" && Ma.includes(n), yc = (n) => n === "SubGraph" ? "subgraph" : "path", qt = {
454
+ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n == "string" && Ma.includes(n), wc = (n) => n === "SubGraph" ? "subgraph" : "path", Kt = {
453
455
  from: "",
454
456
  to: "",
455
457
  algorithm: "BLS",
@@ -464,13 +466,14 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
464
466
  filterSource: "inline",
465
467
  storedQuery: "",
466
468
  semantic: { ...vi }
467
- }, Kt = {
469
+ }, Wa = ["property", "index", "semantic"], Mt = {
468
470
  mode: "property",
469
471
  propertyScope: "key",
470
472
  propertyId: "",
471
473
  searchTerm: "",
472
474
  searchLabel: "",
473
475
  indexId: "",
476
+ semanticIndexId: "",
474
477
  form: "equality",
475
478
  operator: "Equals",
476
479
  resultType: "Both",
@@ -486,9 +489,13 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
486
489
  vectorK: "10",
487
490
  vectorKind: "any",
488
491
  vectorLabel: "",
489
- vectorSource: "vector",
490
492
  vectorSearchText: ""
491
- }, Lt = {
493
+ };
494
+ function Ha(n) {
495
+ const { vectorSource: r, ...t } = n ?? {}, e = { ...Mt, ...t };
496
+ return Wa.includes(e.mode) || (e.mode = Mt.mode), r === "text" && e.mode === "index" && e.form === "vector" ? { ...e, mode: "semantic", semanticIndexId: e.semanticIndexId || e.indexId } : e;
497
+ }
498
+ const Lt = {
492
499
  name: "",
493
500
  fromSubGraph: "",
494
501
  vertexFilterMode: "everything",
@@ -526,7 +533,7 @@ const Ma = ["path", "subgraph", "stored"], cn = "path", Ba = (n) => typeof n ==
526
533
  connectMaxDepth: 3,
527
534
  connectScope: "all"
528
535
  };
529
- function Wa(n) {
536
+ function ja(n) {
530
537
  return pi()(
531
538
  Aa(
532
539
  (r) => ({
@@ -536,8 +543,8 @@ function Wa(n) {
536
543
  pathOverlay: null,
537
544
  wholeGraphTruncation: null,
538
545
  resultSets: [],
539
- pathDraft: { ...qt },
540
- queryDraft: { ...Kt },
546
+ pathDraft: { ...Kt },
547
+ queryDraft: { ...Mt },
541
548
  subgraphDraft: { ...Lt },
542
549
  browserDraft: { ...Xt },
543
550
  analyticsDraft: { ...Yt },
@@ -590,9 +597,9 @@ function Wa(n) {
590
597
  })),
591
598
  removeResultSet: (t) => r((e) => ({ resultSets: e.resultSets.filter((i) => i.id !== t) })),
592
599
  setPathDraft: (t) => r((e) => ({ pathDraft: { ...e.pathDraft, ...t } })),
593
- resetPathDraft: () => r({ pathDraft: { ...qt } }),
600
+ resetPathDraft: () => r({ pathDraft: { ...Kt } }),
594
601
  setQueryDraft: (t) => r((e) => ({ queryDraft: { ...e.queryDraft, ...t } })),
595
- resetQueryDraft: () => r({ queryDraft: { ...Kt } }),
602
+ resetQueryDraft: () => r({ queryDraft: { ...Mt } }),
596
603
  setSubgraphDraft: (t) => r((e) => ({ subgraphDraft: { ...e.subgraphDraft, ...t } })),
597
604
  resetSubgraphDraft: () => r({ subgraphDraft: { ...Lt } }),
598
605
  setBrowserDraft: (t) => r((e) => ({ browserDraft: { ...e.browserDraft, ...t } })),
@@ -619,13 +626,13 @@ function Wa(n) {
619
626
  ...t,
620
627
  ...e,
621
628
  pathDraft: {
622
- ...qt,
629
+ ...Kt,
623
630
  ...e.pathDraft ?? {},
624
631
  // Nested draft added after some state was persisted: deep-default it too, so
625
632
  // an older pathDraft picks up every semantic field instead of a partial.
626
633
  semantic: { ...vi, ...e.pathDraft?.semantic ?? {} }
627
634
  },
628
- queryDraft: { ...Kt, ...e.queryDraft ?? {} },
635
+ queryDraft: Ha(e.queryDraft),
629
636
  // A subgraph draft persisted before the slot-mode restructure (feature
630
637
  // subgraph-semantic-thresholds) carried a block-local `semantic` object and no
631
638
  // slot modes; it is RESET rather than migrated - a draft is a session
@@ -661,31 +668,31 @@ function Wa(n) {
661
668
  );
662
669
  }
663
670
  const je = /* @__PURE__ */ new Map();
664
- function bc(n, r) {
671
+ function Ec(n, r) {
665
672
  const t = He(n, r);
666
673
  let e = je.get(t);
667
- return e || (e = Wa(t), je.set(t, e)), e;
674
+ return e || (e = ja(t), je.set(t, e)), e;
668
675
  }
669
- function wc(n, r) {
676
+ function _c(n, r) {
670
677
  const t = He(n, r);
671
678
  je.delete(t), localStorage.removeItem(Ke(t)), Ga(n, r);
672
679
  }
673
- function Ec(n) {
680
+ function Tc(n) {
674
681
  for (const r of [...je.keys()])
675
682
  (r === n || r.startsWith(`${n}/`)) && je.delete(r);
676
683
  for (let r = localStorage.length - 1; r >= 0; r--) {
677
684
  const t = localStorage.key(r);
678
685
  (t === Ke(n) || t?.startsWith(Ke(`${n}/`))) && localStorage.removeItem(t);
679
686
  }
680
- Pa(n);
687
+ Ia(n);
681
688
  }
682
- function _c(n, r, t) {
689
+ function Sc(n, r, t) {
683
690
  const e = He(n, r), i = He(n, t);
684
691
  if (e === i) return;
685
692
  const a = localStorage.getItem(Ke(e));
686
- a !== null && (localStorage.setItem(Ke(i), a), localStorage.removeItem(Ke(e))), je.delete(e), je.delete(i), Ia(n, r, t);
693
+ a !== null && (localStorage.setItem(Ke(i), a), localStorage.removeItem(Ke(e))), je.delete(e), je.delete(i), Pa(n, r, t);
687
694
  }
688
- function Tc() {
695
+ function Rc() {
689
696
  je.clear();
690
697
  }
691
698
  const dn = [
@@ -710,7 +717,7 @@ const dn = [
710
717
  "#79c0ff"
711
718
  // light blue
712
719
  ], Tt = "#55647a";
713
- function Mt(n) {
720
+ function Bt(n) {
714
721
  if (!n) return Tt;
715
722
  let r = 0;
716
723
  for (let t = 0; t < n.length; t++)
@@ -718,19 +725,19 @@ function Mt(n) {
718
725
  return dn[Math.abs(r) % dn.length];
719
726
  }
720
727
  function yi(n) {
721
- return n == null || n === "" ? Tt : Mt(String(n));
728
+ return n == null || n === "" ? Tt : Bt(String(n));
722
729
  }
723
- const Sc = "#39c5cf", Rc = "#f778ba";
724
- function Ha(n) {
730
+ const Ac = "#39c5cf", kc = "#f778ba";
731
+ function Va(n) {
725
732
  const r = Math.min(1, Math.max(0, n)), t = [57, 197, 207], e = [247, 120, 186];
726
733
  return `#${t.map((a, o) => Math.round(a + (e[o] - a) * r)).map((a) => a.toString(16).padStart(2, "0")).join("")}`;
727
734
  }
728
- const ja = 5e3, Va = {
735
+ const qa = 5e3, Ka = {
729
736
  nodeIds: /* @__PURE__ */ new Set(),
730
737
  edgeIds: /* @__PURE__ */ new Set(),
731
738
  active: !1,
732
739
  dim: !1
733
- }, Mr = 5, qa = [3, 14], Ka = 1, Xa = [0.5, 5], Ya = 11, Za = 9, Qa = 8, Ja = 3, eo = "#4cc38a", to = "#2a3240", ro = "#1a2029", no = "#2c3543";
740
+ }, Mr = 5, Xa = [3, 14], Ya = 1, Za = [0.5, 5], Qa = 11, Ja = 9, eo = 8, to = 3, ro = "#4cc38a", no = "#2a3240", io = "#1a2029", ao = "#2c3543";
734
741
  function tt(n, r) {
735
742
  return (n.props ?? {})[r];
736
743
  }
@@ -742,7 +749,7 @@ function St(n) {
742
749
  }
743
750
  return null;
744
751
  }
745
- function io(n) {
752
+ function oo(n) {
746
753
  if (n == null || typeof n == "boolean") return null;
747
754
  const r = String(n).trim();
748
755
  return r ? /^(https?:\/\/|data:)/i.test(r) ? { kind: "url", value: r } : { kind: "emoji", value: [...r].slice(0, 8).join("") } : null;
@@ -769,7 +776,7 @@ function fn(n, r, t) {
769
776
  const i = St(e);
770
777
  if (i === null) return Tt;
771
778
  const a = n.max - n.min;
772
- return Ha(a === 0 ? 0.5 : (i - n.min) / a);
779
+ return Va(a === 0 ? 0.5 : (i - n.min) / a);
773
780
  }
774
781
  return yi(e);
775
782
  }
@@ -794,15 +801,15 @@ function pn(n, r) {
794
801
  const [t, e] = n;
795
802
  return Rt(t) && Rt(e) ? n : r;
796
803
  }
797
- function ao(n, r) {
804
+ function so(n, r) {
798
805
  const [t, e] = r;
799
806
  return Math.min(Math.max(n, Math.min(t, e)), Math.max(t, e));
800
807
  }
801
808
  function vn(n, r, t) {
802
- return Rt(n) ? r : ao(r, t);
809
+ return Rt(n) ? r : so(r, t);
803
810
  }
804
- function oo(n) {
805
- const r = Gt(n.nodeSize, Mr), t = pn(n.nodeSizeRange, qa), e = Gt(n.edgeWidth, Ka), i = pn(n.edgeWidthRange, Xa);
811
+ function uo(n) {
812
+ const r = Gt(n.nodeSize, Mr), t = pn(n.nodeSizeRange, Xa), e = Gt(n.edgeWidth, Ya), i = pn(n.edgeWidthRange, Za);
806
813
  return {
807
814
  nodeSize: r,
808
815
  nodeSizeRange: t,
@@ -810,11 +817,11 @@ function oo(n) {
810
817
  edgeWidth: e,
811
818
  edgeWidthRange: i,
812
819
  edgeWidthFallback: vn(n.edgeWidth, e, i),
813
- labelSize: Gt(n.labelSize, Ya),
814
- edgeLabelSize: Gt(n.edgeLabelSize, Za)
820
+ labelSize: Gt(n.labelSize, Qa),
821
+ edgeLabelSize: Gt(n.edgeLabelSize, Ja)
815
822
  };
816
823
  }
817
- function so(n) {
824
+ function lo(n) {
818
825
  const r = /* @__PURE__ */ new Map(), t = (e) => {
819
826
  let i = r.get(e);
820
827
  return i || (i = { in: 0, out: 0 }, r.set(e, i)), i;
@@ -823,8 +830,8 @@ function so(n) {
823
830
  t(e.source).out++, t(e.target).in++;
824
831
  return r;
825
832
  }
826
- function uo(n, r, t, e) {
827
- const i = Object.values(n), a = Object.values(r), o = oo(e), s = Ar(i, e.nodeColorMode, e.nodeColorProperty), u = Ar(a, e.edgeColorMode, e.edgeColorProperty), l = e.nodeSizeMode === "in-degree" || e.nodeSizeMode === "out-degree" || e.nodeSizeMode === "degree" ? so(a) : null, c = (w) => {
833
+ function co(n, r, t, e) {
834
+ const i = Object.values(n), a = Object.values(r), o = uo(e), s = Ar(i, e.nodeColorMode, e.nodeColorProperty), u = Ar(a, e.edgeColorMode, e.edgeColorProperty), l = e.nodeSizeMode === "in-degree" || e.nodeSizeMode === "out-degree" || e.nodeSizeMode === "degree" ? lo(a) : null, c = (w) => {
828
835
  switch (e.nodeSizeMode) {
829
836
  case "property":
830
837
  return e.nodeSizeProperty ? St(tt(w, e.nodeSizeProperty)) : null;
@@ -841,10 +848,10 @@ function uo(n, r, t, e) {
841
848
  }
842
849
  }, 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 = {};
843
850
  for (const w of i) {
844
- const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ? io(tt(w, e.nodeImageProperty)) : null;
851
+ const k = t.nodeIds.has(w.id), E = t.active && t.dim && !k, m = h(c(w)), p = e.nodeImageProperty ? oo(tt(w, e.nodeImageProperty)) : null;
845
852
  b[w.id] = {
846
- color: E ? to : fn(s, w, Mt(w.label)),
847
- size: k ? Math.max(m, Qa) : m,
853
+ color: E ? no : fn(s, w, Bt(w.label)),
854
+ size: k ? Math.max(m, eo) : m,
848
855
  // A dimmed image would still pop against the dim palette — suppress it (FR-9).
849
856
  image: E ? null : p,
850
857
  zIndex: k ? 2 : 1,
@@ -853,18 +860,18 @@ function uo(n, r, t, e) {
853
860
  }
854
861
  const R = {};
855
862
  for (const w of a) {
856
- const k = t.edgeIds.has(w.id), E = t.active && t.dim && !k, m = y(v(w)), p = mi(w), C = p ? Mt(p) : no;
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) : ao;
857
864
  R[w.id] = {
858
- color: k ? eo : E ? ro : fn(u, w, C),
859
- width: k ? Math.max(m, Ja) : m,
865
+ color: k ? ro : E ? io : fn(u, w, C),
866
+ width: k ? Math.max(m, to) : m,
860
867
  zIndex: k ? 2 : 0,
861
868
  dimmed: E
862
869
  };
863
870
  }
864
871
  return { nodes: b, edges: R, magnitudes: o };
865
872
  }
866
- const lo = 12;
867
- function Ac(n, r) {
873
+ const ho = 12;
874
+ function Cc(n, r) {
868
875
  const t = Object.values(n), e = Ar(t, r.nodeColorMode, r.nodeColorProperty);
869
876
  if (e.kind === "gradient")
870
877
  return { kind: "gradient", title: e.property, min: e.min, max: e.max };
@@ -875,18 +882,18 @@ function Ac(n, r) {
875
882
  const c = tt(o, e.property);
876
883
  s = c === void 0 || c === "" ? "(missing)" : String(c), u = c === void 0 || c === "" ? Tt : yi(c);
877
884
  } else
878
- s = o.label ?? "(unlabeled)", u = Mt(o.label);
885
+ s = o.label ?? "(unlabeled)", u = Bt(o.label);
879
886
  const l = i.get(s);
880
887
  l ? l.count++ : i.set(s, { color: u, count: 1 });
881
888
  }
882
- 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, lo);
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, ho);
883
890
  return {
884
891
  kind: "categorical",
885
892
  title: e.kind === "categorical" ? e.property : "labels",
886
893
  entries: a
887
894
  };
888
895
  }
889
- function kc(n) {
896
+ function xc(n) {
890
897
  const r = /* @__PURE__ */ new Set();
891
898
  for (const t of n)
892
899
  for (const e of Object.keys(t.props ?? {})) r.add(e);
@@ -895,9 +902,9 @@ function kc(n) {
895
902
  function Br(n) {
896
903
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
897
904
  }
898
- var Pt = { exports: {} }, mn;
899
- function co() {
900
- if (mn) return Pt.exports;
905
+ var It = { exports: {} }, mn;
906
+ function fo() {
907
+ if (mn) return It.exports;
901
908
  mn = 1;
902
909
  var n = typeof Reflect == "object" ? Reflect : null, r = n && typeof n.apply == "function" ? n.apply : function(C, L, g) {
903
910
  return Function.prototype.apply.call(C, L, g);
@@ -916,7 +923,7 @@ function co() {
916
923
  function a() {
917
924
  a.init.call(this);
918
925
  }
919
- Pt.exports = a, Pt.exports.once = k, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
926
+ It.exports = a, It.exports.once = k, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._eventsCount = 0, a.prototype._maxListeners = void 0;
920
927
  var o = 10;
921
928
  function s(p) {
922
929
  if (typeof p != "function")
@@ -958,13 +965,13 @@ function co() {
958
965
  var O = new Error("Unhandled error." + (D ? " (" + D.message + ")" : ""));
959
966
  throw O.context = D, O;
960
967
  }
961
- var I = S[C];
962
- if (I === void 0)
968
+ var P = S[C];
969
+ if (P === void 0)
963
970
  return !1;
964
- if (typeof I == "function")
965
- r(I, this, L);
971
+ if (typeof P == "function")
972
+ r(P, this, L);
966
973
  else
967
- for (var _ = I.length, W = b(I, _), g = 0; g < _; ++g)
974
+ for (var _ = P.length, W = b(P, _), g = 0; g < _; ++g)
968
975
  r(W[g], this, L);
969
976
  return !0;
970
977
  };
@@ -1105,17 +1112,17 @@ function co() {
1105
1112
  else
1106
1113
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof p);
1107
1114
  }
1108
- return Pt.exports;
1115
+ return It.exports;
1109
1116
  }
1110
- var Wr = co();
1111
- function ho() {
1117
+ var Wr = fo();
1118
+ function go() {
1112
1119
  const n = arguments[0];
1113
1120
  for (let r = 1, t = arguments.length; r < t; r++)
1114
1121
  if (arguments[r])
1115
1122
  for (const e in arguments[r]) n[e] = arguments[r][e];
1116
1123
  return n;
1117
1124
  }
1118
- let ue = ho;
1125
+ let ue = go;
1119
1126
  typeof Object.assign == "function" && (ue = Object.assign);
1120
1127
  function _e(n, r, t, e) {
1121
1128
  const i = n._nodes.get(r);
@@ -1148,7 +1155,7 @@ function Ae(n, r, t) {
1148
1155
  function yn(n) {
1149
1156
  return !(!he(n) || n.attributes && !Array.isArray(n.attributes));
1150
1157
  }
1151
- function fo() {
1158
+ function po() {
1152
1159
  let n = Math.floor(Math.random() * 256) & 255;
1153
1160
  return () => n++;
1154
1161
  }
@@ -1257,7 +1264,7 @@ ut.prototype.detachMulti = function() {
1257
1264
  let t = "out", e = "in";
1258
1265
  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));
1259
1266
  };
1260
- const Ti = 0, Si = 1, go = 2, Ri = 3;
1267
+ const Ti = 0, Si = 1, vo = 2, Ri = 3;
1261
1268
  function Ne(n, r, t, e, i, a, o) {
1262
1269
  let s, u, l, c;
1263
1270
  if (e = "" + e, t === Ti) {
@@ -1290,7 +1297,7 @@ function Ne(n, r, t, e, i, a, o) {
1290
1297
  }
1291
1298
  return [s, l, c];
1292
1299
  }
1293
- function po(n, r, t) {
1300
+ function mo(n, r, t) {
1294
1301
  n.prototype[r] = function(e, i, a) {
1295
1302
  const [o, s] = Ne(
1296
1303
  this,
@@ -1303,7 +1310,7 @@ function po(n, r, t) {
1303
1310
  return o.attributes[s];
1304
1311
  };
1305
1312
  }
1306
- function vo(n, r, t) {
1313
+ function yo(n, r, t) {
1307
1314
  n.prototype[r] = function(e, i) {
1308
1315
  const [a] = Ne(
1309
1316
  this,
@@ -1315,7 +1322,7 @@ function vo(n, r, t) {
1315
1322
  return a.attributes;
1316
1323
  };
1317
1324
  }
1318
- function mo(n, r, t) {
1325
+ function bo(n, r, t) {
1319
1326
  n.prototype[r] = function(e, i, a) {
1320
1327
  const [o, s] = Ne(
1321
1328
  this,
@@ -1328,7 +1335,7 @@ function mo(n, r, t) {
1328
1335
  return o.attributes.hasOwnProperty(s);
1329
1336
  };
1330
1337
  }
1331
- function yo(n, r, t) {
1338
+ function wo(n, r, t) {
1332
1339
  n.prototype[r] = function(e, i, a, o) {
1333
1340
  const [s, u, l] = Ne(
1334
1341
  this,
@@ -1347,7 +1354,7 @@ function yo(n, r, t) {
1347
1354
  }), this;
1348
1355
  };
1349
1356
  }
1350
- function bo(n, r, t) {
1357
+ function Eo(n, r, t) {
1351
1358
  n.prototype[r] = function(e, i, a, o) {
1352
1359
  const [s, u, l] = Ne(
1353
1360
  this,
@@ -1371,7 +1378,7 @@ function bo(n, r, t) {
1371
1378
  }), this;
1372
1379
  };
1373
1380
  }
1374
- function wo(n, r, t) {
1381
+ function _o(n, r, t) {
1375
1382
  n.prototype[r] = function(e, i, a) {
1376
1383
  const [o, s] = Ne(
1377
1384
  this,
@@ -1389,7 +1396,7 @@ function wo(n, r, t) {
1389
1396
  }), this;
1390
1397
  };
1391
1398
  }
1392
- function Eo(n, r, t) {
1399
+ function To(n, r, t) {
1393
1400
  n.prototype[r] = function(e, i, a) {
1394
1401
  const [o, s] = Ne(
1395
1402
  this,
@@ -1410,7 +1417,7 @@ function Eo(n, r, t) {
1410
1417
  }), this;
1411
1418
  };
1412
1419
  }
1413
- function _o(n, r, t) {
1420
+ function So(n, r, t) {
1414
1421
  n.prototype[r] = function(e, i, a) {
1415
1422
  const [o, s] = Ne(
1416
1423
  this,
@@ -1432,7 +1439,7 @@ function _o(n, r, t) {
1432
1439
  }), this;
1433
1440
  };
1434
1441
  }
1435
- function To(n, r, t) {
1442
+ function Ro(n, r, t) {
1436
1443
  n.prototype[r] = function(e, i, a) {
1437
1444
  const [o, s] = Ne(
1438
1445
  this,
@@ -1453,50 +1460,50 @@ function To(n, r, t) {
1453
1460
  }), this;
1454
1461
  };
1455
1462
  }
1456
- const So = [
1463
+ const Ao = [
1457
1464
  {
1458
1465
  name: (n) => `get${n}Attribute`,
1459
- attacher: po
1466
+ attacher: mo
1460
1467
  },
1461
1468
  {
1462
1469
  name: (n) => `get${n}Attributes`,
1463
- attacher: vo
1470
+ attacher: yo
1464
1471
  },
1465
1472
  {
1466
1473
  name: (n) => `has${n}Attribute`,
1467
- attacher: mo
1474
+ attacher: bo
1468
1475
  },
1469
1476
  {
1470
1477
  name: (n) => `set${n}Attribute`,
1471
- attacher: yo
1478
+ attacher: wo
1472
1479
  },
1473
1480
  {
1474
1481
  name: (n) => `update${n}Attribute`,
1475
- attacher: bo
1482
+ attacher: Eo
1476
1483
  },
1477
1484
  {
1478
1485
  name: (n) => `remove${n}Attribute`,
1479
- attacher: wo
1486
+ attacher: _o
1480
1487
  },
1481
1488
  {
1482
1489
  name: (n) => `replace${n}Attributes`,
1483
- attacher: Eo
1490
+ attacher: To
1484
1491
  },
1485
1492
  {
1486
1493
  name: (n) => `merge${n}Attributes`,
1487
- attacher: _o
1494
+ attacher: So
1488
1495
  },
1489
1496
  {
1490
1497
  name: (n) => `update${n}Attributes`,
1491
- attacher: To
1498
+ attacher: Ro
1492
1499
  }
1493
1500
  ];
1494
- function Ro(n) {
1495
- So.forEach(function({ name: r, attacher: t }) {
1496
- t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"), go), t(n, r("Opposite"), Ri);
1501
+ function ko(n) {
1502
+ Ao.forEach(function({ name: r, attacher: t }) {
1503
+ t(n, r("Node"), Ti), t(n, r("Source"), Si), t(n, r("Target"), vo), t(n, r("Opposite"), Ri);
1497
1504
  });
1498
1505
  }
1499
- function Ao(n, r, t) {
1506
+ function Co(n, r, t) {
1500
1507
  n.prototype[r] = function(e, i) {
1501
1508
  let a;
1502
1509
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1526,7 +1533,7 @@ function Ao(n, r, t) {
1526
1533
  return a.attributes[i];
1527
1534
  };
1528
1535
  }
1529
- function ko(n, r, t) {
1536
+ function xo(n, r, t) {
1530
1537
  n.prototype[r] = function(e) {
1531
1538
  let i;
1532
1539
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1556,7 +1563,7 @@ function ko(n, r, t) {
1556
1563
  return i.attributes;
1557
1564
  };
1558
1565
  }
1559
- function Co(n, r, t) {
1566
+ function Do(n, r, t) {
1560
1567
  n.prototype[r] = function(e, i) {
1561
1568
  let a;
1562
1569
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1586,7 +1593,7 @@ function Co(n, r, t) {
1586
1593
  return a.attributes.hasOwnProperty(i);
1587
1594
  };
1588
1595
  }
1589
- function xo(n, r, t) {
1596
+ function Lo(n, r, t) {
1590
1597
  n.prototype[r] = function(e, i, a) {
1591
1598
  let o;
1592
1599
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1621,7 +1628,7 @@ function xo(n, r, t) {
1621
1628
  }), this;
1622
1629
  };
1623
1630
  }
1624
- function Do(n, r, t) {
1631
+ function Go(n, r, t) {
1625
1632
  n.prototype[r] = function(e, i, a) {
1626
1633
  let o;
1627
1634
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1660,7 +1667,7 @@ function Do(n, r, t) {
1660
1667
  }), this;
1661
1668
  };
1662
1669
  }
1663
- function Lo(n, r, t) {
1670
+ function Io(n, r, t) {
1664
1671
  n.prototype[r] = function(e, i) {
1665
1672
  let a;
1666
1673
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1695,7 +1702,7 @@ function Lo(n, r, t) {
1695
1702
  }), this;
1696
1703
  };
1697
1704
  }
1698
- function Go(n, r, t) {
1705
+ function Po(n, r, t) {
1699
1706
  n.prototype[r] = function(e, i) {
1700
1707
  let a;
1701
1708
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1733,7 +1740,7 @@ function Go(n, r, t) {
1733
1740
  }), this;
1734
1741
  };
1735
1742
  }
1736
- function Po(n, r, t) {
1743
+ function Fo(n, r, t) {
1737
1744
  n.prototype[r] = function(e, i) {
1738
1745
  let a;
1739
1746
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1772,7 +1779,7 @@ function Po(n, r, t) {
1772
1779
  }), this;
1773
1780
  };
1774
1781
  }
1775
- function Io(n, r, t) {
1782
+ function Oo(n, r, t) {
1776
1783
  n.prototype[r] = function(e, i) {
1777
1784
  let a;
1778
1785
  if (this.type !== "mixed" && t !== "mixed" && t !== this.type)
@@ -1810,50 +1817,50 @@ function Io(n, r, t) {
1810
1817
  }), this;
1811
1818
  };
1812
1819
  }
1813
- const Fo = [
1820
+ const zo = [
1814
1821
  {
1815
1822
  name: (n) => `get${n}Attribute`,
1816
- attacher: Ao
1823
+ attacher: Co
1817
1824
  },
1818
1825
  {
1819
1826
  name: (n) => `get${n}Attributes`,
1820
- attacher: ko
1827
+ attacher: xo
1821
1828
  },
1822
1829
  {
1823
1830
  name: (n) => `has${n}Attribute`,
1824
- attacher: Co
1831
+ attacher: Do
1825
1832
  },
1826
1833
  {
1827
1834
  name: (n) => `set${n}Attribute`,
1828
- attacher: xo
1835
+ attacher: Lo
1829
1836
  },
1830
1837
  {
1831
1838
  name: (n) => `update${n}Attribute`,
1832
- attacher: Do
1839
+ attacher: Go
1833
1840
  },
1834
1841
  {
1835
1842
  name: (n) => `remove${n}Attribute`,
1836
- attacher: Lo
1843
+ attacher: Io
1837
1844
  },
1838
1845
  {
1839
1846
  name: (n) => `replace${n}Attributes`,
1840
- attacher: Go
1847
+ attacher: Po
1841
1848
  },
1842
1849
  {
1843
1850
  name: (n) => `merge${n}Attributes`,
1844
- attacher: Po
1851
+ attacher: Fo
1845
1852
  },
1846
1853
  {
1847
1854
  name: (n) => `update${n}Attributes`,
1848
- attacher: Io
1855
+ attacher: Oo
1849
1856
  }
1850
1857
  ];
1851
- function Oo(n) {
1852
- Fo.forEach(function({ name: r, attacher: t }) {
1858
+ function No(n) {
1859
+ zo.forEach(function({ name: r, attacher: t }) {
1853
1860
  t(n, r("Edge"), "mixed"), t(n, r("DirectedEdge"), "directed"), t(n, r("UndirectedEdge"), "undirected");
1854
1861
  });
1855
1862
  }
1856
- const zo = [
1863
+ const Uo = [
1857
1864
  {
1858
1865
  name: "edges",
1859
1866
  type: "mixed"
@@ -1887,7 +1894,7 @@ const zo = [
1887
1894
  type: "undirected"
1888
1895
  }
1889
1896
  ];
1890
- function No(n, r, t, e) {
1897
+ function $o(n, r, t, e) {
1891
1898
  let i = !1;
1892
1899
  for (const a in r) {
1893
1900
  if (a === e) continue;
@@ -1903,7 +1910,7 @@ function No(n, r, t, e) {
1903
1910
  ), n && i) return o.key;
1904
1911
  }
1905
1912
  }
1906
- function Uo(n, r, t, e) {
1913
+ function Mo(n, r, t, e) {
1907
1914
  let i, a, o, s = !1;
1908
1915
  for (const u in r)
1909
1916
  if (u !== e) {
@@ -1958,7 +1965,7 @@ function Zt(n, r) {
1958
1965
  }
1959
1966
  };
1960
1967
  }
1961
- function $o(n, r, t, e) {
1968
+ function Bo(n, r, t, e) {
1962
1969
  const i = r[t];
1963
1970
  if (!i) return;
1964
1971
  const a = i.source, o = i.target;
@@ -1973,7 +1980,7 @@ function $o(n, r, t, e) {
1973
1980
  ) && n)
1974
1981
  return i.key;
1975
1982
  }
1976
- function Mo(n, r, t, e) {
1983
+ function Wo(n, r, t, e) {
1977
1984
  let i = r[t];
1978
1985
  if (!i) return;
1979
1986
  let a = !1;
@@ -2035,7 +2042,7 @@ function Qt(n, r) {
2035
2042
  }
2036
2043
  };
2037
2044
  }
2038
- function Bo(n, r) {
2045
+ function Ho(n, r) {
2039
2046
  if (n.size === 0) return [];
2040
2047
  if (r === "mixed" || r === n.type)
2041
2048
  return Array.from(n._edges.keys());
@@ -2064,7 +2071,7 @@ function Ai(n, r, t, e) {
2064
2071
  ), n && u) return c;
2065
2072
  }
2066
2073
  }
2067
- function Wo(n, r) {
2074
+ function jo(n, r) {
2068
2075
  if (n.size === 0) return st();
2069
2076
  const t = r !== "mixed" && r !== n.type, e = r === "undirected", i = n._edges.values();
2070
2077
  return {
@@ -2091,7 +2098,7 @@ function Wo(n, r) {
2091
2098
  };
2092
2099
  }
2093
2100
  function jr(n, r, t, e, i, a) {
2094
- const o = r ? Uo : No;
2101
+ const o = r ? Mo : $o;
2095
2102
  let s;
2096
2103
  if (t !== "undirected" && (e !== "out" && (s = o(n, i.in, a), n && s) || e !== "in" && (s = o(
2097
2104
  n,
@@ -2101,13 +2108,13 @@ function jr(n, r, t, e, i, a) {
2101
2108
  ), n && s)) || t !== "directed" && (s = o(n, i.undirected, a), n && s))
2102
2109
  return s;
2103
2110
  }
2104
- function Ho(n, r, t, e) {
2111
+ function Vo(n, r, t, e) {
2105
2112
  const i = [];
2106
2113
  return jr(!1, n, r, t, e, function(a) {
2107
2114
  i.push(a);
2108
2115
  }), i;
2109
2116
  }
2110
- function jo(n, r, t) {
2117
+ function qo(n, r, t) {
2111
2118
  let e = st();
2112
2119
  return n !== "undirected" && (r !== "out" && typeof t.in < "u" && (e = ze(e, Zt(t.in))), r !== "in" && typeof t.out < "u" && (e = ze(
2113
2120
  e,
@@ -2115,12 +2122,12 @@ function jo(n, r, t) {
2115
2122
  ))), n !== "directed" && typeof t.undirected < "u" && (e = ze(e, Zt(t.undirected))), e;
2116
2123
  }
2117
2124
  function Vr(n, r, t, e, i, a, o) {
2118
- const s = t ? Mo : $o;
2125
+ const s = t ? Wo : Bo;
2119
2126
  let u;
2120
2127
  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))
2121
2128
  return u;
2122
2129
  }
2123
- function Vo(n, r, t, e, i) {
2130
+ function Ko(n, r, t, e, i) {
2124
2131
  const a = [];
2125
2132
  return Vr(
2126
2133
  !1,
@@ -2134,19 +2141,19 @@ function Vo(n, r, t, e, i) {
2134
2141
  }
2135
2142
  ), a;
2136
2143
  }
2137
- function qo(n, r, t, e) {
2144
+ function Xo(n, r, t, e) {
2138
2145
  let i = st();
2139
2146
  return n !== "undirected" && (typeof t.in < "u" && r !== "out" && e in t.in && (i = ze(i, Qt(t.in, e))), typeof t.out < "u" && r !== "in" && e in t.out && (r || t.key !== e) && (i = ze(i, Qt(t.out, e)))), n !== "directed" && typeof t.undirected < "u" && e in t.undirected && (i = ze(
2140
2147
  i,
2141
2148
  Qt(t.undirected, e)
2142
2149
  )), i;
2143
2150
  }
2144
- function Ko(n, r) {
2151
+ function Yo(n, r) {
2145
2152
  const { name: t, type: e, direction: i } = r;
2146
2153
  n.prototype[t] = function(a, o) {
2147
2154
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
2148
2155
  return [];
2149
- if (!arguments.length) return Bo(this, e);
2156
+ if (!arguments.length) return Ho(this, e);
2150
2157
  if (arguments.length === 1) {
2151
2158
  a = "" + a;
2152
2159
  const s = this._nodes.get(a);
@@ -2154,7 +2161,7 @@ function Ko(n, r) {
2154
2161
  throw new M(
2155
2162
  `Graph.${t}: could not find the "${a}" node in the graph.`
2156
2163
  );
2157
- return Ho(
2164
+ return Vo(
2158
2165
  this.multi,
2159
2166
  e === "mixed" ? this.type : e,
2160
2167
  i,
@@ -2172,7 +2179,7 @@ function Ko(n, r) {
2172
2179
  throw new M(
2173
2180
  `Graph.${t}: could not find the "${o}" target node in the graph.`
2174
2181
  );
2175
- return Vo(
2182
+ return Ko(
2176
2183
  e,
2177
2184
  this.multi,
2178
2185
  i,
@@ -2185,7 +2192,7 @@ function Ko(n, r) {
2185
2192
  );
2186
2193
  };
2187
2194
  }
2188
- function Xo(n, r) {
2195
+ function Zo(n, r) {
2189
2196
  const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
2190
2197
  n.prototype[a] = function(l, c, h) {
2191
2198
  if (!(e !== "mixed" && this.type !== "mixed" && e !== this.type)) {
@@ -2276,7 +2283,7 @@ function Xo(n, r) {
2276
2283
  }), this[a].apply(this, l), v;
2277
2284
  };
2278
2285
  }
2279
- function Yo(n, r) {
2286
+ function Qo(n, r) {
2280
2287
  const { name: t, type: e, direction: i } = r, a = "find" + t[0].toUpperCase() + t.slice(1, -1);
2281
2288
  n.prototype[a] = function(u, l, c) {
2282
2289
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2335,12 +2342,12 @@ function Yo(n, r) {
2335
2342
  return u.push((h, v, y, b, R, w, k) => !l(h, v, y, b, R, w, k)), !this[a].apply(this, u);
2336
2343
  };
2337
2344
  }
2338
- function Zo(n, r) {
2345
+ function Jo(n, r) {
2339
2346
  const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
2340
2347
  n.prototype[a] = function(o, s) {
2341
2348
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
2342
2349
  return st();
2343
- if (!arguments.length) return Wo(this, e);
2350
+ if (!arguments.length) return jo(this, e);
2344
2351
  if (arguments.length === 1) {
2345
2352
  o = "" + o;
2346
2353
  const u = this._nodes.get(o);
@@ -2348,7 +2355,7 @@ function Zo(n, r) {
2348
2355
  throw new M(
2349
2356
  `Graph.${a}: could not find the "${o}" node in the graph.`
2350
2357
  );
2351
- return jo(e, i, u);
2358
+ return qo(e, i, u);
2352
2359
  }
2353
2360
  if (arguments.length === 2) {
2354
2361
  o = "" + o, s = "" + s;
@@ -2361,19 +2368,19 @@ function Zo(n, r) {
2361
2368
  throw new M(
2362
2369
  `Graph.${a}: could not find the "${s}" target node in the graph.`
2363
2370
  );
2364
- return qo(e, i, u, s);
2371
+ return Xo(e, i, u, s);
2365
2372
  }
2366
2373
  throw new H(
2367
2374
  `Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`
2368
2375
  );
2369
2376
  };
2370
2377
  }
2371
- function Qo(n) {
2372
- zo.forEach((r) => {
2373
- Ko(n, r), Xo(n, r), Yo(n, r), Zo(n, r);
2378
+ function es(n) {
2379
+ Uo.forEach((r) => {
2380
+ Yo(n, r), Zo(n, r), Qo(n, r), Jo(n, r);
2374
2381
  });
2375
2382
  }
2376
- const Jo = [
2383
+ const ts = [
2377
2384
  {
2378
2385
  name: "neighbors",
2379
2386
  type: "mixed"
@@ -2407,13 +2414,13 @@ const Jo = [
2407
2414
  type: "undirected"
2408
2415
  }
2409
2416
  ];
2410
- function Wt() {
2417
+ function Ht() {
2411
2418
  this.A = null, this.B = null;
2412
2419
  }
2413
- Wt.prototype.wrap = function(n) {
2420
+ Ht.prototype.wrap = function(n) {
2414
2421
  this.A === null ? this.A = n : this.B === null && (this.B = n);
2415
2422
  };
2416
- Wt.prototype.has = function(n) {
2423
+ Ht.prototype.has = function(n) {
2417
2424
  return this.A !== null && n in this.A || this.B !== null && n in this.B;
2418
2425
  };
2419
2426
  function ht(n, r, t, e, i) {
@@ -2443,7 +2450,7 @@ function qr(n, r, t, e, i) {
2443
2450
  i
2444
2451
  );
2445
2452
  }
2446
- const a = new Wt();
2453
+ const a = new Ht();
2447
2454
  let o;
2448
2455
  if (r !== "undirected") {
2449
2456
  if (t !== "out") {
@@ -2476,7 +2483,7 @@ function qr(n, r, t, e, i) {
2476
2483
  ), n && o))
2477
2484
  return o;
2478
2485
  }
2479
- function es(n, r, t) {
2486
+ function rs(n, r, t) {
2480
2487
  if (n !== "mixed") {
2481
2488
  if (n === "undirected") return Object.keys(t.undirected);
2482
2489
  if (typeof r == "string") return Object.keys(t[r]);
@@ -2511,7 +2518,7 @@ function dt(n, r, t) {
2511
2518
  }
2512
2519
  };
2513
2520
  }
2514
- function ts(n, r, t) {
2521
+ function ns(n, r, t) {
2515
2522
  if (n !== "mixed") {
2516
2523
  if (n === "undirected")
2517
2524
  return dt(null, t, t.undirected);
@@ -2519,7 +2526,7 @@ function ts(n, r, t) {
2519
2526
  return dt(null, t, t[r]);
2520
2527
  }
2521
2528
  let e = st();
2522
- const i = new Wt();
2529
+ const i = new Ht();
2523
2530
  return n !== "undirected" && (r !== "out" && (e = ze(
2524
2531
  e,
2525
2532
  dt(i, t, t.in)
@@ -2531,7 +2538,7 @@ function ts(n, r, t) {
2531
2538
  dt(i, t, t.undirected)
2532
2539
  )), e;
2533
2540
  }
2534
- function rs(n, r) {
2541
+ function is(n, r) {
2535
2542
  const { name: t, type: e, direction: i } = r;
2536
2543
  n.prototype[t] = function(a) {
2537
2544
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2542,14 +2549,14 @@ function rs(n, r) {
2542
2549
  throw new M(
2543
2550
  `Graph.${t}: could not find the "${a}" node in the graph.`
2544
2551
  );
2545
- return es(
2552
+ return rs(
2546
2553
  e === "mixed" ? this.type : e,
2547
2554
  i,
2548
2555
  o
2549
2556
  );
2550
2557
  };
2551
2558
  }
2552
- function ns(n, r) {
2559
+ function as(n, r) {
2553
2560
  const { name: t, type: e, direction: i } = r, a = "forEach" + t[0].toUpperCase() + t.slice(1, -1);
2554
2561
  n.prototype[a] = function(l, c) {
2555
2562
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
@@ -2593,7 +2600,7 @@ function ns(n, r) {
2593
2600
  }), v;
2594
2601
  };
2595
2602
  }
2596
- function is(n, r) {
2603
+ function os(n, r) {
2597
2604
  const { name: t, type: e, direction: i } = r, a = t[0].toUpperCase() + t.slice(1, -1), o = "find" + a;
2598
2605
  n.prototype[o] = function(l, c) {
2599
2606
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type) return;
@@ -2620,7 +2627,7 @@ function is(n, r) {
2620
2627
  return !this[o](l, (v, y) => !c(v, y));
2621
2628
  };
2622
2629
  }
2623
- function as(n, r) {
2630
+ function ss(n, r) {
2624
2631
  const { name: t, type: e, direction: i } = r, a = t.slice(0, -1) + "Entries";
2625
2632
  n.prototype[a] = function(o) {
2626
2633
  if (e !== "mixed" && this.type !== "mixed" && e !== this.type)
@@ -2631,19 +2638,19 @@ function as(n, r) {
2631
2638
  throw new M(
2632
2639
  `Graph.${a}: could not find the "${o}" node in the graph.`
2633
2640
  );
2634
- return ts(
2641
+ return ns(
2635
2642
  e === "mixed" ? this.type : e,
2636
2643
  i,
2637
2644
  s
2638
2645
  );
2639
2646
  };
2640
2647
  }
2641
- function os(n) {
2642
- Jo.forEach((r) => {
2643
- rs(n, r), ns(n, r), is(n, r), as(n, r);
2648
+ function us(n) {
2649
+ ts.forEach((r) => {
2650
+ is(n, r), as(n, r), os(n, r), ss(n, r);
2644
2651
  });
2645
2652
  }
2646
- function It(n, r, t, e, i) {
2653
+ function Pt(n, r, t, e, i) {
2647
2654
  const a = e._nodes.values(), o = e.type;
2648
2655
  let s, u, l, c, h, v;
2649
2656
  for (; s = a.next(), s.done !== !0; ) {
@@ -2694,11 +2701,11 @@ function It(n, r, t, e, i) {
2694
2701
  );
2695
2702
  }
2696
2703
  }
2697
- function ss(n, r) {
2704
+ function ls(n, r) {
2698
2705
  const t = { key: n };
2699
2706
  return bi(r.attributes) || (t.attributes = ue({}, r.attributes)), t;
2700
2707
  }
2701
- function us(n, r, t) {
2708
+ function cs(n, r, t) {
2702
2709
  const e = {
2703
2710
  key: r,
2704
2711
  source: t.source.key,
@@ -2706,7 +2713,7 @@ function us(n, r, t) {
2706
2713
  };
2707
2714
  return bi(t.attributes) || (e.attributes = ue({}, t.attributes)), n === "mixed" && t.undirected && (e.undirected = !0), e;
2708
2715
  }
2709
- function ls(n) {
2716
+ function hs(n) {
2710
2717
  if (!he(n))
2711
2718
  throw new H(
2712
2719
  'Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.'
@@ -2720,7 +2727,7 @@ function ls(n) {
2720
2727
  "Graph.import: invalid attributes. Attributes should be a plain object, null or omitted."
2721
2728
  );
2722
2729
  }
2723
- function cs(n) {
2730
+ function ds(n) {
2724
2731
  if (!he(n))
2725
2732
  throw new H(
2726
2733
  'Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.'
@@ -2742,12 +2749,12 @@ function cs(n) {
2742
2749
  "Graph.import: invalid undirectedness information. Undirected should be boolean or omitted."
2743
2750
  );
2744
2751
  }
2745
- const hs = fo(), ds = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"]), bn = /* @__PURE__ */ new Set([
2752
+ const fs = po(), gs = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"]), bn = /* @__PURE__ */ new Set([
2746
2753
  "domain",
2747
2754
  "_events",
2748
2755
  "_eventsCount",
2749
2756
  "_maxListeners"
2750
- ]), fs = [
2757
+ ]), ps = [
2751
2758
  {
2752
2759
  name: (n) => `${n}Edge`,
2753
2760
  generateKey: !0
@@ -2773,12 +2780,12 @@ const hs = fo(), ds = /* @__PURE__ */ new Set(["directed", "undirected", "mixed"
2773
2780
  name: (n) => `${n}UndirectedEdgeWithKey`,
2774
2781
  type: "undirected"
2775
2782
  }
2776
- ], gs = {
2783
+ ], vs = {
2777
2784
  allowSelfLoops: !0,
2778
2785
  multi: !1,
2779
2786
  type: "mixed"
2780
2787
  };
2781
- function ps(n, r, t) {
2788
+ function ms(n, r, t) {
2782
2789
  if (t && !he(t))
2783
2790
  throw new H(
2784
2791
  `Graph.addNode: invalid attributes. Expecting an object but got "${t}"`
@@ -2854,7 +2861,7 @@ function ki(n, r, t, e, i, a, o, s) {
2854
2861
  const v = a === o;
2855
2862
  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;
2856
2863
  }
2857
- function vs(n, r, t, e, i, a, o, s, u) {
2864
+ function ys(n, r, t, e, i, a, o, s, u) {
2858
2865
  if (!e && n.type === "undirected")
2859
2866
  throw new Q(
2860
2867
  `Graph.${r}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`
@@ -2939,11 +2946,11 @@ function Je(n, r) {
2939
2946
  }
2940
2947
  class ae extends Wr.EventEmitter {
2941
2948
  constructor(r) {
2942
- if (super(), r = ue({}, gs, r), typeof r.multi != "boolean")
2949
+ if (super(), r = ue({}, vs, r), typeof r.multi != "boolean")
2943
2950
  throw new H(
2944
2951
  `Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${r.multi}".`
2945
2952
  );
2946
- if (!ds.has(r.type))
2953
+ if (!gs.has(r.type))
2947
2954
  throw new H(
2948
2955
  `Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${r.type}".`
2949
2956
  );
@@ -2953,7 +2960,7 @@ class ae extends Wr.EventEmitter {
2953
2960
  );
2954
2961
  const t = r.type === "mixed" ? wi : r.type === "directed" ? Ei : _i;
2955
2962
  Ee(this, "NodeDataClass", t);
2956
- const e = "geid_" + hs() + "_";
2963
+ const e = "geid_" + fs() + "_";
2957
2964
  let i = 0;
2958
2965
  const a = () => {
2959
2966
  let o;
@@ -3691,7 +3698,7 @@ class ae extends Wr.EventEmitter {
3691
3698
  * @throws {Error} - Will throw if the given attributes are not an object.
3692
3699
  */
3693
3700
  addNode(r, t) {
3694
- return ps(this, r, t).key;
3701
+ return ms(this, r, t).key;
3695
3702
  }
3696
3703
  /**
3697
3704
  * Method used to merge a node into the graph.
@@ -4091,14 +4098,14 @@ class ae extends Wr.EventEmitter {
4091
4098
  throw new H(
4092
4099
  "Graph.forEachAdjacencyEntry: expecting a callback."
4093
4100
  );
4094
- It(!1, !1, !1, this, r);
4101
+ Pt(!1, !1, !1, this, r);
4095
4102
  }
4096
4103
  forEachAdjacencyEntryWithOrphans(r) {
4097
4104
  if (typeof r != "function")
4098
4105
  throw new H(
4099
4106
  "Graph.forEachAdjacencyEntryWithOrphans: expecting a callback."
4100
4107
  );
4101
- It(!1, !1, !0, this, r);
4108
+ Pt(!1, !1, !0, this, r);
4102
4109
  }
4103
4110
  /**
4104
4111
  * Method iterating over the graph's assymetric adjacency using the given callback.
@@ -4110,14 +4117,14 @@ class ae extends Wr.EventEmitter {
4110
4117
  throw new H(
4111
4118
  "Graph.forEachAssymetricAdjacencyEntry: expecting a callback."
4112
4119
  );
4113
- It(!1, !0, !1, this, r);
4120
+ Pt(!1, !0, !1, this, r);
4114
4121
  }
4115
4122
  forEachAssymetricAdjacencyEntryWithOrphans(r) {
4116
4123
  if (typeof r != "function")
4117
4124
  throw new H(
4118
4125
  "Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback."
4119
4126
  );
4120
- It(!1, !0, !0, this, r);
4127
+ Pt(!1, !0, !0, this, r);
4121
4128
  }
4122
4129
  /**
4123
4130
  * Method returning the list of the graph's nodes.
@@ -4281,11 +4288,11 @@ class ae extends Wr.EventEmitter {
4281
4288
  const r = new Array(this._nodes.size);
4282
4289
  let t = 0;
4283
4290
  this._nodes.forEach((i, a) => {
4284
- r[t++] = ss(a, i);
4291
+ r[t++] = ls(a, i);
4285
4292
  });
4286
4293
  const e = new Array(this._edges.size);
4287
4294
  return t = 0, this._edges.forEach((i, a) => {
4288
- e[t++] = us(this.type, a, i);
4295
+ e[t++] = cs(this.type, a, i);
4289
4296
  }), {
4290
4297
  options: {
4291
4298
  type: this.type,
@@ -4329,7 +4336,7 @@ class ae extends Wr.EventEmitter {
4329
4336
  "Graph.import: invalid nodes. Expecting an array."
4330
4337
  );
4331
4338
  for (e = 0, i = a.length; e < i; e++) {
4332
- o = a[e], ls(o);
4339
+ o = a[e], hs(o);
4333
4340
  const { key: u, attributes: l } = o;
4334
4341
  t ? this.mergeNode(u, l) : this.addNode(u, l);
4335
4342
  }
@@ -4341,7 +4348,7 @@ class ae extends Wr.EventEmitter {
4341
4348
  "Graph.import: invalid edges. Expecting an array."
4342
4349
  );
4343
4350
  for (e = 0, i = a.length; e < i; e++) {
4344
- s = a[e], cs(s);
4351
+ s = a[e], ds(s);
4345
4352
  const {
4346
4353
  source: l,
4347
4354
  target: c,
@@ -4460,9 +4467,9 @@ class ae extends Wr.EventEmitter {
4460
4467
  }
4461
4468
  }
4462
4469
  typeof Symbol < "u" && (ae.prototype[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = ae.prototype.inspect);
4463
- fs.forEach((n) => {
4470
+ ps.forEach((n) => {
4464
4471
  ["add", "merge", "update"].forEach((r) => {
4465
- const t = n.name(r), e = r === "add" ? ki : vs;
4472
+ const t = n.name(r), e = r === "add" ? ki : ys;
4466
4473
  n.generateKey ? ae.prototype[t] = function(i, a, o) {
4467
4474
  return e(
4468
4475
  this,
@@ -4490,10 +4497,10 @@ fs.forEach((n) => {
4490
4497
  };
4491
4498
  });
4492
4499
  });
4493
- Ro(ae);
4494
- Oo(ae);
4495
- Qo(ae);
4496
- os(ae);
4500
+ ko(ae);
4501
+ No(ae);
4502
+ es(ae);
4503
+ us(ae);
4497
4504
  class Ci extends ae {
4498
4505
  constructor(r) {
4499
4506
  const t = ue({ type: "directed" }, r);
@@ -4581,7 +4588,7 @@ ae.MultiUndirectedGraph = Gi;
4581
4588
  ae.InvalidArgumentsGraphError = H;
4582
4589
  ae.NotFoundGraphError = M;
4583
4590
  ae.UsageGraphError = Q;
4584
- function ms(n, r) {
4591
+ function bs(n, r) {
4585
4592
  if (typeof n != "object" || !n) return n;
4586
4593
  var t = n[Symbol.toPrimitive];
4587
4594
  if (t !== void 0) {
@@ -4592,7 +4599,7 @@ function ms(n, r) {
4592
4599
  return String(n);
4593
4600
  }
4594
4601
  function Et(n) {
4595
- var r = ms(n, "string");
4602
+ var r = bs(n, "string");
4596
4603
  return typeof r == "symbol" ? r : r + "";
4597
4604
  }
4598
4605
  function ge(n, r) {
@@ -4614,27 +4621,27 @@ function nt(n) {
4614
4621
  return r.__proto__ || Object.getPrototypeOf(r);
4615
4622
  }, nt(n);
4616
4623
  }
4617
- function Pi() {
4624
+ function Ii() {
4618
4625
  try {
4619
4626
  var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
4620
4627
  }));
4621
4628
  } catch {
4622
4629
  }
4623
- return (Pi = function() {
4630
+ return (Ii = function() {
4624
4631
  return !!n;
4625
4632
  })();
4626
4633
  }
4627
- function ys(n) {
4634
+ function ws(n) {
4628
4635
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4629
4636
  return n;
4630
4637
  }
4631
- function bs(n, r) {
4638
+ function Es(n, r) {
4632
4639
  if (r && (typeof r == "object" || typeof r == "function")) return r;
4633
4640
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
4634
- return ys(n);
4641
+ return ws(n);
4635
4642
  }
4636
4643
  function Te(n, r, t) {
4637
- return r = nt(r), bs(n, Pi() ? Reflect.construct(r, t || [], nt(n).constructor) : r.apply(n, t));
4644
+ return r = nt(r), Es(n, Ii() ? Reflect.construct(r, t || [], nt(n).constructor) : r.apply(n, t));
4638
4645
  }
4639
4646
  function kr(n, r) {
4640
4647
  return kr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
@@ -4653,10 +4660,10 @@ function Se(n, r) {
4653
4660
  writable: !1
4654
4661
  }), r && kr(n, r);
4655
4662
  }
4656
- function ws(n) {
4663
+ function _s(n) {
4657
4664
  if (Array.isArray(n)) return n;
4658
4665
  }
4659
- function Es(n, r) {
4666
+ function Ts(n, r) {
4660
4667
  var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
4661
4668
  if (t != null) {
4662
4669
  var e, i, a, o, s = [], u = !0, l = !1;
@@ -4682,19 +4689,19 @@ function Cr(n, r) {
4682
4689
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
4683
4690
  return e;
4684
4691
  }
4685
- function Ii(n, r) {
4692
+ function Pi(n, r) {
4686
4693
  if (n) {
4687
4694
  if (typeof n == "string") return Cr(n, r);
4688
4695
  var t = {}.toString.call(n).slice(8, -1);
4689
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) ? Cr(n, r) : void 0;
4690
4697
  }
4691
4698
  }
4692
- function _s() {
4699
+ function Ss() {
4693
4700
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4694
4701
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
4695
4702
  }
4696
4703
  function it(n, r) {
4697
- return ws(n) || Es(n, r) || Ii(n, r) || _s();
4704
+ return _s(n) || Ts(n, r) || Pi(n, r) || Ss();
4698
4705
  }
4699
4706
  var Jt = {
4700
4707
  black: "#000000",
@@ -4845,13 +4852,13 @@ var Jt = {
4845
4852
  snow: "#FFFAFA",
4846
4853
  lightyellow: "#FFFFE0",
4847
4854
  ivory: "#FFFFF0"
4848
- }, Fi = new Int8Array(4), er = new Int32Array(Fi.buffer, 0, 1), Ts = new Float32Array(Fi.buffer, 0, 1), Ss = /^\s*rgba?\s*\(/, Rs = /^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;
4849
- function As(n) {
4855
+ }, Fi = new Int8Array(4), er = new Int32Array(Fi.buffer, 0, 1), Rs = new Float32Array(Fi.buffer, 0, 1), As = /^\s*rgba?\s*\(/, ks = /^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;
4856
+ function Cs(n) {
4850
4857
  var r = 0, t = 0, e = 0, i = 1;
4851
4858
  if (n[0] === "#")
4852
4859
  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);
4853
- else if (Ss.test(n)) {
4854
- var a = n.match(Rs);
4860
+ else if (As.test(n)) {
4861
+ var a = n.match(ks);
4855
4862
  a && (r = +a[1], t = +a[2], e = +a[3], a[4] && (i = +a[4]));
4856
4863
  }
4857
4864
  return {
@@ -4865,11 +4872,11 @@ var rt = {};
4865
4872
  for (var Ft in Jt)
4866
4873
  rt[Ft] = Ye(Jt[Ft]), rt[Jt[Ft]] = rt[Ft];
4867
4874
  function Oi(n, r, t, e, i) {
4868
- return er[0] = e << 24 | t << 16 | r << 8 | n, er[0] = er[0] & 4278190079, Ts[0];
4875
+ return er[0] = e << 24 | t << 16 | r << 8 | n, er[0] = er[0] & 4278190079, Rs[0];
4869
4876
  }
4870
4877
  function Ye(n) {
4871
4878
  if (n = n.toLowerCase(), typeof rt[n] < "u") return rt[n];
4872
- var r = As(n), t = r.r, e = r.g, i = r.b, a = r.a;
4879
+ var r = Cs(n), t = r.r, e = r.g, i = r.b, a = r.a;
4873
4880
  a = a * 255 | 0;
4874
4881
  var o = Oi(t, e, i, a);
4875
4882
  return rt[n] = o, o;
@@ -4918,13 +4925,13 @@ function j(n) {
4918
4925
  }
4919
4926
  return n;
4920
4927
  }
4921
- function ks(n, r) {
4928
+ function xs(n, r) {
4922
4929
  for (; !{}.hasOwnProperty.call(n, r) && (n = nt(n)) !== null; ) ;
4923
4930
  return n;
4924
4931
  }
4925
4932
  function xr() {
4926
4933
  return xr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
4927
- var e = ks(n, r);
4934
+ var e = xs(n, r);
4928
4935
  if (e) {
4929
4936
  var i = Object.getOwnPropertyDescriptor(e, r);
4930
4937
  return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
@@ -4937,13 +4944,13 @@ function Ni(n, r, t, e) {
4937
4944
  return i.apply(t, a);
4938
4945
  } : i;
4939
4946
  }
4940
- function Cs(n) {
4947
+ function Ds(n) {
4941
4948
  return n.normalized ? 1 : n.size;
4942
4949
  }
4943
4950
  function rr(n) {
4944
4951
  var r = 0;
4945
4952
  return n.forEach(function(t) {
4946
- return r += Cs(t);
4953
+ return r += Ds(t);
4947
4954
  }), r;
4948
4955
  }
4949
4956
  function Ui(n, r, t) {
@@ -4960,13 +4967,13 @@ function Ui(n, r, t) {
4960
4967
  }
4961
4968
  return i;
4962
4969
  }
4963
- function xs(n, r) {
4970
+ function Ls(n, r) {
4964
4971
  return Ui("VERTEX", n, r);
4965
4972
  }
4966
- function Ds(n, r) {
4973
+ function Gs(n, r) {
4967
4974
  return Ui("FRAGMENT", n, r);
4968
4975
  }
4969
- function Ls(n, r) {
4976
+ function Is(n, r) {
4970
4977
  var t = n.createProgram();
4971
4978
  if (t === null)
4972
4979
  throw new Error("loadProgram: error while creating the program.");
@@ -4985,7 +4992,7 @@ function Rn(n) {
4985
4992
  r.deleteShader(i), r.deleteShader(a), r.deleteProgram(e), r.deleteBuffer(t);
4986
4993
  }
4987
4994
  var An = `#define PICKING_MODE
4988
- `, Gs = 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() {
4995
+ `, Ps = 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() {
4989
4996
  function n(r, t, e) {
4990
4997
  ge(this, n), N(this, "array", new Float32Array()), N(this, "constantArray", new Float32Array()), N(this, "capacity", 0), N(this, "verticesCount", 0);
4991
4998
  var i = this.getDefinition();
@@ -5011,7 +5018,7 @@ var An = `#define PICKING_MODE
5011
5018
  value: function(t, e, i, a, o) {
5012
5019
  var s = this.getDefinition(), u = e.createBuffer();
5013
5020
  if (u === null) throw new Error("Program: error while creating the WebGL buffer.");
5014
- var l = xs(e, i), c = Ds(e, a), h = Ls(e, [l, c]), v = {};
5021
+ var l = Ls(e, i), c = Gs(e, a), h = Is(e, [l, c]), v = {};
5015
5022
  s.UNIFORMS.forEach(function(R) {
5016
5023
  var w = e.getUniformLocation(h, R);
5017
5024
  w && (v[R] = w);
@@ -5066,7 +5073,7 @@ var An = `#define PICKING_MODE
5066
5073
  }, {
5067
5074
  key: "bindAttribute",
5068
5075
  value: function(t, e, i, a) {
5069
- var o = Gs[t.type];
5076
+ var o = Ps[t.type];
5070
5077
  if (typeof o != "number") throw new Error('Program.bind: yet unsupported attribute type "'.concat(t.type, '"'));
5071
5078
  var s = e.attributeLocations[t.name], u = e.gl;
5072
5079
  if (s !== -1) {
@@ -5152,7 +5159,7 @@ var An = `#define PICKING_MODE
5152
5159
  return this.processVisibleItem(zi(e), o, a);
5153
5160
  }
5154
5161
  }]);
5155
- })($i), Ht = /* @__PURE__ */ (function(n) {
5162
+ })($i), jt = /* @__PURE__ */ (function(n) {
5156
5163
  function r() {
5157
5164
  var t;
5158
5165
  ge(this, r);
@@ -5178,7 +5185,7 @@ var An = `#define PICKING_MODE
5178
5185
  }
5179
5186
  }]);
5180
5187
  })($i);
5181
- function Ps(n, r) {
5188
+ function Fs(n, r) {
5182
5189
  return /* @__PURE__ */ (function() {
5183
5190
  function t(e, i, a) {
5184
5191
  ge(this, t), N(this, "drawLabel", r), this.programs = n.map(function(o) {
@@ -5216,7 +5223,7 @@ function Ps(n, r) {
5216
5223
  }]);
5217
5224
  })();
5218
5225
  }
5219
- function Is(n, r, t, e, i) {
5226
+ function Os(n, r, t, e, i) {
5220
5227
  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;
5221
5228
  if (l) {
5222
5229
  n.fillStyle = u, n.font = "".concat(s, " ").concat(a, "px ").concat(o);
@@ -5241,7 +5248,7 @@ function Bi(n, r, t) {
5241
5248
  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);
5242
5249
  }
5243
5250
  }
5244
- function Fs(n, r, t) {
5251
+ function zs(n, r, t) {
5245
5252
  var e = t.labelSize, i = t.labelFont, a = t.labelWeight;
5246
5253
  n.font = "".concat(a, " ").concat(e, "px ").concat(i), n.fillStyle = "#FFF", n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 8, n.shadowColor = "#000";
5247
5254
  var o = 2;
@@ -5252,7 +5259,7 @@ function Fs(n, r, t) {
5252
5259
  n.beginPath(), n.arc(r.x, r.y, r.size + o, 0, Math.PI * 2), n.closePath(), n.fill();
5253
5260
  n.shadowOffsetX = 0, n.shadowOffsetY = 0, n.shadowBlur = 0, Bi(n, r, t);
5254
5261
  }
5255
- var Os = (
5262
+ var Ns = (
5256
5263
  /*glsl*/
5257
5264
  `
5258
5265
  precision highp float;
@@ -5287,7 +5294,7 @@ void main(void) {
5287
5294
  #endif
5288
5295
  }
5289
5296
  `
5290
- ), zs = Os, Ns = (
5297
+ ), Us = Ns, $s = (
5291
5298
  /*glsl*/
5292
5299
  `
5293
5300
  attribute vec4 a_id;
@@ -5331,7 +5338,7 @@ void main() {
5331
5338
  v_color.a *= bias;
5332
5339
  }
5333
5340
  `
5334
- ), Us = Ns, Wi = WebGLRenderingContext, kn = Wi.UNSIGNED_BYTE, nr = Wi.FLOAT, $s = ["u_sizeRatio", "u_correctionRatio", "u_matrix"], At = /* @__PURE__ */ (function(n) {
5341
+ ), Ms = $s, Wi = WebGLRenderingContext, kn = Wi.UNSIGNED_BYTE, nr = Wi.FLOAT, Bs = ["u_sizeRatio", "u_correctionRatio", "u_matrix"], At = /* @__PURE__ */ (function(n) {
5335
5342
  function r() {
5336
5343
  return ge(this, r), Te(this, r, arguments);
5337
5344
  }
@@ -5340,10 +5347,10 @@ void main() {
5340
5347
  value: function() {
5341
5348
  return {
5342
5349
  VERTICES: 3,
5343
- VERTEX_SHADER_SOURCE: Us,
5344
- FRAGMENT_SHADER_SOURCE: zs,
5350
+ VERTEX_SHADER_SOURCE: Ms,
5351
+ FRAGMENT_SHADER_SOURCE: Us,
5345
5352
  METHOD: WebGLRenderingContext.TRIANGLES,
5346
- UNIFORMS: $s,
5353
+ UNIFORMS: Bs,
5347
5354
  ATTRIBUTES: [{
5348
5355
  name: "a_position",
5349
5356
  size: 2,
@@ -5388,7 +5395,7 @@ void main() {
5388
5395
  N(At, "ANGLE_1", 0);
5389
5396
  N(At, "ANGLE_2", 2 * Math.PI / 3);
5390
5397
  N(At, "ANGLE_3", 4 * Math.PI / 3);
5391
- var Ms = (
5398
+ var Ws = (
5392
5399
  /*glsl*/
5393
5400
  `
5394
5401
  precision mediump float;
@@ -5399,7 +5406,7 @@ void main(void) {
5399
5406
  gl_FragColor = v_color;
5400
5407
  }
5401
5408
  `
5402
- ), Bs = Ms, Ws = (
5409
+ ), Hs = Ws, js = (
5403
5410
  /*glsl*/
5404
5411
  `
5405
5412
  attribute vec2 a_position;
@@ -5468,13 +5475,13 @@ void main() {
5468
5475
  v_color.a *= bias;
5469
5476
  }
5470
5477
  `
5471
- ), Hs = Ws, Hi = WebGLRenderingContext, Cn = Hi.UNSIGNED_BYTE, Ot = Hi.FLOAT, js = ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness", "u_lengthToThicknessRatio", "u_widenessToThicknessRatio"], jt = {
5478
+ ), Vs = js, Hi = WebGLRenderingContext, Cn = Hi.UNSIGNED_BYTE, Ot = Hi.FLOAT, qs = ["u_matrix", "u_sizeRatio", "u_correctionRatio", "u_minEdgeThickness", "u_lengthToThicknessRatio", "u_widenessToThicknessRatio"], Vt = {
5472
5479
  extremity: "target",
5473
5480
  lengthToThicknessRatio: 2.5,
5474
5481
  widenessToThicknessRatio: 2
5475
5482
  };
5476
5483
  function ji(n) {
5477
- var r = j(j({}, jt), {});
5484
+ var r = j(j({}, Vt), {});
5478
5485
  return /* @__PURE__ */ (function(t) {
5479
5486
  function e() {
5480
5487
  return ge(this, e), Te(this, e, arguments);
@@ -5484,10 +5491,10 @@ function ji(n) {
5484
5491
  value: function() {
5485
5492
  return {
5486
5493
  VERTICES: 3,
5487
- VERTEX_SHADER_SOURCE: Hs,
5488
- FRAGMENT_SHADER_SOURCE: Bs,
5494
+ VERTEX_SHADER_SOURCE: Vs,
5495
+ FRAGMENT_SHADER_SOURCE: Hs,
5489
5496
  METHOD: WebGLRenderingContext.TRIANGLES,
5490
- UNIFORMS: js,
5497
+ UNIFORMS: qs,
5491
5498
  ATTRIBUTES: [{
5492
5499
  name: "a_position",
5493
5500
  size: 2,
@@ -5538,10 +5545,10 @@ function ji(n) {
5538
5545
  s.uniformMatrix3fv(l, !1, a.matrix), s.uniform1f(c, a.sizeRatio), s.uniform1f(h, a.correctionRatio), s.uniform1f(v, a.minEdgeThickness), s.uniform1f(y, r.lengthToThicknessRatio), s.uniform1f(b, r.widenessToThicknessRatio);
5539
5546
  }
5540
5547
  }]);
5541
- })(Ht);
5548
+ })(jt);
5542
5549
  }
5543
5550
  ji();
5544
- var Vs = (
5551
+ var Ks = (
5545
5552
  /*glsl*/
5546
5553
  `
5547
5554
  precision mediump float;
@@ -5570,7 +5577,7 @@ void main(void) {
5570
5577
  #endif
5571
5578
  }
5572
5579
  `
5573
- ), Vi = Vs, qs = (
5580
+ ), Vi = Ks, Xs = (
5574
5581
  /*glsl*/
5575
5582
  `
5576
5583
  attribute vec4 a_id;
@@ -5641,11 +5648,11 @@ void main() {
5641
5648
  v_color.a *= bias;
5642
5649
  }
5643
5650
  `
5644
- ), Ks = qs, qi = WebGLRenderingContext, xn = qi.UNSIGNED_BYTE, qe = qi.FLOAT, Xs = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness", "u_lengthToThicknessRatio"], Ys = {
5645
- lengthToThicknessRatio: jt.lengthToThicknessRatio
5651
+ ), Ys = Xs, qi = WebGLRenderingContext, xn = qi.UNSIGNED_BYTE, qe = qi.FLOAT, Zs = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness", "u_lengthToThicknessRatio"], Qs = {
5652
+ lengthToThicknessRatio: Vt.lengthToThicknessRatio
5646
5653
  };
5647
5654
  function Ki(n) {
5648
- var r = j(j({}, Ys), {});
5655
+ var r = j(j({}, Qs), {});
5649
5656
  return /* @__PURE__ */ (function(t) {
5650
5657
  function e() {
5651
5658
  return ge(this, e), Te(this, e, arguments);
@@ -5655,10 +5662,10 @@ function Ki(n) {
5655
5662
  value: function() {
5656
5663
  return {
5657
5664
  VERTICES: 6,
5658
- VERTEX_SHADER_SOURCE: Ks,
5665
+ VERTEX_SHADER_SOURCE: Ys,
5659
5666
  FRAGMENT_SHADER_SOURCE: Vi,
5660
5667
  METHOD: WebGLRenderingContext.TRIANGLES,
5661
- UNIFORMS: Xs,
5668
+ UNIFORMS: Zs,
5662
5669
  ATTRIBUTES: [{
5663
5670
  name: "a_positionStart",
5664
5671
  size: 2,
@@ -5723,13 +5730,13 @@ function Ki(n) {
5723
5730
  s.uniformMatrix3fv(l, !1, a.matrix), s.uniform1f(c, a.zoomRatio), s.uniform1f(b, a.sizeRatio), s.uniform1f(y, a.correctionRatio), s.uniform1f(v, a.pixelRatio), s.uniform1f(h, a.antiAliasingFeather), s.uniform1f(R, a.minEdgeThickness), s.uniform1f(w, r.lengthToThicknessRatio);
5724
5731
  }
5725
5732
  }]);
5726
- })(Ht);
5733
+ })(jt);
5727
5734
  }
5728
5735
  Ki();
5729
- function Zs(n) {
5730
- return Ps([Ki(), ji()]);
5736
+ function Js(n) {
5737
+ return Fs([Ki(), ji()]);
5731
5738
  }
5732
- var Qs = Zs(), Xi = Qs, Js = (
5739
+ var eu = Js(), Xi = eu, tu = (
5733
5740
  /*glsl*/
5734
5741
  `
5735
5742
  attribute vec4 a_id;
@@ -5797,7 +5804,7 @@ void main() {
5797
5804
  v_color.a *= bias;
5798
5805
  }
5799
5806
  `
5800
- ), eu = Js, Yi = WebGLRenderingContext, Dn = Yi.UNSIGNED_BYTE, ft = Yi.FLOAT, tu = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness"], Zi = /* @__PURE__ */ (function(n) {
5807
+ ), ru = tu, Yi = WebGLRenderingContext, Dn = Yi.UNSIGNED_BYTE, ft = Yi.FLOAT, nu = ["u_matrix", "u_zoomRatio", "u_sizeRatio", "u_correctionRatio", "u_pixelRatio", "u_feather", "u_minEdgeThickness"], Zi = /* @__PURE__ */ (function(n) {
5801
5808
  function r() {
5802
5809
  return ge(this, r), Te(this, r, arguments);
5803
5810
  }
@@ -5806,10 +5813,10 @@ void main() {
5806
5813
  value: function() {
5807
5814
  return {
5808
5815
  VERTICES: 6,
5809
- VERTEX_SHADER_SOURCE: eu,
5816
+ VERTEX_SHADER_SOURCE: ru,
5810
5817
  FRAGMENT_SHADER_SOURCE: Vi,
5811
5818
  METHOD: WebGLRenderingContext.TRIANGLES,
5812
- UNIFORMS: tu,
5819
+ UNIFORMS: nu,
5813
5820
  ATTRIBUTES: [{
5814
5821
  name: "a_positionStart",
5815
5822
  size: 2,
@@ -5865,7 +5872,7 @@ void main() {
5865
5872
  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);
5866
5873
  }
5867
5874
  }]);
5868
- })(Ht), Kr = /* @__PURE__ */ (function(n) {
5875
+ })(jt), Kr = /* @__PURE__ */ (function(n) {
5869
5876
  function r() {
5870
5877
  var t;
5871
5878
  return ge(this, r), t = Te(this, r), t.rawEmitter = t, t;
@@ -5877,31 +5884,31 @@ function Ze() {
5877
5884
  return r !== null && typeof r == "object" && typeof r.addUndirectedEdgeWithKey == "function" && typeof r.dropNode == "function" && typeof r.multi == "boolean";
5878
5885
  }), ir;
5879
5886
  }
5880
- var ru = Ze();
5881
- const nu = /* @__PURE__ */ Br(ru);
5882
- var iu = function(r) {
5887
+ var iu = Ze();
5888
+ const au = /* @__PURE__ */ Br(iu);
5889
+ var ou = function(r) {
5883
5890
  return r;
5884
- }, au = function(r) {
5891
+ }, su = function(r) {
5885
5892
  return r * r;
5886
- }, ou = function(r) {
5893
+ }, uu = function(r) {
5887
5894
  return r * (2 - r);
5888
- }, su = function(r) {
5895
+ }, lu = function(r) {
5889
5896
  return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1);
5890
- }, uu = function(r) {
5897
+ }, cu = function(r) {
5891
5898
  return r * r * r;
5892
- }, lu = function(r) {
5899
+ }, hu = function(r) {
5893
5900
  return --r * r * r + 1;
5894
- }, cu = function(r) {
5901
+ }, du = function(r) {
5895
5902
  return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2);
5896
- }, hu = {
5897
- linear: iu,
5898
- quadraticIn: au,
5899
- quadraticOut: ou,
5900
- quadraticInOut: su,
5901
- cubicIn: uu,
5902
- cubicOut: lu,
5903
- cubicInOut: cu
5904
- }, du = {
5903
+ }, fu = {
5904
+ linear: ou,
5905
+ quadraticIn: su,
5906
+ quadraticOut: uu,
5907
+ quadraticInOut: lu,
5908
+ cubicIn: cu,
5909
+ cubicOut: hu,
5910
+ cubicInOut: du
5911
+ }, gu = {
5905
5912
  easing: "quadraticInOut",
5906
5913
  duration: 150
5907
5914
  };
@@ -5915,7 +5922,7 @@ function Gn(n, r) {
5915
5922
  var t = Math.sin(r), e = Math.cos(r);
5916
5923
  return n[0] = e, n[1] = t, n[3] = -t, n[4] = e, n;
5917
5924
  }
5918
- function Pn(n, r, t) {
5925
+ function In(n, r, t) {
5919
5926
  return n[6] = r, n[7] = t, n;
5920
5927
  }
5921
5928
  function $e(n, r) {
@@ -5929,22 +5936,22 @@ function Dr(n, r) {
5929
5936
  y: l * i + c * o + u * t
5930
5937
  };
5931
5938
  }
5932
- function fu(n, r) {
5939
+ function pu(n, r) {
5933
5940
  var t = n.height / n.width, e = r.height / r.width;
5934
5941
  return t < 1 && e > 1 || t > 1 && e < 1 ? 1 : Math.min(Math.max(e, 1 / e), Math.max(1 / t, t));
5935
5942
  }
5936
5943
  function gt(n, r, t, e, i) {
5937
- 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 = fu(r, t);
5938
- return i ? ($e(h, Pn(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, Pn(ke(), -s, -u))), h;
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 = pu(r, t);
5945
+ 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;
5939
5946
  }
5940
- function gu(n, r, t) {
5947
+ function vu(n, r, t) {
5941
5948
  var e = Dr(n, {
5942
5949
  x: Math.cos(r.angle),
5943
5950
  y: Math.sin(r.angle)
5944
5951
  }, 0), i = e.x, a = e.y;
5945
5952
  return 1 / Math.sqrt(Math.pow(i, 2) + Math.pow(a, 2)) / t.width;
5946
5953
  }
5947
- function pu(n) {
5954
+ function mu(n) {
5948
5955
  if (!n.order) return {
5949
5956
  x: [0, 1],
5950
5957
  y: [0, 1]
@@ -5958,14 +5965,14 @@ function pu(n) {
5958
5965
  y: [e, i]
5959
5966
  };
5960
5967
  }
5961
- function vu(n) {
5962
- if (!nu(n)) throw new Error("Sigma: invalid graph instance.");
5968
+ function yu(n) {
5969
+ if (!au(n)) throw new Error("Sigma: invalid graph instance.");
5963
5970
  n.forEachNode(function(r, t) {
5964
5971
  if (!Number.isFinite(t.x) || !Number.isFinite(t.y))
5965
5972
  throw new Error("Sigma: Coordinates of node ".concat(r, " are invalid. A node must have a numeric 'x' and 'y' attribute."));
5966
5973
  });
5967
5974
  }
5968
- function mu(n, r, t) {
5975
+ function bu(n, r, t) {
5969
5976
  var e = document.createElement(n);
5970
5977
  if (r)
5971
5978
  for (var i in r)
@@ -5975,7 +5982,7 @@ function mu(n, r, t) {
5975
5982
  e.setAttribute(a, t[a]);
5976
5983
  return e;
5977
5984
  }
5978
- function In() {
5985
+ function Pn() {
5979
5986
  return typeof window.devicePixelRatio < "u" ? window.devicePixelRatio : 1;
5980
5987
  }
5981
5988
  function Fn(n, r, t) {
@@ -6054,9 +6061,9 @@ var Xr = {
6054
6061
  attribute: "color"
6055
6062
  },
6056
6063
  stagePadding: 30,
6057
- defaultDrawEdgeLabel: Is,
6064
+ defaultDrawEdgeLabel: Os,
6058
6065
  defaultDrawNodeLabel: Bi,
6059
- defaultDrawNodeHover: Fs,
6066
+ defaultDrawNodeHover: zs,
6060
6067
  minEdgeThickness: 1.7,
6061
6068
  antiAliasingFeather: 1,
6062
6069
  // Mouse and touch settings
@@ -6096,9 +6103,9 @@ var Xr = {
6096
6103
  nodeProgramClasses: {},
6097
6104
  nodeHoverProgramClasses: {},
6098
6105
  edgeProgramClasses: {}
6099
- }, yu = {
6106
+ }, wu = {
6100
6107
  circle: At
6101
- }, bu = {
6108
+ }, Eu = {
6102
6109
  arrow: Xi,
6103
6110
  line: Zi
6104
6111
  };
@@ -6109,9 +6116,9 @@ function or(n) {
6109
6116
  if (typeof r == "number" && typeof t == "number" && t < r)
6110
6117
  throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.");
6111
6118
  }
6112
- function wu(n) {
6119
+ function _u(n) {
6113
6120
  var r = ar({}, Xr, n);
6114
- return r.nodeProgramClasses = ar({}, yu, r.nodeProgramClasses), r.edgeProgramClasses = ar({}, bu, r.edgeProgramClasses), r;
6121
+ return r.nodeProgramClasses = ar({}, wu, r.nodeProgramClasses), r.edgeProgramClasses = ar({}, Eu, r.edgeProgramClasses), r;
6115
6122
  }
6116
6123
  var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
6117
6124
  function r() {
@@ -6227,7 +6234,7 @@ var Nt = 1.5, Nn = /* @__PURE__ */ (function(n) {
6227
6234
  return i.animate(e, a, y);
6228
6235
  });
6229
6236
  if (this.enabled) {
6230
- var s = j(j({}, du), a), u = this.validateState(e), l = typeof s.easing == "function" ? s.easing : hu[s.easing], c = Date.now(), h = this.getState(), v = function() {
6237
+ var s = j(j({}, gu), a), u = this.validateState(e), l = typeof s.easing == "function" ? s.easing : fu[s.easing], c = Date.now(), h = this.getState(), v = function() {
6231
6238
  var b = (Date.now() - c) / s.duration;
6232
6239
  if (b >= 1) {
6233
6240
  i.nextFrame = null, i.setState(u), i.animationCallback && (i.animationCallback.call(null), i.animationCallback = void 0);
@@ -6323,14 +6330,14 @@ function pt(n) {
6323
6330
  });
6324
6331
  return r;
6325
6332
  }
6326
- function Eu(n, r) {
6333
+ function Tu(n, r) {
6327
6334
  return j(j({}, Fe(n, r)), {}, {
6328
6335
  delta: Qi(n)
6329
6336
  });
6330
6337
  }
6331
- var _u = 2;
6338
+ var Su = 2;
6332
6339
  function Ut(n) {
6333
- for (var r = [], t = 0, e = Math.min(n.length, _u); t < e; t++) r.push(n[t]);
6340
+ for (var r = [], t = 0, e = Math.min(n.length, Su); t < e; t++) r.push(n[t]);
6334
6341
  return r;
6335
6342
  }
6336
6343
  function vt(n, r, t) {
@@ -6360,12 +6367,12 @@ var Ji = /* @__PURE__ */ (function(n) {
6360
6367
  return ge(this, r), i = Te(this, r), i.container = t, i.renderer = e, i;
6361
6368
  }
6362
6369
  return Se(r, n), pe(r);
6363
- })(Kr), Tu = ["doubleClickTimeout", "doubleClickZoomingDuration", "doubleClickZoomingRatio", "dragTimeout", "draggedEventsTolerance", "inertiaDuration", "inertiaRatio", "zoomDuration", "zoomingRatio"], Su = Tu.reduce(function(n, r) {
6370
+ })(Kr), Ru = ["doubleClickTimeout", "doubleClickZoomingDuration", "doubleClickZoomingRatio", "dragTimeout", "draggedEventsTolerance", "inertiaDuration", "inertiaRatio", "zoomDuration", "zoomingRatio"], Au = Ru.reduce(function(n, r) {
6364
6371
  return j(j({}, n), {}, N({}, r, Xr[r]));
6365
- }, {}), Ru = /* @__PURE__ */ (function(n) {
6372
+ }, {}), ku = /* @__PURE__ */ (function(n) {
6366
6373
  function r(t, e) {
6367
6374
  var i;
6368
- 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", Su), 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, {
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", Au), 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, {
6369
6376
  capture: !1
6370
6377
  }), t.addEventListener("contextmenu", i.handleRightClick, {
6371
6378
  capture: !1
@@ -6500,7 +6507,7 @@ var Ji = /* @__PURE__ */ (function(n) {
6500
6507
  if (!(!this.enabled || !a.enabledZooming)) {
6501
6508
  var o = Qi(e);
6502
6509
  if (o) {
6503
- var s = Eu(e, this.container);
6510
+ var s = Tu(e, this.container);
6504
6511
  if (this.emit("wheel", s), s.sigmaDefaultPrevented) {
6505
6512
  e.preventDefault(), e.stopPropagation();
6506
6513
  return;
@@ -6521,12 +6528,12 @@ var Ji = /* @__PURE__ */ (function(n) {
6521
6528
  this.settings = e;
6522
6529
  }
6523
6530
  }]);
6524
- })(Ji), Au = ["dragTimeout", "inertiaDuration", "inertiaRatio", "doubleClickTimeout", "doubleClickZoomingRatio", "doubleClickZoomingDuration", "tapMoveTolerance"], ku = Au.reduce(function(n, r) {
6531
+ })(Ji), Cu = ["dragTimeout", "inertiaDuration", "inertiaRatio", "doubleClickTimeout", "doubleClickZoomingRatio", "doubleClickZoomingDuration", "tapMoveTolerance"], xu = Cu.reduce(function(n, r) {
6525
6532
  return j(j({}, n), {}, N({}, r, Xr[r]));
6526
- }, {}), Cu = /* @__PURE__ */ (function(n) {
6533
+ }, {}), Du = /* @__PURE__ */ (function(n) {
6527
6534
  function r(t, e) {
6528
6535
  var i;
6529
- 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", ku), i.handleStart = i.handleStart.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleMove = i.handleMove.bind(i), t.addEventListener("touchstart", i.handleStart, {
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", xu), i.handleStart = i.handleStart.bind(i), i.handleLeave = i.handleLeave.bind(i), i.handleMove = i.handleMove.bind(i), t.addEventListener("touchstart", i.handleStart, {
6530
6537
  capture: !1
6531
6538
  }), t.addEventListener("touchcancel", i.handleLeave, {
6532
6539
  capture: !1
@@ -6627,14 +6634,14 @@ var Ji = /* @__PURE__ */ (function(n) {
6627
6634
  var i = this;
6628
6635
  if (!(!this.enabled || !this.startTouchesPositions.length)) {
6629
6636
  e.preventDefault();
6630
- var a = Ut(e.touches), o = a.map(function(P) {
6631
- return De(P, i.container);
6637
+ var a = Ut(e.touches), o = a.map(function(I) {
6638
+ return De(I, i.container);
6632
6639
  }), s = this.lastTouches;
6633
6640
  this.lastTouches = a, this.lastTouchesPositions = o;
6634
6641
  var u = vt(e, s, this.container);
6635
- if (this.emit("touchmove", u), !u.sigmaDefaultPrevented && (this.hasMoved || (this.hasMoved = o.some(function(P, A) {
6642
+ if (this.emit("touchmove", u), !u.sigmaDefaultPrevented && (this.hasMoved || (this.hasMoved = o.some(function(I, A) {
6636
6643
  var z = i.startTouchesPositions[A];
6637
- return z && (P.x !== z.x || P.y !== z.y);
6644
+ return z && (I.x !== z.x || I.y !== z.y);
6638
6645
  })), !!this.hasMoved)) {
6639
6646
  this.isMoving = !0, this.movingTimeout && clearTimeout(this.movingTimeout), this.movingTimeout = window.setTimeout(function() {
6640
6647
  i.isMoving = !1;
@@ -6657,9 +6664,9 @@ var Ji = /* @__PURE__ */ (function(n) {
6657
6664
  ratio: 1
6658
6665
  }, m = o[0], p = m.x, C = m.y, L = o[1], g = L.x, x = L.y, S = Math.atan2(x - C, g - p) - this.startTouchesAngle, D = Math.hypot(x - C, g - p) / this.startTouchesDistance, O = l.getBoundedRatio(c.ratio / D);
6659
6666
  E.ratio = O, E.angle = c.angle + S;
6660
- var I = this.getDimensions(), _ = this.renderer.viewportToFramedGraph((this.startTouchesPositions || [])[0], {
6667
+ var P = this.getDimensions(), _ = this.renderer.viewportToFramedGraph((this.startTouchesPositions || [])[0], {
6661
6668
  cameraState: c
6662
- }), W = Math.min(I.width, I.height) - 2 * h, K = W / I.width, T = W / I.height, f = O / W, d = p - W / 2 / K, U = C - W / 2 / T, $ = [d * Math.cos(-E.angle) - U * Math.sin(-E.angle), U * Math.cos(-E.angle) + d * Math.sin(-E.angle)];
6669
+ }), W = Math.min(P.width, P.height) - 2 * h, K = W / P.width, T = W / P.height, f = O / W, d = p - W / 2 / K, U = C - W / 2 / T, $ = [d * Math.cos(-E.angle) - U * Math.sin(-E.angle), U * Math.cos(-E.angle) + d * Math.sin(-E.angle)];
6663
6670
  d = $[0], U = $[1], E.x = _.x - d * f, E.y = _.y + U * f, l.setState(E);
6664
6671
  break;
6665
6672
  }
@@ -6674,20 +6681,20 @@ var Ji = /* @__PURE__ */ (function(n) {
6674
6681
  }
6675
6682
  }]);
6676
6683
  })(Ji);
6677
- function xu(n) {
6684
+ function Lu(n) {
6678
6685
  if (Array.isArray(n)) return Cr(n);
6679
6686
  }
6680
- function Du(n) {
6687
+ function Gu(n) {
6681
6688
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
6682
6689
  }
6683
- function Lu() {
6690
+ function Iu() {
6684
6691
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
6685
6692
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
6686
6693
  }
6687
6694
  function Un(n) {
6688
- return xu(n) || Du(n) || Ii(n) || Lu();
6695
+ return Lu(n) || Gu(n) || Pi(n) || Iu();
6689
6696
  }
6690
- function Gu(n, r) {
6697
+ function Pu(n, r) {
6691
6698
  if (n == null) return {};
6692
6699
  var t = {};
6693
6700
  for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
@@ -6698,7 +6705,7 @@ function Gu(n, r) {
6698
6705
  }
6699
6706
  function sr(n, r) {
6700
6707
  if (n == null) return {};
6701
- var t, e, i = Gu(n, r);
6708
+ var t, e, i = Pu(n, r);
6702
6709
  if (Object.getOwnPropertySymbols) {
6703
6710
  var a = Object.getOwnPropertySymbols(n);
6704
6711
  for (e = 0; e < a.length; e++) t = a[e], r.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
@@ -6755,21 +6762,21 @@ var $n = /* @__PURE__ */ (function() {
6755
6762
  }
6756
6763
  }]);
6757
6764
  })();
6758
- function Pu(n) {
6765
+ function Fu(n) {
6759
6766
  var r = n.graph, t = n.hoveredNode, e = n.highlightedNodes, i = n.displayedNodeLabels, a = [];
6760
6767
  return r.forEachEdge(function(o, s, u, l) {
6761
6768
  (u === t || l === t || e.has(u) || e.has(l) || i.has(u) && i.has(l)) && a.push(o);
6762
6769
  }), a;
6763
6770
  }
6764
6771
  var Bn = 150, Wn = 50, Oe = Object.prototype.hasOwnProperty;
6765
- function Iu(n, r, t) {
6772
+ function Ou(n, r, t) {
6766
6773
  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?'));
6767
6774
  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;
6768
6775
  }
6769
- function Fu(n, r, t) {
6776
+ function zu(n, r, t) {
6770
6777
  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;
6771
6778
  }
6772
- var Ou = /* @__PURE__ */ (function(n) {
6779
+ var Nu = /* @__PURE__ */ (function(n) {
6773
6780
  function r(t, e) {
6774
6781
  var i, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6775
6782
  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", {
@@ -6778,7 +6785,7 @@ var Ou = /* @__PURE__ */ (function(n) {
6778
6785
  }), 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({
6779
6786
  x: [0, 1],
6780
6787
  y: [0, 1]
6781
- })), N(i, "graphToViewportRatio", 1), N(i, "itemIDsIndex", {}), N(i, "nodeIndices", {}), N(i, "edgeIndices", {}), N(i, "width", 0), N(i, "height", 0), N(i, "pixelRatio", In()), 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 = wu(a), or(i.settings), vu(t), !(e instanceof HTMLElement)) throw new Error("Sigma: container should be an html element.");
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 = _u(a), or(i.settings), yu(t), !(e instanceof HTMLElement)) throw new Error("Sigma: container should be an html element.");
6782
6789
  i.graph = t, i.container = e, i.createWebGLContext("edges", {
6783
6790
  picking: a.enableEdgeEvents
6784
6791
  }), i.createCanvasContext("edgeLabels"), i.createWebGLContext("nodes", {
@@ -6793,7 +6800,7 @@ var Ou = /* @__PURE__ */ (function(n) {
6793
6800
  i.registerNodeProgram(o, i.settings.nodeProgramClasses[o], i.settings.nodeHoverProgramClasses[o]);
6794
6801
  for (var s in i.settings.edgeProgramClasses)
6795
6802
  i.registerEdgeProgram(s, i.settings.edgeProgramClasses[s]);
6796
- return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new Ru(i.elements.mouse, i), i.mouseCaptor.setSettings(i.settings), i.touchCaptor = new Cu(i.elements.mouse, i), i.touchCaptor.setSettings(i.settings), i.bindEventHandlers(), i.bindGraphHandlers(), i.handleSettingsUpdate(), i.refresh(), i;
6803
+ return i.camera = new Nn(), i.bindCameraHandlers(), i.mouseCaptor = new ku(i.elements.mouse, i), i.mouseCaptor.setSettings(i.settings), i.touchCaptor = new Du(i.elements.mouse, i), i.touchCaptor.setSettings(i.settings), i.bindEventHandlers(), i.bindGraphHandlers(), i.handleSettingsUpdate(), i.refresh(), i;
6797
6804
  }
6798
6805
  return Se(r, n), pe(r, [{
6799
6806
  key: "registerNodeProgram",
@@ -7113,7 +7120,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7113
7120
  var e = this;
7114
7121
  this.emit("beforeProcess");
7115
7122
  var i = this.graph, a = this.settings, o = this.getDimensions();
7116
- if (this.nodeExtent = pu(this.graph), !this.settings.autoRescale) {
7123
+ if (this.nodeExtent = mu(this.graph), !this.settings.autoRescale) {
7117
7124
  var s = o.width, u = o.height, l = this.nodeExtent, c = l.x, h = l.y;
7118
7125
  this.nodeExtent = {
7119
7126
  x: [(c[0] + c[1]) / 2 - s / 2, (c[0] + c[1]) / 2 + s / 2],
@@ -7139,13 +7146,13 @@ var Ou = /* @__PURE__ */ (function(n) {
7139
7146
  return e.nodeDataCache[te].zIndex;
7140
7147
  }, m));
7141
7148
  for (var D = 0, O = m.length; D < O; D++) {
7142
- var I = m[D];
7143
- R[I] = E, k[R[I]] = {
7149
+ var P = m[D];
7150
+ R[P] = E, k[R[P]] = {
7144
7151
  type: "node",
7145
- id: I
7152
+ id: P
7146
7153
  }, E++;
7147
- var _ = this.nodeDataCache[I];
7148
- this.addNodeToProgram(I, R[I], b[_.type]++);
7154
+ var _ = this.nodeDataCache[P];
7155
+ this.addNodeToProgram(P, R[P], b[_.type]++);
7149
7156
  }
7150
7157
  for (var W = {}, K = i.edges(), T = 0, f = K.length; T < f; T++) {
7151
7158
  var d = K[T], U = this.edgeDataCache[d];
@@ -7159,8 +7166,8 @@ var Ou = /* @__PURE__ */ (function(n) {
7159
7166
  throw new Error('Sigma: could not find a suitable program for edge type "'.concat($, '"!'));
7160
7167
  this.edgePrograms[$].reallocate(W[$] || 0), W[$] = 0;
7161
7168
  }
7162
- for (var P = 0, A = K.length; P < A; P++) {
7163
- var z = K[P];
7169
+ for (var I = 0, A = K.length; I < A; I++) {
7170
+ var z = K[I];
7164
7171
  w[z] = E, k[w[z]] = {
7165
7172
  type: "edge",
7166
7173
  id: z
@@ -7226,7 +7233,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7226
7233
  });
7227
7234
  var C = E - k, L = p - m, g = this.getDimensions(), x = g.width, S = g.height, D = 0, O = 0;
7228
7235
  if (C >= x ? E < x - o ? D = E - (x - o) : k > o && (D = k - o) : E > x + o ? D = E - (x + o) : k < -o && (D = k + o), L >= S ? p < S - o ? O = p - (S - o) : m > o && (O = m - o) : p > S + o ? O = p - (S + o) : m < -o && (O = m + o), D || O) {
7229
- var I = this.viewportToFramedGraph({
7236
+ var P = this.viewportToFramedGraph({
7230
7237
  x: 0,
7231
7238
  y: 0
7232
7239
  }, {
@@ -7237,7 +7244,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7237
7244
  }, {
7238
7245
  cameraState: e
7239
7246
  });
7240
- D = _.x - I.x, O = _.y - I.y, u.x += D, u.y += O;
7247
+ D = _.x - P.x, O = _.y - P.y, u.x += D, u.y += O;
7241
7248
  }
7242
7249
  return u;
7243
7250
  }
@@ -7283,7 +7290,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7283
7290
  if (!this.settings.renderEdgeLabels) return this;
7284
7291
  var e = this.canvasContexts.edgeLabels;
7285
7292
  e.clearRect(0, 0, this.width, this.height);
7286
- var i = Pu({
7293
+ var i = Fu({
7287
7294
  graph: this.graph,
7288
7295
  hoveredNode: this.hoveredNode,
7289
7296
  displayedNodeLabels: this.displayedNodeLabels,
@@ -7382,7 +7389,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7382
7389
  return e.resetWebGLTexture(w);
7383
7390
  }), !this.graph.order) return i();
7384
7391
  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();
7385
- this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio = gu(this.matrix, s, u), this.graphToViewportRatio = this.getGraphToViewportRatio();
7392
+ this.matrix = gt(s, u, l, c), this.invMatrix = gt(s, u, l, c, !0), this.correctionRatio = vu(this.matrix, s, u), this.graphToViewportRatio = this.getGraphToViewportRatio();
7386
7393
  var h = this.getRenderParams();
7387
7394
  for (var v in this.nodePrograms) {
7388
7395
  var y = this.nodePrograms[v];
@@ -7405,7 +7412,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7405
7412
  value: function(e) {
7406
7413
  var i = Object.assign({}, this.graph.getNodeAttributes(e));
7407
7414
  this.settings.nodeReducer && (i = this.settings.nodeReducer(e, i));
7408
- var a = Iu(this.settings, e, i);
7415
+ var a = Ou(this.settings, e, i);
7409
7416
  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));
7410
7417
  }
7411
7418
  /**
@@ -7440,7 +7447,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7440
7447
  value: function(e) {
7441
7448
  var i = Object.assign({}, this.graph.getEdgeAttributes(e));
7442
7449
  this.settings.edgeReducer && (i = this.settings.edgeReducer(e, i));
7443
- var a = Fu(this.settings, e, i);
7450
+ var a = zu(this.settings, e, i);
7444
7451
  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));
7445
7452
  }
7446
7453
  /**
@@ -7600,7 +7607,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7600
7607
  value: function(e, i) {
7601
7608
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7602
7609
  if (this.elements[e]) throw new Error('Sigma: a layer named "'.concat(e, '" already exists'));
7603
- var o = mu(i, {
7610
+ var o = bu(i, {
7604
7611
  position: "absolute"
7605
7612
  }, {
7606
7613
  class: "sigma-".concat(e)
@@ -7895,7 +7902,7 @@ var Ou = /* @__PURE__ */ (function(n) {
7895
7902
  key: "resize",
7896
7903
  value: function(e) {
7897
7904
  var i = this.width, a = this.height;
7898
- if (this.width = this.container.offsetWidth, this.height = this.container.offsetHeight, this.pixelRatio = In(), this.width === 0)
7905
+ if (this.width = this.container.offsetWidth, this.height = this.container.offsetHeight, this.pixelRatio = Pn(), this.width === 0)
7899
7906
  if (this.settings.allowInvalidContainer) this.width = 1;
7900
7907
  else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");
7901
7908
  if (this.height === 0)
@@ -8215,36 +8222,36 @@ var Ou = /* @__PURE__ */ (function(n) {
8215
8222
  return e;
8216
8223
  }
8217
8224
  }]);
8218
- })(Kr), zu = Ou;
8225
+ })(Kr), Uu = Nu;
8219
8226
  function Gr(n, r) {
8220
8227
  (r == null || r > n.length) && (r = n.length);
8221
8228
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
8222
8229
  return e;
8223
8230
  }
8224
- function Nu(n) {
8231
+ function $u(n) {
8225
8232
  if (Array.isArray(n)) return Gr(n);
8226
8233
  }
8227
- function Uu(n) {
8234
+ function Mu(n) {
8228
8235
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
8229
8236
  }
8230
- function $u(n, r) {
8237
+ function Bu(n, r) {
8231
8238
  if (n) {
8232
8239
  if (typeof n == "string") return Gr(n, r);
8233
8240
  var t = {}.toString.call(n).slice(8, -1);
8234
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) ? Gr(n, r) : void 0;
8235
8242
  }
8236
8243
  }
8237
- function Mu() {
8244
+ function Wu() {
8238
8245
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
8239
8246
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
8240
8247
  }
8241
8248
  function Yr(n) {
8242
- return Nu(n) || Uu(n) || $u(n) || Mu();
8249
+ return $u(n) || Mu(n) || Bu(n) || Wu();
8243
8250
  }
8244
8251
  function Zr(n, r) {
8245
8252
  if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
8246
8253
  }
8247
- function Bu(n, r) {
8254
+ function Hu(n, r) {
8248
8255
  if (typeof n != "object" || !n) return n;
8249
8256
  var t = n[Symbol.toPrimitive];
8250
8257
  if (t !== void 0) {
@@ -8255,17 +8262,17 @@ function Bu(n, r) {
8255
8262
  return (r === "string" ? String : Number)(n);
8256
8263
  }
8257
8264
  function ea(n) {
8258
- var r = Bu(n, "string");
8265
+ var r = Hu(n, "string");
8259
8266
  return typeof r == "symbol" ? r : r + "";
8260
8267
  }
8261
- function Wu(n, r) {
8268
+ function ju(n, r) {
8262
8269
  for (var t = 0; t < r.length; t++) {
8263
8270
  var e = r[t];
8264
8271
  e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, ea(e.key), e);
8265
8272
  }
8266
8273
  }
8267
8274
  function Qr(n, r, t) {
8268
- return r && Wu(n.prototype, r), Object.defineProperty(n, "prototype", {
8275
+ return r && ju(n.prototype, r), Object.defineProperty(n, "prototype", {
8269
8276
  writable: !1
8270
8277
  }), n;
8271
8278
  }
@@ -8288,37 +8295,37 @@ function Ce(n) {
8288
8295
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8289
8296
  return n;
8290
8297
  }
8291
- function Hu(n, r) {
8298
+ function Vu(n, r) {
8292
8299
  if (r && (typeof r == "object" || typeof r == "function")) return r;
8293
8300
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
8294
8301
  return Ce(n);
8295
8302
  }
8296
8303
  function ra(n, r, t) {
8297
- return r = at(r), Hu(n, ta() ? Reflect.construct(r, t || [], at(n).constructor) : r.apply(n, t));
8304
+ return r = at(r), Vu(n, ta() ? Reflect.construct(r, t || [], at(n).constructor) : r.apply(n, t));
8298
8305
  }
8299
- function ju(n, r) {
8306
+ function qu(n, r) {
8300
8307
  for (; !{}.hasOwnProperty.call(n, r) && (n = at(n)) !== null; ) ;
8301
8308
  return n;
8302
8309
  }
8303
- function Pr() {
8304
- return Pr = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
8305
- var e = ju(n, r);
8310
+ function Ir() {
8311
+ return Ir = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(n, r, t) {
8312
+ var e = qu(n, r);
8306
8313
  if (e) {
8307
8314
  var i = Object.getOwnPropertyDescriptor(e, r);
8308
8315
  return i.get ? i.get.call(arguments.length < 3 ? n : t) : i.value;
8309
8316
  }
8310
- }, Pr.apply(null, arguments);
8317
+ }, Ir.apply(null, arguments);
8311
8318
  }
8312
8319
  function Hn(n, r, t, e) {
8313
- var i = Pr(at(n.prototype), r, t);
8320
+ var i = Ir(at(n.prototype), r, t);
8314
8321
  return typeof i == "function" ? function(a) {
8315
8322
  return i.apply(t, a);
8316
8323
  } : i;
8317
8324
  }
8318
- function Ir(n, r) {
8319
- return Ir = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
8325
+ function Pr(n, r) {
8326
+ return Pr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
8320
8327
  return t.__proto__ = e, t;
8321
- }, Ir(n, r);
8328
+ }, Pr(n, r);
8322
8329
  }
8323
8330
  function na(n, r) {
8324
8331
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
@@ -8330,7 +8337,7 @@ function na(n, r) {
8330
8337
  }
8331
8338
  }), Object.defineProperty(n, "prototype", {
8332
8339
  writable: !1
8333
- }), r && Ir(n, r);
8340
+ }), r && Pr(n, r);
8334
8341
  }
8335
8342
  function fe(n, r, t) {
8336
8343
  return (r = ea(r)) in n ? Object.defineProperty(n, r, {
@@ -8340,7 +8347,7 @@ function fe(n, r, t) {
8340
8347
  writable: !0
8341
8348
  }) : n[r] = t, n;
8342
8349
  }
8343
- function Vu(n, r) {
8350
+ function Ku(n, r) {
8344
8351
  if (n == null) return {};
8345
8352
  var t = {};
8346
8353
  for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
@@ -8349,9 +8356,9 @@ function Vu(n, r) {
8349
8356
  }
8350
8357
  return t;
8351
8358
  }
8352
- function qu(n, r) {
8359
+ function Xu(n, r) {
8353
8360
  if (n == null) return {};
8354
- var t, e, i = Vu(n, r);
8361
+ var t, e, i = Ku(n, r);
8355
8362
  if (Object.getOwnPropertySymbols) {
8356
8363
  var a = Object.getOwnPropertySymbols(n);
8357
8364
  for (e = 0; e < a.length; e++) t = a[e], r.includes(t) || {}.propertyIsEnumerable.call(n, t) && (i[t] = n[t]);
@@ -8379,7 +8386,7 @@ function me(n) {
8379
8386
  }
8380
8387
  return n;
8381
8388
  }
8382
- function Ku(n) {
8389
+ function Yu(n) {
8383
8390
  var r = n.texturesCount, t = (
8384
8391
  /*glsl*/
8385
8392
  `
@@ -8486,7 +8493,7 @@ void main(void) {
8486
8493
  );
8487
8494
  return t;
8488
8495
  }
8489
- var Xu = (
8496
+ var Zu = (
8490
8497
  /*glsl*/
8491
8498
  `
8492
8499
  attribute vec4 a_id;
@@ -8538,7 +8545,7 @@ void main() {
8538
8545
  v_color.a *= bias;
8539
8546
  }
8540
8547
  `
8541
- ), Yu = Xu;
8548
+ ), Qu = Zu;
8542
8549
  function Xe() {
8543
8550
  Xe = function() {
8544
8551
  return r;
@@ -8562,10 +8569,10 @@ function Xe() {
8562
8569
  };
8563
8570
  }
8564
8571
  function c(T, f, d, U) {
8565
- var $ = f && f.prototype instanceof k ? f : k, P = Object.create($.prototype), A = new W(U || []);
8566
- return i(P, "_invoke", {
8572
+ var $ = f && f.prototype instanceof k ? f : k, I = Object.create($.prototype), A = new W(U || []);
8573
+ return i(I, "_invoke", {
8567
8574
  value: D(T, d, A)
8568
- }), P;
8575
+ }), I;
8569
8576
  }
8570
8577
  function h(T, f, d) {
8571
8578
  try {
@@ -8603,8 +8610,8 @@ function Xe() {
8603
8610
  });
8604
8611
  }
8605
8612
  function S(T, f) {
8606
- function d($, P, A, z) {
8607
- var Z = h(T[$], T, P);
8613
+ function d($, I, A, z) {
8614
+ var Z = h(T[$], T, I);
8608
8615
  if (Z.type !== "throw") {
8609
8616
  var te = Z.arg, oe = te.value;
8610
8617
  return oe && typeof oe == "object" && e.call(oe, "__await") ? f.resolve(oe.__await).then(function(ne) {
@@ -8621,10 +8628,10 @@ function Xe() {
8621
8628
  }
8622
8629
  var U;
8623
8630
  i(this, "_invoke", {
8624
- value: function($, P) {
8631
+ value: function($, I) {
8625
8632
  function A() {
8626
8633
  return new f(function(z, Z) {
8627
- d($, P, z, Z);
8634
+ d($, I, z, Z);
8628
8635
  });
8629
8636
  }
8630
8637
  return U = U ? U.then(A, A) : A();
@@ -8633,16 +8640,16 @@ function Xe() {
8633
8640
  }
8634
8641
  function D(T, f, d) {
8635
8642
  var U = v;
8636
- return function($, P) {
8643
+ return function($, I) {
8637
8644
  if (U === b) throw Error("Generator is already running");
8638
8645
  if (U === R) {
8639
- if ($ === "throw") throw P;
8646
+ if ($ === "throw") throw I;
8640
8647
  return {
8641
8648
  value: n,
8642
8649
  done: !0
8643
8650
  };
8644
8651
  }
8645
- for (d.method = $, d.arg = P; ; ) {
8652
+ for (d.method = $, d.arg = I; ; ) {
8646
8653
  var A = d.delegate;
8647
8654
  if (A) {
8648
8655
  var z = O(A, d);
@@ -8674,10 +8681,10 @@ function Xe() {
8674
8681
  if (U === n) return f.delegate = null, d === "throw" && T.iterator.return && (f.method = "return", f.arg = n, O(T, f), f.method === "throw") || d !== "return" && (f.method = "throw", f.arg = new TypeError("The iterator does not provide a '" + d + "' method")), w;
8675
8682
  var $ = h(U, T.iterator, f.arg);
8676
8683
  if ($.type === "throw") return f.method = "throw", f.arg = $.arg, f.delegate = null, w;
8677
- var P = $.arg;
8678
- return P ? P.done ? (f[T.resultName] = P.value, f.next = T.nextLoc, f.method !== "return" && (f.method = "next", f.arg = n), f.delegate = null, w) : P : (f.method = "throw", f.arg = new TypeError("iterator result is not an object"), f.delegate = null, w);
8684
+ var I = $.arg;
8685
+ return I ? I.done ? (f[T.resultName] = I.value, f.next = T.nextLoc, f.method !== "return" && (f.method = "next", f.arg = n), f.delegate = null, w) : I : (f.method = "throw", f.arg = new TypeError("iterator result is not an object"), f.delegate = null, w);
8679
8686
  }
8680
- function I(T) {
8687
+ function P(T) {
8681
8688
  var f = {
8682
8689
  tryLoc: T[0]
8683
8690
  };
@@ -8690,7 +8697,7 @@ function Xe() {
8690
8697
  function W(T) {
8691
8698
  this.tryEntries = [{
8692
8699
  tryLoc: "root"
8693
- }], T.forEach(I, this), this.reset(!0);
8700
+ }], T.forEach(P, this), this.reset(!0);
8694
8701
  }
8695
8702
  function K(T) {
8696
8703
  if (T || T === "") {
@@ -8726,9 +8733,9 @@ function Xe() {
8726
8733
  return this;
8727
8734
  }), r.AsyncIterator = S, r.async = function(T, f, d, U, $) {
8728
8735
  $ === void 0 && ($ = Promise);
8729
- var P = new S(c(T, f, d, U), $);
8730
- return r.isGeneratorFunction(f) ? P : P.next().then(function(A) {
8731
- return A.done ? A.value : P.next();
8736
+ var I = new S(c(T, f, d, U), $);
8737
+ return r.isGeneratorFunction(f) ? I : I.next().then(function(A) {
8738
+ return A.done ? A.value : I.next();
8732
8739
  });
8733
8740
  }, x(g), l(g, u, "Generator"), l(g, o, function() {
8734
8741
  return this;
@@ -8739,8 +8746,8 @@ function Xe() {
8739
8746
  for (var U in f) d.push(U);
8740
8747
  return d.reverse(), function $() {
8741
8748
  for (; d.length; ) {
8742
- var P = d.pop();
8743
- if (P in f) return $.value = P, $.done = !1, $;
8749
+ var I = d.pop();
8750
+ if (I in f) return $.value = I, $.done = !1, $;
8744
8751
  }
8745
8752
  return $.done = !0, $;
8746
8753
  };
@@ -8759,10 +8766,10 @@ function Xe() {
8759
8766
  if (this.done) throw T;
8760
8767
  var f = this;
8761
8768
  function d(Z, te) {
8762
- return P.type = "throw", P.arg = T, f.next = Z, te && (f.method = "next", f.arg = n), !!te;
8769
+ return I.type = "throw", I.arg = T, f.next = Z, te && (f.method = "next", f.arg = n), !!te;
8763
8770
  }
8764
8771
  for (var U = this.tryEntries.length - 1; U >= 0; --U) {
8765
- var $ = this.tryEntries[U], P = $.completion;
8772
+ var $ = this.tryEntries[U], I = $.completion;
8766
8773
  if ($.tryLoc === "root") return d("end");
8767
8774
  if ($.tryLoc <= this.prev) {
8768
8775
  var A = e.call($, "catchLoc"), z = e.call($, "finallyLoc");
@@ -8787,8 +8794,8 @@ function Xe() {
8787
8794
  }
8788
8795
  }
8789
8796
  $ && (T === "break" || T === "continue") && $.tryLoc <= f && f <= $.finallyLoc && ($ = null);
8790
- var P = $ ? $.completion : {};
8791
- return P.type = T, P.arg = f, $ ? (this.method = "next", this.next = $.finallyLoc, w) : this.complete(P);
8797
+ var I = $ ? $.completion : {};
8798
+ return I.type = T, I.arg = f, $ ? (this.method = "next", this.next = $.finallyLoc, w) : this.complete(I);
8792
8799
  },
8793
8800
  complete: function(T, f) {
8794
8801
  if (T.type === "throw") throw T.arg;
@@ -8856,7 +8863,7 @@ var en = {
8856
8863
  maxTextureSize: 4096,
8857
8864
  debounceTimeout: 500,
8858
8865
  crossOrigin: "anonymous"
8859
- }, Zu = 1;
8866
+ }, Ju = 1;
8860
8867
  function Fr(n) {
8861
8868
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = r.crossOrigin;
8862
8869
  return new Promise(function(e, i) {
@@ -8872,7 +8879,7 @@ function Fr(n) {
8872
8879
  }), t && a.setAttribute("crossOrigin", t), a.src = n;
8873
8880
  });
8874
8881
  }
8875
- function Qu(n) {
8882
+ function el(n) {
8876
8883
  return Or.apply(this, arguments);
8877
8884
  }
8878
8885
  function Or() {
@@ -8916,7 +8923,7 @@ function Or() {
8916
8923
  }, n);
8917
8924
  })), Or.apply(this, arguments);
8918
8925
  }
8919
- function Ju(n) {
8926
+ function tl(n) {
8920
8927
  return zr.apply(this, arguments);
8921
8928
  }
8922
8929
  function zr() {
@@ -8929,7 +8936,7 @@ function zr() {
8929
8936
  c.next = 16;
8930
8937
  break;
8931
8938
  }
8932
- return c.prev = 3, c.next = 6, Qu(r, {
8939
+ return c.prev = 3, c.next = 6, el(r, {
8933
8940
  size: i,
8934
8941
  crossOrigin: a
8935
8942
  });
@@ -8960,7 +8967,7 @@ function zr() {
8960
8967
  }, n, null, [[3, 9]]);
8961
8968
  })), zr.apply(this, arguments);
8962
8969
  }
8963
- function el(n, r, t) {
8970
+ function rl(n, r, t) {
8964
8971
  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;
8965
8972
  if (a) {
8966
8973
  var c = r.getCorrectionOffset(n, o);
@@ -8973,9 +8980,9 @@ function el(n, r, t) {
8973
8980
  destinationSize: s
8974
8981
  };
8975
8982
  }
8976
- function tl(n, r, t) {
8983
+ function nl(n, r, t) {
8977
8984
  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++) {
8978
- var b = n[v], R = b.key, w = b.image, k = b.sourceSize, E = b.sourceX, m = b.sourceY, p = b.destinationSize, C = p + Zu;
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 + Ju;
8979
8986
  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({
8980
8987
  key: R,
8981
8988
  image: w,
@@ -8993,8 +9000,8 @@ function tl(n, r, t) {
8993
9000
  }
8994
9001
  c = Math.max(c, s);
8995
9002
  for (var L = c, g = u + l, x = 0, S = o.length; x < S; x++) {
8996
- var D = o[x], O = D.image, I = D.sourceSize, _ = D.sourceX, W = D.sourceY, K = D.destinationSize, T = D.destinationX, f = D.destinationY;
8997
- r.drawImage(O, _, W, I, I, T, f, K, K);
9003
+ var D = o[x], O = D.image, P = D.sourceSize, _ = D.sourceX, W = D.sourceY, K = D.destinationSize, T = D.destinationX, f = D.destinationY;
9004
+ r.drawImage(O, _, W, P, P, T, f, K, K);
8998
9005
  }
8999
9006
  return {
9000
9007
  atlas: h,
@@ -9007,7 +9014,7 @@ function tl(n, r, t) {
9007
9014
  }
9008
9015
  };
9009
9016
  }
9010
- function rl(n, r, t) {
9017
+ function il(n, r, t) {
9011
9018
  var e = n.atlas, i = n.textures, a = n.cursor, o = {
9012
9019
  atlas: me({}, e),
9013
9020
  textures: Yr(i.slice(0, -1)),
@@ -9023,7 +9030,7 @@ function rl(n, r, t) {
9023
9030
  }
9024
9031
  }
9025
9032
  for (var v = function() {
9026
- var b = tl(s, t, o.cursor), R = b.atlas, w = b.texture, k = b.cursor;
9033
+ var b = nl(s, t, o.cursor), R = b.atlas, w = b.texture, k = b.cursor;
9027
9034
  o.cursor = k;
9028
9035
  var E = [];
9029
9036
  s.forEach(function(m) {
@@ -9040,7 +9047,7 @@ function rl(n, r, t) {
9040
9047
  v();
9041
9048
  return o;
9042
9049
  }
9043
- var nl = /* @__PURE__ */ (function() {
9050
+ var al = /* @__PURE__ */ (function() {
9044
9051
  function n() {
9045
9052
  Zr(this, n), this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d", {
9046
9053
  willReadFrequently: !0
@@ -9070,7 +9077,7 @@ var nl = /* @__PURE__ */ (function() {
9070
9077
  var t, e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9071
9078
  return Zr(this, r), t = ra(this, r), fe(Ce(t), "canvas", document.createElement("canvas")), fe(Ce(t), "ctx", t.canvas.getContext("2d", {
9072
9079
  willReadFrequently: !0
9073
- })), fe(Ce(t), "corrector", new nl()), fe(Ce(t), "imageStates", {}), fe(Ce(t), "textures", [t.ctx.getImageData(0, 0, 1, 1)]), fe(Ce(t), "lastTextureCursor", {
9080
+ })), fe(Ce(t), "corrector", new al()), fe(Ce(t), "imageStates", {}), fe(Ce(t), "textures", [t.ctx.getImageData(0, 0, 1, 1)]), fe(Ce(t), "lastTextureCursor", {
9074
9081
  x: 0,
9075
9082
  y: 0,
9076
9083
  rowHeight: 0,
@@ -9088,7 +9095,7 @@ var nl = /* @__PURE__ */ (function() {
9088
9095
  }, {
9089
9096
  key: "generateTextures",
9090
9097
  value: function() {
9091
- var e = rl({
9098
+ var e = il({
9092
9099
  atlas: this.atlas,
9093
9100
  textures: this.textures,
9094
9101
  cursor: this.lastTextureCursor
@@ -9115,7 +9122,7 @@ var nl = /* @__PURE__ */ (function() {
9115
9122
  case 2:
9116
9123
  return this.imageStates[a] = {
9117
9124
  status: "loading"
9118
- }, l.prev = 3, o = this.options.size, l.next = 7, Ju(a, {
9125
+ }, l.prev = 3, o = this.options.size, l.next = 7, tl(a, {
9119
9126
  size: o.mode === "force" ? o.value : void 0,
9120
9127
  crossOrigin: this.options.crossOrigin || void 0
9121
9128
  });
@@ -9123,7 +9130,7 @@ var nl = /* @__PURE__ */ (function() {
9123
9130
  s = l.sent, this.imageStates[a] = me({
9124
9131
  status: "ready",
9125
9132
  image: s
9126
- }, el(s, this.corrector, this.options)), this.scheduleGenerateTexture(), l.next = 15;
9133
+ }, rl(s, this.corrector, this.options)), this.scheduleGenerateTexture(), l.next = 15;
9127
9134
  break;
9128
9135
  case 12:
9129
9136
  l.prev = 12, l.t0 = l.catch(3), this.imageStates[a] = {
@@ -9153,7 +9160,7 @@ var nl = /* @__PURE__ */ (function() {
9153
9160
  }]), r;
9154
9161
  })(Wr.EventEmitter);
9155
9162
  fe($t, "NEW_TEXTURE_EVENT", "newTexture");
9156
- var il = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding", "colorAttribute", "imageAttribute"], ia = WebGLRenderingContext, qn = ia.UNSIGNED_BYTE, mt = ia.FLOAT, al = me(me({}, en), {}, {
9163
+ var ol = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding", "colorAttribute", "imageAttribute"], ia = WebGLRenderingContext, qn = ia.UNSIGNED_BYTE, mt = ia.FLOAT, sl = me(me({}, en), {}, {
9157
9164
  drawingMode: "background",
9158
9165
  keepWithinCircle: !0,
9159
9166
  drawLabel: void 0,
@@ -9161,13 +9168,13 @@ var il = ["drawHover", "drawLabel", "drawingMode", "keepWithinCircle", "padding"
9161
9168
  padding: 0,
9162
9169
  colorAttribute: "color",
9163
9170
  imageAttribute: "image"
9164
- }), ol = ["u_sizeRatio", "u_correctionRatio", "u_cameraAngle", "u_percentagePadding", "u_matrix", "u_colorizeImages", "u_keepWithinCircle", "u_atlas"];
9171
+ }), ul = ["u_sizeRatio", "u_correctionRatio", "u_cameraAngle", "u_percentagePadding", "u_matrix", "u_colorizeImages", "u_keepWithinCircle", "u_atlas"];
9165
9172
  function tn(n) {
9166
9173
  var r, t = document.createElement("canvas").getContext("webgl"), e = Math.min(t.getParameter(t.MAX_TEXTURE_SIZE), en.maxTextureSize);
9167
9174
  t.canvas.remove();
9168
- var i = me(me(me({}, al), {
9175
+ var i = me(me(me({}, sl), {
9169
9176
  maxTextureSize: e
9170
- }), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v = qu(i, il), y = new $t(v);
9177
+ }), n || {}), a = i.drawHover, o = i.drawLabel, s = i.drawingMode, u = i.keepWithinCircle, l = i.padding, c = i.colorAttribute, h = i.imageAttribute, v = Xu(i, ol), y = new $t(v);
9171
9178
  return r = /* @__PURE__ */ (function(b) {
9172
9179
  na(R, b);
9173
9180
  function R(w, k, E) {
@@ -9184,12 +9191,12 @@ function tn(n) {
9184
9191
  value: function() {
9185
9192
  return {
9186
9193
  VERTICES: 3,
9187
- VERTEX_SHADER_SOURCE: Yu,
9188
- FRAGMENT_SHADER_SOURCE: Ku({
9194
+ VERTEX_SHADER_SOURCE: Qu,
9195
+ FRAGMENT_SHADER_SOURCE: Yu({
9189
9196
  texturesCount: y.getTextures().length
9190
9197
  }),
9191
9198
  METHOD: WebGLRenderingContext.TRIANGLES,
9192
- UNIFORMS: ol,
9199
+ UNIFORMS: ul,
9193
9200
  ATTRIBUTES: [{
9194
9201
  name: "a_position",
9195
9202
  size: 2,
@@ -9272,8 +9279,8 @@ function tn(n) {
9272
9279
  }, {
9273
9280
  key: "setUniforms",
9274
9281
  value: function(k, E) {
9275
- 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, I = p.u_percentagePadding;
9276
- 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(I, l), m.uniformMatrix3fv(g, !1, k.matrix), m.uniform1iv(x, Yr(new Array(this.textureImages.length)).map(function(_, W) {
9282
+ 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, Yr(new Array(this.textureImages.length)).map(function(_, W) {
9277
9284
  return W;
9278
9285
  })), m.uniform1i(S, s === "color" ? 1 : 0), m.uniform1i(D, u ? 1 : 0);
9279
9286
  }
@@ -9290,7 +9297,7 @@ tn({
9290
9297
  drawingMode: "color",
9291
9298
  correctCentering: !0
9292
9299
  });
9293
- function sl(n, r) {
9300
+ function ll(n, r) {
9294
9301
  if (typeof n != "object" || !n) return n;
9295
9302
  var t = n[Symbol.toPrimitive];
9296
9303
  if (t !== void 0) {
@@ -9301,7 +9308,7 @@ function sl(n, r) {
9301
9308
  return (r === "string" ? String : Number)(n);
9302
9309
  }
9303
9310
  function aa(n) {
9304
- var r = sl(n, "string");
9311
+ var r = ll(n, "string");
9305
9312
  return typeof r == "symbol" ? r : r + "";
9306
9313
  }
9307
9314
  function oa(n, r, t) {
@@ -9333,24 +9340,24 @@ function ot(n) {
9333
9340
  }
9334
9341
  return n;
9335
9342
  }
9336
- function ul(n, r) {
9343
+ function cl(n, r) {
9337
9344
  if (!(n instanceof r)) throw new TypeError("Cannot call a class as a function");
9338
9345
  }
9339
- function ll(n, r) {
9346
+ function hl(n, r) {
9340
9347
  for (var t = 0; t < r.length; t++) {
9341
9348
  var e = r[t];
9342
9349
  e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(n, aa(e.key), e);
9343
9350
  }
9344
9351
  }
9345
- function cl(n, r, t) {
9346
- return r && ll(n.prototype, r), Object.defineProperty(n, "prototype", {
9352
+ function dl(n, r, t) {
9353
+ return r && hl(n.prototype, r), Object.defineProperty(n, "prototype", {
9347
9354
  writable: !1
9348
9355
  }), n;
9349
9356
  }
9350
- function Bt(n) {
9351
- return Bt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
9357
+ function Wt(n) {
9358
+ return Wt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
9352
9359
  return r.__proto__ || Object.getPrototypeOf(r);
9353
- }, Bt(n);
9360
+ }, Wt(n);
9354
9361
  }
9355
9362
  function sa() {
9356
9363
  try {
@@ -9366,20 +9373,20 @@ function ua(n) {
9366
9373
  if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9367
9374
  return n;
9368
9375
  }
9369
- function hl(n, r) {
9376
+ function fl(n, r) {
9370
9377
  if (r && (typeof r == "object" || typeof r == "function")) return r;
9371
9378
  if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
9372
9379
  return ua(n);
9373
9380
  }
9374
- function dl(n, r, t) {
9375
- return r = Bt(r), hl(n, sa() ? Reflect.construct(r, t || [], Bt(n).constructor) : r.apply(n, t));
9381
+ function gl(n, r, t) {
9382
+ return r = Wt(r), fl(n, sa() ? Reflect.construct(r, t || [], Wt(n).constructor) : r.apply(n, t));
9376
9383
  }
9377
9384
  function Nr(n, r) {
9378
9385
  return Nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
9379
9386
  return t.__proto__ = e, t;
9380
9387
  }, Nr(n, r);
9381
9388
  }
9382
- function fl(n, r) {
9389
+ function pl(n, r) {
9383
9390
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
9384
9391
  n.prototype = Object.create(r && r.prototype, {
9385
9392
  constructor: {
@@ -9396,25 +9403,25 @@ function Ur(n, r) {
9396
9403
  for (var t = 0, e = Array(r); t < r; t++) e[t] = n[t];
9397
9404
  return e;
9398
9405
  }
9399
- function gl(n) {
9406
+ function vl(n) {
9400
9407
  if (Array.isArray(n)) return Ur(n);
9401
9408
  }
9402
- function pl(n) {
9409
+ function ml(n) {
9403
9410
  if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
9404
9411
  }
9405
- function vl(n, r) {
9412
+ function yl(n, r) {
9406
9413
  if (n) {
9407
9414
  if (typeof n == "string") return Ur(n, r);
9408
9415
  var t = {}.toString.call(n).slice(8, -1);
9409
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) ? Ur(n, r) : void 0;
9410
9417
  }
9411
9418
  }
9412
- function ml() {
9419
+ function bl() {
9413
9420
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
9414
9421
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
9415
9422
  }
9416
9423
  function ur(n) {
9417
- return gl(n) || pl(n) || vl(n) || ml();
9424
+ return vl(n) || ml(n) || yl(n) || bl();
9418
9425
  }
9419
9426
  function la(n, r, t, e) {
9420
9427
  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;
@@ -9423,39 +9430,39 @@ function la(n, r, t, e) {
9423
9430
  y: a
9424
9431
  };
9425
9432
  }
9426
- function yl(n, r, t) {
9433
+ function wl(n, r, t) {
9427
9434
  for (var e = 20, i = 0, a = n, o = 0; o < e; o++) {
9428
9435
  var s = la((o + 1) / e, n, r, t);
9429
9436
  i += Math.sqrt(Math.pow(a.x - s.x, 2) + Math.pow(a.y - s.y, 2)), a = s;
9430
9437
  }
9431
9438
  return i;
9432
9439
  }
9433
- function bl(n) {
9440
+ function El(n) {
9434
9441
  var r = n.curvatureAttribute, t = n.defaultCurvature, e = n.keepLabelUpright, i = e === void 0 ? !0 : e;
9435
9442
  return function(a, o, s, u, l) {
9436
9443
  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;
9437
9444
  if (R) {
9438
9445
  a.fillStyle = b, a.font = "".concat(y, " ").concat(c, "px ").concat(v);
9439
- var w = !i || s.x < u.x, k = w ? s.x : u.x, E = w ? s.y : u.y, m = w ? u.x : s.x, p = w ? u.y : s.y, C = (k + m) / 2, L = (E + p) / 2, g = m - k, x = p - E, S = Math.sqrt(Math.pow(g, 2) + Math.pow(x, 2)), D = w ? 1 : -1, O = C + x * h * D, I = L - g * h * D, _ = o.size * 0.7 + 5, W = {
9440
- x: I - E,
9446
+ var w = !i || s.x < u.x, k = w ? s.x : u.x, E = w ? s.y : u.y, m = w ? u.x : s.x, p = w ? u.y : s.y, C = (k + m) / 2, L = (E + p) / 2, g = m - k, x = p - E, S = Math.sqrt(Math.pow(g, 2) + Math.pow(x, 2)), D = w ? 1 : -1, O = C + x * h * D, P = L - g * h * D, _ = o.size * 0.7 + 5, W = {
9447
+ x: P - E,
9441
9448
  y: -(O - k)
9442
9449
  }, K = Math.sqrt(Math.pow(W.x, 2) + Math.pow(W.y, 2)), T = {
9443
- x: p - I,
9450
+ x: p - P,
9444
9451
  y: -(m - O)
9445
9452
  }, f = Math.sqrt(Math.pow(T.x, 2) + Math.pow(T.y, 2));
9446
- k += _ * W.x / K, E += _ * W.y / K, m += _ * T.x / f, p += _ * T.y / f, O += _ * x / S, I -= _ * g / S;
9453
+ k += _ * W.x / K, E += _ * W.y / K, m += _ * T.x / f, p += _ * T.y / f, O += _ * x / S, P -= _ * g / S;
9447
9454
  var d = {
9448
9455
  x: O,
9449
- y: I
9456
+ y: P
9450
9457
  }, U = {
9451
9458
  x: k,
9452
9459
  y: E
9453
9460
  }, $ = {
9454
9461
  x: m,
9455
9462
  y: p
9456
- }, P = yl(U, d, $);
9457
- if (!(P < s.size + u.size)) {
9458
- var A = a.measureText(R).width, z = P - s.size - u.size;
9463
+ }, I = wl(U, d, $);
9464
+ if (!(I < s.size + u.size)) {
9465
+ var A = a.measureText(R).width, z = I - s.size - u.size;
9459
9466
  if (A > z) {
9460
9467
  var Z = "…";
9461
9468
  for (R = R + Z, A = a.measureText(R).width; A > z && R.length > 1; )
@@ -9466,15 +9473,15 @@ function bl(n) {
9466
9473
  var V = R[oe];
9467
9474
  te[V] || (te[V] = a.measureText(V).width * (1 + h * 0.35));
9468
9475
  }
9469
- for (var se = 0.5 - A / P / 2, ee = 0, re = R.length; ee < re; ee++) {
9470
- var J = R[ee], le = la(se, U, d, $), q = 2 * (1 - se) * (O - k) + 2 * se * (m - O), B = 2 * (1 - se) * (I - E) + 2 * se * (p - I), G = Math.atan2(B, q);
9471
- a.save(), a.translate(le.x, le.y), a.rotate(G), a.fillText(J, 0, 0), a.restore(), se += te[J] / P;
9476
+ for (var se = 0.5 - A / I / 2, ee = 0, re = R.length; ee < re; ee++) {
9477
+ var J = R[ee], le = la(se, U, d, $), q = 2 * (1 - se) * (O - k) + 2 * se * (m - O), B = 2 * (1 - se) * (P - E) + 2 * se * (p - P), G = Math.atan2(B, q);
9478
+ a.save(), a.translate(le.x, le.y), a.rotate(G), a.fillText(J, 0, 0), a.restore(), se += te[J] / I;
9472
9479
  }
9473
9480
  }
9474
9481
  }
9475
9482
  };
9476
9483
  }
9477
- function wl(n) {
9484
+ function _l(n) {
9478
9485
  var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
9479
9486
  /*glsl*/
9480
9487
  `
@@ -9556,7 +9563,7 @@ void main(void) {
9556
9563
  );
9557
9564
  return i;
9558
9565
  }
9559
- function El(n) {
9566
+ function Tl(n) {
9560
9567
  var r = n.arrowHead, t = r?.extremity === "target" || r?.extremity === "both", e = r?.extremity === "source" || r?.extremity === "both", i = (
9561
9568
  /*glsl*/
9562
9569
  `
@@ -9673,22 +9680,22 @@ void main() {
9673
9680
  );
9674
9681
  return i;
9675
9682
  }
9676
- var rn = 0.25, _l = {
9683
+ var rn = 0.25, Sl = {
9677
9684
  arrowHead: null,
9678
9685
  curvatureAttribute: "curvature",
9679
9686
  defaultCurvature: rn
9680
- }, Tl = {
9687
+ }, Rl = {
9681
9688
  edgeIndexAttribute: "parallelIndex",
9682
9689
  edgeMinIndexAttribute: "parallelMinIndex",
9683
9690
  edgeMaxIndexAttribute: "parallelMaxIndex"
9684
9691
  };
9685
- function Sl(n, r) {
9686
- var t = ot(ot({}, Tl), {}), e = {}, i = {}, a = {}, o = 0;
9692
+ function Al(n, r) {
9693
+ var t = ot(ot({}, Rl), {}), e = {}, i = {}, a = {}, o = 0;
9687
9694
  n.forEachNode(function(L) {
9688
9695
  e[L] = ++o + "";
9689
9696
  }), n.forEachEdge(function(L, g, x, S) {
9690
- var D = e[x], O = e[S], I = [D, O].join("-");
9691
- i[L] = I, a[I] = [D, O].sort().join("-");
9697
+ var D = e[x], O = e[S], P = [D, O].join("-");
9698
+ i[L] = P, a[P] = [D, O].sort().join("-");
9692
9699
  });
9693
9700
  var s = {}, u = {};
9694
9701
  n.forEachEdge(function(L) {
@@ -9717,23 +9724,23 @@ function Sl(n, r) {
9717
9724
  }
9718
9725
  var ca = WebGLRenderingContext, Xn = ca.UNSIGNED_BYTE, Me = ca.FLOAT;
9719
9726
  function nn(n) {
9720
- var r = ot(ot({}, _l), 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(ur(e ? ["u_lengthToThicknessRatio", "u_widenessToThicknessRatio"] : []));
9727
+ var r = ot(ot({}, Sl), 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(ur(e ? ["u_lengthToThicknessRatio", "u_widenessToThicknessRatio"] : []));
9721
9728
  return /* @__PURE__ */ (function(l) {
9722
- fl(c, l);
9729
+ pl(c, l);
9723
9730
  function c() {
9724
9731
  var h;
9725
- ul(this, c);
9732
+ cl(this, c);
9726
9733
  for (var v = arguments.length, y = new Array(v), b = 0; b < v; b++)
9727
9734
  y[b] = arguments[b];
9728
- return h = dl(this, c, [].concat(y)), oa(ua(h), "drawLabel", a || bl(r)), h;
9735
+ return h = gl(this, c, [].concat(y)), oa(ua(h), "drawLabel", a || El(r)), h;
9729
9736
  }
9730
- return cl(c, [{
9737
+ return dl(c, [{
9731
9738
  key: "getDefinition",
9732
9739
  value: function() {
9733
9740
  return {
9734
9741
  VERTICES: 6,
9735
- VERTEX_SHADER_SOURCE: El(r),
9736
- FRAGMENT_SHADER_SOURCE: wl(r),
9742
+ VERTEX_SHADER_SOURCE: Tl(r),
9743
+ FRAGMENT_SHADER_SOURCE: _l(r),
9737
9744
  METHOD: WebGLRenderingContext.TRIANGLES,
9738
9745
  UNIFORMS: u,
9739
9746
  ATTRIBUTES: [{
@@ -9804,18 +9811,18 @@ function nn(n) {
9804
9811
  }
9805
9812
  }
9806
9813
  }]), c;
9807
- })(Ht);
9814
+ })(jt);
9808
9815
  }
9809
- var Rl = nn(), Al = nn({
9810
- arrowHead: jt
9816
+ var kl = nn(), Cl = nn({
9817
+ arrowHead: Vt
9811
9818
  });
9812
9819
  nn({
9813
- arrowHead: ot(ot({}, jt), {}, {
9820
+ arrowHead: ot(ot({}, Vt), {}, {
9814
9821
  extremity: "both"
9815
9822
  })
9816
9823
  });
9817
9824
  var et = {}, lr, Yn;
9818
- function Vt() {
9825
+ function qt() {
9819
9826
  if (Yn) return lr;
9820
9827
  Yn = 1;
9821
9828
  function n(t) {
@@ -9837,7 +9844,7 @@ function Vt() {
9837
9844
  return lr = r, lr;
9838
9845
  }
9839
9846
  var cr, Zn;
9840
- function kl() {
9847
+ function xl() {
9841
9848
  if (Zn) return cr;
9842
9849
  Zn = 1;
9843
9850
  function n(t) {
@@ -9849,10 +9856,10 @@ function kl() {
9849
9856
  return r.createRandom = n, cr = r, cr;
9850
9857
  }
9851
9858
  var hr, Qn;
9852
- function Cl() {
9859
+ function Dl() {
9853
9860
  if (Qn) return hr;
9854
9861
  Qn = 1;
9855
- var n = kl().createRandom;
9862
+ var n = xl().createRandom;
9856
9863
  function r(e) {
9857
9864
  var i = n(e);
9858
9865
  return function(a) {
@@ -9866,10 +9873,10 @@ function Cl() {
9866
9873
  return t.createShuffleInPlace = r, hr = t, hr;
9867
9874
  }
9868
9875
  var dr, Jn;
9869
- function xl() {
9876
+ function Ll() {
9870
9877
  if (Jn) return dr;
9871
9878
  Jn = 1;
9872
- var n = Vt(), r = Ze(), t = Cl(), e = {
9879
+ var n = qt(), r = Ze(), t = Dl(), e = {
9873
9880
  attributes: {
9874
9881
  x: "x",
9875
9882
  y: "y"
@@ -9925,16 +9932,16 @@ function xl() {
9925
9932
  return new i(null, g.x, g.y, g.r);
9926
9933
  }
9927
9934
  function c(g, x) {
9928
- var S = g.x, D = g.y, O = g.r, I = x.x, _ = x.y, W = x.r, K = I - S, T = _ - D, f = W - O, d = Math.sqrt(K * K + T * T);
9935
+ var S = g.x, D = g.y, O = g.r, P = x.x, _ = x.y, W = x.r, K = P - S, T = _ - D, f = W - O, d = Math.sqrt(K * K + T * T);
9929
9936
  return new i(
9930
9937
  null,
9931
- (S + I + K / d * f) / 2,
9938
+ (S + P + K / d * f) / 2,
9932
9939
  (D + _ + T / d * f) / 2,
9933
9940
  (d + O + W) / 2
9934
9941
  );
9935
9942
  }
9936
9943
  function h(g, x, S) {
9937
- var D = g.x, O = g.y, I = g.r, _ = x.x, W = x.y, K = x.r, T = S.x, f = S.y, d = S.r, U = D - _, $ = D - T, P = O - W, A = O - f, z = K - I, Z = d - I, te = D * D + O * O - I * I, oe = te - _ * _ - W * W + K * K, ne = te - T * T - f * f + d * d, V = $ * P - U * A, se = (P * ne - A * oe) / (V * 2) - D, ee = (A * z - P * Z) / V, re = ($ * oe - U * ne) / (V * 2) - O, J = (U * Z - $ * z) / V, le = ee * ee + J * J - 1, q = 2 * (I + se * ee + re * J), B = se * se + re * re - I * I, G = -(le ? (q + Math.sqrt(q * q - 4 * le * B)) / (2 * le) : B / q);
9944
+ var D = g.x, O = g.y, P = g.r, _ = x.x, W = x.y, K = x.r, T = S.x, f = S.y, d = S.r, U = D - _, $ = D - T, I = O - W, A = O - f, z = K - P, Z = d - P, te = D * D + O * O - P * P, oe = te - _ * _ - W * W + K * K, ne = te - T * T - f * f + d * d, V = $ * I - U * A, se = (I * ne - A * oe) / (V * 2) - D, ee = (A * z - I * Z) / V, re = ($ * oe - U * ne) / (V * 2) - O, J = (U * Z - $ * z) / V, le = ee * ee + J * J - 1, q = 2 * (P + se * ee + re * J), B = se * se + re * re - P * P, G = -(le ? (q + Math.sqrt(q * q - 4 * le * B)) / (2 * le) : B / q);
9938
9945
  return new i(null, D + se + ee * G, O + re + J * G, G);
9939
9946
  }
9940
9947
  function v(g) {
@@ -9964,18 +9971,18 @@ function xl() {
9964
9971
  throw new Error("graphology-layout/circlepack: extendBasis failure !");
9965
9972
  }
9966
9973
  function b(g) {
9967
- var x = g.wrappedCircle, S = g.next.wrappedCircle, D = x.r + S.r, O = (x.x * S.r + S.x * x.r) / D, I = (x.y * S.r + S.y * x.r) / D;
9968
- return O * O + I * I;
9974
+ var x = g.wrappedCircle, S = g.next.wrappedCircle, D = x.r + S.r, O = (x.x * S.r + S.x * x.r) / D, P = (x.y * S.r + S.y * x.r) / D;
9975
+ return O * O + P * P;
9969
9976
  }
9970
9977
  function R(g, x) {
9971
- var S = 0, D = g.slice(), O = g.length, I = [], _, W;
9978
+ var S = 0, D = g.slice(), O = g.length, P = [], _, W;
9972
9979
  for (x(D); S < O; )
9973
- _ = D[S], W && s(W, _) ? ++S : (I = y(I, _), W = v(I), S = 0);
9980
+ _ = D[S], W && s(W, _) ? ++S : (P = y(P, _), W = v(P), S = 0);
9974
9981
  return W;
9975
9982
  }
9976
9983
  function w(g, x, S) {
9977
- var D = g.x - x.x, O, I, _ = g.y - x.y, W, K, T = D * D + _ * _;
9978
- T ? (I = x.r + S.r, I *= I, K = g.r + S.r, K *= K, I > K ? (O = (T + K - I) / (2 * T), W = Math.sqrt(Math.max(0, K / T - O * O)), S.x = g.x - O * D - W * _, S.y = g.y - O * _ + W * D) : (O = (T + I - K) / (2 * T), W = Math.sqrt(Math.max(0, I / T - O * O)), S.x = x.x + O * D - W * _, S.y = x.y + O * _ + W * D)) : (S.x = x.x + S.r, S.y = x.y);
9984
+ var D = g.x - x.x, O, P, _ = g.y - x.y, W, K, T = D * D + _ * _;
9985
+ T ? (P = x.r + S.r, P *= P, K = g.r + S.r, K *= K, P > K ? (O = (T + K - P) / (2 * T), W = Math.sqrt(Math.max(0, K / T - O * O)), S.x = g.x - O * D - W * _, S.y = g.y - O * _ + W * D) : (O = (T + P - K) / (2 * T), W = Math.sqrt(Math.max(0, P / T - O * O)), S.x = x.x + O * D - W * _, S.y = x.y + O * _ + W * D)) : (S.x = x.x + S.r, S.y = x.y);
9979
9986
  }
9980
9987
  function k(g, x) {
9981
9988
  var S = g.r + x.r - 1e-6, D = x.x - g.x, O = x.y - g.y;
@@ -9984,37 +9991,37 @@ function xl() {
9984
9991
  function E(g, x) {
9985
9992
  var S = g.length;
9986
9993
  if (S === 0) return 0;
9987
- var D, O, I, _, W, K, T, f, d, U;
9994
+ var D, O, P, _, W, K, T, f, d, U;
9988
9995
  if (D = g[0], D.x = 0, D.y = 0, S <= 1) return D.r;
9989
9996
  if (O = g[1], D.x = -O.r, O.x = D.r, O.y = 0, S <= 2) return D.r + O.r;
9990
- I = g[2], w(O, D, I), D = new i(null, null, null, null, D), O = new i(null, null, null, null, O), I = new i(null, null, null, null, I), D.next = I.previous = O, O.next = D.previous = I, I.next = O.previous = D;
9997
+ P = g[2], w(O, D, P), D = new i(null, null, null, null, D), O = new i(null, null, null, null, O), P = new i(null, null, null, null, P), D.next = P.previous = O, O.next = D.previous = P, P.next = O.previous = D;
9991
9998
  e: for (K = 3; K < S; ++K) {
9992
- I = g[K], w(D.wrappedCircle, O.wrappedCircle, I), I = new i(null, null, null, null, I), T = O.next, f = D.previous, d = O.wrappedCircle.r, U = D.wrappedCircle.r;
9999
+ P = g[K], w(D.wrappedCircle, O.wrappedCircle, P), P = new i(null, null, null, null, P), T = O.next, f = D.previous, d = O.wrappedCircle.r, U = D.wrappedCircle.r;
9993
10000
  do
9994
10001
  if (d <= U) {
9995
- if (k(T.wrappedCircle, I.wrappedCircle)) {
10002
+ if (k(T.wrappedCircle, P.wrappedCircle)) {
9996
10003
  O = T, D.next = O, O.previous = D, --K;
9997
10004
  continue e;
9998
10005
  }
9999
10006
  d += T.wrappedCircle.r, T = T.next;
10000
10007
  } else {
10001
- if (k(f.wrappedCircle, I.wrappedCircle)) {
10008
+ if (k(f.wrappedCircle, P.wrappedCircle)) {
10002
10009
  D = f, D.next = O, O.previous = D, --K;
10003
10010
  continue e;
10004
10011
  }
10005
10012
  U += f.wrappedCircle.r, f = f.previous;
10006
10013
  }
10007
10014
  while (T !== f.next);
10008
- for (I.previous = D, I.next = O, D.next = O.previous = O = I, _ = b(D); (I = I.next) !== O; )
10009
- (W = b(I)) < _ && (D = I, _ = W);
10015
+ for (P.previous = D, P.next = O, D.next = O.previous = O = P, _ = b(D); (P = P.next) !== O; )
10016
+ (W = b(P)) < _ && (D = P, _ = W);
10010
10017
  O = D.next;
10011
10018
  }
10012
- D = [O.wrappedCircle], I = O;
10013
- for (var $ = 1e4; (I = I.next) !== O && --$ !== 0; )
10014
- D.push(I.wrappedCircle);
10015
- for (I = R(D, x), K = 0; K < S; ++K)
10016
- D = g[K], D.x -= I.x, D.y -= I.y;
10017
- return I.r;
10019
+ D = [O.wrappedCircle], P = O;
10020
+ for (var $ = 1e4; (P = P.next) !== O && --$ !== 0; )
10021
+ D.push(P.wrappedCircle);
10022
+ for (P = R(D, x), K = 0; K < S; ++K)
10023
+ D = g[K], D.x -= P.x, D.y -= P.y;
10024
+ return P.r;
10018
10025
  }
10019
10026
  function m(g, x) {
10020
10027
  var S = 0;
@@ -10040,7 +10047,7 @@ function xl() {
10040
10047
  "graphology-layout/circlepack: the given graph is not a valid graphology instance."
10041
10048
  );
10042
10049
  S = n(S, e);
10043
- var D = {}, O = {}, I = x.nodes(), _ = S.center, W = S.hierarchyAttributes, K = t.createShuffleInPlace(S.rng), T = S.scale, f = new i();
10050
+ var D = {}, O = {}, P = x.nodes(), _ = S.center, W = S.hierarchyAttributes, K = t.createShuffleInPlace(S.rng), T = S.scale, f = new i();
10044
10051
  x.forEachNode(function(z, Z) {
10045
10052
  var te = Z.size ? Z.size : 1, oe = new i(z, null, null, te), ne = f;
10046
10053
  W.forEach(function(V) {
@@ -10048,9 +10055,9 @@ function xl() {
10048
10055
  ne = ne.getChild(se);
10049
10056
  }), ne.addChild(z, oe);
10050
10057
  }), p(f, K), a(x, f, D);
10051
- var d = I.length, U, $, P;
10052
- for (P = 0; P < d; P++) {
10053
- var A = I[P];
10058
+ var d = P.length, U, $, I;
10059
+ for (I = 0; I < d; I++) {
10060
+ var A = P[I];
10054
10061
  U = _ + T * D[A].x, $ = _ + T * D[A].y, O[A] = {
10055
10062
  x: U,
10056
10063
  y: $
@@ -10062,10 +10069,10 @@ function xl() {
10062
10069
  return L.assign = C.bind(null, !0), dr = L, dr;
10063
10070
  }
10064
10071
  var fr, ei;
10065
- function Dl() {
10072
+ function Gl() {
10066
10073
  if (ei) return fr;
10067
10074
  ei = 1;
10068
- var n = Vt(), r = Ze(), t = {
10075
+ var n = qt(), r = Ze(), t = {
10069
10076
  dimensions: ["x", "y"],
10070
10077
  center: 0.5,
10071
10078
  scale: 1
@@ -10103,10 +10110,10 @@ function Dl() {
10103
10110
  return i.assign = e.bind(null, !0), fr = i, fr;
10104
10111
  }
10105
10112
  var gr, ti;
10106
- function Ll() {
10113
+ function Il() {
10107
10114
  if (ti) return gr;
10108
10115
  ti = 1;
10109
- var n = Vt(), r = Ze(), t = {
10116
+ var n = qt(), r = Ze(), t = {
10110
10117
  dimensions: ["x", "y"],
10111
10118
  center: 0.5,
10112
10119
  rng: Math.random,
@@ -10146,10 +10153,10 @@ function Ll() {
10146
10153
  return i.assign = e.bind(null, !0), gr = i, gr;
10147
10154
  }
10148
10155
  var pr, ri;
10149
- function Gl() {
10156
+ function Pl() {
10150
10157
  if (ri) return pr;
10151
10158
  ri = 1;
10152
- var n = Vt(), r = Ze(), t = Math.PI / 180, e = {
10159
+ var n = qt(), r = Ze(), t = Math.PI / 180, e = {
10153
10160
  dimensions: ["x", "y"],
10154
10161
  centeredOnZero: !1,
10155
10162
  degrees: !1
@@ -10198,41 +10205,41 @@ function Gl() {
10198
10205
  return a.assign = i.bind(null, !0), pr = a, pr;
10199
10206
  }
10200
10207
  var ni;
10201
- function Pl() {
10202
- return ni || (ni = 1, et.circlepack = xl(), et.circular = Dl(), et.random = Ll(), et.rotation = Gl()), et;
10208
+ function Fl() {
10209
+ return ni || (ni = 1, et.circlepack = Ll(), et.circular = Gl(), et.random = Il(), et.rotation = Pl()), et;
10203
10210
  }
10204
- var vr = Pl(), mr, ii;
10205
- function Il() {
10211
+ var vr = Fl(), mr, ii;
10212
+ function Ol() {
10206
10213
  return ii || (ii = 1, mr = function() {
10207
10214
  var r, t, e = {};
10208
10215
  (function() {
10209
- 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, I = 10, _ = 3, W = 9, K = 10;
10216
+ 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;
10210
10217
  e.exports = function(f, d, U) {
10211
- var $, P, A, z, Z, te, oe, ne, V, se, ee = d.length, re = U.length, J = f.adjustSizes, le = f.barnesHutTheta * f.barnesHutTheta, q, B, G, ie, de, Y, X, F = [];
10212
- for (A = 0; A < ee; A += I)
10218
+ var $, I, A, z, Z, te, oe, ne, V, se, ee = d.length, re = U.length, J = f.adjustSizes, le = f.barnesHutTheta * f.barnesHutTheta, q, B, G, ie, de, Y, X, F = [];
10219
+ for (A = 0; A < ee; A += P)
10213
10220
  d[A + l] = d[A + s], d[A + c] = d[A + u], d[A + s] = 0, d[A + u] = 0;
10214
10221
  if (f.outboundAttractionDistribution) {
10215
- for (q = 0, A = 0; A < ee; A += I)
10222
+ for (q = 0, A = 0; A < ee; A += P)
10216
10223
  q += d[A + h];
10217
- q /= ee / I;
10224
+ q /= ee / P;
10218
10225
  }
10219
10226
  if (f.barnesHutOptimize) {
10220
10227
  var ve = 1 / 0, Le = -1 / 0, ye = 1 / 0, Re = -1 / 0, ce, be, Ue;
10221
- for (A = 0; A < ee; A += I)
10228
+ for (A = 0; A < ee; A += P)
10222
10229
  ve = Math.min(ve, d[A + a]), Le = Math.max(Le, d[A + a]), ye = Math.min(ye, d[A + o]), Re = Math.max(Re, d[A + o]);
10223
10230
  var we = Le - ve, Ge = Re - ye;
10224
- for (we > Ge ? (ye -= (we - Ge) / 2, Re = ye + we) : (ve -= (Ge - we) / 2, Le = ve + Ge), F[0 + E] = -1, F[0 + m] = (ve + Le) / 2, F[0 + p] = (ye + Re) / 2, F[0 + C] = Math.max(Le - ve, Re - ye), F[0 + L] = -1, F[0 + g] = -1, F[0 + x] = 0, F[0 + S] = 0, F[0 + D] = 0, $ = 1, A = 0; A < ee; A += I)
10225
- for (P = 0, Ue = O; ; )
10226
- if (F[P + g] >= 0) {
10227
- d[A + a] < F[P + m] ? d[A + o] < F[P + p] ? ce = F[P + g] : ce = F[P + g] + W : d[A + o] < F[P + p] ? ce = F[P + g] + W * 2 : ce = F[P + g] + W * 3, F[P + S] = (F[P + S] * F[P + x] + d[A + a] * d[A + h]) / (F[P + x] + d[A + h]), F[P + D] = (F[P + D] * F[P + x] + d[A + o] * d[A + h]) / (F[P + x] + d[A + h]), F[P + x] += d[A + h], P = ce;
10231
+ for (we > Ge ? (ye -= (we - Ge) / 2, Re = ye + we) : (ve -= (Ge - we) / 2, Le = ve + Ge), F[0 + E] = -1, F[0 + m] = (ve + Le) / 2, F[0 + p] = (ye + Re) / 2, F[0 + C] = Math.max(Le - ve, Re - ye), F[0 + L] = -1, F[0 + g] = -1, F[0 + x] = 0, F[0 + S] = 0, F[0 + D] = 0, $ = 1, A = 0; A < ee; A += P)
10232
+ for (I = 0, Ue = O; ; )
10233
+ if (F[I + g] >= 0) {
10234
+ d[A + a] < F[I + m] ? d[A + o] < F[I + p] ? ce = F[I + g] : ce = F[I + g] + W : d[A + o] < F[I + p] ? ce = F[I + g] + W * 2 : ce = F[I + g] + W * 3, F[I + S] = (F[I + S] * F[I + x] + d[A + a] * d[A + h]) / (F[I + x] + d[A + h]), F[I + D] = (F[I + D] * F[I + x] + d[A + o] * d[A + h]) / (F[I + x] + d[A + h]), F[I + x] += d[A + h], I = ce;
10228
10235
  continue;
10229
- } else if (F[P + E] < 0) {
10230
- F[P + E] = A;
10236
+ } else if (F[I + E] < 0) {
10237
+ F[I + E] = A;
10231
10238
  break;
10232
10239
  } else {
10233
- if (F[P + g] = $ * W, ne = F[P + C] / 2, V = F[P + g], F[V + E] = -1, F[V + m] = F[P + m] - ne, F[V + p] = F[P + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] - ne, F[V + p] = F[P + p] + ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] + ne, F[V + p] = F[P + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[P + m] + ne, F[V + p] = F[P + p] + ne, F[V + C] = ne, F[V + L] = F[P + L], F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, $ += 4, d[F[P + E] + a] < F[P + m] ? d[F[P + E] + o] < F[P + p] ? ce = F[P + g] : ce = F[P + g] + W : d[F[P + E] + o] < F[P + p] ? ce = F[P + g] + W * 2 : ce = F[P + g] + W * 3, F[P + x] = d[F[P + E] + h], F[P + S] = d[F[P + E] + a], F[P + D] = d[F[P + E] + o], F[ce + E] = F[P + E], F[P + E] = -1, d[A + a] < F[P + m] ? d[A + o] < F[P + p] ? be = F[P + g] : be = F[P + g] + W : d[A + o] < F[P + p] ? be = F[P + g] + W * 2 : be = F[P + g] + W * 3, ce === be)
10240
+ if (F[I + g] = $ * W, ne = F[I + C] / 2, V = F[I + g], F[V + E] = -1, F[V + m] = F[I + m] - ne, F[V + p] = F[I + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] - ne, F[V + p] = F[I + p] + ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] + ne, F[V + p] = F[I + p] - ne, F[V + C] = ne, F[V + L] = V + W, F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, V += W, F[V + E] = -1, F[V + m] = F[I + m] + ne, F[V + p] = F[I + p] + ne, F[V + C] = ne, F[V + L] = F[I + L], F[V + g] = -1, F[V + x] = 0, F[V + S] = 0, F[V + D] = 0, $ += 4, d[F[I + E] + a] < F[I + m] ? d[F[I + E] + o] < F[I + p] ? ce = F[I + g] : ce = F[I + g] + W : d[F[I + E] + o] < F[I + p] ? ce = F[I + g] + W * 2 : ce = F[I + g] + W * 3, F[I + x] = d[F[I + E] + h], F[I + S] = d[F[I + E] + a], F[I + D] = d[F[I + E] + o], F[ce + E] = F[I + E], F[I + E] = -1, d[A + a] < F[I + m] ? d[A + o] < F[I + p] ? be = F[I + g] : be = F[I + g] + W : d[A + o] < F[I + p] ? be = F[I + g] + W * 2 : be = F[I + g] + W * 3, ce === be)
10234
10241
  if (Ue--) {
10235
- P = ce;
10242
+ I = ce;
10236
10243
  continue;
10237
10244
  } else {
10238
10245
  Ue = O;
@@ -10243,46 +10250,46 @@ function Il() {
10243
10250
  }
10244
10251
  }
10245
10252
  if (f.barnesHutOptimize)
10246
- for (B = f.scalingRatio, A = 0; A < ee; A += I)
10247
- for (P = 0; ; )
10248
- if (F[P + g] >= 0)
10253
+ for (B = f.scalingRatio, A = 0; A < ee; A += P)
10254
+ for (I = 0; ; )
10255
+ if (F[I + g] >= 0)
10249
10256
  if (Y = Math.pow(
10250
- d[A + a] - F[P + S],
10257
+ d[A + a] - F[I + S],
10251
10258
  2
10252
10259
  ) + Math.pow(
10253
- d[A + o] - F[P + D],
10260
+ d[A + o] - F[I + D],
10254
10261
  2
10255
- ), se = F[P + C], 4 * se * se / Y < le) {
10256
- if (G = d[A + a] - F[P + S], ie = d[A + o] - F[P + D], J === !0 ? Y > 0 ? (X = B * d[A + h] * F[P + x] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * F[P + x] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * F[P + x] / Y, d[A + s] += G * X, d[A + u] += ie * X), P = F[P + L], P < 0) break;
10262
+ ), se = F[I + C], 4 * se * se / Y < le) {
10263
+ if (G = d[A + a] - F[I + S], ie = d[A + o] - F[I + D], J === !0 ? Y > 0 ? (X = B * d[A + h] * F[I + x] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * F[I + x] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * F[I + x] / Y, d[A + s] += G * X, d[A + u] += ie * X), I = F[I + L], I < 0) break;
10257
10264
  continue;
10258
10265
  } else {
10259
- P = F[P + g];
10266
+ I = F[I + g];
10260
10267
  continue;
10261
10268
  }
10262
10269
  else {
10263
- if (te = F[P + E], te >= 0 && te !== A && (G = d[A + a] - d[te + a], ie = d[A + o] - d[te + o], Y = G * G + ie * ie, J === !0 ? Y > 0 ? (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * d[te + h] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X)), P = F[P + L], P < 0) break;
10270
+ if (te = F[I + E], te >= 0 && te !== A && (G = d[A + a] - d[te + a], ie = d[A + o] - d[te + o], Y = G * G + ie * ie, J === !0 ? Y > 0 ? (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X) : Y < 0 && (X = -B * d[A + h] * d[te + h] / Math.sqrt(Y), d[A + s] += G * X, d[A + u] += ie * X) : Y > 0 && (X = B * d[A + h] * d[te + h] / Y, d[A + s] += G * X, d[A + u] += ie * X)), I = F[I + L], I < 0) break;
10264
10271
  continue;
10265
10272
  }
10266
10273
  else
10267
- for (B = f.scalingRatio, z = 0; z < ee; z += I)
10268
- for (Z = 0; Z < z; Z += I)
10274
+ for (B = f.scalingRatio, z = 0; z < ee; z += P)
10275
+ for (Z = 0; Z < z; Z += P)
10269
10276
  G = d[z + a] - d[Z + a], ie = d[z + o] - d[Z + o], J === !0 ? (Y = Math.sqrt(G * G + ie * ie) - d[z + y] - d[Z + y], Y > 0 ? (X = B * d[z + h] * d[Z + h] / Y / Y, d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X) : Y < 0 && (X = 100 * B * d[z + h] * d[Z + h], d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X)) : (Y = Math.sqrt(G * G + ie * ie), Y > 0 && (X = B * d[z + h] * d[Z + h] / Y / Y, d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X));
10270
- for (V = f.gravity / f.scalingRatio, B = f.scalingRatio, A = 0; A < ee; A += I)
10277
+ for (V = f.gravity / f.scalingRatio, B = f.scalingRatio, A = 0; A < ee; A += P)
10271
10278
  X = 0, G = d[A + a], ie = d[A + o], Y = Math.sqrt(Math.pow(G, 2) + Math.pow(ie, 2)), f.strongGravityMode ? Y > 0 && (X = B * d[A + h] * V) : Y > 0 && (X = B * d[A + h] * V / Y), d[A + s] -= G * X, d[A + u] -= ie * X;
10272
10279
  for (B = 1 * (f.outboundAttractionDistribution ? q : 1), oe = 0; oe < re; oe += _)
10273
10280
  z = U[oe + R], Z = U[oe + w], ne = U[oe + k], de = Math.pow(ne, f.edgeWeightInfluence), G = d[z + a] - d[Z + a], ie = d[z + o] - d[Z + o], J === !0 ? (Y = Math.sqrt(G * G + ie * ie) - d[z + y] - d[Z + y], f.linLogMode ? f.outboundAttractionDistribution ? Y > 0 && (X = -B * de * Math.log(1 + Y) / Y / d[z + h]) : Y > 0 && (X = -B * de * Math.log(1 + Y) / Y) : f.outboundAttractionDistribution ? Y > 0 && (X = -B * de / d[z + h]) : Y > 0 && (X = -B * de)) : (Y = Math.sqrt(Math.pow(G, 2) + Math.pow(ie, 2)), f.linLogMode ? f.outboundAttractionDistribution ? Y > 0 && (X = -B * de * Math.log(1 + Y) / Y / d[z + h]) : Y > 0 && (X = -B * de * Math.log(1 + Y) / Y) : f.outboundAttractionDistribution ? (Y = 1, X = -B * de / d[z + h]) : (Y = 1, X = -B * de)), Y > 0 && (d[z + s] += G * X, d[z + u] += ie * X, d[Z + s] -= G * X, d[Z + u] -= ie * X);
10274
- var Pe, ct, kt, Ve, Ct, xt;
10281
+ var Ie, ct, kt, Ve, Ct, xt;
10275
10282
  if (J === !0)
10276
- for (A = 0; A < ee; A += I)
10277
- d[A + b] !== 1 && (Pe = Math.sqrt(
10283
+ for (A = 0; A < ee; A += P)
10284
+ d[A + b] !== 1 && (Ie = Math.sqrt(
10278
10285
  Math.pow(d[A + s], 2) + Math.pow(d[A + u], 2)
10279
- ), Pe > K && (d[A + s] = d[A + s] * K / Pe, d[A + u] = d[A + u] * K / Pe), ct = d[A + h] * Math.sqrt(
10286
+ ), Ie > K && (d[A + s] = d[A + s] * K / Ie, d[A + u] = d[A + u] * K / Ie), ct = d[A + h] * Math.sqrt(
10280
10287
  (d[A + l] - d[A + s]) * (d[A + l] - d[A + s]) + (d[A + c] - d[A + u]) * (d[A + c] - d[A + u])
10281
10288
  ), kt = Math.sqrt(
10282
10289
  (d[A + l] + d[A + s]) * (d[A + l] + d[A + s]) + (d[A + c] + d[A + u]) * (d[A + c] + d[A + u])
10283
10290
  ) / 2, Ve = 0.1 * Math.log(1 + kt) / (1 + Math.sqrt(ct)), Ct = d[A + a] + d[A + s] * (Ve / f.slowDown), d[A + a] = Ct, xt = d[A + o] + d[A + u] * (Ve / f.slowDown), d[A + o] = xt);
10284
10291
  else
10285
- for (A = 0; A < ee; A += I)
10292
+ for (A = 0; A < ee; A += P)
10286
10293
  d[A + b] !== 1 && (ct = d[A + h] * Math.sqrt(
10287
10294
  (d[A + l] - d[A + s]) * (d[A + l] - d[A + s]) + (d[A + c] - d[A + u]) * (d[A + c] - d[A + u])
10288
10295
  ), kt = Math.sqrt(
@@ -10384,25 +10391,25 @@ function ha() {
10384
10391
  return t(e, n);
10385
10392
  }, yt;
10386
10393
  }
10387
- var Ie = {}, oi;
10394
+ var Pe = {}, oi;
10388
10395
  function da() {
10389
- if (oi) return Ie;
10396
+ if (oi) return Pe;
10390
10397
  oi = 1;
10391
10398
  var n = 10, r = 3;
10392
- return Ie.assign = function(t) {
10399
+ return Pe.assign = function(t) {
10393
10400
  t = t || {};
10394
10401
  var e = Array.prototype.slice.call(arguments).slice(1), i, a, o;
10395
10402
  for (i = 0, o = e.length; i < o; i++)
10396
10403
  if (e[i])
10397
10404
  for (a in e[i]) t[a] = e[i][a];
10398
10405
  return t;
10399
- }, Ie.validateSettings = function(t) {
10406
+ }, Pe.validateSettings = function(t) {
10400
10407
  return "linLogMode" in t && typeof t.linLogMode != "boolean" ? { message: "the `linLogMode` setting should be a boolean." } : "outboundAttractionDistribution" in t && typeof t.outboundAttractionDistribution != "boolean" ? {
10401
10408
  message: "the `outboundAttractionDistribution` setting should be a boolean."
10402
10409
  } : "adjustSizes" in t && typeof t.adjustSizes != "boolean" ? { message: "the `adjustSizes` setting should be a boolean." } : "edgeWeightInfluence" in t && typeof t.edgeWeightInfluence != "number" ? {
10403
10410
  message: "the `edgeWeightInfluence` setting should be a number."
10404
10411
  } : "scalingRatio" in t && !(typeof t.scalingRatio == "number" && t.scalingRatio >= 0) ? { message: "the `scalingRatio` setting should be a number >= 0." } : "strongGravityMode" in t && typeof t.strongGravityMode != "boolean" ? { message: "the `strongGravityMode` setting should be a boolean." } : "gravity" in t && !(typeof t.gravity == "number" && t.gravity >= 0) ? { message: "the `gravity` setting should be a number >= 0." } : "slowDown" in t && !(typeof t.slowDown == "number" || t.slowDown >= 0) ? { message: "the `slowDown` setting should be a number >= 0." } : "barnesHutOptimize" in t && typeof t.barnesHutOptimize != "boolean" ? { message: "the `barnesHutOptimize` setting should be a boolean." } : "barnesHutTheta" in t && !(typeof t.barnesHutTheta == "number" && t.barnesHutTheta >= 0) ? { message: "the `barnesHutTheta` setting should be a number >= 0." } : null;
10405
- }, Ie.graphToByteArrays = function(t, e) {
10412
+ }, Pe.graphToByteArrays = function(t, e) {
10406
10413
  var i = t.order, a = t.size, o = {}, s, u = new Float32Array(i * n), l = new Float32Array(a * r);
10407
10414
  return s = 0, t.forEachNode(function(c, h) {
10408
10415
  o[c] = s, u[s] = h.x, u[s + 1] = h.y, u[s + 2] = 0, u[s + 3] = 0, u[s + 4] = 0, u[s + 5] = 0, u[s + 6] = 1, u[s + 7] = 1, u[s + 8] = h.size || 1, u[s + 9] = h.fixed ? 1 : 0, s += n;
@@ -10413,17 +10420,17 @@ function da() {
10413
10420
  nodes: u,
10414
10421
  edges: l
10415
10422
  };
10416
- }, Ie.assignLayoutChanges = function(t, e, i) {
10423
+ }, Pe.assignLayoutChanges = function(t, e, i) {
10417
10424
  var a = 0;
10418
10425
  t.updateEachNodeAttributes(function(o, s) {
10419
10426
  return s.x = e[a], s.y = e[a + 1], a += n, i ? i(o, s) : s;
10420
10427
  });
10421
- }, Ie.readGraphPositions = function(t, e) {
10428
+ }, Pe.readGraphPositions = function(t, e) {
10422
10429
  var i = 0;
10423
10430
  t.forEachNode(function(a, o) {
10424
10431
  e[i] = o.x, e[i + 1] = o.y, i += n;
10425
10432
  });
10426
- }, Ie.collectLayoutChanges = function(t, e, i) {
10433
+ }, Pe.collectLayoutChanges = function(t, e, i) {
10427
10434
  for (var a = t.nodes(), o = {}, s = 0, u = 0, l = e.length; s < l; s += n) {
10428
10435
  if (i) {
10429
10436
  var c = Object.assign({}, t.getNodeAttributes(a[u]));
@@ -10439,12 +10446,12 @@ function da() {
10439
10446
  u++;
10440
10447
  }
10441
10448
  return o;
10442
- }, Ie.createWorker = function(e) {
10449
+ }, Pe.createWorker = function(e) {
10443
10450
  var i = window.URL || window.webkitURL, a = e.toString(), o = i.createObjectURL(
10444
10451
  new Blob(["(" + a + ").call(this);"], { type: "text/javascript" })
10445
10452
  ), s = new Worker(o);
10446
10453
  return i.revokeObjectURL(o), s;
10447
- }, Ie;
10454
+ }, Pe;
10448
10455
  }
10449
10456
  var yr, si;
10450
10457
  function fa() {
@@ -10462,10 +10469,10 @@ function fa() {
10462
10469
  }), yr;
10463
10470
  }
10464
10471
  var br, ui;
10465
- function Fl() {
10472
+ function zl() {
10466
10473
  if (ui) return br;
10467
10474
  ui = 1;
10468
- var n = Il(), r = Ze(), t = ha().createEdgeWeightGetter, e = da(), i = fa();
10475
+ var n = Ol(), r = Ze(), t = ha().createEdgeWeightGetter, e = da(), i = fa();
10469
10476
  function a(o, s) {
10470
10477
  if (s = s || {}, !r(o))
10471
10478
  throw new Error(
@@ -10514,23 +10521,23 @@ function Fl() {
10514
10521
  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);
10515
10522
  }, br = a, br;
10516
10523
  }
10517
- var Ol = Fl();
10518
- const zl = /* @__PURE__ */ Br(Ol);
10524
+ var Nl = zl();
10525
+ const Ul = /* @__PURE__ */ Br(Nl);
10519
10526
  var wr, li;
10520
- function Nl() {
10527
+ function $l() {
10521
10528
  if (li) return wr;
10522
10529
  li = 1;
10523
10530
  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;
10524
- return wr = function(I, _, W) {
10525
- var K, T, f, d, U, $, P, A, z, Z, te = _.length, oe = W.length, ne = I.adjustSizes, V = I.barnesHutTheta * I.barnesHutTheta, se, ee, re, J, le, q, B, G = [];
10531
+ return wr = function(P, _, W) {
10532
+ 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 = [];
10526
10533
  for (f = 0; f < te; f += g)
10527
10534
  _[f + i] = _[f + t], _[f + a] = _[f + e], _[f + t] = 0, _[f + e] = 0;
10528
- if (I.outboundAttractionDistribution) {
10535
+ if (P.outboundAttractionDistribution) {
10529
10536
  for (se = 0, f = 0; f < te; f += g)
10530
10537
  se += _[f + o];
10531
10538
  se /= te / g;
10532
10539
  }
10533
- if (I.barnesHutOptimize) {
10540
+ if (P.barnesHutOptimize) {
10534
10541
  var ie = 1 / 0, de = -1 / 0, Y = 1 / 0, X = -1 / 0, F, ve, Le;
10535
10542
  for (f = 0; f < te; f += g)
10536
10543
  ie = Math.min(ie, _[f + n]), de = Math.max(de, _[f + n]), Y = Math.min(Y, _[f + r]), X = Math.max(X, _[f + r]);
@@ -10556,8 +10563,8 @@ function Nl() {
10556
10563
  break;
10557
10564
  }
10558
10565
  }
10559
- if (I.barnesHutOptimize)
10560
- for (ee = I.scalingRatio, f = 0; f < te; f += g)
10566
+ if (P.barnesHutOptimize)
10567
+ for (ee = P.scalingRatio, f = 0; f < te; f += g)
10561
10568
  for (T = 0; ; )
10562
10569
  if (G[T + E] >= 0)
10563
10570
  if (q = Math.pow(
@@ -10578,14 +10585,14 @@ function Nl() {
10578
10585
  continue;
10579
10586
  }
10580
10587
  else
10581
- for (ee = I.scalingRatio, d = 0; d < te; d += g)
10588
+ for (ee = P.scalingRatio, d = 0; d < te; d += g)
10582
10589
  for (U = 0; U < d; U += g)
10583
10590
  re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], q > 0 ? (B = ee * _[d + o] * _[U + o] / q / q, _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B) : q < 0 && (B = 100 * ee * _[d + o] * _[U + o], _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B)) : (q = Math.sqrt(re * re + J * J), q > 0 && (B = ee * _[d + o] * _[U + o] / q / q, _[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B));
10584
- for (z = I.gravity / I.scalingRatio, ee = I.scalingRatio, f = 0; f < te; f += g)
10585
- B = 0, re = _[f + n], J = _[f + r], q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), I.strongGravityMode ? q > 0 && (B = ee * _[f + o] * z) : q > 0 && (B = ee * _[f + o] * z / q), _[f + t] -= re * B, _[f + e] -= J * B;
10586
- for (ee = 1 * (I.outboundAttractionDistribution ? se : 1), P = 0; P < oe; P += x)
10587
- d = W[P + c], U = W[P + h], A = W[P + v], le = Math.pow(A, I.edgeWeightInfluence), re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], I.linLogMode ? I.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : I.outboundAttractionDistribution ? q > 0 && (B = -ee * le / _[d + o]) : q > 0 && (B = -ee * le)) : (q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), I.linLogMode ? I.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : I.outboundAttractionDistribution ? (q = 1, B = -ee * le / _[d + o]) : (q = 1, B = -ee * le)), q > 0 && (_[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B);
10588
- var ce, be, Ue, we, Ge, Pe;
10591
+ for (z = P.gravity / P.scalingRatio, ee = P.scalingRatio, f = 0; f < te; f += g)
10592
+ B = 0, re = _[f + n], J = _[f + r], q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), P.strongGravityMode ? q > 0 && (B = ee * _[f + o] * z) : q > 0 && (B = ee * _[f + o] * z / q), _[f + t] -= re * B, _[f + e] -= J * B;
10593
+ for (ee = 1 * (P.outboundAttractionDistribution ? se : 1), I = 0; I < oe; I += x)
10594
+ d = W[I + c], U = W[I + h], A = W[I + v], le = Math.pow(A, P.edgeWeightInfluence), re = _[d + n] - _[U + n], J = _[d + r] - _[U + r], ne === !0 ? (q = Math.sqrt(re * re + J * J) - _[d + u] - _[U + u], P.linLogMode ? P.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : P.outboundAttractionDistribution ? q > 0 && (B = -ee * le / _[d + o]) : q > 0 && (B = -ee * le)) : (q = Math.sqrt(Math.pow(re, 2) + Math.pow(J, 2)), P.linLogMode ? P.outboundAttractionDistribution ? q > 0 && (B = -ee * le * Math.log(1 + q) / q / _[d + o]) : q > 0 && (B = -ee * le * Math.log(1 + q) / q) : P.outboundAttractionDistribution ? (q = 1, B = -ee * le / _[d + o]) : (q = 1, B = -ee * le)), q > 0 && (_[d + t] += re * B, _[d + e] += J * B, _[U + t] -= re * B, _[U + e] -= J * B);
10595
+ var ce, be, Ue, we, Ge, Ie;
10589
10596
  if (ne === !0)
10590
10597
  for (f = 0; f < te; f += g)
10591
10598
  _[f + l] !== 1 && (ce = Math.sqrt(
@@ -10594,7 +10601,7 @@ function Nl() {
10594
10601
  (_[f + i] - _[f + t]) * (_[f + i] - _[f + t]) + (_[f + a] - _[f + e]) * (_[f + a] - _[f + e])
10595
10602
  ), Ue = Math.sqrt(
10596
10603
  (_[f + i] + _[f + t]) * (_[f + i] + _[f + t]) + (_[f + a] + _[f + e]) * (_[f + a] + _[f + e])
10597
- ) / 2, we = 0.1 * Math.log(1 + Ue) / (1 + Math.sqrt(be)), Ge = _[f + n] + _[f + t] * (we / I.slowDown), _[f + n] = Ge, Pe = _[f + r] + _[f + e] * (we / I.slowDown), _[f + r] = Pe);
10604
+ ) / 2, we = 0.1 * Math.log(1 + Ue) / (1 + Math.sqrt(be)), Ge = _[f + n] + _[f + t] * (we / P.slowDown), _[f + n] = Ge, Ie = _[f + r] + _[f + e] * (we / P.slowDown), _[f + r] = Ie);
10598
10605
  else
10599
10606
  for (f = 0; f < te; f += g)
10600
10607
  _[f + l] !== 1 && (be = _[f + o] * Math.sqrt(
@@ -10606,15 +10613,15 @@ function Nl() {
10606
10613
  Math.sqrt(
10607
10614
  we * (Math.pow(_[f + t], 2) + Math.pow(_[f + e], 2)) / (1 + Math.sqrt(be))
10608
10615
  )
10609
- ), Ge = _[f + n] + _[f + t] * (we / I.slowDown), _[f + n] = Ge, Pe = _[f + r] + _[f + e] * (we / I.slowDown), _[f + r] = Pe);
10616
+ ), Ge = _[f + n] + _[f + t] * (we / P.slowDown), _[f + n] = Ge, Ie = _[f + r] + _[f + e] * (we / P.slowDown), _[f + r] = Ie);
10610
10617
  return {};
10611
10618
  }, wr;
10612
10619
  }
10613
10620
  var Er, ci;
10614
- function Ul() {
10621
+ function Ml() {
10615
10622
  if (ci) return Er;
10616
10623
  ci = 1;
10617
- var n = Ze(), r = ha().createEdgeWeightGetter, t = Nl(), e = da(), i = fa();
10624
+ var n = Ze(), r = ha().createEdgeWeightGetter, t = $l(), e = da(), i = fa();
10618
10625
  function a(u, l, c) {
10619
10626
  if (!n(l))
10620
10627
  throw new Error(
@@ -10659,9 +10666,9 @@ function Ul() {
10659
10666
  var s = a.bind(null, !1);
10660
10667
  return s.assign = a.bind(null, !0), s.inferSettings = o, Er = s, Er;
10661
10668
  }
10662
- var $l = Ul();
10663
- const Ml = /* @__PURE__ */ Br($l), bt = 64, hi = /* @__PURE__ */ new Map();
10664
- function Bl(n) {
10669
+ var Bl = Ml();
10670
+ const Wl = /* @__PURE__ */ Br(Bl), bt = 64, hi = /* @__PURE__ */ new Map();
10671
+ function Hl(n) {
10665
10672
  const r = document.createElement("canvas");
10666
10673
  r.width = bt, r.height = bt;
10667
10674
  const t = r.getContext("2d");
@@ -10669,39 +10676,39 @@ function Bl(n) {
10669
10676
  const e = [...n].length, i = Math.floor(bt * (e <= 2 ? 0.78 : e <= 4 ? 0.4 : 0.22));
10670
10677
  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");
10671
10678
  }
10672
- function Wl(n) {
10679
+ function jl(n) {
10673
10680
  if (n.kind === "url") return n.value;
10674
10681
  let r = hi.get(n.value);
10675
- return r === void 0 && (r = Bl(n.value), hi.set(n.value, r)), r;
10682
+ return r === void 0 && (r = Hl(n.value), hi.set(n.value, r)), r;
10676
10683
  }
10677
- const Hl = 9;
10678
- function jl(n) {
10679
- return Math.max(n, Hl);
10684
+ const Vl = 9;
10685
+ function ql(n) {
10686
+ return Math.max(n, Vl);
10680
10687
  }
10681
10688
  const ga = 4;
10682
- function Vl(n) {
10689
+ function Kl(n) {
10683
10690
  return Math.cbrt(Math.max(n, 0)) * ga;
10684
10691
  }
10685
- function Cc(n, r, t, e) {
10692
+ function Dc(n, r, t, e) {
10686
10693
  if (n <= 0) return 0;
10687
10694
  const i = t * Math.PI / 360, a = e / (2 * Math.tan(i));
10688
10695
  return r / n * a;
10689
10696
  }
10690
- function xc(n) {
10697
+ function Lc(n) {
10691
10698
  return Math.pow(n / Mr, 3);
10692
10699
  }
10693
- const Dc = 2 * ga / Mr, Lc = 50, ql = 60;
10694
- function Kl(n, r, t) {
10700
+ const Gc = 2 * ga / Mr, Ic = 50, Xl = 60;
10701
+ function Yl(n, r, t) {
10695
10702
  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;
10696
10703
  return o > 0 && s > 0 ? o / s : 1;
10697
10704
  }
10698
- function Gc(n, r, t, e, i) {
10705
+ function Pc(n, r, t, e, i) {
10699
10706
  if (!(t > 0) || !(e > 0)) return 0;
10700
10707
  let a = 0;
10701
10708
  for (const l of n) {
10702
10709
  const { x: c = Number.NaN, y: h = Number.NaN, z: v = Number.NaN } = l;
10703
10710
  if (!Number.isFinite(c) || !Number.isFinite(h) || !Number.isFinite(v)) continue;
10704
- const y = Vl(l.val);
10711
+ const y = Kl(l.val);
10705
10712
  a = Math.max(
10706
10713
  a,
10707
10714
  Math.abs(c) + y,
@@ -10718,7 +10725,7 @@ function Gc(n, r, t, e, i) {
10718
10725
  );
10719
10726
  return Number.isFinite(u) ? u : 0;
10720
10727
  }
10721
- function Pc(n, r) {
10728
+ function Fc(n, r) {
10722
10729
  const t = Math.hypot(n.x, n.y, n.z);
10723
10730
  if (!(t > 0)) return { x: 0, y: 0, z: r };
10724
10731
  const e = r / t;
@@ -10727,15 +10734,15 @@ function Pc(n, r) {
10727
10734
  function pa(n) {
10728
10735
  return Math.max(n, 0) * 0.4;
10729
10736
  }
10730
- function Ic(n, r) {
10731
- const t = Number.isFinite(n) ? n : ql;
10737
+ function Oc(n, r) {
10738
+ const t = Number.isFinite(n) ? n : Xl;
10732
10739
  return Math.min(Math.max(t, 0), pa(r));
10733
10740
  }
10734
- function Xl(n, r, t) {
10741
+ function Zl(n, r, t) {
10735
10742
  const e = Number.isFinite(n) ? n : r;
10736
10743
  return Math.max(e, t);
10737
10744
  }
10738
- function Yl(n) {
10745
+ function Ql(n) {
10739
10746
  return Rt(n);
10740
10747
  }
10741
10748
  function va(n, r) {
@@ -10743,7 +10750,7 @@ function va(n, r) {
10743
10750
  const t = 3.5, e = t * (1 - Math.exp(-r / t)) * rn;
10744
10751
  return r === 0 ? 0 : e * n / r;
10745
10752
  }
10746
- function Zl({
10753
+ function Jl({
10747
10754
  nodes: n,
10748
10755
  edges: r,
10749
10756
  styles: t,
@@ -10758,7 +10765,7 @@ function Zl({
10758
10765
  }, [a]), Qe(() => {
10759
10766
  const b = s.current;
10760
10767
  if (!b) return;
10761
- const R = h.current, w = new zu(R, b, {
10768
+ const R = h.current, w = new Uu(R, b, {
10762
10769
  allowInvalidContainer: !0,
10763
10770
  // Off by default in Sigma v3 - without it clickEdge never fires, breaking edge
10764
10771
  // selection on the canvas and edge hops in the adjacency preview.
@@ -10782,8 +10789,8 @@ function Zl({
10782
10789
  edgeProgramClasses: {
10783
10790
  line: Zi,
10784
10791
  arrow: Xi,
10785
- curved: Rl,
10786
- curvedArrow: Al
10792
+ curved: kl,
10793
+ curvedArrow: Cl
10787
10794
  }
10788
10795
  });
10789
10796
  u.current = w, w.on("clickNode", ({ node: E }) => v.current({ kind: "node", id: Number(E) })), w.on("clickEdge", ({ edge: E }) => {
@@ -10795,11 +10802,11 @@ function Zl({
10795
10802
  k.disconnect(), l.current?.kill(), l.current = null, w.kill(), u.current = null;
10796
10803
  };
10797
10804
  }, []), Qe(() => {
10798
- const b = h.current, w = Object.keys(n).length + Object.keys(r).length <= ja, k = /* @__PURE__ */ new Set();
10805
+ const b = h.current, w = Object.keys(n).length + Object.keys(r).length <= qa, k = /* @__PURE__ */ new Set();
10799
10806
  for (const m of Object.values(n)) {
10800
10807
  const p = String(m.id);
10801
10808
  k.add(p);
10802
- const C = t.nodes[m.id], L = C.image ? Wl(C.image) : null, g = {
10809
+ const C = t.nodes[m.id], L = C.image ? jl(C.image) : null, g = {
10803
10810
  label: w && e.showNodeLabels ? m.label ? `${m.label} #${m.id}` : `#${m.id}` : null,
10804
10811
  color: C.color,
10805
10812
  size: C.size,
@@ -10833,7 +10840,7 @@ function Zl({
10833
10840
  }
10834
10841
  for (const m of b.edges())
10835
10842
  E.has(m) || b.dropEdge(m);
10836
- Sl(b), b.forEachEdge((m, p) => {
10843
+ Al(b), b.forEachEdge((m, p) => {
10837
10844
  const C = p.parallelIndex, L = p.parallelMaxIndex;
10838
10845
  typeof C == "number" ? b.mergeEdgeAttributes(m, {
10839
10846
  type: e.edgeArrows ? "curvedArrow" : "curved",
@@ -10850,16 +10857,16 @@ function Zl({
10850
10857
  const w = u.current;
10851
10858
  if (!w) return;
10852
10859
  w.resize();
10853
- const k = w.getStagePadding(), E = Kl(w.getDimensions(), k, R ?? k);
10860
+ const k = w.getStagePadding(), E = Yl(w.getDimensions(), k, R ?? k);
10854
10861
  w.getCamera().animate(
10855
10862
  { x: 0.5, y: 0.5, ratio: E, angle: 0 },
10856
10863
  // Floor of 1: sigma cannot take a zero duration (fitDurationMs says why).
10857
- { duration: Xl(b, Ql, 1) }
10864
+ { duration: Zl(b, ec, 1) }
10858
10865
  ), w.scheduleRender();
10859
10866
  },
10860
10867
  getCameraRatio: () => u.current?.getCamera().ratio ?? 1,
10861
10868
  setCameraRatio: (b) => {
10862
- Yl(b) && u.current?.getCamera().animate({ ratio: b }, { duration: 1 });
10869
+ Ql(b) && u.current?.getCamera().animate({ ratio: b }, { duration: 1 });
10863
10870
  }
10864
10871
  }),
10865
10872
  []
@@ -10898,8 +10905,8 @@ function Zl({
10898
10905
  }
10899
10906
  if (b.order === 0) return;
10900
10907
  if (!l.current) {
10901
- const w = Ml.inferSettings(b);
10902
- l.current = new zl(b, { settings: w });
10908
+ const w = Wl.inferSettings(b);
10909
+ l.current = new Ul(b, { settings: w });
10903
10910
  }
10904
10911
  l.current.start();
10905
10912
  const R = window.setTimeout(() => l.current?.stop(), 5e3);
@@ -10916,7 +10923,7 @@ function Zl({
10916
10923
  if (!k || !E)
10917
10924
  b.style.display = "none";
10918
10925
  else {
10919
- const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C = jl(k.scaleSize(E.size));
10926
+ const { x: m, y: p } = k.framedGraphToViewport({ x: E.x, y: E.y }), C = ql(k.scaleSize(E.size));
10920
10927
  b.style.display = "block", b.style.left = `${m}px`, b.style.top = `${p}px`, b.style.setProperty("--eclipse-r", `${C}px`);
10921
10928
  }
10922
10929
  R = requestAnimationFrame(w);
@@ -10938,8 +10945,8 @@ function Zl({
10938
10945
  /* @__PURE__ */ We("div", { ref: c, className: "eclipse-highlight", style: { display: "none" }, "aria-hidden": !0 })
10939
10946
  ] });
10940
10947
  }
10941
- const Ql = 600, Jl = ya(() => import("./Canvas3D-CmDAo5BT.js").then((n) => ({ default: n.Canvas3D })));
10942
- function ec({
10948
+ const ec = 600, tc = ya(() => import("./Canvas3D-DEWoiNMD.js").then((n) => ({ default: n.Canvas3D })));
10949
+ function rc({
10943
10950
  nodes: n,
10944
10951
  edges: r,
10945
10952
  config: t,
@@ -10961,9 +10968,9 @@ function ec({
10961
10968
  edgeIds: new Set(i.edgeIds),
10962
10969
  active: !0,
10963
10970
  dim: !1
10964
- } : Va;
10971
+ } : Ka;
10965
10972
  }, [e, i]), c = an(
10966
- () => uo(n, r, l, t),
10973
+ () => co(n, r, l, t),
10967
10974
  [n, r, l, t]
10968
10975
  );
10969
10976
  return t.renderer === "3d" ? /* @__PURE__ */ We(
@@ -10971,7 +10978,7 @@ function ec({
10971
10978
  {
10972
10979
  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…" }),
10973
10980
  children: /* @__PURE__ */ We(
10974
- Jl,
10981
+ tc,
10975
10982
  {
10976
10983
  nodes: n,
10977
10984
  edges: r,
@@ -10984,7 +10991,7 @@ function ec({
10984
10991
  )
10985
10992
  }
10986
10993
  ) : /* @__PURE__ */ We(
10987
- Zl,
10994
+ Jl,
10988
10995
  {
10989
10996
  nodes: n,
10990
10997
  edges: r,
@@ -10996,7 +11003,7 @@ function ec({
10996
11003
  }
10997
11004
  );
10998
11005
  }
10999
- function Fc({
11006
+ function zc({
11000
11007
  nodes: n,
11001
11008
  edges: r,
11002
11009
  config: t = Tr,
@@ -11016,7 +11023,7 @@ function Fc({
11016
11023
  }),
11017
11024
  []
11018
11025
  ), /* @__PURE__ */ We("div", { className: "f8-studio", style: za(o), children: /* @__PURE__ */ We(
11019
- ec,
11026
+ rc,
11020
11027
  {
11021
11028
  nodes: n,
11022
11029
  edges: r,
@@ -11030,70 +11037,71 @@ function Fc({
11030
11037
  ) });
11031
11038
  }
11032
11039
  export {
11033
- Ma as $,
11034
- cc as A,
11035
- lc as B,
11036
- mc as C,
11040
+ Ba as $,
11041
+ dc as A,
11042
+ hc as B,
11043
+ bc as C,
11037
11044
  Tr as D,
11038
- Za as E,
11039
- Fc as F,
11045
+ Ja as E,
11046
+ zc as F,
11040
11047
  Sr as G,
11041
11048
  Rr as H,
11042
11049
  xa as I,
11043
- vc as J,
11044
- wc as K,
11045
- Ya as L,
11046
- _c as M,
11050
+ yc as J,
11051
+ _c as K,
11052
+ Qa as L,
11053
+ Sc as M,
11047
11054
  Mr as N,
11048
- Ec as O,
11049
- Ja as P,
11055
+ Tc as O,
11056
+ to as P,
11050
11057
  $a as Q,
11051
- ec as R,
11052
- Dc as S,
11058
+ rc as R,
11059
+ Gc as S,
11053
11060
  ka as T,
11054
- ac as U,
11061
+ Wa as U,
11055
11062
  sc as V,
11056
- nc as W,
11057
- ic as X,
11058
- Ca as Y,
11059
- oc as Z,
11060
- Ba as _,
11061
- Ka as a,
11062
- yc as a0,
11063
- Ac as a1,
11064
- kc as a2,
11065
- Sc as a3,
11066
- Rc as a4,
11067
- fc as a5,
11068
- Tc as a6,
11069
- pc as a7,
11070
- gc as a8,
11071
- Na as a9,
11072
- Ua as aa,
11073
- za as ab,
11074
- Xa as b,
11075
- qa as c,
11076
- Qa as d,
11077
- Gc as e,
11078
- Ic as f,
11063
+ lc as W,
11064
+ ac as X,
11065
+ oc as Y,
11066
+ Ca as Z,
11067
+ uc as _,
11068
+ Ya as a,
11069
+ Ma as a0,
11070
+ wc as a1,
11071
+ Cc as a2,
11072
+ xc as a3,
11073
+ Ac as a4,
11074
+ kc as a5,
11075
+ pc as a6,
11076
+ Rc as a7,
11077
+ mc as a8,
11078
+ vc as a9,
11079
+ Na as aa,
11080
+ Ua as ab,
11081
+ za as ac,
11082
+ Za as b,
11083
+ Xa as c,
11084
+ eo as d,
11085
+ Pc as e,
11086
+ Oc as f,
11079
11087
  Br as g,
11080
- ql as h,
11081
- Lc as i,
11082
- Xl as j,
11083
- Yl as k,
11084
- xc as l,
11085
- Wl as m,
11088
+ Xl as h,
11089
+ Ic as i,
11090
+ Zl as j,
11091
+ Ql as k,
11092
+ Lc as l,
11093
+ jl as m,
11086
11094
  mi as n,
11087
- Ql as o,
11088
- jl as p,
11089
- Cc as q,
11095
+ ec as o,
11096
+ ql as p,
11097
+ Dc as q,
11090
11098
  pi as r,
11091
- Pc as s,
11099
+ Fc as s,
11092
11100
  Aa as t,
11093
11101
  Oa as u,
11094
- dc as v,
11095
- Vl as w,
11096
- bc as x,
11097
- hc as y,
11098
- uc as z
11102
+ gc as v,
11103
+ Kl as w,
11104
+ Ec as x,
11105
+ fc as y,
11106
+ cc as z
11099
11107
  };