vue-data-ui 3.8.1 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PackageVersion-Dc4fCiDF.js → PackageVersion-CR86X4r9.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.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-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-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-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-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-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.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{vue-data-ui-DqfM8Vz8.js → vue-data-ui-DSoAFYh6.js} +56 -56
- package/dist/vue-data-ui.js +57 -57
- package/dist/{vue-ui-3d-bar-CVgWSxvV.js → vue-ui-3d-bar-Dr9yOng4.js} +1 -1
- package/dist/{vue-ui-age-pyramid-7CfFjz5B.js → vue-ui-age-pyramid-D1wY760N.js} +1 -1
- package/dist/{vue-ui-bullet-CkBYg2ju.js → vue-ui-bullet-CATRx7fX.js} +1 -1
- package/dist/{vue-ui-candlestick-CoNGZeIc.js → vue-ui-candlestick-Wbwh9a_1.js} +1 -1
- package/dist/{vue-ui-carousel-table-DFAWxemP.js → vue-ui-carousel-table-B-3Okj00.js} +1 -1
- package/dist/{vue-ui-chestnut-CWxFxnja.js → vue-ui-chestnut-DEIG2RoM.js} +1 -1
- package/dist/{vue-ui-chord-p2h6IONa.js → vue-ui-chord-enRLQOLg.js} +1 -1
- package/dist/{vue-ui-circle-pack-Dei0aswf.js → vue-ui-circle-pack-Bn-xTRny.js} +1 -1
- package/dist/{vue-ui-cursor-oaIVMRWP.js → vue-ui-cursor-CZ58l0J2.js} +1 -1
- package/dist/{vue-ui-dag-D0ImsCHg.js → vue-ui-dag-CeF87qTR.js} +629 -610
- package/dist/{vue-ui-dashboard-DpotsaP2.js → vue-ui-dashboard-DIRH3qPO.js} +54 -54
- package/dist/{vue-ui-donut-DsCBPM7k.js → vue-ui-donut-CL2l-Mq-.js} +1 -1
- package/dist/{vue-ui-donut-evolution-mSDD8tt9.js → vue-ui-donut-evolution-DrdfQnMs.js} +1 -1
- package/dist/{vue-ui-dumbbell-CU9Bqy_T.js → vue-ui-dumbbell-CDq2-NBe.js} +1 -1
- package/dist/{vue-ui-flow-BxjQr6zQ.js → vue-ui-flow-Y9omWd2u.js} +1 -1
- package/dist/{vue-ui-funnel-Cs2_wFOA.js → vue-ui-funnel-BCVF1KTv.js} +1 -1
- package/dist/{vue-ui-galaxy-CFbE4FoS.js → vue-ui-galaxy-D7DBAhIy.js} +1 -1
- package/dist/{vue-ui-gauge-6g1fkJjW.js → vue-ui-gauge-BlxvYBkd.js} +1 -1
- package/dist/{vue-ui-gizmo-BzUlvG3U.js → vue-ui-gizmo-TAA6z0iU.js} +1 -1
- package/dist/{vue-ui-heatmap-B9Sc1Qym.js → vue-ui-heatmap-BS1CinF0.js} +1 -1
- package/dist/{vue-ui-history-plot-CpskzQg2.js → vue-ui-history-plot-DNgE02I6.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-DMByg_zj.js → vue-ui-horizontal-bar-DQcgNmg8.js} +1 -1
- package/dist/{vue-ui-molecule-y8AOUQvZ.js → vue-ui-molecule-Dp_ZSzsj.js} +1 -1
- package/dist/{vue-ui-mood-radar--XevYXsy.js → vue-ui-mood-radar-BdRrOGLR.js} +1 -1
- package/dist/{vue-ui-nested-donuts-A-J72aa_.js → vue-ui-nested-donuts-AIyLN3zs.js} +1 -1
- package/dist/{vue-ui-onion-CZH1uzU_.js → vue-ui-onion-VFqPdMEh.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-px6mudIa.js → vue-ui-parallel-coordinate-plot-E9SLS7RW.js} +1 -1
- package/dist/{vue-ui-quadrant-Cnh6vISS.js → vue-ui-quadrant-BcbUHmkA.js} +1 -1
- package/dist/{vue-ui-quick-chart-CA1Yns69.js → vue-ui-quick-chart-DOCz-s43.js} +1 -1
- package/dist/{vue-ui-radar-CwL0pqRH.js → vue-ui-radar-BIGTJvWQ.js} +1 -1
- package/dist/{vue-ui-relation-circle-B-sm1VFO.js → vue-ui-relation-circle-C3TjhX13.js} +1 -1
- package/dist/{vue-ui-ridgeline-DC2uKfbu.js → vue-ui-ridgeline-BCvf2QDN.js} +1 -1
- package/dist/{vue-ui-rings-CKOzGb8B.js → vue-ui-rings-IrmvR-uv.js} +1 -1
- package/dist/{vue-ui-scatter-C1ajpkcR.js → vue-ui-scatter-ST5ZySnk.js} +1 -1
- package/dist/{vue-ui-skeleton-D6MjtTX_.js → vue-ui-skeleton-CbF8cNtW.js} +1 -1
- package/dist/{vue-ui-spark-trend-BsVhD00l.js → vue-ui-spark-trend-CIJLfHtS.js} +1 -1
- package/dist/{vue-ui-sparkbar-Drazbrah.js → vue-ui-sparkbar-BVcnZro1.js} +1 -1
- package/dist/{vue-ui-sparkgauge-CRbo19gz.js → vue-ui-sparkgauge-Bzl9AdPu.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-C41IySqq.js → vue-ui-sparkhistogram-nEOjS0kw.js} +1 -1
- package/dist/{vue-ui-sparkline-DhMJlZAj.js → vue-ui-sparkline-DBMs4QF-.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-DfyfDxF-.js → vue-ui-sparkstackbar-Drqffzag.js} +1 -1
- package/dist/{vue-ui-stackbar-DnDjTmzg.js → vue-ui-stackbar-DmECmpBp.js} +1 -1
- package/dist/{vue-ui-stackline-DYVq55D8.js → vue-ui-stackline-CDWhnKV8.js} +1 -1
- package/dist/{vue-ui-strip-plot-DDEm7mMm.js → vue-ui-strip-plot-BSkWmE37.js} +1 -1
- package/dist/{vue-ui-table-RCYr7_oK.js → vue-ui-table-DhKfklhX.js} +2 -2
- package/dist/{vue-ui-table-sparkline-cheUhGm3.js → vue-ui-table-sparkline-BB7y9MEg.js} +1 -1
- package/dist/{vue-ui-thermometer-BheFELBN.js → vue-ui-thermometer-KpasFVWs.js} +1 -1
- package/dist/{vue-ui-timer-DUaqMYu9.js → vue-ui-timer-CSesYHmN.js} +1 -1
- package/dist/{vue-ui-tiremarks-CzEPq7Qm.js → vue-ui-tiremarks-DfXDAMEy.js} +1 -1
- package/dist/{vue-ui-treemap-JmxDMTGO.js → vue-ui-treemap-80KNxaAC.js} +1 -1
- package/dist/{vue-ui-waffle-Bd_MQwxV.js → vue-ui-waffle-IsPJ8tOx.js} +1 -1
- package/dist/{vue-ui-wheel-BfR7YioI.js → vue-ui-wheel-BQZ0ABos.js} +1 -1
- package/dist/{vue-ui-word-cloud-CI2APc9f.js → vue-ui-word-cloud-Dx0HYmL4.js} +1 -1
- package/dist/{vue-ui-world-3Oy8hJ6R.js → vue-ui-world-Cvop-Bfx.js} +1 -1
- package/dist/{vue-ui-xy-BWzZbqJo.js → vue-ui-xy-5xj16K5g.js} +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { c as
|
|
1
|
+
import { ref as k, watchEffect as Jo, unref as v, createElementBlock as _, openBlock as y, normalizeStyle as X, normalizeClass as it, createElementVNode as j, createCommentVNode as S, createVNode as ae, toDisplayString as le, defineAsyncComponent as qe, toRefs as Qo, computed as Y, onMounted as Vt, nextTick as De, watch as Fe, onBeforeUnmount as en, createBlock as U, withCtx as M, renderSlot as A, normalizeProps as B, guardReactiveProps as V, createSlots as tn, Fragment as ie, renderList as Pe, withModifiers as on, mergeProps as Ke, createTextVNode as nn, Transition as It, Teleport as Gt } from "vue";
|
|
2
|
+
import { c as lt, 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
3
|
import { t as fn, u as hn } from "./useResponsive-DfdjqQps.js";
|
|
4
4
|
import { u as mn } from "./usePanZoom-DMfuOfaC.js";
|
|
5
|
-
import { u as gn, a as
|
|
5
|
+
import { u as gn, a as Je } from "./useNestedProp-DH2Pjkde.js";
|
|
6
6
|
import { u as vn, B as bn } from "./BaseScanner-BgWxam9d.js";
|
|
7
7
|
import { u as pn } from "./usePrinter-CjGh4mFJ.js";
|
|
8
8
|
import { u as wn } from "./useSvgExport-DrjCWun4.js";
|
|
@@ -10,7 +10,7 @@ import { u as yn } from "./useThemeCheck-DGJ31Vi5.js";
|
|
|
10
10
|
import { u as kn } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as En } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
12
|
import Cn from "./Title-CWX8otQg.js";
|
|
13
|
-
import
|
|
13
|
+
import Qe from "./BaseIcon-CALhpING.js";
|
|
14
14
|
import { _ as ro } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
import xn from "./img-CwrkWkkl.js";
|
|
16
16
|
const _n = "\0", te = "\0", Wt = "";
|
|
@@ -128,8 +128,8 @@ class q {
|
|
|
128
128
|
*/
|
|
129
129
|
setNodes(t, o) {
|
|
130
130
|
const n = arguments, s = this;
|
|
131
|
-
return t.forEach((
|
|
132
|
-
n.length > 1 ? s.setNode(
|
|
131
|
+
return t.forEach((i) => {
|
|
132
|
+
n.length > 1 ? s.setNode(i, o) : s.setNode(i);
|
|
133
133
|
}), this;
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
@@ -274,17 +274,17 @@ class q {
|
|
|
274
274
|
});
|
|
275
275
|
o.setGraph(this.graph());
|
|
276
276
|
const n = this;
|
|
277
|
-
Object.entries(this._nodes).forEach(([
|
|
278
|
-
t(
|
|
279
|
-
}), Object.values(this._edgeObjs).forEach((
|
|
280
|
-
o.hasNode(
|
|
277
|
+
Object.entries(this._nodes).forEach(([r, l]) => {
|
|
278
|
+
t(r) && o.setNode(r, l);
|
|
279
|
+
}), Object.values(this._edgeObjs).forEach((r) => {
|
|
280
|
+
o.hasNode(r.v) && o.hasNode(r.w) && o.setEdge(r, n.edge(r));
|
|
281
281
|
});
|
|
282
282
|
const s = {};
|
|
283
|
-
function r
|
|
284
|
-
const l = n.parent(
|
|
285
|
-
return l === void 0 || o.hasNode(l) ? (s[
|
|
283
|
+
function i(r) {
|
|
284
|
+
const l = n.parent(r);
|
|
285
|
+
return l === void 0 || o.hasNode(l) ? (s[r] = l, l) : l in s ? s[l] : i(l);
|
|
286
286
|
}
|
|
287
|
-
return this._isCompound && o.nodes().forEach((
|
|
287
|
+
return this._isCompound && o.nodes().forEach((r) => o.setParent(r, i(r))), o;
|
|
288
288
|
}
|
|
289
289
|
/* === Edge functions ========== */
|
|
290
290
|
/**
|
|
@@ -319,7 +319,7 @@ class q {
|
|
|
319
319
|
*/
|
|
320
320
|
setPath(t, o) {
|
|
321
321
|
const n = this, s = arguments;
|
|
322
|
-
return t.reduce((
|
|
322
|
+
return t.reduce((i, r) => (s.length > 1 ? n.setEdge(i, r, o) : n.setEdge(i, r), r)), this;
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
325
325
|
* Creates or updates the label for the edge (v, w) with the optionally supplied
|
|
@@ -328,15 +328,15 @@ class q {
|
|
|
328
328
|
* be assigned. The name parameter is only useful with multigraphs.
|
|
329
329
|
*/
|
|
330
330
|
setEdge() {
|
|
331
|
-
let t, o, n, s,
|
|
332
|
-
const
|
|
333
|
-
typeof
|
|
331
|
+
let t, o, n, s, i = !1;
|
|
332
|
+
const r = arguments[0];
|
|
333
|
+
typeof r == "object" && r !== null && "v" in r ? (t = r.v, o = r.w, n = r.name, arguments.length === 2 && (s = arguments[1], i = !0)) : (t = r, o = arguments[1], n = arguments[3], arguments.length > 2 && (s = arguments[2], i = !0)), t = "" + t, o = "" + o, n !== void 0 && (n = "" + n);
|
|
334
334
|
let l = Ee(this._isDirected, t, o, n);
|
|
335
335
|
if (Object.hasOwn(this._edgeLabels, l))
|
|
336
|
-
return
|
|
336
|
+
return i && (this._edgeLabels[l] = s), this;
|
|
337
337
|
if (n !== void 0 && !this._isMultigraph)
|
|
338
338
|
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
339
|
-
this.setNode(t), this.setNode(o), this._edgeLabels[l] =
|
|
339
|
+
this.setNode(t), this.setNode(o), this._edgeLabels[l] = i ? s : this._defaultEdgeLabelFn(t, o, n);
|
|
340
340
|
const a = Nn(this._isDirected, t, o, n);
|
|
341
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;
|
|
342
342
|
}
|
|
@@ -345,7 +345,7 @@ class q {
|
|
|
345
345
|
* Complexity: O(1).
|
|
346
346
|
*/
|
|
347
347
|
edge(t, o, n) {
|
|
348
|
-
const s = arguments.length === 1 ?
|
|
348
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n);
|
|
349
349
|
return this._edgeLabels[s];
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
@@ -361,7 +361,7 @@ class q {
|
|
|
361
361
|
* Complexity: O(1).
|
|
362
362
|
*/
|
|
363
363
|
hasEdge(t, o, n) {
|
|
364
|
-
const s = arguments.length === 1 ?
|
|
364
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n);
|
|
365
365
|
return Object.hasOwn(this._edgeLabels, s);
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
@@ -369,8 +369,8 @@ class q {
|
|
|
369
369
|
* Complexity: O(1).
|
|
370
370
|
*/
|
|
371
371
|
removeEdge(t, o, n) {
|
|
372
|
-
const s = arguments.length === 1 ?
|
|
373
|
-
return
|
|
372
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ee(this._isDirected, t, o, n), i = this._edgeObjs[s];
|
|
373
|
+
return i && (t = i.v, o = i.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;
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
376
|
* Return all edges that point to the node v. Optionally filters those edges down to just those
|
|
@@ -381,7 +381,7 @@ class q {
|
|
|
381
381
|
const n = this._in[t];
|
|
382
382
|
if (n) {
|
|
383
383
|
const s = Object.values(n);
|
|
384
|
-
return o ? s.filter((
|
|
384
|
+
return o ? s.filter((i) => i.v === o) : s;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
@@ -393,7 +393,7 @@ class q {
|
|
|
393
393
|
const n = this._out[t];
|
|
394
394
|
if (n) {
|
|
395
395
|
const s = Object.values(n);
|
|
396
|
-
return o ? s.filter((
|
|
396
|
+
return o ? s.filter((i) => i.w === o) : s;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -414,23 +414,23 @@ function Ht(e, t) {
|
|
|
414
414
|
--e[t] || delete e[t];
|
|
415
415
|
}
|
|
416
416
|
function Ee(e, t, o, n) {
|
|
417
|
-
let s = "" + t,
|
|
418
|
-
if (!e && s >
|
|
419
|
-
const
|
|
420
|
-
s =
|
|
417
|
+
let s = "" + t, i = "" + o;
|
|
418
|
+
if (!e && s > i) {
|
|
419
|
+
const r = s;
|
|
420
|
+
s = i, i = r;
|
|
421
421
|
}
|
|
422
|
-
return s + Wt +
|
|
422
|
+
return s + Wt + i + Wt + (n === void 0 ? _n : n);
|
|
423
423
|
}
|
|
424
424
|
function Nn(e, t, o, n) {
|
|
425
|
-
let s = "" + t,
|
|
426
|
-
if (!e && s >
|
|
425
|
+
let s = "" + t, i = "" + o;
|
|
426
|
+
if (!e && s > i) {
|
|
427
427
|
const l = s;
|
|
428
|
-
s =
|
|
428
|
+
s = i, i = l;
|
|
429
429
|
}
|
|
430
|
-
const
|
|
431
|
-
return n && (
|
|
430
|
+
const r = { v: s, w: i };
|
|
431
|
+
return n && (r.name = n), r;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function et(e, t) {
|
|
434
434
|
return Ee(e, t.v, t.w, t.name);
|
|
435
435
|
}
|
|
436
436
|
class An {
|
|
@@ -466,39 +466,39 @@ const Ln = () => 1;
|
|
|
466
466
|
function On(e, t) {
|
|
467
467
|
if (e.nodeCount() <= 1)
|
|
468
468
|
return [];
|
|
469
|
-
const o =
|
|
470
|
-
return
|
|
469
|
+
const o = Rn(e, t || Ln);
|
|
470
|
+
return Tn(o.graph, o.buckets, o.zeroIndex).flatMap((s) => e.outEdges(s.v, s.w));
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Tn(e, t, o) {
|
|
473
473
|
let n = [];
|
|
474
|
-
const s = t[t.length - 1],
|
|
475
|
-
let
|
|
474
|
+
const s = t[t.length - 1], i = t[0];
|
|
475
|
+
let r;
|
|
476
476
|
for (; e.nodeCount(); ) {
|
|
477
|
-
for (;
|
|
478
|
-
|
|
479
|
-
for (;
|
|
480
|
-
|
|
477
|
+
for (; r = i.dequeue(); )
|
|
478
|
+
tt(e, t, o, r);
|
|
479
|
+
for (; r = s.dequeue(); )
|
|
480
|
+
tt(e, t, o, r);
|
|
481
481
|
if (e.nodeCount()) {
|
|
482
482
|
for (let l = t.length - 2; l > 0; --l)
|
|
483
|
-
if (
|
|
484
|
-
n = n.concat(
|
|
483
|
+
if (r = t[l].dequeue(), r) {
|
|
484
|
+
n = n.concat(tt(e, t, o, r, !0));
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
return n;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
const
|
|
493
|
-
return e.inEdges(n.v).forEach((
|
|
494
|
-
const l = e.edge(
|
|
495
|
-
s &&
|
|
496
|
-
}), e.outEdges(n.v).forEach((
|
|
497
|
-
const l = e.edge(
|
|
498
|
-
a.in -= l,
|
|
499
|
-
}), e.removeNode(n.v),
|
|
500
|
-
}
|
|
501
|
-
function
|
|
491
|
+
function tt(e, t, o, n, s) {
|
|
492
|
+
const i = s ? [] : void 0;
|
|
493
|
+
return e.inEdges(n.v).forEach((r) => {
|
|
494
|
+
const l = e.edge(r), a = e.node(r.v);
|
|
495
|
+
s && i.push({ v: r.v, w: r.w }), a.out -= l, at(t, o, a);
|
|
496
|
+
}), e.outEdges(n.v).forEach((r) => {
|
|
497
|
+
const l = e.edge(r), a = e.node(r.w);
|
|
498
|
+
a.in -= l, at(t, o, a);
|
|
499
|
+
}), e.removeNode(n.v), i;
|
|
500
|
+
}
|
|
501
|
+
function Rn(e, t) {
|
|
502
502
|
const o = new q();
|
|
503
503
|
let n = 0, s = 0;
|
|
504
504
|
e.nodes().forEach((l) => {
|
|
@@ -507,16 +507,16 @@ function Tn(e, t) {
|
|
|
507
507
|
const a = o.edge(l.v, l.w) || 0, c = t(l), d = a + c;
|
|
508
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);
|
|
509
509
|
});
|
|
510
|
-
const
|
|
510
|
+
const i = Mn(s + n + 3).map(() => new An()), r = n + 1;
|
|
511
511
|
return o.nodes().forEach((l) => {
|
|
512
|
-
|
|
512
|
+
at(i, r, o.node(l));
|
|
513
513
|
}), {
|
|
514
514
|
graph: o,
|
|
515
|
-
buckets:
|
|
516
|
-
zeroIndex:
|
|
515
|
+
buckets: i,
|
|
516
|
+
zeroIndex: r
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function at(e, t, o) {
|
|
520
520
|
o.out ? o.in ? e[o.out - o.in + t].enqueue(o) : e[e.length - 1].enqueue(o) : e[0].enqueue(o);
|
|
521
521
|
}
|
|
522
522
|
function Mn(e) {
|
|
@@ -528,7 +528,7 @@ function Mn(e) {
|
|
|
528
528
|
function ue(e, t, o, n) {
|
|
529
529
|
let s = n;
|
|
530
530
|
for (; e.hasNode(s); )
|
|
531
|
-
s =
|
|
531
|
+
s = Be(n);
|
|
532
532
|
return o.dummy = t, e.setNode(s, o), s;
|
|
533
533
|
}
|
|
534
534
|
function io(e) {
|
|
@@ -543,7 +543,7 @@ function io(e) {
|
|
|
543
543
|
});
|
|
544
544
|
}), t;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function ut(e) {
|
|
547
547
|
const t = new q({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
548
548
|
return e.nodes().forEach((o) => {
|
|
549
549
|
e.children(o).length || t.setNode(o, e.node(o));
|
|
@@ -558,7 +558,7 @@ function $n(e) {
|
|
|
558
558
|
n[s.w] = (n[s.w] || 0) + e.edge(s).weight;
|
|
559
559
|
}), n;
|
|
560
560
|
});
|
|
561
|
-
return
|
|
561
|
+
return Ve(e.nodes(), t);
|
|
562
562
|
}
|
|
563
563
|
function Dn(e) {
|
|
564
564
|
const t = e.nodes().map((o) => {
|
|
@@ -567,19 +567,19 @@ function Dn(e) {
|
|
|
567
567
|
n[s.v] = (n[s.v] || 0) + e.edge(s).weight;
|
|
568
568
|
}), n;
|
|
569
569
|
});
|
|
570
|
-
return
|
|
570
|
+
return Ve(e.nodes(), t);
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function ct(e, t) {
|
|
573
573
|
let o = e.x, n = e.y;
|
|
574
|
-
const s = t.x - o,
|
|
575
|
-
let
|
|
576
|
-
if (!s && !
|
|
574
|
+
const s = t.x - o, i = t.y - n;
|
|
575
|
+
let r = e.width / 2, l = e.height / 2;
|
|
576
|
+
if (!s && !i)
|
|
577
577
|
throw new Error("Not possible to find intersection inside of the rectangle");
|
|
578
578
|
let a, c;
|
|
579
|
-
return Math.abs(
|
|
579
|
+
return Math.abs(i) * r > Math.abs(s) * l ? (i < 0 && (l = -l), a = l * s / i, c = l) : (s < 0 && (r = -r), a = r, c = r * i / s), { x: o + a, y: n + c };
|
|
580
580
|
}
|
|
581
581
|
function _e(e) {
|
|
582
|
-
const t = ce(
|
|
582
|
+
const t = ce(dt(e) + 1).map(() => []);
|
|
583
583
|
return e.nodes().forEach((o) => {
|
|
584
584
|
const n = e.node(o), s = n.rank;
|
|
585
585
|
s !== void 0 && (t[s][n.order] = o);
|
|
@@ -589,22 +589,22 @@ function lo(e) {
|
|
|
589
589
|
const t = e.nodes().map((n) => {
|
|
590
590
|
const s = e.node(n).rank;
|
|
591
591
|
return s === void 0 ? Number.MAX_VALUE : s;
|
|
592
|
-
}), o =
|
|
592
|
+
}), o = W(Math.min, t);
|
|
593
593
|
e.nodes().forEach((n) => {
|
|
594
594
|
const s = e.node(n);
|
|
595
595
|
Object.hasOwn(s, "rank") && (s.rank -= o);
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
function ao(e) {
|
|
599
|
-
const t = e.nodes().map((
|
|
600
|
-
e.nodes().forEach((
|
|
601
|
-
const l = e.node(
|
|
602
|
-
n[l] || (n[l] = []), n[l].push(
|
|
599
|
+
const t = e.nodes().map((r) => e.node(r).rank).filter((r) => r !== void 0), o = W(Math.min, t), n = [];
|
|
600
|
+
e.nodes().forEach((r) => {
|
|
601
|
+
const l = e.node(r).rank - o;
|
|
602
|
+
n[l] || (n[l] = []), n[l].push(r);
|
|
603
603
|
});
|
|
604
604
|
let s = 0;
|
|
605
|
-
const
|
|
606
|
-
Array.from(n).forEach((
|
|
607
|
-
|
|
605
|
+
const i = e.graph().nodeRankFactor;
|
|
606
|
+
Array.from(n).forEach((r, l) => {
|
|
607
|
+
r === void 0 && l % i !== 0 ? --s : r !== void 0 && s && r.forEach((a) => {
|
|
608
608
|
e.node(a).rank += s;
|
|
609
609
|
});
|
|
610
610
|
});
|
|
@@ -625,7 +625,7 @@ function Pn(e, t = co) {
|
|
|
625
625
|
}
|
|
626
626
|
return o;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function W(e, t) {
|
|
629
629
|
if (t.length > co) {
|
|
630
630
|
const o = Pn(t);
|
|
631
631
|
return e.apply(
|
|
@@ -635,12 +635,12 @@ function j(e, t) {
|
|
|
635
635
|
} else
|
|
636
636
|
return e.apply(null, t);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function dt(e) {
|
|
639
639
|
const o = e.nodes().map((n) => {
|
|
640
640
|
const s = e.node(n).rank;
|
|
641
641
|
return s === void 0 ? Number.MIN_VALUE : s;
|
|
642
642
|
});
|
|
643
|
-
return
|
|
643
|
+
return W(Math.max, o);
|
|
644
644
|
}
|
|
645
645
|
function uo(e, t) {
|
|
646
646
|
const o = { lhs: [], rhs: [] };
|
|
@@ -660,17 +660,17 @@ function ho(e, t) {
|
|
|
660
660
|
return t();
|
|
661
661
|
}
|
|
662
662
|
let zn = 0;
|
|
663
|
-
function
|
|
663
|
+
function Be(e) {
|
|
664
664
|
const t = ++zn;
|
|
665
665
|
return e + String(t);
|
|
666
666
|
}
|
|
667
667
|
function ce(e, t, o = 1) {
|
|
668
668
|
t == null && (t = e, e = 0);
|
|
669
|
-
let n = (
|
|
670
|
-
o < 0 && (n = (
|
|
669
|
+
let n = (i) => i < t;
|
|
670
|
+
o < 0 && (n = (i) => t < i);
|
|
671
671
|
const s = [];
|
|
672
|
-
for (let
|
|
673
|
-
s.push(
|
|
672
|
+
for (let i = e; n(i); i += o)
|
|
673
|
+
s.push(i);
|
|
674
674
|
return s;
|
|
675
675
|
}
|
|
676
676
|
function xe(e, t) {
|
|
@@ -685,20 +685,20 @@ function Ne(e, t) {
|
|
|
685
685
|
const n = t;
|
|
686
686
|
o = (s) => s[n];
|
|
687
687
|
}
|
|
688
|
-
return Object.entries(e).reduce((n, [s,
|
|
688
|
+
return Object.entries(e).reduce((n, [s, i]) => (n[s] = o(i, s), n), {});
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Ve(e, t) {
|
|
691
691
|
return e.reduce((o, n, s) => (o[n] = t[s], o), {});
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const ze = {
|
|
694
694
|
addBorderNode: Fn,
|
|
695
695
|
addDummyNode: ue,
|
|
696
|
-
applyWithChunking:
|
|
697
|
-
asNonCompoundGraph:
|
|
696
|
+
applyWithChunking: W,
|
|
697
|
+
asNonCompoundGraph: ut,
|
|
698
698
|
buildLayerMatrix: _e,
|
|
699
|
-
intersectRect:
|
|
699
|
+
intersectRect: ct,
|
|
700
700
|
mapValues: Ne,
|
|
701
|
-
maxRank:
|
|
701
|
+
maxRank: dt,
|
|
702
702
|
normalizeRanks: lo,
|
|
703
703
|
notime: ho,
|
|
704
704
|
partition: uo,
|
|
@@ -709,13 +709,13 @@ const Pe = {
|
|
|
709
709
|
simplify: io,
|
|
710
710
|
successorWeights: $n,
|
|
711
711
|
time: fo,
|
|
712
|
-
uniqueId:
|
|
713
|
-
zipObject:
|
|
712
|
+
uniqueId: Be,
|
|
713
|
+
zipObject: Ve
|
|
714
714
|
};
|
|
715
715
|
function Bn(e) {
|
|
716
716
|
(e.graph().acyclicer === "greedy" ? On(e, o(e)) : In(e)).forEach((n) => {
|
|
717
717
|
const s = e.edge(n);
|
|
718
|
-
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, Be("rev"));
|
|
719
719
|
});
|
|
720
720
|
function o(n) {
|
|
721
721
|
return (s) => n.edge(s).weight;
|
|
@@ -733,10 +733,10 @@ function Vn(e) {
|
|
|
733
733
|
}
|
|
734
734
|
function In(e) {
|
|
735
735
|
const t = [], o = {}, n = {};
|
|
736
|
-
function s(
|
|
737
|
-
Object.hasOwn(n,
|
|
738
|
-
Object.hasOwn(o,
|
|
739
|
-
}), delete o[
|
|
736
|
+
function s(i) {
|
|
737
|
+
Object.hasOwn(n, i) || (n[i] = !0, o[i] = !0, e.outEdges(i).forEach((r) => {
|
|
738
|
+
Object.hasOwn(o, r.w) ? t.push(r) : s(r.w);
|
|
739
|
+
}), delete o[i]);
|
|
740
740
|
}
|
|
741
741
|
return e.nodes().forEach(s), t;
|
|
742
742
|
}
|
|
@@ -745,20 +745,20 @@ function Gn(e) {
|
|
|
745
745
|
}
|
|
746
746
|
function jn(e, t) {
|
|
747
747
|
let o = t.v, n = e.node(o).rank;
|
|
748
|
-
const s = t.w,
|
|
749
|
-
if (
|
|
748
|
+
const s = t.w, i = e.node(s).rank, r = t.name, l = e.edge(t), a = l.labelRank;
|
|
749
|
+
if (i === n + 1)
|
|
750
750
|
return;
|
|
751
751
|
e.removeEdge(t);
|
|
752
752
|
let c, d, f;
|
|
753
|
-
for (f = 0, ++n; n <
|
|
753
|
+
for (f = 0, ++n; n < i; ++f, ++n)
|
|
754
754
|
l.points = [], d = {
|
|
755
755
|
width: 0,
|
|
756
756
|
height: 0,
|
|
757
757
|
edgeLabel: l,
|
|
758
758
|
edgeObj: t,
|
|
759
759
|
rank: n
|
|
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 },
|
|
761
|
-
e.setEdge(o, s, { weight: l.weight },
|
|
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 }, r), f === 0 && e.graph().dummyChains.push(c), o = c;
|
|
761
|
+
e.setEdge(o, s, { weight: l.weight }, r);
|
|
762
762
|
}
|
|
763
763
|
function Wn(e) {
|
|
764
764
|
e.graph().dummyChains.forEach((t) => {
|
|
@@ -778,14 +778,14 @@ function mo(e) {
|
|
|
778
778
|
const s = e.outEdges(o) || [];
|
|
779
779
|
if (!s.length)
|
|
780
780
|
return n && (n.rank = 0), 0;
|
|
781
|
-
const
|
|
781
|
+
const i = s.map((l) => {
|
|
782
782
|
if (!e.node(l.w))
|
|
783
783
|
return Number.POSITIVE_INFINITY;
|
|
784
784
|
const c = t(l.w), d = e.edge(l).minlen;
|
|
785
785
|
return c - d;
|
|
786
786
|
});
|
|
787
|
-
let
|
|
788
|
-
return
|
|
787
|
+
let r = W(Math.min, i);
|
|
788
|
+
return r === Number.POSITIVE_INFINITY && (r = 0), n && (n.rank = r), r;
|
|
789
789
|
}
|
|
790
790
|
(e.sources() || []).forEach(t);
|
|
791
791
|
}
|
|
@@ -795,22 +795,22 @@ function Yn(e, t) {
|
|
|
795
795
|
function Hn(e) {
|
|
796
796
|
Zn(e);
|
|
797
797
|
const t = new q();
|
|
798
|
-
e.nodes().forEach((
|
|
799
|
-
t.setNode(
|
|
798
|
+
e.nodes().forEach((i) => {
|
|
799
|
+
t.setNode(i, {});
|
|
800
800
|
});
|
|
801
801
|
const o = e.nodes();
|
|
802
802
|
if (!o.length)
|
|
803
803
|
return t;
|
|
804
804
|
const n = o[0], s = /* @__PURE__ */ new Set([n]);
|
|
805
805
|
for (; s.size < o.length; ) {
|
|
806
|
-
const
|
|
807
|
-
if (!
|
|
806
|
+
const i = Un(e, s);
|
|
807
|
+
if (!i) {
|
|
808
808
|
const d = o.find((f) => !s.has(f));
|
|
809
809
|
s.add(d), t.setNode(d, {});
|
|
810
810
|
continue;
|
|
811
811
|
}
|
|
812
|
-
const { edgeObject:
|
|
813
|
-
Xn(e, s, a, l), t.setEdge(
|
|
812
|
+
const { edgeObject: r, delta: l, attachFrom: a, attachTo: c } = i;
|
|
813
|
+
Xn(e, s, a, l), t.setEdge(r.v, r.w, {}), s.add(c);
|
|
814
814
|
}
|
|
815
815
|
return t;
|
|
816
816
|
}
|
|
@@ -823,12 +823,12 @@ function Zn(e) {
|
|
|
823
823
|
function Un(e, t) {
|
|
824
824
|
let o = null;
|
|
825
825
|
return e.edges().forEach((n) => {
|
|
826
|
-
const s = t.has(n.v),
|
|
827
|
-
if (s ===
|
|
826
|
+
const s = t.has(n.v), i = t.has(n.w);
|
|
827
|
+
if (s === i)
|
|
828
828
|
return;
|
|
829
|
-
const
|
|
829
|
+
const r = Yn(e, n), l = Math.abs(r);
|
|
830
830
|
if (!o || l < o.absoluteSlack) {
|
|
831
|
-
const a = s ? n.v : n.w, c = s ? n.w : n.v, d = s ?
|
|
831
|
+
const a = s ? n.v : n.w, c = s ? n.w : n.v, d = s ? r : -r;
|
|
832
832
|
o = {
|
|
833
833
|
edgeObject: n,
|
|
834
834
|
delta: d,
|
|
@@ -842,8 +842,8 @@ function Un(e, t) {
|
|
|
842
842
|
function Xn(e, t, o, n) {
|
|
843
843
|
n && e.nodes().forEach((s) => {
|
|
844
844
|
if (!t.has(s)) {
|
|
845
|
-
const
|
|
846
|
-
|
|
845
|
+
const i = e.node(s);
|
|
846
|
+
i.rank += n;
|
|
847
847
|
}
|
|
848
848
|
});
|
|
849
849
|
}
|
|
@@ -904,34 +904,34 @@ function ss(e) {
|
|
|
904
904
|
const t = is(e);
|
|
905
905
|
e.graph().dummyChains.forEach((o) => {
|
|
906
906
|
let n = e.node(o);
|
|
907
|
-
const s = n.edgeObj,
|
|
908
|
-
let a = 0, c =
|
|
907
|
+
const s = n.edgeObj, i = rs(e, t, s.v, s.w), r = i.path, l = i.lca;
|
|
908
|
+
let a = 0, c = r[a], d = !0, f = o;
|
|
909
909
|
for (; f !== s.w; ) {
|
|
910
910
|
if (n = e.node(f), d) {
|
|
911
|
-
for (; (c =
|
|
911
|
+
for (; (c = r[a]) !== l && e.node(c).maxRank < n.rank; )
|
|
912
912
|
a++;
|
|
913
913
|
c === l && (d = !1);
|
|
914
914
|
}
|
|
915
915
|
if (!d) {
|
|
916
|
-
for (; a <
|
|
916
|
+
for (; a < r.length - 1 && e.node(c = r[a + 1]).minRank <= n.rank; )
|
|
917
917
|
a++;
|
|
918
|
-
c =
|
|
918
|
+
c = r[a];
|
|
919
919
|
}
|
|
920
920
|
e.setParent(f, c), f = e.successors(f)[0];
|
|
921
921
|
}
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
924
|
function rs(e, t, o, n) {
|
|
925
|
-
const s = [],
|
|
925
|
+
const s = [], i = [], r = Math.min(t[o].low, t[n].low), l = Math.max(t[o].lim, t[n].lim);
|
|
926
926
|
let a, c;
|
|
927
927
|
a = o;
|
|
928
928
|
do
|
|
929
929
|
a = e.parent(a), s.push(a);
|
|
930
|
-
while (a && (t[a].low >
|
|
930
|
+
while (a && (t[a].low > r || l > t[a].lim));
|
|
931
931
|
for (c = a, a = n; (a = e.parent(a)) !== c; )
|
|
932
|
-
|
|
932
|
+
i.push(a);
|
|
933
933
|
return {
|
|
934
|
-
path: s.concat(
|
|
934
|
+
path: s.concat(i.reverse()),
|
|
935
935
|
lca: c
|
|
936
936
|
};
|
|
937
937
|
}
|
|
@@ -939,50 +939,50 @@ function is(e) {
|
|
|
939
939
|
const t = {};
|
|
940
940
|
let o = 0;
|
|
941
941
|
function n(s) {
|
|
942
|
-
const
|
|
943
|
-
e.children(s).forEach(n), t[s] = { low:
|
|
942
|
+
const i = o;
|
|
943
|
+
e.children(s).forEach(n), t[s] = { low: i, lim: o++ };
|
|
944
944
|
}
|
|
945
945
|
return e.children().forEach(n), t;
|
|
946
946
|
}
|
|
947
947
|
function ls(e) {
|
|
948
|
-
const t =
|
|
948
|
+
const t = ze.addDummyNode(e, "root", {}, "_root"), o = as(e), n = Object.values(o), s = ze.applyWithChunking(Math.max, n) - 1, i = 2 * s + 1;
|
|
949
949
|
e.graph().nestingRoot = t, e.edges().forEach((l) => {
|
|
950
|
-
e.edge(l).minlen *=
|
|
950
|
+
e.edge(l).minlen *= i;
|
|
951
951
|
});
|
|
952
|
-
const
|
|
952
|
+
const r = cs(e) + 1;
|
|
953
953
|
e.children().forEach((l) => {
|
|
954
|
-
vo(e, t,
|
|
955
|
-
}), e.graph().nodeRankFactor =
|
|
954
|
+
vo(e, t, i, r, s, o, l);
|
|
955
|
+
}), e.graph().nodeRankFactor = i;
|
|
956
956
|
}
|
|
957
|
-
function vo(e, t, o, n, s,
|
|
958
|
-
const l = e.children(
|
|
957
|
+
function vo(e, t, o, n, s, i, r) {
|
|
958
|
+
const l = e.children(r);
|
|
959
959
|
if (!l.length) {
|
|
960
|
-
|
|
960
|
+
r !== t && e.setEdge(t, r, { weight: 0, minlen: o });
|
|
961
961
|
return;
|
|
962
962
|
}
|
|
963
|
-
const a =
|
|
964
|
-
e.setParent(a,
|
|
965
|
-
vo(e, t, o, n, s,
|
|
966
|
-
const g = e.node(f), b = g.borderTop ? g.borderTop : f, N = g.borderBottom ? g.borderBottom : f,
|
|
963
|
+
const a = ze.addBorderNode(e, "_bt"), c = ze.addBorderNode(e, "_bb"), d = e.node(r);
|
|
964
|
+
e.setParent(a, r), d.borderTop = a, e.setParent(c, r), d.borderBottom = c, l.forEach((f) => {
|
|
965
|
+
vo(e, t, o, n, s, i, f);
|
|
966
|
+
const g = e.node(f), b = g.borderTop ? g.borderTop : f, N = g.borderBottom ? g.borderBottom : f, x = g.borderTop ? n : 2 * n, T = b !== N ? 1 : s - i[r] + 1;
|
|
967
967
|
e.setEdge(a, b, {
|
|
968
|
-
weight:
|
|
969
|
-
minlen:
|
|
968
|
+
weight: x,
|
|
969
|
+
minlen: T,
|
|
970
970
|
nestingEdge: !0
|
|
971
971
|
}), e.setEdge(N, c, {
|
|
972
|
-
weight:
|
|
973
|
-
minlen:
|
|
972
|
+
weight: x,
|
|
973
|
+
minlen: T,
|
|
974
974
|
nestingEdge: !0
|
|
975
975
|
});
|
|
976
|
-
}), e.parent(
|
|
976
|
+
}), e.parent(r) || e.setEdge(t, a, {
|
|
977
977
|
weight: 0,
|
|
978
|
-
minlen: s + r
|
|
978
|
+
minlen: s + i[r]
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
981
|
function as(e) {
|
|
982
982
|
const t = {};
|
|
983
983
|
function o(n, s) {
|
|
984
|
-
const
|
|
985
|
-
|
|
984
|
+
const i = e.children(n);
|
|
985
|
+
i && i.length && i.forEach((r) => o(r, s + 1)), t[n] = s;
|
|
986
986
|
}
|
|
987
987
|
return e.children().forEach((n) => o(n, 1)), t;
|
|
988
988
|
}
|
|
@@ -1000,20 +1000,20 @@ function ds(e) {
|
|
|
1000
1000
|
const n = e.children(o), s = e.node(o);
|
|
1001
1001
|
if (n.length && n.forEach(t), Object.hasOwn(s, "minRank")) {
|
|
1002
1002
|
s.borderLeft = [], s.borderRight = [];
|
|
1003
|
-
for (let
|
|
1004
|
-
Xt(e, "borderLeft", "_bl", o, s,
|
|
1003
|
+
for (let i = s.minRank, r = s.maxRank + 1; i < r; ++i)
|
|
1004
|
+
Xt(e, "borderLeft", "_bl", o, s, i), Xt(e, "borderRight", "_br", o, s, i);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
e.children().forEach(t);
|
|
1008
1008
|
}
|
|
1009
|
-
function Xt(e, t, o, n, s,
|
|
1010
|
-
const
|
|
1009
|
+
function Xt(e, t, o, n, s, i) {
|
|
1010
|
+
const r = {
|
|
1011
1011
|
width: 0,
|
|
1012
1012
|
height: 0,
|
|
1013
|
-
rank:
|
|
1013
|
+
rank: i,
|
|
1014
1014
|
borderType: t
|
|
1015
|
-
}, l = s[t][
|
|
1016
|
-
s[t][
|
|
1015
|
+
}, l = s[t][i - 1], a = ue(e, "border", r, o);
|
|
1016
|
+
s[t][i] = a, e.setParent(a, n), l && e.setEdge(l, a, { weight: 1 });
|
|
1017
1017
|
}
|
|
1018
1018
|
function fs(e) {
|
|
1019
1019
|
const t = e.graph().rankdir.toLowerCase();
|
|
@@ -1036,24 +1036,24 @@ function qt(e) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
function ms(e) {
|
|
1038
1038
|
e.nodes().forEach((t) => {
|
|
1039
|
-
|
|
1039
|
+
ot(e.node(t));
|
|
1040
1040
|
}), e.edges().forEach((t) => {
|
|
1041
1041
|
const o = e.edge(t);
|
|
1042
|
-
o.points.forEach(
|
|
1042
|
+
o.points.forEach(ot), Object.hasOwn(o, "y") && ot(o);
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function ot(e) {
|
|
1046
1046
|
e.y = -e.y;
|
|
1047
1047
|
}
|
|
1048
1048
|
function gs(e) {
|
|
1049
1049
|
e.nodes().forEach((t) => {
|
|
1050
|
-
|
|
1050
|
+
nt(e.node(t));
|
|
1051
1051
|
}), e.edges().forEach((t) => {
|
|
1052
1052
|
const o = e.edge(t);
|
|
1053
|
-
o.points.forEach(
|
|
1053
|
+
o.points.forEach(nt), Object.hasOwn(o, "x") && nt(o);
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function nt(e) {
|
|
1057
1057
|
const t = e.x;
|
|
1058
1058
|
e.x = e.y, e.y = t;
|
|
1059
1059
|
}
|
|
@@ -1062,16 +1062,16 @@ const Kt = {
|
|
|
1062
1062
|
undo: hs
|
|
1063
1063
|
};
|
|
1064
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 =
|
|
1066
|
-
function
|
|
1065
|
+
const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s = W(Math.max, n), i = ce(s + 1).map(() => []);
|
|
1066
|
+
function r(a) {
|
|
1067
1067
|
if (t[a]) return;
|
|
1068
1068
|
t[a] = !0;
|
|
1069
1069
|
const c = e.node(a);
|
|
1070
|
-
|
|
1070
|
+
i[c.rank].push(a), e.successors(a).forEach(r);
|
|
1071
1071
|
}
|
|
1072
1072
|
return o.sort(
|
|
1073
1073
|
(a, c) => e.node(a).rank - e.node(c).rank
|
|
1074
|
-
).forEach(
|
|
1074
|
+
).forEach(r), i;
|
|
1075
1075
|
}
|
|
1076
1076
|
function bs(e, t) {
|
|
1077
1077
|
let o = 0;
|
|
@@ -1080,21 +1080,21 @@ function bs(e, t) {
|
|
|
1080
1080
|
return o;
|
|
1081
1081
|
}
|
|
1082
1082
|
function ps(e, t, o) {
|
|
1083
|
-
const n =
|
|
1083
|
+
const n = Ve(
|
|
1084
1084
|
o,
|
|
1085
1085
|
o.map((c, d) => d)
|
|
1086
1086
|
), s = t.flatMap((c) => e.outEdges(c).map((d) => ({
|
|
1087
1087
|
pos: n[d.w],
|
|
1088
1088
|
weight: e.edge(d).weight
|
|
1089
1089
|
})).sort((d, f) => d.pos - f.pos));
|
|
1090
|
-
let
|
|
1091
|
-
for (;
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
const l = new Array(
|
|
1090
|
+
let i = 1;
|
|
1091
|
+
for (; i < o.length; ) i <<= 1;
|
|
1092
|
+
const r = 2 * i - 1;
|
|
1093
|
+
i -= 1;
|
|
1094
|
+
const l = new Array(r).fill(0);
|
|
1095
1095
|
let a = 0;
|
|
1096
1096
|
return s.forEach((c) => {
|
|
1097
|
-
let d = c.pos +
|
|
1097
|
+
let d = c.pos + i;
|
|
1098
1098
|
l[d] += c.weight;
|
|
1099
1099
|
let f = 0;
|
|
1100
1100
|
for (; d > 0; )
|
|
@@ -1108,11 +1108,11 @@ function ws(e, t = []) {
|
|
|
1108
1108
|
if (!n.length)
|
|
1109
1109
|
return { v: o };
|
|
1110
1110
|
const s = n.reduce(
|
|
1111
|
-
(
|
|
1112
|
-
const l = e.edge(
|
|
1111
|
+
(i, r) => {
|
|
1112
|
+
const l = e.edge(r), a = e.node(r.v);
|
|
1113
1113
|
return {
|
|
1114
|
-
sum:
|
|
1115
|
-
weight:
|
|
1114
|
+
sum: i.sum + l.weight * a.order,
|
|
1115
|
+
weight: i.weight + l.weight
|
|
1116
1116
|
};
|
|
1117
1117
|
},
|
|
1118
1118
|
{ sum: 0, weight: 0 }
|
|
@@ -1126,18 +1126,18 @@ function ws(e, t = []) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
function ys(e, t) {
|
|
1128
1128
|
const o = {};
|
|
1129
|
-
e.forEach((s,
|
|
1130
|
-
const
|
|
1129
|
+
e.forEach((s, i) => {
|
|
1130
|
+
const r = o[s.v] = {
|
|
1131
1131
|
indegree: 0,
|
|
1132
1132
|
in: [],
|
|
1133
1133
|
out: [],
|
|
1134
1134
|
vs: [s.v],
|
|
1135
|
-
i
|
|
1135
|
+
i
|
|
1136
1136
|
};
|
|
1137
|
-
s.barycenter !== void 0 && (
|
|
1137
|
+
s.barycenter !== void 0 && (r.barycenter = s.barycenter, r.weight = s.weight);
|
|
1138
1138
|
}), t.edges().forEach((s) => {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1139
|
+
const i = o[s.v], r = o[s.w];
|
|
1140
|
+
i !== void 0 && r !== void 0 && (r.indegree++, i.out.push(r));
|
|
1141
1141
|
});
|
|
1142
1142
|
const n = Object.values(o).filter((s) => !s.indegree);
|
|
1143
1143
|
return ks(n);
|
|
@@ -1145,13 +1145,13 @@ function ys(e, t) {
|
|
|
1145
1145
|
function ks(e) {
|
|
1146
1146
|
const t = [];
|
|
1147
1147
|
function o(s) {
|
|
1148
|
-
return (
|
|
1149
|
-
|
|
1148
|
+
return (i) => {
|
|
1149
|
+
i.merged || (i.barycenter === void 0 || s.barycenter === void 0 || i.barycenter >= s.barycenter) && Es(s, i);
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
1152
|
function n(s) {
|
|
1153
|
-
return (
|
|
1154
|
-
|
|
1153
|
+
return (i) => {
|
|
1154
|
+
i.in.push(s), --i.indegree === 0 && e.push(i);
|
|
1155
1155
|
};
|
|
1156
1156
|
}
|
|
1157
1157
|
for (; e.length; ) {
|
|
@@ -1165,13 +1165,13 @@ function Es(e, t) {
|
|
|
1165
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;
|
|
1166
1166
|
}
|
|
1167
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),
|
|
1169
|
-
let
|
|
1170
|
-
n.sort(xs(!!t)), a = Jt(
|
|
1171
|
-
a += d.vs.length,
|
|
1168
|
+
const o = uo(e, (d) => Object.hasOwn(d, "barycenter")), n = o.lhs, s = o.rhs.sort((d, f) => f.i - d.i), i = [];
|
|
1169
|
+
let r = 0, l = 0, a = 0;
|
|
1170
|
+
n.sort(xs(!!t)), a = Jt(i, s, a), n.forEach((d) => {
|
|
1171
|
+
a += d.vs.length, i.push(d.vs), r += d.barycenter * d.weight, l += d.weight, a = Jt(i, s, a);
|
|
1172
1172
|
});
|
|
1173
|
-
const c = { vs:
|
|
1174
|
-
return l && (c.barycenter =
|
|
1173
|
+
const c = { vs: i.flat(!0) };
|
|
1174
|
+
return l && (c.barycenter = r / l, c.weight = l), c;
|
|
1175
1175
|
}
|
|
1176
1176
|
function Jt(e, t, o) {
|
|
1177
1177
|
let n;
|
|
@@ -1184,8 +1184,8 @@ function xs(e) {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
function po(e, t, o, n) {
|
|
1186
1186
|
let s = e.children(t);
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1187
|
+
const i = e.node(t), r = i ? i.borderLeft : void 0, l = i ? i.borderRight : void 0, a = {};
|
|
1188
|
+
r && (s = s.filter((g) => g !== r && g !== l));
|
|
1189
1189
|
const c = ws(e, s);
|
|
1190
1190
|
c.forEach((g) => {
|
|
1191
1191
|
if (e.children(g.v).length) {
|
|
@@ -1196,8 +1196,8 @@ function po(e, t, o, n) {
|
|
|
1196
1196
|
let d = ys(c, o);
|
|
1197
1197
|
_s(d, a);
|
|
1198
1198
|
const f = Cs(d, n);
|
|
1199
|
-
if (
|
|
1200
|
-
const g = e.node(e.predecessors(
|
|
1199
|
+
if (r && (f.vs = [r, f.vs, l].flat(!0), e.predecessors(r).length)) {
|
|
1200
|
+
const g = e.node(e.predecessors(r)[0]), b = e.node(e.predecessors(l)[0]);
|
|
1201
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;
|
|
1202
1202
|
}
|
|
1203
1203
|
return f;
|
|
@@ -1212,35 +1212,35 @@ function Ns(e, t) {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
function As(e, t, o, n) {
|
|
1214
1214
|
n || (n = e.nodes());
|
|
1215
|
-
const s = Ss(e),
|
|
1216
|
-
return n.forEach((
|
|
1217
|
-
const l = e.node(
|
|
1218
|
-
(l.rank === t || l.minRank <= t && t <= l.maxRank) && (
|
|
1219
|
-
const f = d.v ===
|
|
1220
|
-
|
|
1215
|
+
const s = Ss(e), i = new q({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((r) => e.node(r));
|
|
1216
|
+
return n.forEach((r) => {
|
|
1217
|
+
const l = e.node(r), a = e.parent(r);
|
|
1218
|
+
(l.rank === t || l.minRank <= t && t <= l.maxRank) && (i.setNode(r), i.setParent(r, a || s), e[o](r).forEach((d) => {
|
|
1219
|
+
const f = d.v === r ? d.w : d.v, g = i.edge(f, r), b = g ? g.weight : 0;
|
|
1220
|
+
i.setEdge(f, r, {
|
|
1221
1221
|
weight: e.edge(d).weight + b
|
|
1222
1222
|
});
|
|
1223
|
-
}), Object.hasOwn(l, "minRank") &&
|
|
1223
|
+
}), Object.hasOwn(l, "minRank") && i.setNode(r, {
|
|
1224
1224
|
borderLeft: l.borderLeft[t],
|
|
1225
1225
|
borderRight: l.borderRight[t]
|
|
1226
1226
|
}));
|
|
1227
|
-
}),
|
|
1227
|
+
}), i;
|
|
1228
1228
|
}
|
|
1229
1229
|
function Ss(e) {
|
|
1230
1230
|
let t;
|
|
1231
|
-
for (; e.hasNode(t =
|
|
1231
|
+
for (; e.hasNode(t = Be("_root")); ) ;
|
|
1232
1232
|
return t;
|
|
1233
1233
|
}
|
|
1234
1234
|
function Ls(e, t, o) {
|
|
1235
1235
|
let n = {}, s;
|
|
1236
|
-
o.forEach((
|
|
1237
|
-
let
|
|
1238
|
-
for (;
|
|
1239
|
-
if (l = e.parent(
|
|
1240
|
-
t.setEdge(a,
|
|
1236
|
+
o.forEach((i) => {
|
|
1237
|
+
let r = e.parent(i), l, a;
|
|
1238
|
+
for (; r; ) {
|
|
1239
|
+
if (l = e.parent(r), l ? (a = n[l], n[l] = r) : (a = s, s = r), a && a !== r) {
|
|
1240
|
+
t.setEdge(a, r);
|
|
1241
1241
|
return;
|
|
1242
1242
|
}
|
|
1243
|
-
|
|
1243
|
+
r = l;
|
|
1244
1244
|
}
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
@@ -1249,7 +1249,7 @@ function wo(e, t = {}) {
|
|
|
1249
1249
|
t.customOrder(e, wo);
|
|
1250
1250
|
return;
|
|
1251
1251
|
}
|
|
1252
|
-
const o =
|
|
1252
|
+
const o = dt(e), n = Qt(
|
|
1253
1253
|
e,
|
|
1254
1254
|
ce(1, o + 1),
|
|
1255
1255
|
"inEdges"
|
|
@@ -1258,36 +1258,36 @@ function wo(e, t = {}) {
|
|
|
1258
1258
|
ce(o - 1, -1, -1),
|
|
1259
1259
|
"outEdges"
|
|
1260
1260
|
);
|
|
1261
|
-
let
|
|
1262
|
-
if (eo(e,
|
|
1261
|
+
let i = vs(e);
|
|
1262
|
+
if (eo(e, i), t.disableOptimalOrderHeuristic)
|
|
1263
1263
|
return;
|
|
1264
|
-
let
|
|
1264
|
+
let r = Number.POSITIVE_INFINITY, l;
|
|
1265
1265
|
const a = t.constraints || [];
|
|
1266
1266
|
for (let c = 0, d = 0; d < 4; ++c, ++d) {
|
|
1267
1267
|
const f = c % 2 === 0 ? n : s, g = c % 4 >= 2;
|
|
1268
|
-
Os(f, g, a),
|
|
1269
|
-
const b = bs(e,
|
|
1270
|
-
b <
|
|
1268
|
+
Os(f, g, a), i = _e(e);
|
|
1269
|
+
const b = bs(e, i);
|
|
1270
|
+
b < r ? (r = b, d = 0, l = structuredClone(i)) : b === r && (l = structuredClone(i));
|
|
1271
1271
|
}
|
|
1272
1272
|
eo(e, l);
|
|
1273
1273
|
}
|
|
1274
1274
|
function Qt(e, t, o) {
|
|
1275
1275
|
const n = /* @__PURE__ */ new Map();
|
|
1276
|
-
function s(
|
|
1277
|
-
n.has(
|
|
1276
|
+
function s(i, r) {
|
|
1277
|
+
n.has(i) || n.set(i, []), n.get(i).push(r);
|
|
1278
1278
|
}
|
|
1279
|
-
for (const
|
|
1280
|
-
const
|
|
1281
|
-
if (typeof
|
|
1282
|
-
for (let l =
|
|
1283
|
-
l !==
|
|
1279
|
+
for (const i of e.nodes()) {
|
|
1280
|
+
const r = e.node(i);
|
|
1281
|
+
if (typeof r.rank == "number" && s(r.rank, i), typeof r.minRank == "number" && typeof r.maxRank == "number")
|
|
1282
|
+
for (let l = r.minRank; l <= r.maxRank; l++)
|
|
1283
|
+
l !== r.rank && s(l, i);
|
|
1284
1284
|
}
|
|
1285
1285
|
return t.map(
|
|
1286
|
-
(
|
|
1286
|
+
(i) => As(
|
|
1287
1287
|
e,
|
|
1288
|
-
|
|
1288
|
+
i,
|
|
1289
1289
|
o,
|
|
1290
|
-
n.get(
|
|
1290
|
+
n.get(i) || []
|
|
1291
1291
|
)
|
|
1292
1292
|
);
|
|
1293
1293
|
}
|
|
@@ -1295,10 +1295,10 @@ function Os(e, t, o) {
|
|
|
1295
1295
|
const n = new q();
|
|
1296
1296
|
e.forEach((s) => {
|
|
1297
1297
|
o.forEach((l) => n.setEdge(l.left, l.right));
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1298
|
+
const i = s.graph().root, r = po(s, i, n, t);
|
|
1299
|
+
r.vs.forEach((l, a) => {
|
|
1300
1300
|
s.node(l).order = a;
|
|
1301
|
-
}), Ls(s, n,
|
|
1301
|
+
}), Ls(s, n, r.vs);
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
1304
|
function eo(e, t) {
|
|
@@ -1308,43 +1308,43 @@ function eo(e, t) {
|
|
|
1308
1308
|
});
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Ts(e, t) {
|
|
1312
1312
|
const o = {};
|
|
1313
|
-
function n(s,
|
|
1314
|
-
let
|
|
1315
|
-
const a = s.length, c =
|
|
1316
|
-
return
|
|
1313
|
+
function n(s, i) {
|
|
1314
|
+
let r = 0, l = 0;
|
|
1315
|
+
const a = s.length, c = i[i.length - 1];
|
|
1316
|
+
return i.forEach((d, f) => {
|
|
1317
1317
|
const g = Ms(e, d), b = g ? e.node(g).order : a;
|
|
1318
|
-
(g || d === c) && (
|
|
1319
|
-
e.predecessors(N).forEach((
|
|
1320
|
-
const
|
|
1321
|
-
(
|
|
1318
|
+
(g || d === c) && (i.slice(l, f + 1).forEach((N) => {
|
|
1319
|
+
e.predecessors(N).forEach((x) => {
|
|
1320
|
+
const T = e.node(x), I = T.order;
|
|
1321
|
+
(I < r || b < I) && !(T.dummy && e.node(N).dummy) && yo(o, x, N);
|
|
1322
1322
|
});
|
|
1323
|
-
}), l = f + 1,
|
|
1324
|
-
}),
|
|
1323
|
+
}), l = f + 1, r = b);
|
|
1324
|
+
}), i;
|
|
1325
1325
|
}
|
|
1326
1326
|
return t.length && t.reduce(n), o;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Rs(e, t) {
|
|
1329
1329
|
const o = {};
|
|
1330
|
-
function n(
|
|
1330
|
+
function n(i, r, l, a, c) {
|
|
1331
1331
|
let d;
|
|
1332
|
-
ce(
|
|
1333
|
-
d =
|
|
1332
|
+
ce(r, l).forEach((f) => {
|
|
1333
|
+
d = i[f], e.node(d).dummy && e.predecessors(d).forEach((g) => {
|
|
1334
1334
|
const b = e.node(g);
|
|
1335
1335
|
b.dummy && (b.order < a || b.order > c) && yo(o, g, d);
|
|
1336
1336
|
});
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
|
-
function s(
|
|
1339
|
+
function s(i, r) {
|
|
1340
1340
|
let l = -1, a, c = 0;
|
|
1341
|
-
return
|
|
1341
|
+
return r.forEach((d, f) => {
|
|
1342
1342
|
if (e.node(d).dummy === "border") {
|
|
1343
1343
|
const g = e.predecessors(d);
|
|
1344
|
-
g.length && (a = e.node(g[0]).order, n(
|
|
1344
|
+
g.length && (a = e.node(g[0]).order, n(r, c, f, l, a), c = f, l = a);
|
|
1345
1345
|
}
|
|
1346
|
-
n(
|
|
1347
|
-
}),
|
|
1346
|
+
n(r, c, r.length, a, i.length);
|
|
1347
|
+
}), r;
|
|
1348
1348
|
}
|
|
1349
1349
|
return t.length && t.reduce(s), o;
|
|
1350
1350
|
}
|
|
@@ -1368,55 +1368,55 @@ function $s(e, t, o) {
|
|
|
1368
1368
|
return !!e[t] && Object.hasOwn(e[t], o);
|
|
1369
1369
|
}
|
|
1370
1370
|
function Ds(e, t, o, n) {
|
|
1371
|
-
const s = {},
|
|
1371
|
+
const s = {}, i = {}, r = {};
|
|
1372
1372
|
return t.forEach((l) => {
|
|
1373
1373
|
l.forEach((a, c) => {
|
|
1374
|
-
s[a] = a,
|
|
1374
|
+
s[a] = a, i[a] = a, r[a] = c;
|
|
1375
1375
|
});
|
|
1376
1376
|
}), t.forEach((l) => {
|
|
1377
1377
|
let a = -1;
|
|
1378
1378
|
l.forEach((c) => {
|
|
1379
1379
|
let d = n(c);
|
|
1380
1380
|
if (d.length) {
|
|
1381
|
-
d = d.sort((g, b) =>
|
|
1381
|
+
d = d.sort((g, b) => r[g] - r[b]);
|
|
1382
1382
|
const f = (d.length - 1) / 2;
|
|
1383
1383
|
for (let g = Math.floor(f), b = Math.ceil(f); g <= b; ++g) {
|
|
1384
1384
|
const N = d[g];
|
|
1385
|
-
|
|
1385
|
+
i[c] === c && a < r[N] && !$s(o, c, N) && (i[N] = c, i[c] = s[c] = s[N], a = r[N]);
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
});
|
|
1389
|
-
}), { root: s, align:
|
|
1389
|
+
}), { root: s, align: i };
|
|
1390
1390
|
}
|
|
1391
1391
|
function Fs(e, t, o, n, s) {
|
|
1392
|
-
const
|
|
1392
|
+
const i = {}, r = Ps(e, t, o, s), l = s ? "borderLeft" : "borderRight";
|
|
1393
1393
|
function a(f, g) {
|
|
1394
|
-
const b =
|
|
1395
|
-
let
|
|
1396
|
-
for (;
|
|
1397
|
-
if (N[
|
|
1398
|
-
f(
|
|
1394
|
+
const b = r.nodes().slice(), N = {};
|
|
1395
|
+
let x = b.pop();
|
|
1396
|
+
for (; x; ) {
|
|
1397
|
+
if (N[x])
|
|
1398
|
+
f(x);
|
|
1399
1399
|
else {
|
|
1400
|
-
N[
|
|
1401
|
-
for (const
|
|
1402
|
-
b.push(
|
|
1400
|
+
N[x] = !0, b.push(x);
|
|
1401
|
+
for (const T of g(x))
|
|
1402
|
+
b.push(T);
|
|
1403
1403
|
}
|
|
1404
|
-
|
|
1404
|
+
x = b.pop();
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
function c(f) {
|
|
1408
|
-
|
|
1408
|
+
i[f] = r.inEdges(f).reduce((g, b) => Math.max(g, i[b.v] + r.edge(b)), 0);
|
|
1409
1409
|
}
|
|
1410
1410
|
function d(f) {
|
|
1411
|
-
const g =
|
|
1412
|
-
g !== Number.POSITIVE_INFINITY && b.borderType !== l && (
|
|
1411
|
+
const g = r.outEdges(f).reduce((N, x) => Math.min(N, i[x.w] - r.edge(x)), Number.POSITIVE_INFINITY), b = e.node(f);
|
|
1412
|
+
g !== Number.POSITIVE_INFINITY && b.borderType !== l && (i[f] = Math.max(i[f], g));
|
|
1413
1413
|
}
|
|
1414
|
-
return a(c,
|
|
1415
|
-
|
|
1416
|
-
}),
|
|
1414
|
+
return a(c, r.predecessors.bind(r)), a(d, r.successors.bind(r)), Object.keys(n).forEach((f) => {
|
|
1415
|
+
i[f] = i[o[f]];
|
|
1416
|
+
}), i;
|
|
1417
1417
|
}
|
|
1418
1418
|
function Ps(e, t, o, n) {
|
|
1419
|
-
const s = new e.constructor(),
|
|
1419
|
+
const s = new e.constructor(), i = e.graph(), r = Gs(i.nodesep, i.edgesep, n);
|
|
1420
1420
|
return t.forEach((l) => {
|
|
1421
1421
|
let a;
|
|
1422
1422
|
l.forEach((c) => {
|
|
@@ -1426,7 +1426,7 @@ function Ps(e, t, o, n) {
|
|
|
1426
1426
|
s.setEdge(
|
|
1427
1427
|
f,
|
|
1428
1428
|
d,
|
|
1429
|
-
Math.max(
|
|
1429
|
+
Math.max(r(e, c, a), g || 0)
|
|
1430
1430
|
);
|
|
1431
1431
|
}
|
|
1432
1432
|
a = c;
|
|
@@ -1436,27 +1436,27 @@ function Ps(e, t, o, n) {
|
|
|
1436
1436
|
function zs(e, t) {
|
|
1437
1437
|
return Object.values(t).reduce(
|
|
1438
1438
|
(o, n) => {
|
|
1439
|
-
let s = Number.NEGATIVE_INFINITY,
|
|
1439
|
+
let s = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
|
|
1440
1440
|
Object.entries(n).forEach(([l, a]) => {
|
|
1441
1441
|
const c = js(e, l) / 2;
|
|
1442
|
-
s = Math.max(a + c, s),
|
|
1442
|
+
s = Math.max(a + c, s), i = Math.min(a - c, i);
|
|
1443
1443
|
});
|
|
1444
|
-
const
|
|
1445
|
-
return
|
|
1444
|
+
const r = s - i;
|
|
1445
|
+
return r < o[0] && (o = [r, n]), o;
|
|
1446
1446
|
},
|
|
1447
1447
|
[Number.POSITIVE_INFINITY, null]
|
|
1448
1448
|
)[1];
|
|
1449
1449
|
}
|
|
1450
1450
|
function Bs(e, t) {
|
|
1451
|
-
const o = Object.values(t), n =
|
|
1452
|
-
["u", "d"].forEach((
|
|
1453
|
-
["l", "r"].forEach((
|
|
1454
|
-
const l =
|
|
1451
|
+
const o = Object.values(t), n = W(Math.min, o), s = W(Math.max, o);
|
|
1452
|
+
["u", "d"].forEach((i) => {
|
|
1453
|
+
["l", "r"].forEach((r) => {
|
|
1454
|
+
const l = i + r;
|
|
1455
1455
|
let a = e[l];
|
|
1456
1456
|
if (a === t) return;
|
|
1457
1457
|
const c = Object.values(a);
|
|
1458
|
-
let d = n -
|
|
1459
|
-
|
|
1458
|
+
let d = n - W(Math.min, c);
|
|
1459
|
+
r !== "l" && (d = s - W(Math.max, c)), d && (a = Ne(a, (f) => f + d), e[l] = a);
|
|
1460
1460
|
});
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
@@ -1464,23 +1464,23 @@ function Vs(e, t) {
|
|
|
1464
1464
|
return Ne(e.ul, (o, n) => {
|
|
1465
1465
|
if (t)
|
|
1466
1466
|
return e[t.toLowerCase()][n];
|
|
1467
|
-
const s = Object.values(e).map((
|
|
1467
|
+
const s = Object.values(e).map((i) => i[n]).sort((i, r) => i - r);
|
|
1468
1468
|
return (s[1] + s[2]) / 2;
|
|
1469
1469
|
});
|
|
1470
1470
|
}
|
|
1471
1471
|
function Is(e) {
|
|
1472
1472
|
const t = _e(e), o = Object.assign(
|
|
1473
|
-
|
|
1474
|
-
|
|
1473
|
+
Ts(e, t),
|
|
1474
|
+
Rs(e, t)
|
|
1475
1475
|
), n = {};
|
|
1476
1476
|
let s;
|
|
1477
|
-
["u", "d"].forEach((
|
|
1478
|
-
s =
|
|
1477
|
+
["u", "d"].forEach((r) => {
|
|
1478
|
+
s = r === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((l) => {
|
|
1479
1479
|
let a = s;
|
|
1480
1480
|
l === "r" && (a = a.map(
|
|
1481
1481
|
(g) => Object.values(g).reverse()
|
|
1482
1482
|
));
|
|
1483
|
-
const c = (
|
|
1483
|
+
const c = (r === "u" ? e.predecessors : e.successors).bind(e), d = Ds(
|
|
1484
1484
|
e,
|
|
1485
1485
|
a,
|
|
1486
1486
|
o,
|
|
@@ -1493,26 +1493,26 @@ function Is(e) {
|
|
|
1493
1493
|
d.align,
|
|
1494
1494
|
l === "r"
|
|
1495
1495
|
);
|
|
1496
|
-
l === "r" && (f = Ne(f, (g) => -g)), n[
|
|
1496
|
+
l === "r" && (f = Ne(f, (g) => -g)), n[r + l] = f;
|
|
1497
1497
|
});
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1500
|
-
return Bs(n,
|
|
1499
|
+
const i = zs(e, n);
|
|
1500
|
+
return Bs(n, i), Vs(n, e.graph().align);
|
|
1501
1501
|
}
|
|
1502
1502
|
function Gs(e, t, o) {
|
|
1503
|
-
return (n, s,
|
|
1504
|
-
const
|
|
1503
|
+
return (n, s, i) => {
|
|
1504
|
+
const r = n.node(s), l = n.node(i);
|
|
1505
1505
|
let a = 0, c;
|
|
1506
|
-
if (a +=
|
|
1507
|
-
switch (
|
|
1506
|
+
if (a += r.width / 2, Object.hasOwn(r, "labelpos"))
|
|
1507
|
+
switch (r.labelpos.toLowerCase()) {
|
|
1508
1508
|
case "l":
|
|
1509
|
-
c = -
|
|
1509
|
+
c = -r.width / 2;
|
|
1510
1510
|
break;
|
|
1511
1511
|
case "r":
|
|
1512
|
-
c =
|
|
1512
|
+
c = r.width / 2;
|
|
1513
1513
|
break;
|
|
1514
1514
|
}
|
|
1515
|
-
if (c && (a += o ? c : -c), c = 0, a += (
|
|
1515
|
+
if (c && (a += o ? c : -c), c = 0, a += (r.dummy ? t : e) / 2, a += (l.dummy ? t : e) / 2, a += l.width / 2, Object.hasOwn(l, "labelpos"))
|
|
1516
1516
|
switch (l.labelpos.toLowerCase()) {
|
|
1517
1517
|
case "l":
|
|
1518
1518
|
c = l.width / 2;
|
|
@@ -1528,7 +1528,7 @@ function js(e, t) {
|
|
|
1528
1528
|
return e.node(t).width;
|
|
1529
1529
|
}
|
|
1530
1530
|
function Ws(e) {
|
|
1531
|
-
const t =
|
|
1531
|
+
const t = ut(e);
|
|
1532
1532
|
Ys(t);
|
|
1533
1533
|
const o = Is(t);
|
|
1534
1534
|
Object.entries(o).forEach(([n, s]) => {
|
|
@@ -1539,13 +1539,13 @@ function Ys(e) {
|
|
|
1539
1539
|
const t = _e(e), o = e.graph().ranksep;
|
|
1540
1540
|
let n = 0;
|
|
1541
1541
|
t.forEach((s) => {
|
|
1542
|
-
const
|
|
1542
|
+
const i = s.reduce((r, l) => {
|
|
1543
1543
|
const a = e.node(l).height;
|
|
1544
|
-
return
|
|
1544
|
+
return r > a ? r : a;
|
|
1545
1545
|
}, 0);
|
|
1546
|
-
s.forEach((
|
|
1547
|
-
e.node(
|
|
1548
|
-
}), n +=
|
|
1546
|
+
s.forEach((r) => {
|
|
1547
|
+
e.node(r).y = n + i / 2;
|
|
1548
|
+
}), n += i + o;
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
1551
|
function Hs(e, t = {}) {
|
|
@@ -1556,15 +1556,15 @@ function Hs(e, t = {}) {
|
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
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(
|
|
1559
|
+
t(" makeSpaceForEdgeLabels", () => nr(e)), t(" removeSelfEdges", () => fr(e)), t(" acyclic", () => Bn(e)), t(" nestingGraph.run", () => ls(e)), t(" rank", () => ts(ut(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));
|
|
1560
1560
|
}
|
|
1561
1561
|
function Us(e, t) {
|
|
1562
1562
|
e.nodes().forEach((s) => {
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1563
|
+
const i = e.node(s), r = t.node(s);
|
|
1564
|
+
i && (i.x = r.x, i.y = r.y, i.order = r.order, i.rank = r.rank, t.children(s).length && (i.width = r.width, i.height = r.height));
|
|
1565
1565
|
}), e.edges().forEach((s) => {
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1566
|
+
const i = e.edge(s), r = t.edge(s);
|
|
1567
|
+
i.points = r.points, Object.hasOwn(r, "x") && (i.x = r.x, i.y = r.y);
|
|
1568
1568
|
});
|
|
1569
1569
|
const o = t.graph(), n = e.graph();
|
|
1570
1570
|
n.width = o.width, n.height = o.height;
|
|
@@ -1576,26 +1576,26 @@ const Xs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], qs = { ranks
|
|
|
1576
1576
|
height: 0,
|
|
1577
1577
|
labeloffset: 10,
|
|
1578
1578
|
labelpos: "r"
|
|
1579
|
-
}, tr = ["labelpos"];
|
|
1579
|
+
}, tr = ["labelpos", "arrowshape"];
|
|
1580
1580
|
function or(e) {
|
|
1581
|
-
const t =
|
|
1581
|
+
const t = rt(e.graph()), o = {
|
|
1582
1582
|
...qs,
|
|
1583
|
-
...
|
|
1583
|
+
...st(t, Xs),
|
|
1584
1584
|
...xe(t, Ks)
|
|
1585
1585
|
}, n = new q({ multigraph: !0, compound: !0 });
|
|
1586
1586
|
return n.setGraph(o), e.nodes().forEach((s) => {
|
|
1587
|
-
const
|
|
1587
|
+
const i = rt(e.node(s)), r = st(i, Js);
|
|
1588
1588
|
Object.keys(to).forEach((l) => {
|
|
1589
|
-
|
|
1590
|
-
}), n.setNode(s,
|
|
1589
|
+
r[l] === void 0 && (r[l] = to[l]);
|
|
1590
|
+
}), n.setNode(s, r), n.setParent(s, e.parent(s));
|
|
1591
1591
|
}), e.edges().forEach((s) => {
|
|
1592
|
-
const
|
|
1592
|
+
const i = rt(e.edge(s));
|
|
1593
1593
|
n.setEdge(
|
|
1594
1594
|
s,
|
|
1595
1595
|
{
|
|
1596
1596
|
...er,
|
|
1597
|
-
...
|
|
1598
|
-
...xe(
|
|
1597
|
+
...st(i, Qs),
|
|
1598
|
+
...xe(i, tr)
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
1601
|
}), n;
|
|
@@ -1611,8 +1611,8 @@ function sr(e) {
|
|
|
1611
1611
|
e.edges().forEach((t) => {
|
|
1612
1612
|
const o = e.edge(t);
|
|
1613
1613
|
if (o.width && o.height) {
|
|
1614
|
-
const n = e.node(t.v),
|
|
1615
|
-
ue(e, "edge-proxy",
|
|
1614
|
+
const n = e.node(t.v), i = { rank: (e.node(t.w).rank - n.rank) / 2 + n.rank, e: t };
|
|
1615
|
+
ue(e, "edge-proxy", i, "_ep");
|
|
1616
1616
|
}
|
|
1617
1617
|
});
|
|
1618
1618
|
}
|
|
@@ -1631,7 +1631,7 @@ function ir(e) {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
function lr(e) {
|
|
1633
1633
|
let t = Number.POSITIVE_INFINITY, o = 0, n = Number.POSITIVE_INFINITY, s = 0;
|
|
1634
|
-
const
|
|
1634
|
+
const i = e.graph(), r = i.marginx || 0, l = i.marginy || 0;
|
|
1635
1635
|
function a(c) {
|
|
1636
1636
|
const d = c.x, f = c.y, g = c.width, b = c.height;
|
|
1637
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);
|
|
@@ -1639,7 +1639,7 @@ function lr(e) {
|
|
|
1639
1639
|
e.nodes().forEach((c) => a(e.node(c))), e.edges().forEach((c) => {
|
|
1640
1640
|
const d = e.edge(c);
|
|
1641
1641
|
Object.hasOwn(d, "x") && a(d);
|
|
1642
|
-
}), t -=
|
|
1642
|
+
}), t -= r, n -= l, e.nodes().forEach((c) => {
|
|
1643
1643
|
const d = e.node(c);
|
|
1644
1644
|
d.x -= t, d.y -= n;
|
|
1645
1645
|
}), e.edges().forEach((c) => {
|
|
@@ -1647,13 +1647,28 @@ function lr(e) {
|
|
|
1647
1647
|
d.points.forEach((f) => {
|
|
1648
1648
|
f.x -= t, f.y -= n;
|
|
1649
1649
|
}), Object.hasOwn(d, "x") && (d.x -= t), Object.hasOwn(d, "y") && (d.y -= n);
|
|
1650
|
-
}),
|
|
1650
|
+
}), i.width = o - t + r, i.height = s - n + l;
|
|
1651
1651
|
}
|
|
1652
1652
|
function ar(e) {
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1653
|
+
function o(n, s, i) {
|
|
1654
|
+
if (!s)
|
|
1655
|
+
return n;
|
|
1656
|
+
const r = s.x - n.x, l = s.y - n.y, a = Math.sqrt(r * r + l * l);
|
|
1657
|
+
if (!a || a <= i)
|
|
1658
|
+
return n;
|
|
1659
|
+
const c = i / a;
|
|
1660
|
+
return {
|
|
1661
|
+
x: n.x + r * c,
|
|
1662
|
+
y: n.y + l * c
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
e.edges().forEach((n) => {
|
|
1666
|
+
const s = e.edge(n), i = e.node(n.v), r = e.node(n.w);
|
|
1667
|
+
let l, a;
|
|
1668
|
+
!s.points || !s.points.length ? (s.points = [], l = r, a = i) : (l = s.points[0], a = s.points[s.points.length - 1]);
|
|
1669
|
+
const c = ct(i, l), d = ct(r, a), f = s.points.length ? s.points[0] : l, g = s.points.length ? s.points[s.points.length - 1] : a, b = s.arrowshape, N = b === "normal" || b === "vee", x = !!s.reversed;
|
|
1670
|
+
let T = c, I = d;
|
|
1671
|
+
N && (x ? T = o(c, f, 4) : I = o(d, g, 4)), s.points.unshift(T), s.points.push(I);
|
|
1657
1672
|
});
|
|
1658
1673
|
}
|
|
1659
1674
|
function cr(e) {
|
|
@@ -1679,8 +1694,8 @@ function ur(e) {
|
|
|
1679
1694
|
function dr(e) {
|
|
1680
1695
|
e.nodes().forEach((t) => {
|
|
1681
1696
|
if (e.children(t).length) {
|
|
1682
|
-
const o = e.node(t), n = e.node(o.borderTop), s = e.node(o.borderBottom),
|
|
1683
|
-
o.width = Math.abs(
|
|
1697
|
+
const o = e.node(t), n = e.node(o.borderTop), s = e.node(o.borderBottom), i = e.node(o.borderLeft[o.borderLeft.length - 1]), r = e.node(o.borderRight[o.borderRight.length - 1]);
|
|
1698
|
+
o.width = Math.abs(r.x - i.x), o.height = Math.abs(s.y - n.y), o.x = i.x + o.width / 2, o.y = n.y + o.height / 2;
|
|
1684
1699
|
}
|
|
1685
1700
|
}), e.nodes().forEach((t) => {
|
|
1686
1701
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
@@ -1697,18 +1712,18 @@ function fr(e) {
|
|
|
1697
1712
|
function hr(e) {
|
|
1698
1713
|
_e(e).forEach((o) => {
|
|
1699
1714
|
let n = 0;
|
|
1700
|
-
o.forEach((s,
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1715
|
+
o.forEach((s, i) => {
|
|
1716
|
+
const r = e.node(s);
|
|
1717
|
+
r.order = i + n, (r.selfEdges || []).forEach((l) => {
|
|
1703
1718
|
ue(e, "selfedge", {
|
|
1704
1719
|
width: l.label.width,
|
|
1705
1720
|
height: l.label.height,
|
|
1706
|
-
rank:
|
|
1707
|
-
order:
|
|
1721
|
+
rank: r.rank,
|
|
1722
|
+
order: i + ++n,
|
|
1708
1723
|
e: l.e,
|
|
1709
1724
|
label: l.label
|
|
1710
1725
|
}, "_se");
|
|
1711
|
-
}), delete
|
|
1726
|
+
}), delete r.selfEdges;
|
|
1712
1727
|
});
|
|
1713
1728
|
});
|
|
1714
1729
|
}
|
|
@@ -1716,21 +1731,21 @@ function mr(e) {
|
|
|
1716
1731
|
e.nodes().forEach((t) => {
|
|
1717
1732
|
const o = e.node(t);
|
|
1718
1733
|
if (o.dummy === "selfedge") {
|
|
1719
|
-
const n = e.node(o.e.v), s = n.x + n.width / 2,
|
|
1734
|
+
const n = e.node(o.e.v), s = n.x + n.width / 2, i = n.y, r = o.x - s, l = n.height / 2;
|
|
1720
1735
|
e.setEdge(o.e, o.label), e.removeNode(t), o.label.points = [
|
|
1721
|
-
{ x: s + 2 *
|
|
1722
|
-
{ x: s + 5 *
|
|
1723
|
-
{ x: s +
|
|
1724
|
-
{ x: s + 5 *
|
|
1725
|
-
{ x: s + 2 *
|
|
1736
|
+
{ x: s + 2 * r / 3, y: i - l },
|
|
1737
|
+
{ x: s + 5 * r / 6, y: i - l },
|
|
1738
|
+
{ x: s + r, y: i },
|
|
1739
|
+
{ x: s + 5 * r / 6, y: i + l },
|
|
1740
|
+
{ x: s + 2 * r / 3, y: i + l }
|
|
1726
1741
|
], o.label.x = o.x, o.label.y = o.y;
|
|
1727
1742
|
}
|
|
1728
1743
|
});
|
|
1729
1744
|
}
|
|
1730
|
-
function
|
|
1745
|
+
function st(e, t) {
|
|
1731
1746
|
return Ne(xe(e, t), Number);
|
|
1732
1747
|
}
|
|
1733
|
-
function
|
|
1748
|
+
function rt(e) {
|
|
1734
1749
|
const t = {};
|
|
1735
1750
|
return e && Object.entries(e).forEach(([o, n]) => {
|
|
1736
1751
|
let s = o;
|
|
@@ -1770,16 +1785,16 @@ function br(e) {
|
|
|
1770
1785
|
let o = `M ${t.x} ${t.y}`;
|
|
1771
1786
|
for (let s = 1; s < e.length - 1; s += 1) {
|
|
1772
1787
|
e[s - 1];
|
|
1773
|
-
const
|
|
1788
|
+
const i = e[s], r = e[s + 1], l = i.x, a = i.y, c = (i.x + r.x) / 2, d = (i.y + r.y) / 2;
|
|
1774
1789
|
o += ` Q ${l} ${a} ${c} ${d}`;
|
|
1775
1790
|
}
|
|
1776
1791
|
const n = e[e.length - 1];
|
|
1777
1792
|
return o += ` L ${n.x} ${n.y}`, o;
|
|
1778
1793
|
}
|
|
1779
1794
|
function pr(e) {
|
|
1780
|
-
const { nodes: t, edges: o, configuration: n } = e, s =
|
|
1795
|
+
const { nodes: t, edges: o, configuration: n } = e, s = k(null), i = k(null), r = `dag-arrow-${lt()}`;
|
|
1781
1796
|
function l(a, c, d) {
|
|
1782
|
-
|
|
1797
|
+
i.value = null, s.value = null;
|
|
1783
1798
|
const f = {
|
|
1784
1799
|
...gr,
|
|
1785
1800
|
...d
|
|
@@ -1799,27 +1814,28 @@ function pr(e) {
|
|
|
1799
1814
|
}), c.forEach((u) => {
|
|
1800
1815
|
g.setEdge(u.from, u.to, {
|
|
1801
1816
|
weight: u.weight ?? 1,
|
|
1802
|
-
minlen: u.minLength ?? 1
|
|
1817
|
+
minlen: u.minLength ?? 1,
|
|
1818
|
+
arrowShape: f.arrowShape ?? "normal"
|
|
1803
1819
|
});
|
|
1804
1820
|
}), Hs(g);
|
|
1805
1821
|
const b = a.map((u) => {
|
|
1806
|
-
const
|
|
1822
|
+
const G = g.node(u.id);
|
|
1807
1823
|
return {
|
|
1808
1824
|
id: u.id,
|
|
1809
1825
|
label: u.label,
|
|
1810
|
-
x:
|
|
1811
|
-
y:
|
|
1812
|
-
width:
|
|
1813
|
-
height:
|
|
1826
|
+
x: G.x,
|
|
1827
|
+
y: G.y,
|
|
1828
|
+
width: G.width,
|
|
1829
|
+
height: G.height,
|
|
1814
1830
|
original: u
|
|
1815
1831
|
};
|
|
1816
1832
|
}), N = g.edges().map((u) => {
|
|
1817
|
-
const
|
|
1833
|
+
const G = g.edge(u), H = G.points || [];
|
|
1818
1834
|
if (!H.length)
|
|
1819
1835
|
return null;
|
|
1820
|
-
const Ae = f.curvedEdges ? br(H) : vr(H), Se = f.arrowShape !== "undirected" ? `url(#${
|
|
1836
|
+
const Ae = f.curvedEdges ? br(H) : vr(H), Se = f.arrowShape !== "undirected" ? `url(#${r})` : null, Le = c.find((he) => he?.from === u.v && he?.to === u.w);
|
|
1821
1837
|
return {
|
|
1822
|
-
id: `${u.v}->${u.w}->${
|
|
1838
|
+
id: `${u.v}->${u.w}->${lt()}`,
|
|
1823
1839
|
from: u.v,
|
|
1824
1840
|
to: u.w,
|
|
1825
1841
|
points: H,
|
|
@@ -1827,10 +1843,10 @@ function pr(e) {
|
|
|
1827
1843
|
markerEnd: Se,
|
|
1828
1844
|
original: {
|
|
1829
1845
|
...Le,
|
|
1830
|
-
...
|
|
1846
|
+
...G
|
|
1831
1847
|
}
|
|
1832
1848
|
};
|
|
1833
|
-
}).filter(Boolean),
|
|
1849
|
+
}).filter(Boolean), x = f.padding;
|
|
1834
1850
|
if (!b.length) {
|
|
1835
1851
|
s.value = {
|
|
1836
1852
|
nodes: [],
|
|
@@ -1841,13 +1857,13 @@ function pr(e) {
|
|
|
1841
1857
|
};
|
|
1842
1858
|
return;
|
|
1843
1859
|
}
|
|
1844
|
-
const
|
|
1860
|
+
const T = b.flatMap((u) => [
|
|
1845
1861
|
u.x - u.width / 2,
|
|
1846
1862
|
u.x + u.width / 2
|
|
1847
|
-
]),
|
|
1863
|
+
]), I = b.flatMap((u) => [
|
|
1848
1864
|
u.y - u.height / 2,
|
|
1849
1865
|
u.y + u.height / 2
|
|
1850
|
-
]), fe = Math.min(...
|
|
1866
|
+
]), fe = Math.min(...T) - x, oe = Math.max(...T) + x, R = Math.min(...I) - x, P = Math.max(...I) + x;
|
|
1851
1867
|
s.value = {
|
|
1852
1868
|
nodes: b,
|
|
1853
1869
|
edges: N.map((u) => ({
|
|
@@ -1864,12 +1880,12 @@ function pr(e) {
|
|
|
1864
1880
|
const a = v(t) || [], c = v(o) || [], d = v(n) || {};
|
|
1865
1881
|
l(a, c, d);
|
|
1866
1882
|
} catch (a) {
|
|
1867
|
-
console.error("[useDag] layout error:", a),
|
|
1883
|
+
console.error("[useDag] layout error:", a), i.value = a, s.value = null;
|
|
1868
1884
|
}
|
|
1869
1885
|
}), {
|
|
1870
1886
|
layoutData: s,
|
|
1871
|
-
lastError:
|
|
1872
|
-
arrowMarkerIdentifier:
|
|
1887
|
+
lastError: i,
|
|
1888
|
+
arrowMarkerIdentifier: r,
|
|
1873
1889
|
recomputeLayout: () => {
|
|
1874
1890
|
const a = v(t) || [], c = v(o) || [], d = v(n) || {};
|
|
1875
1891
|
l(a, c, d);
|
|
@@ -1884,7 +1900,7 @@ const ko = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", nod
|
|
|
1884
1900
|
hack: xo,
|
|
1885
1901
|
zen: _o,
|
|
1886
1902
|
concrete: No
|
|
1887
|
-
},
|
|
1903
|
+
}, ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1888
1904
|
__proto__: null,
|
|
1889
1905
|
celebration: Eo,
|
|
1890
1906
|
celebrationNight: Co,
|
|
@@ -1898,15 +1914,15 @@ function wr(e, t) {
|
|
|
1898
1914
|
const o = Ce(e);
|
|
1899
1915
|
return rn(o, t);
|
|
1900
1916
|
}
|
|
1901
|
-
function
|
|
1917
|
+
function ui(e, t) {
|
|
1902
1918
|
const o = Ce(e);
|
|
1903
1919
|
return ln(o, t);
|
|
1904
1920
|
}
|
|
1905
|
-
function
|
|
1921
|
+
function di(e, t) {
|
|
1906
1922
|
const o = Ce(e);
|
|
1907
1923
|
return an(o, t);
|
|
1908
1924
|
}
|
|
1909
|
-
function
|
|
1925
|
+
function fi({ defaultConfig: e, userConfig: t }) {
|
|
1910
1926
|
return so({ defaultConfig: e, userConfig: t });
|
|
1911
1927
|
}
|
|
1912
1928
|
const yr = {
|
|
@@ -1934,8 +1950,8 @@ const yr = {
|
|
|
1934
1950
|
emits: ["zoomIn", "zoomOut", "resetZoom", "switchDirection"],
|
|
1935
1951
|
setup(e, { emit: t }) {
|
|
1936
1952
|
const o = t;
|
|
1937
|
-
return (n, s) => (
|
|
1938
|
-
class:
|
|
1953
|
+
return (n, s) => (y(), _("div", {
|
|
1954
|
+
class: it({ "vue-data-ui-zoom-controls": !0, "vue-data-ui-zoom-controls-fullscreen": e.isFullscreen }),
|
|
1939
1955
|
"data-dom-to-png-ignore": "",
|
|
1940
1956
|
style: X({
|
|
1941
1957
|
border: e.config.style.chart.controls.border,
|
|
@@ -1946,20 +1962,20 @@ const yr = {
|
|
|
1946
1962
|
"--vue-data-ui-zoom-control-button-color-hover": v(wr)(e.config.style.chart.controls.buttonColor, 0.2)
|
|
1947
1963
|
})
|
|
1948
1964
|
}, [
|
|
1949
|
-
|
|
1950
|
-
onClick: s[0] || (s[0] = (
|
|
1965
|
+
j("button", {
|
|
1966
|
+
onClick: s[0] || (s[0] = (i) => o("zoomOut")),
|
|
1951
1967
|
class: "vue-data-ui-zoom-controls-button",
|
|
1952
1968
|
"data-cy-zoom-out": ""
|
|
1953
1969
|
}, [
|
|
1954
|
-
ae(
|
|
1970
|
+
ae(Qe, {
|
|
1955
1971
|
name: "zoomMinus",
|
|
1956
1972
|
stroke: e.config.style.chart.controls.color,
|
|
1957
1973
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
1958
1974
|
}, null, 8, ["stroke", "size"])
|
|
1959
1975
|
]),
|
|
1960
|
-
|
|
1976
|
+
j("button", {
|
|
1961
1977
|
class: "vue-data-ui-zoom-controls-button-zoom",
|
|
1962
|
-
onClick: s[1] || (s[1] = (
|
|
1978
|
+
onClick: s[1] || (s[1] = (i) => o("resetZoom")),
|
|
1963
1979
|
"data-cy-zoom-reset": "",
|
|
1964
1980
|
style: X({
|
|
1965
1981
|
color: e.config.style.chart.controls.color,
|
|
@@ -1968,37 +1984,37 @@ const yr = {
|
|
|
1968
1984
|
fontSize: e.config.style.chart.controls.fontSize + "px"
|
|
1969
1985
|
})
|
|
1970
1986
|
}, le(Math.round(e.scale * 100)) + "% ", 5),
|
|
1971
|
-
|
|
1972
|
-
onClick: s[2] || (s[2] = (
|
|
1987
|
+
j("button", {
|
|
1988
|
+
onClick: s[2] || (s[2] = (i) => o("zoomIn")),
|
|
1973
1989
|
class: "vue-data-ui-zoom-controls-button",
|
|
1974
1990
|
"data-cy-zoom-in": ""
|
|
1975
1991
|
}, [
|
|
1976
|
-
ae(
|
|
1992
|
+
ae(Qe, {
|
|
1977
1993
|
name: "zoomPlus",
|
|
1978
1994
|
stroke: e.config.style.chart.controls.color,
|
|
1979
1995
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
1980
1996
|
}, null, 8, ["stroke", "size"])
|
|
1981
1997
|
]),
|
|
1982
|
-
e.withDirection ? (
|
|
1998
|
+
e.withDirection ? (y(), _("button", {
|
|
1983
1999
|
key: 0,
|
|
1984
|
-
onClick: s[3] || (s[3] = (
|
|
2000
|
+
onClick: s[3] || (s[3] = (i) => o("switchDirection")),
|
|
1985
2001
|
class: "vue-data-ui-zoom-controls-button"
|
|
1986
2002
|
}, [
|
|
1987
|
-
ae(
|
|
2003
|
+
ae(Qe, {
|
|
1988
2004
|
name: "direction",
|
|
1989
2005
|
stroke: e.config.style.chart.controls.color,
|
|
1990
2006
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
1991
2007
|
}, null, 8, ["stroke", "size"])
|
|
1992
|
-
])) :
|
|
2008
|
+
])) : S("", !0)
|
|
1993
2009
|
], 6));
|
|
1994
2010
|
}
|
|
1995
2011
|
}, oo = /* @__PURE__ */ ro(yr, [["__scopeId", "data-v-e4479474"]]), kr = ["id"], Er = {
|
|
1996
2012
|
key: 0,
|
|
1997
2013
|
class: "dag-chart-error"
|
|
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"],
|
|
2014
|
+
}, 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"], Tr = { class: "vue-ui-dag-nodes" }, Rr = ["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 = { key: 2 }, Pr = ["x", "y", "width", "height"], zr = { class: "vue-ui-dag-edges" }, Br = ["d", "stroke-width", "marker-end"], Vr = {
|
|
1999
2015
|
key: 6,
|
|
2000
2016
|
class: "vue-data-ui-watermark"
|
|
2001
|
-
},
|
|
2017
|
+
}, Ir = ["data-position"], Gr = { key: 0 }, jr = ["data-position"], Wr = { key: 0 }, no = 1.5, Yr = {
|
|
2002
2018
|
__name: "vue-ui-dag",
|
|
2003
2019
|
props: {
|
|
2004
2020
|
dataset: {
|
|
@@ -2019,10 +2035,10 @@ const yr = {
|
|
|
2019
2035
|
},
|
|
2020
2036
|
emits: ["onNodeClick", "onMidpointEnter", "onMidpointLeave"],
|
|
2021
2037
|
setup(e, { expose: t, emit: o }) {
|
|
2022
|
-
const n =
|
|
2038
|
+
const n = qe(() => import("./PenAndPaper-DscVdZ1u.js")), s = qe(() => import("./UserOptions-ChRXLqps.js")), i = qe(() => import("./PackageVersion-CR86X4r9.js")), { vue_ui_dag: r } = gn(), { isThemeValid: l, warnInvalidTheme: a } = yn(), c = e, d = o, f = k(null), g = k(lt()), b = k(null), N = k(null), x = k(null), T = k(0), I = k(0), fe = k(!1), oe = k(!1), R = k(null), P = k(null), u = k(We()), G = k(u.value.style.chart.width), H = k(u.value.style.chart.height), Ae = k({ x: 0, y: 0 }), z = k(null), Se = k(null), Le = k({ left: "0px", top: "0px" }), he = k("top"), K = k(!1), ft = k({ x: 0, y: 0 }), ht = k({ x: 0, y: 0 }), me = k(null), Ie = k(null), Ge = k({ left: "0px", top: "0px" }), mt = k("top"), Oe = k(!1), ge = k(!1), { svgRef: J } = En({ config: u.value.style.chart.title }), { userOptionsVisible: je, setUserOptionsVisibility: gt, keepUserOptionState: vt } = kn({ config: u.value }), Te = k(u.value.style.chart.layout.rankDirection), { loading: ve, FINAL_DATASET: bt, manualLoading: pt } = vn({
|
|
2023
2039
|
...Qo(c),
|
|
2024
2040
|
FINAL_CONFIG: u,
|
|
2025
|
-
prepareConfig:
|
|
2041
|
+
prepareConfig: We,
|
|
2026
2042
|
skeletonDataset: {
|
|
2027
2043
|
nodes: [
|
|
2028
2044
|
{ id: "A", label: "" },
|
|
@@ -2057,64 +2073,64 @@ const yr = {
|
|
|
2057
2073
|
}
|
|
2058
2074
|
})
|
|
2059
2075
|
});
|
|
2060
|
-
function
|
|
2061
|
-
const m =
|
|
2076
|
+
function We() {
|
|
2077
|
+
const m = Je({
|
|
2062
2078
|
userConfig: c.config,
|
|
2063
|
-
defaultConfig:
|
|
2079
|
+
defaultConfig: r
|
|
2064
2080
|
}), p = m.theme;
|
|
2065
2081
|
if (!p) return m;
|
|
2066
2082
|
if (!l.value(m))
|
|
2067
2083
|
return a(m), m;
|
|
2068
|
-
const h =
|
|
2084
|
+
const h = Je({
|
|
2069
2085
|
userConfig: Ao[p] || c.config,
|
|
2070
2086
|
defaultConfig: m
|
|
2071
2087
|
});
|
|
2072
|
-
return
|
|
2088
|
+
return Je({
|
|
2073
2089
|
userConfig: c.config,
|
|
2074
2090
|
defaultConfig: h
|
|
2075
2091
|
});
|
|
2076
2092
|
}
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2093
|
+
const wt = Y(() => !!u.value.debug);
|
|
2094
|
+
Vt(async () => {
|
|
2079
2095
|
cn(c.dataset) && (jt({
|
|
2080
2096
|
componentName: "VueUiDag",
|
|
2081
2097
|
type: "dataset",
|
|
2082
|
-
debug:
|
|
2083
|
-
}), oe.value = !1,
|
|
2098
|
+
debug: wt.value
|
|
2099
|
+
}), oe.value = !1, pt.value = !0), c.dataset.nodes || (jt({
|
|
2084
2100
|
componentName: "VueUiDag",
|
|
2085
2101
|
type: "datasetAttributeEmpty",
|
|
2086
2102
|
property: "nodes",
|
|
2087
2103
|
index: 0,
|
|
2088
|
-
debug:
|
|
2089
|
-
}), oe.value = !1,
|
|
2090
|
-
}),
|
|
2091
|
-
ve.value || (u.value =
|
|
2104
|
+
debug: wt.value
|
|
2105
|
+
}), oe.value = !1, pt.value = !0), oe.value = !0, await De(), zt();
|
|
2106
|
+
}), Fe(() => c.config, async (m) => {
|
|
2107
|
+
ve.value || (u.value = We()), je.value = !u.value.userOptions.showOnChartHover, T.value += 1, Te.value = u.value.style.chart.layout.rankDirection, G.value = u.value.style.chart.width, H.value = u.value.style.chart.height, ne.value = u.value.style.chart.zoom.active, await De(), zt();
|
|
2092
2108
|
}, { deep: !0 });
|
|
2093
|
-
const { isPrinting:
|
|
2109
|
+
const { isPrinting: yt, isImaging: kt, generatePdf: Et, generateImage: Ct } = pn({
|
|
2094
2110
|
elementId: `dag_${g.value}`,
|
|
2095
2111
|
fileName: u.value.style.chart.title.text || "vue-ui-dag",
|
|
2096
2112
|
options: u.value.userOptions.print
|
|
2097
|
-
}), So =
|
|
2113
|
+
}), So = Y(() => u.value.style.chart.backgroundColor), Lo = Y(() => u.value.style.chart.title), { exportSvg: Oo, getSvg: To } = wn({
|
|
2098
2114
|
svg: J,
|
|
2099
2115
|
title: Lo,
|
|
2100
2116
|
legend: void 0,
|
|
2101
2117
|
legendItems: void 0,
|
|
2102
2118
|
backgroundColor: So
|
|
2103
2119
|
});
|
|
2104
|
-
async function
|
|
2120
|
+
async function xt({ isCb: m }) {
|
|
2105
2121
|
if (m) {
|
|
2106
|
-
const { blob: p, url: h, text: w, dataUrl: O } = await
|
|
2122
|
+
const { blob: p, url: h, text: w, dataUrl: O } = await To();
|
|
2107
2123
|
u.value.userOptions.callbacks.svg({ blob: p, url: h, text: w, dataUrl: O });
|
|
2108
2124
|
} else
|
|
2109
2125
|
Oo();
|
|
2110
2126
|
}
|
|
2111
|
-
function
|
|
2112
|
-
fe.value = !0,
|
|
2127
|
+
function Ro() {
|
|
2128
|
+
fe.value = !0, gt(!0);
|
|
2113
2129
|
}
|
|
2114
2130
|
function Mo() {
|
|
2115
|
-
|
|
2131
|
+
gt(!1), fe.value = !1;
|
|
2116
2132
|
}
|
|
2117
|
-
function
|
|
2133
|
+
function _t({
|
|
2118
2134
|
tooltipRef: m,
|
|
2119
2135
|
isVisibleRef: p,
|
|
2120
2136
|
anchorRef: h,
|
|
@@ -2126,18 +2142,18 @@ const yr = {
|
|
|
2126
2142
|
return function() {
|
|
2127
2143
|
const ee = m.value;
|
|
2128
2144
|
if (!ee || !p.value) return;
|
|
2129
|
-
const
|
|
2130
|
-
let F = Me -
|
|
2145
|
+
const L = ee.getBoundingClientRect(), D = window.innerWidth, pe = window.innerHeight, we = h.value.x, Me = h.value.y, $e = $?.value?.x ?? 0, Bt = $?.value?.y ?? 0;
|
|
2146
|
+
let F = Me - Bt - L.height - C, Z = we - L.width / 2, ye = "top";
|
|
2131
2147
|
if (F < C) {
|
|
2132
|
-
const re = Me +
|
|
2133
|
-
re +
|
|
2148
|
+
const re = Me + Bt + C;
|
|
2149
|
+
re + L.height <= pe - C ? (F = re, ye = "bottom") : (F = Me - L.height / 2, F < C && (F = C), F + L.height > pe - C && (F = pe - L.height - C), ye = "center");
|
|
2134
2150
|
}
|
|
2135
|
-
Z < C && (Z = C), Z +
|
|
2136
|
-
const Xo = Z <= C, qo = Z +
|
|
2151
|
+
Z < C && (Z = C), Z + L.width > D - C && (Z = D - L.width - C);
|
|
2152
|
+
const Xo = Z <= C, qo = Z + L.width >= D - C;
|
|
2137
2153
|
if ((Xo || qo) && ye !== "center") {
|
|
2138
2154
|
let re, ke;
|
|
2139
2155
|
const Ko = we - $e - C;
|
|
2140
|
-
D - (we + $e) - C >= Ko ? (re = "right", ke = we + $e + C) : (re = "left", ke = we - $e - C -
|
|
2156
|
+
D - (we + $e) - C >= Ko ? (re = "right", ke = we + $e + C) : (re = "left", ke = we - $e - C - L.width), ke >= C && ke + L.width <= D - C && (Z = ke, F = Me - L.height / 2, F < C && (F = C), F + L.height > pe - C && (F = pe - L.height - C), ye = re);
|
|
2141
2157
|
}
|
|
2142
2158
|
O.value = ye, w.value = {
|
|
2143
2159
|
left: `${Z}px`,
|
|
@@ -2145,43 +2161,43 @@ const yr = {
|
|
|
2145
2161
|
};
|
|
2146
2162
|
};
|
|
2147
2163
|
}
|
|
2148
|
-
const $o =
|
|
2164
|
+
const $o = Y(() => bt.value.nodes.map((m) => ({
|
|
2149
2165
|
...m,
|
|
2150
2166
|
backgroundColor: m.backgroundColor ? Ce(m.backgroundColor) : u.value.style.chart.nodes.backgroundColor,
|
|
2151
2167
|
color: m.color ? Ce(m.color) : u.value.style.chart.nodes.labels.color
|
|
2152
|
-
}))), Do =
|
|
2168
|
+
}))), Do = Y(() => bt.value.edges), Fo = Y(() => ({
|
|
2153
2169
|
...u.value.style.chart.layout,
|
|
2154
|
-
rankDirection:
|
|
2155
|
-
})), { layoutData: E, lastError:
|
|
2170
|
+
rankDirection: Te.value
|
|
2171
|
+
})), { layoutData: E, lastError: Nt, arrowMarkerIdentifier: Po } = pr({
|
|
2156
2172
|
nodes: $o,
|
|
2157
2173
|
edges: Do,
|
|
2158
2174
|
configuration: Fo
|
|
2159
2175
|
});
|
|
2160
|
-
function
|
|
2176
|
+
function At(m) {
|
|
2161
2177
|
return E.value ? E.value.nodes.find((p) => p.id === m) : null;
|
|
2162
2178
|
}
|
|
2163
|
-
const zo =
|
|
2179
|
+
const zo = Y(() => {
|
|
2164
2180
|
if (!E.value) return [];
|
|
2165
2181
|
const m = u.value.style.chart.edges.stroke, p = /* @__PURE__ */ new Set();
|
|
2166
2182
|
return E.value.edges.forEach((h) => {
|
|
2167
2183
|
p.add(h.original?.color || m);
|
|
2168
2184
|
}), Array.from(p);
|
|
2169
2185
|
});
|
|
2170
|
-
function
|
|
2186
|
+
function St(m) {
|
|
2171
2187
|
return `${Po}-${String(m).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2172
2188
|
}
|
|
2173
|
-
const
|
|
2174
|
-
const m =
|
|
2189
|
+
const Lt = Y(() => {
|
|
2190
|
+
const m = G.value, p = H.value, h = Number(m), w = Number(p), O = Number.isFinite(h) && h > 0, $ = Number.isFinite(w) && w > 0;
|
|
2175
2191
|
return !O && !$ ? null : {
|
|
2176
2192
|
width: O ? h : null,
|
|
2177
2193
|
height: $ ? w : null
|
|
2178
2194
|
};
|
|
2179
|
-
}), be =
|
|
2180
|
-
viewBox:
|
|
2181
|
-
resetZoom:
|
|
2195
|
+
}), be = k(null), ne = k(u.value.style.chart.zoom.active), {
|
|
2196
|
+
viewBox: Ot,
|
|
2197
|
+
resetZoom: Re,
|
|
2182
2198
|
setInitialViewBox: Bo,
|
|
2183
|
-
scale:
|
|
2184
|
-
zoomByFactor:
|
|
2199
|
+
scale: Tt,
|
|
2200
|
+
zoomByFactor: Rt
|
|
2185
2201
|
} = mn(
|
|
2186
2202
|
J,
|
|
2187
2203
|
{ x: 0, y: 0, width: 100, height: 100 },
|
|
@@ -2194,7 +2210,7 @@ const yr = {
|
|
|
2194
2210
|
function Vo() {
|
|
2195
2211
|
ne.value = !ne.value;
|
|
2196
2212
|
}
|
|
2197
|
-
function
|
|
2213
|
+
function Mt() {
|
|
2198
2214
|
const m = E.value && E.value.viewBox;
|
|
2199
2215
|
if (!m) return;
|
|
2200
2216
|
const p = String(m).split(" ").map(Number);
|
|
@@ -2202,60 +2218,60 @@ const yr = {
|
|
|
2202
2218
|
const [h, w, O, $] = p;
|
|
2203
2219
|
if (!Number.isFinite(h) || !Number.isFinite(w) || !Number.isFinite(O) || !Number.isFinite($))
|
|
2204
2220
|
return;
|
|
2205
|
-
let C = O, se = $, ee = h,
|
|
2206
|
-
const D =
|
|
2207
|
-
D && (D.width !== null && (C = D.width), D.height !== null && (se = D.height), ee = h - (C - O) / 2,
|
|
2208
|
-
{ x: ee, y:
|
|
2221
|
+
let C = O, se = $, ee = h, L = w;
|
|
2222
|
+
const D = Lt.value;
|
|
2223
|
+
D && (D.width !== null && (C = D.width), D.height !== null && (se = D.height), ee = h - (C - O) / 2, L = w - (se - $) / 2), Bo(
|
|
2224
|
+
{ x: ee, y: L, width: C, height: se },
|
|
2209
2225
|
{ overwriteCurrentIfNotZoomed: !0 }
|
|
2210
2226
|
);
|
|
2211
2227
|
}
|
|
2212
|
-
|
|
2228
|
+
Fe(
|
|
2213
2229
|
() => E.value && E.value.viewBox,
|
|
2214
2230
|
() => {
|
|
2215
|
-
|
|
2231
|
+
Mt();
|
|
2216
2232
|
},
|
|
2217
2233
|
{ immediate: !0 }
|
|
2218
|
-
),
|
|
2219
|
-
() =>
|
|
2234
|
+
), Fe(
|
|
2235
|
+
() => Lt.value,
|
|
2220
2236
|
() => {
|
|
2221
|
-
|
|
2237
|
+
Mt();
|
|
2222
2238
|
}
|
|
2223
|
-
),
|
|
2239
|
+
), Fe(() => ge.value, (m) => {
|
|
2224
2240
|
ne.value = !m;
|
|
2225
2241
|
});
|
|
2226
|
-
const Io =
|
|
2227
|
-
const m =
|
|
2242
|
+
const Io = Y(() => {
|
|
2243
|
+
const m = Ot.value;
|
|
2228
2244
|
return m ? `${m.x} ${m.y} ${m.width} ${m.height}` : "0 0 0 0";
|
|
2229
|
-
}), Q =
|
|
2230
|
-
function
|
|
2231
|
-
Q.value = m,
|
|
2232
|
-
}
|
|
2233
|
-
function We() {
|
|
2234
|
-
ge.value = !ge.value;
|
|
2245
|
+
}), Q = k(!1);
|
|
2246
|
+
function $t(m) {
|
|
2247
|
+
Q.value = m, I.value += 1;
|
|
2235
2248
|
}
|
|
2236
2249
|
function Ye() {
|
|
2237
|
-
|
|
2250
|
+
ge.value = !ge.value;
|
|
2238
2251
|
}
|
|
2239
2252
|
function He() {
|
|
2240
|
-
|
|
2253
|
+
Rt(no, !0);
|
|
2254
|
+
}
|
|
2255
|
+
function Ze() {
|
|
2256
|
+
Rt(1 / no, !0);
|
|
2241
2257
|
}
|
|
2242
|
-
const
|
|
2243
|
-
function
|
|
2244
|
-
|
|
2258
|
+
const Ue = ["TB", "RL", "BT", "LR"];
|
|
2259
|
+
function Xe() {
|
|
2260
|
+
Te.value = Ue[(Ue.indexOf(Te.value) + 1) % Ue.length], Re();
|
|
2245
2261
|
}
|
|
2246
|
-
const Go =
|
|
2262
|
+
const Go = _t({
|
|
2247
2263
|
tooltipRef: Se,
|
|
2248
2264
|
isVisibleRef: Oe,
|
|
2249
2265
|
anchorRef: Ae,
|
|
2250
2266
|
styleRef: Le,
|
|
2251
2267
|
placementRef: he
|
|
2252
|
-
}), jo =
|
|
2253
|
-
tooltipRef:
|
|
2268
|
+
}), jo = _t({
|
|
2269
|
+
tooltipRef: Ie,
|
|
2254
2270
|
isVisibleRef: K,
|
|
2255
|
-
anchorRef:
|
|
2256
|
-
styleRef:
|
|
2257
|
-
placementRef:
|
|
2258
|
-
offsetRef:
|
|
2271
|
+
anchorRef: ft,
|
|
2272
|
+
styleRef: Ge,
|
|
2273
|
+
placementRef: mt,
|
|
2274
|
+
offsetRef: ht
|
|
2259
2275
|
});
|
|
2260
2276
|
async function Wo(m) {
|
|
2261
2277
|
d("onMidpointEnter", m);
|
|
@@ -2269,7 +2285,7 @@ const yr = {
|
|
|
2269
2285
|
Ae.value = {
|
|
2270
2286
|
x: O.x,
|
|
2271
2287
|
y: O.y
|
|
2272
|
-
}, z.value = m, Oe.value = !0, await
|
|
2288
|
+
}, z.value = m, Oe.value = !0, await De(), Go();
|
|
2273
2289
|
}
|
|
2274
2290
|
function Yo() {
|
|
2275
2291
|
Oe.value = !1, z.value = null, d("onMidpointLeave");
|
|
@@ -2282,35 +2298,35 @@ const yr = {
|
|
|
2282
2298
|
h.x = m.x, h.y = m.y;
|
|
2283
2299
|
const w = p.getScreenCTM();
|
|
2284
2300
|
if (!w) return;
|
|
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,
|
|
2286
|
-
|
|
2287
|
-
x:
|
|
2301
|
+
const O = h.matrixTransform(w), $ = u.value.style.chart.layout.nodeWidth, C = u.value.style.chart.layout.nodeHeight, se = w.a, ee = w.d, L = $ * se, D = C * ee;
|
|
2302
|
+
ht.value = {
|
|
2303
|
+
x: L / 2,
|
|
2288
2304
|
y: D / 2
|
|
2289
|
-
},
|
|
2305
|
+
}, ft.value = {
|
|
2290
2306
|
x: O.x,
|
|
2291
2307
|
y: O.y
|
|
2292
|
-
}, me.value = m, K.value = !0, await
|
|
2308
|
+
}, me.value = m, K.value = !0, await De(), jo();
|
|
2293
2309
|
}
|
|
2294
|
-
function
|
|
2310
|
+
function Dt() {
|
|
2295
2311
|
K.value = !1, me.value = null;
|
|
2296
2312
|
}
|
|
2297
|
-
function
|
|
2313
|
+
function Ft(m) {
|
|
2298
2314
|
if (!K.value) return;
|
|
2299
|
-
const p =
|
|
2315
|
+
const p = Ie.value;
|
|
2300
2316
|
if (p && p.contains(m.target))
|
|
2301
2317
|
return;
|
|
2302
2318
|
const h = J.value;
|
|
2303
|
-
h && h.contains(m.target) && m.target.closest(".vue-ui-dag-node") ||
|
|
2319
|
+
h && h.contains(m.target) && m.target.closest(".vue-ui-dag-node") || Dt();
|
|
2304
2320
|
}
|
|
2305
|
-
function
|
|
2306
|
-
m.key === "Escape" && K.value &&
|
|
2321
|
+
function Pt(m) {
|
|
2322
|
+
m.key === "Escape" && K.value && Dt();
|
|
2307
2323
|
}
|
|
2308
|
-
|
|
2309
|
-
document.addEventListener("mousedown",
|
|
2324
|
+
Vt(() => {
|
|
2325
|
+
document.addEventListener("mousedown", Ft), document.addEventListener("keydown", Pt);
|
|
2310
2326
|
}), en(() => {
|
|
2311
|
-
document.removeEventListener("mousedown",
|
|
2327
|
+
document.removeEventListener("mousedown", Ft), document.removeEventListener("keydown", Pt), R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect());
|
|
2312
2328
|
});
|
|
2313
|
-
function
|
|
2329
|
+
function zt() {
|
|
2314
2330
|
if (!u.value.responsive) {
|
|
2315
2331
|
R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect(), R.value = null, P.value = null);
|
|
2316
2332
|
return;
|
|
@@ -2320,11 +2336,11 @@ const yr = {
|
|
|
2320
2336
|
const { width: p, height: h } = hn({
|
|
2321
2337
|
chart: f.value,
|
|
2322
2338
|
title: u.value.style.chart.title.text ? b.value : null,
|
|
2323
|
-
legend: u.value.style.chart.controls.show ?
|
|
2339
|
+
legend: u.value.style.chart.controls.show ? x.value?.$el : null,
|
|
2324
2340
|
source: N.value
|
|
2325
2341
|
});
|
|
2326
2342
|
requestAnimationFrame(() => {
|
|
2327
|
-
|
|
2343
|
+
G.value = Math.max(0.1, p), H.value = Math.max(0.1, h - 12);
|
|
2328
2344
|
});
|
|
2329
2345
|
});
|
|
2330
2346
|
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();
|
|
@@ -2347,17 +2363,17 @@ const yr = {
|
|
|
2347
2363
|
return t({
|
|
2348
2364
|
getData: Uo,
|
|
2349
2365
|
getImage: Zo,
|
|
2350
|
-
generatePdf:
|
|
2351
|
-
generateSvg:
|
|
2352
|
-
generateImage:
|
|
2353
|
-
toggleAnnotator:
|
|
2354
|
-
toggleFullscreen:
|
|
2355
|
-
zoomIn:
|
|
2356
|
-
zoomOut:
|
|
2357
|
-
resetZoom:
|
|
2358
|
-
switchDirection:
|
|
2359
|
-
}), (m, p) => (
|
|
2360
|
-
class:
|
|
2366
|
+
generatePdf: Et,
|
|
2367
|
+
generateSvg: xt,
|
|
2368
|
+
generateImage: Ct,
|
|
2369
|
+
toggleAnnotator: Ye,
|
|
2370
|
+
toggleFullscreen: $t,
|
|
2371
|
+
zoomIn: He,
|
|
2372
|
+
zoomOut: Ze,
|
|
2373
|
+
resetZoom: Re,
|
|
2374
|
+
switchDirection: Xe
|
|
2375
|
+
}), (m, p) => (y(), _("div", {
|
|
2376
|
+
class: it(`vue-data-ui-component vue-ui-dag ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${u.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2361
2377
|
id: `dag_${g.value}`,
|
|
2362
2378
|
ref_key: "dagChart",
|
|
2363
2379
|
ref: f,
|
|
@@ -2366,45 +2382,45 @@ const yr = {
|
|
|
2366
2382
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2367
2383
|
padding: "0.5rem"
|
|
2368
2384
|
}),
|
|
2369
|
-
onMouseenter:
|
|
2385
|
+
onMouseenter: Ro,
|
|
2370
2386
|
onMouseleave: Mo
|
|
2371
2387
|
}, [
|
|
2372
|
-
v(
|
|
2373
|
-
u.value.userOptions.buttons.annotator ? (
|
|
2388
|
+
v(Nt) ? (y(), _("div", Er, le(String(v(Nt))), 1)) : S("", !0),
|
|
2389
|
+
u.value.userOptions.buttons.annotator ? (y(), U(v(n), {
|
|
2374
2390
|
key: 1,
|
|
2375
2391
|
svgRef: v(J),
|
|
2376
2392
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2377
2393
|
color: u.value.style.chart.color,
|
|
2378
2394
|
active: ge.value,
|
|
2379
|
-
onClose:
|
|
2395
|
+
onClose: Ye
|
|
2380
2396
|
}, {
|
|
2381
|
-
"annotator-action-close":
|
|
2397
|
+
"annotator-action-close": M(() => [
|
|
2382
2398
|
A(m.$slots, "annotator-action-close", {}, void 0, !0)
|
|
2383
2399
|
]),
|
|
2384
|
-
"annotator-action-color":
|
|
2400
|
+
"annotator-action-color": M(({ color: h }) => [
|
|
2385
2401
|
A(m.$slots, "annotator-action-color", B(V({ color: h })), void 0, !0)
|
|
2386
2402
|
]),
|
|
2387
|
-
"annotator-action-draw":
|
|
2403
|
+
"annotator-action-draw": M(({ mode: h }) => [
|
|
2388
2404
|
A(m.$slots, "annotator-action-draw", B(V({ mode: h })), void 0, !0)
|
|
2389
2405
|
]),
|
|
2390
|
-
"annotator-action-undo":
|
|
2406
|
+
"annotator-action-undo": M(({ disabled: h }) => [
|
|
2391
2407
|
A(m.$slots, "annotator-action-undo", B(V({ disabled: h })), void 0, !0)
|
|
2392
2408
|
]),
|
|
2393
|
-
"annotator-action-redo":
|
|
2409
|
+
"annotator-action-redo": M(({ disabled: h }) => [
|
|
2394
2410
|
A(m.$slots, "annotator-action-redo", B(V({ disabled: h })), void 0, !0)
|
|
2395
2411
|
]),
|
|
2396
|
-
"annotator-action-delete":
|
|
2412
|
+
"annotator-action-delete": M(({ disabled: h }) => [
|
|
2397
2413
|
A(m.$slots, "annotator-action-delete", B(V({ disabled: h })), void 0, !0)
|
|
2398
2414
|
]),
|
|
2399
2415
|
_: 3
|
|
2400
|
-
}, 8, ["svgRef", "backgroundColor", "color", "active"])) :
|
|
2401
|
-
u.value.userOptions.show && oe.value && (v(
|
|
2416
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : S("", !0),
|
|
2417
|
+
u.value.userOptions.show && oe.value && (v(vt) || v(je)) ? (y(), U(v(s), {
|
|
2402
2418
|
ref: "userOptionsRef",
|
|
2403
|
-
key: `user_option_${
|
|
2419
|
+
key: `user_option_${I.value}`,
|
|
2404
2420
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2405
2421
|
color: u.value.style.chart.color,
|
|
2406
|
-
isPrinting: v(
|
|
2407
|
-
isImaging: v(
|
|
2422
|
+
isPrinting: v(yt),
|
|
2423
|
+
isImaging: v(kt),
|
|
2408
2424
|
uid: g.value,
|
|
2409
2425
|
hasTooltip: !1,
|
|
2410
2426
|
hasTable: !1,
|
|
@@ -2424,74 +2440,74 @@ const yr = {
|
|
|
2424
2440
|
printScale: u.value.userOptions.print.scale,
|
|
2425
2441
|
hasZoom: u.value.userOptions.buttons.zoom,
|
|
2426
2442
|
isZoom: ne.value,
|
|
2427
|
-
onToggleFullscreen:
|
|
2428
|
-
onGeneratePdf: v(
|
|
2429
|
-
onGenerateImage: v(
|
|
2430
|
-
onGenerateSvg:
|
|
2431
|
-
onToggleAnnotator:
|
|
2443
|
+
onToggleFullscreen: $t,
|
|
2444
|
+
onGeneratePdf: v(Et),
|
|
2445
|
+
onGenerateImage: v(Ct),
|
|
2446
|
+
onGenerateSvg: xt,
|
|
2447
|
+
onToggleAnnotator: Ye,
|
|
2432
2448
|
onToggleZoom: Vo,
|
|
2433
2449
|
style: X({
|
|
2434
|
-
visibility: v(
|
|
2450
|
+
visibility: v(vt) ? v(je) ? "visible" : "hidden" : "visible"
|
|
2435
2451
|
})
|
|
2436
2452
|
}, tn({ _: 2 }, [
|
|
2437
2453
|
m.$slots.menuIcon ? {
|
|
2438
2454
|
name: "menuIcon",
|
|
2439
|
-
fn:
|
|
2455
|
+
fn: M(({ isOpen: h, color: w }) => [
|
|
2440
2456
|
A(m.$slots, "menuIcon", B(V({ isOpen: h, color: w })), void 0, !0)
|
|
2441
2457
|
]),
|
|
2442
2458
|
key: "0"
|
|
2443
2459
|
} : void 0,
|
|
2444
2460
|
m.$slots.optionPdf ? {
|
|
2445
2461
|
name: "optionPdf",
|
|
2446
|
-
fn:
|
|
2462
|
+
fn: M(() => [
|
|
2447
2463
|
A(m.$slots, "optionPdf", {}, void 0, !0)
|
|
2448
2464
|
]),
|
|
2449
2465
|
key: "1"
|
|
2450
2466
|
} : void 0,
|
|
2451
2467
|
m.$slots.optionImg ? {
|
|
2452
2468
|
name: "optionImg",
|
|
2453
|
-
fn:
|
|
2469
|
+
fn: M(() => [
|
|
2454
2470
|
A(m.$slots, "optionImg", {}, void 0, !0)
|
|
2455
2471
|
]),
|
|
2456
2472
|
key: "2"
|
|
2457
2473
|
} : void 0,
|
|
2458
2474
|
m.$slots.optionSvg ? {
|
|
2459
2475
|
name: "optionSvg",
|
|
2460
|
-
fn:
|
|
2476
|
+
fn: M(() => [
|
|
2461
2477
|
A(m.$slots, "optionSvg", {}, void 0, !0)
|
|
2462
2478
|
]),
|
|
2463
2479
|
key: "3"
|
|
2464
2480
|
} : void 0,
|
|
2465
2481
|
m.$slots.optionFullscreen ? {
|
|
2466
2482
|
name: "optionFullscreen",
|
|
2467
|
-
fn:
|
|
2483
|
+
fn: M(({ toggleFullscreen: h, isFullscreen: w }) => [
|
|
2468
2484
|
A(m.$slots, "optionFullscreen", B(V({ toggleFullscreen: h, isFullscreen: w })), void 0, !0)
|
|
2469
2485
|
]),
|
|
2470
2486
|
key: "4"
|
|
2471
2487
|
} : void 0,
|
|
2472
2488
|
m.$slots.optionAnnotator ? {
|
|
2473
2489
|
name: "optionAnnotator",
|
|
2474
|
-
fn:
|
|
2490
|
+
fn: M(({ toggleAnnotator: h, isAnnotator: w }) => [
|
|
2475
2491
|
A(m.$slots, "optionAnnotator", B(V({ toggleAnnotator: h, isAnnotator: w })), void 0, !0)
|
|
2476
2492
|
]),
|
|
2477
2493
|
key: "5"
|
|
2478
2494
|
} : void 0,
|
|
2479
2495
|
m.$slots.optionZoom ? {
|
|
2480
2496
|
name: "optionZoom",
|
|
2481
|
-
fn:
|
|
2497
|
+
fn: M(({ toggleZoom: h, isZoomLocked: w }) => [
|
|
2482
2498
|
A(m.$slots, "optionZoom", B(V({ toggleZoom: h, isZoomLocked: w })), void 0, !0)
|
|
2483
2499
|
]),
|
|
2484
2500
|
key: "6"
|
|
2485
2501
|
} : void 0
|
|
2486
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) :
|
|
2487
|
-
u.value.style.chart.title.text ? (
|
|
2502
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) : S("", !0),
|
|
2503
|
+
u.value.style.chart.title.text ? (y(), _("div", {
|
|
2488
2504
|
key: 3,
|
|
2489
2505
|
ref_key: "chartTitle",
|
|
2490
2506
|
ref: b,
|
|
2491
2507
|
style: "width:100%;background:transparent;"
|
|
2492
2508
|
}, [
|
|
2493
|
-
(
|
|
2494
|
-
key: `title_${
|
|
2509
|
+
(y(), U(Cn, {
|
|
2510
|
+
key: `title_${T.value}`,
|
|
2495
2511
|
config: {
|
|
2496
2512
|
title: {
|
|
2497
2513
|
cy: "dag-title",
|
|
@@ -2503,25 +2519,25 @@ const yr = {
|
|
|
2503
2519
|
}
|
|
2504
2520
|
}
|
|
2505
2521
|
}, null, 8, ["config"]))
|
|
2506
|
-
], 512)) :
|
|
2507
|
-
u.value.style.chart.controls.position === "top" && !v(ve) && u.value.style.chart.controls.show ? (
|
|
2522
|
+
], 512)) : S("", !0),
|
|
2523
|
+
u.value.style.chart.controls.position === "top" && !v(ve) && u.value.style.chart.controls.show ? (y(), U(oo, {
|
|
2508
2524
|
key: 4,
|
|
2509
2525
|
ref_key: "zoomControls",
|
|
2510
|
-
ref:
|
|
2526
|
+
ref: x,
|
|
2511
2527
|
config: u.value,
|
|
2512
|
-
scale: v(
|
|
2528
|
+
scale: v(Tt),
|
|
2513
2529
|
isFullscreen: Q.value,
|
|
2514
2530
|
withDirection: "",
|
|
2515
|
-
onZoomIn:
|
|
2516
|
-
onZoomOut:
|
|
2517
|
-
onResetZoom: p[0] || (p[0] = () => v(
|
|
2518
|
-
onSwitchDirection:
|
|
2519
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) :
|
|
2520
|
-
v(E) ? (
|
|
2531
|
+
onZoomIn: He,
|
|
2532
|
+
onZoomOut: Ze,
|
|
2533
|
+
onResetZoom: p[0] || (p[0] = () => v(Re)(!0)),
|
|
2534
|
+
onSwitchDirection: Xe
|
|
2535
|
+
}, null, 8, ["config", "scale", "isFullscreen"])) : S("", !0),
|
|
2536
|
+
v(E) ? (y(), _("svg", {
|
|
2521
2537
|
key: 5,
|
|
2522
2538
|
ref_key: "svgRef",
|
|
2523
2539
|
ref: J,
|
|
2524
|
-
class:
|
|
2540
|
+
class: it({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": v(ve) }),
|
|
2525
2541
|
viewBox: Io.value,
|
|
2526
2542
|
xmlns: v(un),
|
|
2527
2543
|
style: X({
|
|
@@ -2530,25 +2546,25 @@ const yr = {
|
|
|
2530
2546
|
width: "100%"
|
|
2531
2547
|
})
|
|
2532
2548
|
}, [
|
|
2533
|
-
ae(v(
|
|
2534
|
-
v(E).arrowShape !== "undirected" ? (
|
|
2535
|
-
(
|
|
2549
|
+
ae(v(i)),
|
|
2550
|
+
v(E).arrowShape !== "undirected" ? (y(), _("defs", xr, [
|
|
2551
|
+
(y(!0), _(ie, null, Pe(zo.value, (h) => (y(), _("marker", {
|
|
2536
2552
|
key: h,
|
|
2537
|
-
id:
|
|
2553
|
+
id: St(h),
|
|
2538
2554
|
markerWidth: v(E).arrowSize,
|
|
2539
2555
|
markerHeight: v(E).arrowSize,
|
|
2540
|
-
refX: v(E).arrowSize -
|
|
2556
|
+
refX: v(E).arrowSize - 3,
|
|
2541
2557
|
refY: v(E).arrowSize / 2,
|
|
2542
2558
|
orient: "auto",
|
|
2543
2559
|
markerUnits: "strokeWidth"
|
|
2544
2560
|
}, [
|
|
2545
|
-
v(E).arrowShape === "normal" ? (
|
|
2561
|
+
v(E).arrowShape === "normal" ? (y(), _("path", {
|
|
2546
2562
|
key: 0,
|
|
2547
2563
|
d: `M 0 0 L ${v(E).arrowSize} ${v(E).arrowSize / 2} L 0 ${v(E).arrowSize} Z`,
|
|
2548
2564
|
fill: h,
|
|
2549
2565
|
stroke: h,
|
|
2550
2566
|
"stroke-width": "0"
|
|
2551
|
-
}, null, 8, Nr)) : (
|
|
2567
|
+
}, null, 8, Nr)) : (y(), _("path", {
|
|
2552
2568
|
key: 1,
|
|
2553
2569
|
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
2570
|
fill: h,
|
|
@@ -2556,12 +2572,12 @@ const yr = {
|
|
|
2556
2572
|
"stroke-width": "0"
|
|
2557
2573
|
}, null, 8, Ar))
|
|
2558
2574
|
], 8, _r))), 128))
|
|
2559
|
-
])) :
|
|
2560
|
-
|
|
2561
|
-
(
|
|
2575
|
+
])) : S("", !0),
|
|
2576
|
+
j("g", Sr, [
|
|
2577
|
+
(y(!0), _(ie, null, Pe(v(E).edges, (h) => (y(), _(ie, {
|
|
2562
2578
|
key: h.id
|
|
2563
2579
|
}, [
|
|
2564
|
-
|
|
2580
|
+
j("path", {
|
|
2565
2581
|
"data-cy-edge": "",
|
|
2566
2582
|
d: h.pathData,
|
|
2567
2583
|
fill: "none",
|
|
@@ -2571,7 +2587,7 @@ const yr = {
|
|
|
2571
2587
|
"stroke-linejoin": "round",
|
|
2572
2588
|
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2573
2589
|
}, null, 8, Lr),
|
|
2574
|
-
u.value.style.chart.midpoints.show ? (
|
|
2590
|
+
u.value.style.chart.midpoints.show ? (y(), _("circle", {
|
|
2575
2591
|
key: 0,
|
|
2576
2592
|
"data-cy-midpoint": "",
|
|
2577
2593
|
class: "vue-ui-dag-edge-midpoint",
|
|
@@ -2584,19 +2600,19 @@ const yr = {
|
|
|
2584
2600
|
style: { transition: "stroke-width 0.2s ease-in-out" },
|
|
2585
2601
|
onMouseenter: (w) => Wo(h),
|
|
2586
2602
|
onMouseleave: Yo
|
|
2587
|
-
}, null, 40, Or)) :
|
|
2603
|
+
}, null, 40, Or)) : S("", !0)
|
|
2588
2604
|
], 64))), 128))
|
|
2589
2605
|
]),
|
|
2590
|
-
|
|
2591
|
-
(
|
|
2606
|
+
j("g", Tr, [
|
|
2607
|
+
(y(!0), _(ie, null, Pe(v(E).nodes, (h) => (y(), _("g", {
|
|
2592
2608
|
key: h.id,
|
|
2593
2609
|
class: "vue-ui-dag-node",
|
|
2594
2610
|
onClick: on((w) => u.value.style.chart.nodes.tooltip.showOnClick && Ho(h), ["stop"]),
|
|
2595
2611
|
onMouseenter: (w) => be.value = h.id,
|
|
2596
2612
|
onMouseleave: p[1] || (p[1] = (w) => be.value = null)
|
|
2597
2613
|
}, [
|
|
2598
|
-
m.$slots.node ?
|
|
2599
|
-
|
|
2614
|
+
m.$slots.node ? S("", !0) : (y(), _(ie, { key: 0 }, [
|
|
2615
|
+
j("rect", {
|
|
2600
2616
|
"data-cy-node": "",
|
|
2601
2617
|
x: h.x - h.width / 2,
|
|
2602
2618
|
y: h.y - h.height / 2,
|
|
@@ -2610,7 +2626,7 @@ const yr = {
|
|
|
2610
2626
|
cursor: u.value.style.chart.nodes.tooltip.showOnClick ? "pointer" : "default"
|
|
2611
2627
|
})
|
|
2612
2628
|
}, null, 12, Mr),
|
|
2613
|
-
m.$slots["node-label"] ? (
|
|
2629
|
+
m.$slots["node-label"] ? (y(), _("text", {
|
|
2614
2630
|
key: 0,
|
|
2615
2631
|
x: h.x,
|
|
2616
2632
|
y: h.y + u.value.style.chart.nodes.labels.fontSize / 3,
|
|
@@ -2619,10 +2635,10 @@ const yr = {
|
|
|
2619
2635
|
fill: h.original.color,
|
|
2620
2636
|
"font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal"
|
|
2621
2637
|
}, [
|
|
2622
|
-
A(m.$slots, "node-label",
|
|
2638
|
+
A(m.$slots, "node-label", Ke({ ref_for: !0 }, { node: h }), () => [
|
|
2623
2639
|
nn(le(h.label), 1)
|
|
2624
2640
|
], !0)
|
|
2625
|
-
], 8, $r)) : (
|
|
2641
|
+
], 8, $r)) : m.$slots["free-node-label"] ? S("", !0) : (y(), _("text", {
|
|
2626
2642
|
key: 1,
|
|
2627
2643
|
"data-cy-node-label": "",
|
|
2628
2644
|
x: h.x,
|
|
@@ -2640,21 +2656,24 @@ const yr = {
|
|
|
2640
2656
|
y: h.y,
|
|
2641
2657
|
autoOffset: !0
|
|
2642
2658
|
})
|
|
2643
|
-
}, null, 8, Dr))
|
|
2659
|
+
}, null, 8, Dr)),
|
|
2660
|
+
m.$slots["free-node-label"] ? (y(), _("g", Fr, [
|
|
2661
|
+
A(m.$slots, "free-node-label", Ke({ ref_for: !0 }, { node: h, layoutData: v(E) }), void 0, !0)
|
|
2662
|
+
])) : S("", !0)
|
|
2644
2663
|
], 64)),
|
|
2645
|
-
m.$slots.node ? (
|
|
2664
|
+
m.$slots.node ? (y(), _("foreignObject", {
|
|
2646
2665
|
key: 1,
|
|
2647
2666
|
x: h.x - h.width / 2,
|
|
2648
2667
|
y: h.y - h.height / 2,
|
|
2649
2668
|
width: h.width,
|
|
2650
2669
|
height: h.height
|
|
2651
2670
|
}, [
|
|
2652
|
-
A(m.$slots, "node",
|
|
2653
|
-
], 8,
|
|
2654
|
-
], 40,
|
|
2671
|
+
A(m.$slots, "node", Ke({ ref_for: !0 }, { node: h }), void 0, !0)
|
|
2672
|
+
], 8, Pr)) : S("", !0)
|
|
2673
|
+
], 40, Rr))), 128))
|
|
2655
2674
|
]),
|
|
2656
|
-
|
|
2657
|
-
(
|
|
2675
|
+
j("g", zr, [
|
|
2676
|
+
(y(!0), _(ie, null, Pe(v(E).edges, (h) => (y(), _("path", {
|
|
2658
2677
|
key: h.id,
|
|
2659
2678
|
d: h.pathData,
|
|
2660
2679
|
fill: "none",
|
|
@@ -2662,27 +2681,27 @@ const yr = {
|
|
|
2662
2681
|
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === be.value || h.id === z.value?.id ? 1.3 : 1),
|
|
2663
2682
|
"stroke-linecap": "round",
|
|
2664
2683
|
"stroke-linejoin": "round",
|
|
2665
|
-
"marker-end": v(E).arrowShape === "undirected" ? null : `url(#${
|
|
2684
|
+
"marker-end": v(E).arrowShape === "undirected" ? null : `url(#${St(h.original?.color || u.value.style.chart.edges.stroke)})`,
|
|
2666
2685
|
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2667
|
-
}, null, 8,
|
|
2686
|
+
}, null, 8, Br))), 128))
|
|
2668
2687
|
]),
|
|
2669
2688
|
A(m.$slots, "svg", {
|
|
2670
2689
|
svg: {
|
|
2671
|
-
drawingArea: v(
|
|
2690
|
+
drawingArea: v(Ot),
|
|
2672
2691
|
data: v(E)
|
|
2673
2692
|
}
|
|
2674
2693
|
}, void 0, !0)
|
|
2675
|
-
], 14, Cr)) :
|
|
2676
|
-
m.$slots.watermark ? (
|
|
2677
|
-
A(m.$slots, "watermark", B(V({ isPrinting: v(
|
|
2678
|
-
])) :
|
|
2679
|
-
ae(
|
|
2680
|
-
default:
|
|
2681
|
-
Oe.value ? (
|
|
2694
|
+
], 14, Cr)) : S("", !0),
|
|
2695
|
+
m.$slots.watermark ? (y(), _("div", Vr, [
|
|
2696
|
+
A(m.$slots, "watermark", B(V({ isPrinting: v(yt) || v(kt) })), void 0, !0)
|
|
2697
|
+
])) : S("", !0),
|
|
2698
|
+
ae(It, { name: "fade" }, {
|
|
2699
|
+
default: M(() => [
|
|
2700
|
+
Oe.value ? (y(), U(Gt, {
|
|
2682
2701
|
key: 0,
|
|
2683
2702
|
to: Q.value ? f.value : "body"
|
|
2684
2703
|
}, [
|
|
2685
|
-
|
|
2704
|
+
j("div", {
|
|
2686
2705
|
"data-cy-tooltip-midpoint": "",
|
|
2687
2706
|
ref_key: "tooltipRef",
|
|
2688
2707
|
ref: Se,
|
|
@@ -2696,75 +2715,75 @@ const yr = {
|
|
|
2696
2715
|
"data-position": he.value
|
|
2697
2716
|
}, [
|
|
2698
2717
|
A(m.$slots, "tooltip-midpoint", B(V({ edge: z.value, layoutData: v(E) })), () => [
|
|
2699
|
-
z.value ? (
|
|
2718
|
+
z.value ? (y(), _("div", Gr, le(At(z.value.from)?.label ?? z.value.from) + " → " + le(At(z.value.to)?.label ?? z.value.to), 1)) : S("", !0)
|
|
2700
2719
|
], !0)
|
|
2701
|
-
], 12,
|
|
2702
|
-
], 8, ["to"])) :
|
|
2720
|
+
], 12, Ir)
|
|
2721
|
+
], 8, ["to"])) : S("", !0)
|
|
2703
2722
|
]),
|
|
2704
2723
|
_: 3
|
|
2705
2724
|
}),
|
|
2706
|
-
ae(
|
|
2707
|
-
default:
|
|
2708
|
-
K.value ? (
|
|
2725
|
+
ae(It, { name: "fade" }, {
|
|
2726
|
+
default: M(() => [
|
|
2727
|
+
K.value ? (y(), U(Gt, {
|
|
2709
2728
|
key: 0,
|
|
2710
2729
|
to: Q.value ? f.value : "body"
|
|
2711
2730
|
}, [
|
|
2712
|
-
|
|
2731
|
+
j("div", {
|
|
2713
2732
|
"data-cy-tooltip-node": "",
|
|
2714
2733
|
ref_key: "nodeTooltipRef",
|
|
2715
|
-
ref:
|
|
2734
|
+
ref: Ie,
|
|
2716
2735
|
class: "vue-ui-dag-node-tooltip",
|
|
2717
2736
|
style: X({
|
|
2718
2737
|
maxWidth: u.value.style.chart.nodes.tooltip.maxWidth,
|
|
2719
|
-
left:
|
|
2720
|
-
top:
|
|
2738
|
+
left: Ge.value.left,
|
|
2739
|
+
top: Ge.value.top,
|
|
2721
2740
|
"--vue-data-ui-dag-node-tooltip-background": u.value.style.chart.nodes.tooltip.backgroundColor,
|
|
2722
2741
|
"--vue-data-ui-dag-node-tooltip-color": u.value.style.chart.nodes.tooltip.color
|
|
2723
2742
|
}),
|
|
2724
|
-
"data-position":
|
|
2743
|
+
"data-position": mt.value
|
|
2725
2744
|
}, [
|
|
2726
2745
|
A(m.$slots, "tooltip-node", B(V({ node: me.value, layoutData: v(E) })), () => [
|
|
2727
|
-
me.value ? (
|
|
2746
|
+
me.value ? (y(), _("div", Wr, le(me.value.label), 1)) : S("", !0)
|
|
2728
2747
|
], !0)
|
|
2729
|
-
], 12,
|
|
2730
|
-
], 8, ["to"])) :
|
|
2748
|
+
], 12, jr)
|
|
2749
|
+
], 8, ["to"])) : S("", !0)
|
|
2731
2750
|
]),
|
|
2732
2751
|
_: 3
|
|
2733
2752
|
}),
|
|
2734
|
-
u.value.style.chart.controls.position === "bottom" && !v(ve) && u.value.style.chart.controls.show ? (
|
|
2753
|
+
u.value.style.chart.controls.position === "bottom" && !v(ve) && u.value.style.chart.controls.show ? (y(), U(oo, {
|
|
2735
2754
|
key: 7,
|
|
2736
2755
|
ref_key: "zoomControls",
|
|
2737
|
-
ref:
|
|
2756
|
+
ref: x,
|
|
2738
2757
|
config: u.value,
|
|
2739
|
-
scale: v(
|
|
2758
|
+
scale: v(Tt),
|
|
2740
2759
|
isFullscreen: Q.value,
|
|
2741
2760
|
withDirection: "",
|
|
2742
|
-
onZoomIn:
|
|
2743
|
-
onZoomOut:
|
|
2744
|
-
onResetZoom: p[2] || (p[2] = () => v(
|
|
2745
|
-
onSwitchDirection:
|
|
2746
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) :
|
|
2747
|
-
m.$slots.source ? (
|
|
2761
|
+
onZoomIn: He,
|
|
2762
|
+
onZoomOut: Ze,
|
|
2763
|
+
onResetZoom: p[2] || (p[2] = () => v(Re)(!0)),
|
|
2764
|
+
onSwitchDirection: Xe
|
|
2765
|
+
}, null, 8, ["config", "scale", "isFullscreen"])) : S("", !0),
|
|
2766
|
+
m.$slots.source ? (y(), _("div", {
|
|
2748
2767
|
key: 8,
|
|
2749
2768
|
ref_key: "source",
|
|
2750
2769
|
ref: N,
|
|
2751
2770
|
dir: "auto"
|
|
2752
2771
|
}, [
|
|
2753
2772
|
A(m.$slots, "source", {}, void 0, !0)
|
|
2754
|
-
], 512)) :
|
|
2755
|
-
v(ve) ? (
|
|
2773
|
+
], 512)) : S("", !0),
|
|
2774
|
+
v(ve) ? (y(), U(bn, { key: 9 })) : S("", !0)
|
|
2756
2775
|
], 46, kr));
|
|
2757
2776
|
}
|
|
2758
|
-
},
|
|
2777
|
+
}, Hr = /* @__PURE__ */ ro(Yr, [["__scopeId", "data-v-2483d90c"]]), hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2759
2778
|
__proto__: null,
|
|
2760
|
-
default:
|
|
2779
|
+
default: Hr
|
|
2761
2780
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2762
2781
|
export {
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2782
|
+
ci as a,
|
|
2783
|
+
hi as b,
|
|
2784
|
+
ui as d,
|
|
2766
2785
|
wr as l,
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2786
|
+
fi as m,
|
|
2787
|
+
di as s,
|
|
2788
|
+
Hr as v
|
|
2770
2789
|
};
|