fuxi-topology 0.2.2 → 0.2.4

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.
@@ -371,7 +371,7 @@ function Oo(e) {
371
371
  return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
372
372
  }
373
373
  var Po = /^[-+]?[0-9]+e/;
374
- function ko(e, t) {
374
+ function Lo(e, t) {
375
375
  var n;
376
376
  if (isNaN(e))
377
377
  switch (t) {
@@ -404,15 +404,15 @@ function ko(e, t) {
404
404
  return "-0.0";
405
405
  return n = e.toString(10), Po.test(n) ? n.replace("e", ".e") : n;
406
406
  }
407
- function Lo(e) {
407
+ function ko(e) {
408
408
  return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || I.isNegativeZero(e));
409
409
  }
410
410
  var yi = new C("tag:yaml.org,2002:float", {
411
411
  kind: "scalar",
412
412
  resolve: Eo,
413
413
  construct: Oo,
414
- predicate: Lo,
415
- represent: ko,
414
+ predicate: ko,
415
+ represent: Lo,
416
416
  defaultStyle: "lowercase"
417
417
  }), _i = gi.extend({
418
418
  implicit: [
@@ -561,7 +561,7 @@ var Ei = new C("tag:yaml.org,2002:set", {
561
561
  Mi,
562
562
  Ei
563
563
  ]
564
- }), te = Object.prototype.hasOwnProperty, at = 1, Oi = 2, Pi = 3, ct = 4, Ft = 1, Zo = 2, Tn = 3, Qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, es = /[\x85\u2028\u2029]/, ts = /[,\[\]\{\}]/, ki = /^(?:!|!!|![a-z\-]+!)$/i, Li = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
564
+ }), te = Object.prototype.hasOwnProperty, at = 1, Oi = 2, Pi = 3, ct = 4, Ft = 1, Zo = 2, Tn = 3, Qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, es = /[\x85\u2028\u2029]/, ts = /[,\[\]\{\}]/, Li = /^(?:!|!!|![a-z\-]+!)$/i, ki = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
565
565
  function Mn(e) {
566
566
  return Object.prototype.toString.call(e);
567
567
  }
@@ -571,7 +571,7 @@ function G(e) {
571
571
  function ue(e) {
572
572
  return e === 9 || e === 32;
573
573
  }
574
- function k(e) {
574
+ function L(e) {
575
575
  return e === 9 || e === 32 || e === 10 || e === 13;
576
576
  }
577
577
  function xe(e) {
@@ -635,7 +635,7 @@ var On = {
635
635
  },
636
636
  TAG: function(t, n, i) {
637
637
  var r, o;
638
- i.length !== 2 && y(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], ki.test(r) || y(t, "ill-formed tag handle (first argument) of the TAG directive"), te.call(t.tagMap, r) && y(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Li.test(o) || y(t, "ill-formed tag prefix (second argument) of the TAG directive");
638
+ i.length !== 2 && y(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], Li.test(r) || y(t, "ill-formed tag handle (first argument) of the TAG directive"), te.call(t.tagMap, r) && y(t, 'there is a previously declared suffix for "' + r + '" tag handle'), ki.test(o) || y(t, "ill-formed tag prefix (second argument) of the TAG directive");
639
639
  try {
640
640
  o = decodeURIComponent(o);
641
641
  } catch {
@@ -696,7 +696,7 @@ function A(e, t, n) {
696
696
  }
697
697
  function St(e) {
698
698
  var t = e.position, n;
699
- return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || k(n)));
699
+ return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || L(n)));
700
700
  }
701
701
  function pn(e, t) {
702
702
  t === 1 ? e.result += " " : t > 1 && (e.result += I.repeat(`
@@ -704,14 +704,14 @@ function pn(e, t) {
704
704
  }
705
705
  function as(e, t, n) {
706
706
  var i, r, o, s, a, c, l, h, u = e.kind, f = e.result, d;
707
- if (d = e.input.charCodeAt(e.position), k(d) || xe(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (r = e.input.charCodeAt(e.position + 1), k(r) || n && xe(r)))
707
+ if (d = e.input.charCodeAt(e.position), L(d) || xe(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (r = e.input.charCodeAt(e.position + 1), L(r) || n && xe(r)))
708
708
  return !1;
709
709
  for (e.kind = "scalar", e.result = "", o = s = e.position, a = !1; d !== 0; ) {
710
710
  if (d === 58) {
711
- if (r = e.input.charCodeAt(e.position + 1), k(r) || n && xe(r))
711
+ if (r = e.input.charCodeAt(e.position + 1), L(r) || n && xe(r))
712
712
  break;
713
713
  } else if (d === 35) {
714
- if (i = e.input.charCodeAt(e.position - 1), k(i))
714
+ if (i = e.input.charCodeAt(e.position - 1), L(i))
715
715
  break;
716
716
  } else {
717
717
  if (e.position === e.lineStart && St(e) || n && xe(d))
@@ -776,7 +776,7 @@ function hs(e, t) {
776
776
  for (e.anchor !== null && (e.anchorMap[e.anchor] = a), m = e.input.charCodeAt(++e.position); m !== 0; ) {
777
777
  if (A(e, !0, t), m = e.input.charCodeAt(e.position), m === h)
778
778
  return e.position++, e.tag = s, e.anchor = c, e.kind = d ? "mapping" : "sequence", e.result = a, !0;
779
- n ? m === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g = _ = null, u = f = !1, m === 63 && (l = e.input.charCodeAt(e.position + 1), k(l) && (u = f = !0, e.position++, A(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ae(e, t, at, !1, !0), v = e.tag, g = e.result, A(e, !0, t), m = e.input.charCodeAt(e.position), (f || e.line === i) && m === 58 && (u = !0, m = e.input.charCodeAt(++e.position), A(e, !0, t), Ae(e, t, at, !1, !0), _ = e.result), d ? ve(e, a, p, v, g, _, i, r, o) : u ? a.push(ve(e, null, p, v, g, _, i, r, o)) : a.push(g), A(e, !0, t), m = e.input.charCodeAt(e.position), m === 44 ? (n = !0, m = e.input.charCodeAt(++e.position)) : n = !1;
779
+ n ? m === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g = _ = null, u = f = !1, m === 63 && (l = e.input.charCodeAt(e.position + 1), L(l) && (u = f = !0, e.position++, A(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ae(e, t, at, !1, !0), v = e.tag, g = e.result, A(e, !0, t), m = e.input.charCodeAt(e.position), (f || e.line === i) && m === 58 && (u = !0, m = e.input.charCodeAt(++e.position), A(e, !0, t), Ae(e, t, at, !1, !0), _ = e.result), d ? ve(e, a, p, v, g, _, i, r, o) : u ? a.push(ve(e, null, p, v, g, _, i, r, o)) : a.push(g), A(e, !0, t), m = e.input.charCodeAt(e.position), m === 44 ? (n = !0, m = e.input.charCodeAt(++e.position)) : n = !1;
780
780
  }
781
781
  y(e, "unexpected end of the stream within a flow collection");
782
782
  }
@@ -827,10 +827,10 @@ function us(e, t) {
827
827
  }
828
828
  return !0;
829
829
  }
830
- function kn(e, t) {
830
+ function Ln(e, t) {
831
831
  var n, i = e.tag, r = e.anchor, o = [], s, a = !1, c;
832
832
  if (e.firstTabInLine !== -1) return !1;
833
- for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(c !== 45 || (s = e.input.charCodeAt(e.position + 1), !k(s)))); ) {
833
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(c !== 45 || (s = e.input.charCodeAt(e.position + 1), !L(s)))); ) {
834
834
  if (a = !0, e.position++, A(e, !0, -1) && e.lineIndent <= t) {
835
835
  o.push(null), c = e.input.charCodeAt(e.position);
836
836
  continue;
@@ -846,7 +846,7 @@ function fs(e, t, n) {
846
846
  var i, r, o, s, a, c, l = e.tag, h = e.anchor, u = {}, f = /* @__PURE__ */ Object.create(null), d = null, p = null, g = null, v = !1, _ = !1, m;
847
847
  if (e.firstTabInLine !== -1) return !1;
848
848
  for (e.anchor !== null && (e.anchorMap[e.anchor] = u), m = e.input.charCodeAt(e.position); m !== 0; ) {
849
- if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (m === 63 || m === 58) && k(i))
849
+ if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (m === 63 || m === 58) && L(i))
850
850
  m === 63 ? (v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : y(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, m = i;
851
851
  else {
852
852
  if (s = e.line, a = e.lineStart, c = e.position, !Ae(e, n, Oi, !1, !0))
@@ -855,7 +855,7 @@ function fs(e, t, n) {
855
855
  for (m = e.input.charCodeAt(e.position); ue(m); )
856
856
  m = e.input.charCodeAt(++e.position);
857
857
  if (m === 58)
858
- m = e.input.charCodeAt(++e.position), k(m) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !1, r = !1, d = e.tag, p = e.result;
858
+ m = e.input.charCodeAt(++e.position), L(m) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !1, r = !1, d = e.tag, p = e.result;
859
859
  else if (_)
860
860
  y(e, "can not read an implicit mapping pair; a colon is missed");
861
861
  else
@@ -881,11 +881,11 @@ function ds(e) {
881
881
  while (s !== 0 && s !== 62);
882
882
  e.position < e.length ? (o = e.input.slice(t, e.position), s = e.input.charCodeAt(++e.position)) : y(e, "unexpected end of the stream within a verbatim tag");
883
883
  } else {
884
- for (; s !== 0 && !k(s); )
885
- s === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), ki.test(r) || y(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), s = e.input.charCodeAt(++e.position);
884
+ for (; s !== 0 && !L(s); )
885
+ s === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), Li.test(r) || y(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), s = e.input.charCodeAt(++e.position);
886
886
  o = e.input.slice(t, e.position), ts.test(o) && y(e, "tag suffix cannot contain flow indicator characters");
887
887
  }
888
- o && !Li.test(o) && y(e, "tag name cannot contain such characters: " + o);
888
+ o && !ki.test(o) && y(e, "tag name cannot contain such characters: " + o);
889
889
  try {
890
890
  o = decodeURIComponent(o);
891
891
  } catch {
@@ -896,14 +896,14 @@ function ds(e) {
896
896
  function ps(e) {
897
897
  var t, n;
898
898
  if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
899
- for (e.anchor !== null && y(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !k(n) && !xe(n); )
899
+ for (e.anchor !== null && y(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !L(n) && !xe(n); )
900
900
  n = e.input.charCodeAt(++e.position);
901
901
  return e.position === t && y(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
902
902
  }
903
903
  function gs(e) {
904
904
  var t, n, i;
905
905
  if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
906
- for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !k(i) && !xe(i); )
906
+ for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !L(i) && !xe(i); )
907
907
  i = e.input.charCodeAt(++e.position);
908
908
  return e.position === t && y(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), te.call(e.anchorMap, n) || y(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], A(e, !0, -1), !0;
909
909
  }
@@ -912,7 +912,7 @@ function Ae(e, t, n, i, r) {
912
912
  if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = s = a = ct === n || Pi === n, i && A(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
913
913
  for (; ds(e) || ps(e); )
914
914
  A(e, !0, -1) ? (l = !0, a = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : a = !1;
915
- if (a && (a = l || r), (c === 1 || ct === n) && (at === n || Oi === n ? g = t : g = t + 1, v = e.position - e.lineStart, c === 1 ? a && (kn(e, v) || fs(e, v, g)) || hs(e, g) ? h = !0 : (s && us(e, g) || cs(e, g) || ls(e, g) ? h = !0 : gs(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : as(e, g, at === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && kn(e, v))), e.tag === null)
915
+ if (a && (a = l || r), (c === 1 || ct === n) && (at === n || Oi === n ? g = t : g = t + 1, v = e.position - e.lineStart, c === 1 ? a && (Ln(e, v) || fs(e, v, g)) || hs(e, g) ? h = !0 : (s && us(e, g) || cs(e, g) || ls(e, g) ? h = !0 : gs(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : as(e, g, at === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && Ln(e, v))), e.tag === null)
916
916
  e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
917
917
  else if (e.tag === "?") {
918
918
  for (e.result !== null && e.kind !== "scalar" && y(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, f = e.implicitTypes.length; u < f; u += 1)
@@ -936,7 +936,7 @@ function Ae(e, t, n, i, r) {
936
936
  function ms(e) {
937
937
  var t = e.position, n, i, r, o = !1, s;
938
938
  for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (s = e.input.charCodeAt(e.position)) !== 0 && (A(e, !0, -1), s = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || s !== 37)); ) {
939
- for (o = !0, s = e.input.charCodeAt(++e.position), n = e.position; s !== 0 && !k(s); )
939
+ for (o = !0, s = e.input.charCodeAt(++e.position), n = e.position; s !== 0 && !L(s); )
940
940
  s = e.input.charCodeAt(++e.position);
941
941
  for (i = e.input.slice(n, e.position), r = [], i.length < 1 && y(e, "directive name must not be less than one character in length"); s !== 0; ) {
942
942
  for (; ue(s); )
@@ -948,7 +948,7 @@ function ms(e) {
948
948
  break;
949
949
  }
950
950
  if (G(s)) break;
951
- for (n = e.position; s !== 0 && !k(s); )
951
+ for (n = e.position; s !== 0 && !L(s); )
952
952
  s = e.input.charCodeAt(++e.position);
953
953
  r.push(e.input.slice(n, e.position));
954
954
  }
@@ -992,7 +992,7 @@ function vs(e, t) {
992
992
  var ys = xs, _s = vs, zi = {
993
993
  loadAll: ys,
994
994
  load: _s
995
- }, Ui = Object.prototype.toString, Hi = Object.prototype.hasOwnProperty, gn = 65279, ws = 9, De = 10, Ss = 13, As = 32, bs = 33, Is = 34, Xt = 35, Cs = 37, Ts = 38, Ms = 39, Es = 42, Yi = 44, Os = 45, ht = 58, Ps = 61, ks = 62, Ls = 63, Ns = 64, Bi = 91, Gi = 93, Rs = 96, Wi = 123, Ds = 124, Xi = 125, E = {};
995
+ }, Ui = Object.prototype.toString, Hi = Object.prototype.hasOwnProperty, gn = 65279, ws = 9, De = 10, Ss = 13, As = 32, bs = 33, Is = 34, Xt = 35, Cs = 37, Ts = 38, Ms = 39, Es = 42, Yi = 44, Os = 45, ht = 58, Ps = 61, Ls = 62, ks = 63, Ns = 64, Bi = 91, Gi = 93, Rs = 96, Wi = 123, Ds = 124, Xi = 125, E = {};
996
996
  E[0] = "\\0";
997
997
  E[7] = "\\a";
998
998
  E[8] = "\\b";
@@ -1049,7 +1049,7 @@ var Hs = 1, $e = 2;
1049
1049
  function Ys(e) {
1050
1050
  this.schema = e.schema || fn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = I.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = zs(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? $e : Hs, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1051
1051
  }
1052
- function Ln(e, t) {
1052
+ function kn(e, t) {
1053
1053
  for (var n = I.repeat(" ", t), i = 0, r = -1, o = "", s, a = e.length; i < a; )
1054
1054
  r = e.indexOf(`
1055
1055
  `, i), r === -1 ? (s = e.slice(i), i = a) : (s = e.slice(i, r + 1), i = r + 1), s.length && s !== `
@@ -1087,7 +1087,7 @@ function Rn(e, t, n) {
1087
1087
  );
1088
1088
  }
1089
1089
  function Gs(e) {
1090
- return Fe(e) && e !== gn && !ut(e) && e !== Os && e !== Ls && e !== ht && e !== Yi && e !== Bi && e !== Gi && e !== Wi && e !== Xi && e !== Xt && e !== Ts && e !== Es && e !== bs && e !== Ds && e !== Ps && e !== ks && e !== Ms && e !== Is && e !== Cs && e !== Ns && e !== Rs;
1090
+ return Fe(e) && e !== gn && !ut(e) && e !== Os && e !== ks && e !== ht && e !== Yi && e !== Bi && e !== Gi && e !== Wi && e !== Xi && e !== Xt && e !== Ts && e !== Es && e !== bs && e !== Ds && e !== Ps && e !== Ls && e !== Ms && e !== Is && e !== Cs && e !== Ns && e !== Rs;
1091
1091
  }
1092
1092
  function Ws(e) {
1093
1093
  return !ut(e) && e !== ht;
@@ -1147,9 +1147,9 @@ function js(e, t, n, i, r) {
1147
1147
  case qt:
1148
1148
  return "'" + t.replace(/'/g, "''") + "'";
1149
1149
  case Ki:
1150
- return "|" + Dn(t, e.indent) + $n(Ln(t, o));
1150
+ return "|" + Dn(t, e.indent) + $n(kn(t, o));
1151
1151
  case Vi:
1152
- return ">" + Dn(t, e.indent) + $n(Ln(qs(t, s), o));
1152
+ return ">" + Dn(t, e.indent) + $n(kn(qs(t, s), o));
1153
1153
  case me:
1154
1154
  return '"' + Ks(t) + '"';
1155
1155
  default:
@@ -1792,7 +1792,7 @@ class ba extends At {
1792
1792
  this.scene.lines?.removeLinesForNode(t);
1793
1793
  }
1794
1794
  }
1795
- const Le = 64, Hn = 200, en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
1795
+ const ke = 64, Hn = 200, en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
1796
1796
  function dr() {
1797
1797
  if ($.size <= Hn) return;
1798
1798
  const e = [...$.keys()].slice(0, $.size - Hn);
@@ -1806,14 +1806,14 @@ function Ia(e, t, n) {
1806
1806
  const i = xn(e, t, n), r = en.get(i);
1807
1807
  if (r) return r;
1808
1808
  const o = document.createElement("canvas");
1809
- o.width = n, o.height = Le;
1809
+ o.width = n, o.height = ke;
1810
1810
  const s = o.getContext("2d"), a = e >> 16 & 255, c = e >> 8 & 255, l = e & 255;
1811
1811
  if (t) {
1812
1812
  const h = s.createLinearGradient(0, 0, n, 0);
1813
1813
  h.addColorStop(0, `rgba(${a},${c},${l},0)`), h.addColorStop(0.2, `rgba(${a},${c},${l},0.8)`), h.addColorStop(0.25, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},0)`), s.fillStyle = h;
1814
1814
  } else
1815
1815
  s.fillStyle = `rgb(${a},${c},${l})`;
1816
- return s.fillRect(0, 0, n, Le), en.set(i, o), o;
1816
+ return s.fillRect(0, 0, n, ke), en.set(i, o), o;
1817
1817
  }
1818
1818
  function Ca(e, t, n) {
1819
1819
  const i = xn(e, t, n), r = tn.get(i);
@@ -1825,12 +1825,12 @@ function Ta(e) {
1825
1825
  const { color: t, width: n, dashPattern: i = [10, 5] } = e, r = i.reduce((v, _) => v + _, 0), o = Math.max(Math.round(n), 2), s = `dash_c${t}_d${i.join(",")}_w${o}`, a = $.get(s);
1826
1826
  if (a) return a;
1827
1827
  const c = t >> 16 & 255, l = t >> 8 & 255, h = t & 255, u = document.createElement("canvas");
1828
- u.width = r, u.height = Le;
1828
+ u.width = r, u.height = ke;
1829
1829
  const f = u.getContext("2d");
1830
- f.clearRect(0, 0, r, Le), f.fillStyle = `rgb(${c},${l},${h})`;
1830
+ f.clearRect(0, 0, r, ke), f.fillStyle = `rgb(${c},${l},${h})`;
1831
1831
  let d = 0;
1832
1832
  for (let v = 0; v < i.length; v++)
1833
- v % 2 === 0 && f.fillRect(d, 0, i[v], Le), d += i[v];
1833
+ v % 2 === 0 && f.fillRect(d, 0, i[v], ke), d += i[v];
1834
1834
  const p = Se.from({ resource: u, antialias: !1 });
1835
1835
  p.source.addressMode = "repeat";
1836
1836
  const g = new Se({
@@ -2091,7 +2091,7 @@ class Pa extends At {
2091
2091
  for (const t of this.items.values()) t.draw();
2092
2092
  }
2093
2093
  }
2094
- class ka extends We {
2094
+ class La extends We {
2095
2095
  container;
2096
2096
  tilingSprite = null;
2097
2097
  constructor(t = {}) {
@@ -2152,7 +2152,7 @@ class ka extends We {
2152
2152
  this.tilingSprite && this.tilingSprite.destroy(), this.container.destroy();
2153
2153
  }
2154
2154
  }
2155
- class La extends We {
2155
+ class ka extends We {
2156
2156
  container;
2157
2157
  textSprite;
2158
2158
  textStyle;
@@ -2242,7 +2242,7 @@ class Na extends At {
2242
2242
  super(t, "text");
2243
2243
  }
2244
2244
  createItem(t) {
2245
- return new La(t);
2245
+ return new ka(t);
2246
2246
  }
2247
2247
  }
2248
2248
  class Ra extends We {
@@ -2510,7 +2510,7 @@ class _e extends Ce {
2510
2510
  _isActive = !1;
2511
2511
  _cameraHandler;
2512
2512
  constructor(t, n, i, r) {
2513
- super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Pa(this), this.nodes = new ba(this), this.texts = new Na(this), this.rects = new Da(this), this.grid = new ka();
2513
+ super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Pa(this), this.nodes = new ba(this), this.texts = new Na(this), this.rects = new Da(this), this.grid = new La();
2514
2514
  const { skewX: o, skewY: s } = er();
2515
2515
  this.projectionContainer.sortableChildren = !0, this.projectionContainer.skew.set(o, s), this.projectionContainer.scale.set(_e.DEFAULT_ZOOM), this.projectionContainer.position.set(n.screen.width / 2, n.screen.height / 2), this.projectionContainer.addChild(
2516
2516
  this.grid.getGraphics(),
@@ -2927,7 +2927,7 @@ function Pu(e, t, n) {
2927
2927
  };
2928
2928
  }
2929
2929
  const Ke = /* @__PURE__ */ new WeakMap();
2930
- function ku(e, t, n) {
2930
+ function Lu(e, t, n) {
2931
2931
  const i = n?.frequency ?? 2, r = n?.height ?? 12;
2932
2932
  return {
2933
2933
  stateId: e,
@@ -2961,7 +2961,7 @@ function Mt(e) {
2961
2961
  n <= 0 ? (Ne.delete(t), t.filterArea = void 0) : Ne.set(t, n);
2962
2962
  }
2963
2963
  const Ut = /* @__PURE__ */ new WeakMap();
2964
- function Lu(e, t, n) {
2964
+ function ku(e, t, n) {
2965
2965
  const i = n?.brightness ?? 1.5;
2966
2966
  return {
2967
2967
  stateId: e,
@@ -3716,8 +3716,15 @@ class yn extends Xe {
3716
3716
  for (const a of n.getAll()) this.detachBehavior(this.getItemId(a));
3717
3717
  };
3718
3718
  }
3719
- onItemPointerDown({ itemType: t }) {
3720
- t !== this.targetType && this.clearSelection();
3719
+ onItemPointerDown({ itemType: t, itemId: n }) {
3720
+ if (t !== this.targetType) {
3721
+ t !== null ? this.clearSelectionSilent() : this.clearSelection();
3722
+ return;
3723
+ }
3724
+ if (n) {
3725
+ const i = this.dragStates.get(n);
3726
+ i && this.selectItem(i.item);
3727
+ }
3721
3728
  }
3722
3729
  onSceneSwitched() {
3723
3730
  this.clearSelection();
@@ -3738,7 +3745,7 @@ class yn extends Xe {
3738
3745
  }, a = (h) => {
3739
3746
  s.isDragging = !0;
3740
3747
  const u = n.toLocal(h.global);
3741
- s.startPointer = { x: u.x, y: u.y }, s.startTile = { ...this.getItemPosition(t) }, this.selectItem(t);
3748
+ s.startPointer = { x: u.x, y: u.y }, s.startTile = { ...this.getItemPosition(t) };
3742
3749
  }, c = (h) => {
3743
3750
  if (!s.isDragging) return;
3744
3751
  const u = n.toLocal(h.global), f = u.x - s.startPointer.x, d = u.y - s.startPointer.y, p = s.startTile.x + this.snapDelta(f), g = s.startTile.y + this.snapDelta(d);
@@ -3759,19 +3766,24 @@ class yn extends Xe {
3759
3766
  onDragEnd(t, n) {
3760
3767
  }
3761
3768
  selectItem(t) {
3762
- this.selected !== t && (this.clearSelection(), this.selected = t, t.select(), this.highlight.draw(t.getGraphics(), this.highlightOptions), this.topology?.emit("selection:changed", {
3769
+ this.selected !== t && (this.clearSelectionSilent(), this.selected = t, t.select(), this.highlight.draw(t.getGraphics(), this.highlightOptions), this.topology?.emit("selection:changed", {
3763
3770
  pluginName: this.name,
3764
3771
  itemType: this.targetType,
3765
3772
  itemId: this.getItemId(t)
3766
3773
  }));
3767
3774
  }
3768
3775
  clearSelection() {
3769
- this.selected && (this.selected.deselect(), this.selected = null, this.highlight.destroy(), this.topology?.emit("selection:changed", {
3776
+ this.selected && (this.clearSelectionSilent(), this.topology?.emit("selection:changed", {
3770
3777
  pluginName: this.name,
3771
3778
  itemType: this.targetType,
3772
3779
  itemId: null
3773
3780
  }));
3774
3781
  }
3782
+ clearSelectionSilent() {
3783
+ if (!this.selected) return;
3784
+ const t = this.selected;
3785
+ this.selected = null, this.highlight.destroy(), t.deselect();
3786
+ }
3775
3787
  getSelectedId() {
3776
3788
  return this.selected ? this.getItemId(this.selected) : null;
3777
3789
  }
@@ -3959,7 +3971,7 @@ function Pc(e, t, n) {
3959
3971
  var i = this.enter(), r = this, o = this.exit();
3960
3972
  return typeof e == "function" ? (i = e(i), i && (i = i.selection())) : i = i.append(e + ""), t != null && (r = t(r), r && (r = r.selection())), n == null ? o.remove() : n(o), i && r ? i.merge(r).order() : r;
3961
3973
  }
3962
- function kc(e) {
3974
+ function Lc(e) {
3963
3975
  for (var t = e.selection ? e.selection() : e, n = this._groups, i = t._groups, r = n.length, o = i.length, s = Math.min(r, o), a = new Array(r), c = 0; c < s; ++c)
3964
3976
  for (var l = n[c], h = i[c], u = l.length, f = a[c] = new Array(u), d, p = 0; p < u; ++p)
3965
3977
  (d = l[p] || h[p]) && (f[p] = d);
@@ -3967,7 +3979,7 @@ function kc(e) {
3967
3979
  a[c] = n[c];
3968
3980
  return new N(a, this._parents);
3969
3981
  }
3970
- function Lc() {
3982
+ function kc() {
3971
3983
  for (var e = this._groups, t = -1, n = e.length; ++t < n; )
3972
3984
  for (var i = e[t], r = i.length - 1, o = i[r], s; --r >= 0; )
3973
3985
  (s = i[r]) && (o && s.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(s, o), o = s);
@@ -4268,7 +4280,7 @@ function Pl(e, t, n) {
4268
4280
  this.addEventListener(e.type, o, n), r = { type: e.type, name: e.name, value: t, listener: o, options: n }, i ? i.push(r) : this.__on = [r];
4269
4281
  };
4270
4282
  }
4271
- function kl(e, t, n) {
4283
+ function Ll(e, t, n) {
4272
4284
  var i = El(e + ""), r, o = i.length, s;
4273
4285
  if (arguments.length < 2) {
4274
4286
  var a = this.node().__on;
@@ -4287,7 +4299,7 @@ function Ir(e, t, n) {
4287
4299
  var i = _r(e), r = i.CustomEvent;
4288
4300
  typeof r == "function" ? r = new r(t, n) : (r = i.document.createEvent("Event"), n ? (r.initEvent(t, n.bubbles, n.cancelable), r.detail = n.detail) : r.initEvent(t, !1, !1)), e.dispatchEvent(r);
4289
4301
  }
4290
- function Ll(e, t) {
4302
+ function kl(e, t) {
4291
4303
  return function() {
4292
4304
  return Ir(this, e, t);
4293
4305
  };
@@ -4298,7 +4310,7 @@ function Nl(e, t) {
4298
4310
  };
4299
4311
  }
4300
4312
  function Rl(e, t) {
4301
- return this.each((typeof t == "function" ? Nl : Ll)(e, t));
4313
+ return this.each((typeof t == "function" ? Nl : kl)(e, t));
4302
4314
  }
4303
4315
  function* Dl() {
4304
4316
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
@@ -4326,9 +4338,9 @@ N.prototype = je.prototype = {
4326
4338
  enter: Ac,
4327
4339
  exit: Oc,
4328
4340
  join: Pc,
4329
- merge: kc,
4341
+ merge: Lc,
4330
4342
  selection: $l,
4331
- order: Lc,
4343
+ order: kc,
4332
4344
  sort: Nc,
4333
4345
  call: Dc,
4334
4346
  nodes: $c,
@@ -4349,7 +4361,7 @@ N.prototype = je.prototype = {
4349
4361
  remove: Al,
4350
4362
  clone: Cl,
4351
4363
  datum: Tl,
4352
- on: kl,
4364
+ on: Ll,
4353
4365
  dispatch: Rl,
4354
4366
  [Symbol.iterator]: Dl
4355
4367
  };
@@ -4417,7 +4429,7 @@ function Bn(e, t, n) {
4417
4429
  }
4418
4430
  return n != null && e.push({ name: t, value: n }), e;
4419
4431
  }
4420
- var Ie = 0, Pe = 0, Ee = 0, Mr = 1e3, xt, ke, vt = 0, pe = 0, Pt = 0, Ue = typeof performance == "object" && performance.now ? performance : Date, Er = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
4432
+ var Ie = 0, Pe = 0, Ee = 0, Mr = 1e3, xt, Le, vt = 0, pe = 0, Pt = 0, Ue = typeof performance == "object" && performance.now ? performance : Date, Er = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
4421
4433
  setTimeout(e, 17);
4422
4434
  };
4423
4435
  function Sn() {
@@ -4433,7 +4445,7 @@ yt.prototype = Or.prototype = {
4433
4445
  constructor: yt,
4434
4446
  restart: function(e, t, n) {
4435
4447
  if (typeof e != "function") throw new TypeError("callback is not a function");
4436
- n = (n == null ? Sn() : +n) + (t == null ? 0 : +t), !this._next && ke !== this && (ke ? ke._next = this : xt = this, ke = this), this._call = e, this._time = n, rn();
4448
+ n = (n == null ? Sn() : +n) + (t == null ? 0 : +t), !this._next && Le !== this && (Le ? Le._next = this : xt = this, Le = this), this._call = e, this._time = n, rn();
4437
4449
  },
4438
4450
  stop: function() {
4439
4451
  this._call && (this._call = null, this._time = 1 / 0, rn());
@@ -4464,7 +4476,7 @@ function Gl() {
4464
4476
  function Wl() {
4465
4477
  for (var e, t = xt, n, i = 1 / 0; t; )
4466
4478
  t._call ? (i > t._time && (i = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : xt = n);
4467
- ke = e, rn(i);
4479
+ Le = e, rn(i);
4468
4480
  }
4469
4481
  function rn(e) {
4470
4482
  if (!Ie) {
@@ -4480,7 +4492,7 @@ function Wn(e, t, n) {
4480
4492
  }, t, n), i;
4481
4493
  }
4482
4494
  var Xl = Tr("start", "end", "cancel", "interrupt"), jl = [], Pr = 0, Xn = 1, on = 2, ot = 3, jn = 4, sn = 5, st = 6;
4483
- function kt(e, t, n, i, r, o) {
4495
+ function Lt(e, t, n, i, r, o) {
4484
4496
  var s = e.__transition;
4485
4497
  if (!s) e.__transition = {};
4486
4498
  else if (n in s) return;
@@ -4570,7 +4582,7 @@ function Vl(e) {
4570
4582
  function bn(e, t, n) {
4571
4583
  e.prototype = t.prototype = n, n.constructor = e;
4572
4584
  }
4573
- function kr(e, t) {
4585
+ function Lr(e, t) {
4574
4586
  var n = Object.create(e.prototype);
4575
4587
  for (var i in t) n[i] = t[i];
4576
4588
  return n;
@@ -4749,42 +4761,42 @@ function rh() {
4749
4761
  return this.rgb().formatHex8();
4750
4762
  }
4751
4763
  function oh() {
4752
- return Lr(this).formatHsl();
4764
+ return kr(this).formatHsl();
4753
4765
  }
4754
4766
  function Vn() {
4755
4767
  return this.rgb().formatRgb();
4756
4768
  }
4757
4769
  function Be(e) {
4758
4770
  var t, n;
4759
- return e = (e + "").trim().toLowerCase(), (t = Jl.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Jn(t) : n === 3 ? new L(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Qe(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Qe(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zl.exec(e)) ? new L(t[1], t[2], t[3], 1) : (t = Ql.exec(e)) ? new L(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = eh.exec(e)) ? Qe(t[1], t[2], t[3], t[4]) : (t = th.exec(e)) ? Qe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = nh.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, 1) : (t = ih.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, t[4]) : qn.hasOwnProperty(e) ? Jn(qn[e]) : e === "transparent" ? new L(NaN, NaN, NaN, 0) : null;
4771
+ return e = (e + "").trim().toLowerCase(), (t = Jl.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Jn(t) : n === 3 ? new k(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Qe(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Qe(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zl.exec(e)) ? new k(t[1], t[2], t[3], 1) : (t = Ql.exec(e)) ? new k(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = eh.exec(e)) ? Qe(t[1], t[2], t[3], t[4]) : (t = th.exec(e)) ? Qe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = nh.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, 1) : (t = ih.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, t[4]) : qn.hasOwnProperty(e) ? Jn(qn[e]) : e === "transparent" ? new k(NaN, NaN, NaN, 0) : null;
4760
4772
  }
4761
4773
  function Jn(e) {
4762
- return new L(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
4774
+ return new k(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
4763
4775
  }
4764
4776
  function Qe(e, t, n, i) {
4765
- return i <= 0 && (e = t = n = NaN), new L(e, t, n, i);
4777
+ return i <= 0 && (e = t = n = NaN), new k(e, t, n, i);
4766
4778
  }
4767
4779
  function sh(e) {
4768
- return e instanceof qe || (e = Be(e)), e ? (e = e.rgb(), new L(e.r, e.g, e.b, e.opacity)) : new L();
4780
+ return e instanceof qe || (e = Be(e)), e ? (e = e.rgb(), new k(e.r, e.g, e.b, e.opacity)) : new k();
4769
4781
  }
4770
4782
  function an(e, t, n, i) {
4771
- return arguments.length === 1 ? sh(e) : new L(e, t, n, i ?? 1);
4783
+ return arguments.length === 1 ? sh(e) : new k(e, t, n, i ?? 1);
4772
4784
  }
4773
- function L(e, t, n, i) {
4785
+ function k(e, t, n, i) {
4774
4786
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +i;
4775
4787
  }
4776
- bn(L, an, kr(qe, {
4788
+ bn(k, an, Lr(qe, {
4777
4789
  brighter(e) {
4778
- return e = e == null ? _t : Math.pow(_t, e), new L(this.r * e, this.g * e, this.b * e, this.opacity);
4790
+ return e = e == null ? _t : Math.pow(_t, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
4779
4791
  },
4780
4792
  darker(e) {
4781
- return e = e == null ? He : Math.pow(He, e), new L(this.r * e, this.g * e, this.b * e, this.opacity);
4793
+ return e = e == null ? He : Math.pow(He, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
4782
4794
  },
4783
4795
  rgb() {
4784
4796
  return this;
4785
4797
  },
4786
4798
  clamp() {
4787
- return new L(fe(this.r), fe(this.g), fe(this.b), wt(this.opacity));
4799
+ return new k(fe(this.r), fe(this.g), fe(this.b), wt(this.opacity));
4788
4800
  },
4789
4801
  displayable() {
4790
4802
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
@@ -4818,7 +4830,7 @@ function he(e) {
4818
4830
  function ei(e, t, n, i) {
4819
4831
  return i <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new F(e, t, n, i);
4820
4832
  }
4821
- function Lr(e) {
4833
+ function kr(e) {
4822
4834
  if (e instanceof F) return new F(e.h, e.s, e.l, e.opacity);
4823
4835
  if (e instanceof qe || (e = Be(e)), !e) return new F();
4824
4836
  if (e instanceof F) return e;
@@ -4827,12 +4839,12 @@ function Lr(e) {
4827
4839
  return a ? (t === o ? s = (n - i) / a + (n < i) * 6 : n === o ? s = (i - t) / a + 2 : s = (t - n) / a + 4, a /= c < 0.5 ? o + r : 2 - o - r, s *= 60) : a = c > 0 && c < 1 ? 0 : s, new F(s, a, c, e.opacity);
4828
4840
  }
4829
4841
  function ch(e, t, n, i) {
4830
- return arguments.length === 1 ? Lr(e) : new F(e, t, n, i ?? 1);
4842
+ return arguments.length === 1 ? kr(e) : new F(e, t, n, i ?? 1);
4831
4843
  }
4832
4844
  function F(e, t, n, i) {
4833
4845
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +i;
4834
4846
  }
4835
- bn(F, ch, kr(qe, {
4847
+ bn(F, ch, Lr(qe, {
4836
4848
  brighter(e) {
4837
4849
  return e = e == null ? _t : Math.pow(_t, e), new F(this.h, this.s, this.l * e, this.opacity);
4838
4850
  },
@@ -4841,7 +4853,7 @@ bn(F, ch, kr(qe, {
4841
4853
  },
4842
4854
  rgb() {
4843
4855
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, i = n + (n < 0.5 ? n : 1 - n) * t, r = 2 * n - i;
4844
- return new L(
4856
+ return new k(
4845
4857
  Bt(e >= 240 ? e - 240 : e + 120, r, i),
4846
4858
  Bt(e, r, i),
4847
4859
  Bt(e < 120 ? e + 240 : e - 120, r, i),
@@ -5096,7 +5108,7 @@ function Ph(e, t) {
5096
5108
  }
5097
5109
  return r._value = t, r;
5098
5110
  }
5099
- function kh(e, t) {
5111
+ function Lh(e, t) {
5100
5112
  var n, i;
5101
5113
  function r() {
5102
5114
  var o = t.apply(this, arguments);
@@ -5104,13 +5116,13 @@ function kh(e, t) {
5104
5116
  }
5105
5117
  return r._value = t, r;
5106
5118
  }
5107
- function Lh(e, t) {
5119
+ function kh(e, t) {
5108
5120
  var n = "attr." + e;
5109
5121
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
5110
5122
  if (t == null) return this.tween(n, null);
5111
5123
  if (typeof t != "function") throw new Error();
5112
5124
  var i = Ot(e);
5113
- return this.tween(n, (i.local ? Ph : kh)(i, t));
5125
+ return this.tween(n, (i.local ? Ph : Lh)(i, t));
5114
5126
  }
5115
5127
  function Nh(e, t) {
5116
5128
  return function() {
@@ -5209,7 +5221,7 @@ function Jh(e) {
5209
5221
  typeof e != "function" && (e = _n(e));
5210
5222
  for (var i = this._groups, r = i.length, o = new Array(r), s = 0; s < r; ++s)
5211
5223
  for (var a = i[s], c = a.length, l = o[s] = new Array(c), h, u, f = 0; f < c; ++f)
5212
- (h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u, kt(l[f], t, n, f, l, z(h, n)));
5224
+ (h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u, Lt(l[f], t, n, f, l, z(h, n)));
5213
5225
  return new J(o, this._parents, t, n);
5214
5226
  }
5215
5227
  function Zh(e) {
@@ -5219,7 +5231,7 @@ function Zh(e) {
5219
5231
  for (var c = i[a], l = c.length, h, u = 0; u < l; ++u)
5220
5232
  if (h = c[u]) {
5221
5233
  for (var f = e.call(h, h.__data__, u, c), d, p = z(h, n), g = 0, v = f.length; g < v; ++g)
5222
- (d = f[g]) && kt(d, t, n, g, f, p);
5234
+ (d = f[g]) && Lt(d, t, n, g, f, p);
5223
5235
  o.push(f), s.push(h);
5224
5236
  }
5225
5237
  return new J(o, s, t, n);
@@ -5324,7 +5336,7 @@ function gu() {
5324
5336
  for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
5325
5337
  if (c = s[l]) {
5326
5338
  var h = z(c, t);
5327
- kt(c, e, n, l, s, {
5339
+ Lt(c, e, n, l, s, {
5328
5340
  time: h.time + h.delay + h.duration,
5329
5341
  delay: 0,
5330
5342
  duration: h.duration,
@@ -5371,7 +5383,7 @@ J.prototype = {
5371
5383
  each: K.each,
5372
5384
  on: qh,
5373
5385
  attr: Mh,
5374
- attrTween: Lh,
5386
+ attrTween: kh,
5375
5387
  style: ou,
5376
5388
  styleTween: cu,
5377
5389
  text: uu,
@@ -5406,7 +5418,7 @@ function wu(e) {
5406
5418
  e instanceof J ? (t = e._id, e = e._name) : (t = Ur(), (n = yu).time = Sn(), e = e == null ? null : e + "");
5407
5419
  for (var i = this._groups, r = i.length, o = 0; o < r; ++o)
5408
5420
  for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
5409
- (c = s[l]) && kt(c, e, t, l, s, n || _u(c, t));
5421
+ (c = s[l]) && Lt(c, e, t, l, s, n || _u(c, t));
5410
5422
  return new J(i, this._parents, e, t);
5411
5423
  }
5412
5424
  je.prototype.interrupt = Vl;
@@ -5528,8 +5540,12 @@ class Hu extends Xe {
5528
5540
  for (const o of n.getAll()) this.detachLine(o.id);
5529
5541
  };
5530
5542
  }
5531
- onItemPointerDown({ itemType: t }) {
5532
- t !== "line" && this.clearSelection();
5543
+ onItemPointerDown({ itemType: t, itemId: n }) {
5544
+ if (t !== "line") {
5545
+ t !== null ? this.clearSelectionSilent() : this.clearSelection();
5546
+ return;
5547
+ }
5548
+ n && this.selectedLineId !== n && this.select(n);
5533
5549
  }
5534
5550
  attachLine(t, n) {
5535
5551
  const i = t.getContainer();
@@ -5537,11 +5553,7 @@ class Hu extends Xe {
5537
5553
  const r = new ee();
5538
5554
  r.visible = !1, r.zIndex = 1e4, n.projectionContainer.addChild(r);
5539
5555
  const o = (a) => {
5540
- if (this.selectedLineId !== t.id) {
5541
- this.select(t.id);
5542
- return;
5543
- }
5544
- this.handlePathDrag(a, t, n);
5556
+ this.selectedLineId === t.id && this.handlePathDrag(a, t, n);
5545
5557
  }, s = () => {
5546
5558
  this.selectedLineId === t.id && this.renderMarkers(this.editStates.get(t.id));
5547
5559
  };
@@ -5556,7 +5568,7 @@ class Hu extends Xe {
5556
5568
  savedZIndex = null;
5557
5569
  SELECTED_ZINDEX = 9999;
5558
5570
  select(t) {
5559
- if (this.selectedLineId && this.selectedLineId !== t && this.deselect(this.selectedLineId), this.selectedLineId === t) {
5571
+ if (this.selectedLineId && this.selectedLineId !== t && this.clearSelectionSilent(), this.selectedLineId === t) {
5560
5572
  this.deselect(t);
5561
5573
  return;
5562
5574
  }
@@ -5576,6 +5588,11 @@ class Hu extends Xe {
5576
5588
  clearSelection() {
5577
5589
  this.selectedLineId && this.deselect(this.selectedLineId);
5578
5590
  }
5591
+ clearSelectionSilent() {
5592
+ if (!this.selectedLineId) return;
5593
+ const t = this.editStates.get(this.selectedLineId);
5594
+ t && (this.savedZIndex !== null && (t.line.getContainer().zIndex = this.savedZIndex, this.savedZIndex = null), this.selectedLineId = null, this.cancelDrag(), t.markersContainer.visible = !1, t.markersContainer.removeChildren());
5595
+ }
5579
5596
  renderMarkers(t) {
5580
5597
  const { line: n, scene: i, markersContainer: r } = t, o = n.options.anchor;
5581
5598
  r.removeChildren(), o.forEach((s, a) => {
@@ -5752,16 +5769,6 @@ class Gu extends Xe {
5752
5769
  for (const s of n.getAll()) this.detachListeners(s.id);
5753
5770
  };
5754
5771
  }
5755
- onItemPointerDown({ itemType: t, itemId: n, sceneId: i }) {
5756
- if (t === "rect" && n) {
5757
- const o = this.topology?.getScene(i)?.rects.get(n);
5758
- if (o) {
5759
- this.activeRect && this.activeRect !== o && this.activeRect.deselect(), o.select();
5760
- return;
5761
- }
5762
- }
5763
- this.activeRect?.deselect();
5764
- }
5765
5772
  onSceneSwitched() {
5766
5773
  this.activeRect?.deselect();
5767
5774
  }
@@ -5910,7 +5917,7 @@ class qu extends Et {
5910
5917
  return t.id;
5911
5918
  }
5912
5919
  }
5913
- class Lt extends vn {
5920
+ class kt extends vn {
5914
5921
  _isActive = !1;
5915
5922
  _opts;
5916
5923
  _prevDragEnabled = null;
@@ -6016,7 +6023,7 @@ class Lt extends vn {
6016
6023
  return { x: Math.round(i.x / x), y: Math.round(i.y / x) };
6017
6024
  }
6018
6025
  }
6019
- class Ku extends Lt {
6026
+ class Ku extends kt {
6020
6027
  name = "text-creator";
6021
6028
  _defaults = {};
6022
6029
  _previewId = null;
@@ -6068,7 +6075,7 @@ class Ku extends Lt {
6068
6075
  !t || !this._handlers || (t.off("globalpointermove", this._handlers.onMove), t.off("pointerdown", this._handlers.onDown), t.cursor = "default", this._handlers = null);
6069
6076
  }
6070
6077
  }
6071
- class Vu extends Lt {
6078
+ class Vu extends kt {
6072
6079
  name = "rect-creator";
6073
6080
  _defaults = {};
6074
6081
  _previewId = null;
@@ -6125,7 +6132,7 @@ class Vu extends Lt {
6125
6132
  !t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
6126
6133
  }
6127
6134
  }
6128
- class Ju extends Lt {
6135
+ class Ju extends kt {
6129
6136
  name = "line-creator";
6130
6137
  _defaults = {};
6131
6138
  _previewId = null;
@@ -6183,7 +6190,7 @@ class Ju extends Lt {
6183
6190
  !t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
6184
6191
  }
6185
6192
  }
6186
- class Zu extends Lt {
6193
+ class Zu extends kt {
6187
6194
  name = "node-creator";
6188
6195
  _defaults = {};
6189
6196
  _previewId = null;
@@ -6262,7 +6269,7 @@ export {
6262
6269
  it as BILLBOARD_SCALE_Y,
6263
6270
  cr as BILLBOARD_SKEW_X,
6264
6271
  lr as BILLBOARD_SKEW_Y,
6265
- Lt as BaseCreatorPlugin,
6272
+ kt as BaseCreatorPlugin,
6266
6273
  ft as COS_ELEVATION,
6267
6274
  Zi as ELEVATION,
6268
6275
  qa as HitTestPlugin,
@@ -6300,8 +6307,8 @@ export {
6300
6307
  er as calculateIsometricSkew,
6301
6308
  Mu as calculateIsometricTileDiagonals,
6302
6309
  Pu as createBlinkStatePlugin,
6303
- ku as createBounceStatePlugin,
6304
- Lu as createBrightenStatePlugin,
6310
+ Lu as createBounceStatePlugin,
6311
+ ku as createBrightenStatePlugin,
6305
6312
  Nu as createDarkenStatePlugin,
6306
6313
  Ru as createGlowStatePlugin,
6307
6314
  Du as createHeartbeatStatePlugin,