@squeed/flow-sdk 2.0.28 → 2.0.29
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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1013 -992
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -391,14 +391,14 @@ function _w({
|
|
|
391
391
|
}) {
|
|
392
392
|
var Le;
|
|
393
393
|
const o = tt(() => {
|
|
394
|
-
var
|
|
394
|
+
var Ee, et, ot;
|
|
395
395
|
const V = /* @__PURE__ */ new Map();
|
|
396
|
-
for (const Ze of t) (
|
|
396
|
+
for (const Ze of t) (Ee = Ze.data) != null && Ee.id && V.set(Ze.data.id, Ze);
|
|
397
397
|
const he = /* @__PURE__ */ new Map();
|
|
398
398
|
for (const Ze of n) (et = Ze.data) != null && et.id && he.set(Ze.data.id, Ze);
|
|
399
|
-
const
|
|
400
|
-
for (const Ze of t) (ot = Ze.data) != null && ot.parent &&
|
|
401
|
-
return { nodeById: V, edgeById: he, parentIds:
|
|
399
|
+
const Se = /* @__PURE__ */ new Set();
|
|
400
|
+
for (const Ze of t) (ot = Ze.data) != null && ot.parent && Se.add(Ze.data.parent);
|
|
401
|
+
return { nodeById: V, edgeById: he, parentIds: Se };
|
|
402
402
|
}, [t, n]), s = de(null), [a, c] = re([]), [d, l] = re(null), [u, f] = re(!0), [h, m] = re(!1), [g, p] = re(!0), [v, b] = re(!1), [w, x] = re(!1), [C, S] = re(!0), [_, M] = re(!1), [E, T] = re(
|
|
403
403
|
() => {
|
|
404
404
|
var V;
|
|
@@ -407,25 +407,25 @@ function _w({
|
|
|
407
407
|
...e.nodeGrid.order ? { order: e.nodeGrid.order } : {}
|
|
408
408
|
} : null;
|
|
409
409
|
}
|
|
410
|
-
), R = de(E), [A,
|
|
410
|
+
), R = de(E), [A, O] = re(
|
|
411
411
|
E ?? ((Le = e.nodeGrid) == null ? void 0 : Le.options) ?? { gaps: 15, fill: !1, padding: 0 }
|
|
412
|
-
), [
|
|
412
|
+
), [I, N] = re(
|
|
413
413
|
() => /* @__PURE__ */ new Set()
|
|
414
414
|
), $ = dt((V) => {
|
|
415
415
|
var he;
|
|
416
|
-
!!(V != null && V.fill) != !!((he = R.current) != null && he.fill) && N(/* @__PURE__ */ new Set()), R.current = V, V &&
|
|
417
|
-
}, []), [
|
|
416
|
+
!!(V != null && V.fill) != !!((he = R.current) != null && he.fill) && N(/* @__PURE__ */ new Set()), R.current = V, V && O(V), T(V);
|
|
417
|
+
}, []), [P, H] = re("auto"), [oe, ae] = re(!1), Q = e.compactPropertyLayout ?? oe, [me, ve] = re({}), z = e.nodeViewModes ?? me, [B, W] = re(e.allNodesIconLabel);
|
|
418
418
|
Ue(
|
|
419
419
|
() => W(e.allNodesIconLabel),
|
|
420
420
|
[e.allNodesIconLabel]
|
|
421
421
|
);
|
|
422
422
|
const [F, ce] = re({}), Z = dt(
|
|
423
423
|
(V, he) => {
|
|
424
|
-
ce((
|
|
425
|
-
const
|
|
424
|
+
ce((Se) => {
|
|
425
|
+
const Ee = { ...Se };
|
|
426
426
|
for (const et of V)
|
|
427
|
-
he === void 0 ? delete
|
|
428
|
-
return
|
|
427
|
+
he === void 0 ? delete Ee[et] : Ee[et] = he;
|
|
428
|
+
return Ee;
|
|
429
429
|
});
|
|
430
430
|
},
|
|
431
431
|
[]
|
|
@@ -436,10 +436,10 @@ function _w({
|
|
|
436
436
|
}
|
|
437
437
|
), ue = se.every(
|
|
438
438
|
(V) => {
|
|
439
|
-
var he,
|
|
440
|
-
return o.parentIds.has(V.data.id) || (he = V.data.config) != null && he.parentContainer ? !!((
|
|
439
|
+
var he, Se, Ee;
|
|
440
|
+
return o.parentIds.has(V.data.id) || (he = V.data.config) != null && he.parentContainer ? !!((Se = V.data.config) != null && Se.collapsed) : z[V.data.id] === "icon-label" || V.data.type === "grid" && z[V.data.id] === void 0 || ((Ee = V.data.config) == null ? void 0 : Ee.labelBelow) && z[V.data.id] !== "properties";
|
|
441
441
|
}
|
|
442
|
-
), we = B ?? e.allNodesIconLabel ?? ue, [
|
|
442
|
+
), we = B ?? e.allNodesIconLabel ?? ue, [Ce, ye] = re("normal"), [pe, J] = re(), L = e.edgeRadius ?? pe, ie = L !== void 0 && Number.isFinite(L) ? Math.min(500, Math.max(0, L)) : void 0, [U, fe] = re(), be = e.spacing ?? Ce, qe = typeof be == "number" ? Number.isFinite(be) ? Math.min(
|
|
443
443
|
2,
|
|
444
444
|
Math.max(
|
|
445
445
|
e.nodeGridSpacing === "layout" ? 0 : 0.5,
|
|
@@ -451,9 +451,9 @@ function _w({
|
|
|
451
451
|
) ? e.workflowContract : We, [Ct, nt] = re("blue.500"), [st, bt] = re(!1), Te = de(r);
|
|
452
452
|
Te.current = r;
|
|
453
453
|
const He = tt(() => {
|
|
454
|
-
const V = (he) => (...
|
|
455
|
-
var
|
|
456
|
-
return (et = (
|
|
454
|
+
const V = (he) => (...Se) => {
|
|
455
|
+
var Ee, et;
|
|
456
|
+
return (et = (Ee = Te.current) == null ? void 0 : Ee[he]) == null ? void 0 : et.call(Ee, ...Se);
|
|
457
457
|
};
|
|
458
458
|
return {
|
|
459
459
|
// Node events
|
|
@@ -482,9 +482,9 @@ function _w({
|
|
|
482
482
|
onNodeBorderColorChange: V("onNodeBorderColorChange"),
|
|
483
483
|
onNodeBorderStyleChange: V("onNodeBorderStyleChange"),
|
|
484
484
|
onNodeBorderWidthChange: V("onNodeBorderWidthChange"),
|
|
485
|
-
onNodeBorderRadiusChange: (he,
|
|
486
|
-
var
|
|
487
|
-
(
|
|
485
|
+
onNodeBorderRadiusChange: (he, Se) => {
|
|
486
|
+
var Ee, et, ot;
|
|
487
|
+
(Ee = R.current) != null && Ee.fill && N((Ze) => /* @__PURE__ */ new Set([...Ze, he])), (ot = (et = Te.current).onNodeBorderRadiusChange) == null || ot.call(et, he, Se);
|
|
488
488
|
},
|
|
489
489
|
onNodeIconChange: V("onNodeIconChange"),
|
|
490
490
|
onNodeOutlineChange: V("onNodeOutlineChange"),
|
|
@@ -519,7 +519,7 @@ function _w({
|
|
|
519
519
|
onLayoutComplete: V("onLayoutComplete"),
|
|
520
520
|
onJsonChange: V("onJsonChange")
|
|
521
521
|
};
|
|
522
|
-
}, []), ft = e.themeColor || Ct, [ht, Zt] = re(""), Ke = e.edgeColor ?? ht, Ve = e.colorMode || "light", Qt = e.direction || "LR", pt = e.nodeAlignment ?? "center", pr = e.edgeMode === "workflow" ? "nodes" : e.edgeMode ??
|
|
522
|
+
}, []), ft = e.themeColor || Ct, [ht, Zt] = re(""), Ke = e.edgeColor ?? ht, Ve = e.colorMode || "light", Qt = e.direction || "LR", pt = e.nodeAlignment ?? "center", pr = e.edgeMode === "workflow" ? "nodes" : e.edgeMode ?? P, er = e.readOnly ?? !1, Wr = JSON.stringify(e.parentNodeStyle ?? null), It = tt(
|
|
523
523
|
() => e.parentNodeStyle,
|
|
524
524
|
[Wr]
|
|
525
525
|
), tr = e.isZoomMode !== void 0 ? e.isZoomMode : u, ar = e.isMultiSelectMode !== void 0 ? e.isMultiSelectMode : h, Vr = e.isEdgeHandlesEnabled !== void 0 ? e.isEdgeHandlesEnabled : v, Ur = e.isDragMode !== void 0 ? e.isDragMode : g, Fe = de(e);
|
|
@@ -653,24 +653,24 @@ function _w({
|
|
|
653
653
|
[]
|
|
654
654
|
), G = dt(
|
|
655
655
|
(V, he) => {
|
|
656
|
-
var
|
|
656
|
+
var Se;
|
|
657
657
|
if (he !== "default" && he !== "properties" && he !== "icon-label")
|
|
658
658
|
throw new Error("Unknown node view mode.");
|
|
659
|
-
W((
|
|
660
|
-
(
|
|
661
|
-
), (
|
|
659
|
+
W((Ee) => Ee ?? we), ve(
|
|
660
|
+
(Ee) => Ee[V] === he ? Ee : { ...Ee, [V]: he }
|
|
661
|
+
), (Se = r.onNodeViewModeChange) == null || Se.call(r, V, he);
|
|
662
662
|
},
|
|
663
663
|
[r.onNodeViewModeChange, we]
|
|
664
664
|
), te = tt(
|
|
665
665
|
() => ({
|
|
666
666
|
allNodesIconLabel: we,
|
|
667
667
|
setAllNodesIconLabel: (V) => {
|
|
668
|
-
var he,
|
|
668
|
+
var he, Se, Ee, et, ot;
|
|
669
669
|
if (W(V), !V)
|
|
670
670
|
for (const [Ze, Tt] of Object.entries(z))
|
|
671
671
|
Tt === "icon-label" && !o.nodeById.has(Ze) && G(Ze, "default");
|
|
672
672
|
for (const Ze of se)
|
|
673
|
-
o.parentIds.has(Ze.data.id) || (he = Ze.data.config) != null && he.parentContainer ? !er && !!((
|
|
673
|
+
o.parentIds.has(Ze.data.id) || (he = Ze.data.config) != null && he.parentContainer ? !er && !!((Se = Ze.data.config) != null && Se.collapsed) !== V && ((Ee = r.onNodeCollapse) == null || Ee.call(r, Ze.data.id, V)) : G(
|
|
674
674
|
Ze.data.id,
|
|
675
675
|
V ? "icon-label" : (et = Ze.data.config) != null && et.labelBelow ? "properties" : "default"
|
|
676
676
|
);
|
|
@@ -682,7 +682,7 @@ function _w({
|
|
|
682
682
|
setNodeRadiusPreview: Z,
|
|
683
683
|
spacing: qe,
|
|
684
684
|
setSpacing: ye,
|
|
685
|
-
edgeRadius:
|
|
685
|
+
edgeRadius: ie,
|
|
686
686
|
setEdgeRadius: J,
|
|
687
687
|
backgroundVariant: je,
|
|
688
688
|
setBackgroundVariant: fe,
|
|
@@ -726,7 +726,7 @@ function _w({
|
|
|
726
726
|
nodeGridOptions: E,
|
|
727
727
|
setNodeGridOptions: $,
|
|
728
728
|
lastNodeGridOptions: A,
|
|
729
|
-
fillRadiusEditedIds:
|
|
729
|
+
fillRadiusEditedIds: I,
|
|
730
730
|
setFillRadiusEditedIds: N,
|
|
731
731
|
engineRef: s,
|
|
732
732
|
callbacks: He,
|
|
@@ -747,7 +747,7 @@ function _w({
|
|
|
747
747
|
ft,
|
|
748
748
|
qe,
|
|
749
749
|
je,
|
|
750
|
-
|
|
750
|
+
ie,
|
|
751
751
|
e.backgroundColor,
|
|
752
752
|
st,
|
|
753
753
|
Ke,
|
|
@@ -768,7 +768,7 @@ function _w({
|
|
|
768
768
|
_,
|
|
769
769
|
E,
|
|
770
770
|
A,
|
|
771
|
-
|
|
771
|
+
I,
|
|
772
772
|
er,
|
|
773
773
|
e.edgeHandles,
|
|
774
774
|
e.edgeType,
|
|
@@ -1287,7 +1287,7 @@ function Vt({
|
|
|
1287
1287
|
"aria-label": l,
|
|
1288
1288
|
...u
|
|
1289
1289
|
}) {
|
|
1290
|
-
var
|
|
1290
|
+
var O;
|
|
1291
1291
|
const { colorMode: f } = rt(), { background: h, border: m, colorText: g, colorInactive: p } = ut(), v = f === "dark", b = ur(), w = de(null), x = de(null), [C, S] = re(!1), _ = So(
|
|
1292
1292
|
/* @__PURE__ */ y(
|
|
1293
1293
|
Vt,
|
|
@@ -1308,49 +1308,49 @@ function Vt({
|
|
|
1308
1308
|
!!s
|
|
1309
1309
|
);
|
|
1310
1310
|
Ue(() => {
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1311
|
+
const I = x.current;
|
|
1312
|
+
I.setAttribute("popover", "auto");
|
|
1313
1313
|
const N = ($) => S($.newState === "open");
|
|
1314
|
-
return
|
|
1314
|
+
return I.addEventListener("toggle", N), () => I.removeEventListener("toggle", N);
|
|
1315
1315
|
}, []);
|
|
1316
|
-
const M = N0.toArray(e).filter($0).map((
|
|
1317
|
-
const N =
|
|
1316
|
+
const M = N0.toArray(e).filter($0).map((I) => {
|
|
1317
|
+
const N = I.props;
|
|
1318
1318
|
return {
|
|
1319
1319
|
value: String(N.value),
|
|
1320
1320
|
label: typeof N.children == "string" && d === "title" ? Gt(N.children) : N.children,
|
|
1321
1321
|
disabled: N.disabled
|
|
1322
1322
|
};
|
|
1323
1323
|
}), E = () => {
|
|
1324
|
-
var
|
|
1325
|
-
return (
|
|
1324
|
+
var I;
|
|
1325
|
+
return (I = x.current) == null ? void 0 : I.hidePopover();
|
|
1326
1326
|
}, T = () => {
|
|
1327
|
-
var
|
|
1328
|
-
const
|
|
1329
|
-
if (!
|
|
1327
|
+
var oe, ae, Q, me, ve;
|
|
1328
|
+
const I = (oe = w.current) == null ? void 0 : oe.getBoundingClientRect(), N = x.current;
|
|
1329
|
+
if (!I || !N) return;
|
|
1330
1330
|
if ((ae = w.current) != null && ae.closest("[popover]")) {
|
|
1331
|
-
const z = window.innerHeight -
|
|
1331
|
+
const z = window.innerHeight - I.bottom - 16, B = I.top - 16;
|
|
1332
1332
|
N.style.maxHeight = `${Math.max(60, z, B)}px`;
|
|
1333
1333
|
const W = N.getBoundingClientRect();
|
|
1334
|
-
N.style.left = `${Math.max(12, Math.min(
|
|
1334
|
+
N.style.left = `${Math.max(12, Math.min(I.right - W.width, window.innerWidth - W.width - 12))}px`, N.style.top = `${Math.max(12, W.height <= z ? I.bottom + 4 : I.top - W.height - 4)}px`;
|
|
1335
1335
|
return;
|
|
1336
1336
|
}
|
|
1337
|
-
const $ = (ve = (me = (Q = w.current) == null ? void 0 : Q.closest("[data-flow-toolbar-scroll]")) == null ? void 0 : me.parentElement) == null ? void 0 : ve.getBoundingClientRect(),
|
|
1338
|
-
N.style.maxHeight = `${Math.max(60, Math.max(
|
|
1337
|
+
const $ = (ve = (me = (Q = w.current) == null ? void 0 : Q.closest("[data-flow-toolbar-scroll]")) == null ? void 0 : me.parentElement) == null ? void 0 : ve.getBoundingClientRect(), P = $ ?? I;
|
|
1338
|
+
N.style.maxHeight = `${Math.max(60, Math.max(P.top - 40, window.innerHeight - P.bottom - 40))}px`;
|
|
1339
1339
|
const H = N.getBoundingClientRect();
|
|
1340
|
-
N.style.left = `${Math.max(12, Math.min(Math.max(($ == null ? void 0 : $.left) ?? 12,
|
|
1340
|
+
N.style.left = `${Math.max(12, Math.min(Math.max(($ == null ? void 0 : $.left) ?? 12, I.right - H.width), (($ == null ? void 0 : $.right) ?? window.innerWidth - 12) - H.width, window.innerWidth - H.width - 12))}px`, N.style.top = `${Math.max(12, P.top >= H.height + 36 ? P.top - H.height - 24 : Math.min(P.bottom + 24, window.innerHeight - H.height - 12))}px`;
|
|
1341
1341
|
}, R = () => {
|
|
1342
|
-
var $,
|
|
1342
|
+
var $, P, H, oe, ae, Q;
|
|
1343
1343
|
if (n) return;
|
|
1344
1344
|
if (($ = x.current) == null || $.showPopover(), T(), a) {
|
|
1345
|
-
(H = (
|
|
1345
|
+
(H = (P = x.current) == null ? void 0 : P.querySelector("input")) == null || H.focus({ preventScroll: !0 });
|
|
1346
1346
|
return;
|
|
1347
1347
|
}
|
|
1348
|
-
const
|
|
1348
|
+
const I = (oe = x.current) == null ? void 0 : oe.querySelectorAll(
|
|
1349
1349
|
'[role="option"]:not(:disabled)'
|
|
1350
1350
|
);
|
|
1351
1351
|
(Q = ((ae = x.current) == null ? void 0 : ae.querySelector(
|
|
1352
1352
|
'[aria-selected="true"]:not(:disabled)'
|
|
1353
|
-
)) ?? (
|
|
1353
|
+
)) ?? (I == null ? void 0 : I[0])) == null || Q.focus();
|
|
1354
1354
|
};
|
|
1355
1355
|
Ue(() => {
|
|
1356
1356
|
if (C) {
|
|
@@ -1395,8 +1395,8 @@ function Vt({
|
|
|
1395
1395
|
onClick: () => {
|
|
1396
1396
|
_(), C ? E() : R();
|
|
1397
1397
|
},
|
|
1398
|
-
onKeyDown: (
|
|
1399
|
-
["ArrowDown", "ArrowUp"].includes(
|
|
1398
|
+
onKeyDown: (I) => {
|
|
1399
|
+
["ArrowDown", "ArrowUp"].includes(I.key) && (I.preventDefault(), R());
|
|
1400
1400
|
},
|
|
1401
1401
|
children: s ?? /* @__PURE__ */ D(Be, { children: [
|
|
1402
1402
|
/* @__PURE__ */ y(
|
|
@@ -1407,7 +1407,7 @@ function Vt({
|
|
|
1407
1407
|
textOverflow: "ellipsis",
|
|
1408
1408
|
whiteSpace: "nowrap"
|
|
1409
1409
|
},
|
|
1410
|
-
children: ((
|
|
1410
|
+
children: ((O = M.find((I) => I.value === r)) == null ? void 0 : O.label) ?? r
|
|
1411
1411
|
}
|
|
1412
1412
|
),
|
|
1413
1413
|
/* @__PURE__ */ y(qm, { size: 16, style: { flexShrink: 0 } })
|
|
@@ -1443,35 +1443,35 @@ function Vt({
|
|
|
1443
1443
|
`var(--chakra-colors-${(v ? m : "gray.300").replace(".", "-")})`
|
|
1444
1444
|
)
|
|
1445
1445
|
},
|
|
1446
|
-
onKeyDown: (
|
|
1447
|
-
var
|
|
1448
|
-
if (a && !["Escape", "Tab"].includes(
|
|
1446
|
+
onKeyDown: (I) => {
|
|
1447
|
+
var P, H, oe;
|
|
1448
|
+
if (a && !["Escape", "Tab"].includes(I.key)) return;
|
|
1449
1449
|
const N = [
|
|
1450
|
-
...
|
|
1450
|
+
...I.currentTarget.querySelectorAll(
|
|
1451
1451
|
'[role="option"]:not(:disabled), [data-flow-menu-action]:not(:disabled)'
|
|
1452
1452
|
)
|
|
1453
1453
|
], $ = N.indexOf(
|
|
1454
1454
|
document.activeElement
|
|
1455
1455
|
);
|
|
1456
|
-
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
1457
|
-
|
|
1458
|
-
const ae =
|
|
1459
|
-
(
|
|
1460
|
-
} else
|
|
1456
|
+
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(I.key)) {
|
|
1457
|
+
I.preventDefault();
|
|
1458
|
+
const ae = I.key === "Home" ? 0 : I.key === "End" ? N.length - 1 : ($ + (I.key === "ArrowDown" ? 1 : -1) + N.length) % N.length;
|
|
1459
|
+
(P = N[ae]) == null || P.focus();
|
|
1460
|
+
} else I.key === "Escape" || I.key === "Tab" ? (I.key === "Escape" && (I.preventDefault(), I.stopPropagation()), E(), (H = w.current) == null || H.focus()) : I.key.length === 1 && I.key !== " " && ((oe = N.find(
|
|
1461
1461
|
(ae, Q) => {
|
|
1462
1462
|
var me;
|
|
1463
|
-
return Q > $ && ((me = ae.textContent) == null ? void 0 : me.toLowerCase().startsWith(
|
|
1463
|
+
return Q > $ && ((me = ae.textContent) == null ? void 0 : me.toLowerCase().startsWith(I.key.toLowerCase()));
|
|
1464
1464
|
}
|
|
1465
|
-
)) == null ||
|
|
1465
|
+
)) == null || oe.focus());
|
|
1466
1466
|
},
|
|
1467
1467
|
children: [
|
|
1468
|
-
a ?? M.map((
|
|
1468
|
+
a ?? M.map((I) => /* @__PURE__ */ D(
|
|
1469
1469
|
Nr.button,
|
|
1470
1470
|
{
|
|
1471
1471
|
type: "button",
|
|
1472
1472
|
role: "option",
|
|
1473
|
-
"aria-selected":
|
|
1474
|
-
disabled:
|
|
1473
|
+
"aria-selected": I.value === r,
|
|
1474
|
+
disabled: I.disabled,
|
|
1475
1475
|
tabIndex: -1,
|
|
1476
1476
|
display: "flex",
|
|
1477
1477
|
alignItems: "center",
|
|
@@ -1487,10 +1487,10 @@ function Vt({
|
|
|
1487
1487
|
_focusVisible: { bg: v ? "whiteAlpha.100" : "blackAlpha.50" },
|
|
1488
1488
|
onClick: () => {
|
|
1489
1489
|
var N;
|
|
1490
|
-
E(), (N = w.current) == null || N.focus(), t(
|
|
1490
|
+
E(), (N = w.current) == null || N.focus(), t(I.value);
|
|
1491
1491
|
},
|
|
1492
1492
|
children: [
|
|
1493
|
-
/* @__PURE__ */ y("span", { style: { flex: 1 }, children:
|
|
1493
|
+
/* @__PURE__ */ y("span", { style: { flex: 1 }, children: I.label }),
|
|
1494
1494
|
/* @__PURE__ */ y(
|
|
1495
1495
|
po,
|
|
1496
1496
|
{
|
|
@@ -1499,13 +1499,13 @@ function Vt({
|
|
|
1499
1499
|
"aria-hidden": "true",
|
|
1500
1500
|
style: {
|
|
1501
1501
|
flexShrink: 0,
|
|
1502
|
-
visibility:
|
|
1502
|
+
visibility: I.value === r ? "visible" : "hidden"
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
)
|
|
1506
1506
|
]
|
|
1507
1507
|
},
|
|
1508
|
-
|
|
1508
|
+
I.value
|
|
1509
1509
|
)),
|
|
1510
1510
|
c
|
|
1511
1511
|
]
|
|
@@ -2267,13 +2267,13 @@ function tn(e, r = "root", t = [], n = [], i = "untitled", o = {
|
|
|
2267
2267
|
b = Hl(b, Tn);
|
|
2268
2268
|
const x = b, C = Sr(b), S = _r(b), { newConfig: _, arrayObject: M } = Er(b);
|
|
2269
2269
|
M.length && (b = M);
|
|
2270
|
-
const { config: E } = Zr(typeof b == "string" ? "text" : "array", _), { hideConfig: T, sourceLabel: R, label: A, isEdgeAnimated:
|
|
2270
|
+
const { config: E } = Zr(typeof b == "string" ? "text" : "array", _), { hideConfig: T, sourceLabel: R, label: A, isEdgeAnimated: O, parent: I } = _;
|
|
2271
2271
|
c = c || T;
|
|
2272
|
-
const N = r === "root" && o.isCntr, $ = r.split(".").slice(0, 2).join("."),
|
|
2273
|
-
let
|
|
2274
|
-
|
|
2272
|
+
const N = r === "root" && o.isCntr, $ = r.split(".").slice(0, 2).join("."), P = In.includes($), H = o.isCntr && P || w % 2 === 0 && N;
|
|
2273
|
+
let oe = `${r}.${w}`;
|
|
2274
|
+
oe = Fn(oe, t), H && In.push(oe), zt(b) ? Object.keys(C).length && !it(b) ? (n.push(vr(r, oe, null, R, H, O)), tn(b, oe, t, n, A || w, o, _)) : Object.keys(S).length && !it(b) ? Nn({
|
|
2275
2275
|
flowConfig: o,
|
|
2276
|
-
chldPth:
|
|
2276
|
+
chldPth: oe,
|
|
2277
2277
|
isInverted: H,
|
|
2278
2278
|
edges: n,
|
|
2279
2279
|
itrblObjct: S,
|
|
@@ -2283,7 +2283,7 @@ function tn(e, r = "root", t = [], n = [], i = "untitled", o = {
|
|
|
2283
2283
|
forceIsInverted: !0
|
|
2284
2284
|
}) : it(b) ? Ib({
|
|
2285
2285
|
flowConfig: o,
|
|
2286
|
-
chldPth:
|
|
2286
|
+
chldPth: oe,
|
|
2287
2287
|
edges: n,
|
|
2288
2288
|
isInverted: H,
|
|
2289
2289
|
item: b,
|
|
@@ -2291,14 +2291,14 @@ function tn(e, r = "root", t = [], n = [], i = "untitled", o = {
|
|
|
2291
2291
|
path: r
|
|
2292
2292
|
}) : zt(b) && Nn({
|
|
2293
2293
|
flowConfig: o,
|
|
2294
|
-
chldPth:
|
|
2294
|
+
chldPth: oe,
|
|
2295
2295
|
isInverted: H,
|
|
2296
2296
|
edges: n,
|
|
2297
2297
|
itrblObjct: [b],
|
|
2298
2298
|
nodes: t,
|
|
2299
2299
|
path: r,
|
|
2300
2300
|
newConfig: _
|
|
2301
|
-
}) : (n.push(vr(r,
|
|
2301
|
+
}) : (n.push(vr(r, oe, null, R, H, O)), t.push(Or(E, oe, { label: A || String(b), parent: I }, b, x)));
|
|
2302
2302
|
})), { nodes: t, edges: n };
|
|
2303
2303
|
} catch {
|
|
2304
2304
|
return { nodes: t, edges: n };
|
|
@@ -2312,20 +2312,20 @@ const Nn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: i, isIn
|
|
|
2312
2312
|
b.length && (f = b);
|
|
2313
2313
|
const { hideConfig: w, sourceLabel: x, label: C, content: S, target: _, targetLabel: M, collapsed: E, isEdgeAnimated: T, parent: R } = v;
|
|
2314
2314
|
d = d || w;
|
|
2315
|
-
const A = s === "root" && r.isCntr,
|
|
2316
|
-
c || (o = r.isCntr &&
|
|
2315
|
+
const A = s === "root" && r.isCntr, O = s.split(".").slice(0, 2).join("."), I = In.includes(O);
|
|
2316
|
+
c || (o = r.isCntr && I || h % 2 === 0 && A);
|
|
2317
2317
|
let N = e ? `${e}.${u}` : `${s}.${u}`;
|
|
2318
2318
|
if (N = Fn(N, i), o && In.push(N), _ && t.push(vr(N, _, null, M, o, T)), zt(f) && !it(f)) {
|
|
2319
2319
|
t.push(vr(s, N, null, x, o, T));
|
|
2320
2320
|
const $ = l || Object.keys(g).length === 0;
|
|
2321
2321
|
if ($) {
|
|
2322
|
-
const
|
|
2322
|
+
const P = S ? "object" : "array", { config: H } = Zr(P, v);
|
|
2323
2323
|
H.data.headerTitle = S ? C : null, i.push(Or(H, N, { label: C || u, parent: R }, f, m));
|
|
2324
2324
|
}
|
|
2325
2325
|
if (Object.keys(g).length && !d) {
|
|
2326
|
-
const
|
|
2326
|
+
const P = it(f) ? ` ${f.length || ""}` : `{${Object.keys(f).length || ""}}`;
|
|
2327
2327
|
let H = N;
|
|
2328
|
-
$ && (H = `${N}.${
|
|
2328
|
+
$ && (H = `${N}.${P}`, H = Fn(H, i), t.push(vr(N, H, null, x, o, T))), tn(f, H, i, t, C || u, r, v);
|
|
2329
2329
|
} else Object.keys(p).length && !it(f) ? Nn({
|
|
2330
2330
|
chldPth: N,
|
|
2331
2331
|
flowConfig: r,
|
|
@@ -2764,14 +2764,14 @@ function Vu(e, r = {}) {
|
|
|
2764
2764
|
source: x,
|
|
2765
2765
|
target: C,
|
|
2766
2766
|
isInverted: S
|
|
2767
|
-
}, A = Xr(R),
|
|
2768
|
-
if (
|
|
2769
|
-
const
|
|
2770
|
-
typeof
|
|
2771
|
-
const N =
|
|
2772
|
-
typeof N == "string" && (R.icon = N),
|
|
2773
|
-
const $ =
|
|
2774
|
-
["dashed", "traveling"].includes($) && (R.edgeAnimationVariant = $),
|
|
2767
|
+
}, A = Xr(R), O = ze(e, A.address);
|
|
2768
|
+
if (O && typeof O == "object") {
|
|
2769
|
+
const I = O[A.kind === "target" ? "$targetEdgeType" : "$edgeType"];
|
|
2770
|
+
typeof I == "string" && (R.type = I);
|
|
2771
|
+
const N = O[A.kind === "target" ? "$targetIcon" : "$edgeIcon"];
|
|
2772
|
+
typeof N == "string" && (R.icon = N), O.$isEdgeAnimated !== void 0 && (R.isEdgeAnimated = !!O.$isEdgeAnimated);
|
|
2773
|
+
const $ = O[A.kind === "target" ? "$targetAnimationVariant" : "$edgeAnimationVariant"];
|
|
2774
|
+
["dashed", "traveling"].includes($) && (R.edgeAnimationVariant = $), O.$isEdgeDashed !== void 0 && (R.isEdgeDashed = !!O.$isEdgeDashed), O.$edgeColor && (R.color = O.$edgeColor);
|
|
2775
2775
|
}
|
|
2776
2776
|
return { data: R };
|
|
2777
2777
|
});
|
|
@@ -3770,8 +3770,8 @@ function Bb(e, r, t, n) {
|
|
|
3770
3770
|
])
|
|
3771
3771
|
)
|
|
3772
3772
|
} : v.kind === "array" ? Object.fromEntries(
|
|
3773
|
-
(Array.isArray(p) ? p : []).map((A,
|
|
3774
|
-
String(
|
|
3773
|
+
(Array.isArray(p) ? p : []).map((A, O) => [
|
|
3774
|
+
String(O),
|
|
3775
3775
|
{ type: v.items, optional: !0 }
|
|
3776
3776
|
])
|
|
3777
3777
|
) : {
|
|
@@ -3780,22 +3780,22 @@ function Bb(e, r, t, n) {
|
|
|
3780
3780
|
optional: !1
|
|
3781
3781
|
}
|
|
3782
3782
|
};
|
|
3783
|
-
for (const [A,
|
|
3783
|
+
for (const [A, O] of Object.entries(S)) {
|
|
3784
3784
|
if (!R1(A))
|
|
3785
3785
|
throw new Error(`Unsupported structured property key: ${A}`);
|
|
3786
|
-
const
|
|
3787
|
-
if (((R = x[A]) == null ? void 0 : R.$control) === "upload" || !
|
|
3786
|
+
const I = b ? u : `${u}.${A}`, N = ze(e, I), $ = Dn(O.type, N), P = $.kind === "object" || $.kind === "array", H = (E = C.ports) == null ? void 0 : E[A], oe = (H == null ? void 0 : H.kind) === "config" && (((T = x[A]) == null ? void 0 : T.$options) || $n(O.type)), ae = O.type.kind === "json" || O.type.kind === "union" && !$n(O.type);
|
|
3787
|
+
if (((R = x[A]) == null ? void 0 : R.$control) === "upload" || !P && v.kind !== "array" && (!ae || b) || oe) {
|
|
3788
3788
|
C.properties[A] = {
|
|
3789
|
-
...
|
|
3790
|
-
type:
|
|
3789
|
+
...O,
|
|
3790
|
+
type: O.type.kind === "json" ? $ : O.type
|
|
3791
3791
|
};
|
|
3792
3792
|
continue;
|
|
3793
3793
|
}
|
|
3794
|
-
const Q = s.get(
|
|
3795
|
-
address:
|
|
3794
|
+
const Q = s.get(I) ?? M1(I), me = v.kind === "array" ? `Item ${Number(A) + 1}` : A, ve = {
|
|
3795
|
+
address: I,
|
|
3796
3796
|
owner: l,
|
|
3797
3797
|
field: A,
|
|
3798
|
-
type:
|
|
3798
|
+
type: O.type,
|
|
3799
3799
|
label: me,
|
|
3800
3800
|
nodeId: Q,
|
|
3801
3801
|
present: N !== void 0
|
|
@@ -3812,7 +3812,7 @@ function Bb(e, r, t, n) {
|
|
|
3812
3812
|
targetProperty: `config:${A}`,
|
|
3813
3813
|
isEdgeDashed: !0
|
|
3814
3814
|
}
|
|
3815
|
-
}), i.containers.has(Q) || s.has(
|
|
3815
|
+
}), i.containers.has(Q) || s.has(I)))
|
|
3816
3816
|
continue;
|
|
3817
3817
|
if (o.has(Q))
|
|
3818
3818
|
throw new Error(`Structured node identity conflict: ${Q}`);
|
|
@@ -3826,19 +3826,19 @@ function Bb(e, r, t, n) {
|
|
|
3826
3826
|
description: {},
|
|
3827
3827
|
config: {
|
|
3828
3828
|
form: !0,
|
|
3829
|
-
icon: $.kind === "array" ? "PiListNumbers" :
|
|
3829
|
+
icon: $.kind === "array" ? "PiListNumbers" : P ? "PiBracketsCurly" : "PiTextT"
|
|
3830
3830
|
},
|
|
3831
3831
|
viewProps: { bgColor: h }
|
|
3832
3832
|
}
|
|
3833
3833
|
};
|
|
3834
|
-
i.nodes.push(z), a(Q,
|
|
3834
|
+
i.nodes.push(z), a(Q, I, O.type, h, m + 1, !0);
|
|
3835
3835
|
const B = i.schema[`__form:${Q}`];
|
|
3836
3836
|
z.data.description = Object.fromEntries(
|
|
3837
3837
|
Object.keys(B.properties).map((W) => [
|
|
3838
3838
|
W,
|
|
3839
3839
|
ze(
|
|
3840
3840
|
e,
|
|
3841
|
-
$.kind === "array" || $.kind === "object" ? `${
|
|
3841
|
+
$.kind === "array" || $.kind === "object" ? `${I}.${W}` : I
|
|
3842
3842
|
)
|
|
3843
3843
|
]).filter(([, W]) => W !== void 0)
|
|
3844
3844
|
);
|
|
@@ -4383,31 +4383,31 @@ function N1({
|
|
|
4383
4383
|
}) {
|
|
4384
4384
|
const { structured: t, data: n, callbacks: i, editable: o, onFieldCreate: s } = jt(Ut), a = rt(), [c, d] = re(""), [l, u] = re("0"), [f, h] = re(""), m = t == null ? void 0 : t.containers.get(e);
|
|
4385
4385
|
if (!m || !n || !t) return null;
|
|
4386
|
-
const g = a.readOnly || a.config.editable === !1 || !o, p = ze(n, m.address), v = Ku(m.declared), b = m.type.kind === "array" ? m.type.items : m.type.kind === "object" ? m.type.additionalProperties : void 0, w = b ? Ku(b) : [], x = !!s && m.type.kind === "object" && (b == null ? void 0 : b.kind) === "json", C = (
|
|
4387
|
-
(
|
|
4388
|
-
), _ = (
|
|
4386
|
+
const g = a.readOnly || a.config.editable === !1 || !o, p = ze(n, m.address), v = Ku(m.declared), b = m.type.kind === "array" ? m.type.items : m.type.kind === "object" ? m.type.additionalProperties : void 0, w = b ? Ku(b) : [], x = !!s && m.type.kind === "object" && (b == null ? void 0 : b.kind) === "json", C = (O) => O.kind === "literal" ? String(O.value) : O.kind === "string" ? "Text" : Gt(O.kind), S = [...t.slots.values()].filter(
|
|
4387
|
+
(O) => O.owner === e
|
|
4388
|
+
), _ = (O, I) => {
|
|
4389
4389
|
var N;
|
|
4390
4390
|
return (N = i.onFormChange) == null ? void 0 : N.call(i, {
|
|
4391
4391
|
data: n,
|
|
4392
4392
|
nodeAddress: m.address,
|
|
4393
|
-
address:
|
|
4394
|
-
previousValue: ze(n,
|
|
4395
|
-
value:
|
|
4393
|
+
address: O,
|
|
4394
|
+
previousValue: ze(n, O),
|
|
4395
|
+
value: I
|
|
4396
4396
|
});
|
|
4397
|
-
}, M = (
|
|
4398
|
-
var
|
|
4399
|
-
a.setSelectedNodeIds([
|
|
4400
|
-
}, E = (
|
|
4397
|
+
}, M = (O) => {
|
|
4398
|
+
var I;
|
|
4399
|
+
a.setSelectedNodeIds([O]), (I = a.engineRef.current) == null || I.focusNode(O, 90, !1);
|
|
4400
|
+
}, E = (O, I) => {
|
|
4401
4401
|
if (!Array.isArray(p)) return;
|
|
4402
4402
|
const N = [...p];
|
|
4403
|
-
[N[
|
|
4403
|
+
[N[O], N[O + I]] = [N[O + I], N[O]], _(m.address, N);
|
|
4404
4404
|
}, T = () => {
|
|
4405
|
-
const
|
|
4406
|
-
if (
|
|
4405
|
+
const O = w[Number(l)] ?? w[0];
|
|
4406
|
+
if (O)
|
|
4407
4407
|
if (m.type.kind === "array")
|
|
4408
4408
|
_(m.address, [
|
|
4409
4409
|
...Array.isArray(p) ? p : [],
|
|
4410
|
-
An(
|
|
4410
|
+
An(O)
|
|
4411
4411
|
]);
|
|
4412
4412
|
else {
|
|
4413
4413
|
if (!c || c.includes(".") || c.startsWith("$") || ["__proto__", "constructor", "prototype"].includes(c)) {
|
|
@@ -4427,7 +4427,7 @@ function N1({
|
|
|
4427
4427
|
value: l === "files" ? [] : ""
|
|
4428
4428
|
},
|
|
4429
4429
|
{ $control: "upload" }
|
|
4430
|
-
) : _(`${m.address}.${c}`, An(
|
|
4430
|
+
) : _(`${m.address}.${c}`, An(O)), d(""), h("");
|
|
4431
4431
|
}
|
|
4432
4432
|
}, R = m.type.kind === "object" && !!m.type.additionalProperties, A = m.type.kind === "array";
|
|
4433
4433
|
return /* @__PURE__ */ D(
|
|
@@ -4445,37 +4445,37 @@ function N1({
|
|
|
4445
4445
|
disabled: g,
|
|
4446
4446
|
value: String(
|
|
4447
4447
|
v.findIndex(
|
|
4448
|
-
(
|
|
4448
|
+
(O) => Dn(O, p).kind === m.type.kind
|
|
4449
4449
|
)
|
|
4450
4450
|
),
|
|
4451
|
-
onValueChange: (
|
|
4451
|
+
onValueChange: (O) => _(
|
|
4452
4452
|
m.address,
|
|
4453
|
-
An(v[Number(
|
|
4453
|
+
An(v[Number(O)])
|
|
4454
4454
|
),
|
|
4455
|
-
children: v.map((
|
|
4455
|
+
children: v.map((O, I) => /* @__PURE__ */ y("option", { value: I, children: C(O) }, I))
|
|
4456
4456
|
}
|
|
4457
4457
|
) })
|
|
4458
4458
|
] }),
|
|
4459
|
-
S.map((
|
|
4459
|
+
S.map((O, I) => /* @__PURE__ */ D(
|
|
4460
4460
|
"div",
|
|
4461
4461
|
{
|
|
4462
|
-
"data-structured-slot":
|
|
4462
|
+
"data-structured-slot": O.address,
|
|
4463
4463
|
style: { display: "flex", gap: 6, alignItems: "center", minWidth: 0 },
|
|
4464
4464
|
children: [
|
|
4465
|
-
|
|
4466
|
-
/* @__PURE__ */ y("span", { style: { flex: 1, overflowWrap: "anywhere" }, children: Gt(
|
|
4465
|
+
O.type.kind === "array" ? /* @__PURE__ */ y(B0, { size: 20 }) : /* @__PURE__ */ y(Bl, { size: 20 }),
|
|
4466
|
+
/* @__PURE__ */ y("span", { style: { flex: 1, overflowWrap: "anywhere" }, children: Gt(O.label) }),
|
|
4467
4467
|
/* @__PURE__ */ y(
|
|
4468
4468
|
$e,
|
|
4469
4469
|
{
|
|
4470
|
-
"aria-label": `${
|
|
4471
|
-
title: `${
|
|
4472
|
-
icon:
|
|
4470
|
+
"aria-label": `${O.present ? r ? "Edit" : "Focus" : "Create"} ${Gt(O.label)}`,
|
|
4471
|
+
title: `${O.present ? r ? "Edit" : "Focus" : "Create"} ${Gt(O.label)}`,
|
|
4472
|
+
icon: O.present ? /* @__PURE__ */ y(D0, { size: 18 }) : /* @__PURE__ */ y($r, { size: 18 }),
|
|
4473
4473
|
size: "sm",
|
|
4474
4474
|
variant: "ghost",
|
|
4475
|
-
disabled: g && !
|
|
4475
|
+
disabled: g && !O.present,
|
|
4476
4476
|
onClick: (N) => {
|
|
4477
4477
|
var $;
|
|
4478
|
-
|
|
4478
|
+
O.present ? r ? r(O.nodeId) : (($ = N.currentTarget.closest("dialog")) == null || $.close(), M(O.nodeId)) : _(O.address, An(O.type));
|
|
4479
4479
|
}
|
|
4480
4480
|
}
|
|
4481
4481
|
),
|
|
@@ -4483,30 +4483,30 @@ function N1({
|
|
|
4483
4483
|
/* @__PURE__ */ y(
|
|
4484
4484
|
$e,
|
|
4485
4485
|
{
|
|
4486
|
-
"aria-label": `Move item ${
|
|
4486
|
+
"aria-label": `Move item ${I + 1} up`,
|
|
4487
4487
|
icon: /* @__PURE__ */ y(Wm, { size: 18 }),
|
|
4488
4488
|
size: "sm",
|
|
4489
4489
|
variant: "ghost",
|
|
4490
|
-
disabled: g ||
|
|
4491
|
-
onClick: () => E(
|
|
4490
|
+
disabled: g || I === 0,
|
|
4491
|
+
onClick: () => E(I, -1)
|
|
4492
4492
|
}
|
|
4493
4493
|
),
|
|
4494
4494
|
/* @__PURE__ */ y(
|
|
4495
4495
|
$e,
|
|
4496
4496
|
{
|
|
4497
|
-
"aria-label": `Move item ${
|
|
4497
|
+
"aria-label": `Move item ${I + 1} down`,
|
|
4498
4498
|
icon: /* @__PURE__ */ y(Vm, { size: 18 }),
|
|
4499
4499
|
size: "sm",
|
|
4500
4500
|
variant: "ghost",
|
|
4501
|
-
disabled: g ||
|
|
4502
|
-
onClick: () => E(
|
|
4501
|
+
disabled: g || I === S.length - 1,
|
|
4502
|
+
onClick: () => E(I, 1)
|
|
4503
4503
|
}
|
|
4504
4504
|
)
|
|
4505
4505
|
] }),
|
|
4506
|
-
|
|
4506
|
+
O.present && /* @__PURE__ */ y(
|
|
4507
4507
|
$e,
|
|
4508
4508
|
{
|
|
4509
|
-
"aria-label": `Remove ${Gt(
|
|
4509
|
+
"aria-label": `Remove ${Gt(O.label)}`,
|
|
4510
4510
|
icon: /* @__PURE__ */ y(zr, { size: 18 }),
|
|
4511
4511
|
size: "sm",
|
|
4512
4512
|
variant: "ghost",
|
|
@@ -4514,14 +4514,14 @@ function N1({
|
|
|
4514
4514
|
onClick: () => A ? _(
|
|
4515
4515
|
m.address,
|
|
4516
4516
|
p.filter(
|
|
4517
|
-
(N, $) => $ !==
|
|
4517
|
+
(N, $) => $ !== I
|
|
4518
4518
|
)
|
|
4519
|
-
) : _(
|
|
4519
|
+
) : _(O.address, void 0)
|
|
4520
4520
|
}
|
|
4521
4521
|
)
|
|
4522
4522
|
]
|
|
4523
4523
|
},
|
|
4524
|
-
|
|
4524
|
+
O.address
|
|
4525
4525
|
)),
|
|
4526
4526
|
(A || R) && /* @__PURE__ */ D(
|
|
4527
4527
|
"div",
|
|
@@ -4551,7 +4551,7 @@ function N1({
|
|
|
4551
4551
|
placeholder: "Required",
|
|
4552
4552
|
value: c,
|
|
4553
4553
|
disabled: g,
|
|
4554
|
-
onChange: (
|
|
4554
|
+
onChange: (O) => d(O.target.value)
|
|
4555
4555
|
}
|
|
4556
4556
|
)
|
|
4557
4557
|
]
|
|
@@ -4576,7 +4576,7 @@ function N1({
|
|
|
4576
4576
|
disabled: g,
|
|
4577
4577
|
onValueChange: u,
|
|
4578
4578
|
children: [
|
|
4579
|
-
w.map((
|
|
4579
|
+
w.map((O, I) => /* @__PURE__ */ y("option", { value: I, children: C(O) }, I)),
|
|
4580
4580
|
x && /* @__PURE__ */ y("option", { value: "file", children: "File" }),
|
|
4581
4581
|
x && /* @__PURE__ */ y("option", { value: "files", children: "Files" })
|
|
4582
4582
|
]
|
|
@@ -4778,17 +4778,17 @@ function Zu({
|
|
|
4778
4778
|
value: n,
|
|
4779
4779
|
disabled: i
|
|
4780
4780
|
}) {
|
|
4781
|
-
var ye, pe, J, L,
|
|
4781
|
+
var ye, pe, J, L, ie;
|
|
4782
4782
|
const {
|
|
4783
4783
|
callbacks: o,
|
|
4784
4784
|
structured: s,
|
|
4785
4785
|
references: a
|
|
4786
|
-
} = jt(Ut), { themeColor: c } = rt(), { background: d } = ut(), l = ur(), u = r.type.kind === "object" || r.type.kind === "array" || r.type.kind === "json", f = n === void 0 ? "" : u ? JSON.stringify(n, null, 2) : String(n), [h, m] = re(f), [g, p] = re(""), [v, b] = re(0), w = de(null), x = de(), [C, S] = re(!1), [_, M] = re(!1), [E, T] = re(), R = ((ye = t.$options) == null ? void 0 : ye.$source) === "callback", A = o.resolveFormOptions, { data:
|
|
4786
|
+
} = jt(Ut), { themeColor: c } = rt(), { background: d } = ut(), l = ur(), u = r.type.kind === "object" || r.type.kind === "array" || r.type.kind === "json", f = n === void 0 ? "" : u ? JSON.stringify(n, null, 2) : String(n), [h, m] = re(f), [g, p] = re(""), [v, b] = re(0), w = de(null), x = de(), [C, S] = re(!1), [_, M] = re(!1), [E, T] = re(), R = ((ye = t.$options) == null ? void 0 : ye.$source) === "callback", A = o.resolveFormOptions, { data: O, address: I, nodeAddress: N, nodeId: $ } = e;
|
|
4787
4787
|
Ue(() => (S(!1), M(!1), () => {
|
|
4788
4788
|
var U;
|
|
4789
4789
|
(U = x.current) == null || U.abort(), x.current = void 0;
|
|
4790
4790
|
}), [
|
|
4791
|
-
|
|
4791
|
+
I,
|
|
4792
4792
|
N,
|
|
4793
4793
|
$,
|
|
4794
4794
|
i,
|
|
@@ -4797,27 +4797,27 @@ function Zu({
|
|
|
4797
4797
|
(pe = t.$upload) == null ? void 0 : pe.accept,
|
|
4798
4798
|
(J = t.$upload) == null ? void 0 : J.maxSizeBytes
|
|
4799
4799
|
]);
|
|
4800
|
-
const
|
|
4801
|
-
|
|
4800
|
+
const P = de(O);
|
|
4801
|
+
P.current = O;
|
|
4802
4802
|
const H = JSON.stringify([
|
|
4803
|
-
|
|
4803
|
+
I,
|
|
4804
4804
|
$,
|
|
4805
4805
|
(L = t.$options) != null && L.$dependsOn ? t.$options.$dependsOn.map(
|
|
4806
|
-
(U) => ze(
|
|
4807
|
-
) : ze(
|
|
4806
|
+
(U) => ze(O, U)
|
|
4807
|
+
) : ze(O, N)
|
|
4808
4808
|
]);
|
|
4809
4809
|
Ue(() => {
|
|
4810
4810
|
m(f), p("");
|
|
4811
|
-
}, [f,
|
|
4811
|
+
}, [f, I, $]), Ue(() => {
|
|
4812
4812
|
if (!R) return;
|
|
4813
4813
|
const U = new AbortController();
|
|
4814
4814
|
return Promise.resolve().then(() => {
|
|
4815
4815
|
if (!A) throw new Error("No options resolver configured");
|
|
4816
4816
|
return A({
|
|
4817
|
-
address:
|
|
4817
|
+
address: I,
|
|
4818
4818
|
nodeAddress: N,
|
|
4819
4819
|
nodeId: $,
|
|
4820
|
-
data: sn(
|
|
4820
|
+
data: sn(P.current),
|
|
4821
4821
|
signal: U.signal
|
|
4822
4822
|
});
|
|
4823
4823
|
}).then((fe) => {
|
|
@@ -4833,11 +4833,11 @@ function Zu({
|
|
|
4833
4833
|
error: fe instanceof Error ? fe.message : "Options unavailable"
|
|
4834
4834
|
});
|
|
4835
4835
|
}), () => U.abort();
|
|
4836
|
-
}, [R, A, H,
|
|
4837
|
-
const
|
|
4836
|
+
}, [R, A, H, I, N, $, v]);
|
|
4837
|
+
const oe = R && (E == null ? void 0 : E.key) !== H, ae = R ? (E == null ? void 0 : E.key) === H ? E.options : [] : r.type.kind === "null" ? [{ label: "Null", value: null }] : r.type.kind === "boolean" ? [
|
|
4838
4838
|
{ label: "Yes", value: !0 },
|
|
4839
4839
|
{ label: "No", value: !1 }
|
|
4840
|
-
] : $n(r.type), Q = r.type.kind === "array", me = (t.$control === "upload" ? "upload" : s && u || t.$control === "checkbox" ? "pills" : t.$control) ?? (ae ? Q || r.type.kind === "boolean" ? "pills" : "select" : r.type.kind === "boolean" ? "checkbox" : u ? "textarea" : "input"), ve = !r.optional || !!t.$requiredWhen && Ao(t.$requiredWhen,
|
|
4840
|
+
] : $n(r.type), Q = r.type.kind === "array", me = (t.$control === "upload" ? "upload" : s && u || t.$control === "checkbox" ? "pills" : t.$control) ?? (ae ? Q || r.type.kind === "boolean" ? "pills" : "select" : r.type.kind === "boolean" ? "checkbox" : u ? "textarea" : "input"), ve = !r.optional || !!t.$requiredWhen && Ao(t.$requiredWhen, O), z = ve ? "Required" : "Optional", B = me !== "upload" && !!(a != null && a.length) && typeof n == "string" && n.includes("{{"), W = g || R && (E == null ? void 0 : E.key) === H && E.error || !B && or(r.type, n, ve), F = Gt(t.$label ?? I.split(".").pop()), ce = (U) => {
|
|
4841
4841
|
var fe;
|
|
4842
4842
|
if (!(i || Object.is(U, n)))
|
|
4843
4843
|
try {
|
|
@@ -4900,7 +4900,7 @@ function Zu({
|
|
|
4900
4900
|
U.map(async (nt) => {
|
|
4901
4901
|
const st = await o.uploadFormFile({
|
|
4902
4902
|
...e,
|
|
4903
|
-
data: sn(
|
|
4903
|
+
data: sn(O),
|
|
4904
4904
|
file: nt,
|
|
4905
4905
|
signal: fe.signal
|
|
4906
4906
|
});
|
|
@@ -4936,12 +4936,12 @@ function Zu({
|
|
|
4936
4936
|
"aria-required": ve,
|
|
4937
4937
|
"aria-invalid": !!W,
|
|
4938
4938
|
"aria-describedby": W ? `${l}-error` : void 0
|
|
4939
|
-
},
|
|
4939
|
+
}, Ce = Pe(c);
|
|
4940
4940
|
return /* @__PURE__ */ D(
|
|
4941
4941
|
"div",
|
|
4942
4942
|
{
|
|
4943
|
-
"data-form-field":
|
|
4944
|
-
"data-flow-property":
|
|
4943
|
+
"data-form-field": I,
|
|
4944
|
+
"data-flow-property": I.slice(N.length + 1),
|
|
4945
4945
|
children: [
|
|
4946
4946
|
/* @__PURE__ */ D(
|
|
4947
4947
|
"div",
|
|
@@ -5019,7 +5019,7 @@ function Zu({
|
|
|
5019
5019
|
type: "file",
|
|
5020
5020
|
hidden: !0,
|
|
5021
5021
|
"aria-label": `Upload ${F}`,
|
|
5022
|
-
accept: (
|
|
5022
|
+
accept: (ie = t.$upload) == null ? void 0 : ie.accept,
|
|
5023
5023
|
multiple: Q,
|
|
5024
5024
|
disabled: i || C,
|
|
5025
5025
|
onChange: (U) => {
|
|
@@ -5107,7 +5107,7 @@ function Zu({
|
|
|
5107
5107
|
Vt,
|
|
5108
5108
|
{
|
|
5109
5109
|
...we,
|
|
5110
|
-
disabled: i ||
|
|
5110
|
+
disabled: i || oe || !!(E != null && E.error),
|
|
5111
5111
|
labelCase: "preserve",
|
|
5112
5112
|
value: String(
|
|
5113
5113
|
(ae == null ? void 0 : ae.findIndex((U) => Object.is(U.value, n))) ?? -1
|
|
@@ -5136,13 +5136,13 @@ function Zu({
|
|
|
5136
5136
|
"button",
|
|
5137
5137
|
{
|
|
5138
5138
|
type: "button",
|
|
5139
|
-
disabled: i ||
|
|
5139
|
+
disabled: i || oe,
|
|
5140
5140
|
"aria-pressed": be,
|
|
5141
5141
|
style: {
|
|
5142
5142
|
padding: "8px 16px",
|
|
5143
5143
|
borderRadius: 24,
|
|
5144
5144
|
border: 0,
|
|
5145
|
-
color: be ?
|
|
5145
|
+
color: be ? Ce : "inherit",
|
|
5146
5146
|
background: be ? "color-mix(in srgb, currentColor 12%, transparent)" : "color-mix(in srgb, currentColor 7%, transparent)"
|
|
5147
5147
|
},
|
|
5148
5148
|
onClick: () => ce(
|
|
@@ -5155,7 +5155,7 @@ function Zu({
|
|
|
5155
5155
|
fe
|
|
5156
5156
|
);
|
|
5157
5157
|
}),
|
|
5158
|
-
|
|
5158
|
+
oe && /* @__PURE__ */ y("span", { role: "status", children: "Loading..." })
|
|
5159
5159
|
]
|
|
5160
5160
|
}
|
|
5161
5161
|
) : me === "textarea" ? /* @__PURE__ */ y(
|
|
@@ -5425,7 +5425,7 @@ function Ub({
|
|
|
5425
5425
|
open: n,
|
|
5426
5426
|
onOpenChange: i
|
|
5427
5427
|
}) {
|
|
5428
|
-
const { callbacks: o, readOnly: s, themeColor: a, colorMode: c } = rt(), { background: d, backgroundSecondary: l, border: u, colorText: f, colorInactive: h } = ut(), m = c === "dark" ? Hn : Pe(h), g = de(null), p = de(null), v = de(0), [b, w] = re(!1), [x, C] = re("icons"), [S, _] = re([]), [M, E] = re("loading"), [T, R] = re(""), [A,
|
|
5428
|
+
const { callbacks: o, readOnly: s, themeColor: a, colorMode: c } = rt(), { background: d, backgroundSecondary: l, border: u, colorText: f, colorInactive: h } = ut(), m = c === "dark" ? Hn : Pe(h), g = de(null), p = de(null), v = de(0), [b, w] = re(!1), [x, C] = re("icons"), [S, _] = re([]), [M, E] = re("loading"), [T, R] = re(""), [A, O] = re(0), [I, N] = re(""), [$, P] = re(""), [H, oe] = re(!1);
|
|
5429
5429
|
Ue(
|
|
5430
5430
|
() => () => {
|
|
5431
5431
|
v.current++;
|
|
@@ -5453,7 +5453,7 @@ function Ub({
|
|
|
5453
5453
|
(F = g.current) == null || F.close();
|
|
5454
5454
|
return;
|
|
5455
5455
|
}
|
|
5456
|
-
(ce = g.current) != null && ce.open || (
|
|
5456
|
+
(ce = g.current) != null && ce.open || (P(""), C(
|
|
5457
5457
|
t === "PiFileSvg" || t && mr(t) ? "custom" : "icons"
|
|
5458
5458
|
), N(
|
|
5459
5459
|
t && !t.startsWith(qn) && mr(t) ? t : ""
|
|
@@ -5492,7 +5492,7 @@ function Ub({
|
|
|
5492
5492
|
disabled: s,
|
|
5493
5493
|
onClick: () => {
|
|
5494
5494
|
var F;
|
|
5495
|
-
|
|
5495
|
+
P(""), C(t && mr(t) ? "custom" : "icons"), N(
|
|
5496
5496
|
t && !t.startsWith(qn) && mr(t) ? t : ""
|
|
5497
5497
|
), w(!0), (F = g.current) == null || F.showModal();
|
|
5498
5498
|
}
|
|
@@ -5510,7 +5510,7 @@ function Ub({
|
|
|
5510
5510
|
Pe(u)
|
|
5511
5511
|
),
|
|
5512
5512
|
onClose: () => {
|
|
5513
|
-
w(!1), i == null || i(!1), v.current++,
|
|
5513
|
+
w(!1), i == null || i(!1), v.current++, oe(!1);
|
|
5514
5514
|
},
|
|
5515
5515
|
onClick: (F) => {
|
|
5516
5516
|
F.stopPropagation(), F.target === F.currentTarget && F.currentTarget.close();
|
|
@@ -5581,7 +5581,7 @@ function Ub({
|
|
|
5581
5581
|
{
|
|
5582
5582
|
value: x,
|
|
5583
5583
|
onValueChange: ({ value: F }) => {
|
|
5584
|
-
C(F),
|
|
5584
|
+
C(F), P("");
|
|
5585
5585
|
},
|
|
5586
5586
|
display: "contents",
|
|
5587
5587
|
css: { "--indicator-thickness": "1px" },
|
|
@@ -5627,16 +5627,16 @@ function Ub({
|
|
|
5627
5627
|
const ce = (se = F.target.files) == null ? void 0 : se[0];
|
|
5628
5628
|
if (F.target.value = "", !ce) return;
|
|
5629
5629
|
const Z = ++v.current;
|
|
5630
|
-
|
|
5630
|
+
oe(!0), P("");
|
|
5631
5631
|
try {
|
|
5632
5632
|
const ue = await E1(ce);
|
|
5633
5633
|
Z === v.current && ae(ue);
|
|
5634
5634
|
} catch (ue) {
|
|
5635
|
-
Z === v.current &&
|
|
5635
|
+
Z === v.current && P(
|
|
5636
5636
|
ue instanceof Error ? ue.message : "Unable to read SVG."
|
|
5637
5637
|
);
|
|
5638
5638
|
} finally {
|
|
5639
|
-
Z === v.current &&
|
|
5639
|
+
Z === v.current && oe(!1);
|
|
5640
5640
|
}
|
|
5641
5641
|
}
|
|
5642
5642
|
}
|
|
@@ -5655,7 +5655,7 @@ function Ub({
|
|
|
5655
5655
|
placeholder: "Search icons...",
|
|
5656
5656
|
value: T,
|
|
5657
5657
|
onChange: (F) => {
|
|
5658
|
-
R(F.target.value),
|
|
5658
|
+
R(F.target.value), O(0);
|
|
5659
5659
|
},
|
|
5660
5660
|
style: W
|
|
5661
5661
|
}
|
|
@@ -5725,7 +5725,7 @@ function Ub({
|
|
|
5725
5725
|
size: "sm",
|
|
5726
5726
|
variant: "ghost",
|
|
5727
5727
|
disabled: z === 0,
|
|
5728
|
-
onClick: () =>
|
|
5728
|
+
onClick: () => O(z - 1)
|
|
5729
5729
|
}
|
|
5730
5730
|
) }),
|
|
5731
5731
|
/* @__PURE__ */ y(Ye, { label: "Next icons", children: /* @__PURE__ */ y(
|
|
@@ -5736,7 +5736,7 @@ function Ub({
|
|
|
5736
5736
|
size: "sm",
|
|
5737
5737
|
variant: "ghost",
|
|
5738
5738
|
disabled: z + 1 >= ve,
|
|
5739
|
-
onClick: () =>
|
|
5739
|
+
onClick: () => O(z + 1)
|
|
5740
5740
|
}
|
|
5741
5741
|
) })
|
|
5742
5742
|
] })
|
|
@@ -5778,7 +5778,7 @@ function Ub({
|
|
|
5778
5778
|
minWidth: 0
|
|
5779
5779
|
},
|
|
5780
5780
|
onSubmit: (F) => {
|
|
5781
|
-
F.preventDefault(), !(H || s) && (!mr(
|
|
5781
|
+
F.preventDefault(), !(H || s) && (!mr(I.trim()) || I.trim().startsWith(qn) ? P("Enter an HTTP or HTTPS image URL.") : ae(I.trim()));
|
|
5782
5782
|
},
|
|
5783
5783
|
children: [
|
|
5784
5784
|
/* @__PURE__ */ y(
|
|
@@ -5787,7 +5787,7 @@ function Ub({
|
|
|
5787
5787
|
type: "url",
|
|
5788
5788
|
"aria-label": "SVG URL",
|
|
5789
5789
|
placeholder: "https://example.com/icon.svg",
|
|
5790
|
-
value:
|
|
5790
|
+
value: I,
|
|
5791
5791
|
disabled: H || s,
|
|
5792
5792
|
onChange: (F) => N(F.target.value),
|
|
5793
5793
|
style: { ...W, flex: 1, minWidth: 0 }
|
|
@@ -5801,7 +5801,7 @@ function Ub({
|
|
|
5801
5801
|
icon: /* @__PURE__ */ y(Xm, { size: 20 }),
|
|
5802
5802
|
size: "sm",
|
|
5803
5803
|
variant: "ghost",
|
|
5804
|
-
disabled: H || s || !
|
|
5804
|
+
disabled: H || s || !I.trim(),
|
|
5805
5805
|
style: { flexShrink: 0 }
|
|
5806
5806
|
}
|
|
5807
5807
|
) })
|
|
@@ -6271,7 +6271,7 @@ function j1({
|
|
|
6271
6271
|
onClose: r,
|
|
6272
6272
|
afterLabel: t
|
|
6273
6273
|
}) {
|
|
6274
|
-
var ce, Z, se, ue, we,
|
|
6274
|
+
var ce, Z, se, ue, we, Ce, ye, pe;
|
|
6275
6275
|
const {
|
|
6276
6276
|
callbacks: n,
|
|
6277
6277
|
colorMode: i,
|
|
@@ -6281,8 +6281,8 @@ function j1({
|
|
|
6281
6281
|
nodeViewModes: c
|
|
6282
6282
|
} = rt(), { colorText: d, colorInactive: l } = ut(), { nodeById: u, parentIds: f } = jr(), { palette: h, show: m } = Hb(), g = e.length === 1, [p, v] = re(""), b = g ? (ce = u.get(e[0])) == null ? void 0 : ce.data : void 0, w = e.map((J) => {
|
|
6283
6283
|
var U, fe, be, qe, je, We;
|
|
6284
|
-
const L = (U = u.get(J)) == null ? void 0 : U.data,
|
|
6285
|
-
return
|
|
6284
|
+
const L = (U = u.get(J)) == null ? void 0 : U.data, ie = ((fe = L == null ? void 0 : L.config) == null ? void 0 : fe.typeView) ?? "";
|
|
6285
|
+
return ie === "object" && ((be = L == null ? void 0 : L.config) == null ? void 0 : be.content) !== void 0 && c[J] !== "properties" ? "content" : ie === "icon-label" && ((qe = L == null ? void 0 : L.viewProps) == null ? void 0 : qe.bgColor) === "transparent" && ((je = L == null ? void 0 : L.viewProps) == null ? void 0 : je.borderWidth) === 0 && ((We = L == null ? void 0 : L.viewProps) == null ? void 0 : We.outline) === !1 ? "media" : ie;
|
|
6286
6286
|
}), x = w.some((J) => J !== w[0]), C = x ? "mixed" : w[0] ?? "", S = [
|
|
6287
6287
|
{ value: "text", label: "Text", view: "text", icon: V0 },
|
|
6288
6288
|
{
|
|
@@ -6302,35 +6302,35 @@ function j1({
|
|
|
6302
6302
|
icon: K0
|
|
6303
6303
|
}
|
|
6304
6304
|
], _ = e.some((J) => {
|
|
6305
|
-
var
|
|
6306
|
-
const L = (
|
|
6305
|
+
var ie, U, fe, be;
|
|
6306
|
+
const L = (ie = u.get(J)) == null ? void 0 : ie.data;
|
|
6307
6307
|
return L && ((U = L.config) == null ? void 0 : U.typeView) !== "grid" && ((fe = L.config) == null ? void 0 : fe.typeView) !== "parent" && (f.has(J) || ((be = L.config) == null ? void 0 : be.parentContainer) || Object.prototype.hasOwnProperty.call(
|
|
6308
6308
|
s.customViews ?? {},
|
|
6309
6309
|
L.type
|
|
6310
6310
|
));
|
|
6311
6311
|
}), M = (Z = b == null ? void 0 : b.config) == null ? void 0 : Z.collapsed, E = Wb(e[0]), T = (J) => {
|
|
6312
|
-
var L,
|
|
6313
|
-
return (((
|
|
6314
|
-
}, R = e.every(T), A = !R && e.some(T),
|
|
6312
|
+
var L, ie, U;
|
|
6313
|
+
return (((ie = (L = u.get(J)) == null ? void 0 : L.data.viewProps) == null ? void 0 : ie.outline) ?? (f.has(J) ? (U = s.parentNodeStyle) == null ? void 0 : U.outline : !1)) === !0;
|
|
6314
|
+
}, R = e.every(T), A = !R && e.some(T), O = (J) => {
|
|
6315
6315
|
var L;
|
|
6316
6316
|
return ((L = u.get(J)) == null ? void 0 : L.data.isNodeAnimated) === !0;
|
|
6317
|
-
},
|
|
6317
|
+
}, I = e.every(O), N = !I && e.some(O), $ = e.map(
|
|
6318
6318
|
(J) => {
|
|
6319
6319
|
var L;
|
|
6320
6320
|
return ((L = u.get(J)) == null ? void 0 : L.data.nodeAnimationVariant) ?? "traveling";
|
|
6321
6321
|
}
|
|
6322
|
-
),
|
|
6322
|
+
), P = $.every(
|
|
6323
6323
|
(J) => J === $[0]
|
|
6324
|
-
) ? $[0] : "", H = (J) => e.forEach(J), [
|
|
6325
|
-
var L,
|
|
6326
|
-
return (((
|
|
6324
|
+
) ? $[0] : "", H = (J) => e.forEach(J), [oe, ae] = re(!1), Q = oe && m("color") && m("borderColor"), me = (J) => {
|
|
6325
|
+
var L, ie, U;
|
|
6326
|
+
return (((ie = (L = u.get(J)) == null ? void 0 : L.data.viewProps) == null ? void 0 : ie.borderStyle) ?? (f.has(J) ? (U = s.parentNodeStyle) == null ? void 0 : U.borderStyle : "solid")) === "dashed";
|
|
6327
6327
|
}, ve = e.every(me), z = !ve && e.some(me), B = e.map((J) => {
|
|
6328
6328
|
var U, fe, be;
|
|
6329
|
-
const L = (U = u.get(J)) == null ? void 0 : U.data,
|
|
6330
|
-
return Gn((be = L == null ? void 0 : L.viewProps) == null ? void 0 : be.borderWidth,
|
|
6329
|
+
const L = (U = u.get(J)) == null ? void 0 : U.data, ie = f.has(J) ? Gn((fe = s.parentNodeStyle) == null ? void 0 : fe.borderWidth, 6) : (L == null ? void 0 : L.type) === "objectView" ? 3 : 2;
|
|
6330
|
+
return Gn((be = L == null ? void 0 : L.viewProps) == null ? void 0 : be.borderWidth, ie);
|
|
6331
6331
|
}), W = B.every((J) => J === B[0]) ? String(B[0] ?? "") : "", F = (J) => H((L) => {
|
|
6332
|
-
var
|
|
6333
|
-
Q ? (
|
|
6332
|
+
var ie, U;
|
|
6333
|
+
Q ? (ie = n.onNodeBorderColorChange) == null || ie.call(n, L, J) : (U = n.onNodeColorChange) == null || U.call(n, L, "bg", J);
|
|
6334
6334
|
});
|
|
6335
6335
|
return /* @__PURE__ */ D(Be, { children: [
|
|
6336
6336
|
/* @__PURE__ */ y(Kn, { onClick: r }),
|
|
@@ -6361,10 +6361,10 @@ function j1({
|
|
|
6361
6361
|
value: C,
|
|
6362
6362
|
disabled: s.readOnly || s.editable === !1 || _,
|
|
6363
6363
|
onValueChange: (J) => {
|
|
6364
|
-
var
|
|
6365
|
-
const L = (
|
|
6364
|
+
var ie;
|
|
6365
|
+
const L = (ie = S.find(
|
|
6366
6366
|
(U) => U.value === J
|
|
6367
|
-
)) == null ? void 0 :
|
|
6367
|
+
)) == null ? void 0 : ie.view;
|
|
6368
6368
|
L && H((U) => {
|
|
6369
6369
|
var be, qe, je, We, at, Qe, Ct, nt, st, bt, Te, He, ft;
|
|
6370
6370
|
const fe = (be = u.get(U)) == null ? void 0 : be.data;
|
|
@@ -6486,8 +6486,8 @@ function j1({
|
|
|
6486
6486
|
value: W,
|
|
6487
6487
|
onCommit: (J) => H(
|
|
6488
6488
|
(L) => {
|
|
6489
|
-
var
|
|
6490
|
-
return (
|
|
6489
|
+
var ie;
|
|
6490
|
+
return (ie = n.onNodeBorderWidthChange) == null ? void 0 : ie.call(
|
|
6491
6491
|
n,
|
|
6492
6492
|
L,
|
|
6493
6493
|
J === "" ? void 0 : Number(J)
|
|
@@ -6503,29 +6503,29 @@ function j1({
|
|
|
6503
6503
|
/* @__PURE__ */ y(
|
|
6504
6504
|
Ye,
|
|
6505
6505
|
{
|
|
6506
|
-
label:
|
|
6506
|
+
label: I ? "Stop border animation" : "Animate node border",
|
|
6507
6507
|
children: /* @__PURE__ */ y(
|
|
6508
6508
|
$e,
|
|
6509
6509
|
{
|
|
6510
6510
|
"aria-label": "Toggle node animation",
|
|
6511
|
-
"aria-pressed": N ? "mixed" :
|
|
6511
|
+
"aria-pressed": N ? "mixed" : I,
|
|
6512
6512
|
icon: /* @__PURE__ */ y(Ge, { as: Y0, boxSize: 5 }),
|
|
6513
6513
|
size: "sm",
|
|
6514
6514
|
variant: "ghost",
|
|
6515
|
-
color:
|
|
6515
|
+
color: I ? o : l,
|
|
6516
6516
|
onClick: () => H((J) => {
|
|
6517
6517
|
var L;
|
|
6518
|
-
return (L = n.onNodeAnimationChange) == null ? void 0 : L.call(n, J, !
|
|
6518
|
+
return (L = n.onNodeAnimationChange) == null ? void 0 : L.call(n, J, !I);
|
|
6519
6519
|
})
|
|
6520
6520
|
}
|
|
6521
6521
|
)
|
|
6522
6522
|
}
|
|
6523
6523
|
),
|
|
6524
|
-
(
|
|
6524
|
+
(I || N) && /* @__PURE__ */ y(
|
|
6525
6525
|
Vb,
|
|
6526
6526
|
{
|
|
6527
6527
|
label: "Node animation",
|
|
6528
|
-
value:
|
|
6528
|
+
value: P,
|
|
6529
6529
|
options: [
|
|
6530
6530
|
{ value: "traveling", label: "Trace" },
|
|
6531
6531
|
{ value: "pulse", label: "Pulse" }
|
|
@@ -6533,8 +6533,8 @@ function j1({
|
|
|
6533
6533
|
disabled: s.readOnly,
|
|
6534
6534
|
onChange: (J) => H(
|
|
6535
6535
|
(L) => {
|
|
6536
|
-
var
|
|
6537
|
-
return (
|
|
6536
|
+
var ie;
|
|
6537
|
+
return (ie = n.onNodeAnimationVariantChange) == null ? void 0 : ie.call(n, L, J);
|
|
6538
6538
|
}
|
|
6539
6539
|
)
|
|
6540
6540
|
}
|
|
@@ -6547,10 +6547,10 @@ function j1({
|
|
|
6547
6547
|
{
|
|
6548
6548
|
label: "Text color",
|
|
6549
6549
|
colors: q1,
|
|
6550
|
-
value: (
|
|
6550
|
+
value: (Ce = b == null ? void 0 : b.viewProps) == null ? void 0 : Ce.textColor,
|
|
6551
6551
|
onPick: (J) => H((L) => {
|
|
6552
|
-
var
|
|
6553
|
-
return (
|
|
6552
|
+
var ie;
|
|
6553
|
+
return (ie = n.onNodeColorChange) == null ? void 0 : ie.call(n, L, "text", J);
|
|
6554
6554
|
}),
|
|
6555
6555
|
onReset: () => H((J) => {
|
|
6556
6556
|
var L;
|
|
@@ -6623,8 +6623,8 @@ function j1({
|
|
|
6623
6623
|
onClick: () => {
|
|
6624
6624
|
H(
|
|
6625
6625
|
(J) => {
|
|
6626
|
-
var L,
|
|
6627
|
-
return (
|
|
6626
|
+
var L, ie;
|
|
6627
|
+
return (ie = n.onNodeDelete) == null ? void 0 : ie.call(
|
|
6628
6628
|
n,
|
|
6629
6629
|
J,
|
|
6630
6630
|
((L = u.get(J)) == null ? void 0 : L.data) || { id: J }
|
|
@@ -7034,10 +7034,10 @@ function Jb({
|
|
|
7034
7034
|
bg: d === "dark" ? "whiteAlpha.100" : "blackAlpha.50"
|
|
7035
7035
|
},
|
|
7036
7036
|
onClick: (A) => {
|
|
7037
|
-
var
|
|
7038
|
-
(
|
|
7037
|
+
var O, I;
|
|
7038
|
+
(O = A.currentTarget.closest(
|
|
7039
7039
|
"[popover]"
|
|
7040
|
-
)) == null ||
|
|
7040
|
+
)) == null || O.hidePopover(), (I = s.onWorkflowConfigurationOpen) == null || I.call(s);
|
|
7041
7041
|
},
|
|
7042
7042
|
children: [
|
|
7043
7043
|
/* @__PURE__ */ y(ow, {}),
|
|
@@ -7047,9 +7047,9 @@ function Jb({
|
|
|
7047
7047
|
)
|
|
7048
7048
|
] }),
|
|
7049
7049
|
onValueChange: (A) => {
|
|
7050
|
-
var
|
|
7051
|
-
const
|
|
7052
|
-
n(
|
|
7050
|
+
var I;
|
|
7051
|
+
const O = A === "auto" ? "auto" : A === "properties" ? "properties" : "nodes";
|
|
7052
|
+
n(O), (I = s.onEdgeModeChange) == null || I.call(s, O);
|
|
7053
7053
|
},
|
|
7054
7054
|
children: [
|
|
7055
7055
|
/* @__PURE__ */ y("option", { value: "auto", children: "Auto" }),
|
|
@@ -7097,53 +7097,53 @@ function Jb({
|
|
|
7097
7097
|
disabled: a || C,
|
|
7098
7098
|
onChange: async (A) => {
|
|
7099
7099
|
var N, $;
|
|
7100
|
-
const
|
|
7101
|
-
if (A.target.value = "", !
|
|
7102
|
-
const
|
|
7100
|
+
const O = (N = A.target.files) == null ? void 0 : N[0];
|
|
7101
|
+
if (A.target.value = "", !O) return;
|
|
7102
|
+
const I = ++x.current;
|
|
7103
7103
|
S(!0), M("");
|
|
7104
7104
|
try {
|
|
7105
|
-
const
|
|
7105
|
+
const P = p ? await Fb(O, [
|
|
7106
7106
|
...new Set(
|
|
7107
7107
|
Object.values(p).map(
|
|
7108
7108
|
(ae) => ae.schemaType ?? ae.type
|
|
7109
7109
|
)
|
|
7110
7110
|
)
|
|
7111
7111
|
]) : void 0;
|
|
7112
|
-
if (p &&
|
|
7112
|
+
if (p && P) {
|
|
7113
7113
|
for (const ae of Object.values(p))
|
|
7114
7114
|
if (!Object.prototype.hasOwnProperty.call(
|
|
7115
|
-
|
|
7115
|
+
P,
|
|
7116
7116
|
ae.schemaType ?? ae.type
|
|
7117
7117
|
))
|
|
7118
7118
|
throw new Error(
|
|
7119
7119
|
`Missing form type: ${ae.schemaType ?? ae.type}`
|
|
7120
7120
|
);
|
|
7121
7121
|
}
|
|
7122
|
-
const { contract: H, schema:
|
|
7123
|
-
schema:
|
|
7122
|
+
const { contract: H, schema: oe } = p && P ? {
|
|
7123
|
+
schema: P,
|
|
7124
7124
|
contract: {
|
|
7125
|
-
name:
|
|
7125
|
+
name: O.name,
|
|
7126
7126
|
nodes: Object.fromEntries(
|
|
7127
7127
|
Object.entries(p).map(
|
|
7128
7128
|
([ae, Q]) => [
|
|
7129
7129
|
ae,
|
|
7130
7130
|
{
|
|
7131
|
-
type:
|
|
7131
|
+
type: P[Q.schemaType ?? Q.type],
|
|
7132
7132
|
optional: !1
|
|
7133
7133
|
}
|
|
7134
7134
|
]
|
|
7135
7135
|
)
|
|
7136
7136
|
)
|
|
7137
7137
|
}
|
|
7138
|
-
} : await G1(
|
|
7139
|
-
if (
|
|
7140
|
-
h == null || h(
|
|
7141
|
-
} catch (
|
|
7142
|
-
|
|
7143
|
-
`${
|
|
7138
|
+
} : await G1(O, u);
|
|
7139
|
+
if (I !== x.current) return;
|
|
7140
|
+
h == null || h(oe), o(H), ($ = s.onWorkflowContractChange) == null || $.call(s, H);
|
|
7141
|
+
} catch (P) {
|
|
7142
|
+
I === x.current && M(
|
|
7143
|
+
`${O.name}: ${P instanceof Error ? P.message : "Unable to load interface."}`
|
|
7144
7144
|
);
|
|
7145
7145
|
} finally {
|
|
7146
|
-
|
|
7146
|
+
I === x.current && S(!1);
|
|
7147
7147
|
}
|
|
7148
7148
|
}
|
|
7149
7149
|
}
|
|
@@ -7240,19 +7240,19 @@ const V1 = [
|
|
|
7240
7240
|
setIsArrayNodeMode: T,
|
|
7241
7241
|
isPinned: R,
|
|
7242
7242
|
setIsPinned: A,
|
|
7243
|
-
callbacks:
|
|
7244
|
-
config:
|
|
7243
|
+
callbacks: O,
|
|
7244
|
+
config: I,
|
|
7245
7245
|
readOnly: N
|
|
7246
|
-
} = rt(), { nodeById: $, edgeById:
|
|
7246
|
+
} = rt(), { nodeById: $, edgeById: P, parentIds: H } = jr(), oe = I.colorMode === "dark", { background: ae, border: Q, colorInactive: me, colorText: ve, colorActive: z } = ut(), B = oe ? Q : "gray.300", W = `var(--chakra-colors-${ae.replace(".", "-")})`, F = `var(--chakra-colors-${(oe ? Q : "gray.300").replace(".", "-")})`, [ce, Z] = re(!1), [se, ue] = re(!0), we = I.bottomBarCollapsed ?? se, Ce = de(null), ye = ww({
|
|
7247
7247
|
edge: "bottom",
|
|
7248
7248
|
enabled: !R,
|
|
7249
|
-
bounds:
|
|
7250
|
-
inside: [
|
|
7249
|
+
bounds: Ce,
|
|
7250
|
+
inside: [Ce]
|
|
7251
7251
|
}), pe = dt(
|
|
7252
7252
|
(Te) => {
|
|
7253
7253
|
const He = r.current;
|
|
7254
7254
|
if (!He) return;
|
|
7255
|
-
const ft =
|
|
7255
|
+
const ft = I.minZoom ?? 0.01, ht = I.maxZoom ?? 1.5, Zt = 0.02;
|
|
7256
7256
|
let Ke = He.zoom();
|
|
7257
7257
|
switch (Te) {
|
|
7258
7258
|
case "increase":
|
|
@@ -7266,22 +7266,22 @@ const V1 = [
|
|
|
7266
7266
|
break;
|
|
7267
7267
|
}
|
|
7268
7268
|
},
|
|
7269
|
-
[r,
|
|
7270
|
-
), J =
|
|
7269
|
+
[r, I.minZoom, I.maxZoom]
|
|
7270
|
+
), J = I.renderSelectedNodeToolbar, L = h.length > 0 && !!J, ie = tt(() => L ? h.map((Te) => {
|
|
7271
7271
|
var ft;
|
|
7272
7272
|
return { ...((ft = $.get(Te)) == null ? void 0 : ft.data) ?? { id: Te }, isParent: H.has(Te) };
|
|
7273
7273
|
}) : [], [L, h, $, H]), U = dt(() => {
|
|
7274
7274
|
var Te;
|
|
7275
|
-
m([]), (Te =
|
|
7276
|
-
}, [m,
|
|
7275
|
+
m([]), (Te = O.onNodeDeselect) == null || Te.call(O);
|
|
7276
|
+
}, [m, O]), fe = I.renderSelectedEdgeToolbar, be = !!g && !!fe, qe = tt(() => {
|
|
7277
7277
|
var Te;
|
|
7278
|
-
return !be || !g ? null : ((Te =
|
|
7279
|
-
}, [be, g,
|
|
7278
|
+
return !be || !g ? null : ((Te = P.get(g)) == null ? void 0 : Te.data) ?? { id: g };
|
|
7279
|
+
}, [be, g, P]), je = dt(() => {
|
|
7280
7280
|
var Te;
|
|
7281
|
-
p(null), (Te =
|
|
7282
|
-
}, [p,
|
|
7281
|
+
p(null), (Te = O.onEdgeDeselect) == null || Te.call(O);
|
|
7282
|
+
}, [p, O]), We = I.selectionToolbar !== !1 && !N, at = We && !!g && !fe, Qe = We && !at && h.length > 0 && !J, Ct = at || Qe, nt = R || ye || ce || Ct || I.bottomBarCollapsed === !1;
|
|
7283
7283
|
Ue(() => {
|
|
7284
|
-
h.length || g ? a(!1) : N || (s && A(!0),
|
|
7284
|
+
h.length || g ? a(!1) : N || (s && A(!0), I.bottomBarCollapsed === void 0 && ue(!s));
|
|
7285
7285
|
}, [
|
|
7286
7286
|
s,
|
|
7287
7287
|
h.length,
|
|
@@ -7289,9 +7289,9 @@ const V1 = [
|
|
|
7289
7289
|
N,
|
|
7290
7290
|
a,
|
|
7291
7291
|
A,
|
|
7292
|
-
|
|
7292
|
+
I.bottomBarCollapsed
|
|
7293
7293
|
]);
|
|
7294
|
-
const st =
|
|
7294
|
+
const st = I.renderBottomBar, bt = o1();
|
|
7295
7295
|
return st ? /* @__PURE__ */ D(Be, { children: [
|
|
7296
7296
|
L && /* @__PURE__ */ y(
|
|
7297
7297
|
Oe,
|
|
@@ -7303,7 +7303,7 @@ const V1 = [
|
|
|
7303
7303
|
zIndex: 101,
|
|
7304
7304
|
children: J({
|
|
7305
7305
|
selectedNodeIds: h,
|
|
7306
|
-
selectedNodeData:
|
|
7306
|
+
selectedNodeData: ie,
|
|
7307
7307
|
onDeselect: U
|
|
7308
7308
|
})
|
|
7309
7309
|
}
|
|
@@ -7348,12 +7348,12 @@ const V1 = [
|
|
|
7348
7348
|
isArrayNodeMode: E,
|
|
7349
7349
|
setIsArrayNodeMode: T,
|
|
7350
7350
|
selectedNodeIds: h,
|
|
7351
|
-
selectedNodeData:
|
|
7351
|
+
selectedNodeData: ie,
|
|
7352
7352
|
selectedEdgeId: g,
|
|
7353
7353
|
selectedEdgeData: qe,
|
|
7354
7354
|
onNodeDeselect: U,
|
|
7355
7355
|
onEdgeDeselect: je,
|
|
7356
|
-
callbacks:
|
|
7356
|
+
callbacks: O
|
|
7357
7357
|
})
|
|
7358
7358
|
}
|
|
7359
7359
|
)
|
|
@@ -7368,7 +7368,7 @@ const V1 = [
|
|
|
7368
7368
|
zIndex: 101,
|
|
7369
7369
|
children: J({
|
|
7370
7370
|
selectedNodeIds: h,
|
|
7371
|
-
selectedNodeData:
|
|
7371
|
+
selectedNodeData: ie,
|
|
7372
7372
|
onDeselect: U
|
|
7373
7373
|
})
|
|
7374
7374
|
}
|
|
@@ -7391,7 +7391,7 @@ const V1 = [
|
|
|
7391
7391
|
/* @__PURE__ */ y(
|
|
7392
7392
|
Oe,
|
|
7393
7393
|
{
|
|
7394
|
-
ref:
|
|
7394
|
+
ref: Ce,
|
|
7395
7395
|
role: "toolbar",
|
|
7396
7396
|
"aria-label": "Diagram controls",
|
|
7397
7397
|
position: "absolute",
|
|
@@ -7441,7 +7441,7 @@ const V1 = [
|
|
|
7441
7441
|
Kb,
|
|
7442
7442
|
{
|
|
7443
7443
|
background: ae,
|
|
7444
|
-
border:
|
|
7444
|
+
border: oe ? Q : "gray.300",
|
|
7445
7445
|
children: /* @__PURE__ */ D(
|
|
7446
7446
|
Cr,
|
|
7447
7447
|
{
|
|
@@ -7471,7 +7471,7 @@ const V1 = [
|
|
|
7471
7471
|
"span",
|
|
7472
7472
|
{
|
|
7473
7473
|
style: {
|
|
7474
|
-
display:
|
|
7474
|
+
display: I.bottomBarNavigation === !1 ? "none" : "contents"
|
|
7475
7475
|
},
|
|
7476
7476
|
children: [
|
|
7477
7477
|
/* @__PURE__ */ y(Ye, { label: R ? "Unpin" : "Pin", children: /* @__PURE__ */ y(
|
|
@@ -7567,10 +7567,10 @@ const V1 = [
|
|
|
7567
7567
|
"span",
|
|
7568
7568
|
{
|
|
7569
7569
|
style: {
|
|
7570
|
-
display:
|
|
7570
|
+
display: I.bottomBarNavigation === !1 ? "none" : "contents"
|
|
7571
7571
|
},
|
|
7572
7572
|
children: [
|
|
7573
|
-
|
|
7573
|
+
I.edgeHandles !== !1 && /* @__PURE__ */ y(
|
|
7574
7574
|
Ye,
|
|
7575
7575
|
{
|
|
7576
7576
|
label: _ ? "Draw Mode On (V)" : "Draw Mode Off (V)",
|
|
@@ -7676,9 +7676,9 @@ const V1 = [
|
|
|
7676
7676
|
]
|
|
7677
7677
|
}
|
|
7678
7678
|
),
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7679
|
+
I.bottomBarNavigation === !1 && (e === void 0 ? /* @__PURE__ */ y(ti, {}) : e ? nn(/* @__PURE__ */ y(ti, {}), e) : null),
|
|
7680
|
+
I.bottomBarExtra && /* @__PURE__ */ D(Be, { children: [
|
|
7681
|
+
I.bottomBarNavigation !== !1 && /* @__PURE__ */ y(
|
|
7682
7682
|
Ge,
|
|
7683
7683
|
{
|
|
7684
7684
|
mx: -1,
|
|
@@ -7689,7 +7689,7 @@ const V1 = [
|
|
|
7689
7689
|
"aria-orientation": "vertical"
|
|
7690
7690
|
}
|
|
7691
7691
|
),
|
|
7692
|
-
|
|
7692
|
+
I.bottomBarExtra
|
|
7693
7693
|
] }),
|
|
7694
7694
|
/* @__PURE__ */ y(
|
|
7695
7695
|
Ge,
|
|
@@ -7708,7 +7708,7 @@ const V1 = [
|
|
|
7708
7708
|
"span",
|
|
7709
7709
|
{
|
|
7710
7710
|
style: {
|
|
7711
|
-
display:
|
|
7711
|
+
display: I.bottomBarNavigation === !1 || we && !f ? "none" : "contents"
|
|
7712
7712
|
},
|
|
7713
7713
|
children: /* @__PURE__ */ y(ti, {})
|
|
7714
7714
|
}
|
|
@@ -7766,7 +7766,7 @@ const V1 = [
|
|
|
7766
7766
|
onClick: () => {
|
|
7767
7767
|
var He;
|
|
7768
7768
|
const Te = !E;
|
|
7769
|
-
T(Te), (He =
|
|
7769
|
+
T(Te), (He = O.onArrayModeChange) == null || He.call(O, Te);
|
|
7770
7770
|
}
|
|
7771
7771
|
}
|
|
7772
7772
|
)
|
|
@@ -7799,7 +7799,7 @@ const V1 = [
|
|
|
7799
7799
|
includeTransparent: !1,
|
|
7800
7800
|
onPick: (Te) => {
|
|
7801
7801
|
var He;
|
|
7802
|
-
n(Te), (He =
|
|
7802
|
+
n(Te), (He = O.onThemeColorChange) == null || He.call(O, Te);
|
|
7803
7803
|
}
|
|
7804
7804
|
}
|
|
7805
7805
|
)
|
|
@@ -7822,7 +7822,7 @@ const V1 = [
|
|
|
7822
7822
|
{
|
|
7823
7823
|
label: "Graph edge color",
|
|
7824
7824
|
colors: Il,
|
|
7825
|
-
value: i || (
|
|
7825
|
+
value: i || (oe ? "gray.500" : Hn),
|
|
7826
7826
|
onPick: o,
|
|
7827
7827
|
onReset: () => o("")
|
|
7828
7828
|
}
|
|
@@ -7870,7 +7870,7 @@ const V1 = [
|
|
|
7870
7870
|
color: me,
|
|
7871
7871
|
onClick: () => {
|
|
7872
7872
|
var Te;
|
|
7873
|
-
|
|
7873
|
+
I.bottomBarCollapsed === void 0 && ue(!we), a(we), (Te = O.onBottomBarCollapsedChange) == null || Te.call(O, !we);
|
|
7874
7874
|
}
|
|
7875
7875
|
}
|
|
7876
7876
|
)
|
|
@@ -7916,7 +7916,7 @@ const V1 = [
|
|
|
7916
7916
|
{
|
|
7917
7917
|
fontSize: "xs",
|
|
7918
7918
|
textTransform: "uppercase !important",
|
|
7919
|
-
color:
|
|
7919
|
+
color: oe ? "whiteAlpha.600" : "blackAlpha.500",
|
|
7920
7920
|
ml: 1,
|
|
7921
7921
|
children: c.toUpperCase()
|
|
7922
7922
|
}
|
|
@@ -7951,11 +7951,11 @@ const V1 = [
|
|
|
7951
7951
|
css: yo,
|
|
7952
7952
|
cursor: "pointer",
|
|
7953
7953
|
_hover: {
|
|
7954
|
-
bg:
|
|
7954
|
+
bg: oe ? "whiteAlpha.100" : "blackAlpha.50"
|
|
7955
7955
|
},
|
|
7956
7956
|
onClick: () => {
|
|
7957
7957
|
var He;
|
|
7958
|
-
(He =
|
|
7958
|
+
(He = O.onDirectionChange) == null || He.call(O, Te.value), Z(!1);
|
|
7959
7959
|
},
|
|
7960
7960
|
children: [
|
|
7961
7961
|
/* @__PURE__ */ y(Ge, { as: Te.icon, boxSize: 5, color: ve }),
|
|
@@ -7984,11 +7984,11 @@ const V1 = [
|
|
|
7984
7984
|
css: yo,
|
|
7985
7985
|
cursor: "pointer",
|
|
7986
7986
|
_hover: {
|
|
7987
|
-
bg:
|
|
7987
|
+
bg: oe ? "whiteAlpha.100" : "blackAlpha.50"
|
|
7988
7988
|
},
|
|
7989
7989
|
onClick: () => {
|
|
7990
7990
|
var Te;
|
|
7991
|
-
(Te =
|
|
7991
|
+
(Te = O.onDirectionChange) == null || Te.call(O, "C"), Z(!1);
|
|
7992
7992
|
},
|
|
7993
7993
|
children: [
|
|
7994
7994
|
/* @__PURE__ */ y(
|
|
@@ -9597,19 +9597,19 @@ function AC({
|
|
|
9597
9597
|
dashed: T,
|
|
9598
9598
|
animated: R,
|
|
9599
9599
|
inverted: A,
|
|
9600
|
-
loopIndex:
|
|
9601
|
-
onSelect:
|
|
9600
|
+
loopIndex: O = 0,
|
|
9601
|
+
onSelect: I
|
|
9602
9602
|
}) {
|
|
9603
9603
|
const N = n == null ? void 0 : n.icon, $ = p ? bo : av, {
|
|
9604
|
-
lines:
|
|
9604
|
+
lines: P,
|
|
9605
9605
|
iconWidth: H,
|
|
9606
|
-
contentWidth:
|
|
9606
|
+
contentWidth: oe,
|
|
9607
9607
|
contentHeight: ae
|
|
9608
9608
|
} = tt(
|
|
9609
9609
|
() => cv(E, N, $),
|
|
9610
9610
|
[E, N, $]
|
|
9611
9611
|
), Q = tt(() => {
|
|
9612
|
-
const
|
|
9612
|
+
const Ce = {
|
|
9613
9613
|
srcDist: ho,
|
|
9614
9614
|
tgtDist: ho,
|
|
9615
9615
|
arrowGap: lv,
|
|
@@ -9617,7 +9617,7 @@ function AC({
|
|
|
9617
9617
|
headShape: p && (A ? f !== void 0 || m : h !== void 0 || g) ? "square" : "triangle",
|
|
9618
9618
|
radius: s ?? (w ? 40 : _C),
|
|
9619
9619
|
arrowAt: A ? "source" : "target",
|
|
9620
|
-
labelTargetLength: w ?
|
|
9620
|
+
labelTargetLength: w ? oe + 2 * Pr : void 0,
|
|
9621
9621
|
labelFraction: w ? x : void 0
|
|
9622
9622
|
}, ye = f !== void 0 || h !== void 0 || !!m || !!g, pe = nf(
|
|
9623
9623
|
c,
|
|
@@ -9629,24 +9629,24 @@ function AC({
|
|
|
9629
9629
|
), J = f === void 0 && h === void 0 && (v === "downward" || v === "upward"), L = m ?? {
|
|
9630
9630
|
...pe.sourcePoint,
|
|
9631
9631
|
side: J ? v === "upward" ? "top" : "bottom" : v === "leftward" ? "left" : "right"
|
|
9632
|
-
},
|
|
9632
|
+
}, ie = g ?? {
|
|
9633
9633
|
...pe.targetPoint,
|
|
9634
9634
|
side: J ? v === "upward" ? "bottom" : "top" : v === "leftward" ? "right" : "left"
|
|
9635
9635
|
}, U = c.x === d.x && c.y === d.y, fe = m || g ? fC(
|
|
9636
9636
|
L,
|
|
9637
|
-
|
|
9638
|
-
{ ...
|
|
9637
|
+
ie,
|
|
9638
|
+
{ ...Ce, srcDist: 18, tgtDist: 18 },
|
|
9639
9639
|
o
|
|
9640
9640
|
) : ye ? tf(c, d, v, f, h, b, {
|
|
9641
|
-
...
|
|
9641
|
+
...Ce,
|
|
9642
9642
|
srcDist: 18,
|
|
9643
9643
|
tgtDist: 18,
|
|
9644
|
-
radius: s ?? Math.min(
|
|
9645
|
-
}) : U ? gC(c,
|
|
9646
|
-
...
|
|
9644
|
+
radius: s ?? Math.min(Ce.radius, 40)
|
|
9645
|
+
}) : U ? gC(c, O, {
|
|
9646
|
+
...Ce,
|
|
9647
9647
|
srcDist: 0,
|
|
9648
9648
|
tgtDist: 0
|
|
9649
|
-
}) : rf(c, d, v, b,
|
|
9649
|
+
}) : rf(c, d, v, b, Ce);
|
|
9650
9650
|
if (!fe) return null;
|
|
9651
9651
|
const be = nf(
|
|
9652
9652
|
c,
|
|
@@ -9683,18 +9683,18 @@ function AC({
|
|
|
9683
9683
|
return U || m || g ? fe : o === "straight" ? ye ? ov(
|
|
9684
9684
|
be.sourcePoint,
|
|
9685
9685
|
be.targetPoint,
|
|
9686
|
-
|
|
9687
|
-
) : nv([c, d], c, d,
|
|
9686
|
+
Ce
|
|
9687
|
+
) : nv([c, d], c, d, Ce) : o === "bezier" ? pC(
|
|
9688
9688
|
be.sourcePoint,
|
|
9689
9689
|
be.targetPoint,
|
|
9690
9690
|
ye ? v === "leftward" ? "leftward" : "rightward" : v,
|
|
9691
|
-
|
|
9691
|
+
Ce
|
|
9692
9692
|
) : o === "orthogonal" ? ye ? tf(c, d, v, f, h, b, {
|
|
9693
|
-
...
|
|
9693
|
+
...Ce,
|
|
9694
9694
|
srcDist: 18,
|
|
9695
9695
|
tgtDist: 18,
|
|
9696
9696
|
radius: 0
|
|
9697
|
-
}) : rf(c, d, v, b, { ...
|
|
9697
|
+
}) : rf(c, d, v, b, { ...Ce, radius: 0 }) : fe;
|
|
9698
9698
|
}, [
|
|
9699
9699
|
c,
|
|
9700
9700
|
e,
|
|
@@ -9711,10 +9711,10 @@ function AC({
|
|
|
9711
9711
|
v,
|
|
9712
9712
|
b,
|
|
9713
9713
|
A,
|
|
9714
|
-
|
|
9714
|
+
O,
|
|
9715
9715
|
w,
|
|
9716
9716
|
x,
|
|
9717
|
-
|
|
9717
|
+
oe
|
|
9718
9718
|
]);
|
|
9719
9719
|
if (!Q) return null;
|
|
9720
9720
|
const me = (v === "rightward" || v === "leftward") && !Object.prototype.hasOwnProperty.call(a ?? {}, o) && !(p && (f !== void 0 || h !== void 0 || m || g)), ve = me ? `translate(${Q.label.x} ${Q.label.y - ae / 2 - 2 * Pr})` : `translate(${Q.label.x} ${Q.label.y}) rotate(${Q.label.angle}) translate(${v === "downward" || v === "upward" || w || Object.prototype.hasOwnProperty.call(a ?? {}, o) ? 0 : sv} 0)`, z = i != null && i.startsWith("Unverified:") ? "#b45309" : "#dc2626", B = i ? z : C, W = i ? /* @__PURE__ */ D(
|
|
@@ -9723,7 +9723,7 @@ function AC({
|
|
|
9723
9723
|
className: "flow-sdk-edge-validation",
|
|
9724
9724
|
role: "img",
|
|
9725
9725
|
"aria-label": i,
|
|
9726
|
-
transform: `translate(${Q.label.x} ${Q.label.y -
|
|
9726
|
+
transform: `translate(${Q.label.x} ${Q.label.y - P.length * $ / 2 - 55})`,
|
|
9727
9727
|
children: [
|
|
9728
9728
|
/* @__PURE__ */ y("title", { children: i }),
|
|
9729
9729
|
/* @__PURE__ */ y(
|
|
@@ -9745,8 +9745,8 @@ function AC({
|
|
|
9745
9745
|
"--flow-edge-reveal-duration": `${r.durationMs ?? 600}ms`,
|
|
9746
9746
|
"--flow-edge-reveal-state": r.paused ? "paused" : "running"
|
|
9747
9747
|
} : void 0;
|
|
9748
|
-
if (
|
|
9749
|
-
const
|
|
9748
|
+
if (P.length || N) {
|
|
9749
|
+
const Ce = oe, ye = ae;
|
|
9750
9750
|
se = /* @__PURE__ */ D(
|
|
9751
9751
|
"g",
|
|
9752
9752
|
{
|
|
@@ -9762,9 +9762,9 @@ function AC({
|
|
|
9762
9762
|
/* @__PURE__ */ y(
|
|
9763
9763
|
"rect",
|
|
9764
9764
|
{
|
|
9765
|
-
x: -
|
|
9765
|
+
x: -Ce / 2 - Pr,
|
|
9766
9766
|
y: -ye / 2 - Pr,
|
|
9767
|
-
width:
|
|
9767
|
+
width: Ce + 2 * Pr,
|
|
9768
9768
|
height: ye + 2 * Pr,
|
|
9769
9769
|
fill: C === "transparent" ? "transparent" : _
|
|
9770
9770
|
}
|
|
@@ -9781,11 +9781,11 @@ function AC({
|
|
|
9781
9781
|
fontFamily: wr,
|
|
9782
9782
|
textAnchor: "middle",
|
|
9783
9783
|
dominantBaseline: "central",
|
|
9784
|
-
children:
|
|
9784
|
+
children: P.map((pe, J) => /* @__PURE__ */ y(
|
|
9785
9785
|
"tspan",
|
|
9786
9786
|
{
|
|
9787
9787
|
x: H / 2,
|
|
9788
|
-
y: (J - (
|
|
9788
|
+
y: (J - (P.length - 1) / 2) * $,
|
|
9789
9789
|
children: pe
|
|
9790
9790
|
},
|
|
9791
9791
|
J
|
|
@@ -9802,7 +9802,7 @@ function AC({
|
|
|
9802
9802
|
/* @__PURE__ */ y(
|
|
9803
9803
|
"rect",
|
|
9804
9804
|
{
|
|
9805
|
-
x: -
|
|
9805
|
+
x: -Ce / 2,
|
|
9806
9806
|
y: -24,
|
|
9807
9807
|
width: 48,
|
|
9808
9808
|
height: 48,
|
|
@@ -9815,7 +9815,7 @@ function AC({
|
|
|
9815
9815
|
name: N,
|
|
9816
9816
|
svg: !0,
|
|
9817
9817
|
size: 48,
|
|
9818
|
-
x: -
|
|
9818
|
+
x: -Ce / 2,
|
|
9819
9819
|
y: -24,
|
|
9820
9820
|
color: C
|
|
9821
9821
|
}
|
|
@@ -9861,8 +9861,8 @@ function AC({
|
|
|
9861
9861
|
"data-validation": i ? i.startsWith("Unverified:") ? "unverified" : "invalid" : void 0,
|
|
9862
9862
|
"aria-label": i,
|
|
9863
9863
|
onPointerDown: kC,
|
|
9864
|
-
onClick: (
|
|
9865
|
-
|
|
9864
|
+
onClick: (Ce) => {
|
|
9865
|
+
Ce.stopPropagation(), I == null || I(e);
|
|
9866
9866
|
},
|
|
9867
9867
|
children: [
|
|
9868
9868
|
r ? /* @__PURE__ */ y(
|
|
@@ -10553,8 +10553,8 @@ function aS() {
|
|
|
10553
10553
|
fh = 1;
|
|
10554
10554
|
var e = Fr(), r = tu(), t = ir(), n = "[object Arguments]", i = "[object Array]", o = "[object Boolean]", s = "[object Date]", a = "[object Error]", c = "[object Function]", d = "[object Map]", l = "[object Number]", u = "[object Object]", f = "[object RegExp]", h = "[object Set]", m = "[object String]", g = "[object WeakMap]", p = "[object ArrayBuffer]", v = "[object DataView]", b = "[object Float32Array]", w = "[object Float64Array]", x = "[object Int8Array]", C = "[object Int16Array]", S = "[object Int32Array]", _ = "[object Uint8Array]", M = "[object Uint8ClampedArray]", E = "[object Uint16Array]", T = "[object Uint32Array]", R = {};
|
|
10555
10555
|
R[b] = R[w] = R[x] = R[C] = R[S] = R[_] = R[M] = R[E] = R[T] = !0, R[n] = R[i] = R[p] = R[o] = R[v] = R[s] = R[a] = R[c] = R[d] = R[l] = R[u] = R[f] = R[h] = R[m] = R[g] = !1;
|
|
10556
|
-
function A(
|
|
10557
|
-
return t(
|
|
10556
|
+
function A(O) {
|
|
10557
|
+
return t(O) && r(O.length) && !!R[e(O)];
|
|
10558
10558
|
}
|
|
10559
10559
|
return ca = A, ca;
|
|
10560
10560
|
}
|
|
@@ -11100,10 +11100,10 @@ var es, ap;
|
|
|
11100
11100
|
function Rv() {
|
|
11101
11101
|
if (ap) return es;
|
|
11102
11102
|
ap = 1;
|
|
11103
|
-
var e = No(), r = eu(), t = qo(), n = cS(), i = uS(), o = yv(), s = mv(), a = fS(), c = hS(), d = Cv(), l = pS(), u = pn(), f = bS(), h = CS(), m = Av(), g = xt(), p = hn(), v = _S(), b = Kt(), w = kS(), x = kr(), C = Dr(), S = 1, _ = 2, M = 4, E = "[object Arguments]", T = "[object Array]", R = "[object Boolean]", A = "[object Date]",
|
|
11104
|
-
pe[E] = pe[T] = pe[z] = pe[B] = pe[R] = pe[A] = pe[W] = pe[F] = pe[ce] = pe[Z] = pe[se] = pe[$] = pe[
|
|
11105
|
-
function J(L,
|
|
11106
|
-
var je, We =
|
|
11103
|
+
var e = No(), r = eu(), t = qo(), n = cS(), i = uS(), o = yv(), s = mv(), a = fS(), c = hS(), d = Cv(), l = pS(), u = pn(), f = bS(), h = CS(), m = Av(), g = xt(), p = hn(), v = _S(), b = Kt(), w = kS(), x = kr(), C = Dr(), S = 1, _ = 2, M = 4, E = "[object Arguments]", T = "[object Array]", R = "[object Boolean]", A = "[object Date]", O = "[object Error]", I = "[object Function]", N = "[object GeneratorFunction]", $ = "[object Map]", P = "[object Number]", H = "[object Object]", oe = "[object RegExp]", ae = "[object Set]", Q = "[object String]", me = "[object Symbol]", ve = "[object WeakMap]", z = "[object ArrayBuffer]", B = "[object DataView]", W = "[object Float32Array]", F = "[object Float64Array]", ce = "[object Int8Array]", Z = "[object Int16Array]", se = "[object Int32Array]", ue = "[object Uint8Array]", we = "[object Uint8ClampedArray]", Ce = "[object Uint16Array]", ye = "[object Uint32Array]", pe = {};
|
|
11104
|
+
pe[E] = pe[T] = pe[z] = pe[B] = pe[R] = pe[A] = pe[W] = pe[F] = pe[ce] = pe[Z] = pe[se] = pe[$] = pe[P] = pe[H] = pe[oe] = pe[ae] = pe[Q] = pe[me] = pe[ue] = pe[we] = pe[Ce] = pe[ye] = !0, pe[O] = pe[I] = pe[ve] = !1;
|
|
11105
|
+
function J(L, ie, U, fe, be, qe) {
|
|
11106
|
+
var je, We = ie & S, at = ie & _, Qe = ie & M;
|
|
11107
11107
|
if (U && (je = be ? U(L, fe, be, qe) : U(L)), je !== void 0)
|
|
11108
11108
|
return je;
|
|
11109
11109
|
if (!b(L))
|
|
@@ -11113,7 +11113,7 @@ function Rv() {
|
|
|
11113
11113
|
if (je = f(L), !We)
|
|
11114
11114
|
return s(L, je);
|
|
11115
11115
|
} else {
|
|
11116
|
-
var nt = u(L), st = nt ==
|
|
11116
|
+
var nt = u(L), st = nt == I || nt == N;
|
|
11117
11117
|
if (p(L))
|
|
11118
11118
|
return o(L, We);
|
|
11119
11119
|
if (nt == H || nt == E || st && !be) {
|
|
@@ -11130,13 +11130,13 @@ function Rv() {
|
|
|
11130
11130
|
if (bt)
|
|
11131
11131
|
return bt;
|
|
11132
11132
|
qe.set(L, je), w(L) ? L.forEach(function(ft) {
|
|
11133
|
-
je.add(J(ft,
|
|
11133
|
+
je.add(J(ft, ie, U, ft, L, qe));
|
|
11134
11134
|
}) : v(L) && L.forEach(function(ft, ht) {
|
|
11135
|
-
je.set(ht, J(ft,
|
|
11135
|
+
je.set(ht, J(ft, ie, U, ht, L, qe));
|
|
11136
11136
|
});
|
|
11137
11137
|
var Te = Qe ? at ? l : d : at ? C : x, He = Ct ? void 0 : Te(L);
|
|
11138
11138
|
return r(He || L, function(ft, ht) {
|
|
11139
|
-
He && (ht = ft, ft = L[ht]), t(je, ht, J(ft,
|
|
11139
|
+
He && (ht = ft, ft = L[ht]), t(je, ht, J(ft, ie, U, ht, L, qe));
|
|
11140
11140
|
}), je;
|
|
11141
11141
|
}
|
|
11142
11142
|
return es = J, es;
|
|
@@ -11406,16 +11406,16 @@ function $S() {
|
|
|
11406
11406
|
case g:
|
|
11407
11407
|
return S == _ + "";
|
|
11408
11408
|
case u:
|
|
11409
|
-
var
|
|
11409
|
+
var O = i;
|
|
11410
11410
|
case m:
|
|
11411
|
-
var
|
|
11412
|
-
if (
|
|
11411
|
+
var I = E & s;
|
|
11412
|
+
if (O || (O = o), S.size != _.size && !I)
|
|
11413
11413
|
return !1;
|
|
11414
11414
|
var N = A.get(S);
|
|
11415
11415
|
if (N)
|
|
11416
11416
|
return N == _;
|
|
11417
11417
|
E |= a, A.set(S, _);
|
|
11418
|
-
var $ = n(
|
|
11418
|
+
var $ = n(O(S), O(_), E, T, R, A);
|
|
11419
11419
|
return A.delete(S), $;
|
|
11420
11420
|
case p:
|
|
11421
11421
|
if (x)
|
|
@@ -11480,10 +11480,10 @@ function LS() {
|
|
|
11480
11480
|
if (R && !E)
|
|
11481
11481
|
return x || (x = new e()), C || a(g) ? r(g, p, v, b, w, x) : t(g, p, _, v, b, w, x);
|
|
11482
11482
|
if (!(v & c)) {
|
|
11483
|
-
var A = E && h.call(g, "__wrapped__"),
|
|
11484
|
-
if (A ||
|
|
11485
|
-
var
|
|
11486
|
-
return x || (x = new e()), w(
|
|
11483
|
+
var A = E && h.call(g, "__wrapped__"), O = T && h.call(p, "__wrapped__");
|
|
11484
|
+
if (A || O) {
|
|
11485
|
+
var I = A ? g.value() : g, N = O ? p.value() : p;
|
|
11486
|
+
return x || (x = new e()), w(I, N, v, b, x);
|
|
11487
11487
|
}
|
|
11488
11488
|
}
|
|
11489
11489
|
return R ? (x || (x = new e()), n(g, p, v, b, w, x)) : !1;
|
|
@@ -13220,8 +13220,8 @@ function Z_() {
|
|
|
13220
13220
|
}
|
|
13221
13221
|
var T = C ? C(_, M, b + "", p, v, S) : void 0, R = T === void 0;
|
|
13222
13222
|
if (R) {
|
|
13223
|
-
var A = s(M),
|
|
13224
|
-
T = M, A ||
|
|
13223
|
+
var A = s(M), O = !A && c(M), I = !A && !O && f(M);
|
|
13224
|
+
T = M, A || O || I ? s(_) ? T = _ : a(_) ? T = n(_) : O ? (R = !1, T = r(M, !0)) : I ? (R = !1, T = t(M, !0)) : T = [] : u(M) || o(M) ? (T = _, o(_) ? T = m(_) : (!l(_) || d(_)) && (T = i(M))) : R = !1;
|
|
13225
13225
|
}
|
|
13226
13226
|
R && (S.set(M, T), x(T, M, w, C, S), S.delete(M)), e(p, b, T);
|
|
13227
13227
|
}
|
|
@@ -13966,12 +13966,12 @@ function SE() {
|
|
|
13966
13966
|
function l(w, x, C) {
|
|
13967
13967
|
var S = w.node(C), _ = S.parent, M = !0, E = x.edge(C, _), T = 0;
|
|
13968
13968
|
return E || (M = !1, E = x.edge(_, C)), T = E.weight, e.forEach(x.nodeEdges(C), function(R) {
|
|
13969
|
-
var A = R.v === C,
|
|
13970
|
-
if (
|
|
13971
|
-
var
|
|
13972
|
-
if (T +=
|
|
13973
|
-
var $ = w.edge(C,
|
|
13974
|
-
T +=
|
|
13969
|
+
var A = R.v === C, O = A ? R.w : R.v;
|
|
13970
|
+
if (O !== _) {
|
|
13971
|
+
var I = A === M, N = x.edge(R).weight;
|
|
13972
|
+
if (T += I ? N : -N, v(w, C, O)) {
|
|
13973
|
+
var $ = w.edge(C, O).cutvalue;
|
|
13974
|
+
T += I ? -$ : $;
|
|
13975
13975
|
}
|
|
13976
13976
|
}
|
|
13977
13977
|
}), T;
|
|
@@ -13995,11 +13995,11 @@ function SE() {
|
|
|
13995
13995
|
x.hasEdge(S, _) || (S = C.w, _ = C.v);
|
|
13996
13996
|
var M = w.node(S), E = w.node(_), T = M, R = !1;
|
|
13997
13997
|
M.lim > E.lim && (T = E, R = !0);
|
|
13998
|
-
var A = e.filter(x.edges(), function(
|
|
13999
|
-
return R === b(w, w.node(
|
|
13998
|
+
var A = e.filter(x.edges(), function(O) {
|
|
13999
|
+
return R === b(w, w.node(O.v), T) && R !== b(w, w.node(O.w), T);
|
|
14000
14000
|
});
|
|
14001
|
-
return e.minBy(A, function(
|
|
14002
|
-
return t(x,
|
|
14001
|
+
return e.minBy(A, function(O) {
|
|
14002
|
+
return t(x, O);
|
|
14003
14003
|
});
|
|
14004
14004
|
}
|
|
14005
14005
|
function g(w, x, C, S) {
|
|
@@ -14566,13 +14566,13 @@ function zE() {
|
|
|
14566
14566
|
function x(C, S) {
|
|
14567
14567
|
var _ = 0, M = 0, E = C.length, T = e.last(S);
|
|
14568
14568
|
return e.forEach(S, function(R, A) {
|
|
14569
|
-
var
|
|
14570
|
-
(
|
|
14569
|
+
var O = o(v, R), I = O ? v.node(O).order : E;
|
|
14570
|
+
(O || R === T) && (e.forEach(S.slice(M, A + 1), function(N) {
|
|
14571
14571
|
e.forEach(v.predecessors(N), function($) {
|
|
14572
|
-
var
|
|
14573
|
-
(H < _ ||
|
|
14572
|
+
var P = v.node($), H = P.order;
|
|
14573
|
+
(H < _ || I < H) && !(P.dummy && v.node(N).dummy) && s(w, $, N);
|
|
14574
14574
|
});
|
|
14575
|
-
}), M = A + 1, _ =
|
|
14575
|
+
}), M = A + 1, _ = I);
|
|
14576
14576
|
}), S;
|
|
14577
14577
|
}
|
|
14578
14578
|
return e.reduce(b, x), w;
|
|
@@ -14582,9 +14582,9 @@ function zE() {
|
|
|
14582
14582
|
function x(S, _, M, E, T) {
|
|
14583
14583
|
var R;
|
|
14584
14584
|
e.forEach(e.range(_, M), function(A) {
|
|
14585
|
-
R = S[A], v.node(R).dummy && e.forEach(v.predecessors(R), function(
|
|
14586
|
-
var
|
|
14587
|
-
|
|
14585
|
+
R = S[A], v.node(R).dummy && e.forEach(v.predecessors(R), function(O) {
|
|
14586
|
+
var I = v.node(O);
|
|
14587
|
+
I.dummy && (I.order < E || I.order > T) && s(w, O, R);
|
|
14588
14588
|
});
|
|
14589
14589
|
});
|
|
14590
14590
|
}
|
|
@@ -14592,8 +14592,8 @@ function zE() {
|
|
|
14592
14592
|
var M = -1, E, T = 0;
|
|
14593
14593
|
return e.forEach(_, function(R, A) {
|
|
14594
14594
|
if (v.node(R).dummy === "border") {
|
|
14595
|
-
var
|
|
14596
|
-
|
|
14595
|
+
var O = v.predecessors(R);
|
|
14596
|
+
O.length && (E = v.node(O[0]).order, x(_, T, A, M, E), T = A, M = E);
|
|
14597
14597
|
}
|
|
14598
14598
|
x(_, T, _.length, E, S.length);
|
|
14599
14599
|
}), _;
|
|
@@ -14635,8 +14635,8 @@ function zE() {
|
|
|
14635
14635
|
R = e.sortBy(R, function($) {
|
|
14636
14636
|
return _[$];
|
|
14637
14637
|
});
|
|
14638
|
-
for (var A = (R.length - 1) / 2,
|
|
14639
|
-
var N = R[
|
|
14638
|
+
for (var A = (R.length - 1) / 2, O = Math.floor(A), I = Math.ceil(A); O <= I; ++O) {
|
|
14639
|
+
var N = R[O];
|
|
14640
14640
|
S[T] === T && E < _[N] && !a(w, T, N) && (S[N] = T, S[T] = C[T] = C[N], E = _[N]);
|
|
14641
14641
|
}
|
|
14642
14642
|
}
|
|
@@ -14645,20 +14645,20 @@ function zE() {
|
|
|
14645
14645
|
}
|
|
14646
14646
|
function d(v, b, w, x, C) {
|
|
14647
14647
|
var S = {}, _ = l(v, b, w, C), M = C ? "borderLeft" : "borderRight";
|
|
14648
|
-
function E(A,
|
|
14649
|
-
for (var
|
|
14650
|
-
$[N] ? A(N) : ($[N] = !0,
|
|
14648
|
+
function E(A, O) {
|
|
14649
|
+
for (var I = _.nodes(), N = I.pop(), $ = {}; N; )
|
|
14650
|
+
$[N] ? A(N) : ($[N] = !0, I.push(N), I = I.concat(O(N))), N = I.pop();
|
|
14651
14651
|
}
|
|
14652
14652
|
function T(A) {
|
|
14653
|
-
S[A] = _.inEdges(A).reduce(function(
|
|
14654
|
-
return Math.max(
|
|
14653
|
+
S[A] = _.inEdges(A).reduce(function(O, I) {
|
|
14654
|
+
return Math.max(O, S[I.v] + _.edge(I));
|
|
14655
14655
|
}, 0);
|
|
14656
14656
|
}
|
|
14657
14657
|
function R(A) {
|
|
14658
|
-
var
|
|
14658
|
+
var O = _.outEdges(A).reduce(function(N, $) {
|
|
14659
14659
|
return Math.min(N, S[$.w] - _.edge($));
|
|
14660
|
-
}, Number.POSITIVE_INFINITY),
|
|
14661
|
-
|
|
14660
|
+
}, Number.POSITIVE_INFINITY), I = v.node(A);
|
|
14661
|
+
O !== Number.POSITIVE_INFINITY && I.borderType !== M && (S[A] = Math.max(S[A], O));
|
|
14662
14662
|
}
|
|
14663
14663
|
return E(T, _.predecessors.bind(_)), E(R, _.successors.bind(_)), e.forEach(x, function(A) {
|
|
14664
14664
|
S[A] = S[w[A]];
|
|
@@ -14671,8 +14671,8 @@ function zE() {
|
|
|
14671
14671
|
e.forEach(M, function(T) {
|
|
14672
14672
|
var R = w[T];
|
|
14673
14673
|
if (C.setNode(R), E) {
|
|
14674
|
-
var A = w[E],
|
|
14675
|
-
C.setEdge(A, R, Math.max(_(v, T, E),
|
|
14674
|
+
var A = w[E], O = C.edge(A, R);
|
|
14675
|
+
C.setEdge(A, R, Math.max(_(v, T, E), O || 0));
|
|
14676
14676
|
}
|
|
14677
14677
|
E = T;
|
|
14678
14678
|
});
|
|
@@ -14810,7 +14810,7 @@ function FE() {
|
|
|
14810
14810
|
B(" makeSpaceForEdgeLabels", function() {
|
|
14811
14811
|
T(z);
|
|
14812
14812
|
}), B(" removeSelfEdges", function() {
|
|
14813
|
-
|
|
14813
|
+
oe(z);
|
|
14814
14814
|
}), B(" acyclic", function() {
|
|
14815
14815
|
r.run(z);
|
|
14816
14816
|
}), B(" nestingGraph.run", function() {
|
|
@@ -14828,7 +14828,7 @@ function FE() {
|
|
|
14828
14828
|
}), B(" assignRankMinMax", function() {
|
|
14829
14829
|
A(z);
|
|
14830
14830
|
}), B(" removeEdgeLabelProxies", function() {
|
|
14831
|
-
|
|
14831
|
+
O(z);
|
|
14832
14832
|
}), B(" normalize.run", function() {
|
|
14833
14833
|
t.run(z);
|
|
14834
14834
|
}), B(" parentDummyChains", function() {
|
|
@@ -14854,11 +14854,11 @@ function FE() {
|
|
|
14854
14854
|
}), B(" undoCoordinateSystem", function() {
|
|
14855
14855
|
d.undo(z);
|
|
14856
14856
|
}), B(" translateGraph", function() {
|
|
14857
|
-
|
|
14857
|
+
I(z);
|
|
14858
14858
|
}), B(" assignNodeIntersects", function() {
|
|
14859
14859
|
N(z);
|
|
14860
14860
|
}), B(" reversePoints", function() {
|
|
14861
|
-
|
|
14861
|
+
P(z);
|
|
14862
14862
|
}), B(" acyclic.undo", function() {
|
|
14863
14863
|
r.undo(z);
|
|
14864
14864
|
});
|
|
@@ -14923,28 +14923,28 @@ function FE() {
|
|
|
14923
14923
|
F.borderTop && (F.minRank = z.node(F.borderTop).rank, F.maxRank = z.node(F.borderBottom).rank, B = e.max(B, F.maxRank));
|
|
14924
14924
|
}), z.graph().maxRank = B;
|
|
14925
14925
|
}
|
|
14926
|
-
function
|
|
14926
|
+
function O(z) {
|
|
14927
14927
|
e.forEach(z.nodes(), function(B) {
|
|
14928
14928
|
var W = z.node(B);
|
|
14929
14929
|
W.dummy === "edge-proxy" && (z.edge(W.e).labelRank = W.rank, z.removeNode(B));
|
|
14930
14930
|
});
|
|
14931
14931
|
}
|
|
14932
|
-
function
|
|
14932
|
+
function I(z) {
|
|
14933
14933
|
var B = Number.POSITIVE_INFINITY, W = 0, F = Number.POSITIVE_INFINITY, ce = 0, Z = z.graph(), se = Z.marginx || 0, ue = Z.marginy || 0;
|
|
14934
|
-
function we(
|
|
14935
|
-
var ye =
|
|
14934
|
+
function we(Ce) {
|
|
14935
|
+
var ye = Ce.x, pe = Ce.y, J = Ce.width, L = Ce.height;
|
|
14936
14936
|
B = Math.min(B, ye - J / 2), W = Math.max(W, ye + J / 2), F = Math.min(F, pe - L / 2), ce = Math.max(ce, pe + L / 2);
|
|
14937
14937
|
}
|
|
14938
|
-
e.forEach(z.nodes(), function(
|
|
14939
|
-
we(z.node(
|
|
14940
|
-
}), e.forEach(z.edges(), function(
|
|
14941
|
-
var ye = z.edge(
|
|
14938
|
+
e.forEach(z.nodes(), function(Ce) {
|
|
14939
|
+
we(z.node(Ce));
|
|
14940
|
+
}), e.forEach(z.edges(), function(Ce) {
|
|
14941
|
+
var ye = z.edge(Ce);
|
|
14942
14942
|
e.has(ye, "x") && we(ye);
|
|
14943
|
-
}), B -= se, F -= ue, e.forEach(z.nodes(), function(
|
|
14944
|
-
var ye = z.node(
|
|
14943
|
+
}), B -= se, F -= ue, e.forEach(z.nodes(), function(Ce) {
|
|
14944
|
+
var ye = z.node(Ce);
|
|
14945
14945
|
ye.x -= B, ye.y -= F;
|
|
14946
|
-
}), e.forEach(z.edges(), function(
|
|
14947
|
-
var ye = z.edge(
|
|
14946
|
+
}), e.forEach(z.edges(), function(Ce) {
|
|
14947
|
+
var ye = z.edge(Ce);
|
|
14948
14948
|
e.forEach(ye.points, function(pe) {
|
|
14949
14949
|
pe.x -= B, pe.y -= F;
|
|
14950
14950
|
}), e.has(ye, "x") && (ye.x -= B), e.has(ye, "y") && (ye.y -= F);
|
|
@@ -14970,7 +14970,7 @@ function FE() {
|
|
|
14970
14970
|
}
|
|
14971
14971
|
});
|
|
14972
14972
|
}
|
|
14973
|
-
function
|
|
14973
|
+
function P(z) {
|
|
14974
14974
|
e.forEach(z.edges(), function(B) {
|
|
14975
14975
|
var W = z.edge(B);
|
|
14976
14976
|
W.reversed && W.points.reverse();
|
|
@@ -14986,7 +14986,7 @@ function FE() {
|
|
|
14986
14986
|
z.node(B).dummy === "border" && z.removeNode(B);
|
|
14987
14987
|
});
|
|
14988
14988
|
}
|
|
14989
|
-
function
|
|
14989
|
+
function oe(z) {
|
|
14990
14990
|
e.forEach(z.edges(), function(B) {
|
|
14991
14991
|
if (B.v === B.w) {
|
|
14992
14992
|
var W = z.node(B.v);
|
|
@@ -15432,14 +15432,14 @@ function Cl(e, r = {}) {
|
|
|
15432
15432
|
y: (R.y1 + R.y2) / 2
|
|
15433
15433
|
})), E = (Math.min(...M.map((R) => R.x)) + Math.max(...M.map((R) => R.x))) / 2, T = (Math.min(...M.map((R) => R.y)) + Math.max(...M.map((R) => R.y))) / 2;
|
|
15434
15434
|
x.forEach(
|
|
15435
|
-
(R, A) => R.forEach((
|
|
15436
|
-
const N = f.get(
|
|
15437
|
-
x: E + (
|
|
15435
|
+
(R, A) => R.forEach((O, I) => {
|
|
15436
|
+
const N = f.get(O), $ = {
|
|
15437
|
+
x: E + (I - (C - 1) / 2) * S - (N.x1 + N.x2) / 2,
|
|
15438
15438
|
y: T + (A - (x.length - 1) / 2) * _ - (N.y1 + N.y2) / 2
|
|
15439
15439
|
};
|
|
15440
|
-
for (const
|
|
15441
|
-
const H = a.get(
|
|
15442
|
-
a.set(
|
|
15440
|
+
for (const P of s.get(O) ?? []) {
|
|
15441
|
+
const H = a.get(P);
|
|
15442
|
+
a.set(P, {
|
|
15443
15443
|
x: H.x + $.x,
|
|
15444
15444
|
y: H.y + $.y
|
|
15445
15445
|
});
|
|
@@ -15481,21 +15481,21 @@ function KE(e, r, t, n) {
|
|
|
15481
15481
|
x2: Math.max(d + 1, c.w - d),
|
|
15482
15482
|
y2: Math.max(l + 1, c.h - l)
|
|
15483
15483
|
}, f = /* @__PURE__ */ new Map(), h = [], m = (p, v, b = "canvas") => {
|
|
15484
|
-
var
|
|
15484
|
+
var I, N;
|
|
15485
15485
|
if (!p.length) return;
|
|
15486
15486
|
const w = v.x2 - v.x1, x = v.y2 - v.y1, C = Math.min(
|
|
15487
15487
|
p.length,
|
|
15488
15488
|
r.columns ?? Math.max(1, Math.round(Math.sqrt(p.length * w / x)))
|
|
15489
|
-
), S = f0(p, r, b, C), _ = S.length, M = Math.min(t.y, x / (2 * _)), E = (N = (
|
|
15489
|
+
), S = f0(p, r, b, C), _ = S.length, M = Math.min(t.y, x / (2 * _)), E = (N = (I = r.adjustment) == null ? void 0 : I.sections) == null ? void 0 : N[b], T = Array.from(
|
|
15490
15490
|
{ length: _ },
|
|
15491
|
-
($,
|
|
15491
|
+
($, P) => {
|
|
15492
15492
|
var H;
|
|
15493
|
-
return ((H = E == null ? void 0 : E.rows) == null ? void 0 : H[
|
|
15493
|
+
return ((H = E == null ? void 0 : E.rows) == null ? void 0 : H[P]) ?? 1;
|
|
15494
15494
|
}
|
|
15495
|
-
), R = T.reduce(($,
|
|
15496
|
-
let
|
|
15495
|
+
), R = T.reduce(($, P) => $ + P, 0), A = x - (_ - 1) * M;
|
|
15496
|
+
let O = v.y1;
|
|
15497
15497
|
for (let $ = 0; $ < _; $++) {
|
|
15498
|
-
const
|
|
15498
|
+
const P = A * T[$] / R, H = S[$].length, oe = Math.min(t.x, w / (2 * H)), ae = Array.from(
|
|
15499
15499
|
{ length: H },
|
|
15500
15500
|
(z, B) => {
|
|
15501
15501
|
var W, F;
|
|
@@ -15504,33 +15504,33 @@ function KE(e, r, t, n) {
|
|
|
15504
15504
|
), Q = ae.reduce(
|
|
15505
15505
|
(z, B) => z + B,
|
|
15506
15506
|
0
|
|
15507
|
-
), me = w - (H - 1) *
|
|
15507
|
+
), me = w - (H - 1) * oe;
|
|
15508
15508
|
let ve = v.x1;
|
|
15509
15509
|
for (let z = 0; z < H; z++) {
|
|
15510
15510
|
const B = S[$][z], W = me * ae[z] / Q, F = o.get(B);
|
|
15511
15511
|
if (F) {
|
|
15512
15512
|
a.set(B, {
|
|
15513
15513
|
x: ve + W / 2,
|
|
15514
|
-
y:
|
|
15515
|
-
}), f.set(B, { w: W, h:
|
|
15514
|
+
y: O + P / 2
|
|
15515
|
+
}), f.set(B, { w: W, h: P });
|
|
15516
15516
|
const ce = Math.min(
|
|
15517
15517
|
e.padding(B),
|
|
15518
|
-
Math.max(0, (Math.min(W,
|
|
15518
|
+
Math.max(0, (Math.min(W, P) - 1) / 2)
|
|
15519
15519
|
);
|
|
15520
15520
|
m(
|
|
15521
15521
|
F,
|
|
15522
15522
|
{
|
|
15523
15523
|
x1: ve + ce,
|
|
15524
|
-
y1:
|
|
15524
|
+
y1: O + ce,
|
|
15525
15525
|
x2: ve + W - ce,
|
|
15526
|
-
y2:
|
|
15526
|
+
y2: O + P - ce
|
|
15527
15527
|
},
|
|
15528
15528
|
B
|
|
15529
15529
|
);
|
|
15530
15530
|
} else a.has(B) && (a.set(B, {
|
|
15531
15531
|
x: ve + W / 2,
|
|
15532
|
-
y:
|
|
15533
|
-
}), f.set(B, { w: W, h:
|
|
15532
|
+
y: O + P / 2
|
|
15533
|
+
}), f.set(B, { w: W, h: P }));
|
|
15534
15534
|
z < H - 1 && h.push({
|
|
15535
15535
|
section: b,
|
|
15536
15536
|
axis: "x",
|
|
@@ -15539,10 +15539,10 @@ function KE(e, r, t, n) {
|
|
|
15539
15539
|
weights: ae,
|
|
15540
15540
|
length: me,
|
|
15541
15541
|
position: {
|
|
15542
|
-
x: ve + W +
|
|
15543
|
-
y:
|
|
15542
|
+
x: ve + W + oe / 2,
|
|
15543
|
+
y: O + P / 2
|
|
15544
15544
|
}
|
|
15545
|
-
}), ve += W +
|
|
15545
|
+
}), ve += W + oe;
|
|
15546
15546
|
}
|
|
15547
15547
|
$ < _ - 1 && h.push({
|
|
15548
15548
|
section: b,
|
|
@@ -15551,8 +15551,8 @@ function KE(e, r, t, n) {
|
|
|
15551
15551
|
index: $,
|
|
15552
15552
|
weights: T,
|
|
15553
15553
|
length: A,
|
|
15554
|
-
position: { x: v.x1 + w / 2, y:
|
|
15555
|
-
}),
|
|
15554
|
+
position: { x: v.x1 + w / 2, y: O + P + M / 2 }
|
|
15555
|
+
}), O += P + M;
|
|
15556
15556
|
}
|
|
15557
15557
|
};
|
|
15558
15558
|
m(s, u);
|
|
@@ -15771,20 +15771,20 @@ function XE(e) {
|
|
|
15771
15771
|
{ length: w + 1 },
|
|
15772
15772
|
(_, M) => h.getPointAtLength(p * M / w)
|
|
15773
15773
|
), S = Array.from({ length: w + 1 }, (_, M) => {
|
|
15774
|
-
const E = p * M / w, T = x[M], R = l ? { x: T.x, y: T.y - g.height / 2 - 15 } : T, A = h.getPointAtLength(Math.max(0, E - 2)),
|
|
15775
|
-
let
|
|
15776
|
-
|
|
15777
|
-
const N = Math.abs(
|
|
15778
|
-
l && (
|
|
15779
|
-
const $ =
|
|
15774
|
+
const E = p * M / w, T = x[M], R = l ? { x: T.x, y: T.y - g.height / 2 - 15 } : T, A = h.getPointAtLength(Math.max(0, E - 2)), O = h.getPointAtLength(Math.min(p, E + 2));
|
|
15775
|
+
let I = Math.atan2(O.y - A.y, O.x - A.x) * 180 / Math.PI;
|
|
15776
|
+
I > 90 && (I -= 180), I < -90 && (I += 180);
|
|
15777
|
+
const N = Math.abs(I) < 1;
|
|
15778
|
+
l && (I = 0);
|
|
15779
|
+
const $ = I * Math.PI / 180, P = Math.abs(Math.cos($)) * g.width + Math.abs(Math.sin($)) * g.height, H = Math.abs(Math.sin($)) * g.width + Math.abs(Math.cos($)) * g.height;
|
|
15780
15780
|
return {
|
|
15781
15781
|
point: R,
|
|
15782
|
-
angle:
|
|
15782
|
+
angle: I,
|
|
15783
15783
|
straight: N,
|
|
15784
15784
|
score: Math.hypot(R.x - v, R.y - b),
|
|
15785
15785
|
bounds: {
|
|
15786
|
-
left: R.x -
|
|
15787
|
-
right: R.x +
|
|
15786
|
+
left: R.x - P / 2 - 8,
|
|
15787
|
+
right: R.x + P / 2 + 8,
|
|
15788
15788
|
top: R.y - H / 2 - 8,
|
|
15789
15789
|
bottom: R.y + H / 2 + 8
|
|
15790
15790
|
}
|
|
@@ -15880,23 +15880,23 @@ function QE({
|
|
|
15880
15880
|
children: A
|
|
15881
15881
|
}) {
|
|
15882
15882
|
var F, ce;
|
|
15883
|
-
const
|
|
15883
|
+
const O = de(null), [I, N] = re([]), $ = m ?? I, [P, H] = re(), oe = ur(), ae = de(), Q = !!d, me = !!(d != null && d.floating);
|
|
15884
15884
|
Ot(() => {
|
|
15885
|
-
var
|
|
15886
|
-
const Z =
|
|
15885
|
+
var Ce;
|
|
15886
|
+
const Z = O.current;
|
|
15887
15887
|
if (!Z || !Q) return;
|
|
15888
15888
|
const se = Z.cloneNode(!0);
|
|
15889
15889
|
se.removeAttribute("data-node-id"), se.removeAttribute("data-grid-dragging"), se.removeAttribute("data-grid-draggable"), se.removeAttribute("data-grid-drop-target"), se.setAttribute("data-grid-preview", e), se.setAttribute("aria-hidden", "true"), se.setAttribute("inert", "");
|
|
15890
15890
|
const ue = [se, ...se.querySelectorAll("*")], we = new Map(
|
|
15891
|
-
ue.filter((ye) => ye.id).map((ye) => [ye.id, `${ye.id}-${
|
|
15891
|
+
ue.filter((ye) => ye.id).map((ye) => [ye.id, `${ye.id}-${oe}`])
|
|
15892
15892
|
);
|
|
15893
15893
|
for (const ye of ue) {
|
|
15894
15894
|
ye.id && (ye.id = we.get(ye.id));
|
|
15895
15895
|
for (const pe of [...ye.attributes]) {
|
|
15896
15896
|
if (pe.name === "id") continue;
|
|
15897
15897
|
let J = pe.value;
|
|
15898
|
-
for (const [L,
|
|
15899
|
-
J === `#${L}` && (J = `#${
|
|
15898
|
+
for (const [L, ie] of we)
|
|
15899
|
+
J === `#${L}` && (J = `#${ie}`), J = J.split(`url(#${L})`).join(`url(#${ie})`);
|
|
15900
15900
|
J !== pe.value && ye.setAttribute(pe.name, J);
|
|
15901
15901
|
}
|
|
15902
15902
|
}
|
|
@@ -15921,22 +15921,22 @@ function QE({
|
|
|
15921
15921
|
}
|
|
15922
15922
|
return se.querySelectorAll(
|
|
15923
15923
|
".flow-sdk-node-animation, .flow-sdk-handle, .flow-sdk-property-port, [data-flow-collapse-control]"
|
|
15924
|
-
).forEach((ye) => ye.remove()), (
|
|
15924
|
+
).forEach((ye) => ye.remove()), (Ce = me ? document.body : Z.parentElement) == null || Ce.appendChild(
|
|
15925
15925
|
se
|
|
15926
15926
|
), ae.current = se, () => {
|
|
15927
15927
|
se.remove(), ae.current = void 0;
|
|
15928
15928
|
};
|
|
15929
|
-
}, [e,
|
|
15929
|
+
}, [e, oe, Q, me]), Ot(() => {
|
|
15930
15930
|
const Z = ae.current;
|
|
15931
15931
|
if (!Z || !d) return;
|
|
15932
15932
|
const { x: se, y: ue, size: we } = d;
|
|
15933
|
-
if (me &&
|
|
15934
|
-
const pe =
|
|
15935
|
-
Z.style.transform = `translate3d(${U}px, ${fe}px, 0) scale(${L}, ${
|
|
15933
|
+
if (me && O.current) {
|
|
15934
|
+
const pe = O.current, J = pe.getBoundingClientRect(), L = J.width / pe.offsetWidth || 1, ie = J.height / pe.offsetHeight || 1, U = J.left + (se - r) * L, fe = J.top + (ue - t) * ie;
|
|
15935
|
+
Z.style.transform = `translate3d(${U}px, ${fe}px, 0) scale(${L}, ${ie})`, Z.style.width = `${pe.offsetWidth}px`, Z.style.height = `${pe.offsetHeight}px`;
|
|
15936
15936
|
return;
|
|
15937
15937
|
}
|
|
15938
|
-
const
|
|
15939
|
-
Z.style.transform = we ? `translate3d(${
|
|
15938
|
+
const Ce = we ? Math.round(se - we.w / 2) : se, ye = we ? Math.round(ue - we.h / 2) : ue;
|
|
15939
|
+
Z.style.transform = we ? `translate3d(${Ce}px, ${ye}px, 0)` : `translate(-50%, -50%) translate3d(${Ce}px, ${ye}px, 0)`, Z.style.width = we ? `${Math.round(se + we.w / 2) - Ce}px` : "", Z.style.height = we ? `${Math.round(ue + we.h / 2) - ye}px` : "", we && (Z.style.setProperty("--flow-grid-width", `${we.w}px`), Z.style.setProperty("--flow-grid-height", `${we.h}px`), Z.style.setProperty(
|
|
15940
15940
|
"--flow-grid-font",
|
|
15941
15941
|
`${Math.max(12, Math.min(48, we.w / 8, we.h / 5))}px`
|
|
15942
15942
|
));
|
|
@@ -15949,35 +15949,35 @@ function QE({
|
|
|
15949
15949
|
r,
|
|
15950
15950
|
t
|
|
15951
15951
|
]), Ot(() => {
|
|
15952
|
-
const Z =
|
|
15952
|
+
const Z = O.current;
|
|
15953
15953
|
if (!Z) return;
|
|
15954
15954
|
const se = () => {
|
|
15955
|
-
const
|
|
15955
|
+
const Ce = iv(Z);
|
|
15956
15956
|
H(
|
|
15957
|
-
(ye) => JSON.stringify(ye) === JSON.stringify(
|
|
15958
|
-
), R == null || R(e,
|
|
15957
|
+
(ye) => JSON.stringify(ye) === JSON.stringify(Ce) ? ye : Ce
|
|
15958
|
+
), R == null || R(e, Ce);
|
|
15959
15959
|
};
|
|
15960
15960
|
se();
|
|
15961
15961
|
const ue = new ResizeObserver(se);
|
|
15962
15962
|
ue.observe(Z);
|
|
15963
15963
|
const we = Z.querySelector("[data-flow-node-surface]");
|
|
15964
15964
|
return we && ue.observe(we), () => ue.disconnect();
|
|
15965
|
-
}, [e, A, R]), Ot(() => (l(e,
|
|
15965
|
+
}, [e, A, R]), Ot(() => (l(e, O.current), () => {
|
|
15966
15966
|
l(e, null), R == null || R(e, void 0);
|
|
15967
15967
|
}), [e, l, R]), Ot(() => {
|
|
15968
|
-
const Z =
|
|
15968
|
+
const Z = O.current;
|
|
15969
15969
|
if (!Z) return;
|
|
15970
15970
|
let se = "";
|
|
15971
15971
|
const ue = () => {
|
|
15972
|
-
const pe = YE(Z), J = _ ? pe : pe.filter((
|
|
15972
|
+
const pe = YE(Z), J = _ ? pe : pe.filter((ie) => ie.anchor), L = JSON.stringify(J);
|
|
15973
15973
|
L !== se && (se = L, N(J), T == null || T(e, J));
|
|
15974
15974
|
};
|
|
15975
15975
|
if (ue(), !_ && !Z.querySelector("[data-flow-port-side]")) return;
|
|
15976
|
-
const we = new ResizeObserver(ue),
|
|
15976
|
+
const we = new ResizeObserver(ue), Ce = () => {
|
|
15977
15977
|
we.disconnect(), we.observe(Z), Z.querySelectorAll("[data-flow-property]").forEach((pe) => we.observe(pe)), ue();
|
|
15978
15978
|
};
|
|
15979
|
-
|
|
15980
|
-
const ye = new MutationObserver(
|
|
15979
|
+
Ce();
|
|
15980
|
+
const ye = new MutationObserver(Ce);
|
|
15981
15981
|
return ye.observe(Z, {
|
|
15982
15982
|
childList: !0,
|
|
15983
15983
|
subtree: !0,
|
|
@@ -15998,7 +15998,7 @@ function QE({
|
|
|
15998
15998
|
return /* @__PURE__ */ D(
|
|
15999
15999
|
"div",
|
|
16000
16000
|
{
|
|
16001
|
-
ref:
|
|
16001
|
+
ref: O,
|
|
16002
16002
|
className: "flow-sdk-node",
|
|
16003
16003
|
"data-node-id": e,
|
|
16004
16004
|
"data-grid-draggable": o || void 0,
|
|
@@ -16033,12 +16033,12 @@ function QE({
|
|
|
16033
16033
|
mo,
|
|
16034
16034
|
{
|
|
16035
16035
|
variant: x,
|
|
16036
|
-
x: ((
|
|
16037
|
-
y: ((
|
|
16038
|
-
width: ((
|
|
16039
|
-
height: ((
|
|
16040
|
-
radius: ((
|
|
16041
|
-
path:
|
|
16036
|
+
x: ((P == null ? void 0 : P.left) ?? 0) + w / 2,
|
|
16037
|
+
y: ((P == null ? void 0 : P.top) ?? 0) + w / 2,
|
|
16038
|
+
width: ((P == null ? void 0 : P.width) ?? C) - w,
|
|
16039
|
+
height: ((P == null ? void 0 : P.height) ?? S) - w,
|
|
16040
|
+
radius: ((P == null ? void 0 : P.radius) ?? 0) - w / 2,
|
|
16041
|
+
path: P != null && P.outline ? `M${P.outline.map((Z) => `${Z.x} ${Z.y}`).join(" L")} Z` : void 0,
|
|
16042
16042
|
color: b || p || "currentColor",
|
|
16043
16043
|
strokeWidth: w
|
|
16044
16044
|
}
|
|
@@ -16082,8 +16082,8 @@ function QE({
|
|
|
16082
16082
|
title: "Draw edge",
|
|
16083
16083
|
style: {
|
|
16084
16084
|
color: p,
|
|
16085
|
-
left: ((
|
|
16086
|
-
top: ((
|
|
16085
|
+
left: ((P == null ? void 0 : P.left) ?? 0) + (E === "RL" ? -36 : E === "LR" ? (P == null ? void 0 : P.width) ?? C : ((P == null ? void 0 : P.width) ?? C) / 2),
|
|
16086
|
+
top: ((P == null ? void 0 : P.top) ?? 0) + (E === "BT" ? -36 : E === "TB" ? (P == null ? void 0 : P.height) ?? S : ((P == null ? void 0 : P.height) ?? S) / 2),
|
|
16087
16087
|
transform: E === "BT" || E === "TB" ? "translateX(-50%)" : "translateY(-50%)"
|
|
16088
16088
|
},
|
|
16089
16089
|
onClick: (Z) => Z.stopPropagation(),
|
|
@@ -16348,17 +16348,17 @@ function sk(e) {
|
|
|
16348
16348
|
R.current = T;
|
|
16349
16349
|
const A = de(e);
|
|
16350
16350
|
A.current = e;
|
|
16351
|
-
const
|
|
16351
|
+
const O = de(null), I = de(null), N = de(null), $ = de(null), P = tt(
|
|
16352
16352
|
() => new rk(h, u, f),
|
|
16353
16353
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16354
16354
|
[]
|
|
16355
16355
|
);
|
|
16356
16356
|
Ue(() => {
|
|
16357
|
-
|
|
16358
|
-
}, [
|
|
16359
|
-
|
|
16360
|
-
}, [
|
|
16361
|
-
const H = de(/* @__PURE__ */ new Map()),
|
|
16357
|
+
P.minZoom = u, P.maxZoom = f;
|
|
16358
|
+
}, [P, u, f]), Ot(() => {
|
|
16359
|
+
P.setAnimationsDisabled(x);
|
|
16360
|
+
}, [P, x]);
|
|
16361
|
+
const H = de(/* @__PURE__ */ new Map()), oe = de(/* @__PURE__ */ new Map()), ae = de(/* @__PURE__ */ new Map()), Q = de(null), [me, ve] = re(
|
|
16362
16362
|
/* @__PURE__ */ new Map()
|
|
16363
16363
|
), z = dt(
|
|
16364
16364
|
(k, q) => {
|
|
@@ -16383,9 +16383,9 @@ function sk(e) {
|
|
|
16383
16383
|
() => /* @__PURE__ */ new Map()
|
|
16384
16384
|
), ue = de(Z);
|
|
16385
16385
|
ue.current = Z;
|
|
16386
|
-
const [we,
|
|
16387
|
-
ye.current = /* @__PURE__ */ new Map(),
|
|
16388
|
-
}, J = de(/* @__PURE__ */ new Map()), L = de(null),
|
|
16386
|
+
const [we, Ce] = re(/* @__PURE__ */ new Map()), ye = de(we), pe = () => {
|
|
16387
|
+
ye.current = /* @__PURE__ */ new Map(), Ce(ye.current);
|
|
16388
|
+
}, J = de(/* @__PURE__ */ new Map()), L = de(null), ie = de(!1), [U, fe] = re(0), be = de(), qe = de(), je = de(null), We = de(!1), at = de(null), Qe = de(null), Ct = de(d), nt = s, st = de(nt), [bt, Te] = re(!0), [He, ft] = re(
|
|
16389
16389
|
!!((_u = e.initialNodeGrid) != null && _u.enabled)
|
|
16390
16390
|
), [ht, Zt] = re([]), Ke = de(
|
|
16391
16391
|
(Eu = e.initialNodeGrid) != null && Eu.enabled ? {
|
|
@@ -16406,37 +16406,37 @@ function sk(e) {
|
|
|
16406
16406
|
var k;
|
|
16407
16407
|
(k = je.current) == null || k.call(je), je.current = null;
|
|
16408
16408
|
}, Vr = () => {
|
|
16409
|
-
Qe.current = null, It.current.length && (tr.current = !0), !
|
|
16410
|
-
|
|
16409
|
+
Qe.current = null, It.current.length && (tr.current = !0), !ie.current && A.current.fitOnInit !== !1 && (We.current = !0), clearTimeout(qe.current), qe.current = setTimeout(() => {
|
|
16410
|
+
ie.current = ue.current.size > 0, fe((k) => k + 1);
|
|
16411
16411
|
}, ik);
|
|
16412
16412
|
}, Ur = (k, q, j, K = Vr, le) => {
|
|
16413
16413
|
ar();
|
|
16414
16414
|
const Me = new Map(ue.current), xe = new Map([...H.current, ...ye.current]);
|
|
16415
16415
|
je.current = tv(
|
|
16416
16416
|
q,
|
|
16417
|
-
(
|
|
16417
|
+
(ke) => {
|
|
16418
16418
|
const Ie = /* @__PURE__ */ new Map();
|
|
16419
|
-
if (k.forEach((
|
|
16419
|
+
if (k.forEach((Ae, Ne) => {
|
|
16420
16420
|
const Xe = Me.get(Ne);
|
|
16421
16421
|
Ie.set(
|
|
16422
16422
|
Ne,
|
|
16423
16423
|
Xe ? {
|
|
16424
|
-
x: Xe.x + (
|
|
16425
|
-
y: Xe.y + (
|
|
16426
|
-
} :
|
|
16424
|
+
x: Xe.x + (Ae.x - Xe.x) * ke,
|
|
16425
|
+
y: Xe.y + (Ae.y - Xe.y) * ke
|
|
16426
|
+
} : Ae
|
|
16427
16427
|
);
|
|
16428
16428
|
}), ue.current = Ie, se(Ie), le) {
|
|
16429
|
-
const
|
|
16429
|
+
const Ae = /* @__PURE__ */ new Map();
|
|
16430
16430
|
for (const [Ne, Xe] of le) {
|
|
16431
16431
|
const Y = xe.get(Ne) ?? Xe;
|
|
16432
|
-
|
|
16433
|
-
w: Y.w + (Xe.w - Y.w) *
|
|
16434
|
-
h: Y.h + (Xe.h - Y.h) *
|
|
16432
|
+
Ae.set(Ne, {
|
|
16433
|
+
w: Y.w + (Xe.w - Y.w) * ke,
|
|
16434
|
+
h: Y.h + (Xe.h - Y.h) * ke
|
|
16435
16435
|
});
|
|
16436
16436
|
}
|
|
16437
|
-
ye.current =
|
|
16437
|
+
ye.current = Ae, Ce(Ae);
|
|
16438
16438
|
}
|
|
16439
|
-
j == null || j(
|
|
16439
|
+
j == null || j(ke);
|
|
16440
16440
|
},
|
|
16441
16441
|
K
|
|
16442
16442
|
);
|
|
@@ -16447,19 +16447,19 @@ function sk(e) {
|
|
|
16447
16447
|
}
|
|
16448
16448
|
ye.current.size && pe();
|
|
16449
16449
|
const k = A.current, q = pr.current, j = R.current, K = j.nodes.map((Ie) => {
|
|
16450
|
-
const
|
|
16451
|
-
|
|
16452
|
-
w:
|
|
16453
|
-
h:
|
|
16450
|
+
const Ae = oe.current.get(Ie.id);
|
|
16451
|
+
Ae && (Ae.offsetWidth || Ae.offsetHeight) && H.current.set(Ie.id, {
|
|
16452
|
+
w: Ae.offsetWidth,
|
|
16453
|
+
h: Ae.offsetHeight
|
|
16454
16454
|
});
|
|
16455
16455
|
const Ne = H.current.get(Ie.id) || uo;
|
|
16456
16456
|
return { id: Ie.id, parent: Ie.parent, width: Ne.w, height: Ne.h };
|
|
16457
16457
|
});
|
|
16458
16458
|
let le;
|
|
16459
16459
|
try {
|
|
16460
|
-
const Ie = k.compactPropertyLayout,
|
|
16460
|
+
const Ie = k.compactPropertyLayout, Ae = k.edgeMode !== "nodes" && k.edgeMode !== "workflow", Ne = j.edges.map((Xe) => ({
|
|
16461
16461
|
...Xe,
|
|
16462
|
-
connectorClearance: Ie ?
|
|
16462
|
+
connectorClearance: Ie ? Ae && (Xe.sourceProperty !== void 0 || Xe.targetProperty !== void 0) ? CC : xC : 0
|
|
16463
16463
|
}));
|
|
16464
16464
|
le = VE(K, Ne, {
|
|
16465
16465
|
edgeLabelFontSize: k.edgeMode === "nodes" || k.edgeMode === "workflow" ? av : bo,
|
|
@@ -16485,15 +16485,15 @@ function sk(e) {
|
|
|
16485
16485
|
y: Me.position.y - xe.y
|
|
16486
16486
|
};
|
|
16487
16487
|
le = new Map(
|
|
16488
|
-
[...le].map(([
|
|
16489
|
-
|
|
16488
|
+
[...le].map(([Ae, Ne]) => [
|
|
16489
|
+
Ae,
|
|
16490
16490
|
{ x: Ne.x + Ie.x, y: Ne.y + Ie.y }
|
|
16491
16491
|
])
|
|
16492
16492
|
);
|
|
16493
16493
|
}
|
|
16494
|
-
for (const [Ie,
|
|
16495
|
-
le.has(Ie) ? le.set(Ie,
|
|
16496
|
-
const
|
|
16494
|
+
for (const [Ie, Ae] of J.current)
|
|
16495
|
+
le.has(Ie) ? le.set(Ie, Ae) : k.nodes.some((Ne) => Ne.id === Ie) || J.current.delete(Ie);
|
|
16496
|
+
const ke = P.coordinate(
|
|
16497
16497
|
() => {
|
|
16498
16498
|
var Ie;
|
|
16499
16499
|
return (Ie = Qe.current) == null ? void 0 : Ie.call(Qe, le);
|
|
@@ -16501,8 +16501,8 @@ function sk(e) {
|
|
|
16501
16501
|
);
|
|
16502
16502
|
Ur(
|
|
16503
16503
|
le,
|
|
16504
|
-
|
|
16505
|
-
|
|
16504
|
+
ie.current && !k.isPerformanceMode && !k.disableAnimations,
|
|
16505
|
+
ke
|
|
16506
16506
|
);
|
|
16507
16507
|
}, ee = dt(() => {
|
|
16508
16508
|
clearTimeout(qe.current), clearTimeout(be.current), be.current = setTimeout(
|
|
@@ -16519,7 +16519,7 @@ function sk(e) {
|
|
|
16519
16519
|
var j;
|
|
16520
16520
|
return ((j = k.get(q.id)) == null ? void 0 : j.collapsed) === !0 && !q.collapsed;
|
|
16521
16521
|
}
|
|
16522
|
-
) && (It.current = r.filter((q) => !k.has(q.id)).map((q) => q.id)), Wr.current = r, Ct.current !== d && ue.current.size > 0 && (
|
|
16522
|
+
) && (It.current = r.filter((q) => !k.has(q.id)).map((q) => q.id)), Wr.current = r, Ct.current !== d && ue.current.size > 0 && (ie.current = !0, We.current = !1, clearTimeout(qe.current)), Ct.current = d, st.current !== nt && (We.current = !at.current), st.current = nt, Qe.current && !at.current ? (clearTimeout(be.current), Fe()) : ee();
|
|
16523
16523
|
}, [
|
|
16524
16524
|
r,
|
|
16525
16525
|
t,
|
|
@@ -16547,23 +16547,23 @@ function sk(e) {
|
|
|
16547
16547
|
if (!Q.current && typeof ResizeObserver < "u" && (Q.current = new ResizeObserver((le) => {
|
|
16548
16548
|
let Me = !1;
|
|
16549
16549
|
for (const xe of le) {
|
|
16550
|
-
const
|
|
16551
|
-
if (!
|
|
16552
|
-
const Ie = xe.target,
|
|
16553
|
-
if (!
|
|
16554
|
-
const Xe = H.current.get(
|
|
16555
|
-
if (Xe && Xe.w ===
|
|
16556
|
-
const Y = ue.current.get(
|
|
16557
|
-
Xe && Y &&
|
|
16550
|
+
const ke = ae.current.get(xe.target);
|
|
16551
|
+
if (!ke || ye.current.has(ke)) continue;
|
|
16552
|
+
const Ie = xe.target, Ae = Ie.offsetWidth, Ne = Ie.offsetHeight;
|
|
16553
|
+
if (!Ae && !Ne) continue;
|
|
16554
|
+
const Xe = H.current.get(ke);
|
|
16555
|
+
if (Xe && Xe.w === Ae && Xe.h === Ne) continue;
|
|
16556
|
+
const Y = ue.current.get(ke);
|
|
16557
|
+
Xe && Y && ie.current && !L.current && (L.current = { id: ke, position: { ...Y } }), H.current.set(ke, { w: Ae, h: Ne }), Me = !0;
|
|
16558
16558
|
}
|
|
16559
16559
|
Me && (Qe.current && !at.current ? Fe() : ee());
|
|
16560
16560
|
})), q) {
|
|
16561
|
-
|
|
16561
|
+
oe.current.set(k, q), ae.current.set(q, k), (j = Q.current) == null || j.observe(q);
|
|
16562
16562
|
const le = q.offsetWidth, Me = q.offsetHeight;
|
|
16563
16563
|
!ye.current.has(k) && (le || Me) && H.current.set(k, { w: le, h: Me });
|
|
16564
16564
|
} else {
|
|
16565
|
-
const le =
|
|
16566
|
-
le && ((K = Q.current) == null || K.unobserve(le), ae.current.delete(le)),
|
|
16565
|
+
const le = oe.current.get(k);
|
|
16566
|
+
le && ((K = Q.current) == null || K.unobserve(le), ae.current.delete(le)), oe.current.delete(k), H.current.delete(k), F.current.has(k) && ce(k, []);
|
|
16567
16567
|
}
|
|
16568
16568
|
ee();
|
|
16569
16569
|
},
|
|
@@ -16601,17 +16601,17 @@ function sk(e) {
|
|
|
16601
16601
|
[T.nodes, Z, m, Le, we]
|
|
16602
16602
|
), he = de(V);
|
|
16603
16603
|
he.current = V;
|
|
16604
|
-
const
|
|
16604
|
+
const Se = dt((k) => {
|
|
16605
16605
|
const q = he.current.get(k);
|
|
16606
16606
|
if (q) return sC(q);
|
|
16607
16607
|
const j = ue.current.get(k);
|
|
16608
16608
|
if (!j) return;
|
|
16609
16609
|
const K = ye.current.get(k) || H.current.get(k) || uo;
|
|
16610
16610
|
return { x: j.x, y: j.y, w: K.w, h: K.h };
|
|
16611
|
-
}, []),
|
|
16611
|
+
}, []), Ee = tt(() => {
|
|
16612
16612
|
const k = /* @__PURE__ */ new Map();
|
|
16613
16613
|
for (const q of r) {
|
|
16614
|
-
const j =
|
|
16614
|
+
const j = Se(q.id);
|
|
16615
16615
|
j && k.set(q.id, j);
|
|
16616
16616
|
}
|
|
16617
16617
|
return yC(
|
|
@@ -16629,35 +16629,35 @@ function sk(e) {
|
|
|
16629
16629
|
me,
|
|
16630
16630
|
t,
|
|
16631
16631
|
n,
|
|
16632
|
-
|
|
16632
|
+
Se
|
|
16633
16633
|
]);
|
|
16634
|
-
F.current =
|
|
16634
|
+
F.current = Ee;
|
|
16635
16635
|
const et = (k, q) => {
|
|
16636
16636
|
var le;
|
|
16637
16637
|
if (!M || q === void 0) return;
|
|
16638
|
-
const j = (le =
|
|
16638
|
+
const j = (le = Ee.get(k)) == null ? void 0 : le.find((Me) => Me.property === q), K = Se(k);
|
|
16639
16639
|
return j && !j.anchor && K ? K.y - K.h / 2 + j.top + j.height / 2 : void 0;
|
|
16640
16640
|
}, ot = (k, q) => {
|
|
16641
16641
|
var le, Me;
|
|
16642
16642
|
if (q === void 0) return;
|
|
16643
|
-
const j = (Me = (le =
|
|
16643
|
+
const j = (Me = (le = Ee.get(k)) == null ? void 0 : le.find((xe) => xe.property === q)) == null ? void 0 : Me.anchor, K = Se(k);
|
|
16644
16644
|
return j && K ? {
|
|
16645
16645
|
x: K.x - K.w / 2 + j.x,
|
|
16646
16646
|
y: K.y - K.h / 2 + j.y,
|
|
16647
16647
|
side: j.side
|
|
16648
16648
|
} : void 0;
|
|
16649
16649
|
}, Ze = (k, q) => {
|
|
16650
|
-
const j =
|
|
16650
|
+
const j = Se(k), K = me.get(k);
|
|
16651
16651
|
return j && K && !V.has(k) && et(k, q) === void 0 ? zn(j, K) : j;
|
|
16652
16652
|
}, Tt = () => {
|
|
16653
16653
|
const k = [];
|
|
16654
16654
|
ue.current.forEach((q, j) => {
|
|
16655
16655
|
if (he.current.has(j)) return;
|
|
16656
|
-
const K =
|
|
16656
|
+
const K = Se(j);
|
|
16657
16657
|
K && k.push(rr(K));
|
|
16658
16658
|
}), he.current.forEach((q) => k.push(q));
|
|
16659
16659
|
try {
|
|
16660
|
-
for (const q of [
|
|
16660
|
+
for (const q of [I.current, N.current]) {
|
|
16661
16661
|
const j = q == null ? void 0 : q.getBBox();
|
|
16662
16662
|
j && j.width > 0 && j.height > 0 && k.push({
|
|
16663
16663
|
x1: j.x,
|
|
@@ -16671,8 +16671,8 @@ function sk(e) {
|
|
|
16671
16671
|
return oi(k);
|
|
16672
16672
|
}, Rt = () => {
|
|
16673
16673
|
var j, K;
|
|
16674
|
-
const { pan: k, zoom: q } =
|
|
16675
|
-
$.current && ($.current.style.transform = `translate3d(${k.x}px, ${k.y}px, 0) scale(${q})`), (j =
|
|
16674
|
+
const { pan: k, zoom: q } = P;
|
|
16675
|
+
$.current && ($.current.style.transform = `translate3d(${k.x}px, ${k.y}px, 0) scale(${q})`), (j = I.current) == null || j.setAttribute(
|
|
16676
16676
|
"transform",
|
|
16677
16677
|
`translate(${k.x} ${k.y}) scale(${q})`
|
|
16678
16678
|
), (K = N.current) == null || K.setAttribute(
|
|
@@ -16683,22 +16683,22 @@ function sk(e) {
|
|
|
16683
16683
|
Ue(() => {
|
|
16684
16684
|
Rt();
|
|
16685
16685
|
let k = null, q;
|
|
16686
|
-
const j =
|
|
16686
|
+
const j = P.onChange(() => {
|
|
16687
16687
|
Rt();
|
|
16688
|
-
const K =
|
|
16688
|
+
const K = O.current;
|
|
16689
16689
|
K && (K.classList.add("flow-sdk-busy"), clearTimeout(q), q = setTimeout(
|
|
16690
16690
|
() => K.classList.remove("flow-sdk-busy"),
|
|
16691
16691
|
150
|
|
16692
16692
|
)), k === null && (k = requestAnimationFrame(() => {
|
|
16693
16693
|
var le, Me;
|
|
16694
|
-
k = null, (Me = (le = A.current).onViewportChange) == null || Me.call(le,
|
|
16694
|
+
k = null, (Me = (le = A.current).onViewportChange) == null || Me.call(le, P.state);
|
|
16695
16695
|
}));
|
|
16696
16696
|
});
|
|
16697
16697
|
return () => {
|
|
16698
16698
|
j(), clearTimeout(q), k !== null && cancelAnimationFrame(k);
|
|
16699
16699
|
};
|
|
16700
16700
|
}, []), Ot(() => {
|
|
16701
|
-
const k =
|
|
16701
|
+
const k = O.current;
|
|
16702
16702
|
if (!k) return;
|
|
16703
16703
|
const q = () => {
|
|
16704
16704
|
var xe;
|
|
@@ -16708,34 +16708,34 @@ function sk(e) {
|
|
|
16708
16708
|
0,
|
|
16709
16709
|
window.innerHeight - k.getBoundingClientRect().top - 100
|
|
16710
16710
|
), le && (k.style.height = `${le}px`)), K || (K = window.innerWidth, K && (k.style.width = `${K}px`));
|
|
16711
|
-
const Me =
|
|
16712
|
-
|
|
16711
|
+
const Me = P.size.w !== K || P.size.h !== le;
|
|
16712
|
+
P.size = { w: K, h: le }, Me && ((xe = Ke.current) != null && xe.options.fill) && ee(), !ie.current && !ue.current.size && A.current.fitOnInit !== !1 && (P.set({ x: K / 2, y: le / 2 }), Rt());
|
|
16713
16713
|
};
|
|
16714
16714
|
if (q(), typeof ResizeObserver > "u") return;
|
|
16715
16715
|
const j = new ResizeObserver(q);
|
|
16716
16716
|
return j.observe(k), () => j.disconnect();
|
|
16717
|
-
}, [
|
|
16717
|
+
}, [P]), Ot(() => {
|
|
16718
16718
|
if (tr.current) {
|
|
16719
16719
|
tr.current = !1;
|
|
16720
16720
|
const q = It.current.flatMap((K) => {
|
|
16721
|
-
const le =
|
|
16721
|
+
const le = Se(K);
|
|
16722
16722
|
return le ? [rr(le)] : [];
|
|
16723
16723
|
});
|
|
16724
16724
|
It.current = [];
|
|
16725
16725
|
const j = oi(q);
|
|
16726
16726
|
if (j) {
|
|
16727
|
-
We.current = !1,
|
|
16727
|
+
We.current = !1, P.center(j, A.current.animateViewport);
|
|
16728
16728
|
return;
|
|
16729
16729
|
}
|
|
16730
16730
|
}
|
|
16731
16731
|
if (!We.current) return;
|
|
16732
16732
|
We.current = !1;
|
|
16733
16733
|
const k = Tt();
|
|
16734
|
-
k && (
|
|
16734
|
+
k && (P.fit(
|
|
16735
16735
|
k,
|
|
16736
16736
|
50,
|
|
16737
|
-
|
|
16738
|
-
),
|
|
16737
|
+
ie.current && A.current.animateViewport
|
|
16738
|
+
), ie.current || Rt());
|
|
16739
16739
|
}, [Z]);
|
|
16740
16740
|
const St = tt(() => {
|
|
16741
16741
|
const k = (Y) => {
|
|
@@ -16765,32 +16765,32 @@ function sk(e) {
|
|
|
16765
16765
|
padding: (ge) => A.current.containerStyle(ge).padding,
|
|
16766
16766
|
minSize: te,
|
|
16767
16767
|
fixedIds: new Set(J.current.keys()),
|
|
16768
|
-
viewportSize: { ...
|
|
16768
|
+
viewportSize: { ...P.size }
|
|
16769
16769
|
};
|
|
16770
16770
|
}, j = (Y) => Yu(Y, A.current.nodes, A.current.edges), K = (Y, X = !0, ge = () => {
|
|
16771
16771
|
}, ne, Je, Re = !1) => {
|
|
16772
|
-
clearTimeout(be.current), clearTimeout(qe.current), Re || (Qe.current = null), at.current = null, We.current = !1, It.current = [], tr.current = !1,
|
|
16773
|
-
const
|
|
16772
|
+
clearTimeout(be.current), clearTimeout(qe.current), Re || (Qe.current = null), at.current = null, We.current = !1, It.current = [], tr.current = !1, P.cancelAnimation();
|
|
16773
|
+
const _e = X && !A.current.isPerformanceMode && !A.current.disableAnimations, ct = P.coordinate(() => {
|
|
16774
16774
|
var De;
|
|
16775
|
-
ne ? ne(
|
|
16775
|
+
ne ? ne(_e) : Re && ((De = Qe.current) == null || De.call(Qe, Y));
|
|
16776
16776
|
});
|
|
16777
16777
|
Ur(
|
|
16778
16778
|
new Map([...Y].map(([De, vt]) => [De, { ...vt }])),
|
|
16779
|
-
|
|
16779
|
+
_e,
|
|
16780
16780
|
ct,
|
|
16781
16781
|
ge,
|
|
16782
16782
|
Je
|
|
16783
16783
|
);
|
|
16784
16784
|
}, le = (Y, X = 50, ge = A.current.animateViewport, ne = 1, Je = !1) => {
|
|
16785
|
-
const Re = (
|
|
16785
|
+
const Re = (_e) => {
|
|
16786
16786
|
const ct = R.current, De = Y ?? new Set(ct.nodes.map((Nt) => Nt.id)), vt = new Set(
|
|
16787
16787
|
ct.nodes.map((Nt) => Nt.parent).filter(Boolean)
|
|
16788
16788
|
);
|
|
16789
|
-
if (!
|
|
16789
|
+
if (!_e && (!Y || [...Y].some((Nt) => vt.has(Nt))))
|
|
16790
16790
|
return;
|
|
16791
|
-
const gr =
|
|
16791
|
+
const gr = _e && ql(
|
|
16792
16792
|
ct.nodes,
|
|
16793
|
-
|
|
16793
|
+
_e,
|
|
16794
16794
|
H.current,
|
|
16795
16795
|
(Nt) => A.current.containerStyle(Nt).padding,
|
|
16796
16796
|
te
|
|
@@ -16798,11 +16798,11 @@ function sk(e) {
|
|
|
16798
16798
|
[...De].flatMap((Nt) => {
|
|
16799
16799
|
const bn = gr == null ? void 0 : gr.get(Nt);
|
|
16800
16800
|
if (bn) return [bn];
|
|
16801
|
-
const vn =
|
|
16801
|
+
const vn = _e == null ? void 0 : _e.get(Nt), io = H.current.get(Nt) || uo, wn = vn ? { ...vn, ...io } : Se(Nt);
|
|
16802
16802
|
return wn ? [rr(wn)] : [];
|
|
16803
16803
|
})
|
|
16804
16804
|
);
|
|
16805
|
-
yr && (We.current = !1, It.current = [], tr.current = !1,
|
|
16805
|
+
yr && (We.current = !1, It.current = [], tr.current = !1, P.fit(
|
|
16806
16806
|
yr,
|
|
16807
16807
|
Number.isFinite(X) ? Math.max(0, X) : 50,
|
|
16808
16808
|
ge,
|
|
@@ -16812,28 +16812,28 @@ function sk(e) {
|
|
|
16812
16812
|
Qe.current = Je ? Re : null, Je || Re(ue.current);
|
|
16813
16813
|
}, Me = (Y, X, ge, ne) => {
|
|
16814
16814
|
var Re;
|
|
16815
|
-
if (!
|
|
16816
|
-
const Je = X === "connections" ?
|
|
16817
|
-
if (X === "connections" && pr.current === 1.25 && ((Re = pt.current) == null ? void 0 : Re.size) === Je.size && [...Je].every((
|
|
16815
|
+
if (!Se(Y)) return;
|
|
16816
|
+
const Je = X === "connections" ? ke(Y) : j(Y);
|
|
16817
|
+
if (X === "connections" && pr.current === 1.25 && ((Re = pt.current) == null ? void 0 : Re.size) === Je.size && [...Je].every((_e) => pt.current.has(_e))) {
|
|
16818
16818
|
S({ id: Y, mode: X });
|
|
16819
16819
|
return;
|
|
16820
16820
|
}
|
|
16821
16821
|
er.current || (er.current = {
|
|
16822
|
-
pan: { ...
|
|
16823
|
-
zoom:
|
|
16822
|
+
pan: { ...P.pan },
|
|
16823
|
+
zoom: P.zoom
|
|
16824
16824
|
}), pt.current = Je, A.current.compactPropertyLayout && (We.current = !1, at.current = () => le(pt.current ?? Je, ge, ne)), S({ id: Y, mode: X }), A.current.compactPropertyLayout || le(Je, ge, ne);
|
|
16825
16825
|
}, xe = (Y) => {
|
|
16826
16826
|
at.current ? at.current = Y : Y();
|
|
16827
|
-
},
|
|
16827
|
+
}, ke = (Y) => of(Y, A.current.nodes, A.current.edges), Ie = ((Y) => {
|
|
16828
16828
|
var X, ge, ne;
|
|
16829
|
-
if (Y === void 0) return
|
|
16830
|
-
Y <
|
|
16831
|
-
}),
|
|
16832
|
-
if (Y === void 0) return
|
|
16833
|
-
Qe.current = null,
|
|
16829
|
+
if (Y === void 0) return P.zoom;
|
|
16830
|
+
Y < P.zoom && ((X = Ke.current) != null && X.options.fill) && !A.current.readOnly && ((ne = (ge = A.current).onNodeGridZoomOut) == null ? void 0 : ne.call(ge, Ke.current.options)) === !0 || (Qe.current = null, P.set(void 0, Y));
|
|
16831
|
+
}), Ae = ((Y) => {
|
|
16832
|
+
if (Y === void 0) return P.pan;
|
|
16833
|
+
Qe.current = null, P.set(Y);
|
|
16834
16834
|
}), Ne = (Y, X) => {
|
|
16835
16835
|
var ne;
|
|
16836
|
-
const ge = (ne =
|
|
16836
|
+
const ge = (ne = O.current) == null ? void 0 : ne.getBoundingClientRect();
|
|
16837
16837
|
return { x: Y - ((ge == null ? void 0 : ge.left) ?? 0), y: X - ((ge == null ? void 0 : ge.top) ?? 0) };
|
|
16838
16838
|
}, Xe = (Y = 0, X = A.current.animateViewport, ge = !1) => {
|
|
16839
16839
|
if (ge) {
|
|
@@ -16842,19 +16842,19 @@ function sk(e) {
|
|
|
16842
16842
|
}
|
|
16843
16843
|
Qe.current = null, xe(() => {
|
|
16844
16844
|
const ne = Tt();
|
|
16845
|
-
ne &&
|
|
16845
|
+
ne && P.fit(ne, Y, X);
|
|
16846
16846
|
});
|
|
16847
16847
|
};
|
|
16848
16848
|
return {
|
|
16849
16849
|
zoom: Ie,
|
|
16850
|
-
pan:
|
|
16850
|
+
pan: Ae,
|
|
16851
16851
|
setEdgesVisible: Te,
|
|
16852
16852
|
focusNode: (Y, X, ge, ne) => xe(
|
|
16853
16853
|
() => le(/* @__PURE__ */ new Set([Y]), X, ge, 0.6, ne)
|
|
16854
16854
|
),
|
|
16855
16855
|
focusBranch: (Y, X, ge) => xe(() => le(j(Y), X, ge)),
|
|
16856
16856
|
focusConnections: (Y, X, ge, ne) => xe(
|
|
16857
|
-
() => le(
|
|
16857
|
+
() => le(ke(Y), X, ge, 1, ne)
|
|
16858
16858
|
),
|
|
16859
16859
|
isolateConnections: (Y, X, ge) => Me(Y, "connections", X, ge),
|
|
16860
16860
|
isolateBranch: (Y, X, ge) => Me(Y, "branch", X, ge),
|
|
@@ -16864,27 +16864,27 @@ function sk(e) {
|
|
|
16864
16864
|
pt.current = null, S(null);
|
|
16865
16865
|
const ne = X ?? er.current;
|
|
16866
16866
|
er.current = null, ge ? at.current = () => {
|
|
16867
|
-
ne &&
|
|
16868
|
-
} : ne && xe(() =>
|
|
16867
|
+
ne && P.transition(ne, Y);
|
|
16868
|
+
} : ne && xe(() => P.transition(ne, Y));
|
|
16869
16869
|
},
|
|
16870
16870
|
zoomAt: (Y, X) => {
|
|
16871
16871
|
var ge, ne, Je;
|
|
16872
|
-
Y <
|
|
16872
|
+
Y < P.zoom && ((ge = Ke.current) != null && ge.options.fill) && !A.current.readOnly && ((Je = (ne = A.current).onNodeGridZoomOut) == null ? void 0 : Je.call(ne, Ke.current.options)) === !0 || (Qe.current = null, P.zoomAt(Y, X));
|
|
16873
16873
|
},
|
|
16874
16874
|
fit: Xe,
|
|
16875
16875
|
centerAndFit: Xe,
|
|
16876
16876
|
center: (Y = A.current.animateViewport) => {
|
|
16877
16877
|
Qe.current = null;
|
|
16878
16878
|
const X = Tt();
|
|
16879
|
-
X &&
|
|
16879
|
+
X && P.center(X, Y);
|
|
16880
16880
|
},
|
|
16881
|
-
clientToModel: (Y, X) =>
|
|
16881
|
+
clientToModel: (Y, X) => P.renderedToModel(Ne(Y, X)),
|
|
16882
16882
|
modelToClient: (Y) => {
|
|
16883
16883
|
var ne;
|
|
16884
|
-
const X = (ne =
|
|
16884
|
+
const X = (ne = O.current) == null ? void 0 : ne.getBoundingClientRect(), ge = P.modelToRendered(Y);
|
|
16885
16885
|
return { x: ge.x + ((X == null ? void 0 : X.left) ?? 0), y: ge.y + ((X == null ? void 0 : X.top) ?? 0) };
|
|
16886
16886
|
},
|
|
16887
|
-
getNodeBox: (Y) =>
|
|
16887
|
+
getNodeBox: (Y) => Se(Y),
|
|
16888
16888
|
detectNodeCollisions: (Y) => {
|
|
16889
16889
|
const X = q();
|
|
16890
16890
|
return u0(
|
|
@@ -16907,16 +16907,16 @@ function sk(e) {
|
|
|
16907
16907
|
for (const De of X.nodes)
|
|
16908
16908
|
X.positions.has(De.id) || X.positions.set(
|
|
16909
16909
|
De.id,
|
|
16910
|
-
|
|
16911
|
-
x:
|
|
16912
|
-
y:
|
|
16910
|
+
P.renderedToModel({
|
|
16911
|
+
x: P.size.w / 2,
|
|
16912
|
+
y: P.size.h / 2
|
|
16913
16913
|
})
|
|
16914
16914
|
);
|
|
16915
16915
|
const Re = new Set(X.nodes.map((De) => De.id));
|
|
16916
16916
|
ge.order = ge.order.filter((De) => Re.has(De));
|
|
16917
|
-
const
|
|
16917
|
+
const _e = new Set(ge.order);
|
|
16918
16918
|
ge.order.push(
|
|
16919
|
-
...X.nodes.filter((De) => !
|
|
16919
|
+
...X.nodes.filter((De) => !_e.has(De.id)).map((De) => De.id)
|
|
16920
16920
|
);
|
|
16921
16921
|
const ct = new Map(ge.order.map((De, vt) => [De, vt]));
|
|
16922
16922
|
X.nodes = [...X.nodes].sort(
|
|
@@ -16926,24 +16926,24 @@ function sk(e) {
|
|
|
16926
16926
|
const ne = Cl(X, k(Y));
|
|
16927
16927
|
Zt(ne.dividers ?? []), ge && (ge.ready = !1);
|
|
16928
16928
|
const Je = () => {
|
|
16929
|
-
ge && (ge.ready = !0), ge && X.nodes.length && !
|
|
16929
|
+
ge && (ge.ready = !0), ge && X.nodes.length && !ie.current && (ie.current = !0, A.current.fitOnInit !== !1 && !Y.fill ? St.centerAndFit(50, !1) : A.current.fitOnInit === !1 && P.transition(h, !1)), fe((Re) => Re + 1);
|
|
16930
16930
|
};
|
|
16931
16931
|
return !ne.sizes && ye.current.size && pe(), X.nodes.some((Re) => !ue.current.has(Re.id)) || ne.movedNodeIds.length || ne.bounds || Qe.current ? K(
|
|
16932
16932
|
ne.positions,
|
|
16933
16933
|
Y.animate,
|
|
16934
16934
|
Je,
|
|
16935
|
-
ne.bounds && (!ge || !ye.current.size) ? () =>
|
|
16935
|
+
ne.bounds && (!ge || !ye.current.size) ? () => P.transition({ zoom: 1, pan: { x: 0, y: 0 } }, !1) : void 0,
|
|
16936
16936
|
ne.sizes,
|
|
16937
16937
|
!!ge && !ne.bounds
|
|
16938
16938
|
) : Je(), ne;
|
|
16939
16939
|
},
|
|
16940
16940
|
setNodeGridMode: (Y, X = {}) => {
|
|
16941
16941
|
var ge, ne, Je, Re;
|
|
16942
|
-
if (X.order && (!Array.isArray(X.order) || X.order.some((
|
|
16942
|
+
if (X.order && (!Array.isArray(X.order) || X.order.some((_e) => typeof _e != "string") || new Set(X.order).size !== X.order.length))
|
|
16943
16943
|
throw new Error("Invalid grid node order.");
|
|
16944
16944
|
if (Y) {
|
|
16945
16945
|
Cl(q(), k(X));
|
|
16946
|
-
const
|
|
16946
|
+
const _e = !Ke.current || Ke.current.options.fill && !X.fill;
|
|
16947
16947
|
Qe.current = null, Ke.current || (Ke.current = {
|
|
16948
16948
|
options: X,
|
|
16949
16949
|
order: q().nodes.map((ct) => ct.id),
|
|
@@ -16954,31 +16954,31 @@ function sk(e) {
|
|
|
16954
16954
|
])
|
|
16955
16955
|
),
|
|
16956
16956
|
previousViewport: {
|
|
16957
|
-
zoom:
|
|
16958
|
-
pan: { ...
|
|
16957
|
+
zoom: P.zoom,
|
|
16958
|
+
pan: { ...P.pan }
|
|
16959
16959
|
},
|
|
16960
|
-
previousSize: { ...
|
|
16960
|
+
previousSize: { ...P.size },
|
|
16961
16961
|
ready: !1
|
|
16962
|
-
}),
|
|
16962
|
+
}), _e && St.centerAndFit(80, X.animate, !0), X.order && (Ke.current.order = [...X.order]), Ke.current.options = { ...X }, ft(!0), St.arrangeNodesInGrid(X), (ne = (ge = A.current).onNodeGridModeChange) == null || ne.call(ge, {
|
|
16963
16963
|
...X,
|
|
16964
16964
|
order: [...Ke.current.order]
|
|
16965
16965
|
});
|
|
16966
16966
|
} else {
|
|
16967
|
-
const
|
|
16968
|
-
if (!
|
|
16969
|
-
if (
|
|
16970
|
-
(vt) =>
|
|
16971
|
-
) ? Qe.current = () =>
|
|
16972
|
-
|
|
16967
|
+
const _e = Ke.current;
|
|
16968
|
+
if (!_e) return;
|
|
16969
|
+
if (P.size.w === _e.previousSize.w && P.size.h === _e.previousSize.h && ue.current.size === _e.previousPositions.size && [...ue.current.keys()].every(
|
|
16970
|
+
(vt) => _e.previousPositions.has(vt)
|
|
16971
|
+
) ? Qe.current = () => P.transition(
|
|
16972
|
+
_e.previousViewport,
|
|
16973
16973
|
X.animate !== !1 && !A.current.disableAnimations && !A.current.isPerformanceMode
|
|
16974
|
-
) : St.centerAndFit(80, X.animate, !0), Ke.current = null, ft(!1), pe(), (Re = (Je = A.current).onNodeGridModeChange) == null || Re.call(Je, null), Qt(null), !
|
|
16974
|
+
) : St.centerAndFit(80, X.animate, !0), Ke.current = null, ft(!1), pe(), (Re = (Je = A.current).onNodeGridModeChange) == null || Re.call(Je, null), Qt(null), !_e.previousPositions.size) {
|
|
16975
16975
|
ee();
|
|
16976
16976
|
return;
|
|
16977
16977
|
}
|
|
16978
16978
|
const De = new Map(
|
|
16979
16979
|
[...ue.current].map(([vt, gr]) => [
|
|
16980
16980
|
vt,
|
|
16981
|
-
|
|
16981
|
+
_e.previousPositions.get(vt) ?? gr
|
|
16982
16982
|
])
|
|
16983
16983
|
);
|
|
16984
16984
|
K(
|
|
@@ -16996,8 +16996,8 @@ function sk(e) {
|
|
|
16996
16996
|
const ne = Ke.current;
|
|
16997
16997
|
if (!ne || !ne.ready || A.current.readOnly || Y === X)
|
|
16998
16998
|
return !1;
|
|
16999
|
-
const Je = q(), Re = Je.nodes.find((xn) => xn.id === Y),
|
|
17000
|
-
if (!Re || !
|
|
16999
|
+
const Je = q(), Re = Je.nodes.find((xn) => xn.id === Y), _e = Je.nodes.find((xn) => xn.id === X);
|
|
17000
|
+
if (!Re || !_e || Re.parent !== _e.parent) return !1;
|
|
17001
17001
|
const ct = Cl(Je, k(ne.options));
|
|
17002
17002
|
if (ct.skippedNodeIds.includes(Y) || ct.skippedNodeIds.includes(X))
|
|
17003
17003
|
return !1;
|
|
@@ -17037,12 +17037,12 @@ function sk(e) {
|
|
|
17037
17037
|
const ne = new Map(ue.current);
|
|
17038
17038
|
return ne.set(Y, { ...X }), (ge == null ? void 0 : ge.persist) === !1 ? J.current.delete(Y) : J.current.set(Y, { ...X }), ue.current = ne, se(ne), (ge == null ? void 0 : ge.persist) === !1 && ee(), !0;
|
|
17039
17039
|
},
|
|
17040
|
-
onViewportChange: (Y) =>
|
|
17040
|
+
onViewportChange: (Y) => P.onChange(Y)
|
|
17041
17041
|
};
|
|
17042
17042
|
}, []);
|
|
17043
17043
|
Ue(() => {
|
|
17044
17044
|
var k, q;
|
|
17045
|
-
return (q = (k = A.current).onInit) == null || q.call(k, St), () =>
|
|
17045
|
+
return (q = (k = A.current).onInit) == null || q.call(k, St), () => P.cancelAnimation();
|
|
17046
17046
|
}, [St]), Ue(() => {
|
|
17047
17047
|
var k, q;
|
|
17048
17048
|
if (U > 0) {
|
|
@@ -17051,17 +17051,17 @@ function sk(e) {
|
|
|
17051
17051
|
}
|
|
17052
17052
|
}, [St, U]);
|
|
17053
17053
|
const mt = de(null), Et = de(/* @__PURE__ */ new Map()), Ft = de(!1), [Ar, ro] = re(null), [lt, yn] = re(null), no = (k) => {
|
|
17054
|
-
const q =
|
|
17054
|
+
const q = O.current.getBoundingClientRect();
|
|
17055
17055
|
return {
|
|
17056
|
-
x: (k.clientX - q.left) * (
|
|
17057
|
-
y: (k.clientY - q.top) * (
|
|
17056
|
+
x: (k.clientX - q.left) * (O.current.clientWidth / q.width || 1),
|
|
17057
|
+
y: (k.clientY - q.top) * (O.current.clientHeight / q.height || 1)
|
|
17058
17058
|
};
|
|
17059
17059
|
}, oo = (k, q) => {
|
|
17060
17060
|
const j = A.current.nodes;
|
|
17061
17061
|
for (let K = j.length - 1; K >= 0; K--) {
|
|
17062
17062
|
const le = j[K].id;
|
|
17063
17063
|
if (!sr(le, A.current.edges, A.current.edgeMode) || pt.current && !pt.current.has(le) || le === q || he.current.has(le)) continue;
|
|
17064
|
-
const Me =
|
|
17064
|
+
const Me = Se(le);
|
|
17065
17065
|
if (Me && Qu(k, rr(Me))) return le;
|
|
17066
17066
|
}
|
|
17067
17067
|
for (const [K, le] of he.current)
|
|
@@ -17070,8 +17070,8 @@ function sk(e) {
|
|
|
17070
17070
|
return null;
|
|
17071
17071
|
}, vu = (k, q) => {
|
|
17072
17072
|
const j = A.current.nodes.find(
|
|
17073
|
-
(
|
|
17074
|
-
), K =
|
|
17073
|
+
(ke) => ke.id === k
|
|
17074
|
+
), K = Se(k);
|
|
17075
17075
|
if (!j || !K) return null;
|
|
17076
17076
|
const le = rr({
|
|
17077
17077
|
...K,
|
|
@@ -17079,23 +17079,23 @@ function sk(e) {
|
|
|
17079
17079
|
y: K.y + q.y
|
|
17080
17080
|
});
|
|
17081
17081
|
let Me = null, xe = 0;
|
|
17082
|
-
for (const
|
|
17083
|
-
if (
|
|
17084
|
-
|
|
17082
|
+
for (const ke of A.current.nodes) {
|
|
17083
|
+
if (ke.id === k || ke.parent !== j.parent || J.current.has(ke.id) || he.current.has(ke.id) || !sr(
|
|
17084
|
+
ke.id,
|
|
17085
17085
|
A.current.edges,
|
|
17086
17086
|
A.current.edgeMode
|
|
17087
|
-
) || pt.current && !pt.current.has(
|
|
17087
|
+
) || pt.current && !pt.current.has(ke.id))
|
|
17088
17088
|
continue;
|
|
17089
|
-
const Ie =
|
|
17089
|
+
const Ie = Se(ke.id);
|
|
17090
17090
|
if (!Ie) continue;
|
|
17091
|
-
const
|
|
17091
|
+
const Ae = rr(Ie), Ne = Math.max(
|
|
17092
17092
|
0,
|
|
17093
|
-
Math.min(le.x2,
|
|
17093
|
+
Math.min(le.x2, Ae.x2) - Math.max(le.x1, Ae.x1)
|
|
17094
17094
|
) * Math.max(
|
|
17095
17095
|
0,
|
|
17096
|
-
Math.min(le.y2,
|
|
17096
|
+
Math.min(le.y2, Ae.y2) - Math.max(le.y1, Ae.y1)
|
|
17097
17097
|
);
|
|
17098
|
-
Ne > xe && (xe = Ne, Me =
|
|
17098
|
+
Ne > xe && (xe = Ne, Me = ke.id);
|
|
17099
17099
|
}
|
|
17100
17100
|
return Me;
|
|
17101
17101
|
}, wu = (k, q) => {
|
|
@@ -17109,22 +17109,22 @@ function sk(e) {
|
|
|
17109
17109
|
) && (!pt.current || pt.current.has(Ne.id))
|
|
17110
17110
|
), le = K.find((Ne) => Ne.id === k);
|
|
17111
17111
|
if (!le) return;
|
|
17112
|
-
const Me =
|
|
17112
|
+
const Me = O.current, xe = P.zoom * (Me && Me.clientWidth ? Me.getBoundingClientRect().width / Me.clientWidth : 1), ke = 24 / xe;
|
|
17113
17113
|
let Ie;
|
|
17114
17114
|
for (const Ne of K) {
|
|
17115
17115
|
if (Ne.id === k || Ne.parent !== le.parent) continue;
|
|
17116
|
-
const Xe =
|
|
17116
|
+
const Xe = Se(Ne.id);
|
|
17117
17117
|
if (!Xe) continue;
|
|
17118
|
-
const Y = rr(Xe), X = Math.min(Xe.w / 4,
|
|
17118
|
+
const Y = rr(Xe), X = Math.min(Xe.w / 4, ke), ge = Math.min(Xe.h / 4, ke), ne = 3 / xe, Je = [];
|
|
17119
17119
|
if (q.y > Y.y1 + ge && q.y < Y.y2 - ge)
|
|
17120
17120
|
for (const Re of ["before", "after"]) {
|
|
17121
|
-
const
|
|
17122
|
-
ct <= (De ?
|
|
17121
|
+
const _e = Re === "before" ? Y.x1 : Y.x2, ct = Math.abs(q.x - _e), De = Re === "before" ? q.x < _e : q.x > _e;
|
|
17122
|
+
ct <= (De ? ke : X) && Je.push({
|
|
17123
17123
|
side: Re,
|
|
17124
17124
|
distance: ct,
|
|
17125
17125
|
marker: {
|
|
17126
|
-
x1:
|
|
17127
|
-
x2:
|
|
17126
|
+
x1: _e - ne / 2,
|
|
17127
|
+
x2: _e + ne / 2,
|
|
17128
17128
|
y1: Y.y1,
|
|
17129
17129
|
y2: Y.y2
|
|
17130
17130
|
}
|
|
@@ -17132,15 +17132,15 @@ function sk(e) {
|
|
|
17132
17132
|
}
|
|
17133
17133
|
if (q.x >= Y.x1 && q.x <= Y.x2)
|
|
17134
17134
|
for (const Re of ["above", "below"]) {
|
|
17135
|
-
const
|
|
17136
|
-
ct <= (De ?
|
|
17135
|
+
const _e = Re === "above" ? Y.y1 : Y.y2, ct = Math.abs(q.y - _e), De = Re === "above" ? q.y < _e : q.y > _e;
|
|
17136
|
+
ct <= (De ? ke : ge) && Je.push({
|
|
17137
17137
|
side: Re,
|
|
17138
17138
|
distance: ct,
|
|
17139
17139
|
marker: {
|
|
17140
17140
|
x1: Y.x1,
|
|
17141
17141
|
x2: Y.x2,
|
|
17142
|
-
y1:
|
|
17143
|
-
y2:
|
|
17142
|
+
y1: _e - ne / 2,
|
|
17143
|
+
y2: _e + ne / 2
|
|
17144
17144
|
}
|
|
17145
17145
|
});
|
|
17146
17146
|
}
|
|
@@ -17148,7 +17148,7 @@ function sk(e) {
|
|
|
17148
17148
|
(!Ie || Re.distance < Ie.distance) && (Ie = { id: Ne.id, ...Re });
|
|
17149
17149
|
}
|
|
17150
17150
|
if (!Ie) return;
|
|
17151
|
-
const
|
|
17151
|
+
const Ae = HE(
|
|
17152
17152
|
{
|
|
17153
17153
|
nodes: K,
|
|
17154
17154
|
positions: ue.current,
|
|
@@ -17163,11 +17163,11 @@ function sk(e) {
|
|
|
17163
17163
|
Ie.id,
|
|
17164
17164
|
Ie.side
|
|
17165
17165
|
);
|
|
17166
|
-
return
|
|
17166
|
+
return Ae ? { options: Ae, marker: Ie.marker } : void 0;
|
|
17167
17167
|
}, Jo = (k, q) => {
|
|
17168
17168
|
if (A.current.edgeMode === "nodes" || A.current.edgeMode === "workflow")
|
|
17169
17169
|
return null;
|
|
17170
|
-
const j = A.current.direction === "RL", K = Math.max(16, 6 /
|
|
17170
|
+
const j = A.current.direction === "RL", K = Math.max(16, 6 / P.zoom);
|
|
17171
17171
|
let le = null;
|
|
17172
17172
|
for (const Me of [...A.current.nodes].reverse()) {
|
|
17173
17173
|
if (!sr(
|
|
@@ -17176,22 +17176,22 @@ function sk(e) {
|
|
|
17176
17176
|
A.current.edgeMode
|
|
17177
17177
|
) || pt.current && !pt.current.has(Me.id))
|
|
17178
17178
|
continue;
|
|
17179
|
-
const xe =
|
|
17180
|
-
if (!xe || !
|
|
17179
|
+
const xe = Se(Me.id), ke = F.current.get(Me.id);
|
|
17180
|
+
if (!xe || !ke || he.current.has(Me.id)) continue;
|
|
17181
17181
|
const Ie = xe.x + (q === "source" !== j ? 1 : -1) * xe.w / 2;
|
|
17182
|
-
for (const
|
|
17183
|
-
if (
|
|
17184
|
-
const Ne = xe.y - xe.h / 2 +
|
|
17185
|
-
k.x - (
|
|
17186
|
-
k.y - Ne -
|
|
17182
|
+
for (const Ae of ke) {
|
|
17183
|
+
if (Ae.role && Ae.role !== q) continue;
|
|
17184
|
+
const Ne = xe.y - xe.h / 2 + Ae.top, Xe = Math.hypot(
|
|
17185
|
+
k.x - (Ae.anchor ? xe.x - xe.w / 2 + Ae.anchor.x : Ie),
|
|
17186
|
+
k.y - Ne - Ae.height / 2
|
|
17187
17187
|
);
|
|
17188
|
-
if (!
|
|
17189
|
-
Xe <= K && (!le || Xe < le.distance) && (le = { nodeId: Me.id, property:
|
|
17188
|
+
if (!Ae.anchor && k.x >= xe.x - xe.w / 2 && k.x <= xe.x + xe.w / 2 && k.y >= Ne && k.y <= Ne + Ae.height) return { nodeId: Me.id, property: Ae.property };
|
|
17189
|
+
Xe <= K && (!le || Xe < le.distance) && (le = { nodeId: Me.id, property: Ae.property, distance: Xe });
|
|
17190
17190
|
}
|
|
17191
17191
|
}
|
|
17192
17192
|
return le;
|
|
17193
17193
|
}, w0 = (k) => {
|
|
17194
|
-
var
|
|
17194
|
+
var ke, Ie;
|
|
17195
17195
|
if (!k.currentTarget.contains(k.target) || (mt.current || (Ft.current = !1), k.target.closest(".flow-sdk-canvas") !== k.currentTarget) || k.button !== 0 || A.current.readOnly) return;
|
|
17196
17196
|
const q = k.target;
|
|
17197
17197
|
if (q.closest(
|
|
@@ -17201,13 +17201,13 @@ function sk(e) {
|
|
|
17201
17201
|
const j = A.current, K = no(k);
|
|
17202
17202
|
if (k.pointerType === "touch") {
|
|
17203
17203
|
Et.current.set(k.pointerId, K);
|
|
17204
|
-
const
|
|
17205
|
-
if (
|
|
17204
|
+
const Ae = Om(Et.current);
|
|
17205
|
+
if (Ae) {
|
|
17206
17206
|
Qt(null), mt.current = {
|
|
17207
17207
|
kind: "pinch",
|
|
17208
|
-
distance:
|
|
17209
|
-
zoom:
|
|
17210
|
-
anchor:
|
|
17208
|
+
distance: Ae.distance,
|
|
17209
|
+
zoom: P.zoom,
|
|
17210
|
+
anchor: P.renderedToModel(Ae.center)
|
|
17211
17211
|
}, yn(null), ro(null), Ft.current = !0;
|
|
17212
17212
|
for (const Ne of Et.current.keys())
|
|
17213
17213
|
k.currentTarget.setPointerCapture(Ne);
|
|
@@ -17221,22 +17221,22 @@ function sk(e) {
|
|
|
17221
17221
|
"button, input, textarea, select, a, [contenteditable=true], [data-flow-content]"
|
|
17222
17222
|
))
|
|
17223
17223
|
return;
|
|
17224
|
-
const
|
|
17225
|
-
if (
|
|
17224
|
+
const Ae = (ke = q.closest("[data-node-id]")) == null ? void 0 : ke.dataset.nodeId;
|
|
17225
|
+
if (Ae && !J.current.has(Ae)) {
|
|
17226
17226
|
q.setPointerCapture(k.pointerId), mt.current = {
|
|
17227
17227
|
kind: "grid",
|
|
17228
17228
|
pointerId: k.pointerId,
|
|
17229
17229
|
captureTarget: q,
|
|
17230
|
-
source:
|
|
17230
|
+
source: Ae,
|
|
17231
17231
|
start: K,
|
|
17232
17232
|
moved: !1
|
|
17233
17233
|
};
|
|
17234
17234
|
return;
|
|
17235
17235
|
}
|
|
17236
|
-
if (
|
|
17236
|
+
if (Ae) return;
|
|
17237
17237
|
}
|
|
17238
17238
|
if (le && (j.drawMode || Me || xe)) {
|
|
17239
|
-
const
|
|
17239
|
+
const Ae = P.renderedToModel(K), Ne = j.drawMode ? Jo(Ae, "source") : null, Xe = xe || Me, Y = Xe ? (Ie = Xe.closest("[data-node-id]")) == null ? void 0 : Ie.dataset.nodeId : (Ne == null ? void 0 : Ne.nodeId) ?? oo(Ae), X = xe ? xe.dataset.property : Ne == null ? void 0 : Ne.property;
|
|
17240
17240
|
if (Y) {
|
|
17241
17241
|
mt.current = {
|
|
17242
17242
|
kind: "draw",
|
|
@@ -17245,7 +17245,7 @@ function sk(e) {
|
|
|
17245
17245
|
sourceProperty: X,
|
|
17246
17246
|
reverse: (xe == null ? void 0 : xe.dataset.portRole) === "target",
|
|
17247
17247
|
startClient: { x: k.clientX, y: k.clientY }
|
|
17248
|
-
}, Ft.current = !0, yn({ source: Y, sourceProperty: X, point:
|
|
17248
|
+
}, Ft.current = !0, yn({ source: Y, sourceProperty: X, point: Ae, target: null }), k.currentTarget.setPointerCapture(k.pointerId);
|
|
17249
17249
|
return;
|
|
17250
17250
|
}
|
|
17251
17251
|
}
|
|
@@ -17260,7 +17260,7 @@ function sk(e) {
|
|
|
17260
17260
|
kind: "pan",
|
|
17261
17261
|
pointerId: k.pointerId,
|
|
17262
17262
|
start: K,
|
|
17263
|
-
pan0:
|
|
17263
|
+
pan0: P.pan,
|
|
17264
17264
|
moved: !1
|
|
17265
17265
|
} : mt.current = {
|
|
17266
17266
|
kind: "tap",
|
|
@@ -17276,18 +17276,18 @@ function sk(e) {
|
|
|
17276
17276
|
if (Et.current.has(k.pointerId) && Et.current.set(k.pointerId, j), q.kind === "pinch") {
|
|
17277
17277
|
const xe = Om(Et.current);
|
|
17278
17278
|
if (!xe) return;
|
|
17279
|
-
const
|
|
17280
|
-
|
|
17281
|
-
Math.min(
|
|
17279
|
+
const ke = Math.max(
|
|
17280
|
+
P.minZoom,
|
|
17281
|
+
Math.min(P.maxZoom, q.zoom * xe.distance / q.distance)
|
|
17282
17282
|
);
|
|
17283
|
-
if (
|
|
17283
|
+
if (ke < P.zoom && ((K = Ke.current) != null && K.options.fill) && ((Me = (le = A.current).onNodeGridZoomOut) == null ? void 0 : Me.call(le, Ke.current.options)) === !0)
|
|
17284
17284
|
return;
|
|
17285
|
-
|
|
17285
|
+
P.set(
|
|
17286
17286
|
{
|
|
17287
|
-
x: xe.center.x - q.anchor.x *
|
|
17288
|
-
y: xe.center.y - q.anchor.y *
|
|
17287
|
+
x: xe.center.x - q.anchor.x * ke,
|
|
17288
|
+
y: xe.center.y - q.anchor.y * ke
|
|
17289
17289
|
},
|
|
17290
|
-
|
|
17290
|
+
ke
|
|
17291
17291
|
);
|
|
17292
17292
|
return;
|
|
17293
17293
|
}
|
|
@@ -17296,24 +17296,24 @@ function sk(e) {
|
|
|
17296
17296
|
case "grid": {
|
|
17297
17297
|
const xe = { x: j.x - q.start.x, y: j.y - q.start.y };
|
|
17298
17298
|
if (!q.moved && Math.hypot(xe.x, xe.y) <= Sl) return;
|
|
17299
|
-
q.moved || (ar(), Qe.current = null,
|
|
17300
|
-
const
|
|
17301
|
-
x: xe.x /
|
|
17302
|
-
y: xe.y /
|
|
17303
|
-
}, Ie = !k.shiftKey && j.x >= 0 && j.y >= 0 && j.x <=
|
|
17299
|
+
q.moved || (ar(), Qe.current = null, P.cancelAnimation()), q.moved = !0, Ft.current = !0, k.preventDefault();
|
|
17300
|
+
const ke = {
|
|
17301
|
+
x: xe.x / P.zoom,
|
|
17302
|
+
y: xe.y / P.zoom
|
|
17303
|
+
}, Ie = !k.shiftKey && j.x >= 0 && j.y >= 0 && j.x <= P.size.w && j.y <= P.size.h ? wu(q.source, P.renderedToModel(j)) : void 0;
|
|
17304
17304
|
Qt({
|
|
17305
17305
|
source: q.source,
|
|
17306
|
-
offset:
|
|
17307
|
-
target: k.shiftKey || Ie ? null : vu(q.source,
|
|
17306
|
+
offset: ke,
|
|
17307
|
+
target: k.shiftKey || Ie ? null : vu(q.source, ke),
|
|
17308
17308
|
shiftKey: k.shiftKey,
|
|
17309
17309
|
insertion: Ie
|
|
17310
17310
|
});
|
|
17311
17311
|
break;
|
|
17312
17312
|
}
|
|
17313
17313
|
case "pan": {
|
|
17314
|
-
const xe = j.x - q.start.x,
|
|
17315
|
-
if (!q.moved && Math.hypot(xe,
|
|
17316
|
-
q.moved = !0, Ft.current = !0,
|
|
17314
|
+
const xe = j.x - q.start.x, ke = j.y - q.start.y;
|
|
17315
|
+
if (!q.moved && Math.hypot(xe, ke) <= Sl) return;
|
|
17316
|
+
q.moved = !0, Ft.current = !0, P.set({ x: q.pan0.x + xe, y: q.pan0.y + ke });
|
|
17317
17317
|
break;
|
|
17318
17318
|
}
|
|
17319
17319
|
case "tap": {
|
|
@@ -17330,11 +17330,11 @@ function sk(e) {
|
|
|
17330
17330
|
break;
|
|
17331
17331
|
}
|
|
17332
17332
|
case "draw": {
|
|
17333
|
-
const xe =
|
|
17333
|
+
const xe = P.renderedToModel(j), ke = Jo(xe, q.reverse ? "source" : "target");
|
|
17334
17334
|
yn(
|
|
17335
|
-
q.reverse &&
|
|
17336
|
-
source:
|
|
17337
|
-
sourceProperty:
|
|
17335
|
+
q.reverse && ke ? {
|
|
17336
|
+
source: ke.nodeId,
|
|
17337
|
+
sourceProperty: ke.property,
|
|
17338
17338
|
point: xe,
|
|
17339
17339
|
target: q.source,
|
|
17340
17340
|
targetProperty: q.sourceProperty
|
|
@@ -17342,15 +17342,15 @@ function sk(e) {
|
|
|
17342
17342
|
source: q.source,
|
|
17343
17343
|
sourceProperty: q.sourceProperty,
|
|
17344
17344
|
point: xe,
|
|
17345
|
-
target: (
|
|
17346
|
-
targetProperty:
|
|
17345
|
+
target: (ke == null ? void 0 : ke.nodeId) ?? oo(xe, q.source),
|
|
17346
|
+
targetProperty: ke == null ? void 0 : ke.property
|
|
17347
17347
|
}
|
|
17348
17348
|
);
|
|
17349
17349
|
break;
|
|
17350
17350
|
}
|
|
17351
17351
|
}
|
|
17352
17352
|
}, xu = (k, q) => {
|
|
17353
|
-
var le, Me, xe,
|
|
17353
|
+
var le, Me, xe, ke, Ie, Ae, Ne, Xe, Y, X, ge;
|
|
17354
17354
|
Et.current.delete(k.pointerId);
|
|
17355
17355
|
const j = mt.current;
|
|
17356
17356
|
if (!j) return;
|
|
@@ -17360,7 +17360,7 @@ function sk(e) {
|
|
|
17360
17360
|
kind: "pan",
|
|
17361
17361
|
pointerId: ne[0],
|
|
17362
17362
|
start: ne[1],
|
|
17363
|
-
pan0:
|
|
17363
|
+
pan0: P.pan,
|
|
17364
17364
|
moved: !0
|
|
17365
17365
|
} : null;
|
|
17366
17366
|
return;
|
|
@@ -17376,10 +17376,10 @@ function sk(e) {
|
|
|
17376
17376
|
case "grid": {
|
|
17377
17377
|
if (Qt(null), q || !j.moved) break;
|
|
17378
17378
|
const ne = no(k);
|
|
17379
|
-
if (!k.shiftKey && ne.x >= 0 && ne.y >= 0 && ne.x <=
|
|
17379
|
+
if (!k.shiftKey && ne.x >= 0 && ne.y >= 0 && ne.x <= P.size.w && ne.y <= P.size.h) {
|
|
17380
17380
|
const Re = wu(
|
|
17381
17381
|
j.source,
|
|
17382
|
-
|
|
17382
|
+
P.renderedToModel(ne)
|
|
17383
17383
|
);
|
|
17384
17384
|
if (Re) {
|
|
17385
17385
|
St.setNodeGridMode(!0, {
|
|
@@ -17399,30 +17399,30 @@ function sk(e) {
|
|
|
17399
17399
|
metaKey: k.metaKey,
|
|
17400
17400
|
altKey: k.altKey
|
|
17401
17401
|
}
|
|
17402
|
-
)) === !0 || ne.x < 0 || ne.y < 0 || ne.x >
|
|
17402
|
+
)) === !0 || ne.x < 0 || ne.y < 0 || ne.x > P.size.w || ne.y > P.size.h)
|
|
17403
17403
|
break;
|
|
17404
17404
|
if (k.shiftKey) {
|
|
17405
17405
|
const Re = new Map(K.nodes.map((De) => [De.id, De]));
|
|
17406
|
-
let
|
|
17407
|
-
|
|
17406
|
+
let _e = oo(
|
|
17407
|
+
P.renderedToModel(ne),
|
|
17408
17408
|
j.source
|
|
17409
17409
|
);
|
|
17410
17410
|
const ct = /* @__PURE__ */ new Set();
|
|
17411
|
-
for (;
|
|
17412
|
-
ct.add(
|
|
17413
|
-
if (
|
|
17414
|
-
let De =
|
|
17411
|
+
for (; _e && !((Me = Re.get(_e)) != null && Me.acceptsChildren) && !ct.has(_e); )
|
|
17412
|
+
ct.add(_e), _e = ((xe = Re.get(_e)) == null ? void 0 : xe.parent) ?? null;
|
|
17413
|
+
if (_e && ((ke = Re.get(_e)) != null && ke.acceptsChildren)) {
|
|
17414
|
+
let De = _e;
|
|
17415
17415
|
const vt = /* @__PURE__ */ new Set();
|
|
17416
17416
|
for (; De && !vt.has(De); )
|
|
17417
17417
|
vt.add(De), De = (Ie = Re.get(De)) == null ? void 0 : Ie.parent;
|
|
17418
|
-
vt.has(j.source) || (
|
|
17418
|
+
vt.has(j.source) || (Ae = K.onNodeParentChange) == null || Ae.call(K, j.source, _e);
|
|
17419
17419
|
}
|
|
17420
17420
|
break;
|
|
17421
17421
|
}
|
|
17422
17422
|
if (!Ke.current) break;
|
|
17423
17423
|
const Je = vu(j.source, {
|
|
17424
|
-
x: (ne.x - j.start.x) /
|
|
17425
|
-
y: (ne.y - j.start.y) /
|
|
17424
|
+
x: (ne.x - j.start.x) / P.zoom,
|
|
17425
|
+
y: (ne.y - j.start.y) / P.zoom
|
|
17426
17426
|
});
|
|
17427
17427
|
Je && St.swapGridNodes(j.source, Je, !1);
|
|
17428
17428
|
break;
|
|
@@ -17433,7 +17433,7 @@ function sk(e) {
|
|
|
17433
17433
|
break;
|
|
17434
17434
|
case "box": {
|
|
17435
17435
|
if (ro(null), q) break;
|
|
17436
|
-
const ne =
|
|
17436
|
+
const ne = P.renderedToModel(j.start), Je = P.renderedToModel(j.current), Re = {
|
|
17437
17437
|
x1: Math.min(ne.x, Je.x),
|
|
17438
17438
|
y1: Math.min(ne.y, Je.y),
|
|
17439
17439
|
x2: Math.max(ne.x, Je.x),
|
|
@@ -17443,23 +17443,23 @@ function sk(e) {
|
|
|
17443
17443
|
(Xe = K.onBackgroundTap) == null || Xe.call(K);
|
|
17444
17444
|
break;
|
|
17445
17445
|
}
|
|
17446
|
-
const
|
|
17446
|
+
const _e = [];
|
|
17447
17447
|
for (const ct of K.nodes) {
|
|
17448
|
-
const De =
|
|
17449
|
-
De && cC(rr(De), Re) &&
|
|
17448
|
+
const De = Se(ct.id);
|
|
17449
|
+
De && cC(rr(De), Re) && _e.push(ct.id);
|
|
17450
17450
|
}
|
|
17451
|
-
|
|
17451
|
+
_e.length && ((Y = K.onBoxSelect) == null || Y.call(K, _e));
|
|
17452
17452
|
break;
|
|
17453
17453
|
}
|
|
17454
17454
|
case "draw": {
|
|
17455
17455
|
if (yn(null), q) break;
|
|
17456
|
-
const ne = no(k), Je =
|
|
17457
|
-
if (
|
|
17456
|
+
const ne = no(k), Je = P.renderedToModel(ne), Re = Jo(Je, j.reverse ? "source" : "target"), _e = (Re == null ? void 0 : Re.nodeId) ?? oo(Je);
|
|
17457
|
+
if (_e === j.source && (j.sourceProperty === void 0 || (Re == null ? void 0 : Re.property) === void 0 || Re.property === j.sourceProperty))
|
|
17458
17458
|
break;
|
|
17459
|
-
|
|
17459
|
+
_e ? (X = K.onEdgeDraw) == null || X.call(
|
|
17460
17460
|
K,
|
|
17461
|
-
j.reverse ?
|
|
17462
|
-
j.reverse ? j.source :
|
|
17461
|
+
j.reverse ? _e : j.source,
|
|
17462
|
+
j.reverse ? j.source : _e,
|
|
17463
17463
|
j.sourceProperty !== void 0 || (Re == null ? void 0 : Re.property) !== void 0 ? {
|
|
17464
17464
|
sourceProperty: j.reverse ? Re == null ? void 0 : Re.property : j.sourceProperty,
|
|
17465
17465
|
targetProperty: j.reverse ? j.sourceProperty : Re == null ? void 0 : Re.property
|
|
@@ -17476,7 +17476,7 @@ function sk(e) {
|
|
|
17476
17476
|
const k = mt.current, q = [...Et.current.keys()];
|
|
17477
17477
|
k && k.kind !== "pinch" && q.push(k.pointerId), mt.current = null, Et.current.clear(), Qt(null), yn(null), ro(null);
|
|
17478
17478
|
for (const K of q)
|
|
17479
|
-
(k == null ? void 0 : k.kind) === "grid" && k.captureTarget.hasPointerCapture(K) && k.captureTarget.releasePointerCapture(K), (j =
|
|
17479
|
+
(k == null ? void 0 : k.kind) === "grid" && k.captureTarget.hasPointerCapture(K) && k.captureTarget.releasePointerCapture(K), (j = O.current) != null && j.hasPointerCapture(K) && O.current.releasePointerCapture(K);
|
|
17480
17480
|
}, []);
|
|
17481
17481
|
Ue(() => {
|
|
17482
17482
|
const k = (q) => {
|
|
@@ -17512,7 +17512,7 @@ function sk(e) {
|
|
|
17512
17512
|
!!((ku = e.edgeReveal) != null && ku.revealNodes)
|
|
17513
17513
|
);
|
|
17514
17514
|
Ot(() => {
|
|
17515
|
-
|
|
17515
|
+
O.current && Xo && XE(O.current);
|
|
17516
17516
|
});
|
|
17517
17517
|
const Qo = aC(E, Ze, Zo), _0 = e.onEdgeSelect, E0 = e.onContainerSelect, Cu = lt ? lt.target && Ze(lt.target, lt.targetProperty) || {
|
|
17518
17518
|
x: lt.point.x,
|
|
@@ -17527,7 +17527,7 @@ function sk(e) {
|
|
|
17527
17527
|
return /* @__PURE__ */ D(
|
|
17528
17528
|
"div",
|
|
17529
17529
|
{
|
|
17530
|
-
ref:
|
|
17530
|
+
ref: O,
|
|
17531
17531
|
className: k0,
|
|
17532
17532
|
"data-edge-mode": o,
|
|
17533
17533
|
"data-node-grid": He || void 0,
|
|
@@ -17546,7 +17546,7 @@ function sk(e) {
|
|
|
17546
17546
|
(Ft.current || e.readOnly && !q) && (k.preventDefault(), k.stopPropagation());
|
|
17547
17547
|
},
|
|
17548
17548
|
children: [
|
|
17549
|
-
/* @__PURE__ */ y("svg", { className: "flow-sdk-svg", children: /* @__PURE__ */ D("g", { ref:
|
|
17549
|
+
/* @__PURE__ */ y("svg", { className: "flow-sdk-svg", children: /* @__PURE__ */ D("g", { ref: I, children: [
|
|
17550
17550
|
/* @__PURE__ */ y("g", { className: "flow-sdk-containers", children: [...V].filter(([k]) => sr(k, t, o)).filter(([k]) => !_ || _.has(k)).map(([k, q]) => {
|
|
17551
17551
|
var j, K;
|
|
17552
17552
|
return /* @__PURE__ */ y(
|
|
@@ -17661,7 +17661,7 @@ function sk(e) {
|
|
|
17661
17661
|
{
|
|
17662
17662
|
dividers: ht,
|
|
17663
17663
|
options: Ke.current.options,
|
|
17664
|
-
zoom:
|
|
17664
|
+
zoom: P.zoom,
|
|
17665
17665
|
onChange: (k) => St.setNodeGridMode(!0, { ...k, animate: !1 })
|
|
17666
17666
|
}
|
|
17667
17667
|
),
|
|
@@ -17669,14 +17669,14 @@ function sk(e) {
|
|
|
17669
17669
|
var Je, Re;
|
|
17670
17670
|
const q = Z.get(k.id), j = V.get(k.id);
|
|
17671
17671
|
if (j && k.label !== void 0) return null;
|
|
17672
|
-
const K = (q == null ? void 0 : q.x) ?? (j ? (j.x1 + j.x2) / 2 : 0), le = (q == null ? void 0 : q.y) ?? (j ? (j.y1 + j.y2) / 2 : 0), Me = Ve != null && Ve.target ? k.id === Ve.source ? Ve.target : k.id === Ve.target ? Ve.source : void 0 : void 0, xe = Me ? Z.get(Me) : void 0,
|
|
17673
|
-
x: Ie.x -
|
|
17674
|
-
y: Ie.y -
|
|
17675
|
-
} : void 0, Ne =
|
|
17672
|
+
const K = (q == null ? void 0 : q.x) ?? (j ? (j.x1 + j.x2) / 2 : 0), le = (q == null ? void 0 : q.y) ?? (j ? (j.y1 + j.y2) / 2 : 0), Me = Ve != null && Ve.target ? k.id === Ve.source ? Ve.target : k.id === Ve.target ? Ve.source : void 0 : void 0, xe = Me ? Z.get(Me) : void 0, ke = Ve ? Z.get(Ve.source) : void 0, Ie = Ve != null && Ve.target ? Z.get(Ve.target) : void 0, Ae = ke && Ie ? {
|
|
17673
|
+
x: Ie.x - ke.x,
|
|
17674
|
+
y: Ie.y - ke.y
|
|
17675
|
+
} : void 0, Ne = Ae ? Ae.x ** 2 + Ae.y ** 2 : 0, Xe = Ne && Ve && Ae ? Math.max(
|
|
17676
17676
|
0,
|
|
17677
17677
|
Math.min(
|
|
17678
17678
|
1,
|
|
17679
|
-
(Ve.offset.x *
|
|
17679
|
+
(Ve.offset.x * Ae.x + Ve.offset.y * Ae.y) / Ne
|
|
17680
17680
|
)
|
|
17681
17681
|
) : 0, Y = xe ? {
|
|
17682
17682
|
x: K + (xe.x - K) * Xe,
|
|
@@ -17706,9 +17706,9 @@ function sk(e) {
|
|
|
17706
17706
|
drawHandles: e.drawHandles && !e.readOnly && mn,
|
|
17707
17707
|
drawMode: p && mn,
|
|
17708
17708
|
connectedPorts: new Set(
|
|
17709
|
-
E.flatMap((
|
|
17710
|
-
...
|
|
17711
|
-
...
|
|
17709
|
+
E.flatMap((_e) => [
|
|
17710
|
+
..._e.source === k.id && _e.sourceProperty !== void 0 ? [`source:${_e.sourceProperty}`] : [],
|
|
17711
|
+
..._e.target === k.id && _e.targetProperty !== void 0 ? [`target:${_e.targetProperty}`] : []
|
|
17712
17712
|
])
|
|
17713
17713
|
),
|
|
17714
17714
|
hasCollapseControl: k.hasCollapseControl,
|
|
@@ -17720,7 +17720,7 @@ function sk(e) {
|
|
|
17720
17720
|
width: (Je = H.current.get(k.id)) == null ? void 0 : Je.w,
|
|
17721
17721
|
height: (Re = H.current.get(k.id)) == null ? void 0 : Re.h,
|
|
17722
17722
|
propertyMode: M,
|
|
17723
|
-
resolvedRows:
|
|
17723
|
+
resolvedRows: Ee.get(k.id),
|
|
17724
17724
|
reversePorts: n === "RL",
|
|
17725
17725
|
direction: n,
|
|
17726
17726
|
onPropertyRows: ce,
|
|
@@ -17752,7 +17752,7 @@ function sk(e) {
|
|
|
17752
17752
|
"g",
|
|
17753
17753
|
{
|
|
17754
17754
|
ref: N,
|
|
17755
|
-
transform: `translate(${
|
|
17755
|
+
transform: `translate(${P.pan.x} ${P.pan.y}) scale(${P.zoom})`,
|
|
17756
17756
|
children: /* @__PURE__ */ y(
|
|
17757
17757
|
"g",
|
|
17758
17758
|
{
|
|
@@ -18122,7 +18122,7 @@ const Im = ({
|
|
|
18122
18122
|
editOnMount: o = !1,
|
|
18123
18123
|
hoverLeaveDelay: s = 0
|
|
18124
18124
|
}) => {
|
|
18125
|
-
var ue, we,
|
|
18125
|
+
var ue, we, Ce, ye, pe, J;
|
|
18126
18126
|
const {
|
|
18127
18127
|
selectedNodeIds: a,
|
|
18128
18128
|
setSelectedNodeIds: c,
|
|
@@ -18146,11 +18146,11 @@ const Im = ({
|
|
|
18146
18146
|
);
|
|
18147
18147
|
const [E, T] = re(!1), [R, A] = re(
|
|
18148
18148
|
o && !!p.editable && !p.readOnly
|
|
18149
|
-
), [
|
|
18149
|
+
), [O, I] = re(!1), N = e == null ? void 0 : e.id, $ = Wb(N), P = a.includes(N), H = p.nodeOverlayActions, oe = p.renderNodeOverlay, ae = (e == null ? void 0 : e.type) === "grid" ? "20px" : "-100px", Q = (e == null ? void 0 : e.type) === "grid" ? "top center" : void 0, me = (() => {
|
|
18150
18150
|
var L;
|
|
18151
18151
|
try {
|
|
18152
|
-
const
|
|
18153
|
-
return
|
|
18152
|
+
const ie = (L = m.current) == null ? void 0 : L.zoom();
|
|
18153
|
+
return ie !== void 0 && ie < 0.08;
|
|
18154
18154
|
} catch {
|
|
18155
18155
|
return !1;
|
|
18156
18156
|
}
|
|
@@ -18158,7 +18158,7 @@ const Im = ({
|
|
|
18158
18158
|
(L) => {
|
|
18159
18159
|
var U, fe, be, qe;
|
|
18160
18160
|
if (R || p.readOnly) return;
|
|
18161
|
-
const
|
|
18161
|
+
const ie = {
|
|
18162
18162
|
shiftKey: L.shiftKey,
|
|
18163
18163
|
ctrlKey: L.ctrlKey,
|
|
18164
18164
|
metaKey: L.metaKey,
|
|
@@ -18166,9 +18166,9 @@ const Im = ({
|
|
|
18166
18166
|
};
|
|
18167
18167
|
if (d && (l(null), (U = g.onEdgeDeselect) == null || U.call(g)), u || L.shiftKey && (f != null && f.fill)) {
|
|
18168
18168
|
const je = a.includes(N), We = je ? a.filter((at) => at !== N) : [...a, N];
|
|
18169
|
-
c(We), je ? (fe = g.onNodeDeselect) == null || fe.call(g) : (be = g.onNodeSelect) == null || be.call(g, N, e,
|
|
18169
|
+
c(We), je ? (fe = g.onNodeDeselect) == null || fe.call(g) : (be = g.onNodeSelect) == null || be.call(g, N, e, ie);
|
|
18170
18170
|
} else
|
|
18171
|
-
c([N]), (qe = g.onNodeSelect) == null || qe.call(g, N, e,
|
|
18171
|
+
c([N]), (qe = g.onNodeSelect) == null || qe.call(g, N, e, ie);
|
|
18172
18172
|
},
|
|
18173
18173
|
[
|
|
18174
18174
|
N,
|
|
@@ -18190,8 +18190,8 @@ const Im = ({
|
|
|
18190
18190
|
M.current && clearTimeout(M.current), M.current = setTimeout(() => T(!0), 100);
|
|
18191
18191
|
}, []), W = dt(
|
|
18192
18192
|
(L) => {
|
|
18193
|
-
var
|
|
18194
|
-
L.relatedTarget instanceof Node && ((
|
|
18193
|
+
var ie;
|
|
18194
|
+
L.relatedTarget instanceof Node && ((ie = _.current) != null && ie.contains(L.relatedTarget)) || (M.current && clearTimeout(M.current), s ? M.current = setTimeout(
|
|
18195
18195
|
() => T(!1),
|
|
18196
18196
|
s
|
|
18197
18197
|
) : T(!1));
|
|
@@ -18200,26 +18200,26 @@ const Im = ({
|
|
|
18200
18200
|
), F = !!((ue = e == null ? void 0 : e.config) != null && ue.form), ce = {
|
|
18201
18201
|
tabIndex: F ? 0 : void 0,
|
|
18202
18202
|
"aria-haspopup": F ? "dialog" : void 0,
|
|
18203
|
-
"aria-expanded": F ?
|
|
18203
|
+
"aria-expanded": F ? O : void 0,
|
|
18204
18204
|
onDoubleClickCapture: (L) => {
|
|
18205
|
-
var
|
|
18205
|
+
var ie;
|
|
18206
18206
|
!F && !i || p.readOnly || R || !L.currentTarget.contains(L.target) || L.target instanceof Element && L.target.closest(
|
|
18207
18207
|
"button, input, textarea, select, a, [contenteditable=true], [data-flow-content]"
|
|
18208
|
-
) || (L.preventDefault(), L.stopPropagation(), c([N]), i ? i() :
|
|
18208
|
+
) || (L.preventDefault(), L.stopPropagation(), c([N]), i ? i() : I(!0), (ie = g.onNodeDoubleClick) == null || ie.call(g, N, e));
|
|
18209
18209
|
},
|
|
18210
18210
|
onKeyDown: (L) => {
|
|
18211
|
-
!F && !i || p.readOnly || L.target !== L.currentTarget || L.key !== "Enter" || (L.preventDefault(), L.stopPropagation(), c([N]), i ? i() :
|
|
18211
|
+
!F && !i || p.readOnly || L.target !== L.currentTarget || L.key !== "Enter" || (L.preventDefault(), L.stopPropagation(), c([N]), i ? i() : I(!0));
|
|
18212
18212
|
}
|
|
18213
18213
|
}, Z = F && /* @__PURE__ */ y(
|
|
18214
18214
|
p0,
|
|
18215
18215
|
{
|
|
18216
18216
|
nodeAddress: N,
|
|
18217
|
-
active:
|
|
18217
|
+
active: P,
|
|
18218
18218
|
label: e.label || e.headerTitle || "Node",
|
|
18219
|
-
open:
|
|
18219
|
+
open: O,
|
|
18220
18220
|
onClose: () => {
|
|
18221
18221
|
var L;
|
|
18222
|
-
|
|
18222
|
+
I(!1), P && ((L = _.current) == null || L.focus({ preventScroll: !0 }));
|
|
18223
18223
|
}
|
|
18224
18224
|
}
|
|
18225
18225
|
), se = Array.isArray((we = e == null ? void 0 : e.config) == null ? void 0 : we.ports) ? e.config.ports.map((L) => /* @__PURE__ */ y(dk, { ...L }, `${L.id}:${L.role}`)) : null;
|
|
@@ -18236,7 +18236,7 @@ const Im = ({
|
|
|
18236
18236
|
position: "relative",
|
|
18237
18237
|
children: [
|
|
18238
18238
|
Z,
|
|
18239
|
-
!h && (
|
|
18239
|
+
!h && (oe || H && H.length > 0) && E && !me && /* @__PURE__ */ D(Be, { children: [
|
|
18240
18240
|
/* @__PURE__ */ y(
|
|
18241
18241
|
Oe,
|
|
18242
18242
|
{
|
|
@@ -18250,7 +18250,7 @@ const Im = ({
|
|
|
18250
18250
|
onMouseLeave: W
|
|
18251
18251
|
}
|
|
18252
18252
|
),
|
|
18253
|
-
|
|
18253
|
+
oe ? /* @__PURE__ */ y(
|
|
18254
18254
|
Oe,
|
|
18255
18255
|
{
|
|
18256
18256
|
position: "absolute",
|
|
@@ -18263,7 +18263,7 @@ const Im = ({
|
|
|
18263
18263
|
onMouseEnter: () => T(!0),
|
|
18264
18264
|
onMouseLeave: W,
|
|
18265
18265
|
willChange: "transform",
|
|
18266
|
-
children:
|
|
18266
|
+
children: oe({
|
|
18267
18267
|
nodeId: N,
|
|
18268
18268
|
nodeData: e,
|
|
18269
18269
|
isRoot: N === "root",
|
|
@@ -18291,8 +18291,8 @@ const Im = ({
|
|
|
18291
18291
|
onMouseEnter: () => T(!0),
|
|
18292
18292
|
onMouseLeave: W,
|
|
18293
18293
|
willChange: "transform",
|
|
18294
|
-
children: /* @__PURE__ */ y(Cr, { px: 2, gap: 2, children: H.map((L,
|
|
18295
|
-
|
|
18294
|
+
children: /* @__PURE__ */ y(Cr, { px: 2, gap: 2, children: H.map((L, ie) => /* @__PURE__ */ D(Oe, { display: "contents", children: [
|
|
18295
|
+
ie > 0 && /* @__PURE__ */ y(
|
|
18296
18296
|
Oe,
|
|
18297
18297
|
{
|
|
18298
18298
|
borderColor: C,
|
|
@@ -18328,7 +18328,7 @@ const Im = ({
|
|
|
18328
18328
|
r({
|
|
18329
18329
|
id: N,
|
|
18330
18330
|
data: e,
|
|
18331
|
-
isActive:
|
|
18331
|
+
isActive: P,
|
|
18332
18332
|
isHovered: E,
|
|
18333
18333
|
isLowZoom: me,
|
|
18334
18334
|
isEditing: R,
|
|
@@ -18336,9 +18336,9 @@ const Im = ({
|
|
|
18336
18336
|
onEditStart: () => A(!0),
|
|
18337
18337
|
onEditEnd: () => A(!1)
|
|
18338
18338
|
}),
|
|
18339
|
-
$ && !((
|
|
18339
|
+
$ && !((Ce = e == null ? void 0 : e.config) != null && Ce.parentContainer) && ((ye = e == null ? void 0 : e.config) == null ? void 0 : ye.collapsed) !== void 0 && (() => {
|
|
18340
18340
|
var U;
|
|
18341
|
-
const L = b === "TB" || b === "BT",
|
|
18341
|
+
const L = b === "TB" || b === "BT", ie = t || b === "RL";
|
|
18342
18342
|
return /* @__PURE__ */ y(
|
|
18343
18343
|
El,
|
|
18344
18344
|
{
|
|
@@ -18348,8 +18348,8 @@ const Im = ({
|
|
|
18348
18348
|
left: "50%",
|
|
18349
18349
|
transform: "translateX(-50%)"
|
|
18350
18350
|
} : {
|
|
18351
|
-
right:
|
|
18352
|
-
left:
|
|
18351
|
+
right: ie ? void 0 : "-75px",
|
|
18352
|
+
left: ie ? "-75px" : void 0,
|
|
18353
18353
|
top: "50%",
|
|
18354
18354
|
transform: "translateY(-50%)"
|
|
18355
18355
|
},
|
|
@@ -18396,7 +18396,7 @@ const Im = ({
|
|
|
18396
18396
|
children: [
|
|
18397
18397
|
Z,
|
|
18398
18398
|
se,
|
|
18399
|
-
!h && (
|
|
18399
|
+
!h && (oe || H && H.length > 0) && E && !me && /* @__PURE__ */ D(Be, { children: [
|
|
18400
18400
|
/* @__PURE__ */ y(
|
|
18401
18401
|
Oe,
|
|
18402
18402
|
{
|
|
@@ -18410,7 +18410,7 @@ const Im = ({
|
|
|
18410
18410
|
onMouseLeave: W
|
|
18411
18411
|
}
|
|
18412
18412
|
),
|
|
18413
|
-
|
|
18413
|
+
oe ? /* @__PURE__ */ y(
|
|
18414
18414
|
Oe,
|
|
18415
18415
|
{
|
|
18416
18416
|
position: "absolute",
|
|
@@ -18423,7 +18423,7 @@ const Im = ({
|
|
|
18423
18423
|
onMouseEnter: () => T(!0),
|
|
18424
18424
|
onMouseLeave: W,
|
|
18425
18425
|
willChange: "transform",
|
|
18426
|
-
children:
|
|
18426
|
+
children: oe({
|
|
18427
18427
|
nodeId: N,
|
|
18428
18428
|
nodeData: e,
|
|
18429
18429
|
isRoot: N === "root",
|
|
@@ -18451,8 +18451,8 @@ const Im = ({
|
|
|
18451
18451
|
onMouseEnter: () => T(!0),
|
|
18452
18452
|
onMouseLeave: W,
|
|
18453
18453
|
willChange: "transform",
|
|
18454
|
-
children: /* @__PURE__ */ y(Cr, { px: 2, gap: 2, children: H.map((L,
|
|
18455
|
-
|
|
18454
|
+
children: /* @__PURE__ */ y(Cr, { px: 2, gap: 2, children: H.map((L, ie) => /* @__PURE__ */ D(Oe, { display: "contents", children: [
|
|
18455
|
+
ie > 0 && /* @__PURE__ */ y(
|
|
18456
18456
|
Oe,
|
|
18457
18457
|
{
|
|
18458
18458
|
borderColor: C,
|
|
@@ -18488,7 +18488,7 @@ const Im = ({
|
|
|
18488
18488
|
/* @__PURE__ */ D(Oe, { position: "relative", display: "flex", h: "100%", w: "100%", children: [
|
|
18489
18489
|
$ && !((pe = e == null ? void 0 : e.config) != null && pe.parentContainer) && ((J = e == null ? void 0 : e.config) == null ? void 0 : J.collapsed) !== void 0 && !n && (() => {
|
|
18490
18490
|
var fe, be, qe;
|
|
18491
|
-
const L = b === "TB" || b === "BT",
|
|
18491
|
+
const L = b === "TB" || b === "BT", ie = t || b === "RL", U = (fe = e == null ? void 0 : e.config) != null && fe.labelBelow && w[N] !== "properties" ? ((((be = e == null ? void 0 : e.viewProps) == null ? void 0 : be.fontSize) || 1) * 100 + 100) / 2 : void 0;
|
|
18492
18492
|
return /* @__PURE__ */ y(
|
|
18493
18493
|
El,
|
|
18494
18494
|
{
|
|
@@ -18498,8 +18498,8 @@ const Im = ({
|
|
|
18498
18498
|
left: "50%",
|
|
18499
18499
|
transform: "translateX(-50%)"
|
|
18500
18500
|
} : {
|
|
18501
|
-
right:
|
|
18502
|
-
left:
|
|
18501
|
+
right: ie ? void 0 : U === void 0 ? "-75px" : `calc(50% - ${U + 75}px)`,
|
|
18502
|
+
left: ie ? U === void 0 ? "-75px" : `calc(50% - ${U + 75}px)` : void 0,
|
|
18503
18503
|
alignSelf: U === void 0 ? "center" : void 0,
|
|
18504
18504
|
top: U === void 0 ? void 0 : `${U}px`,
|
|
18505
18505
|
transform: U === void 0 ? void 0 : "translateY(-50%)",
|
|
@@ -18534,7 +18534,7 @@ const Im = ({
|
|
|
18534
18534
|
r({
|
|
18535
18535
|
id: N,
|
|
18536
18536
|
data: e,
|
|
18537
|
-
isActive:
|
|
18537
|
+
isActive: P,
|
|
18538
18538
|
isHovered: E,
|
|
18539
18539
|
isLowZoom: me,
|
|
18540
18540
|
isEditing: R,
|
|
@@ -18642,7 +18642,7 @@ const pk = ({
|
|
|
18642
18642
|
onEditStart: i,
|
|
18643
18643
|
onEditEnd: o
|
|
18644
18644
|
}) => {
|
|
18645
|
-
var w, x, C, S, _, M, E, T, R, A,
|
|
18645
|
+
var w, x, C, S, _, M, E, T, R, A, O, I, N, $, P;
|
|
18646
18646
|
const { themeColor: s } = rt(), { colorText: a } = ut(), c = ((w = t == null ? void 0 : t.viewProps) == null ? void 0 : w.bgColor) === "transparent", d = ((x = t == null ? void 0 : t.viewProps) == null ? void 0 : x.outline) === !0, l = !c && ((C = t == null ? void 0 : t.viewProps) == null ? void 0 : C.bgColor) || s, { borderColor: u, highlightColor: f, textColor: h } = Co(l), m = Pe(
|
|
18647
18647
|
((S = t == null ? void 0 : t.viewProps) == null ? void 0 : S.textColor) || (c || d ? a : h)
|
|
18648
18648
|
), g = c && !d && !((_ = t == null ? void 0 : t.viewProps) != null && _.borderColor) ? "transparent" : Pe(
|
|
@@ -18693,14 +18693,14 @@ const pk = ({
|
|
|
18693
18693
|
{
|
|
18694
18694
|
nodeId: e,
|
|
18695
18695
|
label: b,
|
|
18696
|
-
color: `var(--flow-grid-caption-color, ${Pe(((
|
|
18696
|
+
color: `var(--flow-grid-caption-color, ${Pe(((O = t == null ? void 0 : t.viewProps) == null ? void 0 : O.textColor) || a)})`,
|
|
18697
18697
|
isEditing: n,
|
|
18698
18698
|
onEditStart: i,
|
|
18699
18699
|
onEditEnd: o,
|
|
18700
18700
|
wrap: !0
|
|
18701
18701
|
}
|
|
18702
18702
|
),
|
|
18703
|
-
typeof ((
|
|
18703
|
+
typeof ((I = t.config) == null ? void 0 : I.subtitle) == "string" && t.config.subtitle !== "" && /* @__PURE__ */ y(
|
|
18704
18704
|
Wt,
|
|
18705
18705
|
{
|
|
18706
18706
|
"data-flow-node-subtitle": "",
|
|
@@ -18744,7 +18744,7 @@ const pk = ({
|
|
|
18744
18744
|
lr,
|
|
18745
18745
|
{
|
|
18746
18746
|
name: v,
|
|
18747
|
-
size: (((
|
|
18747
|
+
size: (((P = t == null ? void 0 : t.viewProps) == null ? void 0 : P.fontSize) || 1) * 100,
|
|
18748
18748
|
color: m
|
|
18749
18749
|
},
|
|
18750
18750
|
m
|
|
@@ -18895,7 +18895,7 @@ function mk({
|
|
|
18895
18895
|
try {
|
|
18896
18896
|
const $ = typeof e == "string" ? JSON.parse(e) : e;
|
|
18897
18897
|
if (!Array.isArray($) || $.some(
|
|
18898
|
-
(
|
|
18898
|
+
(P) => !P || typeof P != "object" || Array.isArray(P) || typeof P.type != "string"
|
|
18899
18899
|
))
|
|
18900
18900
|
throw new Error(
|
|
18901
18901
|
"JSX content must be an array of components with a type."
|
|
@@ -18908,8 +18908,8 @@ function mk({
|
|
|
18908
18908
|
Ue(() => {
|
|
18909
18909
|
const $ = () => {
|
|
18910
18910
|
var H;
|
|
18911
|
-
const
|
|
18912
|
-
v(
|
|
18911
|
+
const P = document.fullscreenElement === h.current;
|
|
18912
|
+
v(P), g.current && !P && !document.fullscreenElement && ((H = m.current) == null || H.focus({ preventScroll: !0 })), g.current = P;
|
|
18913
18913
|
};
|
|
18914
18914
|
return document.addEventListener("fullscreenchange", $), () => document.removeEventListener("fullscreenchange", $);
|
|
18915
18915
|
}, []);
|
|
@@ -18922,9 +18922,9 @@ function mk({
|
|
|
18922
18922
|
else if (($ = h.current) != null && $.requestFullscreen)
|
|
18923
18923
|
await h.current.requestFullscreen();
|
|
18924
18924
|
else throw new Error("Fullscreen is not supported in this browser.");
|
|
18925
|
-
} catch (
|
|
18925
|
+
} catch (P) {
|
|
18926
18926
|
w(
|
|
18927
|
-
|
|
18927
|
+
P instanceof Error ? P.message : "Unable to change fullscreen."
|
|
18928
18928
|
);
|
|
18929
18929
|
}
|
|
18930
18930
|
}, [S, _] = re(), [M, E] = re(), [T, R] = re();
|
|
@@ -18932,17 +18932,17 @@ function mk({
|
|
|
18932
18932
|
if (r === "jsx") return;
|
|
18933
18933
|
let $ = !1;
|
|
18934
18934
|
return import("./contentPreviewDocument-C2D0H-Lr.js").then(
|
|
18935
|
-
({ contentPreviewDocument:
|
|
18935
|
+
({ contentPreviewDocument: P }) => P(d, r, x)
|
|
18936
18936
|
).then(
|
|
18937
|
-
(
|
|
18938
|
-
$ || _({ content: d, format: r, editable: x, document:
|
|
18937
|
+
(P) => {
|
|
18938
|
+
$ || _({ content: d, format: r, editable: x, document: P });
|
|
18939
18939
|
},
|
|
18940
|
-
(
|
|
18940
|
+
(P) => {
|
|
18941
18941
|
$ || _({
|
|
18942
18942
|
content: d,
|
|
18943
18943
|
format: r,
|
|
18944
18944
|
editable: x,
|
|
18945
|
-
error:
|
|
18945
|
+
error: P instanceof Error ? P.message : String(P)
|
|
18946
18946
|
});
|
|
18947
18947
|
}
|
|
18948
18948
|
), () => {
|
|
@@ -18950,9 +18950,9 @@ function mk({
|
|
|
18950
18950
|
};
|
|
18951
18951
|
}, [d, r, x]), Ue(() => {
|
|
18952
18952
|
if (!t) return;
|
|
18953
|
-
const $ = async (
|
|
18954
|
-
var H,
|
|
18955
|
-
if (!(!((H = f.current) != null && H.contentWindow) ||
|
|
18953
|
+
const $ = async (P) => {
|
|
18954
|
+
var H, oe;
|
|
18955
|
+
if (!(!((H = f.current) != null && H.contentWindow) || P.source !== f.current.contentWindow || ((oe = P.data) == null ? void 0 : oe.type) !== "squeed:content-edit"))
|
|
18956
18956
|
try {
|
|
18957
18957
|
document.fullscreenElement === h.current && await document.exitFullscreen(), t();
|
|
18958
18958
|
} catch (ae) {
|
|
@@ -18963,7 +18963,7 @@ function mk({
|
|
|
18963
18963
|
};
|
|
18964
18964
|
return window.addEventListener("message", $), () => window.removeEventListener("message", $);
|
|
18965
18965
|
}, [t]);
|
|
18966
|
-
const A = (S == null ? void 0 : S.content) === d && S.format === r && S.editable === x ? S : void 0,
|
|
18966
|
+
const A = (S == null ? void 0 : S.content) === d && S.format === r && S.editable === x ? S : void 0, O = !!A && A === T, I = r !== "jsx" && !(A != null && A.error) && !O && (!A || M !== A);
|
|
18967
18967
|
return /* @__PURE__ */ D(
|
|
18968
18968
|
"div",
|
|
18969
18969
|
{
|
|
@@ -18985,14 +18985,14 @@ function mk({
|
|
|
18985
18985
|
position: "relative",
|
|
18986
18986
|
w: "100%",
|
|
18987
18987
|
h: "100%",
|
|
18988
|
-
"aria-busy": r !== "jsx" ?
|
|
18988
|
+
"aria-busy": r !== "jsx" ? I : void 0,
|
|
18989
18989
|
bg: r === "jsx" && i === "dark" ? "gray.900" : "white",
|
|
18990
18990
|
onDoubleClick: ($) => {
|
|
18991
18991
|
r !== "jsx" || !t || $.defaultPrevented || $.target.closest(
|
|
18992
18992
|
'button, a, input, textarea, select, [contenteditable], [role="button"], [role="textbox"]'
|
|
18993
18993
|
) || ($.stopPropagation(), (async () => {
|
|
18994
18994
|
document.fullscreenElement === h.current && await document.exitFullscreen(), t();
|
|
18995
|
-
})().catch((
|
|
18995
|
+
})().catch((P) => w(String(P))));
|
|
18996
18996
|
},
|
|
18997
18997
|
onKeyDownCapture: ($) => {
|
|
18998
18998
|
$.key !== "Escape" || document.fullscreenElement !== h.current || ($.preventDefault(), $.stopPropagation(), C());
|
|
@@ -19069,7 +19069,7 @@ function mk({
|
|
|
19069
19069
|
onClick: ($) => {
|
|
19070
19070
|
$.stopPropagation(), (async () => {
|
|
19071
19071
|
document.fullscreenElement === h.current && await document.exitFullscreen(), t();
|
|
19072
|
-
})().catch((
|
|
19072
|
+
})().catch((P) => w(String(P)));
|
|
19073
19073
|
}
|
|
19074
19074
|
}
|
|
19075
19075
|
),
|
|
@@ -19123,7 +19123,7 @@ function mk({
|
|
|
19123
19123
|
colorMode: i,
|
|
19124
19124
|
fillHeight: !0
|
|
19125
19125
|
}
|
|
19126
|
-
) : /* @__PURE__ */ y(Oe, { role: "status", fontSize: "14px", children: "JSX content renderer is not available." }) : A != null && A.error ||
|
|
19126
|
+
) : /* @__PURE__ */ y(Oe, { role: "status", fontSize: "14px", children: "JSX content renderer is not available." }) : A != null && A.error || O ? /* @__PURE__ */ y("pre", { role: "alert", style: { whiteSpace: "pre-wrap" }, children: (A == null ? void 0 : A.error) || "Content preview could not be loaded." }) : A != null && A.document ? /* @__PURE__ */ y(
|
|
19127
19127
|
"iframe",
|
|
19128
19128
|
{
|
|
19129
19129
|
ref: f,
|
|
@@ -19140,12 +19140,12 @@ function mk({
|
|
|
19140
19140
|
border: 0,
|
|
19141
19141
|
display: "block",
|
|
19142
19142
|
background: "white",
|
|
19143
|
-
visibility:
|
|
19143
|
+
visibility: I ? "hidden" : "visible"
|
|
19144
19144
|
}
|
|
19145
19145
|
},
|
|
19146
19146
|
A.document
|
|
19147
19147
|
) : null,
|
|
19148
|
-
/* @__PURE__ */ y(yk, { active:
|
|
19148
|
+
/* @__PURE__ */ y(yk, { active: I, label: "Loading HTML content" })
|
|
19149
19149
|
]
|
|
19150
19150
|
}
|
|
19151
19151
|
)
|
|
@@ -19387,17 +19387,19 @@ function _k({
|
|
|
19387
19387
|
hasConfig: o,
|
|
19388
19388
|
id: s,
|
|
19389
19389
|
isActive: a,
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19390
|
+
isHovered: c,
|
|
19391
|
+
isEditing: d,
|
|
19392
|
+
onSelect: l,
|
|
19393
|
+
onEditStart: u,
|
|
19394
|
+
onEditEnd: f,
|
|
19395
|
+
props: h,
|
|
19396
|
+
objVisible: m,
|
|
19397
|
+
setObjVisible: g,
|
|
19398
|
+
onShowNativeIcon: p
|
|
19397
19399
|
}) {
|
|
19398
|
-
var
|
|
19399
|
-
const { callbacks:
|
|
19400
|
-
return /* @__PURE__ */ y(Be, { children: (e || r || ((
|
|
19400
|
+
var x, C;
|
|
19401
|
+
const { callbacks: v } = rt(), b = h.onShowIcon ?? p, w = b ? "Show icon" : m ? "Show content" : "Show properties";
|
|
19402
|
+
return /* @__PURE__ */ y(Be, { children: (e || r || ((x = t.config) == null ? void 0 : x.form) || (a || c) && p) && /* @__PURE__ */ D(
|
|
19401
19403
|
wt,
|
|
19402
19404
|
{
|
|
19403
19405
|
justify: "flex-start",
|
|
@@ -19429,25 +19431,25 @@ function _k({
|
|
|
19429
19431
|
{
|
|
19430
19432
|
nodeId: s,
|
|
19431
19433
|
label: xk(e),
|
|
19432
|
-
color: ((
|
|
19433
|
-
isEditing:
|
|
19434
|
-
onEditStart:
|
|
19435
|
-
onEditEnd:
|
|
19434
|
+
color: ((C = t == null ? void 0 : t.viewProps) == null ? void 0 : C.textColor) || i.propertyColor,
|
|
19435
|
+
isEditing: d,
|
|
19436
|
+
onEditStart: u,
|
|
19437
|
+
onEditEnd: f
|
|
19436
19438
|
}
|
|
19437
19439
|
),
|
|
19438
|
-
a && (r ||
|
|
19440
|
+
(a || c) && (r || b) && /* @__PURE__ */ y(Oe, { ml: "auto", pl: 6, flexShrink: 0, "data-flow-content-toggle": "", children: /* @__PURE__ */ y(Ye, { label: w, children: /* @__PURE__ */ y(
|
|
19439
19441
|
$e,
|
|
19440
19442
|
{
|
|
19441
|
-
"aria-label":
|
|
19443
|
+
"aria-label": w,
|
|
19442
19444
|
icon: /* @__PURE__ */ y(Ge, { as: Gl, boxSize: 4 }),
|
|
19443
19445
|
variant: "ghost",
|
|
19444
19446
|
w: 12,
|
|
19445
19447
|
h: 12,
|
|
19446
19448
|
minW: 12,
|
|
19447
19449
|
color: i.hextextColor,
|
|
19448
|
-
onClick: (
|
|
19449
|
-
var
|
|
19450
|
-
|
|
19450
|
+
onClick: (S) => {
|
|
19451
|
+
var _;
|
|
19452
|
+
S.stopPropagation(), a || l(S), b ? b() : g(!m), (_ = v.onNodeViewToggle) == null || _.call(v, s);
|
|
19451
19453
|
}
|
|
19452
19454
|
}
|
|
19453
19455
|
) }) })
|
|
@@ -19470,10 +19472,10 @@ function Ek({
|
|
|
19470
19472
|
for (const { data: u } of d.values())
|
|
19471
19473
|
u.source === e.id && u.sourceProperty !== void 0 && l.add(`source:${u.sourceProperty}`), u.target === e.id && u.targetProperty !== void 0 && l.add(`target:${u.targetProperty}`);
|
|
19472
19474
|
return /* @__PURE__ */ y(Oe, { children: Object.entries(e.description || {}).map(([u, f], h) => {
|
|
19473
|
-
var
|
|
19475
|
+
var O, I, N;
|
|
19474
19476
|
const m = r && Object.keys(r).find(
|
|
19475
19477
|
($) => $.slice($.indexOf(":") + 1) === u
|
|
19476
|
-
), g = t && ((
|
|
19478
|
+
), g = t && ((O = n == null ? void 0 : n.type.ports) == null ? void 0 : O[u]), p = m ?? (g ? `${g.kind}:${u}` : u), v = i.find(
|
|
19477
19479
|
($) => $.id === p
|
|
19478
19480
|
), b = m ? "source" : v == null ? void 0 : v.role, w = l.has(`source:${p}`), x = l.has(`target:${p}`), C = o.some(($) => $.id === u), S = f === "" && (C || (b ? l.has(`${b}:${p}`) : w || x)), _ = b ?? (w !== x ? w ? "source" : "target" : void 0), M = (v == null ? void 0 : v.side) ?? (_ ? _ === "source" != (a === "RL") ? "right" : "left" : void 0), E = S && M === "right" ? "right" : "left", T = (v == null ? void 0 : v.label) ?? (g == null ? void 0 : g.label) ?? (C ? u.replace(/^(template|input|output|config|error):/, "") : u), R = cr(s.wordBeforeDot)[typeof f], A = cr(s.wordBeforeDot).property;
|
|
19479
19481
|
return /* @__PURE__ */ D(
|
|
@@ -19504,7 +19506,7 @@ function Ek({
|
|
|
19504
19506
|
whiteSpace: "nowrap",
|
|
19505
19507
|
fontWeight: "bold",
|
|
19506
19508
|
fontSize: "4xl",
|
|
19507
|
-
color: ((
|
|
19509
|
+
color: ((I = e == null ? void 0 : e.viewProps) == null ? void 0 : I.textColor) || (s.isTransparent ? s.hextextColor : A),
|
|
19508
19510
|
children: T
|
|
19509
19511
|
}
|
|
19510
19512
|
)
|
|
@@ -19629,102 +19631,121 @@ const bu = (e) => {
|
|
|
19629
19631
|
},
|
|
19630
19632
|
onExpand: () => f.restoreNodeView(e.data.id)
|
|
19631
19633
|
}
|
|
19632
|
-
) : /* @__PURE__ */ y(
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
minW: m || e.onShowIcon ? O + g0 + Q.borderWidth * 2 : void 0,
|
|
19657
|
-
...Q,
|
|
19658
|
-
children: /* @__PURE__ */ D(
|
|
19634
|
+
) : /* @__PURE__ */ y(
|
|
19635
|
+
Ho,
|
|
19636
|
+
{
|
|
19637
|
+
...e,
|
|
19638
|
+
data: { ...e.data, description: d },
|
|
19639
|
+
hoverLeaveDelay: m || e.onShowIcon || v ? 350 : 0,
|
|
19640
|
+
children: ({
|
|
19641
|
+
id: M,
|
|
19642
|
+
data: E,
|
|
19643
|
+
isActive: T,
|
|
19644
|
+
isHovered: R,
|
|
19645
|
+
isEditing: A,
|
|
19646
|
+
onSelect: O,
|
|
19647
|
+
onEditStart: I,
|
|
19648
|
+
onEditEnd: N
|
|
19649
|
+
}) => {
|
|
19650
|
+
var z, B, W, F, ce, Z, se, ue, we, Ce;
|
|
19651
|
+
const $ = vk(E, r, t), P = E.label ?? E.headerTitle, H = Object.entries(E.description || {}).length > 0, oe = Sk(E.description), ae = (B = (z = e.data) == null ? void 0 : z.config) == null ? void 0 : B.icon, Q = (F = (W = e.data) == null ? void 0 : W.config) == null ? void 0 : F.content, me = ((ce = E == null ? void 0 : E.viewProps) == null ? void 0 : ce.borderRadius) ?? "53px", ve = Wn(
|
|
19652
|
+
E == null ? void 0 : E.viewProps,
|
|
19653
|
+
$.hexborderColor,
|
|
19654
|
+
T,
|
|
19655
|
+
Ck
|
|
19656
|
+
);
|
|
19657
|
+
return /* @__PURE__ */ y(
|
|
19659
19658
|
wt,
|
|
19660
19659
|
{
|
|
19661
|
-
|
|
19660
|
+
justifyContent: "space-between",
|
|
19661
|
+
...E == null ? void 0 : E.viewProps,
|
|
19662
|
+
"data-flow-node-surface": "",
|
|
19662
19663
|
direction: "column",
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
borderWidth: 0,
|
|
19664
|
+
p: 0,
|
|
19665
|
+
borderRadius: me,
|
|
19666
19666
|
overflow: "hidden",
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
|
|
19697
|
-
|
|
19698
|
-
|
|
19699
|
-
|
|
19667
|
+
alignItems: "center",
|
|
19668
|
+
style: {
|
|
19669
|
+
backgroundColor: $.hexbgColor,
|
|
19670
|
+
transition: "border-color 0.2s ease-in-out"
|
|
19671
|
+
},
|
|
19672
|
+
width: "100%",
|
|
19673
|
+
minW: m || e.onShowIcon ? oe + g0 + ve.borderWidth * 2 : void 0,
|
|
19674
|
+
...ve,
|
|
19675
|
+
children: /* @__PURE__ */ D(
|
|
19676
|
+
wt,
|
|
19677
|
+
{
|
|
19678
|
+
width: "100%",
|
|
19679
|
+
direction: "column",
|
|
19680
|
+
borderRadius: me,
|
|
19681
|
+
borderColor: $.hexborderColor,
|
|
19682
|
+
borderWidth: 0,
|
|
19683
|
+
overflow: "hidden",
|
|
19684
|
+
children: [
|
|
19685
|
+
/* @__PURE__ */ y(
|
|
19686
|
+
_k,
|
|
19687
|
+
{
|
|
19688
|
+
headerTitle: P,
|
|
19689
|
+
hasContent: m,
|
|
19690
|
+
data: E,
|
|
19691
|
+
icon: ae,
|
|
19692
|
+
colors: $,
|
|
19693
|
+
hasConfig: H,
|
|
19694
|
+
id: M,
|
|
19695
|
+
isActive: T,
|
|
19696
|
+
isHovered: R,
|
|
19697
|
+
isEditing: A,
|
|
19698
|
+
onSelect: O,
|
|
19699
|
+
onEditStart: I,
|
|
19700
|
+
onEditEnd: N,
|
|
19701
|
+
props: e,
|
|
19702
|
+
objVisible: i,
|
|
19703
|
+
setObjVisible: o,
|
|
19704
|
+
onShowNativeIcon: v
|
|
19705
|
+
}
|
|
19706
|
+
),
|
|
19707
|
+
m && !i ? /* @__PURE__ */ y(
|
|
19708
|
+
wt,
|
|
19709
|
+
{
|
|
19710
|
+
w: "100%",
|
|
19711
|
+
overflow: "auto",
|
|
19712
|
+
justifyContent: "start",
|
|
19713
|
+
background: $.highlightColor,
|
|
19714
|
+
p: ["html", "jsx"].includes((se = (Z = e.data) == null ? void 0 : Z.config) == null ? void 0 : se.contentFormat) ? 0 : 12,
|
|
19715
|
+
fontSize: "5xl",
|
|
19716
|
+
lineHeight: "normal",
|
|
19717
|
+
children: /* @__PURE__ */ y(
|
|
19718
|
+
bk,
|
|
19719
|
+
{
|
|
19720
|
+
nodeId: M,
|
|
19721
|
+
content: Q,
|
|
19722
|
+
format: (we = (ue = e.data) == null ? void 0 : ue.config) == null ? void 0 : we.contentFormat,
|
|
19723
|
+
color: ((Ce = E == null ? void 0 : E.viewProps) == null ? void 0 : Ce.textColor) || $.hextextColor
|
|
19724
|
+
}
|
|
19725
|
+
)
|
|
19726
|
+
}
|
|
19727
|
+
) : /* @__PURE__ */ y(
|
|
19728
|
+
Ek,
|
|
19700
19729
|
{
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
|
|
19704
|
-
|
|
19730
|
+
data: E,
|
|
19731
|
+
resourcePorts: a,
|
|
19732
|
+
inspecting: s,
|
|
19733
|
+
form: c,
|
|
19734
|
+
inspectionPorts: l,
|
|
19735
|
+
extraPorts: u,
|
|
19736
|
+
colors: $,
|
|
19737
|
+
direction: n,
|
|
19738
|
+
uniformKeyWidth: oe
|
|
19705
19739
|
}
|
|
19706
19740
|
)
|
|
19707
|
-
|
|
19708
|
-
|
|
19709
|
-
|
|
19710
|
-
{
|
|
19711
|
-
data: E,
|
|
19712
|
-
resourcePorts: a,
|
|
19713
|
-
inspecting: s,
|
|
19714
|
-
form: c,
|
|
19715
|
-
inspectionPorts: l,
|
|
19716
|
-
extraPorts: u,
|
|
19717
|
-
colors: P,
|
|
19718
|
-
direction: n,
|
|
19719
|
-
uniformKeyWidth: O
|
|
19720
|
-
}
|
|
19721
|
-
)
|
|
19722
|
-
]
|
|
19741
|
+
]
|
|
19742
|
+
}
|
|
19743
|
+
)
|
|
19723
19744
|
}
|
|
19724
|
-
)
|
|
19745
|
+
);
|
|
19725
19746
|
}
|
|
19726
|
-
|
|
19727
|
-
|
|
19747
|
+
}
|
|
19748
|
+
);
|
|
19728
19749
|
};
|
|
19729
19750
|
bu.displayName = "NodeJsonObjectView";
|
|
19730
19751
|
const y0 = (e) => {
|
|
@@ -19795,17 +19816,17 @@ function Ak(e) {
|
|
|
19795
19816
|
}
|
|
19796
19817
|
) }) : /* @__PURE__ */ D(Be, { children: [
|
|
19797
19818
|
/* @__PURE__ */ y(Ho, { ...e, onOpenView: () => l(!0), children: ({ data: _, isActive: M }) => {
|
|
19798
|
-
var E, T, R, A,
|
|
19819
|
+
var E, T, R, A, O, I, N, $;
|
|
19799
19820
|
return /* @__PURE__ */ y(
|
|
19800
19821
|
Oe,
|
|
19801
19822
|
{
|
|
19802
19823
|
"data-flow-node-surface": "",
|
|
19803
19824
|
"data-grid-document": ((E = _.config) == null ? void 0 : E.documentId) ?? "",
|
|
19804
19825
|
width: `${((R = (T = _.config) == null ? void 0 : T.gridSize) == null ? void 0 : R.width) ?? 600}px`,
|
|
19805
|
-
height: `${((
|
|
19826
|
+
height: `${((O = (A = _.config) == null ? void 0 : A.gridSize) == null ? void 0 : O.height) ?? 440}px`,
|
|
19806
19827
|
overflow: "hidden",
|
|
19807
19828
|
position: "relative",
|
|
19808
|
-
bg: ((
|
|
19829
|
+
bg: ((I = _.viewProps) == null ? void 0 : I.bgColor) ?? "transparent",
|
|
19809
19830
|
color: ((N = _.viewProps) == null ? void 0 : N.textColor) ?? h,
|
|
19810
19831
|
borderRadius: `${c ?? 0}px`,
|
|
19811
19832
|
...Wn(
|
|
@@ -20004,12 +20025,12 @@ const Rk = {
|
|
|
20004
20025
|
setIsZoomMode: T,
|
|
20005
20026
|
isMultiSelectMode: R,
|
|
20006
20027
|
setIsMultiSelectMode: A,
|
|
20007
|
-
isDragMode:
|
|
20008
|
-
setIsDragMode:
|
|
20028
|
+
isDragMode: O,
|
|
20029
|
+
setIsDragMode: I,
|
|
20009
20030
|
isEdgeHandlesEnabled: N,
|
|
20010
20031
|
setIsEdgeHandlesEnabled: $,
|
|
20011
|
-
isArrayNodeMode:
|
|
20012
|
-
} = rt(), H = de(null), [
|
|
20032
|
+
isArrayNodeMode: P
|
|
20033
|
+
} = rt(), H = de(null), [oe, ae] = re(null), Q = de(null), me = e.length > 200;
|
|
20013
20034
|
Ue(() => {
|
|
20014
20035
|
S(me);
|
|
20015
20036
|
}, [me, S]);
|
|
@@ -20037,7 +20058,7 @@ const Rk = {
|
|
|
20037
20058
|
}
|
|
20038
20059
|
},
|
|
20039
20060
|
[t, se, ce]
|
|
20040
|
-
), we = v.colorMode === "dark",
|
|
20061
|
+
), we = v.colorMode === "dark", Ce = we ? Pe("gray.500") : Hn, ye = we ? W != null && W.includes("gray") ? "whitesmoke" : ue(W) : Ce, pe = c ? ue(c) : Ce, J = tt(
|
|
20041
20062
|
() => {
|
|
20042
20063
|
var ee;
|
|
20043
20064
|
return v.initialViewport || {
|
|
@@ -20047,7 +20068,7 @@ const Rk = {
|
|
|
20047
20068
|
},
|
|
20048
20069
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20049
20070
|
[]
|
|
20050
|
-
), L = d === "C" ? "LR" : d,
|
|
20071
|
+
), L = d === "C" ? "LR" : d, ie = dt(
|
|
20051
20072
|
(ee) => {
|
|
20052
20073
|
const G = { ...m, ...ee };
|
|
20053
20074
|
return {
|
|
@@ -20070,7 +20091,7 @@ const Rk = {
|
|
|
20070
20091
|
}, [r]), be = dt(
|
|
20071
20092
|
(ee) => {
|
|
20072
20093
|
var V;
|
|
20073
|
-
const G = (V = U.get(ee)) == null ? void 0 : V.data, te =
|
|
20094
|
+
const G = (V = U.get(ee)) == null ? void 0 : V.data, te = ie(G == null ? void 0 : G.viewProps), Le = Pe(te.bgColor);
|
|
20074
20095
|
return {
|
|
20075
20096
|
animated: !!(G != null && G.isNodeAnimated) && !me,
|
|
20076
20097
|
animationVariant: G == null ? void 0 : G.nodeAnimationVariant,
|
|
@@ -20093,7 +20114,7 @@ const Rk = {
|
|
|
20093
20114
|
};
|
|
20094
20115
|
},
|
|
20095
20116
|
[
|
|
20096
|
-
|
|
20117
|
+
ie,
|
|
20097
20118
|
U,
|
|
20098
20119
|
Z,
|
|
20099
20120
|
t,
|
|
@@ -20104,18 +20125,18 @@ const Rk = {
|
|
|
20104
20125
|
var te, Le;
|
|
20105
20126
|
const ee = /* @__PURE__ */ new Map();
|
|
20106
20127
|
for (const V of r) {
|
|
20107
|
-
const he = (te = V.data) == null ? void 0 : te.source,
|
|
20108
|
-
if (!he || !
|
|
20109
|
-
const
|
|
20110
|
-
et ? et.push({ id: V.data.id, source: he }) : ee.set(
|
|
20128
|
+
const he = (te = V.data) == null ? void 0 : te.source, Se = (Le = V.data) == null ? void 0 : Le.target;
|
|
20129
|
+
if (!he || !Se || he === Se) continue;
|
|
20130
|
+
const Ee = he < Se ? `${he}|${Se}` : `${Se}|${he}`, et = ee.get(Ee);
|
|
20131
|
+
et ? et.push({ id: V.data.id, source: he }) : ee.set(Ee, [{ id: V.data.id, source: he }]);
|
|
20111
20132
|
}
|
|
20112
20133
|
const G = /* @__PURE__ */ new Map();
|
|
20113
20134
|
for (const [V, he] of ee) {
|
|
20114
20135
|
if (he.length < 2) continue;
|
|
20115
|
-
const
|
|
20136
|
+
const Se = V.split("|")[0], Ee = Math.min(20, 70 / he.length);
|
|
20116
20137
|
he.forEach(({ id: et, source: ot }, Ze) => {
|
|
20117
|
-
const Tt = 50 + (Ze - (he.length - 1) / 2) *
|
|
20118
|
-
G.set(et, (ot ===
|
|
20138
|
+
const Tt = 50 + (Ze - (he.length - 1) / 2) * Ee;
|
|
20139
|
+
G.set(et, (ot === Se ? Tt : 100 - Tt) / 100);
|
|
20119
20140
|
});
|
|
20120
20141
|
}
|
|
20121
20142
|
return G;
|
|
@@ -20125,11 +20146,11 @@ const Rk = {
|
|
|
20125
20146
|
var te;
|
|
20126
20147
|
return ((te = G.data) == null ? void 0 : te.id) && G.data.source && G.data.target;
|
|
20127
20148
|
}).map(({ data: G }) => {
|
|
20128
|
-
var he,
|
|
20149
|
+
var he, Se, Ee, et, ot, Ze;
|
|
20129
20150
|
let te = ee;
|
|
20130
|
-
const Le = (
|
|
20151
|
+
const Le = (Se = (he = U.get(G.source)) == null ? void 0 : he.data) == null ? void 0 : Se.parent, V = (et = (Ee = U.get(G.target)) == null ? void 0 : Ee.data) == null ? void 0 : et.parent;
|
|
20131
20152
|
if (Le && Le === V) {
|
|
20132
|
-
const Tt =
|
|
20153
|
+
const Tt = ie((Ze = (ot = U.get(Le)) == null ? void 0 : ot.data) == null ? void 0 : Ze.viewProps), Rt = Ou(
|
|
20133
20154
|
ee,
|
|
20134
20155
|
Pe(Tt.bgColor),
|
|
20135
20156
|
Tt.bgOpacity
|
|
@@ -20165,7 +20186,7 @@ const Rk = {
|
|
|
20165
20186
|
u,
|
|
20166
20187
|
h,
|
|
20167
20188
|
U,
|
|
20168
|
-
|
|
20189
|
+
ie,
|
|
20169
20190
|
ue
|
|
20170
20191
|
]), We = tt(() => {
|
|
20171
20192
|
var G;
|
|
@@ -20191,10 +20212,10 @@ const Rk = {
|
|
|
20191
20212
|
var te;
|
|
20192
20213
|
return (te = G.data) == null ? void 0 : te.id;
|
|
20193
20214
|
}).map((G) => {
|
|
20194
|
-
var
|
|
20195
|
-
const te = We.has(G.data.id) && !G.data.parent, Le = te ? G.data.label ?? G.data.headerTitle ?? "Container" : void 0, V = te ? ee.parentContainer : ee[G.data.type] || ee.text, he = at.get(G.data.id),
|
|
20215
|
+
var Ee, et, ot, Ze, Tt, Rt;
|
|
20216
|
+
const te = We.has(G.data.id) && !G.data.parent, Le = te ? G.data.label ?? G.data.headerTitle ?? "Container" : void 0, V = te ? ee.parentContainer : ee[G.data.type] || ee.text, he = at.get(G.data.id), Se = {
|
|
20196
20217
|
...G,
|
|
20197
|
-
isInverted: ((
|
|
20218
|
+
isInverted: ((Ee = G.data.config) == null ? void 0 : Ee.isInverted) ?? (he == null ? void 0 : he.isInverted),
|
|
20198
20219
|
isParent: te,
|
|
20199
20220
|
containerStyle: te ? be(G.data.id) : void 0
|
|
20200
20221
|
};
|
|
@@ -20217,19 +20238,19 @@ const Rk = {
|
|
|
20217
20238
|
element: /* @__PURE__ */ Mu(
|
|
20218
20239
|
V,
|
|
20219
20240
|
{
|
|
20220
|
-
...
|
|
20241
|
+
...Se,
|
|
20221
20242
|
key: `${G.data.id}-${t}`
|
|
20222
20243
|
}
|
|
20223
20244
|
),
|
|
20224
20245
|
fillElement: M.has(G.data.id) ? void 0 : /* @__PURE__ */ Mu(
|
|
20225
20246
|
V,
|
|
20226
20247
|
{
|
|
20227
|
-
...
|
|
20248
|
+
...Se,
|
|
20228
20249
|
data: {
|
|
20229
20250
|
...G.data,
|
|
20230
20251
|
viewProps: { ...G.data.viewProps, borderRadius: 0 }
|
|
20231
20252
|
},
|
|
20232
|
-
containerStyle:
|
|
20253
|
+
containerStyle: Se.containerStyle ? { ...Se.containerStyle, borderRadius: 0 } : void 0,
|
|
20233
20254
|
key: `${G.data.id}-${t}`
|
|
20234
20255
|
}
|
|
20235
20256
|
)
|
|
@@ -20247,8 +20268,8 @@ const Rk = {
|
|
|
20247
20268
|
nt.current = v;
|
|
20248
20269
|
const st = de(E);
|
|
20249
20270
|
st.current = E;
|
|
20250
|
-
const bt = de(
|
|
20251
|
-
bt.current =
|
|
20271
|
+
const bt = de(P);
|
|
20272
|
+
bt.current = P;
|
|
20252
20273
|
const Te = de(b);
|
|
20253
20274
|
Te.current = b;
|
|
20254
20275
|
const He = de(x);
|
|
@@ -20272,16 +20293,16 @@ const Rk = {
|
|
|
20272
20293
|
ee.has(V) || (He.current === V && (C(null), (te = p.onEdgeDeselect) == null || te.call(p)), (Le = p.onEdgeRemove) == null || Le.call(p, V, he.data));
|
|
20273
20294
|
}, [fe, U, p, C]), Ue(() => {
|
|
20274
20295
|
const ee = H.current;
|
|
20275
|
-
if (!
|
|
20276
|
-
let G = null, te = null, Le = 0, V = 0, he = 0,
|
|
20296
|
+
if (!oe || !ee) return;
|
|
20297
|
+
let G = null, te = null, Le = 0, V = 0, he = 0, Se = 0, Ee = 0;
|
|
20277
20298
|
const et = (ot) => {
|
|
20278
20299
|
if (nt.current.readOnly) return;
|
|
20279
20300
|
const Ze = ee.ownerDocument.fullscreenElement;
|
|
20280
20301
|
if (Ze && Ze !== ee && ee.contains(Ze) && ot.target instanceof Node && Ze.contains(ot.target))
|
|
20281
20302
|
return;
|
|
20282
|
-
ot.preventDefault(), ot.stopPropagation(), st.current || ot.metaKey || ot.ctrlKey ? (he += ot.deltaY,
|
|
20303
|
+
ot.preventDefault(), ot.stopPropagation(), st.current || ot.metaKey || ot.ctrlKey ? (he += ot.deltaY, Se = ot.clientX, Ee = ot.clientY, te === null && (te = requestAnimationFrame(() => {
|
|
20283
20304
|
te = null;
|
|
20284
|
-
const Rt = nt.current, St =
|
|
20305
|
+
const Rt = nt.current, St = oe.zoom(), mt = he;
|
|
20285
20306
|
he = 0;
|
|
20286
20307
|
let Et = St - mt * 0.05 / 100;
|
|
20287
20308
|
Et = Math.max(
|
|
@@ -20289,14 +20310,14 @@ const Rk = {
|
|
|
20289
20310
|
Math.min(Rt.maxZoom ?? 1.5, Et)
|
|
20290
20311
|
);
|
|
20291
20312
|
const Ft = ee.getBoundingClientRect();
|
|
20292
|
-
|
|
20293
|
-
x:
|
|
20294
|
-
y:
|
|
20313
|
+
oe.zoomAt(Et, {
|
|
20314
|
+
x: Se - Ft.left,
|
|
20315
|
+
y: Ee - Ft.top
|
|
20295
20316
|
});
|
|
20296
20317
|
}))) : (Le += ot.deltaX, V += ot.deltaY, G === null && (G = requestAnimationFrame(() => {
|
|
20297
20318
|
G = null;
|
|
20298
|
-
const Rt =
|
|
20299
|
-
Le = 0, V = 0,
|
|
20319
|
+
const Rt = oe.pan(), St = oe.zoom(), mt = 0.35, Et = Le, Ft = V;
|
|
20320
|
+
Le = 0, V = 0, oe.pan({
|
|
20300
20321
|
x: Rt.x + -Et * mt / St,
|
|
20301
20322
|
y: Rt.y + -Ft * mt / St
|
|
20302
20323
|
});
|
|
@@ -20305,30 +20326,30 @@ const Rk = {
|
|
|
20305
20326
|
return ee.addEventListener("wheel", et, { passive: !1 }), () => {
|
|
20306
20327
|
ee.removeEventListener("wheel", et), G !== null && cancelAnimationFrame(G), te !== null && cancelAnimationFrame(te);
|
|
20307
20328
|
};
|
|
20308
|
-
}, [
|
|
20329
|
+
}, [oe]), Ue(() => {
|
|
20309
20330
|
if (v.disableKeyboardShortcuts) return;
|
|
20310
20331
|
const ee = (G) => {
|
|
20311
|
-
var Le, V, he,
|
|
20332
|
+
var Le, V, he, Se;
|
|
20312
20333
|
if (nt.current.readOnly) return;
|
|
20313
20334
|
const te = G.target;
|
|
20314
20335
|
if (!(te.tagName === "INPUT" || te.tagName === "TEXTAREA" || te.isContentEditable)) {
|
|
20315
|
-
if ((G.key === "z" || G.key === "Z") && T(!st.current), (G.key === "m" || G.key === "M") && A(!R), (G.key === "d" || G.key === "D") &&
|
|
20336
|
+
if ((G.key === "z" || G.key === "Z") && T(!st.current), (G.key === "m" || G.key === "M") && A(!R), (G.key === "d" || G.key === "D") && I(!O), (G.key === "v" || G.key === "V") && !G.repeat && !G.metaKey && !G.ctrlKey && !G.altKey && te.tagName !== "SELECT" && $(!N), (G.key === "Delete" || G.key === "Backspace") && He.current) {
|
|
20316
20337
|
G.preventDefault();
|
|
20317
|
-
const
|
|
20338
|
+
const Ee = He.current;
|
|
20318
20339
|
(V = p.onEdgeDelete) == null || V.call(
|
|
20319
20340
|
p,
|
|
20320
|
-
|
|
20321
|
-
((Le = Zt.current.get(
|
|
20341
|
+
Ee,
|
|
20342
|
+
((Le = Zt.current.get(Ee)) == null ? void 0 : Le.data) ?? { id: Ee }
|
|
20322
20343
|
), C(null);
|
|
20323
20344
|
return;
|
|
20324
20345
|
}
|
|
20325
20346
|
if ((G.key === "Delete" || G.key === "Backspace") && Te.current.length > 0) {
|
|
20326
20347
|
G.preventDefault();
|
|
20327
|
-
const
|
|
20328
|
-
if (
|
|
20329
|
-
for (const et of
|
|
20348
|
+
const Ee = Te.current.filter((et) => et !== "root");
|
|
20349
|
+
if (Ee.length === 0) return;
|
|
20350
|
+
for (const et of Ee) {
|
|
20330
20351
|
const ot = (he = ht.current.get(et)) == null ? void 0 : he.data;
|
|
20331
|
-
(
|
|
20352
|
+
(Se = p.onNodeDelete) == null || Se.call(p, et, ot || {});
|
|
20332
20353
|
}
|
|
20333
20354
|
w([]);
|
|
20334
20355
|
}
|
|
@@ -20337,12 +20358,12 @@ const Rk = {
|
|
|
20337
20358
|
return window.addEventListener("keydown", ee), () => window.removeEventListener("keydown", ee);
|
|
20338
20359
|
}, [
|
|
20339
20360
|
R,
|
|
20340
|
-
|
|
20361
|
+
O,
|
|
20341
20362
|
N,
|
|
20342
20363
|
$,
|
|
20343
20364
|
T,
|
|
20344
20365
|
A,
|
|
20345
|
-
|
|
20366
|
+
I,
|
|
20346
20367
|
v.disableKeyboardShortcuts,
|
|
20347
20368
|
p,
|
|
20348
20369
|
w,
|
|
@@ -20377,10 +20398,10 @@ const Rk = {
|
|
|
20377
20398
|
v.bottomBarCollapsed ?? (Te.current.length > 0 || !!He.current || !s)
|
|
20378
20399
|
), (ee = p.onBackgroundClick) == null || ee.call(p), !nt.current.readOnly) {
|
|
20379
20400
|
const he = /* @__PURE__ */ new Set();
|
|
20380
|
-
for (const
|
|
20381
|
-
let
|
|
20382
|
-
for (;
|
|
20383
|
-
he.add(
|
|
20401
|
+
for (const Se of Te.current) {
|
|
20402
|
+
let Ee = ht.current.get(Se);
|
|
20403
|
+
for (; Ee && !he.has(Ee.data.id); )
|
|
20404
|
+
he.add(Ee.data.id), We.has(Ee.data.id) && ((G = Ee.data.config) == null ? void 0 : G.collapsed) !== !0 && ((te = p.onNodeCollapse) == null || te.call(p, Ee.data.id, !0)), Ee = Ee.data.parent ? ht.current.get(Ee.data.parent) : void 0;
|
|
20384
20405
|
}
|
|
20385
20406
|
}
|
|
20386
20407
|
Te.current.length && (w([]), (Le = p.onNodeDeselect) == null || Le.call(p)), He.current && (C(null), (V = p.onEdgeDeselect) == null || V.call(p));
|
|
@@ -20510,7 +20531,7 @@ const Rk = {
|
|
|
20510
20531
|
lineColor: c ? pe : ye,
|
|
20511
20532
|
drawMode: Vr,
|
|
20512
20533
|
drawHandles: !v.readOnly && v.edgeHandles !== !1,
|
|
20513
|
-
dragMode:
|
|
20534
|
+
dragMode: O,
|
|
20514
20535
|
multiSelect: !!R,
|
|
20515
20536
|
onInit: Ve,
|
|
20516
20537
|
onLayoutComplete: (ee) => {
|
|
@@ -20518,7 +20539,7 @@ const Rk = {
|
|
|
20518
20539
|
(he = p.onLayoutComplete) == null || he.call(p, ee);
|
|
20519
20540
|
const G = It.current;
|
|
20520
20541
|
G && (!ht.current.has(G.source) || !ht.current.has(G.target) ? It.current = null : r.some(
|
|
20521
|
-
({ data:
|
|
20542
|
+
({ data: Se }) => Se.source === G.source && Se.target === G.target && !G.edgeIds.has(Se.id)
|
|
20522
20543
|
) && ee.getNodeBox(G.source) && ee.getNodeBox(G.target) && (It.current = null, ee.focusConnections(G.source)));
|
|
20523
20544
|
const te = Q.current;
|
|
20524
20545
|
if (!te) return;
|
|
@@ -20527,13 +20548,13 @@ const Rk = {
|
|
|
20527
20548
|
return;
|
|
20528
20549
|
}
|
|
20529
20550
|
const V = e.filter(
|
|
20530
|
-
(
|
|
20551
|
+
(Se) => !te.nodeIds.has(Se.data.id)
|
|
20531
20552
|
).filter(
|
|
20532
|
-
(
|
|
20533
|
-
({ data:
|
|
20553
|
+
(Se) => r.some(
|
|
20554
|
+
({ data: Ee }) => Ee.source === te.sourceId && Ee.target === Se.data.id || Ee.target === te.sourceId && Ee.source === Se.data.id
|
|
20534
20555
|
)
|
|
20535
20556
|
);
|
|
20536
|
-
!V.length || V.some((
|
|
20557
|
+
!V.length || V.some((Se) => !ee.getNodeBox(Se.data.id)) || (Q.current = null, ee.focusBranch(
|
|
20537
20558
|
te.reverse ? V[0].data.id : te.sourceId
|
|
20538
20559
|
));
|
|
20539
20560
|
},
|
|
@@ -20652,7 +20673,7 @@ function $k({
|
|
|
20652
20673
|
[r, t == null ? void 0 : t.state]
|
|
20653
20674
|
), v = o.direction === "C", b = tt(() => {
|
|
20654
20675
|
let R, A;
|
|
20655
|
-
return (
|
|
20676
|
+
return (O) => (A = R && A ? K1(R, O, A) ?? Vu(O, { title: e, isCenter: v }) : Vu(O, { title: e, isCenter: v }), R = O, A);
|
|
20656
20677
|
}, [e, v]), w = tt(
|
|
20657
20678
|
() => p ? b(p) : null,
|
|
20658
20679
|
[p, b]
|
|
@@ -20676,11 +20697,11 @@ function $k({
|
|
|
20676
20697
|
...(w == null ? void 0 : w.nodes) ?? n ?? [],
|
|
20677
20698
|
...(x == null ? void 0 : x.nodes) ?? []
|
|
20678
20699
|
].map((A) => {
|
|
20679
|
-
var
|
|
20680
|
-
const
|
|
20700
|
+
var oe, ae, Q, me;
|
|
20701
|
+
const O = r ? (oe = ze(r, A.data.id)) == null ? void 0 : oe.$view : (ae = A.data.config) == null ? void 0 : ae.typeView, I = O && ab.includes(O) ? O : void 0, N = I ? I === "icon-label" : (Q = A.data.config) == null ? void 0 : Q.labelBelow, $ = I === "object" ? "objectView" : I === "text" ? "text" : N ? "arrayView" : A.data.type, P = C && (t ? Jn(S, A.data.id, C) : r && ln(r, A.data.id, C)), H = (((me = A.data.config) == null ? void 0 : me.ports) ?? []).map((ve) => ({
|
|
20681
20702
|
...ve
|
|
20682
20703
|
}));
|
|
20683
|
-
if (x &&
|
|
20704
|
+
if (x && P) {
|
|
20684
20705
|
const ve = o.direction === "RL" ? { input: "right", output: "left", config: "bottom", error: "top" } : o.direction === "TB" ? {
|
|
20685
20706
|
input: "top",
|
|
20686
20707
|
output: "bottom",
|
|
@@ -20697,7 +20718,7 @@ function $k({
|
|
|
20697
20718
|
config: "top",
|
|
20698
20719
|
error: "bottom"
|
|
20699
20720
|
};
|
|
20700
|
-
for (const [z, B] of Object.entries(
|
|
20721
|
+
for (const [z, B] of Object.entries(P.type.ports ?? {})) {
|
|
20701
20722
|
const W = `${B.kind}:${z}`, F = H.find((ce) => ce.id === W);
|
|
20702
20723
|
F ? F.label === void 0 && B.label !== void 0 && (F.label = B.label) : H.push({
|
|
20703
20724
|
id: W,
|
|
@@ -20714,7 +20735,7 @@ function $k({
|
|
|
20714
20735
|
z.position = (B.indexOf(z) + 1) / (B.length + 1);
|
|
20715
20736
|
}
|
|
20716
20737
|
}
|
|
20717
|
-
return
|
|
20738
|
+
return P || N || I ? {
|
|
20718
20739
|
...A,
|
|
20719
20740
|
data: {
|
|
20720
20741
|
...A.data,
|
|
@@ -20728,9 +20749,9 @@ function $k({
|
|
|
20728
20749
|
} : {},
|
|
20729
20750
|
config: {
|
|
20730
20751
|
...A.data.config,
|
|
20731
|
-
...x &&
|
|
20732
|
-
...
|
|
20733
|
-
...
|
|
20752
|
+
...x && P ? { ports: H } : {},
|
|
20753
|
+
...P ? { form: !0 } : {},
|
|
20754
|
+
...I ? { typeView: I, labelBelow: !!N } : N ? { labelBelow: !0 } : {}
|
|
20734
20755
|
}
|
|
20735
20756
|
}
|
|
20736
20757
|
} : A;
|
|
@@ -20755,40 +20776,40 @@ function $k({
|
|
|
20755
20776
|
) : { ...s };
|
|
20756
20777
|
if (x) {
|
|
20757
20778
|
const A = /* @__PURE__ */ new Set([
|
|
20758
|
-
...x.nodes.map((
|
|
20759
|
-
...x.edges.map((
|
|
20779
|
+
...x.nodes.map((O) => O.data.id),
|
|
20780
|
+
...x.edges.map((O) => O.data.id)
|
|
20760
20781
|
]);
|
|
20761
|
-
for (const
|
|
20762
|
-
if (!/^on(?:Node|Edge).*(?:Change|Collapse)$/.test(
|
|
20763
|
-
const
|
|
20764
|
-
R[
|
|
20765
|
-
if (!A.has(N)) return
|
|
20782
|
+
for (const O of Object.keys(R)) {
|
|
20783
|
+
if (!/^on(?:Node|Edge).*(?:Change|Collapse)$/.test(O)) continue;
|
|
20784
|
+
const I = R[O];
|
|
20785
|
+
R[O] = (N, ...$) => {
|
|
20786
|
+
if (!A.has(N)) return I == null ? void 0 : I(N, ...$);
|
|
20766
20787
|
};
|
|
20767
20788
|
}
|
|
20768
20789
|
}
|
|
20769
20790
|
return {
|
|
20770
20791
|
...R,
|
|
20771
20792
|
onAllNodesIconLabelChange: (A) => {
|
|
20772
|
-
var
|
|
20773
|
-
m(A), (
|
|
20793
|
+
var O;
|
|
20794
|
+
m(A), (O = R.onAllNodesIconLabelChange) == null || O.call(R, A);
|
|
20774
20795
|
}
|
|
20775
20796
|
};
|
|
20776
20797
|
}, [r, w, s, g, x]), T = tt(() => {
|
|
20777
20798
|
if (!t) return E;
|
|
20778
20799
|
let R = t.state;
|
|
20779
|
-
const A = (
|
|
20800
|
+
const A = (I) => {
|
|
20780
20801
|
if (o.readOnly || o.editable === !1) return;
|
|
20781
20802
|
const N = t.onStateChange ?? t.onChange;
|
|
20782
20803
|
if (!N) return;
|
|
20783
|
-
const $ = k1(R,
|
|
20784
|
-
$ !== R && (R = $, N($, { ...
|
|
20785
|
-
},
|
|
20804
|
+
const $ = k1(R, I, s.onFormChange);
|
|
20805
|
+
$ !== R && (R = $, N($, { ...I, data: $ }));
|
|
20806
|
+
}, O = (I, N, $) => {
|
|
20786
20807
|
var H;
|
|
20787
|
-
const
|
|
20788
|
-
return !
|
|
20789
|
-
address:
|
|
20790
|
-
nodeAddress:
|
|
20791
|
-
previousValue: ze(R,
|
|
20808
|
+
const P = r && ((H = ze(r, I)) == null ? void 0 : H[N]);
|
|
20809
|
+
return !P || typeof P.$state != "string" ? !1 : (A({
|
|
20810
|
+
address: P.$state,
|
|
20811
|
+
nodeAddress: I,
|
|
20812
|
+
previousValue: ze(R, P.$state),
|
|
20792
20813
|
value: $,
|
|
20793
20814
|
data: R
|
|
20794
20815
|
}), !0);
|
|
@@ -20796,90 +20817,90 @@ function $k({
|
|
|
20796
20817
|
return {
|
|
20797
20818
|
...E,
|
|
20798
20819
|
onFormChange: A,
|
|
20799
|
-
onNodeCreateRequest: (
|
|
20800
|
-
var
|
|
20801
|
-
const N = (
|
|
20820
|
+
onNodeCreateRequest: (I) => {
|
|
20821
|
+
var P, H;
|
|
20822
|
+
const N = (P = I.sourceProperty) != null && P.startsWith("config:") ? I.sourceProperty.slice(7) : void 0, $ = N !== void 0 && (x == null ? void 0 : x.slots.get(kn(I.sourceNodeId, N)));
|
|
20802
20823
|
return $ ? ($.present || A({
|
|
20803
20824
|
data: R,
|
|
20804
20825
|
nodeAddress: $.address.split(".").slice(0, -1).join("."),
|
|
20805
20826
|
address: $.address,
|
|
20806
20827
|
value: An($.type),
|
|
20807
20828
|
previousValue: void 0
|
|
20808
|
-
}), !0) : ((H = E.onNodeCreateRequest) == null ? void 0 : H.call(E,
|
|
20829
|
+
}), !0) : ((H = E.onNodeCreateRequest) == null ? void 0 : H.call(E, I)) ?? !1;
|
|
20809
20830
|
},
|
|
20810
|
-
onNodeDelete: (
|
|
20831
|
+
onNodeDelete: (I, N) => {
|
|
20811
20832
|
var Q, me;
|
|
20812
|
-
if (!(x != null && x.nodes.some((ve) => ve.data.id ===
|
|
20813
|
-
return (Q = E.onNodeDelete) == null ? void 0 : Q.call(E,
|
|
20814
|
-
const $ = x && [...x.slots.values()].find((ve) => ve.nodeId ===
|
|
20815
|
-
if (!$) return (me = E.onNodeDelete) == null ? void 0 : me.call(E,
|
|
20816
|
-
const
|
|
20833
|
+
if (!(x != null && x.nodes.some((ve) => ve.data.id === I)))
|
|
20834
|
+
return (Q = E.onNodeDelete) == null ? void 0 : Q.call(E, I, N);
|
|
20835
|
+
const $ = x && [...x.slots.values()].find((ve) => ve.nodeId === I);
|
|
20836
|
+
if (!$) return (me = E.onNodeDelete) == null ? void 0 : me.call(E, I, N);
|
|
20837
|
+
const P = $.address.split("."), H = P.pop(), oe = P.join("."), ae = ze(R, oe);
|
|
20817
20838
|
A(
|
|
20818
20839
|
Array.isArray(ae) ? {
|
|
20819
20840
|
data: R,
|
|
20820
|
-
nodeAddress:
|
|
20821
|
-
address:
|
|
20841
|
+
nodeAddress: oe,
|
|
20842
|
+
address: oe,
|
|
20822
20843
|
previousValue: ae,
|
|
20823
20844
|
value: ae.filter((ve, z) => String(z) !== H)
|
|
20824
20845
|
} : {
|
|
20825
20846
|
data: R,
|
|
20826
|
-
nodeAddress:
|
|
20847
|
+
nodeAddress: oe,
|
|
20827
20848
|
address: $.address,
|
|
20828
20849
|
previousValue: ze(R, $.address),
|
|
20829
20850
|
value: void 0
|
|
20830
20851
|
}
|
|
20831
20852
|
);
|
|
20832
20853
|
},
|
|
20833
|
-
onEdgeCreate: (
|
|
20834
|
-
var
|
|
20835
|
-
const
|
|
20854
|
+
onEdgeCreate: (I, N, $) => {
|
|
20855
|
+
var oe, ae;
|
|
20856
|
+
const P = ((oe = $ == null ? void 0 : $.targetProperty) == null ? void 0 : oe.startsWith("config:")) && (x == null ? void 0 : x.slots.get(
|
|
20836
20857
|
kn(N, $.targetProperty.slice(7))
|
|
20837
|
-
)), H = x == null ? void 0 : x.containers.get(
|
|
20838
|
-
if (
|
|
20839
|
-
const Q = P1(R, H,
|
|
20858
|
+
)), H = x == null ? void 0 : x.containers.get(I);
|
|
20859
|
+
if (P && H && ($ == null ? void 0 : $.sourceProperty) === "output:resource") {
|
|
20860
|
+
const Q = P1(R, H, P);
|
|
20840
20861
|
Q !== void 0 && A({
|
|
20841
20862
|
data: R,
|
|
20842
|
-
nodeAddress:
|
|
20843
|
-
address:
|
|
20844
|
-
previousValue: ze(R,
|
|
20863
|
+
nodeAddress: P.address.split(".").slice(0, -1).join("."),
|
|
20864
|
+
address: P.address,
|
|
20865
|
+
previousValue: ze(R, P.address),
|
|
20845
20866
|
value: Q
|
|
20846
20867
|
});
|
|
20847
20868
|
return;
|
|
20848
20869
|
}
|
|
20849
|
-
|
|
20850
|
-
(Q) => Q.data.id ===
|
|
20851
|
-
) || (ae = E.onEdgeCreate) == null || ae.call(E,
|
|
20870
|
+
P || x != null && x.nodes.some(
|
|
20871
|
+
(Q) => Q.data.id === I || Q.data.id === N
|
|
20872
|
+
) || (ae = E.onEdgeCreate) == null || ae.call(E, I, N, $);
|
|
20852
20873
|
},
|
|
20853
|
-
onEdgeDelete: (
|
|
20874
|
+
onEdgeDelete: (I, N) => {
|
|
20854
20875
|
var me;
|
|
20855
|
-
const $ = x == null ? void 0 : x.edges.find((ve) => ve.data.id ===
|
|
20856
|
-
if (!$) return (me = E.onEdgeDelete) == null ? void 0 : me.call(E,
|
|
20857
|
-
const
|
|
20876
|
+
const $ = x == null ? void 0 : x.edges.find((ve) => ve.data.id === I);
|
|
20877
|
+
if (!$) return (me = E.onEdgeDelete) == null ? void 0 : me.call(E, I, N);
|
|
20878
|
+
const P = x.slots.get(
|
|
20858
20879
|
kn($.data.target, $.data.targetProperty.slice(7))
|
|
20859
|
-
), H =
|
|
20880
|
+
), H = P.address.split("."), oe = H.pop(), ae = H.join("."), Q = ze(R, ae);
|
|
20860
20881
|
A(
|
|
20861
20882
|
Array.isArray(Q) ? {
|
|
20862
20883
|
data: R,
|
|
20863
20884
|
nodeAddress: ae,
|
|
20864
20885
|
address: ae,
|
|
20865
20886
|
previousValue: Q,
|
|
20866
|
-
value: Q.filter((ve, z) => String(z) !==
|
|
20887
|
+
value: Q.filter((ve, z) => String(z) !== oe)
|
|
20867
20888
|
} : {
|
|
20868
20889
|
data: R,
|
|
20869
20890
|
nodeAddress: ae,
|
|
20870
|
-
address:
|
|
20871
|
-
previousValue: ze(R,
|
|
20891
|
+
address: P.address,
|
|
20892
|
+
previousValue: ze(R, P.address),
|
|
20872
20893
|
value: void 0
|
|
20873
20894
|
}
|
|
20874
20895
|
);
|
|
20875
20896
|
},
|
|
20876
|
-
onNodeContentChange: (
|
|
20877
|
-
var $,
|
|
20878
|
-
I
|
|
20897
|
+
onNodeContentChange: (I, N) => {
|
|
20898
|
+
var $, P;
|
|
20899
|
+
O(I, "$content", N) ? ($ = s.onNodeContentChange) == null || $.call(s, I, N) : (P = E.onNodeContentChange) == null || P.call(E, I, N);
|
|
20879
20900
|
},
|
|
20880
|
-
onNodeLabelChange: (
|
|
20881
|
-
var $,
|
|
20882
|
-
I
|
|
20901
|
+
onNodeLabelChange: (I, N) => {
|
|
20902
|
+
var $, P;
|
|
20903
|
+
O(I, "$label", N) ? ($ = s.onNodeLabelChange) == null || $.call(s, I, N) : (P = E.onNodeLabelChange) == null || P.call(E, I, N);
|
|
20883
20904
|
}
|
|
20884
20905
|
};
|
|
20885
20906
|
}, [
|