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.
- package/README.md +1 -1
- package/dist/{PackageVersion-B9RA2_BM.js → PackageVersion-Dc4fCiDF.js} +1 -1
- package/dist/{Title-CgkWUXeV.js → Title-CWX8otQg.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useNestedProp-DOOBu_sL.js → useNestedProp-DH2Pjkde.js} +3 -0
- package/dist/{vue-data-ui-BgQPEjgE.js → vue-data-ui-DqfM8Vz8.js} +65 -65
- package/dist/vue-data-ui.js +67 -67
- package/dist/{vue-ui-3d-bar-BHcSmBFt.js → vue-ui-3d-bar-CVgWSxvV.js} +3 -3
- package/dist/{vue-ui-accordion-BWfQ8Imt.js → vue-ui-accordion-DiNnR-ZE.js} +1 -1
- package/dist/{vue-ui-age-pyramid-CKtsF5IW.js → vue-ui-age-pyramid-7CfFjz5B.js} +3 -3
- package/dist/{vue-ui-annotator-DQmmDTg7.js → vue-ui-annotator-D_z1JO0m.js} +2 -2
- package/dist/{vue-ui-bullet-CZKHPSsG.js → vue-ui-bullet-CkBYg2ju.js} +3 -3
- package/dist/{vue-ui-candlestick-DW7yeLnE.js → vue-ui-candlestick-CoNGZeIc.js} +3 -3
- package/dist/{vue-ui-carousel-table-Bv0TZYW1.js → vue-ui-carousel-table-DFAWxemP.js} +2 -2
- package/dist/{vue-ui-chestnut-BUqGBycr.js → vue-ui-chestnut-CWxFxnja.js} +2 -2
- package/dist/{vue-ui-chord-Awtzhq_0.js → vue-ui-chord-p2h6IONa.js} +3 -3
- package/dist/{vue-ui-circle-pack-WTa2Mj2O.js → vue-ui-circle-pack-Dei0aswf.js} +3 -3
- package/dist/{vue-ui-cursor-D6_m463R.js → vue-ui-cursor-oaIVMRWP.js} +2 -2
- package/dist/{vue-ui-dag-tle30Ehr.js → vue-ui-dag-D0ImsCHg.js} +1042 -999
- package/dist/{vue-ui-dashboard-BLgMwKmT.js → vue-ui-dashboard-DpotsaP2.js} +64 -64
- package/dist/{vue-ui-digits-DIZ8pi6C.js → vue-ui-digits-B7rN8UWS.js} +1 -1
- package/dist/{vue-ui-donut-DY8Q-PAg.js → vue-ui-donut-DsCBPM7k.js} +3 -3
- package/dist/{vue-ui-donut-evolution-DGnq03PX.js → vue-ui-donut-evolution-mSDD8tt9.js} +3 -3
- package/dist/{vue-ui-dumbbell-xRMH2Mlv.js → vue-ui-dumbbell-CU9Bqy_T.js} +3 -3
- package/dist/{vue-ui-flow-C0a8rOyT.js → vue-ui-flow-BxjQr6zQ.js} +3 -3
- package/dist/{vue-ui-funnel-D6krkF1a.js → vue-ui-funnel-Cs2_wFOA.js} +3 -3
- package/dist/{vue-ui-galaxy-BCkJt9OE.js → vue-ui-galaxy-CFbE4FoS.js} +3 -3
- package/dist/{vue-ui-gauge-BaH-VYAi.js → vue-ui-gauge-6g1fkJjW.js} +3 -3
- package/dist/{vue-ui-gizmo-BnCONs1t.js → vue-ui-gizmo-BzUlvG3U.js} +2 -2
- package/dist/{vue-ui-heatmap-BYoD6XaS.js → vue-ui-heatmap-B9Sc1Qym.js} +4 -4
- package/dist/{vue-ui-history-plot-BZBtIBsY.js → vue-ui-history-plot-CpskzQg2.js} +3 -3
- package/dist/{vue-ui-horizontal-bar-DsDDKUa6.js → vue-ui-horizontal-bar-DMByg_zj.js} +4 -4
- package/dist/{vue-ui-kpi-Dn750UNZ.js → vue-ui-kpi-B6oDMqQL.js} +2 -2
- package/dist/{vue-ui-mini-loader-44NP38K0.js → vue-ui-mini-loader-BXLMnXR4.js} +1 -1
- package/dist/{vue-ui-molecule-C994_mOK.js → vue-ui-molecule-y8AOUQvZ.js} +2 -2
- package/dist/{vue-ui-mood-radar-BI2SAtcM.js → vue-ui-mood-radar--XevYXsy.js} +3 -3
- package/dist/{vue-ui-nested-donuts-CSF_bA-I.js → vue-ui-nested-donuts-A-J72aa_.js} +3 -3
- package/dist/{vue-ui-onion-L5ULuI3B.js → vue-ui-onion-CZH1uzU_.js} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-CYetuoa5.js → vue-ui-parallel-coordinate-plot-px6mudIa.js} +3 -3
- package/dist/{vue-ui-quadrant-Diwm1-e6.js → vue-ui-quadrant-Cnh6vISS.js} +3 -3
- package/dist/{vue-ui-quick-chart-YBj4Iyk6.js → vue-ui-quick-chart-CA1Yns69.js} +2 -2
- package/dist/{vue-ui-radar-D76Mi-4u.js → vue-ui-radar-CwL0pqRH.js} +3 -3
- package/dist/{vue-ui-rating-CJjSt6-z.js → vue-ui-rating-CtkV7O_k.js} +1 -1
- package/dist/{vue-ui-relation-circle-BlYazckd.js → vue-ui-relation-circle-B-sm1VFO.js} +3 -3
- package/dist/{vue-ui-ridgeline-DW8JqGxN.js → vue-ui-ridgeline-DC2uKfbu.js} +3 -3
- package/dist/{vue-ui-rings-De3shW_r.js → vue-ui-rings-CKOzGb8B.js} +3 -3
- package/dist/{vue-ui-scatter-oDhPqRJq.js → vue-ui-scatter-C1ajpkcR.js} +3 -3
- package/dist/{vue-ui-skeleton-BUIXG_mY.js → vue-ui-skeleton-D6MjtTX_.js} +2 -2
- package/dist/{vue-ui-smiley-Cni8Q56U.js → vue-ui-smiley-C-mXyFxi.js} +1 -1
- package/dist/{vue-ui-spark-trend-D1Zt5np6.js → vue-ui-spark-trend-BsVhD00l.js} +2 -2
- package/dist/{vue-ui-sparkbar-CdmXCSnj.js → vue-ui-sparkbar-Drazbrah.js} +2 -2
- package/dist/{vue-ui-sparkgauge-Dn2PQhZj.js → vue-ui-sparkgauge-CRbo19gz.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-nrkglHJk.js → vue-ui-sparkhistogram-C41IySqq.js} +2 -2
- package/dist/{vue-ui-sparkline-tz8fAf2C.js → vue-ui-sparkline-DhMJlZAj.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-BQPSsF5Q.js → vue-ui-sparkstackbar-DfyfDxF-.js} +2 -2
- package/dist/{vue-ui-stackbar-DMO3YIQp.js → vue-ui-stackbar-DnDjTmzg.js} +3 -3
- package/dist/{vue-ui-stackline-BQo4KoIK.js → vue-ui-stackline-DYVq55D8.js} +3 -3
- package/dist/{vue-ui-strip-plot-CJpmLgCV.js → vue-ui-strip-plot-DDEm7mMm.js} +3 -3
- package/dist/{vue-ui-table-Cp4ee_1a.js → vue-ui-table-RCYr7_oK.js} +3 -3
- package/dist/{vue-ui-table-heatmap-1qpMxFyu.js → vue-ui-table-heatmap-DODhMbZE.js} +1 -1
- package/dist/{vue-ui-table-sparkline-wSJjRJc4.js → vue-ui-table-sparkline-cheUhGm3.js} +2 -2
- package/dist/{vue-ui-thermometer-DA8pG0Tr.js → vue-ui-thermometer-BheFELBN.js} +3 -3
- package/dist/{vue-ui-timer-Bc0J-YWP.js → vue-ui-timer-DUaqMYu9.js} +3 -3
- package/dist/{vue-ui-tiremarks-DqYsca6Q.js → vue-ui-tiremarks-CzEPq7Qm.js} +3 -3
- package/dist/{vue-ui-treemap-BQsPzEFA.js → vue-ui-treemap-JmxDMTGO.js} +3 -3
- package/dist/{vue-ui-waffle-5wkXlR4p.js → vue-ui-waffle-Bd_MQwxV.js} +3 -3
- package/dist/{vue-ui-wheel-CkZko1RX.js → vue-ui-wheel-BfR7YioI.js} +3 -3
- package/dist/{vue-ui-word-cloud-52bv_Ba-.js → vue-ui-word-cloud-CI2APc9f.js} +3 -3
- package/dist/{vue-ui-world-oIyf91PY.js → vue-ui-world-3Oy8hJ6R.js} +2 -2
- package/dist/{vue-ui-xy-DIEBv1b8.js → vue-ui-xy-BWzZbqJo.js} +4 -4
- package/dist/{vue-ui-xy-canvas-pnm8ar87.js → vue-ui-xy-canvas-Cq-lVd9y.js} +3 -3
- package/package.json +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
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[
|
|
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] =
|
|
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 =
|
|
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 !==
|
|
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 =
|
|
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 ===
|
|
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 =
|
|
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 =
|
|
339
|
-
return t = a.v, o = a.w, Object.freeze(a), this._edgeObjs[l] = a,
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
371
|
-
return r && (t = r.v, o = r.w, delete this._edgeLabels[s], delete this._edgeObjs[s],
|
|
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
|
|
410
|
+
function Yt(e, t) {
|
|
409
411
|
e[t] ? e[t]++ : e[t] = 1;
|
|
410
412
|
}
|
|
411
|
-
function
|
|
413
|
+
function Ht(e, t) {
|
|
412
414
|
--e[t] || delete e[t];
|
|
413
415
|
}
|
|
414
|
-
function
|
|
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 +
|
|
422
|
+
return s + Wt + r + Wt + (n === void 0 ? _n : n);
|
|
421
423
|
}
|
|
422
|
-
function
|
|
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
|
|
432
|
-
return
|
|
433
|
+
function Je(e, t) {
|
|
434
|
+
return Ee(e, t.v, t.w, t.name);
|
|
433
435
|
}
|
|
434
|
-
class
|
|
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
|
|
444
|
+
return Zt(o), o;
|
|
443
445
|
}
|
|
444
446
|
enqueue(t) {
|
|
445
447
|
const o = this._sentinel;
|
|
446
|
-
t._prev && t._next &&
|
|
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,
|
|
454
|
+
t.push(JSON.stringify(n, Sn)), n = n._prev;
|
|
453
455
|
return "[" + t.join(", ") + "]";
|
|
454
456
|
}
|
|
455
457
|
}
|
|
456
|
-
function
|
|
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
|
|
461
|
+
function Sn(e, t) {
|
|
460
462
|
if (e !== "_next" && e !== "_prev")
|
|
461
463
|
return t;
|
|
462
464
|
}
|
|
463
|
-
const
|
|
464
|
-
function
|
|
465
|
+
const Ln = () => 1;
|
|
466
|
+
function On(e, t) {
|
|
465
467
|
if (e.nodeCount() <= 1)
|
|
466
468
|
return [];
|
|
467
|
-
const o =
|
|
468
|
-
return
|
|
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
|
|
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
|
-
|
|
478
|
+
Qe(e, t, o, i);
|
|
477
479
|
for (; i = s.dequeue(); )
|
|
478
|
-
|
|
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(
|
|
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
|
|
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,
|
|
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,
|
|
498
|
+
a.in -= l, it(t, o, a);
|
|
497
499
|
}), e.removeNode(n.v), r;
|
|
498
500
|
}
|
|
499
|
-
function
|
|
500
|
-
const o = new
|
|
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),
|
|
506
|
-
o.setEdge(l.v, l.w,
|
|
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 =
|
|
510
|
+
const r = Mn(s + n + 3).map(() => new An()), i = n + 1;
|
|
509
511
|
return o.nodes().forEach((l) => {
|
|
510
|
-
|
|
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
|
|
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
|
|
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
|
|
528
|
+
function ue(e, t, o, n) {
|
|
527
529
|
let s = n;
|
|
528
530
|
for (; e.hasNode(s); )
|
|
529
|
-
s =
|
|
531
|
+
s = ze(n);
|
|
530
532
|
return o.dummy = t, e.setNode(s, o), s;
|
|
531
533
|
}
|
|
532
|
-
function
|
|
533
|
-
const t = new
|
|
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
|
|
545
|
-
const t = new
|
|
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
|
|
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
|
|
561
|
+
return Be(e.nodes(), t);
|
|
560
562
|
}
|
|
561
|
-
function
|
|
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
|
|
570
|
+
return Be(e.nodes(), t);
|
|
569
571
|
}
|
|
570
|
-
function
|
|
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
|
|
580
|
-
const t =
|
|
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
|
|
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 =
|
|
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
|
|
597
|
-
const t = e.nodes().map((i) => e.node(i).rank).filter((i) => i !== void 0), o =
|
|
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
|
|
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),
|
|
617
|
+
return arguments.length >= 4 && (s.rank = o, s.order = n), ue(e, "border", s, t);
|
|
616
618
|
}
|
|
617
|
-
const
|
|
618
|
-
function
|
|
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
|
|
627
|
-
if (t.length >
|
|
628
|
-
const o =
|
|
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
|
|
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
|
|
643
|
+
return j(Math.max, o);
|
|
642
644
|
}
|
|
643
|
-
function
|
|
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
|
|
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
|
|
659
|
+
function ho(e, t) {
|
|
658
660
|
return t();
|
|
659
661
|
}
|
|
660
|
-
let
|
|
661
|
-
function
|
|
662
|
-
const t = ++
|
|
662
|
+
let zn = 0;
|
|
663
|
+
function ze(e) {
|
|
664
|
+
const t = ++zn;
|
|
663
665
|
return e + String(t);
|
|
664
666
|
}
|
|
665
|
-
function
|
|
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
|
|
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
|
|
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
|
|
690
|
+
function Be(e, t) {
|
|
689
691
|
return e.reduce((o, n, s) => (o[n] = t[s], o), {});
|
|
690
692
|
}
|
|
691
|
-
const
|
|
692
|
-
addBorderNode:
|
|
693
|
-
addDummyNode:
|
|
694
|
-
applyWithChunking:
|
|
695
|
-
asNonCompoundGraph:
|
|
696
|
-
buildLayerMatrix:
|
|
697
|
-
intersectRect:
|
|
698
|
-
mapValues:
|
|
699
|
-
maxRank:
|
|
700
|
-
normalizeRanks:
|
|
701
|
-
notime:
|
|
702
|
-
partition:
|
|
703
|
-
pick:
|
|
704
|
-
predecessorWeights:
|
|
705
|
-
range:
|
|
706
|
-
removeEmptyRanks:
|
|
707
|
-
simplify:
|
|
708
|
-
successorWeights:
|
|
709
|
-
time:
|
|
710
|
-
uniqueId:
|
|
711
|
-
zipObject:
|
|
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
|
|
714
|
-
(e.graph().acyclicer === "greedy" ?
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
742
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
743
|
+
function Gn(e) {
|
|
744
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => jn(e, t));
|
|
743
745
|
}
|
|
744
|
-
function
|
|
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,
|
|
751
|
-
for (
|
|
752
|
-
l.points = [],
|
|
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 =
|
|
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
|
|
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
|
|
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),
|
|
783
|
-
return c -
|
|
784
|
+
const c = t(l.w), d = e.edge(l).minlen;
|
|
785
|
+
return c - d;
|
|
784
786
|
});
|
|
785
|
-
let i =
|
|
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
|
|
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
|
|
794
|
-
|
|
795
|
-
const t = new
|
|
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 =
|
|
806
|
+
const r = Un(e, s);
|
|
805
807
|
if (!r) {
|
|
806
|
-
const
|
|
807
|
-
s.add(
|
|
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
|
-
|
|
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
|
|
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
|
|
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 =
|
|
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,
|
|
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:
|
|
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
|
|
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
|
|
849
|
-
const t =
|
|
850
|
-
return
|
|
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
|
|
857
|
+
function qn(e, t) {
|
|
856
858
|
}
|
|
857
|
-
function
|
|
859
|
+
function Kn(e, t) {
|
|
858
860
|
}
|
|
859
|
-
function
|
|
861
|
+
function Jn(e, t, o) {
|
|
860
862
|
return 0;
|
|
861
863
|
}
|
|
862
|
-
function
|
|
864
|
+
function Qn(e) {
|
|
863
865
|
return null;
|
|
864
866
|
}
|
|
865
|
-
function
|
|
867
|
+
function es(e, t) {
|
|
866
868
|
return null;
|
|
867
869
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
function
|
|
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
|
-
|
|
882
|
+
Ut(e);
|
|
881
883
|
break;
|
|
882
884
|
case "tight-tree":
|
|
883
|
-
|
|
885
|
+
ns(e);
|
|
884
886
|
break;
|
|
885
887
|
case "longest-path":
|
|
886
|
-
|
|
888
|
+
os(e);
|
|
887
889
|
break;
|
|
888
890
|
case "none":
|
|
889
891
|
break;
|
|
890
892
|
default:
|
|
891
|
-
|
|
893
|
+
Ut(e);
|
|
892
894
|
}
|
|
893
895
|
}
|
|
894
|
-
const
|
|
895
|
-
function
|
|
896
|
-
|
|
896
|
+
const os = go;
|
|
897
|
+
function ns(e) {
|
|
898
|
+
go(e), Hn(e);
|
|
897
899
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
900
|
+
function Ut(e) {
|
|
901
|
+
de(e);
|
|
900
902
|
}
|
|
901
|
-
function
|
|
902
|
-
const t =
|
|
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 =
|
|
906
|
-
let a = 0, c = i[a],
|
|
907
|
-
for (;
|
|
908
|
-
if (n = e.node(
|
|
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 && (
|
|
913
|
+
c === l && (d = !1);
|
|
912
914
|
}
|
|
913
|
-
if (!
|
|
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(
|
|
920
|
+
e.setParent(f, c), f = e.successors(f)[0];
|
|
919
921
|
}
|
|
920
922
|
});
|
|
921
923
|
}
|
|
922
|
-
function
|
|
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
|
|
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
|
|
946
|
-
const t =
|
|
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 =
|
|
952
|
+
const i = cs(e) + 1;
|
|
951
953
|
e.children().forEach((l) => {
|
|
952
|
-
|
|
954
|
+
vo(e, t, r, i, s, o, l);
|
|
953
955
|
}), e.graph().nodeRankFactor = r;
|
|
954
956
|
}
|
|
955
|
-
function
|
|
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 =
|
|
962
|
-
e.setParent(a, i),
|
|
963
|
-
|
|
964
|
-
const g = e.node(
|
|
965
|
-
e.setEdge(a,
|
|
966
|
-
weight:
|
|
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(
|
|
970
|
-
weight:
|
|
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
|
|
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
|
|
989
|
+
function cs(e) {
|
|
988
990
|
return e.edges().reduce((t, o) => t + e.edge(o).weight, 0);
|
|
989
991
|
}
|
|
990
|
-
function
|
|
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
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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
|
|
1018
|
+
function fs(e) {
|
|
1017
1019
|
const t = e.graph().rankdir.toLowerCase();
|
|
1018
|
-
(t === "lr" || t === "rl") &&
|
|
1020
|
+
(t === "lr" || t === "rl") && bo(e);
|
|
1019
1021
|
}
|
|
1020
|
-
function
|
|
1022
|
+
function hs(e) {
|
|
1021
1023
|
const t = e.graph().rankdir.toLowerCase();
|
|
1022
|
-
(t === "bt" || t === "rl") &&
|
|
1024
|
+
(t === "bt" || t === "rl") && ms(e), (t === "lr" || t === "rl") && (gs(e), bo(e));
|
|
1023
1025
|
}
|
|
1024
|
-
function
|
|
1026
|
+
function bo(e) {
|
|
1025
1027
|
e.nodes().forEach((t) => {
|
|
1026
|
-
|
|
1028
|
+
qt(e.node(t));
|
|
1027
1029
|
}), e.edges().forEach((t) => {
|
|
1028
|
-
|
|
1030
|
+
qt(e.edge(t));
|
|
1029
1031
|
});
|
|
1030
1032
|
}
|
|
1031
|
-
function
|
|
1033
|
+
function qt(e) {
|
|
1032
1034
|
const t = e.width;
|
|
1033
1035
|
e.width = e.height, e.height = t;
|
|
1034
1036
|
}
|
|
1035
|
-
function
|
|
1037
|
+
function ms(e) {
|
|
1036
1038
|
e.nodes().forEach((t) => {
|
|
1037
|
-
|
|
1039
|
+
et(e.node(t));
|
|
1038
1040
|
}), e.edges().forEach((t) => {
|
|
1039
1041
|
const o = e.edge(t);
|
|
1040
|
-
o.points.forEach(
|
|
1042
|
+
o.points.forEach(et), Object.hasOwn(o, "y") && et(o);
|
|
1041
1043
|
});
|
|
1042
1044
|
}
|
|
1043
|
-
function
|
|
1045
|
+
function et(e) {
|
|
1044
1046
|
e.y = -e.y;
|
|
1045
1047
|
}
|
|
1046
|
-
function
|
|
1048
|
+
function gs(e) {
|
|
1047
1049
|
e.nodes().forEach((t) => {
|
|
1048
|
-
|
|
1050
|
+
tt(e.node(t));
|
|
1049
1051
|
}), e.edges().forEach((t) => {
|
|
1050
1052
|
const o = e.edge(t);
|
|
1051
|
-
o.points.forEach(
|
|
1053
|
+
o.points.forEach(tt), Object.hasOwn(o, "x") && tt(o);
|
|
1052
1054
|
});
|
|
1053
1055
|
}
|
|
1054
|
-
function
|
|
1056
|
+
function tt(e) {
|
|
1055
1057
|
const t = e.x;
|
|
1056
1058
|
e.x = e.y, e.y = t;
|
|
1057
1059
|
}
|
|
1058
|
-
const
|
|
1059
|
-
adjust:
|
|
1060
|
-
undo:
|
|
1060
|
+
const Kt = {
|
|
1061
|
+
adjust: fs,
|
|
1062
|
+
undo: hs
|
|
1061
1063
|
};
|
|
1062
|
-
function
|
|
1063
|
-
const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s =
|
|
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
|
|
1076
|
+
function bs(e, t) {
|
|
1075
1077
|
let o = 0;
|
|
1076
1078
|
for (let n = 1; n < t.length; ++n)
|
|
1077
|
-
o +=
|
|
1079
|
+
o += ps(e, t[n - 1], t[n]);
|
|
1078
1080
|
return o;
|
|
1079
1081
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const n =
|
|
1082
|
+
function ps(e, t, o) {
|
|
1083
|
+
const n = Be(
|
|
1082
1084
|
o,
|
|
1083
|
-
o.map((c,
|
|
1084
|
-
), s = t.flatMap((c) => e.outEdges(c).map((
|
|
1085
|
-
pos: n[
|
|
1086
|
-
weight: e.edge(
|
|
1087
|
-
})).sort((
|
|
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
|
|
1096
|
-
l[
|
|
1097
|
-
let
|
|
1098
|
-
for (;
|
|
1099
|
-
|
|
1100
|
-
a += c.weight *
|
|
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
|
|
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
|
|
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
|
|
1143
|
+
return ks(n);
|
|
1142
1144
|
}
|
|
1143
|
-
function
|
|
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) &&
|
|
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) =>
|
|
1161
|
+
return t.filter((s) => !s.merged).map((s) => xe(s, ["vs", "i", "barycenter", "weight"]));
|
|
1160
1162
|
}
|
|
1161
|
-
function
|
|
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
|
|
1166
|
-
const o =
|
|
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(
|
|
1169
|
-
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
|
|
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
|
|
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
|
|
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 =
|
|
1189
|
+
const c = ws(e, s);
|
|
1188
1190
|
c.forEach((g) => {
|
|
1189
1191
|
if (e.children(g.v).length) {
|
|
1190
|
-
const
|
|
1191
|
-
a[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
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
if (i && (
|
|
1198
|
-
const g = e.node(e.predecessors(i)[0]),
|
|
1199
|
-
Object.hasOwn(
|
|
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
|
|
1203
|
+
return f;
|
|
1202
1204
|
}
|
|
1203
|
-
function
|
|
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
|
|
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
|
|
1213
|
+
function As(e, t, o, n) {
|
|
1212
1214
|
n || (n = e.nodes());
|
|
1213
|
-
const s =
|
|
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((
|
|
1217
|
-
const
|
|
1218
|
-
r.setEdge(
|
|
1219
|
-
weight: e.edge(
|
|
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
|
|
1229
|
+
function Ss(e) {
|
|
1228
1230
|
let t;
|
|
1229
|
-
for (; e.hasNode(t =
|
|
1231
|
+
for (; e.hasNode(t = ze("_root")); ) ;
|
|
1230
1232
|
return t;
|
|
1231
1233
|
}
|
|
1232
|
-
function
|
|
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
|
|
1247
|
+
function wo(e, t = {}) {
|
|
1246
1248
|
if (typeof t.customOrder == "function") {
|
|
1247
|
-
t.customOrder(e,
|
|
1249
|
+
t.customOrder(e, wo);
|
|
1248
1250
|
return;
|
|
1249
1251
|
}
|
|
1250
|
-
const o =
|
|
1252
|
+
const o = ct(e), n = Qt(
|
|
1251
1253
|
e,
|
|
1252
|
-
|
|
1254
|
+
ce(1, o + 1),
|
|
1253
1255
|
"inEdges"
|
|
1254
|
-
), s =
|
|
1256
|
+
), s = Qt(
|
|
1255
1257
|
e,
|
|
1256
|
-
|
|
1258
|
+
ce(o - 1, -1, -1),
|
|
1257
1259
|
"outEdges"
|
|
1258
1260
|
);
|
|
1259
|
-
let r =
|
|
1260
|
-
if (
|
|
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,
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
const
|
|
1268
|
-
|
|
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
|
-
|
|
1272
|
+
eo(e, l);
|
|
1271
1273
|
}
|
|
1272
|
-
function
|
|
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) =>
|
|
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
|
|
1293
|
-
const n = new
|
|
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 =
|
|
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
|
-
}),
|
|
1301
|
+
}), Ls(s, n, i.vs);
|
|
1300
1302
|
});
|
|
1301
1303
|
}
|
|
1302
|
-
function
|
|
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
|
|
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((
|
|
1315
|
-
const g =
|
|
1316
|
-
(g ||
|
|
1317
|
-
e.predecessors(
|
|
1318
|
-
const M = e.node(
|
|
1319
|
-
(
|
|
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 =
|
|
1323
|
+
}), l = f + 1, i = b);
|
|
1322
1324
|
}), r;
|
|
1323
1325
|
}
|
|
1324
1326
|
return t.length && t.reduce(n), o;
|
|
1325
1327
|
}
|
|
1326
|
-
function
|
|
1328
|
+
function Ts(e, t) {
|
|
1327
1329
|
const o = {};
|
|
1328
1330
|
function n(r, i, l, a, c) {
|
|
1329
|
-
let
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
const
|
|
1333
|
-
|
|
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((
|
|
1340
|
-
if (e.node(
|
|
1341
|
-
const g = e.predecessors(
|
|
1342
|
-
g.length && (a = e.node(g[0]).order, n(i, c,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1378
|
-
if (
|
|
1379
|
-
|
|
1380
|
-
const
|
|
1381
|
-
for (let g = Math.floor(
|
|
1382
|
-
const
|
|
1383
|
-
r[c] === c && a < i[
|
|
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
|
|
1390
|
-
const r = {}, i =
|
|
1391
|
-
function a(
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
for (;
|
|
1395
|
-
if (
|
|
1396
|
-
|
|
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
|
-
|
|
1399
|
-
for (const M of g(
|
|
1400
|
-
|
|
1400
|
+
N[_] = !0, b.push(_);
|
|
1401
|
+
for (const M of g(_))
|
|
1402
|
+
b.push(M);
|
|
1401
1403
|
}
|
|
1402
|
-
|
|
1404
|
+
_ = b.pop();
|
|
1403
1405
|
}
|
|
1404
1406
|
}
|
|
1405
|
-
function c(
|
|
1406
|
-
r[
|
|
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
|
|
1409
|
-
const g = i.outEdges(
|
|
1410
|
-
g !== Number.POSITIVE_INFINITY &&
|
|
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(
|
|
1413
|
-
r[
|
|
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
|
|
1417
|
-
const s = new e.constructor(), r = e.graph(), i =
|
|
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
|
|
1422
|
-
if (s.setNode(
|
|
1423
|
-
const
|
|
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
|
|
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 =
|
|
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
|
|
1449
|
-
const o = Object.values(t), n =
|
|
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
|
|
1457
|
-
i !== "l" && (
|
|
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
|
|
1462
|
-
return
|
|
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
|
|
1470
|
-
const t =
|
|
1471
|
-
|
|
1472
|
-
|
|
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),
|
|
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
|
|
1489
|
+
let f = Fs(
|
|
1488
1490
|
e,
|
|
1489
1491
|
a,
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
+
d.root,
|
|
1493
|
+
d.align,
|
|
1492
1494
|
l === "r"
|
|
1493
1495
|
);
|
|
1494
|
-
l === "r" && (
|
|
1496
|
+
l === "r" && (f = Ne(f, (g) => -g)), n[i + l] = f;
|
|
1495
1497
|
});
|
|
1496
1498
|
});
|
|
1497
|
-
const r =
|
|
1498
|
-
return
|
|
1499
|
+
const r = zs(e, n);
|
|
1500
|
+
return Bs(n, r), Vs(n, e.graph().align);
|
|
1499
1501
|
}
|
|
1500
|
-
function
|
|
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
|
|
1527
|
+
function js(e, t) {
|
|
1526
1528
|
return e.node(t).width;
|
|
1527
1529
|
}
|
|
1528
|
-
function
|
|
1529
|
-
const t =
|
|
1530
|
-
|
|
1531
|
-
const o =
|
|
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
|
|
1537
|
-
const t =
|
|
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
|
|
1550
|
-
const o = t.debugTiming ?
|
|
1551
|
+
function Hs(e, t = {}) {
|
|
1552
|
+
const o = t.debugTiming ? fo : ho;
|
|
1551
1553
|
return o("layout", () => {
|
|
1552
|
-
const n = o(" buildLayoutGraph", () =>
|
|
1553
|
-
return o(" runLayout", () =>
|
|
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
|
|
1557
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
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
|
|
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
|
|
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
|
-
},
|
|
1578
|
-
function
|
|
1579
|
-
const t =
|
|
1580
|
-
...
|
|
1581
|
-
...
|
|
1582
|
-
...
|
|
1583
|
-
}, n = new
|
|
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 =
|
|
1586
|
-
Object.keys(
|
|
1587
|
-
i[l] === void 0 && (i[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 =
|
|
1592
|
+
const r = nt(e.edge(s));
|
|
1591
1593
|
n.setEdge(
|
|
1592
1594
|
s,
|
|
1593
1595
|
{
|
|
1594
|
-
...
|
|
1595
|
-
...
|
|
1596
|
-
...
|
|
1596
|
+
...er,
|
|
1597
|
+
...ot(r, Qs),
|
|
1598
|
+
...xe(r, tr)
|
|
1597
1599
|
}
|
|
1598
1600
|
);
|
|
1599
1601
|
}), n;
|
|
1600
1602
|
}
|
|
1601
|
-
function
|
|
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
|
|
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
|
-
|
|
1615
|
+
ue(e, "edge-proxy", r, "_ep");
|
|
1614
1616
|
}
|
|
1615
1617
|
});
|
|
1616
1618
|
}
|
|
1617
|
-
function
|
|
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
|
|
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
|
|
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
|
|
1635
|
-
t = Math.min(t,
|
|
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
|
|
1639
|
-
Object.hasOwn(
|
|
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
|
|
1642
|
-
|
|
1643
|
+
const d = e.node(c);
|
|
1644
|
+
d.x -= t, d.y -= n;
|
|
1643
1645
|
}), e.edges().forEach((c) => {
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
}), Object.hasOwn(
|
|
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
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1696
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
1729
|
-
return xe(
|
|
1730
|
+
function ot(e, t) {
|
|
1731
|
+
return Ne(xe(e, t), Number);
|
|
1730
1732
|
}
|
|
1731
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
1772
|
-
o += ` Q ${l} ${a} ${c} ${
|
|
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
|
|
1778
|
-
const { nodes: t, edges: o, configuration: n } = e, s =
|
|
1779
|
-
function l(a, c,
|
|
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
|
|
1782
|
-
...
|
|
1783
|
-
...
|
|
1784
|
-
}, g = new
|
|
1783
|
+
const f = {
|
|
1784
|
+
...gr,
|
|
1785
|
+
...d
|
|
1786
|
+
}, g = new q({ multigraph: !0, compound: !0 });
|
|
1785
1787
|
g.setGraph({
|
|
1786
|
-
rankdir:
|
|
1787
|
-
nodesep:
|
|
1788
|
-
ranksep:
|
|
1789
|
-
edgesep:
|
|
1790
|
-
align:
|
|
1791
|
-
}), a.forEach((
|
|
1792
|
-
g.setNode(
|
|
1793
|
-
label:
|
|
1794
|
-
width:
|
|
1795
|
-
height:
|
|
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((
|
|
1798
|
-
g.setEdge(
|
|
1799
|
-
weight:
|
|
1800
|
-
minlen:
|
|
1799
|
+
}), c.forEach((u) => {
|
|
1800
|
+
g.setEdge(u.from, u.to, {
|
|
1801
|
+
weight: u.weight ?? 1,
|
|
1802
|
+
minlen: u.minLength ?? 1
|
|
1801
1803
|
});
|
|
1802
|
-
}),
|
|
1803
|
-
const
|
|
1804
|
-
const
|
|
1804
|
+
}), Hs(g);
|
|
1805
|
+
const b = a.map((u) => {
|
|
1806
|
+
const I = g.node(u.id);
|
|
1805
1807
|
return {
|
|
1806
|
-
id:
|
|
1807
|
-
label:
|
|
1808
|
-
x:
|
|
1809
|
-
y:
|
|
1810
|
-
width:
|
|
1811
|
-
height:
|
|
1812
|
-
original:
|
|
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
|
-
}),
|
|
1815
|
-
const
|
|
1816
|
-
if (!
|
|
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
|
|
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: `${
|
|
1821
|
-
from:
|
|
1822
|
-
to:
|
|
1823
|
-
points:
|
|
1824
|
-
pathData:
|
|
1825
|
-
markerEnd:
|
|
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
|
-
...
|
|
1828
|
-
...
|
|
1829
|
+
...Le,
|
|
1830
|
+
...I
|
|
1829
1831
|
}
|
|
1830
1832
|
};
|
|
1831
|
-
}).filter(Boolean),
|
|
1832
|
-
if (!
|
|
1833
|
+
}).filter(Boolean), _ = f.padding;
|
|
1834
|
+
if (!b.length) {
|
|
1833
1835
|
s.value = {
|
|
1834
1836
|
nodes: [],
|
|
1835
|
-
edges:
|
|
1837
|
+
edges: N,
|
|
1836
1838
|
viewBox: "0 0 0 0",
|
|
1837
|
-
arrowShape:
|
|
1838
|
-
arrowSize:
|
|
1839
|
+
arrowShape: f.arrowShape,
|
|
1840
|
+
arrowSize: f.arrowSize
|
|
1839
1841
|
};
|
|
1840
1842
|
return;
|
|
1841
1843
|
}
|
|
1842
|
-
const M =
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
]),
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
]),
|
|
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:
|
|
1851
|
-
edges:
|
|
1852
|
-
...
|
|
1853
|
-
midpoint:
|
|
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: `${
|
|
1856
|
-
arrowShape:
|
|
1857
|
-
arrowSize:
|
|
1857
|
+
viewBox: `${fe} ${R} ${oe - fe} ${P - R}`,
|
|
1858
|
+
arrowShape: f.arrowShape,
|
|
1859
|
+
arrowSize: f.arrowSize
|
|
1858
1860
|
};
|
|
1859
1861
|
}
|
|
1860
|
-
return
|
|
1862
|
+
return Jo(() => {
|
|
1861
1863
|
try {
|
|
1862
|
-
const a =
|
|
1863
|
-
l(a, c,
|
|
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 =
|
|
1873
|
-
l(a, c,
|
|
1874
|
+
const a = v(t) || [], c = v(o) || [], d = v(n) || {};
|
|
1875
|
+
l(a, c, d);
|
|
1874
1876
|
}
|
|
1875
1877
|
};
|
|
1876
1878
|
}
|
|
1877
|
-
const
|
|
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:
|
|
1880
|
-
celebration:
|
|
1881
|
-
celebrationNight:
|
|
1882
|
-
hack:
|
|
1883
|
-
zen:
|
|
1884
|
-
concrete:
|
|
1885
|
-
},
|
|
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:
|
|
1888
|
-
celebrationNight:
|
|
1889
|
-
concrete:
|
|
1890
|
-
dark:
|
|
1891
|
-
default:
|
|
1892
|
-
hack:
|
|
1893
|
-
zen:
|
|
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
|
|
1896
|
-
const o =
|
|
1897
|
-
return
|
|
1897
|
+
function wr(e, t) {
|
|
1898
|
+
const o = Ce(e);
|
|
1899
|
+
return rn(o, t);
|
|
1898
1900
|
}
|
|
1899
|
-
function
|
|
1900
|
-
const o =
|
|
1901
|
-
return
|
|
1901
|
+
function ci(e, t) {
|
|
1902
|
+
const o = Ce(e);
|
|
1903
|
+
return ln(o, t);
|
|
1902
1904
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const o =
|
|
1905
|
-
return
|
|
1905
|
+
function ui(e, t) {
|
|
1906
|
+
const o = Ce(e);
|
|
1907
|
+
return an(o, t);
|
|
1906
1908
|
}
|
|
1907
|
-
function
|
|
1908
|
-
return
|
|
1909
|
+
function di({ defaultConfig: e, userConfig: t }) {
|
|
1910
|
+
return so({ defaultConfig: e, userConfig: t });
|
|
1909
1911
|
}
|
|
1910
|
-
const
|
|
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(),
|
|
1936
|
-
class:
|
|
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:
|
|
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":
|
|
1946
|
+
"--vue-data-ui-zoom-control-button-color-hover": v(wr)(e.config.style.chart.controls.buttonColor, 0.2)
|
|
1945
1947
|
})
|
|
1946
1948
|
}, [
|
|
1947
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
},
|
|
1969
|
-
|
|
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
|
-
|
|
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(),
|
|
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
|
-
|
|
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
|
-
},
|
|
1995
|
+
}, oo = /* @__PURE__ */ ro(yr, [["__scopeId", "data-v-e4479474"]]), kr = ["id"], Er = {
|
|
1994
1996
|
key: 0,
|
|
1995
1997
|
class: "dag-chart-error"
|
|
1996
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
2021
|
-
...
|
|
2022
|
-
FINAL_CONFIG:
|
|
2023
|
-
prepareConfig:
|
|
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:
|
|
2036
|
-
defaultConfig:
|
|
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
|
|
2059
|
-
const
|
|
2060
|
+
function je() {
|
|
2061
|
+
const m = qe({
|
|
2060
2062
|
userConfig: c.config,
|
|
2061
2063
|
defaultConfig: i
|
|
2062
|
-
}),
|
|
2063
|
-
if (!
|
|
2064
|
-
if (!l.value(
|
|
2065
|
-
return a(
|
|
2066
|
-
const
|
|
2067
|
-
userConfig:
|
|
2068
|
-
defaultConfig:
|
|
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
|
|
2072
|
+
return qe({
|
|
2071
2073
|
userConfig: c.config,
|
|
2072
|
-
defaultConfig:
|
|
2074
|
+
defaultConfig: h
|
|
2073
2075
|
});
|
|
2074
2076
|
}
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
|
|
2077
|
+
const bt = W(() => !!u.value.debug);
|
|
2078
|
+
zt(() => {
|
|
2079
|
+
cn(c.dataset) && (jt({
|
|
2078
2080
|
componentName: "VueUiDag",
|
|
2079
2081
|
type: "dataset",
|
|
2080
|
-
debug:
|
|
2081
|
-
}),
|
|
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:
|
|
2087
|
-
}),
|
|
2088
|
-
}),
|
|
2089
|
-
|
|
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:
|
|
2093
|
+
const { isPrinting: pt, isImaging: wt, generatePdf: yt, generateImage: kt } = pn({
|
|
2092
2094
|
elementId: `dag_${g.value}`,
|
|
2093
|
-
fileName:
|
|
2094
|
-
options:
|
|
2095
|
-
}),
|
|
2096
|
-
svg:
|
|
2097
|
-
title:
|
|
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:
|
|
2102
|
+
backgroundColor: So
|
|
2101
2103
|
});
|
|
2102
|
-
async function
|
|
2103
|
-
if (
|
|
2104
|
-
const { blob:
|
|
2105
|
-
|
|
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
|
-
|
|
2109
|
+
Oo();
|
|
2108
2110
|
}
|
|
2109
|
-
function
|
|
2110
|
-
|
|
2111
|
+
function To() {
|
|
2112
|
+
fe.value = !0, ht(!0);
|
|
2111
2113
|
}
|
|
2112
|
-
function
|
|
2113
|
-
|
|
2114
|
+
function Mo() {
|
|
2115
|
+
ht(!1), fe.value = !1;
|
|
2114
2116
|
}
|
|
2115
|
-
function
|
|
2116
|
-
tooltipRef:
|
|
2117
|
-
isVisibleRef:
|
|
2118
|
-
anchorRef:
|
|
2119
|
-
styleRef:
|
|
2120
|
-
placementRef:
|
|
2121
|
-
offsetRef:
|
|
2122
|
-
margin:
|
|
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
|
|
2126
|
-
if (!
|
|
2127
|
-
const
|
|
2128
|
-
let
|
|
2129
|
-
if (
|
|
2130
|
-
const
|
|
2131
|
-
|
|
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
|
-
|
|
2134
|
-
const
|
|
2135
|
-
if ((
|
|
2136
|
-
let
|
|
2137
|
-
const
|
|
2138
|
-
|
|
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
|
-
|
|
2141
|
-
left: `${
|
|
2142
|
-
top: `${
|
|
2142
|
+
O.value = ye, w.value = {
|
|
2143
|
+
left: `${Z}px`,
|
|
2144
|
+
top: `${F}px`
|
|
2143
2145
|
};
|
|
2144
2146
|
};
|
|
2145
2147
|
}
|
|
2146
|
-
const
|
|
2147
|
-
...
|
|
2148
|
-
backgroundColor:
|
|
2149
|
-
color:
|
|
2150
|
-
}))),
|
|
2151
|
-
...
|
|
2152
|
-
rankDirection:
|
|
2153
|
-
})), { layoutData:
|
|
2154
|
-
nodes:
|
|
2155
|
-
edges:
|
|
2156
|
-
configuration:
|
|
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
|
|
2159
|
-
return
|
|
2160
|
+
function _t(m) {
|
|
2161
|
+
return E.value ? E.value.nodes.find((p) => p.id === m) : null;
|
|
2160
2162
|
}
|
|
2161
|
-
const
|
|
2162
|
-
if (!
|
|
2163
|
-
const
|
|
2164
|
-
return
|
|
2165
|
-
|
|
2166
|
-
}), Array.from(
|
|
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
|
|
2169
|
-
return `${
|
|
2170
|
+
function Nt(m) {
|
|
2171
|
+
return `${Po}-${String(m).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2170
2172
|
}
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
} =
|
|
2178
|
-
|
|
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
|
-
|
|
2189
|
+
ne,
|
|
2182
2190
|
() => {
|
|
2183
|
-
|
|
2191
|
+
K.value = !1;
|
|
2184
2192
|
}
|
|
2185
2193
|
);
|
|
2186
|
-
function
|
|
2187
|
-
|
|
2194
|
+
function Vo() {
|
|
2195
|
+
ne.value = !ne.value;
|
|
2188
2196
|
}
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
(
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
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
|
-
|
|
2217
|
+
{ immediate: !0 }
|
|
2218
|
+
), De(
|
|
2219
|
+
() => At.value,
|
|
2220
|
+
() => {
|
|
2221
|
+
Rt();
|
|
2201
2222
|
}
|
|
2202
|
-
),
|
|
2203
|
-
|
|
2223
|
+
), De(() => ge.value, (m) => {
|
|
2224
|
+
ne.value = !m;
|
|
2204
2225
|
});
|
|
2205
|
-
const
|
|
2206
|
-
const
|
|
2207
|
-
return
|
|
2208
|
-
}),
|
|
2209
|
-
function
|
|
2210
|
-
|
|
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
|
|
2213
|
-
|
|
2233
|
+
function We() {
|
|
2234
|
+
ge.value = !ge.value;
|
|
2214
2235
|
}
|
|
2215
|
-
function
|
|
2216
|
-
|
|
2236
|
+
function Ye() {
|
|
2237
|
+
Ot(no, !0);
|
|
2217
2238
|
}
|
|
2218
|
-
function
|
|
2219
|
-
|
|
2239
|
+
function He() {
|
|
2240
|
+
Ot(1 / no, !0);
|
|
2220
2241
|
}
|
|
2221
|
-
const
|
|
2222
|
-
function
|
|
2223
|
-
|
|
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
|
|
2226
|
-
tooltipRef:
|
|
2227
|
-
isVisibleRef:
|
|
2228
|
-
anchorRef:
|
|
2229
|
-
styleRef:
|
|
2230
|
-
placementRef:
|
|
2231
|
-
}),
|
|
2232
|
-
tooltipRef:
|
|
2233
|
-
isVisibleRef:
|
|
2234
|
-
anchorRef:
|
|
2235
|
-
styleRef:
|
|
2236
|
-
placementRef:
|
|
2237
|
-
offsetRef:
|
|
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
|
|
2240
|
-
|
|
2241
|
-
const
|
|
2242
|
-
if (!
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2245
|
-
const
|
|
2246
|
-
if (!
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2249
|
-
x:
|
|
2250
|
-
y:
|
|
2251
|
-
},
|
|
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
|
|
2254
|
-
|
|
2274
|
+
function Yo() {
|
|
2275
|
+
Oe.value = !1, z.value = null, d("onMidpointLeave");
|
|
2255
2276
|
}
|
|
2256
|
-
async function
|
|
2257
|
-
if (
|
|
2258
|
-
const
|
|
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
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
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
|
|
2274
|
-
|
|
2294
|
+
function Mt() {
|
|
2295
|
+
K.value = !1, me.value = null;
|
|
2275
2296
|
}
|
|
2276
|
-
function
|
|
2277
|
-
if (!
|
|
2278
|
-
const
|
|
2279
|
-
if (
|
|
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
|
|
2282
|
-
|
|
2302
|
+
const h = J.value;
|
|
2303
|
+
h && h.contains(m.target) && m.target.closest(".vue-ui-dag-node") || Mt();
|
|
2283
2304
|
}
|
|
2284
|
-
function
|
|
2285
|
-
|
|
2305
|
+
function Dt(m) {
|
|
2306
|
+
m.key === "Escape" && K.value && Mt();
|
|
2286
2307
|
}
|
|
2287
|
-
|
|
2288
|
-
document.addEventListener("mousedown",
|
|
2289
|
-
}),
|
|
2290
|
-
document.removeEventListener("mousedown",
|
|
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
|
-
|
|
2293
|
-
if (!
|
|
2294
|
-
|
|
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:
|
|
2297
|
-
base64:
|
|
2298
|
-
title:
|
|
2299
|
-
width:
|
|
2300
|
-
height:
|
|
2301
|
-
aspectRatio:
|
|
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
|
|
2305
|
-
return
|
|
2344
|
+
function Uo() {
|
|
2345
|
+
return E.value;
|
|
2306
2346
|
}
|
|
2307
2347
|
return t({
|
|
2308
|
-
getData:
|
|
2309
|
-
getImage:
|
|
2310
|
-
generatePdf:
|
|
2311
|
-
generateSvg:
|
|
2312
|
-
generateImage:
|
|
2313
|
-
toggleAnnotator:
|
|
2314
|
-
toggleFullscreen:
|
|
2315
|
-
zoomIn:
|
|
2316
|
-
zoomOut:
|
|
2317
|
-
resetZoom:
|
|
2318
|
-
switchDirection:
|
|
2319
|
-
}), (
|
|
2320
|
-
class:
|
|
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:
|
|
2324
|
-
style:
|
|
2325
|
-
fontFamily:
|
|
2326
|
-
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:
|
|
2330
|
-
onMouseleave:
|
|
2369
|
+
onMouseenter: To,
|
|
2370
|
+
onMouseleave: Mo
|
|
2331
2371
|
}, [
|
|
2332
|
-
|
|
2333
|
-
|
|
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:
|
|
2336
|
-
backgroundColor:
|
|
2337
|
-
color:
|
|
2338
|
-
active:
|
|
2339
|
-
onClose:
|
|
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":
|
|
2342
|
-
|
|
2381
|
+
"annotator-action-close": T(() => [
|
|
2382
|
+
A(m.$slots, "annotator-action-close", {}, void 0, !0)
|
|
2343
2383
|
]),
|
|
2344
|
-
"annotator-action-color":
|
|
2345
|
-
|
|
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":
|
|
2348
|
-
|
|
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":
|
|
2351
|
-
|
|
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":
|
|
2354
|
-
|
|
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":
|
|
2357
|
-
|
|
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
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
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:
|
|
2375
|
-
hasImg:
|
|
2376
|
-
hasSvg:
|
|
2377
|
-
hasFullscreen:
|
|
2378
|
-
isFullscreen:
|
|
2379
|
-
chartElement:
|
|
2380
|
-
position:
|
|
2381
|
-
titles: { ...
|
|
2382
|
-
hasAnnotator:
|
|
2383
|
-
isAnnotation:
|
|
2384
|
-
callbacks:
|
|
2385
|
-
printScale:
|
|
2386
|
-
hasZoom:
|
|
2387
|
-
isZoom:
|
|
2388
|
-
onToggleFullscreen:
|
|
2389
|
-
onGeneratePdf:
|
|
2390
|
-
onGenerateImage:
|
|
2391
|
-
onGenerateSvg:
|
|
2392
|
-
onToggleAnnotator:
|
|
2393
|
-
onToggleZoom:
|
|
2394
|
-
style:
|
|
2395
|
-
visibility:
|
|
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
|
-
},
|
|
2398
|
-
|
|
2436
|
+
}, tn({ _: 2 }, [
|
|
2437
|
+
m.$slots.menuIcon ? {
|
|
2399
2438
|
name: "menuIcon",
|
|
2400
|
-
fn:
|
|
2401
|
-
|
|
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
|
-
|
|
2444
|
+
m.$slots.optionPdf ? {
|
|
2406
2445
|
name: "optionPdf",
|
|
2407
|
-
fn:
|
|
2408
|
-
|
|
2446
|
+
fn: T(() => [
|
|
2447
|
+
A(m.$slots, "optionPdf", {}, void 0, !0)
|
|
2409
2448
|
]),
|
|
2410
2449
|
key: "1"
|
|
2411
2450
|
} : void 0,
|
|
2412
|
-
|
|
2451
|
+
m.$slots.optionImg ? {
|
|
2413
2452
|
name: "optionImg",
|
|
2414
|
-
fn:
|
|
2415
|
-
|
|
2453
|
+
fn: T(() => [
|
|
2454
|
+
A(m.$slots, "optionImg", {}, void 0, !0)
|
|
2416
2455
|
]),
|
|
2417
2456
|
key: "2"
|
|
2418
2457
|
} : void 0,
|
|
2419
|
-
|
|
2458
|
+
m.$slots.optionSvg ? {
|
|
2420
2459
|
name: "optionSvg",
|
|
2421
|
-
fn:
|
|
2422
|
-
|
|
2460
|
+
fn: T(() => [
|
|
2461
|
+
A(m.$slots, "optionSvg", {}, void 0, !0)
|
|
2423
2462
|
]),
|
|
2424
2463
|
key: "3"
|
|
2425
2464
|
} : void 0,
|
|
2426
|
-
|
|
2465
|
+
m.$slots.optionFullscreen ? {
|
|
2427
2466
|
name: "optionFullscreen",
|
|
2428
|
-
fn:
|
|
2429
|
-
|
|
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
|
-
|
|
2472
|
+
m.$slots.optionAnnotator ? {
|
|
2434
2473
|
name: "optionAnnotator",
|
|
2435
|
-
fn:
|
|
2436
|
-
|
|
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
|
-
|
|
2479
|
+
m.$slots.optionZoom ? {
|
|
2441
2480
|
name: "optionZoom",
|
|
2442
|
-
fn:
|
|
2443
|
-
|
|
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
|
-
|
|
2487
|
+
u.value.style.chart.title.text ? (k(), x("div", {
|
|
2449
2488
|
key: 3,
|
|
2450
2489
|
ref_key: "chartTitle",
|
|
2451
|
-
ref:
|
|
2490
|
+
ref: b,
|
|
2452
2491
|
style: "width:100%;background:transparent;"
|
|
2453
2492
|
}, [
|
|
2454
|
-
(k(),
|
|
2493
|
+
(k(), U(Cn, {
|
|
2455
2494
|
key: `title_${M.value}`,
|
|
2456
2495
|
config: {
|
|
2457
2496
|
title: {
|
|
2458
2497
|
cy: "dag-title",
|
|
2459
|
-
...
|
|
2498
|
+
...u.value.style.chart.title
|
|
2460
2499
|
},
|
|
2461
2500
|
subtitle: {
|
|
2462
2501
|
cy: "dag-subtitle",
|
|
2463
|
-
...
|
|
2502
|
+
...u.value.style.chart.title.subtitle
|
|
2464
2503
|
}
|
|
2465
2504
|
}
|
|
2466
2505
|
}, null, 8, ["config"]))
|
|
2467
2506
|
], 512)) : L("", !0),
|
|
2468
|
-
|
|
2507
|
+
u.value.style.chart.controls.position === "top" && !v(ve) && u.value.style.chart.controls.show ? (k(), U(oo, {
|
|
2469
2508
|
key: 4,
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2509
|
+
ref_key: "zoomControls",
|
|
2510
|
+
ref: _,
|
|
2511
|
+
config: u.value,
|
|
2512
|
+
scale: v(Lt),
|
|
2513
|
+
isFullscreen: Q.value,
|
|
2473
2514
|
withDirection: "",
|
|
2474
|
-
onZoomIn:
|
|
2475
|
-
onZoomOut:
|
|
2476
|
-
onResetZoom:
|
|
2477
|
-
onSwitchDirection:
|
|
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
|
-
|
|
2520
|
+
v(E) ? (k(), x("svg", {
|
|
2480
2521
|
key: 5,
|
|
2481
2522
|
ref_key: "svgRef",
|
|
2482
|
-
ref:
|
|
2483
|
-
class:
|
|
2484
|
-
viewBox:
|
|
2485
|
-
xmlns:
|
|
2486
|
-
style:
|
|
2487
|
-
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
|
-
|
|
2493
|
-
|
|
2494
|
-
(k(!0),
|
|
2495
|
-
key:
|
|
2496
|
-
id:
|
|
2497
|
-
markerWidth:
|
|
2498
|
-
markerHeight:
|
|
2499
|
-
refX:
|
|
2500
|
-
refY:
|
|
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
|
-
|
|
2545
|
+
v(E).arrowShape === "normal" ? (k(), x("path", {
|
|
2505
2546
|
key: 0,
|
|
2506
|
-
d: `M 0 0 L ${
|
|
2507
|
-
fill:
|
|
2508
|
-
stroke:
|
|
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,
|
|
2551
|
+
}, null, 8, Nr)) : (k(), x("path", {
|
|
2511
2552
|
key: 1,
|
|
2512
|
-
d: `M 0 0 L ${
|
|
2513
|
-
fill:
|
|
2514
|
-
stroke:
|
|
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,
|
|
2517
|
-
], 8,
|
|
2557
|
+
}, null, 8, Ar))
|
|
2558
|
+
], 8, _r))), 128))
|
|
2518
2559
|
])) : L("", !0),
|
|
2519
|
-
|
|
2520
|
-
(k(!0),
|
|
2521
|
-
key:
|
|
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
|
-
|
|
2564
|
+
G("path", {
|
|
2524
2565
|
"data-cy-edge": "",
|
|
2525
|
-
d:
|
|
2566
|
+
d: h.pathData,
|
|
2526
2567
|
fill: "none",
|
|
2527
|
-
stroke:
|
|
2528
|
-
"stroke-width":
|
|
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,
|
|
2533
|
-
|
|
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:
|
|
2538
|
-
cy:
|
|
2539
|
-
r:
|
|
2540
|
-
fill:
|
|
2541
|
-
stroke:
|
|
2542
|
-
"stroke-width":
|
|
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: (
|
|
2545
|
-
onMouseleave:
|
|
2546
|
-
}, null, 40,
|
|
2585
|
+
onMouseenter: (w) => Wo(h),
|
|
2586
|
+
onMouseleave: Yo
|
|
2587
|
+
}, null, 40, Or)) : L("", !0)
|
|
2547
2588
|
], 64))), 128))
|
|
2548
2589
|
]),
|
|
2549
|
-
|
|
2550
|
-
(k(!0),
|
|
2551
|
-
key:
|
|
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:
|
|
2554
|
-
onMouseenter: (
|
|
2555
|
-
onMouseleave:
|
|
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
|
-
|
|
2558
|
-
|
|
2598
|
+
m.$slots.node ? L("", !0) : (k(), x(ie, { key: 0 }, [
|
|
2599
|
+
G("rect", {
|
|
2559
2600
|
"data-cy-node": "",
|
|
2560
|
-
x:
|
|
2561
|
-
y:
|
|
2562
|
-
width:
|
|
2563
|
-
height:
|
|
2564
|
-
rx:
|
|
2565
|
-
fill:
|
|
2566
|
-
stroke:
|
|
2567
|
-
"stroke-width":
|
|
2568
|
-
style:
|
|
2569
|
-
cursor:
|
|
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,
|
|
2572
|
-
|
|
2612
|
+
}, null, 12, Mr),
|
|
2613
|
+
m.$slots["node-label"] ? (k(), x("text", {
|
|
2573
2614
|
key: 0,
|
|
2574
|
-
x:
|
|
2575
|
-
y:
|
|
2615
|
+
x: h.x,
|
|
2616
|
+
y: h.y + u.value.style.chart.nodes.labels.fontSize / 3,
|
|
2576
2617
|
"text-anchor": "middle",
|
|
2577
|
-
"font-size":
|
|
2578
|
-
fill:
|
|
2579
|
-
"font-weight":
|
|
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
|
-
|
|
2582
|
-
|
|
2622
|
+
A(m.$slots, "node-label", Bt({ ref_for: !0 }, { node: h }), () => [
|
|
2623
|
+
nn(le(h.label), 1)
|
|
2583
2624
|
], !0)
|
|
2584
|
-
], 8,
|
|
2625
|
+
], 8, $r)) : (k(), x("text", {
|
|
2585
2626
|
key: 1,
|
|
2586
2627
|
"data-cy-node-label": "",
|
|
2587
|
-
x:
|
|
2588
|
-
y:
|
|
2628
|
+
x: h.x,
|
|
2629
|
+
y: h.y + u.value.style.chart.nodes.labels.fontSize / 3,
|
|
2589
2630
|
"text-anchor": "middle",
|
|
2590
|
-
"font-size":
|
|
2591
|
-
fill:
|
|
2592
|
-
"font-weight":
|
|
2593
|
-
innerHTML:
|
|
2594
|
-
content:
|
|
2595
|
-
fontSize:
|
|
2596
|
-
fontWeight:
|
|
2597
|
-
fill:
|
|
2598
|
-
x:
|
|
2599
|
-
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,
|
|
2643
|
+
}, null, 8, Dr))
|
|
2603
2644
|
], 64)),
|
|
2604
|
-
|
|
2645
|
+
m.$slots.node ? (k(), x("foreignObject", {
|
|
2605
2646
|
key: 1,
|
|
2606
|
-
x:
|
|
2607
|
-
y:
|
|
2608
|
-
width:
|
|
2609
|
-
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
|
-
|
|
2612
|
-
], 8,
|
|
2613
|
-
], 40,
|
|
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
|
-
|
|
2616
|
-
(k(!0),
|
|
2617
|
-
key:
|
|
2618
|
-
d:
|
|
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":
|
|
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":
|
|
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,
|
|
2667
|
+
}, null, 8, zr))), 128))
|
|
2627
2668
|
]),
|
|
2628
|
-
|
|
2669
|
+
A(m.$slots, "svg", {
|
|
2629
2670
|
svg: {
|
|
2630
|
-
drawingArea:
|
|
2631
|
-
data:
|
|
2671
|
+
drawingArea: v(St),
|
|
2672
|
+
data: v(E)
|
|
2632
2673
|
}
|
|
2633
2674
|
}, void 0, !0)
|
|
2634
|
-
], 14,
|
|
2635
|
-
|
|
2636
|
-
|
|
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
|
-
|
|
2639
|
-
default:
|
|
2640
|
-
|
|
2679
|
+
ae(Vt, { name: "fade" }, {
|
|
2680
|
+
default: T(() => [
|
|
2681
|
+
Oe.value ? (k(), U(It, {
|
|
2641
2682
|
key: 0,
|
|
2642
|
-
to:
|
|
2683
|
+
to: Q.value ? f.value : "body"
|
|
2643
2684
|
}, [
|
|
2644
|
-
|
|
2685
|
+
G("div", {
|
|
2645
2686
|
"data-cy-tooltip-midpoint": "",
|
|
2646
2687
|
ref_key: "tooltipRef",
|
|
2647
|
-
ref:
|
|
2688
|
+
ref: Se,
|
|
2648
2689
|
class: "vue-ui-dag-tooltip",
|
|
2649
|
-
style:
|
|
2650
|
-
...
|
|
2651
|
-
maxWidth:
|
|
2652
|
-
"--vue-data-ui-dag-tooltip-background":
|
|
2653
|
-
"--vue-data-ui-dag-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":
|
|
2696
|
+
"data-position": he.value
|
|
2656
2697
|
}, [
|
|
2657
|
-
|
|
2658
|
-
|
|
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,
|
|
2701
|
+
], 12, Vr)
|
|
2661
2702
|
], 8, ["to"])) : L("", !0)
|
|
2662
2703
|
]),
|
|
2663
2704
|
_: 3
|
|
2664
2705
|
}),
|
|
2665
|
-
|
|
2666
|
-
default:
|
|
2667
|
-
|
|
2706
|
+
ae(Vt, { name: "fade" }, {
|
|
2707
|
+
default: T(() => [
|
|
2708
|
+
K.value ? (k(), U(It, {
|
|
2668
2709
|
key: 0,
|
|
2669
|
-
to:
|
|
2710
|
+
to: Q.value ? f.value : "body"
|
|
2670
2711
|
}, [
|
|
2671
|
-
|
|
2712
|
+
G("div", {
|
|
2672
2713
|
"data-cy-tooltip-node": "",
|
|
2673
2714
|
ref_key: "nodeTooltipRef",
|
|
2674
|
-
ref:
|
|
2715
|
+
ref: Ve,
|
|
2675
2716
|
class: "vue-ui-dag-node-tooltip",
|
|
2676
|
-
style:
|
|
2677
|
-
maxWidth:
|
|
2678
|
-
left:
|
|
2679
|
-
top:
|
|
2680
|
-
"--vue-data-ui-dag-node-tooltip-background":
|
|
2681
|
-
"--vue-data-ui-dag-node-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":
|
|
2724
|
+
"data-position": ft.value
|
|
2684
2725
|
}, [
|
|
2685
|
-
|
|
2686
|
-
|
|
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,
|
|
2729
|
+
], 12, Gr)
|
|
2689
2730
|
], 8, ["to"])) : L("", !0)
|
|
2690
2731
|
]),
|
|
2691
2732
|
_: 3
|
|
2692
2733
|
}),
|
|
2693
|
-
|
|
2734
|
+
u.value.style.chart.controls.position === "bottom" && !v(ve) && u.value.style.chart.controls.show ? (k(), U(oo, {
|
|
2694
2735
|
key: 7,
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2736
|
+
ref_key: "zoomControls",
|
|
2737
|
+
ref: _,
|
|
2738
|
+
config: u.value,
|
|
2739
|
+
scale: v(Lt),
|
|
2740
|
+
isFullscreen: Q.value,
|
|
2698
2741
|
withDirection: "",
|
|
2699
|
-
onZoomIn:
|
|
2700
|
-
onZoomOut:
|
|
2701
|
-
onResetZoom:
|
|
2702
|
-
onSwitchDirection:
|
|
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
|
-
|
|
2747
|
+
m.$slots.source ? (k(), x("div", {
|
|
2705
2748
|
key: 8,
|
|
2706
2749
|
ref_key: "source",
|
|
2707
|
-
ref:
|
|
2750
|
+
ref: N,
|
|
2708
2751
|
dir: "auto"
|
|
2709
2752
|
}, [
|
|
2710
|
-
|
|
2753
|
+
A(m.$slots, "source", {}, void 0, !0)
|
|
2711
2754
|
], 512)) : L("", !0),
|
|
2712
|
-
|
|
2713
|
-
], 46,
|
|
2755
|
+
v(ve) ? (k(), U(bn, { key: 9 })) : L("", !0)
|
|
2756
|
+
], 46, kr));
|
|
2714
2757
|
}
|
|
2715
|
-
},
|
|
2758
|
+
}, Yr = /* @__PURE__ */ ro(Wr, [["__scopeId", "data-v-224df313"]]), fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2716
2759
|
__proto__: null,
|
|
2717
|
-
default:
|
|
2760
|
+
default: Yr
|
|
2718
2761
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2719
2762
|
export {
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
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
|
};
|