@squeed/flow-sdk 2.0.36 → 2.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -391,13 +391,13 @@ function Ow({
391
391
  }) {
392
392
  var De;
393
393
  const i = rt(() => {
394
- var _e, Ge, ct;
394
+ var _e, Ge, lt;
395
395
  const V = /* @__PURE__ */ new Map();
396
396
  for (const tt of t) (_e = tt.data) != null && _e.id && V.set(tt.data.id, tt);
397
397
  const Ce = /* @__PURE__ */ new Map();
398
398
  for (const tt of n) (Ge = tt.data) != null && Ge.id && Ce.set(tt.data.id, tt);
399
399
  const $e = /* @__PURE__ */ new Set();
400
- for (const tt of t) (ct = tt.data) != null && ct.parent && $e.add(tt.data.parent);
400
+ for (const tt of t) (lt = tt.data) != null && lt.parent && $e.add(tt.data.parent);
401
401
  return { nodeById: V, edgeById: Ce, parentIds: $e };
402
402
  }, [t, n]), s = le(null), [a, c] = ae([]), [l, d] = ae(null), [u, f] = ae(!0), [h, m] = ae(!1), [p, g] = ae(!0), [b, v] = ae(!1), [w, x] = ae(!1), [C, S] = ae(!0), [A, P] = ae(!1), [k, I] = ae(
403
403
  () => {
@@ -439,16 +439,16 @@ function Ow({
439
439
  var Ce, $e, _e;
440
440
  return i.parentIds.has(V.data.id) || (Ce = V.data.config) != null && Ce.parentContainer ? !!(($e = V.data.config) != null && $e.collapsed) : q[V.data.id] === "icon-label" || V.data.type === "grid" && q[V.data.id] === void 0 || ((_e = V.data.config) == null ? void 0 : _e.labelBelow) && q[V.data.id] !== "properties";
441
441
  }
442
- ), ye = z ?? e.allNodesIconLabel ?? ne, [xe, fe] = ae("normal"), [ge, Z] = ae(), U = e.edgeRadius ?? ge, be = U !== void 0 && Number.isFinite(U) ? Math.min(500, Math.max(0, U)) : void 0, [K, ve] = ae(), Se = e.spacing ?? xe, je = typeof Se == "number" ? Number.isFinite(Se) ? Math.min(
442
+ ), ye = z ?? e.allNodesIconLabel ?? ne, [xe, he] = ae("normal"), [ge, Z] = ae(), U = e.edgeRadius ?? ge, be = U !== void 0 && Number.isFinite(U) ? Math.min(500, Math.max(0, U)) : void 0, [K, ve] = ae(), Se = e.spacing ?? xe, je = typeof Se == "number" ? Number.isFinite(Se) ? Math.min(
443
443
  2,
444
444
  Math.max(
445
445
  e.nodeGridSpacing === "layout" ? 0 : 0.5,
446
446
  Se
447
447
  )
448
- ) : 1 : Se === "compact" ? 0.5 : Se === "spacious" ? 2 : 1, We = e.backgroundVariant ?? K ?? (e.backgroundPattern === "none" && e.backgroundColor === "transparent" ? "transparent" : e.backgroundPattern ?? "dot"), [he, ke] = ae(), Be = Object.prototype.hasOwnProperty.call(
448
+ ) : 1 : Se === "compact" ? 0.5 : Se === "spacious" ? 2 : 1, We = e.backgroundVariant ?? K ?? (e.backgroundPattern === "none" && e.backgroundColor === "transparent" ? "transparent" : e.backgroundPattern ?? "dot"), [ue, ke] = ae(), Be = Object.prototype.hasOwnProperty.call(
449
449
  e,
450
450
  "workflowContract"
451
- ) ? e.workflowContract : he, [Te, ze] = ae("blue.500"), [ot, ht] = ae(!1), Me = le(r);
451
+ ) ? e.workflowContract : ue, [Te, ze] = ae("blue.500"), [ot, ht] = ae(!1), Me = le(r);
452
452
  Me.current = r;
453
453
  const Qe = rt(() => {
454
454
  const V = (Ce) => (...$e) => {
@@ -484,8 +484,8 @@ function Ow({
484
484
  onNodeBorderStyleChange: V("onNodeBorderStyleChange"),
485
485
  onNodeBorderWidthChange: V("onNodeBorderWidthChange"),
486
486
  onNodeBorderRadiusChange: (Ce, $e) => {
487
- var _e, Ge, ct;
488
- (_e = _.current) != null && _e.fill && $((tt) => /* @__PURE__ */ new Set([...tt, Ce])), (ct = (Ge = Me.current).onNodeBorderRadiusChange) == null || ct.call(Ge, Ce, $e);
487
+ var _e, Ge, lt;
488
+ (_e = _.current) != null && _e.fill && $((tt) => /* @__PURE__ */ new Set([...tt, Ce])), (lt = (Ge = Me.current).onNodeBorderRadiusChange) == null || lt.call(Ge, Ce, $e);
489
489
  },
490
490
  onNodeIconChange: V("onNodeIconChange"),
491
491
  onNodeOutlineChange: V("onNodeOutlineChange"),
@@ -520,7 +520,7 @@ function Ow({
520
520
  onLayoutComplete: V("onLayoutComplete"),
521
521
  onJsonChange: V("onJsonChange")
522
522
  };
523
- }, []), nt = e.themeColor || Te, [ut, Dt] = ae(""), Tt = e.edgeColor ?? ut, tn = e.colorMode || "light", st = e.direction || "LR", Ze = e.nodeAlignment ?? "center", nr = e.edgeMode === "workflow" ? "nodes" : e.edgeMode ?? N, mt = e.readOnly ?? !1, $r = JSON.stringify(e.parentNodeStyle ?? null), zt = rt(
523
+ }, []), nt = e.themeColor || Te, [ct, Dt] = ae(""), Tt = e.edgeColor ?? ct, tn = e.colorMode || "light", st = e.direction || "LR", Ze = e.nodeAlignment ?? "center", nr = e.edgeMode === "workflow" ? "nodes" : e.edgeMode ?? N, mt = e.readOnly ?? !1, $r = JSON.stringify(e.parentNodeStyle ?? null), zt = rt(
524
524
  () => e.parentNodeStyle,
525
525
  [$r]
526
526
  ), qr = e.isZoomMode !== void 0 ? e.isZoomMode : u, Qt = e.isMultiSelectMode !== void 0 ? e.isMultiSelectMode : h, or = e.isEdgeHandlesEnabled !== void 0 ? e.isEdgeHandlesEnabled : b, Cr = e.isDragMode !== void 0 ? e.isDragMode : p, Ve = le(e);
@@ -666,7 +666,7 @@ function Ow({
666
666
  () => ({
667
667
  allNodesIconLabel: ye,
668
668
  setAllNodesIconLabel: (V) => {
669
- var Ce, $e, _e, Ge, ct;
669
+ var Ce, $e, _e, Ge, lt;
670
670
  if (G(V), !V)
671
671
  for (const [tt, Mt] of Object.entries(q))
672
672
  Mt === "icon-label" && !i.nodeById.has(tt) && W(tt, "default");
@@ -675,14 +675,14 @@ function Ow({
675
675
  tt.data.id,
676
676
  V ? "icon-label" : (Ge = tt.data.config) != null && Ge.labelBelow ? "properties" : "default"
677
677
  );
678
- (ct = r.onAllNodesIconLabelChange) == null || ct.call(r, V);
678
+ (lt = r.onAllNodesIconLabelChange) == null || lt.call(r, V);
679
679
  },
680
680
  nodeViewModes: q,
681
681
  setNodeViewMode: W,
682
682
  nodeRadiusPreviews: B,
683
683
  setNodeRadiusPreview: X,
684
684
  spacing: je,
685
- setSpacing: fe,
685
+ setSpacing: he,
686
686
  edgeRadius: be,
687
687
  setEdgeRadius: Z,
688
688
  backgroundVariant: We,
@@ -897,11 +897,11 @@ function Hw(e, r) {
897
897
  o[t] = r(e[t], t, e);
898
898
  return o;
899
899
  }
900
- var dt = Array.isArray, Wu = hn ? hn.prototype : void 0, Gu = Wu ? Wu.toString : void 0;
900
+ var ut = Array.isArray, Wu = hn ? hn.prototype : void 0, Gu = Wu ? Wu.toString : void 0;
901
901
  function mb(e) {
902
902
  if (typeof e == "string")
903
903
  return e;
904
- if (dt(e))
904
+ if (ut(e))
905
905
  return Hw(e, mb) + "";
906
906
  if (Uw(e))
907
907
  return Gu ? Gu.call(e) : "";
@@ -2352,25 +2352,25 @@ function cn(e, r = "root", t = []) {
2352
2352
  const { arrayObject: n } = Nr(e);
2353
2353
  n.length && (e = n);
2354
2354
  const o = Or(e), i = Ir(e);
2355
- return Ft(e) ? (dt(e) || dt(e) && r === "root" || !dt(e) && Object.keys(o).length || r === "root") && t.push(r) : t.push(r), Object.keys(i).length && !dt(e) ? Ln({
2355
+ return Ft(e) ? (ut(e) || ut(e) && r === "root" || !ut(e) && Object.keys(o).length || r === "root") && t.push(r) : t.push(r), Object.keys(i).length && !ut(e) ? Ln({
2356
2356
  chldPth: null,
2357
2357
  itrblObjct: i,
2358
2358
  nodes: t,
2359
2359
  path: r
2360
- }) : dt(e) && e.forEach((s, a) => {
2360
+ }) : ut(e) && e.forEach((s, a) => {
2361
2361
  const c = Or(s), l = Ir(s), { newConfig: d, arrayObject: u } = Nr(s);
2362
2362
  let f = `${r}.${a}`;
2363
- Ft(s) ? Object.keys(c).length ? (cn(c, f, t), Object.keys(l).length && !dt(s) && Ln({
2363
+ Ft(s) ? Object.keys(c).length ? (cn(c, f, t), Object.keys(l).length && !ut(s) && Ln({
2364
2364
  chldPth: f,
2365
2365
  itrblObjct: l,
2366
2366
  nodes: t,
2367
2367
  path: r
2368
- })) : Object.keys(l).length && !dt(s) ? Ln({
2368
+ })) : Object.keys(l).length && !ut(s) ? Ln({
2369
2369
  chldPth: f,
2370
2370
  itrblObjct: l,
2371
2371
  nodes: t,
2372
2372
  path: r
2373
- }) : dt(s) && Fb({
2373
+ }) : ut(s) && Fb({
2374
2374
  chldPth: f,
2375
2375
  item: s,
2376
2376
  nodes: t,
@@ -2390,19 +2390,19 @@ const Ln = ({
2390
2390
  const a = Or(i), c = Ir(i), { newConfig: l, arrayObject: d } = Nr(i);
2391
2391
  d.length && (i = d), n.split(".").slice(0, 2).join(".");
2392
2392
  let u = e ? `${e}.${o}` : `${n}.${o}`;
2393
- if (Ft(i) && !dt(i)) {
2393
+ if (Ft(i) && !ut(i)) {
2394
2394
  const f = Object.keys(a).length === 0;
2395
2395
  if (f && (on("array", l), t.push(u)), Object.keys(a).length) {
2396
- const h = dt(i) ? `${i.length || ""}` : `{${Object.keys(i).length || ""}}`;
2396
+ const h = ut(i) ? `${i.length || ""}` : `{${Object.keys(i).length || ""}}`;
2397
2397
  let m = u;
2398
2398
  f && (m = `${u}.${h}`), cn(i, m, t);
2399
- } else Object.keys(c).length && !dt(i) ? Ln({
2399
+ } else Object.keys(c).length && !ut(i) ? Ln({
2400
2400
  chldPth: u,
2401
2401
  itrblObjct: c,
2402
2402
  path: u,
2403
2403
  nodes: t
2404
2404
  }) : cn(i, u, t);
2405
- } else dt(i) && cn(i, u, t);
2405
+ } else ut(i) && cn(i, u, t);
2406
2406
  }), Fb = ({
2407
2407
  chldPth: e,
2408
2408
  item: r,
@@ -2411,12 +2411,12 @@ const Ln = ({
2411
2411
  }) => r.forEach((o, i) => {
2412
2412
  let s = `${e}.${i}`;
2413
2413
  const a = Ir(o), c = Or(o);
2414
- Ft(o) ? !dt(o) && Object.keys(c).length ? cn(o, s, t) : Object.keys(a).length && !dt(o) ? Ln({
2414
+ Ft(o) ? !ut(o) && Object.keys(c).length ? cn(o, s, t) : Object.keys(a).length && !ut(o) ? Ln({
2415
2415
  chldPth: s,
2416
2416
  itrblObjct: a,
2417
2417
  path: n,
2418
2418
  nodes: t
2419
- }) : dt(o) && Fb({
2419
+ }) : ut(o) && Fb({
2420
2420
  chldPth: s,
2421
2421
  item: o,
2422
2422
  nodes: t,
@@ -2444,13 +2444,13 @@ function ln(e, r = "root", t = [], n = [], o = "untitled", i = {
2444
2444
  const h = Or(e), m = Ir(e), { label: p, collapsed: g, parent: b } = f;
2445
2445
  if (!Ft(e))
2446
2446
  t.push(Gr(Qd, r, { label: p || r, parent: b }, e, a));
2447
- else if (dt(e) || dt(e) && r === "root") {
2448
- const { config: v } = on("array", f), w = dt(e) ? `${e.length || ""}` : `{${Object.keys(e).length || ""}}`, x = r === "root" ? o : `${o} ${w}`;
2447
+ else if (ut(e) || ut(e) && r === "root") {
2448
+ const { config: v } = on("array", f), w = ut(e) ? `${e.length || ""}` : `{${Object.keys(e).length || ""}}`, x = r === "root" ? o : `${o} ${w}`;
2449
2449
  t.push(
2450
- Gr(v, r, { label: p || x, parent: b }, e, dt(a) ? { [o]: a } : a)
2450
+ Gr(v, r, { label: p || x, parent: b }, e, ut(a) ? { [o]: a } : a)
2451
2451
  );
2452
- } else if (!dt(e) && Object.keys(h).length || r === "root") {
2453
- const { config: v } = on(null, f), w = dt(e) ? `${e.length || ""}` : `{${Object.keys(e).length || ""}}`, x = r.split("."), C = x[x.length - 1];
2452
+ } else if (!ut(e) && Object.keys(h).length || r === "root") {
2453
+ const { config: v } = on(null, f), w = ut(e) ? `${e.length || ""}` : `{${Object.keys(e).length || ""}}`, x = r.split("."), C = x[x.length - 1];
2454
2454
  let S = isNaN(Number(C)) ? null : Number(C) + 1;
2455
2455
  const A = isNaN(Number(C)) ? C : x[x.length - 2] + " " + S, P = r === "root" ? o : A;
2456
2456
  let k = !1;
@@ -2462,7 +2462,7 @@ function ln(e, r = "root", t = [], n = [], o = "untitled", i = {
2462
2462
  } else
2463
2463
  v.data.headerTitle = P, t.push(Gr(v, r, { label: p, parent: b }, h, I));
2464
2464
  }
2465
- return g || (Object.keys(m).length && !dt(e) ? Fn({
2465
+ return g || (Object.keys(m).length && !ut(e) ? Fn({
2466
2466
  flowConfig: i,
2467
2467
  chldPth: null,
2468
2468
  edges: n,
@@ -2471,7 +2471,7 @@ function ln(e, r = "root", t = [], n = [], o = "untitled", i = {
2471
2471
  nodes: t,
2472
2472
  path: r,
2473
2473
  newConfig: f
2474
- }) : dt(e) && e.forEach((v, w) => {
2474
+ }) : ut(e) && e.forEach((v, w) => {
2475
2475
  v = eu(v, jn);
2476
2476
  const x = v, C = Or(v), S = Ir(v), { newConfig: A, arrayObject: P } = Nr(v);
2477
2477
  P.length && (v = P);
@@ -2479,7 +2479,7 @@ function ln(e, r = "root", t = [], n = [], o = "untitled", i = {
2479
2479
  c = c || I;
2480
2480
  const $ = r === "root" && i.isCntr, F = r.split(".").slice(0, 2).join("."), N = zn.includes(F), O = i.isCntr && N || w % 2 === 0 && $;
2481
2481
  let Y = `${r}.${w}`;
2482
- Y = Vn(Y, t), O && zn.push(Y), Ft(v) ? Object.keys(C).length && !dt(v) ? (n.push(kr(r, Y, null, _, O, E)), ln(v, Y, t, n, M || w, i, A)) : Object.keys(S).length && !dt(v) ? Fn({
2482
+ Y = Vn(Y, t), O && zn.push(Y), Ft(v) ? Object.keys(C).length && !ut(v) ? (n.push(kr(r, Y, null, _, O, E)), ln(v, Y, t, n, M || w, i, A)) : Object.keys(S).length && !ut(v) ? Fn({
2483
2483
  flowConfig: i,
2484
2484
  chldPth: Y,
2485
2485
  isInverted: O,
@@ -2489,7 +2489,7 @@ function ln(e, r = "root", t = [], n = [], o = "untitled", i = {
2489
2489
  path: r,
2490
2490
  newConfig: A,
2491
2491
  forceIsInverted: !0
2492
- }) : dt(v) ? Bb({
2492
+ }) : ut(v) ? Bb({
2493
2493
  flowConfig: i,
2494
2494
  chldPth: Y,
2495
2495
  edges: n,
@@ -2523,7 +2523,7 @@ const Fn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: o, isIn
2523
2523
  const M = s === "root" && r.isCntr, E = s.split(".").slice(0, 2).join("."), T = zn.includes(E);
2524
2524
  c || (i = r.isCntr && T || h % 2 === 0 && M);
2525
2525
  let $ = e ? `${e}.${u}` : `${s}.${u}`;
2526
- if ($ = Vn($, o), i && zn.push($), A && t.push(kr($, A, null, P, i, I)), Ft(f) && !dt(f)) {
2526
+ if ($ = Vn($, o), i && zn.push($), A && t.push(kr($, A, null, P, i, I)), Ft(f) && !ut(f)) {
2527
2527
  t.push(kr(s, $, null, x, i, I));
2528
2528
  const F = d || Object.keys(p).length === 0;
2529
2529
  if (F) {
@@ -2531,10 +2531,10 @@ const Fn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: o, isIn
2531
2531
  O.data.headerTitle = S ? C : null, o.push(Gr(O, $, { label: C || u, parent: _ }, f, m));
2532
2532
  }
2533
2533
  if (Object.keys(p).length && !l) {
2534
- const N = dt(f) ? ` ${f.length || ""}` : `{${Object.keys(f).length || ""}}`;
2534
+ const N = ut(f) ? ` ${f.length || ""}` : `{${Object.keys(f).length || ""}}`;
2535
2535
  let O = $;
2536
2536
  F && (O = `${$}.${N}`, O = Vn(O, o), t.push(kr($, O, null, x, i, I))), ln(f, O, o, t, C || u, r, b);
2537
- } else Object.keys(g).length && !dt(f) ? Fn({
2537
+ } else Object.keys(g).length && !ut(f) ? Fn({
2538
2538
  chldPth: $,
2539
2539
  flowConfig: r,
2540
2540
  itrblObjct: g,
@@ -2544,7 +2544,7 @@ const Fn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: o, isIn
2544
2544
  newConfig: b,
2545
2545
  isInverted: i
2546
2546
  }) : ln(f, $, o, t, u, r, b);
2547
- } else dt(f) && (t.push(kr(s, $, null, x, i, I)), ln(f, $, o, t, u, r, b));
2547
+ } else ut(f) && (t.push(kr(s, $, null, x, i, I)), ln(f, $, o, t, u, r, b));
2548
2548
  });
2549
2549
  }, Bb = ({ flowConfig: e, chldPth: r, edges: t, isInverted: n, item: o, nodes: i, path: s }) => o.forEach((a, c) => {
2550
2550
  let l = `${r}.${c}`;
@@ -2552,7 +2552,7 @@ const Fn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: o, isIn
2552
2552
  const d = a;
2553
2553
  a = eu(a, jn);
2554
2554
  const u = Ir(a), f = Or(a), { newConfig: h } = Nr(a), { collapsed: m, label: p, parent: g, sourceLabel: b, isEdgeAnimated: v, content: w } = h;
2555
- Ft(a) ? !dt(a) && Object.keys(f).length ? (t.push(kr(s, l, null, b, n, v)), ln(a, l, i, t, c, e, h)) : Object.keys(u).length && !dt(a) && !m ? Fn({
2555
+ Ft(a) ? !ut(a) && Object.keys(f).length ? (t.push(kr(s, l, null, b, n, v)), ln(a, l, i, t, c, e, h)) : Object.keys(u).length && !ut(a) && !m ? Fn({
2556
2556
  chldPth: l,
2557
2557
  flowConfig: e,
2558
2558
  itrblObjct: u,
@@ -2561,7 +2561,7 @@ const Fn = ({ chldPth: e, flowConfig: r, edges: t, itrblObjct: n, nodes: o, isIn
2561
2561
  nodes: i,
2562
2562
  isInverted: n,
2563
2563
  newConfig: h
2564
- }) : dt(a) && Bb({
2564
+ }) : ut(a) && Bb({
2565
2565
  flowConfig: e,
2566
2566
  chldPth: l,
2567
2567
  edges: t,
@@ -5001,12 +5001,12 @@ function af({
5001
5001
  value: n,
5002
5002
  disabled: o
5003
5003
  }) {
5004
- var fe, ge, Z, U, be;
5004
+ var he, ge, Z, U, be;
5005
5005
  const {
5006
5006
  callbacks: i,
5007
5007
  structured: s,
5008
5008
  references: a
5009
- } = Bt(Jt), { themeColor: c } = et(), { background: l } = pt(), d = vr(), u = r.type.kind === "object" || r.type.kind === "array" || r.type.kind === "json", f = n === void 0 ? "" : u ? JSON.stringify(n, null, 2) : String(n), [h, m] = ae(f), [p, g] = ae(""), [b, v] = ae(0), w = le(null), x = le(), [C, S] = ae(!1), [A, P] = ae(!1), [k, I] = ae(), _ = ((fe = t.$options) == null ? void 0 : fe.$source) === "callback", M = i.resolveFormOptions, { data: E, address: T, nodeAddress: $, nodeId: F } = e;
5009
+ } = Bt(Jt), { themeColor: c } = et(), { background: l } = pt(), d = vr(), u = r.type.kind === "object" || r.type.kind === "array" || r.type.kind === "json", f = n === void 0 ? "" : u ? JSON.stringify(n, null, 2) : String(n), [h, m] = ae(f), [p, g] = ae(""), [b, v] = ae(0), w = le(null), x = le(), [C, S] = ae(!1), [A, P] = ae(!1), [k, I] = ae(), _ = ((he = t.$options) == null ? void 0 : he.$source) === "callback", M = i.resolveFormOptions, { data: E, address: T, nodeAddress: $, nodeId: F } = e;
5010
5010
  Ke(() => (S(!1), P(!1), () => {
5011
5011
  var K;
5012
5012
  (K = x.current) == null || K.abort(), x.current = void 0;
@@ -5110,11 +5110,11 @@ function af({
5110
5110
  throw new Error("Choose one file for this field.");
5111
5111
  if (!i.uploadFormFile)
5112
5112
  throw new Error("No file upload handler configured.");
5113
- const he = (je = (Se = t.$upload) == null ? void 0 : Se.accept) == null ? void 0 : je.split(",").map((ze) => ze.trim().toLowerCase()).filter(Boolean);
5113
+ const ue = (je = (Se = t.$upload) == null ? void 0 : Se.accept) == null ? void 0 : je.split(",").map((ze) => ze.trim().toLowerCase()).filter(Boolean);
5114
5114
  for (const ze of K) {
5115
5115
  if (((We = t.$upload) == null ? void 0 : We.maxSizeBytes) !== void 0 && ze.size > t.$upload.maxSizeBytes)
5116
5116
  throw new Error(`${ze.name} exceeds the file size limit.`);
5117
- if (he != null && he.length && !he.some(
5117
+ if (ue != null && ue.length && !ue.some(
5118
5118
  (ot) => ot.startsWith(".") ? ze.name.toLowerCase().endsWith(ot) : ot.endsWith("/*") ? ze.type.toLowerCase().startsWith(ot.slice(0, -1)) : ze.type.toLowerCase() === ot
5119
5119
  ))
5120
5120
  throw new Error(`${ze.name} is not an accepted file type.`);
@@ -5145,9 +5145,9 @@ function af({
5145
5145
  const Be = te ? [...Array.isArray(n) ? n : [], ...ke] : ke[0], Te = dr(r.type, Be, pe);
5146
5146
  if (Te) throw new Error(Te);
5147
5147
  X.current(Be);
5148
- } catch (he) {
5148
+ } catch (ue) {
5149
5149
  ve.signal.aborted || g(
5150
- he instanceof Error ? he.message : "Unable to upload file."
5150
+ ue instanceof Error ? ue.message : "Unable to upload file."
5151
5151
  ), ve.abort();
5152
5152
  } finally {
5153
5153
  x.current === ve && (x.current = void 0, S(!1));
@@ -6496,7 +6496,7 @@ function Z1({
6496
6496
  onClose: r,
6497
6497
  afterLabel: t
6498
6498
  }) {
6499
- var se, X, H, ne, ye, xe, fe, ge;
6499
+ var se, X, H, ne, ye, xe, he, ge;
6500
6500
  const {
6501
6501
  callbacks: n,
6502
6502
  colorMode: o,
@@ -6505,9 +6505,9 @@ function Z1({
6505
6505
  setNodeViewMode: a,
6506
6506
  nodeViewModes: c
6507
6507
  } = et(), { colorText: l, colorInactive: d } = pt(), { nodeById: u, parentIds: f } = ur(), { palette: h, show: m } = rv(), p = e.length === 1, [g, b] = ae(""), v = p ? (se = u.get(e[0])) == null ? void 0 : se.data : void 0, w = e.map((Z) => {
6508
- var K, ve, Se, je, We, he;
6508
+ var K, ve, Se, je, We, ue;
6509
6509
  const U = (K = u.get(Z)) == null ? void 0 : K.data, be = ((ve = U == null ? void 0 : U.config) == null ? void 0 : ve.typeView) ?? "";
6510
- return be === "object" && ((Se = U == null ? void 0 : U.config) == null ? void 0 : Se.content) !== void 0 && c[Z] !== "properties" ? "content" : be === "icon-label" && ((je = U == null ? void 0 : U.viewProps) == null ? void 0 : je.bgColor) === "transparent" && ((We = U == null ? void 0 : U.viewProps) == null ? void 0 : We.borderWidth) === 0 && ((he = U == null ? void 0 : U.viewProps) == null ? void 0 : he.outline) === !1 ? "media" : be;
6510
+ return be === "object" && ((Se = U == null ? void 0 : U.config) == null ? void 0 : Se.content) !== void 0 && c[Z] !== "properties" ? "content" : be === "icon-label" && ((je = U == null ? void 0 : U.viewProps) == null ? void 0 : je.bgColor) === "transparent" && ((We = U == null ? void 0 : U.viewProps) == null ? void 0 : We.borderWidth) === 0 && ((ue = U == null ? void 0 : U.viewProps) == null ? void 0 : ue.outline) === !1 ? "media" : be;
6511
6511
  }), x = w.some((Z) => Z !== w[0]), C = x ? "mixed" : w[0] ?? "", S = [
6512
6512
  { value: "text", label: "Text", view: "text", icon: ew },
6513
6513
  {
@@ -6591,9 +6591,9 @@ function Z1({
6591
6591
  (K) => K.value === Z
6592
6592
  )) == null ? void 0 : be.view;
6593
6593
  U && O((K) => {
6594
- var Se, je, We, he, ke, Be, Te, ze, ot, ht, Me, Qe, nt;
6594
+ var Se, je, We, ue, ke, Be, Te, ze, ot, ht, Me, Qe, nt;
6595
6595
  const ve = (Se = u.get(K)) == null ? void 0 : Se.data;
6596
- Z === "media" ? ((je = n.onNodeColorChange) == null || je.call(n, K, "bg", "transparent"), (We = n.onNodeBorderColorChange) == null || We.call(n, K, "#00000000"), (he = n.onNodeBorderWidthChange) == null || he.call(n, K, 0), (ke = n.onNodeOutlineChange) == null || ke.call(n, K, !1)) : w[e.indexOf(K)] === "media" && ((Be = n.onNodeColorChange) == null || Be.call(n, K, "bg", ""), (Te = n.onNodeBorderColorChange) == null || Te.call(n, K, ""), (ze = n.onNodeBorderWidthChange) == null || ze.call(n, K, void 0)), Z === "content" && ((ot = ve == null ? void 0 : ve.config) == null ? void 0 : ot.content) === void 0 && ((ht = n.onNodeContentChange) == null || ht.call(n, K, "")), (Me = n.onNodeTypeViewChange) == null || Me.call(n, K, U), a(
6596
+ Z === "media" ? ((je = n.onNodeColorChange) == null || je.call(n, K, "bg", "transparent"), (We = n.onNodeBorderColorChange) == null || We.call(n, K, "#00000000"), (ue = n.onNodeBorderWidthChange) == null || ue.call(n, K, 0), (ke = n.onNodeOutlineChange) == null || ke.call(n, K, !1)) : w[e.indexOf(K)] === "media" && ((Be = n.onNodeColorChange) == null || Be.call(n, K, "bg", ""), (Te = n.onNodeBorderColorChange) == null || Te.call(n, K, ""), (ze = n.onNodeBorderWidthChange) == null || ze.call(n, K, void 0)), Z === "content" && ((ot = ve == null ? void 0 : ve.config) == null ? void 0 : ot.content) === void 0 && ((ht = n.onNodeContentChange) == null || ht.call(n, K, "")), (Me = n.onNodeTypeViewChange) == null || Me.call(n, K, U), a(
6597
6597
  K,
6598
6598
  Z === "object" && ((Qe = ve == null ? void 0 : ve.config) == null ? void 0 : Qe.content) !== void 0 ? "properties" : "default"
6599
6599
  ), (nt = n.onNodeViewToggle) == null || nt.call(n, K);
@@ -6790,7 +6790,7 @@ function Z1({
6790
6790
  tv,
6791
6791
  {
6792
6792
  nodeId: e[0],
6793
- value: (fe = v == null ? void 0 : v.config) == null ? void 0 : fe.icon
6793
+ value: (he = v == null ? void 0 : v.config) == null ? void 0 : he.icon
6794
6794
  },
6795
6795
  e[0]
6796
6796
  ),
@@ -7469,7 +7469,7 @@ const rC = [
7469
7469
  callbacks: E,
7470
7470
  config: T,
7471
7471
  readOnly: $
7472
- } = et(), { nodeById: F, edgeById: N, parentIds: O } = ur(), Y = T.colorMode === "dark", { background: oe, border: te, colorInactive: re, colorText: pe, colorActive: q } = pt(), z = Y ? te : "gray.300", G = `var(--chakra-colors-${oe.replace(".", "-")})`, B = `var(--chakra-colors-${(Y ? te : "gray.300").replace(".", "-")})`, [se, X] = ae(!1), [H, ne] = ae(!0), ye = T.bottomBarCollapsed ?? H, xe = le(null), fe = Zd({
7472
+ } = et(), { nodeById: F, edgeById: N, parentIds: O } = ur(), Y = T.colorMode === "dark", { background: oe, border: te, colorInactive: re, colorText: pe, colorActive: q } = pt(), z = Y ? te : "gray.300", G = `var(--chakra-colors-${oe.replace(".", "-")})`, B = `var(--chakra-colors-${(Y ? te : "gray.300").replace(".", "-")})`, [se, X] = ae(!1), [H, ne] = ae(!0), ye = T.bottomBarCollapsed ?? H, xe = le(null), he = Zd({
7473
7473
  edge: "bottom",
7474
7474
  enabled: !_,
7475
7475
  bounds: xe,
@@ -7478,11 +7478,11 @@ const rC = [
7478
7478
  (Me) => {
7479
7479
  const Qe = r.current;
7480
7480
  if (!Qe) return;
7481
- const nt = T.minZoom ?? 0.01, ut = T.maxZoom ?? 1.5, Dt = 0.02;
7481
+ const nt = T.minZoom ?? 0.01, ct = T.maxZoom ?? 1.5, Dt = 0.02;
7482
7482
  let Tt = Qe.zoom();
7483
7483
  switch (Me) {
7484
7484
  case "increase":
7485
- Tt = Math.min(ut, Tt + Dt), Qe.zoom(Tt), Qe.center(!1);
7485
+ Tt = Math.min(ct, Tt + Dt), Qe.zoom(Tt), Qe.center(!1);
7486
7486
  break;
7487
7487
  case "decrease":
7488
7488
  Tt = Math.max(nt, Tt - Dt), Qe.zoom(Tt), Qe.center(!1);
@@ -7505,7 +7505,7 @@ const rC = [
7505
7505
  }, [Se, p, N]), We = gt(() => {
7506
7506
  var Me;
7507
7507
  g(null), (Me = E.onEdgeDeselect) == null || Me.call(E);
7508
- }, [g, E]), he = T.selectionToolbar !== !1 && !$, ke = he && !!p && !ve, Be = he && !ke && h.length > 0 && !Z, Te = ke || Be, ze = _ || fe || se || Te || T.bottomBarCollapsed === !1;
7508
+ }, [g, E]), ue = T.selectionToolbar !== !1 && !$, ke = ue && !!p && !ve, Be = ue && !ke && h.length > 0 && !Z, Te = ke || Be, ze = _ || he || se || Te || T.bottomBarCollapsed === !1;
7509
7509
  Ke(() => {
7510
7510
  h.length || p ? a(!1) : $ || (s && M(!0), T.bottomBarCollapsed === void 0 && ne(!s));
7511
7511
  }, [
@@ -9851,7 +9851,7 @@ function zC({
9851
9851
  arrowAt: M ? "source" : "target",
9852
9852
  labelTargetLength: w ? Y + 2 * Wr : void 0,
9853
9853
  labelFraction: w ? x : void 0
9854
- }, fe = f !== void 0 || h !== void 0 || !!m || !!p, ge = hf(
9854
+ }, he = f !== void 0 || h !== void 0 || !!m || !!p, ge = hf(
9855
9855
  c,
9856
9856
  l,
9857
9857
  b,
@@ -9869,7 +9869,7 @@ function zC({
9869
9869
  be,
9870
9870
  { ...xe, srcDist: 18, tgtDist: 18 },
9871
9871
  i
9872
- ) : fe ? uf(c, l, b, f, h, v, {
9872
+ ) : he ? uf(c, l, b, f, h, v, {
9873
9873
  ...xe,
9874
9874
  srcDist: 18,
9875
9875
  tgtDist: 18,
@@ -9886,7 +9886,7 @@ function zC({
9886
9886
  b,
9887
9887
  f,
9888
9888
  h,
9889
- fe ? 18 : mo
9889
+ he ? 18 : mo
9890
9890
  );
9891
9891
  m && (Se.sourcePoint = sn(m, 18)), p && (Se.targetPoint = sn(p, 18));
9892
9892
  const je = Object.prototype.hasOwnProperty.call(
@@ -9912,16 +9912,16 @@ function zC({
9912
9912
  defaultGeometry: ve
9913
9913
  }) ?? ve;
9914
9914
  }
9915
- return K || m || p ? ve : i === "straight" ? fe ? fv(
9915
+ return K || m || p ? ve : i === "straight" ? he ? fv(
9916
9916
  Se.sourcePoint,
9917
9917
  Se.targetPoint,
9918
9918
  xe
9919
9919
  ) : uv([c, l], c, l, xe) : i === "bezier" ? EC(
9920
9920
  Se.sourcePoint,
9921
9921
  Se.targetPoint,
9922
- fe ? b === "leftward" ? "leftward" : "rightward" : b,
9922
+ he ? b === "leftward" ? "leftward" : "rightward" : b,
9923
9923
  xe
9924
- ) : i === "orthogonal" ? fe ? uf(c, l, b, f, h, v, {
9924
+ ) : i === "orthogonal" ? he ? uf(c, l, b, f, h, v, {
9925
9925
  ...xe,
9926
9926
  srcDist: 18,
9927
9927
  tgtDist: 18,
@@ -9978,7 +9978,7 @@ function zC({
9978
9978
  "--flow-edge-reveal-state": r.paused ? "paused" : "running"
9979
9979
  } : void 0;
9980
9980
  if (N.length || $) {
9981
- const xe = Y, fe = oe;
9981
+ const xe = Y, he = oe;
9982
9982
  H = /* @__PURE__ */ D(
9983
9983
  "g",
9984
9984
  {
@@ -9995,9 +9995,9 @@ function zC({
9995
9995
  "rect",
9996
9996
  {
9997
9997
  x: -xe / 2 - Wr,
9998
- y: -fe / 2 - Wr,
9998
+ y: -he / 2 - Wr,
9999
9999
  width: xe + 2 * Wr,
10000
- height: fe + 2 * Wr,
10000
+ height: he + 2 * Wr,
10001
10001
  fill: C === "transparent" ? "transparent" : A
10002
10002
  }
10003
10003
  ),
@@ -11332,29 +11332,29 @@ var os, gp;
11332
11332
  function qv() {
11333
11333
  if (gp) return os;
11334
11334
  gp = 1;
11335
- var e = Fo(), r = cu(), t = Do(), n = vS(), o = CS(), i = _v(), s = Ev(), a = SS(), c = _S(), l = Mv(), d = ES(), u = Sn(), f = PS(), h = NS(), m = $v(), p = _t(), g = Cn(), b = $S(), v = Xt(), w = LS(), x = Tr(), C = Qr(), S = 1, A = 2, P = 4, k = "[object Arguments]", I = "[object Array]", _ = "[object Boolean]", M = "[object Date]", E = "[object Error]", T = "[object Function]", $ = "[object GeneratorFunction]", F = "[object Map]", N = "[object Number]", O = "[object Object]", Y = "[object RegExp]", oe = "[object Set]", te = "[object String]", re = "[object Symbol]", pe = "[object WeakMap]", q = "[object ArrayBuffer]", z = "[object DataView]", G = "[object Float32Array]", B = "[object Float64Array]", se = "[object Int8Array]", X = "[object Int16Array]", H = "[object Int32Array]", ne = "[object Uint8Array]", ye = "[object Uint8ClampedArray]", xe = "[object Uint16Array]", fe = "[object Uint32Array]", ge = {};
11336
- ge[k] = ge[I] = ge[q] = ge[z] = ge[_] = ge[M] = ge[G] = ge[B] = ge[se] = ge[X] = ge[H] = ge[F] = ge[N] = ge[O] = ge[Y] = ge[oe] = ge[te] = ge[re] = ge[ne] = ge[ye] = ge[xe] = ge[fe] = !0, ge[E] = ge[T] = ge[pe] = !1;
11335
+ var e = Fo(), r = cu(), t = Do(), n = vS(), o = CS(), i = _v(), s = Ev(), a = SS(), c = _S(), l = Mv(), d = ES(), u = Sn(), f = PS(), h = NS(), m = $v(), p = _t(), g = Cn(), b = $S(), v = Xt(), w = LS(), x = Tr(), C = Qr(), S = 1, A = 2, P = 4, k = "[object Arguments]", I = "[object Array]", _ = "[object Boolean]", M = "[object Date]", E = "[object Error]", T = "[object Function]", $ = "[object GeneratorFunction]", F = "[object Map]", N = "[object Number]", O = "[object Object]", Y = "[object RegExp]", oe = "[object Set]", te = "[object String]", re = "[object Symbol]", pe = "[object WeakMap]", q = "[object ArrayBuffer]", z = "[object DataView]", G = "[object Float32Array]", B = "[object Float64Array]", se = "[object Int8Array]", X = "[object Int16Array]", H = "[object Int32Array]", ne = "[object Uint8Array]", ye = "[object Uint8ClampedArray]", xe = "[object Uint16Array]", he = "[object Uint32Array]", ge = {};
11336
+ ge[k] = ge[I] = ge[q] = ge[z] = ge[_] = ge[M] = ge[G] = ge[B] = ge[se] = ge[X] = ge[H] = ge[F] = ge[N] = ge[O] = ge[Y] = ge[oe] = ge[te] = ge[re] = ge[ne] = ge[ye] = ge[xe] = ge[he] = !0, ge[E] = ge[T] = ge[pe] = !1;
11337
11337
  function Z(U, be, K, ve, Se, je) {
11338
- var We, he = be & S, ke = be & A, Be = be & P;
11338
+ var We, ue = be & S, ke = be & A, Be = be & P;
11339
11339
  if (K && (We = Se ? K(U, ve, Se, je) : K(U)), We !== void 0)
11340
11340
  return We;
11341
11341
  if (!v(U))
11342
11342
  return U;
11343
11343
  var Te = p(U);
11344
11344
  if (Te) {
11345
- if (We = f(U), !he)
11345
+ if (We = f(U), !ue)
11346
11346
  return s(U, We);
11347
11347
  } else {
11348
11348
  var ze = u(U), ot = ze == T || ze == $;
11349
11349
  if (g(U))
11350
- return i(U, he);
11350
+ return i(U, ue);
11351
11351
  if (ze == O || ze == k || ot && !Se) {
11352
- if (We = ke || ot ? {} : m(U), !he)
11352
+ if (We = ke || ot ? {} : m(U), !ue)
11353
11353
  return ke ? c(U, o(We, U)) : a(U, n(We, U));
11354
11354
  } else {
11355
11355
  if (!ge[ze])
11356
11356
  return Se ? U : {};
11357
- We = h(U, ze, he);
11357
+ We = h(U, ze, ue);
11358
11358
  }
11359
11359
  }
11360
11360
  je || (je = new e());
@@ -11363,12 +11363,12 @@ function qv() {
11363
11363
  return ht;
11364
11364
  je.set(U, We), w(U) ? U.forEach(function(nt) {
11365
11365
  We.add(Z(nt, be, K, nt, U, je));
11366
- }) : b(U) && U.forEach(function(nt, ut) {
11367
- We.set(ut, Z(nt, be, K, ut, U, je));
11366
+ }) : b(U) && U.forEach(function(nt, ct) {
11367
+ We.set(ct, Z(nt, be, K, ct, U, je));
11368
11368
  });
11369
11369
  var Me = Be ? ke ? d : l : ke ? C : x, Qe = Te ? void 0 : Me(U);
11370
- return r(Qe || U, function(nt, ut) {
11371
- Qe && (ut = nt, nt = U[ut]), t(We, ut, Z(nt, be, K, ut, U, je));
11370
+ return r(Qe || U, function(nt, ct) {
11371
+ Qe && (ct = nt, nt = U[ct]), t(We, ct, Z(nt, be, K, ct, U, je));
11372
11372
  }), We;
11373
11373
  }
11374
11374
  return os = Z, os;
@@ -15164,22 +15164,22 @@ function XE() {
15164
15164
  function T(q) {
15165
15165
  var z = Number.POSITIVE_INFINITY, G = 0, B = Number.POSITIVE_INFINITY, se = 0, X = q.graph(), H = X.marginx || 0, ne = X.marginy || 0;
15166
15166
  function ye(xe) {
15167
- var fe = xe.x, ge = xe.y, Z = xe.width, U = xe.height;
15168
- z = Math.min(z, fe - Z / 2), G = Math.max(G, fe + Z / 2), B = Math.min(B, ge - U / 2), se = Math.max(se, ge + U / 2);
15167
+ var he = xe.x, ge = xe.y, Z = xe.width, U = xe.height;
15168
+ z = Math.min(z, he - Z / 2), G = Math.max(G, he + Z / 2), B = Math.min(B, ge - U / 2), se = Math.max(se, ge + U / 2);
15169
15169
  }
15170
15170
  e.forEach(q.nodes(), function(xe) {
15171
15171
  ye(q.node(xe));
15172
15172
  }), e.forEach(q.edges(), function(xe) {
15173
- var fe = q.edge(xe);
15174
- e.has(fe, "x") && ye(fe);
15173
+ var he = q.edge(xe);
15174
+ e.has(he, "x") && ye(he);
15175
15175
  }), z -= H, B -= ne, e.forEach(q.nodes(), function(xe) {
15176
- var fe = q.node(xe);
15177
- fe.x -= z, fe.y -= B;
15176
+ var he = q.node(xe);
15177
+ he.x -= z, he.y -= B;
15178
15178
  }), e.forEach(q.edges(), function(xe) {
15179
- var fe = q.edge(xe);
15180
- e.forEach(fe.points, function(ge) {
15179
+ var he = q.edge(xe);
15180
+ e.forEach(he.points, function(ge) {
15181
15181
  ge.x -= z, ge.y -= B;
15182
- }), e.has(fe, "x") && (fe.x -= z), e.has(fe, "y") && (fe.y -= B);
15182
+ }), e.has(he, "x") && (he.x -= z), e.has(he, "y") && (he.y -= B);
15183
15183
  }), X.width = G - z + H, X.height = se - B + ne;
15184
15184
  }
15185
15185
  function $(q) {
@@ -16159,16 +16159,16 @@ function lA({
16159
16159
  const H = X.cloneNode(!0);
16160
16160
  H.removeAttribute("data-node-id"), H.removeAttribute("data-grid-dragging"), H.removeAttribute("data-grid-draggable"), H.removeAttribute("data-grid-drop-target"), H.setAttribute("data-grid-preview", e), H.setAttribute("aria-hidden", "true"), H.setAttribute("inert", "");
16161
16161
  const ne = [H, ...H.querySelectorAll("*")], ye = new Map(
16162
- ne.filter((fe) => fe.id).map((fe) => [fe.id, `${fe.id}-${Y}`])
16162
+ ne.filter((he) => he.id).map((he) => [he.id, `${he.id}-${Y}`])
16163
16163
  );
16164
- for (const fe of ne) {
16165
- fe.id && (fe.id = ye.get(fe.id));
16166
- for (const ge of [...fe.attributes]) {
16164
+ for (const he of ne) {
16165
+ he.id && (he.id = ye.get(he.id));
16166
+ for (const ge of [...he.attributes]) {
16167
16167
  if (ge.name === "id") continue;
16168
16168
  let Z = ge.value;
16169
16169
  for (const [U, be] of ye)
16170
16170
  Z === `#${U}` && (Z = `#${be}`), Z = Z.split(`url(#${U})`).join(`url(#${be})`);
16171
- Z !== ge.value && fe.setAttribute(ge.name, Z);
16171
+ Z !== ge.value && he.setAttribute(ge.name, Z);
16172
16172
  }
16173
16173
  }
16174
16174
  if (Object.assign(H.style, {
@@ -16178,21 +16178,21 @@ function lA({
16178
16178
  outline: "none",
16179
16179
  visibility: "visible"
16180
16180
  }), re) {
16181
- const fe = getComputedStyle(X);
16181
+ const he = getComputedStyle(X);
16182
16182
  H.setAttribute("data-grid-preview-floating", ""), Object.assign(H.style, {
16183
16183
  position: "fixed",
16184
16184
  left: "0",
16185
16185
  top: "0",
16186
16186
  transformOrigin: "top left",
16187
- font: fe.font,
16188
- color: fe.color
16187
+ font: he.font,
16188
+ color: he.color
16189
16189
  });
16190
16190
  for (const ge of ne)
16191
16191
  ge.removeAttribute("data-node-id"), ge.style.pointerEvents = "none";
16192
16192
  }
16193
16193
  return H.querySelectorAll(
16194
16194
  ".flow-sdk-node-animation, .flow-sdk-handle, .flow-sdk-property-port, [data-flow-collapse-control]"
16195
- ).forEach((fe) => fe.remove()), (xe = re ? document.body : X.parentElement) == null || xe.appendChild(
16195
+ ).forEach((he) => he.remove()), (xe = re ? document.body : X.parentElement) == null || xe.appendChild(
16196
16196
  H
16197
16197
  ), oe.current = H, () => {
16198
16198
  H.remove(), oe.current = void 0;
@@ -16206,8 +16206,8 @@ function lA({
16206
16206
  X.style.transform = `translate3d(${K}px, ${ve}px, 0) scale(${U}, ${be})`, X.style.width = `${ge.offsetWidth}px`, X.style.height = `${ge.offsetHeight}px`;
16207
16207
  return;
16208
16208
  }
16209
- const xe = ye ? Math.round(H - ye.w / 2) : H, fe = ye ? Math.round(ne - ye.h / 2) : ne;
16210
- X.style.transform = ye ? `translate3d(${xe}px, ${fe}px, 0)` : `translate(-50%, -50%) translate3d(${xe}px, ${fe}px, 0)`, X.style.width = ye ? `${Math.round(H + ye.w / 2) - xe}px` : "", X.style.height = ye ? `${Math.round(ne + ye.h / 2) - fe}px` : "", ye && (X.style.setProperty("--flow-grid-width", `${ye.w}px`), X.style.setProperty("--flow-grid-height", `${ye.h}px`), X.style.setProperty(
16209
+ const xe = ye ? Math.round(H - ye.w / 2) : H, he = ye ? Math.round(ne - ye.h / 2) : ne;
16210
+ X.style.transform = ye ? `translate3d(${xe}px, ${he}px, 0)` : `translate(-50%, -50%) translate3d(${xe}px, ${he}px, 0)`, X.style.width = ye ? `${Math.round(H + ye.w / 2) - xe}px` : "", X.style.height = ye ? `${Math.round(ne + ye.h / 2) - he}px` : "", ye && (X.style.setProperty("--flow-grid-width", `${ye.w}px`), X.style.setProperty("--flow-grid-height", `${ye.h}px`), X.style.setProperty(
16211
16211
  "--flow-grid-font",
16212
16212
  `${Math.max(12, Math.min(48, ye.w / 8, ye.h / 5))}px`
16213
16213
  ));
@@ -16225,7 +16225,7 @@ function lA({
16225
16225
  const H = () => {
16226
16226
  const xe = hv(X);
16227
16227
  O(
16228
- (fe) => JSON.stringify(fe) === JSON.stringify(xe) ? fe : xe
16228
+ (he) => JSON.stringify(he) === JSON.stringify(xe) ? he : xe
16229
16229
  ), _ == null || _(e, xe);
16230
16230
  };
16231
16231
  H();
@@ -16248,8 +16248,8 @@ function lA({
16248
16248
  ye.disconnect(), ye.observe(X), X.querySelectorAll("[data-flow-property]").forEach((ge) => ye.observe(ge)), ne();
16249
16249
  };
16250
16250
  xe();
16251
- const fe = new MutationObserver(xe);
16252
- return fe.observe(X, {
16251
+ const he = new MutationObserver(xe);
16252
+ return he.observe(X, {
16253
16253
  childList: !0,
16254
16254
  subtree: !0,
16255
16255
  characterData: !0,
@@ -16262,7 +16262,7 @@ function lA({
16262
16262
  "data-flow-port-placement"
16263
16263
  ]
16264
16264
  }), X.addEventListener("scroll", ne, !0), () => {
16265
- ye.disconnect(), fe.disconnect(), X.removeEventListener("scroll", ne, !0);
16265
+ ye.disconnect(), he.disconnect(), X.removeEventListener("scroll", ne, !0);
16266
16266
  };
16267
16267
  }, [e, A, I, M]);
16268
16268
  const pe = c ? Math.round(r - c.w / 2) : 0, q = c ? Math.round(t - c.h / 2) : 0, z = c ? Math.round(r + c.w / 2) - pe : void 0, G = c ? Math.round(t + c.h / 2) - q : void 0;
@@ -16654,9 +16654,9 @@ function mA(e) {
16654
16654
  () => /* @__PURE__ */ new Map()
16655
16655
  ), ne = le(X);
16656
16656
  ne.current = X;
16657
- const [ye, xe] = ae(/* @__PURE__ */ new Map()), fe = le(ye), ge = () => {
16658
- fe.current = /* @__PURE__ */ new Map(), xe(fe.current);
16659
- }, Z = le(/* @__PURE__ */ new Map()), U = le(null), be = le(!1), [K, ve] = ae(0), Se = le(), je = le(), We = le(null), he = le(), ke = le(!1), Be = le(null), Te = le(null), ze = le(), ot = le(l), ht = s, Me = le(ht), [Qe, nt] = ae(!0), [ut, Dt] = ae(
16657
+ const [ye, xe] = ae(/* @__PURE__ */ new Map()), he = le(ye), ge = () => {
16658
+ he.current = /* @__PURE__ */ new Map(), xe(he.current);
16659
+ }, Z = le(/* @__PURE__ */ new Map()), U = le(null), be = le(!1), [K, ve] = ae(0), Se = le(), je = le(), We = le(null), ue = le(), ke = le(!1), Be = le(null), Te = le(null), ze = le(), ot = le(l), ht = s, Me = le(ht), [Qe, nt] = ae(!0), [ct, Dt] = ae(
16660
16660
  !!((Iu = e.initialNodeGrid) != null && Iu.enabled)
16661
16661
  ), [Tt, tn] = ae([]), st = le(
16662
16662
  (Nu = e.initialNodeGrid) != null && Nu.enabled ? {
@@ -16675,14 +16675,14 @@ function mA(e) {
16675
16675
  $r.current = (C == null ? void 0 : C.mode) === "connections" ? 1.25 : 1;
16676
16676
  const zt = le(null), qr = le(r), Qt = le([]), or = le(!1), Cr = () => {
16677
16677
  var R;
16678
- (R = We.current) == null || R.call(We), We.current = null, he.current = void 0;
16678
+ (R = We.current) == null || R.call(We), We.current = null, ue.current = void 0;
16679
16679
  }, Ve = () => {
16680
16680
  Te.current = null, Qt.current.length && (or.current = !0), !be.current && M.current.fitOnInit !== !1 && (ke.current = !0), clearTimeout(je.current), je.current = setTimeout(() => {
16681
16681
  be.current = ne.current.size > 0, ve((R) => R + 1);
16682
16682
  }, gA);
16683
- }, de = (R, L, j, J = Ve, ue) => {
16683
+ }, de = (R, L, j, J = Ve, fe) => {
16684
16684
  Cr();
16685
- const Ne = new Map(ne.current), Ee = new Map([...O.current, ...fe.current]);
16685
+ const Ne = new Map(ne.current), Ae = new Map([...O.current, ...he.current]);
16686
16686
  We.current = lv(
16687
16687
  L,
16688
16688
  (Re) => {
@@ -16696,16 +16696,16 @@ function mA(e) {
16696
16696
  y: Ue.y + (we.y - Ue.y) * Re
16697
16697
  } : we
16698
16698
  );
16699
- }), ne.current = it, H(it), ue) {
16699
+ }), ne.current = it, H(it), fe) {
16700
16700
  const we = /* @__PURE__ */ new Map();
16701
- for (const [Le, Ue] of ue) {
16702
- const Q = Ee.get(Le) ?? Ue;
16701
+ for (const [Le, Ue] of fe) {
16702
+ const Q = Ae.get(Le) ?? Ue;
16703
16703
  we.set(Le, {
16704
16704
  w: Q.w + (Ue.w - Q.w) * Re,
16705
16705
  h: Q.h + (Ue.h - Q.h) * Re
16706
16706
  });
16707
16707
  }
16708
- fe.current = we, xe(we);
16708
+ he.current = we, xe(we);
16709
16709
  }
16710
16710
  j == null || j(Re);
16711
16711
  },
@@ -16717,7 +16717,7 @@ function mA(e) {
16717
16717
  Ct.arrangeNodesInGrid(st.current.options);
16718
16718
  return;
16719
16719
  }
16720
- fe.current.size && ge();
16720
+ he.current.size && ge();
16721
16721
  const R = M.current, L = $r.current, j = _.current, J = j.nodes.map((we) => {
16722
16722
  const Le = Y.current.get(we.id);
16723
16723
  Le && (Le.offsetWidth || Le.offsetHeight) && O.current.set(we.id, {
@@ -16727,13 +16727,13 @@ function mA(e) {
16727
16727
  const Ue = O.current.get(we.id) || go;
16728
16728
  return { id: we.id, parent: we.parent, width: Ue.w, height: Ue.h };
16729
16729
  });
16730
- let ue;
16730
+ let fe;
16731
16731
  try {
16732
16732
  const we = R.compactPropertyLayout, Le = R.edgeMode !== "nodes" && R.edgeMode !== "workflow", Ue = j.edges.map((Q) => ({
16733
16733
  ...Q,
16734
16734
  connectorClearance: we ? Le && (Q.sourceProperty !== void 0 || Q.targetProperty !== void 0) ? NC : IC : 0
16735
16735
  }));
16736
- ue = rA(J, Ue, {
16736
+ fe = rA(J, Ue, {
16737
16737
  edgeLabelFontSize: R.edgeMode === "nodes" || R.edgeMode === "workflow" ? pv : Co,
16738
16738
  rankDir: R.direction,
16739
16739
  compact: we,
@@ -16750,25 +16750,25 @@ function mA(e) {
16750
16750
  }
16751
16751
  const Ne = Te.current ? null : U.current;
16752
16752
  U.current = null;
16753
- const Ee = Ne && ue.get(Ne.id);
16754
- if (Ne && Ee) {
16753
+ const Ae = Ne && fe.get(Ne.id);
16754
+ if (Ne && Ae) {
16755
16755
  const we = {
16756
- x: Ne.position.x - Ee.x,
16757
- y: Ne.position.y - Ee.y
16756
+ x: Ne.position.x - Ae.x,
16757
+ y: Ne.position.y - Ae.y
16758
16758
  };
16759
- ue = new Map(
16760
- [...ue].map(([Le, Ue]) => [
16759
+ fe = new Map(
16760
+ [...fe].map(([Le, Ue]) => [
16761
16761
  Le,
16762
16762
  { x: Ue.x + we.x, y: Ue.y + we.y }
16763
16763
  ])
16764
16764
  );
16765
16765
  }
16766
16766
  for (const [we, Le] of Z.current)
16767
- ue.has(we) ? ue.set(we, Le) : R.nodes.some((Ue) => Ue.id === we) || Z.current.delete(we);
16767
+ fe.has(we) ? fe.set(we, Le) : R.nodes.some((Ue) => Ue.id === we) || Z.current.delete(we);
16768
16768
  if (Te.current) {
16769
16769
  const we = JSON.stringify([
16770
16770
  J,
16771
- [...ue],
16771
+ [...fe],
16772
16772
  N.size,
16773
16773
  R.isPerformanceMode,
16774
16774
  R.disableAnimations
@@ -16780,11 +16780,11 @@ function mA(e) {
16780
16780
  const Re = N.coordinate(
16781
16781
  () => {
16782
16782
  var we;
16783
- return (we = Te.current) == null ? void 0 : we.call(Te, ue);
16783
+ return (we = Te.current) == null ? void 0 : we.call(Te, fe);
16784
16784
  }
16785
16785
  );
16786
16786
  de(
16787
- ue,
16787
+ fe,
16788
16788
  be.current && !R.isPerformanceMode && !R.disableAnimations,
16789
16789
  Re
16790
16790
  );
@@ -16828,12 +16828,12 @@ function mA(e) {
16828
16828
  const De = gt(
16829
16829
  (R, L) => {
16830
16830
  var j, J;
16831
- if (!te.current && typeof ResizeObserver < "u" && (te.current = new ResizeObserver((ue) => {
16831
+ if (!te.current && typeof ResizeObserver < "u" && (te.current = new ResizeObserver((fe) => {
16832
16832
  let Ne = !1;
16833
- for (const Ee of ue) {
16834
- const Re = oe.current.get(Ee.target);
16835
- if (!Re || fe.current.has(Re)) continue;
16836
- const it = Ee.target, we = it.offsetWidth, Le = it.offsetHeight;
16833
+ for (const Ae of fe) {
16834
+ const Re = oe.current.get(Ae.target);
16835
+ if (!Re || he.current.has(Re)) continue;
16836
+ const it = Ae.target, we = it.offsetWidth, Le = it.offsetHeight;
16837
16837
  if (!we && !Le) continue;
16838
16838
  const Ue = O.current.get(Re);
16839
16839
  if (Ue && Ue.w === we && Ue.h === Le) continue;
@@ -16843,11 +16843,11 @@ function mA(e) {
16843
16843
  Ne && ie();
16844
16844
  })), L) {
16845
16845
  Y.current.set(R, L), oe.current.set(L, R), (j = te.current) == null || j.observe(L);
16846
- const ue = L.offsetWidth, Ne = L.offsetHeight;
16847
- !fe.current.has(R) && (ue || Ne) && O.current.set(R, { w: ue, h: Ne });
16846
+ const fe = L.offsetWidth, Ne = L.offsetHeight;
16847
+ !he.current.has(R) && (fe || Ne) && O.current.set(R, { w: fe, h: Ne });
16848
16848
  } else {
16849
- const ue = Y.current.get(R);
16850
- ue && ((J = te.current) == null || J.unobserve(ue), oe.current.delete(ue)), Y.current.delete(R), O.current.delete(R), B.current.has(R) && se(R, []);
16849
+ const fe = Y.current.get(R);
16850
+ fe && ((J = te.current) == null || J.unobserve(fe), oe.current.delete(fe)), Y.current.delete(R), O.current.delete(R), B.current.has(R) && se(R, []);
16851
16851
  }
16852
16852
  ie();
16853
16853
  },
@@ -16859,7 +16859,7 @@ function mA(e) {
16859
16859
  }, []);
16860
16860
  const V = (R) => {
16861
16861
  var J;
16862
- const L = (J = M.current.nodes.find((ue) => ue.id === R)) == null ? void 0 : J.label;
16862
+ const L = (J = M.current.nodes.find((fe) => fe.id === R)) == null ? void 0 : J.label;
16863
16863
  if (!L) return;
16864
16864
  const j = M.current.containerStyle(R);
16865
16865
  return {
@@ -16890,9 +16890,9 @@ function mA(e) {
16890
16890
  if (L) return bC(L);
16891
16891
  const j = ne.current.get(R);
16892
16892
  if (!j) return;
16893
- const J = fe.current.get(R) || O.current.get(R) || go;
16893
+ const J = he.current.get(R) || O.current.get(R) || go;
16894
16894
  return { x: j.x, y: j.y, w: J.w, h: J.h };
16895
- }, []), ct = rt(() => {
16895
+ }, []), lt = rt(() => {
16896
16896
  const R = /* @__PURE__ */ new Map();
16897
16897
  for (const L of r) {
16898
16898
  const j = Ge(L.id);
@@ -16915,16 +16915,16 @@ function mA(e) {
16915
16915
  n,
16916
16916
  Ge
16917
16917
  ]);
16918
- B.current = ct;
16918
+ B.current = lt;
16919
16919
  const tt = (R, L) => {
16920
- var ue;
16920
+ var fe;
16921
16921
  if (!P || L === void 0) return;
16922
- const j = (ue = ct.get(R)) == null ? void 0 : ue.find((Ne) => Ne.property === L), J = Ge(R);
16922
+ const j = (fe = lt.get(R)) == null ? void 0 : fe.find((Ne) => Ne.property === L), J = Ge(R);
16923
16923
  return j && !j.anchor && J ? J.y - J.h / 2 + j.top + j.height / 2 : void 0;
16924
16924
  }, Mt = (R, L) => {
16925
- var ue, Ne;
16925
+ var fe, Ne;
16926
16926
  if (L === void 0) return;
16927
- const j = (Ne = (ue = ct.get(R)) == null ? void 0 : ue.find((Ee) => Ee.property === L)) == null ? void 0 : Ne.anchor, J = Ge(R);
16927
+ const j = (Ne = (fe = lt.get(R)) == null ? void 0 : fe.find((Ae) => Ae.property === L)) == null ? void 0 : Ne.anchor, J = Ge(R);
16928
16928
  return j && J ? {
16929
16929
  x: J.x - J.w / 2 + j.x,
16930
16930
  y: J.y - J.h / 2 + j.y,
@@ -16984,8 +16984,8 @@ function mA(e) {
16984
16984
  () => J.classList.remove("flow-sdk-busy"),
16985
16985
  150
16986
16986
  )), R === null && (R = requestAnimationFrame(() => {
16987
- var ue, Ne;
16988
- R = null, (Ne = (ue = M.current).onViewportChange) == null || Ne.call(ue, N.state);
16987
+ var fe, Ne;
16988
+ R = null, (Ne = (fe = M.current).onViewportChange) == null || Ne.call(fe, N.state);
16989
16989
  }));
16990
16990
  });
16991
16991
  return () => {
@@ -16995,15 +16995,15 @@ function mA(e) {
16995
16995
  const R = E.current;
16996
16996
  if (!R) return;
16997
16997
  const L = () => {
16998
- var Ee;
16998
+ var Ae;
16999
16999
  if (!R.getClientRects().length) return;
17000
- let J = R.clientWidth, ue = R.clientHeight;
17001
- ue || (ue = Math.max(
17000
+ let J = R.clientWidth, fe = R.clientHeight;
17001
+ fe || (fe = Math.max(
17002
17002
  0,
17003
17003
  window.innerHeight - R.getBoundingClientRect().top - 100
17004
- ), ue && (R.style.height = `${ue}px`)), J || (J = window.innerWidth, J && (R.style.width = `${J}px`));
17005
- const Ne = N.size.w !== J || N.size.h !== ue;
17006
- N.size = { w: J, h: ue }, Ne && ((Ee = st.current) != null && Ee.options.fill) && (!be.current && J > 0 && ue > 0 ? W() : ie()), !be.current && !ne.current.size && M.current.fitOnInit !== !1 && (N.set({ x: J / 2, y: ue / 2 }), Gt());
17004
+ ), fe && (R.style.height = `${fe}px`)), J || (J = window.innerWidth, J && (R.style.width = `${J}px`));
17005
+ const Ne = N.size.w !== J || N.size.h !== fe;
17006
+ N.size = { w: J, h: fe }, Ne && ((Ae = st.current) != null && Ae.options.fill) && (!be.current && J > 0 && fe > 0 ? W() : ie()), !be.current && !ne.current.size && M.current.fitOnInit !== !1 && (N.set({ x: J / 2, y: fe / 2 }), Gt());
17007
17007
  };
17008
17008
  if (L(), typeof ResizeObserver > "u") return;
17009
17009
  const j = new ResizeObserver(L);
@@ -17012,8 +17012,8 @@ function mA(e) {
17012
17012
  if (or.current) {
17013
17013
  or.current = !1;
17014
17014
  const L = Qt.current.flatMap((J) => {
17015
- const ue = Ge(J);
17016
- return ue ? [cr(ue)] : [];
17015
+ const fe = Ge(J);
17016
+ return fe ? [cr(fe)] : [];
17017
17017
  });
17018
17018
  Qt.current = [];
17019
17019
  const j = ci(L);
@@ -17062,28 +17062,28 @@ function mA(e) {
17062
17062
  viewportSize: { ...N.size }
17063
17063
  };
17064
17064
  }, j = (Q) => cf(Q, M.current.nodes, M.current.edges), J = (Q, ee = !0, me = () => {
17065
- }, ce, He, Ae = !1) => {
17066
- clearTimeout(Se.current), clearTimeout(je.current), Ae || (Te.current = null), Be.current = null, ke.current = !1, Qt.current = [], or.current = !1;
17065
+ }, ce, He, Ee = !1) => {
17066
+ clearTimeout(Se.current), clearTimeout(je.current), Ee || (Te.current = null), Be.current = null, ke.current = !1, Qt.current = [], or.current = !1;
17067
17067
  const Pe = ee && !M.current.isPerformanceMode && !M.current.disableAnimations, at = N.coordinate(() => {
17068
- var lt;
17069
- ce ? ce(Pe) : Ae && ((lt = Te.current) == null || lt.call(Te, Q));
17068
+ var dt;
17069
+ ce ? ce(Pe) : Ee && ((dt = Te.current) == null || dt.call(Te, Q));
17070
17070
  });
17071
17071
  de(
17072
- new Map([...Q].map(([lt, ft]) => [lt, { ...ft }])),
17072
+ new Map([...Q].map(([dt, ft]) => [dt, { ...ft }])),
17073
17073
  Pe,
17074
17074
  at,
17075
17075
  me,
17076
17076
  He
17077
17077
  );
17078
- }, ue = (Q, ee = 50, me = M.current.animateViewport, ce = 1, He = !1, Ae) => {
17078
+ }, fe = (Q, ee = 50, me = M.current.animateViewport, ce = 1, He = !1, Ee) => {
17079
17079
  const Pe = (at) => {
17080
- const lt = _.current, ft = Q ?? new Set(lt.nodes.map((wt) => wt.id)), ir = new Set(
17081
- lt.nodes.map((wt) => wt.parent).filter(Boolean)
17080
+ const dt = _.current, ft = Q ?? new Set(dt.nodes.map((wt) => wt.id)), ir = new Set(
17081
+ dt.nodes.map((wt) => wt.parent).filter(Boolean)
17082
17082
  );
17083
17083
  if (!at && (!Q || [...Q].some((wt) => ir.has(wt))))
17084
17084
  return;
17085
17085
  const hr = at && Bd(
17086
- lt.nodes,
17086
+ dt.nodes,
17087
17087
  at,
17088
17088
  O.current,
17089
17089
  (wt) => M.current.containerStyle(wt).padding,
@@ -17098,7 +17098,7 @@ function mA(e) {
17098
17098
  );
17099
17099
  let ar = ci([...kn.values()]);
17100
17100
  if (!ar) return;
17101
- const Sr = Ae ? kn.get(Ae) : void 0;
17101
+ const Sr = Ee ? kn.get(Ee) : void 0;
17102
17102
  if (Sr) {
17103
17103
  const wt = (Sr.x1 + Sr.x2) / 2, sr = (Sr.y1 + Sr.y2) / 2, er = Math.max(wt - ar.x1, ar.x2 - wt), _r = Math.max(sr - ar.y1, ar.y2 - sr);
17104
17104
  ar = {
@@ -17117,18 +17117,18 @@ function mA(e) {
17117
17117
  };
17118
17118
  Te.current = He ? Pe : null, He || Pe(ne.current);
17119
17119
  }, Ne = (Q, ee, me, ce) => {
17120
- var Ae;
17120
+ var Ee;
17121
17121
  if (!Ge(Q)) return;
17122
17122
  const He = ee === "connections" ? Re(Q) : j(Q);
17123
- if (ee === "connections" && $r.current === 1.25 && ((Ae = mt.current) == null ? void 0 : Ae.size) === He.size && [...He].every((Pe) => mt.current.has(Pe))) {
17123
+ if (ee === "connections" && $r.current === 1.25 && ((Ee = mt.current) == null ? void 0 : Ee.size) === He.size && [...He].every((Pe) => mt.current.has(Pe))) {
17124
17124
  S({ id: Q, mode: ee });
17125
17125
  return;
17126
17126
  }
17127
17127
  zt.current || (zt.current = {
17128
17128
  pan: { ...N.pan },
17129
17129
  zoom: N.zoom
17130
- }), mt.current = He, M.current.compactPropertyLayout && (ke.current = !1, Be.current = () => ue(mt.current ?? He, me, ce)), S({ id: Q, mode: ee }), M.current.compactPropertyLayout || ue(He, me, ce);
17131
- }, Ee = (Q) => {
17130
+ }), mt.current = He, M.current.compactPropertyLayout && (ke.current = !1, Be.current = () => fe(mt.current ?? He, me, ce)), S({ id: Q, mode: ee }), M.current.compactPropertyLayout || fe(He, me, ce);
17131
+ }, Ae = (Q) => {
17132
17132
  Be.current ? Be.current = Q : Q();
17133
17133
  }, Re = (Q) => pf(Q, M.current.nodes, M.current.edges), it = ((Q) => {
17134
17134
  var ee, me, ce;
@@ -17143,10 +17143,10 @@ function mA(e) {
17143
17143
  return { x: Q - ((me == null ? void 0 : me.left) ?? 0), y: ee - ((me == null ? void 0 : me.top) ?? 0) };
17144
17144
  }, Ue = (Q = 0, ee = M.current.animateViewport, me = !1) => {
17145
17145
  if (me) {
17146
- ue(void 0, Q, ee, 1, !0);
17146
+ fe(void 0, Q, ee, 1, !0);
17147
17147
  return;
17148
17148
  }
17149
- Te.current = null, Ee(() => {
17149
+ Te.current = null, Ae(() => {
17150
17150
  const ce = Wt();
17151
17151
  ce && N.fit(ce, Q, ee);
17152
17152
  });
@@ -17155,21 +17155,21 @@ function mA(e) {
17155
17155
  zoom: it,
17156
17156
  pan: we,
17157
17157
  setEdgesVisible: nt,
17158
- focusNode: (Q, ee, me, ce) => Ee(
17159
- () => ue(/* @__PURE__ */ new Set([Q]), ee, me, 0.6, ce)
17158
+ focusNode: (Q, ee, me, ce) => Ae(
17159
+ () => fe(/* @__PURE__ */ new Set([Q]), ee, me, 0.6, ce)
17160
17160
  ),
17161
- focusBranch: (Q, ee, me, ce, He = !1) => Ee(
17162
- () => ue(
17161
+ focusBranch: (Q, ee, me, ce, He = !1, Ee = 1) => Ae(
17162
+ () => fe(
17163
17163
  j(Q),
17164
17164
  ee,
17165
17165
  me,
17166
- 1,
17166
+ Ee,
17167
17167
  ce,
17168
17168
  He ? Q : void 0
17169
17169
  )
17170
17170
  ),
17171
- focusConnections: (Q, ee, me, ce) => Ee(
17172
- () => ue(Re(Q), ee, me, 1, ce)
17171
+ focusConnections: (Q, ee, me, ce) => Ae(
17172
+ () => fe(Re(Q), ee, me, 1, ce)
17173
17173
  ),
17174
17174
  isolateConnections: (Q, ee, me) => Ne(Q, "connections", ee, me),
17175
17175
  isolateBranch: (Q, ee, me) => Ne(Q, "branch", ee, me),
@@ -17177,10 +17177,10 @@ function mA(e) {
17177
17177
  Te.current = null;
17178
17178
  const ce = me && !st.current && !mt.current, He = M.current.compactPropertyLayout && !!mt.current;
17179
17179
  mt.current = null, S(null);
17180
- const Ae = ee ?? zt.current;
17181
- zt.current = null, Ae && ce ? (ke.current = !1, Be.current = null, U.current = null, Te.current = () => N.transition(Ae, Q), ie()) : He ? Be.current = () => {
17182
- Ae && N.transition(Ae, Q);
17183
- } : Ae && Ee(() => N.transition(Ae, Q));
17180
+ const Ee = ee ?? zt.current;
17181
+ zt.current = null, Ee && ce ? (ke.current = !1, Be.current = null, U.current = null, Te.current = () => N.transition(Ee, Q), ie()) : He ? Be.current = () => {
17182
+ Ee && N.transition(Ee, Q);
17183
+ } : Ee && Ae(() => N.transition(Ee, Q));
17184
17184
  },
17185
17185
  zoomAt: (Q, ee) => {
17186
17186
  var me, ce, He;
@@ -17205,8 +17205,8 @@ function mA(e) {
17205
17205
  return v0(
17206
17206
  {
17207
17207
  ...ee,
17208
- sizes: new Map([...ee.sizes, ...fe.current]),
17209
- fixedSizes: fe.current
17208
+ sizes: new Map([...ee.sizes, ...he.current]),
17209
+ fixedSizes: he.current
17210
17210
  },
17211
17211
  Q
17212
17212
  );
@@ -17233,29 +17233,29 @@ function mA(e) {
17233
17233
  me.order.push(
17234
17234
  ...ee.nodes.filter((ft) => !at.has(ft.id)).map((ft) => ft.id)
17235
17235
  );
17236
- const lt = new Map(me.order.map((ft, ir) => [ft, ir]));
17236
+ const dt = new Map(me.order.map((ft, ir) => [ft, ir]));
17237
17237
  ee.nodes = [...ee.nodes].sort(
17238
- (ft, ir) => lt.get(ft.id) - lt.get(ir.id)
17238
+ (ft, ir) => dt.get(ft.id) - dt.get(ir.id)
17239
17239
  );
17240
17240
  }
17241
17241
  const ce = Ad(ee, R(Q)), He = ce.sizes ? JSON.stringify([[...ce.positions], [...ce.sizes]]) : void 0;
17242
- if (He && He === he.current && Q.animate !== !1 && !Te.current)
17242
+ if (He && He === ue.current && Q.animate !== !1 && !Te.current)
17243
17243
  return ce;
17244
17244
  tn(ce.dividers ?? []), me && (me.ready = !1);
17245
- const Ae = () => {
17245
+ const Ee = () => {
17246
17246
  me && (me.ready = !0), me && ee.nodes.length && !be.current && (be.current = !0, M.current.fitOnInit !== !1 && !Q.fill ? Ct.centerAndFit(50, !1) : M.current.fitOnInit === !1 && N.transition(h, !1)), ve((Pe) => Pe + 1);
17247
17247
  };
17248
- return !ce.sizes && fe.current.size && ge(), ee.nodes.some((Pe) => !ne.current.has(Pe.id)) || ce.movedNodeIds.length || ce.bounds || Te.current ? J(
17248
+ return !ce.sizes && he.current.size && ge(), ee.nodes.some((Pe) => !ne.current.has(Pe.id)) || ce.movedNodeIds.length || ce.bounds || Te.current ? J(
17249
17249
  ce.positions,
17250
17250
  Q.animate,
17251
- Ae,
17252
- ce.bounds && (!me || !fe.current.size) ? (Pe) => N.transition({ zoom: 1, pan: { x: 0, y: 0 } }, Pe) : void 0,
17251
+ Ee,
17252
+ ce.bounds && (!me || !he.current.size) ? (Pe) => N.transition({ zoom: 1, pan: { x: 0, y: 0 } }, Pe) : void 0,
17253
17253
  ce.sizes,
17254
17254
  !!me && !ce.bounds
17255
- ) : Ae(), he.current = He, ce;
17255
+ ) : Ee(), ue.current = He, ce;
17256
17256
  },
17257
17257
  setNodeGridMode: (Q, ee = {}) => {
17258
- var me, ce, He, Ae;
17258
+ var me, ce, He, Ee;
17259
17259
  if (ee.order && (!Array.isArray(ee.order) || ee.order.some((Pe) => typeof Pe != "string") || new Set(ee.order).size !== ee.order.length))
17260
17260
  throw new Error("Invalid grid node order.");
17261
17261
  if (Q) {
@@ -17265,9 +17265,9 @@ function mA(e) {
17265
17265
  options: ee,
17266
17266
  order: L().nodes.map((at) => at.id),
17267
17267
  previousPositions: new Map(
17268
- [...ne.current].map(([at, lt]) => [
17268
+ [...ne.current].map(([at, dt]) => [
17269
17269
  at,
17270
- { ...lt }
17270
+ { ...dt }
17271
17271
  ])
17272
17272
  ),
17273
17273
  previousViewport: {
@@ -17288,18 +17288,18 @@ function mA(e) {
17288
17288
  ) ? Te.current = () => N.transition(
17289
17289
  Pe.previousViewport,
17290
17290
  ee.animate !== !1 && !M.current.disableAnimations && !M.current.isPerformanceMode
17291
- ) : Ct.centerAndFit(80, ee.animate, !0), st.current = null, Dt(!1), ge(), (Ae = (He = M.current).onNodeGridModeChange) == null || Ae.call(He, null), nr(null), !Pe.previousPositions.size) {
17291
+ ) : Ct.centerAndFit(80, ee.animate, !0), st.current = null, Dt(!1), ge(), (Ee = (He = M.current).onNodeGridModeChange) == null || Ee.call(He, null), nr(null), !Pe.previousPositions.size) {
17292
17292
  ie();
17293
17293
  return;
17294
17294
  }
17295
- const lt = new Map(
17295
+ const dt = new Map(
17296
17296
  [...ne.current].map(([ft, ir]) => [
17297
17297
  ft,
17298
17298
  Pe.previousPositions.get(ft) ?? ir
17299
17299
  ])
17300
17300
  );
17301
17301
  J(
17302
- lt,
17302
+ dt,
17303
17303
  ee.animate,
17304
17304
  void 0,
17305
17305
  void 0,
@@ -17313,18 +17313,18 @@ function mA(e) {
17313
17313
  const ce = st.current;
17314
17314
  if (!ce || !ce.ready || M.current.readOnly || Q === ee)
17315
17315
  return !1;
17316
- const He = L(), Ae = He.nodes.find((er) => er.id === Q), Pe = He.nodes.find((er) => er.id === ee);
17317
- if (!Ae || !Pe || Ae.parent !== Pe.parent) return !1;
17316
+ const He = L(), Ee = He.nodes.find((er) => er.id === Q), Pe = He.nodes.find((er) => er.id === ee);
17317
+ if (!Ee || !Pe || Ee.parent !== Pe.parent) return !1;
17318
17318
  const at = Ad(He, R(ce.options));
17319
17319
  if (at.skippedNodeIds.includes(Q) || at.skippedNodeIds.includes(ee))
17320
17320
  return !1;
17321
- const lt = ce.order.indexOf(Q), ft = ce.order.indexOf(ee);
17322
- if (lt < 0 || ft < 0) return !1;
17323
- [ce.order[lt], ce.order[ft]] = [
17321
+ const dt = ce.order.indexOf(Q), ft = ce.order.indexOf(ee);
17322
+ if (dt < 0 || ft < 0) return !1;
17323
+ [ce.order[dt], ce.order[ft]] = [
17324
17324
  ce.order[ft],
17325
- ce.order[lt]
17325
+ ce.order[dt]
17326
17326
  ], Te.current = null, ce.options = { ...ce.options, order: [...ce.order] };
17327
- const ir = Ae.parent ?? "canvas", hr = (ar = (kn = ce.options.adjustment) == null ? void 0 : kn.sections) == null ? void 0 : ar[ir];
17327
+ const ir = Ee.parent ?? "canvas", hr = (ar = (kn = ce.options.adjustment) == null ? void 0 : kn.sections) == null ? void 0 : ar[ir];
17328
17328
  return hr != null && hr.members && (ce.options = {
17329
17329
  ...ce.options,
17330
17330
  adjustment: {
@@ -17376,13 +17376,13 @@ function mA(e) {
17376
17376
  }, lo = (R, L) => {
17377
17377
  const j = M.current.nodes;
17378
17378
  for (let J = j.length - 1; J >= 0; J--) {
17379
- const ue = j[J].id;
17380
- if (!pr(ue, M.current.edges, M.current.edgeMode) || mt.current && !mt.current.has(ue) || ue === L || _e.current.has(ue)) continue;
17381
- const Ne = Ge(ue);
17382
- if (Ne && lf(R, cr(Ne))) return ue;
17379
+ const fe = j[J].id;
17380
+ if (!pr(fe, M.current.edges, M.current.edgeMode) || mt.current && !mt.current.has(fe) || fe === L || _e.current.has(fe)) continue;
17381
+ const Ne = Ge(fe);
17382
+ if (Ne && lf(R, cr(Ne))) return fe;
17383
17383
  }
17384
- for (const [J, ue] of _e.current)
17385
- if (pr(J, M.current.edges, M.current.edgeMode) && !(mt.current && !mt.current.has(J)) && J !== L && lf(R, ue))
17384
+ for (const [J, fe] of _e.current)
17385
+ if (pr(J, M.current.edges, M.current.edgeMode) && !(mt.current && !mt.current.has(J)) && J !== L && lf(R, fe))
17386
17386
  return J;
17387
17387
  return null;
17388
17388
  }, ku = (R, L) => {
@@ -17390,12 +17390,12 @@ function mA(e) {
17390
17390
  (Re) => Re.id === R
17391
17391
  ), J = Ge(R);
17392
17392
  if (!j || !J) return null;
17393
- const ue = cr({
17393
+ const fe = cr({
17394
17394
  ...J,
17395
17395
  x: J.x + L.x,
17396
17396
  y: J.y + L.y
17397
17397
  });
17398
- let Ne = null, Ee = 0;
17398
+ let Ne = null, Ae = 0;
17399
17399
  for (const Re of M.current.nodes) {
17400
17400
  if (Re.id === R || Re.parent !== j.parent || Z.current.has(Re.id) || _e.current.has(Re.id) || !pr(
17401
17401
  Re.id,
@@ -17407,12 +17407,12 @@ function mA(e) {
17407
17407
  if (!it) continue;
17408
17408
  const we = cr(it), Le = Math.max(
17409
17409
  0,
17410
- Math.min(ue.x2, we.x2) - Math.max(ue.x1, we.x1)
17410
+ Math.min(fe.x2, we.x2) - Math.max(fe.x1, we.x1)
17411
17411
  ) * Math.max(
17412
17412
  0,
17413
- Math.min(ue.y2, we.y2) - Math.max(ue.y1, we.y1)
17413
+ Math.min(fe.y2, we.y2) - Math.max(fe.y1, we.y1)
17414
17414
  );
17415
- Le > Ee && (Ee = Le, Ne = Re.id);
17415
+ Le > Ae && (Ae = Le, Ne = Re.id);
17416
17416
  }
17417
17417
  return Ne;
17418
17418
  }, Ru = (R, L) => {
@@ -17424,20 +17424,20 @@ function mA(e) {
17424
17424
  M.current.edges,
17425
17425
  M.current.edgeMode
17426
17426
  ) && (!mt.current || mt.current.has(Le.id))
17427
- ), ue = J.find((Le) => Le.id === R);
17428
- if (!ue) return;
17429
- const Ne = E.current, Ee = N.zoom * (Ne && Ne.clientWidth ? Ne.getBoundingClientRect().width / Ne.clientWidth : 1), Re = 24 / Ee;
17427
+ ), fe = J.find((Le) => Le.id === R);
17428
+ if (!fe) return;
17429
+ const Ne = E.current, Ae = N.zoom * (Ne && Ne.clientWidth ? Ne.getBoundingClientRect().width / Ne.clientWidth : 1), Re = 24 / Ae;
17430
17430
  let it;
17431
17431
  for (const Le of J) {
17432
- if (Le.id === R || Le.parent !== ue.parent) continue;
17432
+ if (Le.id === R || Le.parent !== fe.parent) continue;
17433
17433
  const Ue = Ge(Le.id);
17434
17434
  if (!Ue) continue;
17435
- const Q = cr(Ue), ee = Math.min(Ue.w / 4, Re), me = Math.min(Ue.h / 4, Re), ce = 3 / Ee, He = [];
17435
+ const Q = cr(Ue), ee = Math.min(Ue.w / 4, Re), me = Math.min(Ue.h / 4, Re), ce = 3 / Ae, He = [];
17436
17436
  if (L.y > Q.y1 + me && L.y < Q.y2 - me)
17437
- for (const Ae of ["before", "after"]) {
17438
- const Pe = Ae === "before" ? Q.x1 : Q.x2, at = Math.abs(L.x - Pe), lt = Ae === "before" ? L.x < Pe : L.x > Pe;
17439
- at <= (lt ? Re : ee) && He.push({
17440
- side: Ae,
17437
+ for (const Ee of ["before", "after"]) {
17438
+ const Pe = Ee === "before" ? Q.x1 : Q.x2, at = Math.abs(L.x - Pe), dt = Ee === "before" ? L.x < Pe : L.x > Pe;
17439
+ at <= (dt ? Re : ee) && He.push({
17440
+ side: Ee,
17441
17441
  distance: at,
17442
17442
  marker: {
17443
17443
  x1: Pe - ce / 2,
@@ -17448,10 +17448,10 @@ function mA(e) {
17448
17448
  });
17449
17449
  }
17450
17450
  if (L.x >= Q.x1 && L.x <= Q.x2)
17451
- for (const Ae of ["above", "below"]) {
17452
- const Pe = Ae === "above" ? Q.y1 : Q.y2, at = Math.abs(L.y - Pe), lt = Ae === "above" ? L.y < Pe : L.y > Pe;
17453
- at <= (lt ? Re : me) && He.push({
17454
- side: Ae,
17451
+ for (const Ee of ["above", "below"]) {
17452
+ const Pe = Ee === "above" ? Q.y1 : Q.y2, at = Math.abs(L.y - Pe), dt = Ee === "above" ? L.y < Pe : L.y > Pe;
17453
+ at <= (dt ? Re : me) && He.push({
17454
+ side: Ee,
17455
17455
  distance: at,
17456
17456
  marker: {
17457
17457
  x1: Q.x1,
@@ -17461,16 +17461,16 @@ function mA(e) {
17461
17461
  }
17462
17462
  });
17463
17463
  }
17464
- for (const Ae of He)
17465
- (!it || Ae.distance < it.distance) && (it = { id: Le.id, ...Ae });
17464
+ for (const Ee of He)
17465
+ (!it || Ee.distance < it.distance) && (it = { id: Le.id, ...Ee });
17466
17466
  }
17467
17467
  if (!it) return;
17468
17468
  const we = oA(
17469
17469
  {
17470
17470
  nodes: J,
17471
17471
  positions: ne.current,
17472
- sizes: new Map([...O.current, ...fe.current]),
17473
- fixedSizes: fe.current,
17472
+ sizes: new Map([...O.current, ...he.current]),
17473
+ fixedSizes: he.current,
17474
17474
  padding: (Le) => M.current.containerStyle(Le).padding,
17475
17475
  minSize: V,
17476
17476
  fixedIds: new Set(Z.current.keys())
@@ -17485,7 +17485,7 @@ function mA(e) {
17485
17485
  if (M.current.edgeMode === "nodes" || M.current.edgeMode === "workflow")
17486
17486
  return null;
17487
17487
  const j = M.current.direction === "RL", J = Math.max(16, 6 / N.zoom);
17488
- let ue = null;
17488
+ let fe = null;
17489
17489
  for (const Ne of [...M.current.nodes].reverse()) {
17490
17490
  if (!pr(
17491
17491
  Ne.id,
@@ -17493,20 +17493,20 @@ function mA(e) {
17493
17493
  M.current.edgeMode
17494
17494
  ) || mt.current && !mt.current.has(Ne.id))
17495
17495
  continue;
17496
- const Ee = Ge(Ne.id), Re = B.current.get(Ne.id);
17497
- if (!Ee || !Re || _e.current.has(Ne.id)) continue;
17498
- const it = Ee.x + (L === "source" !== j ? 1 : -1) * Ee.w / 2;
17496
+ const Ae = Ge(Ne.id), Re = B.current.get(Ne.id);
17497
+ if (!Ae || !Re || _e.current.has(Ne.id)) continue;
17498
+ const it = Ae.x + (L === "source" !== j ? 1 : -1) * Ae.w / 2;
17499
17499
  for (const we of Re) {
17500
17500
  if (we.role && we.role !== L) continue;
17501
- const Le = Ee.y - Ee.h / 2 + we.top, Ue = Math.hypot(
17502
- R.x - (we.anchor ? Ee.x - Ee.w / 2 + we.anchor.x : it),
17501
+ const Le = Ae.y - Ae.h / 2 + we.top, Ue = Math.hypot(
17502
+ R.x - (we.anchor ? Ae.x - Ae.w / 2 + we.anchor.x : it),
17503
17503
  R.y - Le - we.height / 2
17504
17504
  );
17505
- if (!we.anchor && R.x >= Ee.x - Ee.w / 2 && R.x <= Ee.x + Ee.w / 2 && R.y >= Le && R.y <= Le + we.height) return { nodeId: Ne.id, property: we.property };
17506
- Ue <= J && (!ue || Ue < ue.distance) && (ue = { nodeId: Ne.id, property: we.property, distance: Ue });
17505
+ if (!we.anchor && R.x >= Ae.x - Ae.w / 2 && R.x <= Ae.x + Ae.w / 2 && R.y >= Le && R.y <= Le + we.height) return { nodeId: Ne.id, property: we.property };
17506
+ Ue <= J && (!fe || Ue < fe.distance) && (fe = { nodeId: Ne.id, property: we.property, distance: Ue });
17507
17507
  }
17508
17508
  }
17509
- return ue;
17509
+ return fe;
17510
17510
  }, R0 = (R) => {
17511
17511
  var Re, it;
17512
17512
  if (!R.currentTarget.contains(R.target) || (bt.current || (Lr.current = !1), R.target.closest(".flow-sdk-canvas") !== R.currentTarget) || R.button !== 0 || M.current.readOnly) return;
@@ -17532,8 +17532,8 @@ function mA(e) {
17532
17532
  }
17533
17533
  }
17534
17534
  if (bt.current) return;
17535
- const ue = !st.current || !!j.nodeGridConnections, Ne = j.drawHandles && L.closest(".flow-sdk-handle"), Ee = j.drawHandles && L.closest(".flow-sdk-property-port");
17536
- if ((!ue || !Ne && !Ee && (!j.drawMode || R.shiftKey)) && (st.current || R.shiftKey && (j.onNodeGridDrop || j.onNodeParentChange))) {
17535
+ const fe = !st.current || !!j.nodeGridConnections, Ne = j.drawHandles && L.closest(".flow-sdk-handle"), Ae = j.drawHandles && L.closest(".flow-sdk-property-port");
17536
+ if ((!fe || !Ne && !Ae && (!j.drawMode || R.shiftKey)) && (st.current || R.shiftKey && (j.onNodeGridDrop || j.onNodeParentChange))) {
17537
17537
  if (st.current && !st.current.ready || L.closest(
17538
17538
  "button, input, textarea, select, a, [contenteditable=true], [data-flow-content]"
17539
17539
  ))
@@ -17552,15 +17552,15 @@ function mA(e) {
17552
17552
  }
17553
17553
  if (we) return;
17554
17554
  }
17555
- if (ue && (j.drawMode || Ne || Ee)) {
17556
- const we = N.renderedToModel(J), Le = j.drawMode ? ti(we, "source") : null, Ue = Ee || Ne, Q = Ue ? (it = Ue.closest("[data-node-id]")) == null ? void 0 : it.dataset.nodeId : (Le == null ? void 0 : Le.nodeId) ?? lo(we), ee = Ee ? Ee.dataset.property : Le == null ? void 0 : Le.property;
17555
+ if (fe && (j.drawMode || Ne || Ae)) {
17556
+ const we = N.renderedToModel(J), Le = j.drawMode ? ti(we, "source") : null, Ue = Ae || Ne, Q = Ue ? (it = Ue.closest("[data-node-id]")) == null ? void 0 : it.dataset.nodeId : (Le == null ? void 0 : Le.nodeId) ?? lo(we), ee = Ae ? Ae.dataset.property : Le == null ? void 0 : Le.property;
17557
17557
  if (Q) {
17558
17558
  bt.current = {
17559
17559
  kind: "draw",
17560
17560
  pointerId: R.pointerId,
17561
17561
  source: Q,
17562
17562
  sourceProperty: ee,
17563
- reverse: (Ee == null ? void 0 : Ee.dataset.portRole) === "target",
17563
+ reverse: (Ae == null ? void 0 : Ae.dataset.portRole) === "target",
17564
17564
  startClient: { x: R.clientX, y: R.clientY }
17565
17565
  }, Lr.current = !0, En({ source: Q, sourceProperty: ee, point: we, target: null }), R.currentTarget.setPointerCapture(R.pointerId);
17566
17566
  return;
@@ -17586,23 +17586,23 @@ function mA(e) {
17586
17586
  moved: !1
17587
17587
  }, R.currentTarget.setPointerCapture(R.pointerId));
17588
17588
  }, P0 = (R) => {
17589
- var J, ue, Ne;
17589
+ var J, fe, Ne;
17590
17590
  const L = bt.current;
17591
17591
  if (!L || M.current.readOnly) return;
17592
17592
  const j = co(R);
17593
17593
  if (Ot.current.has(R.pointerId) && Ot.current.set(R.pointerId, j), L.kind === "pinch") {
17594
- const Ee = Bm(Ot.current);
17595
- if (!Ee) return;
17594
+ const Ae = Bm(Ot.current);
17595
+ if (!Ae) return;
17596
17596
  const Re = Math.max(
17597
17597
  N.minZoom,
17598
- Math.min(N.maxZoom, L.zoom * Ee.distance / L.distance)
17598
+ Math.min(N.maxZoom, L.zoom * Ae.distance / L.distance)
17599
17599
  );
17600
- if (Re < N.zoom && ((J = st.current) != null && J.options.fill) && ((Ne = (ue = M.current).onNodeGridZoomOut) == null ? void 0 : Ne.call(ue, st.current.options)) === !0)
17600
+ if (Re < N.zoom && ((J = st.current) != null && J.options.fill) && ((Ne = (fe = M.current).onNodeGridZoomOut) == null ? void 0 : Ne.call(fe, st.current.options)) === !0)
17601
17601
  return;
17602
17602
  N.set(
17603
17603
  {
17604
- x: Ee.center.x - L.anchor.x * Re,
17605
- y: Ee.center.y - L.anchor.y * Re
17604
+ x: Ae.center.x - L.anchor.x * Re,
17605
+ y: Ae.center.y - L.anchor.y * Re
17606
17606
  },
17607
17607
  Re
17608
17608
  );
@@ -17611,12 +17611,12 @@ function mA(e) {
17611
17611
  if (L.pointerId === R.pointerId)
17612
17612
  switch (L.kind) {
17613
17613
  case "grid": {
17614
- const Ee = { x: j.x - L.start.x, y: j.y - L.start.y };
17615
- if (!L.moved && Math.hypot(Ee.x, Ee.y) <= Rd) return;
17614
+ const Ae = { x: j.x - L.start.x, y: j.y - L.start.y };
17615
+ if (!L.moved && Math.hypot(Ae.x, Ae.y) <= Rd) return;
17616
17616
  L.moved || (Cr(), Te.current = null, N.cancelAnimation()), L.moved = !0, Lr.current = !0, R.preventDefault();
17617
17617
  const Re = {
17618
- x: Ee.x / N.zoom,
17619
- y: Ee.y / N.zoom
17618
+ x: Ae.x / N.zoom,
17619
+ y: Ae.y / N.zoom
17620
17620
  }, it = !R.shiftKey && j.x >= 0 && j.y >= 0 && j.x <= N.size.w && j.y <= N.size.h ? Ru(L.source, N.renderedToModel(j)) : void 0;
17621
17621
  nr({
17622
17622
  source: L.source,
@@ -17628,9 +17628,9 @@ function mA(e) {
17628
17628
  break;
17629
17629
  }
17630
17630
  case "pan": {
17631
- const Ee = j.x - L.start.x, Re = j.y - L.start.y;
17632
- if (!L.moved && Math.hypot(Ee, Re) <= Rd) return;
17633
- L.moved = !0, Lr.current = !0, N.set({ x: L.pan0.x + Ee, y: L.pan0.y + Re });
17631
+ const Ae = j.x - L.start.x, Re = j.y - L.start.y;
17632
+ if (!L.moved && Math.hypot(Ae, Re) <= Rd) return;
17633
+ L.moved = !0, Lr.current = !0, N.set({ x: L.pan0.x + Ae, y: L.pan0.y + Re });
17634
17634
  break;
17635
17635
  }
17636
17636
  case "tap": {
@@ -17647,19 +17647,19 @@ function mA(e) {
17647
17647
  break;
17648
17648
  }
17649
17649
  case "draw": {
17650
- const Ee = N.renderedToModel(j), Re = ti(Ee, L.reverse ? "source" : "target");
17650
+ const Ae = N.renderedToModel(j), Re = ti(Ae, L.reverse ? "source" : "target");
17651
17651
  En(
17652
17652
  L.reverse && Re ? {
17653
17653
  source: Re.nodeId,
17654
17654
  sourceProperty: Re.property,
17655
- point: Ee,
17655
+ point: Ae,
17656
17656
  target: L.source,
17657
17657
  targetProperty: L.sourceProperty
17658
17658
  } : {
17659
17659
  source: L.source,
17660
17660
  sourceProperty: L.sourceProperty,
17661
- point: Ee,
17662
- target: (Re == null ? void 0 : Re.nodeId) ?? lo(Ee, L.source),
17661
+ point: Ae,
17662
+ target: (Re == null ? void 0 : Re.nodeId) ?? lo(Ae, L.source),
17663
17663
  targetProperty: Re == null ? void 0 : Re.property
17664
17664
  }
17665
17665
  );
@@ -17667,7 +17667,7 @@ function mA(e) {
17667
17667
  }
17668
17668
  }
17669
17669
  }, Pu = (R, L) => {
17670
- var ue, Ne, Ee, Re, it, we, Le, Ue, Q, ee, me;
17670
+ var fe, Ne, Ae, Re, it, we, Le, Ue, Q, ee, me;
17671
17671
  Ot.current.delete(R.pointerId);
17672
17672
  const j = bt.current;
17673
17673
  if (!j) return;
@@ -17694,19 +17694,19 @@ function mA(e) {
17694
17694
  if (nr(null), L || !j.moved) break;
17695
17695
  const ce = co(R);
17696
17696
  if (!R.shiftKey && ce.x >= 0 && ce.y >= 0 && ce.x <= N.size.w && ce.y <= N.size.h) {
17697
- const Ae = Ru(
17697
+ const Ee = Ru(
17698
17698
  j.source,
17699
17699
  N.renderedToModel(ce)
17700
17700
  );
17701
- if (Ae) {
17701
+ if (Ee) {
17702
17702
  Ct.setNodeGridMode(!0, {
17703
- ...Ae.options,
17703
+ ...Ee.options,
17704
17704
  animate: !1
17705
17705
  });
17706
17706
  break;
17707
17707
  }
17708
17708
  }
17709
- if (((ue = J.onNodeGridDrop) == null ? void 0 : ue.call(
17709
+ if (((fe = J.onNodeGridDrop) == null ? void 0 : fe.call(
17710
17710
  J,
17711
17711
  j.source,
17712
17712
  { x: R.clientX, y: R.clientY },
@@ -17719,19 +17719,19 @@ function mA(e) {
17719
17719
  )) === !0 || ce.x < 0 || ce.y < 0 || ce.x > N.size.w || ce.y > N.size.h)
17720
17720
  break;
17721
17721
  if (R.shiftKey) {
17722
- const Ae = new Map(J.nodes.map((lt) => [lt.id, lt]));
17722
+ const Ee = new Map(J.nodes.map((dt) => [dt.id, dt]));
17723
17723
  let Pe = lo(
17724
17724
  N.renderedToModel(ce),
17725
17725
  j.source
17726
17726
  );
17727
17727
  const at = /* @__PURE__ */ new Set();
17728
- for (; Pe && !((Ne = Ae.get(Pe)) != null && Ne.acceptsChildren) && !at.has(Pe); )
17729
- at.add(Pe), Pe = ((Ee = Ae.get(Pe)) == null ? void 0 : Ee.parent) ?? null;
17730
- if (Pe && ((Re = Ae.get(Pe)) != null && Re.acceptsChildren)) {
17731
- let lt = Pe;
17728
+ for (; Pe && !((Ne = Ee.get(Pe)) != null && Ne.acceptsChildren) && !at.has(Pe); )
17729
+ at.add(Pe), Pe = ((Ae = Ee.get(Pe)) == null ? void 0 : Ae.parent) ?? null;
17730
+ if (Pe && ((Re = Ee.get(Pe)) != null && Re.acceptsChildren)) {
17731
+ let dt = Pe;
17732
17732
  const ft = /* @__PURE__ */ new Set();
17733
- for (; lt && !ft.has(lt); )
17734
- ft.add(lt), lt = (it = Ae.get(lt)) == null ? void 0 : it.parent;
17733
+ for (; dt && !ft.has(dt); )
17734
+ ft.add(dt), dt = (it = Ee.get(dt)) == null ? void 0 : it.parent;
17735
17735
  ft.has(j.source) || (we = J.onNodeParentChange) == null || we.call(J, j.source, Pe);
17736
17736
  }
17737
17737
  break;
@@ -17750,36 +17750,36 @@ function mA(e) {
17750
17750
  break;
17751
17751
  case "box": {
17752
17752
  if (so(null), L) break;
17753
- const ce = N.renderedToModel(j.start), He = N.renderedToModel(j.current), Ae = {
17753
+ const ce = N.renderedToModel(j.start), He = N.renderedToModel(j.current), Ee = {
17754
17754
  x1: Math.min(ce.x, He.x),
17755
17755
  y1: Math.min(ce.y, He.y),
17756
17756
  x2: Math.max(ce.x, He.x),
17757
17757
  y2: Math.max(ce.y, He.y)
17758
17758
  };
17759
- if (Ae.x2 - Ae.x1 < 1 && Ae.y2 - Ae.y1 < 1) {
17759
+ if (Ee.x2 - Ee.x1 < 1 && Ee.y2 - Ee.y1 < 1) {
17760
17760
  (Ue = J.onBackgroundTap) == null || Ue.call(J);
17761
17761
  break;
17762
17762
  }
17763
17763
  const Pe = [];
17764
17764
  for (const at of J.nodes) {
17765
- const lt = Ge(at.id);
17766
- lt && vC(cr(lt), Ae) && Pe.push(at.id);
17765
+ const dt = Ge(at.id);
17766
+ dt && vC(cr(dt), Ee) && Pe.push(at.id);
17767
17767
  }
17768
17768
  Pe.length && ((Q = J.onBoxSelect) == null || Q.call(J, Pe));
17769
17769
  break;
17770
17770
  }
17771
17771
  case "draw": {
17772
17772
  if (En(null), L) break;
17773
- const ce = co(R), He = N.renderedToModel(ce), Ae = ti(He, j.reverse ? "source" : "target"), Pe = (Ae == null ? void 0 : Ae.nodeId) ?? lo(He);
17774
- if (Pe === j.source && (j.sourceProperty === void 0 || (Ae == null ? void 0 : Ae.property) === void 0 || Ae.property === j.sourceProperty))
17773
+ const ce = co(R), He = N.renderedToModel(ce), Ee = ti(He, j.reverse ? "source" : "target"), Pe = (Ee == null ? void 0 : Ee.nodeId) ?? lo(He);
17774
+ if (Pe === j.source && (j.sourceProperty === void 0 || (Ee == null ? void 0 : Ee.property) === void 0 || Ee.property === j.sourceProperty))
17775
17775
  break;
17776
17776
  Pe ? (ee = J.onEdgeDraw) == null || ee.call(
17777
17777
  J,
17778
17778
  j.reverse ? Pe : j.source,
17779
17779
  j.reverse ? j.source : Pe,
17780
- j.sourceProperty !== void 0 || (Ae == null ? void 0 : Ae.property) !== void 0 ? {
17781
- sourceProperty: j.reverse ? Ae == null ? void 0 : Ae.property : j.sourceProperty,
17782
- targetProperty: j.reverse ? j.sourceProperty : Ae == null ? void 0 : Ae.property
17780
+ j.sourceProperty !== void 0 || (Ee == null ? void 0 : Ee.property) !== void 0 ? {
17781
+ sourceProperty: j.reverse ? Ee == null ? void 0 : Ee.property : j.sourceProperty,
17782
+ targetProperty: j.reverse ? j.sourceProperty : Ee == null ? void 0 : Ee.property
17783
17783
  } : void 0
17784
17784
  ) : Math.max(
17785
17785
  Math.abs(R.clientX - j.startClient.x),
@@ -17812,7 +17812,7 @@ function mA(e) {
17812
17812
  n,
17813
17813
  e.drawHandles,
17814
17814
  e.readOnly,
17815
- ut,
17815
+ ct,
17816
17816
  jr
17817
17817
  ]);
17818
17818
  const M0 = rt(() => {
@@ -17841,7 +17841,7 @@ function mA(e) {
17841
17841
  y: yt.point.y,
17842
17842
  w: 1,
17843
17843
  h: 1
17844
- } : null, Ou = yt ? $t(yt.source, yt.sourceProperty) : null, An = !ut || !!e.nodeGridConnections, T0 = [
17844
+ } : null, Ou = yt ? $t(yt.source, yt.sourceProperty) : null, An = !ct || !!e.nodeGridConnections, T0 = [
17845
17845
  "flow-sdk-canvas",
17846
17846
  g && An ? "flow-sdk-draw" : "",
17847
17847
  w ? "flow-sdk-perf" : ""
@@ -17852,7 +17852,7 @@ function mA(e) {
17852
17852
  ref: E,
17853
17853
  className: T0,
17854
17854
  "data-edge-mode": i,
17855
- "data-node-grid": ut || void 0,
17855
+ "data-node-grid": ct || void 0,
17856
17856
  "data-grid-connections": e.nodeGridConnections || void 0,
17857
17857
  onPointerDownCapture: R0,
17858
17858
  onPointerMove: P0,
@@ -17881,7 +17881,7 @@ function mA(e) {
17881
17881
  label: Ce.get(R),
17882
17882
  labelLayer: Fr,
17883
17883
  labelContent: (j = r.find(
17884
- (ue) => ue.id === R && ue.label !== void 0
17884
+ (fe) => fe.id === R && fe.label !== void 0
17885
17885
  )) == null ? void 0 : j.element,
17886
17886
  style: m(R),
17887
17887
  onSelect: N0,
@@ -17892,7 +17892,7 @@ function mA(e) {
17892
17892
  );
17893
17893
  }) }),
17894
17894
  /* @__PURE__ */ y("g", { className: "flow-sdk-edges", children: Qe && An && k.map((R) => {
17895
- var J, ue, Ne;
17895
+ var J, fe, Ne;
17896
17896
  if (!ni.ready.has(R.id) || A && (!A.has(R.source) || !A.has(R.target)))
17897
17897
  return null;
17898
17898
  const L = $t(R.source, R.sourceProperty), j = $t(R.target, R.targetProperty);
@@ -17918,7 +17918,7 @@ function mA(e) {
17918
17918
  targetPort: Mt(R.target, R.targetProperty),
17919
17919
  dir: ri,
17920
17920
  turn: ((J = oi.get(R.id)) == null ? void 0 : J.turn) ?? R.turn,
17921
- labelAtTarget: (ue = oi.get(R.id)) == null ? void 0 : ue.labelAtTarget,
17921
+ labelAtTarget: (fe = oi.get(R.id)) == null ? void 0 : fe.labelAtTarget,
17922
17922
  labelFraction: (Ne = oi.get(R.id)) == null ? void 0 : Ne.labelFraction,
17923
17923
  color: R.color,
17924
17924
  connectorColor: R.connectorColor,
@@ -17980,7 +17980,7 @@ function mA(e) {
17980
17980
  }
17981
17981
  }
17982
17982
  ),
17983
- ut && (($u = st.current) == null ? void 0 : $u.options.fill) && ((qu = st.current.options.adjustment) == null ? void 0 : qu.enabled) && !e.readOnly && /* @__PURE__ */ y(
17983
+ ct && (($u = st.current) == null ? void 0 : $u.options.fill) && ((qu = st.current.options.adjustment) == null ? void 0 : qu.enabled) && !e.readOnly && /* @__PURE__ */ y(
17984
17984
  sA,
17985
17985
  {
17986
17986
  dividers: Tt,
@@ -17990,12 +17990,12 @@ function mA(e) {
17990
17990
  }
17991
17991
  ),
17992
17992
  r.map((R) => {
17993
- var He, Ae, Pe;
17993
+ var He, Ee, Pe;
17994
17994
  if ((He = st.current) != null && He.options.fill && !be.current)
17995
17995
  return null;
17996
17996
  const L = X.get(R.id), j = $e.get(R.id);
17997
17997
  if (j && R.label !== void 0) return null;
17998
- const J = (L == null ? void 0 : L.x) ?? (j ? (j.x1 + j.x2) / 2 : 0), ue = (L == null ? void 0 : L.y) ?? (j ? (j.y1 + j.y2) / 2 : 0), Ne = Ze != null && Ze.target ? R.id === Ze.source ? Ze.target : R.id === Ze.target ? Ze.source : void 0 : void 0, Ee = Ne ? X.get(Ne) : void 0, Re = Ze ? X.get(Ze.source) : void 0, it = Ze != null && Ze.target ? X.get(Ze.target) : void 0, we = Re && it ? {
17998
+ const J = (L == null ? void 0 : L.x) ?? (j ? (j.x1 + j.x2) / 2 : 0), fe = (L == null ? void 0 : L.y) ?? (j ? (j.y1 + j.y2) / 2 : 0), Ne = Ze != null && Ze.target ? R.id === Ze.source ? Ze.target : R.id === Ze.target ? Ze.source : void 0 : void 0, Ae = Ne ? X.get(Ne) : void 0, Re = Ze ? X.get(Ze.source) : void 0, it = Ze != null && Ze.target ? X.get(Ze.target) : void 0, we = Re && it ? {
17999
17999
  x: it.x - Re.x,
18000
18000
  y: it.y - Re.y
18001
18001
  } : void 0, Le = we ? we.x ** 2 + we.y ** 2 : 0, Ue = Le && Ze && we ? Math.max(
@@ -18004,10 +18004,10 @@ function mA(e) {
18004
18004
  1,
18005
18005
  (Ze.offset.x * we.x + Ze.offset.y * we.y) / Le
18006
18006
  )
18007
- ) : 0, Q = Ee ? {
18008
- x: J + (Ee.x - J) * Ue,
18009
- y: ue + (Ee.y - ue) * Ue
18010
- } : (Ze == null ? void 0 : Ze.source) === R.id ? { x: J + Ze.offset.x, y: ue + Ze.offset.y } : void 0, ee = ye.get(R.id), me = Ne ? ye.get(Ne) : void 0, ce = ee && me ? {
18007
+ ) : 0, Q = Ae ? {
18008
+ x: J + (Ae.x - J) * Ue,
18009
+ y: fe + (Ae.y - fe) * Ue
18010
+ } : (Ze == null ? void 0 : Ze.source) === R.id ? { x: J + Ze.offset.x, y: fe + Ze.offset.y } : void 0, ee = ye.get(R.id), me = Ne ? ye.get(Ne) : void 0, ce = ee && me ? {
18011
18011
  w: ee.w + (me.w - ee.w) * Ue,
18012
18012
  h: ee.h + (me.h - ee.h) * Ue
18013
18013
  } : ee;
@@ -18016,8 +18016,8 @@ function mA(e) {
18016
18016
  {
18017
18017
  id: R.id,
18018
18018
  x: J,
18019
- y: ue,
18020
- gridDraggable: ut && !e.readOnly && !Z.current.has(R.id),
18019
+ y: fe,
18020
+ gridDraggable: ct && !e.readOnly && !Z.current.has(R.id),
18021
18021
  gridDragging: (Ze == null ? void 0 : Ze.source) === R.id,
18022
18022
  gridDropTarget: (Ze == null ? void 0 : Ze.target) === R.id,
18023
18023
  gridSize: ye.get(R.id),
@@ -18027,7 +18027,7 @@ function mA(e) {
18027
18027
  floating: Ze == null ? void 0 : Ze.shiftKey
18028
18028
  } : void 0,
18029
18029
  placed: !!L || !!j,
18030
- hidden: !ut && !ni.shown.has(R.id) || !pr(R.id, t, i) || !!A && !A.has(R.id),
18030
+ hidden: !ct && !ni.shown.has(R.id) || !pr(R.id, t, i) || !!A && !A.has(R.id),
18031
18031
  onMount: De,
18032
18032
  drawHandles: e.drawHandles && !e.readOnly && An,
18033
18033
  drawMode: g && An,
@@ -18039,14 +18039,14 @@ function mA(e) {
18039
18039
  ),
18040
18040
  hasCollapseControl: R.hasCollapseControl,
18041
18041
  handleColor: p,
18042
- animated: R.animated && !j && !w && !ut,
18042
+ animated: R.animated && !j && !w && !ct,
18043
18043
  animationColor: R.animationColor,
18044
18044
  animationWidth: R.animationWidth,
18045
18045
  animationVariant: R.animationVariant,
18046
- width: (Ae = O.current.get(R.id)) == null ? void 0 : Ae.w,
18046
+ width: (Ee = O.current.get(R.id)) == null ? void 0 : Ee.w,
18047
18047
  height: (Pe = O.current.get(R.id)) == null ? void 0 : Pe.h,
18048
18048
  propertyMode: P,
18049
- resolvedRows: ct.get(R.id),
18049
+ resolvedRows: lt.get(R.id),
18050
18050
  reversePorts: n === "RL",
18051
18051
  direction: n,
18052
18052
  onPropertyRows: se,
@@ -18823,9 +18823,9 @@ function AA({
18823
18823
  if (!(!((ye = v.current) != null && ye.contentWindow) || ne.source !== v.current.contentWindow || ((xe = ne.data) == null ? void 0 : xe.type) !== "squeed:content-edit"))
18824
18824
  try {
18825
18825
  document.fullscreenElement === w.current && await document.exitFullscreen(), t();
18826
- } catch (fe) {
18826
+ } catch (he) {
18827
18827
  _(
18828
- fe instanceof Error ? fe.message : "Unable to close fullscreen."
18828
+ he instanceof Error ? he.message : "Unable to close fullscreen."
18829
18829
  );
18830
18830
  }
18831
18831
  };
@@ -18835,8 +18835,8 @@ function AA({
18835
18835
  Ke(() => {
18836
18836
  if (!n || r !== "html" || !(re != null && re.document)) return;
18837
18837
  const H = re.document, ne = (ye) => {
18838
- var fe, ge, Z;
18839
- const xe = (fe = ye.data) == null ? void 0 : fe.height;
18838
+ var he, ge, Z;
18839
+ const xe = (he = ye.data) == null ? void 0 : he.height;
18840
18840
  !((ge = v.current) != null && ge.contentWindow) || ye.source !== v.current.contentWindow || ((Z = ye.data) == null ? void 0 : Z.type) !== "squeed:content-size" || typeof xe != "number" || !Number.isFinite(xe) || xe <= 0 || xe > 1e5 || document.fullscreenElement === w.current || E(
18841
18841
  (U) => (U == null ? void 0 : U.document) === H && U.height === xe ? U : { document: H, height: xe }
18842
18842
  );
@@ -19268,7 +19268,7 @@ const kA = ({
19268
19268
  editOnMount: i = !1,
19269
19269
  hoverLeaveDelay: s = 0
19270
19270
  }) => {
19271
- var fe, ge, Z, U, be, K, ve, Se, je, We;
19271
+ var he, ge, Z, U, be, K, ve, Se, je, We;
19272
19272
  const {
19273
19273
  selectedNodeIds: a,
19274
19274
  setSelectedNodeIds: c,
@@ -19296,7 +19296,7 @@ const kA = ({
19296
19296
  Ke(() => {
19297
19297
  if (!N || a.length !== 1 || g.readOnly || _ || E)
19298
19298
  return;
19299
- const he = (ke) => {
19299
+ const ue = (ke) => {
19300
19300
  var ze, ot, ht, Me, Qe;
19301
19301
  if (ke.key !== "Enter" || ke.defaultPrevented || ke.isComposing || ke.ctrlKey || ke.metaKey || ke.altKey || ke.shiftKey || ke.target instanceof Element && ke.target.closest(
19302
19302
  'button, input, textarea, select, a, [contenteditable], [role="textbox"], [role="dialog"], [role="menu"], [role="listbox"], [popover], [data-flow-content]'
@@ -19314,15 +19314,15 @@ const kA = ({
19314
19314
  )) ?? []
19315
19315
  ).find(
19316
19316
  (nt) => {
19317
- var ut;
19318
- return ((ut = nt.closest("[data-node-id]")) == null ? void 0 : ut.getAttribute("data-node-id")) === $ && !nt.disabled && nt.getClientRects().length && getComputedStyle(nt).visibility !== "hidden";
19317
+ var ct;
19318
+ return ((ct = nt.closest("[data-node-id]")) == null ? void 0 : ct.getAttribute("data-node-id")) === $ && !nt.disabled && nt.getClientRects().length && getComputedStyle(nt).visibility !== "hidden";
19319
19319
  }
19320
19320
  ), Te = !Be && (e == null ? void 0 : e.type) === "grid" && ((ot = e.config) == null ? void 0 : ot.documentId) && ((ht = A.current) == null ? void 0 : ht.getClientRects().length) && p.onNodeHoverAction && ((Me = g.nodeOverlayActions) == null ? void 0 : Me.find(
19321
19321
  (nt) => nt.id === "open-document" && (!nt.nodeTypes || nt.nodeTypes.includes(e.type))
19322
19322
  ));
19323
19323
  !Be && !Te || (ke.preventDefault(), ke.stopPropagation(), ke.repeat || (Be ? Be.click() : (Qe = p.onNodeHoverAction) == null || Qe.call(p, Te.id, $, e)));
19324
19324
  };
19325
- return window.addEventListener("keydown", he, !0), () => window.removeEventListener("keydown", he, !0);
19325
+ return window.addEventListener("keydown", ue, !0), () => window.removeEventListener("keydown", ue, !0);
19326
19326
  }, [
19327
19327
  $,
19328
19328
  N,
@@ -19334,32 +19334,33 @@ const kA = ({
19334
19334
  p.onNodeHoverAction,
19335
19335
  g.nodeOverlayActions
19336
19336
  ]);
19337
- const O = (fe = g.nodeOverlayActions) == null ? void 0 : fe.filter(
19338
- (he) => !he.nodeTypes || he.nodeTypes.includes(e == null ? void 0 : e.type)
19337
+ const O = (he = g.nodeOverlayActions) == null ? void 0 : he.filter(
19338
+ (ue) => !ue.nodeTypes || ue.nodeTypes.includes(e == null ? void 0 : e.type)
19339
19339
  ), Y = g.renderNodeOverlay, oe = (e == null ? void 0 : e.type) === "grid" ? (ge = g.customViews) == null ? void 0 : ge.gridHoverControls : void 0, te = (e == null ? void 0 : e.type) === "grid" ? "20px" : "-100px", re = (e == null ? void 0 : e.type) === "grid" ? "top center" : void 0, pe = (e == null ? void 0 : e.type) === "grid" ? "translateX(-50%) scale3d(1.8, 1.8, 1)" : "translateX(-50%) scale3d(3, 3, 1)", q = (() => {
19340
- var he;
19340
+ var ue;
19341
19341
  try {
19342
- const ke = (he = m.current) == null ? void 0 : he.zoom();
19342
+ const ke = (ue = m.current) == null ? void 0 : ue.zoom();
19343
19343
  return ke !== void 0 && ke < 0.08;
19344
19344
  } catch {
19345
19345
  return !1;
19346
19346
  }
19347
19347
  })(), z = gt(
19348
- (he, ke = !1) => {
19349
- var Te, ze, ot, ht;
19350
- if (_ || g.readOnly || f != null && f.fill && !he.shiftKey) return;
19348
+ (ue, ke = !1) => {
19349
+ var Te, ze, ot, ht, Me;
19350
+ if (_ || g.readOnly || f != null && f.fill && !ue.shiftKey || ue.detail === 2 && ((Te = e == null ? void 0 : e.config) != null && Te.form) && !o && !ke && !u && !l && !ue.shiftKey && !ue.ctrlKey && !ue.metaKey && !ue.altKey && a.length === 1 && a[0] === $)
19351
+ return;
19351
19352
  const Be = {
19352
- shiftKey: he.shiftKey,
19353
- ctrlKey: he.ctrlKey,
19354
- metaKey: he.metaKey,
19355
- altKey: he.altKey,
19353
+ shiftKey: ue.shiftKey,
19354
+ ctrlKey: ue.ctrlKey,
19355
+ metaKey: ue.metaKey,
19356
+ altKey: ue.altKey,
19356
19357
  ...ke ? { viewToggle: !0 } : {}
19357
19358
  };
19358
- if (l && (d(null), (Te = p.onEdgeDeselect) == null || Te.call(p)), u || he.shiftKey && (f != null && f.fill)) {
19359
- const Me = a.includes($), Qe = Me ? a.filter((nt) => nt !== $) : [...a, $];
19360
- c(Qe), Me ? (ze = p.onNodeDeselect) == null || ze.call(p) : (ot = p.onNodeSelect) == null || ot.call(p, $, e, Be);
19359
+ if (l && (d(null), (ze = p.onEdgeDeselect) == null || ze.call(p)), u || ue.shiftKey && (f != null && f.fill)) {
19360
+ const Qe = a.includes($), nt = Qe ? a.filter((ct) => ct !== $) : [...a, $];
19361
+ c(nt), Qe ? (ot = p.onNodeDeselect) == null || ot.call(p) : (ht = p.onNodeSelect) == null || ht.call(p, $, e, Be);
19361
19362
  } else
19362
- c([$]), (ht = p.onNodeSelect) == null || ht.call(p, $, e, Be);
19363
+ c([$]), (Me = p.onNodeSelect) == null || Me.call(p, $, e, Be);
19363
19364
  },
19364
19365
  [
19365
19366
  $,
@@ -19369,20 +19370,21 @@ const kA = ({
19369
19370
  u,
19370
19371
  f,
19371
19372
  _,
19373
+ o,
19372
19374
  c,
19373
19375
  d,
19374
19376
  p,
19375
19377
  g
19376
19378
  ]
19377
19379
  ), G = gt(() => {
19378
- var he;
19379
- _ || g.readOnly || (he = p.onNodeDoubleClick) == null || he.call(p, $, e);
19380
+ var ue;
19381
+ _ || g.readOnly || (ue = p.onNodeDoubleClick) == null || ue.call(p, $, e);
19380
19382
  }, [$, e, _, p, g]), B = gt(() => {
19381
19383
  P.current && clearTimeout(P.current), P.current = setTimeout(() => I(!0), 100);
19382
19384
  }, []), se = gt(
19383
- (he) => {
19385
+ (ue) => {
19384
19386
  var ke;
19385
- he.relatedTarget instanceof Node && ((ke = A.current) != null && ke.contains(he.relatedTarget)) || (P.current && clearTimeout(P.current), s ? P.current = setTimeout(
19387
+ ue.relatedTarget instanceof Node && ((ke = A.current) != null && ke.contains(ue.relatedTarget)) || (P.current && clearTimeout(P.current), s ? P.current = setTimeout(
19386
19388
  () => I(!1),
19387
19389
  s
19388
19390
  ) : I(!1));
@@ -19392,14 +19394,14 @@ const kA = ({
19392
19394
  tabIndex: H ? 0 : void 0,
19393
19395
  "aria-haspopup": H ? "dialog" : void 0,
19394
19396
  "aria-expanded": H ? E : void 0,
19395
- onDoubleClickCapture: (he) => {
19397
+ onDoubleClickCapture: (ue) => {
19396
19398
  var ke;
19397
- !H && !o || g.readOnly || X && !g.editable || _ || !he.currentTarget.contains(he.target) || he.target instanceof Element && he.target.closest(
19399
+ !H && !o || g.readOnly || X && !g.editable || _ || !ue.currentTarget.contains(ue.target) || ue.target instanceof Element && ue.target.closest(
19398
19400
  "button, input, textarea, select, a, [contenteditable=true], [data-flow-content]"
19399
- ) || (he.preventDefault(), he.stopPropagation(), c([$]), o ? o() : T(!0), (ke = p.onNodeDoubleClick) == null || ke.call(p, $, e));
19401
+ ) || (ue.preventDefault(), ue.stopPropagation(), (a.length !== 1 || a[0] !== $) && c([$]), o ? o() : T(!0), (ke = p.onNodeDoubleClick) == null || ke.call(p, $, e));
19400
19402
  },
19401
- onKeyDown: (he) => {
19402
- !H && !o || g.readOnly || X && !g.editable || he.target !== he.currentTarget || he.key !== "Enter" || (he.preventDefault(), he.stopPropagation(), c([$]), o ? o() : T(!0));
19403
+ onKeyDown: (ue) => {
19404
+ !H && !o || g.readOnly || X && !g.editable || ue.target !== ue.currentTarget || ue.key !== "Enter" || (ue.preventDefault(), ue.stopPropagation(), c([$]), o ? o() : T(!0));
19403
19405
  }
19404
19406
  }, ye = H && /* @__PURE__ */ y(
19405
19407
  C0,
@@ -19409,8 +19411,8 @@ const kA = ({
19409
19411
  label: e.label || e.headerTitle || "Node",
19410
19412
  open: E && (!X || !!g.editable && !g.readOnly),
19411
19413
  onClose: () => {
19412
- var he;
19413
- T(!1), N && ((he = A.current) == null || he.focus({ preventScroll: !0 }));
19414
+ var ue;
19415
+ T(!1), N && ((ue = A.current) == null || ue.focus({ preventScroll: !0 }));
19414
19416
  },
19415
19417
  children: X ? /* @__PURE__ */ y(
19416
19418
  _u,
@@ -19419,15 +19421,15 @@ const kA = ({
19419
19421
  content: e.label ?? e.text ?? "",
19420
19422
  color: Oe(S),
19421
19423
  editOnMount: !0,
19422
- onChange: (he) => {
19424
+ onChange: (ue) => {
19423
19425
  var ke;
19424
- return (ke = p.onNodeLabelChange) == null ? void 0 : ke.call(p, $, String(he));
19426
+ return (ke = p.onNodeLabelChange) == null ? void 0 : ke.call(p, $, String(ue));
19425
19427
  },
19426
19428
  onEditEnd: () => T(!1)
19427
19429
  }
19428
19430
  ) : void 0
19429
19431
  }
19430
- ), xe = Array.isArray((K = e == null ? void 0 : e.config) == null ? void 0 : K.ports) ? e.config.ports.map((he) => /* @__PURE__ */ y(vA, { ...he }, `${he.id}:${he.role}`)) : null;
19432
+ ), xe = Array.isArray((K = e == null ? void 0 : e.config) == null ? void 0 : K.ports) ? e.config.ports.map((ue) => /* @__PURE__ */ y(vA, { ...ue }, `${ue.id}:${ue.role}`)) : null;
19431
19433
  return n ? /* @__PURE__ */ D(
19432
19434
  Ie,
19433
19435
  {
@@ -19511,7 +19513,7 @@ const kA = ({
19511
19513
  }
19512
19514
  } : void 0,
19513
19515
  children: [
19514
- O.map((he, ke) => /* @__PURE__ */ D(Ie, { display: "contents", children: [
19516
+ O.map((ue, ke) => /* @__PURE__ */ D(Ie, { display: "contents", children: [
19515
19517
  ke > 0 && /* @__PURE__ */ y(
19516
19518
  Ie,
19517
19519
  {
@@ -19523,8 +19525,8 @@ const kA = ({
19523
19525
  /* @__PURE__ */ y(
19524
19526
  Dm,
19525
19527
  {
19526
- icon: he.icon,
19527
- label: he.label,
19528
+ icon: ue.icon,
19529
+ label: ue.label,
19528
19530
  color: S,
19529
19531
  bgColor: x,
19530
19532
  borderColor: C,
@@ -19534,14 +19536,14 @@ const kA = ({
19534
19536
  var Te;
19535
19537
  Be.stopPropagation(), (Te = p.onNodeHoverAction) == null || Te.call(
19536
19538
  p,
19537
- he.id,
19539
+ ue.id,
19538
19540
  $,
19539
19541
  e
19540
19542
  );
19541
19543
  }
19542
19544
  }
19543
19545
  )
19544
- ] }, he.id)),
19546
+ ] }, ue.id)),
19545
19547
  oe && /* @__PURE__ */ y(oe, { data: e })
19546
19548
  ]
19547
19549
  }
@@ -19562,12 +19564,12 @@ const kA = ({
19562
19564
  }),
19563
19565
  F && !((ve = e == null ? void 0 : e.config) != null && ve.parentContainer) && ((Se = e == null ? void 0 : e.config) == null ? void 0 : Se.collapsed) !== void 0 && (() => {
19564
19566
  var Be;
19565
- const he = v === "TB" || v === "BT", ke = t || v === "RL";
19567
+ const ue = v === "TB" || v === "BT", ke = t || v === "RL";
19566
19568
  return /* @__PURE__ */ y(
19567
19569
  Md,
19568
19570
  {
19569
19571
  position: "absolute",
19570
- ...he ? {
19572
+ ...ue ? {
19571
19573
  [v === "BT" ? "top" : "bottom"]: "-75px",
19572
19574
  left: "50%",
19573
19575
  transform: "translateX(-50%)"
@@ -19690,7 +19692,7 @@ const kA = ({
19690
19692
  }
19691
19693
  } : void 0,
19692
19694
  children: [
19693
- O.map((he, ke) => /* @__PURE__ */ D(Ie, { display: "contents", children: [
19695
+ O.map((ue, ke) => /* @__PURE__ */ D(Ie, { display: "contents", children: [
19694
19696
  ke > 0 && /* @__PURE__ */ y(
19695
19697
  Ie,
19696
19698
  {
@@ -19702,8 +19704,8 @@ const kA = ({
19702
19704
  /* @__PURE__ */ y(
19703
19705
  Dm,
19704
19706
  {
19705
- icon: he.icon,
19706
- label: he.label,
19707
+ icon: ue.icon,
19708
+ label: ue.label,
19707
19709
  color: S,
19708
19710
  bgColor: x,
19709
19711
  borderColor: C,
@@ -19713,14 +19715,14 @@ const kA = ({
19713
19715
  var Te;
19714
19716
  Be.stopPropagation(), (Te = p.onNodeHoverAction) == null || Te.call(
19715
19717
  p,
19716
- he.id,
19718
+ ue.id,
19717
19719
  $,
19718
19720
  e
19719
19721
  );
19720
19722
  }
19721
19723
  }
19722
19724
  )
19723
- ] }, he.id)),
19725
+ ] }, ue.id)),
19724
19726
  oe && /* @__PURE__ */ y(oe, { data: e })
19725
19727
  ]
19726
19728
  }
@@ -19731,12 +19733,12 @@ const kA = ({
19731
19733
  /* @__PURE__ */ D(Ie, { position: "relative", display: "flex", h: "100%", w: "100%", children: [
19732
19734
  F && !((je = e == null ? void 0 : e.config) != null && je.parentContainer) && ((We = e == null ? void 0 : e.config) == null ? void 0 : We.collapsed) !== void 0 && !n && (() => {
19733
19735
  var Te, ze, ot;
19734
- const he = v === "TB" || v === "BT", ke = t || v === "RL", Be = (Te = e == null ? void 0 : e.config) != null && Te.labelBelow && w[$] !== "properties" ? ((((ze = e == null ? void 0 : e.viewProps) == null ? void 0 : ze.fontSize) || 1) * 100 + 100) / 2 : void 0;
19736
+ const ue = v === "TB" || v === "BT", ke = t || v === "RL", Be = (Te = e == null ? void 0 : e.config) != null && Te.labelBelow && w[$] !== "properties" ? ((((ze = e == null ? void 0 : e.viewProps) == null ? void 0 : ze.fontSize) || 1) * 100 + 100) / 2 : void 0;
19735
19737
  return /* @__PURE__ */ y(
19736
19738
  Md,
19737
19739
  {
19738
19740
  position: "absolute",
19739
- ...he ? {
19741
+ ...ue ? {
19740
19742
  [v === "BT" ? "top" : "bottom"]: "-75px",
19741
19743
  left: "50%",
19742
19744
  transform: "translateX(-50%)"
@@ -20355,8 +20357,8 @@ const Au = (e) => {
20355
20357
  onEditStart: F,
20356
20358
  onEditEnd: N
20357
20359
  }) => {
20358
- var se, X, H, ne, ye, xe, fe, ge, Z, U, be, K, ve, Se, je, We;
20359
- const O = MA(_, r, t), Y = _.label ?? _.headerTitle, oe = Object.entries(_.description || {}).length > 0, te = TA(_.description), re = (X = (se = e.data) == null ? void 0 : se.config) == null ? void 0 : X.icon, pe = (ne = (H = e.data) == null ? void 0 : H.config) == null ? void 0 : ne.content, q = m && !o && _.label === "" && (((ye = _.config) == null ? void 0 : ye.contentFormat) === "html" || ((xe = _.config) == null ? void 0 : xe.contentFormat) === "jsx"), z = m && !o && (((fe = _.config) == null ? void 0 : fe.contentFormat) === "html" || ((ge = _.config) == null ? void 0 : ge.contentFormat) === "jsx") && ((Z = _.viewProps) == null ? void 0 : Z.width) !== void 0 && _.viewProps.width !== "100%", G = ((U = _ == null ? void 0 : _.viewProps) == null ? void 0 : U.borderRadius) ?? "53px", B = Jn(
20360
+ var se, X, H, ne, ye, xe, he, ge, Z, U, be, K, ve, Se, je, We;
20361
+ const O = MA(_, r, t), Y = _.label ?? _.headerTitle, oe = Object.entries(_.description || {}).length > 0, te = TA(_.description), re = (X = (se = e.data) == null ? void 0 : se.config) == null ? void 0 : X.icon, pe = (ne = (H = e.data) == null ? void 0 : H.config) == null ? void 0 : ne.content, q = m && !o && _.label === "" && (((ye = _.config) == null ? void 0 : ye.contentFormat) === "html" || ((xe = _.config) == null ? void 0 : xe.contentFormat) === "jsx"), z = m && !o && (((he = _.config) == null ? void 0 : he.contentFormat) === "html" || ((ge = _.config) == null ? void 0 : ge.contentFormat) === "jsx") && ((Z = _.viewProps) == null ? void 0 : Z.width) !== void 0 && _.viewProps.width !== "100%", G = ((U = _ == null ? void 0 : _.viewProps) == null ? void 0 : U.borderRadius) ?? "53px", B = Jn(
20360
20362
  _ == null ? void 0 : _.viewProps,
20361
20363
  O.hexborderColor,
20362
20364
  M,
@@ -20785,7 +20787,7 @@ const jA = {
20785
20787
  }
20786
20788
  },
20787
20789
  [t, H, se]
20788
- ), ye = b.colorMode === "dark", xe = ye ? Oe("gray.500") : Yn, fe = ye ? G != null && G.includes("gray") ? "whitesmoke" : ne(G) : xe, ge = c ? ne(c) : xe, Z = rt(
20790
+ ), ye = b.colorMode === "dark", xe = ye ? Oe("gray.500") : Yn, he = ye ? G != null && G.includes("gray") ? "whitesmoke" : ne(G) : xe, ge = c ? ne(c) : xe, Z = rt(
20789
20791
  () => {
20790
20792
  var de;
20791
20793
  return b.initialViewport || {
@@ -20861,9 +20863,9 @@ const jA = {
20861
20863
  for (const [V, Ce] of de) {
20862
20864
  if (Ce.length < 2) continue;
20863
20865
  const $e = V.split("|")[0], _e = Math.min(20, 70 / Ce.length);
20864
- Ce.forEach(({ id: Ge, source: ct }, tt) => {
20866
+ Ce.forEach(({ id: Ge, source: lt }, tt) => {
20865
20867
  const Mt = 50 + (tt - (Ce.length - 1) / 2) * _e;
20866
- W.set(Ge, (ct === $e ? Mt : 100 - Mt) / 100);
20868
+ W.set(Ge, (lt === $e ? Mt : 100 - Mt) / 100);
20867
20869
  });
20868
20870
  }
20869
20871
  return W;
@@ -20873,11 +20875,11 @@ const jA = {
20873
20875
  var ie;
20874
20876
  return ((ie = W.data) == null ? void 0 : ie.id) && W.data.source && W.data.target;
20875
20877
  }).map(({ data: W }) => {
20876
- var Ce, $e, _e, Ge, ct, tt;
20878
+ var Ce, $e, _e, Ge, lt, tt;
20877
20879
  let ie = de;
20878
20880
  const De = ($e = (Ce = K.get(W.source)) == null ? void 0 : Ce.data) == null ? void 0 : $e.parent, V = (Ge = (_e = K.get(W.target)) == null ? void 0 : _e.data) == null ? void 0 : Ge.parent;
20879
20881
  if (De && De === V) {
20880
- const Mt = be((tt = (ct = K.get(De)) == null ? void 0 : ct.data) == null ? void 0 : tt.viewProps), $t = Fu(
20882
+ const Mt = be((tt = (lt = K.get(De)) == null ? void 0 : lt.data) == null ? void 0 : tt.viewProps), $t = Fu(
20881
20883
  de,
20882
20884
  Oe(Mt.bgColor),
20883
20885
  Mt.bgOpacity
@@ -20895,7 +20897,7 @@ const jA = {
20895
20897
  label: W.label,
20896
20898
  validationIssue: (u === "auto" || u === "properties") && (W.sourceProperty !== void 0 || W.targetProperty !== void 0) && h ? Kb(h, W) : void 0,
20897
20899
  color: c ? ge : W.color ? Oe(W.color) : ge,
20898
- connectorColor: c ? ge : W.color ? Oe(W.color) : fe,
20900
+ connectorColor: c ? ge : W.color ? Oe(W.color) : he,
20899
20901
  labelBg: ie,
20900
20902
  dashed: !!W.isEdgeDashed,
20901
20903
  animated: !!W.isEdgeAnimated,
@@ -20906,7 +20908,7 @@ const jA = {
20906
20908
  }, [
20907
20909
  r,
20908
20910
  ge,
20909
- fe,
20911
+ he,
20910
20912
  c,
20911
20913
  je,
20912
20914
  b.edgeType,
@@ -20915,7 +20917,7 @@ const jA = {
20915
20917
  K,
20916
20918
  be,
20917
20919
  ne
20918
- ]), he = rt(() => {
20920
+ ]), ue = rt(() => {
20919
20921
  var W;
20920
20922
  const de = /* @__PURE__ */ new Set();
20921
20923
  for (const ie of e)
@@ -20939,10 +20941,10 @@ const jA = {
20939
20941
  var ie;
20940
20942
  return (ie = W.data) == null ? void 0 : ie.id;
20941
20943
  }).map((W) => {
20942
- var Ge, ct, tt, Mt, $t, Wt, Gt, Ct, bt;
20943
- const ie = he.has(W.data.id) && !W.data.parent, De = ie ? W.data.label ?? W.data.headerTitle ?? "Container" : void 0, V = ie ? de.parentContainer : de[W.data.type] || de.text, Ce = ((Ge = b.customViews) == null ? void 0 : Ge.fillNode) ?? V, $e = ke.get(W.data.id), _e = {
20944
+ var Ge, lt, tt, Mt, $t, Wt, Gt, Ct, bt;
20945
+ const ie = ue.has(W.data.id) && !W.data.parent, De = ie ? W.data.label ?? W.data.headerTitle ?? "Container" : void 0, V = ie ? de.parentContainer : de[W.data.type] || de.text, Ce = ((Ge = b.customViews) == null ? void 0 : Ge.fillNode) ?? V, $e = ke.get(W.data.id), _e = {
20944
20946
  ...W,
20945
- isInverted: ((ct = W.data.config) == null ? void 0 : ct.isInverted) ?? ($e == null ? void 0 : $e.isInverted),
20947
+ isInverted: ((lt = W.data.config) == null ? void 0 : lt.isInverted) ?? ($e == null ? void 0 : $e.isInverted),
20946
20948
  isParent: ie,
20947
20949
  containerStyle: ie ? Se(W.data.id) : void 0
20948
20950
  };
@@ -20950,7 +20952,7 @@ const jA = {
20950
20952
  id: W.data.id,
20951
20953
  collapsed: (tt = W.data.config) == null ? void 0 : tt.collapsed,
20952
20954
  parent: W.data.parent,
20953
- acceptsChildren: !!((Mt = W.data.config) != null && Mt.parentContainer) || he.has(W.data.id),
20955
+ acceptsChildren: !!((Mt = W.data.config) != null && Mt.parentContainer) || ue.has(W.data.id),
20954
20956
  label: De,
20955
20957
  animated: !!W.data.isNodeAnimated,
20956
20958
  animationVariant: W.data.nodeAnimationVariant,
@@ -20986,7 +20988,7 @@ const jA = {
20986
20988
  });
20987
20989
  }, [
20988
20990
  e,
20989
- he,
20991
+ ue,
20990
20992
  ke,
20991
20993
  t,
20992
20994
  b.customViews,
@@ -21004,8 +21006,8 @@ const jA = {
21004
21006
  Qe.current = x;
21005
21007
  const nt = le(_);
21006
21008
  nt.current = _;
21007
- const ut = le(K);
21008
- ut.current = K;
21009
+ const ct = le(K);
21010
+ ct.current = K;
21009
21011
  const Dt = le(ve);
21010
21012
  Dt.current = ve;
21011
21013
  const Tt = le(/* @__PURE__ */ new Map());
@@ -21023,14 +21025,14 @@ const jA = {
21023
21025
  const de = O.current;
21024
21026
  if (!Y || !de) return;
21025
21027
  let W = null, ie = null, De = 0, V = 0, Ce = 0, $e = 0, _e = 0;
21026
- const Ge = (ct) => {
21028
+ const Ge = (lt) => {
21027
21029
  var $t;
21028
21030
  if (ze.current.readOnly || ze.current.minZoom === ze.current.maxZoom && ze.current.minZoom !== void 0 && (($t = de.parentElement) != null && $t.closest(".flow-sdk-canvas")))
21029
21031
  return;
21030
21032
  const tt = de.ownerDocument.fullscreenElement;
21031
- if (tt && tt !== de && de.contains(tt) && ct.target instanceof Node && tt.contains(ct.target))
21033
+ if (tt && tt !== de && de.contains(tt) && lt.target instanceof Node && tt.contains(lt.target))
21032
21034
  return;
21033
- ct.preventDefault(), ct.stopPropagation(), ot.current || ct.metaKey || ct.ctrlKey ? (Ce += ct.deltaY, $e = ct.clientX, _e = ct.clientY, ie === null && (ie = requestAnimationFrame(() => {
21035
+ lt.preventDefault(), lt.stopPropagation(), ot.current || lt.metaKey || lt.ctrlKey ? (Ce += lt.deltaY, $e = lt.clientX, _e = lt.clientY, ie === null && (ie = requestAnimationFrame(() => {
21034
21036
  ie = null;
21035
21037
  const Wt = ze.current, Gt = Y.zoom(), Ct = Ce;
21036
21038
  Ce = 0;
@@ -21044,7 +21046,7 @@ const jA = {
21044
21046
  x: $e - Ot.left,
21045
21047
  y: _e - Ot.top
21046
21048
  });
21047
- }))) : (De += ct.deltaX, V += ct.deltaY, W === null && (W = requestAnimationFrame(() => {
21049
+ }))) : (De += lt.deltaX, V += lt.deltaY, W === null && (W = requestAnimationFrame(() => {
21048
21050
  W = null;
21049
21051
  const Wt = Y.pan(), Gt = Y.zoom(), Ct = 0.35, bt = De, Ot = V;
21050
21052
  De = 0, V = 0, Y.pan({
@@ -21078,8 +21080,8 @@ const jA = {
21078
21080
  const _e = Me.current.filter((Ge) => Ge !== "root");
21079
21081
  if (_e.length === 0) return;
21080
21082
  for (const Ge of _e) {
21081
- const ct = (Ce = ut.current.get(Ge)) == null ? void 0 : Ce.data;
21082
- ($e = g.onNodeDelete) == null || $e.call(g, Ge, ct || {});
21083
+ const lt = (Ce = ct.current.get(Ge)) == null ? void 0 : Ce.data;
21084
+ ($e = g.onNodeDelete) == null || $e.call(g, Ge, lt || {});
21083
21085
  }
21084
21086
  w([]);
21085
21087
  }
@@ -21129,9 +21131,9 @@ const jA = {
21129
21131
  ), (de = g.onBackgroundClick) == null || de.call(g), !ze.current.readOnly) {
21130
21132
  const Ce = /* @__PURE__ */ new Set();
21131
21133
  for (const $e of Me.current) {
21132
- let _e = ut.current.get($e);
21134
+ let _e = ct.current.get($e);
21133
21135
  for (; _e && !Ce.has(_e.data.id); )
21134
- Ce.add(_e.data.id), he.has(_e.data.id) && ((W = _e.data.config) == null ? void 0 : W.collapsed) !== !0 && ((ie = g.onNodeCollapse) == null || ie.call(g, _e.data.id, !0)), _e = _e.data.parent ? ut.current.get(_e.data.parent) : void 0;
21136
+ Ce.add(_e.data.id), ue.has(_e.data.id) && ((W = _e.data.config) == null ? void 0 : W.collapsed) !== !0 && ((ie = g.onNodeCollapse) == null || ie.call(g, _e.data.id, !0)), _e = _e.data.parent ? ct.current.get(_e.data.parent) : void 0;
21135
21137
  }
21136
21138
  }
21137
21139
  Me.current.length && (w([]), (De = g.onNodeDeselect) == null || De.call(g)), Qe.current && (C(null), (V = g.onEdgeDeselect) == null || V.call(g));
@@ -21142,7 +21144,7 @@ const jA = {
21142
21144
  a,
21143
21145
  s,
21144
21146
  b.bottomBarCollapsed,
21145
- he
21147
+ ue
21146
21148
  ]), mt = gt(
21147
21149
  (de) => {
21148
21150
  var De, V;
@@ -21153,7 +21155,7 @@ const jA = {
21153
21155
  (V = g.onNodeSelect) == null || V.call(
21154
21156
  g,
21155
21157
  Ce,
21156
- ((De = ut.current.get(Ce)) == null ? void 0 : De.data) ?? { id: Ce }
21158
+ ((De = ct.current.get(Ce)) == null ? void 0 : De.data) ?? { id: Ce }
21157
21159
  );
21158
21160
  }
21159
21161
  },
@@ -21164,7 +21166,7 @@ const jA = {
21164
21166
  w([de]), (De = g.onNodeSelect) == null || De.call(
21165
21167
  g,
21166
21168
  de,
21167
- ((ie = ut.current.get(de)) == null ? void 0 : ie.data) ?? { id: de },
21169
+ ((ie = ct.current.get(de)) == null ? void 0 : ie.data) ?? { id: de },
21168
21170
  W
21169
21171
  );
21170
21172
  },
@@ -21189,7 +21191,7 @@ const jA = {
21189
21191
  var V, Ce;
21190
21192
  if (te.current = {
21191
21193
  sourceId: de,
21192
- nodeIds: new Set(ut.current.keys()),
21194
+ nodeIds: new Set(ct.current.keys()),
21193
21195
  reverse: De
21194
21196
  }, !(u === "properties" && ((V = g.onNodeCreateRequest) == null ? void 0 : V.call(g, {
21195
21197
  sourceNodeId: de,
@@ -21258,7 +21260,7 @@ const jA = {
21258
21260
  fitOnInit: !b.initialViewport && !((Ve = b.nodeGrid) != null && Ve.enabled && b.nodeGrid.options.fill),
21259
21261
  readOnly: !!b.readOnly,
21260
21262
  containerStyle: Se,
21261
- lineColor: c ? ge : fe,
21263
+ lineColor: c ? ge : he,
21262
21264
  drawMode: or,
21263
21265
  drawHandles: !b.readOnly && b.edgeHandles !== !1,
21264
21266
  dragMode: E,
@@ -21268,12 +21270,12 @@ const jA = {
21268
21270
  var Ce;
21269
21271
  (Ce = g.onLayoutComplete) == null || Ce.call(g, de);
21270
21272
  const W = zt.current;
21271
- W && (!ut.current.has(W.source) || !ut.current.has(W.target) ? zt.current = null : r.some(
21273
+ W && (!ct.current.has(W.source) || !ct.current.has(W.target) ? zt.current = null : r.some(
21272
21274
  ({ data: $e }) => $e.source === W.source && $e.target === W.target && !W.edgeIds.has($e.id)
21273
21275
  ) && de.getNodeBox(W.source) && de.getNodeBox(W.target) && (zt.current = null, de.focusConnections(W.source)));
21274
21276
  const ie = te.current;
21275
21277
  if (!ie) return;
21276
- if (!ut.current.has(ie.sourceId)) {
21278
+ if (!ct.current.has(ie.sourceId)) {
21277
21279
  te.current = null;
21278
21280
  return;
21279
21281
  }