@keycloak/keycloak-admin-ui 26.4.7 → 26.5.0
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/lib/.vite/manifest.json +53 -43
- package/lib/AddJWTAuthorizationGrant-BxV7hzzZ.js +69 -0
- package/lib/AddJWTAuthorizationGrant-BxV7hzzZ.js.map +1 -0
- package/lib/{AddKubernetesConnect-TKm82MxO.js → AddKubernetesConnect-Bc_kTuYx.js} +4 -4
- package/lib/{AddKubernetesConnect-TKm82MxO.js.map → AddKubernetesConnect-Bc_kTuYx.js.map} +1 -1
- package/lib/{AddOAuth2-Bg_V5CMD.js → AddOAuth2-BEs8BWjo.js} +15 -15
- package/lib/{AddOAuth2-Bg_V5CMD.js.map → AddOAuth2-BEs8BWjo.js.map} +1 -1
- package/lib/{AddSpiffeConnect-gH8LxYcP.js → AddSpiffeConnect-RhW-jzlK.js} +5 -5
- package/lib/{AddSpiffeConnect-gH8LxYcP.js.map → AddSpiffeConnect-RhW-jzlK.js.map} +1 -1
- package/lib/{CreateFlow-6M8Wg_2H.js → CreateFlow-Bwuqra7c.js} +2 -2
- package/lib/{CreateFlow-6M8Wg_2H.js.map → CreateFlow-Bwuqra7c.js.map} +1 -1
- package/lib/DetailOrganization-6dzeU8qG.js +194 -0
- package/lib/DetailOrganization-6dzeU8qG.js.map +1 -0
- package/lib/{ExecutorForm-BYCH7c3u.js → ExecutorForm-ytEjIbpP.js} +2 -2
- package/lib/{ExecutorForm-BYCH7c3u.js.map → ExecutorForm-ytEjIbpP.js.map} +1 -1
- package/lib/{FlowDetails-Dkl-8lLX.js → FlowDetails-tBxTv6wK.js} +1021 -1048
- package/lib/{FlowDetails-Dkl-8lLX.js.map → FlowDetails-tBxTv6wK.js.map} +1 -1
- package/lib/{NewOrganization-CBaP7xLv.js → NewOrganization-BI9VQI6o.js} +12 -12
- package/lib/{NewOrganization-CBaP7xLv.js.map → NewOrganization-BI9VQI6o.js.map} +1 -1
- package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js → PermissionConfigurationDetails-q-Ms8reY.js} +18 -18
- package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js.map → PermissionConfigurationDetails-q-Ms8reY.js.map} +1 -1
- package/lib/{PermissionDetails-CCdfBuaW.js → PermissionDetails-BW_lN8ii.js} +2 -2
- package/lib/{PermissionDetails-CCdfBuaW.js.map → PermissionDetails-BW_lN8ii.js.map} +1 -1
- package/lib/{RealmSection-CbqC2up8.js → RealmSection-D40zPuIt.js} +7 -7
- package/lib/{RealmSection-CbqC2up8.js.map → RealmSection-D40zPuIt.js.map} +1 -1
- package/lib/{ResourceDetails-DWXjggUc.js → ResourceDetails-DmjAj-MN.js} +3 -3
- package/lib/{ResourceDetails-DWXjggUc.js.map → ResourceDetails-DmjAj-MN.js.map} +1 -1
- package/lib/{ScopeDetails-dcHTfc9f.js → ScopeDetails-CmZtEhXo.js} +2 -2
- package/lib/{ScopeDetails-dcHTfc9f.js.map → ScopeDetails-CmZtEhXo.js.map} +1 -1
- package/lib/{ScopePicker-DNYZfIbU.js → ScopePicker-p78XHCTm.js} +7 -7
- package/lib/{ScopePicker-DNYZfIbU.js.map → ScopePicker-p78XHCTm.js.map} +1 -1
- package/lib/WorkflowDetailForm-BN-XL1FE.js +4938 -0
- package/lib/WorkflowDetailForm-BN-XL1FE.js.map +1 -0
- package/lib/WorkflowsSection-BfykdcZr.js +135 -0
- package/lib/WorkflowsSection-BfykdcZr.js.map +1 -0
- package/lib/client-scopes/details/SearchFilter.d.ts +1 -1
- package/lib/clients/constants.d.ts +2 -0
- package/lib/clients/keys/ImportKeyDialog.d.ts +3 -1
- package/lib/components/dynamic/ClaimDisplayComponent.d.ts +2 -0
- package/lib/components/dynamic/IdentityProviderMultiSelectComponent.d.ts +2 -0
- package/lib/components/dynamic/MultivaluedListComponent.d.ts +6 -1
- package/lib/components/dynamic/components.d.ts +2 -1
- package/lib/components/identity-provider/IdentityProviderSelect.d.ts +10 -0
- package/lib/components/users/UserDataTableAttributeSearchForm.d.ts +2 -1
- package/lib/identity-providers/add/AddJWTAuthorizationGrant.d.ts +1 -0
- package/lib/identity-providers/add/JWTAuthorizationGrantAssertionSettings.d.ts +1 -0
- package/lib/identity-providers/add/JWTAuthorizationGrantSettings.d.ts +1 -0
- package/lib/identity-providers/add/JwksSettings.d.ts +5 -0
- package/lib/identity-providers/routes/IdentityProviderJWTAuthorizationGrant.d.ts +7 -0
- package/lib/{index-YEmLy1gM.js → index-aTEFJb4J.js} +28869 -27313
- package/lib/{index-YEmLy1gM.js.map → index-aTEFJb4J.js.map} +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/keycloak-admin-ui.js +147 -145
- package/lib/organizations/Invitations.d.ts +1 -0
- package/lib/organizations/MembersSection.d.ts +1 -0
- package/lib/realm-settings/TokensTab.d.ts +2 -2
- package/lib/utils/useIsFeatureEnabled.d.ts +1 -0
- package/lib/workflows/WorkflowDetailForm.d.ts +1 -0
- package/lib/workflows/routes/WorkflowDetail.d.ts +9 -0
- package/package.json +34 -22
- package/lib/CreateWorkflow-zbDnQ8Gr.js +0 -86
- package/lib/CreateWorkflow-zbDnQ8Gr.js.map +0 -1
- package/lib/DetailOrganization-DfVZ7YOx.js +0 -164
- package/lib/DetailOrganization-DfVZ7YOx.js.map +0 -1
- package/lib/WorkflowsSection-DZtAH1DA.js +0 -92
- package/lib/WorkflowsSection-DZtAH1DA.js.map +0 -1
- package/lib/workflows/CreateWorkflow.d.ts +0 -1
- package/lib/workflows/routes/AddWorkflow.d.ts +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as T, jsxs as te, Fragment as be } from "react/jsx-runtime";
|
|
2
|
-
import { g as Wt, h as Lo, i as Dt, T as ia, j as Oc, s as Ac, L as Io, C as Tc, u as mt, _ as Oo, b as zn, M as nn, k as rn, F as Vn, l as on, N as Dc, B as ge, m as Je, d as We, n as Rc, y as Rt, o as Pc, p as $c, P as sa, R as Fc, Q as Cn, U as si, v as zc, q as ai, r as li, w as Vc, x as Hc, X as Bc, Z as qc, z as Gc, D as aa, E as Ye, G as Yc, H as Hn, I as jc, J as Wc, K as lt, O as la, S as co, W as Xc, Y as Zc, $ as Uc, a0 as Kc, A as Qc, a1 as ca, a2 as Jc, a3 as eu, a4 as tu, a5 as nu, a6 as ru, a7 as ou, a8 as iu, a9 as Ve, a as su, aa as ci, t as au, ab as lu, f as cu, ac as uu, V as du, ad as fu, ae as hu, af as tr, ag as pu, ah as gu, ai as mu, aj as yu } from "./index-
|
|
2
|
+
import { g as Wt, h as Lo, i as Dt, T as ia, j as Oc, s as Ac, L as Io, C as Tc, u as mt, _ as Oo, b as zn, M as nn, k as rn, F as Vn, l as on, N as Dc, B as ge, m as Je, d as We, n as Rc, y as Rt, o as Pc, p as $c, P as sa, R as Fc, Q as Cn, U as si, v as zc, q as ai, r as li, w as Vc, x as Hc, X as Bc, Z as qc, z as Gc, D as aa, E as Ye, G as Yc, H as Hn, I as jc, J as Wc, K as lt, O as la, S as co, W as Xc, Y as Zc, $ as Uc, a0 as Kc, A as Qc, a1 as ca, a2 as Jc, a3 as eu, a4 as tu, a5 as nu, a6 as ru, a7 as ou, a8 as iu, a9 as Ve, a as su, aa as ci, t as au, ab as lu, f as cu, ac as uu, V as du, ad as fu, ae as hu, af as tr, ag as pu, ah as gu, ai as mu, aj as yu } from "./index-aTEFJb4J.js";
|
|
3
3
|
import * as Re from "react";
|
|
4
4
|
import $, { useEffect as oe, useState as re, useMemo as Ne, forwardRef as ua, useCallback as de, memo as ae, useContext as Bn, createContext as da, useRef as Q } from "react";
|
|
5
5
|
import { useTranslation as _e, Trans as ui } from "react-i18next";
|
|
@@ -24,13 +24,13 @@ const uo = ({ variant: e, children: t }) => Re.createElement("span", { className
|
|
|
24
24
|
uo.displayName = "ToggleGroupItemElement";
|
|
25
25
|
const kn = (e) => {
|
|
26
26
|
var { text: t, icon: n, className: r, isDisabled: o = !1, isSelected: s = !1, "aria-label": i = "", onChange: a = () => {
|
|
27
|
-
}, buttonId: c = "" } = e,
|
|
28
|
-
const l = (
|
|
29
|
-
a(
|
|
27
|
+
}, buttonId: c = "" } = e, d = Lo(e, ["text", "icon", "className", "isDisabled", "isSelected", "aria-label", "onChange", "buttonId"]);
|
|
28
|
+
const l = (u) => {
|
|
29
|
+
a(u, !s);
|
|
30
30
|
};
|
|
31
31
|
return !i && n && !t && console.warn("An accessible aria-label is required when using the toggle group item icon variant."), Re.createElement(
|
|
32
32
|
"div",
|
|
33
|
-
Object.assign({ className: Wt(dt.toggleGroupItem, r) },
|
|
33
|
+
Object.assign({ className: Wt(dt.toggleGroupItem, r) }, d),
|
|
34
34
|
Re.createElement(
|
|
35
35
|
"button",
|
|
36
36
|
Object.assign({ type: "button", className: Wt(dt.toggleGroupButton, s && dt.modifiers.selected), "aria-pressed": s, onClick: l }, i && { "aria-label": i }, o && { disabled: !0 }, c && { id: c }),
|
|
@@ -95,8 +95,8 @@ const bu = {
|
|
|
95
95
|
rowProps: n,
|
|
96
96
|
row: r
|
|
97
97
|
} = e, o = Lo(e, ["className", "rowProps", "row"]);
|
|
98
|
-
const { "aria-level": s, "aria-posinset": i, "aria-setsize": a, isExpanded: c, isDetailsExpanded:
|
|
99
|
-
return Re.createElement(ia, Object.assign({ "aria-level": s, "aria-posinset": i, "aria-setsize": a, "aria-expanded": !!c, isHidden: l, className: Wt(t, c && Ac.modifiers.expanded,
|
|
98
|
+
const { "aria-level": s, "aria-posinset": i, "aria-setsize": a, isExpanded: c, isDetailsExpanded: d, isHidden: l } = r.props;
|
|
99
|
+
return Re.createElement(ia, Object.assign({ "aria-level": s, "aria-posinset": i, "aria-setsize": a, "aria-expanded": !!c, isHidden: l, className: Wt(t, c && Ac.modifiers.expanded, d && Oc.modifiers.treeViewDetailsExpanded) }, o));
|
|
100
100
|
};
|
|
101
101
|
ha.displayName = "TreeRowWrapper";
|
|
102
102
|
const Au = "_icon_1gmts_2", Tu = {
|
|
@@ -107,14 +107,14 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
107
107
|
}, Ru = ({ flow: e, toggleDialog: t }) => {
|
|
108
108
|
const { adminClient: n } = mt(), { t: r } = _e(), { addAlert: o, addError: s } = Oo(), i = zn({ mode: "onChange" }), { reset: a, handleSubmit: c } = i;
|
|
109
109
|
oe(() => a(e), [e]);
|
|
110
|
-
const
|
|
110
|
+
const d = async (l) => {
|
|
111
111
|
try {
|
|
112
112
|
await n.authenticationManagement.updateFlow(
|
|
113
113
|
{ flowId: e.id },
|
|
114
114
|
{ ...e, ...l }
|
|
115
115
|
), o(r("updateFlowSuccess"), We.success);
|
|
116
|
-
} catch (
|
|
117
|
-
s("updateFlowError",
|
|
116
|
+
} catch (u) {
|
|
117
|
+
s("updateFlowError", u);
|
|
118
118
|
}
|
|
119
119
|
t();
|
|
120
120
|
};
|
|
@@ -151,7 +151,7 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
151
151
|
on,
|
|
152
152
|
{
|
|
153
153
|
id: "edit-flow-form",
|
|
154
|
-
onSubmit: c(
|
|
154
|
+
onSubmit: c(d),
|
|
155
155
|
isHorizontal: !0,
|
|
156
156
|
children: /* @__PURE__ */ T(Dc, {})
|
|
157
157
|
}
|
|
@@ -175,7 +175,7 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
175
175
|
},
|
|
176
176
|
n.id
|
|
177
177
|
)) }) }), Ao = ({ name: e, type: t, onSelect: n }) => {
|
|
178
|
-
const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(), [a, c] = re(), [
|
|
178
|
+
const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(), [a, c] = re(), [d, l] = re(10), [u, f] = re(0), [h, g] = re(""), y = Rc();
|
|
179
179
|
Rt(
|
|
180
180
|
async () => {
|
|
181
181
|
switch (t) {
|
|
@@ -185,7 +185,6 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
185
185
|
return r.authenticationManagement.getFormActionProviders();
|
|
186
186
|
case "condition":
|
|
187
187
|
return (await r.authenticationManagement.getAuthenticatorProviders()).filter(Fn);
|
|
188
|
-
case "basic":
|
|
189
188
|
default:
|
|
190
189
|
return (await r.authenticationManagement.getAuthenticatorProviders()).filter((w) => !Fn(w));
|
|
191
190
|
}
|
|
@@ -193,12 +192,12 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
193
192
|
(m) => c(m),
|
|
194
193
|
[]
|
|
195
194
|
);
|
|
196
|
-
const
|
|
195
|
+
const p = Ne(() => {
|
|
197
196
|
const m = h.trim().toLowerCase();
|
|
198
197
|
return y(a ?? [], Pc("displayName")).filter(
|
|
199
198
|
({ displayName: w, description: x }) => w?.toLowerCase().includes(m) || x?.toLowerCase().includes(m)
|
|
200
|
-
).slice(
|
|
201
|
-
}, [a, h,
|
|
199
|
+
).slice(u, u + d + 1);
|
|
200
|
+
}, [a, h, u, d]);
|
|
202
201
|
return /* @__PURE__ */ T(
|
|
203
202
|
nn,
|
|
204
203
|
{
|
|
@@ -234,9 +233,9 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
234
233
|
children: a && /* @__PURE__ */ T(
|
|
235
234
|
$c,
|
|
236
235
|
{
|
|
237
|
-
count:
|
|
238
|
-
first:
|
|
239
|
-
max:
|
|
236
|
+
count: p.length || 0,
|
|
237
|
+
first: u,
|
|
238
|
+
max: d,
|
|
240
239
|
onNextClick: f,
|
|
241
240
|
onPreviousClick: f,
|
|
242
241
|
onPerPageSelect: (m, w) => {
|
|
@@ -244,11 +243,11 @@ const Au = "_icon_1gmts_2", Tu = {
|
|
|
244
243
|
},
|
|
245
244
|
inputGroupName: "search",
|
|
246
245
|
inputGroupPlaceholder: o("search"),
|
|
247
|
-
inputGroupOnEnter:
|
|
246
|
+
inputGroupOnEnter: g,
|
|
248
247
|
children: /* @__PURE__ */ T(
|
|
249
248
|
Pu,
|
|
250
249
|
{
|
|
251
|
-
list:
|
|
250
|
+
list: p.slice(0, d),
|
|
252
251
|
setValue: i
|
|
253
252
|
}
|
|
254
253
|
)
|
|
@@ -428,92 +427,74 @@ function me(e) {
|
|
|
428
427
|
return t;
|
|
429
428
|
}
|
|
430
429
|
var cn = { exports: {} }, nr = {}, un = { exports: {} }, rr = {};
|
|
431
|
-
/**
|
|
432
|
-
* @license React
|
|
433
|
-
* use-sync-external-store-shim.production.js
|
|
434
|
-
*
|
|
435
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
436
|
-
*
|
|
437
|
-
* This source code is licensed under the MIT license found in the
|
|
438
|
-
* LICENSE file in the root directory of this source tree.
|
|
439
|
-
*/
|
|
440
430
|
var fi;
|
|
441
431
|
function Hu() {
|
|
442
432
|
if (fi) return rr;
|
|
443
433
|
fi = 1;
|
|
444
434
|
var e = $;
|
|
445
|
-
function t(
|
|
446
|
-
return
|
|
435
|
+
function t(u, f) {
|
|
436
|
+
return u === f && (u !== 0 || 1 / u === 1 / f) || u !== u && f !== f;
|
|
447
437
|
}
|
|
448
438
|
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, s = e.useLayoutEffect, i = e.useDebugValue;
|
|
449
|
-
function a(
|
|
450
|
-
var h = f(),
|
|
439
|
+
function a(u, f) {
|
|
440
|
+
var h = f(), g = r({ inst: { value: h, getSnapshot: f } }), y = g[0].inst, p = g[1];
|
|
451
441
|
return s(
|
|
452
442
|
function() {
|
|
453
|
-
y.value = h, y.getSnapshot = f, c(y) &&
|
|
443
|
+
y.value = h, y.getSnapshot = f, c(y) && p({ inst: y });
|
|
454
444
|
},
|
|
455
|
-
[
|
|
445
|
+
[u, h, f]
|
|
456
446
|
), o(
|
|
457
447
|
function() {
|
|
458
|
-
return c(y) &&
|
|
459
|
-
c(y) &&
|
|
448
|
+
return c(y) && p({ inst: y }), u(function() {
|
|
449
|
+
c(y) && p({ inst: y });
|
|
460
450
|
});
|
|
461
451
|
},
|
|
462
|
-
[
|
|
452
|
+
[u]
|
|
463
453
|
), i(h), h;
|
|
464
454
|
}
|
|
465
|
-
function c(
|
|
466
|
-
var f =
|
|
467
|
-
|
|
455
|
+
function c(u) {
|
|
456
|
+
var f = u.getSnapshot;
|
|
457
|
+
u = u.value;
|
|
468
458
|
try {
|
|
469
459
|
var h = f();
|
|
470
|
-
return !n(
|
|
460
|
+
return !n(u, h);
|
|
471
461
|
} catch {
|
|
472
462
|
return !0;
|
|
473
463
|
}
|
|
474
464
|
}
|
|
475
|
-
function u
|
|
465
|
+
function d(u, f) {
|
|
476
466
|
return f();
|
|
477
467
|
}
|
|
478
|
-
var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ?
|
|
468
|
+
var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : a;
|
|
479
469
|
return rr.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : l, rr;
|
|
480
470
|
}
|
|
481
471
|
var or = {};
|
|
482
|
-
/**
|
|
483
|
-
* @license React
|
|
484
|
-
* use-sync-external-store-shim.development.js
|
|
485
|
-
*
|
|
486
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
487
|
-
*
|
|
488
|
-
* This source code is licensed under the MIT license found in the
|
|
489
|
-
* LICENSE file in the root directory of this source tree.
|
|
490
|
-
*/
|
|
491
472
|
var hi;
|
|
492
473
|
function Bu() {
|
|
493
474
|
return hi || (hi = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
494
|
-
function e(h,
|
|
495
|
-
return h ===
|
|
475
|
+
function e(h, g) {
|
|
476
|
+
return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
|
|
496
477
|
}
|
|
497
|
-
function t(h,
|
|
478
|
+
function t(h, g) {
|
|
498
479
|
l || o.startTransition === void 0 || (l = !0, console.error(
|
|
499
480
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
500
481
|
));
|
|
501
|
-
var y =
|
|
502
|
-
if (!
|
|
503
|
-
var
|
|
504
|
-
s(y,
|
|
482
|
+
var y = g();
|
|
483
|
+
if (!u) {
|
|
484
|
+
var p = g();
|
|
485
|
+
s(y, p) || (console.error(
|
|
505
486
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
506
|
-
),
|
|
487
|
+
), u = !0);
|
|
507
488
|
}
|
|
508
|
-
|
|
509
|
-
inst: { value: y, getSnapshot:
|
|
489
|
+
p = i({
|
|
490
|
+
inst: { value: y, getSnapshot: g }
|
|
510
491
|
});
|
|
511
|
-
var m =
|
|
492
|
+
var m = p[0].inst, w = p[1];
|
|
512
493
|
return c(
|
|
513
494
|
function() {
|
|
514
|
-
m.value = y, m.getSnapshot =
|
|
495
|
+
m.value = y, m.getSnapshot = g, n(m) && w({ inst: m });
|
|
515
496
|
},
|
|
516
|
-
[h, y,
|
|
497
|
+
[h, y, g]
|
|
517
498
|
), a(
|
|
518
499
|
function() {
|
|
519
500
|
return n(m) && w({ inst: m }), h(function() {
|
|
@@ -521,23 +502,23 @@ function Bu() {
|
|
|
521
502
|
});
|
|
522
503
|
},
|
|
523
504
|
[h]
|
|
524
|
-
),
|
|
505
|
+
), d(y), y;
|
|
525
506
|
}
|
|
526
507
|
function n(h) {
|
|
527
|
-
var
|
|
508
|
+
var g = h.getSnapshot;
|
|
528
509
|
h = h.value;
|
|
529
510
|
try {
|
|
530
|
-
var y =
|
|
511
|
+
var y = g();
|
|
531
512
|
return !s(h, y);
|
|
532
513
|
} catch {
|
|
533
514
|
return !0;
|
|
534
515
|
}
|
|
535
516
|
}
|
|
536
|
-
function r(h,
|
|
537
|
-
return
|
|
517
|
+
function r(h, g) {
|
|
518
|
+
return g();
|
|
538
519
|
}
|
|
539
520
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
540
|
-
var o = $, s = typeof Object.is == "function" ? Object.is : e, i = o.useState, a = o.useEffect, c = o.useLayoutEffect,
|
|
521
|
+
var o = $, s = typeof Object.is == "function" ? Object.is : e, i = o.useState, a = o.useEffect, c = o.useLayoutEffect, d = o.useDebugValue, l = !1, u = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
541
522
|
or.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
542
523
|
})()), or;
|
|
543
524
|
}
|
|
@@ -545,31 +526,22 @@ var pi;
|
|
|
545
526
|
function ga() {
|
|
546
527
|
return pi || (pi = 1, process.env.NODE_ENV === "production" ? un.exports = Hu() : un.exports = Bu()), un.exports;
|
|
547
528
|
}
|
|
548
|
-
/**
|
|
549
|
-
* @license React
|
|
550
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
551
|
-
*
|
|
552
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
553
|
-
*
|
|
554
|
-
* This source code is licensed under the MIT license found in the
|
|
555
|
-
* LICENSE file in the root directory of this source tree.
|
|
556
|
-
*/
|
|
557
529
|
var gi;
|
|
558
530
|
function qu() {
|
|
559
531
|
if (gi) return nr;
|
|
560
532
|
gi = 1;
|
|
561
533
|
var e = $, t = ga();
|
|
562
|
-
function n(
|
|
563
|
-
return
|
|
534
|
+
function n(d, l) {
|
|
535
|
+
return d === l && (d !== 0 || 1 / d === 1 / l) || d !== d && l !== l;
|
|
564
536
|
}
|
|
565
537
|
var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, i = e.useEffect, a = e.useMemo, c = e.useDebugValue;
|
|
566
|
-
return nr.useSyncExternalStoreWithSelector = function(
|
|
567
|
-
var
|
|
568
|
-
if (
|
|
538
|
+
return nr.useSyncExternalStoreWithSelector = function(d, l, u, f, h) {
|
|
539
|
+
var g = s(null);
|
|
540
|
+
if (g.current === null) {
|
|
569
541
|
var y = { hasValue: !1, value: null };
|
|
570
|
-
|
|
571
|
-
} else y =
|
|
572
|
-
|
|
542
|
+
g.current = y;
|
|
543
|
+
} else y = g.current;
|
|
544
|
+
g = a(
|
|
573
545
|
function() {
|
|
574
546
|
function m(S) {
|
|
575
547
|
if (!w) {
|
|
@@ -584,7 +556,7 @@ function qu() {
|
|
|
584
556
|
var E = f(S);
|
|
585
557
|
return h !== void 0 && h(D, E) ? (x = S, D) : (x = S, b = E);
|
|
586
558
|
}
|
|
587
|
-
var w = !1, x, b, C =
|
|
559
|
+
var w = !1, x, b, C = u === void 0 ? null : u;
|
|
588
560
|
return [
|
|
589
561
|
function() {
|
|
590
562
|
return m(l());
|
|
@@ -594,42 +566,33 @@ function qu() {
|
|
|
594
566
|
}
|
|
595
567
|
];
|
|
596
568
|
},
|
|
597
|
-
[l,
|
|
569
|
+
[l, u, f, h]
|
|
598
570
|
);
|
|
599
|
-
var
|
|
571
|
+
var p = o(d, g[0], g[1]);
|
|
600
572
|
return i(
|
|
601
573
|
function() {
|
|
602
|
-
y.hasValue = !0, y.value =
|
|
574
|
+
y.hasValue = !0, y.value = p;
|
|
603
575
|
},
|
|
604
|
-
[
|
|
605
|
-
), c(
|
|
576
|
+
[p]
|
|
577
|
+
), c(p), p;
|
|
606
578
|
}, nr;
|
|
607
579
|
}
|
|
608
580
|
var ir = {};
|
|
609
|
-
/**
|
|
610
|
-
* @license React
|
|
611
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
612
|
-
*
|
|
613
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
614
|
-
*
|
|
615
|
-
* This source code is licensed under the MIT license found in the
|
|
616
|
-
* LICENSE file in the root directory of this source tree.
|
|
617
|
-
*/
|
|
618
581
|
var mi;
|
|
619
582
|
function Gu() {
|
|
620
583
|
return mi || (mi = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
621
|
-
function e(
|
|
622
|
-
return
|
|
584
|
+
function e(d, l) {
|
|
585
|
+
return d === l && (d !== 0 || 1 / d === 1 / l) || d !== d && l !== l;
|
|
623
586
|
}
|
|
624
587
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
625
588
|
var t = $, n = ga(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, s = t.useRef, i = t.useEffect, a = t.useMemo, c = t.useDebugValue;
|
|
626
|
-
ir.useSyncExternalStoreWithSelector = function(
|
|
627
|
-
var
|
|
628
|
-
if (
|
|
589
|
+
ir.useSyncExternalStoreWithSelector = function(d, l, u, f, h) {
|
|
590
|
+
var g = s(null);
|
|
591
|
+
if (g.current === null) {
|
|
629
592
|
var y = { hasValue: !1, value: null };
|
|
630
|
-
|
|
631
|
-
} else y =
|
|
632
|
-
|
|
593
|
+
g.current = y;
|
|
594
|
+
} else y = g.current;
|
|
595
|
+
g = a(
|
|
633
596
|
function() {
|
|
634
597
|
function m(S) {
|
|
635
598
|
if (!w) {
|
|
@@ -645,7 +608,7 @@ function Gu() {
|
|
|
645
608
|
var E = f(S);
|
|
646
609
|
return h !== void 0 && h(D, E) ? (x = S, D) : (x = S, b = E);
|
|
647
610
|
}
|
|
648
|
-
var w = !1, x, b, C =
|
|
611
|
+
var w = !1, x, b, C = u === void 0 ? null : u;
|
|
649
612
|
return [
|
|
650
613
|
function() {
|
|
651
614
|
return m(l());
|
|
@@ -655,15 +618,15 @@ function Gu() {
|
|
|
655
618
|
}
|
|
656
619
|
];
|
|
657
620
|
},
|
|
658
|
-
[l,
|
|
621
|
+
[l, u, f, h]
|
|
659
622
|
);
|
|
660
|
-
var
|
|
623
|
+
var p = o(d, g[0], g[1]);
|
|
661
624
|
return i(
|
|
662
625
|
function() {
|
|
663
|
-
y.hasValue = !0, y.value =
|
|
626
|
+
y.hasValue = !0, y.value = p;
|
|
664
627
|
},
|
|
665
|
-
[
|
|
666
|
-
), c(
|
|
628
|
+
[p]
|
|
629
|
+
), c(p), p;
|
|
667
630
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
668
631
|
})()), ir;
|
|
669
632
|
}
|
|
@@ -674,17 +637,17 @@ function Yu() {
|
|
|
674
637
|
var ju = Yu();
|
|
675
638
|
const Wu = /* @__PURE__ */ Gc(ju), Xu = {}, wi = (e) => {
|
|
676
639
|
let t;
|
|
677
|
-
const n = /* @__PURE__ */ new Set(), r = (l,
|
|
640
|
+
const n = /* @__PURE__ */ new Set(), r = (l, u) => {
|
|
678
641
|
const f = typeof l == "function" ? l(t) : l;
|
|
679
642
|
if (!Object.is(f, t)) {
|
|
680
643
|
const h = t;
|
|
681
|
-
t =
|
|
644
|
+
t = u ?? (typeof f != "object" || f === null) ? f : Object.assign({}, t, f), n.forEach((g) => g(t, h));
|
|
682
645
|
}
|
|
683
|
-
}, o = () => t, c = { setState: r, getState: o, getInitialState: () =>
|
|
646
|
+
}, o = () => t, c = { setState: r, getState: o, getInitialState: () => d, subscribe: (l) => (n.add(l), () => n.delete(l)), destroy: () => {
|
|
684
647
|
(Xu ? "production" : void 0) !== "production" && console.warn(
|
|
685
648
|
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
686
649
|
), n.clear();
|
|
687
|
-
} },
|
|
650
|
+
} }, d = t = e(r, o, c);
|
|
688
651
|
return c;
|
|
689
652
|
}, Zu = (e) => e ? wi(e) : wi, { useDebugValue: Uu } = $, { useSyncExternalStoreWithSelector: Ku } = Wu, Qu = (e) => e;
|
|
690
653
|
function ma(e, t = Qu, n) {
|
|
@@ -826,8 +789,8 @@ function Do(e) {
|
|
|
826
789
|
function sd(e) {
|
|
827
790
|
typeof e != "function" && (e = Do(e));
|
|
828
791
|
for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
|
|
829
|
-
for (var s = t[o], i = s.length, a = r[o] = new Array(i), c,
|
|
830
|
-
(c = s[l]) && (
|
|
792
|
+
for (var s = t[o], i = s.length, a = r[o] = new Array(i), c, d, l = 0; l < i; ++l)
|
|
793
|
+
(c = s[l]) && (d = e.call(c, c.__data__, l, s)) && ("__data__" in c && (d.__data__ = c.__data__), a[l] = d);
|
|
831
794
|
return new Ee(r, this._parents);
|
|
832
795
|
}
|
|
833
796
|
function ad(e) {
|
|
@@ -849,8 +812,8 @@ function cd(e) {
|
|
|
849
812
|
function ud(e) {
|
|
850
813
|
typeof e == "function" ? e = cd(e) : e = wa(e);
|
|
851
814
|
for (var t = this._groups, n = t.length, r = [], o = [], s = 0; s < n; ++s)
|
|
852
|
-
for (var i = t[s], a = i.length, c,
|
|
853
|
-
(c = i[
|
|
815
|
+
for (var i = t[s], a = i.length, c, d = 0; d < a; ++d)
|
|
816
|
+
(c = i[d]) && (r.push(e.call(c, c.__data__, d, i)), o.push(c));
|
|
854
817
|
return new Ee(r, o);
|
|
855
818
|
}
|
|
856
819
|
function va(e) {
|
|
@@ -890,8 +853,8 @@ function wd(e) {
|
|
|
890
853
|
function vd(e) {
|
|
891
854
|
typeof e != "function" && (e = va(e));
|
|
892
855
|
for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
|
|
893
|
-
for (var s = t[o], i = s.length, a = r[o] = [], c,
|
|
894
|
-
(c = s[
|
|
856
|
+
for (var s = t[o], i = s.length, a = r[o] = [], c, d = 0; d < i; ++d)
|
|
857
|
+
(c = s[d]) && e.call(c, c.__data__, d, s) && a.push(c);
|
|
895
858
|
return new Ee(r, this._parents);
|
|
896
859
|
}
|
|
897
860
|
function xa(e) {
|
|
@@ -924,19 +887,19 @@ function xd(e) {
|
|
|
924
887
|
};
|
|
925
888
|
}
|
|
926
889
|
function Ed(e, t, n, r, o, s) {
|
|
927
|
-
for (var i = 0, a, c = t.length,
|
|
890
|
+
for (var i = 0, a, c = t.length, d = s.length; i < d; ++i)
|
|
928
891
|
(a = t[i]) ? (a.__data__ = s[i], r[i] = a) : n[i] = new Mn(e, s[i]);
|
|
929
892
|
for (; i < c; ++i)
|
|
930
893
|
(a = t[i]) && (o[i] = a);
|
|
931
894
|
}
|
|
932
895
|
function _d(e, t, n, r, o, s, i) {
|
|
933
|
-
var a, c,
|
|
896
|
+
var a, c, d = /* @__PURE__ */ new Map(), l = t.length, u = s.length, f = new Array(l), h;
|
|
934
897
|
for (a = 0; a < l; ++a)
|
|
935
|
-
(c = t[a]) && (f[a] = h = i.call(c, c.__data__, a, t) + "",
|
|
936
|
-
for (a = 0; a <
|
|
937
|
-
h = i.call(e, s[a], a, s) + "", (c =
|
|
898
|
+
(c = t[a]) && (f[a] = h = i.call(c, c.__data__, a, t) + "", d.has(h) ? o[a] = c : d.set(h, c));
|
|
899
|
+
for (a = 0; a < u; ++a)
|
|
900
|
+
h = i.call(e, s[a], a, s) + "", (c = d.get(h)) ? (r[a] = c, c.__data__ = s[a], d.delete(h)) : n[a] = new Mn(e, s[a]);
|
|
938
901
|
for (a = 0; a < l; ++a)
|
|
939
|
-
(c = t[a]) &&
|
|
902
|
+
(c = t[a]) && d.get(f[a]) === c && (o[a] = c);
|
|
940
903
|
}
|
|
941
904
|
function Sd(e) {
|
|
942
905
|
return e.__data__;
|
|
@@ -945,12 +908,12 @@ function Cd(e, t) {
|
|
|
945
908
|
if (!arguments.length) return Array.from(this, Sd);
|
|
946
909
|
var n = t ? _d : Ed, r = this._parents, o = this._groups;
|
|
947
910
|
typeof e != "function" && (e = xd(e));
|
|
948
|
-
for (var s = o.length, i = new Array(s), a = new Array(s), c = new Array(s),
|
|
949
|
-
var l = r[
|
|
950
|
-
n(l,
|
|
951
|
-
for (var w = 0, x = 0, b, C; w <
|
|
911
|
+
for (var s = o.length, i = new Array(s), a = new Array(s), c = new Array(s), d = 0; d < s; ++d) {
|
|
912
|
+
var l = r[d], u = o[d], f = u.length, h = Nd(e.call(l, l && l.__data__, d, r)), g = h.length, y = a[d] = new Array(g), p = i[d] = new Array(g), m = c[d] = new Array(f);
|
|
913
|
+
n(l, u, y, p, m, h, t);
|
|
914
|
+
for (var w = 0, x = 0, b, C; w < g; ++w)
|
|
952
915
|
if (b = y[w]) {
|
|
953
|
-
for (w >= x && (x = w + 1); !(C =
|
|
916
|
+
for (w >= x && (x = w + 1); !(C = p[x]) && ++x < g; ) ;
|
|
954
917
|
b._next = C || null;
|
|
955
918
|
}
|
|
956
919
|
}
|
|
@@ -968,8 +931,8 @@ function Md(e, t, n) {
|
|
|
968
931
|
}
|
|
969
932
|
function Ld(e) {
|
|
970
933
|
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, o = n.length, s = r.length, i = Math.min(o, s), a = new Array(o), c = 0; c < i; ++c)
|
|
971
|
-
for (var
|
|
972
|
-
(h =
|
|
934
|
+
for (var d = n[c], l = r[c], u = d.length, f = a[c] = new Array(u), h, g = 0; g < u; ++g)
|
|
935
|
+
(h = d[g] || l[g]) && (f[g] = h);
|
|
973
936
|
for (; c < o; ++c)
|
|
974
937
|
a[c] = n[c];
|
|
975
938
|
return new Ee(a, this._parents);
|
|
@@ -982,12 +945,12 @@ function Id() {
|
|
|
982
945
|
}
|
|
983
946
|
function Od(e) {
|
|
984
947
|
e || (e = Ad);
|
|
985
|
-
function t(
|
|
986
|
-
return
|
|
948
|
+
function t(u, f) {
|
|
949
|
+
return u && f ? e(u.__data__, f.__data__) : !u - !f;
|
|
987
950
|
}
|
|
988
951
|
for (var n = this._groups, r = n.length, o = new Array(r), s = 0; s < r; ++s) {
|
|
989
|
-
for (var i = n[s], a = i.length, c = o[s] = new Array(a),
|
|
990
|
-
(
|
|
952
|
+
for (var i = n[s], a = i.length, c = o[s] = new Array(a), d, l = 0; l < a; ++l)
|
|
953
|
+
(d = i[l]) && (c[l] = d);
|
|
991
954
|
c.sort(t);
|
|
992
955
|
}
|
|
993
956
|
return new Ee(o, this._parents).order();
|
|
@@ -1280,7 +1243,7 @@ function If(e, t, n) {
|
|
|
1280
1243
|
if (arguments.length < 2) {
|
|
1281
1244
|
var a = this.node().__on;
|
|
1282
1245
|
if (a) {
|
|
1283
|
-
for (var c = 0,
|
|
1246
|
+
for (var c = 0, d = a.length, l; c < d; ++c)
|
|
1284
1247
|
for (o = 0, l = a[c]; o < s; ++o)
|
|
1285
1248
|
if ((i = r[o]).type === l.type && i.name === l.name)
|
|
1286
1249
|
return l.value;
|
|
@@ -1409,7 +1372,7 @@ function ho(e, {
|
|
|
1409
1372
|
x: i,
|
|
1410
1373
|
y: a,
|
|
1411
1374
|
dx: c,
|
|
1412
|
-
dy:
|
|
1375
|
+
dy: d,
|
|
1413
1376
|
dispatch: l
|
|
1414
1377
|
}) {
|
|
1415
1378
|
Object.defineProperties(this, {
|
|
@@ -1422,7 +1385,7 @@ function ho(e, {
|
|
|
1422
1385
|
x: { value: i, enumerable: !0, configurable: !0 },
|
|
1423
1386
|
y: { value: a, enumerable: !0, configurable: !0 },
|
|
1424
1387
|
dx: { value: c, enumerable: !0, configurable: !0 },
|
|
1425
|
-
dy: { value:
|
|
1388
|
+
dy: { value: d, enumerable: !0, configurable: !0 },
|
|
1426
1389
|
_: { value: l }
|
|
1427
1390
|
});
|
|
1428
1391
|
}
|
|
@@ -1443,27 +1406,27 @@ function Hf() {
|
|
|
1443
1406
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1444
1407
|
}
|
|
1445
1408
|
function Bf() {
|
|
1446
|
-
var e = Ff, t = zf, n = Vf, r = Hf, o = {}, s = qn("start", "drag", "end"), i = 0, a, c,
|
|
1409
|
+
var e = Ff, t = zf, n = Vf, r = Hf, o = {}, s = qn("start", "drag", "end"), i = 0, a, c, d, l, u = 0;
|
|
1447
1410
|
function f(b) {
|
|
1448
|
-
b.on("mousedown.drag", h).filter(r).on("touchstart.drag",
|
|
1411
|
+
b.on("mousedown.drag", h).filter(r).on("touchstart.drag", p).on("touchmove.drag", m, $f).on("touchend.drag touchcancel.drag", w).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1449
1412
|
}
|
|
1450
1413
|
function h(b, C) {
|
|
1451
1414
|
if (!(l || !e.call(this, b, C))) {
|
|
1452
1415
|
var S = x(this, t.call(this, b, C), b, C, "mouse");
|
|
1453
|
-
S && (Se(b.view).on("mousemove.drag",
|
|
1416
|
+
S && (Se(b.view).on("mousemove.drag", g, Xt).on("mouseup.drag", y, Xt), La(b.view), sr(b), d = !1, a = b.clientX, c = b.clientY, S("start", b));
|
|
1454
1417
|
}
|
|
1455
1418
|
}
|
|
1456
|
-
function
|
|
1457
|
-
if (Mt(b), !
|
|
1419
|
+
function g(b) {
|
|
1420
|
+
if (Mt(b), !d) {
|
|
1458
1421
|
var C = b.clientX - a, S = b.clientY - c;
|
|
1459
|
-
|
|
1422
|
+
d = C * C + S * S > u;
|
|
1460
1423
|
}
|
|
1461
1424
|
o.mouse("drag", b);
|
|
1462
1425
|
}
|
|
1463
1426
|
function y(b) {
|
|
1464
|
-
Se(b.view).on("mousemove.drag mouseup.drag", null), Ia(b.view,
|
|
1427
|
+
Se(b.view).on("mousemove.drag mouseup.drag", null), Ia(b.view, d), Mt(b), o.mouse("end", b);
|
|
1465
1428
|
}
|
|
1466
|
-
function
|
|
1429
|
+
function p(b, C) {
|
|
1467
1430
|
if (e.call(this, b, C)) {
|
|
1468
1431
|
var S = b.changedTouches, D = t.call(this, b, C), E = S.length, _, N;
|
|
1469
1432
|
for (_ = 0; _ < E; ++_)
|
|
@@ -1539,7 +1502,7 @@ function Bf() {
|
|
|
1539
1502
|
var b = s.on.apply(s, arguments);
|
|
1540
1503
|
return b === s ? f : b;
|
|
1541
1504
|
}, f.clickDistance = function(b) {
|
|
1542
|
-
return arguments.length ? (
|
|
1505
|
+
return arguments.length ? (u = (b = +b) * b, f) : Math.sqrt(u);
|
|
1543
1506
|
}, f;
|
|
1544
1507
|
}
|
|
1545
1508
|
function Po(e, t, n) {
|
|
@@ -1866,9 +1829,9 @@ function Da(e, t) {
|
|
|
1866
1829
|
const Ii = (function e(t) {
|
|
1867
1830
|
var n = rh(t);
|
|
1868
1831
|
function r(o, s) {
|
|
1869
|
-
var i = n((o = po(o)).r, (s = po(s)).r), a = n(o.g, s.g), c = n(o.b, s.b),
|
|
1832
|
+
var i = n((o = po(o)).r, (s = po(s)).r), a = n(o.g, s.g), c = n(o.b, s.b), d = Da(o.opacity, s.opacity);
|
|
1870
1833
|
return function(l) {
|
|
1871
|
-
return o.r = i(l), o.g = a(l), o.b = c(l), o.opacity =
|
|
1834
|
+
return o.r = i(l), o.g = a(l), o.b = c(l), o.opacity = d(l), o + "";
|
|
1872
1835
|
};
|
|
1873
1836
|
}
|
|
1874
1837
|
return r.gamma = e, r;
|
|
@@ -1893,8 +1856,8 @@ function sh(e, t) {
|
|
|
1893
1856
|
var n = go.lastIndex = lr.lastIndex = 0, r, o, s, i = -1, a = [], c = [];
|
|
1894
1857
|
for (e = e + "", t = t + ""; (r = go.exec(e)) && (o = lr.exec(t)); )
|
|
1895
1858
|
(s = o.index) > n && (s = t.slice(n, s), a[i] ? a[i] += s : a[++i] = s), (r = r[0]) === (o = o[0]) ? a[i] ? a[i] += o : a[++i] = o : (a[++i] = null, c.push({ i, x: Xe(r, o) })), n = lr.lastIndex;
|
|
1896
|
-
return n < t.length && (s = t.slice(n), a[i] ? a[i] += s : a[++i] = s), a.length < 2 ? c[0] ? ih(c[0].x) : oh(t) : (t = c.length, function(
|
|
1897
|
-
for (var l = 0,
|
|
1859
|
+
return n < t.length && (s = t.slice(n), a[i] ? a[i] += s : a[++i] = s), a.length < 2 ? c[0] ? ih(c[0].x) : oh(t) : (t = c.length, function(d) {
|
|
1860
|
+
for (var l = 0, u; l < t; ++l) a[(u = c[l]).i] = u.x(d);
|
|
1898
1861
|
return a.join("");
|
|
1899
1862
|
});
|
|
1900
1863
|
}
|
|
@@ -1926,32 +1889,32 @@ function lh(e) {
|
|
|
1926
1889
|
return e == null || (pn || (pn = document.createElementNS("http://www.w3.org/2000/svg", "g")), pn.setAttribute("transform", e), !(e = pn.transform.baseVal.consolidate())) ? mo : (e = e.matrix, Ra(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
1927
1890
|
}
|
|
1928
1891
|
function Pa(e, t, n, r) {
|
|
1929
|
-
function o(
|
|
1930
|
-
return
|
|
1892
|
+
function o(d) {
|
|
1893
|
+
return d.length ? d.pop() + " " : "";
|
|
1931
1894
|
}
|
|
1932
|
-
function s(
|
|
1933
|
-
if (
|
|
1895
|
+
function s(d, l, u, f, h, g) {
|
|
1896
|
+
if (d !== u || l !== f) {
|
|
1934
1897
|
var y = h.push("translate(", null, t, null, n);
|
|
1935
|
-
|
|
1936
|
-
} else (
|
|
1898
|
+
g.push({ i: y - 4, x: Xe(d, u) }, { i: y - 2, x: Xe(l, f) });
|
|
1899
|
+
} else (u || f) && h.push("translate(" + u + t + f + n);
|
|
1937
1900
|
}
|
|
1938
|
-
function i(
|
|
1939
|
-
|
|
1901
|
+
function i(d, l, u, f) {
|
|
1902
|
+
d !== l ? (d - l > 180 ? l += 360 : l - d > 180 && (d += 360), f.push({ i: u.push(o(u) + "rotate(", null, r) - 2, x: Xe(d, l) })) : l && u.push(o(u) + "rotate(" + l + r);
|
|
1940
1903
|
}
|
|
1941
|
-
function a(
|
|
1942
|
-
|
|
1904
|
+
function a(d, l, u, f) {
|
|
1905
|
+
d !== l ? f.push({ i: u.push(o(u) + "skewX(", null, r) - 2, x: Xe(d, l) }) : l && u.push(o(u) + "skewX(" + l + r);
|
|
1943
1906
|
}
|
|
1944
|
-
function c(
|
|
1945
|
-
if (
|
|
1907
|
+
function c(d, l, u, f, h, g) {
|
|
1908
|
+
if (d !== u || l !== f) {
|
|
1946
1909
|
var y = h.push(o(h) + "scale(", null, ",", null, ")");
|
|
1947
|
-
|
|
1948
|
-
} else (
|
|
1949
|
-
}
|
|
1950
|
-
return function(
|
|
1951
|
-
var
|
|
1952
|
-
return
|
|
1953
|
-
for (var
|
|
1954
|
-
return
|
|
1910
|
+
g.push({ i: y - 4, x: Xe(d, u) }, { i: y - 2, x: Xe(l, f) });
|
|
1911
|
+
} else (u !== 1 || f !== 1) && h.push(o(h) + "scale(" + u + "," + f + ")");
|
|
1912
|
+
}
|
|
1913
|
+
return function(d, l) {
|
|
1914
|
+
var u = [], f = [];
|
|
1915
|
+
return d = e(d), l = e(l), s(d.translateX, d.translateY, l.translateX, l.translateY, u, f), i(d.rotate, l.rotate, u, f), a(d.skewX, l.skewX, u, f), c(d.scaleX, d.scaleY, l.scaleX, l.scaleY, u, f), d = l = null, function(h) {
|
|
1916
|
+
for (var g = -1, y = f.length, p; ++g < y; ) u[(p = f[g]).i] = p.x(h);
|
|
1917
|
+
return u.join("");
|
|
1955
1918
|
};
|
|
1956
1919
|
};
|
|
1957
1920
|
}
|
|
@@ -1967,27 +1930,27 @@ function hh(e) {
|
|
|
1967
1930
|
}
|
|
1968
1931
|
const ph = (function e(t, n, r) {
|
|
1969
1932
|
function o(s, i) {
|
|
1970
|
-
var a = s[0], c = s[1],
|
|
1933
|
+
var a = s[0], c = s[1], d = s[2], l = i[0], u = i[1], f = i[2], h = l - a, g = u - c, y = h * h + g * g, p, m;
|
|
1971
1934
|
if (y < dh)
|
|
1972
|
-
m = Math.log(f /
|
|
1935
|
+
m = Math.log(f / d) / t, p = function(D) {
|
|
1973
1936
|
return [
|
|
1974
1937
|
a + D * h,
|
|
1975
|
-
c + D *
|
|
1976
|
-
|
|
1938
|
+
c + D * g,
|
|
1939
|
+
d * Math.exp(t * D * m)
|
|
1977
1940
|
];
|
|
1978
1941
|
};
|
|
1979
1942
|
else {
|
|
1980
|
-
var w = Math.sqrt(y), x = (f * f -
|
|
1981
|
-
m = (S - C) / t,
|
|
1982
|
-
var E = D * m, _ = Ai(C), N =
|
|
1943
|
+
var w = Math.sqrt(y), x = (f * f - d * d + r * y) / (2 * d * n * w), b = (f * f - d * d - r * y) / (2 * f * n * w), C = Math.log(Math.sqrt(x * x + 1) - x), S = Math.log(Math.sqrt(b * b + 1) - b);
|
|
1944
|
+
m = (S - C) / t, p = function(D) {
|
|
1945
|
+
var E = D * m, _ = Ai(C), N = d / (n * w) * (_ * hh(t * E + C) - fh(C));
|
|
1983
1946
|
return [
|
|
1984
1947
|
a + N * h,
|
|
1985
|
-
c + N *
|
|
1986
|
-
|
|
1948
|
+
c + N * g,
|
|
1949
|
+
d * _ / Ai(t * E + C)
|
|
1987
1950
|
];
|
|
1988
1951
|
};
|
|
1989
1952
|
}
|
|
1990
|
-
return
|
|
1953
|
+
return p.duration = m * 1e3 * t / Math.SQRT2, p;
|
|
1991
1954
|
}
|
|
1992
1955
|
return o.rho = function(s) {
|
|
1993
1956
|
var i = Math.max(1e-3, +s), a = i * i, c = a * a;
|
|
@@ -2095,11 +2058,11 @@ function Ae(e, t) {
|
|
|
2095
2058
|
function xh(e, t, n) {
|
|
2096
2059
|
var r = e.__transition, o;
|
|
2097
2060
|
r[t] = n, n.timer = za(s, 0, n.time);
|
|
2098
|
-
function s(
|
|
2099
|
-
n.state = Ri, n.timer.restart(i, n.delay, n.time), n.delay <=
|
|
2061
|
+
function s(d) {
|
|
2062
|
+
n.state = Ri, n.timer.restart(i, n.delay, n.time), n.delay <= d && i(d - n.delay);
|
|
2100
2063
|
}
|
|
2101
|
-
function i(
|
|
2102
|
-
var l,
|
|
2064
|
+
function i(d) {
|
|
2065
|
+
var l, u, f, h;
|
|
2103
2066
|
if (n.state !== Ri) return c();
|
|
2104
2067
|
for (l in r)
|
|
2105
2068
|
if (h = r[l], h.name === n.name) {
|
|
@@ -2107,21 +2070,21 @@ function xh(e, t, n) {
|
|
|
2107
2070
|
h.state === Pi ? (h.state = _n, h.timer.stop(), h.on.call("interrupt", e, e.__data__, h.index, h.group), delete r[l]) : +l < t && (h.state = _n, h.timer.stop(), h.on.call("cancel", e, e.__data__, h.index, h.group), delete r[l]);
|
|
2108
2071
|
}
|
|
2109
2072
|
if (Di(function() {
|
|
2110
|
-
n.state === En && (n.state = Pi, n.timer.restart(a, n.delay, n.time), a(
|
|
2073
|
+
n.state === En && (n.state = Pi, n.timer.restart(a, n.delay, n.time), a(d));
|
|
2111
2074
|
}), n.state = wo, n.on.call("start", e, e.__data__, n.index, n.group), n.state === wo) {
|
|
2112
|
-
for (n.state = En, o = new Array(f = n.tween.length), l = 0,
|
|
2113
|
-
(h = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (o[++
|
|
2114
|
-
o.length =
|
|
2075
|
+
for (n.state = En, o = new Array(f = n.tween.length), l = 0, u = -1; l < f; ++l)
|
|
2076
|
+
(h = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (o[++u] = h);
|
|
2077
|
+
o.length = u + 1;
|
|
2115
2078
|
}
|
|
2116
2079
|
}
|
|
2117
|
-
function a(
|
|
2118
|
-
for (var l =
|
|
2119
|
-
o[
|
|
2080
|
+
function a(d) {
|
|
2081
|
+
for (var l = d < n.duration ? n.ease.call(null, d / n.duration) : (n.timer.restart(c), n.state = vo, 1), u = -1, f = o.length; ++u < f; )
|
|
2082
|
+
o[u].call(e, l);
|
|
2120
2083
|
n.state === vo && (n.on.call("end", e, e.__data__, n.index, n.group), c());
|
|
2121
2084
|
}
|
|
2122
2085
|
function c() {
|
|
2123
2086
|
n.state = _n, n.timer.stop(), delete r[t];
|
|
2124
|
-
for (var
|
|
2087
|
+
for (var d in r) return;
|
|
2125
2088
|
delete e.__transition;
|
|
2126
2089
|
}
|
|
2127
2090
|
}
|
|
@@ -2166,12 +2129,12 @@ function Sh(e, t, n) {
|
|
|
2166
2129
|
var s = $e(this, e), i = s.tween;
|
|
2167
2130
|
if (i !== r) {
|
|
2168
2131
|
o = (r = i).slice();
|
|
2169
|
-
for (var a = { name: t, value: n }, c = 0,
|
|
2132
|
+
for (var a = { name: t, value: n }, c = 0, d = o.length; c < d; ++c)
|
|
2170
2133
|
if (o[c].name === t) {
|
|
2171
2134
|
o[c] = a;
|
|
2172
2135
|
break;
|
|
2173
2136
|
}
|
|
2174
|
-
c ===
|
|
2137
|
+
c === d && o.push(a);
|
|
2175
2138
|
}
|
|
2176
2139
|
s.tween = o;
|
|
2177
2140
|
};
|
|
@@ -2327,15 +2290,15 @@ function Wh(e) {
|
|
|
2327
2290
|
function Xh(e) {
|
|
2328
2291
|
typeof e != "function" && (e = va(e));
|
|
2329
2292
|
for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
|
|
2330
|
-
for (var s = t[o], i = s.length, a = r[o] = [], c,
|
|
2331
|
-
(c = s[
|
|
2293
|
+
for (var s = t[o], i = s.length, a = r[o] = [], c, d = 0; d < i; ++d)
|
|
2294
|
+
(c = s[d]) && e.call(c, c.__data__, d, s) && a.push(c);
|
|
2332
2295
|
return new Ge(r, this._parents, this._name, this._id);
|
|
2333
2296
|
}
|
|
2334
2297
|
function Zh(e) {
|
|
2335
2298
|
if (e._id !== this._id) throw new Error();
|
|
2336
2299
|
for (var t = this._groups, n = e._groups, r = t.length, o = n.length, s = Math.min(r, o), i = new Array(r), a = 0; a < s; ++a)
|
|
2337
|
-
for (var c = t[a],
|
|
2338
|
-
(f = c[h] ||
|
|
2300
|
+
for (var c = t[a], d = n[a], l = c.length, u = i[a] = new Array(l), f, h = 0; h < l; ++h)
|
|
2301
|
+
(f = c[h] || d[h]) && (u[h] = f);
|
|
2339
2302
|
for (; a < r; ++a)
|
|
2340
2303
|
i[a] = t[a];
|
|
2341
2304
|
return new Ge(i, this._parents, this._name, this._id);
|
|
@@ -2371,18 +2334,18 @@ function tp(e) {
|
|
|
2371
2334
|
var t = this._name, n = this._id;
|
|
2372
2335
|
typeof e != "function" && (e = Do(e));
|
|
2373
2336
|
for (var r = this._groups, o = r.length, s = new Array(o), i = 0; i < o; ++i)
|
|
2374
|
-
for (var a = r[i], c = a.length,
|
|
2375
|
-
(l = a[f]) && (
|
|
2337
|
+
for (var a = r[i], c = a.length, d = s[i] = new Array(c), l, u, f = 0; f < c; ++f)
|
|
2338
|
+
(l = a[f]) && (u = e.call(l, l.__data__, f, a)) && ("__data__" in l && (u.__data__ = l.__data__), d[f] = u, jn(d[f], t, n, f, d, Ae(l, n)));
|
|
2376
2339
|
return new Ge(s, this._parents, t, n);
|
|
2377
2340
|
}
|
|
2378
2341
|
function np(e) {
|
|
2379
2342
|
var t = this._name, n = this._id;
|
|
2380
2343
|
typeof e != "function" && (e = wa(e));
|
|
2381
2344
|
for (var r = this._groups, o = r.length, s = [], i = [], a = 0; a < o; ++a)
|
|
2382
|
-
for (var c = r[a],
|
|
2383
|
-
if (l = c[
|
|
2384
|
-
for (var f = e.call(l, l.__data__,
|
|
2385
|
-
(h = f[y]) && jn(h, t, n, y, f,
|
|
2345
|
+
for (var c = r[a], d = c.length, l, u = 0; u < d; ++u)
|
|
2346
|
+
if (l = c[u]) {
|
|
2347
|
+
for (var f = e.call(l, l.__data__, u, c), h, g = Ae(l, n), y = 0, p = f.length; y < p; ++y)
|
|
2348
|
+
(h = f[y]) && jn(h, t, n, y, f, g);
|
|
2386
2349
|
s.push(f), i.push(l);
|
|
2387
2350
|
}
|
|
2388
2351
|
return new Ge(s, i, t, n);
|
|
@@ -2420,8 +2383,8 @@ function ap(e, t, n) {
|
|
|
2420
2383
|
function lp(e, t) {
|
|
2421
2384
|
var n, r, o, s = "style." + t, i = "end." + s, a;
|
|
2422
2385
|
return function() {
|
|
2423
|
-
var c = $e(this, e),
|
|
2424
|
-
(
|
|
2386
|
+
var c = $e(this, e), d = c.on, l = c.value[s] == null ? a || (a = Ba(t)) : void 0;
|
|
2387
|
+
(d !== n || o !== l) && (r = (n = d).copy()).on(i, o = l), c.on = r;
|
|
2425
2388
|
};
|
|
2426
2389
|
}
|
|
2427
2390
|
function cp(e, t, n) {
|
|
@@ -2484,10 +2447,10 @@ function wp(e) {
|
|
|
2484
2447
|
}
|
|
2485
2448
|
function vp() {
|
|
2486
2449
|
for (var e = this._name, t = this._id, n = qa(), r = this._groups, o = r.length, s = 0; s < o; ++s)
|
|
2487
|
-
for (var i = r[s], a = i.length, c,
|
|
2488
|
-
if (c = i[
|
|
2450
|
+
for (var i = r[s], a = i.length, c, d = 0; d < a; ++d)
|
|
2451
|
+
if (c = i[d]) {
|
|
2489
2452
|
var l = Ae(c, t);
|
|
2490
|
-
jn(c, e, n,
|
|
2453
|
+
jn(c, e, n, d, i, {
|
|
2491
2454
|
time: l.time + l.delay + l.duration,
|
|
2492
2455
|
delay: 0,
|
|
2493
2456
|
duration: l.duration,
|
|
@@ -2503,8 +2466,8 @@ function bp() {
|
|
|
2503
2466
|
--o === 0 && s();
|
|
2504
2467
|
} };
|
|
2505
2468
|
n.each(function() {
|
|
2506
|
-
var
|
|
2507
|
-
l !== e && (t = (e = l).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(c)),
|
|
2469
|
+
var d = $e(this, r), l = d.on;
|
|
2470
|
+
l !== e && (t = (e = l).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(c)), d.on = t;
|
|
2508
2471
|
}), o === 0 && s();
|
|
2509
2472
|
});
|
|
2510
2473
|
}
|
|
@@ -2568,8 +2531,8 @@ function Cp(e) {
|
|
|
2568
2531
|
var t, n;
|
|
2569
2532
|
e instanceof Ge ? (t = e._id, e = e._name) : (t = qa(), (n = _p).time = $o(), e = e == null ? null : e + "");
|
|
2570
2533
|
for (var r = this._groups, o = r.length, s = 0; s < o; ++s)
|
|
2571
|
-
for (var i = r[s], a = i.length, c,
|
|
2572
|
-
(c = i[
|
|
2534
|
+
for (var i = r[s], a = i.length, c, d = 0; d < a; ++d)
|
|
2535
|
+
(c = i[d]) && jn(c, e, t, d, i, n || Sp(c, t));
|
|
2573
2536
|
return new Ge(r, this._parents, e, t);
|
|
2574
2537
|
}
|
|
2575
2538
|
sn.prototype.interrupt = Eh;
|
|
@@ -2660,7 +2623,7 @@ function Op(e, t, n) {
|
|
|
2660
2623
|
);
|
|
2661
2624
|
}
|
|
2662
2625
|
function Ga() {
|
|
2663
|
-
var e = kp, t = Mp, n = Op, r = Lp, o = Ip, s = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ph,
|
|
2626
|
+
var e = kp, t = Mp, n = Op, r = Lp, o = Ip, s = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ph, d = qn("start", "zoom", "end"), l, u, f, h = 500, g = 150, y = 0, p = 10;
|
|
2664
2627
|
function m(v) {
|
|
2665
2628
|
v.property("__zoom", $i).on("wheel.zoom", E, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", N).filter(o).on("touchstart.zoom", M).on("touchmove.zoom", O).on("touchend.zoom touchcancel.zoom", F).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2666
2629
|
}
|
|
@@ -2743,14 +2706,14 @@ function Ga() {
|
|
|
2743
2706
|
},
|
|
2744
2707
|
emit: function(v) {
|
|
2745
2708
|
var A = Se(this.that).datum();
|
|
2746
|
-
|
|
2709
|
+
d.call(
|
|
2747
2710
|
v,
|
|
2748
2711
|
this.that,
|
|
2749
2712
|
new Np(v, {
|
|
2750
2713
|
sourceEvent: this.sourceEvent,
|
|
2751
2714
|
target: m,
|
|
2752
2715
|
transform: this.that.__zoom,
|
|
2753
|
-
dispatch:
|
|
2716
|
+
dispatch: d
|
|
2754
2717
|
}),
|
|
2755
2718
|
A
|
|
2756
2719
|
);
|
|
@@ -2765,7 +2728,7 @@ function Ga() {
|
|
|
2765
2728
|
if (z.k === G) return;
|
|
2766
2729
|
L.mouse = [R, z.invert(R)], Sn(this), L.start();
|
|
2767
2730
|
}
|
|
2768
|
-
Vt(v), L.wheel = setTimeout(H,
|
|
2731
|
+
Vt(v), L.wheel = setTimeout(H, g), L.zoom("mouse", n(x(w(z, G), L.mouse[0], L.mouse[1]), L.extent, i));
|
|
2769
2732
|
function H() {
|
|
2770
2733
|
L.wheel = null, L.end();
|
|
2771
2734
|
}
|
|
@@ -2796,7 +2759,7 @@ function Ga() {
|
|
|
2796
2759
|
var L = v.touches, z = L.length, G = S(this, A, v.changedTouches.length === z).event(v), R, H, q, j;
|
|
2797
2760
|
for (cr(v), H = 0; H < z; ++H)
|
|
2798
2761
|
q = L[H], j = ke(q, this), j = [j, this.__zoom.invert(j), q.identifier], G.touch0 ? !G.touch1 && G.touch0[2] !== j[2] && (G.touch1 = j, G.taps = 0) : (G.touch0 = j, R = !0, G.taps = 1 + !!l);
|
|
2799
|
-
l && (l = clearTimeout(l)), R && (G.taps < 2 && (
|
|
2762
|
+
l && (l = clearTimeout(l)), R && (G.taps < 2 && (u = j[0], l = setTimeout(function() {
|
|
2800
2763
|
l = null;
|
|
2801
2764
|
}, h)), Sn(this), G.start());
|
|
2802
2765
|
}
|
|
@@ -2822,7 +2785,7 @@ function Ga() {
|
|
|
2822
2785
|
}, h), R = 0; R < G; ++R)
|
|
2823
2786
|
H = z[R], L.touch0 && L.touch0[2] === H.identifier ? delete L.touch0 : L.touch1 && L.touch1[2] === H.identifier && delete L.touch1;
|
|
2824
2787
|
if (L.touch1 && !L.touch0 && (L.touch0 = L.touch1, delete L.touch1), L.touch0) L.touch0[1] = this.__zoom.invert(L.touch0[0]);
|
|
2825
|
-
else if (L.end(), L.taps === 2 && (H = ke(H, this), Math.hypot(
|
|
2788
|
+
else if (L.end(), L.taps === 2 && (H = ke(H, this), Math.hypot(u[0] - H[0], u[1] - H[1]) < p)) {
|
|
2826
2789
|
var q = Se(this).on("dblclick.zoom");
|
|
2827
2790
|
q && q.apply(this, arguments);
|
|
2828
2791
|
}
|
|
@@ -2847,12 +2810,12 @@ function Ga() {
|
|
|
2847
2810
|
}, m.interpolate = function(v) {
|
|
2848
2811
|
return arguments.length ? (c = v, m) : c;
|
|
2849
2812
|
}, m.on = function() {
|
|
2850
|
-
var v =
|
|
2851
|
-
return v ===
|
|
2813
|
+
var v = d.on.apply(d, arguments);
|
|
2814
|
+
return v === d ? m : v;
|
|
2852
2815
|
}, m.clickDistance = function(v) {
|
|
2853
2816
|
return arguments.length ? (y = (v = +v) * v, m) : Math.sqrt(y);
|
|
2854
2817
|
}, m.tapDistance = function(v) {
|
|
2855
|
-
return arguments.length ? (
|
|
2818
|
+
return arguments.length ? (p = +v, m) : p;
|
|
2856
2819
|
}, m;
|
|
2857
2820
|
}
|
|
2858
2821
|
const Wn = da(null), Ap = Wn.Provider, Ie = {
|
|
@@ -2897,11 +2860,11 @@ function Dp({ proOptions: e, position: t = "bottom-right" }) {
|
|
|
2897
2860
|
$.createElement("a", { href: "https://reactflow.dev", target: "_blank", rel: "noopener noreferrer", "aria-label": "React Flow attribution" }, "React Flow")
|
|
2898
2861
|
);
|
|
2899
2862
|
}
|
|
2900
|
-
const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, labelBgStyle: s = {}, labelBgPadding: i = [2, 4], labelBgBorderRadius: a = 2, children: c, className:
|
|
2901
|
-
const
|
|
2863
|
+
const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, labelBgStyle: s = {}, labelBgPadding: i = [2, 4], labelBgBorderRadius: a = 2, children: c, className: d, ...l }) => {
|
|
2864
|
+
const u = Q(null), [f, h] = re({ x: 0, y: 0, width: 0, height: 0 }), g = me(["react-flow__edge-textwrapper", d]);
|
|
2902
2865
|
return oe(() => {
|
|
2903
|
-
if (
|
|
2904
|
-
const y =
|
|
2866
|
+
if (u.current) {
|
|
2867
|
+
const y = u.current.getBBox();
|
|
2905
2868
|
h({
|
|
2906
2869
|
x: y.x,
|
|
2907
2870
|
y: y.y,
|
|
@@ -2911,9 +2874,9 @@ const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, lab
|
|
|
2911
2874
|
}
|
|
2912
2875
|
}, [n]), typeof n > "u" || !n ? null : $.createElement(
|
|
2913
2876
|
"g",
|
|
2914
|
-
{ transform: `translate(${e - f.width / 2} ${t - f.height / 2})`, className:
|
|
2877
|
+
{ transform: `translate(${e - f.width / 2} ${t - f.height / 2})`, className: g, visibility: f.width ? "visible" : "hidden", ...l },
|
|
2915
2878
|
o && $.createElement("rect", { width: f.width + 2 * i[0], x: -i[0], y: -i[1], height: f.height + 2 * i[1], className: "react-flow__edge-textbg", style: s, rx: a, ry: a }),
|
|
2916
|
-
$.createElement("text", { className: "react-flow__edge-text", y: f.height / 2, dy: "0.3em", ref:
|
|
2879
|
+
$.createElement("text", { className: "react-flow__edge-text", y: f.height / 2, dy: "0.3em", ref: u, style: r }, n),
|
|
2917
2880
|
c
|
|
2918
2881
|
);
|
|
2919
2882
|
};
|
|
@@ -2949,7 +2912,7 @@ const Ho = (e) => ({
|
|
|
2949
2912
|
}), $p = (e, t) => Za(Xa(Jt(e), Jt(t))), bo = (e, t) => {
|
|
2950
2913
|
const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), r = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
|
|
2951
2914
|
return Math.ceil(n * r);
|
|
2952
|
-
}, Fp = (e) => Ce(e.width) && Ce(e.height) && Ce(e.x) && Ce(e.y), Ce = (e) => !isNaN(e) && isFinite(e), ue = Symbol.for("internals"), Ua = ["Enter", " ", "Escape"], Ka = (e, t) => {
|
|
2915
|
+
}, Fp = (e) => Ce(e.width) && Ce(e.height) && Ce(e.x) && Ce(e.y), Ce = (e) => !isNaN(e) && isFinite(e), ue = /* @__PURE__ */ Symbol.for("internals"), Ua = ["Enter", " ", "Escape"], Ka = (e, t) => {
|
|
2953
2916
|
process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`);
|
|
2954
2917
|
}, zp = (e) => "nativeEvent" in e;
|
|
2955
2918
|
function xo(e) {
|
|
@@ -2962,12 +2925,12 @@ const Qa = (e) => "clientX" in e, Qe = (e, t) => {
|
|
|
2962
2925
|
x: r - (t?.left ?? 0),
|
|
2963
2926
|
y: o - (t?.top ?? 0)
|
|
2964
2927
|
};
|
|
2965
|
-
}, Dn = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, ln = ({ id: e, path: t, labelX: n, labelY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius:
|
|
2928
|
+
}, Dn = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, ln = ({ id: e, path: t, labelX: n, labelY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h = 20 }) => $.createElement(
|
|
2966
2929
|
$.Fragment,
|
|
2967
2930
|
null,
|
|
2968
|
-
$.createElement("path", { id: e, style: l, d: t, fill: "none", className: "react-flow__edge-path", markerEnd:
|
|
2931
|
+
$.createElement("path", { id: e, style: l, d: t, fill: "none", className: "react-flow__edge-path", markerEnd: u, markerStart: f }),
|
|
2969
2932
|
h && $.createElement("path", { d: t, fill: "none", strokeOpacity: 0, strokeWidth: h, className: "react-flow__edge-interaction" }),
|
|
2970
|
-
o && Ce(n) && Ce(r) ? $.createElement(Pp, { x: n, y: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius:
|
|
2933
|
+
o && Ce(n) && Ce(r) ? $.createElement(Pp, { x: n, y: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d }) : null
|
|
2971
2934
|
);
|
|
2972
2935
|
ln.displayName = "BaseEdge";
|
|
2973
2936
|
const Vp = (e, t) => typeof t < "u" && t ? `url(#${t})` : typeof e < "u" ? `url(#react-flow__${e})` : "none";
|
|
@@ -2982,8 +2945,8 @@ function Ja({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
|
|
|
2982
2945
|
return [s, a, o, i];
|
|
2983
2946
|
}
|
|
2984
2947
|
function el({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourceControlX: o, sourceControlY: s, targetControlX: i, targetControlY: a }) {
|
|
2985
|
-
const c = e * 0.125 + o * 0.375 + i * 0.375 + n * 0.125,
|
|
2986
|
-
return [c,
|
|
2948
|
+
const c = e * 0.125 + o * 0.375 + i * 0.375 + n * 0.125, d = t * 0.125 + s * 0.375 + a * 0.375 + r * 0.125, l = Math.abs(c - e), u = Math.abs(d - t);
|
|
2949
|
+
return [c, d, l, u];
|
|
2987
2950
|
}
|
|
2988
2951
|
var gt;
|
|
2989
2952
|
(function(e) {
|
|
@@ -3019,13 +2982,13 @@ function tl({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
|
|
|
3019
2982
|
y1: t,
|
|
3020
2983
|
x2: r,
|
|
3021
2984
|
y2: o
|
|
3022
|
-
}), [c,
|
|
2985
|
+
}), [c, d] = Vi({
|
|
3023
2986
|
pos: s,
|
|
3024
2987
|
x1: r,
|
|
3025
2988
|
y1: o,
|
|
3026
2989
|
x2: e,
|
|
3027
2990
|
y2: t
|
|
3028
|
-
}), [l,
|
|
2991
|
+
}), [l, u, f, h] = el({
|
|
3029
2992
|
sourceX: e,
|
|
3030
2993
|
sourceY: t,
|
|
3031
2994
|
targetX: r,
|
|
@@ -3033,18 +2996,18 @@ function tl({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
|
|
|
3033
2996
|
sourceControlX: i,
|
|
3034
2997
|
sourceControlY: a,
|
|
3035
2998
|
targetControlX: c,
|
|
3036
|
-
targetControlY:
|
|
2999
|
+
targetControlY: d
|
|
3037
3000
|
});
|
|
3038
3001
|
return [
|
|
3039
|
-
`M${e},${t} C${i},${a} ${c},${
|
|
3002
|
+
`M${e},${t} C${i},${a} ${c},${d} ${r},${o}`,
|
|
3040
3003
|
l,
|
|
3041
|
-
|
|
3004
|
+
u,
|
|
3042
3005
|
f,
|
|
3043
3006
|
h
|
|
3044
3007
|
];
|
|
3045
3008
|
}
|
|
3046
|
-
const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle:
|
|
3047
|
-
const [
|
|
3009
|
+
const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: y }) => {
|
|
3010
|
+
const [p, m, w] = tl({
|
|
3048
3011
|
sourceX: e,
|
|
3049
3012
|
sourceY: t,
|
|
3050
3013
|
sourcePosition: o,
|
|
@@ -3052,7 +3015,7 @@ const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition:
|
|
|
3052
3015
|
targetY: r,
|
|
3053
3016
|
targetPosition: s
|
|
3054
3017
|
});
|
|
3055
|
-
return $.createElement(ln, { path:
|
|
3018
|
+
return $.createElement(ln, { path: p, labelX: m, labelY: w, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: y });
|
|
3056
3019
|
});
|
|
3057
3020
|
qo.displayName = "SimpleBezierEdge";
|
|
3058
3021
|
const Hi = {
|
|
@@ -3062,89 +3025,89 @@ const Hi = {
|
|
|
3062
3025
|
[X.Bottom]: { x: 0, y: 1 }
|
|
3063
3026
|
}, Hp = ({ source: e, sourcePosition: t = X.Bottom, target: n }) => t === X.Left || t === X.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, Bi = (e, t) => Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
|
|
3064
3027
|
function Bp({ source: e, sourcePosition: t = X.Bottom, target: n, targetPosition: r = X.Top, center: o, offset: s }) {
|
|
3065
|
-
const i = Hi[t], a = Hi[r], c = { x: e.x + i.x * s, y: e.y + i.y * s },
|
|
3028
|
+
const i = Hi[t], a = Hi[r], c = { x: e.x + i.x * s, y: e.y + i.y * s }, d = { x: n.x + a.x * s, y: n.y + a.y * s }, l = Hp({
|
|
3066
3029
|
source: c,
|
|
3067
3030
|
sourcePosition: t,
|
|
3068
|
-
target:
|
|
3069
|
-
}),
|
|
3070
|
-
let h = [],
|
|
3071
|
-
const
|
|
3031
|
+
target: d
|
|
3032
|
+
}), u = l.x !== 0 ? "x" : "y", f = l[u];
|
|
3033
|
+
let h = [], g, y;
|
|
3034
|
+
const p = { x: 0, y: 0 }, m = { x: 0, y: 0 }, [w, x, b, C] = Ja({
|
|
3072
3035
|
sourceX: e.x,
|
|
3073
3036
|
sourceY: e.y,
|
|
3074
3037
|
targetX: n.x,
|
|
3075
3038
|
targetY: n.y
|
|
3076
3039
|
});
|
|
3077
|
-
if (i[
|
|
3078
|
-
|
|
3040
|
+
if (i[u] * a[u] === -1) {
|
|
3041
|
+
g = o.x ?? w, y = o.y ?? x;
|
|
3079
3042
|
const D = [
|
|
3080
|
-
{ x:
|
|
3081
|
-
{ x:
|
|
3043
|
+
{ x: g, y: c.y },
|
|
3044
|
+
{ x: g, y: d.y }
|
|
3082
3045
|
], E = [
|
|
3083
3046
|
{ x: c.x, y },
|
|
3084
|
-
{ x:
|
|
3047
|
+
{ x: d.x, y }
|
|
3085
3048
|
];
|
|
3086
|
-
i[
|
|
3049
|
+
i[u] === f ? h = u === "x" ? D : E : h = u === "x" ? E : D;
|
|
3087
3050
|
} else {
|
|
3088
|
-
const D = [{ x: c.x, y:
|
|
3089
|
-
if (
|
|
3090
|
-
const F = Math.abs(e[
|
|
3051
|
+
const D = [{ x: c.x, y: d.y }], E = [{ x: d.x, y: c.y }];
|
|
3052
|
+
if (u === "x" ? h = i.x === f ? E : D : h = i.y === f ? D : E, t === r) {
|
|
3053
|
+
const F = Math.abs(e[u] - n[u]);
|
|
3091
3054
|
if (F <= s) {
|
|
3092
3055
|
const v = Math.min(s - 1, s - F);
|
|
3093
|
-
i[
|
|
3056
|
+
i[u] === f ? p[u] = (c[u] > e[u] ? -1 : 1) * v : m[u] = (d[u] > n[u] ? -1 : 1) * v;
|
|
3094
3057
|
}
|
|
3095
3058
|
}
|
|
3096
3059
|
if (t !== r) {
|
|
3097
|
-
const F =
|
|
3098
|
-
(i[
|
|
3060
|
+
const F = u === "x" ? "y" : "x", v = i[u] === a[F], A = c[F] > d[F], L = c[F] < d[F];
|
|
3061
|
+
(i[u] === 1 && (!v && A || v && L) || i[u] !== 1 && (!v && L || v && A)) && (h = u === "x" ? D : E);
|
|
3099
3062
|
}
|
|
3100
|
-
const _ = { x: c.x +
|
|
3101
|
-
M >= O ? (
|
|
3063
|
+
const _ = { x: c.x + p.x, y: c.y + p.y }, N = { x: d.x + m.x, y: d.y + m.y }, M = Math.max(Math.abs(_.x - h[0].x), Math.abs(N.x - h[0].x)), O = Math.max(Math.abs(_.y - h[0].y), Math.abs(N.y - h[0].y));
|
|
3064
|
+
M >= O ? (g = (_.x + N.x) / 2, y = h[0].y) : (g = h[0].x, y = (_.y + N.y) / 2);
|
|
3102
3065
|
}
|
|
3103
3066
|
return [[
|
|
3104
3067
|
e,
|
|
3105
|
-
{ x: c.x +
|
|
3068
|
+
{ x: c.x + p.x, y: c.y + p.y },
|
|
3106
3069
|
...h,
|
|
3107
|
-
{ x:
|
|
3070
|
+
{ x: d.x + m.x, y: d.y + m.y },
|
|
3108
3071
|
n
|
|
3109
|
-
],
|
|
3072
|
+
], g, y, b, C];
|
|
3110
3073
|
}
|
|
3111
3074
|
function qp(e, t, n, r) {
|
|
3112
3075
|
const o = Math.min(Bi(e, t) / 2, Bi(t, n) / 2, r), { x: s, y: i } = t;
|
|
3113
3076
|
if (e.x === s && s === n.x || e.y === i && i === n.y)
|
|
3114
3077
|
return `L${s} ${i}`;
|
|
3115
3078
|
if (e.y === i) {
|
|
3116
|
-
const
|
|
3117
|
-
return `L ${s + o *
|
|
3079
|
+
const d = e.x < n.x ? -1 : 1, l = e.y < n.y ? 1 : -1;
|
|
3080
|
+
return `L ${s + o * d},${i}Q ${s},${i} ${s},${i + o * l}`;
|
|
3118
3081
|
}
|
|
3119
3082
|
const a = e.x < n.x ? 1 : -1, c = e.y < n.y ? -1 : 1;
|
|
3120
3083
|
return `L ${s},${i + o * c}Q ${s},${i} ${s + o * a},${i}`;
|
|
3121
3084
|
}
|
|
3122
|
-
function Eo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r, targetY: o, targetPosition: s = X.Top, borderRadius: i = 5, centerX: a, centerY: c, offset:
|
|
3123
|
-
const [l,
|
|
3085
|
+
function Eo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r, targetY: o, targetPosition: s = X.Top, borderRadius: i = 5, centerX: a, centerY: c, offset: d = 20 }) {
|
|
3086
|
+
const [l, u, f, h, g] = Bp({
|
|
3124
3087
|
source: { x: e, y: t },
|
|
3125
3088
|
sourcePosition: n,
|
|
3126
3089
|
target: { x: r, y: o },
|
|
3127
3090
|
targetPosition: s,
|
|
3128
3091
|
center: { x: a, y: c },
|
|
3129
|
-
offset:
|
|
3092
|
+
offset: d
|
|
3130
3093
|
});
|
|
3131
|
-
return [l.reduce((
|
|
3094
|
+
return [l.reduce((p, m, w) => {
|
|
3132
3095
|
let x = "";
|
|
3133
|
-
return w > 0 && w < l.length - 1 ? x = qp(l[w - 1], m, l[w + 1], i) : x = `${w === 0 ? "M" : "L"}${m.x} ${m.y}`,
|
|
3134
|
-
}, ""),
|
|
3096
|
+
return w > 0 && w < l.length - 1 ? x = qp(l[w - 1], m, l[w + 1], i) : x = `${w === 0 ? "M" : "L"}${m.x} ${m.y}`, p += x, p;
|
|
3097
|
+
}, ""), u, f, h, g];
|
|
3135
3098
|
}
|
|
3136
|
-
const Xn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius:
|
|
3099
|
+
const Xn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, sourcePosition: u = X.Bottom, targetPosition: f = X.Top, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: p }) => {
|
|
3137
3100
|
const [m, w, x] = Eo({
|
|
3138
3101
|
sourceX: e,
|
|
3139
3102
|
sourceY: t,
|
|
3140
|
-
sourcePosition:
|
|
3103
|
+
sourcePosition: u,
|
|
3141
3104
|
targetX: n,
|
|
3142
3105
|
targetY: r,
|
|
3143
3106
|
targetPosition: f,
|
|
3144
3107
|
borderRadius: y?.borderRadius,
|
|
3145
3108
|
offset: y?.offset
|
|
3146
3109
|
});
|
|
3147
|
-
return $.createElement(ln, { path: m, labelX: w, labelY: x, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius:
|
|
3110
|
+
return $.createElement(ln, { path: m, labelX: w, labelY: x, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: h, markerStart: g, interactionWidth: p });
|
|
3148
3111
|
});
|
|
3149
3112
|
Xn.displayName = "SmoothStepEdge";
|
|
3150
3113
|
const Go = ae((e) => $.createElement(Xn, { ...e, pathOptions: Ne(() => ({ borderRadius: 0, offset: e.pathOptions?.offset }), [e.pathOptions?.offset]) }));
|
|
@@ -3158,9 +3121,9 @@ function Gp({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
|
|
|
3158
3121
|
});
|
|
3159
3122
|
return [`M ${e},${t}L ${n},${r}`, o, s, i, a];
|
|
3160
3123
|
}
|
|
3161
|
-
const Yo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius:
|
|
3162
|
-
const [
|
|
3163
|
-
return $.createElement(ln, { path:
|
|
3124
|
+
const Yo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h }) => {
|
|
3125
|
+
const [g, y, p] = Gp({ sourceX: e, sourceY: t, targetX: n, targetY: r });
|
|
3126
|
+
return $.createElement(ln, { path: g, labelX: y, labelY: p, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h });
|
|
3164
3127
|
});
|
|
3165
3128
|
Yo.displayName = "StraightEdge";
|
|
3166
3129
|
function mn(e, t) {
|
|
@@ -3186,32 +3149,32 @@ function jo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
|
|
|
3186
3149
|
x2: r,
|
|
3187
3150
|
y2: o,
|
|
3188
3151
|
c: i
|
|
3189
|
-
}), [
|
|
3152
|
+
}), [d, l] = qi({
|
|
3190
3153
|
pos: s,
|
|
3191
3154
|
x1: r,
|
|
3192
3155
|
y1: o,
|
|
3193
3156
|
x2: e,
|
|
3194
3157
|
y2: t,
|
|
3195
3158
|
c: i
|
|
3196
|
-
}), [
|
|
3159
|
+
}), [u, f, h, g] = el({
|
|
3197
3160
|
sourceX: e,
|
|
3198
3161
|
sourceY: t,
|
|
3199
3162
|
targetX: r,
|
|
3200
3163
|
targetY: o,
|
|
3201
3164
|
sourceControlX: a,
|
|
3202
3165
|
sourceControlY: c,
|
|
3203
|
-
targetControlX:
|
|
3166
|
+
targetControlX: d,
|
|
3204
3167
|
targetControlY: l
|
|
3205
3168
|
});
|
|
3206
3169
|
return [
|
|
3207
|
-
`M${e},${t} C${a},${c} ${
|
|
3208
|
-
|
|
3170
|
+
`M${e},${t} C${a},${c} ${d},${l} ${r},${o}`,
|
|
3171
|
+
u,
|
|
3209
3172
|
f,
|
|
3210
3173
|
h,
|
|
3211
|
-
|
|
3174
|
+
g
|
|
3212
3175
|
];
|
|
3213
3176
|
}
|
|
3214
|
-
const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle:
|
|
3177
|
+
const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: p }) => {
|
|
3215
3178
|
const [m, w, x] = jo({
|
|
3216
3179
|
sourceX: e,
|
|
3217
3180
|
sourceY: t,
|
|
@@ -3221,7 +3184,7 @@ const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition:
|
|
|
3221
3184
|
targetPosition: s,
|
|
3222
3185
|
curvature: y?.curvature
|
|
3223
3186
|
});
|
|
3224
|
-
return $.createElement(ln, { path: m, labelX: w, labelY: x, label: i, labelStyle: a, labelShowBg: c, labelBgStyle:
|
|
3187
|
+
return $.createElement(ln, { path: m, labelX: w, labelY: x, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: p });
|
|
3225
3188
|
});
|
|
3226
3189
|
Pn.displayName = "BezierEdge";
|
|
3227
3190
|
const Wo = da(null), Yp = Wo.Provider;
|
|
@@ -3286,25 +3249,25 @@ const jp = () => Bn(Wo), Wp = (e) => "id" in e && "source" in e && "target" in e
|
|
|
3286
3249
|
y: (t.y - r) / o,
|
|
3287
3250
|
width: t.width / o,
|
|
3288
3251
|
height: t.height / o
|
|
3289
|
-
},
|
|
3252
|
+
}, d = [];
|
|
3290
3253
|
return e.forEach((l) => {
|
|
3291
|
-
const { width:
|
|
3292
|
-
if (i && !h ||
|
|
3254
|
+
const { width: u, height: f, selectable: h = !0, hidden: g = !1 } = l;
|
|
3255
|
+
if (i && !h || g)
|
|
3293
3256
|
return !1;
|
|
3294
|
-
const { positionAbsolute: y } = ht(l, a),
|
|
3257
|
+
const { positionAbsolute: y } = ht(l, a), p = {
|
|
3295
3258
|
x: y.x,
|
|
3296
3259
|
y: y.y,
|
|
3297
|
-
width:
|
|
3260
|
+
width: u || 0,
|
|
3298
3261
|
height: f || 0
|
|
3299
|
-
}, m = bo(c,
|
|
3300
|
-
(w || x || m >= b || l.dragging) &&
|
|
3301
|
-
}),
|
|
3262
|
+
}, m = bo(c, p), w = typeof u > "u" || typeof f > "u" || u === null || f === null, x = s && m > 0, b = (u || 0) * (f || 0);
|
|
3263
|
+
(w || x || m >= b || l.dragging) && d.push(l);
|
|
3264
|
+
}), d;
|
|
3302
3265
|
}, ol = (e, t) => {
|
|
3303
3266
|
const n = e.map((r) => r.id);
|
|
3304
3267
|
return t.filter((r) => n.includes(r.source) || n.includes(r.target));
|
|
3305
3268
|
}, il = (e, t, n, r, o, s = 0.1) => {
|
|
3306
|
-
const i = t / (e.width * (1 + s)), a = n / (e.height * (1 + s)), c = Math.min(i, a),
|
|
3307
|
-
return { x: f, y: h, zoom:
|
|
3269
|
+
const i = t / (e.width * (1 + s)), a = n / (e.height * (1 + s)), c = Math.min(i, a), d = Tt(c, r, o), l = e.x + e.width / 2, u = e.y + e.height / 2, f = t / 2 - l * d, h = n / 2 - u * d;
|
|
3270
|
+
return { x: f, y: h, zoom: d };
|
|
3308
3271
|
}, at = (e, t = 0) => e.transition().duration(t);
|
|
3309
3272
|
function Gi(e, t, n, r) {
|
|
3310
3273
|
return (t[n] || []).reduce((o, s) => (`${e.id}-${s.id}-${n}` !== r && o.push({
|
|
@@ -3316,18 +3279,18 @@ function Gi(e, t, n, r) {
|
|
|
3316
3279
|
}), o), []);
|
|
3317
3280
|
}
|
|
3318
3281
|
function Kp(e, t, n, r, o, s) {
|
|
3319
|
-
const { x: i, y: a } = Qe(e),
|
|
3320
|
-
if (
|
|
3321
|
-
const
|
|
3322
|
-
if (
|
|
3323
|
-
const y = Xo(void 0,
|
|
3282
|
+
const { x: i, y: a } = Qe(e), d = t.elementsFromPoint(i, a).find((g) => g.classList.contains("react-flow__handle"));
|
|
3283
|
+
if (d) {
|
|
3284
|
+
const g = d.getAttribute("data-nodeid");
|
|
3285
|
+
if (g) {
|
|
3286
|
+
const y = Xo(void 0, d), p = d.getAttribute("data-handleid"), m = s({ nodeId: g, id: p, type: y });
|
|
3324
3287
|
if (m) {
|
|
3325
|
-
const w = o.find((x) => x.nodeId ===
|
|
3288
|
+
const w = o.find((x) => x.nodeId === g && x.type === y && x.id === p);
|
|
3326
3289
|
return {
|
|
3327
3290
|
handle: {
|
|
3328
|
-
id:
|
|
3291
|
+
id: p,
|
|
3329
3292
|
type: y,
|
|
3330
|
-
nodeId:
|
|
3293
|
+
nodeId: g,
|
|
3331
3294
|
x: w?.x || n.x,
|
|
3332
3295
|
y: w?.y || n.y
|
|
3333
3296
|
},
|
|
@@ -3336,22 +3299,22 @@ function Kp(e, t, n, r, o, s) {
|
|
|
3336
3299
|
}
|
|
3337
3300
|
}
|
|
3338
3301
|
}
|
|
3339
|
-
let l = [],
|
|
3340
|
-
if (o.forEach((
|
|
3341
|
-
const y = Math.sqrt((
|
|
3302
|
+
let l = [], u = 1 / 0;
|
|
3303
|
+
if (o.forEach((g) => {
|
|
3304
|
+
const y = Math.sqrt((g.x - n.x) ** 2 + (g.y - n.y) ** 2);
|
|
3342
3305
|
if (y <= r) {
|
|
3343
|
-
const
|
|
3344
|
-
y <=
|
|
3345
|
-
handle:
|
|
3346
|
-
validHandleResult:
|
|
3347
|
-
}),
|
|
3306
|
+
const p = s(g);
|
|
3307
|
+
y <= u && (y < u ? l = [{ handle: g, validHandleResult: p }] : y === u && l.push({
|
|
3308
|
+
handle: g,
|
|
3309
|
+
validHandleResult: p
|
|
3310
|
+
}), u = y);
|
|
3348
3311
|
}
|
|
3349
3312
|
}), !l.length)
|
|
3350
3313
|
return { handle: null, validHandleResult: sl() };
|
|
3351
3314
|
if (l.length === 1)
|
|
3352
3315
|
return l[0];
|
|
3353
|
-
const f = l.some(({ validHandleResult:
|
|
3354
|
-
return l.find(({ handle:
|
|
3316
|
+
const f = l.some(({ validHandleResult: g }) => g.isValid), h = l.some(({ handle: g }) => g.type === "target");
|
|
3317
|
+
return l.find(({ handle: g, validHandleResult: y }) => h ? g.type === "target" : f ? y.isValid : !0) || l[0];
|
|
3355
3318
|
}
|
|
3356
3319
|
const Qp = { source: null, target: null, sourceHandle: null, targetHandle: null }, sl = () => ({
|
|
3357
3320
|
handleDomNode: null,
|
|
@@ -3360,24 +3323,24 @@ const Qp = { source: null, target: null, sourceHandle: null, targetHandle: null
|
|
|
3360
3323
|
endHandle: null
|
|
3361
3324
|
});
|
|
3362
3325
|
function al(e, t, n, r, o, s, i) {
|
|
3363
|
-
const a = o === "target", c = i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),
|
|
3326
|
+
const a = o === "target", c = i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`), d = {
|
|
3364
3327
|
...sl(),
|
|
3365
3328
|
handleDomNode: c
|
|
3366
3329
|
};
|
|
3367
3330
|
if (c) {
|
|
3368
|
-
const l = Xo(void 0, c),
|
|
3369
|
-
source: a ?
|
|
3331
|
+
const l = Xo(void 0, c), u = c.getAttribute("data-nodeid"), f = c.getAttribute("data-handleid"), h = c.classList.contains("connectable"), g = c.classList.contains("connectableend"), y = {
|
|
3332
|
+
source: a ? u : n,
|
|
3370
3333
|
sourceHandle: a ? f : r,
|
|
3371
|
-
target: a ? n :
|
|
3334
|
+
target: a ? n : u,
|
|
3372
3335
|
targetHandle: a ? r : f
|
|
3373
3336
|
};
|
|
3374
|
-
|
|
3375
|
-
nodeId:
|
|
3337
|
+
d.connection = y, h && g && (t === gt.Strict ? a && l === "source" || !a && l === "target" : u !== n || f !== r) && (d.endHandle = {
|
|
3338
|
+
nodeId: u,
|
|
3376
3339
|
handleId: f,
|
|
3377
3340
|
type: l
|
|
3378
|
-
},
|
|
3341
|
+
}, d.isValid = s(y));
|
|
3379
3342
|
}
|
|
3380
|
-
return
|
|
3343
|
+
return d;
|
|
3381
3344
|
}
|
|
3382
3345
|
function Jp({ nodes: e, nodeId: t, handleId: n, handleType: r }) {
|
|
3383
3346
|
return e.reduce((o, s) => {
|
|
@@ -3399,8 +3362,8 @@ function eg(e, t) {
|
|
|
3399
3362
|
let n = null;
|
|
3400
3363
|
return t ? n = "valid" : e && !t && (n = "invalid"), n;
|
|
3401
3364
|
}
|
|
3402
|
-
function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getState: s, setState: i, isValidConnection: a, edgeUpdaterType: c, onReconnectEnd:
|
|
3403
|
-
const l = Wa(e.target), { connectionMode:
|
|
3365
|
+
function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getState: s, setState: i, isValidConnection: a, edgeUpdaterType: c, onReconnectEnd: d }) {
|
|
3366
|
+
const l = Wa(e.target), { connectionMode: u, domNode: f, autoPanOnConnect: h, connectionRadius: g, onConnectStart: y, panBy: p, getNodes: m, cancelConnection: w } = s();
|
|
3404
3367
|
let x = 0, b;
|
|
3405
3368
|
const { x: C, y: S } = Qe(e), D = l?.elementFromPoint(C, S), E = Xo(c, D), _ = f?.getBoundingClientRect();
|
|
3406
3369
|
if (!_ || !E)
|
|
@@ -3415,7 +3378,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
|
|
|
3415
3378
|
if (!h)
|
|
3416
3379
|
return;
|
|
3417
3380
|
const [H, q] = ja(M, _);
|
|
3418
|
-
|
|
3381
|
+
p({ x: H, y: q }), x = requestAnimationFrame(z);
|
|
3419
3382
|
};
|
|
3420
3383
|
i({
|
|
3421
3384
|
connectionPosition: M,
|
|
@@ -3434,7 +3397,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
|
|
|
3434
3397
|
function G(H) {
|
|
3435
3398
|
const { transform: q } = s();
|
|
3436
3399
|
M = Qe(H, _);
|
|
3437
|
-
const { handle: j, validHandleResult: k } = Kp(H, l, So(M, q, !1, [1, 1]),
|
|
3400
|
+
const { handle: j, validHandleResult: k } = Kp(H, l, So(M, q, !1, [1, 1]), g, L, (I) => al(I, u, n, t, o ? "target" : "source", a, l));
|
|
3438
3401
|
if (b = j, O || (z(), O = !0), A = k.handleDomNode, F = k.connection, v = k.isValid, i({
|
|
3439
3402
|
connectionPosition: b && v ? nl({
|
|
3440
3403
|
x: b.x,
|
|
@@ -3447,7 +3410,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
|
|
|
3447
3410
|
F.source !== F.target && A && (ur(N), N = A, A.classList.add("connecting", "react-flow__handle-connecting"), A.classList.toggle("valid", v), A.classList.toggle("react-flow__handle-valid", v));
|
|
3448
3411
|
}
|
|
3449
3412
|
function R(H) {
|
|
3450
|
-
(b || A) && F && v && r?.(F), s().onConnectEnd?.(H), c &&
|
|
3413
|
+
(b || A) && F && v && r?.(F), s().onConnectEnd?.(H), c && d?.(H), ur(N), w(), cancelAnimationFrame(x), O = !1, v = !1, F = null, A = null, l.removeEventListener("mousemove", G), l.removeEventListener("mouseup", R), l.removeEventListener("touchmove", G), l.removeEventListener("touchend", R);
|
|
3451
3414
|
}
|
|
3452
3415
|
l.addEventListener("mousemove", G), l.addEventListener("mouseup", R), l.addEventListener("touchmove", G), l.addEventListener("touchend", R);
|
|
3453
3416
|
}
|
|
@@ -3461,16 +3424,16 @@ const Yi = () => !0, tg = (e) => ({
|
|
|
3461
3424
|
connecting: o?.nodeId === e && o?.handleId === t && o?.type === n || s?.nodeId === e && s?.handleId === t && s?.type === n,
|
|
3462
3425
|
clickConnecting: i?.nodeId === e && i?.handleId === t && i?.type === n
|
|
3463
3426
|
};
|
|
3464
|
-
}, cl = ua(({ type: e = "source", position: t = X.Top, isValidConnection: n, isConnectable: r = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: i, onConnect: a, children: c, className:
|
|
3465
|
-
const
|
|
3466
|
-
m ||
|
|
3427
|
+
}, cl = ua(({ type: e = "source", position: t = X.Top, isValidConnection: n, isConnectable: r = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: i, onConnect: a, children: c, className: d, onMouseDown: l, onTouchStart: u, ...f }, h) => {
|
|
3428
|
+
const g = i || null, y = e === "target", p = pe(), m = jp(), { connectOnClick: w, noPanClassName: x } = le(tg, he), { connecting: b, clickConnecting: C } = le(ng(m, g, e), he);
|
|
3429
|
+
m || p.getState().onError?.("010", Ie.error010());
|
|
3467
3430
|
const S = (_) => {
|
|
3468
|
-
const { defaultEdgeOptions: N, onConnect: M, hasDefaultEdges: O } =
|
|
3431
|
+
const { defaultEdgeOptions: N, onConnect: M, hasDefaultEdges: O } = p.getState(), F = {
|
|
3469
3432
|
...N,
|
|
3470
3433
|
..._
|
|
3471
3434
|
};
|
|
3472
3435
|
if (O) {
|
|
3473
|
-
const { edges: v, setEdges: A } =
|
|
3436
|
+
const { edges: v, setEdges: A } = p.getState();
|
|
3474
3437
|
A(Up(F, v));
|
|
3475
3438
|
}
|
|
3476
3439
|
M?.(F), a?.(F);
|
|
@@ -3480,35 +3443,35 @@ const Yi = () => !0, tg = (e) => ({
|
|
|
3480
3443
|
const N = Qa(_);
|
|
3481
3444
|
o && (N && _.button === 0 || !N) && ll({
|
|
3482
3445
|
event: _,
|
|
3483
|
-
handleId:
|
|
3446
|
+
handleId: g,
|
|
3484
3447
|
nodeId: m,
|
|
3485
3448
|
onConnect: S,
|
|
3486
3449
|
isTarget: y,
|
|
3487
|
-
getState:
|
|
3488
|
-
setState:
|
|
3489
|
-
isValidConnection: n ||
|
|
3490
|
-
}), N ? l?.(_) :
|
|
3450
|
+
getState: p.getState,
|
|
3451
|
+
setState: p.setState,
|
|
3452
|
+
isValidConnection: n || p.getState().isValidConnection || Yi
|
|
3453
|
+
}), N ? l?.(_) : u?.(_);
|
|
3491
3454
|
}, E = (_) => {
|
|
3492
|
-
const { onClickConnectStart: N, onClickConnectEnd: M, connectionClickStartHandle: O, connectionMode: F, isValidConnection: v } =
|
|
3455
|
+
const { onClickConnectStart: N, onClickConnectEnd: M, connectionClickStartHandle: O, connectionMode: F, isValidConnection: v } = p.getState();
|
|
3493
3456
|
if (!m || !O && !o)
|
|
3494
3457
|
return;
|
|
3495
3458
|
if (!O) {
|
|
3496
|
-
N?.(_, { nodeId: m, handleId:
|
|
3459
|
+
N?.(_, { nodeId: m, handleId: g, handleType: e }), p.setState({ connectionClickStartHandle: { nodeId: m, type: e, handleId: g } });
|
|
3497
3460
|
return;
|
|
3498
3461
|
}
|
|
3499
3462
|
const A = Wa(_.target), L = n || v || Yi, { connection: z, isValid: G } = al({
|
|
3500
3463
|
nodeId: m,
|
|
3501
|
-
id:
|
|
3464
|
+
id: g,
|
|
3502
3465
|
type: e
|
|
3503
3466
|
}, F, O.nodeId, O.handleId || null, O.type, L, A);
|
|
3504
|
-
G && S(z), M?.(_),
|
|
3467
|
+
G && S(z), M?.(_), p.setState({ connectionClickStartHandle: null });
|
|
3505
3468
|
};
|
|
3506
|
-
return $.createElement("div", { "data-handleid":
|
|
3469
|
+
return $.createElement("div", { "data-handleid": g, "data-nodeid": m, "data-handlepos": t, "data-id": `${m}-${g}-${e}`, className: me([
|
|
3507
3470
|
"react-flow__handle",
|
|
3508
3471
|
`react-flow__handle-${t}`,
|
|
3509
3472
|
"nodrag",
|
|
3510
3473
|
x,
|
|
3511
|
-
|
|
3474
|
+
d,
|
|
3512
3475
|
{
|
|
3513
3476
|
source: !y,
|
|
3514
3477
|
target: y,
|
|
@@ -3590,14 +3553,14 @@ function J(e, t, n) {
|
|
|
3590
3553
|
typeof t < "u" && n({ [e]: t });
|
|
3591
3554
|
}, [t]);
|
|
3592
3555
|
}
|
|
3593
|
-
const lg = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: o, onConnectStart: s, onConnectEnd: i, onClickConnectStart: a, onClickConnectEnd: c, nodesDraggable:
|
|
3556
|
+
const lg = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: o, onConnectStart: s, onConnectEnd: i, onClickConnectStart: a, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: u, edgesFocusable: f, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: p, nodeExtent: m, onNodesChange: w, onEdgesChange: x, elementsSelectable: b, connectionMode: C, snapGrid: S, snapToGrid: D, translateExtent: E, connectOnClick: _, defaultEdgeOptions: N, fitView: M, fitViewOptions: O, onNodesDelete: F, onEdgesDelete: v, onNodeDrag: A, onNodeDragStart: L, onNodeDragStop: z, onSelectionDrag: G, onSelectionDragStart: R, onSelectionDragStop: H, noPanClassName: q, nodeOrigin: j, rfId: k, autoPanOnConnect: I, autoPanOnNodeDrag: P, onError: B, connectionRadius: V, isValidConnection: Y, nodeDragThreshold: W }) => {
|
|
3594
3557
|
const { setNodes: Z, setEdges: ne, setDefaultNodesAndEdges: K, setMinZoom: ee, setMaxZoom: ce, setTranslateExtent: se, setNodeExtent: ye, reset: ie } = le(ag, he), U = pe();
|
|
3595
3558
|
return oe(() => {
|
|
3596
3559
|
const ve = r?.map((Fe) => ({ ...Fe, ...N }));
|
|
3597
3560
|
return K(n, ve), () => {
|
|
3598
3561
|
ie();
|
|
3599
3562
|
};
|
|
3600
|
-
}, []), J("defaultEdgeOptions", N, U.setState), J("connectionMode", C, U.setState), J("onConnect", o, U.setState), J("onConnectStart", s, U.setState), J("onConnectEnd", i, U.setState), J("onClickConnectStart", a, U.setState), J("onClickConnectEnd", c, U.setState), J("nodesDraggable",
|
|
3563
|
+
}, []), J("defaultEdgeOptions", N, U.setState), J("connectionMode", C, U.setState), J("onConnect", o, U.setState), J("onConnectStart", s, U.setState), J("onConnectEnd", i, U.setState), J("onClickConnectStart", a, U.setState), J("onClickConnectEnd", c, U.setState), J("nodesDraggable", d, U.setState), J("nodesConnectable", l, U.setState), J("nodesFocusable", u, U.setState), J("edgesFocusable", f, U.setState), J("edgesUpdatable", h, U.setState), J("elementsSelectable", b, U.setState), J("elevateNodesOnSelect", g, U.setState), J("snapToGrid", D, U.setState), J("snapGrid", S, U.setState), J("onNodesChange", w, U.setState), J("onEdgesChange", x, U.setState), J("connectOnClick", _, U.setState), J("fitViewOnInit", M, U.setState), J("fitViewOnInitOptions", O, U.setState), J("onNodesDelete", F, U.setState), J("onEdgesDelete", v, U.setState), J("onNodeDrag", A, U.setState), J("onNodeDragStart", L, U.setState), J("onNodeDragStop", z, U.setState), J("onSelectionDrag", G, U.setState), J("onSelectionDragStart", R, U.setState), J("onSelectionDragStop", H, U.setState), J("noPanClassName", q, U.setState), J("nodeOrigin", j, U.setState), J("rfId", k, U.setState), J("autoPanOnConnect", I, U.setState), J("autoPanOnNodeDrag", P, U.setState), J("onError", B, U.setState), J("connectionRadius", V, U.setState), J("isValidConnection", Y, U.setState), J("nodeDragThreshold", W, U.setState), _t(e, Z), _t(t, ne), _t(y, ee), _t(p, ce), _t(E, se), _t(m, ye), null;
|
|
3601
3564
|
}, ji = { display: "none" }, cg = {
|
|
3602
3565
|
position: "absolute",
|
|
3603
3566
|
width: 1,
|
|
@@ -3632,20 +3595,20 @@ function hg({ rfId: e, disableKeyboardA11y: t }) {
|
|
|
3632
3595
|
var tn = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
3633
3596
|
const [n, r] = re(!1), o = Q(!1), s = Q(/* @__PURE__ */ new Set([])), [i, a] = Ne(() => {
|
|
3634
3597
|
if (e !== null) {
|
|
3635
|
-
const
|
|
3636
|
-
return [
|
|
3598
|
+
const d = (Array.isArray(e) ? e : [e]).filter((u) => typeof u == "string").map((u) => u.split("+")), l = d.reduce((u, f) => u.concat(...f), []);
|
|
3599
|
+
return [d, l];
|
|
3637
3600
|
}
|
|
3638
3601
|
return [[], []];
|
|
3639
3602
|
}, [e]);
|
|
3640
3603
|
return oe(() => {
|
|
3641
|
-
const c = typeof document < "u" ? document : null,
|
|
3604
|
+
const c = typeof document < "u" ? document : null, d = t?.target || c;
|
|
3642
3605
|
if (e !== null) {
|
|
3643
3606
|
const l = (h) => {
|
|
3644
3607
|
if (o.current = h.ctrlKey || h.metaKey || h.shiftKey, (!o.current || o.current && !t.actInsideInputWithModifier) && xo(h))
|
|
3645
3608
|
return !1;
|
|
3646
3609
|
const y = Xi(h.code, a);
|
|
3647
3610
|
s.current.add(h[y]), Wi(i, s.current, !1) && (h.preventDefault(), r(!0));
|
|
3648
|
-
},
|
|
3611
|
+
}, u = (h) => {
|
|
3649
3612
|
if ((!o.current || o.current && !t.actInsideInputWithModifier) && xo(h))
|
|
3650
3613
|
return !1;
|
|
3651
3614
|
const y = Xi(h.code, a);
|
|
@@ -3653,8 +3616,8 @@ var tn = (e = null, t = { actInsideInputWithModifier: !0 }) => {
|
|
|
3653
3616
|
}, f = () => {
|
|
3654
3617
|
s.current.clear(), r(!1);
|
|
3655
3618
|
};
|
|
3656
|
-
return
|
|
3657
|
-
|
|
3619
|
+
return d?.addEventListener("keydown", l), d?.addEventListener("keyup", u), window.addEventListener("blur", f), () => {
|
|
3620
|
+
d?.removeEventListener("keydown", l), d?.removeEventListener("keyup", u), window.removeEventListener("blur", f);
|
|
3658
3621
|
};
|
|
3659
3622
|
}
|
|
3660
3623
|
}, [e, r]), n;
|
|
@@ -3696,33 +3659,33 @@ function vl(e, t, n) {
|
|
|
3696
3659
|
function dr(e, t, n, r) {
|
|
3697
3660
|
const o = /* @__PURE__ */ new Map(), s = {}, i = r ? 1e3 : 0;
|
|
3698
3661
|
return e.forEach((a) => {
|
|
3699
|
-
const c = (Ce(a.zIndex) ? a.zIndex : 0) + (a.selected ? i : 0),
|
|
3662
|
+
const c = (Ce(a.zIndex) ? a.zIndex : 0) + (a.selected ? i : 0), d = t.get(a.id), l = {
|
|
3700
3663
|
...a,
|
|
3701
3664
|
positionAbsolute: {
|
|
3702
3665
|
x: a.position.x,
|
|
3703
3666
|
y: a.position.y
|
|
3704
3667
|
}
|
|
3705
|
-
},
|
|
3706
|
-
|
|
3707
|
-
const f =
|
|
3668
|
+
}, u = a.parentNode || a.parentId;
|
|
3669
|
+
u && (s[u] = !0);
|
|
3670
|
+
const f = d?.type && d?.type !== a.type;
|
|
3708
3671
|
Object.defineProperty(l, ue, {
|
|
3709
3672
|
enumerable: !1,
|
|
3710
3673
|
value: {
|
|
3711
|
-
handleBounds: f ? void 0 :
|
|
3674
|
+
handleBounds: f ? void 0 : d?.[ue]?.handleBounds,
|
|
3712
3675
|
z: c
|
|
3713
3676
|
}
|
|
3714
3677
|
}), o.set(a.id, l);
|
|
3715
3678
|
}), vl(o, n, s), o;
|
|
3716
3679
|
}
|
|
3717
3680
|
function bl(e, t = {}) {
|
|
3718
|
-
const { getNodes: n, width: r, height: o, minZoom: s, maxZoom: i, d3Zoom: a, d3Selection: c, fitViewOnInitDone:
|
|
3681
|
+
const { getNodes: n, width: r, height: o, minZoom: s, maxZoom: i, d3Zoom: a, d3Selection: c, fitViewOnInitDone: d, fitViewOnInit: l, nodeOrigin: u } = e(), f = t.initial && !d && l;
|
|
3719
3682
|
if (a && c && (f || !t.initial)) {
|
|
3720
|
-
const
|
|
3721
|
-
const m = t.includeHiddenNodes ?
|
|
3722
|
-
return t.nodes?.length ? m && t.nodes.some((w) => w.id ===
|
|
3723
|
-
}), y =
|
|
3724
|
-
if (
|
|
3725
|
-
const
|
|
3683
|
+
const g = n().filter((p) => {
|
|
3684
|
+
const m = t.includeHiddenNodes ? p.width && p.height : !p.hidden;
|
|
3685
|
+
return t.nodes?.length ? m && t.nodes.some((w) => w.id === p.id) : m;
|
|
3686
|
+
}), y = g.every((p) => p.width && p.height);
|
|
3687
|
+
if (g.length > 0 && y) {
|
|
3688
|
+
const p = Zn(g, u), { x: m, y: w, zoom: x } = il(p, r, o, t.minZoom ?? s, t.maxZoom ?? i, t.padding ?? 0.1), b = qe.translate(m, w).scale(x);
|
|
3726
3689
|
return typeof t.duration == "number" && t.duration > 0 ? a.transform(at(c, t.duration), b) : a.transform(c, b), !0;
|
|
3727
3690
|
}
|
|
3728
3691
|
}
|
|
@@ -3745,8 +3708,8 @@ function gg(e, t) {
|
|
|
3745
3708
|
});
|
|
3746
3709
|
}
|
|
3747
3710
|
function wn({ changedNodes: e, changedEdges: t, get: n, set: r }) {
|
|
3748
|
-
const { nodeInternals: o, edges: s, onNodesChange: i, onEdgesChange: a, hasDefaultNodes: c, hasDefaultEdges:
|
|
3749
|
-
e?.length && (c && r({ nodeInternals: pg(e, o) }), i?.(e)), t?.length && (
|
|
3711
|
+
const { nodeInternals: o, edges: s, onNodesChange: i, onEdgesChange: a, hasDefaultNodes: c, hasDefaultEdges: d } = n();
|
|
3712
|
+
e?.length && (c && r({ nodeInternals: pg(e, o) }), i?.(e)), t?.length && (d && r({ edges: gg(t, s) }), a?.(t));
|
|
3750
3713
|
}
|
|
3751
3714
|
const St = () => {
|
|
3752
3715
|
}, mg = {
|
|
@@ -3774,8 +3737,8 @@ const St = () => {
|
|
|
3774
3737
|
zoomTo: (o, s) => t.scaleTo(at(n, s?.duration), o),
|
|
3775
3738
|
getZoom: () => e.getState().transform[2],
|
|
3776
3739
|
setViewport: (o, s) => {
|
|
3777
|
-
const [i, a, c] = e.getState().transform,
|
|
3778
|
-
t.transform(at(n, s?.duration),
|
|
3740
|
+
const [i, a, c] = e.getState().transform, d = qe.translate(o.x ?? i, o.y ?? a).scale(o.zoom ?? c);
|
|
3741
|
+
t.transform(at(n, s?.duration), d);
|
|
3779
3742
|
},
|
|
3780
3743
|
getViewport: () => {
|
|
3781
3744
|
const [o, s, i] = e.getState().transform;
|
|
@@ -3783,11 +3746,11 @@ const St = () => {
|
|
|
3783
3746
|
},
|
|
3784
3747
|
fitView: (o) => bl(e.getState, o),
|
|
3785
3748
|
setCenter: (o, s, i) => {
|
|
3786
|
-
const { width: a, height: c, maxZoom:
|
|
3749
|
+
const { width: a, height: c, maxZoom: d } = e.getState(), l = typeof i?.zoom < "u" ? i.zoom : d, u = a / 2 - o * l, f = c / 2 - s * l, h = qe.translate(u, f).scale(l);
|
|
3787
3750
|
t.transform(at(n, i?.duration), h);
|
|
3788
3751
|
},
|
|
3789
3752
|
fitBounds: (o, s) => {
|
|
3790
|
-
const { width: i, height: a, minZoom: c, maxZoom:
|
|
3753
|
+
const { width: i, height: a, minZoom: c, maxZoom: d } = e.getState(), { x: l, y: u, zoom: f } = il(o, i, a, c, d, s?.padding ?? 0.1), h = qe.translate(l, u).scale(f);
|
|
3791
3754
|
t.transform(at(n, s?.duration), h);
|
|
3792
3755
|
},
|
|
3793
3756
|
// @deprecated Use `screenToFlowPosition`.
|
|
@@ -3799,20 +3762,20 @@ const St = () => {
|
|
|
3799
3762
|
const { transform: s, snapToGrid: i, snapGrid: a, domNode: c } = e.getState();
|
|
3800
3763
|
if (!c)
|
|
3801
3764
|
return o;
|
|
3802
|
-
const { x:
|
|
3803
|
-
x: o.x -
|
|
3765
|
+
const { x: d, y: l } = c.getBoundingClientRect(), u = {
|
|
3766
|
+
x: o.x - d,
|
|
3804
3767
|
y: o.y - l
|
|
3805
3768
|
};
|
|
3806
|
-
return So(
|
|
3769
|
+
return So(u, s, i, a);
|
|
3807
3770
|
},
|
|
3808
3771
|
flowToScreenPosition: (o) => {
|
|
3809
3772
|
const { transform: s, domNode: i } = e.getState();
|
|
3810
3773
|
if (!i)
|
|
3811
3774
|
return o;
|
|
3812
|
-
const { x: a, y: c } = i.getBoundingClientRect(),
|
|
3775
|
+
const { x: a, y: c } = i.getBoundingClientRect(), d = nl(o, s);
|
|
3813
3776
|
return {
|
|
3814
|
-
x:
|
|
3815
|
-
y:
|
|
3777
|
+
x: d.x + a,
|
|
3778
|
+
y: d.y + c
|
|
3816
3779
|
};
|
|
3817
3780
|
},
|
|
3818
3781
|
viewportInitialized: !0
|
|
@@ -3821,12 +3784,12 @@ const St = () => {
|
|
|
3821
3784
|
function Uo() {
|
|
3822
3785
|
const e = wg(), t = pe(), n = de(() => t.getState().getNodes().map((y) => ({ ...y })), []), r = de((y) => t.getState().nodeInternals.get(y), []), o = de(() => {
|
|
3823
3786
|
const { edges: y = [] } = t.getState();
|
|
3824
|
-
return y.map((
|
|
3787
|
+
return y.map((p) => ({ ...p }));
|
|
3825
3788
|
}, []), s = de((y) => {
|
|
3826
|
-
const { edges:
|
|
3827
|
-
return
|
|
3789
|
+
const { edges: p = [] } = t.getState();
|
|
3790
|
+
return p.find((m) => m.id === y);
|
|
3828
3791
|
}, []), i = de((y) => {
|
|
3829
|
-
const { getNodes:
|
|
3792
|
+
const { getNodes: p, setNodes: m, hasDefaultNodes: w, onNodesChange: x } = t.getState(), b = p(), C = typeof y == "function" ? y(b) : y;
|
|
3830
3793
|
if (w)
|
|
3831
3794
|
m(C);
|
|
3832
3795
|
else if (x) {
|
|
@@ -3834,45 +3797,45 @@ function Uo() {
|
|
|
3834
3797
|
x(S);
|
|
3835
3798
|
}
|
|
3836
3799
|
}, []), a = de((y) => {
|
|
3837
|
-
const { edges:
|
|
3800
|
+
const { edges: p = [], setEdges: m, hasDefaultEdges: w, onEdgesChange: x } = t.getState(), b = typeof y == "function" ? y(p) : y;
|
|
3838
3801
|
if (w)
|
|
3839
3802
|
m(b);
|
|
3840
3803
|
else if (x) {
|
|
3841
|
-
const C = b.length === 0 ?
|
|
3804
|
+
const C = b.length === 0 ? p.map((S) => ({ type: "remove", id: S.id })) : b.map((S) => ({ item: S, type: "reset" }));
|
|
3842
3805
|
x(C);
|
|
3843
3806
|
}
|
|
3844
3807
|
}, []), c = de((y) => {
|
|
3845
|
-
const
|
|
3808
|
+
const p = Array.isArray(y) ? y : [y], { getNodes: m, setNodes: w, hasDefaultNodes: x, onNodesChange: b } = t.getState();
|
|
3846
3809
|
if (x) {
|
|
3847
|
-
const S = [...m(), ...
|
|
3810
|
+
const S = [...m(), ...p];
|
|
3848
3811
|
w(S);
|
|
3849
3812
|
} else if (b) {
|
|
3850
|
-
const C =
|
|
3813
|
+
const C = p.map((S) => ({ item: S, type: "add" }));
|
|
3851
3814
|
b(C);
|
|
3852
3815
|
}
|
|
3853
|
-
}, []),
|
|
3854
|
-
const
|
|
3816
|
+
}, []), d = de((y) => {
|
|
3817
|
+
const p = Array.isArray(y) ? y : [y], { edges: m = [], setEdges: w, hasDefaultEdges: x, onEdgesChange: b } = t.getState();
|
|
3855
3818
|
if (x)
|
|
3856
|
-
w([...m, ...
|
|
3819
|
+
w([...m, ...p]);
|
|
3857
3820
|
else if (b) {
|
|
3858
|
-
const C =
|
|
3821
|
+
const C = p.map((S) => ({ item: S, type: "add" }));
|
|
3859
3822
|
b(C);
|
|
3860
3823
|
}
|
|
3861
3824
|
}, []), l = de(() => {
|
|
3862
|
-
const { getNodes: y, edges:
|
|
3825
|
+
const { getNodes: y, edges: p = [], transform: m } = t.getState(), [w, x, b] = m;
|
|
3863
3826
|
return {
|
|
3864
3827
|
nodes: y().map((C) => ({ ...C })),
|
|
3865
|
-
edges:
|
|
3828
|
+
edges: p.map((C) => ({ ...C })),
|
|
3866
3829
|
viewport: {
|
|
3867
3830
|
x: w,
|
|
3868
3831
|
y: x,
|
|
3869
3832
|
zoom: b
|
|
3870
3833
|
}
|
|
3871
3834
|
};
|
|
3872
|
-
}, []),
|
|
3873
|
-
const { nodeInternals: m, getNodes: w, edges: x, hasDefaultNodes: b, hasDefaultEdges: C, onNodesDelete: S, onEdgesDelete: D, onNodesChange: E, onEdgesChange: _ } = t.getState(), N = (y || []).map((A) => A.id), M = (
|
|
3835
|
+
}, []), u = de(({ nodes: y, edges: p }) => {
|
|
3836
|
+
const { nodeInternals: m, getNodes: w, edges: x, hasDefaultNodes: b, hasDefaultEdges: C, onNodesDelete: S, onEdgesDelete: D, onNodesChange: E, onEdgesChange: _ } = t.getState(), N = (y || []).map((A) => A.id), M = (p || []).map((A) => A.id), O = w().reduce((A, L) => {
|
|
3874
3837
|
const z = L.parentNode || L.parentId, G = !N.includes(L.id) && z && A.find((H) => H.id === z);
|
|
3875
|
-
return (typeof L.deletable
|
|
3838
|
+
return (typeof L.deletable != "boolean" || L.deletable) && (N.includes(L.id) || G) && A.push(L), A;
|
|
3876
3839
|
}, []), F = x.filter((A) => typeof A.deletable == "boolean" ? A.deletable : !0), v = F.filter((A) => M.includes(A.id));
|
|
3877
3840
|
if (O || v) {
|
|
3878
3841
|
const A = ol(O, F), L = [...v, ...A], z = L.reduce((G, R) => (G.includes(R.id) || G.push(R.id), G), []);
|
|
@@ -3891,21 +3854,21 @@ function Uo() {
|
|
|
3891
3854
|
}
|
|
3892
3855
|
}
|
|
3893
3856
|
}, []), f = de((y) => {
|
|
3894
|
-
const
|
|
3895
|
-
return !
|
|
3896
|
-
}, []), h = de((y,
|
|
3857
|
+
const p = Fp(y), m = p ? null : t.getState().nodeInternals.get(y.id);
|
|
3858
|
+
return !p && !m ? [null, null, p] : [p ? y : zi(m), m, p];
|
|
3859
|
+
}, []), h = de((y, p = !0, m) => {
|
|
3897
3860
|
const [w, x, b] = f(y);
|
|
3898
3861
|
return w ? (m || t.getState().getNodes()).filter((C) => {
|
|
3899
3862
|
if (!b && (C.id === x.id || !C.positionAbsolute))
|
|
3900
3863
|
return !1;
|
|
3901
3864
|
const S = zi(C), D = bo(S, w);
|
|
3902
|
-
return
|
|
3865
|
+
return p && D > 0 || D >= w.width * w.height;
|
|
3903
3866
|
}) : [];
|
|
3904
|
-
}, []),
|
|
3867
|
+
}, []), g = de((y, p, m = !0) => {
|
|
3905
3868
|
const [w] = f(y);
|
|
3906
3869
|
if (!w)
|
|
3907
3870
|
return !1;
|
|
3908
|
-
const x = bo(w,
|
|
3871
|
+
const x = bo(w, p);
|
|
3909
3872
|
return m && x > 0 || x >= w.width * w.height;
|
|
3910
3873
|
}, []);
|
|
3911
3874
|
return Ne(() => ({
|
|
@@ -3917,11 +3880,11 @@ function Uo() {
|
|
|
3917
3880
|
setNodes: i,
|
|
3918
3881
|
setEdges: a,
|
|
3919
3882
|
addNodes: c,
|
|
3920
|
-
addEdges:
|
|
3883
|
+
addEdges: d,
|
|
3921
3884
|
toObject: l,
|
|
3922
|
-
deleteElements:
|
|
3885
|
+
deleteElements: u,
|
|
3923
3886
|
getIntersectingNodes: h,
|
|
3924
|
-
isNodeIntersecting:
|
|
3887
|
+
isNodeIntersecting: g
|
|
3925
3888
|
}), [
|
|
3926
3889
|
e,
|
|
3927
3890
|
n,
|
|
@@ -3931,11 +3894,11 @@ function Uo() {
|
|
|
3931
3894
|
i,
|
|
3932
3895
|
a,
|
|
3933
3896
|
c,
|
|
3934
|
-
u,
|
|
3935
|
-
l,
|
|
3936
3897
|
d,
|
|
3898
|
+
l,
|
|
3899
|
+
u,
|
|
3937
3900
|
h,
|
|
3938
|
-
|
|
3901
|
+
g
|
|
3939
3902
|
]);
|
|
3940
3903
|
}
|
|
3941
3904
|
const vg = { actInsideInputWithModifier: !1 };
|
|
@@ -3943,8 +3906,8 @@ var bg = ({ deleteKeyCode: e, multiSelectionKeyCode: t }) => {
|
|
|
3943
3906
|
const n = pe(), { deleteElements: r } = Uo(), o = tn(e, vg), s = tn(t);
|
|
3944
3907
|
oe(() => {
|
|
3945
3908
|
if (o) {
|
|
3946
|
-
const { edges: i, getNodes: a } = n.getState(), c = a().filter((l) => l.selected),
|
|
3947
|
-
r({ nodes: c, edges:
|
|
3909
|
+
const { edges: i, getNodes: a } = n.getState(), c = a().filter((l) => l.selected), d = i.filter((l) => l.selected);
|
|
3910
|
+
r({ nodes: c, edges: d }), n.setState({ nodesSelectionActive: !1 });
|
|
3948
3911
|
}
|
|
3949
3912
|
}, [o]), oe(() => {
|
|
3950
3913
|
n.setState({ multiSelectionActive: s });
|
|
@@ -3983,11 +3946,11 @@ const Ko = {
|
|
|
3983
3946
|
d3Selection: e.d3Selection,
|
|
3984
3947
|
d3ZoomHandler: e.d3ZoomHandler,
|
|
3985
3948
|
userSelectionActive: e.userSelectionActive
|
|
3986
|
-
}), Sg = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: r, zoomOnScroll: o = !0, zoomOnPinch: s = !0, panOnScroll: i = !1, panOnScrollSpeed: a = 0.5, panOnScrollMode: c = ut.Free, zoomOnDoubleClick:
|
|
3987
|
-
const C = Q(), S = pe(), D = Q(!1), E = Q(!1), _ = Q(null), N = Q({ x: 0, y: 0, zoom: 0 }), { d3Zoom: M, d3Selection: O, d3ZoomHandler: F, userSelectionActive: v } = le(_g, he), A = tn(
|
|
3949
|
+
}), Sg = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: r, zoomOnScroll: o = !0, zoomOnPinch: s = !0, panOnScroll: i = !1, panOnScrollSpeed: a = 0.5, panOnScrollMode: c = ut.Free, zoomOnDoubleClick: d = !0, elementsSelectable: l, panOnDrag: u = !0, defaultViewport: f, translateExtent: h, minZoom: g, maxZoom: y, zoomActivationKeyCode: p, preventScrolling: m = !0, children: w, noWheelClassName: x, noPanClassName: b }) => {
|
|
3950
|
+
const C = Q(), S = pe(), D = Q(!1), E = Q(!1), _ = Q(null), N = Q({ x: 0, y: 0, zoom: 0 }), { d3Zoom: M, d3Selection: O, d3ZoomHandler: F, userSelectionActive: v } = le(_g, he), A = tn(p), L = Q(0), z = Q(!1), G = Q();
|
|
3988
3951
|
return xg(_), oe(() => {
|
|
3989
3952
|
if (_.current) {
|
|
3990
|
-
const R = _.current.getBoundingClientRect(), H = Ga().scaleExtent([
|
|
3953
|
+
const R = _.current.getBoundingClientRect(), H = Ga().scaleExtent([g, y]).translateExtent(h), q = Se(_.current).call(H), j = qe.translate(f.x, f.y).scale(Tt(f.zoom, g, y)), k = [
|
|
3991
3954
|
[0, 0],
|
|
3992
3955
|
[R.width, R.height]
|
|
3993
3956
|
], I = H.constrain()(j, k, h);
|
|
@@ -4054,31 +4017,31 @@ const Ko = {
|
|
|
4054
4017
|
}, [M, t]), oe(() => {
|
|
4055
4018
|
M && (v && !D.current ? M.on("zoom", null) : v || M.on("zoom", (R) => {
|
|
4056
4019
|
const { onViewportChange: H } = S.getState();
|
|
4057
|
-
if (S.setState({ transform: [R.transform.x, R.transform.y, R.transform.k] }), E.current = !!(r && Zi(
|
|
4020
|
+
if (S.setState({ transform: [R.transform.x, R.transform.y, R.transform.k] }), E.current = !!(r && Zi(u, L.current ?? 0)), (e || H) && !R.sourceEvent?.internal) {
|
|
4058
4021
|
const q = vn(R.transform);
|
|
4059
4022
|
H?.(q), e?.(R.sourceEvent, q);
|
|
4060
4023
|
}
|
|
4061
4024
|
}));
|
|
4062
|
-
}, [v, M, e,
|
|
4025
|
+
}, [v, M, e, u, r]), oe(() => {
|
|
4063
4026
|
M && M.on("end", (R) => {
|
|
4064
4027
|
if (!R.sourceEvent || R.sourceEvent.internal)
|
|
4065
4028
|
return null;
|
|
4066
4029
|
const { onViewportChangeEnd: H } = S.getState();
|
|
4067
|
-
if (D.current = !1, S.setState({ paneDragging: !1 }), r && Zi(
|
|
4030
|
+
if (D.current = !1, S.setState({ paneDragging: !1 }), r && Zi(u, L.current ?? 0) && !E.current && r(R.sourceEvent), E.current = !1, (n || H) && Eg(N.current, R.transform)) {
|
|
4068
4031
|
const q = vn(R.transform);
|
|
4069
4032
|
N.current = q, clearTimeout(C.current), C.current = setTimeout(() => {
|
|
4070
4033
|
H?.(q), n?.(R.sourceEvent, q);
|
|
4071
4034
|
}, i ? 150 : 0);
|
|
4072
4035
|
}
|
|
4073
4036
|
});
|
|
4074
|
-
}, [M, i,
|
|
4037
|
+
}, [M, i, u, n, r]), oe(() => {
|
|
4075
4038
|
M && M.filter((R) => {
|
|
4076
4039
|
const H = A || o, q = s && R.ctrlKey;
|
|
4077
|
-
if ((
|
|
4040
|
+
if ((u === !0 || Array.isArray(u) && u.includes(1)) && R.button === 1 && R.type === "mousedown" && (Ct(R, "react-flow__node") || Ct(R, "react-flow__edge")))
|
|
4078
4041
|
return !0;
|
|
4079
|
-
if (!
|
|
4042
|
+
if (!u && !H && !i && !d && !s || v || !d && R.type === "dblclick" || Ct(R, x) && R.type === "wheel" || Ct(R, b) && (R.type !== "wheel" || i && R.type === "wheel" && !A) || !s && R.ctrlKey && R.type === "wheel" || !H && !i && !q && R.type === "wheel" || !u && (R.type === "mousedown" || R.type === "touchstart") || Array.isArray(u) && !u.includes(R.button) && R.type === "mousedown")
|
|
4080
4043
|
return !1;
|
|
4081
|
-
const j = Array.isArray(
|
|
4044
|
+
const j = Array.isArray(u) && u.includes(R.button) || !R.button || R.button <= 1;
|
|
4082
4045
|
return (!R.ctrlKey || R.type === "wheel") && j;
|
|
4083
4046
|
});
|
|
4084
4047
|
}, [
|
|
@@ -4087,8 +4050,8 @@ const Ko = {
|
|
|
4087
4050
|
o,
|
|
4088
4051
|
s,
|
|
4089
4052
|
i,
|
|
4090
|
-
u,
|
|
4091
4053
|
d,
|
|
4054
|
+
u,
|
|
4092
4055
|
l,
|
|
4093
4056
|
A
|
|
4094
4057
|
]), $.createElement("div", { className: "react-flow__renderer", ref: _, style: Ko }, w);
|
|
@@ -4174,9 +4137,9 @@ const fr = (e, t) => (n) => {
|
|
|
4174
4137
|
userSelectionActive: e.userSelectionActive,
|
|
4175
4138
|
elementsSelectable: e.elementsSelectable,
|
|
4176
4139
|
dragging: e.paneDragging
|
|
4177
|
-
}), _l = ae(({ isSelecting: e, selectionMode: t = en.Full, panOnDrag: n, onSelectionStart: r, onSelectionEnd: o, onPaneClick: s, onPaneContextMenu: i, onPaneScroll: a, onPaneMouseEnter: c, onPaneMouseMove:
|
|
4178
|
-
const f = Q(null), h = pe(),
|
|
4179
|
-
h.setState({ userSelectionActive: !1, userSelectionRect: null }),
|
|
4140
|
+
}), _l = ae(({ isSelecting: e, selectionMode: t = en.Full, panOnDrag: n, onSelectionStart: r, onSelectionEnd: o, onPaneClick: s, onPaneContextMenu: i, onPaneScroll: a, onPaneMouseEnter: c, onPaneMouseMove: d, onPaneMouseLeave: l, children: u }) => {
|
|
4141
|
+
const f = Q(null), h = pe(), g = Q(0), y = Q(0), p = Q(), { userSelectionActive: m, elementsSelectable: w, dragging: x } = le(Mg, he), b = () => {
|
|
4142
|
+
h.setState({ userSelectionActive: !1, userSelectionRect: null }), g.current = 0, y.current = 0;
|
|
4180
4143
|
}, C = (F) => {
|
|
4181
4144
|
s?.(F), h.getState().resetSelectedElements(), h.setState({ nodesSelectionActive: !1 });
|
|
4182
4145
|
}, S = (F) => {
|
|
@@ -4187,9 +4150,9 @@ const fr = (e, t) => (n) => {
|
|
|
4187
4150
|
i?.(F);
|
|
4188
4151
|
}, D = a ? (F) => a(F) : void 0, E = (F) => {
|
|
4189
4152
|
const { resetSelectedElements: v, domNode: A } = h.getState();
|
|
4190
|
-
if (
|
|
4153
|
+
if (p.current = A?.getBoundingClientRect(), !w || !e || F.button !== 0 || F.target !== f.current || !p.current)
|
|
4191
4154
|
return;
|
|
4192
|
-
const { x: L, y: z } = Qe(F,
|
|
4155
|
+
const { x: L, y: z } = Qe(F, p.current);
|
|
4193
4156
|
v(), h.setState({
|
|
4194
4157
|
userSelectionRect: {
|
|
4195
4158
|
width: 0,
|
|
@@ -4202,18 +4165,18 @@ const fr = (e, t) => (n) => {
|
|
|
4202
4165
|
}), r?.(F);
|
|
4203
4166
|
}, _ = (F) => {
|
|
4204
4167
|
const { userSelectionRect: v, nodeInternals: A, edges: L, transform: z, onNodesChange: G, onEdgesChange: R, nodeOrigin: H, getNodes: q } = h.getState();
|
|
4205
|
-
if (!e || !
|
|
4168
|
+
if (!e || !p.current || !v)
|
|
4206
4169
|
return;
|
|
4207
4170
|
h.setState({ userSelectionActive: !0, nodesSelectionActive: !1 });
|
|
4208
|
-
const j = Qe(F,
|
|
4171
|
+
const j = Qe(F, p.current), k = v.startX ?? 0, I = v.startY ?? 0, P = {
|
|
4209
4172
|
...v,
|
|
4210
4173
|
x: j.x < k ? j.x : k,
|
|
4211
4174
|
y: j.y < I ? j.y : I,
|
|
4212
4175
|
width: Math.abs(j.x - k),
|
|
4213
4176
|
height: Math.abs(j.y - I)
|
|
4214
4177
|
}, B = q(), V = rl(A, P, z, t === en.Partial, !0, H), Y = ol(V, L).map((Z) => Z.id), W = V.map((Z) => Z.id);
|
|
4215
|
-
if (
|
|
4216
|
-
|
|
4178
|
+
if (g.current !== W.length) {
|
|
4179
|
+
g.current = W.length;
|
|
4217
4180
|
const Z = kt(B, W);
|
|
4218
4181
|
Z.length && G?.(Z);
|
|
4219
4182
|
}
|
|
@@ -4229,14 +4192,14 @@ const fr = (e, t) => (n) => {
|
|
|
4229
4192
|
if (F.button !== 0)
|
|
4230
4193
|
return;
|
|
4231
4194
|
const { userSelectionRect: v } = h.getState();
|
|
4232
|
-
!m && v && F.target === f.current && C?.(F), h.setState({ nodesSelectionActive:
|
|
4195
|
+
!m && v && F.target === f.current && C?.(F), h.setState({ nodesSelectionActive: g.current > 0 }), b(), o?.(F);
|
|
4233
4196
|
}, M = (F) => {
|
|
4234
|
-
m && (h.setState({ nodesSelectionActive:
|
|
4197
|
+
m && (h.setState({ nodesSelectionActive: g.current > 0 }), o?.(F)), b();
|
|
4235
4198
|
}, O = w && (e || m);
|
|
4236
4199
|
return $.createElement(
|
|
4237
4200
|
"div",
|
|
4238
|
-
{ className: me(["react-flow__pane", { dragging: x, selection: e }]), onClick: O ? void 0 : fr(C, f), onContextMenu: fr(S, f), onWheel: fr(D, f), onMouseEnter: O ? void 0 : c, onMouseDown: O ? E : void 0, onMouseMove: O ? _ :
|
|
4239
|
-
|
|
4201
|
+
{ className: me(["react-flow__pane", { dragging: x, selection: e }]), onClick: O ? void 0 : fr(C, f), onContextMenu: fr(S, f), onWheel: fr(D, f), onMouseEnter: O ? void 0 : c, onMouseDown: O ? E : void 0, onMouseMove: O ? _ : d, onMouseUp: O ? N : void 0, onMouseLeave: O ? M : l, ref: f, style: Ko },
|
|
4202
|
+
u,
|
|
4240
4203
|
$.createElement(Ng, null)
|
|
4241
4204
|
);
|
|
4242
4205
|
});
|
|
@@ -4289,33 +4252,33 @@ function Cl(e, t, n, r, o = [0, 0], s) {
|
|
|
4289
4252
|
const c = e.parentNode || e.parentId;
|
|
4290
4253
|
if (e.extent === "parent" && !e.expandParent)
|
|
4291
4254
|
if (c && e.width && e.height) {
|
|
4292
|
-
const
|
|
4293
|
-
a =
|
|
4255
|
+
const u = n.get(c), { x: f, y: h } = ht(u, o).positionAbsolute;
|
|
4256
|
+
a = u && Ce(f) && Ce(h) && Ce(u.width) && Ce(u.height) ? [
|
|
4294
4257
|
[f + e.width * o[0], h + e.height * o[1]],
|
|
4295
4258
|
[
|
|
4296
|
-
f +
|
|
4297
|
-
h +
|
|
4259
|
+
f + u.width - e.width + e.width * o[0],
|
|
4260
|
+
h + u.height - e.height + e.height * o[1]
|
|
4298
4261
|
]
|
|
4299
4262
|
] : a;
|
|
4300
4263
|
} else
|
|
4301
4264
|
s?.("005", Ie.error005()), a = i;
|
|
4302
4265
|
else if (e.extent && c && e.extent !== "parent") {
|
|
4303
|
-
const
|
|
4266
|
+
const u = n.get(c), { x: f, y: h } = ht(u, o).positionAbsolute;
|
|
4304
4267
|
a = [
|
|
4305
4268
|
[e.extent[0][0] + f, e.extent[0][1] + h],
|
|
4306
4269
|
[e.extent[1][0] + f, e.extent[1][1] + h]
|
|
4307
4270
|
];
|
|
4308
4271
|
}
|
|
4309
|
-
let
|
|
4272
|
+
let d = { x: 0, y: 0 };
|
|
4310
4273
|
if (c) {
|
|
4311
|
-
const
|
|
4312
|
-
|
|
4274
|
+
const u = n.get(c);
|
|
4275
|
+
d = ht(u, o).positionAbsolute;
|
|
4313
4276
|
}
|
|
4314
4277
|
const l = a && a !== "parent" ? Bo(t, a) : t;
|
|
4315
4278
|
return {
|
|
4316
4279
|
position: {
|
|
4317
|
-
x: l.x -
|
|
4318
|
-
y: l.y -
|
|
4280
|
+
x: l.x - d.x,
|
|
4281
|
+
y: l.y - d.y
|
|
4319
4282
|
},
|
|
4320
4283
|
positionAbsolute: l
|
|
4321
4284
|
};
|
|
@@ -4337,12 +4300,12 @@ const Ji = (e, t, n, r) => {
|
|
|
4337
4300
|
y: i.height * r[1]
|
|
4338
4301
|
};
|
|
4339
4302
|
return s.map((c) => {
|
|
4340
|
-
const
|
|
4303
|
+
const d = c.getBoundingClientRect();
|
|
4341
4304
|
return {
|
|
4342
4305
|
id: c.getAttribute("data-handleid"),
|
|
4343
4306
|
position: c.getAttribute("data-handlepos"),
|
|
4344
|
-
x: (
|
|
4345
|
-
y: (
|
|
4307
|
+
x: (d.left - i.left - a.x) / n,
|
|
4308
|
+
y: (d.top - i.top - a.y) / n,
|
|
4346
4309
|
...Ho(c)
|
|
4347
4310
|
};
|
|
4348
4311
|
});
|
|
@@ -4354,12 +4317,12 @@ function Bt(e, t, n) {
|
|
|
4354
4317
|
};
|
|
4355
4318
|
}
|
|
4356
4319
|
function No({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
|
|
4357
|
-
const { addSelectedNodes: o, unselectNodesAndEdges: s, multiSelectionActive: i, nodeInternals: a, onError: c } = t.getState(),
|
|
4358
|
-
if (!
|
|
4320
|
+
const { addSelectedNodes: o, unselectNodesAndEdges: s, multiSelectionActive: i, nodeInternals: a, onError: c } = t.getState(), d = a.get(e);
|
|
4321
|
+
if (!d) {
|
|
4359
4322
|
c?.("012", Ie.error012(e));
|
|
4360
4323
|
return;
|
|
4361
4324
|
}
|
|
4362
|
-
t.setState({ nodesSelectionActive: !1 }),
|
|
4325
|
+
t.setState({ nodesSelectionActive: !1 }), d.selected ? (n || d.selected && i) && (s({ nodes: [d], edges: [] }), requestAnimationFrame(() => r?.current?.blur())) : o([e]);
|
|
4363
4326
|
}
|
|
4364
4327
|
function Og() {
|
|
4365
4328
|
const e = pe();
|
|
@@ -4379,12 +4342,12 @@ function pr(e) {
|
|
|
4379
4342
|
return (t, n, r) => e?.(t, r);
|
|
4380
4343
|
}
|
|
4381
4344
|
function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: r, nodeId: o, isSelectable: s, selectNodesOnDrag: i }) {
|
|
4382
|
-
const a = pe(), [c,
|
|
4345
|
+
const a = pe(), [c, d] = re(!1), l = Q([]), u = Q({ x: null, y: null }), f = Q(0), h = Q(null), g = Q({ x: 0, y: 0 }), y = Q(null), p = Q(!1), m = Q(!1), w = Q(!1), x = Og();
|
|
4383
4346
|
return oe(() => {
|
|
4384
4347
|
if (e?.current) {
|
|
4385
4348
|
const b = Se(e.current), C = ({ x: E, y: _ }) => {
|
|
4386
4349
|
const { nodeInternals: N, onNodeDrag: M, onSelectionDrag: O, updateNodePositions: F, nodeExtent: v, snapGrid: A, snapToGrid: L, nodeOrigin: z, onError: G } = a.getState();
|
|
4387
|
-
|
|
4350
|
+
u.current = { x: E, y: _ };
|
|
4388
4351
|
let R = !1, H = { x: 0, y: 0, x2: 0, y2: 0 };
|
|
4389
4352
|
if (l.current.length > 1 && v) {
|
|
4390
4353
|
const j = Zn(l.current, z);
|
|
@@ -4402,7 +4365,7 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
4402
4365
|
return R = R || j.position.x !== P.position.x || j.position.y !== P.position.y, j.position = P.position, j.positionAbsolute = P.positionAbsolute, j;
|
|
4403
4366
|
}), !R)
|
|
4404
4367
|
return;
|
|
4405
|
-
F(l.current, !0, !0),
|
|
4368
|
+
F(l.current, !0, !0), d(!0);
|
|
4406
4369
|
const q = o ? M : pr(O);
|
|
4407
4370
|
if (q && y.current) {
|
|
4408
4371
|
const [j, k] = hr({
|
|
@@ -4415,10 +4378,10 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
4415
4378
|
}, S = () => {
|
|
4416
4379
|
if (!h.current)
|
|
4417
4380
|
return;
|
|
4418
|
-
const [E, _] = ja(
|
|
4381
|
+
const [E, _] = ja(g.current, h.current);
|
|
4419
4382
|
if (E !== 0 || _ !== 0) {
|
|
4420
4383
|
const { transform: N, panBy: M } = a.getState();
|
|
4421
|
-
|
|
4384
|
+
u.current.x = (u.current.x ?? 0) - E / N[2], u.current.y = (u.current.y ?? 0) - _ / N[2], M({ x: E, y: _ }) && C(u.current);
|
|
4422
4385
|
}
|
|
4423
4386
|
f.current = requestAnimationFrame(S);
|
|
4424
4387
|
}, D = (E) => {
|
|
@@ -4431,7 +4394,7 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
4431
4394
|
nodeRef: e
|
|
4432
4395
|
});
|
|
4433
4396
|
const L = x(E);
|
|
4434
|
-
if (
|
|
4397
|
+
if (u.current = L, l.current = Lg(_, M, L, o), A && l.current) {
|
|
4435
4398
|
const [z, G] = hr({
|
|
4436
4399
|
nodeId: o,
|
|
4437
4400
|
dragItems: l.current,
|
|
@@ -4447,18 +4410,18 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
4447
4410
|
const { domNode: N, nodeDragThreshold: M } = a.getState();
|
|
4448
4411
|
M === 0 && D(_), w.current = !1;
|
|
4449
4412
|
const O = x(_);
|
|
4450
|
-
|
|
4413
|
+
u.current = O, h.current = N?.getBoundingClientRect() || null, g.current = Qe(_.sourceEvent, h.current);
|
|
4451
4414
|
}).on("drag", (_) => {
|
|
4452
4415
|
const N = x(_), { autoPanOnNodeDrag: M, nodeDragThreshold: O } = a.getState();
|
|
4453
4416
|
if (_.sourceEvent.type === "touchmove" && _.sourceEvent.touches.length > 1 && (w.current = !0), !w.current) {
|
|
4454
|
-
if (!
|
|
4455
|
-
const F = N.xSnapped - (
|
|
4417
|
+
if (!p.current && m.current && M && (p.current = !0, S()), !m.current) {
|
|
4418
|
+
const F = N.xSnapped - (u?.current?.x ?? 0), v = N.ySnapped - (u?.current?.y ?? 0);
|
|
4456
4419
|
Math.sqrt(F * F + v * v) > O && D(_);
|
|
4457
4420
|
}
|
|
4458
|
-
(
|
|
4421
|
+
(u.current.x !== N.xSnapped || u.current.y !== N.ySnapped) && l.current && m.current && (y.current = _.sourceEvent, g.current = Qe(_.sourceEvent, h.current), C(N));
|
|
4459
4422
|
}
|
|
4460
4423
|
}).on("end", (_) => {
|
|
4461
|
-
if (!(!m.current || w.current) && (
|
|
4424
|
+
if (!(!m.current || w.current) && (d(!1), p.current = !1, m.current = !1, cancelAnimationFrame(f.current), l.current)) {
|
|
4462
4425
|
const { updateNodePositions: N, nodeInternals: M, onNodeDragStop: O, onSelectionDragStop: F } = a.getState(), v = o ? O : pr(F);
|
|
4463
4426
|
if (N(l.current, !1, !1), v) {
|
|
4464
4427
|
const [A, L] = hr({
|
|
@@ -4493,11 +4456,11 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
4493
4456
|
function kl() {
|
|
4494
4457
|
const e = pe();
|
|
4495
4458
|
return de((n) => {
|
|
4496
|
-
const { nodeInternals: r, nodeExtent: o, updateNodePositions: s, getNodes: i, snapToGrid: a, snapGrid: c, onError:
|
|
4459
|
+
const { nodeInternals: r, nodeExtent: o, updateNodePositions: s, getNodes: i, snapToGrid: a, snapGrid: c, onError: d, nodesDraggable: l } = e.getState(), u = i().filter((w) => w.selected && (w.draggable || l && typeof w.draggable > "u")), f = a ? c[0] : 5, h = a ? c[1] : 5, g = n.isShiftPressed ? 4 : 1, y = n.x * f * g, p = n.y * h * g, m = u.map((w) => {
|
|
4497
4460
|
if (w.positionAbsolute) {
|
|
4498
|
-
const x = { x: w.positionAbsolute.x + y, y: w.positionAbsolute.y +
|
|
4461
|
+
const x = { x: w.positionAbsolute.x + y, y: w.positionAbsolute.y + p };
|
|
4499
4462
|
a && (x.x = c[0] * Math.round(x.x / c[0]), x.y = c[1] * Math.round(x.y / c[1]));
|
|
4500
|
-
const { positionAbsolute: b, position: C } = Cl(w, x, r, o, void 0,
|
|
4463
|
+
const { positionAbsolute: b, position: C } = Cl(w, x, r, o, void 0, d);
|
|
4501
4464
|
w.position = C, w.positionAbsolute = b;
|
|
4502
4465
|
}
|
|
4503
4466
|
return w;
|
|
@@ -4512,8 +4475,8 @@ const It = {
|
|
|
4512
4475
|
ArrowRight: { x: 1, y: 0 }
|
|
4513
4476
|
};
|
|
4514
4477
|
var qt = (e) => {
|
|
4515
|
-
const t = ({ id: n, type: r, data: o, xPos: s, yPos: i, xPosOrigin: a, yPosOrigin: c, selected:
|
|
4516
|
-
const q = pe(), j = Q(null), k = Q(null), I = Q(D), P = Q(E), B = Q(r), V = x || w || l ||
|
|
4478
|
+
const t = ({ id: n, type: r, data: o, xPos: s, yPos: i, xPosOrigin: a, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: u, onMouseMove: f, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: p, className: m, isDraggable: w, isSelectable: x, isConnectable: b, isFocusable: C, selectNodesOnDrag: S, sourcePosition: D, targetPosition: E, hidden: _, resizeObserver: N, dragHandle: M, zIndex: O, isParent: F, noDragClassName: v, noPanClassName: A, initialized: L, disableKeyboardA11y: z, ariaLabel: G, rfId: R, hasHandleBounds: H }) => {
|
|
4479
|
+
const q = pe(), j = Q(null), k = Q(null), I = Q(D), P = Q(E), B = Q(r), V = x || w || l || u || f || h, Y = kl(), W = Bt(n, q.getState, u), Z = Bt(n, q.getState, f), ne = Bt(n, q.getState, h), K = Bt(n, q.getState, g), ee = Bt(n, q.getState, y), ce = (ie) => {
|
|
4517
4480
|
const { nodeDragThreshold: U } = q.getState();
|
|
4518
4481
|
if (x && (!S || !w || U > 0) && No({
|
|
4519
4482
|
id: n,
|
|
@@ -4533,7 +4496,7 @@ var qt = (e) => {
|
|
|
4533
4496
|
unselect: U,
|
|
4534
4497
|
nodeRef: j
|
|
4535
4498
|
});
|
|
4536
|
-
} else w &&
|
|
4499
|
+
} else w && d && Object.prototype.hasOwnProperty.call(It, ie.key) && (q.setState({
|
|
4537
4500
|
ariaLiveMessage: `Moved selected node ${ie.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~s}, y: ${~~i}`
|
|
4538
4501
|
}), Y({
|
|
4539
4502
|
x: It[ie.key].x,
|
|
@@ -4572,7 +4535,7 @@ var qt = (e) => {
|
|
|
4572
4535
|
},
|
|
4573
4536
|
m,
|
|
4574
4537
|
{
|
|
4575
|
-
selected:
|
|
4538
|
+
selected: d,
|
|
4576
4539
|
selectable: x,
|
|
4577
4540
|
parent: F,
|
|
4578
4541
|
dragging: ye
|
|
@@ -4582,12 +4545,12 @@ var qt = (e) => {
|
|
|
4582
4545
|
transform: `translate(${a}px,${c}px)`,
|
|
4583
4546
|
pointerEvents: V ? "all" : "none",
|
|
4584
4547
|
visibility: L ? "visible" : "hidden",
|
|
4585
|
-
...
|
|
4548
|
+
...p
|
|
4586
4549
|
}, "data-id": n, "data-testid": `rf__node-${n}`, onMouseEnter: W, onMouseMove: Z, onMouseLeave: ne, onContextMenu: K, onClick: ce, onDoubleClick: ee, onKeyDown: C ? se : void 0, tabIndex: C ? 0 : void 0, role: C ? "button" : void 0, "aria-describedby": z ? void 0 : `${ml}-${R}`, "aria-label": G },
|
|
4587
4550
|
$.createElement(
|
|
4588
4551
|
Yp,
|
|
4589
4552
|
{ value: n },
|
|
4590
|
-
$.createElement(e, { id: n, data: o, type: r, xPos: s, yPos: i, selected:
|
|
4553
|
+
$.createElement(e, { id: n, data: o, type: r, xPos: s, yPos: i, selected: d, isConnectable: b, sourcePosition: D, targetPosition: E, dragging: ye, dragHandle: M, zIndex: O })
|
|
4591
4554
|
)
|
|
4592
4555
|
);
|
|
4593
4556
|
};
|
|
@@ -4602,23 +4565,23 @@ const Ag = (e) => {
|
|
|
4602
4565
|
};
|
|
4603
4566
|
};
|
|
4604
4567
|
function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y: n }) {
|
|
4605
|
-
const r = pe(), { width: o, height: s, x: i, y: a, transformString: c, userSelectionActive:
|
|
4568
|
+
const r = pe(), { width: o, height: s, x: i, y: a, transformString: c, userSelectionActive: d } = le(Ag, he), l = kl(), u = Q(null);
|
|
4606
4569
|
if (oe(() => {
|
|
4607
|
-
n ||
|
|
4570
|
+
n || u.current?.focus({
|
|
4608
4571
|
preventScroll: !0
|
|
4609
4572
|
});
|
|
4610
4573
|
}, [n]), Nl({
|
|
4611
|
-
nodeRef:
|
|
4612
|
-
}),
|
|
4574
|
+
nodeRef: u
|
|
4575
|
+
}), d || !o || !s)
|
|
4613
4576
|
return null;
|
|
4614
|
-
const f = e ? (
|
|
4615
|
-
const y = r.getState().getNodes().filter((
|
|
4616
|
-
e(
|
|
4617
|
-
} : void 0, h = (
|
|
4618
|
-
Object.prototype.hasOwnProperty.call(It,
|
|
4619
|
-
x: It[
|
|
4620
|
-
y: It[
|
|
4621
|
-
isShiftPressed:
|
|
4577
|
+
const f = e ? (g) => {
|
|
4578
|
+
const y = r.getState().getNodes().filter((p) => p.selected);
|
|
4579
|
+
e(g, y);
|
|
4580
|
+
} : void 0, h = (g) => {
|
|
4581
|
+
Object.prototype.hasOwnProperty.call(It, g.key) && l({
|
|
4582
|
+
x: It[g.key].x,
|
|
4583
|
+
y: It[g.key].y,
|
|
4584
|
+
isShiftPressed: g.shiftKey
|
|
4622
4585
|
});
|
|
4623
4586
|
};
|
|
4624
4587
|
return $.createElement(
|
|
@@ -4626,7 +4589,7 @@ function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
4626
4589
|
{ className: me(["react-flow__nodesselection", "react-flow__container", t]), style: {
|
|
4627
4590
|
transform: c
|
|
4628
4591
|
} },
|
|
4629
|
-
$.createElement("div", { ref:
|
|
4592
|
+
$.createElement("div", { ref: u, className: "react-flow__nodesselection-rect", onContextMenu: f, tabIndex: n ? void 0 : -1, onKeyDown: n ? void 0 : h, style: {
|
|
4630
4593
|
width: o,
|
|
4631
4594
|
height: s,
|
|
4632
4595
|
top: a,
|
|
@@ -4635,14 +4598,14 @@ function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
|
|
|
4635
4598
|
);
|
|
4636
4599
|
}
|
|
4637
4600
|
var Dg = ae(Tg);
|
|
4638
|
-
const Rg = (e) => e.nodesSelectionActive, Ml = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, deleteKeyCode: a, onMove: c, onMoveStart:
|
|
4639
|
-
const H = le(Rg), q = tn(
|
|
4640
|
-
return bg({ deleteKeyCode: a, multiSelectionKeyCode:
|
|
4601
|
+
const Rg = (e) => e.nodesSelectionActive, Ml = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, deleteKeyCode: a, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: u, selectionOnDrag: f, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: p, panActivationKeyCode: m, zoomActivationKeyCode: w, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: S, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: N, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, preventScrolling: A, onSelectionContextMenu: L, noWheelClassName: z, noPanClassName: G, disableKeyboardA11y: R }) => {
|
|
4602
|
+
const H = le(Rg), q = tn(u), j = tn(m), k = j || N, I = j || S, P = q || f && k !== !0;
|
|
4603
|
+
return bg({ deleteKeyCode: a, multiSelectionKeyCode: p }), $.createElement(
|
|
4641
4604
|
Sg,
|
|
4642
|
-
{ onMove: c, onMoveStart:
|
|
4605
|
+
{ onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: s, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: I, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: !q && k, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, zoomActivationKeyCode: w, preventScrolling: A, noWheelClassName: z, noPanClassName: G },
|
|
4643
4606
|
$.createElement(
|
|
4644
4607
|
_l,
|
|
4645
|
-
{ onSelectionStart:
|
|
4608
|
+
{ onSelectionStart: g, onSelectionEnd: y, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, panOnDrag: k, isSelecting: !!P, selectionMode: h },
|
|
4646
4609
|
e,
|
|
4647
4610
|
H && $.createElement(Dg, { onSelectionContextMenu: L, noPanClassName: G, disableKeyboardA11y: R })
|
|
4648
4611
|
)
|
|
@@ -4676,11 +4639,11 @@ const zg = ({ x: e, y: t, width: n, height: r, origin: o }) => !n || !r ? { x: e
|
|
|
4676
4639
|
updateNodeDimensions: e.updateNodeDimensions,
|
|
4677
4640
|
onError: e.onError
|
|
4678
4641
|
}), Ll = (e) => {
|
|
4679
|
-
const { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: o, updateNodeDimensions: s, onError: i } = le(Vg, he), a = $g(e.onlyRenderVisibleElements), c = Q(),
|
|
4642
|
+
const { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: o, updateNodeDimensions: s, onError: i } = le(Vg, he), a = $g(e.onlyRenderVisibleElements), c = Q(), d = Ne(() => {
|
|
4680
4643
|
if (typeof ResizeObserver > "u")
|
|
4681
4644
|
return null;
|
|
4682
|
-
const l = new ResizeObserver((
|
|
4683
|
-
const f =
|
|
4645
|
+
const l = new ResizeObserver((u) => {
|
|
4646
|
+
const f = u.map((h) => ({
|
|
4684
4647
|
id: h.target.getAttribute("data-id"),
|
|
4685
4648
|
nodeElement: h.target,
|
|
4686
4649
|
forceUpdate: !0
|
|
@@ -4692,23 +4655,23 @@ const zg = ({ x: e, y: t, width: n, height: r, origin: o }) => !n || !r ? { x: e
|
|
|
4692
4655
|
return oe(() => () => {
|
|
4693
4656
|
c?.current?.disconnect();
|
|
4694
4657
|
}, []), $.createElement("div", { className: "react-flow__nodes", style: Ko }, a.map((l) => {
|
|
4695
|
-
let
|
|
4696
|
-
e.nodeTypes[
|
|
4697
|
-
const f = e.nodeTypes[
|
|
4658
|
+
let u = l.type || "default";
|
|
4659
|
+
e.nodeTypes[u] || (i?.("003", Ie.error003(u)), u = "default");
|
|
4660
|
+
const f = e.nodeTypes[u] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), g = !!(l.selectable || o && typeof l.selectable > "u"), y = !!(l.connectable || n && typeof l.connectable > "u"), p = !!(l.focusable || r && typeof l.focusable > "u"), m = e.nodeExtent ? Bo(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, w = m?.x ?? 0, x = m?.y ?? 0, b = zg({
|
|
4698
4661
|
x: w,
|
|
4699
4662
|
y: x,
|
|
4700
4663
|
width: l.width ?? 0,
|
|
4701
4664
|
height: l.height ?? 0,
|
|
4702
4665
|
origin: e.nodeOrigin
|
|
4703
4666
|
});
|
|
4704
|
-
return $.createElement(f, { key: l.id, id: l.id, className: l.className, style: l.style, type:
|
|
4667
|
+
return $.createElement(f, { key: l.id, id: l.id, className: l.className, style: l.style, type: u, data: l.data, sourcePosition: l.sourcePosition || X.Bottom, targetPosition: l.targetPosition || X.Top, hidden: l.hidden, xPos: w, yPos: x, xPosOrigin: b.x, yPosOrigin: b.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: g, isConnectable: y, isFocusable: p, resizeObserver: d, dragHandle: l.dragHandle, zIndex: l[ue]?.z ?? 0, isParent: !!l[ue]?.isParent, noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!l[ue]?.handleBounds });
|
|
4705
4668
|
}));
|
|
4706
4669
|
};
|
|
4707
4670
|
Ll.displayName = "NodeRenderer";
|
|
4708
4671
|
var Hg = ae(Ll);
|
|
4709
4672
|
const Bg = (e, t, n) => n === X.Left ? e - t : n === X.Right ? e + t : e, qg = (e, t, n) => n === X.Top ? e - t : n === X.Bottom ? e + t : e, es = "react-flow__edgeupdater", ts = ({ position: e, centerX: t, centerY: n, radius: r = 10, onMouseDown: o, onMouseEnter: s, onMouseOut: i, type: a }) => $.createElement("circle", { onMouseDown: o, onMouseEnter: s, onMouseOut: i, className: me([es, `${es}-${a}`]), cx: Bg(t, r, e), cy: qg(n, r, e), r, stroke: "transparent", fill: "transparent" }), Gg = () => !0;
|
|
4710
4673
|
var Nt = (e) => {
|
|
4711
|
-
const t = ({ id: n, className: r, type: o, data: s, onClick: i, onEdgeDoubleClick: a, selected: c, animated:
|
|
4674
|
+
const t = ({ id: n, className: r, type: o, data: s, onClick: i, onEdgeDoubleClick: a, selected: c, animated: d, label: l, labelStyle: u, labelShowBg: f, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: p, source: m, target: w, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, elementsSelectable: _, hidden: N, sourceHandleId: M, targetHandleId: O, onContextMenu: F, onMouseEnter: v, onMouseMove: A, onMouseLeave: L, reconnectRadius: z, onReconnect: G, onReconnectStart: R, onReconnectEnd: H, markerEnd: q, markerStart: j, rfId: k, ariaLabel: I, isFocusable: P, isReconnectable: B, pathOptions: V, interactionWidth: Y, disableKeyboardA11y: W }) => {
|
|
4712
4675
|
const Z = Q(null), [ne, K] = re(!1), [ee, ce] = re(!1), se = pe(), ye = Ne(() => `url('#${_o(j, k)}')`, [j, k]), ie = Ne(() => `url('#${_o(q, k)}')`, [q, k]);
|
|
4713
4676
|
if (N)
|
|
4714
4677
|
return null;
|
|
@@ -4747,9 +4710,9 @@ var Nt = (e) => {
|
|
|
4747
4710
|
"react-flow__edge",
|
|
4748
4711
|
`react-flow__edge-${o}`,
|
|
4749
4712
|
r,
|
|
4750
|
-
{ selected: c, animated:
|
|
4713
|
+
{ selected: c, animated: d, inactive: xt, updating: ne }
|
|
4751
4714
|
]), onClick: U, onDoubleClick: ve, onContextMenu: Fe, onMouseEnter: Pt, onMouseMove: yt, onMouseLeave: wt, onKeyDown: P ? $t : void 0, tabIndex: P ? 0 : void 0, role: P ? "button" : "img", "data-testid": `rf__edge-${n}`, "aria-label": I === null ? void 0 : I || `Edge from ${m} to ${w}`, "aria-describedby": P ? `${yl}-${k}` : void 0, ref: Z },
|
|
4752
|
-
!ee && $.createElement(e, { id: n, source: m, target: w, selected: c, animated:
|
|
4715
|
+
!ee && $.createElement(e, { id: n, source: m, target: w, selected: c, animated: d, label: l, labelStyle: u, labelShowBg: f, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, data: s, style: p, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, sourceHandleId: M, targetHandleId: O, markerStart: ye, markerEnd: ie, pathOptions: V, interactionWidth: Y }),
|
|
4753
4716
|
B && $.createElement(
|
|
4754
4717
|
$.Fragment,
|
|
4755
4718
|
null,
|
|
@@ -4811,20 +4774,20 @@ const jg = (e, t, n, r, o, s) => {
|
|
|
4811
4774
|
};
|
|
4812
4775
|
};
|
|
4813
4776
|
function Wg({ sourcePos: e, targetPos: t, sourceWidth: n, sourceHeight: r, targetWidth: o, targetHeight: s, width: i, height: a, transform: c }) {
|
|
4814
|
-
const
|
|
4777
|
+
const d = {
|
|
4815
4778
|
x: Math.min(e.x, t.x),
|
|
4816
4779
|
y: Math.min(e.y, t.y),
|
|
4817
4780
|
x2: Math.max(e.x + n, t.x + o),
|
|
4818
4781
|
y2: Math.max(e.y + r, t.y + s)
|
|
4819
4782
|
};
|
|
4820
|
-
|
|
4783
|
+
d.x === d.x2 && (d.x2 += 1), d.y === d.y2 && (d.y2 += 1);
|
|
4821
4784
|
const l = Jt({
|
|
4822
4785
|
x: (0 - c[0]) / c[2],
|
|
4823
4786
|
y: (0 - c[1]) / c[2],
|
|
4824
4787
|
width: i / c[2],
|
|
4825
4788
|
height: a / c[2]
|
|
4826
|
-
}),
|
|
4827
|
-
return Math.ceil(
|
|
4789
|
+
}), u = Math.max(0, Math.min(l.x2, d.x2) - Math.max(l.x, d.x)), f = Math.max(0, Math.min(l.y2, d.y2) - Math.max(l.y, d.y));
|
|
4790
|
+
return Math.ceil(u * f) > 0;
|
|
4828
4791
|
}
|
|
4829
4792
|
function os(e) {
|
|
4830
4793
|
const t = e?.[ue]?.handleBounds || null, n = t && e?.width && e?.height && typeof e?.positionAbsolute?.x < "u" && typeof e?.positionAbsolute?.y < "u";
|
|
@@ -4844,12 +4807,12 @@ function Zg(e, t, n = !1) {
|
|
|
4844
4807
|
let r = -1;
|
|
4845
4808
|
const o = e.reduce((i, a) => {
|
|
4846
4809
|
const c = Ce(a.zIndex);
|
|
4847
|
-
let
|
|
4810
|
+
let d = c ? a.zIndex : 0;
|
|
4848
4811
|
if (n) {
|
|
4849
|
-
const l = t.get(a.target),
|
|
4850
|
-
|
|
4812
|
+
const l = t.get(a.target), u = t.get(a.source), f = a.selected || l?.selected || u?.selected, h = Math.max(u?.[ue]?.z || 0, l?.[ue]?.z || 0, 1e3);
|
|
4813
|
+
d = (c ? a.zIndex : 0) + (f ? h : 0);
|
|
4851
4814
|
}
|
|
4852
|
-
return i[
|
|
4815
|
+
return i[d] ? i[d].push(a) : i[d] = [a], r = d > r ? d : r, i;
|
|
4853
4816
|
}, {}), s = Object.entries(o).map(([i, a]) => {
|
|
4854
4817
|
const c = +i;
|
|
4855
4818
|
return {
|
|
@@ -4927,7 +4890,7 @@ const rm = (e) => ({
|
|
|
4927
4890
|
connectionMode: e.connectionMode,
|
|
4928
4891
|
nodeInternals: e.nodeInternals,
|
|
4929
4892
|
onError: e.onError
|
|
4930
|
-
}), Ol = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: r, edgeTypes: o, noPanClassName: s, onEdgeContextMenu: i, onEdgeMouseEnter: a, onEdgeMouseMove: c, onEdgeMouseLeave:
|
|
4893
|
+
}), Ol = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: r, edgeTypes: o, noPanClassName: s, onEdgeContextMenu: i, onEdgeMouseEnter: a, onEdgeMouseMove: c, onEdgeMouseLeave: d, onEdgeClick: l, onEdgeDoubleClick: u, onReconnect: f, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, children: p, disableKeyboardA11y: m }) => {
|
|
4931
4894
|
const { edgesFocusable: w, edgesUpdatable: x, elementsSelectable: b, width: C, height: S, connectionMode: D, nodeInternals: E, onError: _ } = le(rm, he), N = Ug(t, E, n);
|
|
4932
4895
|
return C ? $.createElement(
|
|
4933
4896
|
$.Fragment,
|
|
@@ -4946,10 +4909,10 @@ const rm = (e) => ({
|
|
|
4946
4909
|
if (!I || !P)
|
|
4947
4910
|
return _?.("008", Ie.error008(I, v)), null;
|
|
4948
4911
|
const { sourceX: ne, sourceY: K, targetX: ee, targetY: ce } = jg(A, I, B, G, P, V);
|
|
4949
|
-
return $.createElement(j, { key: v.id, id: v.id, className: me([v.className, s]), type: q, data: v.data, selected: !!v.selected, animated: !!v.animated, hidden: !!v.hidden, label: v.label, labelStyle: v.labelStyle, labelShowBg: v.labelShowBg, labelBgStyle: v.labelBgStyle, labelBgPadding: v.labelBgPadding, labelBgBorderRadius: v.labelBgBorderRadius, style: v.style, source: v.source, target: v.target, sourceHandleId: v.sourceHandle, targetHandleId: v.targetHandle, markerEnd: v.markerEnd, markerStart: v.markerStart, sourceX: ne, sourceY: K, targetX: ee, targetY: ce, sourcePosition: B, targetPosition: V, elementsSelectable: b, onContextMenu: i, onMouseEnter: a, onMouseMove: c, onMouseLeave:
|
|
4912
|
+
return $.createElement(j, { key: v.id, id: v.id, className: me([v.className, s]), type: q, data: v.data, selected: !!v.selected, animated: !!v.animated, hidden: !!v.hidden, label: v.label, labelStyle: v.labelStyle, labelShowBg: v.labelShowBg, labelBgStyle: v.labelBgStyle, labelBgPadding: v.labelBgPadding, labelBgBorderRadius: v.labelBgBorderRadius, style: v.style, source: v.source, target: v.target, sourceHandleId: v.sourceHandle, targetHandleId: v.targetHandle, markerEnd: v.markerEnd, markerStart: v.markerStart, sourceX: ne, sourceY: K, targetX: ee, targetY: ce, sourcePosition: B, targetPosition: V, elementsSelectable: b, onContextMenu: i, onMouseEnter: a, onMouseMove: c, onMouseLeave: d, onClick: l, onEdgeDoubleClick: u, onReconnect: f, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, rfId: r, ariaLabel: v.ariaLabel, isFocusable: Y, isReconnectable: Z, pathOptions: "pathOptions" in v ? v.pathOptions : void 0, interactionWidth: v.interactionWidth, disableKeyboardA11y: m });
|
|
4950
4913
|
}))
|
|
4951
4914
|
)),
|
|
4952
|
-
|
|
4915
|
+
p
|
|
4953
4916
|
) : null;
|
|
4954
4917
|
};
|
|
4955
4918
|
Ol.displayName = "EdgeRenderer";
|
|
@@ -4971,34 +4934,34 @@ const lm = {
|
|
|
4971
4934
|
[X.Top]: X.Bottom,
|
|
4972
4935
|
[X.Bottom]: X.Top
|
|
4973
4936
|
}, Al = ({ nodeId: e, handleType: t, style: n, type: r = Ue.Bezier, CustomComponent: o, connectionStatus: s }) => {
|
|
4974
|
-
const { fromNode: i, handleId: a, toX: c, toY:
|
|
4937
|
+
const { fromNode: i, handleId: a, toX: c, toY: d, connectionMode: l } = le(de((S) => ({
|
|
4975
4938
|
fromNode: S.nodeInternals.get(e),
|
|
4976
4939
|
handleId: S.connectionHandleId,
|
|
4977
4940
|
toX: (S.connectionPosition.x - S.transform[0]) / S.transform[2],
|
|
4978
4941
|
toY: (S.connectionPosition.y - S.transform[1]) / S.transform[2],
|
|
4979
4942
|
connectionMode: S.connectionMode
|
|
4980
|
-
}), [e]), he),
|
|
4981
|
-
let f =
|
|
4982
|
-
if (l === gt.Loose && (f = f ||
|
|
4943
|
+
}), [e]), he), u = i?.[ue]?.handleBounds;
|
|
4944
|
+
let f = u?.[t];
|
|
4945
|
+
if (l === gt.Loose && (f = f || u?.[t === "source" ? "target" : "source"]), !i || !f)
|
|
4983
4946
|
return null;
|
|
4984
|
-
const h = a ? f.find((S) => S.id === a) : f[0],
|
|
4947
|
+
const h = a ? f.find((S) => S.id === a) : f[0], g = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, y = h ? h.y + h.height / 2 : i.height ?? 0, p = (i.positionAbsolute?.x ?? 0) + g, m = (i.positionAbsolute?.y ?? 0) + y, w = h?.position, x = w ? lm[w] : null;
|
|
4985
4948
|
if (!w || !x)
|
|
4986
4949
|
return null;
|
|
4987
4950
|
if (o)
|
|
4988
|
-
return $.createElement(o, { connectionLineType: r, connectionLineStyle: n, fromNode: i, fromHandle: h, fromX:
|
|
4951
|
+
return $.createElement(o, { connectionLineType: r, connectionLineStyle: n, fromNode: i, fromHandle: h, fromX: p, fromY: m, toX: c, toY: d, fromPosition: w, toPosition: x, connectionStatus: s });
|
|
4989
4952
|
let b = "";
|
|
4990
4953
|
const C = {
|
|
4991
|
-
sourceX:
|
|
4954
|
+
sourceX: p,
|
|
4992
4955
|
sourceY: m,
|
|
4993
4956
|
sourcePosition: w,
|
|
4994
4957
|
targetX: c,
|
|
4995
|
-
targetY:
|
|
4958
|
+
targetY: d,
|
|
4996
4959
|
targetPosition: x
|
|
4997
4960
|
};
|
|
4998
4961
|
return r === Ue.Bezier ? [b] = jo(C) : r === Ue.Step ? [b] = Eo({
|
|
4999
4962
|
...C,
|
|
5000
4963
|
borderRadius: 0
|
|
5001
|
-
}) : r === Ue.SmoothStep ? [b] = Eo(C) : r === Ue.SimpleBezier ? [b] = tl(C) : b = `M${
|
|
4964
|
+
}) : r === Ue.SmoothStep ? [b] = Eo(C) : r === Ue.SimpleBezier ? [b] = tl(C) : b = `M${p},${m} ${c},${d}`, $.createElement("path", { d: b, fill: "none", className: "react-flow__connection-path", style: n });
|
|
5002
4965
|
};
|
|
5003
4966
|
Al.displayName = "ConnectionLine";
|
|
5004
4967
|
const cm = (e) => ({
|
|
@@ -5010,14 +4973,14 @@ const cm = (e) => ({
|
|
|
5010
4973
|
height: e.height
|
|
5011
4974
|
});
|
|
5012
4975
|
function um({ containerStyle: e, style: t, type: n, component: r }) {
|
|
5013
|
-
const { nodeId: o, handleType: s, nodesConnectable: i, width: a, height: c, connectionStatus:
|
|
4976
|
+
const { nodeId: o, handleType: s, nodesConnectable: i, width: a, height: c, connectionStatus: d } = le(cm, he);
|
|
5014
4977
|
return !(o && s && a && i) ? null : $.createElement(
|
|
5015
4978
|
"svg",
|
|
5016
4979
|
{ style: e, width: a, height: c, className: "react-flow__edges react-flow__connectionline react-flow__container" },
|
|
5017
4980
|
$.createElement(
|
|
5018
4981
|
"g",
|
|
5019
|
-
{ className: me(["react-flow__connection",
|
|
5020
|
-
$.createElement(Al, { nodeId: o, handleType: s, style: t, type: n, CustomComponent: r, connectionStatus:
|
|
4982
|
+
{ className: me(["react-flow__connection", d]) },
|
|
4983
|
+
$.createElement(Al, { nodeId: o, handleType: s, style: t, type: n, CustomComponent: r, connectionStatus: d })
|
|
5021
4984
|
)
|
|
5022
4985
|
);
|
|
5023
4986
|
}
|
|
@@ -5031,21 +4994,21 @@ function ss(e, t) {
|
|
|
5031
4994
|
return t(e);
|
|
5032
4995
|
}, [e]);
|
|
5033
4996
|
}
|
|
5034
|
-
const Tl = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: r, onMoveEnd: o, onInit: s, onNodeClick: i, onEdgeClick: a, onNodeDoubleClick: c, onEdgeDoubleClick:
|
|
4997
|
+
const Tl = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: r, onMoveEnd: o, onInit: s, onNodeClick: i, onEdgeClick: a, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: u, onNodeMouseLeave: f, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: w, connectionLineComponent: x, connectionLineContainerStyle: b, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, deleteKeyCode: M, onlyRenderVisibleElements: O, elementsSelectable: F, selectNodesOnDrag: v, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, preventScrolling: R, defaultMarkerColor: H, zoomOnScroll: q, zoomOnPinch: j, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, zoomOnDoubleClick: B, panOnDrag: V, onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneScroll: K, onPaneContextMenu: ee, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, elevateEdgesOnSelect: vt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt }) => {
|
|
5035
4998
|
const $t = ss(e, Fg), we = ss(t, Yg);
|
|
5036
4999
|
return am(s), $.createElement(
|
|
5037
5000
|
Pg,
|
|
5038
|
-
{ onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneContextMenu: ee, onPaneScroll: K, deleteKeyCode: M, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, onSelectionStart: y, onSelectionEnd:
|
|
5001
|
+
{ onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneContextMenu: ee, onPaneScroll: K, deleteKeyCode: M, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, onSelectionStart: y, onSelectionEnd: p, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, elementsSelectable: F, onMove: n, onMoveStart: r, onMoveEnd: o, zoomOnScroll: q, zoomOnPinch: j, zoomOnDoubleClick: B, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, panOnDrag: V, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, onSelectionContextMenu: g, preventScrolling: R, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, disableKeyboardA11y: tt },
|
|
5039
5002
|
$.createElement(
|
|
5040
5003
|
sm,
|
|
5041
5004
|
null,
|
|
5042
5005
|
$.createElement(
|
|
5043
5006
|
om,
|
|
5044
|
-
{ edgeTypes: we, onEdgeClick: a, onEdgeDoubleClick:
|
|
5007
|
+
{ edgeTypes: we, onEdgeClick: a, onEdgeDoubleClick: d, onlyRenderVisibleElements: O, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, defaultMarkerColor: H, noPanClassName: ze, elevateEdgesOnSelect: !!vt, disableKeyboardA11y: tt, rfId: xt },
|
|
5045
5008
|
$.createElement(um, { style: w, type: m, component: x, containerStyle: b })
|
|
5046
5009
|
),
|
|
5047
5010
|
$.createElement("div", { className: "react-flow__edgelabel-renderer" }),
|
|
5048
|
-
$.createElement(Hg, { nodeTypes: $t, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove:
|
|
5011
|
+
$.createElement(Hg, { nodeTypes: $t, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: u, onNodeMouseLeave: f, onNodeContextMenu: h, selectNodesOnDrag: v, onlyRenderVisibleElements: O, noPanClassName: ze, noDragClassName: yt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt })
|
|
5049
5012
|
)
|
|
5050
5013
|
);
|
|
5051
5014
|
};
|
|
@@ -5126,11 +5089,11 @@ const ko = [
|
|
|
5126
5089
|
e({ nodeInternals: i, edges: s ? r : [], hasDefaultNodes: o, hasDefaultEdges: s });
|
|
5127
5090
|
},
|
|
5128
5091
|
updateNodeDimensions: (n) => {
|
|
5129
|
-
const { onNodesChange: r, nodeInternals: o, fitViewOnInit: s, fitViewOnInitDone: i, fitViewOnInitOptions: a, domNode: c, nodeOrigin:
|
|
5092
|
+
const { onNodesChange: r, nodeInternals: o, fitViewOnInit: s, fitViewOnInitDone: i, fitViewOnInitOptions: a, domNode: c, nodeOrigin: d } = t(), l = c?.querySelector(".react-flow__viewport");
|
|
5130
5093
|
if (!l)
|
|
5131
5094
|
return;
|
|
5132
|
-
const
|
|
5133
|
-
const m = o.get(
|
|
5095
|
+
const u = window.getComputedStyle(l), { m22: f } = new window.DOMMatrixReadOnly(u.transform), h = n.reduce((y, p) => {
|
|
5096
|
+
const m = o.get(p.id);
|
|
5134
5097
|
if (m?.hidden)
|
|
5135
5098
|
o.set(m.id, {
|
|
5136
5099
|
...m,
|
|
@@ -5142,14 +5105,14 @@ const ko = [
|
|
|
5142
5105
|
}
|
|
5143
5106
|
});
|
|
5144
5107
|
else if (m) {
|
|
5145
|
-
const w = Ho(
|
|
5146
|
-
|
|
5108
|
+
const w = Ho(p.nodeElement);
|
|
5109
|
+
w.width && w.height && (m.width !== w.width || m.height !== w.height || p.forceUpdate) && (o.set(m.id, {
|
|
5147
5110
|
...m,
|
|
5148
5111
|
[ue]: {
|
|
5149
5112
|
...m[ue],
|
|
5150
5113
|
handleBounds: {
|
|
5151
|
-
source: Ji(".source",
|
|
5152
|
-
target: Ji(".target",
|
|
5114
|
+
source: Ji(".source", p.nodeElement, f, d),
|
|
5115
|
+
target: Ji(".target", p.nodeElement, f, d)
|
|
5153
5116
|
}
|
|
5154
5117
|
},
|
|
5155
5118
|
...w
|
|
@@ -5161,9 +5124,9 @@ const ko = [
|
|
|
5161
5124
|
}
|
|
5162
5125
|
return y;
|
|
5163
5126
|
}, []);
|
|
5164
|
-
vl(o,
|
|
5165
|
-
const
|
|
5166
|
-
e({ nodeInternals: new Map(o), fitViewOnInitDone:
|
|
5127
|
+
vl(o, d);
|
|
5128
|
+
const g = i || s && !i && bl(t, { initial: !0, ...a });
|
|
5129
|
+
e({ nodeInternals: new Map(o), fitViewOnInitDone: g }), h?.length > 0 && r?.(h);
|
|
5167
5130
|
},
|
|
5168
5131
|
updateNodePositions: (n, r = !0, o = !1) => {
|
|
5169
5132
|
const { triggerNodeChanges: s } = t(), i = n.map((a) => {
|
|
@@ -5180,7 +5143,7 @@ const ko = [
|
|
|
5180
5143
|
const { onNodesChange: r, nodeInternals: o, hasDefaultNodes: s, nodeOrigin: i, getNodes: a, elevateNodesOnSelect: c } = t();
|
|
5181
5144
|
if (n?.length) {
|
|
5182
5145
|
if (s) {
|
|
5183
|
-
const
|
|
5146
|
+
const d = El(n, a()), l = dr(d, o, i, c);
|
|
5184
5147
|
e({ nodeInternals: l });
|
|
5185
5148
|
}
|
|
5186
5149
|
r?.(n);
|
|
@@ -5207,10 +5170,10 @@ const ko = [
|
|
|
5207
5170
|
});
|
|
5208
5171
|
},
|
|
5209
5172
|
unselectNodesAndEdges: ({ nodes: n, edges: r } = {}) => {
|
|
5210
|
-
const { edges: o, getNodes: s } = t(), i = n || s(), a = r || o, c = i.map((l) => (l.selected = !1, Ze(l.id, !1))),
|
|
5173
|
+
const { edges: o, getNodes: s } = t(), i = n || s(), a = r || o, c = i.map((l) => (l.selected = !1, Ze(l.id, !1))), d = a.map((l) => Ze(l.id, !1));
|
|
5211
5174
|
wn({
|
|
5212
5175
|
changedNodes: c,
|
|
5213
|
-
changedEdges:
|
|
5176
|
+
changedEdges: d,
|
|
5214
5177
|
get: t,
|
|
5215
5178
|
set: e
|
|
5216
5179
|
});
|
|
@@ -5248,11 +5211,11 @@ const ko = [
|
|
|
5248
5211
|
const { transform: r, width: o, height: s, d3Zoom: i, d3Selection: a, translateExtent: c } = t();
|
|
5249
5212
|
if (!i || !a || !n.x && !n.y)
|
|
5250
5213
|
return !1;
|
|
5251
|
-
const
|
|
5214
|
+
const d = qe.translate(r[0] + n.x, r[1] + n.y).scale(r[2]), l = [
|
|
5252
5215
|
[0, 0],
|
|
5253
5216
|
[o, s]
|
|
5254
|
-
],
|
|
5255
|
-
return i.transform(a,
|
|
5217
|
+
], u = i?.constrain()(d, l, c);
|
|
5218
|
+
return i.transform(a, u), r[0] !== u.x || r[1] !== u.y || r[2] !== u.k;
|
|
5256
5219
|
},
|
|
5257
5220
|
cancelConnection: () => e({
|
|
5258
5221
|
connectionNodeId: je.connectionNodeId,
|
|
@@ -5287,7 +5250,7 @@ const hm = {
|
|
|
5287
5250
|
overflow: "hidden",
|
|
5288
5251
|
position: "relative",
|
|
5289
5252
|
zIndex: 0
|
|
5290
|
-
}, Pl = ua(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: o, nodeTypes: s = hm, edgeTypes: i = pm, onNodeClick: a, onEdgeClick: c, onInit:
|
|
5253
|
+
}, Pl = ua(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: o, nodeTypes: s = hm, edgeTypes: i = pm, onNodeClick: a, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: u, onMoveEnd: f, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: m, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onNodesDelete: N, onEdgesDelete: M, onSelectionChange: O, onSelectionDragStart: F, onSelectionDrag: v, onSelectionDragStop: A, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, connectionMode: R = gt.Strict, connectionLineType: H = Ue.Bezier, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, deleteKeyCode: I = "Backspace", selectionKeyCode: P = "Shift", selectionOnDrag: B = !1, selectionMode: V = en.Full, panActivationKeyCode: Y = "Space", multiSelectionKeyCode: W = Dn() ? "Meta" : "Control", zoomActivationKeyCode: Z = Dn() ? "Meta" : "Control", snapToGrid: ne = !1, snapGrid: K = mm, onlyRenderVisibleElements: ee = !1, selectNodesOnDrag: ce = !0, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, nodeOrigin: U = gm, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, defaultViewport: yt = ym, minZoom: wt = 0.5, maxZoom: ze = 2, translateExtent: vt = ko, preventScrolling: tt = !0, nodeExtent: nt, defaultMarkerColor: bt = "#b1b1b7", zoomOnScroll: xt = !0, zoomOnPinch: $t = !0, panOnScroll: we = !1, panOnScrollSpeed: Te = 0.5, panOnScrollMode: rt = ut.Free, zoomOnDoubleClick: ot = !0, panOnDrag: Et = !0, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, children: ni, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onEdgeUpdate: nc, onEdgeUpdateStart: rc, onEdgeUpdateEnd: oc, onReconnect: ic, onReconnectStart: sc, onReconnectEnd: ac, reconnectRadius: lc = 10, edgeUpdaterRadius: cc = 10, onNodesChange: uc, onEdgesChange: dc, noDragClassName: fc = "nodrag", noWheelClassName: hc = "nowheel", noPanClassName: ri = "nopan", fitView: pc = !1, fitViewOptions: gc, connectOnClick: mc = !0, attributionPosition: yc, proOptions: wc, defaultEdgeOptions: vc, elevateNodesOnSelect: bc = !0, elevateEdgesOnSelect: xc = !1, disableKeyboardA11y: oi = !1, autoPanOnConnect: Ec = !0, autoPanOnNodeDrag: _c = !0, connectionRadius: Sc = 20, isValidConnection: Cc, onError: Nc, style: kc, id: ii, nodeDragThreshold: Mc, ...Lc }, Ic) => {
|
|
5291
5254
|
const er = ii || "1";
|
|
5292
5255
|
return $.createElement(
|
|
5293
5256
|
"div",
|
|
@@ -5295,8 +5258,8 @@ const hm = {
|
|
|
5295
5258
|
$.createElement(
|
|
5296
5259
|
Rl,
|
|
5297
5260
|
null,
|
|
5298
|
-
$.createElement(dm, { onInit:
|
|
5299
|
-
$.createElement(lg, { nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: h, onConnectStart:
|
|
5261
|
+
$.createElement(dm, { onInit: d, onMove: l, onMoveStart: u, onMoveEnd: f, onNodeClick: a, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, nodeTypes: s, edgeTypes: i, connectionLineType: H, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, selectionKeyCode: P, selectionOnDrag: B, selectionMode: V, deleteKeyCode: I, multiSelectionKeyCode: W, panActivationKeyCode: Y, zoomActivationKeyCode: Z, onlyRenderVisibleElements: ee, selectNodesOnDrag: ce, defaultViewport: yt, translateExtent: vt, minZoom: wt, maxZoom: ze, preventScrolling: tt, zoomOnScroll: xt, zoomOnPinch: $t, zoomOnDoubleClick: ot, panOnScroll: we, panOnScrollSpeed: Te, panOnScrollMode: rt, panOnDrag: Et, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onReconnect: ic ?? nc, onReconnectStart: sc ?? rc, onReconnectEnd: ac ?? oc, reconnectRadius: lc ?? cc, defaultMarkerColor: bt, noDragClassName: fc, noWheelClassName: hc, noPanClassName: ri, elevateEdgesOnSelect: xc, rfId: er, disableKeyboardA11y: oi, nodeOrigin: U, nodeExtent: nt }),
|
|
5262
|
+
$.createElement(lg, { nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: m, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, elevateNodesOnSelect: bc, minZoom: wt, maxZoom: ze, nodeExtent: nt, onNodesChange: uc, onEdgesChange: dc, snapToGrid: ne, snapGrid: K, connectionMode: R, translateExtent: vt, connectOnClick: mc, defaultEdgeOptions: vc, fitView: pc, fitViewOptions: gc, onNodesDelete: N, onEdgesDelete: M, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onSelectionDrag: v, onSelectionDragStart: F, onSelectionDragStop: A, noPanClassName: ri, nodeOrigin: U, rfId: er, autoPanOnConnect: Ec, autoPanOnNodeDrag: _c, onError: Nc, connectionRadius: Sc, isValidConnection: Cc, nodeDragThreshold: Mc }),
|
|
5300
5263
|
$.createElement(sg, { onSelectionChange: O }),
|
|
5301
5264
|
ni,
|
|
5302
5265
|
$.createElement(Dp, { proOptions: wc, position: yc }),
|
|
@@ -5311,9 +5274,9 @@ function $l(e) {
|
|
|
5311
5274
|
return [n, r, o];
|
|
5312
5275
|
};
|
|
5313
5276
|
}
|
|
5314
|
-
const vm = $l(El), bm = $l(kg), Fl = ({ id: e, x: t, y: n, width: r, height: o, style: s, color: i, strokeColor: a, strokeWidth: c, className:
|
|
5315
|
-
const { background:
|
|
5316
|
-
return $.createElement("rect", { className: me(["react-flow__minimap-node", { selected: h },
|
|
5277
|
+
const vm = $l(El), bm = $l(kg), Fl = ({ id: e, x: t, y: n, width: r, height: o, style: s, color: i, strokeColor: a, strokeWidth: c, className: d, borderRadius: l, shapeRendering: u, onClick: f, selected: h }) => {
|
|
5278
|
+
const { background: g, backgroundColor: y } = s || {}, p = i || g || y;
|
|
5279
|
+
return $.createElement("rect", { className: me(["react-flow__minimap-node", { selected: h }, d]), x: t, y: n, rx: l, ry: l, width: r, height: o, fill: p, stroke: a, strokeWidth: c, shapeRendering: u, onClick: f ? (m) => f(m, e) : void 0 });
|
|
5317
5280
|
};
|
|
5318
5281
|
Fl.displayName = "MiniMapNode";
|
|
5319
5282
|
var xm = ae(Fl);
|
|
@@ -5329,10 +5292,10 @@ function Sm({
|
|
|
5329
5292
|
nodeComponent: s = xm,
|
|
5330
5293
|
onClick: i
|
|
5331
5294
|
}) {
|
|
5332
|
-
const a = le(_m, he), c = le(Em),
|
|
5295
|
+
const a = le(_m, he), c = le(Em), d = gr(t), l = gr(e), u = gr(n), f = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
|
|
5333
5296
|
return $.createElement($.Fragment, null, a.map((h) => {
|
|
5334
|
-
const { x:
|
|
5335
|
-
return $.createElement(s, { key: h.id, x:
|
|
5297
|
+
const { x: g, y } = ht(h, c).positionAbsolute;
|
|
5298
|
+
return $.createElement(s, { key: h.id, x: g, y, width: h.width, height: h.height, style: h.style, selected: h.selected, className: u(h), color: d(h), borderRadius: r, strokeColor: l(h), strokeWidth: o, shapeRendering: f, onClick: i, id: h.id });
|
|
5336
5299
|
}));
|
|
5337
5300
|
}
|
|
5338
5301
|
var Cm = ae(Sm);
|
|
@@ -5361,14 +5324,14 @@ function zl({
|
|
|
5361
5324
|
// a component properly.
|
|
5362
5325
|
nodeComponent: a,
|
|
5363
5326
|
maskColor: c = "rgb(240, 240, 240, 0.6)",
|
|
5364
|
-
maskStrokeColor:
|
|
5327
|
+
maskStrokeColor: d = "none",
|
|
5365
5328
|
maskStrokeWidth: l = 1,
|
|
5366
|
-
position:
|
|
5329
|
+
position: u = "bottom-right",
|
|
5367
5330
|
onClick: f,
|
|
5368
5331
|
onNodeClick: h,
|
|
5369
|
-
pannable:
|
|
5332
|
+
pannable: g = !1,
|
|
5370
5333
|
zoomable: y = !1,
|
|
5371
|
-
ariaLabel:
|
|
5334
|
+
ariaLabel: p = "React Flow mini map",
|
|
5372
5335
|
inversePan: m = !1,
|
|
5373
5336
|
zoomStep: w = 10,
|
|
5374
5337
|
offsetScale: x = 5
|
|
@@ -5394,12 +5357,12 @@ function zl({
|
|
|
5394
5357
|
[ce, se]
|
|
5395
5358
|
], ve = qe.translate(ie.x, ie.y).scale(Z[2]), Fe = K.constrain()(ve, U, ee);
|
|
5396
5359
|
K.transform(ne, Fe);
|
|
5397
|
-
}, Y = Ga().on("zoom",
|
|
5360
|
+
}, Y = Ga().on("zoom", g ? V : null).on("zoom.wheel", y ? B : null);
|
|
5398
5361
|
return P.call(Y), () => {
|
|
5399
5362
|
P.on("zoom", null);
|
|
5400
5363
|
};
|
|
5401
5364
|
}
|
|
5402
|
-
}, [
|
|
5365
|
+
}, [g, y, m, w]);
|
|
5403
5366
|
const k = f ? (P) => {
|
|
5404
5367
|
const B = ke(P);
|
|
5405
5368
|
f(P, { x: B[0], y: B[1] });
|
|
@@ -5409,14 +5372,14 @@ function zl({
|
|
|
5409
5372
|
} : void 0;
|
|
5410
5373
|
return $.createElement(
|
|
5411
5374
|
Vo,
|
|
5412
|
-
{ position:
|
|
5375
|
+
{ position: u, style: e, className: me(["react-flow__minimap", t]), "data-testid": "rf__minimap" },
|
|
5413
5376
|
$.createElement(
|
|
5414
5377
|
"svg",
|
|
5415
5378
|
{ width: _, height: N, viewBox: `${z} ${G} ${R} ${H}`, role: "img", "aria-labelledby": q, ref: C, onClick: k },
|
|
5416
|
-
|
|
5379
|
+
p && $.createElement("title", { id: q }, p),
|
|
5417
5380
|
$.createElement(Cm, { onClick: I, nodeColor: r, nodeStrokeColor: n, nodeBorderRadius: s, nodeClassName: o, nodeStrokeWidth: i, nodeComponent: a }),
|
|
5418
5381
|
$.createElement("path", { className: "react-flow__minimap-mask", d: `M${z - L},${G - L}h${R + L * 2}v${H + L * 2}h${-R - L * 2}z
|
|
5419
|
-
M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`, fill: c, fillRule: "evenodd", stroke:
|
|
5382
|
+
M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`, fill: c, fillRule: "evenodd", stroke: d, strokeWidth: l, pointerEvents: "none" })
|
|
5420
5383
|
)
|
|
5421
5384
|
);
|
|
5422
5385
|
}
|
|
@@ -5463,10 +5426,10 @@ const Pm = (e) => ({
|
|
|
5463
5426
|
isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
|
|
5464
5427
|
minZoomReached: e.transform[2] <= e.minZoom,
|
|
5465
5428
|
maxZoomReached: e.transform[2] >= e.maxZoom
|
|
5466
|
-
}), Vl = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: r = !0, fitViewOptions: o, onZoomIn: s, onZoomOut: i, onFitView: a, onInteractiveChange: c, className:
|
|
5467
|
-
const f = pe(), [h,
|
|
5429
|
+
}), Vl = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: r = !0, fitViewOptions: o, onZoomIn: s, onZoomOut: i, onFitView: a, onInteractiveChange: c, className: d, children: l, position: u = "bottom-left" }) => {
|
|
5430
|
+
const f = pe(), [h, g] = re(!1), { isInteractive: y, minZoomReached: p, maxZoomReached: m } = le(Pm, he), { zoomIn: w, zoomOut: x, fitView: b } = Uo();
|
|
5468
5431
|
if (oe(() => {
|
|
5469
|
-
|
|
5432
|
+
g(!0);
|
|
5470
5433
|
}, []), !h)
|
|
5471
5434
|
return null;
|
|
5472
5435
|
const C = () => {
|
|
@@ -5484,7 +5447,7 @@ const Pm = (e) => ({
|
|
|
5484
5447
|
};
|
|
5485
5448
|
return $.createElement(
|
|
5486
5449
|
Vo,
|
|
5487
|
-
{ className: me(["react-flow__controls",
|
|
5450
|
+
{ className: me(["react-flow__controls", d]), position: u, style: e, "data-testid": "rf__controls" },
|
|
5488
5451
|
t && $.createElement(
|
|
5489
5452
|
$.Fragment,
|
|
5490
5453
|
null,
|
|
@@ -5495,7 +5458,7 @@ const Pm = (e) => ({
|
|
|
5495
5458
|
),
|
|
5496
5459
|
$.createElement(
|
|
5497
5460
|
jt,
|
|
5498
|
-
{ onClick: S, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled:
|
|
5461
|
+
{ onClick: S, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: p },
|
|
5499
5462
|
$.createElement(Am, null)
|
|
5500
5463
|
)
|
|
5501
5464
|
),
|
|
@@ -5541,7 +5504,7 @@ function Hl({
|
|
|
5541
5504
|
style: a,
|
|
5542
5505
|
className: c
|
|
5543
5506
|
}) {
|
|
5544
|
-
const
|
|
5507
|
+
const d = Q(null), { transform: l, patternId: u } = le(Bm, he), f = i || Vm[t], h = r || Hm[t], g = t === Le.Dots, y = t === Le.Cross, p = Array.isArray(n) ? n : [n, n], m = [p[0] * l[2] || 1, p[1] * l[2] || 1], w = h * l[2], x = y ? [w, w] : m, b = g ? [w / s, w / s] : [x[0] / s, x[1] / s];
|
|
5545
5508
|
return $.createElement(
|
|
5546
5509
|
"svg",
|
|
5547
5510
|
{ className: me(["react-flow__background", c]), style: {
|
|
@@ -5551,9 +5514,9 @@ function Hl({
|
|
|
5551
5514
|
height: "100%",
|
|
5552
5515
|
top: 0,
|
|
5553
5516
|
left: 0
|
|
5554
|
-
}, ref:
|
|
5555
|
-
$.createElement("pattern", { id:
|
|
5556
|
-
$.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${
|
|
5517
|
+
}, ref: d, "data-testid": "rf__background" },
|
|
5518
|
+
$.createElement("pattern", { id: u + e, x: l[0] % m[0], y: l[1] % m[1], width: m[0], height: m[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${b[0]},-${b[1]})` }, g ? $.createElement(zm, { color: f, radius: w / s }) : $.createElement(Fm, { dimensions: x, color: f, lineWidth: o })),
|
|
5519
|
+
$.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${u + e})` })
|
|
5557
5520
|
);
|
|
5558
5521
|
}
|
|
5559
5522
|
Hl.displayName = "Background";
|
|
@@ -5669,7 +5632,7 @@ function Qo() {
|
|
|
5669
5632
|
*/
|
|
5670
5633
|
sources() {
|
|
5671
5634
|
var l = this;
|
|
5672
|
-
return this.nodes().filter((
|
|
5635
|
+
return this.nodes().filter((u) => Object.keys(l._in[u]).length === 0);
|
|
5673
5636
|
}
|
|
5674
5637
|
/**
|
|
5675
5638
|
* Gets list of nodes without out-edges.
|
|
@@ -5677,16 +5640,16 @@ function Qo() {
|
|
|
5677
5640
|
*/
|
|
5678
5641
|
sinks() {
|
|
5679
5642
|
var l = this;
|
|
5680
|
-
return this.nodes().filter((
|
|
5643
|
+
return this.nodes().filter((u) => Object.keys(l._out[u]).length === 0);
|
|
5681
5644
|
}
|
|
5682
5645
|
/**
|
|
5683
5646
|
* Invokes setNode method for each node in names list.
|
|
5684
5647
|
* Complexity: O(|names|).
|
|
5685
5648
|
*/
|
|
5686
|
-
setNodes(l,
|
|
5649
|
+
setNodes(l, u) {
|
|
5687
5650
|
var f = arguments, h = this;
|
|
5688
|
-
return l.forEach(function(
|
|
5689
|
-
f.length > 1 ? h.setNode(
|
|
5651
|
+
return l.forEach(function(g) {
|
|
5652
|
+
f.length > 1 ? h.setNode(g, u) : h.setNode(g);
|
|
5690
5653
|
}), this;
|
|
5691
5654
|
}
|
|
5692
5655
|
/**
|
|
@@ -5695,8 +5658,8 @@ function Qo() {
|
|
|
5695
5658
|
* created by this call then the default node label will be assigned.
|
|
5696
5659
|
* Complexity: O(1).
|
|
5697
5660
|
*/
|
|
5698
|
-
setNode(l,
|
|
5699
|
-
return Object.hasOwn(this._nodes, l) ? (arguments.length > 1 && (this._nodes[l] =
|
|
5661
|
+
setNode(l, u) {
|
|
5662
|
+
return Object.hasOwn(this._nodes, l) ? (arguments.length > 1 && (this._nodes[l] = u), this) : (this._nodes[l] = arguments.length > 1 ? u : this._defaultNodeLabelFn(l), this._isCompound && (this._parent[l] = t, this._children[l] = {}, this._children[t][l] = !0), this._in[l] = {}, this._preds[l] = {}, this._out[l] = {}, this._sucs[l] = {}, ++this._nodeCount, this);
|
|
5700
5663
|
}
|
|
5701
5664
|
/**
|
|
5702
5665
|
* Gets the label of node with specified name.
|
|
@@ -5718,11 +5681,11 @@ function Qo() {
|
|
|
5718
5681
|
* Complexity: O(1).
|
|
5719
5682
|
*/
|
|
5720
5683
|
removeNode(l) {
|
|
5721
|
-
var
|
|
5684
|
+
var u = this;
|
|
5722
5685
|
if (Object.hasOwn(this._nodes, l)) {
|
|
5723
|
-
var f = (h) =>
|
|
5686
|
+
var f = (h) => u.removeEdge(u._edgeObjs[h]);
|
|
5724
5687
|
delete this._nodes[l], this._isCompound && (this._removeFromParentsChildList(l), delete this._parent[l], this.children(l).forEach(function(h) {
|
|
5725
|
-
|
|
5688
|
+
u.setParent(h);
|
|
5726
5689
|
}), delete this._children[l]), Object.keys(this._in[l]).forEach(f), delete this._in[l], delete this._preds[l], Object.keys(this._out[l]).forEach(f), delete this._out[l], delete this._sucs[l], --this._nodeCount;
|
|
5727
5690
|
}
|
|
5728
5691
|
return this;
|
|
@@ -5733,19 +5696,19 @@ function Qo() {
|
|
|
5733
5696
|
* invoking it in context of noncompound graph.
|
|
5734
5697
|
* Average-case complexity: O(1).
|
|
5735
5698
|
*/
|
|
5736
|
-
setParent(l,
|
|
5699
|
+
setParent(l, u) {
|
|
5737
5700
|
if (!this._isCompound)
|
|
5738
5701
|
throw new Error("Cannot set parent in a non-compound graph");
|
|
5739
|
-
if (
|
|
5740
|
-
|
|
5702
|
+
if (u === void 0)
|
|
5703
|
+
u = t;
|
|
5741
5704
|
else {
|
|
5742
|
-
|
|
5743
|
-
for (var f =
|
|
5705
|
+
u += "";
|
|
5706
|
+
for (var f = u; f !== void 0; f = this.parent(f))
|
|
5744
5707
|
if (f === l)
|
|
5745
|
-
throw new Error("Setting " +
|
|
5746
|
-
this.setNode(
|
|
5708
|
+
throw new Error("Setting " + u + " as parent of " + l + " would create a cycle");
|
|
5709
|
+
this.setNode(u);
|
|
5747
5710
|
}
|
|
5748
|
-
return this.setNode(l), this._removeFromParentsChildList(l), this._parent[l] =
|
|
5711
|
+
return this.setNode(l), this._removeFromParentsChildList(l), this._parent[l] = u, this._children[u][l] = !0, this;
|
|
5749
5712
|
}
|
|
5750
5713
|
_removeFromParentsChildList(l) {
|
|
5751
5714
|
delete this._children[this._parent[l]][l];
|
|
@@ -5756,9 +5719,9 @@ function Qo() {
|
|
|
5756
5719
|
*/
|
|
5757
5720
|
parent(l) {
|
|
5758
5721
|
if (this._isCompound) {
|
|
5759
|
-
var
|
|
5760
|
-
if (
|
|
5761
|
-
return
|
|
5722
|
+
var u = this._parent[l];
|
|
5723
|
+
if (u !== t)
|
|
5724
|
+
return u;
|
|
5762
5725
|
}
|
|
5763
5726
|
}
|
|
5764
5727
|
/**
|
|
@@ -5767,9 +5730,9 @@ function Qo() {
|
|
|
5767
5730
|
*/
|
|
5768
5731
|
children(l = t) {
|
|
5769
5732
|
if (this._isCompound) {
|
|
5770
|
-
var
|
|
5771
|
-
if (
|
|
5772
|
-
return Object.keys(
|
|
5733
|
+
var u = this._children[l];
|
|
5734
|
+
if (u)
|
|
5735
|
+
return Object.keys(u);
|
|
5773
5736
|
} else {
|
|
5774
5737
|
if (l === t)
|
|
5775
5738
|
return this.nodes();
|
|
@@ -5783,9 +5746,9 @@ function Qo() {
|
|
|
5783
5746
|
* Complexity: O(|V|).
|
|
5784
5747
|
*/
|
|
5785
5748
|
predecessors(l) {
|
|
5786
|
-
var
|
|
5787
|
-
if (
|
|
5788
|
-
return Object.keys(
|
|
5749
|
+
var u = this._preds[l];
|
|
5750
|
+
if (u)
|
|
5751
|
+
return Object.keys(u);
|
|
5789
5752
|
}
|
|
5790
5753
|
/**
|
|
5791
5754
|
* Return all nodes that are successors of the specified node or undefined if node v is not in
|
|
@@ -5793,9 +5756,9 @@ function Qo() {
|
|
|
5793
5756
|
* Complexity: O(|V|).
|
|
5794
5757
|
*/
|
|
5795
5758
|
successors(l) {
|
|
5796
|
-
var
|
|
5797
|
-
if (
|
|
5798
|
-
return Object.keys(
|
|
5759
|
+
var u = this._sucs[l];
|
|
5760
|
+
if (u)
|
|
5761
|
+
return Object.keys(u);
|
|
5799
5762
|
}
|
|
5800
5763
|
/**
|
|
5801
5764
|
* Return all nodes that are predecessors or successors of the specified node or undefined if
|
|
@@ -5803,17 +5766,17 @@ function Qo() {
|
|
|
5803
5766
|
* Complexity: O(|V|).
|
|
5804
5767
|
*/
|
|
5805
5768
|
neighbors(l) {
|
|
5806
|
-
var
|
|
5807
|
-
if (
|
|
5808
|
-
const h = new Set(
|
|
5769
|
+
var u = this.predecessors(l);
|
|
5770
|
+
if (u) {
|
|
5771
|
+
const h = new Set(u);
|
|
5809
5772
|
for (var f of this.successors(l))
|
|
5810
5773
|
h.add(f);
|
|
5811
5774
|
return Array.from(h.values());
|
|
5812
5775
|
}
|
|
5813
5776
|
}
|
|
5814
5777
|
isLeaf(l) {
|
|
5815
|
-
var
|
|
5816
|
-
return this.isDirected() ?
|
|
5778
|
+
var u;
|
|
5779
|
+
return this.isDirected() ? u = this.successors(l) : u = this.neighbors(l), u.length === 0;
|
|
5817
5780
|
}
|
|
5818
5781
|
/**
|
|
5819
5782
|
* Creates new graph with nodes filtered via filter. Edges incident to rejected node
|
|
@@ -5822,24 +5785,24 @@ function Qo() {
|
|
|
5822
5785
|
* Average-case complexity: O(|E|+|V|).
|
|
5823
5786
|
*/
|
|
5824
5787
|
filterNodes(l) {
|
|
5825
|
-
var
|
|
5788
|
+
var u = new this.constructor({
|
|
5826
5789
|
directed: this._isDirected,
|
|
5827
5790
|
multigraph: this._isMultigraph,
|
|
5828
5791
|
compound: this._isCompound
|
|
5829
5792
|
});
|
|
5830
|
-
|
|
5793
|
+
u.setGraph(this.graph());
|
|
5831
5794
|
var f = this;
|
|
5832
|
-
Object.entries(this._nodes).forEach(function([y,
|
|
5833
|
-
l(y) &&
|
|
5795
|
+
Object.entries(this._nodes).forEach(function([y, p]) {
|
|
5796
|
+
l(y) && u.setNode(y, p);
|
|
5834
5797
|
}), Object.values(this._edgeObjs).forEach(function(y) {
|
|
5835
|
-
|
|
5798
|
+
u.hasNode(y.v) && u.hasNode(y.w) && u.setEdge(y, f.edge(y));
|
|
5836
5799
|
});
|
|
5837
5800
|
var h = {};
|
|
5838
|
-
function
|
|
5839
|
-
var
|
|
5840
|
-
return
|
|
5801
|
+
function g(y) {
|
|
5802
|
+
var p = f.parent(y);
|
|
5803
|
+
return p === void 0 || u.hasNode(p) ? (h[y] = p, p) : p in h ? h[p] : g(p);
|
|
5841
5804
|
}
|
|
5842
|
-
return this._isCompound &&
|
|
5805
|
+
return this._isCompound && u.nodes().forEach((y) => u.setParent(y, g(y))), u;
|
|
5843
5806
|
}
|
|
5844
5807
|
/* === Edge functions ========== */
|
|
5845
5808
|
/**
|
|
@@ -5872,10 +5835,10 @@ function Qo() {
|
|
|
5872
5835
|
* of nodes with label provided or default label if no label provided.
|
|
5873
5836
|
* Complexity: O(|nodes|).
|
|
5874
5837
|
*/
|
|
5875
|
-
setPath(l,
|
|
5838
|
+
setPath(l, u) {
|
|
5876
5839
|
var f = this, h = arguments;
|
|
5877
|
-
return l.reduce(function(
|
|
5878
|
-
return h.length > 1 ? f.setEdge(
|
|
5840
|
+
return l.reduce(function(g, y) {
|
|
5841
|
+
return h.length > 1 ? f.setEdge(g, y, u) : f.setEdge(g, y), y;
|
|
5879
5842
|
}), this;
|
|
5880
5843
|
}
|
|
5881
5844
|
/**
|
|
@@ -5885,23 +5848,23 @@ function Qo() {
|
|
|
5885
5848
|
* be assigned. The name parameter is only useful with multigraphs.
|
|
5886
5849
|
*/
|
|
5887
5850
|
setEdge() {
|
|
5888
|
-
var l,
|
|
5889
|
-
typeof y == "object" && y !== null && "v" in y ? (l = y.v,
|
|
5890
|
-
var
|
|
5891
|
-
if (Object.hasOwn(this._edgeLabels,
|
|
5892
|
-
return
|
|
5851
|
+
var l, u, f, h, g = !1, y = arguments[0];
|
|
5852
|
+
typeof y == "object" && y !== null && "v" in y ? (l = y.v, u = y.w, f = y.name, arguments.length === 2 && (h = arguments[1], g = !0)) : (l = y, u = arguments[1], f = arguments[3], arguments.length > 2 && (h = arguments[2], g = !0)), l = "" + l, u = "" + u, f !== void 0 && (f = "" + f);
|
|
5853
|
+
var p = i(this._isDirected, l, u, f);
|
|
5854
|
+
if (Object.hasOwn(this._edgeLabels, p))
|
|
5855
|
+
return g && (this._edgeLabels[p] = h), this;
|
|
5893
5856
|
if (f !== void 0 && !this._isMultigraph)
|
|
5894
5857
|
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
5895
|
-
this.setNode(l), this.setNode(
|
|
5896
|
-
var m = a(this._isDirected, l,
|
|
5897
|
-
return l = m.v,
|
|
5858
|
+
this.setNode(l), this.setNode(u), this._edgeLabels[p] = g ? h : this._defaultEdgeLabelFn(l, u, f);
|
|
5859
|
+
var m = a(this._isDirected, l, u, f);
|
|
5860
|
+
return l = m.v, u = m.w, Object.freeze(m), this._edgeObjs[p] = m, o(this._preds[u], l), o(this._sucs[l], u), this._in[u][p] = m, this._out[l][p] = m, this._edgeCount++, this;
|
|
5898
5861
|
}
|
|
5899
5862
|
/**
|
|
5900
5863
|
* Gets the label for the specified edge.
|
|
5901
5864
|
* Complexity: O(1).
|
|
5902
5865
|
*/
|
|
5903
|
-
edge(l,
|
|
5904
|
-
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l,
|
|
5866
|
+
edge(l, u, f) {
|
|
5867
|
+
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f);
|
|
5905
5868
|
return this._edgeLabels[h];
|
|
5906
5869
|
}
|
|
5907
5870
|
/**
|
|
@@ -5916,28 +5879,28 @@ function Qo() {
|
|
|
5916
5879
|
* Detects whether the graph contains specified edge or not. No subgraphs are considered.
|
|
5917
5880
|
* Complexity: O(1).
|
|
5918
5881
|
*/
|
|
5919
|
-
hasEdge(l,
|
|
5920
|
-
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l,
|
|
5882
|
+
hasEdge(l, u, f) {
|
|
5883
|
+
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f);
|
|
5921
5884
|
return Object.hasOwn(this._edgeLabels, h);
|
|
5922
5885
|
}
|
|
5923
5886
|
/**
|
|
5924
5887
|
* Removes the specified edge from the graph. No subgraphs are considered.
|
|
5925
5888
|
* Complexity: O(1).
|
|
5926
5889
|
*/
|
|
5927
|
-
removeEdge(l,
|
|
5928
|
-
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l,
|
|
5929
|
-
return
|
|
5890
|
+
removeEdge(l, u, f) {
|
|
5891
|
+
var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f), g = this._edgeObjs[h];
|
|
5892
|
+
return g && (l = g.v, u = g.w, delete this._edgeLabels[h], delete this._edgeObjs[h], s(this._preds[u], l), s(this._sucs[l], u), delete this._in[u][h], delete this._out[l][h], this._edgeCount--), this;
|
|
5930
5893
|
}
|
|
5931
5894
|
/**
|
|
5932
5895
|
* Return all edges that point to the node v. Optionally filters those edges down to just those
|
|
5933
5896
|
* coming from node u. Behavior is undefined for undirected graphs - use nodeEdges instead.
|
|
5934
5897
|
* Complexity: O(|E|).
|
|
5935
5898
|
*/
|
|
5936
|
-
inEdges(l,
|
|
5899
|
+
inEdges(l, u) {
|
|
5937
5900
|
var f = this._in[l];
|
|
5938
5901
|
if (f) {
|
|
5939
5902
|
var h = Object.values(f);
|
|
5940
|
-
return
|
|
5903
|
+
return u ? h.filter((g) => g.v === u) : h;
|
|
5941
5904
|
}
|
|
5942
5905
|
}
|
|
5943
5906
|
/**
|
|
@@ -5945,11 +5908,11 @@ function Qo() {
|
|
|
5945
5908
|
* those point to w. Behavior is undefined for undirected graphs - use nodeEdges instead.
|
|
5946
5909
|
* Complexity: O(|E|).
|
|
5947
5910
|
*/
|
|
5948
|
-
outEdges(l,
|
|
5911
|
+
outEdges(l, u) {
|
|
5949
5912
|
var f = this._out[l];
|
|
5950
5913
|
if (f) {
|
|
5951
5914
|
var h = Object.values(f);
|
|
5952
|
-
return
|
|
5915
|
+
return u ? h.filter((g) => g.w === u) : h;
|
|
5953
5916
|
}
|
|
5954
5917
|
}
|
|
5955
5918
|
/**
|
|
@@ -5957,37 +5920,37 @@ function Qo() {
|
|
|
5957
5920
|
* down to just those between nodes v and w regardless of direction.
|
|
5958
5921
|
* Complexity: O(|E|).
|
|
5959
5922
|
*/
|
|
5960
|
-
nodeEdges(l,
|
|
5961
|
-
var f = this.inEdges(l,
|
|
5923
|
+
nodeEdges(l, u) {
|
|
5924
|
+
var f = this.inEdges(l, u);
|
|
5962
5925
|
if (f)
|
|
5963
|
-
return f.concat(this.outEdges(l,
|
|
5926
|
+
return f.concat(this.outEdges(l, u));
|
|
5964
5927
|
}
|
|
5965
5928
|
}
|
|
5966
|
-
function o(
|
|
5967
|
-
|
|
5929
|
+
function o(d, l) {
|
|
5930
|
+
d[l] ? d[l]++ : d[l] = 1;
|
|
5968
5931
|
}
|
|
5969
|
-
function s(
|
|
5970
|
-
--
|
|
5932
|
+
function s(d, l) {
|
|
5933
|
+
--d[l] || delete d[l];
|
|
5971
5934
|
}
|
|
5972
|
-
function i(
|
|
5973
|
-
var h = "" + l,
|
|
5974
|
-
if (!
|
|
5935
|
+
function i(d, l, u, f) {
|
|
5936
|
+
var h = "" + l, g = "" + u;
|
|
5937
|
+
if (!d && h > g) {
|
|
5975
5938
|
var y = h;
|
|
5976
|
-
h =
|
|
5939
|
+
h = g, g = y;
|
|
5977
5940
|
}
|
|
5978
|
-
return h + n +
|
|
5941
|
+
return h + n + g + n + (f === void 0 ? e : f);
|
|
5979
5942
|
}
|
|
5980
|
-
function a(
|
|
5981
|
-
var h = "" + l,
|
|
5982
|
-
if (!
|
|
5943
|
+
function a(d, l, u, f) {
|
|
5944
|
+
var h = "" + l, g = "" + u;
|
|
5945
|
+
if (!d && h > g) {
|
|
5983
5946
|
var y = h;
|
|
5984
|
-
h =
|
|
5947
|
+
h = g, g = y;
|
|
5985
5948
|
}
|
|
5986
|
-
var
|
|
5987
|
-
return f && (
|
|
5949
|
+
var p = { v: h, w: g };
|
|
5950
|
+
return f && (p.name = f), p;
|
|
5988
5951
|
}
|
|
5989
|
-
function c(
|
|
5990
|
-
return i(
|
|
5952
|
+
function c(d, l) {
|
|
5953
|
+
return i(d, l.v, l.w, l.name);
|
|
5991
5954
|
}
|
|
5992
5955
|
return mr = r, mr;
|
|
5993
5956
|
}
|
|
@@ -6025,8 +5988,8 @@ function Wm() {
|
|
|
6025
5988
|
}
|
|
6026
5989
|
function n(s) {
|
|
6027
5990
|
return s.nodes().map(function(i) {
|
|
6028
|
-
var a = s.node(i), c = s.parent(i),
|
|
6029
|
-
return a !== void 0 && (
|
|
5991
|
+
var a = s.node(i), c = s.parent(i), d = { v: i };
|
|
5992
|
+
return a !== void 0 && (d.value = a), c !== void 0 && (d.parent = c), d;
|
|
6030
5993
|
});
|
|
6031
5994
|
}
|
|
6032
5995
|
function r(s) {
|
|
@@ -6177,16 +6140,16 @@ function ql() {
|
|
|
6177
6140
|
);
|
|
6178
6141
|
}
|
|
6179
6142
|
function r(o, s, i, a) {
|
|
6180
|
-
var c = {},
|
|
6181
|
-
var
|
|
6182
|
-
if (
|
|
6183
|
-
throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + h + " Weight: " +
|
|
6184
|
-
m < y.distance && (y.distance = m, y.predecessor = l,
|
|
6143
|
+
var c = {}, d = new e(), l, u, f = function(h) {
|
|
6144
|
+
var g = h.v !== l ? h.v : h.w, y = c[g], p = i(h), m = u.distance + p;
|
|
6145
|
+
if (p < 0)
|
|
6146
|
+
throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + h + " Weight: " + p);
|
|
6147
|
+
m < y.distance && (y.distance = m, y.predecessor = l, d.decrease(g, m));
|
|
6185
6148
|
};
|
|
6186
6149
|
for (o.nodes().forEach(function(h) {
|
|
6187
|
-
var
|
|
6188
|
-
c[h] = { distance:
|
|
6189
|
-
});
|
|
6150
|
+
var g = h === s ? 0 : Number.POSITIVE_INFINITY;
|
|
6151
|
+
c[h] = { distance: g }, d.add(h, g);
|
|
6152
|
+
}); d.size() > 0 && (l = d.removeMin(), u = c[l], u.distance !== Number.POSITIVE_INFINITY); )
|
|
6190
6153
|
a(l).forEach(f);
|
|
6191
6154
|
return c;
|
|
6192
6155
|
}
|
|
@@ -6217,14 +6180,14 @@ function Gl() {
|
|
|
6217
6180
|
lowlink: n,
|
|
6218
6181
|
index: n++
|
|
6219
6182
|
};
|
|
6220
|
-
if (r.push(a), t.successors(a).forEach(function(
|
|
6221
|
-
Object.hasOwn(o,
|
|
6183
|
+
if (r.push(a), t.successors(a).forEach(function(u) {
|
|
6184
|
+
Object.hasOwn(o, u) ? o[u].onStack && (c.lowlink = Math.min(c.lowlink, o[u].index)) : (i(u), c.lowlink = Math.min(c.lowlink, o[u].lowlink));
|
|
6222
6185
|
}), c.lowlink === c.index) {
|
|
6223
|
-
var
|
|
6186
|
+
var d = [], l;
|
|
6224
6187
|
do
|
|
6225
|
-
l = r.pop(), o[l].onStack = !1,
|
|
6188
|
+
l = r.pop(), o[l].onStack = !1, d.push(l);
|
|
6226
6189
|
while (a !== l);
|
|
6227
|
-
s.push(
|
|
6190
|
+
s.push(d);
|
|
6228
6191
|
}
|
|
6229
6192
|
}
|
|
6230
6193
|
return t.nodes().forEach(function(a) {
|
|
@@ -6263,19 +6226,19 @@ function Km() {
|
|
|
6263
6226
|
function n(r, o, s) {
|
|
6264
6227
|
var i = {}, a = r.nodes();
|
|
6265
6228
|
return a.forEach(function(c) {
|
|
6266
|
-
i[c] = {}, i[c][c] = { distance: 0 }, a.forEach(function(
|
|
6267
|
-
c !==
|
|
6268
|
-
}), s(c).forEach(function(
|
|
6269
|
-
var l =
|
|
6270
|
-
i[c][l] = { distance:
|
|
6229
|
+
i[c] = {}, i[c][c] = { distance: 0 }, a.forEach(function(d) {
|
|
6230
|
+
c !== d && (i[c][d] = { distance: Number.POSITIVE_INFINITY });
|
|
6231
|
+
}), s(c).forEach(function(d) {
|
|
6232
|
+
var l = d.v === c ? d.w : d.v, u = o(d);
|
|
6233
|
+
i[c][l] = { distance: u, predecessor: c };
|
|
6271
6234
|
});
|
|
6272
6235
|
}), a.forEach(function(c) {
|
|
6273
|
-
var
|
|
6236
|
+
var d = i[c];
|
|
6274
6237
|
a.forEach(function(l) {
|
|
6275
|
-
var
|
|
6238
|
+
var u = i[l];
|
|
6276
6239
|
a.forEach(function(f) {
|
|
6277
|
-
var h =
|
|
6278
|
-
|
|
6240
|
+
var h = u[c], g = d[f], y = u[f], p = h.distance + g.distance;
|
|
6241
|
+
p < y.distance && (y.distance = p, y.predecessor = g.predecessor);
|
|
6279
6242
|
});
|
|
6280
6243
|
});
|
|
6281
6244
|
}), i;
|
|
@@ -6328,23 +6291,23 @@ function jl() {
|
|
|
6328
6291
|
bs = 1, Lr = e;
|
|
6329
6292
|
function e(o, s, i) {
|
|
6330
6293
|
Array.isArray(s) || (s = [s]);
|
|
6331
|
-
var a = o.isDirected() ? (
|
|
6332
|
-
return s.forEach((
|
|
6333
|
-
if (!o.hasNode(
|
|
6334
|
-
throw new Error("Graph does not have node: " +
|
|
6335
|
-
c(
|
|
6336
|
-
}),
|
|
6294
|
+
var a = o.isDirected() ? (u) => o.successors(u) : (u) => o.neighbors(u), c = i === "post" ? t : n, d = [], l = {};
|
|
6295
|
+
return s.forEach((u) => {
|
|
6296
|
+
if (!o.hasNode(u))
|
|
6297
|
+
throw new Error("Graph does not have node: " + u);
|
|
6298
|
+
c(u, a, l, d);
|
|
6299
|
+
}), d;
|
|
6337
6300
|
}
|
|
6338
6301
|
function t(o, s, i, a) {
|
|
6339
6302
|
for (var c = [[o, !1]]; c.length > 0; ) {
|
|
6340
|
-
var
|
|
6341
|
-
|
|
6303
|
+
var d = c.pop();
|
|
6304
|
+
d[1] ? a.push(d[0]) : Object.hasOwn(i, d[0]) || (i[d[0]] = !0, c.push([d[0], !0]), r(s(d[0]), (l) => c.push([l, !1])));
|
|
6342
6305
|
}
|
|
6343
6306
|
}
|
|
6344
6307
|
function n(o, s, i, a) {
|
|
6345
6308
|
for (var c = [o]; c.length > 0; ) {
|
|
6346
|
-
var
|
|
6347
|
-
Object.hasOwn(i,
|
|
6309
|
+
var d = c.pop();
|
|
6310
|
+
Object.hasOwn(i, d) || (i[d] = !0, a.push(d), r(s(d), (l) => c.push(l)));
|
|
6348
6311
|
}
|
|
6349
6312
|
}
|
|
6350
6313
|
function r(o, s) {
|
|
@@ -6384,17 +6347,17 @@ function t0() {
|
|
|
6384
6347
|
Ar = n;
|
|
6385
6348
|
function n(r, o) {
|
|
6386
6349
|
var s = new e(), i = {}, a = new t(), c;
|
|
6387
|
-
function u
|
|
6388
|
-
var f =
|
|
6350
|
+
function d(u) {
|
|
6351
|
+
var f = u.v === c ? u.w : u.v, h = a.priority(f);
|
|
6389
6352
|
if (h !== void 0) {
|
|
6390
|
-
var
|
|
6391
|
-
|
|
6353
|
+
var g = o(u);
|
|
6354
|
+
g < h && (i[f] = c, a.decrease(f, g));
|
|
6392
6355
|
}
|
|
6393
6356
|
}
|
|
6394
6357
|
if (r.nodeCount() === 0)
|
|
6395
6358
|
return s;
|
|
6396
|
-
r.nodes().forEach(function(
|
|
6397
|
-
a.add(
|
|
6359
|
+
r.nodes().forEach(function(u) {
|
|
6360
|
+
a.add(u, Number.POSITIVE_INFINITY), s.setNode(u);
|
|
6398
6361
|
}), a.decrease(r.nodes()[0], 0);
|
|
6399
6362
|
for (var l = !1; a.size() > 0; ) {
|
|
6400
6363
|
if (c = a.removeMin(), Object.hasOwn(i, c))
|
|
@@ -6404,7 +6367,7 @@ function t0() {
|
|
|
6404
6367
|
throw new Error("Input graph is not connected: " + r);
|
|
6405
6368
|
l = !0;
|
|
6406
6369
|
}
|
|
6407
|
-
r.nodeEdges(c).forEach(
|
|
6370
|
+
r.nodeEdges(c).forEach(d);
|
|
6408
6371
|
}
|
|
6409
6372
|
return s;
|
|
6410
6373
|
}
|
|
@@ -6479,59 +6442,59 @@ function o0() {
|
|
|
6479
6442
|
let e = Oe().Graph, t = r0();
|
|
6480
6443
|
Pr = r;
|
|
6481
6444
|
let n = () => 1;
|
|
6482
|
-
function r(
|
|
6483
|
-
if (
|
|
6445
|
+
function r(d, l) {
|
|
6446
|
+
if (d.nodeCount() <= 1)
|
|
6484
6447
|
return [];
|
|
6485
|
-
let
|
|
6486
|
-
return o(
|
|
6487
|
-
}
|
|
6488
|
-
function o(
|
|
6489
|
-
let f = [], h = l[l.length - 1],
|
|
6490
|
-
for (;
|
|
6491
|
-
for (; y =
|
|
6492
|
-
s(
|
|
6448
|
+
let u = i(d, l || n);
|
|
6449
|
+
return o(u.graph, u.buckets, u.zeroIdx).flatMap((h) => d.outEdges(h.v, h.w));
|
|
6450
|
+
}
|
|
6451
|
+
function o(d, l, u) {
|
|
6452
|
+
let f = [], h = l[l.length - 1], g = l[0], y;
|
|
6453
|
+
for (; d.nodeCount(); ) {
|
|
6454
|
+
for (; y = g.dequeue(); )
|
|
6455
|
+
s(d, l, u, y);
|
|
6493
6456
|
for (; y = h.dequeue(); )
|
|
6494
|
-
s(
|
|
6495
|
-
if (
|
|
6496
|
-
for (let
|
|
6497
|
-
if (y = l[
|
|
6498
|
-
f = f.concat(s(
|
|
6457
|
+
s(d, l, u, y);
|
|
6458
|
+
if (d.nodeCount()) {
|
|
6459
|
+
for (let p = l.length - 2; p > 0; --p)
|
|
6460
|
+
if (y = l[p].dequeue(), y) {
|
|
6461
|
+
f = f.concat(s(d, l, u, y, !0));
|
|
6499
6462
|
break;
|
|
6500
6463
|
}
|
|
6501
6464
|
}
|
|
6502
6465
|
}
|
|
6503
6466
|
return f;
|
|
6504
6467
|
}
|
|
6505
|
-
function s(
|
|
6506
|
-
let
|
|
6507
|
-
return
|
|
6508
|
-
let
|
|
6509
|
-
h &&
|
|
6510
|
-
}),
|
|
6511
|
-
let
|
|
6512
|
-
w.in -=
|
|
6513
|
-
}),
|
|
6514
|
-
}
|
|
6515
|
-
function i(
|
|
6516
|
-
let
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
}),
|
|
6520
|
-
let m =
|
|
6521
|
-
|
|
6468
|
+
function s(d, l, u, f, h) {
|
|
6469
|
+
let g = h ? [] : void 0;
|
|
6470
|
+
return d.inEdges(f.v).forEach((y) => {
|
|
6471
|
+
let p = d.edge(y), m = d.node(y.v);
|
|
6472
|
+
h && g.push({ v: y.v, w: y.w }), m.out -= p, a(l, u, m);
|
|
6473
|
+
}), d.outEdges(f.v).forEach((y) => {
|
|
6474
|
+
let p = d.edge(y), m = y.w, w = d.node(m);
|
|
6475
|
+
w.in -= p, a(l, u, w);
|
|
6476
|
+
}), d.removeNode(f.v), g;
|
|
6477
|
+
}
|
|
6478
|
+
function i(d, l) {
|
|
6479
|
+
let u = new e(), f = 0, h = 0;
|
|
6480
|
+
d.nodes().forEach((p) => {
|
|
6481
|
+
u.setNode(p, { v: p, in: 0, out: 0 });
|
|
6482
|
+
}), d.edges().forEach((p) => {
|
|
6483
|
+
let m = u.edge(p.v, p.w) || 0, w = l(p), x = m + w;
|
|
6484
|
+
u.setEdge(p.v, p.w, x), h = Math.max(h, u.node(p.v).out += w), f = Math.max(f, u.node(p.w).in += w);
|
|
6522
6485
|
});
|
|
6523
|
-
let
|
|
6524
|
-
return
|
|
6525
|
-
a(
|
|
6526
|
-
}), { graph:
|
|
6486
|
+
let g = c(h + f + 3).map(() => new t()), y = f + 1;
|
|
6487
|
+
return u.nodes().forEach((p) => {
|
|
6488
|
+
a(g, y, u.node(p));
|
|
6489
|
+
}), { graph: u, buckets: g, zeroIdx: y };
|
|
6527
6490
|
}
|
|
6528
|
-
function a(
|
|
6529
|
-
|
|
6491
|
+
function a(d, l, u) {
|
|
6492
|
+
u.out ? u.in ? d[u.out - u.in + l].enqueue(u) : d[d.length - 1].enqueue(u) : d[0].enqueue(u);
|
|
6530
6493
|
}
|
|
6531
|
-
function c(
|
|
6494
|
+
function c(d) {
|
|
6532
6495
|
const l = [];
|
|
6533
|
-
for (let
|
|
6534
|
-
l.push(
|
|
6496
|
+
for (let u = 0; u < d; u++)
|
|
6497
|
+
l.push(u);
|
|
6535
6498
|
return l;
|
|
6536
6499
|
}
|
|
6537
6500
|
return Pr;
|
|
@@ -6549,17 +6512,17 @@ function fe() {
|
|
|
6549
6512
|
buildLayerMatrix: a,
|
|
6550
6513
|
intersectRect: i,
|
|
6551
6514
|
mapValues: S,
|
|
6552
|
-
maxRank:
|
|
6515
|
+
maxRank: g,
|
|
6553
6516
|
normalizeRanks: c,
|
|
6554
6517
|
notime: m,
|
|
6555
6518
|
partition: y,
|
|
6556
6519
|
pick: C,
|
|
6557
6520
|
predecessorWeights: s,
|
|
6558
6521
|
range: b,
|
|
6559
|
-
removeEmptyRanks:
|
|
6522
|
+
removeEmptyRanks: d,
|
|
6560
6523
|
simplify: n,
|
|
6561
6524
|
successorWeights: o,
|
|
6562
|
-
time:
|
|
6525
|
+
time: p,
|
|
6563
6526
|
uniqueId: x,
|
|
6564
6527
|
zipObject: D
|
|
6565
6528
|
};
|
|
@@ -6612,7 +6575,7 @@ function fe() {
|
|
|
6612
6575
|
return Math.abs(F) * v > Math.abs(O) * A ? (F < 0 && (A = -A), L = A * O / F, z = A) : (O < 0 && (v = -v), L = v, z = v * F / O), { x: N + L, y: M + z };
|
|
6613
6576
|
}
|
|
6614
6577
|
function a(E) {
|
|
6615
|
-
let _ = b(
|
|
6578
|
+
let _ = b(g(E) + 1).map(() => []);
|
|
6616
6579
|
return E.nodes().forEach((N) => {
|
|
6617
6580
|
let M = E.node(N), O = M.rank;
|
|
6618
6581
|
O !== void 0 && (_[O][M.order] = N);
|
|
@@ -6628,7 +6591,7 @@ function fe() {
|
|
|
6628
6591
|
Object.hasOwn(O, "rank") && (O.rank -= N);
|
|
6629
6592
|
});
|
|
6630
6593
|
}
|
|
6631
|
-
function
|
|
6594
|
+
function d(E) {
|
|
6632
6595
|
let _ = E.nodes().map((v) => E.node(v).rank), N = h(Math.min, _), M = [];
|
|
6633
6596
|
E.nodes().forEach((v) => {
|
|
6634
6597
|
let A = E.node(v).rank - N;
|
|
@@ -6646,7 +6609,7 @@ function fe() {
|
|
|
6646
6609
|
};
|
|
6647
6610
|
return arguments.length >= 4 && (O.rank = N, O.order = M), t(E, "border", O, _);
|
|
6648
6611
|
}
|
|
6649
|
-
function
|
|
6612
|
+
function u(E, _ = f) {
|
|
6650
6613
|
const N = [];
|
|
6651
6614
|
for (let M = 0; M < E.length; M += _) {
|
|
6652
6615
|
const O = E.slice(M, M + _);
|
|
@@ -6657,12 +6620,12 @@ function fe() {
|
|
|
6657
6620
|
const f = 65535;
|
|
6658
6621
|
function h(E, _) {
|
|
6659
6622
|
if (_.length > f) {
|
|
6660
|
-
const N =
|
|
6623
|
+
const N = u(_);
|
|
6661
6624
|
return E.apply(null, N.map((M) => E.apply(null, M)));
|
|
6662
6625
|
} else
|
|
6663
6626
|
return E.apply(null, _);
|
|
6664
6627
|
}
|
|
6665
|
-
function
|
|
6628
|
+
function g(E) {
|
|
6666
6629
|
const N = E.nodes().map((M) => {
|
|
6667
6630
|
let O = E.node(M).rank;
|
|
6668
6631
|
return O === void 0 ? Number.MIN_VALUE : O;
|
|
@@ -6675,7 +6638,7 @@ function fe() {
|
|
|
6675
6638
|
_(M) ? N.lhs.push(M) : N.rhs.push(M);
|
|
6676
6639
|
}), N;
|
|
6677
6640
|
}
|
|
6678
|
-
function
|
|
6641
|
+
function p(E, _) {
|
|
6679
6642
|
let N = Date.now();
|
|
6680
6643
|
try {
|
|
6681
6644
|
return _();
|
|
@@ -6726,21 +6689,21 @@ function i0() {
|
|
|
6726
6689
|
};
|
|
6727
6690
|
function n(s) {
|
|
6728
6691
|
(s.graph().acyclicer === "greedy" ? e(s, a(s)) : r(s)).forEach((c) => {
|
|
6729
|
-
let
|
|
6730
|
-
s.removeEdge(c),
|
|
6692
|
+
let d = s.edge(c);
|
|
6693
|
+
s.removeEdge(c), d.forwardName = c.name, d.reversed = !0, s.setEdge(c.w, c.v, d, t("rev"));
|
|
6731
6694
|
});
|
|
6732
6695
|
function a(c) {
|
|
6733
|
-
return (
|
|
6696
|
+
return (d) => c.edge(d).weight;
|
|
6734
6697
|
}
|
|
6735
6698
|
}
|
|
6736
6699
|
function r(s) {
|
|
6737
6700
|
let i = [], a = {}, c = {};
|
|
6738
|
-
function
|
|
6739
|
-
Object.hasOwn(c, l) || (c[l] = !0, a[l] = !0, s.outEdges(l).forEach((
|
|
6740
|
-
Object.hasOwn(a,
|
|
6701
|
+
function d(l) {
|
|
6702
|
+
Object.hasOwn(c, l) || (c[l] = !0, a[l] = !0, s.outEdges(l).forEach((u) => {
|
|
6703
|
+
Object.hasOwn(a, u.w) ? i.push(u) : d(u.w);
|
|
6741
6704
|
}), delete a[l]);
|
|
6742
6705
|
}
|
|
6743
|
-
return s.nodes().forEach(
|
|
6706
|
+
return s.nodes().forEach(d), i;
|
|
6744
6707
|
}
|
|
6745
6708
|
function o(s) {
|
|
6746
6709
|
s.edges().forEach((i) => {
|
|
@@ -6767,19 +6730,19 @@ function s0() {
|
|
|
6767
6730
|
o.graph().dummyChains = [], o.edges().forEach((s) => n(o, s));
|
|
6768
6731
|
}
|
|
6769
6732
|
function n(o, s) {
|
|
6770
|
-
let i = s.v, a = o.node(i).rank, c = s.w,
|
|
6771
|
-
if (
|
|
6733
|
+
let i = s.v, a = o.node(i).rank, c = s.w, d = o.node(c).rank, l = s.name, u = o.edge(s), f = u.labelRank;
|
|
6734
|
+
if (d === a + 1) return;
|
|
6772
6735
|
o.removeEdge(s);
|
|
6773
|
-
let h,
|
|
6774
|
-
for (y = 0, ++a; a <
|
|
6775
|
-
|
|
6736
|
+
let h, g, y;
|
|
6737
|
+
for (y = 0, ++a; a < d; ++y, ++a)
|
|
6738
|
+
u.points = [], g = {
|
|
6776
6739
|
width: 0,
|
|
6777
6740
|
height: 0,
|
|
6778
|
-
edgeLabel:
|
|
6741
|
+
edgeLabel: u,
|
|
6779
6742
|
edgeObj: s,
|
|
6780
6743
|
rank: a
|
|
6781
|
-
}, h = e.addDummyNode(o, "edge",
|
|
6782
|
-
o.setEdge(i, c, { weight:
|
|
6744
|
+
}, h = e.addDummyNode(o, "edge", g, "_d"), a === f && (g.width = u.width, g.height = u.height, g.dummy = "edge-label", g.labelpos = u.labelpos), o.setEdge(i, h, { weight: u.weight }, l), y === 0 && o.graph().dummyChains.push(h), i = h;
|
|
6745
|
+
o.setEdge(i, c, { weight: u.weight }, l);
|
|
6783
6746
|
}
|
|
6784
6747
|
function r(o) {
|
|
6785
6748
|
o.graph().dummyChains.forEach((s) => {
|
|
@@ -6807,8 +6770,8 @@ function $n() {
|
|
|
6807
6770
|
return a.rank;
|
|
6808
6771
|
o[i] = !0;
|
|
6809
6772
|
let c = r.outEdges(i).map((l) => l == null ? Number.POSITIVE_INFINITY : s(l.w) - r.edge(l).minlen);
|
|
6810
|
-
var
|
|
6811
|
-
return
|
|
6773
|
+
var d = e(Math.min, c);
|
|
6774
|
+
return d === Number.POSITIVE_INFINITY && (d = 0), a.rank = d;
|
|
6812
6775
|
}
|
|
6813
6776
|
r.sources().forEach(s);
|
|
6814
6777
|
}
|
|
@@ -6824,29 +6787,29 @@ function Wl() {
|
|
|
6824
6787
|
var e = Oe().Graph, t = $n().slack;
|
|
6825
6788
|
Hr = n;
|
|
6826
6789
|
function n(i) {
|
|
6827
|
-
var a = new e({ directed: !1 }), c = i.nodes()[0],
|
|
6790
|
+
var a = new e({ directed: !1 }), c = i.nodes()[0], d = i.nodeCount();
|
|
6828
6791
|
a.setNode(c, {});
|
|
6829
|
-
for (var l,
|
|
6830
|
-
l = o(a, i),
|
|
6792
|
+
for (var l, u; r(a, i) < d; )
|
|
6793
|
+
l = o(a, i), u = a.hasNode(l.v) ? t(i, l) : -t(i, l), s(a, i, u);
|
|
6831
6794
|
return a;
|
|
6832
6795
|
}
|
|
6833
6796
|
function r(i, a) {
|
|
6834
|
-
function c(
|
|
6835
|
-
a.nodeEdges(
|
|
6836
|
-
var
|
|
6837
|
-
!i.hasNode(f) && !t(a, l) && (i.setNode(f, {}), i.setEdge(
|
|
6797
|
+
function c(d) {
|
|
6798
|
+
a.nodeEdges(d).forEach((l) => {
|
|
6799
|
+
var u = l.v, f = d === u ? l.w : u;
|
|
6800
|
+
!i.hasNode(f) && !t(a, l) && (i.setNode(f, {}), i.setEdge(d, f, {}), c(f));
|
|
6838
6801
|
});
|
|
6839
6802
|
}
|
|
6840
6803
|
return i.nodes().forEach(c), i.nodeCount();
|
|
6841
6804
|
}
|
|
6842
6805
|
function o(i, a) {
|
|
6843
|
-
return a.edges().reduce((
|
|
6844
|
-
let
|
|
6845
|
-
return i.hasNode(l.v) !== i.hasNode(l.w) && (
|
|
6806
|
+
return a.edges().reduce((d, l) => {
|
|
6807
|
+
let u = Number.POSITIVE_INFINITY;
|
|
6808
|
+
return i.hasNode(l.v) !== i.hasNode(l.w) && (u = t(a, l)), u < d[0] ? [u, l] : d;
|
|
6846
6809
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
6847
6810
|
}
|
|
6848
6811
|
function s(i, a, c) {
|
|
6849
|
-
i.nodes().forEach((
|
|
6812
|
+
i.nodes().forEach((d) => a.node(d).rank += c);
|
|
6850
6813
|
}
|
|
6851
6814
|
return Hr;
|
|
6852
6815
|
}
|
|
@@ -6855,13 +6818,13 @@ function a0() {
|
|
|
6855
6818
|
if (Ts) return Br;
|
|
6856
6819
|
Ts = 1;
|
|
6857
6820
|
var e = Wl(), t = $n().slack, n = $n().longestPath, r = Oe().alg.preorder, o = Oe().alg.postorder, s = fe().simplify;
|
|
6858
|
-
Br = i, i.initLowLimValues = l, i.initCutValues = a, i.calcCutValue =
|
|
6821
|
+
Br = i, i.initLowLimValues = l, i.initCutValues = a, i.calcCutValue = d, i.leaveEdge = f, i.enterEdge = h, i.exchangeEdges = g;
|
|
6859
6822
|
function i(w) {
|
|
6860
6823
|
w = s(w), n(w);
|
|
6861
6824
|
var x = e(w);
|
|
6862
6825
|
l(x), a(x, w);
|
|
6863
6826
|
for (var b, C; b = f(x); )
|
|
6864
|
-
C = h(x, w, b),
|
|
6827
|
+
C = h(x, w, b), g(x, w, b, C);
|
|
6865
6828
|
}
|
|
6866
6829
|
function a(w, x) {
|
|
6867
6830
|
var b = o(w, w.nodes());
|
|
@@ -6869,15 +6832,15 @@ function a0() {
|
|
|
6869
6832
|
}
|
|
6870
6833
|
function c(w, x, b) {
|
|
6871
6834
|
var C = w.node(b), S = C.parent;
|
|
6872
|
-
w.edge(b, S).cutvalue =
|
|
6835
|
+
w.edge(b, S).cutvalue = d(w, x, b);
|
|
6873
6836
|
}
|
|
6874
|
-
function
|
|
6837
|
+
function d(w, x, b) {
|
|
6875
6838
|
var C = w.node(b), S = C.parent, D = !0, E = x.edge(b, S), _ = 0;
|
|
6876
6839
|
return E || (D = !1, E = x.edge(S, b)), _ = E.weight, x.nodeEdges(b).forEach((N) => {
|
|
6877
6840
|
var M = N.v === b, O = M ? N.w : N.v;
|
|
6878
6841
|
if (O !== S) {
|
|
6879
6842
|
var F = M === D, v = x.edge(N).weight;
|
|
6880
|
-
if (_ += F ? v : -v,
|
|
6843
|
+
if (_ += F ? v : -v, p(w, b, O)) {
|
|
6881
6844
|
var A = w.edge(b, O).cutvalue;
|
|
6882
6845
|
_ += F ? -A : A;
|
|
6883
6846
|
}
|
|
@@ -6885,12 +6848,12 @@ function a0() {
|
|
|
6885
6848
|
}), _;
|
|
6886
6849
|
}
|
|
6887
6850
|
function l(w, x) {
|
|
6888
|
-
arguments.length < 2 && (x = w.nodes()[0]),
|
|
6851
|
+
arguments.length < 2 && (x = w.nodes()[0]), u(w, {}, 1, x);
|
|
6889
6852
|
}
|
|
6890
|
-
function
|
|
6853
|
+
function u(w, x, b, C, S) {
|
|
6891
6854
|
var D = b, E = w.node(C);
|
|
6892
6855
|
return x[C] = !0, w.neighbors(C).forEach((_) => {
|
|
6893
|
-
Object.hasOwn(x, _) || (b =
|
|
6856
|
+
Object.hasOwn(x, _) || (b = u(w, x, b, _, C));
|
|
6894
6857
|
}), E.low = D, E.lim = b++, S ? E.parent = S : delete E.parent, b;
|
|
6895
6858
|
}
|
|
6896
6859
|
function f(w) {
|
|
@@ -6904,7 +6867,7 @@ function a0() {
|
|
|
6904
6867
|
var M = x.edges().filter((O) => N === m(w, w.node(O.v), _) && N !== m(w, w.node(O.w), _));
|
|
6905
6868
|
return M.reduce((O, F) => t(x, F) < t(x, O) ? F : O);
|
|
6906
6869
|
}
|
|
6907
|
-
function
|
|
6870
|
+
function g(w, x, b, C) {
|
|
6908
6871
|
var S = b.v, D = b.w;
|
|
6909
6872
|
w.removeEdge(S, D), w.setEdge(C.v, C.w, {}), l(w), a(w, x), y(w, x);
|
|
6910
6873
|
}
|
|
@@ -6915,7 +6878,7 @@ function a0() {
|
|
|
6915
6878
|
E || (E = x.edge(D, S), _ = !0), x.node(S).rank = x.node(D).rank + (_ ? E.minlen : -E.minlen);
|
|
6916
6879
|
});
|
|
6917
6880
|
}
|
|
6918
|
-
function
|
|
6881
|
+
function p(w, x, b) {
|
|
6919
6882
|
return w.hasEdge(x, b);
|
|
6920
6883
|
}
|
|
6921
6884
|
function m(w, x, b) {
|
|
@@ -6930,9 +6893,9 @@ function l0() {
|
|
|
6930
6893
|
var e = $n(), t = e.longestPath, n = Wl(), r = a0();
|
|
6931
6894
|
qr = o;
|
|
6932
6895
|
function o(c) {
|
|
6933
|
-
var
|
|
6934
|
-
if (
|
|
6935
|
-
return
|
|
6896
|
+
var d = c.graph().ranker;
|
|
6897
|
+
if (d instanceof Function)
|
|
6898
|
+
return d(c);
|
|
6936
6899
|
switch (c.graph().ranker) {
|
|
6937
6900
|
case "network-simplex":
|
|
6938
6901
|
a(c);
|
|
@@ -6965,30 +6928,30 @@ function c0() {
|
|
|
6965
6928
|
function e(r) {
|
|
6966
6929
|
let o = n(r);
|
|
6967
6930
|
r.graph().dummyChains.forEach((s) => {
|
|
6968
|
-
let i = r.node(s), a = i.edgeObj, c = t(r, o, a.v, a.w),
|
|
6931
|
+
let i = r.node(s), a = i.edgeObj, c = t(r, o, a.v, a.w), d = c.path, l = c.lca, u = 0, f = d[u], h = !0;
|
|
6969
6932
|
for (; s !== a.w; ) {
|
|
6970
6933
|
if (i = r.node(s), h) {
|
|
6971
|
-
for (; (f = u
|
|
6972
|
-
|
|
6934
|
+
for (; (f = d[u]) !== l && r.node(f).maxRank < i.rank; )
|
|
6935
|
+
u++;
|
|
6973
6936
|
f === l && (h = !1);
|
|
6974
6937
|
}
|
|
6975
6938
|
if (!h) {
|
|
6976
|
-
for (;
|
|
6977
|
-
|
|
6978
|
-
f = u
|
|
6939
|
+
for (; u < d.length - 1 && r.node(f = d[u + 1]).minRank <= i.rank; )
|
|
6940
|
+
u++;
|
|
6941
|
+
f = d[u];
|
|
6979
6942
|
}
|
|
6980
6943
|
r.setParent(s, f), s = r.successors(s)[0];
|
|
6981
6944
|
}
|
|
6982
6945
|
});
|
|
6983
6946
|
}
|
|
6984
6947
|
function t(r, o, s, i) {
|
|
6985
|
-
let a = [], c = [],
|
|
6986
|
-
|
|
6948
|
+
let a = [], c = [], d = Math.min(o[s].low, o[i].low), l = Math.max(o[s].lim, o[i].lim), u, f;
|
|
6949
|
+
u = s;
|
|
6987
6950
|
do
|
|
6988
|
-
|
|
6989
|
-
while (
|
|
6990
|
-
for (f =
|
|
6991
|
-
c.push(
|
|
6951
|
+
u = r.parent(u), a.push(u);
|
|
6952
|
+
while (u && (o[u].low > d || l > o[u].lim));
|
|
6953
|
+
for (f = u, u = i; (u = r.parent(u)) !== f; )
|
|
6954
|
+
c.push(u);
|
|
6992
6955
|
return { path: a.concat(c.reverse()), lca: f };
|
|
6993
6956
|
}
|
|
6994
6957
|
function n(r) {
|
|
@@ -7011,22 +6974,22 @@ function u0() {
|
|
|
7011
6974
|
cleanup: s
|
|
7012
6975
|
};
|
|
7013
6976
|
function t(i) {
|
|
7014
|
-
let a = e.addDummyNode(i, "root", {}, "_root"), c = r(i),
|
|
7015
|
-
i.graph().nestingRoot = a, i.edges().forEach((h) => i.edge(h).minlen *=
|
|
6977
|
+
let a = e.addDummyNode(i, "root", {}, "_root"), c = r(i), d = Object.values(c), l = e.applyWithChunking(Math.max, d) - 1, u = 2 * l + 1;
|
|
6978
|
+
i.graph().nestingRoot = a, i.edges().forEach((h) => i.edge(h).minlen *= u);
|
|
7016
6979
|
let f = o(i) + 1;
|
|
7017
|
-
i.children().forEach((h) => n(i, a,
|
|
6980
|
+
i.children().forEach((h) => n(i, a, u, f, l, c, h)), i.graph().nodeRankFactor = u;
|
|
7018
6981
|
}
|
|
7019
|
-
function n(i, a, c,
|
|
6982
|
+
function n(i, a, c, d, l, u, f) {
|
|
7020
6983
|
let h = i.children(f);
|
|
7021
6984
|
if (!h.length) {
|
|
7022
6985
|
f !== a && i.setEdge(a, f, { weight: 0, minlen: c });
|
|
7023
6986
|
return;
|
|
7024
6987
|
}
|
|
7025
|
-
let
|
|
7026
|
-
i.setParent(
|
|
7027
|
-
n(i, a, c,
|
|
7028
|
-
let w = i.node(m), x = w.borderTop ? w.borderTop : m, b = w.borderBottom ? w.borderBottom : m, C = w.borderTop ?
|
|
7029
|
-
i.setEdge(
|
|
6988
|
+
let g = e.addBorderNode(i, "_bt"), y = e.addBorderNode(i, "_bb"), p = i.node(f);
|
|
6989
|
+
i.setParent(g, f), p.borderTop = g, i.setParent(y, f), p.borderBottom = y, h.forEach((m) => {
|
|
6990
|
+
n(i, a, c, d, l, u, m);
|
|
6991
|
+
let w = i.node(m), x = w.borderTop ? w.borderTop : m, b = w.borderBottom ? w.borderBottom : m, C = w.borderTop ? d : 2 * d, S = x !== b ? 1 : l - u[f] + 1;
|
|
6992
|
+
i.setEdge(g, x, {
|
|
7030
6993
|
weight: C,
|
|
7031
6994
|
minlen: S,
|
|
7032
6995
|
nestingEdge: !0
|
|
@@ -7035,15 +6998,15 @@ function u0() {
|
|
|
7035
6998
|
minlen: S,
|
|
7036
6999
|
nestingEdge: !0
|
|
7037
7000
|
});
|
|
7038
|
-
}), i.parent(f) || i.setEdge(a,
|
|
7001
|
+
}), i.parent(f) || i.setEdge(a, g, { weight: 0, minlen: l + u[f] });
|
|
7039
7002
|
}
|
|
7040
7003
|
function r(i) {
|
|
7041
7004
|
var a = {};
|
|
7042
|
-
function c(
|
|
7043
|
-
var
|
|
7044
|
-
|
|
7005
|
+
function c(d, l) {
|
|
7006
|
+
var u = i.children(d);
|
|
7007
|
+
u && u.length && u.forEach((f) => c(f, l + 1)), a[d] = l;
|
|
7045
7008
|
}
|
|
7046
|
-
return i.children().forEach((
|
|
7009
|
+
return i.children().forEach((d) => c(d, 1)), a;
|
|
7047
7010
|
}
|
|
7048
7011
|
function o(i) {
|
|
7049
7012
|
return i.edges().reduce((a, c) => a + i.edge(c).weight, 0);
|
|
@@ -7051,8 +7014,8 @@ function u0() {
|
|
|
7051
7014
|
function s(i) {
|
|
7052
7015
|
var a = i.graph();
|
|
7053
7016
|
i.removeNode(a.nestingRoot), delete a.nestingRoot, i.edges().forEach((c) => {
|
|
7054
|
-
var
|
|
7055
|
-
|
|
7017
|
+
var d = i.edge(c);
|
|
7018
|
+
d.nestingEdge && i.removeEdge(c);
|
|
7056
7019
|
});
|
|
7057
7020
|
}
|
|
7058
7021
|
return Yr;
|
|
@@ -7068,15 +7031,15 @@ function d0() {
|
|
|
7068
7031
|
let i = r.children(s), a = r.node(s);
|
|
7069
7032
|
if (i.length && i.forEach(o), Object.hasOwn(a, "minRank")) {
|
|
7070
7033
|
a.borderLeft = [], a.borderRight = [];
|
|
7071
|
-
for (let c = a.minRank,
|
|
7034
|
+
for (let c = a.minRank, d = a.maxRank + 1; c < d; ++c)
|
|
7072
7035
|
n(r, "borderLeft", "_bl", s, a, c), n(r, "borderRight", "_br", s, a, c);
|
|
7073
7036
|
}
|
|
7074
7037
|
}
|
|
7075
7038
|
r.children().forEach(o);
|
|
7076
7039
|
}
|
|
7077
7040
|
function n(r, o, s, i, a, c) {
|
|
7078
|
-
let
|
|
7079
|
-
a[o][c] =
|
|
7041
|
+
let d = { width: 0, height: 0, rank: c, borderType: o }, l = a[o][c - 1], u = e.addDummyNode(r, "border", d, s);
|
|
7042
|
+
a[o][c] = u, r.setParent(u, i), l && r.setEdge(l, u, { weight: 1 });
|
|
7080
7043
|
}
|
|
7081
7044
|
return jr;
|
|
7082
7045
|
}
|
|
@@ -7088,23 +7051,23 @@ function f0() {
|
|
|
7088
7051
|
undo: t
|
|
7089
7052
|
};
|
|
7090
7053
|
function e(c) {
|
|
7091
|
-
let
|
|
7092
|
-
(
|
|
7054
|
+
let d = c.graph().rankdir.toLowerCase();
|
|
7055
|
+
(d === "lr" || d === "rl") && n(c);
|
|
7093
7056
|
}
|
|
7094
7057
|
function t(c) {
|
|
7095
|
-
let
|
|
7096
|
-
(
|
|
7058
|
+
let d = c.graph().rankdir.toLowerCase();
|
|
7059
|
+
(d === "bt" || d === "rl") && o(c), (d === "lr" || d === "rl") && (i(c), n(c));
|
|
7097
7060
|
}
|
|
7098
7061
|
function n(c) {
|
|
7099
|
-
c.nodes().forEach((
|
|
7062
|
+
c.nodes().forEach((d) => r(c.node(d))), c.edges().forEach((d) => r(c.edge(d)));
|
|
7100
7063
|
}
|
|
7101
7064
|
function r(c) {
|
|
7102
|
-
let
|
|
7103
|
-
c.width = c.height, c.height =
|
|
7065
|
+
let d = c.width;
|
|
7066
|
+
c.width = c.height, c.height = d;
|
|
7104
7067
|
}
|
|
7105
7068
|
function o(c) {
|
|
7106
|
-
c.nodes().forEach((
|
|
7107
|
-
let l = c.edge(
|
|
7069
|
+
c.nodes().forEach((d) => s(c.node(d))), c.edges().forEach((d) => {
|
|
7070
|
+
let l = c.edge(d);
|
|
7108
7071
|
l.points.forEach(s), Object.hasOwn(l, "y") && s(l);
|
|
7109
7072
|
});
|
|
7110
7073
|
}
|
|
@@ -7112,14 +7075,14 @@ function f0() {
|
|
|
7112
7075
|
c.y = -c.y;
|
|
7113
7076
|
}
|
|
7114
7077
|
function i(c) {
|
|
7115
|
-
c.nodes().forEach((
|
|
7116
|
-
let l = c.edge(
|
|
7078
|
+
c.nodes().forEach((d) => a(c.node(d))), c.edges().forEach((d) => {
|
|
7079
|
+
let l = c.edge(d);
|
|
7117
7080
|
l.points.forEach(a), Object.hasOwn(l, "x") && a(l);
|
|
7118
7081
|
});
|
|
7119
7082
|
}
|
|
7120
7083
|
function a(c) {
|
|
7121
|
-
let
|
|
7122
|
-
c.x = c.y, c.y =
|
|
7084
|
+
let d = c.x;
|
|
7085
|
+
c.x = c.y, c.y = d;
|
|
7123
7086
|
}
|
|
7124
7087
|
return Wr;
|
|
7125
7088
|
}
|
|
@@ -7134,10 +7097,10 @@ function h0() {
|
|
|
7134
7097
|
function c(l) {
|
|
7135
7098
|
if (r[l]) return;
|
|
7136
7099
|
r[l] = !0;
|
|
7137
|
-
let
|
|
7138
|
-
a[
|
|
7100
|
+
let u = n.node(l);
|
|
7101
|
+
a[u.rank].push(l), n.successors(l).forEach(c);
|
|
7139
7102
|
}
|
|
7140
|
-
return o.sort((l,
|
|
7103
|
+
return o.sort((l, u) => n.node(l).rank - n.node(u).rank).forEach(c), a;
|
|
7141
7104
|
}
|
|
7142
7105
|
return Xr;
|
|
7143
7106
|
}
|
|
@@ -7154,19 +7117,19 @@ function p0() {
|
|
|
7154
7117
|
return s;
|
|
7155
7118
|
}
|
|
7156
7119
|
function n(r, o, s) {
|
|
7157
|
-
let i = e(s, s.map((f, h) => h)), a = o.flatMap((f) => r.outEdges(f).map((h) => ({ pos: i[h.w], weight: r.edge(h).weight })).sort((h,
|
|
7120
|
+
let i = e(s, s.map((f, h) => h)), a = o.flatMap((f) => r.outEdges(f).map((h) => ({ pos: i[h.w], weight: r.edge(h).weight })).sort((h, g) => h.pos - g.pos)), c = 1;
|
|
7158
7121
|
for (; c < s.length; ) c <<= 1;
|
|
7159
|
-
let
|
|
7122
|
+
let d = 2 * c - 1;
|
|
7160
7123
|
c -= 1;
|
|
7161
|
-
let l = new Array(
|
|
7124
|
+
let l = new Array(d).fill(0), u = 0;
|
|
7162
7125
|
return a.forEach((f) => {
|
|
7163
7126
|
let h = f.pos + c;
|
|
7164
7127
|
l[h] += f.weight;
|
|
7165
|
-
let
|
|
7128
|
+
let g = 0;
|
|
7166
7129
|
for (; h > 0; )
|
|
7167
|
-
h % 2 && (
|
|
7168
|
-
|
|
7169
|
-
}),
|
|
7130
|
+
h % 2 && (g += l[h + 1]), h = h - 1 >> 1, l[h] += f.weight;
|
|
7131
|
+
u += f.weight * g;
|
|
7132
|
+
}), u;
|
|
7170
7133
|
}
|
|
7171
7134
|
return Zr;
|
|
7172
7135
|
}
|
|
@@ -7179,9 +7142,9 @@ function g0() {
|
|
|
7179
7142
|
let o = t.inEdges(r);
|
|
7180
7143
|
if (o.length) {
|
|
7181
7144
|
let s = o.reduce((i, a) => {
|
|
7182
|
-
let c = t.edge(a),
|
|
7145
|
+
let c = t.edge(a), d = t.node(a.v);
|
|
7183
7146
|
return {
|
|
7184
|
-
sum: i.sum + c.weight *
|
|
7147
|
+
sum: i.sum + c.weight * d.order,
|
|
7185
7148
|
weight: i.weight + c.weight
|
|
7186
7149
|
};
|
|
7187
7150
|
}, { sum: 0, weight: 0 });
|
|
@@ -7204,18 +7167,18 @@ function m0() {
|
|
|
7204
7167
|
Kr = t;
|
|
7205
7168
|
function t(o, s) {
|
|
7206
7169
|
let i = {};
|
|
7207
|
-
o.forEach((c,
|
|
7170
|
+
o.forEach((c, d) => {
|
|
7208
7171
|
let l = i[c.v] = {
|
|
7209
7172
|
indegree: 0,
|
|
7210
7173
|
in: [],
|
|
7211
7174
|
out: [],
|
|
7212
7175
|
vs: [c.v],
|
|
7213
|
-
i:
|
|
7176
|
+
i: d
|
|
7214
7177
|
};
|
|
7215
7178
|
c.barycenter !== void 0 && (l.barycenter = c.barycenter, l.weight = c.weight);
|
|
7216
7179
|
}), s.edges().forEach((c) => {
|
|
7217
|
-
let
|
|
7218
|
-
|
|
7180
|
+
let d = i[c.v], l = i[c.w];
|
|
7181
|
+
d !== void 0 && l !== void 0 && (l.indegree++, d.out.push(i[c.w]));
|
|
7219
7182
|
});
|
|
7220
7183
|
let a = Object.values(i).filter((c) => !c.indegree);
|
|
7221
7184
|
return n(a);
|
|
@@ -7223,13 +7186,13 @@ function m0() {
|
|
|
7223
7186
|
function n(o) {
|
|
7224
7187
|
let s = [];
|
|
7225
7188
|
function i(c) {
|
|
7226
|
-
return (
|
|
7227
|
-
|
|
7189
|
+
return (d) => {
|
|
7190
|
+
d.merged || (d.barycenter === void 0 || c.barycenter === void 0 || d.barycenter >= c.barycenter) && r(c, d);
|
|
7228
7191
|
};
|
|
7229
7192
|
}
|
|
7230
7193
|
function a(c) {
|
|
7231
|
-
return (
|
|
7232
|
-
|
|
7194
|
+
return (d) => {
|
|
7195
|
+
d.in.push(c), --d.indegree === 0 && o.push(d);
|
|
7233
7196
|
};
|
|
7234
7197
|
}
|
|
7235
7198
|
for (; o.length; ) {
|
|
@@ -7251,12 +7214,12 @@ function y0() {
|
|
|
7251
7214
|
let e = fe();
|
|
7252
7215
|
Qr = t;
|
|
7253
7216
|
function t(o, s) {
|
|
7254
|
-
let i = e.partition(o, (
|
|
7255
|
-
a.sort(r(!!s)), f = n(
|
|
7256
|
-
f +=
|
|
7217
|
+
let i = e.partition(o, (g) => Object.hasOwn(g, "barycenter")), a = i.lhs, c = i.rhs.sort((g, y) => y.i - g.i), d = [], l = 0, u = 0, f = 0;
|
|
7218
|
+
a.sort(r(!!s)), f = n(d, c, f), a.forEach((g) => {
|
|
7219
|
+
f += g.vs.length, d.push(g.vs), l += g.barycenter * g.weight, u += g.weight, f = n(d, c, f);
|
|
7257
7220
|
});
|
|
7258
|
-
let h = { vs:
|
|
7259
|
-
return
|
|
7221
|
+
let h = { vs: d.flat(!0) };
|
|
7222
|
+
return u && (h.barycenter = l / u, h.weight = u), h;
|
|
7260
7223
|
}
|
|
7261
7224
|
function n(o, s, i) {
|
|
7262
7225
|
let a;
|
|
@@ -7275,19 +7238,19 @@ function w0() {
|
|
|
7275
7238
|
Gs = 1;
|
|
7276
7239
|
let e = g0(), t = m0(), n = y0();
|
|
7277
7240
|
Jr = r;
|
|
7278
|
-
function r(i, a, c,
|
|
7279
|
-
let l = i.children(a),
|
|
7241
|
+
function r(i, a, c, d) {
|
|
7242
|
+
let l = i.children(a), u = i.node(a), f = u ? u.borderLeft : void 0, h = u ? u.borderRight : void 0, g = {};
|
|
7280
7243
|
f && (l = l.filter((w) => w !== f && w !== h));
|
|
7281
7244
|
let y = e(i, l);
|
|
7282
7245
|
y.forEach((w) => {
|
|
7283
7246
|
if (i.children(w.v).length) {
|
|
7284
|
-
let x = r(i, w.v, c,
|
|
7285
|
-
|
|
7247
|
+
let x = r(i, w.v, c, d);
|
|
7248
|
+
g[w.v] = x, Object.hasOwn(x, "barycenter") && s(w, x);
|
|
7286
7249
|
}
|
|
7287
7250
|
});
|
|
7288
|
-
let
|
|
7289
|
-
o(
|
|
7290
|
-
let m = n(
|
|
7251
|
+
let p = t(y, c);
|
|
7252
|
+
o(p, g);
|
|
7253
|
+
let m = n(p, d);
|
|
7291
7254
|
if (f && (m.vs = [f, m.vs, h].flat(!0), i.predecessors(f).length)) {
|
|
7292
7255
|
let w = i.node(i.predecessors(f)[0]), x = i.node(i.predecessors(h)[0]);
|
|
7293
7256
|
Object.hasOwn(m, "barycenter") || (m.barycenter = 0, m.weight = 0), m.barycenter = (m.barycenter * m.weight + w.order + x.order) / (m.weight + 2), m.weight += 2;
|
|
@@ -7296,7 +7259,7 @@ function w0() {
|
|
|
7296
7259
|
}
|
|
7297
7260
|
function o(i, a) {
|
|
7298
7261
|
i.forEach((c) => {
|
|
7299
|
-
c.vs = c.vs.flatMap((
|
|
7262
|
+
c.vs = c.vs.flatMap((d) => a[d] ? a[d].vs : d);
|
|
7300
7263
|
});
|
|
7301
7264
|
}
|
|
7302
7265
|
function s(i, a) {
|
|
@@ -7310,18 +7273,19 @@ function v0() {
|
|
|
7310
7273
|
Ys = 1;
|
|
7311
7274
|
let e = Oe().Graph, t = fe();
|
|
7312
7275
|
eo = n;
|
|
7313
|
-
function n(o, s, i) {
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7276
|
+
function n(o, s, i, a) {
|
|
7277
|
+
a || (a = o.nodes());
|
|
7278
|
+
let c = r(o), d = new e({ compound: !0 }).setGraph({ root: c }).setDefaultNodeLabel((l) => o.node(l));
|
|
7279
|
+
return a.forEach((l) => {
|
|
7280
|
+
let u = o.node(l), f = o.parent(l);
|
|
7281
|
+
(u.rank === s || u.minRank <= s && s <= u.maxRank) && (d.setNode(l), d.setParent(l, f || c), o[i](l).forEach((h) => {
|
|
7282
|
+
let g = h.v === l ? h.w : h.v, y = d.edge(g, l), p = y !== void 0 ? y.weight : 0;
|
|
7283
|
+
d.setEdge(g, l, { weight: o.edge(h).weight + p });
|
|
7284
|
+
}), Object.hasOwn(u, "minRank") && d.setNode(l, {
|
|
7285
|
+
borderLeft: u.borderLeft[s],
|
|
7286
|
+
borderRight: u.borderRight[s]
|
|
7323
7287
|
}));
|
|
7324
|
-
}),
|
|
7288
|
+
}), d;
|
|
7325
7289
|
}
|
|
7326
7290
|
function r(o) {
|
|
7327
7291
|
for (var s; o.hasNode(s = t.uniqueId("_root")); ) ;
|
|
@@ -7336,10 +7300,10 @@ function b0() {
|
|
|
7336
7300
|
function e(t, n, r) {
|
|
7337
7301
|
let o = {}, s;
|
|
7338
7302
|
r.forEach((i) => {
|
|
7339
|
-
let a = t.parent(i), c,
|
|
7303
|
+
let a = t.parent(i), c, d;
|
|
7340
7304
|
for (; a; ) {
|
|
7341
|
-
if (c = t.parent(a), c ? (
|
|
7342
|
-
n.setEdge(
|
|
7305
|
+
if (c = t.parent(a), c ? (d = o[c], o[c] = a) : (d = s, s = a), d && d !== a) {
|
|
7306
|
+
n.setEdge(d, a);
|
|
7343
7307
|
return;
|
|
7344
7308
|
}
|
|
7345
7309
|
a = c;
|
|
@@ -7354,36 +7318,45 @@ function x0() {
|
|
|
7354
7318
|
Ws = 1;
|
|
7355
7319
|
let e = h0(), t = p0(), n = w0(), r = v0(), o = b0(), s = Oe().Graph, i = fe();
|
|
7356
7320
|
no = a;
|
|
7357
|
-
function a(
|
|
7321
|
+
function a(u, f) {
|
|
7358
7322
|
if (f && typeof f.customOrder == "function") {
|
|
7359
|
-
f.customOrder(
|
|
7323
|
+
f.customOrder(u, a);
|
|
7360
7324
|
return;
|
|
7361
7325
|
}
|
|
7362
|
-
let h = i.maxRank(
|
|
7363
|
-
if (l(
|
|
7326
|
+
let h = i.maxRank(u), g = c(u, i.range(1, h + 1), "inEdges"), y = c(u, i.range(h - 1, -1, -1), "outEdges"), p = e(u);
|
|
7327
|
+
if (l(u, p), f && f.disableOptimalOrderHeuristic)
|
|
7364
7328
|
return;
|
|
7365
7329
|
let m = Number.POSITIVE_INFINITY, w;
|
|
7366
7330
|
for (let x = 0, b = 0; b < 4; ++x, ++b) {
|
|
7367
|
-
|
|
7368
|
-
let C = t(
|
|
7369
|
-
C < m && (b = 0, w = Object.assign({},
|
|
7331
|
+
d(x % 2 ? g : y, x % 4 >= 2), p = i.buildLayerMatrix(u);
|
|
7332
|
+
let C = t(u, p);
|
|
7333
|
+
C < m && (b = 0, w = Object.assign({}, p), m = C);
|
|
7370
7334
|
}
|
|
7371
|
-
l(
|
|
7335
|
+
l(u, w);
|
|
7372
7336
|
}
|
|
7373
|
-
function c(
|
|
7337
|
+
function c(u, f, h) {
|
|
7338
|
+
const g = /* @__PURE__ */ new Map(), y = (p, m) => {
|
|
7339
|
+
g.has(p) || g.set(p, []), g.get(p).push(m);
|
|
7340
|
+
};
|
|
7341
|
+
for (const p of u.nodes()) {
|
|
7342
|
+
const m = u.node(p);
|
|
7343
|
+
if (typeof m.rank == "number" && y(m.rank, p), typeof m.minRank == "number" && typeof m.maxRank == "number")
|
|
7344
|
+
for (let w = m.minRank; w <= m.maxRank; w++)
|
|
7345
|
+
w !== m.rank && y(w, p);
|
|
7346
|
+
}
|
|
7374
7347
|
return f.map(function(p) {
|
|
7375
|
-
return r(
|
|
7348
|
+
return r(u, p, h, g.get(p) || []);
|
|
7376
7349
|
});
|
|
7377
7350
|
}
|
|
7378
|
-
function u
|
|
7351
|
+
function d(u, f) {
|
|
7379
7352
|
let h = new s();
|
|
7380
|
-
|
|
7381
|
-
let y =
|
|
7382
|
-
|
|
7353
|
+
u.forEach(function(g) {
|
|
7354
|
+
let y = g.graph().root, p = n(g, y, h, f);
|
|
7355
|
+
p.vs.forEach((m, w) => g.node(m).order = w), o(g, h, p.vs);
|
|
7383
7356
|
});
|
|
7384
7357
|
}
|
|
7385
|
-
function l(
|
|
7386
|
-
Object.values(f).forEach((h) => h.forEach((
|
|
7358
|
+
function l(u, f) {
|
|
7359
|
+
Object.values(f).forEach((h) => h.forEach((g, y) => u.node(g).order = y));
|
|
7387
7360
|
}
|
|
7388
7361
|
return no;
|
|
7389
7362
|
}
|
|
@@ -7400,33 +7373,33 @@ function E0() {
|
|
|
7400
7373
|
hasConflict: i,
|
|
7401
7374
|
verticalAlignment: a,
|
|
7402
7375
|
horizontalCompaction: c,
|
|
7403
|
-
alignCoordinates:
|
|
7376
|
+
alignCoordinates: u,
|
|
7404
7377
|
findSmallestWidthAlignment: l,
|
|
7405
7378
|
balance: f
|
|
7406
7379
|
};
|
|
7407
|
-
function n(
|
|
7380
|
+
function n(p, m) {
|
|
7408
7381
|
let w = {};
|
|
7409
7382
|
function x(b, C) {
|
|
7410
7383
|
let S = 0, D = 0, E = b.length, _ = C[C.length - 1];
|
|
7411
7384
|
return C.forEach((N, M) => {
|
|
7412
|
-
let O = o(
|
|
7385
|
+
let O = o(p, N), F = O ? p.node(O).order : E;
|
|
7413
7386
|
(O || N === _) && (C.slice(D, M + 1).forEach((v) => {
|
|
7414
|
-
|
|
7415
|
-
let L =
|
|
7416
|
-
(z < S || F < z) && !(L.dummy &&
|
|
7387
|
+
p.predecessors(v).forEach((A) => {
|
|
7388
|
+
let L = p.node(A), z = L.order;
|
|
7389
|
+
(z < S || F < z) && !(L.dummy && p.node(v).dummy) && s(w, A, v);
|
|
7417
7390
|
});
|
|
7418
7391
|
}), D = M + 1, S = F);
|
|
7419
7392
|
}), C;
|
|
7420
7393
|
}
|
|
7421
7394
|
return m.length && m.reduce(x), w;
|
|
7422
7395
|
}
|
|
7423
|
-
function r(
|
|
7396
|
+
function r(p, m) {
|
|
7424
7397
|
let w = {};
|
|
7425
7398
|
function x(C, S, D, E, _) {
|
|
7426
7399
|
let N;
|
|
7427
7400
|
t.range(S, D).forEach((M) => {
|
|
7428
|
-
N = C[M],
|
|
7429
|
-
let F =
|
|
7401
|
+
N = C[M], p.node(N).dummy && p.predecessors(N).forEach((O) => {
|
|
7402
|
+
let F = p.node(O);
|
|
7430
7403
|
F.dummy && (F.order < E || F.order > _) && s(w, O, N);
|
|
7431
7404
|
});
|
|
7432
7405
|
});
|
|
@@ -7434,35 +7407,35 @@ function E0() {
|
|
|
7434
7407
|
function b(C, S) {
|
|
7435
7408
|
let D = -1, E, _ = 0;
|
|
7436
7409
|
return S.forEach((N, M) => {
|
|
7437
|
-
if (
|
|
7438
|
-
let O =
|
|
7439
|
-
O.length && (E =
|
|
7410
|
+
if (p.node(N).dummy === "border") {
|
|
7411
|
+
let O = p.predecessors(N);
|
|
7412
|
+
O.length && (E = p.node(O[0]).order, x(S, _, M, D, E), _ = M, D = E);
|
|
7440
7413
|
}
|
|
7441
7414
|
x(S, _, S.length, E, C.length);
|
|
7442
7415
|
}), S;
|
|
7443
7416
|
}
|
|
7444
7417
|
return m.length && m.reduce(b), w;
|
|
7445
7418
|
}
|
|
7446
|
-
function o(
|
|
7447
|
-
if (
|
|
7448
|
-
return
|
|
7419
|
+
function o(p, m) {
|
|
7420
|
+
if (p.node(m).dummy)
|
|
7421
|
+
return p.predecessors(m).find((w) => p.node(w).dummy);
|
|
7449
7422
|
}
|
|
7450
|
-
function s(
|
|
7423
|
+
function s(p, m, w) {
|
|
7451
7424
|
if (m > w) {
|
|
7452
7425
|
let b = m;
|
|
7453
7426
|
m = w, w = b;
|
|
7454
7427
|
}
|
|
7455
|
-
let x =
|
|
7456
|
-
x || (
|
|
7428
|
+
let x = p[m];
|
|
7429
|
+
x || (p[m] = x = {}), x[w] = !0;
|
|
7457
7430
|
}
|
|
7458
|
-
function i(
|
|
7431
|
+
function i(p, m, w) {
|
|
7459
7432
|
if (m > w) {
|
|
7460
7433
|
let x = m;
|
|
7461
7434
|
m = w, w = x;
|
|
7462
7435
|
}
|
|
7463
|
-
return !!
|
|
7436
|
+
return !!p[m] && Object.hasOwn(p[m], w);
|
|
7464
7437
|
}
|
|
7465
|
-
function a(
|
|
7438
|
+
function a(p, m, w, x) {
|
|
7466
7439
|
let b = {}, C = {}, S = {};
|
|
7467
7440
|
return m.forEach((D) => {
|
|
7468
7441
|
D.forEach((E, _) => {
|
|
@@ -7483,8 +7456,8 @@ function E0() {
|
|
|
7483
7456
|
});
|
|
7484
7457
|
}), { root: b, align: C };
|
|
7485
7458
|
}
|
|
7486
|
-
function c(
|
|
7487
|
-
let C = {}, S =
|
|
7459
|
+
function c(p, m, w, x, b) {
|
|
7460
|
+
let C = {}, S = d(p, m, w, b), D = b ? "borderLeft" : "borderRight";
|
|
7488
7461
|
function E(M, O) {
|
|
7489
7462
|
let F = S.nodes(), v = F.pop(), A = {};
|
|
7490
7463
|
for (; v; )
|
|
@@ -7494,67 +7467,67 @@ function E0() {
|
|
|
7494
7467
|
C[M] = S.inEdges(M).reduce((O, F) => Math.max(O, C[F.v] + S.edge(F)), 0);
|
|
7495
7468
|
}
|
|
7496
7469
|
function N(M) {
|
|
7497
|
-
let O = S.outEdges(M).reduce((v, A) => Math.min(v, C[A.w] - S.edge(A)), Number.POSITIVE_INFINITY), F =
|
|
7470
|
+
let O = S.outEdges(M).reduce((v, A) => Math.min(v, C[A.w] - S.edge(A)), Number.POSITIVE_INFINITY), F = p.node(M);
|
|
7498
7471
|
O !== Number.POSITIVE_INFINITY && F.borderType !== D && (C[M] = Math.max(C[M], O));
|
|
7499
7472
|
}
|
|
7500
7473
|
return E(_, S.predecessors.bind(S)), E(N, S.successors.bind(S)), Object.keys(x).forEach((M) => C[M] = C[w[M]]), C;
|
|
7501
7474
|
}
|
|
7502
|
-
function
|
|
7503
|
-
let b = new e(), C =
|
|
7475
|
+
function d(p, m, w, x) {
|
|
7476
|
+
let b = new e(), C = p.graph(), S = g(C.nodesep, C.edgesep, x);
|
|
7504
7477
|
return m.forEach((D) => {
|
|
7505
7478
|
let E;
|
|
7506
7479
|
D.forEach((_) => {
|
|
7507
7480
|
let N = w[_];
|
|
7508
7481
|
if (b.setNode(N), E) {
|
|
7509
7482
|
var M = w[E], O = b.edge(M, N);
|
|
7510
|
-
b.setEdge(M, N, Math.max(S(
|
|
7483
|
+
b.setEdge(M, N, Math.max(S(p, _, E), O || 0));
|
|
7511
7484
|
}
|
|
7512
7485
|
E = _;
|
|
7513
7486
|
});
|
|
7514
7487
|
}), b;
|
|
7515
7488
|
}
|
|
7516
|
-
function l(
|
|
7489
|
+
function l(p, m) {
|
|
7517
7490
|
return Object.values(m).reduce((w, x) => {
|
|
7518
7491
|
let b = Number.NEGATIVE_INFINITY, C = Number.POSITIVE_INFINITY;
|
|
7519
7492
|
Object.entries(x).forEach(([D, E]) => {
|
|
7520
|
-
let _ = y(
|
|
7493
|
+
let _ = y(p, D) / 2;
|
|
7521
7494
|
b = Math.max(E + _, b), C = Math.min(E - _, C);
|
|
7522
7495
|
});
|
|
7523
7496
|
const S = b - C;
|
|
7524
7497
|
return S < w[0] && (w = [S, x]), w;
|
|
7525
7498
|
}, [Number.POSITIVE_INFINITY, null])[1];
|
|
7526
7499
|
}
|
|
7527
|
-
function
|
|
7500
|
+
function u(p, m) {
|
|
7528
7501
|
let w = Object.values(m), x = t.applyWithChunking(Math.min, w), b = t.applyWithChunking(Math.max, w);
|
|
7529
7502
|
["u", "d"].forEach((C) => {
|
|
7530
7503
|
["l", "r"].forEach((S) => {
|
|
7531
|
-
let D = C + S, E =
|
|
7504
|
+
let D = C + S, E = p[D];
|
|
7532
7505
|
if (E === m) return;
|
|
7533
7506
|
let _ = Object.values(E), N = x - t.applyWithChunking(Math.min, _);
|
|
7534
|
-
S !== "l" && (N = b - t.applyWithChunking(Math.max, _)), N && (
|
|
7507
|
+
S !== "l" && (N = b - t.applyWithChunking(Math.max, _)), N && (p[D] = t.mapValues(E, (M) => M + N));
|
|
7535
7508
|
});
|
|
7536
7509
|
});
|
|
7537
7510
|
}
|
|
7538
|
-
function f(
|
|
7539
|
-
return t.mapValues(
|
|
7511
|
+
function f(p, m) {
|
|
7512
|
+
return t.mapValues(p.ul, (w, x) => {
|
|
7540
7513
|
if (m)
|
|
7541
|
-
return
|
|
7514
|
+
return p[m.toLowerCase()][x];
|
|
7542
7515
|
{
|
|
7543
|
-
let b = Object.values(
|
|
7516
|
+
let b = Object.values(p).map((C) => C[x]).sort((C, S) => C - S);
|
|
7544
7517
|
return (b[1] + b[2]) / 2;
|
|
7545
7518
|
}
|
|
7546
7519
|
});
|
|
7547
7520
|
}
|
|
7548
|
-
function h(
|
|
7549
|
-
let m = t.buildLayerMatrix(
|
|
7550
|
-
n(
|
|
7551
|
-
r(
|
|
7521
|
+
function h(p) {
|
|
7522
|
+
let m = t.buildLayerMatrix(p), w = Object.assign(
|
|
7523
|
+
n(p, m),
|
|
7524
|
+
r(p, m)
|
|
7552
7525
|
), x = {}, b;
|
|
7553
7526
|
["u", "d"].forEach((S) => {
|
|
7554
7527
|
b = S === "u" ? m : Object.values(m).reverse(), ["l", "r"].forEach((D) => {
|
|
7555
7528
|
D === "r" && (b = b.map((M) => Object.values(M).reverse()));
|
|
7556
|
-
let E = (S === "u" ?
|
|
7557
|
-
|
|
7529
|
+
let E = (S === "u" ? p.predecessors : p.successors).bind(p), _ = a(p, b, w, E), N = c(
|
|
7530
|
+
p,
|
|
7558
7531
|
b,
|
|
7559
7532
|
_.root,
|
|
7560
7533
|
_.align,
|
|
@@ -7563,10 +7536,10 @@ function E0() {
|
|
|
7563
7536
|
D === "r" && (N = t.mapValues(N, (M) => -M)), x[S + D] = N;
|
|
7564
7537
|
});
|
|
7565
7538
|
});
|
|
7566
|
-
let C = l(
|
|
7567
|
-
return
|
|
7539
|
+
let C = l(p, x);
|
|
7540
|
+
return u(x, C), f(x, p.graph().align);
|
|
7568
7541
|
}
|
|
7569
|
-
function p
|
|
7542
|
+
function g(p, m, w) {
|
|
7570
7543
|
return (x, b, C) => {
|
|
7571
7544
|
let S = x.node(b), D = x.node(C), E = 0, _;
|
|
7572
7545
|
if (E += S.width / 2, Object.hasOwn(S, "labelpos"))
|
|
@@ -7578,7 +7551,7 @@ function E0() {
|
|
|
7578
7551
|
_ = S.width / 2;
|
|
7579
7552
|
break;
|
|
7580
7553
|
}
|
|
7581
|
-
if (_ && (E += w ? _ : -_), _ = 0, E += (S.dummy ? m :
|
|
7554
|
+
if (_ && (E += w ? _ : -_), _ = 0, E += (S.dummy ? m : p) / 2, E += (D.dummy ? m : p) / 2, E += D.width / 2, Object.hasOwn(D, "labelpos"))
|
|
7582
7555
|
switch (D.labelpos.toLowerCase()) {
|
|
7583
7556
|
case "l":
|
|
7584
7557
|
_ = D.width / 2;
|
|
@@ -7590,8 +7563,8 @@ function E0() {
|
|
|
7590
7563
|
return _ && (E += w ? _ : -_), _ = 0, E;
|
|
7591
7564
|
};
|
|
7592
7565
|
}
|
|
7593
|
-
function y(
|
|
7594
|
-
return
|
|
7566
|
+
function y(p, m) {
|
|
7567
|
+
return p.node(m).width;
|
|
7595
7568
|
}
|
|
7596
7569
|
return ro;
|
|
7597
7570
|
}
|
|
@@ -7607,11 +7580,11 @@ function _0() {
|
|
|
7607
7580
|
function r(o) {
|
|
7608
7581
|
let s = e.buildLayerMatrix(o), i = o.graph().ranksep, a = 0;
|
|
7609
7582
|
s.forEach((c) => {
|
|
7610
|
-
const
|
|
7611
|
-
const f = o.node(
|
|
7583
|
+
const d = c.reduce((l, u) => {
|
|
7584
|
+
const f = o.node(u).height;
|
|
7612
7585
|
return l > f ? l : f;
|
|
7613
7586
|
}, 0);
|
|
7614
|
-
c.forEach((l) => o.node(l).y = a +
|
|
7587
|
+
c.forEach((l) => o.node(l).y = a + d / 2), a += d + i;
|
|
7615
7588
|
});
|
|
7616
7589
|
}
|
|
7617
7590
|
return oo;
|
|
@@ -7620,17 +7593,17 @@ var io, Us;
|
|
|
7620
7593
|
function S0() {
|
|
7621
7594
|
if (Us) return io;
|
|
7622
7595
|
Us = 1;
|
|
7623
|
-
let e = i0(), t = s0(), n = l0(), r = fe().normalizeRanks, o = c0(), s = fe().removeEmptyRanks, i = u0(), a = d0(), c = f0(),
|
|
7596
|
+
let e = i0(), t = s0(), n = l0(), r = fe().normalizeRanks, o = c0(), s = fe().removeEmptyRanks, i = u0(), a = d0(), c = f0(), d = x0(), l = _0(), u = fe(), f = Oe().Graph;
|
|
7624
7597
|
io = h;
|
|
7625
7598
|
function h(k, I) {
|
|
7626
|
-
let P = I && I.debugTiming ?
|
|
7599
|
+
let P = I && I.debugTiming ? u.time : u.notime;
|
|
7627
7600
|
P("layout", () => {
|
|
7628
7601
|
let B = P(" buildLayoutGraph", () => E(k));
|
|
7629
|
-
P(" runLayout", () =>
|
|
7602
|
+
P(" runLayout", () => g(B, P, I)), P(" updateInputGraph", () => y(k, B));
|
|
7630
7603
|
});
|
|
7631
7604
|
}
|
|
7632
|
-
function
|
|
7633
|
-
I(" makeSpaceForEdgeLabels", () => _(k)), I(" removeSelfEdges", () => G(k)), I(" acyclic", () => e.run(k)), I(" nestingGraph.run", () => i.run(k)), I(" rank", () => n(
|
|
7605
|
+
function g(k, I, P) {
|
|
7606
|
+
I(" makeSpaceForEdgeLabels", () => _(k)), I(" removeSelfEdges", () => G(k)), I(" acyclic", () => e.run(k)), I(" nestingGraph.run", () => i.run(k)), I(" rank", () => n(u.asNonCompoundGraph(k))), I(" injectEdgeLabelProxies", () => N(k)), I(" removeEmptyRanks", () => s(k)), I(" nestingGraph.cleanup", () => i.cleanup(k)), I(" normalizeRanks", () => r(k)), I(" assignRankMinMax", () => M(k)), I(" removeEdgeLabelProxies", () => O(k)), I(" normalize.run", () => t.run(k)), I(" parentDummyChains", () => o(k)), I(" addBorderSegments", () => a(k)), I(" order", () => d(k, P)), I(" insertSelfEdges", () => R(k)), I(" adjustCoordinateSystem", () => c.adjust(k)), I(" position", () => l(k)), I(" positionSelfEdges", () => H(k)), I(" removeBorderNodes", () => z(k)), I(" normalize.undo", () => t.undo(k)), I(" fixupEdgeLabelCoords", () => A(k)), I(" undoCoordinateSystem", () => c.undo(k)), I(" translateGraph", () => F(k)), I(" assignNodeIntersects", () => v(k)), I(" reversePoints", () => L(k)), I(" acyclic.undo", () => e.undo(k));
|
|
7634
7607
|
}
|
|
7635
7608
|
function y(k, I) {
|
|
7636
7609
|
k.nodes().forEach((P) => {
|
|
@@ -7641,7 +7614,7 @@ function S0() {
|
|
|
7641
7614
|
B.points = V.points, Object.hasOwn(V, "x") && (B.x = V.x, B.y = V.y);
|
|
7642
7615
|
}), k.graph().width = I.graph().width, k.graph().height = I.graph().height;
|
|
7643
7616
|
}
|
|
7644
|
-
let
|
|
7617
|
+
let p = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], m = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, w = ["acyclicer", "ranker", "rankdir", "align"], x = ["width", "height", "rank"], b = { width: 0, height: 0 }, C = ["minlen", "weight", "width", "height", "labeloffset"], S = {
|
|
7645
7618
|
minlen: 1,
|
|
7646
7619
|
weight: 1,
|
|
7647
7620
|
width: 0,
|
|
@@ -7654,8 +7627,8 @@ function S0() {
|
|
|
7654
7627
|
return I.setGraph(Object.assign(
|
|
7655
7628
|
{},
|
|
7656
7629
|
m,
|
|
7657
|
-
q(P,
|
|
7658
|
-
|
|
7630
|
+
q(P, p),
|
|
7631
|
+
u.pick(P, w)
|
|
7659
7632
|
)), k.nodes().forEach((B) => {
|
|
7660
7633
|
let V = j(k.node(B));
|
|
7661
7634
|
const Y = q(V, x);
|
|
@@ -7668,7 +7641,7 @@ function S0() {
|
|
|
7668
7641
|
{},
|
|
7669
7642
|
S,
|
|
7670
7643
|
q(V, C),
|
|
7671
|
-
|
|
7644
|
+
u.pick(V, D)
|
|
7672
7645
|
));
|
|
7673
7646
|
}), I;
|
|
7674
7647
|
}
|
|
@@ -7684,7 +7657,7 @@ function S0() {
|
|
|
7684
7657
|
let P = k.edge(I);
|
|
7685
7658
|
if (P.width && P.height) {
|
|
7686
7659
|
let B = k.node(I.v), Y = { rank: (k.node(I.w).rank - B.rank) / 2 + B.rank, e: I };
|
|
7687
|
-
|
|
7660
|
+
u.addDummyNode(k, "edge-proxy", Y, "_ep");
|
|
7688
7661
|
}
|
|
7689
7662
|
});
|
|
7690
7663
|
}
|
|
@@ -7723,7 +7696,7 @@ function S0() {
|
|
|
7723
7696
|
function v(k) {
|
|
7724
7697
|
k.edges().forEach((I) => {
|
|
7725
7698
|
let P = k.edge(I), B = k.node(I.v), V = k.node(I.w), Y, W;
|
|
7726
|
-
P.points ? (Y = P.points[0], W = P.points[P.points.length - 1]) : (P.points = [], Y = V, W = B), P.points.unshift(
|
|
7699
|
+
P.points ? (Y = P.points[0], W = P.points[P.points.length - 1]) : (P.points = [], Y = V, W = B), P.points.unshift(u.intersectRect(B, Y)), P.points.push(u.intersectRect(V, W));
|
|
7727
7700
|
});
|
|
7728
7701
|
}
|
|
7729
7702
|
function A(k) {
|
|
@@ -7765,13 +7738,13 @@ function S0() {
|
|
|
7765
7738
|
});
|
|
7766
7739
|
}
|
|
7767
7740
|
function R(k) {
|
|
7768
|
-
var I =
|
|
7741
|
+
var I = u.buildLayerMatrix(k);
|
|
7769
7742
|
I.forEach((P) => {
|
|
7770
7743
|
var B = 0;
|
|
7771
7744
|
P.forEach((V, Y) => {
|
|
7772
7745
|
var W = k.node(V);
|
|
7773
7746
|
W.order = Y + B, (W.selfEdges || []).forEach((Z) => {
|
|
7774
|
-
|
|
7747
|
+
u.addDummyNode(k, "selfedge", {
|
|
7775
7748
|
width: Z.label.width,
|
|
7776
7749
|
height: Z.label.height,
|
|
7777
7750
|
rank: W.rank,
|
|
@@ -7799,7 +7772,7 @@ function S0() {
|
|
|
7799
7772
|
});
|
|
7800
7773
|
}
|
|
7801
7774
|
function q(k, I) {
|
|
7802
|
-
return
|
|
7775
|
+
return u.mapValues(u.pick(k, I), Number);
|
|
7803
7776
|
}
|
|
7804
7777
|
function j(k) {
|
|
7805
7778
|
var I = {};
|
|
@@ -7823,14 +7796,14 @@ function C0() {
|
|
|
7823
7796
|
s.setNode(i, { label: i }), s.setParent(i, "layer" + r.node(i).rank);
|
|
7824
7797
|
}), r.edges().forEach((i) => s.setEdge(i.v, i.w, {}, i.name)), o.forEach((i, a) => {
|
|
7825
7798
|
let c = "layer" + a;
|
|
7826
|
-
s.setNode(c, { rank: "same" }), i.reduce((
|
|
7799
|
+
s.setNode(c, { rank: "same" }), i.reduce((d, l) => (s.setEdge(d, l, { style: "invis" }), l));
|
|
7827
7800
|
}), s;
|
|
7828
7801
|
}
|
|
7829
7802
|
return so;
|
|
7830
7803
|
}
|
|
7831
7804
|
var ao, Qs;
|
|
7832
7805
|
function N0() {
|
|
7833
|
-
return Qs || (Qs = 1, ao = "1.1.
|
|
7806
|
+
return Qs || (Qs = 1, ao = "1.1.8"), ao;
|
|
7834
7807
|
}
|
|
7835
7808
|
var lo, Js;
|
|
7836
7809
|
function k0() {
|
|
@@ -7875,19 +7848,19 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
|
|
|
7875
7848
|
targetPosition: i,
|
|
7876
7849
|
label: a,
|
|
7877
7850
|
style: c = {},
|
|
7878
|
-
markerType:
|
|
7851
|
+
markerType: d,
|
|
7879
7852
|
markerEndId: l,
|
|
7880
|
-
selected:
|
|
7853
|
+
selected: u,
|
|
7881
7854
|
data: { onEdgeClick: f }
|
|
7882
7855
|
}) => {
|
|
7883
|
-
const [h,
|
|
7856
|
+
const [h, g, y] = jo({
|
|
7884
7857
|
sourceX: t,
|
|
7885
7858
|
sourceY: n,
|
|
7886
7859
|
sourcePosition: s,
|
|
7887
7860
|
targetX: r,
|
|
7888
7861
|
targetY: o,
|
|
7889
7862
|
targetPosition: i
|
|
7890
|
-
}),
|
|
7863
|
+
}), p = Vp(d, l);
|
|
7891
7864
|
return /* @__PURE__ */ te(be, { children: [
|
|
7892
7865
|
/* @__PURE__ */ T(
|
|
7893
7866
|
"path",
|
|
@@ -7896,10 +7869,10 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
|
|
|
7896
7869
|
style: c,
|
|
7897
7870
|
className: "react-flow__edge-path",
|
|
7898
7871
|
d: h,
|
|
7899
|
-
markerEnd:
|
|
7872
|
+
markerEnd: p
|
|
7900
7873
|
}
|
|
7901
7874
|
),
|
|
7902
|
-
!
|
|
7875
|
+
!u && /* @__PURE__ */ T("text", { children: /* @__PURE__ */ T(
|
|
7903
7876
|
"textPath",
|
|
7904
7877
|
{
|
|
7905
7878
|
href: `#${e}`,
|
|
@@ -7909,12 +7882,12 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
|
|
|
7909
7882
|
children: a
|
|
7910
7883
|
}
|
|
7911
7884
|
) }),
|
|
7912
|
-
|
|
7885
|
+
u && /* @__PURE__ */ T(
|
|
7913
7886
|
"foreignObject",
|
|
7914
7887
|
{
|
|
7915
7888
|
width: bn,
|
|
7916
7889
|
height: bn,
|
|
7917
|
-
x:
|
|
7890
|
+
x: g - bn / 2,
|
|
7918
7891
|
y: y - bn / 2,
|
|
7919
7892
|
className: "edgebutton-foreignobject",
|
|
7920
7893
|
requiredExtensions: "http://www.w3.org/1999/xhtml",
|
|
@@ -8079,10 +8052,10 @@ const j0 = ({
|
|
|
8079
8052
|
const [t, n] = re(!1), [r, o] = Ne(
|
|
8080
8053
|
() => ra(e),
|
|
8081
8054
|
[]
|
|
8082
|
-
), [s, i, a] = vm(r), [c,
|
|
8055
|
+
), [s, i, a] = vm(r), [c, d, l] = bm(o);
|
|
8083
8056
|
return Gm(() => {
|
|
8084
|
-
const [h,
|
|
8085
|
-
i(h),
|
|
8057
|
+
const [h, g] = ra(e);
|
|
8058
|
+
i(h), d(g);
|
|
8086
8059
|
}, [e]), /* @__PURE__ */ te(
|
|
8087
8060
|
Pl,
|
|
8088
8061
|
{
|
|
@@ -8129,12 +8102,12 @@ const j0 = ({
|
|
|
8129
8102
|
onAddExecution: t,
|
|
8130
8103
|
onAddFlow: n
|
|
8131
8104
|
}) => {
|
|
8132
|
-
const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(!1), [a, c] = re(), [
|
|
8105
|
+
const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(!1), [a, c] = re(), [d, l] = re();
|
|
8133
8106
|
return Rt(
|
|
8134
8107
|
() => r.authenticationManagement.getFlow({
|
|
8135
8108
|
flowId: e.flowId
|
|
8136
8109
|
}),
|
|
8137
|
-
({ providerId:
|
|
8110
|
+
({ providerId: u }) => l(u),
|
|
8138
8111
|
[]
|
|
8139
8112
|
), /* @__PURE__ */ T(Hn, { content: o("add"), children: /* @__PURE__ */ te(be, { children: [
|
|
8140
8113
|
/* @__PURE__ */ T(
|
|
@@ -8144,11 +8117,11 @@ const j0 = ({
|
|
|
8144
8117
|
position: "right"
|
|
8145
8118
|
},
|
|
8146
8119
|
isOpen: s,
|
|
8147
|
-
onOpenChange: (
|
|
8148
|
-
toggle: (
|
|
8120
|
+
onOpenChange: (u) => i(u),
|
|
8121
|
+
toggle: (u) => /* @__PURE__ */ T(
|
|
8149
8122
|
la,
|
|
8150
8123
|
{
|
|
8151
|
-
ref:
|
|
8124
|
+
ref: u,
|
|
8152
8125
|
variant: "plain",
|
|
8153
8126
|
onClick: () => i(!s),
|
|
8154
8127
|
"aria-label": o("add"),
|
|
@@ -8161,7 +8134,7 @@ const j0 = ({
|
|
|
8161
8134
|
/* @__PURE__ */ T(
|
|
8162
8135
|
lt,
|
|
8163
8136
|
{
|
|
8164
|
-
onClick: () => c(
|
|
8137
|
+
onClick: () => c(d === "form-flow" ? "form" : "basic"),
|
|
8165
8138
|
children: o("addExecution")
|
|
8166
8139
|
},
|
|
8167
8140
|
"addStep"
|
|
@@ -8183,8 +8156,8 @@ const j0 = ({
|
|
|
8183
8156
|
{
|
|
8184
8157
|
name: e.displayName,
|
|
8185
8158
|
type: a,
|
|
8186
|
-
onSelect: (
|
|
8187
|
-
|
|
8159
|
+
onSelect: (u) => {
|
|
8160
|
+
u && t(e, u), c(void 0);
|
|
8188
8161
|
}
|
|
8189
8162
|
}
|
|
8190
8163
|
),
|
|
@@ -8193,8 +8166,8 @@ const j0 = ({
|
|
|
8193
8166
|
{
|
|
8194
8167
|
name: e.displayName,
|
|
8195
8168
|
onCancel: () => c(void 0),
|
|
8196
|
-
onConfirm: (
|
|
8197
|
-
n(e,
|
|
8169
|
+
onConfirm: (u) => {
|
|
8170
|
+
n(e, u), c(void 0);
|
|
8198
8171
|
}
|
|
8199
8172
|
}
|
|
8200
8173
|
)
|
|
@@ -8288,7 +8261,7 @@ const j0 = ({
|
|
|
8288
8261
|
}, U0 = ({
|
|
8289
8262
|
execution: e
|
|
8290
8263
|
}) => {
|
|
8291
|
-
const { adminClient: t } = mt(), { t: n } = _e(), { addAlert: r, addError: o } = Oo(), [s, i] = re(!1), [a, c] = re(), [
|
|
8264
|
+
const { adminClient: t } = mt(), { t: n } = _e(), { addAlert: r, addError: o } = Oo(), [s, i] = re(!1), [a, c] = re(), [d, l] = re(), u = zn(), { setValue: f, handleSubmit: h } = u, g = e.authenticationFlow ? [] : [
|
|
8292
8265
|
{
|
|
8293
8266
|
helpText: n("authenticatorRefConfig.value.help"),
|
|
8294
8267
|
label: n("authenticatorRefConfig.value.label"),
|
|
@@ -8320,7 +8293,7 @@ const j0 = ({
|
|
|
8320
8293
|
return e.authenticationConfig && (m = await t.authenticationManagement.getConfig({
|
|
8321
8294
|
id: e.authenticationConfig
|
|
8322
8295
|
})), w.properties = [
|
|
8323
|
-
...
|
|
8296
|
+
...g,
|
|
8324
8297
|
...w.properties
|
|
8325
8298
|
], { configDescription: w, config: m };
|
|
8326
8299
|
},
|
|
@@ -8331,7 +8304,7 @@ const j0 = ({
|
|
|
8331
8304
|
), oe(() => {
|
|
8332
8305
|
a && y(a);
|
|
8333
8306
|
}, [a]);
|
|
8334
|
-
const
|
|
8307
|
+
const p = async (m) => {
|
|
8335
8308
|
const w = eu(m);
|
|
8336
8309
|
try {
|
|
8337
8310
|
if (a) {
|
|
@@ -8364,15 +8337,15 @@ const j0 = ({
|
|
|
8364
8337
|
children: /* @__PURE__ */ T(Uc, {})
|
|
8365
8338
|
}
|
|
8366
8339
|
) }),
|
|
8367
|
-
|
|
8340
|
+
d && /* @__PURE__ */ T(
|
|
8368
8341
|
nn,
|
|
8369
8342
|
{
|
|
8370
8343
|
variant: rn.small,
|
|
8371
8344
|
isOpen: s,
|
|
8372
|
-
title: n("executionConfig", { name:
|
|
8345
|
+
title: n("executionConfig", { name: d.name }),
|
|
8373
8346
|
onClose: () => i(!1),
|
|
8374
|
-
children: /* @__PURE__ */ te(on, { id: "execution-config-form", onSubmit: h(
|
|
8375
|
-
/* @__PURE__ */ te(Vn, { ...
|
|
8347
|
+
children: /* @__PURE__ */ te(on, { id: "execution-config-form", onSubmit: h(p), children: [
|
|
8348
|
+
/* @__PURE__ */ te(Vn, { ...u, children: [
|
|
8376
8349
|
/* @__PURE__ */ T(
|
|
8377
8350
|
Cn,
|
|
8378
8351
|
{
|
|
@@ -8387,7 +8360,7 @@ const j0 = ({
|
|
|
8387
8360
|
Kc,
|
|
8388
8361
|
{
|
|
8389
8362
|
stringify: !0,
|
|
8390
|
-
properties:
|
|
8363
|
+
properties: d.properties || []
|
|
8391
8364
|
}
|
|
8392
8365
|
)
|
|
8393
8366
|
] }),
|
|
@@ -8509,7 +8482,7 @@ const ey = ({
|
|
|
8509
8482
|
onAddFlow: s,
|
|
8510
8483
|
onDelete: i
|
|
8511
8484
|
}) => {
|
|
8512
|
-
const { t: a } = _e(), c = !!t.executionList?.length,
|
|
8485
|
+
const { t: a } = _e(), c = !!t.executionList?.length, d = {
|
|
8513
8486
|
onCollapse: () => n(t),
|
|
8514
8487
|
props: {
|
|
8515
8488
|
isExpanded: !t.isCollapsed,
|
|
@@ -8523,7 +8496,7 @@ const ey = ({
|
|
|
8523
8496
|
/* @__PURE__ */ T(iu, { hasNoWrapper: !0, children: /* @__PURE__ */ te(
|
|
8524
8497
|
ha,
|
|
8525
8498
|
{
|
|
8526
|
-
row: { props:
|
|
8499
|
+
row: { props: d.props },
|
|
8527
8500
|
className: "keycloak__authentication__flow-row",
|
|
8528
8501
|
children: [
|
|
8529
8502
|
/* @__PURE__ */ T(
|
|
@@ -8534,7 +8507,7 @@ const ey = ({
|
|
|
8534
8507
|
}
|
|
8535
8508
|
}
|
|
8536
8509
|
),
|
|
8537
|
-
/* @__PURE__ */ T(Ve, { treeRow:
|
|
8510
|
+
/* @__PURE__ */ T(Ve, { treeRow: d, children: /* @__PURE__ */ T(
|
|
8538
8511
|
ey,
|
|
8539
8512
|
{
|
|
8540
8513
|
id: t.id,
|
|
@@ -8621,8 +8594,8 @@ class ti {
|
|
|
8621
8594
|
return o - 1;
|
|
8622
8595
|
const a = this.#e[o + 1]?.level || 0;
|
|
8623
8596
|
if (i < a) {
|
|
8624
|
-
const
|
|
8625
|
-
o = this.#t(o + 1, i,
|
|
8597
|
+
const d = { ...s, executionList: [], isCollapsed: !1 };
|
|
8598
|
+
o = this.#t(o + 1, i, d), r.executionList?.push(d);
|
|
8626
8599
|
} else
|
|
8627
8600
|
r.executionList?.push(s);
|
|
8628
8601
|
}
|
|
@@ -8656,11 +8629,11 @@ class ti {
|
|
|
8656
8629
|
return r;
|
|
8657
8630
|
}
|
|
8658
8631
|
getChange(t, n) {
|
|
8659
|
-
const r = this.order(), o = n.findIndex((l) => l === t.id), s = r.findIndex((l) => l.id === t.id), i = r[s], a = r[o], c = this.#n(i.level, s),
|
|
8660
|
-
return c?.id !==
|
|
8661
|
-
|
|
8632
|
+
const r = this.order(), o = n.findIndex((l) => l === t.id), s = r.findIndex((l) => l.id === t.id), i = r[s], a = r[o], c = this.#n(i.level, s), d = this.#n(a.level, o);
|
|
8633
|
+
return c?.id !== d?.id ? a.level > 0 ? new oa(
|
|
8634
|
+
d?.executionList?.length || 0,
|
|
8662
8635
|
a.index,
|
|
8663
|
-
|
|
8636
|
+
d
|
|
8664
8637
|
) : new oa(this.expandableList.length, a.index) : new Kl(i.index, a.index);
|
|
8665
8638
|
}
|
|
8666
8639
|
clone() {
|
|
@@ -8670,7 +8643,7 @@ class ti {
|
|
|
8670
8643
|
}
|
|
8671
8644
|
const Fn = (e) => e.displayName?.startsWith("Condition ");
|
|
8672
8645
|
function ly() {
|
|
8673
|
-
const { adminClient: e } = mt(), { t } = _e(), { realm: n } = su(), { addAlert: r, addError: o } = Oo(), { id: s, usedBy: i, builtIn: a } = wu(), c = vu(), [
|
|
8646
|
+
const { adminClient: e } = mt(), { t } = _e(), { realm: n } = su(), { addAlert: r, addError: o } = Oo(), { id: s, usedBy: i, builtIn: a } = wu(), c = vu(), [d, l] = re(0), u = () => l((/* @__PURE__ */ new Date()).getTime()), [f, h] = re(!0), [g, y] = re(), [p, m] = re(), [w, x] = re(""), [b, C] = re(), [S, D] = re(), [E, _] = re(), [N, M, O] = co(), [F, v] = re(!1), [A, L] = co();
|
|
8674
8647
|
Rt(
|
|
8675
8648
|
async () => {
|
|
8676
8649
|
const Y = (await e.authenticationManagement.getFlows()).find((Z) => Z.id === s);
|
|
@@ -8684,7 +8657,7 @@ function ly() {
|
|
|
8684
8657
|
({ flow: V, executions: Y }) => {
|
|
8685
8658
|
y(V), m(new ti(Y));
|
|
8686
8659
|
},
|
|
8687
|
-
[
|
|
8660
|
+
[d]
|
|
8688
8661
|
);
|
|
8689
8662
|
const z = async (V, Y) => {
|
|
8690
8663
|
try {
|
|
@@ -8700,7 +8673,7 @@ function ly() {
|
|
|
8700
8673
|
}
|
|
8701
8674
|
if ("authenticationFlow" in V) {
|
|
8702
8675
|
const K = V, ee = await e.authenticationManagement.addFlowToFlow({
|
|
8703
|
-
flow: Y.parent?.displayName ||
|
|
8676
|
+
flow: Y.parent?.displayName || g?.alias,
|
|
8704
8677
|
alias: K.displayName,
|
|
8705
8678
|
description: K.description,
|
|
8706
8679
|
provider: V.providerId,
|
|
@@ -8715,7 +8688,7 @@ function ly() {
|
|
|
8715
8688
|
);
|
|
8716
8689
|
} else {
|
|
8717
8690
|
const K = await e.authenticationManagement.addExecutionToFlow({
|
|
8718
|
-
flow: Y.parent?.displayName ||
|
|
8691
|
+
flow: Y.parent?.displayName || g?.alias,
|
|
8719
8692
|
provider: V.providerId
|
|
8720
8693
|
});
|
|
8721
8694
|
if (ne.id) {
|
|
@@ -8736,7 +8709,7 @@ function ly() {
|
|
|
8736
8709
|
}) : await e.authenticationManagement.raisePriorityExecution({
|
|
8737
8710
|
id: W
|
|
8738
8711
|
});
|
|
8739
|
-
|
|
8712
|
+
u(), r(t("updateFlowSuccess"), We.success);
|
|
8740
8713
|
} catch (W) {
|
|
8741
8714
|
o("updateFlowError", W);
|
|
8742
8715
|
}
|
|
@@ -8744,9 +8717,9 @@ function ly() {
|
|
|
8744
8717
|
const { executionList: Y, isCollapsed: W, ...Z } = V;
|
|
8745
8718
|
try {
|
|
8746
8719
|
await e.authenticationManagement.updateExecution(
|
|
8747
|
-
{ flow:
|
|
8720
|
+
{ flow: g?.alias },
|
|
8748
8721
|
Z
|
|
8749
|
-
),
|
|
8722
|
+
), u(), r(t("updateFlowSuccess"), We.success);
|
|
8750
8723
|
} catch (ne) {
|
|
8751
8724
|
o("updateFlowError", ne);
|
|
8752
8725
|
}
|
|
@@ -8755,7 +8728,7 @@ function ly() {
|
|
|
8755
8728
|
await e.authenticationManagement.addExecutionToFlow({
|
|
8756
8729
|
flow: V,
|
|
8757
8730
|
provider: Y.id
|
|
8758
|
-
}),
|
|
8731
|
+
}), u(), r(t("updateFlowSuccess"), We.success);
|
|
8759
8732
|
} catch (W) {
|
|
8760
8733
|
o("updateFlowError", W);
|
|
8761
8734
|
}
|
|
@@ -8767,7 +8740,7 @@ function ly() {
|
|
|
8767
8740
|
description: W,
|
|
8768
8741
|
provider: ne,
|
|
8769
8742
|
type: Z
|
|
8770
|
-
}),
|
|
8743
|
+
}), u(), r(t("updateFlowSuccess"), We.success);
|
|
8771
8744
|
} catch (K) {
|
|
8772
8745
|
o("updateFlowError", K);
|
|
8773
8746
|
}
|
|
@@ -8786,7 +8759,7 @@ function ly() {
|
|
|
8786
8759
|
try {
|
|
8787
8760
|
await e.authenticationManagement.delExecution({
|
|
8788
8761
|
id: E?.id
|
|
8789
|
-
}), r(t("deleteExecutionSuccess"), We.success),
|
|
8762
|
+
}), r(t("deleteExecutionSuccess"), We.success), u();
|
|
8790
8763
|
} catch (V) {
|
|
8791
8764
|
o("deleteExecutionError", V);
|
|
8792
8765
|
}
|
|
@@ -8795,7 +8768,7 @@ function ly() {
|
|
|
8795
8768
|
titleKey: "deleteConfirmFlow",
|
|
8796
8769
|
children: /* @__PURE__ */ te(ui, { i18nKey: "deleteConfirmFlowMessage", children: [
|
|
8797
8770
|
" ",
|
|
8798
|
-
/* @__PURE__ */ T("strong", { children: { flow:
|
|
8771
|
+
/* @__PURE__ */ T("strong", { children: { flow: g?.alias || "" } }),
|
|
8799
8772
|
"."
|
|
8800
8773
|
] }),
|
|
8801
8774
|
continueButtonLabel: "delete",
|
|
@@ -8803,13 +8776,13 @@ function ly() {
|
|
|
8803
8776
|
onConfirm: async () => {
|
|
8804
8777
|
try {
|
|
8805
8778
|
await e.authenticationManagement.deleteFlow({
|
|
8806
|
-
flowId:
|
|
8779
|
+
flowId: g.id
|
|
8807
8780
|
}), c(au({ realm: n })), r(t("deleteFlowSuccess"), We.success);
|
|
8808
8781
|
} catch (V) {
|
|
8809
8782
|
o("deleteFlowError", V);
|
|
8810
8783
|
}
|
|
8811
8784
|
}
|
|
8812
|
-
}), P =
|
|
8785
|
+
}), P = p?.expandableList.length !== 0, B = [
|
|
8813
8786
|
...i !== "DEFAULT" ? [
|
|
8814
8787
|
/* @__PURE__ */ T(
|
|
8815
8788
|
lt,
|
|
@@ -8849,7 +8822,7 @@ function ly() {
|
|
|
8849
8822
|
A && /* @__PURE__ */ T(
|
|
8850
8823
|
lu,
|
|
8851
8824
|
{
|
|
8852
|
-
flowAlias:
|
|
8825
|
+
flowAlias: g?.alias,
|
|
8853
8826
|
onClose: (V) => {
|
|
8854
8827
|
L(), c(
|
|
8855
8828
|
cu({
|
|
@@ -8862,23 +8835,23 @@ function ly() {
|
|
|
8862
8835
|
}
|
|
8863
8836
|
}
|
|
8864
8837
|
),
|
|
8865
|
-
N &&
|
|
8838
|
+
N && g && /* @__PURE__ */ T(
|
|
8866
8839
|
uu,
|
|
8867
8840
|
{
|
|
8868
|
-
name:
|
|
8869
|
-
description:
|
|
8841
|
+
name: g.alias,
|
|
8842
|
+
description: g.description,
|
|
8870
8843
|
toggleDialog: M,
|
|
8871
8844
|
onComplete: () => {
|
|
8872
|
-
|
|
8845
|
+
u(), O(!1);
|
|
8873
8846
|
}
|
|
8874
8847
|
}
|
|
8875
8848
|
),
|
|
8876
8849
|
F && /* @__PURE__ */ T(
|
|
8877
8850
|
Ru,
|
|
8878
8851
|
{
|
|
8879
|
-
flow:
|
|
8852
|
+
flow: g,
|
|
8880
8853
|
toggleDialog: () => {
|
|
8881
|
-
v(!F),
|
|
8854
|
+
v(!F), u();
|
|
8882
8855
|
}
|
|
8883
8856
|
}
|
|
8884
8857
|
),
|
|
@@ -8886,7 +8859,7 @@ function ly() {
|
|
|
8886
8859
|
/* @__PURE__ */ T(
|
|
8887
8860
|
du,
|
|
8888
8861
|
{
|
|
8889
|
-
titleKey:
|
|
8862
|
+
titleKey: g?.alias || "",
|
|
8890
8863
|
badges: [
|
|
8891
8864
|
{ text: /* @__PURE__ */ T(Io, { children: t(`used.${i}`) }) },
|
|
8892
8865
|
a ? {
|
|
@@ -8898,7 +8871,7 @@ function ly() {
|
|
|
8898
8871
|
}
|
|
8899
8872
|
),
|
|
8900
8873
|
/* @__PURE__ */ te(sa, { variant: "light", children: [
|
|
8901
|
-
|
|
8874
|
+
p && P && /* @__PURE__ */ te(be, { children: [
|
|
8902
8875
|
/* @__PURE__ */ T(fu, { id: "toolbar", children: /* @__PURE__ */ te(hu, { children: [
|
|
8903
8876
|
/* @__PURE__ */ T(tr, { children: /* @__PURE__ */ te(fa, { children: [
|
|
8904
8877
|
/* @__PURE__ */ T(
|
|
@@ -8946,35 +8919,35 @@ function ly() {
|
|
|
8946
8919
|
pu,
|
|
8947
8920
|
{
|
|
8948
8921
|
onDrag: ({ index: V }) => {
|
|
8949
|
-
const Y =
|
|
8950
|
-
return x(t("onDragStart", { item: Y.displayName })), Y.isCollapsed || (Y.isCollapsed = !0, m(
|
|
8922
|
+
const Y = p.findExecution(V);
|
|
8923
|
+
return x(t("onDragStart", { item: Y.displayName })), Y.isCollapsed || (Y.isCollapsed = !0, m(p.clone())), !0;
|
|
8951
8924
|
},
|
|
8952
8925
|
onDragMove: ({ index: V }) => {
|
|
8953
|
-
const Y =
|
|
8926
|
+
const Y = p.findExecution(V);
|
|
8954
8927
|
x(t("onDragMove", { item: Y?.displayName }));
|
|
8955
8928
|
},
|
|
8956
8929
|
onDrop: (V, Y) => {
|
|
8957
8930
|
if (Y) {
|
|
8958
|
-
const W =
|
|
8931
|
+
const W = p.findExecution(V.index), Z = p.order().map((ee) => ee.id);
|
|
8959
8932
|
x(
|
|
8960
8933
|
t("onDragFinish", { list: W.displayName })
|
|
8961
8934
|
);
|
|
8962
8935
|
const [ne] = Z.splice(V.index, 1);
|
|
8963
8936
|
Z.splice(Y.index, 0, ne);
|
|
8964
|
-
const K =
|
|
8937
|
+
const K = p.getChange(W, Z);
|
|
8965
8938
|
return z(W, K), !0;
|
|
8966
8939
|
} else
|
|
8967
8940
|
return x(t("onDragCancel")), !1;
|
|
8968
8941
|
},
|
|
8969
8942
|
children: /* @__PURE__ */ T(gu, { hasNoWrapper: !0, children: /* @__PURE__ */ te(mu, { "aria-label": t("flows"), isTreeTable: !0, children: [
|
|
8970
8943
|
/* @__PURE__ */ T(W0, {}),
|
|
8971
|
-
/* @__PURE__ */ T(be, { children:
|
|
8944
|
+
/* @__PURE__ */ T(be, { children: p.expandableList.map((V) => /* @__PURE__ */ T(yu, { draggable: !0, children: /* @__PURE__ */ T(
|
|
8972
8945
|
Ul,
|
|
8973
8946
|
{
|
|
8974
8947
|
builtIn: !!a,
|
|
8975
8948
|
execution: V,
|
|
8976
8949
|
onRowClick: (Y) => {
|
|
8977
|
-
Y.isCollapsed = !Y.isCollapsed, m(
|
|
8950
|
+
Y.isCollapsed = !Y.isCollapsed, m(p.clone());
|
|
8978
8951
|
},
|
|
8979
8952
|
onRowChange: G,
|
|
8980
8953
|
onAddExecution: (Y, W) => R(Y.displayName, W),
|
|
@@ -8987,37 +8960,37 @@ function ly() {
|
|
|
8987
8960
|
] }) })
|
|
8988
8961
|
}
|
|
8989
8962
|
),
|
|
8990
|
-
|
|
8963
|
+
g && /* @__PURE__ */ te(be, { children: [
|
|
8991
8964
|
b && /* @__PURE__ */ T(
|
|
8992
8965
|
Ao,
|
|
8993
8966
|
{
|
|
8994
|
-
name:
|
|
8995
|
-
type:
|
|
8967
|
+
name: g.alias,
|
|
8968
|
+
type: g.providerId === "client-flow" ? "client" : "basic",
|
|
8996
8969
|
onSelect: async (V) => {
|
|
8997
|
-
V && await R(
|
|
8970
|
+
V && await R(g.alias, V), C(!1);
|
|
8998
8971
|
}
|
|
8999
8972
|
}
|
|
9000
8973
|
),
|
|
9001
8974
|
S && /* @__PURE__ */ T(
|
|
9002
8975
|
To,
|
|
9003
8976
|
{
|
|
9004
|
-
name:
|
|
8977
|
+
name: g.alias,
|
|
9005
8978
|
onCancel: () => D(!1),
|
|
9006
8979
|
onConfirm: async (V) => {
|
|
9007
|
-
await H(
|
|
8980
|
+
await H(g.alias, V), D(!1);
|
|
9008
8981
|
}
|
|
9009
8982
|
}
|
|
9010
8983
|
)
|
|
9011
8984
|
] }),
|
|
9012
8985
|
/* @__PURE__ */ T("div", { className: "pf-v5-screen-reader", "aria-live": "assertive", children: w })
|
|
9013
8986
|
] }),
|
|
9014
|
-
!f &&
|
|
9015
|
-
!
|
|
8987
|
+
!f && p?.expandableList && /* @__PURE__ */ T(j0, { executionList: p }),
|
|
8988
|
+
!p?.expandableList || g && !P && /* @__PURE__ */ T(
|
|
9016
8989
|
Fu,
|
|
9017
8990
|
{
|
|
9018
|
-
flow:
|
|
9019
|
-
onAddExecution: (V) => R(
|
|
9020
|
-
onAddFlow: (V) => H(
|
|
8991
|
+
flow: g,
|
|
8992
|
+
onAddExecution: (V) => R(g.alias, V),
|
|
8993
|
+
onAddFlow: (V) => H(g.alias, V)
|
|
9021
8994
|
}
|
|
9022
8995
|
)
|
|
9023
8996
|
] })
|
|
@@ -9027,4 +9000,4 @@ export {
|
|
|
9027
9000
|
ly as default,
|
|
9028
9001
|
Fn as providerConditionFilter
|
|
9029
9002
|
};
|
|
9030
|
-
//# sourceMappingURL=FlowDetails-
|
|
9003
|
+
//# sourceMappingURL=FlowDetails-tBxTv6wK.js.map
|