vue-data-ui 3.8.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +1 -1
  2. package/dist/{PackageVersion-B9RA2_BM.js → PackageVersion-Dc4fCiDF.js} +1 -1
  3. package/dist/{Title-CgkWUXeV.js → Title-CWX8otQg.js} +1 -1
  4. package/dist/components/vue-ui-3d-bar.js +1 -1
  5. package/dist/components/vue-ui-accordion.js +1 -1
  6. package/dist/components/vue-ui-age-pyramid.js +1 -1
  7. package/dist/components/vue-ui-annotator.js +1 -1
  8. package/dist/components/vue-ui-bullet.js +1 -1
  9. package/dist/components/vue-ui-candlestick.js +1 -1
  10. package/dist/components/vue-ui-carousel-table.js +1 -1
  11. package/dist/components/vue-ui-chestnut.js +1 -1
  12. package/dist/components/vue-ui-chord.js +1 -1
  13. package/dist/components/vue-ui-circle-pack.js +1 -1
  14. package/dist/components/vue-ui-cursor.js +1 -1
  15. package/dist/components/vue-ui-dag.js +1 -1
  16. package/dist/components/vue-ui-dashboard.js +1 -1
  17. package/dist/components/vue-ui-digits.js +1 -1
  18. package/dist/components/vue-ui-donut-evolution.js +1 -1
  19. package/dist/components/vue-ui-donut.js +1 -1
  20. package/dist/components/vue-ui-dumbbell.js +1 -1
  21. package/dist/components/vue-ui-flow.js +1 -1
  22. package/dist/components/vue-ui-funnel.js +1 -1
  23. package/dist/components/vue-ui-galaxy.js +1 -1
  24. package/dist/components/vue-ui-gauge.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-history-plot.js +1 -1
  28. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  29. package/dist/components/vue-ui-kpi.js +1 -1
  30. package/dist/components/vue-ui-mini-loader.js +1 -1
  31. package/dist/components/vue-ui-molecule.js +1 -1
  32. package/dist/components/vue-ui-mood-radar.js +1 -1
  33. package/dist/components/vue-ui-nested-donuts.js +1 -1
  34. package/dist/components/vue-ui-onion.js +1 -1
  35. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  36. package/dist/components/vue-ui-quadrant.js +1 -1
  37. package/dist/components/vue-ui-quick-chart.js +1 -1
  38. package/dist/components/vue-ui-radar.js +1 -1
  39. package/dist/components/vue-ui-rating.js +1 -1
  40. package/dist/components/vue-ui-relation-circle.js +1 -1
  41. package/dist/components/vue-ui-ridgeline.js +1 -1
  42. package/dist/components/vue-ui-rings.js +1 -1
  43. package/dist/components/vue-ui-scatter.js +1 -1
  44. package/dist/components/vue-ui-skeleton.js +1 -1
  45. package/dist/components/vue-ui-smiley.js +1 -1
  46. package/dist/components/vue-ui-spark-trend.js +1 -1
  47. package/dist/components/vue-ui-sparkbar.js +1 -1
  48. package/dist/components/vue-ui-sparkgauge.js +1 -1
  49. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  50. package/dist/components/vue-ui-sparkline.js +1 -1
  51. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  52. package/dist/components/vue-ui-stackbar.js +1 -1
  53. package/dist/components/vue-ui-stackline.js +1 -1
  54. package/dist/components/vue-ui-strip-plot.js +1 -1
  55. package/dist/components/vue-ui-table-heatmap.js +1 -1
  56. package/dist/components/vue-ui-table-sparkline.js +1 -1
  57. package/dist/components/vue-ui-table.js +1 -1
  58. package/dist/components/vue-ui-thermometer.js +1 -1
  59. package/dist/components/vue-ui-timer.js +1 -1
  60. package/dist/components/vue-ui-tiremarks.js +1 -1
  61. package/dist/components/vue-ui-treemap.js +1 -1
  62. package/dist/components/vue-ui-vertical-bar.js +1 -1
  63. package/dist/components/vue-ui-waffle.js +1 -1
  64. package/dist/components/vue-ui-wheel.js +1 -1
  65. package/dist/components/vue-ui-word-cloud.js +1 -1
  66. package/dist/components/vue-ui-world.js +1 -1
  67. package/dist/components/vue-ui-xy-canvas.js +1 -1
  68. package/dist/components/vue-ui-xy.js +1 -1
  69. package/dist/style.css +1 -1
  70. package/dist/types/vue-data-ui.d.ts +3 -0
  71. package/dist/{useNestedProp-DOOBu_sL.js → useNestedProp-DH2Pjkde.js} +3 -0
  72. package/dist/{vue-data-ui-BgQPEjgE.js → vue-data-ui-DqfM8Vz8.js} +65 -65
  73. package/dist/vue-data-ui.js +67 -67
  74. package/dist/{vue-ui-3d-bar-BHcSmBFt.js → vue-ui-3d-bar-CVgWSxvV.js} +3 -3
  75. package/dist/{vue-ui-accordion-BWfQ8Imt.js → vue-ui-accordion-DiNnR-ZE.js} +1 -1
  76. package/dist/{vue-ui-age-pyramid-CKtsF5IW.js → vue-ui-age-pyramid-7CfFjz5B.js} +3 -3
  77. package/dist/{vue-ui-annotator-DQmmDTg7.js → vue-ui-annotator-D_z1JO0m.js} +2 -2
  78. package/dist/{vue-ui-bullet-CZKHPSsG.js → vue-ui-bullet-CkBYg2ju.js} +3 -3
  79. package/dist/{vue-ui-candlestick-DW7yeLnE.js → vue-ui-candlestick-CoNGZeIc.js} +3 -3
  80. package/dist/{vue-ui-carousel-table-Bv0TZYW1.js → vue-ui-carousel-table-DFAWxemP.js} +2 -2
  81. package/dist/{vue-ui-chestnut-BUqGBycr.js → vue-ui-chestnut-CWxFxnja.js} +2 -2
  82. package/dist/{vue-ui-chord-Awtzhq_0.js → vue-ui-chord-p2h6IONa.js} +3 -3
  83. package/dist/{vue-ui-circle-pack-WTa2Mj2O.js → vue-ui-circle-pack-Dei0aswf.js} +3 -3
  84. package/dist/{vue-ui-cursor-D6_m463R.js → vue-ui-cursor-oaIVMRWP.js} +2 -2
  85. package/dist/{vue-ui-dag-tle30Ehr.js → vue-ui-dag-D0ImsCHg.js} +1042 -999
  86. package/dist/{vue-ui-dashboard-BLgMwKmT.js → vue-ui-dashboard-DpotsaP2.js} +64 -64
  87. package/dist/{vue-ui-digits-DIZ8pi6C.js → vue-ui-digits-B7rN8UWS.js} +1 -1
  88. package/dist/{vue-ui-donut-DY8Q-PAg.js → vue-ui-donut-DsCBPM7k.js} +3 -3
  89. package/dist/{vue-ui-donut-evolution-DGnq03PX.js → vue-ui-donut-evolution-mSDD8tt9.js} +3 -3
  90. package/dist/{vue-ui-dumbbell-xRMH2Mlv.js → vue-ui-dumbbell-CU9Bqy_T.js} +3 -3
  91. package/dist/{vue-ui-flow-C0a8rOyT.js → vue-ui-flow-BxjQr6zQ.js} +3 -3
  92. package/dist/{vue-ui-funnel-D6krkF1a.js → vue-ui-funnel-Cs2_wFOA.js} +3 -3
  93. package/dist/{vue-ui-galaxy-BCkJt9OE.js → vue-ui-galaxy-CFbE4FoS.js} +3 -3
  94. package/dist/{vue-ui-gauge-BaH-VYAi.js → vue-ui-gauge-6g1fkJjW.js} +3 -3
  95. package/dist/{vue-ui-gizmo-BnCONs1t.js → vue-ui-gizmo-BzUlvG3U.js} +2 -2
  96. package/dist/{vue-ui-heatmap-BYoD6XaS.js → vue-ui-heatmap-B9Sc1Qym.js} +4 -4
  97. package/dist/{vue-ui-history-plot-BZBtIBsY.js → vue-ui-history-plot-CpskzQg2.js} +3 -3
  98. package/dist/{vue-ui-horizontal-bar-DsDDKUa6.js → vue-ui-horizontal-bar-DMByg_zj.js} +4 -4
  99. package/dist/{vue-ui-kpi-Dn750UNZ.js → vue-ui-kpi-B6oDMqQL.js} +2 -2
  100. package/dist/{vue-ui-mini-loader-44NP38K0.js → vue-ui-mini-loader-BXLMnXR4.js} +1 -1
  101. package/dist/{vue-ui-molecule-C994_mOK.js → vue-ui-molecule-y8AOUQvZ.js} +2 -2
  102. package/dist/{vue-ui-mood-radar-BI2SAtcM.js → vue-ui-mood-radar--XevYXsy.js} +3 -3
  103. package/dist/{vue-ui-nested-donuts-CSF_bA-I.js → vue-ui-nested-donuts-A-J72aa_.js} +3 -3
  104. package/dist/{vue-ui-onion-L5ULuI3B.js → vue-ui-onion-CZH1uzU_.js} +3 -3
  105. package/dist/{vue-ui-parallel-coordinate-plot-CYetuoa5.js → vue-ui-parallel-coordinate-plot-px6mudIa.js} +3 -3
  106. package/dist/{vue-ui-quadrant-Diwm1-e6.js → vue-ui-quadrant-Cnh6vISS.js} +3 -3
  107. package/dist/{vue-ui-quick-chart-YBj4Iyk6.js → vue-ui-quick-chart-CA1Yns69.js} +2 -2
  108. package/dist/{vue-ui-radar-D76Mi-4u.js → vue-ui-radar-CwL0pqRH.js} +3 -3
  109. package/dist/{vue-ui-rating-CJjSt6-z.js → vue-ui-rating-CtkV7O_k.js} +1 -1
  110. package/dist/{vue-ui-relation-circle-BlYazckd.js → vue-ui-relation-circle-B-sm1VFO.js} +3 -3
  111. package/dist/{vue-ui-ridgeline-DW8JqGxN.js → vue-ui-ridgeline-DC2uKfbu.js} +3 -3
  112. package/dist/{vue-ui-rings-De3shW_r.js → vue-ui-rings-CKOzGb8B.js} +3 -3
  113. package/dist/{vue-ui-scatter-oDhPqRJq.js → vue-ui-scatter-C1ajpkcR.js} +3 -3
  114. package/dist/{vue-ui-skeleton-BUIXG_mY.js → vue-ui-skeleton-D6MjtTX_.js} +2 -2
  115. package/dist/{vue-ui-smiley-Cni8Q56U.js → vue-ui-smiley-C-mXyFxi.js} +1 -1
  116. package/dist/{vue-ui-spark-trend-D1Zt5np6.js → vue-ui-spark-trend-BsVhD00l.js} +2 -2
  117. package/dist/{vue-ui-sparkbar-CdmXCSnj.js → vue-ui-sparkbar-Drazbrah.js} +2 -2
  118. package/dist/{vue-ui-sparkgauge-Dn2PQhZj.js → vue-ui-sparkgauge-CRbo19gz.js} +2 -2
  119. package/dist/{vue-ui-sparkhistogram-nrkglHJk.js → vue-ui-sparkhistogram-C41IySqq.js} +2 -2
  120. package/dist/{vue-ui-sparkline-tz8fAf2C.js → vue-ui-sparkline-DhMJlZAj.js} +2 -2
  121. package/dist/{vue-ui-sparkstackbar-BQPSsF5Q.js → vue-ui-sparkstackbar-DfyfDxF-.js} +2 -2
  122. package/dist/{vue-ui-stackbar-DMO3YIQp.js → vue-ui-stackbar-DnDjTmzg.js} +3 -3
  123. package/dist/{vue-ui-stackline-BQo4KoIK.js → vue-ui-stackline-DYVq55D8.js} +3 -3
  124. package/dist/{vue-ui-strip-plot-CJpmLgCV.js → vue-ui-strip-plot-DDEm7mMm.js} +3 -3
  125. package/dist/{vue-ui-table-Cp4ee_1a.js → vue-ui-table-RCYr7_oK.js} +3 -3
  126. package/dist/{vue-ui-table-heatmap-1qpMxFyu.js → vue-ui-table-heatmap-DODhMbZE.js} +1 -1
  127. package/dist/{vue-ui-table-sparkline-wSJjRJc4.js → vue-ui-table-sparkline-cheUhGm3.js} +2 -2
  128. package/dist/{vue-ui-thermometer-DA8pG0Tr.js → vue-ui-thermometer-BheFELBN.js} +3 -3
  129. package/dist/{vue-ui-timer-Bc0J-YWP.js → vue-ui-timer-DUaqMYu9.js} +3 -3
  130. package/dist/{vue-ui-tiremarks-DqYsca6Q.js → vue-ui-tiremarks-CzEPq7Qm.js} +3 -3
  131. package/dist/{vue-ui-treemap-BQsPzEFA.js → vue-ui-treemap-JmxDMTGO.js} +3 -3
  132. package/dist/{vue-ui-waffle-5wkXlR4p.js → vue-ui-waffle-Bd_MQwxV.js} +3 -3
  133. package/dist/{vue-ui-wheel-CkZko1RX.js → vue-ui-wheel-BfR7YioI.js} +3 -3
  134. package/dist/{vue-ui-word-cloud-52bv_Ba-.js → vue-ui-word-cloud-CI2APc9f.js} +3 -3
  135. package/dist/{vue-ui-world-oIyf91PY.js → vue-ui-world-3Oy8hJ6R.js} +2 -2
  136. package/dist/{vue-ui-xy-DIEBv1b8.js → vue-ui-xy-BWzZbqJo.js} +4 -4
  137. package/dist/{vue-ui-xy-canvas-pnm8ar87.js → vue-ui-xy-canvas-Cq-lVd9y.js} +3 -3
  138. package/package.json +1 -1
@@ -1,18 +1,20 @@
1
- import { ref as E, watchEffect as Yo, unref as b, createElementBlock as _, openBlock as k, normalizeStyle as H, normalizeClass as tt, createElementVNode as B, createCommentVNode as L, createVNode as le, toDisplayString as ie, defineAsyncComponent as Ye, toRefs as Ho, computed as W, onMounted as Rt, watch as He, onBeforeUnmount as Zo, createBlock as Y, withCtx as R, renderSlot as S, normalizeProps as P, guardReactiveProps as F, createSlots as Uo, Fragment as re, renderList as Te, withModifiers as Xo, mergeProps as Tt, createTextVNode as qo, Transition as Mt, Teleport as $t, nextTick as Dt } from "vue";
2
- import { c as ot, ay as Ko, l as ye, n as Jo, r as Qo, h as en, t as Kt, o as tn, g as Pt, X as on, a8 as nn } from "./lib-qMPkcvmh.js";
3
- import { u as sn } from "./usePanZoom-DMfuOfaC.js";
4
- import { u as rn, a as Ze } from "./useNestedProp-DOOBu_sL.js";
5
- import { u as ln, B as an } from "./BaseScanner-BgWxam9d.js";
6
- import { u as cn } from "./usePrinter-CjGh4mFJ.js";
7
- import { u as un } from "./useSvgExport-DrjCWun4.js";
8
- import { u as dn } from "./useThemeCheck-DGJ31Vi5.js";
9
- import { u as fn } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as hn } from "./useChartAccessibility-9icAAmYg.js";
11
- import mn from "./Title-CgkWUXeV.js";
12
- import Ue from "./BaseIcon-CALhpING.js";
13
- import { _ as Jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const gn = "\0", Q = "\0", Ft = "";
15
- class Z {
1
+ import { ref as y, watchEffect as Jo, unref as v, createElementBlock as x, openBlock as k, normalizeStyle as X, normalizeClass as st, createElementVNode as G, createCommentVNode as L, createVNode as ae, toDisplayString as le, defineAsyncComponent as Xe, toRefs as Qo, computed as W, onMounted as zt, watch as De, onBeforeUnmount as en, createBlock as U, withCtx as T, renderSlot as A, normalizeProps as B, guardReactiveProps as V, createSlots as tn, Fragment as ie, renderList as Fe, withModifiers as on, mergeProps as Bt, createTextVNode as nn, Transition as Vt, Teleport as It, nextTick as Gt } from "vue";
2
+ import { c as rt, ay as sn, l as Ce, n as rn, r as ln, h as an, t as so, o as cn, g as jt, X as un, a8 as dn } from "./lib-qMPkcvmh.js";
3
+ import { t as fn, u as hn } from "./useResponsive-DfdjqQps.js";
4
+ import { u as mn } from "./usePanZoom-DMfuOfaC.js";
5
+ import { u as gn, a as qe } from "./useNestedProp-DH2Pjkde.js";
6
+ import { u as vn, B as bn } from "./BaseScanner-BgWxam9d.js";
7
+ import { u as pn } from "./usePrinter-CjGh4mFJ.js";
8
+ import { u as wn } from "./useSvgExport-DrjCWun4.js";
9
+ import { u as yn } from "./useThemeCheck-DGJ31Vi5.js";
10
+ import { u as kn } from "./useUserOptionState-BIvW1Kz7.js";
11
+ import { u as En } from "./useChartAccessibility-9icAAmYg.js";
12
+ import Cn from "./Title-CWX8otQg.js";
13
+ import Ke from "./BaseIcon-CALhpING.js";
14
+ import { _ as ro } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ import xn from "./img-CwrkWkkl.js";
16
+ const _n = "\0", te = "\0", Wt = "";
17
+ class q {
16
18
  _isDirected = !0;
17
19
  _isMultigraph = !1;
18
20
  _isCompound = !1;
@@ -45,7 +47,7 @@ class Z {
45
47
  _parent;
46
48
  _children;
47
49
  constructor(t) {
48
- t && (this._isDirected = Object.hasOwn(t, "directed") ? t.directed : !0, this._isMultigraph = Object.hasOwn(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.hasOwn(t, "compound") ? t.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[Q] = {});
50
+ t && (this._isDirected = Object.hasOwn(t, "directed") ? t.directed : !0, this._isMultigraph = Object.hasOwn(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.hasOwn(t, "compound") ? t.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[te] = {});
49
51
  }
50
52
  /* === Graph functions ========= */
51
53
  /**
@@ -137,7 +139,7 @@ class Z {
137
139
  * Complexity: O(1).
138
140
  */
139
141
  setNode(t, o) {
140
- return Object.hasOwn(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = o), this) : (this._nodes[t] = arguments.length > 1 ? o : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = Q, this._children[t] = {}, this._children[Q][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
142
+ return Object.hasOwn(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = o), this) : (this._nodes[t] = arguments.length > 1 ? o : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = te, this._children[t] = {}, this._children[te][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
141
143
  }
142
144
  /**
143
145
  * Gets the label of node with specified name.
@@ -178,7 +180,7 @@ class Z {
178
180
  if (!this._isCompound)
179
181
  throw new Error("Cannot set parent in a non-compound graph");
180
182
  if (o === void 0)
181
- o = Q;
183
+ o = te;
182
184
  else {
183
185
  o += "";
184
186
  for (let n = o; n !== void 0; n = this.parent(n))
@@ -200,7 +202,7 @@ class Z {
200
202
  parent(t) {
201
203
  if (this._isCompound) {
202
204
  const o = this._parent[t];
203
- if (o !== Q)
205
+ if (o !== te)
204
206
  return o;
205
207
  }
206
208
  }
@@ -208,13 +210,13 @@ class Z {
208
210
  * Gets list of direct children of node nodeId.
209
211
  * Complexity: O(1).
210
212
  */
211
- children(t = Q) {
213
+ children(t = te) {
212
214
  if (this._isCompound) {
213
215
  const o = this._children[t];
214
216
  if (o)
215
217
  return Object.keys(o);
216
218
  } else {
217
- if (t === Q)
219
+ if (t === te)
218
220
  return this.nodes();
219
221
  if (this.hasNode(t))
220
222
  return [];
@@ -329,21 +331,21 @@ class Z {
329
331
  let t, o, n, s, r = !1;
330
332
  const i = arguments[0];
331
333
  typeof i == "object" && i !== null && "v" in i ? (t = i.v, o = i.w, n = i.name, arguments.length === 2 && (s = arguments[1], r = !0)) : (t = i, o = arguments[1], n = arguments[3], arguments.length > 2 && (s = arguments[2], r = !0)), t = "" + t, o = "" + o, n !== void 0 && (n = "" + n);
332
- let l = ke(this._isDirected, t, o, n);
334
+ let l = Ee(this._isDirected, t, o, n);
333
335
  if (Object.hasOwn(this._edgeLabels, l))
334
336
  return r && (this._edgeLabels[l] = s), this;
335
337
  if (n !== void 0 && !this._isMultigraph)
336
338
  throw new Error("Cannot set a named edge when isMultigraph = false");
337
339
  this.setNode(t), this.setNode(o), this._edgeLabels[l] = r ? s : this._defaultEdgeLabelFn(t, o, n);
338
- const a = bn(this._isDirected, t, o, n);
339
- return t = a.v, o = a.w, Object.freeze(a), this._edgeObjs[l] = a, zt(this._preds[o], t), zt(this._sucs[t], o), this._in[o][l] = a, this._out[t][l] = a, this._edgeCount++, this;
340
+ const a = Nn(this._isDirected, t, o, n);
341
+ return t = a.v, o = a.w, Object.freeze(a), this._edgeObjs[l] = a, Yt(this._preds[o], t), Yt(this._sucs[t], o), this._in[o][l] = a, this._out[t][l] = a, this._edgeCount++, this;
340
342
  }
341
343
  /**
342
344
  * Gets the label for the specified edge.
343
345
  * Complexity: O(1).
344
346
  */
345
347
  edge(t, o, n) {
346
- const s = arguments.length === 1 ? Xe(this._isDirected, arguments[0]) : ke(this._isDirected, t, o, n);
348
+ const s = arguments.length === 1 ? Je(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n);
347
349
  return this._edgeLabels[s];
348
350
  }
349
351
  /**
@@ -359,7 +361,7 @@ class Z {
359
361
  * Complexity: O(1).
360
362
  */
361
363
  hasEdge(t, o, n) {
362
- const s = arguments.length === 1 ? Xe(this._isDirected, arguments[0]) : ke(this._isDirected, t, o, n);
364
+ const s = arguments.length === 1 ? Je(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n);
363
365
  return Object.hasOwn(this._edgeLabels, s);
364
366
  }
365
367
  /**
@@ -367,8 +369,8 @@ class Z {
367
369
  * Complexity: O(1).
368
370
  */
369
371
  removeEdge(t, o, n) {
370
- const s = arguments.length === 1 ? Xe(this._isDirected, arguments[0]) : ke(this._isDirected, t, o, n), r = this._edgeObjs[s];
371
- return r && (t = r.v, o = r.w, delete this._edgeLabels[s], delete this._edgeObjs[s], Bt(this._preds[o], t), Bt(this._sucs[t], o), delete this._in[o][s], delete this._out[t][s], this._edgeCount--), this;
372
+ const s = arguments.length === 1 ? Je(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n), r = this._edgeObjs[s];
373
+ return r && (t = r.v, o = r.w, delete this._edgeLabels[s], delete this._edgeObjs[s], Ht(this._preds[o], t), Ht(this._sucs[t], o), delete this._in[o][s], delete this._out[t][s], this._edgeCount--), this;
372
374
  }
373
375
  /**
374
376
  * Return all edges that point to the node v. Optionally filters those edges down to just those
@@ -405,21 +407,21 @@ class Z {
405
407
  return n.concat(this.outEdges(t, o));
406
408
  }
407
409
  }
408
- function zt(e, t) {
410
+ function Yt(e, t) {
409
411
  e[t] ? e[t]++ : e[t] = 1;
410
412
  }
411
- function Bt(e, t) {
413
+ function Ht(e, t) {
412
414
  --e[t] || delete e[t];
413
415
  }
414
- function ke(e, t, o, n) {
416
+ function Ee(e, t, o, n) {
415
417
  let s = "" + t, r = "" + o;
416
418
  if (!e && s > r) {
417
419
  const i = s;
418
420
  s = r, r = i;
419
421
  }
420
- return s + Ft + r + Ft + (n === void 0 ? gn : n);
422
+ return s + Wt + r + Wt + (n === void 0 ? _n : n);
421
423
  }
422
- function bn(e, t, o, n) {
424
+ function Nn(e, t, o, n) {
423
425
  let s = "" + t, r = "" + o;
424
426
  if (!e && s > r) {
425
427
  const l = s;
@@ -428,10 +430,10 @@ function bn(e, t, o, n) {
428
430
  const i = { v: s, w: r };
429
431
  return n && (i.name = n), i;
430
432
  }
431
- function Xe(e, t) {
432
- return ke(e, t.v, t.w, t.name);
433
+ function Je(e, t) {
434
+ return Ee(e, t.v, t.w, t.name);
433
435
  }
434
- class vn {
436
+ class An {
435
437
  constructor() {
436
438
  const t = {};
437
439
  t._next = t._prev = t, this._sentinel = t;
@@ -439,98 +441,98 @@ class vn {
439
441
  dequeue() {
440
442
  const t = this._sentinel, o = t._prev;
441
443
  if (o !== t)
442
- return Vt(o), o;
444
+ return Zt(o), o;
443
445
  }
444
446
  enqueue(t) {
445
447
  const o = this._sentinel;
446
- t._prev && t._next && Vt(t), t._next = o._next, o._next._prev = t, o._next = t, t._prev = o;
448
+ t._prev && t._next && Zt(t), t._next = o._next, o._next._prev = t, o._next = t, t._prev = o;
447
449
  }
448
450
  toString() {
449
451
  const t = [], o = this._sentinel;
450
452
  let n = o._prev;
451
453
  for (; n !== o; )
452
- t.push(JSON.stringify(n, pn)), n = n._prev;
454
+ t.push(JSON.stringify(n, Sn)), n = n._prev;
453
455
  return "[" + t.join(", ") + "]";
454
456
  }
455
457
  }
456
- function Vt(e) {
458
+ function Zt(e) {
457
459
  e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
458
460
  }
459
- function pn(e, t) {
461
+ function Sn(e, t) {
460
462
  if (e !== "_next" && e !== "_prev")
461
463
  return t;
462
464
  }
463
- const wn = () => 1;
464
- function kn(e, t) {
465
+ const Ln = () => 1;
466
+ function On(e, t) {
465
467
  if (e.nodeCount() <= 1)
466
468
  return [];
467
- const o = En(e, t || wn);
468
- return yn(o.graph, o.buckets, o.zeroIndex).flatMap((s) => e.outEdges(s.v, s.w));
469
+ const o = Tn(e, t || Ln);
470
+ return Rn(o.graph, o.buckets, o.zeroIndex).flatMap((s) => e.outEdges(s.v, s.w));
469
471
  }
470
- function yn(e, t, o) {
472
+ function Rn(e, t, o) {
471
473
  let n = [];
472
474
  const s = t[t.length - 1], r = t[0];
473
475
  let i;
474
476
  for (; e.nodeCount(); ) {
475
477
  for (; i = r.dequeue(); )
476
- qe(e, t, o, i);
478
+ Qe(e, t, o, i);
477
479
  for (; i = s.dequeue(); )
478
- qe(e, t, o, i);
480
+ Qe(e, t, o, i);
479
481
  if (e.nodeCount()) {
480
482
  for (let l = t.length - 2; l > 0; --l)
481
483
  if (i = t[l].dequeue(), i) {
482
- n = n.concat(qe(e, t, o, i, !0));
484
+ n = n.concat(Qe(e, t, o, i, !0));
483
485
  break;
484
486
  }
485
487
  }
486
488
  }
487
489
  return n;
488
490
  }
489
- function qe(e, t, o, n, s) {
491
+ function Qe(e, t, o, n, s) {
490
492
  const r = s ? [] : void 0;
491
493
  return e.inEdges(n.v).forEach((i) => {
492
494
  const l = e.edge(i), a = e.node(i.v);
493
- s && r.push({ v: i.v, w: i.w }), a.out -= l, nt(t, o, a);
495
+ s && r.push({ v: i.v, w: i.w }), a.out -= l, it(t, o, a);
494
496
  }), e.outEdges(n.v).forEach((i) => {
495
497
  const l = e.edge(i), a = e.node(i.w);
496
- a.in -= l, nt(t, o, a);
498
+ a.in -= l, it(t, o, a);
497
499
  }), e.removeNode(n.v), r;
498
500
  }
499
- function En(e, t) {
500
- const o = new Z();
501
+ function Tn(e, t) {
502
+ const o = new q();
501
503
  let n = 0, s = 0;
502
504
  e.nodes().forEach((l) => {
503
505
  o.setNode(l, { v: l, in: 0, out: 0 });
504
506
  }), e.edges().forEach((l) => {
505
- const a = o.edge(l.v, l.w) || 0, c = t(l), u = a + c;
506
- o.setEdge(l.v, l.w, u), s = Math.max(s, o.node(l.v).out += c), n = Math.max(n, o.node(l.w).in += c);
507
+ const a = o.edge(l.v, l.w) || 0, c = t(l), d = a + c;
508
+ o.setEdge(l.v, l.w, d), s = Math.max(s, o.node(l.v).out += c), n = Math.max(n, o.node(l.w).in += c);
507
509
  });
508
- const r = Cn(s + n + 3).map(() => new vn()), i = n + 1;
510
+ const r = Mn(s + n + 3).map(() => new An()), i = n + 1;
509
511
  return o.nodes().forEach((l) => {
510
- nt(r, i, o.node(l));
512
+ it(r, i, o.node(l));
511
513
  }), {
512
514
  graph: o,
513
515
  buckets: r,
514
516
  zeroIndex: i
515
517
  };
516
518
  }
517
- function nt(e, t, o) {
519
+ function it(e, t, o) {
518
520
  o.out ? o.in ? e[o.out - o.in + t].enqueue(o) : e[e.length - 1].enqueue(o) : e[0].enqueue(o);
519
521
  }
520
- function Cn(e) {
522
+ function Mn(e) {
521
523
  const t = [];
522
524
  for (let o = 0; o < e; o++)
523
525
  t.push(o);
524
526
  return t;
525
527
  }
526
- function ce(e, t, o, n) {
528
+ function ue(e, t, o, n) {
527
529
  let s = n;
528
530
  for (; e.hasNode(s); )
529
- s = $e(n);
531
+ s = ze(n);
530
532
  return o.dummy = t, e.setNode(s, o), s;
531
533
  }
532
- function Qt(e) {
533
- const t = new Z().setGraph(e.graph());
534
+ function io(e) {
535
+ const t = new q().setGraph(e.graph());
534
536
  return e.nodes().forEach((o) => {
535
537
  t.setNode(o, e.node(o));
536
538
  }), e.edges().forEach((o) => {
@@ -541,33 +543,33 @@ function Qt(e) {
541
543
  });
542
544
  }), t;
543
545
  }
544
- function rt(e) {
545
- const t = new Z({ multigraph: e.isMultigraph() }).setGraph(e.graph());
546
+ function at(e) {
547
+ const t = new q({ multigraph: e.isMultigraph() }).setGraph(e.graph());
546
548
  return e.nodes().forEach((o) => {
547
549
  e.children(o).length || t.setNode(o, e.node(o));
548
550
  }), e.edges().forEach((o) => {
549
551
  t.setEdge(o, e.edge(o));
550
552
  }), t;
551
553
  }
552
- function xn(e) {
554
+ function $n(e) {
553
555
  const t = e.nodes().map((o) => {
554
556
  const n = {};
555
557
  return e.outEdges(o).forEach((s) => {
556
558
  n[s.w] = (n[s.w] || 0) + e.edge(s).weight;
557
559
  }), n;
558
560
  });
559
- return De(e.nodes(), t);
561
+ return Be(e.nodes(), t);
560
562
  }
561
- function _n(e) {
563
+ function Dn(e) {
562
564
  const t = e.nodes().map((o) => {
563
565
  const n = {};
564
566
  return e.inEdges(o).forEach((s) => {
565
567
  n[s.v] = (n[s.v] || 0) + e.edge(s).weight;
566
568
  }), n;
567
569
  });
568
- return De(e.nodes(), t);
570
+ return Be(e.nodes(), t);
569
571
  }
570
- function st(e, t) {
572
+ function lt(e, t) {
571
573
  let o = e.x, n = e.y;
572
574
  const s = t.x - o, r = t.y - n;
573
575
  let i = e.width / 2, l = e.height / 2;
@@ -576,25 +578,25 @@ function st(e, t) {
576
578
  let a, c;
577
579
  return Math.abs(r) * i > Math.abs(s) * l ? (r < 0 && (l = -l), a = l * s / r, c = l) : (s < 0 && (i = -i), a = i, c = i * r / s), { x: o + a, y: n + c };
578
580
  }
579
- function Ce(e) {
580
- const t = ae(it(e) + 1).map(() => []);
581
+ function _e(e) {
582
+ const t = ce(ct(e) + 1).map(() => []);
581
583
  return e.nodes().forEach((o) => {
582
584
  const n = e.node(o), s = n.rank;
583
585
  s !== void 0 && (t[s][n.order] = o);
584
586
  }), t;
585
587
  }
586
- function eo(e) {
588
+ function lo(e) {
587
589
  const t = e.nodes().map((n) => {
588
590
  const s = e.node(n).rank;
589
591
  return s === void 0 ? Number.MAX_VALUE : s;
590
- }), o = V(Math.min, t);
592
+ }), o = j(Math.min, t);
591
593
  e.nodes().forEach((n) => {
592
594
  const s = e.node(n);
593
595
  Object.hasOwn(s, "rank") && (s.rank -= o);
594
596
  });
595
597
  }
596
- function to(e) {
597
- const t = e.nodes().map((i) => e.node(i).rank).filter((i) => i !== void 0), o = V(Math.min, t), n = [];
598
+ function ao(e) {
599
+ const t = e.nodes().map((i) => e.node(i).rank).filter((i) => i !== void 0), o = j(Math.min, t), n = [];
598
600
  e.nodes().forEach((i) => {
599
601
  const l = e.node(i).rank - o;
600
602
  n[l] || (n[l] = []), n[l].push(i);
@@ -607,15 +609,15 @@ function to(e) {
607
609
  });
608
610
  });
609
611
  }
610
- function Nn(e, t, o, n) {
612
+ function Fn(e, t, o, n) {
611
613
  const s = {
612
614
  width: 0,
613
615
  height: 0
614
616
  };
615
- return arguments.length >= 4 && (s.rank = o, s.order = n), ce(e, "border", s, t);
617
+ return arguments.length >= 4 && (s.rank = o, s.order = n), ue(e, "border", s, t);
616
618
  }
617
- const oo = 65535;
618
- function An(e, t = oo) {
619
+ const co = 65535;
620
+ function Pn(e, t = co) {
619
621
  const o = [];
620
622
  for (let n = 0; n < e.length; n += t) {
621
623
  const s = e.slice(n, n + t);
@@ -623,9 +625,9 @@ function An(e, t = oo) {
623
625
  }
624
626
  return o;
625
627
  }
626
- function V(e, t) {
627
- if (t.length > oo) {
628
- const o = An(t);
628
+ function j(e, t) {
629
+ if (t.length > co) {
630
+ const o = Pn(t);
629
631
  return e.apply(
630
632
  null,
631
633
  o.map((n) => e.apply(null, n))
@@ -633,20 +635,20 @@ function V(e, t) {
633
635
  } else
634
636
  return e.apply(null, t);
635
637
  }
636
- function it(e) {
638
+ function ct(e) {
637
639
  const o = e.nodes().map((n) => {
638
640
  const s = e.node(n).rank;
639
641
  return s === void 0 ? Number.MIN_VALUE : s;
640
642
  });
641
- return V(Math.max, o);
643
+ return j(Math.max, o);
642
644
  }
643
- function no(e, t) {
645
+ function uo(e, t) {
644
646
  const o = { lhs: [], rhs: [] };
645
647
  return e.forEach((n) => {
646
648
  t(n) ? o.lhs.push(n) : o.rhs.push(n);
647
649
  }), o;
648
650
  }
649
- function so(e, t) {
651
+ function fo(e, t) {
650
652
  const o = Date.now();
651
653
  try {
652
654
  return t();
@@ -654,15 +656,15 @@ function so(e, t) {
654
656
  console.log(e + " time: " + (Date.now() - o) + "ms");
655
657
  }
656
658
  }
657
- function ro(e, t) {
659
+ function ho(e, t) {
658
660
  return t();
659
661
  }
660
- let Sn = 0;
661
- function $e(e) {
662
- const t = ++Sn;
662
+ let zn = 0;
663
+ function ze(e) {
664
+ const t = ++zn;
663
665
  return e + String(t);
664
666
  }
665
- function ae(e, t, o = 1) {
667
+ function ce(e, t, o = 1) {
666
668
  t == null && (t = e, e = 0);
667
669
  let n = (r) => r < t;
668
670
  o < 0 && (n = (r) => t < r);
@@ -671,13 +673,13 @@ function ae(e, t, o = 1) {
671
673
  s.push(r);
672
674
  return s;
673
675
  }
674
- function Ee(e, t) {
676
+ function xe(e, t) {
675
677
  const o = {};
676
678
  for (const n of t)
677
679
  e[n] !== void 0 && (o[n] = e[n]);
678
680
  return o;
679
681
  }
680
- function xe(e, t) {
682
+ function Ne(e, t) {
681
683
  let o = t;
682
684
  if (typeof t == "string") {
683
685
  const n = t;
@@ -685,41 +687,41 @@ function xe(e, t) {
685
687
  }
686
688
  return Object.entries(e).reduce((n, [s, r]) => (n[s] = o(r, s), n), {});
687
689
  }
688
- function De(e, t) {
690
+ function Be(e, t) {
689
691
  return e.reduce((o, n, s) => (o[n] = t[s], o), {});
690
692
  }
691
- const Me = {
692
- addBorderNode: Nn,
693
- addDummyNode: ce,
694
- applyWithChunking: V,
695
- asNonCompoundGraph: rt,
696
- buildLayerMatrix: Ce,
697
- intersectRect: st,
698
- mapValues: xe,
699
- maxRank: it,
700
- normalizeRanks: eo,
701
- notime: ro,
702
- partition: no,
703
- pick: Ee,
704
- predecessorWeights: _n,
705
- range: ae,
706
- removeEmptyRanks: to,
707
- simplify: Qt,
708
- successorWeights: xn,
709
- time: so,
710
- uniqueId: $e,
711
- zipObject: De
693
+ const Pe = {
694
+ addBorderNode: Fn,
695
+ addDummyNode: ue,
696
+ applyWithChunking: j,
697
+ asNonCompoundGraph: at,
698
+ buildLayerMatrix: _e,
699
+ intersectRect: lt,
700
+ mapValues: Ne,
701
+ maxRank: ct,
702
+ normalizeRanks: lo,
703
+ notime: ho,
704
+ partition: uo,
705
+ pick: xe,
706
+ predecessorWeights: Dn,
707
+ range: ce,
708
+ removeEmptyRanks: ao,
709
+ simplify: io,
710
+ successorWeights: $n,
711
+ time: fo,
712
+ uniqueId: ze,
713
+ zipObject: Be
712
714
  };
713
- function Ln(e) {
714
- (e.graph().acyclicer === "greedy" ? kn(e, o(e)) : Rn(e)).forEach((n) => {
715
+ function Bn(e) {
716
+ (e.graph().acyclicer === "greedy" ? On(e, o(e)) : In(e)).forEach((n) => {
715
717
  const s = e.edge(n);
716
- e.removeEdge(n), s.forwardName = n.name, s.reversed = !0, e.setEdge(n.w, n.v, s, $e("rev"));
718
+ e.removeEdge(n), s.forwardName = n.name, s.reversed = !0, e.setEdge(n.w, n.v, s, ze("rev"));
717
719
  });
718
720
  function o(n) {
719
721
  return (s) => n.edge(s).weight;
720
722
  }
721
723
  }
722
- function On(e) {
724
+ function Vn(e) {
723
725
  e.edges().forEach((t) => {
724
726
  const o = e.edge(t);
725
727
  if (o.reversed) {
@@ -729,7 +731,7 @@ function On(e) {
729
731
  }
730
732
  });
731
733
  }
732
- function Rn(e) {
734
+ function In(e) {
733
735
  const t = [], o = {}, n = {};
734
736
  function s(r) {
735
737
  Object.hasOwn(n, r) || (n[r] = !0, o[r] = !0, e.outEdges(r).forEach((i) => {
@@ -738,27 +740,27 @@ function Rn(e) {
738
740
  }
739
741
  return e.nodes().forEach(s), t;
740
742
  }
741
- function Tn(e) {
742
- e.graph().dummyChains = [], e.edges().forEach((t) => Mn(e, t));
743
+ function Gn(e) {
744
+ e.graph().dummyChains = [], e.edges().forEach((t) => jn(e, t));
743
745
  }
744
- function Mn(e, t) {
746
+ function jn(e, t) {
745
747
  let o = t.v, n = e.node(o).rank;
746
748
  const s = t.w, r = e.node(s).rank, i = t.name, l = e.edge(t), a = l.labelRank;
747
749
  if (r === n + 1)
748
750
  return;
749
751
  e.removeEdge(t);
750
- let c, u, d;
751
- for (d = 0, ++n; n < r; ++d, ++n)
752
- l.points = [], u = {
752
+ let c, d, f;
753
+ for (f = 0, ++n; n < r; ++f, ++n)
754
+ l.points = [], d = {
753
755
  width: 0,
754
756
  height: 0,
755
757
  edgeLabel: l,
756
758
  edgeObj: t,
757
759
  rank: n
758
- }, c = ce(e, "edge", u, "_d"), n === a && (u.width = l.width, u.height = l.height, u.dummy = "edge-label", u.labelpos = l.labelpos), e.setEdge(o, c, { weight: l.weight }, i), d === 0 && e.graph().dummyChains.push(c), o = c;
760
+ }, c = ue(e, "edge", d, "_d"), n === a && (d.width = l.width, d.height = l.height, d.dummy = "edge-label", d.labelpos = l.labelpos), e.setEdge(o, c, { weight: l.weight }, i), f === 0 && e.graph().dummyChains.push(c), o = c;
759
761
  e.setEdge(o, s, { weight: l.weight }, i);
760
762
  }
761
- function $n(e) {
763
+ function Wn(e) {
762
764
  e.graph().dummyChains.forEach((t) => {
763
765
  let o = e.node(t);
764
766
  const n = o.edgeLabel;
@@ -768,7 +770,7 @@ function $n(e) {
768
770
  s = e.successors(t)[0], e.removeNode(t), n.points.push({ x: o.x, y: o.y }), o.dummy === "edge-label" && (n.x = o.x, n.y = o.y, n.width = o.width, n.height = o.height), t = s, o = e.node(t);
769
771
  });
770
772
  }
771
- function io(e) {
773
+ function mo(e) {
772
774
  function t(o) {
773
775
  const n = e.node(o);
774
776
  if (n && Object.prototype.hasOwnProperty.call(n, "rank"))
@@ -779,20 +781,20 @@ function io(e) {
779
781
  const r = s.map((l) => {
780
782
  if (!e.node(l.w))
781
783
  return Number.POSITIVE_INFINITY;
782
- const c = t(l.w), u = e.edge(l).minlen;
783
- return c - u;
784
+ const c = t(l.w), d = e.edge(l).minlen;
785
+ return c - d;
784
786
  });
785
- let i = V(Math.min, r);
787
+ let i = j(Math.min, r);
786
788
  return i === Number.POSITIVE_INFINITY && (i = 0), n && (n.rank = i), i;
787
789
  }
788
790
  (e.sources() || []).forEach(t);
789
791
  }
790
- function Dn(e, t) {
792
+ function Yn(e, t) {
791
793
  return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
792
794
  }
793
- function Pn(e) {
794
- Fn(e);
795
- const t = new Z();
795
+ function Hn(e) {
796
+ Zn(e);
797
+ const t = new q();
796
798
  e.nodes().forEach((r) => {
797
799
  t.setNode(r, {});
798
800
  });
@@ -801,35 +803,35 @@ function Pn(e) {
801
803
  return t;
802
804
  const n = o[0], s = /* @__PURE__ */ new Set([n]);
803
805
  for (; s.size < o.length; ) {
804
- const r = zn(e, s);
806
+ const r = Un(e, s);
805
807
  if (!r) {
806
- const u = o.find((d) => !s.has(d));
807
- s.add(u), t.setNode(u, {});
808
+ const d = o.find((f) => !s.has(f));
809
+ s.add(d), t.setNode(d, {});
808
810
  continue;
809
811
  }
810
812
  const { edgeObject: i, delta: l, attachFrom: a, attachTo: c } = r;
811
- Bn(e, s, a, l), t.setEdge(i.v, i.w, {}), s.add(c);
813
+ Xn(e, s, a, l), t.setEdge(i.v, i.w, {}), s.add(c);
812
814
  }
813
815
  return t;
814
816
  }
815
- function Fn(e) {
817
+ function Zn(e) {
816
818
  e.nodes().forEach((t) => {
817
819
  const o = e.node(t) || {};
818
820
  Object.prototype.hasOwnProperty.call(o, "rank") || (o.rank = 0, e.setNode(t, o));
819
821
  });
820
822
  }
821
- function zn(e, t) {
823
+ function Un(e, t) {
822
824
  let o = null;
823
825
  return e.edges().forEach((n) => {
824
826
  const s = t.has(n.v), r = t.has(n.w);
825
827
  if (s === r)
826
828
  return;
827
- const i = Dn(e, n), l = Math.abs(i);
829
+ const i = Yn(e, n), l = Math.abs(i);
828
830
  if (!o || l < o.absoluteSlack) {
829
- const a = s ? n.v : n.w, c = s ? n.w : n.v, u = s ? i : -i;
831
+ const a = s ? n.v : n.w, c = s ? n.w : n.v, d = s ? i : -i;
830
832
  o = {
831
833
  edgeObject: n,
832
- delta: u,
834
+ delta: d,
833
835
  attachFrom: a,
834
836
  attachTo: c,
835
837
  absoluteSlack: l
@@ -837,7 +839,7 @@ function zn(e, t) {
837
839
  }
838
840
  }), o;
839
841
  }
840
- function Bn(e, t, o, n) {
842
+ function Xn(e, t, o, n) {
841
843
  n && e.nodes().forEach((s) => {
842
844
  if (!t.has(s)) {
843
845
  const r = e.node(s);
@@ -845,81 +847,81 @@ function Bn(e, t, o, n) {
845
847
  }
846
848
  });
847
849
  }
848
- function ue(e) {
849
- const t = Qt(e);
850
- return io(t), t.nodes().forEach((o) => {
850
+ function de(e) {
851
+ const t = io(e);
852
+ return mo(t), t.nodes().forEach((o) => {
851
853
  const n = t.node(o), s = e.node(o) || {};
852
854
  s.rank = n.rank, e.setNode(o, s);
853
855
  }), e;
854
856
  }
855
- function Vn(e, t) {
857
+ function qn(e, t) {
856
858
  }
857
- function jn(e, t) {
859
+ function Kn(e, t) {
858
860
  }
859
- function Gn(e, t, o) {
861
+ function Jn(e, t, o) {
860
862
  return 0;
861
863
  }
862
- function In(e) {
864
+ function Qn(e) {
863
865
  return null;
864
866
  }
865
- function Wn(e, t) {
867
+ function es(e, t) {
866
868
  return null;
867
869
  }
868
- ue.initLowLimValues = Vn;
869
- ue.initCutValues = jn;
870
- ue.calcCutValue = Gn;
871
- ue.leaveEdge = In;
872
- ue.enterEdge = Wn;
873
- const lo = io;
874
- function Yn(e) {
870
+ de.initLowLimValues = qn;
871
+ de.initCutValues = Kn;
872
+ de.calcCutValue = Jn;
873
+ de.leaveEdge = Qn;
874
+ de.enterEdge = es;
875
+ const go = mo;
876
+ function ts(e) {
875
877
  const t = e.graph().ranker;
876
878
  if (t instanceof Function)
877
879
  return t(e);
878
880
  switch (e.graph().ranker) {
879
881
  case "network-simplex":
880
- jt(e);
882
+ Ut(e);
881
883
  break;
882
884
  case "tight-tree":
883
- Zn(e);
885
+ ns(e);
884
886
  break;
885
887
  case "longest-path":
886
- Hn(e);
888
+ os(e);
887
889
  break;
888
890
  case "none":
889
891
  break;
890
892
  default:
891
- jt(e);
893
+ Ut(e);
892
894
  }
893
895
  }
894
- const Hn = lo;
895
- function Zn(e) {
896
- lo(e), Pn(e);
896
+ const os = go;
897
+ function ns(e) {
898
+ go(e), Hn(e);
897
899
  }
898
- function jt(e) {
899
- ue(e);
900
+ function Ut(e) {
901
+ de(e);
900
902
  }
901
- function Un(e) {
902
- const t = qn(e);
903
+ function ss(e) {
904
+ const t = is(e);
903
905
  e.graph().dummyChains.forEach((o) => {
904
906
  let n = e.node(o);
905
- const s = n.edgeObj, r = Xn(e, t, s.v, s.w), i = r.path, l = r.lca;
906
- let a = 0, c = i[a], u = !0, d = o;
907
- for (; d !== s.w; ) {
908
- if (n = e.node(d), u) {
907
+ const s = n.edgeObj, r = rs(e, t, s.v, s.w), i = r.path, l = r.lca;
908
+ let a = 0, c = i[a], d = !0, f = o;
909
+ for (; f !== s.w; ) {
910
+ if (n = e.node(f), d) {
909
911
  for (; (c = i[a]) !== l && e.node(c).maxRank < n.rank; )
910
912
  a++;
911
- c === l && (u = !1);
913
+ c === l && (d = !1);
912
914
  }
913
- if (!u) {
915
+ if (!d) {
914
916
  for (; a < i.length - 1 && e.node(c = i[a + 1]).minRank <= n.rank; )
915
917
  a++;
916
918
  c = i[a];
917
919
  }
918
- e.setParent(d, c), d = e.successors(d)[0];
920
+ e.setParent(f, c), f = e.successors(f)[0];
919
921
  }
920
922
  });
921
923
  }
922
- function Xn(e, t, o, n) {
924
+ function rs(e, t, o, n) {
923
925
  const s = [], r = [], i = Math.min(t[o].low, t[n].low), l = Math.max(t[o].lim, t[n].lim);
924
926
  let a, c;
925
927
  a = o;
@@ -933,7 +935,7 @@ function Xn(e, t, o, n) {
933
935
  lca: c
934
936
  };
935
937
  }
936
- function qn(e) {
938
+ function is(e) {
937
939
  const t = {};
938
940
  let o = 0;
939
941
  function n(s) {
@@ -942,32 +944,32 @@ function qn(e) {
942
944
  }
943
945
  return e.children().forEach(n), t;
944
946
  }
945
- function Kn(e) {
946
- const t = Me.addDummyNode(e, "root", {}, "_root"), o = Jn(e), n = Object.values(o), s = Me.applyWithChunking(Math.max, n) - 1, r = 2 * s + 1;
947
+ function ls(e) {
948
+ const t = Pe.addDummyNode(e, "root", {}, "_root"), o = as(e), n = Object.values(o), s = Pe.applyWithChunking(Math.max, n) - 1, r = 2 * s + 1;
947
949
  e.graph().nestingRoot = t, e.edges().forEach((l) => {
948
950
  e.edge(l).minlen *= r;
949
951
  });
950
- const i = Qn(e) + 1;
952
+ const i = cs(e) + 1;
951
953
  e.children().forEach((l) => {
952
- ao(e, t, r, i, s, o, l);
954
+ vo(e, t, r, i, s, o, l);
953
955
  }), e.graph().nodeRankFactor = r;
954
956
  }
955
- function ao(e, t, o, n, s, r, i) {
957
+ function vo(e, t, o, n, s, r, i) {
956
958
  const l = e.children(i);
957
959
  if (!l.length) {
958
960
  i !== t && e.setEdge(t, i, { weight: 0, minlen: o });
959
961
  return;
960
962
  }
961
- const a = Me.addBorderNode(e, "_bt"), c = Me.addBorderNode(e, "_bb"), u = e.node(i);
962
- e.setParent(a, i), u.borderTop = a, e.setParent(c, i), u.borderBottom = c, l.forEach((d) => {
963
- ao(e, t, o, n, s, r, d);
964
- const g = e.node(d), v = g.borderTop ? g.borderTop : d, A = g.borderBottom ? g.borderBottom : d, N = g.borderTop ? n : 2 * n, M = v !== A ? 1 : s - r[i] + 1;
965
- e.setEdge(a, v, {
966
- weight: N,
963
+ const a = Pe.addBorderNode(e, "_bt"), c = Pe.addBorderNode(e, "_bb"), d = e.node(i);
964
+ e.setParent(a, i), d.borderTop = a, e.setParent(c, i), d.borderBottom = c, l.forEach((f) => {
965
+ vo(e, t, o, n, s, r, f);
966
+ const g = e.node(f), b = g.borderTop ? g.borderTop : f, N = g.borderBottom ? g.borderBottom : f, _ = g.borderTop ? n : 2 * n, M = b !== N ? 1 : s - r[i] + 1;
967
+ e.setEdge(a, b, {
968
+ weight: _,
967
969
  minlen: M,
968
970
  nestingEdge: !0
969
- }), e.setEdge(A, c, {
970
- weight: N,
971
+ }), e.setEdge(N, c, {
972
+ weight: _,
971
973
  minlen: M,
972
974
  nestingEdge: !0
973
975
  });
@@ -976,7 +978,7 @@ function ao(e, t, o, n, s, r, i) {
976
978
  minlen: s + r[i]
977
979
  });
978
980
  }
979
- function Jn(e) {
981
+ function as(e) {
980
982
  const t = {};
981
983
  function o(n, s) {
982
984
  const r = e.children(n);
@@ -984,83 +986,83 @@ function Jn(e) {
984
986
  }
985
987
  return e.children().forEach((n) => o(n, 1)), t;
986
988
  }
987
- function Qn(e) {
989
+ function cs(e) {
988
990
  return e.edges().reduce((t, o) => t + e.edge(o).weight, 0);
989
991
  }
990
- function es(e) {
992
+ function us(e) {
991
993
  const t = e.graph();
992
994
  e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((o) => {
993
995
  e.edge(o).nestingEdge && e.removeEdge(o);
994
996
  });
995
997
  }
996
- function ts(e) {
998
+ function ds(e) {
997
999
  function t(o) {
998
1000
  const n = e.children(o), s = e.node(o);
999
1001
  if (n.length && n.forEach(t), Object.hasOwn(s, "minRank")) {
1000
1002
  s.borderLeft = [], s.borderRight = [];
1001
1003
  for (let r = s.minRank, i = s.maxRank + 1; r < i; ++r)
1002
- Gt(e, "borderLeft", "_bl", o, s, r), Gt(e, "borderRight", "_br", o, s, r);
1004
+ Xt(e, "borderLeft", "_bl", o, s, r), Xt(e, "borderRight", "_br", o, s, r);
1003
1005
  }
1004
1006
  }
1005
1007
  e.children().forEach(t);
1006
1008
  }
1007
- function Gt(e, t, o, n, s, r) {
1009
+ function Xt(e, t, o, n, s, r) {
1008
1010
  const i = {
1009
1011
  width: 0,
1010
1012
  height: 0,
1011
1013
  rank: r,
1012
1014
  borderType: t
1013
- }, l = s[t][r - 1], a = ce(e, "border", i, o);
1015
+ }, l = s[t][r - 1], a = ue(e, "border", i, o);
1014
1016
  s[t][r] = a, e.setParent(a, n), l && e.setEdge(l, a, { weight: 1 });
1015
1017
  }
1016
- function os(e) {
1018
+ function fs(e) {
1017
1019
  const t = e.graph().rankdir.toLowerCase();
1018
- (t === "lr" || t === "rl") && co(e);
1020
+ (t === "lr" || t === "rl") && bo(e);
1019
1021
  }
1020
- function ns(e) {
1022
+ function hs(e) {
1021
1023
  const t = e.graph().rankdir.toLowerCase();
1022
- (t === "bt" || t === "rl") && ss(e), (t === "lr" || t === "rl") && (rs(e), co(e));
1024
+ (t === "bt" || t === "rl") && ms(e), (t === "lr" || t === "rl") && (gs(e), bo(e));
1023
1025
  }
1024
- function co(e) {
1026
+ function bo(e) {
1025
1027
  e.nodes().forEach((t) => {
1026
- It(e.node(t));
1028
+ qt(e.node(t));
1027
1029
  }), e.edges().forEach((t) => {
1028
- It(e.edge(t));
1030
+ qt(e.edge(t));
1029
1031
  });
1030
1032
  }
1031
- function It(e) {
1033
+ function qt(e) {
1032
1034
  const t = e.width;
1033
1035
  e.width = e.height, e.height = t;
1034
1036
  }
1035
- function ss(e) {
1037
+ function ms(e) {
1036
1038
  e.nodes().forEach((t) => {
1037
- Ke(e.node(t));
1039
+ et(e.node(t));
1038
1040
  }), e.edges().forEach((t) => {
1039
1041
  const o = e.edge(t);
1040
- o.points.forEach(Ke), Object.hasOwn(o, "y") && Ke(o);
1042
+ o.points.forEach(et), Object.hasOwn(o, "y") && et(o);
1041
1043
  });
1042
1044
  }
1043
- function Ke(e) {
1045
+ function et(e) {
1044
1046
  e.y = -e.y;
1045
1047
  }
1046
- function rs(e) {
1048
+ function gs(e) {
1047
1049
  e.nodes().forEach((t) => {
1048
- Je(e.node(t));
1050
+ tt(e.node(t));
1049
1051
  }), e.edges().forEach((t) => {
1050
1052
  const o = e.edge(t);
1051
- o.points.forEach(Je), Object.hasOwn(o, "x") && Je(o);
1053
+ o.points.forEach(tt), Object.hasOwn(o, "x") && tt(o);
1052
1054
  });
1053
1055
  }
1054
- function Je(e) {
1056
+ function tt(e) {
1055
1057
  const t = e.x;
1056
1058
  e.x = e.y, e.y = t;
1057
1059
  }
1058
- const Wt = {
1059
- adjust: os,
1060
- undo: ns
1060
+ const Kt = {
1061
+ adjust: fs,
1062
+ undo: hs
1061
1063
  };
1062
- function is(e) {
1063
- const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s = V(Math.max, n), r = ae(s + 1).map(() => []);
1064
+ function vs(e) {
1065
+ const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s = j(Math.max, n), r = ce(s + 1).map(() => []);
1064
1066
  function i(a) {
1065
1067
  if (t[a]) return;
1066
1068
  t[a] = !0;
@@ -1071,20 +1073,20 @@ function is(e) {
1071
1073
  (a, c) => e.node(a).rank - e.node(c).rank
1072
1074
  ).forEach(i), r;
1073
1075
  }
1074
- function ls(e, t) {
1076
+ function bs(e, t) {
1075
1077
  let o = 0;
1076
1078
  for (let n = 1; n < t.length; ++n)
1077
- o += as(e, t[n - 1], t[n]);
1079
+ o += ps(e, t[n - 1], t[n]);
1078
1080
  return o;
1079
1081
  }
1080
- function as(e, t, o) {
1081
- const n = De(
1082
+ function ps(e, t, o) {
1083
+ const n = Be(
1082
1084
  o,
1083
- o.map((c, u) => u)
1084
- ), s = t.flatMap((c) => e.outEdges(c).map((u) => ({
1085
- pos: n[u.w],
1086
- weight: e.edge(u).weight
1087
- })).sort((u, d) => u.pos - d.pos));
1085
+ o.map((c, d) => d)
1086
+ ), s = t.flatMap((c) => e.outEdges(c).map((d) => ({
1087
+ pos: n[d.w],
1088
+ weight: e.edge(d).weight
1089
+ })).sort((d, f) => d.pos - f.pos));
1088
1090
  let r = 1;
1089
1091
  for (; r < o.length; ) r <<= 1;
1090
1092
  const i = 2 * r - 1;
@@ -1092,15 +1094,15 @@ function as(e, t, o) {
1092
1094
  const l = new Array(i).fill(0);
1093
1095
  let a = 0;
1094
1096
  return s.forEach((c) => {
1095
- let u = c.pos + r;
1096
- l[u] += c.weight;
1097
- let d = 0;
1098
- for (; u > 0; )
1099
- u % 2 && (d += l[u + 1]), u = u - 1 >> 1, l[u] += c.weight;
1100
- a += c.weight * d;
1097
+ let d = c.pos + r;
1098
+ l[d] += c.weight;
1099
+ let f = 0;
1100
+ for (; d > 0; )
1101
+ d % 2 && (f += l[d + 1]), d = d - 1 >> 1, l[d] += c.weight;
1102
+ a += c.weight * f;
1101
1103
  }), a;
1102
1104
  }
1103
- function cs(e, t = []) {
1105
+ function ws(e, t = []) {
1104
1106
  return t.map((o) => {
1105
1107
  const n = e.inEdges(o);
1106
1108
  if (!n.length)
@@ -1122,7 +1124,7 @@ function cs(e, t = []) {
1122
1124
  };
1123
1125
  });
1124
1126
  }
1125
- function us(e, t) {
1127
+ function ys(e, t) {
1126
1128
  const o = {};
1127
1129
  e.forEach((s, r) => {
1128
1130
  const i = o[s.v] = {
@@ -1138,13 +1140,13 @@ function us(e, t) {
1138
1140
  r !== void 0 && i !== void 0 && (i.indegree++, r.out.push(i));
1139
1141
  });
1140
1142
  const n = Object.values(o).filter((s) => !s.indegree);
1141
- return ds(n);
1143
+ return ks(n);
1142
1144
  }
1143
- function ds(e) {
1145
+ function ks(e) {
1144
1146
  const t = [];
1145
1147
  function o(s) {
1146
1148
  return (r) => {
1147
- r.merged || (r.barycenter === void 0 || s.barycenter === void 0 || r.barycenter >= s.barycenter) && fs(s, r);
1149
+ r.merged || (r.barycenter === void 0 || s.barycenter === void 0 || r.barycenter >= s.barycenter) && Es(s, r);
1148
1150
  };
1149
1151
  }
1150
1152
  function n(s) {
@@ -1156,67 +1158,67 @@ function ds(e) {
1156
1158
  const s = e.pop();
1157
1159
  t.push(s), s.in.reverse().forEach(o(s)), s.out.forEach(n(s));
1158
1160
  }
1159
- return t.filter((s) => !s.merged).map((s) => Ee(s, ["vs", "i", "barycenter", "weight"]));
1161
+ return t.filter((s) => !s.merged).map((s) => xe(s, ["vs", "i", "barycenter", "weight"]));
1160
1162
  }
1161
- function fs(e, t) {
1163
+ function Es(e, t) {
1162
1164
  let o = 0, n = 0;
1163
1165
  e.weight && (o += e.barycenter * e.weight, n += e.weight), t.weight && (o += t.barycenter * t.weight, n += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = o / n, e.weight = n, e.i = Math.min(t.i, e.i), t.merged = !0;
1164
1166
  }
1165
- function hs(e, t) {
1166
- const o = no(e, (u) => Object.hasOwn(u, "barycenter")), n = o.lhs, s = o.rhs.sort((u, d) => d.i - u.i), r = [];
1167
+ function Cs(e, t) {
1168
+ const o = uo(e, (d) => Object.hasOwn(d, "barycenter")), n = o.lhs, s = o.rhs.sort((d, f) => f.i - d.i), r = [];
1167
1169
  let i = 0, l = 0, a = 0;
1168
- n.sort(ms(!!t)), a = Yt(r, s, a), n.forEach((u) => {
1169
- a += u.vs.length, r.push(u.vs), i += u.barycenter * u.weight, l += u.weight, a = Yt(r, s, a);
1170
+ n.sort(xs(!!t)), a = Jt(r, s, a), n.forEach((d) => {
1171
+ a += d.vs.length, r.push(d.vs), i += d.barycenter * d.weight, l += d.weight, a = Jt(r, s, a);
1170
1172
  });
1171
1173
  const c = { vs: r.flat(!0) };
1172
1174
  return l && (c.barycenter = i / l, c.weight = l), c;
1173
1175
  }
1174
- function Yt(e, t, o) {
1176
+ function Jt(e, t, o) {
1175
1177
  let n;
1176
1178
  for (; t.length && (n = t[t.length - 1]).i <= o; )
1177
1179
  t.pop(), e.push(n.vs), o++;
1178
1180
  return o;
1179
1181
  }
1180
- function ms(e) {
1182
+ function xs(e) {
1181
1183
  return (t, o) => t.barycenter < o.barycenter ? -1 : t.barycenter > o.barycenter ? 1 : e ? o.i - t.i : t.i - o.i;
1182
1184
  }
1183
- function uo(e, t, o, n) {
1185
+ function po(e, t, o, n) {
1184
1186
  let s = e.children(t);
1185
1187
  const r = e.node(t), i = r ? r.borderLeft : void 0, l = r ? r.borderRight : void 0, a = {};
1186
1188
  i && (s = s.filter((g) => g !== i && g !== l));
1187
- const c = cs(e, s);
1189
+ const c = ws(e, s);
1188
1190
  c.forEach((g) => {
1189
1191
  if (e.children(g.v).length) {
1190
- const v = uo(e, g.v, o, n);
1191
- a[g.v] = v, Object.hasOwn(v, "barycenter") && bs(g, v);
1192
+ const b = po(e, g.v, o, n);
1193
+ a[g.v] = b, Object.hasOwn(b, "barycenter") && Ns(g, b);
1192
1194
  }
1193
1195
  });
1194
- let u = us(c, o);
1195
- gs(u, a);
1196
- const d = hs(u, n);
1197
- if (i && (d.vs = [i, d.vs, l].flat(!0), e.predecessors(i).length)) {
1198
- const g = e.node(e.predecessors(i)[0]), v = e.node(e.predecessors(l)[0]);
1199
- Object.hasOwn(d, "barycenter") || (d.barycenter = 0, d.weight = 0), d.barycenter = (d.barycenter * d.weight + g.order + v.order) / (d.weight + 2), d.weight += 2;
1196
+ let d = ys(c, o);
1197
+ _s(d, a);
1198
+ const f = Cs(d, n);
1199
+ if (i && (f.vs = [i, f.vs, l].flat(!0), e.predecessors(i).length)) {
1200
+ const g = e.node(e.predecessors(i)[0]), b = e.node(e.predecessors(l)[0]);
1201
+ Object.hasOwn(f, "barycenter") || (f.barycenter = 0, f.weight = 0), f.barycenter = (f.barycenter * f.weight + g.order + b.order) / (f.weight + 2), f.weight += 2;
1200
1202
  }
1201
- return d;
1203
+ return f;
1202
1204
  }
1203
- function gs(e, t) {
1205
+ function _s(e, t) {
1204
1206
  e.forEach((o) => {
1205
1207
  o.vs = o.vs.flatMap((n) => t[n] ? t[n].vs : n);
1206
1208
  });
1207
1209
  }
1208
- function bs(e, t) {
1210
+ function Ns(e, t) {
1209
1211
  e.barycenter !== void 0 ? (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight) : (e.barycenter = t.barycenter, e.weight = t.weight);
1210
1212
  }
1211
- function vs(e, t, o, n) {
1213
+ function As(e, t, o, n) {
1212
1214
  n || (n = e.nodes());
1213
- const s = ps(e), r = new Z({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((i) => e.node(i));
1215
+ const s = Ss(e), r = new q({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((i) => e.node(i));
1214
1216
  return n.forEach((i) => {
1215
1217
  const l = e.node(i), a = e.parent(i);
1216
- (l.rank === t || l.minRank <= t && t <= l.maxRank) && (r.setNode(i), r.setParent(i, a || s), e[o](i).forEach((u) => {
1217
- const d = u.v === i ? u.w : u.v, g = r.edge(d, i), v = g ? g.weight : 0;
1218
- r.setEdge(d, i, {
1219
- weight: e.edge(u).weight + v
1218
+ (l.rank === t || l.minRank <= t && t <= l.maxRank) && (r.setNode(i), r.setParent(i, a || s), e[o](i).forEach((d) => {
1219
+ const f = d.v === i ? d.w : d.v, g = r.edge(f, i), b = g ? g.weight : 0;
1220
+ r.setEdge(f, i, {
1221
+ weight: e.edge(d).weight + b
1220
1222
  });
1221
1223
  }), Object.hasOwn(l, "minRank") && r.setNode(i, {
1222
1224
  borderLeft: l.borderLeft[t],
@@ -1224,12 +1226,12 @@ function vs(e, t, o, n) {
1224
1226
  }));
1225
1227
  }), r;
1226
1228
  }
1227
- function ps(e) {
1229
+ function Ss(e) {
1228
1230
  let t;
1229
- for (; e.hasNode(t = $e("_root")); ) ;
1231
+ for (; e.hasNode(t = ze("_root")); ) ;
1230
1232
  return t;
1231
1233
  }
1232
- function ws(e, t, o) {
1234
+ function Ls(e, t, o) {
1233
1235
  let n = {}, s;
1234
1236
  o.forEach((r) => {
1235
1237
  let i = e.parent(r), l, a;
@@ -1242,34 +1244,34 @@ function ws(e, t, o) {
1242
1244
  }
1243
1245
  });
1244
1246
  }
1245
- function fo(e, t = {}) {
1247
+ function wo(e, t = {}) {
1246
1248
  if (typeof t.customOrder == "function") {
1247
- t.customOrder(e, fo);
1249
+ t.customOrder(e, wo);
1248
1250
  return;
1249
1251
  }
1250
- const o = it(e), n = Ht(
1252
+ const o = ct(e), n = Qt(
1251
1253
  e,
1252
- ae(1, o + 1),
1254
+ ce(1, o + 1),
1253
1255
  "inEdges"
1254
- ), s = Ht(
1256
+ ), s = Qt(
1255
1257
  e,
1256
- ae(o - 1, -1, -1),
1258
+ ce(o - 1, -1, -1),
1257
1259
  "outEdges"
1258
1260
  );
1259
- let r = is(e);
1260
- if (Zt(e, r), t.disableOptimalOrderHeuristic)
1261
+ let r = vs(e);
1262
+ if (eo(e, r), t.disableOptimalOrderHeuristic)
1261
1263
  return;
1262
1264
  let i = Number.POSITIVE_INFINITY, l;
1263
1265
  const a = t.constraints || [];
1264
- for (let c = 0, u = 0; u < 4; ++c, ++u) {
1265
- const d = c % 2 === 0 ? n : s, g = c % 4 >= 2;
1266
- ks(d, g, a), r = Ce(e);
1267
- const v = ls(e, r);
1268
- v < i ? (i = v, u = 0, l = structuredClone(r)) : v === i && (l = structuredClone(r));
1266
+ for (let c = 0, d = 0; d < 4; ++c, ++d) {
1267
+ const f = c % 2 === 0 ? n : s, g = c % 4 >= 2;
1268
+ Os(f, g, a), r = _e(e);
1269
+ const b = bs(e, r);
1270
+ b < i ? (i = b, d = 0, l = structuredClone(r)) : b === i && (l = structuredClone(r));
1269
1271
  }
1270
- Zt(e, l);
1272
+ eo(e, l);
1271
1273
  }
1272
- function Ht(e, t, o) {
1274
+ function Qt(e, t, o) {
1273
1275
  const n = /* @__PURE__ */ new Map();
1274
1276
  function s(r, i) {
1275
1277
  n.has(r) || n.set(r, []), n.get(r).push(i);
@@ -1281,7 +1283,7 @@ function Ht(e, t, o) {
1281
1283
  l !== i.rank && s(l, r);
1282
1284
  }
1283
1285
  return t.map(
1284
- (r) => vs(
1286
+ (r) => As(
1285
1287
  e,
1286
1288
  r,
1287
1289
  o,
@@ -1289,68 +1291,68 @@ function Ht(e, t, o) {
1289
1291
  )
1290
1292
  );
1291
1293
  }
1292
- function ks(e, t, o) {
1293
- const n = new Z();
1294
+ function Os(e, t, o) {
1295
+ const n = new q();
1294
1296
  e.forEach((s) => {
1295
1297
  o.forEach((l) => n.setEdge(l.left, l.right));
1296
- const r = s.graph().root, i = uo(s, r, n, t);
1298
+ const r = s.graph().root, i = po(s, r, n, t);
1297
1299
  i.vs.forEach((l, a) => {
1298
1300
  s.node(l).order = a;
1299
- }), ws(s, n, i.vs);
1301
+ }), Ls(s, n, i.vs);
1300
1302
  });
1301
1303
  }
1302
- function Zt(e, t) {
1304
+ function eo(e, t) {
1303
1305
  Object.values(t).forEach((o) => {
1304
1306
  o.forEach((n, s) => {
1305
1307
  e.node(n).order = s;
1306
1308
  });
1307
1309
  });
1308
1310
  }
1309
- function ys(e, t) {
1311
+ function Rs(e, t) {
1310
1312
  const o = {};
1311
1313
  function n(s, r) {
1312
1314
  let i = 0, l = 0;
1313
1315
  const a = s.length, c = r[r.length - 1];
1314
- return r.forEach((u, d) => {
1315
- const g = Cs(e, u), v = g ? e.node(g).order : a;
1316
- (g || u === c) && (r.slice(l, d + 1).forEach((A) => {
1317
- e.predecessors(A).forEach((N) => {
1318
- const M = e.node(N), G = M.order;
1319
- (G < i || v < G) && !(M.dummy && e.node(A).dummy) && ho(o, N, A);
1316
+ return r.forEach((d, f) => {
1317
+ const g = Ms(e, d), b = g ? e.node(g).order : a;
1318
+ (g || d === c) && (r.slice(l, f + 1).forEach((N) => {
1319
+ e.predecessors(N).forEach((_) => {
1320
+ const M = e.node(_), Y = M.order;
1321
+ (Y < i || b < Y) && !(M.dummy && e.node(N).dummy) && yo(o, _, N);
1320
1322
  });
1321
- }), l = d + 1, i = v);
1323
+ }), l = f + 1, i = b);
1322
1324
  }), r;
1323
1325
  }
1324
1326
  return t.length && t.reduce(n), o;
1325
1327
  }
1326
- function Es(e, t) {
1328
+ function Ts(e, t) {
1327
1329
  const o = {};
1328
1330
  function n(r, i, l, a, c) {
1329
- let u;
1330
- ae(i, l).forEach((d) => {
1331
- u = r[d], e.node(u).dummy && e.predecessors(u).forEach((g) => {
1332
- const v = e.node(g);
1333
- v.dummy && (v.order < a || v.order > c) && ho(o, g, u);
1331
+ let d;
1332
+ ce(i, l).forEach((f) => {
1333
+ d = r[f], e.node(d).dummy && e.predecessors(d).forEach((g) => {
1334
+ const b = e.node(g);
1335
+ b.dummy && (b.order < a || b.order > c) && yo(o, g, d);
1334
1336
  });
1335
1337
  });
1336
1338
  }
1337
1339
  function s(r, i) {
1338
1340
  let l = -1, a, c = 0;
1339
- return i.forEach((u, d) => {
1340
- if (e.node(u).dummy === "border") {
1341
- const g = e.predecessors(u);
1342
- g.length && (a = e.node(g[0]).order, n(i, c, d, l, a), c = d, l = a);
1341
+ return i.forEach((d, f) => {
1342
+ if (e.node(d).dummy === "border") {
1343
+ const g = e.predecessors(d);
1344
+ g.length && (a = e.node(g[0]).order, n(i, c, f, l, a), c = f, l = a);
1343
1345
  }
1344
1346
  n(i, c, i.length, a, r.length);
1345
1347
  }), i;
1346
1348
  }
1347
1349
  return t.length && t.reduce(s), o;
1348
1350
  }
1349
- function Cs(e, t) {
1351
+ function Ms(e, t) {
1350
1352
  if (e.node(t).dummy)
1351
1353
  return e.predecessors(t).find((o) => e.node(o).dummy);
1352
1354
  }
1353
- function ho(e, t, o) {
1355
+ function yo(e, t, o) {
1354
1356
  if (t > o) {
1355
1357
  const s = t;
1356
1358
  t = o, o = s;
@@ -1358,14 +1360,14 @@ function ho(e, t, o) {
1358
1360
  let n = e[t];
1359
1361
  n || (e[t] = n = {}), n[o] = !0;
1360
1362
  }
1361
- function xs(e, t, o) {
1363
+ function $s(e, t, o) {
1362
1364
  if (t > o) {
1363
1365
  const n = t;
1364
1366
  t = o, o = n;
1365
1367
  }
1366
1368
  return !!e[t] && Object.hasOwn(e[t], o);
1367
1369
  }
1368
- function _s(e, t, o, n) {
1370
+ function Ds(e, t, o, n) {
1369
1371
  const s = {}, r = {}, i = {};
1370
1372
  return t.forEach((l) => {
1371
1373
  l.forEach((a, c) => {
@@ -1374,56 +1376,56 @@ function _s(e, t, o, n) {
1374
1376
  }), t.forEach((l) => {
1375
1377
  let a = -1;
1376
1378
  l.forEach((c) => {
1377
- let u = n(c);
1378
- if (u.length) {
1379
- u = u.sort((g, v) => i[g] - i[v]);
1380
- const d = (u.length - 1) / 2;
1381
- for (let g = Math.floor(d), v = Math.ceil(d); g <= v; ++g) {
1382
- const A = u[g];
1383
- r[c] === c && a < i[A] && !xs(o, c, A) && (r[A] = c, r[c] = s[c] = s[A], a = i[A]);
1379
+ let d = n(c);
1380
+ if (d.length) {
1381
+ d = d.sort((g, b) => i[g] - i[b]);
1382
+ const f = (d.length - 1) / 2;
1383
+ for (let g = Math.floor(f), b = Math.ceil(f); g <= b; ++g) {
1384
+ const N = d[g];
1385
+ r[c] === c && a < i[N] && !$s(o, c, N) && (r[N] = c, r[c] = s[c] = s[N], a = i[N]);
1384
1386
  }
1385
1387
  }
1386
1388
  });
1387
1389
  }), { root: s, align: r };
1388
1390
  }
1389
- function Ns(e, t, o, n, s) {
1390
- const r = {}, i = As(e, t, o, s), l = s ? "borderLeft" : "borderRight";
1391
- function a(d, g) {
1392
- const v = i.nodes().slice(), A = {};
1393
- let N = v.pop();
1394
- for (; N; ) {
1395
- if (A[N])
1396
- d(N);
1391
+ function Fs(e, t, o, n, s) {
1392
+ const r = {}, i = Ps(e, t, o, s), l = s ? "borderLeft" : "borderRight";
1393
+ function a(f, g) {
1394
+ const b = i.nodes().slice(), N = {};
1395
+ let _ = b.pop();
1396
+ for (; _; ) {
1397
+ if (N[_])
1398
+ f(_);
1397
1399
  else {
1398
- A[N] = !0, v.push(N);
1399
- for (const M of g(N))
1400
- v.push(M);
1400
+ N[_] = !0, b.push(_);
1401
+ for (const M of g(_))
1402
+ b.push(M);
1401
1403
  }
1402
- N = v.pop();
1404
+ _ = b.pop();
1403
1405
  }
1404
1406
  }
1405
- function c(d) {
1406
- r[d] = i.inEdges(d).reduce((g, v) => Math.max(g, r[v.v] + i.edge(v)), 0);
1407
+ function c(f) {
1408
+ r[f] = i.inEdges(f).reduce((g, b) => Math.max(g, r[b.v] + i.edge(b)), 0);
1407
1409
  }
1408
- function u(d) {
1409
- const g = i.outEdges(d).reduce((A, N) => Math.min(A, r[N.w] - i.edge(N)), Number.POSITIVE_INFINITY), v = e.node(d);
1410
- g !== Number.POSITIVE_INFINITY && v.borderType !== l && (r[d] = Math.max(r[d], g));
1410
+ function d(f) {
1411
+ const g = i.outEdges(f).reduce((N, _) => Math.min(N, r[_.w] - i.edge(_)), Number.POSITIVE_INFINITY), b = e.node(f);
1412
+ g !== Number.POSITIVE_INFINITY && b.borderType !== l && (r[f] = Math.max(r[f], g));
1411
1413
  }
1412
- return a(c, i.predecessors.bind(i)), a(u, i.successors.bind(i)), Object.keys(n).forEach((d) => {
1413
- r[d] = r[o[d]];
1414
+ return a(c, i.predecessors.bind(i)), a(d, i.successors.bind(i)), Object.keys(n).forEach((f) => {
1415
+ r[f] = r[o[f]];
1414
1416
  }), r;
1415
1417
  }
1416
- function As(e, t, o, n) {
1417
- const s = new e.constructor(), r = e.graph(), i = Ts(r.nodesep, r.edgesep, n);
1418
+ function Ps(e, t, o, n) {
1419
+ const s = new e.constructor(), r = e.graph(), i = Gs(r.nodesep, r.edgesep, n);
1418
1420
  return t.forEach((l) => {
1419
1421
  let a;
1420
1422
  l.forEach((c) => {
1421
- const u = o[c];
1422
- if (s.setNode(u), a) {
1423
- const d = o[a], g = s.edge(d, u);
1423
+ const d = o[c];
1424
+ if (s.setNode(d), a) {
1425
+ const f = o[a], g = s.edge(f, d);
1424
1426
  s.setEdge(
1427
+ f,
1425
1428
  d,
1426
- u,
1427
1429
  Math.max(i(e, c, a), g || 0)
1428
1430
  );
1429
1431
  }
@@ -1431,12 +1433,12 @@ function As(e, t, o, n) {
1431
1433
  });
1432
1434
  }), s;
1433
1435
  }
1434
- function Ss(e, t) {
1436
+ function zs(e, t) {
1435
1437
  return Object.values(t).reduce(
1436
1438
  (o, n) => {
1437
1439
  let s = Number.NEGATIVE_INFINITY, r = Number.POSITIVE_INFINITY;
1438
1440
  Object.entries(n).forEach(([l, a]) => {
1439
- const c = Ms(e, l) / 2;
1441
+ const c = js(e, l) / 2;
1440
1442
  s = Math.max(a + c, s), r = Math.min(a - c, r);
1441
1443
  });
1442
1444
  const i = s - r;
@@ -1445,31 +1447,31 @@ function Ss(e, t) {
1445
1447
  [Number.POSITIVE_INFINITY, null]
1446
1448
  )[1];
1447
1449
  }
1448
- function Ls(e, t) {
1449
- const o = Object.values(t), n = V(Math.min, o), s = V(Math.max, o);
1450
+ function Bs(e, t) {
1451
+ const o = Object.values(t), n = j(Math.min, o), s = j(Math.max, o);
1450
1452
  ["u", "d"].forEach((r) => {
1451
1453
  ["l", "r"].forEach((i) => {
1452
1454
  const l = r + i;
1453
1455
  let a = e[l];
1454
1456
  if (a === t) return;
1455
1457
  const c = Object.values(a);
1456
- let u = n - V(Math.min, c);
1457
- i !== "l" && (u = s - V(Math.max, c)), u && (a = xe(a, (d) => d + u), e[l] = a);
1458
+ let d = n - j(Math.min, c);
1459
+ i !== "l" && (d = s - j(Math.max, c)), d && (a = Ne(a, (f) => f + d), e[l] = a);
1458
1460
  });
1459
1461
  });
1460
1462
  }
1461
- function Os(e, t) {
1462
- return xe(e.ul, (o, n) => {
1463
+ function Vs(e, t) {
1464
+ return Ne(e.ul, (o, n) => {
1463
1465
  if (t)
1464
1466
  return e[t.toLowerCase()][n];
1465
1467
  const s = Object.values(e).map((r) => r[n]).sort((r, i) => r - i);
1466
1468
  return (s[1] + s[2]) / 2;
1467
1469
  });
1468
1470
  }
1469
- function Rs(e) {
1470
- const t = Ce(e), o = Object.assign(
1471
- ys(e, t),
1472
- Es(e, t)
1471
+ function Is(e) {
1472
+ const t = _e(e), o = Object.assign(
1473
+ Rs(e, t),
1474
+ Ts(e, t)
1473
1475
  ), n = {};
1474
1476
  let s;
1475
1477
  ["u", "d"].forEach((i) => {
@@ -1478,26 +1480,26 @@ function Rs(e) {
1478
1480
  l === "r" && (a = a.map(
1479
1481
  (g) => Object.values(g).reverse()
1480
1482
  ));
1481
- const c = (i === "u" ? e.predecessors : e.successors).bind(e), u = _s(
1483
+ const c = (i === "u" ? e.predecessors : e.successors).bind(e), d = Ds(
1482
1484
  e,
1483
1485
  a,
1484
1486
  o,
1485
1487
  c
1486
1488
  );
1487
- let d = Ns(
1489
+ let f = Fs(
1488
1490
  e,
1489
1491
  a,
1490
- u.root,
1491
- u.align,
1492
+ d.root,
1493
+ d.align,
1492
1494
  l === "r"
1493
1495
  );
1494
- l === "r" && (d = xe(d, (g) => -g)), n[i + l] = d;
1496
+ l === "r" && (f = Ne(f, (g) => -g)), n[i + l] = f;
1495
1497
  });
1496
1498
  });
1497
- const r = Ss(e, n);
1498
- return Ls(n, r), Os(n, e.graph().align);
1499
+ const r = zs(e, n);
1500
+ return Bs(n, r), Vs(n, e.graph().align);
1499
1501
  }
1500
- function Ts(e, t, o) {
1502
+ function Gs(e, t, o) {
1501
1503
  return (n, s, r) => {
1502
1504
  const i = n.node(s), l = n.node(r);
1503
1505
  let a = 0, c;
@@ -1522,19 +1524,19 @@ function Ts(e, t, o) {
1522
1524
  return c && (a += o ? c : -c), c = 0, a;
1523
1525
  };
1524
1526
  }
1525
- function Ms(e, t) {
1527
+ function js(e, t) {
1526
1528
  return e.node(t).width;
1527
1529
  }
1528
- function $s(e) {
1529
- const t = rt(e);
1530
- Ds(t);
1531
- const o = Rs(t);
1530
+ function Ws(e) {
1531
+ const t = at(e);
1532
+ Ys(t);
1533
+ const o = Is(t);
1532
1534
  Object.entries(o).forEach(([n, s]) => {
1533
1535
  e.node(n).x = s;
1534
1536
  });
1535
1537
  }
1536
- function Ds(e) {
1537
- const t = Ce(e), o = e.graph().ranksep;
1538
+ function Ys(e) {
1539
+ const t = _e(e), o = e.graph().ranksep;
1538
1540
  let n = 0;
1539
1541
  t.forEach((s) => {
1540
1542
  const r = s.reduce((i, l) => {
@@ -1546,17 +1548,17 @@ function Ds(e) {
1546
1548
  }), n += r + o;
1547
1549
  });
1548
1550
  }
1549
- function Ps(e, t = {}) {
1550
- const o = t.debugTiming ? so : ro;
1551
+ function Hs(e, t = {}) {
1552
+ const o = t.debugTiming ? fo : ho;
1551
1553
  return o("layout", () => {
1552
- const n = o(" buildLayoutGraph", () => Hs(e));
1553
- return o(" runLayout", () => Fs(n, o, t)), o(" updateInputGraph", () => zs(e, n)), n;
1554
+ const n = o(" buildLayoutGraph", () => or(e));
1555
+ return o(" runLayout", () => Zs(n, o, t)), o(" updateInputGraph", () => Us(e, n)), n;
1554
1556
  });
1555
1557
  }
1556
- function Fs(e, t, o) {
1557
- t(" makeSpaceForEdgeLabels", () => Zs(e)), t(" removeSelfEdges", () => or(e)), t(" acyclic", () => Ln(e)), t(" nestingGraph.run", () => Kn(e)), t(" rank", () => Yn(rt(e))), t(" injectEdgeLabelProxies", () => Us(e)), t(" removeEmptyRanks", () => to(e)), t(" nestingGraph.cleanup", () => es(e)), t(" normalizeRanks", () => eo(e)), t(" assignRankMinMax", () => Xs(e)), t(" removeEdgeLabelProxies", () => qs(e)), t(" normalize.run", () => Tn(e)), t(" parentDummyChains", () => Un(e)), t(" addBorderSegments", () => ts(e)), t(" order", () => fo(e, o)), t(" insertSelfEdges", () => nr(e)), t(" adjustCoordinateSystem", () => Wt.adjust(e)), t(" position", () => $s(e)), t(" positionSelfEdges", () => sr(e)), t(" removeBorderNodes", () => tr(e)), t(" normalize.undo", () => $n(e)), t(" fixupEdgeLabelCoords", () => Qs(e)), t(" undoCoordinateSystem", () => Wt.undo(e)), t(" translateGraph", () => Ks(e)), t(" assignNodeIntersects", () => Js(e)), t(" reversePoints", () => er(e)), t(" acyclic.undo", () => On(e));
1558
+ function Zs(e, t, o) {
1559
+ t(" makeSpaceForEdgeLabels", () => nr(e)), t(" removeSelfEdges", () => fr(e)), t(" acyclic", () => Bn(e)), t(" nestingGraph.run", () => ls(e)), t(" rank", () => ts(at(e))), t(" injectEdgeLabelProxies", () => sr(e)), t(" removeEmptyRanks", () => ao(e)), t(" nestingGraph.cleanup", () => us(e)), t(" normalizeRanks", () => lo(e)), t(" assignRankMinMax", () => rr(e)), t(" removeEdgeLabelProxies", () => ir(e)), t(" normalize.run", () => Gn(e)), t(" parentDummyChains", () => ss(e)), t(" addBorderSegments", () => ds(e)), t(" order", () => wo(e, o)), t(" insertSelfEdges", () => hr(e)), t(" adjustCoordinateSystem", () => Kt.adjust(e)), t(" position", () => Ws(e)), t(" positionSelfEdges", () => mr(e)), t(" removeBorderNodes", () => dr(e)), t(" normalize.undo", () => Wn(e)), t(" fixupEdgeLabelCoords", () => cr(e)), t(" undoCoordinateSystem", () => Kt.undo(e)), t(" translateGraph", () => lr(e)), t(" assignNodeIntersects", () => ar(e)), t(" reversePoints", () => ur(e)), t(" acyclic.undo", () => Vn(e));
1558
1560
  }
1559
- function zs(e, t) {
1561
+ function Us(e, t) {
1560
1562
  e.nodes().forEach((s) => {
1561
1563
  const r = e.node(s), i = t.node(s);
1562
1564
  r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(s).length && (r.width = i.width, r.height = i.height));
@@ -1567,94 +1569,94 @@ function zs(e, t) {
1567
1569
  const o = t.graph(), n = e.graph();
1568
1570
  n.width = o.width, n.height = o.height;
1569
1571
  }
1570
- const Bs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Vs = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, js = ["acyclicer", "ranker", "rankdir", "align"], Gs = ["width", "height", "rank"], Ut = { width: 0, height: 0 }, Is = ["minlen", "weight", "width", "height", "labeloffset"], Ws = {
1572
+ const Xs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], qs = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Ks = ["acyclicer", "ranker", "rankdir", "align"], Js = ["width", "height", "rank"], to = { width: 0, height: 0 }, Qs = ["minlen", "weight", "width", "height", "labeloffset"], er = {
1571
1573
  minlen: 1,
1572
1574
  weight: 1,
1573
1575
  width: 0,
1574
1576
  height: 0,
1575
1577
  labeloffset: 10,
1576
1578
  labelpos: "r"
1577
- }, Ys = ["labelpos"];
1578
- function Hs(e) {
1579
- const t = et(e.graph()), o = {
1580
- ...Vs,
1581
- ...Qe(t, Bs),
1582
- ...Ee(t, js)
1583
- }, n = new Z({ multigraph: !0, compound: !0 });
1579
+ }, tr = ["labelpos"];
1580
+ function or(e) {
1581
+ const t = nt(e.graph()), o = {
1582
+ ...qs,
1583
+ ...ot(t, Xs),
1584
+ ...xe(t, Ks)
1585
+ }, n = new q({ multigraph: !0, compound: !0 });
1584
1586
  return n.setGraph(o), e.nodes().forEach((s) => {
1585
- const r = et(e.node(s)), i = Qe(r, Gs);
1586
- Object.keys(Ut).forEach((l) => {
1587
- i[l] === void 0 && (i[l] = Ut[l]);
1587
+ const r = nt(e.node(s)), i = ot(r, Js);
1588
+ Object.keys(to).forEach((l) => {
1589
+ i[l] === void 0 && (i[l] = to[l]);
1588
1590
  }), n.setNode(s, i), n.setParent(s, e.parent(s));
1589
1591
  }), e.edges().forEach((s) => {
1590
- const r = et(e.edge(s));
1592
+ const r = nt(e.edge(s));
1591
1593
  n.setEdge(
1592
1594
  s,
1593
1595
  {
1594
- ...Ws,
1595
- ...Qe(r, Is),
1596
- ...Ee(r, Ys)
1596
+ ...er,
1597
+ ...ot(r, Qs),
1598
+ ...xe(r, tr)
1597
1599
  }
1598
1600
  );
1599
1601
  }), n;
1600
1602
  }
1601
- function Zs(e) {
1603
+ function nr(e) {
1602
1604
  const t = e.graph();
1603
1605
  t.ranksep /= 2, e.edges().forEach((o) => {
1604
1606
  const n = e.edge(o);
1605
1607
  n.minlen *= 2, n.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? n.width += n.labeloffset : n.height += n.labeloffset);
1606
1608
  });
1607
1609
  }
1608
- function Us(e) {
1610
+ function sr(e) {
1609
1611
  e.edges().forEach((t) => {
1610
1612
  const o = e.edge(t);
1611
1613
  if (o.width && o.height) {
1612
1614
  const n = e.node(t.v), r = { rank: (e.node(t.w).rank - n.rank) / 2 + n.rank, e: t };
1613
- ce(e, "edge-proxy", r, "_ep");
1615
+ ue(e, "edge-proxy", r, "_ep");
1614
1616
  }
1615
1617
  });
1616
1618
  }
1617
- function Xs(e) {
1619
+ function rr(e) {
1618
1620
  let t = 0;
1619
1621
  e.nodes().forEach((o) => {
1620
1622
  const n = e.node(o);
1621
1623
  n.borderTop && (n.minRank = e.node(n.borderTop).rank, n.maxRank = e.node(n.borderBottom).rank, t = Math.max(t, n.maxRank));
1622
1624
  }), e.graph().maxRank = t;
1623
1625
  }
1624
- function qs(e) {
1626
+ function ir(e) {
1625
1627
  e.nodes().forEach((t) => {
1626
1628
  const o = e.node(t);
1627
1629
  o.dummy === "edge-proxy" && (e.edge(o.e).labelRank = o.rank, e.removeNode(t));
1628
1630
  });
1629
1631
  }
1630
- function Ks(e) {
1632
+ function lr(e) {
1631
1633
  let t = Number.POSITIVE_INFINITY, o = 0, n = Number.POSITIVE_INFINITY, s = 0;
1632
1634
  const r = e.graph(), i = r.marginx || 0, l = r.marginy || 0;
1633
1635
  function a(c) {
1634
- const u = c.x, d = c.y, g = c.width, v = c.height;
1635
- t = Math.min(t, u - g / 2), o = Math.max(o, u + g / 2), n = Math.min(n, d - v / 2), s = Math.max(s, d + v / 2);
1636
+ const d = c.x, f = c.y, g = c.width, b = c.height;
1637
+ t = Math.min(t, d - g / 2), o = Math.max(o, d + g / 2), n = Math.min(n, f - b / 2), s = Math.max(s, f + b / 2);
1636
1638
  }
1637
1639
  e.nodes().forEach((c) => a(e.node(c))), e.edges().forEach((c) => {
1638
- const u = e.edge(c);
1639
- Object.hasOwn(u, "x") && a(u);
1640
+ const d = e.edge(c);
1641
+ Object.hasOwn(d, "x") && a(d);
1640
1642
  }), t -= i, n -= l, e.nodes().forEach((c) => {
1641
- const u = e.node(c);
1642
- u.x -= t, u.y -= n;
1643
+ const d = e.node(c);
1644
+ d.x -= t, d.y -= n;
1643
1645
  }), e.edges().forEach((c) => {
1644
- const u = e.edge(c);
1645
- u.points.forEach((d) => {
1646
- d.x -= t, d.y -= n;
1647
- }), Object.hasOwn(u, "x") && (u.x -= t), Object.hasOwn(u, "y") && (u.y -= n);
1646
+ const d = e.edge(c);
1647
+ d.points.forEach((f) => {
1648
+ f.x -= t, f.y -= n;
1649
+ }), Object.hasOwn(d, "x") && (d.x -= t), Object.hasOwn(d, "y") && (d.y -= n);
1648
1650
  }), r.width = o - t + i, r.height = s - n + l;
1649
1651
  }
1650
- function Js(e) {
1652
+ function ar(e) {
1651
1653
  e.edges().forEach((t) => {
1652
1654
  const o = e.edge(t), n = e.node(t.v), s = e.node(t.w);
1653
1655
  let r, i;
1654
- !o.points || !o.points.length ? (o.points = [], r = s, i = n) : (r = o.points[0], i = o.points[o.points.length - 1]), o.points.unshift(st(n, r)), o.points.push(st(s, i));
1656
+ !o.points || !o.points.length ? (o.points = [], r = s, i = n) : (r = o.points[0], i = o.points[o.points.length - 1]), o.points.unshift(lt(n, r)), o.points.push(lt(s, i));
1655
1657
  });
1656
1658
  }
1657
- function Qs(e) {
1659
+ function cr(e) {
1658
1660
  e.edges().forEach((t) => {
1659
1661
  const o = e.edge(t);
1660
1662
  if (Object.hasOwn(o, "x"))
@@ -1668,13 +1670,13 @@ function Qs(e) {
1668
1670
  }
1669
1671
  });
1670
1672
  }
1671
- function er(e) {
1673
+ function ur(e) {
1672
1674
  e.edges().forEach((t) => {
1673
1675
  const o = e.edge(t);
1674
1676
  o.reversed && o.points.reverse();
1675
1677
  });
1676
1678
  }
1677
- function tr(e) {
1679
+ function dr(e) {
1678
1680
  e.nodes().forEach((t) => {
1679
1681
  if (e.children(t).length) {
1680
1682
  const o = e.node(t), n = e.node(o.borderTop), s = e.node(o.borderBottom), r = e.node(o.borderLeft[o.borderLeft.length - 1]), i = e.node(o.borderRight[o.borderRight.length - 1]);
@@ -1684,7 +1686,7 @@ function tr(e) {
1684
1686
  e.node(t).dummy === "border" && e.removeNode(t);
1685
1687
  });
1686
1688
  }
1687
- function or(e) {
1689
+ function fr(e) {
1688
1690
  e.edges().forEach((t) => {
1689
1691
  if (t.v === t.w) {
1690
1692
  const o = e.node(t.v);
@@ -1692,13 +1694,13 @@ function or(e) {
1692
1694
  }
1693
1695
  });
1694
1696
  }
1695
- function nr(e) {
1696
- Ce(e).forEach((o) => {
1697
+ function hr(e) {
1698
+ _e(e).forEach((o) => {
1697
1699
  let n = 0;
1698
1700
  o.forEach((s, r) => {
1699
1701
  const i = e.node(s);
1700
1702
  i.order = r + n, (i.selfEdges || []).forEach((l) => {
1701
- ce(e, "selfedge", {
1703
+ ue(e, "selfedge", {
1702
1704
  width: l.label.width,
1703
1705
  height: l.label.height,
1704
1706
  rank: i.rank,
@@ -1710,7 +1712,7 @@ function nr(e) {
1710
1712
  });
1711
1713
  });
1712
1714
  }
1713
- function sr(e) {
1715
+ function mr(e) {
1714
1716
  e.nodes().forEach((t) => {
1715
1717
  const o = e.node(t);
1716
1718
  if (o.dummy === "selfedge") {
@@ -1725,17 +1727,17 @@ function sr(e) {
1725
1727
  }
1726
1728
  });
1727
1729
  }
1728
- function Qe(e, t) {
1729
- return xe(Ee(e, t), Number);
1730
+ function ot(e, t) {
1731
+ return Ne(xe(e, t), Number);
1730
1732
  }
1731
- function et(e) {
1733
+ function nt(e) {
1732
1734
  const t = {};
1733
1735
  return e && Object.entries(e).forEach(([o, n]) => {
1734
1736
  let s = o;
1735
1737
  typeof s == "string" && (s = s.toLowerCase()), t[s] = n;
1736
1738
  }), t;
1737
1739
  }
1738
- const rr = {
1740
+ const gr = {
1739
1741
  rankDirection: "TB",
1740
1742
  // "TB", "BT", "LR", "RL"
1741
1743
  nodeSeparation: 50,
@@ -1751,12 +1753,12 @@ const rr = {
1751
1753
  arrowShape: "normal",
1752
1754
  arrowSize: 10
1753
1755
  };
1754
- function ir(e) {
1756
+ function vr(e) {
1755
1757
  return e.length ? e.map(
1756
1758
  (t, o) => `${o === 0 ? "M" : "L"} ${t.x} ${t.y}`
1757
1759
  ).join(" ") : "";
1758
1760
  }
1759
- function lr(e) {
1761
+ function br(e) {
1760
1762
  if (!e.length) return "";
1761
1763
  if (e.length === 1) {
1762
1764
  const s = e[0];
@@ -1768,99 +1770,99 @@ function lr(e) {
1768
1770
  let o = `M ${t.x} ${t.y}`;
1769
1771
  for (let s = 1; s < e.length - 1; s += 1) {
1770
1772
  e[s - 1];
1771
- const r = e[s], i = e[s + 1], l = r.x, a = r.y, c = (r.x + i.x) / 2, u = (r.y + i.y) / 2;
1772
- o += ` Q ${l} ${a} ${c} ${u}`;
1773
+ const r = e[s], i = e[s + 1], l = r.x, a = r.y, c = (r.x + i.x) / 2, d = (r.y + i.y) / 2;
1774
+ o += ` Q ${l} ${a} ${c} ${d}`;
1773
1775
  }
1774
1776
  const n = e[e.length - 1];
1775
1777
  return o += ` L ${n.x} ${n.y}`, o;
1776
1778
  }
1777
- function ar(e) {
1778
- const { nodes: t, edges: o, configuration: n } = e, s = E(null), r = E(null), i = `dag-arrow-${ot()}`;
1779
- function l(a, c, u) {
1779
+ function pr(e) {
1780
+ const { nodes: t, edges: o, configuration: n } = e, s = y(null), r = y(null), i = `dag-arrow-${rt()}`;
1781
+ function l(a, c, d) {
1780
1782
  r.value = null, s.value = null;
1781
- const d = {
1782
- ...rr,
1783
- ...u
1784
- }, g = new Z({ multigraph: !0, compound: !0 });
1783
+ const f = {
1784
+ ...gr,
1785
+ ...d
1786
+ }, g = new q({ multigraph: !0, compound: !0 });
1785
1787
  g.setGraph({
1786
- rankdir: d.rankDirection,
1787
- nodesep: d.nodeSeparation,
1788
- ranksep: d.rankSeparation,
1789
- edgesep: d.edgeSeparation,
1790
- align: d.align
1791
- }), a.forEach((p) => {
1792
- g.setNode(p.id, {
1793
- label: p.label,
1794
- width: p.width ?? d.nodeWidth,
1795
- height: p.height ?? d.nodeHeight
1788
+ rankdir: f.rankDirection,
1789
+ nodesep: f.nodeSeparation,
1790
+ ranksep: f.rankSeparation,
1791
+ edgesep: f.edgeSeparation,
1792
+ align: f.align
1793
+ }), a.forEach((u) => {
1794
+ g.setNode(u.id, {
1795
+ label: u.label,
1796
+ width: u.width ?? f.nodeWidth,
1797
+ height: u.height ?? f.nodeHeight
1796
1798
  });
1797
- }), c.forEach((p) => {
1798
- g.setEdge(p.from, p.to, {
1799
- weight: p.weight ?? 1,
1800
- minlen: p.minLength ?? 1
1799
+ }), c.forEach((u) => {
1800
+ g.setEdge(u.from, u.to, {
1801
+ weight: u.weight ?? 1,
1802
+ minlen: u.minLength ?? 1
1801
1803
  });
1802
- }), Ps(g);
1803
- const v = a.map((p) => {
1804
- const z = g.node(p.id);
1804
+ }), Hs(g);
1805
+ const b = a.map((u) => {
1806
+ const I = g.node(u.id);
1805
1807
  return {
1806
- id: p.id,
1807
- label: p.label,
1808
- x: z.x,
1809
- y: z.y,
1810
- width: z.width,
1811
- height: z.height,
1812
- original: p
1808
+ id: u.id,
1809
+ label: u.label,
1810
+ x: I.x,
1811
+ y: I.y,
1812
+ width: I.width,
1813
+ height: I.height,
1814
+ original: u
1813
1815
  };
1814
- }), A = g.edges().map((p) => {
1815
- const z = g.edge(p), U = z.points || [];
1816
- if (!U.length)
1816
+ }), N = g.edges().map((u) => {
1817
+ const I = g.edge(u), H = I.points || [];
1818
+ if (!H.length)
1817
1819
  return null;
1818
- const j = d.curvedEdges ? lr(U) : ir(U), _e = d.arrowShape !== "undirected" ? `url(#${i})` : null, X = c.find((te) => te?.from === p.v && te?.to === p.w);
1820
+ const Ae = f.curvedEdges ? br(H) : vr(H), Se = f.arrowShape !== "undirected" ? `url(#${i})` : null, Le = c.find((he) => he?.from === u.v && he?.to === u.w);
1819
1821
  return {
1820
- id: `${p.v}->${p.w}->${ot()}`,
1821
- from: p.v,
1822
- to: p.w,
1823
- points: U,
1824
- pathData: j,
1825
- markerEnd: _e,
1822
+ id: `${u.v}->${u.w}->${rt()}`,
1823
+ from: u.v,
1824
+ to: u.w,
1825
+ points: H,
1826
+ pathData: Ae,
1827
+ markerEnd: Se,
1826
1828
  original: {
1827
- ...X,
1828
- ...z
1829
+ ...Le,
1830
+ ...I
1829
1831
  }
1830
1832
  };
1831
- }).filter(Boolean), N = d.padding;
1832
- if (!v.length) {
1833
+ }).filter(Boolean), _ = f.padding;
1834
+ if (!b.length) {
1833
1835
  s.value = {
1834
1836
  nodes: [],
1835
- edges: A,
1837
+ edges: N,
1836
1838
  viewBox: "0 0 0 0",
1837
- arrowShape: d.arrowShape,
1838
- arrowSize: d.arrowSize
1839
+ arrowShape: f.arrowShape,
1840
+ arrowSize: f.arrowSize
1839
1841
  };
1840
1842
  return;
1841
1843
  }
1842
- const M = v.flatMap((p) => [
1843
- p.x - p.width / 2,
1844
- p.x + p.width / 2
1845
- ]), G = v.flatMap((p) => [
1846
- p.y - p.height / 2,
1847
- p.y + p.height / 2
1848
- ]), de = Math.min(...M) - N, ee = Math.max(...M) + N, fe = Math.min(...G) - N, $ = Math.max(...G) + N;
1844
+ const M = b.flatMap((u) => [
1845
+ u.x - u.width / 2,
1846
+ u.x + u.width / 2
1847
+ ]), Y = b.flatMap((u) => [
1848
+ u.y - u.height / 2,
1849
+ u.y + u.height / 2
1850
+ ]), fe = Math.min(...M) - _, oe = Math.max(...M) + _, R = Math.min(...Y) - _, P = Math.max(...Y) + _;
1849
1851
  s.value = {
1850
- nodes: v,
1851
- edges: A.map((p) => ({
1852
- ...p,
1853
- midpoint: p.pathData ? Ko(p.pathData) : { x: 0, y: 0 }
1852
+ nodes: b,
1853
+ edges: N.map((u) => ({
1854
+ ...u,
1855
+ midpoint: u.pathData ? sn(u.pathData) : { x: 0, y: 0 }
1854
1856
  })),
1855
- viewBox: `${de} ${fe} ${ee - de} ${$ - fe}`,
1856
- arrowShape: d.arrowShape,
1857
- arrowSize: d.arrowSize
1857
+ viewBox: `${fe} ${R} ${oe - fe} ${P - R}`,
1858
+ arrowShape: f.arrowShape,
1859
+ arrowSize: f.arrowSize
1858
1860
  };
1859
1861
  }
1860
- return Yo(() => {
1862
+ return Jo(() => {
1861
1863
  try {
1862
- const a = b(t) || [], c = b(o) || [], u = b(n) || {};
1863
- l(a, c, u);
1864
+ const a = v(t) || [], c = v(o) || [], d = v(n) || {};
1865
+ l(a, c, d);
1864
1866
  } catch (a) {
1865
1867
  console.error("[useDag] layout error:", a), r.value = a, s.value = null;
1866
1868
  }
@@ -1869,45 +1871,45 @@ function ar(e) {
1869
1871
  lastError: r,
1870
1872
  arrowMarkerIdentifier: i,
1871
1873
  recomputeLayout: () => {
1872
- const a = b(t) || [], c = b(o) || [], u = b(n) || {};
1873
- l(a, c, u);
1874
+ const a = v(t) || [], c = v(o) || [], d = v(n) || {};
1875
+ l(a, c, d);
1874
1876
  }
1875
1877
  };
1876
1878
  }
1877
- const mo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", nodes: { stroke: "#6A6A6A", backgroundColor: "#2A2A2A", labels: { color: "#CCCCCC" }, tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, edges: { stroke: "#6A6A6A" }, midpoints: { stroke: "#6A6A6A", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, controls: { backgroundColor: "#2A2A2A", buttonColor: "#2A2A2A", color: "#CCCCCC", border: "1px solid #4A4A4A" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } } } } }, go = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", nodes: { stroke: "#5D4037", backgroundColor: "#fcf9f0", labels: { color: "#424242" }, tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, edges: { stroke: "#5D4037" }, midpoints: { stroke: "#5D4037", fill: "#FFF8E1", tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, controls: { backgroundColor: "#FFF8E1", buttonColor: "#FFF8E1", color: "#424242", border: "1px solid #d9bbb2" }, title: { color: "#424242", subtitle: { color: "#757575" } } } } }, bo = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", nodes: { stroke: "#965039", backgroundColor: "#2A2A2A", labels: { color: "#BDBDBD" }, tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, edges: { stroke: "#965039" }, midpoints: { stroke: "#965039", fill: "#1E1E1E", tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, controls: { backgroundColor: "#1E1E1E", buttonColor: "#1E1E1E", color: "#BDBDBD", border: "1px solid #3A3A3A" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } } } } }, vo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", nodes: { stroke: "#66CC66", backgroundColor: "#2A2A2A", labels: { color: "#99AA99" }, tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, edges: { stroke: "#66CC66" }, midpoints: { stroke: "#66CC66", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, controls: { backgroundColor: "#1A1A1A", buttonColor: "#1A1A1A", color: "#99AA99", border: "1px solid #1e361e" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } } } } }, po = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", nodes: { stroke: "#8F837A", backgroundColor: "#ffffff", labels: { color: "#8A9892" }, tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, edges: { stroke: "#8F837A" }, midpoints: { stroke: "#8F837A", fill: "#fbfafa", tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, controls: { backgroundColor: "#fbfafa", buttonColor: "#fbfafa", color: "#99AA99", border: "1px solid #ebded3" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } } } } }, wo = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { arrowShape: "normal", curvedEdges: !1 }, nodes: { stroke: "#50606C", backgroundColor: "#ffffff", borderRadius: 0, labels: { color: "#50606C" }, tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, edges: { stroke: "#50606C" }, midpoints: { stroke: "#50606C", fill: "#fbfafa", tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, controls: { backgroundColor: "#f6f6fb", buttonColor: "#f6f6fb", color: "#50606C", border: "1px solid #98aab8", borderRadius: "0" }, title: { color: "#50606C", subtitle: { color: "#718890" } } } } }, ko = {
1879
+ const ko = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", nodes: { stroke: "#6A6A6A", backgroundColor: "#2A2A2A", labels: { color: "#CCCCCC" }, tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, edges: { stroke: "#6A6A6A" }, midpoints: { stroke: "#6A6A6A", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, controls: { backgroundColor: "#2A2A2A", buttonColor: "#2A2A2A", color: "#CCCCCC", border: "1px solid #4A4A4A" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } } } } }, Eo = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", nodes: { stroke: "#5D4037", backgroundColor: "#fcf9f0", labels: { color: "#424242" }, tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, edges: { stroke: "#5D4037" }, midpoints: { stroke: "#5D4037", fill: "#FFF8E1", tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, controls: { backgroundColor: "#FFF8E1", buttonColor: "#FFF8E1", color: "#424242", border: "1px solid #d9bbb2" }, title: { color: "#424242", subtitle: { color: "#757575" } } } } }, Co = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", nodes: { stroke: "#965039", backgroundColor: "#2A2A2A", labels: { color: "#BDBDBD" }, tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, edges: { stroke: "#965039" }, midpoints: { stroke: "#965039", fill: "#1E1E1E", tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, controls: { backgroundColor: "#1E1E1E", buttonColor: "#1E1E1E", color: "#BDBDBD", border: "1px solid #3A3A3A" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } } } } }, xo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", nodes: { stroke: "#66CC66", backgroundColor: "#2A2A2A", labels: { color: "#99AA99" }, tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, edges: { stroke: "#66CC66" }, midpoints: { stroke: "#66CC66", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, controls: { backgroundColor: "#1A1A1A", buttonColor: "#1A1A1A", color: "#99AA99", border: "1px solid #1e361e" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } } } } }, _o = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", nodes: { stroke: "#8F837A", backgroundColor: "#ffffff", labels: { color: "#8A9892" }, tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, edges: { stroke: "#8F837A" }, midpoints: { stroke: "#8F837A", fill: "#fbfafa", tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, controls: { backgroundColor: "#fbfafa", buttonColor: "#fbfafa", color: "#99AA99", border: "1px solid #ebded3" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } } } } }, No = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { arrowShape: "normal", curvedEdges: !1 }, nodes: { stroke: "#50606C", backgroundColor: "#ffffff", borderRadius: 0, labels: { color: "#50606C" }, tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, edges: { stroke: "#50606C" }, midpoints: { stroke: "#50606C", fill: "#fbfafa", tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, controls: { backgroundColor: "#f6f6fb", buttonColor: "#f6f6fb", color: "#50606C", border: "1px solid #98aab8", borderRadius: "0" }, title: { color: "#50606C", subtitle: { color: "#718890" } } } } }, Ao = {
1878
1880
  default: {},
1879
- dark: mo,
1880
- celebration: go,
1881
- celebrationNight: bo,
1882
- hack: vo,
1883
- zen: po,
1884
- concrete: wo
1885
- }, qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1881
+ dark: ko,
1882
+ celebration: Eo,
1883
+ celebrationNight: Co,
1884
+ hack: xo,
1885
+ zen: _o,
1886
+ concrete: No
1887
+ }, ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1886
1888
  __proto__: null,
1887
- celebration: go,
1888
- celebrationNight: bo,
1889
- concrete: wo,
1890
- dark: mo,
1891
- default: ko,
1892
- hack: vo,
1893
- zen: po
1889
+ celebration: Eo,
1890
+ celebrationNight: Co,
1891
+ concrete: No,
1892
+ dark: ko,
1893
+ default: Ao,
1894
+ hack: xo,
1895
+ zen: _o
1894
1896
  }, Symbol.toStringTag, { value: "Module" }));
1895
- function cr(e, t) {
1896
- const o = ye(e);
1897
- return Jo(o, t);
1897
+ function wr(e, t) {
1898
+ const o = Ce(e);
1899
+ return rn(o, t);
1898
1900
  }
1899
- function Kr(e, t) {
1900
- const o = ye(e);
1901
- return Qo(o, t);
1901
+ function ci(e, t) {
1902
+ const o = Ce(e);
1903
+ return ln(o, t);
1902
1904
  }
1903
- function Jr(e, t) {
1904
- const o = ye(e);
1905
- return en(o, t);
1905
+ function ui(e, t) {
1906
+ const o = Ce(e);
1907
+ return an(o, t);
1906
1908
  }
1907
- function Qr({ defaultConfig: e, userConfig: t }) {
1908
- return Kt({ defaultConfig: e, userConfig: t });
1909
+ function di({ defaultConfig: e, userConfig: t }) {
1910
+ return so({ defaultConfig: e, userConfig: t });
1909
1911
  }
1910
- const ur = {
1912
+ const yr = {
1911
1913
  __name: "BaseZoomControls",
1912
1914
  props: {
1913
1915
  config: {
@@ -1932,57 +1934,57 @@ const ur = {
1932
1934
  emits: ["zoomIn", "zoomOut", "resetZoom", "switchDirection"],
1933
1935
  setup(e, { emit: t }) {
1934
1936
  const o = t;
1935
- return (n, s) => (k(), _("div", {
1936
- class: tt({ "vue-data-ui-zoom-controls": !0, "vue-data-ui-zoom-controls-fullscreen": e.isFullscreen }),
1937
+ return (n, s) => (k(), x("div", {
1938
+ class: st({ "vue-data-ui-zoom-controls": !0, "vue-data-ui-zoom-controls-fullscreen": e.isFullscreen }),
1937
1939
  "data-dom-to-png-ignore": "",
1938
- style: H({
1940
+ style: X({
1939
1941
  border: e.config.style.chart.controls.border,
1940
1942
  backgroundColor: e.config.style.chart.controls.backgroundColor,
1941
1943
  padding: e.config.style.chart.controls.padding,
1942
1944
  borderRadius: e.config.style.chart.controls.borderRadius,
1943
1945
  "--vue-data-ui-zoom-control-button-color": e.config.style.chart.controls.buttonColor,
1944
- "--vue-data-ui-zoom-control-button-color-hover": b(cr)(e.config.style.chart.controls.buttonColor, 0.2)
1946
+ "--vue-data-ui-zoom-control-button-color-hover": v(wr)(e.config.style.chart.controls.buttonColor, 0.2)
1945
1947
  })
1946
1948
  }, [
1947
- B("button", {
1949
+ G("button", {
1948
1950
  onClick: s[0] || (s[0] = (r) => o("zoomOut")),
1949
1951
  class: "vue-data-ui-zoom-controls-button",
1950
1952
  "data-cy-zoom-out": ""
1951
1953
  }, [
1952
- le(Ue, {
1954
+ ae(Ke, {
1953
1955
  name: "zoomMinus",
1954
1956
  stroke: e.config.style.chart.controls.color,
1955
1957
  size: e.config.style.chart.controls.fontSize * 1.2
1956
1958
  }, null, 8, ["stroke", "size"])
1957
1959
  ]),
1958
- B("button", {
1960
+ G("button", {
1959
1961
  class: "vue-data-ui-zoom-controls-button-zoom",
1960
1962
  onClick: s[1] || (s[1] = (r) => o("resetZoom")),
1961
1963
  "data-cy-zoom-reset": "",
1962
- style: H({
1964
+ style: X({
1963
1965
  color: e.config.style.chart.controls.color,
1964
1966
  width: e.config.style.chart.controls.fontSize * 4 + "px",
1965
1967
  borderRadius: e.config.style.chart.controls.borderRadius,
1966
1968
  fontSize: e.config.style.chart.controls.fontSize + "px"
1967
1969
  })
1968
- }, ie(Math.round(e.scale * 100)) + "% ", 5),
1969
- B("button", {
1970
+ }, le(Math.round(e.scale * 100)) + "% ", 5),
1971
+ G("button", {
1970
1972
  onClick: s[2] || (s[2] = (r) => o("zoomIn")),
1971
1973
  class: "vue-data-ui-zoom-controls-button",
1972
1974
  "data-cy-zoom-in": ""
1973
1975
  }, [
1974
- le(Ue, {
1976
+ ae(Ke, {
1975
1977
  name: "zoomPlus",
1976
1978
  stroke: e.config.style.chart.controls.color,
1977
1979
  size: e.config.style.chart.controls.fontSize * 1.2
1978
1980
  }, null, 8, ["stroke", "size"])
1979
1981
  ]),
1980
- e.withDirection ? (k(), _("button", {
1982
+ e.withDirection ? (k(), x("button", {
1981
1983
  key: 0,
1982
1984
  onClick: s[3] || (s[3] = (r) => o("switchDirection")),
1983
1985
  class: "vue-data-ui-zoom-controls-button"
1984
1986
  }, [
1985
- le(Ue, {
1987
+ ae(Ke, {
1986
1988
  name: "direction",
1987
1989
  stroke: e.config.style.chart.controls.color,
1988
1990
  size: e.config.style.chart.controls.fontSize * 1.2
@@ -1990,13 +1992,13 @@ const ur = {
1990
1992
  ])) : L("", !0)
1991
1993
  ], 6));
1992
1994
  }
1993
- }, Xt = /* @__PURE__ */ Jt(ur, [["__scopeId", "data-v-e4479474"]]), dr = ["id"], fr = {
1995
+ }, oo = /* @__PURE__ */ ro(yr, [["__scopeId", "data-v-e4479474"]]), kr = ["id"], Er = {
1994
1996
  key: 0,
1995
1997
  class: "dag-chart-error"
1996
- }, hr = ["viewBox", "xmlns"], mr = { key: 0 }, gr = ["id", "markerWidth", "markerHeight", "refX", "refY"], br = ["d", "fill", "stroke"], vr = ["d", "fill", "stroke"], pr = { class: "vue-ui-dag-edges" }, wr = ["d", "stroke", "stroke-width"], kr = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter"], yr = { class: "vue-ui-dag-nodes" }, Er = ["onClick", "onMouseenter"], Cr = ["x", "y", "width", "height", "rx", "fill", "stroke", "stroke-width"], xr = ["x", "y", "font-size", "fill", "font-weight"], _r = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], Nr = ["x", "y", "width", "height"], Ar = { class: "vue-ui-dag-edges" }, Sr = ["d", "stroke-width", "marker-end"], Lr = {
1998
+ }, Cr = ["viewBox", "xmlns"], xr = { key: 0 }, _r = ["id", "markerWidth", "markerHeight", "refX", "refY"], Nr = ["d", "fill", "stroke"], Ar = ["d", "fill", "stroke"], Sr = { class: "vue-ui-dag-edges" }, Lr = ["d", "stroke", "stroke-width"], Or = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter"], Rr = { class: "vue-ui-dag-nodes" }, Tr = ["onClick", "onMouseenter"], Mr = ["x", "y", "width", "height", "rx", "fill", "stroke", "stroke-width"], $r = ["x", "y", "font-size", "fill", "font-weight"], Dr = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], Fr = ["x", "y", "width", "height"], Pr = { class: "vue-ui-dag-edges" }, zr = ["d", "stroke-width", "marker-end"], Br = {
1997
1999
  key: 6,
1998
2000
  class: "vue-data-ui-watermark"
1999
- }, Or = ["data-position"], Rr = { key: 0 }, Tr = ["data-position"], Mr = { key: 0 }, qt = 1.5, $r = {
2001
+ }, Vr = ["data-position"], Ir = { key: 0 }, Gr = ["data-position"], jr = { key: 0 }, no = 1.5, Wr = {
2000
2002
  __name: "vue-ui-dag",
2001
2003
  props: {
2002
2004
  dataset: {
@@ -2017,10 +2019,10 @@ const ur = {
2017
2019
  },
2018
2020
  emits: ["onNodeClick", "onMidpointEnter", "onMidpointLeave"],
2019
2021
  setup(e, { expose: t, emit: o }) {
2020
- const n = Ye(() => import("./PenAndPaper-DscVdZ1u.js")), s = Ye(() => import("./UserOptions-ChRXLqps.js")), r = Ye(() => import("./PackageVersion-B9RA2_BM.js")), { vue_ui_dag: i } = rn(), { isThemeValid: l, warnInvalidTheme: a } = dn(), c = e, u = o, d = E(null), g = E(ot()), v = E(null), A = E(null), N = E(null), M = E(0), G = E(0), de = E(!1), ee = E(!1), fe = E({ x: 0, y: 0 }), $ = E(null), p = E(null), z = E({ left: "0px", top: "0px" }), U = E("top"), j = E(!1), Pe = E({ x: 0, y: 0 }), _e = E({ x: 0, y: 0 }), X = E(null), te = E(null), Fe = E({ left: "0px", top: "0px" }), lt = E("top"), Ne = E(!1), he = E(!1), m = E(Be()), { svgRef: q } = hn({ config: m.value.style.chart.title }), { userOptionsVisible: ze, setUserOptionsVisibility: at, keepUserOptionState: ct } = fn({ config: m.value }), Ae = E(m.value.style.chart.layout.rankDirection), { loading: me, FINAL_DATASET: ut, manualLoading: dt } = ln({
2021
- ...Ho(c),
2022
- FINAL_CONFIG: m,
2023
- prepareConfig: Be,
2022
+ const n = Xe(() => import("./PenAndPaper-DscVdZ1u.js")), s = Xe(() => import("./UserOptions-ChRXLqps.js")), r = Xe(() => import("./PackageVersion-Dc4fCiDF.js")), { vue_ui_dag: i } = gn(), { isThemeValid: l, warnInvalidTheme: a } = yn(), c = e, d = o, f = y(null), g = y(rt()), b = y(null), N = y(null), _ = y(null), M = y(0), Y = y(0), fe = y(!1), oe = y(!1), R = y(null), P = y(null), u = y(je()), I = y(u.value.style.chart.width), H = y(u.value.style.chart.height), Ae = y({ x: 0, y: 0 }), z = y(null), Se = y(null), Le = y({ left: "0px", top: "0px" }), he = y("top"), K = y(!1), ut = y({ x: 0, y: 0 }), dt = y({ x: 0, y: 0 }), me = y(null), Ve = y(null), Ie = y({ left: "0px", top: "0px" }), ft = y("top"), Oe = y(!1), ge = y(!1), { svgRef: J } = En({ config: u.value.style.chart.title }), { userOptionsVisible: Ge, setUserOptionsVisibility: ht, keepUserOptionState: mt } = kn({ config: u.value }), Re = y(u.value.style.chart.layout.rankDirection), { loading: ve, FINAL_DATASET: gt, manualLoading: vt } = vn({
2023
+ ...Qo(c),
2024
+ FINAL_CONFIG: u,
2025
+ prepareConfig: je,
2024
2026
  skeletonDataset: {
2025
2027
  nodes: [
2026
2028
  { id: "A", label: "" },
@@ -2032,8 +2034,8 @@ const ur = {
2032
2034
  { from: "A", to: "C" }
2033
2035
  ]
2034
2036
  },
2035
- skeletonConfig: Kt({
2036
- defaultConfig: m.value,
2037
+ skeletonConfig: so({
2038
+ defaultConfig: u.value,
2037
2039
  userConfig: {
2038
2040
  userOptions: { show: !1 },
2039
2041
  style: {
@@ -2055,673 +2057,714 @@ const ur = {
2055
2057
  }
2056
2058
  })
2057
2059
  });
2058
- function Be() {
2059
- const h = Ze({
2060
+ function je() {
2061
+ const m = qe({
2060
2062
  userConfig: c.config,
2061
2063
  defaultConfig: i
2062
- }), w = h.theme;
2063
- if (!w) return h;
2064
- if (!l.value(h))
2065
- return a(h), h;
2066
- const f = Ze({
2067
- userConfig: ko[w] || c.config,
2068
- defaultConfig: h
2064
+ }), p = m.theme;
2065
+ if (!p) return m;
2066
+ if (!l.value(m))
2067
+ return a(m), m;
2068
+ const h = qe({
2069
+ userConfig: Ao[p] || c.config,
2070
+ defaultConfig: m
2069
2071
  });
2070
- return Ze({
2072
+ return qe({
2071
2073
  userConfig: c.config,
2072
- defaultConfig: f
2074
+ defaultConfig: h
2073
2075
  });
2074
2076
  }
2075
- const ft = W(() => !!m.value.debug);
2076
- Rt(() => {
2077
- tn(c.dataset) && (Pt({
2077
+ const bt = W(() => !!u.value.debug);
2078
+ zt(() => {
2079
+ cn(c.dataset) && (jt({
2078
2080
  componentName: "VueUiDag",
2079
2081
  type: "dataset",
2080
- debug: ft.value
2081
- }), ee.value = !1, dt.value = !0), c.dataset.nodes || (Pt({
2082
+ debug: bt.value
2083
+ }), oe.value = !1, vt.value = !0), c.dataset.nodes || (jt({
2082
2084
  componentName: "VueUiDag",
2083
2085
  type: "datasetAttributeEmpty",
2084
2086
  property: "nodes",
2085
2087
  index: 0,
2086
- debug: ft.value
2087
- }), ee.value = !1, dt.value = !0), ee.value = !0;
2088
- }), He(() => c.config, (h) => {
2089
- me.value || (m.value = Be()), ze.value = !m.value.userOptions.showOnChartHover, M.value += 1, Ae.value = m.value.style.chart.layout.rankDirection, oe.value = m.value.style.chart.zoom.active;
2088
+ debug: bt.value
2089
+ }), oe.value = !1, vt.value = !0), oe.value = !0, Ft();
2090
+ }), De(() => c.config, (m) => {
2091
+ ve.value || (u.value = je()), Ge.value = !u.value.userOptions.showOnChartHover, M.value += 1, Re.value = u.value.style.chart.layout.rankDirection, I.value = u.value.style.chart.width, H.value = u.value.style.chart.height, ne.value = u.value.style.chart.zoom.active, Ft();
2090
2092
  }, { deep: !0 });
2091
- const { isPrinting: ht, isImaging: mt, generatePdf: gt, generateImage: bt } = cn({
2093
+ const { isPrinting: pt, isImaging: wt, generatePdf: yt, generateImage: kt } = pn({
2092
2094
  elementId: `dag_${g.value}`,
2093
- fileName: m.value.style.chart.title.text || "vue-ui-dag",
2094
- options: m.value.userOptions.print
2095
- }), yo = W(() => m.value.style.chart.backgroundColor), Eo = W(() => m.value.style.chart.title), { exportSvg: Co, getSvg: xo } = un({
2096
- svg: q,
2097
- title: Eo,
2095
+ fileName: u.value.style.chart.title.text || "vue-ui-dag",
2096
+ options: u.value.userOptions.print
2097
+ }), So = W(() => u.value.style.chart.backgroundColor), Lo = W(() => u.value.style.chart.title), { exportSvg: Oo, getSvg: Ro } = wn({
2098
+ svg: J,
2099
+ title: Lo,
2098
2100
  legend: void 0,
2099
2101
  legendItems: void 0,
2100
- backgroundColor: yo
2102
+ backgroundColor: So
2101
2103
  });
2102
- async function vt({ isCb: h }) {
2103
- if (h) {
2104
- const { blob: w, url: f, text: y, dataUrl: T } = await xo();
2105
- m.value.userOptions.callbacks.svg({ blob: w, url: f, text: y, dataUrl: T });
2104
+ async function Et({ isCb: m }) {
2105
+ if (m) {
2106
+ const { blob: p, url: h, text: w, dataUrl: O } = await Ro();
2107
+ u.value.userOptions.callbacks.svg({ blob: p, url: h, text: w, dataUrl: O });
2106
2108
  } else
2107
- Co();
2109
+ Oo();
2108
2110
  }
2109
- function _o() {
2110
- de.value = !0, at(!0);
2111
+ function To() {
2112
+ fe.value = !0, ht(!0);
2111
2113
  }
2112
- function No() {
2113
- at(!1), de.value = !1;
2114
+ function Mo() {
2115
+ ht(!1), fe.value = !1;
2114
2116
  }
2115
- function pt({
2116
- tooltipRef: h,
2117
- isVisibleRef: w,
2118
- anchorRef: f,
2119
- styleRef: y,
2120
- placementRef: T,
2121
- offsetRef: ne,
2122
- margin: x = 24
2117
+ function Ct({
2118
+ tooltipRef: m,
2119
+ isVisibleRef: p,
2120
+ anchorRef: h,
2121
+ styleRef: w,
2122
+ placementRef: O,
2123
+ offsetRef: $,
2124
+ margin: C = 24
2123
2125
  }) {
2124
2126
  return function() {
2125
- const Le = h.value;
2126
- if (!Le || !w.value) return;
2127
- const O = Le.getBoundingClientRect(), J = window.innerWidth, be = window.innerHeight, ve = f.value.x, Oe = f.value.y, Re = ne?.value?.x ?? 0, Ot = ne?.value?.y ?? 0;
2128
- let D = Oe - Ot - O.height - x, I = ve - O.width / 2, pe = "top";
2129
- if (D < x) {
2130
- const se = Oe + Ot + x;
2131
- se + O.height <= be - x ? (D = se, pe = "bottom") : (D = Oe - O.height / 2, D < x && (D = x), D + O.height > be - x && (D = be - O.height - x), pe = "center");
2127
+ const ee = m.value;
2128
+ if (!ee || !p.value) return;
2129
+ const S = ee.getBoundingClientRect(), D = window.innerWidth, pe = window.innerHeight, we = h.value.x, Me = h.value.y, $e = $?.value?.x ?? 0, Pt = $?.value?.y ?? 0;
2130
+ let F = Me - Pt - S.height - C, Z = we - S.width / 2, ye = "top";
2131
+ if (F < C) {
2132
+ const re = Me + Pt + C;
2133
+ re + S.height <= pe - C ? (F = re, ye = "bottom") : (F = Me - S.height / 2, F < C && (F = C), F + S.height > pe - C && (F = pe - S.height - C), ye = "center");
2132
2134
  }
2133
- I < x && (I = x), I + O.width > J - x && (I = J - O.width - x);
2134
- const Go = I <= x, Io = I + O.width >= J - x;
2135
- if ((Go || Io) && pe !== "center") {
2136
- let se, we;
2137
- const Wo = ve - Re - x;
2138
- J - (ve + Re) - x >= Wo ? (se = "right", we = ve + Re + x) : (se = "left", we = ve - Re - x - O.width), we >= x && we + O.width <= J - x && (I = we, D = Oe - O.height / 2, D < x && (D = x), D + O.height > be - x && (D = be - O.height - x), pe = se);
2135
+ Z < C && (Z = C), Z + S.width > D - C && (Z = D - S.width - C);
2136
+ const Xo = Z <= C, qo = Z + S.width >= D - C;
2137
+ if ((Xo || qo) && ye !== "center") {
2138
+ let re, ke;
2139
+ const Ko = we - $e - C;
2140
+ D - (we + $e) - C >= Ko ? (re = "right", ke = we + $e + C) : (re = "left", ke = we - $e - C - S.width), ke >= C && ke + S.width <= D - C && (Z = ke, F = Me - S.height / 2, F < C && (F = C), F + S.height > pe - C && (F = pe - S.height - C), ye = re);
2139
2141
  }
2140
- T.value = pe, y.value = {
2141
- left: `${I}px`,
2142
- top: `${D}px`
2142
+ O.value = ye, w.value = {
2143
+ left: `${Z}px`,
2144
+ top: `${F}px`
2143
2145
  };
2144
2146
  };
2145
2147
  }
2146
- const Ao = W(() => ut.value.nodes.map((h) => ({
2147
- ...h,
2148
- backgroundColor: h.backgroundColor ? ye(h.backgroundColor) : m.value.style.chart.nodes.backgroundColor,
2149
- color: h.color ? ye(h.color) : m.value.style.chart.nodes.labels.color
2150
- }))), So = W(() => ut.value.edges), Lo = W(() => ({
2151
- ...m.value.style.chart.layout,
2152
- rankDirection: Ae.value
2153
- })), { layoutData: C, lastError: wt, arrowMarkerIdentifier: Oo } = ar({
2154
- nodes: Ao,
2155
- edges: So,
2156
- configuration: Lo
2148
+ const $o = W(() => gt.value.nodes.map((m) => ({
2149
+ ...m,
2150
+ backgroundColor: m.backgroundColor ? Ce(m.backgroundColor) : u.value.style.chart.nodes.backgroundColor,
2151
+ color: m.color ? Ce(m.color) : u.value.style.chart.nodes.labels.color
2152
+ }))), Do = W(() => gt.value.edges), Fo = W(() => ({
2153
+ ...u.value.style.chart.layout,
2154
+ rankDirection: Re.value
2155
+ })), { layoutData: E, lastError: xt, arrowMarkerIdentifier: Po } = pr({
2156
+ nodes: $o,
2157
+ edges: Do,
2158
+ configuration: Fo
2157
2159
  });
2158
- function kt(h) {
2159
- return C.value ? C.value.nodes.find((w) => w.id === h) : null;
2160
+ function _t(m) {
2161
+ return E.value ? E.value.nodes.find((p) => p.id === m) : null;
2160
2162
  }
2161
- const Ro = W(() => {
2162
- if (!C.value) return [];
2163
- const h = m.value.style.chart.edges.stroke, w = /* @__PURE__ */ new Set();
2164
- return C.value.edges.forEach((f) => {
2165
- w.add(f.original?.color || h);
2166
- }), Array.from(w);
2163
+ const zo = W(() => {
2164
+ if (!E.value) return [];
2165
+ const m = u.value.style.chart.edges.stroke, p = /* @__PURE__ */ new Set();
2166
+ return E.value.edges.forEach((h) => {
2167
+ p.add(h.original?.color || m);
2168
+ }), Array.from(p);
2167
2169
  });
2168
- function yt(h) {
2169
- return `${Oo}-${String(h).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
2170
+ function Nt(m) {
2171
+ return `${Po}-${String(m).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
2170
2172
  }
2171
- const ge = E(null), oe = E(m.value.style.chart.zoom.active), {
2172
- viewBox: Et,
2173
- resetZoom: Se,
2174
- setInitialViewBox: To,
2175
- scale: Ct,
2176
- zoomByFactor: xt
2177
- } = sn(
2178
- q,
2173
+ const At = W(() => {
2174
+ const m = I.value, p = H.value, h = Number(m), w = Number(p), O = Number.isFinite(h) && h > 0, $ = Number.isFinite(w) && w > 0;
2175
+ return !O && !$ ? null : {
2176
+ width: O ? h : null,
2177
+ height: $ ? w : null
2178
+ };
2179
+ }), be = y(null), ne = y(u.value.style.chart.zoom.active), {
2180
+ viewBox: St,
2181
+ resetZoom: Te,
2182
+ setInitialViewBox: Bo,
2183
+ scale: Lt,
2184
+ zoomByFactor: Ot
2185
+ } = mn(
2186
+ J,
2179
2187
  { x: 0, y: 0, width: 100, height: 100 },
2180
2188
  1,
2181
- oe,
2189
+ ne,
2182
2190
  () => {
2183
- j.value = !1;
2191
+ K.value = !1;
2184
2192
  }
2185
2193
  );
2186
- function Mo() {
2187
- oe.value = !oe.value;
2194
+ function Vo() {
2195
+ ne.value = !ne.value;
2188
2196
  }
2189
- He(
2190
- () => C.value && C.value.viewBox,
2191
- (h) => {
2192
- if (!h) return;
2193
- const [w, f, y, T] = h.split(" ").map(Number);
2194
- Number.isFinite(w) && Number.isFinite(f) && Number.isFinite(y) && Number.isFinite(T) && To(
2195
- { x: w, y: f, width: y, height: T },
2196
- { overwriteCurrentIfNotZoomed: !0 }
2197
- );
2197
+ function Rt() {
2198
+ const m = E.value && E.value.viewBox;
2199
+ if (!m) return;
2200
+ const p = String(m).split(" ").map(Number);
2201
+ if (p.length !== 4) return;
2202
+ const [h, w, O, $] = p;
2203
+ if (!Number.isFinite(h) || !Number.isFinite(w) || !Number.isFinite(O) || !Number.isFinite($))
2204
+ return;
2205
+ let C = O, se = $, ee = h, S = w;
2206
+ const D = At.value;
2207
+ D && (D.width !== null && (C = D.width), D.height !== null && (se = D.height), ee = h - (C - O) / 2, S = w - (se - $) / 2), Bo(
2208
+ { x: ee, y: S, width: C, height: se },
2209
+ { overwriteCurrentIfNotZoomed: !0 }
2210
+ );
2211
+ }
2212
+ De(
2213
+ () => E.value && E.value.viewBox,
2214
+ () => {
2215
+ Rt();
2198
2216
  },
2199
- {
2200
- immediate: !0
2217
+ { immediate: !0 }
2218
+ ), De(
2219
+ () => At.value,
2220
+ () => {
2221
+ Rt();
2201
2222
  }
2202
- ), He(() => he.value, (h) => {
2203
- oe.value = !h;
2223
+ ), De(() => ge.value, (m) => {
2224
+ ne.value = !m;
2204
2225
  });
2205
- const $o = W(() => {
2206
- const h = Et.value;
2207
- return h ? `${h.x} ${h.y} ${h.width} ${h.height}` : "0 0 0 0";
2208
- }), K = E(!1);
2209
- function _t(h) {
2210
- K.value = h, G.value += 1;
2226
+ const Io = W(() => {
2227
+ const m = St.value;
2228
+ return m ? `${m.x} ${m.y} ${m.width} ${m.height}` : "0 0 0 0";
2229
+ }), Q = y(!1);
2230
+ function Tt(m) {
2231
+ Q.value = m, Y.value += 1;
2211
2232
  }
2212
- function Ve() {
2213
- he.value = !he.value;
2233
+ function We() {
2234
+ ge.value = !ge.value;
2214
2235
  }
2215
- function je() {
2216
- xt(qt, !0);
2236
+ function Ye() {
2237
+ Ot(no, !0);
2217
2238
  }
2218
- function Ge() {
2219
- xt(1 / qt, !0);
2239
+ function He() {
2240
+ Ot(1 / no, !0);
2220
2241
  }
2221
- const Ie = ["TB", "RL", "BT", "LR"];
2222
- function We() {
2223
- Ae.value = Ie[(Ie.indexOf(Ae.value) + 1) % Ie.length], Se();
2242
+ const Ze = ["TB", "RL", "BT", "LR"];
2243
+ function Ue() {
2244
+ Re.value = Ze[(Ze.indexOf(Re.value) + 1) % Ze.length], Te();
2224
2245
  }
2225
- const Do = pt({
2226
- tooltipRef: p,
2227
- isVisibleRef: Ne,
2228
- anchorRef: fe,
2229
- styleRef: z,
2230
- placementRef: U
2231
- }), Po = pt({
2232
- tooltipRef: te,
2233
- isVisibleRef: j,
2234
- anchorRef: Pe,
2235
- styleRef: Fe,
2236
- placementRef: lt,
2237
- offsetRef: _e
2246
+ const Go = Ct({
2247
+ tooltipRef: Se,
2248
+ isVisibleRef: Oe,
2249
+ anchorRef: Ae,
2250
+ styleRef: Le,
2251
+ placementRef: he
2252
+ }), jo = Ct({
2253
+ tooltipRef: Ve,
2254
+ isVisibleRef: K,
2255
+ anchorRef: ut,
2256
+ styleRef: Ie,
2257
+ placementRef: ft,
2258
+ offsetRef: dt
2238
2259
  });
2239
- async function Fo(h) {
2240
- u("onMidpointEnter", h);
2241
- const w = q.value;
2242
- if (!w || !h?.midpoint) return;
2243
- const f = w.createSVGPoint();
2244
- f.x = h.midpoint.x, f.y = h.midpoint.y;
2245
- const y = w.getScreenCTM();
2246
- if (!y) return;
2247
- const T = f.matrixTransform(y);
2248
- fe.value = {
2249
- x: T.x,
2250
- y: T.y
2251
- }, $.value = h, Ne.value = !0, await Dt(), Do();
2260
+ async function Wo(m) {
2261
+ d("onMidpointEnter", m);
2262
+ const p = J.value;
2263
+ if (!p || !m?.midpoint) return;
2264
+ const h = p.createSVGPoint();
2265
+ h.x = m.midpoint.x, h.y = m.midpoint.y;
2266
+ const w = p.getScreenCTM();
2267
+ if (!w) return;
2268
+ const O = h.matrixTransform(w);
2269
+ Ae.value = {
2270
+ x: O.x,
2271
+ y: O.y
2272
+ }, z.value = m, Oe.value = !0, await Gt(), Go();
2252
2273
  }
2253
- function zo() {
2254
- Ne.value = !1, $.value = null, u("onMidpointLeave");
2274
+ function Yo() {
2275
+ Oe.value = !1, z.value = null, d("onMidpointLeave");
2255
2276
  }
2256
- async function Bo(h) {
2257
- if (u("onNodeClick", h), !m.value.style.chart.nodes.tooltip.showOnClick) return;
2258
- const w = q.value;
2277
+ async function Ho(m) {
2278
+ if (d("onNodeClick", m), !u.value.style.chart.nodes.tooltip.showOnClick) return;
2279
+ const p = J.value;
2280
+ if (!p) return;
2281
+ const h = p.createSVGPoint();
2282
+ h.x = m.x, h.y = m.y;
2283
+ const w = p.getScreenCTM();
2259
2284
  if (!w) return;
2260
- const f = w.createSVGPoint();
2261
- f.x = h.x, f.y = h.y;
2262
- const y = w.getScreenCTM();
2263
- if (!y) return;
2264
- const T = f.matrixTransform(y), ne = m.value.style.chart.layout.nodeWidth, x = m.value.style.chart.layout.nodeHeight, Lt = y.a, Le = y.d, O = ne * Lt, J = x * Le;
2265
- _e.value = {
2266
- x: O / 2,
2267
- y: J / 2
2268
- }, Pe.value = {
2269
- x: T.x,
2270
- y: T.y
2271
- }, X.value = h, j.value = !0, await Dt(), Po();
2285
+ const O = h.matrixTransform(w), $ = u.value.style.chart.layout.nodeWidth, C = u.value.style.chart.layout.nodeHeight, se = w.a, ee = w.d, S = $ * se, D = C * ee;
2286
+ dt.value = {
2287
+ x: S / 2,
2288
+ y: D / 2
2289
+ }, ut.value = {
2290
+ x: O.x,
2291
+ y: O.y
2292
+ }, me.value = m, K.value = !0, await Gt(), jo();
2272
2293
  }
2273
- function Nt() {
2274
- j.value = !1, X.value = null;
2294
+ function Mt() {
2295
+ K.value = !1, me.value = null;
2275
2296
  }
2276
- function At(h) {
2277
- if (!j.value) return;
2278
- const w = te.value;
2279
- if (w && w.contains(h.target))
2297
+ function $t(m) {
2298
+ if (!K.value) return;
2299
+ const p = Ve.value;
2300
+ if (p && p.contains(m.target))
2280
2301
  return;
2281
- const f = q.value;
2282
- f && f.contains(h.target) && h.target.closest(".vue-ui-dag-node") || Nt();
2302
+ const h = J.value;
2303
+ h && h.contains(m.target) && m.target.closest(".vue-ui-dag-node") || Mt();
2283
2304
  }
2284
- function St(h) {
2285
- h.key === "Escape" && j.value && Nt();
2305
+ function Dt(m) {
2306
+ m.key === "Escape" && K.value && Mt();
2286
2307
  }
2287
- Rt(() => {
2288
- document.addEventListener("mousedown", At), document.addEventListener("keydown", St);
2289
- }), Zo(() => {
2290
- document.removeEventListener("mousedown", At), document.removeEventListener("keydown", St);
2308
+ zt(() => {
2309
+ document.addEventListener("mousedown", $t), document.addEventListener("keydown", Dt);
2310
+ }), en(() => {
2311
+ document.removeEventListener("mousedown", $t), document.removeEventListener("keydown", Dt), R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect());
2291
2312
  });
2292
- async function Vo({ scale: h = 2 } = {}) {
2293
- if (!d.value) return;
2294
- const { width: w, height: f } = d.value.getBoundingClientRect(), y = w / f, { imageUri: T, base64: ne } = await img({ domElement: d.value, base64: !0, img: !0, scale: h });
2313
+ function Ft() {
2314
+ if (!u.value.responsive) {
2315
+ R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect(), R.value = null, P.value = null);
2316
+ return;
2317
+ }
2318
+ const m = fn(() => {
2319
+ if (!f.value) return;
2320
+ const { width: p, height: h } = hn({
2321
+ chart: f.value,
2322
+ title: u.value.style.chart.title.text ? b.value : null,
2323
+ legend: u.value.style.chart.controls.show ? _.value.$el : null,
2324
+ source: N.value
2325
+ });
2326
+ requestAnimationFrame(() => {
2327
+ I.value = Math.max(0.1, p), H.value = Math.max(0.1, h - 12);
2328
+ });
2329
+ });
2330
+ R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect()), R.value = new ResizeObserver(m), P.value = f.value ? f.value.parentNode : null, P.value && R.value.observe(P.value), m();
2331
+ }
2332
+ async function Zo({ scale: m = 2 } = {}) {
2333
+ if (!f.value) return;
2334
+ const { width: p, height: h } = f.value.getBoundingClientRect(), w = p / h, { imageUri: O, base64: $ } = await xn({ domElement: f.value, base64: !0, img: !0, scale: m });
2295
2335
  return {
2296
- imageUri: T,
2297
- base64: ne,
2298
- title: m.value.style.chart.title.text ?? "vue-ui-dag",
2299
- width: w,
2300
- height: f,
2301
- aspectRatio: y
2336
+ imageUri: O,
2337
+ base64: $,
2338
+ title: u.value.style.chart.title.text ?? "vue-ui-dag",
2339
+ width: p,
2340
+ height: h,
2341
+ aspectRatio: w
2302
2342
  };
2303
2343
  }
2304
- function jo() {
2305
- return C.value;
2344
+ function Uo() {
2345
+ return E.value;
2306
2346
  }
2307
2347
  return t({
2308
- getData: jo,
2309
- getImage: Vo,
2310
- generatePdf: gt,
2311
- generateSvg: vt,
2312
- generateImage: bt,
2313
- toggleAnnotator: Ve,
2314
- toggleFullscreen: _t,
2315
- zoomIn: je,
2316
- zoomOut: Ge,
2317
- resetZoom: Se,
2318
- switchDirection: We
2319
- }), (h, w) => (k(), _("div", {
2320
- class: tt(`vue-data-ui-component vue-ui-dag ${K.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
2348
+ getData: Uo,
2349
+ getImage: Zo,
2350
+ generatePdf: yt,
2351
+ generateSvg: Et,
2352
+ generateImage: kt,
2353
+ toggleAnnotator: We,
2354
+ toggleFullscreen: Tt,
2355
+ zoomIn: Ye,
2356
+ zoomOut: He,
2357
+ resetZoom: Te,
2358
+ switchDirection: Ue
2359
+ }), (m, p) => (k(), x("div", {
2360
+ class: st(`vue-data-ui-component vue-ui-dag ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${u.value.responsive ? "vue-ui-dag-responsive" : ""}`),
2321
2361
  id: `dag_${g.value}`,
2322
2362
  ref_key: "dagChart",
2323
- ref: d,
2324
- style: H({
2325
- fontFamily: m.value.style.fontFamily,
2326
- backgroundColor: m.value.style.chart.backgroundColor,
2363
+ ref: f,
2364
+ style: X({
2365
+ fontFamily: u.value.style.fontFamily,
2366
+ backgroundColor: u.value.style.chart.backgroundColor,
2327
2367
  padding: "0.5rem"
2328
2368
  }),
2329
- onMouseenter: _o,
2330
- onMouseleave: No
2369
+ onMouseenter: To,
2370
+ onMouseleave: Mo
2331
2371
  }, [
2332
- b(wt) ? (k(), _("div", fr, ie(String(b(wt))), 1)) : L("", !0),
2333
- m.value.userOptions.buttons.annotator ? (k(), Y(b(n), {
2372
+ v(xt) ? (k(), x("div", Er, le(String(v(xt))), 1)) : L("", !0),
2373
+ u.value.userOptions.buttons.annotator ? (k(), U(v(n), {
2334
2374
  key: 1,
2335
- svgRef: b(q),
2336
- backgroundColor: m.value.style.chart.backgroundColor,
2337
- color: m.value.style.chart.color,
2338
- active: he.value,
2339
- onClose: Ve
2375
+ svgRef: v(J),
2376
+ backgroundColor: u.value.style.chart.backgroundColor,
2377
+ color: u.value.style.chart.color,
2378
+ active: ge.value,
2379
+ onClose: We
2340
2380
  }, {
2341
- "annotator-action-close": R(() => [
2342
- S(h.$slots, "annotator-action-close", {}, void 0, !0)
2381
+ "annotator-action-close": T(() => [
2382
+ A(m.$slots, "annotator-action-close", {}, void 0, !0)
2343
2383
  ]),
2344
- "annotator-action-color": R(({ color: f }) => [
2345
- S(h.$slots, "annotator-action-color", P(F({ color: f })), void 0, !0)
2384
+ "annotator-action-color": T(({ color: h }) => [
2385
+ A(m.$slots, "annotator-action-color", B(V({ color: h })), void 0, !0)
2346
2386
  ]),
2347
- "annotator-action-draw": R(({ mode: f }) => [
2348
- S(h.$slots, "annotator-action-draw", P(F({ mode: f })), void 0, !0)
2387
+ "annotator-action-draw": T(({ mode: h }) => [
2388
+ A(m.$slots, "annotator-action-draw", B(V({ mode: h })), void 0, !0)
2349
2389
  ]),
2350
- "annotator-action-undo": R(({ disabled: f }) => [
2351
- S(h.$slots, "annotator-action-undo", P(F({ disabled: f })), void 0, !0)
2390
+ "annotator-action-undo": T(({ disabled: h }) => [
2391
+ A(m.$slots, "annotator-action-undo", B(V({ disabled: h })), void 0, !0)
2352
2392
  ]),
2353
- "annotator-action-redo": R(({ disabled: f }) => [
2354
- S(h.$slots, "annotator-action-redo", P(F({ disabled: f })), void 0, !0)
2393
+ "annotator-action-redo": T(({ disabled: h }) => [
2394
+ A(m.$slots, "annotator-action-redo", B(V({ disabled: h })), void 0, !0)
2355
2395
  ]),
2356
- "annotator-action-delete": R(({ disabled: f }) => [
2357
- S(h.$slots, "annotator-action-delete", P(F({ disabled: f })), void 0, !0)
2396
+ "annotator-action-delete": T(({ disabled: h }) => [
2397
+ A(m.$slots, "annotator-action-delete", B(V({ disabled: h })), void 0, !0)
2358
2398
  ]),
2359
2399
  _: 3
2360
2400
  }, 8, ["svgRef", "backgroundColor", "color", "active"])) : L("", !0),
2361
- m.value.userOptions.show && ee.value && (b(ct) || b(ze)) ? (k(), Y(b(s), {
2362
- ref_key: "userOptionsRef",
2363
- ref: N,
2364
- key: `user_option_${G.value}`,
2365
- backgroundColor: m.value.style.chart.backgroundColor,
2366
- color: m.value.style.chart.color,
2367
- isPrinting: b(ht),
2368
- isImaging: b(mt),
2401
+ u.value.userOptions.show && oe.value && (v(mt) || v(Ge)) ? (k(), U(v(s), {
2402
+ ref: "userOptionsRef",
2403
+ key: `user_option_${Y.value}`,
2404
+ backgroundColor: u.value.style.chart.backgroundColor,
2405
+ color: u.value.style.chart.color,
2406
+ isPrinting: v(pt),
2407
+ isImaging: v(wt),
2369
2408
  uid: g.value,
2370
2409
  hasTooltip: !1,
2371
2410
  hasTable: !1,
2372
2411
  hasXls: !1,
2373
2412
  hasLabel: !1,
2374
- hasPdf: m.value.userOptions.buttons.pdf,
2375
- hasImg: m.value.userOptions.buttons.img,
2376
- hasSvg: m.value.userOptions.buttons.svg,
2377
- hasFullscreen: m.value.userOptions.buttons.fullscreen,
2378
- isFullscreen: K.value,
2379
- chartElement: d.value,
2380
- position: m.value.userOptions.position,
2381
- titles: { ...m.value.userOptions.buttonTitles },
2382
- hasAnnotator: m.value.userOptions.buttons.annotator,
2383
- isAnnotation: he.value,
2384
- callbacks: m.value.userOptions.callbacks,
2385
- printScale: m.value.userOptions.print.scale,
2386
- hasZoom: m.value.userOptions.buttons.zoom,
2387
- isZoom: oe.value,
2388
- onToggleFullscreen: _t,
2389
- onGeneratePdf: b(gt),
2390
- onGenerateImage: b(bt),
2391
- onGenerateSvg: vt,
2392
- onToggleAnnotator: Ve,
2393
- onToggleZoom: Mo,
2394
- style: H({
2395
- visibility: b(ct) ? b(ze) ? "visible" : "hidden" : "visible"
2413
+ hasPdf: u.value.userOptions.buttons.pdf,
2414
+ hasImg: u.value.userOptions.buttons.img,
2415
+ hasSvg: u.value.userOptions.buttons.svg,
2416
+ hasFullscreen: u.value.userOptions.buttons.fullscreen,
2417
+ isFullscreen: Q.value,
2418
+ chartElement: f.value,
2419
+ position: u.value.userOptions.position,
2420
+ titles: { ...u.value.userOptions.buttonTitles },
2421
+ hasAnnotator: u.value.userOptions.buttons.annotator,
2422
+ isAnnotation: ge.value,
2423
+ callbacks: u.value.userOptions.callbacks,
2424
+ printScale: u.value.userOptions.print.scale,
2425
+ hasZoom: u.value.userOptions.buttons.zoom,
2426
+ isZoom: ne.value,
2427
+ onToggleFullscreen: Tt,
2428
+ onGeneratePdf: v(yt),
2429
+ onGenerateImage: v(kt),
2430
+ onGenerateSvg: Et,
2431
+ onToggleAnnotator: We,
2432
+ onToggleZoom: Vo,
2433
+ style: X({
2434
+ visibility: v(mt) ? v(Ge) ? "visible" : "hidden" : "visible"
2396
2435
  })
2397
- }, Uo({ _: 2 }, [
2398
- h.$slots.menuIcon ? {
2436
+ }, tn({ _: 2 }, [
2437
+ m.$slots.menuIcon ? {
2399
2438
  name: "menuIcon",
2400
- fn: R(({ isOpen: f, color: y }) => [
2401
- S(h.$slots, "menuIcon", P(F({ isOpen: f, color: y })), void 0, !0)
2439
+ fn: T(({ isOpen: h, color: w }) => [
2440
+ A(m.$slots, "menuIcon", B(V({ isOpen: h, color: w })), void 0, !0)
2402
2441
  ]),
2403
2442
  key: "0"
2404
2443
  } : void 0,
2405
- h.$slots.optionPdf ? {
2444
+ m.$slots.optionPdf ? {
2406
2445
  name: "optionPdf",
2407
- fn: R(() => [
2408
- S(h.$slots, "optionPdf", {}, void 0, !0)
2446
+ fn: T(() => [
2447
+ A(m.$slots, "optionPdf", {}, void 0, !0)
2409
2448
  ]),
2410
2449
  key: "1"
2411
2450
  } : void 0,
2412
- h.$slots.optionImg ? {
2451
+ m.$slots.optionImg ? {
2413
2452
  name: "optionImg",
2414
- fn: R(() => [
2415
- S(h.$slots, "optionImg", {}, void 0, !0)
2453
+ fn: T(() => [
2454
+ A(m.$slots, "optionImg", {}, void 0, !0)
2416
2455
  ]),
2417
2456
  key: "2"
2418
2457
  } : void 0,
2419
- h.$slots.optionSvg ? {
2458
+ m.$slots.optionSvg ? {
2420
2459
  name: "optionSvg",
2421
- fn: R(() => [
2422
- S(h.$slots, "optionSvg", {}, void 0, !0)
2460
+ fn: T(() => [
2461
+ A(m.$slots, "optionSvg", {}, void 0, !0)
2423
2462
  ]),
2424
2463
  key: "3"
2425
2464
  } : void 0,
2426
- h.$slots.optionFullscreen ? {
2465
+ m.$slots.optionFullscreen ? {
2427
2466
  name: "optionFullscreen",
2428
- fn: R(({ toggleFullscreen: f, isFullscreen: y }) => [
2429
- S(h.$slots, "optionFullscreen", P(F({ toggleFullscreen: f, isFullscreen: y })), void 0, !0)
2467
+ fn: T(({ toggleFullscreen: h, isFullscreen: w }) => [
2468
+ A(m.$slots, "optionFullscreen", B(V({ toggleFullscreen: h, isFullscreen: w })), void 0, !0)
2430
2469
  ]),
2431
2470
  key: "4"
2432
2471
  } : void 0,
2433
- h.$slots.optionAnnotator ? {
2472
+ m.$slots.optionAnnotator ? {
2434
2473
  name: "optionAnnotator",
2435
- fn: R(({ toggleAnnotator: f, isAnnotator: y }) => [
2436
- S(h.$slots, "optionAnnotator", P(F({ toggleAnnotator: f, isAnnotator: y })), void 0, !0)
2474
+ fn: T(({ toggleAnnotator: h, isAnnotator: w }) => [
2475
+ A(m.$slots, "optionAnnotator", B(V({ toggleAnnotator: h, isAnnotator: w })), void 0, !0)
2437
2476
  ]),
2438
2477
  key: "5"
2439
2478
  } : void 0,
2440
- h.$slots.optionZoom ? {
2479
+ m.$slots.optionZoom ? {
2441
2480
  name: "optionZoom",
2442
- fn: R(({ toggleZoom: f, isZoomLocked: y }) => [
2443
- S(h.$slots, "optionZoom", P(F({ toggleZoom: f, isZoomLocked: y })), void 0, !0)
2481
+ fn: T(({ toggleZoom: h, isZoomLocked: w }) => [
2482
+ A(m.$slots, "optionZoom", B(V({ toggleZoom: h, isZoomLocked: w })), void 0, !0)
2444
2483
  ]),
2445
2484
  key: "6"
2446
2485
  } : void 0
2447
2486
  ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) : L("", !0),
2448
- m.value.style.chart.title.text ? (k(), _("div", {
2487
+ u.value.style.chart.title.text ? (k(), x("div", {
2449
2488
  key: 3,
2450
2489
  ref_key: "chartTitle",
2451
- ref: v,
2490
+ ref: b,
2452
2491
  style: "width:100%;background:transparent;"
2453
2492
  }, [
2454
- (k(), Y(mn, {
2493
+ (k(), U(Cn, {
2455
2494
  key: `title_${M.value}`,
2456
2495
  config: {
2457
2496
  title: {
2458
2497
  cy: "dag-title",
2459
- ...m.value.style.chart.title
2498
+ ...u.value.style.chart.title
2460
2499
  },
2461
2500
  subtitle: {
2462
2501
  cy: "dag-subtitle",
2463
- ...m.value.style.chart.title.subtitle
2502
+ ...u.value.style.chart.title.subtitle
2464
2503
  }
2465
2504
  }
2466
2505
  }, null, 8, ["config"]))
2467
2506
  ], 512)) : L("", !0),
2468
- m.value.style.chart.controls.position === "top" && !b(me) && m.value.style.chart.controls.show ? (k(), Y(Xt, {
2507
+ u.value.style.chart.controls.position === "top" && !v(ve) && u.value.style.chart.controls.show ? (k(), U(oo, {
2469
2508
  key: 4,
2470
- config: m.value,
2471
- scale: b(Ct),
2472
- isFullscreen: K.value,
2509
+ ref_key: "zoomControls",
2510
+ ref: _,
2511
+ config: u.value,
2512
+ scale: v(Lt),
2513
+ isFullscreen: Q.value,
2473
2514
  withDirection: "",
2474
- onZoomIn: je,
2475
- onZoomOut: Ge,
2476
- onResetZoom: w[0] || (w[0] = () => b(Se)(!0)),
2477
- onSwitchDirection: We
2515
+ onZoomIn: Ye,
2516
+ onZoomOut: He,
2517
+ onResetZoom: p[0] || (p[0] = () => v(Te)(!0)),
2518
+ onSwitchDirection: Ue
2478
2519
  }, null, 8, ["config", "scale", "isFullscreen"])) : L("", !0),
2479
- b(C) ? (k(), _("svg", {
2520
+ v(E) ? (k(), x("svg", {
2480
2521
  key: 5,
2481
2522
  ref_key: "svgRef",
2482
- ref: q,
2483
- class: tt({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": b(me) }),
2484
- viewBox: $o.value,
2485
- xmlns: b(on),
2486
- style: H({
2487
- backgroundColor: m.value.style.chart.backgroundColor,
2523
+ ref: J,
2524
+ class: st({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": v(ve) }),
2525
+ viewBox: Io.value,
2526
+ xmlns: v(un),
2527
+ style: X({
2528
+ backgroundColor: u.value.style.chart.backgroundColor,
2488
2529
  height: "100%",
2489
2530
  width: "100%"
2490
2531
  })
2491
2532
  }, [
2492
- le(b(r)),
2493
- b(C).arrowShape !== "undirected" ? (k(), _("defs", mr, [
2494
- (k(!0), _(re, null, Te(Ro.value, (f) => (k(), _("marker", {
2495
- key: f,
2496
- id: yt(f),
2497
- markerWidth: b(C).arrowSize,
2498
- markerHeight: b(C).arrowSize,
2499
- refX: b(C).arrowSize - 1,
2500
- refY: b(C).arrowSize / 2,
2533
+ ae(v(r)),
2534
+ v(E).arrowShape !== "undirected" ? (k(), x("defs", xr, [
2535
+ (k(!0), x(ie, null, Fe(zo.value, (h) => (k(), x("marker", {
2536
+ key: h,
2537
+ id: Nt(h),
2538
+ markerWidth: v(E).arrowSize,
2539
+ markerHeight: v(E).arrowSize,
2540
+ refX: v(E).arrowSize - 1,
2541
+ refY: v(E).arrowSize / 2,
2501
2542
  orient: "auto",
2502
2543
  markerUnits: "strokeWidth"
2503
2544
  }, [
2504
- b(C).arrowShape === "normal" ? (k(), _("path", {
2545
+ v(E).arrowShape === "normal" ? (k(), x("path", {
2505
2546
  key: 0,
2506
- d: `M 0 0 L ${b(C).arrowSize} ${b(C).arrowSize / 2} L 0 ${b(C).arrowSize} Z`,
2507
- fill: f,
2508
- stroke: f,
2547
+ d: `M 0 0 L ${v(E).arrowSize} ${v(E).arrowSize / 2} L 0 ${v(E).arrowSize} Z`,
2548
+ fill: h,
2549
+ stroke: h,
2509
2550
  "stroke-width": "0"
2510
- }, null, 8, br)) : (k(), _("path", {
2551
+ }, null, 8, Nr)) : (k(), x("path", {
2511
2552
  key: 1,
2512
- d: `M 0 0 L ${b(C).arrowSize} ${b(C).arrowSize / 2} L 0 ${b(C).arrowSize} L ${b(C).arrowSize / 3} ${b(C).arrowSize / 2} Z`,
2513
- fill: f,
2514
- stroke: f,
2553
+ d: `M 0 0 L ${v(E).arrowSize} ${v(E).arrowSize / 2} L 0 ${v(E).arrowSize} L ${v(E).arrowSize / 3} ${v(E).arrowSize / 2} Z`,
2554
+ fill: h,
2555
+ stroke: h,
2515
2556
  "stroke-width": "0"
2516
- }, null, 8, vr))
2517
- ], 8, gr))), 128))
2557
+ }, null, 8, Ar))
2558
+ ], 8, _r))), 128))
2518
2559
  ])) : L("", !0),
2519
- B("g", pr, [
2520
- (k(!0), _(re, null, Te(b(C).edges, (f) => (k(), _(re, {
2521
- key: f.id
2560
+ G("g", Sr, [
2561
+ (k(!0), x(ie, null, Fe(v(E).edges, (h) => (k(), x(ie, {
2562
+ key: h.id
2522
2563
  }, [
2523
- B("path", {
2564
+ G("path", {
2524
2565
  "data-cy-edge": "",
2525
- d: f.pathData,
2566
+ d: h.pathData,
2526
2567
  fill: "none",
2527
- stroke: f.original.color ?? m.value.style.chart.edges.stroke,
2528
- "stroke-width": m.value.style.chart.edges.strokeWidth * (f.from === ge.value || f.id === $.value?.id ? 2 : 1),
2568
+ stroke: h.original.color ?? u.value.style.chart.edges.stroke,
2569
+ "stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === be.value || h.id === z.value?.id ? 2 : 1),
2529
2570
  "stroke-linecap": "round",
2530
2571
  "stroke-linejoin": "round",
2531
2572
  style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
2532
- }, null, 8, wr),
2533
- m.value.style.chart.midpoints.show ? (k(), _("circle", {
2573
+ }, null, 8, Lr),
2574
+ u.value.style.chart.midpoints.show ? (k(), x("circle", {
2534
2575
  key: 0,
2535
2576
  "data-cy-midpoint": "",
2536
2577
  class: "vue-ui-dag-edge-midpoint",
2537
- cx: f.midpoint.x,
2538
- cy: f.midpoint.y,
2539
- r: m.value.style.chart.midpoints.radius,
2540
- fill: m.value.style.chart.midpoints.fill,
2541
- stroke: f.original.color ?? m.value.style.chart.midpoints.stroke,
2542
- "stroke-width": m.value.style.chart.midpoints.strokeWidth * (f.from === ge.value || f.id === $.value?.id ? 2 : 1),
2578
+ cx: h.midpoint.x,
2579
+ cy: h.midpoint.y,
2580
+ r: u.value.style.chart.midpoints.radius,
2581
+ fill: u.value.style.chart.midpoints.fill,
2582
+ stroke: h.original.color ?? u.value.style.chart.midpoints.stroke,
2583
+ "stroke-width": u.value.style.chart.midpoints.strokeWidth * (h.from === be.value || h.id === z.value?.id ? 2 : 1),
2543
2584
  style: { transition: "stroke-width 0.2s ease-in-out" },
2544
- onMouseenter: (y) => Fo(f),
2545
- onMouseleave: zo
2546
- }, null, 40, kr)) : L("", !0)
2585
+ onMouseenter: (w) => Wo(h),
2586
+ onMouseleave: Yo
2587
+ }, null, 40, Or)) : L("", !0)
2547
2588
  ], 64))), 128))
2548
2589
  ]),
2549
- B("g", yr, [
2550
- (k(!0), _(re, null, Te(b(C).nodes, (f) => (k(), _("g", {
2551
- key: f.id,
2590
+ G("g", Rr, [
2591
+ (k(!0), x(ie, null, Fe(v(E).nodes, (h) => (k(), x("g", {
2592
+ key: h.id,
2552
2593
  class: "vue-ui-dag-node",
2553
- onClick: Xo((y) => m.value.style.chart.nodes.tooltip.showOnClick && Bo(f), ["stop"]),
2554
- onMouseenter: (y) => ge.value = f.id,
2555
- onMouseleave: w[1] || (w[1] = (y) => ge.value = null)
2594
+ onClick: on((w) => u.value.style.chart.nodes.tooltip.showOnClick && Ho(h), ["stop"]),
2595
+ onMouseenter: (w) => be.value = h.id,
2596
+ onMouseleave: p[1] || (p[1] = (w) => be.value = null)
2556
2597
  }, [
2557
- h.$slots.node ? L("", !0) : (k(), _(re, { key: 0 }, [
2558
- B("rect", {
2598
+ m.$slots.node ? L("", !0) : (k(), x(ie, { key: 0 }, [
2599
+ G("rect", {
2559
2600
  "data-cy-node": "",
2560
- x: f.x - f.width / 2,
2561
- y: f.y - f.height / 2,
2562
- width: f.width,
2563
- height: f.height,
2564
- rx: m.value.style.chart.nodes.borderRadius,
2565
- fill: f.original.backgroundColor,
2566
- stroke: m.value.style.chart.nodes.stroke,
2567
- "stroke-width": m.value.style.chart.nodes.strokeWidth,
2568
- style: H({
2569
- cursor: m.value.style.chart.nodes.tooltip.showOnClick ? "pointer" : "default"
2601
+ x: h.x - h.width / 2,
2602
+ y: h.y - h.height / 2,
2603
+ width: h.width,
2604
+ height: h.height,
2605
+ rx: u.value.style.chart.nodes.borderRadius,
2606
+ fill: h.original.backgroundColor,
2607
+ stroke: u.value.style.chart.nodes.stroke,
2608
+ "stroke-width": u.value.style.chart.nodes.strokeWidth,
2609
+ style: X({
2610
+ cursor: u.value.style.chart.nodes.tooltip.showOnClick ? "pointer" : "default"
2570
2611
  })
2571
- }, null, 12, Cr),
2572
- h.$slots["node-label"] ? (k(), _("text", {
2612
+ }, null, 12, Mr),
2613
+ m.$slots["node-label"] ? (k(), x("text", {
2573
2614
  key: 0,
2574
- x: f.x,
2575
- y: f.y + m.value.style.chart.nodes.labels.fontSize / 3,
2615
+ x: h.x,
2616
+ y: h.y + u.value.style.chart.nodes.labels.fontSize / 3,
2576
2617
  "text-anchor": "middle",
2577
- "font-size": m.value.style.chart.nodes.labels.fontSize,
2578
- fill: f.original.color,
2579
- "font-weight": m.value.style.chart.nodes.labels.bold ? "bold" : "normal"
2618
+ "font-size": u.value.style.chart.nodes.labels.fontSize,
2619
+ fill: h.original.color,
2620
+ "font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal"
2580
2621
  }, [
2581
- S(h.$slots, "node-label", Tt({ ref_for: !0 }, { node: f }), () => [
2582
- qo(ie(f.label), 1)
2622
+ A(m.$slots, "node-label", Bt({ ref_for: !0 }, { node: h }), () => [
2623
+ nn(le(h.label), 1)
2583
2624
  ], !0)
2584
- ], 8, xr)) : (k(), _("text", {
2625
+ ], 8, $r)) : (k(), x("text", {
2585
2626
  key: 1,
2586
2627
  "data-cy-node-label": "",
2587
- x: f.x,
2588
- y: f.y + m.value.style.chart.nodes.labels.fontSize / 3,
2628
+ x: h.x,
2629
+ y: h.y + u.value.style.chart.nodes.labels.fontSize / 3,
2589
2630
  "text-anchor": "middle",
2590
- "font-size": m.value.style.chart.nodes.labels.fontSize,
2591
- fill: f.original.color,
2592
- "font-weight": m.value.style.chart.nodes.labels.bold ? "bold" : "normal",
2593
- innerHTML: b(nn)({
2594
- content: f.label,
2595
- fontSize: m.value.style.chart.nodes.labels.fontSize,
2596
- fontWeight: m.value.style.chart.nodes.labels.bold ? "bold" : "normal",
2597
- fill: f.original.color,
2598
- x: f.x,
2599
- y: f.y,
2631
+ "font-size": u.value.style.chart.nodes.labels.fontSize,
2632
+ fill: h.original.color,
2633
+ "font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
2634
+ innerHTML: v(dn)({
2635
+ content: h.label,
2636
+ fontSize: u.value.style.chart.nodes.labels.fontSize,
2637
+ fontWeight: u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
2638
+ fill: h.original.color,
2639
+ x: h.x,
2640
+ y: h.y,
2600
2641
  autoOffset: !0
2601
2642
  })
2602
- }, null, 8, _r))
2643
+ }, null, 8, Dr))
2603
2644
  ], 64)),
2604
- h.$slots.node ? (k(), _("foreignObject", {
2645
+ m.$slots.node ? (k(), x("foreignObject", {
2605
2646
  key: 1,
2606
- x: f.x - f.width / 2,
2607
- y: f.y - f.height / 2,
2608
- width: f.width,
2609
- height: f.height
2647
+ x: h.x - h.width / 2,
2648
+ y: h.y - h.height / 2,
2649
+ width: h.width,
2650
+ height: h.height
2610
2651
  }, [
2611
- S(h.$slots, "node", Tt({ ref_for: !0 }, { node: f }), void 0, !0)
2612
- ], 8, Nr)) : L("", !0)
2613
- ], 40, Er))), 128))
2652
+ A(m.$slots, "node", Bt({ ref_for: !0 }, { node: h }), void 0, !0)
2653
+ ], 8, Fr)) : L("", !0)
2654
+ ], 40, Tr))), 128))
2614
2655
  ]),
2615
- B("g", Ar, [
2616
- (k(!0), _(re, null, Te(b(C).edges, (f) => (k(), _("path", {
2617
- key: f.id,
2618
- d: f.pathData,
2656
+ G("g", Pr, [
2657
+ (k(!0), x(ie, null, Fe(v(E).edges, (h) => (k(), x("path", {
2658
+ key: h.id,
2659
+ d: h.pathData,
2619
2660
  fill: "none",
2620
2661
  stroke: "transparent",
2621
- "stroke-width": m.value.style.chart.edges.strokeWidth * (f.from === ge.value || f.id === $.value?.id ? 1.3 : 1),
2662
+ "stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === be.value || h.id === z.value?.id ? 1.3 : 1),
2622
2663
  "stroke-linecap": "round",
2623
2664
  "stroke-linejoin": "round",
2624
- "marker-end": b(C).arrowShape === "undirected" ? null : `url(#${yt(f.original?.color || m.value.style.chart.edges.stroke)})`,
2665
+ "marker-end": v(E).arrowShape === "undirected" ? null : `url(#${Nt(h.original?.color || u.value.style.chart.edges.stroke)})`,
2625
2666
  style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
2626
- }, null, 8, Sr))), 128))
2667
+ }, null, 8, zr))), 128))
2627
2668
  ]),
2628
- S(h.$slots, "svg", {
2669
+ A(m.$slots, "svg", {
2629
2670
  svg: {
2630
- drawingArea: b(Et),
2631
- data: b(C)
2671
+ drawingArea: v(St),
2672
+ data: v(E)
2632
2673
  }
2633
2674
  }, void 0, !0)
2634
- ], 14, hr)) : L("", !0),
2635
- h.$slots.watermark ? (k(), _("div", Lr, [
2636
- S(h.$slots, "watermark", P(F({ isPrinting: b(ht) || b(mt) })), void 0, !0)
2675
+ ], 14, Cr)) : L("", !0),
2676
+ m.$slots.watermark ? (k(), x("div", Br, [
2677
+ A(m.$slots, "watermark", B(V({ isPrinting: v(pt) || v(wt) })), void 0, !0)
2637
2678
  ])) : L("", !0),
2638
- le(Mt, { name: "fade" }, {
2639
- default: R(() => [
2640
- Ne.value ? (k(), Y($t, {
2679
+ ae(Vt, { name: "fade" }, {
2680
+ default: T(() => [
2681
+ Oe.value ? (k(), U(It, {
2641
2682
  key: 0,
2642
- to: K.value ? d.value : "body"
2683
+ to: Q.value ? f.value : "body"
2643
2684
  }, [
2644
- B("div", {
2685
+ G("div", {
2645
2686
  "data-cy-tooltip-midpoint": "",
2646
2687
  ref_key: "tooltipRef",
2647
- ref: p,
2688
+ ref: Se,
2648
2689
  class: "vue-ui-dag-tooltip",
2649
- style: H({
2650
- ...z.value,
2651
- maxWidth: m.value.style.chart.midpoints.tooltip.maxWidth,
2652
- "--vue-data-ui-dag-tooltip-background": m.value.style.chart.midpoints.tooltip.backgroundColor,
2653
- "--vue-data-ui-dag-tooltip-color": m.value.style.chart.midpoints.tooltip.color
2690
+ style: X({
2691
+ ...Le.value,
2692
+ maxWidth: u.value.style.chart.midpoints.tooltip.maxWidth,
2693
+ "--vue-data-ui-dag-tooltip-background": u.value.style.chart.midpoints.tooltip.backgroundColor,
2694
+ "--vue-data-ui-dag-tooltip-color": u.value.style.chart.midpoints.tooltip.color
2654
2695
  }),
2655
- "data-position": U.value
2696
+ "data-position": he.value
2656
2697
  }, [
2657
- S(h.$slots, "tooltip-midpoint", P(F({ edge: $.value, layoutData: b(C) })), () => [
2658
- $.value ? (k(), _("div", Rr, ie(kt($.value.from)?.label ?? $.value.from) + " → " + ie(kt($.value.to)?.label ?? $.value.to), 1)) : L("", !0)
2698
+ A(m.$slots, "tooltip-midpoint", B(V({ edge: z.value, layoutData: v(E) })), () => [
2699
+ z.value ? (k(), x("div", Ir, le(_t(z.value.from)?.label ?? z.value.from) + " → " + le(_t(z.value.to)?.label ?? z.value.to), 1)) : L("", !0)
2659
2700
  ], !0)
2660
- ], 12, Or)
2701
+ ], 12, Vr)
2661
2702
  ], 8, ["to"])) : L("", !0)
2662
2703
  ]),
2663
2704
  _: 3
2664
2705
  }),
2665
- le(Mt, { name: "fade" }, {
2666
- default: R(() => [
2667
- j.value ? (k(), Y($t, {
2706
+ ae(Vt, { name: "fade" }, {
2707
+ default: T(() => [
2708
+ K.value ? (k(), U(It, {
2668
2709
  key: 0,
2669
- to: K.value ? d.value : "body"
2710
+ to: Q.value ? f.value : "body"
2670
2711
  }, [
2671
- B("div", {
2712
+ G("div", {
2672
2713
  "data-cy-tooltip-node": "",
2673
2714
  ref_key: "nodeTooltipRef",
2674
- ref: te,
2715
+ ref: Ve,
2675
2716
  class: "vue-ui-dag-node-tooltip",
2676
- style: H({
2677
- maxWidth: m.value.style.chart.nodes.tooltip.maxWidth,
2678
- left: Fe.value.left,
2679
- top: Fe.value.top,
2680
- "--vue-data-ui-dag-node-tooltip-background": m.value.style.chart.nodes.tooltip.backgroundColor,
2681
- "--vue-data-ui-dag-node-tooltip-color": m.value.style.chart.nodes.tooltip.color
2717
+ style: X({
2718
+ maxWidth: u.value.style.chart.nodes.tooltip.maxWidth,
2719
+ left: Ie.value.left,
2720
+ top: Ie.value.top,
2721
+ "--vue-data-ui-dag-node-tooltip-background": u.value.style.chart.nodes.tooltip.backgroundColor,
2722
+ "--vue-data-ui-dag-node-tooltip-color": u.value.style.chart.nodes.tooltip.color
2682
2723
  }),
2683
- "data-position": lt.value
2724
+ "data-position": ft.value
2684
2725
  }, [
2685
- S(h.$slots, "tooltip-node", P(F({ node: X.value, layoutData: b(C) })), () => [
2686
- X.value ? (k(), _("div", Mr, ie(X.value.label), 1)) : L("", !0)
2726
+ A(m.$slots, "tooltip-node", B(V({ node: me.value, layoutData: v(E) })), () => [
2727
+ me.value ? (k(), x("div", jr, le(me.value.label), 1)) : L("", !0)
2687
2728
  ], !0)
2688
- ], 12, Tr)
2729
+ ], 12, Gr)
2689
2730
  ], 8, ["to"])) : L("", !0)
2690
2731
  ]),
2691
2732
  _: 3
2692
2733
  }),
2693
- m.value.style.chart.controls.position === "bottom" && !b(me) && m.value.style.chart.controls.show ? (k(), Y(Xt, {
2734
+ u.value.style.chart.controls.position === "bottom" && !v(ve) && u.value.style.chart.controls.show ? (k(), U(oo, {
2694
2735
  key: 7,
2695
- config: m.value,
2696
- scale: b(Ct),
2697
- isFullscreen: K.value,
2736
+ ref_key: "zoomControls",
2737
+ ref: _,
2738
+ config: u.value,
2739
+ scale: v(Lt),
2740
+ isFullscreen: Q.value,
2698
2741
  withDirection: "",
2699
- onZoomIn: je,
2700
- onZoomOut: Ge,
2701
- onResetZoom: w[2] || (w[2] = () => b(Se)(!0)),
2702
- onSwitchDirection: We
2742
+ onZoomIn: Ye,
2743
+ onZoomOut: He,
2744
+ onResetZoom: p[2] || (p[2] = () => v(Te)(!0)),
2745
+ onSwitchDirection: Ue
2703
2746
  }, null, 8, ["config", "scale", "isFullscreen"])) : L("", !0),
2704
- h.$slots.source ? (k(), _("div", {
2747
+ m.$slots.source ? (k(), x("div", {
2705
2748
  key: 8,
2706
2749
  ref_key: "source",
2707
- ref: A,
2750
+ ref: N,
2708
2751
  dir: "auto"
2709
2752
  }, [
2710
- S(h.$slots, "source", {}, void 0, !0)
2753
+ A(m.$slots, "source", {}, void 0, !0)
2711
2754
  ], 512)) : L("", !0),
2712
- b(me) ? (k(), Y(an, { key: 9 })) : L("", !0)
2713
- ], 46, dr));
2755
+ v(ve) ? (k(), U(bn, { key: 9 })) : L("", !0)
2756
+ ], 46, kr));
2714
2757
  }
2715
- }, Dr = /* @__PURE__ */ Jt($r, [["__scopeId", "data-v-1dd15065"]]), ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2758
+ }, Yr = /* @__PURE__ */ ro(Wr, [["__scopeId", "data-v-224df313"]]), fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2716
2759
  __proto__: null,
2717
- default: Dr
2760
+ default: Yr
2718
2761
  }, Symbol.toStringTag, { value: "Module" }));
2719
2762
  export {
2720
- qr as a,
2721
- ei as b,
2722
- Kr as d,
2723
- cr as l,
2724
- Qr as m,
2725
- Jr as s,
2726
- Dr as v
2763
+ ai as a,
2764
+ fi as b,
2765
+ ci as d,
2766
+ wr as l,
2767
+ di as m,
2768
+ ui as s,
2769
+ Yr as v
2727
2770
  };