@metadev/daga-react 4.2.3 → 4.2.5

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/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as k, jsxs as V, Fragment as Di } from "react/jsx-runtime";
1
+ import { jsx as k, jsxs as V, Fragment as Yi } from "react/jsx-runtime";
2
2
  import * as N from "d3";
3
- import { debounceTime as Hi, Subject as Xt, merge as Gi, map as Bi } from "rxjs";
4
- import { createContext as fi, useState as U, useContext as Yt, useRef as ct, useEffect as Et, useMemo as Fi } from "react";
5
- var b = /* @__PURE__ */ ((i) => (i.Bottom = "bottom", i.Left = "left", i.Right = "right", i.Top = "top", i))(b || {}), Wt = /* @__PURE__ */ ((i) => (i.BottomLeft = "bottom-left", i.BottomRight = "bottom-right", i.TopLeft = "top-left", i.TopRight = "top-right", i))(Wt || {}), Pt = /* @__PURE__ */ ((i) => (i.Left = "left", i.Center = "center", i.Right = "right", i))(Pt || {}), Kt = /* @__PURE__ */ ((i) => (i.Top = "top", i.Center = "center", i.Bottom = "bottom", i))(Kt || {});
6
- const Mt = (i) => [Math.round(i[0]), Math.round(i[1])], bt = (i, t, e) => t < e ? t <= i && i <= e : e <= i && i <= t, ii = (i, t, e) => (i - t[0]) / (t[1] - t[0]) * (e[1] - e[0]) + e[0], qt = (i, t, e, o, a, l, s) => {
3
+ import { debounceTime as Xi, Subject as Zt, merge as ji, map as Wi } from "rxjs";
4
+ import { createContext as Ci, useState as U, useContext as Wt, useRef as dt, useEffect as Tt, useMemo as Zi } from "react";
5
+ var b = /* @__PURE__ */ ((i) => (i.Bottom = "bottom", i.Left = "left", i.Right = "right", i.Top = "top", i))(b || {}), qt = /* @__PURE__ */ ((i) => (i.BottomLeft = "bottom-left", i.BottomRight = "bottom-right", i.TopLeft = "top-left", i.TopRight = "top-right", i))(qt || {}), zt = /* @__PURE__ */ ((i) => (i.Left = "left", i.Center = "center", i.Right = "right", i))(zt || {}), Qt = /* @__PURE__ */ ((i) => (i.Top = "top", i.Center = "center", i.Bottom = "bottom", i))(Qt || {});
6
+ const Nt = (i) => [Math.round(i[0]), Math.round(i[1])], kt = (i, t, e) => t < e ? t <= i && i <= e : e <= i && i <= t, di = (i, t, e) => (i - t[0]) / (t[1] - t[0]) * (e[1] - e[0]) + e[0], te = (i, t, e, o, a, l, s) => {
7
7
  const n = (() => {
8
8
  switch (l) {
9
9
  case "start":
@@ -16,7 +16,7 @@ const Mt = (i) => [Math.round(i[0]), Math.round(i[1])], bt = (i, t, e) => t < e
16
16
  }
17
17
  case "floating":
18
18
  default:
19
- return ii(i[0], t, o);
19
+ return di(i[0], t, o);
20
20
  }
21
21
  })(), r = (() => {
22
22
  switch (s) {
@@ -30,47 +30,47 @@ const Mt = (i) => [Math.round(i[0]), Math.round(i[1])], bt = (i, t, e) => t < e
30
30
  }
31
31
  case "floating":
32
32
  default:
33
- return ii(i[1], e, a);
33
+ return di(i[1], e, a);
34
34
  }
35
35
  })();
36
36
  return [n, r];
37
- }, pi = (i, t) => ((i[0] - t[0]) ** 2 + (i[1] - t[1]) ** 2) ** 0.5, Ui = (i, t) => (bt(
37
+ }, Si = (i, t) => ((i[0] - t[0]) ** 2 + (i[1] - t[1]) ** 2) ** 0.5, Ki = (i, t) => (kt(
38
38
  i[0][0],
39
39
  t[0][0],
40
40
  t[1][0]
41
- ) || bt(
41
+ ) || kt(
42
42
  i[1][0],
43
43
  t[1][0],
44
44
  t[0][0]
45
- ) || bt(
45
+ ) || kt(
46
46
  t[0][0],
47
47
  i[0][0],
48
48
  i[1][0]
49
- ) || bt(
49
+ ) || kt(
50
50
  t[1][0],
51
51
  i[1][0],
52
52
  i[0][0]
53
- )) && (bt(
53
+ )) && (kt(
54
54
  i[0][1],
55
55
  t[0][1],
56
56
  t[1][1]
57
- ) || bt(
57
+ ) || kt(
58
58
  i[1][1],
59
59
  t[1][1],
60
60
  t[0][1]
61
- ) || bt(
61
+ ) || kt(
62
62
  t[0][1],
63
63
  i[0][1],
64
64
  i[1][1]
65
- ) || bt(
65
+ ) || kt(
66
66
  t[1][1],
67
67
  i[1][1],
68
68
  i[0][1]
69
69
  ));
70
- var L = /* @__PURE__ */ ((i) => (i.Blur = "blur", i.Change = "change", i.Click = "click", i.ContextMenu = "contextmenu", i.DoubleClick = "dblclick", i.Focus = "focus", i.FocusIn = "focusin", i.FocusOut = "focusout", i.Input = "input", i.KeyDown = "keydown", i.KeyUp = "keyup", i.MouseDown = "mousedown", i.MouseEnter = "mouseenter", i.MouseLeave = "mouseleave", i.MouseMove = "mousemove", i.MouseOut = "mouseout", i.MouseOver = "mouseover", i.MouseUp = "mouseup", i.TouchStart = "touchstart", i.TouchEnd = "touchend", i.Wheel = "wheel", i))(L || {}), it = /* @__PURE__ */ ((i) => (i.Alt = "Alt", i.AltGraph = "AltGraph", i.ArrowDown = "ArrowDown", i.ArrowLeft = "ArrowLeft", i.ArrowRight = "ArrowRight", i.ArrowUp = "ArrowUp", i.Backspace = "Backspace", i.Control = "Control", i.Delete = "Delete", i.End = "End", i.Enter = "Enter", i.Escape = "Escape", i.Home = "Home", i.OS = "OS", i.PageDown = "PageDown", i.PageUp = "PageUp", i.Shift = "Shift", i.Tab = "Tab", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Drag = "drag", i.Start = "start", i.End = "end", i))(M || {}), fe = /* @__PURE__ */ ((i) => (i.Zoom = "zoom", i.Start = "start", i.End = "end", i))(fe || {});
71
- const pe = (i) => i.replace(/([!"#$%&'()*+,\-./:;<=>?@[\\\]^`{|}])/g, "\\$1");
72
- var vi = /* @__PURE__ */ ((i) => (i.Straight = "straight", i.Bezier = "bezier", i.Square = "square", i))(vi || {}), yi = /* @__PURE__ */ ((i) => (i.Solid = "solid", i.Dashed = "dashed", i.GappedDashes = "gapped-dashes", i.Dotted = "dotted", i))(yi || {});
73
- const Yi = 20, Xi = (i, t, e, o, a) => {
70
+ var L = /* @__PURE__ */ ((i) => (i.Blur = "blur", i.Change = "change", i.Click = "click", i.ContextMenu = "contextmenu", i.DoubleClick = "dblclick", i.Focus = "focus", i.FocusIn = "focusin", i.FocusOut = "focusout", i.Input = "input", i.KeyDown = "keydown", i.KeyUp = "keyup", i.MouseDown = "mousedown", i.MouseEnter = "mouseenter", i.MouseLeave = "mouseleave", i.MouseMove = "mousemove", i.MouseOut = "mouseout", i.MouseOver = "mouseover", i.MouseUp = "mouseup", i.TouchStart = "touchstart", i.TouchEnd = "touchend", i.Wheel = "wheel", i))(L || {}), it = /* @__PURE__ */ ((i) => (i.Alt = "Alt", i.AltGraph = "AltGraph", i.ArrowDown = "ArrowDown", i.ArrowLeft = "ArrowLeft", i.ArrowRight = "ArrowRight", i.ArrowUp = "ArrowUp", i.Backspace = "Backspace", i.Control = "Control", i.Delete = "Delete", i.End = "End", i.Enter = "Enter", i.Escape = "Escape", i.Home = "Home", i.OS = "OS", i.PageDown = "PageDown", i.PageUp = "PageUp", i.Shift = "Shift", i.Tab = "Tab", i))(it || {}), M = /* @__PURE__ */ ((i) => (i.Drag = "drag", i.Start = "start", i.End = "end", i))(M || {}), ve = /* @__PURE__ */ ((i) => (i.Zoom = "zoom", i.Start = "start", i.End = "end", i))(ve || {});
71
+ const ye = (i) => i.replace(/([!"#$%&'()*+,\-./:;<=>?@[\\\]^`{|}])/g, "\\$1");
72
+ var Ii = /* @__PURE__ */ ((i) => (i.Straight = "straight", i.Bezier = "bezier", i.Square = "square", i))(Ii || {}), Se = /* @__PURE__ */ ((i) => (i.Solid = "solid", i.Dashed = "dashed", i.GappedDashes = "gapped-dashes", i.Dotted = "dotted", i))(Se || {});
73
+ const qi = 20, Ji = (i, t, e, o, a) => {
74
74
  if (typeof i == "function")
75
75
  return i(
76
76
  t,
@@ -83,7 +83,7 @@ const Yi = 20, Xi = (i, t, e, o, a) => {
83
83
  if (t.length === 1)
84
84
  return `M ${t[0][0]} ${t[0][1]}`;
85
85
  {
86
- a = a || Yi;
86
+ a = a || qi;
87
87
  let l = "", s, n;
88
88
  switch (i) {
89
89
  case "straight":
@@ -229,7 +229,7 @@ const Yi = 20, Xi = (i, t, e, o, a) => {
229
229
  }
230
230
  return l;
231
231
  }
232
- }, oi = (i, t) => {
232
+ }, be = (i, t) => {
233
233
  switch (i) {
234
234
  case "dotted":
235
235
  return `${t}`;
@@ -245,68 +245,68 @@ const Yi = 20, Xi = (i, t, e, o, a) => {
245
245
  const e = i.indexOf(t);
246
246
  return e >= 0 && i.splice(e, 1), i;
247
247
  };
248
- var Qt = /* @__PURE__ */ ((i) => (i.Ellipse = "ellipse", i.Empty = "empty", i.Folder = "folder", i.Hexagon = "hexagon", i.Octagon = "octagon", i.Pill = "pill", i.Rectangle = "rectangle", i.Rhombus = "rhombus", i.RoundedRectangle = "rounded-rectangle", i.StickyNote = "sticky-note", i))(Qt || {});
249
- const ve = (i, t, e, o, a) => {
248
+ var _t = /* @__PURE__ */ ((i) => (i.Ellipse = "ellipse", i.Empty = "empty", i.Folder = "folder", i.Hexagon = "hexagon", i.Octagon = "octagon", i.Pill = "pill", i.Rectangle = "rectangle", i.Rhombus = "rhombus", i.RoundedRectangle = "rounded-rectangle", i.StickyNote = "sticky-note", i))(_t || {});
249
+ const ke = (i, t, e, o, a) => {
250
250
  if (typeof i == "function")
251
251
  return i(t, e, o, a);
252
252
  switch (i) {
253
253
  case "ellipse":
254
- return bi(t, e, o, a);
254
+ return Ai(t, e, o, a);
255
255
  case "empty":
256
- return ji();
256
+ return Qi();
257
257
  case "folder":
258
- return Wi(t, e, o, a);
258
+ return to(t, e, o, a);
259
259
  case "hexagon":
260
- return Zi(t, e, o, a);
260
+ return eo(t, e, o, a);
261
261
  case "octagon":
262
- return Ki(t, e, o, a);
262
+ return io(t, e, o, a);
263
263
  case "pill":
264
- return Zt(t, e, o, a);
264
+ return Jt(t, e, o, a);
265
265
  case "rectangle":
266
- return si(t, e, o, a);
266
+ return hi(t, e, o, a);
267
267
  case "rhombus":
268
- return qi(t, e, o, a);
268
+ return oo(t, e, o, a);
269
269
  case "rounded-rectangle":
270
- return Ji(t, e, o, a);
270
+ return so(t, e, o, a);
271
271
  case "sticky-note":
272
- return Qi(t, e, o, a);
272
+ return no(t, e, o, a);
273
273
  default:
274
- return si(t, e, o, a);
274
+ return hi(t, e, o, a);
275
275
  }
276
- }, bi = (i, t, e, o) => `M ${i + e / 2} ${t} A ${e / 2} ${o / 2} 0 0 0 ${i + e / 2} ${t + o} A ${e / 2} ${o / 2} 0 1 0 ${i + e / 2} ${t} Z`, ji = () => "Z", Wi = (i, t, e, o) => `M ${i} ${t} L ${i + e / 3} ${t} L ${i + e / 2} ${t + o / 6} L ${i + e} ${t + o / 6} L ${i + e} ${t + o} L ${i} ${t + o} Z`, Zi = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 2} L ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} L ${i} ${t + o / 2} Z`, Ki = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 4} L ${i + e} ${t + 3 * o / 4} L ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} L ${i} ${t + 3 * o / 4} L ${i} ${t + o / 4} L ${i + e / 4} ${t} Z`, Zt = (i, t, e, o) => o < e ? `M ${i + o / 2} ${t} L ${i + e - o / 2} ${t} A ${o / 2} ${o / 2} 0 0 1 ${i + e} ${t + o / 2} A ${o / 2} ${o / 2} 0 0 1 ${i + e - o / 2} ${t + o} L ${i + o / 2} ${t + o} A ${o / 2} ${o / 2} 0 0 1 ${i} ${t + o / 2} A ${o / 2} ${o / 2} 0 0 1 ${i + o / 2} ${t} Z` : o > e ? `M ${i} ${t + e / 2} L ${i} ${t + o - e / 2} A ${e / 2} ${e / 2} 0 0 0 ${i + e / 2} ${t + o} A ${e / 2} ${e / 2} 0 0 0 ${i + e} ${t + o - e / 2} L ${i + e} ${t + e / 2} A ${e / 2} ${e / 2} 0 0 0 ${i + e / 2} ${t} A ${e / 2} ${e / 2} 0 0 0 ${i} ${t + e / 2} Z` : bi(i, t, e, o), si = (i, t, e, o) => `M ${i} ${t} L ${i + e} ${t} L ${i + e} ${t + o} L ${i} ${t + o} Z`, qi = (i, t, e, o) => `M ${i + e / 2} ${t} L ${i + e} ${t + o / 2} L ${i + e / 2} ${t + o} L ${i} ${t + o / 2} Z`, Ji = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} A ${e / 4} ${o / 4} 0 0 1 ${i + e} ${t + o / 4} L ${i + e} ${t + 3 * o / 4} A ${e / 4} ${o / 4} 0 0 1 ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} A ${e / 4} ${o / 4} 0 0 1 ${i} ${t + 3 * o / 4} L ${i} ${t + o / 4} A ${e / 4} ${o / 4} 0 0 1 ${i + e / 4} ${t} Z`, Qi = (i, t, e, o) => `M ${i} ${t} L ${i + 3 * e / 4} ${t} L ${i + 3 * e / 4} ${t + o / 4} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 4} L ${i + 3 * e / 4} ${t + o / 4} L ${i + e} ${t + o / 4} L ${i + e} ${t + o} L ${i} ${t + o} Z`;
276
+ }, Ai = (i, t, e, o) => `M ${i + e / 2} ${t} A ${e / 2} ${o / 2} 0 0 0 ${i + e / 2} ${t + o} A ${e / 2} ${o / 2} 0 1 0 ${i + e / 2} ${t} Z`, Qi = () => "Z", to = (i, t, e, o) => `M ${i} ${t} L ${i + e / 3} ${t} L ${i + e / 2} ${t + o / 6} L ${i + e} ${t + o / 6} L ${i + e} ${t + o} L ${i} ${t + o} Z`, eo = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 2} L ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} L ${i} ${t + o / 2} Z`, io = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 4} L ${i + e} ${t + 3 * o / 4} L ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} L ${i} ${t + 3 * o / 4} L ${i} ${t + o / 4} L ${i + e / 4} ${t} Z`, Jt = (i, t, e, o) => o < e ? `M ${i + o / 2} ${t} L ${i + e - o / 2} ${t} A ${o / 2} ${o / 2} 0 0 1 ${i + e} ${t + o / 2} A ${o / 2} ${o / 2} 0 0 1 ${i + e - o / 2} ${t + o} L ${i + o / 2} ${t + o} A ${o / 2} ${o / 2} 0 0 1 ${i} ${t + o / 2} A ${o / 2} ${o / 2} 0 0 1 ${i + o / 2} ${t} Z` : o > e ? `M ${i} ${t + e / 2} L ${i} ${t + o - e / 2} A ${e / 2} ${e / 2} 0 0 0 ${i + e / 2} ${t + o} A ${e / 2} ${e / 2} 0 0 0 ${i + e} ${t + o - e / 2} L ${i + e} ${t + e / 2} A ${e / 2} ${e / 2} 0 0 0 ${i + e / 2} ${t} A ${e / 2} ${e / 2} 0 0 0 ${i} ${t + e / 2} Z` : Ai(i, t, e, o), hi = (i, t, e, o) => `M ${i} ${t} L ${i + e} ${t} L ${i + e} ${t + o} L ${i} ${t + o} Z`, oo = (i, t, e, o) => `M ${i + e / 2} ${t} L ${i + e} ${t + o / 2} L ${i + e / 2} ${t + o} L ${i} ${t + o / 2} Z`, so = (i, t, e, o) => `M ${i + e / 4} ${t} L ${i + 3 * e / 4} ${t} A ${e / 4} ${o / 4} 0 0 1 ${i + e} ${t + o / 4} L ${i + e} ${t + 3 * o / 4} A ${e / 4} ${o / 4} 0 0 1 ${i + 3 * e / 4} ${t + o} L ${i + e / 4} ${t + o} A ${e / 4} ${o / 4} 0 0 1 ${i} ${t + 3 * o / 4} L ${i} ${t + o / 4} A ${e / 4} ${o / 4} 0 0 1 ${i + e / 4} ${t} Z`, no = (i, t, e, o) => `M ${i} ${t} L ${i + 3 * e / 4} ${t} L ${i + 3 * e / 4} ${t + o / 4} L ${i + 3 * e / 4} ${t} L ${i + e} ${t + o / 4} L ${i + 3 * e / 4} ${t + o / 4} L ${i + e} ${t + o / 4} L ${i + e} ${t + o} L ${i} ${t + o} Z`;
277
277
  var P = /* @__PURE__ */ ((i) => (i.AllScroll = "all-scroll", i.Auto = "auto", i.Crosshair = "crosshair", i.EWResize = "ew-resize", i.Grab = "grab", i.Grabbing = "grabbing", i.Move = "move", i.NoDrop = "no-drop", i.NSResize = "ns-resize", i.NotAllowed = "not-allowed", i.ZoomIn = "zoom-in", i.ZoomOut = "zoom-out", i))(P || {});
278
- const to = (i) => Math.max(...i.split(`
279
- `).map((t) => t.length)), eo = (i) => {
278
+ const ro = (i) => Math.max(...i.split(`
279
+ `).map((t) => t.length)), ao = (i) => {
280
280
  var t;
281
281
  return ((t = i.match(/\n/g)) == null ? void 0 : t.length) || 0;
282
282
  }, et = [];
283
283
  for (let i = 0; i < 256; ++i)
284
284
  et.push((i + 256).toString(16).slice(1));
285
- function io(i, t = 0) {
285
+ function lo(i, t = 0) {
286
286
  return (et[i[t + 0]] + et[i[t + 1]] + et[i[t + 2]] + et[i[t + 3]] + "-" + et[i[t + 4]] + et[i[t + 5]] + "-" + et[i[t + 6]] + et[i[t + 7]] + "-" + et[i[t + 8]] + et[i[t + 9]] + "-" + et[i[t + 10]] + et[i[t + 11]] + et[i[t + 12]] + et[i[t + 13]] + et[i[t + 14]] + et[i[t + 15]]).toLowerCase();
287
287
  }
288
- let le;
289
- const oo = new Uint8Array(16);
290
- function so() {
291
- if (!le) {
288
+ let de;
289
+ const co = new Uint8Array(16);
290
+ function ho() {
291
+ if (!de) {
292
292
  if (typeof crypto > "u" || !crypto.getRandomValues)
293
293
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
294
- le = crypto.getRandomValues.bind(crypto);
294
+ de = crypto.getRandomValues.bind(crypto);
295
295
  }
296
- return le(oo);
296
+ return de(co);
297
297
  }
298
- const no = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ni = { randomUUID: no };
299
- function ri(i, t, e) {
298
+ const go = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gi = { randomUUID: go };
299
+ function ui(i, t, e) {
300
300
  var a;
301
- if (ni.randomUUID && !i)
302
- return ni.randomUUID();
301
+ if (gi.randomUUID && !i)
302
+ return gi.randomUUID();
303
303
  i = i || {};
304
- const o = i.random ?? ((a = i.rng) == null ? void 0 : a.call(i)) ?? so();
304
+ const o = i.random ?? ((a = i.rng) == null ? void 0 : a.call(i)) ?? ho();
305
305
  if (o.length < 16)
306
306
  throw new Error("Random bytes length must be >= 16");
307
- return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, io(o);
307
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, lo(o);
308
308
  }
309
- const rt = (i) => {
309
+ const at = (i) => {
310
310
  const { selected: t, highlighted: e, ...o } = i, a = o, l = {
311
311
  ...a,
312
312
  ...t
@@ -325,7 +325,7 @@ const rt = (i) => {
325
325
  selectedAndHighlightedLook: n
326
326
  };
327
327
  };
328
- class te {
328
+ class ie {
329
329
  constructor() {
330
330
  this.entities = [], this.entityMap = {};
331
331
  }
@@ -436,8 +436,8 @@ class te {
436
436
  yield t;
437
437
  }
438
438
  }
439
- const Vt = 0;
440
- class $t {
439
+ const Ot = 0;
440
+ class Mt {
441
441
  constructor(t, e) {
442
442
  this.selfRemoved = !1, this.selfRemovedTimestamp = null, this.model = t, this._id = e;
443
443
  }
@@ -469,10 +469,10 @@ class $t {
469
469
  */
470
470
  select() {
471
471
  var t, e;
472
- return (e = (t = this.model.canvas) == null ? void 0 : t.selectCanvasView()) == null ? void 0 : e.select(`[id='${pe(this.id)}']`);
472
+ return (e = (t = this.model.canvas) == null ? void 0 : t.selectCanvasView()) == null ? void 0 : e.select(`[id='${ye(this.id)}']`);
473
473
  }
474
474
  }
475
- class yt extends te {
475
+ class bt extends ie {
476
476
  all(t = !1) {
477
477
  return t ? super.all() : super.filter((e) => !e.removed);
478
478
  }
@@ -510,13 +510,13 @@ class yt extends te {
510
510
  yield e;
511
511
  }
512
512
  }
513
- class ro {
514
- constructor(t, e, o, a, l, s) {
515
- this.name = t, this.type = e, this.defaultValue = o, this.basic = a, this.editable = l, this.rootAttribute = s, this.options = void 0, this.properties = void 0;
513
+ class uo {
514
+ constructor(t, e, o, a, l, s, n) {
515
+ this.name = t, this.label = e, this.type = o, this.defaultValue = a, this.basic = l, this.editable = s, this.rootAttribute = n, this.options = void 0, this.properties = void 0;
516
516
  }
517
517
  }
518
518
  var _ = /* @__PURE__ */ ((i) => (i.Boolean = "boolean", i.Color = "color", i.Date = "date", i.Datetime = "datetime", i.Number = "number", i.Object = "object", i.Option = "option", i.OptionList = "option-list", i.OptionSet = "option-set", i.Text = "text", i.TextArea = "text-area", i.TextList = "text-list", i.TextSet = "text-set", i.TextMap = "text-map", i.Time = "time", i.Url = "url", i))(_ || {});
519
- class ee {
519
+ class oe {
520
520
  constructor(t = []) {
521
521
  this.propertyList = t, this.propertyMap = {};
522
522
  for (const e of this.propertyList)
@@ -532,24 +532,24 @@ class ee {
532
532
  return this.propertyList.length > 0;
533
533
  }
534
534
  }
535
- function At(i, t) {
535
+ function xt(i, t) {
536
536
  return !t || i[0] > t[0] ? !0 : i[0] === t[0] ? i[1] >= t[1] : !1;
537
537
  }
538
- const ai = (i) => i == null || i === "" || i instanceof Array && i.length === 0 || i instanceof Object && Object.keys(i).length === 0, Lt = (i, t) => i === t || JSON.stringify(i) === JSON.stringify(t), ki = (i, t, e) => {
538
+ const mi = (i) => i == null || i === "" || i instanceof Array && i.length === 0 || i instanceof Object && Object.keys(i).length === 0, Et = (i, t) => i === t || JSON.stringify(i) === JSON.stringify(t), xi = (i, t, e) => {
539
539
  const o = {}, a = {};
540
540
  for (const l in e.propertySet.propertyMap)
541
541
  if (e.propertySet.propertyMap[l].type === _.Object) {
542
- const s = ki(
542
+ const s = xi(
543
543
  i[l],
544
544
  t[l],
545
545
  e.getSubValueSet(l)
546
546
  );
547
547
  Object.keys(s[0]).length > 0 && Object.keys(s[1]).length > 0 && (o[l] = s[0], a[l] = s[1]);
548
548
  } else
549
- Lt(i[l], t[l]) || (o[l] = i[l], a[l] = t[l]);
549
+ Et(i[l], t[l]) || (o[l] = i[l], a[l] = t[l]);
550
550
  return [o, a];
551
- }, ao = (i) => i != null && i.constructor === Object;
552
- class St {
551
+ }, mo = (i) => i != null && i.constructor === Object;
552
+ class It {
553
553
  constructor(t, e) {
554
554
  this.displayedProperties = [], this.hiddenProperties = [], this.values = {}, this.valueSets = {}, this.ownTimestamps = {}, this.propertySet = t, this.rootElement = e, this.resetValues();
555
555
  }
@@ -657,7 +657,7 @@ class St {
657
657
  */
658
658
  hasValue(t) {
659
659
  const e = this.getValue(t);
660
- return !ai(e);
660
+ return !mi(e);
661
661
  }
662
662
  /**
663
663
  * Checks if the value under the key is not empty or the default value.
@@ -667,7 +667,7 @@ class St {
667
667
  */
668
668
  hasSetValue(t) {
669
669
  const e = this.getValue(t), o = this.propertySet.getProperty(t);
670
- return o && o.type === _.Object ? this.getSubValueSet(t).hasAnySetValue() : !ai(e) && !Lt(e, o == null ? void 0 : o.defaultValue);
670
+ return o && o.type === _.Object ? this.getSubValueSet(t).hasAnySetValue() : !mi(e) && !Et(e, o == null ? void 0 : o.defaultValue);
671
671
  }
672
672
  /**
673
673
  * Checks if any of the values in the set are not empty or the default value.
@@ -689,7 +689,7 @@ class St {
689
689
  setValue(t, e) {
690
690
  const o = this.propertySet.getProperty(t);
691
691
  if (o) {
692
- o.type === _.Object ? this.valueSets[t].setValues(e) : (this.values[t] = e, Lt(e, o.defaultValue) || this.displayProperty(o));
692
+ o.type === _.Object ? this.valueSets[t].setValues(e) : (this.values[t] = e, Et(e, o.defaultValue) || this.displayProperty(o));
693
693
  const a = o.rootAttribute;
694
694
  a != null && this.setRootElementValue(a, e);
695
695
  }
@@ -739,7 +739,7 @@ class St {
739
739
  this.propertySet.getProperty(o).type === _.Object ? this.valueSets[o].overwriteValuesLww(
740
740
  t[o],
741
741
  e
742
- ) : At(e, this.ownTimestamps[o]) && (this.setValue(o, t[o]), this.ownTimestamps[o] = e);
742
+ ) : xt(e, this.ownTimestamps[o]) && (this.setValue(o, t[o]), this.ownTimestamps[o] = e);
743
743
  }
744
744
  /**
745
745
  * Sets all the values of this set to the defaults.
@@ -750,10 +750,10 @@ class St {
750
750
  this.displayedProperties = [], this.hiddenProperties = [], this.ownTimestamps = {};
751
751
  for (const t in this.propertySet.propertyMap) {
752
752
  const e = this.propertySet.getProperty(t), o = e.rootAttribute;
753
- e.type === _.Object ? this.valueSets[t] = this.constructSubValueSet(t) : this.values[t] = structuredClone(e.defaultValue), o != null && e.defaultValue !== void 0 && !Lt(
753
+ e.type === _.Object ? this.valueSets[t] = this.constructSubValueSet(t) : this.values[t] = structuredClone(e.defaultValue), o != null && e.defaultValue !== void 0 && !Et(
754
754
  this.getRootElementValue(o),
755
755
  e.defaultValue
756
- ) && this.setRootElementValue(o, this.values[t]), e.basic ? this.displayedProperties.push(e) : this.hiddenProperties.push(e);
756
+ ) && this.setRootElementValue(o, this.values[t]), e.basic !== !1 ? this.displayedProperties.push(e) : this.hiddenProperties.push(e);
757
757
  }
758
758
  }
759
759
  /**
@@ -763,7 +763,7 @@ class St {
763
763
  * @returns The constructed ValueSet.
764
764
  */
765
765
  constructSubValueSet(t) {
766
- const e = this.propertySet.getProperty(t), o = new ee(e.properties), a = new St(o, this.rootElement);
766
+ const e = this.propertySet.getProperty(t), o = new oe(e.properties), a = new It(o, this.rootElement);
767
767
  return a.overwriteValues(
768
768
  structuredClone(e.defaultValue)
769
769
  ), a;
@@ -794,15 +794,15 @@ class St {
794
794
  this.hiddenProperties.includes(t) || (this.hiddenProperties.push(t), K(this.displayedProperties, t));
795
795
  }
796
796
  }
797
- const lo = {
797
+ const st = {
798
798
  name: "",
799
799
  label: null,
800
800
  look: {
801
801
  lookType: "connection-look",
802
802
  color: "#000000",
803
803
  thickness: 1,
804
- shape: vi.Straight,
805
- style: yi.Solid,
804
+ shape: Ii.Straight,
805
+ style: Se.Solid,
806
806
  selected: {
807
807
  color: "#AA00AA"
808
808
  },
@@ -816,29 +816,29 @@ const lo = {
816
816
  endTypes: [],
817
817
  properties: []
818
818
  };
819
- class wi {
819
+ class Li {
820
820
  constructor(t) {
821
821
  const e = {
822
- ...lo,
822
+ ...st,
823
823
  ...t
824
824
  };
825
825
  this.id = e.id, this.name = e.name, this.label = e.label;
826
- const o = rt(e.look);
826
+ const o = at(e.look);
827
827
  if (this.defaultLook = o.defaultLook, this.selectedLook = o.selectedLook, this.highlightedLook = o.highlightedLook, this.selectedAndHighlightedLook = o.selectedAndHighlightedLook, e.startMarkerLook !== void 0) {
828
- const a = rt(
828
+ const a = at(
829
829
  e.startMarkerLook
830
830
  );
831
831
  this.defaultStartMarkerLook = a.defaultLook, this.selectedStartMarkerLook = a.selectedLook, this.highlightedStartMarkerLook = a.highlightedLook, this.selectedAndHighlightedStartMarkerLook = a.selectedAndHighlightedLook;
832
832
  } else
833
833
  this.defaultStartMarkerLook = null, this.selectedStartMarkerLook = null, this.highlightedStartMarkerLook = null, this.selectedAndHighlightedStartMarkerLook = null;
834
834
  if (e.endMarkerLook !== void 0) {
835
- const a = rt(
835
+ const a = at(
836
836
  e.endMarkerLook
837
837
  );
838
838
  this.defaultEndMarkerLook = a.defaultLook, this.selectedEndMarkerLook = a.selectedLook, this.highlightedEndMarkerLook = a.highlightedLook, this.selectedAndHighlightedEndMarkerLook = a.selectedAndHighlightedLook;
839
839
  } else
840
840
  this.defaultEndMarkerLook = null, this.selectedEndMarkerLook = null, this.highlightedEndMarkerLook = null, this.selectedAndHighlightedEndMarkerLook = null;
841
- this.startTypes = e.startTypes, this.endTypes = e.endTypes, this.propertySet = new ee(e.properties);
841
+ this.startTypes = e.startTypes, this.endTypes = e.endTypes, this.propertySet = new oe(e.properties);
842
842
  }
843
843
  canStartFromType(t) {
844
844
  return this.startTypes.indexOf(t) >= 0;
@@ -847,20 +847,20 @@ class wi {
847
847
  return this.endTypes.indexOf(t) >= 0;
848
848
  }
849
849
  }
850
- class gt extends $t {
850
+ class ut extends Mt {
851
851
  constructor(t, e, o, a, l) {
852
852
  if (t.connections.get(l) !== void 0)
853
853
  throw new Error(`DiagramConnection with id "${l}" already exists`);
854
854
  if (!l)
855
855
  throw new Error("DiagramConnection cannot have an empty or null id");
856
- super(t, l), this.startCoords = [0, 0], this.endCoords = [0, 0], this.startLabel = "", this.middleLabel = "", this.endLabel = "", this.points = [], this._type = e, this.valueSet = new St(e.propertySet, this), this.originalData = {}, this.setStart(o), this.setEnd(a);
856
+ super(t, l), this.startCoords = [0, 0], this.endCoords = [0, 0], this.startLabel = "", this.middleLabel = "", this.endLabel = "", this.points = [], this._type = e, this.valueSet = new It(e.propertySet, this), this.originalData = {}, this.setStart(o), this.setEnd(a);
857
857
  }
858
858
  get type() {
859
859
  return this._type;
860
860
  }
861
861
  set type(t) {
862
862
  var e, o;
863
- t !== this._type && (this._type = t, this.valueSet && (this.valueSet = new St(t.propertySet, this)), (o = (e = this.model.canvas) == null ? void 0 : e.userSelection) == null || o.openInPropertyEditor(this, !1), this.updateInView());
863
+ t !== this._type && (this._type = t, this.valueSet && (this.valueSet = new It(t.propertySet, this)), (o = (e = this.model.canvas) == null ? void 0 : e.userSelection) == null || o.openInPropertyEditor(this, !1), this.updateInView());
864
864
  }
865
865
  get typeString() {
866
866
  return this.type.id;
@@ -895,7 +895,7 @@ class gt extends $t {
895
895
  */
896
896
  set look(t) {
897
897
  if (t) {
898
- const e = rt(t);
898
+ const e = at(t);
899
899
  this._defaultLook = {
900
900
  ...this._defaultLook,
901
901
  ...e.defaultLook
@@ -926,7 +926,7 @@ class gt extends $t {
926
926
  */
927
927
  set startMarkerLook(t) {
928
928
  if (t) {
929
- const e = rt(t);
929
+ const e = at(t);
930
930
  this._defaultStartMarkerLook = {
931
931
  ...this._defaultStartMarkerLook,
932
932
  ...e.defaultLook
@@ -957,7 +957,7 @@ class gt extends $t {
957
957
  */
958
958
  set endMarkerLook(t) {
959
959
  if (t) {
960
- const e = rt(t);
960
+ const e = at(t);
961
961
  this._defaultEndMarkerLook = {
962
962
  ...this._defaultEndMarkerLook,
963
963
  ...e.defaultLook
@@ -1057,16 +1057,16 @@ class gt extends $t {
1057
1057
  }
1058
1058
  }
1059
1059
  getPriority() {
1060
- return this.start ? this.end ? Math.min(this.start.getPriority(), this.end.getPriority()) : this.start.getPriority() : this.end ? this.end.getPriority() : Vt;
1060
+ return this.start ? this.end ? Math.min(this.start.getPriority(), this.end.getPriority()) : this.start.getPriority() : this.end ? this.end.getPriority() : Ot;
1061
1061
  }
1062
1062
  }
1063
- class co extends yt {
1063
+ class fo extends bt {
1064
1064
  /**
1065
1065
  * Instance a set of connections for the given model. This method is used internally.
1066
1066
  * @private
1067
1067
  */
1068
1068
  constructor(t) {
1069
- super(), this.types = new te(), this.model = t;
1069
+ super(), this.types = new ie(), this.model = t;
1070
1070
  }
1071
1071
  /**
1072
1072
  * Instance a new connection and add it to this set.
@@ -1079,7 +1079,7 @@ class co extends yt {
1079
1079
  */
1080
1080
  new(t, e, o, a) {
1081
1081
  let l;
1082
- if (t instanceof wi)
1082
+ if (t instanceof Li)
1083
1083
  l = t;
1084
1084
  else {
1085
1085
  const n = this.types.get(t);
@@ -1089,7 +1089,7 @@ class co extends yt {
1089
1089
  );
1090
1090
  l = n;
1091
1091
  }
1092
- const s = new gt(
1092
+ const s = new ut(
1093
1093
  this.model,
1094
1094
  l,
1095
1095
  e,
@@ -1104,7 +1104,7 @@ class co extends yt {
1104
1104
  e && (K(((o = e.start) == null ? void 0 : o.outgoingConnections) || [], e), K(((a = e.end) == null ? void 0 : a.incomingConnections) || [], e), super.remove(t), e.updateInView());
1105
1105
  }
1106
1106
  }
1107
- const H = {
1107
+ const F = {
1108
1108
  editable: !0,
1109
1109
  fontSize: 0,
1110
1110
  margin: 0,
@@ -1113,13 +1113,13 @@ const H = {
1113
1113
  color: "#000000",
1114
1114
  selectedColor: "#000000",
1115
1115
  backgroundColor: "#00000000",
1116
- horizontalAlign: Pt.Center,
1117
- verticalAlign: Kt.Center,
1116
+ horizontalAlign: zt.Center,
1117
+ verticalAlign: Qt.Center,
1118
1118
  orientation: b.Top,
1119
1119
  fit: !1,
1120
1120
  shrink: !0
1121
1121
  };
1122
- class pt extends $t {
1122
+ class vt extends Mt {
1123
1123
  constructor(t, e, o, a, l, s, n, r, c, d, h, u, p, f, m, g) {
1124
1124
  const v = `${e == null ? void 0 : e.id}_field`;
1125
1125
  if (t.fields.get(v) !== void 0)
@@ -1177,10 +1177,10 @@ class pt extends $t {
1177
1177
  }
1178
1178
  getPriority() {
1179
1179
  var t;
1180
- return ((t = this.rootElement) == null ? void 0 : t.getPriority()) || Vt;
1180
+ return ((t = this.rootElement) == null ? void 0 : t.getPriority()) || Ot;
1181
1181
  }
1182
1182
  }
1183
- class ho extends yt {
1183
+ class po extends bt {
1184
1184
  /**
1185
1185
  * Instance a set of fields for the given model. This method is used internally.
1186
1186
  * @private
@@ -1193,7 +1193,7 @@ class ho extends yt {
1193
1193
  * @private
1194
1194
  */
1195
1195
  new(t, e, o, a, l, s, n, r, c, d, h, u, p, f, m) {
1196
- const g = new pt(
1196
+ const g = new vt(
1197
1197
  this.model,
1198
1198
  t,
1199
1199
  e,
@@ -1219,26 +1219,26 @@ class ho extends yt {
1219
1219
  e && (((o = e.rootElement) == null ? void 0 : o.label) !== void 0 && e.rootElement.label === e && (e.rootElement.label = void 0), super.remove(t), e.updateInView());
1220
1220
  }
1221
1221
  }
1222
- const st = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? H.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? H.margin : i.margin.length === 1 || i.margin.length === 2 ? i.margin[0] : (i.margin.length === 3, i.margin[2]), tt = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? H.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? H.margin : i.margin.length === 1 ? i.margin[0] : i.margin.length === 2 || i.margin.length === 3 ? i.margin[1] : i.margin[3], lt = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? H.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? H.margin : i.margin.length === 1 ? i.margin[0] : (i.margin.length === 2 || i.margin.length === 3, i.margin[1]), Z = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? H.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? H.margin : (i.margin.length === 1 || i.margin.length === 2 || i.margin.length === 3, i.margin[0]), Dt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? H.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? H.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), Ht = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? H.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? H.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], Gt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? H.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? H.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), Bt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? H.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? H.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), li = 1, ci = 1, go = 1, uo = 1;
1223
- class mo {
1222
+ const nt = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? F.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? F.margin : i.margin.length === 1 || i.margin.length === 2 ? i.margin[0] : (i.margin.length === 3, i.margin[2]), tt = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? F.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? F.margin : i.margin.length === 1 ? i.margin[0] : i.margin.length === 2 || i.margin.length === 3 ? i.margin[1] : i.margin[3], ct = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? F.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? F.margin : i.margin.length === 1 ? i.margin[0] : (i.margin.length === 2 || i.margin.length === 3, i.margin[1]), Z = (i) => (i == null ? void 0 : i.margin) === null || (i == null ? void 0 : i.margin) === void 0 ? F.margin : typeof i.margin == "number" ? i.margin : i.margin.length === 0 ? F.margin : (i.margin.length === 1 || i.margin.length === 2 || i.margin.length === 3, i.margin[0]), Gt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? F.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? F.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), Bt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? F.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? F.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], Ut = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? F.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? F.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), Yt = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? F.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? F.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), fi = 1, pi = 1, vo = 1, yo = 1;
1223
+ class bo {
1224
1224
  constructor(t) {
1225
1225
  this.margin = t.margin || 0, this.defaultWidths = t.defaultWidths || null, this.defaultHeights = t.defaultHeights || null, this.minWidths = t.minWidths || null, this.minHeights = t.minHeights || null, this.sections = [];
1226
1226
  for (const e of t.sections) {
1227
1227
  const o = [];
1228
1228
  this.sections.push(o);
1229
1229
  for (const a of e)
1230
- o.push(new fo(a));
1230
+ o.push(new ko(a));
1231
1231
  }
1232
1232
  }
1233
1233
  }
1234
- class fo {
1234
+ class ko {
1235
1235
  constructor(t) {
1236
- this.label = t.label || null, this.ports = t.ports || [], this.priority = t.priority || Vt, this.resizableX = t.resizableX, this.resizableY = t.resizableY;
1237
- const e = rt(t.look || Ci);
1236
+ this.label = t.label || null, this.ports = t.ports || [], this.priority = t.priority || Ot, this.resizableX = t.resizableX, this.resizableY = t.resizableY;
1237
+ const e = at(t.look || Ei);
1238
1238
  this.defaultLook = e.defaultLook, this.selectedLook = e.selectedLook, this.highlightedLook = e.highlightedLook, this.selectedAndHighlightedLook = e.selectedAndHighlightedLook;
1239
1239
  }
1240
1240
  }
1241
- class X extends $t {
1241
+ class X extends Mt {
1242
1242
  constructor(t, e, o, a, l, s, n, r) {
1243
1243
  if (t.sections.get(r) !== void 0)
1244
1244
  throw new Error(`DiagramSection with id "${r}" already exists`);
@@ -1272,7 +1272,7 @@ class X extends $t {
1272
1272
  */
1273
1273
  set look(t) {
1274
1274
  if (t) {
1275
- const e = rt(t);
1275
+ const e = at(t);
1276
1276
  this._defaultLook = {
1277
1277
  ...this._defaultLook,
1278
1278
  ...e.defaultLook
@@ -1310,15 +1310,15 @@ class X extends $t {
1310
1310
  }
1311
1311
  getMinWidth() {
1312
1312
  var t, e, o, a;
1313
- return ((a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.minWidths) == null ? void 0 : a[this.indexXInNode]) || go;
1313
+ return ((a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.minWidths) == null ? void 0 : a[this.indexXInNode]) || vo;
1314
1314
  }
1315
1315
  getMinHeight() {
1316
1316
  var t, e, o, a;
1317
- return ((a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.minHeights) == null ? void 0 : a[this.indexYInNode]) || uo;
1317
+ return ((a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.minHeights) == null ? void 0 : a[this.indexYInNode]) || yo;
1318
1318
  }
1319
1319
  getPriority() {
1320
1320
  var t, e, o, a, l, s;
1321
- return ((s = (l = (a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.sections) == null ? void 0 : a[this.indexYInNode]) == null ? void 0 : l[this.indexXInNode]) == null ? void 0 : s.priority) || Vt;
1321
+ return ((s = (l = (a = (o = (e = (t = this.node) == null ? void 0 : t.type) == null ? void 0 : e.sectionGrid) == null ? void 0 : o.sections) == null ? void 0 : a[this.indexYInNode]) == null ? void 0 : l[this.indexXInNode]) == null ? void 0 : s.priority) || Ot;
1322
1322
  }
1323
1323
  /**
1324
1324
  * Returns whether this section can be resized horizontally.
@@ -1461,7 +1461,7 @@ class X extends $t {
1461
1461
  const a = [this.coords[0], this.coords[0] + this.width], l = [this.coords[1], this.coords[1] + this.height];
1462
1462
  for (const r of this.ports)
1463
1463
  r.move(
1464
- qt(
1464
+ te(
1465
1465
  r.coords,
1466
1466
  e,
1467
1467
  o,
@@ -1475,10 +1475,10 @@ class X extends $t {
1475
1475
  this.label && (this.label.coords = [
1476
1476
  this.coords[0] + tt(s == null ? void 0 : s.label),
1477
1477
  this.coords[1] + Z(s == null ? void 0 : s.label)
1478
- ], this.label.width = this.width - tt(s == null ? void 0 : s.label) - lt(s == null ? void 0 : s.label), this.label.height = this.height - Z(s == null ? void 0 : s.label) - st(s == null ? void 0 : s.label), this.label.updateInView());
1478
+ ], this.label.width = this.width - tt(s == null ? void 0 : s.label) - ct(s == null ? void 0 : s.label), this.label.height = this.height - Z(s == null ? void 0 : s.label) - nt(s == null ? void 0 : s.label), this.label.updateInView());
1479
1479
  for (const r of this.decorators)
1480
1480
  r.move(
1481
- qt(
1481
+ te(
1482
1482
  r.coords,
1483
1483
  e,
1484
1484
  o,
@@ -1491,7 +1491,7 @@ class X extends $t {
1491
1491
  ((n = this.model.canvas) == null ? void 0 : n.autoTightenConnections) !== !1 && this.getConnections().forEach((r) => r.tighten()), this.updateInView();
1492
1492
  }
1493
1493
  }
1494
- class po extends yt {
1494
+ class wo extends bt {
1495
1495
  /**
1496
1496
  * Instance a set of sections for the given model. This method is used internally.
1497
1497
  * @private
@@ -1537,9 +1537,9 @@ class po extends yt {
1537
1537
  );
1538
1538
  if ((m = $.type) != null && m.label) {
1539
1539
  const C = {
1540
- ...H,
1540
+ ...F,
1541
1541
  ...(g = $.type) == null ? void 0 : g.label
1542
- }, R = 6 * C.fontSize + Ht(C) + Gt(C), T = C.fontSize + Bt(C) + Dt(C);
1542
+ }, R = 6 * C.fontSize + Bt(C) + Ut(C), T = C.fontSize + Yt(C) + Gt(C);
1543
1543
  let z;
1544
1544
  switch ($.direction) {
1545
1545
  case b.Bottom:
@@ -1547,7 +1547,7 @@ class po extends yt {
1547
1547
  case b.Right:
1548
1548
  z = [
1549
1549
  $.coords[0] - R / 2,
1550
- $.coords[1] - T - st(C)
1550
+ $.coords[1] - T - nt(C)
1551
1551
  ];
1552
1552
  break;
1553
1553
  case b.Top:
@@ -1581,7 +1581,7 @@ class po extends yt {
1581
1581
  const d = (A = (y = (w = (v = t.type.sectionGrid) == null ? void 0 : v.sections) == null ? void 0 : w[o]) == null ? void 0 : y[e]) == null ? void 0 : A.label;
1582
1582
  if (d) {
1583
1583
  const I = {
1584
- ...H,
1584
+ ...F,
1585
1585
  ...d
1586
1586
  };
1587
1587
  this.model.fields.new(
@@ -1594,8 +1594,8 @@ class po extends yt {
1594
1594
  I.fontFamily,
1595
1595
  I.color,
1596
1596
  I.selectedColor,
1597
- r.width - tt(I) - lt(I),
1598
- r.height - Z(I) - st(I),
1597
+ r.width - tt(I) - ct(I),
1598
+ r.height - Z(I) - nt(I),
1599
1599
  I.horizontalAlign,
1600
1600
  I.verticalAlign,
1601
1601
  I.orientation,
@@ -1616,9 +1616,9 @@ class po extends yt {
1616
1616
  }
1617
1617
  }
1618
1618
  }
1619
- const Ci = {
1619
+ const Ei = {
1620
1620
  lookType: "shaped-look",
1621
- shape: Qt.Rectangle,
1621
+ shape: _t.Rectangle,
1622
1622
  fillColor: "#FFFFFF",
1623
1623
  borderColor: "#000000",
1624
1624
  borderThickness: 1,
@@ -1629,7 +1629,7 @@ const Ci = {
1629
1629
  highlighted: {
1630
1630
  borderThickness: 3
1631
1631
  }
1632
- }, vt = {
1632
+ }, yt = {
1633
1633
  name: "",
1634
1634
  defaultWidth: 1,
1635
1635
  defaultHeight: 1,
@@ -1642,38 +1642,38 @@ const Ci = {
1642
1642
  ports: [],
1643
1643
  decorators: [],
1644
1644
  sectionGrid: null,
1645
- look: Ci,
1645
+ look: Ei,
1646
1646
  isUnique: !1,
1647
1647
  canBeParentless: !0,
1648
1648
  childrenTypes: [],
1649
- priority: Vt,
1649
+ priority: Ot,
1650
1650
  properties: []
1651
1651
  };
1652
- class Si {
1652
+ class Ti {
1653
1653
  constructor(t) {
1654
1654
  const e = {
1655
- ...vt,
1655
+ ...yt,
1656
1656
  ...t
1657
1657
  };
1658
- this.id = e.id, this.name = e.name, this.defaultWidth = e.defaultWidth, this.defaultHeight = e.defaultHeight, this.minWidth = e.minWidth, this.minHeight = e.minHeight, this.resizableX = e.resizableX, this.resizableY = e.resizableY, this.bottomPadding = yo(e), this.leftPadding = bo(e), this.rightPadding = ko(e), this.topPadding = wo(e), this.label = e.label, this.ports = e.ports, this.decorators = e.decorators, this.sectionGrid = e.sectionGrid ? new mo(e.sectionGrid) : null;
1659
- const o = rt(e.look);
1660
- this.defaultLook = o.defaultLook, this.selectedLook = o.selectedLook, this.highlightedLook = o.highlightedLook, this.selectedAndHighlightedLook = o.selectedAndHighlightedLook, this.isUnique = e.isUnique, this.canBeParentless = e.canBeParentless, this.childrenTypes = e.childrenTypes, this.priority = e.priority, this.propertySet = new ee((t == null ? void 0 : t.properties) || []);
1658
+ this.id = e.id, this.name = e.name, this.defaultWidth = e.defaultWidth, this.defaultHeight = e.defaultHeight, this.minWidth = e.minWidth, this.minHeight = e.minHeight, this.resizableX = e.resizableX, this.resizableY = e.resizableY, this.bottomPadding = So(e), this.leftPadding = Io(e), this.rightPadding = Ao(e), this.topPadding = xo(e), this.label = e.label, this.ports = e.ports, this.decorators = e.decorators, this.sectionGrid = e.sectionGrid ? new bo(e.sectionGrid) : null;
1659
+ const o = at(e.look);
1660
+ this.defaultLook = o.defaultLook, this.selectedLook = o.selectedLook, this.highlightedLook = o.highlightedLook, this.selectedAndHighlightedLook = o.selectedAndHighlightedLook, this.isUnique = e.isUnique, this.canBeParentless = e.canBeParentless, this.childrenTypes = e.childrenTypes, this.priority = e.priority, this.propertySet = new oe((t == null ? void 0 : t.properties) || []);
1661
1661
  }
1662
1662
  }
1663
- class O extends $t {
1663
+ class O extends Mt {
1664
1664
  constructor(t, e, o = [0, 0], a) {
1665
1665
  if (t.nodes.get(a) !== void 0)
1666
1666
  throw new Error(`DiagramNode with id "${a}" already exists`);
1667
1667
  if (!a)
1668
1668
  throw new Error("DiagramNode cannot have an empty or null id");
1669
- super(t, a), this.children = [], this.sections = [], this.ports = [], this.decorators = [], this.geometryTimestamp = null, this._type = e, this.valueSet = new St(e.propertySet, this), this.originalData = {}, this.coords = o, this.width = e.defaultWidth, this.height = e.defaultHeight;
1669
+ super(t, a), this.children = [], this.sections = [], this.ports = [], this.decorators = [], this.geometryTimestamp = null, this._type = e, this.valueSet = new It(e.propertySet, this), this.originalData = {}, this.coords = o, this.width = e.defaultWidth, this.height = e.defaultHeight;
1670
1670
  }
1671
1671
  get type() {
1672
1672
  return this._type;
1673
1673
  }
1674
1674
  set type(t) {
1675
1675
  var e, o;
1676
- t !== this._type && (this._type = t, this.valueSet && (this.valueSet = new St(t.propertySet, this)), (o = (e = this.model.canvas) == null ? void 0 : e.userSelection) == null || o.openInPropertyEditor(this, !1), this.updateInView());
1676
+ t !== this._type && (this._type = t, this.valueSet && (this.valueSet = new It(t.propertySet, this)), (o = (e = this.model.canvas) == null ? void 0 : e.userSelection) == null || o.openInPropertyEditor(this, !1), this.updateInView());
1677
1677
  }
1678
1678
  get typeString() {
1679
1679
  return this.type.id;
@@ -1709,7 +1709,7 @@ class O extends $t {
1709
1709
  */
1710
1710
  set look(t) {
1711
1711
  if (t) {
1712
- const e = rt(t);
1712
+ const e = at(t);
1713
1713
  this._defaultLook = {
1714
1714
  ...this._defaultLook,
1715
1715
  ...e.defaultLook
@@ -2075,7 +2075,7 @@ class O extends $t {
2075
2075
  }
2076
2076
  for (const n of this.ports)
2077
2077
  n.move(
2078
- qt(
2078
+ te(
2079
2079
  n.coords,
2080
2080
  e,
2081
2081
  o,
@@ -2088,10 +2088,10 @@ class O extends $t {
2088
2088
  this.label && (this.label.coords = [
2089
2089
  this.coords[0] + tt(this.type.label),
2090
2090
  this.coords[1] + Z(this.type.label)
2091
- ], this.label.width = this.width - tt(this.type.label) - lt(this.type.label), this.label.height = this.height - Z(this.type.label) - st(this.type.label), this.label.updateInView());
2091
+ ], this.label.width = this.width - tt(this.type.label) - ct(this.type.label), this.label.height = this.height - Z(this.type.label) - nt(this.type.label), this.label.updateInView());
2092
2092
  for (const n of this.decorators)
2093
2093
  n.move(
2094
- qt(
2094
+ te(
2095
2095
  n.coords,
2096
2096
  e,
2097
2097
  o,
@@ -2210,13 +2210,13 @@ class O extends $t {
2210
2210
  this.stretch(b.Bottom, e + o);
2211
2211
  }
2212
2212
  }
2213
- class vo extends yt {
2213
+ class Co extends bt {
2214
2214
  /**
2215
2215
  * Instance a set of nodes for the given model. This method is used internally.
2216
2216
  * @private
2217
2217
  */
2218
2218
  constructor(t) {
2219
- super(), this.types = new te(), this.model = t;
2219
+ super(), this.types = new ie(), this.model = t;
2220
2220
  }
2221
2221
  /**
2222
2222
  * Instance a new node and add it to this set.
@@ -2229,7 +2229,7 @@ class vo extends yt {
2229
2229
  new(t, e, o) {
2230
2230
  var s, n, r, c, d, h, u;
2231
2231
  let a;
2232
- if (t instanceof Si)
2232
+ if (t instanceof Ti)
2233
2233
  a = t;
2234
2234
  else {
2235
2235
  const p = this.types.get(t);
@@ -2248,11 +2248,11 @@ class vo extends yt {
2248
2248
  g,
2249
2249
  f,
2250
2250
  [m, p],
2251
- ((s = a.sectionGrid.defaultWidths) == null ? void 0 : s[g]) || li,
2252
- ((n = a.sectionGrid.defaultHeights) == null ? void 0 : n[f]) || ci,
2251
+ ((s = a.sectionGrid.defaultWidths) == null ? void 0 : s[g]) || fi,
2252
+ ((n = a.sectionGrid.defaultHeights) == null ? void 0 : n[f]) || pi,
2253
2253
  `${l.id}_${f}_${g}`
2254
- ), m += (((r = a.sectionGrid.defaultWidths) == null ? void 0 : r[g]) || li) + (a.sectionGrid.margin || 0);
2255
- p += (((c = a.sectionGrid.defaultHeights) == null ? void 0 : c[f]) || ci) + (a.sectionGrid.margin || 0);
2254
+ ), m += (((r = a.sectionGrid.defaultWidths) == null ? void 0 : r[g]) || fi) + (a.sectionGrid.margin || 0);
2255
+ p += (((c = a.sectionGrid.defaultHeights) == null ? void 0 : c[f]) || pi) + (a.sectionGrid.margin || 0);
2256
2256
  }
2257
2257
  }
2258
2258
  if (a.ports.length > 0)
@@ -2275,9 +2275,9 @@ class vo extends yt {
2275
2275
  );
2276
2276
  if ((d = g.type) != null && d.label) {
2277
2277
  const v = {
2278
- ...H,
2278
+ ...F,
2279
2279
  ...(h = g.type) == null ? void 0 : h.label
2280
- }, w = 6 * v.fontSize + Ht(v) + Gt(v), y = v.fontSize + Bt(v) + Dt(v);
2280
+ }, w = 6 * v.fontSize + Bt(v) + Ut(v), y = v.fontSize + Yt(v) + Gt(v);
2281
2281
  let A;
2282
2282
  switch (g.direction) {
2283
2283
  case b.Bottom:
@@ -2285,7 +2285,7 @@ class vo extends yt {
2285
2285
  case b.Right:
2286
2286
  A = [
2287
2287
  g.coords[0] - w / 2,
2288
- g.coords[1] - y - st(v)
2288
+ g.coords[1] - y - nt(v)
2289
2289
  ];
2290
2290
  break;
2291
2291
  case b.Top:
@@ -2318,7 +2318,7 @@ class vo extends yt {
2318
2318
  }
2319
2319
  if (a.label) {
2320
2320
  const p = {
2321
- ...H,
2321
+ ...F,
2322
2322
  ...a.label
2323
2323
  };
2324
2324
  this.model.fields.new(
@@ -2331,8 +2331,8 @@ class vo extends yt {
2331
2331
  p.fontFamily,
2332
2332
  p.color,
2333
2333
  p.selectedColor,
2334
- l.width - tt(p) - lt(p),
2335
- l.height - Z(p) - st(p),
2334
+ l.width - tt(p) - ct(p),
2335
+ l.height - Z(p) - nt(p),
2336
2336
  p.horizontalAlign,
2337
2337
  p.verticalAlign,
2338
2338
  p.orientation,
@@ -2390,14 +2390,14 @@ class vo extends yt {
2390
2390
  return o;
2391
2391
  }
2392
2392
  }
2393
- const Ii = (i) => {
2393
+ const $i = (i) => {
2394
2394
  for (let t = 0; t < i.length; ++t)
2395
2395
  for (let e = 0; e < i.length; ++e)
2396
2396
  e !== t && i[e].isAncestorOf(i[t]) && (i.splice(e, 1), --e, t > e && --t);
2397
2397
  return i;
2398
- }, yo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? vt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? vt.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), bo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? vt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? vt.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], ko = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? vt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? vt.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), wo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? vt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? vt.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), Ai = {
2398
+ }, So = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? yt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? yt.padding : i.padding.length === 1 || i.padding.length === 2 ? i.padding[0] : (i.padding.length === 3, i.padding[2]), Io = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? yt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? yt.padding : i.padding.length === 1 ? i.padding[0] : i.padding.length === 2 || i.padding.length === 3 ? i.padding[1] : i.padding[3], Ao = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? yt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? yt.padding : i.padding.length === 1 ? i.padding[0] : (i.padding.length === 2 || i.padding.length === 3, i.padding[1]), xo = (i) => (i == null ? void 0 : i.padding) === null || (i == null ? void 0 : i.padding) === void 0 ? yt.padding : typeof i.padding == "number" ? i.padding : i.padding.length === 0 ? yt.padding : (i.padding.length === 1 || i.padding.length === 2 || i.padding.length === 3, i.padding[0]), Mi = {
2399
2399
  lookType: "shaped-look",
2400
- shape: Qt.Ellipse,
2400
+ shape: _t.Ellipse,
2401
2401
  fillColor: "transparent",
2402
2402
  borderColor: "transparent",
2403
2403
  borderThickness: 0,
@@ -2407,26 +2407,26 @@ const Ii = (i) => {
2407
2407
  highlighted: {
2408
2408
  fillColor: "rgba(0, 255, 255, 0.5)"
2409
2409
  }
2410
- }, jt = rt(Ai), xi = {
2410
+ }, Kt = at(Mi), Ni = {
2411
2411
  name: "",
2412
2412
  label: null,
2413
2413
  allowsOutgoing: !0,
2414
2414
  allowsIncoming: !0,
2415
2415
  width: 24,
2416
- look: Ai
2416
+ look: Mi
2417
2417
  };
2418
- class Co {
2418
+ class Lo {
2419
2419
  constructor(t) {
2420
2420
  const e = {
2421
- ...xi,
2421
+ ...Ni,
2422
2422
  ...t
2423
2423
  };
2424
2424
  this.id = e.id, this.name = e.name, this.label = e.label, this.allowsOutgoing = e.allowsOutgoing, this.allowsIncoming = e.allowsIncoming, this.width = e.width;
2425
- const o = rt(e.look);
2425
+ const o = at(e.look);
2426
2426
  this.defaultLook = o.defaultLook, this.selectedLook = o.selectedLook, this.highlightedLook = o.highlightedLook, this.selectedAndHighlightedLook = o.selectedAndHighlightedLook;
2427
2427
  }
2428
2428
  }
2429
- class It extends $t {
2429
+ class At extends Mt {
2430
2430
  constructor(t, e, o, a, l, s, n, r = "floating", c = "floating") {
2431
2431
  if (t.ports.get(n) !== void 0)
2432
2432
  throw new Error(`DiagramPort with id "${n}" already exists`);
@@ -2485,7 +2485,7 @@ class It extends $t {
2485
2485
  */
2486
2486
  get look() {
2487
2487
  var t, e, o, a;
2488
- return this.selected ? this.highlighted ? this._selectedAndHighlightedLook !== void 0 ? this._selectedAndHighlightedLook : (t = this.type || jt) == null ? void 0 : t.selectedAndHighlightedLook : this._selectedLook !== void 0 ? this._selectedLook : (e = this.type || jt) == null ? void 0 : e.selectedLook : this.highlighted ? this._highlightedLook !== void 0 ? this._highlightedLook : (o = this.type || jt) == null ? void 0 : o.highlightedLook : this._defaultLook !== void 0 ? this._defaultLook : (a = this.type || jt) == null ? void 0 : a.defaultLook;
2488
+ return this.selected ? this.highlighted ? this._selectedAndHighlightedLook !== void 0 ? this._selectedAndHighlightedLook : (t = this.type || Kt) == null ? void 0 : t.selectedAndHighlightedLook : this._selectedLook !== void 0 ? this._selectedLook : (e = this.type || Kt) == null ? void 0 : e.selectedLook : this.highlighted ? this._highlightedLook !== void 0 ? this._highlightedLook : (o = this.type || Kt) == null ? void 0 : o.highlightedLook : this._defaultLook !== void 0 ? this._defaultLook : (a = this.type || Kt) == null ? void 0 : a.defaultLook;
2489
2489
  }
2490
2490
  /**
2491
2491
  * Sets the look configuration of the look to override the one determined by the type.
@@ -2494,7 +2494,7 @@ class It extends $t {
2494
2494
  */
2495
2495
  set look(t) {
2496
2496
  if (t) {
2497
- const e = rt(
2497
+ const e = at(
2498
2498
  t
2499
2499
  );
2500
2500
  this._defaultLook = {
@@ -2519,7 +2519,7 @@ class It extends $t {
2519
2519
  */
2520
2520
  get width() {
2521
2521
  var t;
2522
- return ((t = this.type) == null ? void 0 : t.width) || xi.width;
2522
+ return ((t = this.type) == null ? void 0 : t.width) || Ni.width;
2523
2523
  }
2524
2524
  /**
2525
2525
  * Current height of this port. Same as the width.
@@ -2572,7 +2572,7 @@ class It extends $t {
2572
2572
  }
2573
2573
  getPriority() {
2574
2574
  var t;
2575
- return ((t = this.rootElement) == null ? void 0 : t.getPriority()) || Vt;
2575
+ return ((t = this.rootElement) == null ? void 0 : t.getPriority()) || Ot;
2576
2576
  }
2577
2577
  /**
2578
2578
  * Change the coordinates of this port to the given coordinates and move its labels correspondingly.
@@ -2595,23 +2595,23 @@ class It extends $t {
2595
2595
  ]), this.updateInView();
2596
2596
  }
2597
2597
  distanceTo(t) {
2598
- return pi(this.coords, t);
2598
+ return Si(this.coords, t);
2599
2599
  }
2600
2600
  }
2601
- class So extends yt {
2601
+ class Eo extends bt {
2602
2602
  /**
2603
2603
  * Instance a set of ports for the given model. This method is used internally.
2604
2604
  * @private
2605
2605
  */
2606
2606
  constructor(t) {
2607
- super(), this.types = new te(), this.model = t;
2607
+ super(), this.types = new ie(), this.model = t;
2608
2608
  }
2609
2609
  /**
2610
2610
  * Instance a new port and add it to this set. This method is normally called when instancing an element with a port and it is rarely called by itself.
2611
2611
  * @private
2612
2612
  */
2613
2613
  new(t, e, o, a, l, s, n = "floating", r = "floating") {
2614
- const c = new It(
2614
+ const c = new At(
2615
2615
  this.model,
2616
2616
  t,
2617
2617
  e,
@@ -2635,7 +2635,7 @@ class So extends yt {
2635
2635
  }
2636
2636
  }
2637
2637
  }
2638
- class Li {
2638
+ class Pi {
2639
2639
  import(t, e) {
2640
2640
  t.clear(), e.id && (t.id = e.id), t.name = e.name, t.description = e.description, t.type = e.type, t.createdAt = new Date(e.createdAt), t.updatedAt = new Date(e.updatedAt);
2641
2641
  for (const o of e.nodes || [])
@@ -2668,17 +2668,17 @@ class Li {
2668
2668
  }
2669
2669
  if (o.label) {
2670
2670
  const g = {
2671
- ...H,
2671
+ ...F,
2672
2672
  ...o.label
2673
- }, v = new pt(
2673
+ }, v = new vt(
2674
2674
  t,
2675
2675
  f,
2676
2676
  [
2677
2677
  f.coords[0] + tt(g),
2678
2678
  f.coords[1] + Z(g)
2679
2679
  ],
2680
- f.width - tt(g) - lt(g),
2681
- f.height - Z(g) - st(g),
2680
+ f.width - tt(g) - ct(g),
2681
+ f.height - Z(g) - nt(g),
2682
2682
  g.fontSize,
2683
2683
  g.fontFamily,
2684
2684
  g.color,
@@ -2711,17 +2711,17 @@ class Li {
2711
2711
  );
2712
2712
  if ((l = f.sections) == null || l.push(v), t.sections.add(v), g.label && (c = (r = (n = (s = o.sectionGrid) == null ? void 0 : s.sections) == null ? void 0 : n[g.indexYInNode]) == null ? void 0 : r[g.indexXInNode]) != null && c.label) {
2713
2713
  const y = {
2714
- ...H,
2714
+ ...F,
2715
2715
  ...(p = (u = (h = (d = o.sectionGrid) == null ? void 0 : d.sections) == null ? void 0 : h[g.indexYInNode]) == null ? void 0 : u[g.indexXInNode]) == null ? void 0 : p.label
2716
- }, A = new pt(
2716
+ }, A = new vt(
2717
2717
  t,
2718
2718
  v,
2719
2719
  [
2720
2720
  v.coords[0] + tt(y),
2721
2721
  v.coords[1] + Z(y)
2722
2722
  ],
2723
- v.width - tt(y) - lt(y),
2724
- v.height - Z(y) - st(y),
2723
+ v.width - tt(y) - ct(y),
2724
+ v.height - Z(y) - nt(y),
2725
2725
  y.fontSize,
2726
2726
  y.fontFamily,
2727
2727
  y.color,
@@ -2738,19 +2738,19 @@ class Li {
2738
2738
  }
2739
2739
  let w = 0;
2740
2740
  for (const y of g.ports || []) {
2741
- const A = y.type !== void 0 ? t.ports.types.get(y.type) : void 0, I = new It(
2741
+ const A = y.type !== void 0 ? t.ports.types.get(y.type) : void 0, I = new At(
2742
2742
  t,
2743
2743
  A,
2744
2744
  v,
2745
2745
  y.coords,
2746
- y.connectionPoint,
2746
+ y.connectionPoint || y.coords,
2747
2747
  y.direction,
2748
2748
  y.id
2749
2749
  );
2750
2750
  if (v.ports.push(I), t.ports.add(I), y.label) {
2751
2751
  if (o.ports.length > w && (A != null && A.label)) {
2752
2752
  const E = {
2753
- ...H,
2753
+ ...F,
2754
2754
  ...A == null ? void 0 : A.label
2755
2755
  };
2756
2756
  let $;
@@ -2777,7 +2777,7 @@ class Li {
2777
2777
  default:
2778
2778
  $ = I.coords;
2779
2779
  }
2780
- const C = new pt(
2780
+ const C = new vt(
2781
2781
  t,
2782
2782
  I,
2783
2783
  $,
@@ -2808,19 +2808,19 @@ class Li {
2808
2808
  }
2809
2809
  let m = 0;
2810
2810
  for (const g of e.ports || []) {
2811
- const v = g.type !== void 0 ? t.ports.types.get(g.type) : void 0, w = new It(
2811
+ const v = g.type !== void 0 ? t.ports.types.get(g.type) : void 0, w = new At(
2812
2812
  t,
2813
2813
  v,
2814
2814
  f,
2815
2815
  g.coords,
2816
- g.connectionPoint,
2816
+ g.connectionPoint || g.coords,
2817
2817
  g.direction,
2818
2818
  g.id
2819
2819
  );
2820
2820
  if (f.ports.push(w), t.ports.add(w), g.label) {
2821
2821
  if (o.ports.length > m && (v != null && v.label)) {
2822
2822
  const y = {
2823
- ...H,
2823
+ ...F,
2824
2824
  ...v == null ? void 0 : v.label
2825
2825
  };
2826
2826
  let A;
@@ -2847,7 +2847,7 @@ class Li {
2847
2847
  default:
2848
2848
  A = w.coords;
2849
2849
  }
2850
- const I = new pt(
2850
+ const I = new vt(
2851
2851
  t,
2852
2852
  w,
2853
2853
  A,
@@ -2877,7 +2877,7 @@ class Li {
2877
2877
  importConnection(t, e) {
2878
2878
  const o = t.connections.types.get(e.type);
2879
2879
  if (o) {
2880
- const a = new gt(
2880
+ const a = new ut(
2881
2881
  t,
2882
2882
  o,
2883
2883
  e.start ? t.ports.get(e.start) : void 0,
@@ -2893,7 +2893,7 @@ class Li {
2893
2893
  t && e && (t.selfRemoved = e.selfRemoved, t.selfRemovedTimestamp = e.selfRemovedTimestamp, t.textTimestamp = e.textTimestamp);
2894
2894
  }
2895
2895
  }
2896
- class ie {
2896
+ class se {
2897
2897
  constructor(t, e, o, a, l, s, n) {
2898
2898
  this.canvas = t, this.id = e, this.typeId = o, this.coords = a, this.parentId = l, this.label = s, this.values = n;
2899
2899
  }
@@ -2919,7 +2919,7 @@ class ie {
2919
2919
  };
2920
2920
  }
2921
2921
  static deserialize(t, e) {
2922
- return new ie(
2922
+ return new se(
2923
2923
  t,
2924
2924
  e.id,
2925
2925
  e.typeId,
@@ -2930,13 +2930,13 @@ class ie {
2930
2930
  );
2931
2931
  }
2932
2932
  }
2933
- class ke {
2933
+ class Ie {
2934
2934
  constructor(t, e, o, a, l, s, n) {
2935
2935
  this.canvas = t, this.nodeId = e, this.copyColumnIndex = o, this.copyRowIndex = a, this.removeColumnIndex = l, this.removeRowIndex = s, this.timestamp = n;
2936
2936
  }
2937
2937
  do() {
2938
2938
  const t = this.canvas.model.nodes.get(this.nodeId);
2939
- t && At(this.timestamp, t.geometryTimestamp) && (this.copyColumnIndex !== void 0 && t.copySectionColumn(this.copyColumnIndex), this.copyRowIndex !== void 0 && t.copySectionRow(this.copyRowIndex), this.removeColumnIndex !== void 0 && t.removeSectionColumn(this.removeColumnIndex), this.removeRowIndex !== void 0 && t.removeSectionRow(this.removeRowIndex), t.geometryTimestamp = this.timestamp);
2939
+ t && xt(this.timestamp, t.geometryTimestamp) && (this.copyColumnIndex !== void 0 && t.copySectionColumn(this.copyColumnIndex), this.copyRowIndex !== void 0 && t.copySectionRow(this.copyRowIndex), this.removeColumnIndex !== void 0 && t.removeSectionColumn(this.removeColumnIndex), this.removeRowIndex !== void 0 && t.removeSectionRow(this.removeRowIndex), t.geometryTimestamp = this.timestamp);
2940
2940
  }
2941
2941
  serialize() {
2942
2942
  return {
@@ -2950,7 +2950,7 @@ class ke {
2950
2950
  };
2951
2951
  }
2952
2952
  static deserialize(t, e) {
2953
- return new ke(
2953
+ return new Ie(
2954
2954
  t,
2955
2955
  e.nodeId,
2956
2956
  e.copyColumnIndex,
@@ -2961,14 +2961,14 @@ class ke {
2961
2961
  );
2962
2962
  }
2963
2963
  }
2964
- class we {
2964
+ class Ae {
2965
2965
  constructor(t, e, o) {
2966
2966
  this.canvas = t, this.to = e, this.timestamp = o;
2967
2967
  }
2968
2968
  do() {
2969
2969
  for (const t in this.to) {
2970
2970
  const e = this.canvas.model.nodes.get(t, !0);
2971
- if (e && At(this.timestamp, e.geometryTimestamp)) {
2971
+ if (e && xt(this.timestamp, e.geometryTimestamp)) {
2972
2972
  const o = this.to[t];
2973
2973
  e.move([o[0], o[1]]), e.geometryTimestamp = this.timestamp;
2974
2974
  }
@@ -2982,14 +2982,14 @@ class we {
2982
2982
  };
2983
2983
  }
2984
2984
  static deserialize(t, e) {
2985
- return new we(
2985
+ return new Ae(
2986
2986
  t,
2987
2987
  e.to,
2988
2988
  e.timestamp
2989
2989
  );
2990
2990
  }
2991
2991
  }
2992
- class Ft {
2992
+ class Xt {
2993
2993
  constructor(t, e, o, a) {
2994
2994
  this.canvas = t, this.nodeIds = e, this.delta = o, this.timestamp = a;
2995
2995
  }
@@ -2997,7 +2997,7 @@ class Ft {
2997
2997
  var t;
2998
2998
  for (const e of this.nodeIds) {
2999
2999
  const o = this.canvas.model.nodes.get(e, !0);
3000
- o && At(this.timestamp, o.geometryTimestamp) && (o.move([
3000
+ o && xt(this.timestamp, o.geometryTimestamp) && (o.move([
3001
3001
  o.coords[0] + this.delta[0],
3002
3002
  o.coords[1] + this.delta[1]
3003
3003
  ]), (t = o.parent) == null || t.fitToChild(o), o.geometryTimestamp = this.timestamp);
@@ -3012,7 +3012,7 @@ class Ft {
3012
3012
  };
3013
3013
  }
3014
3014
  static deserialize(t, e) {
3015
- return new Ft(
3015
+ return new Xt(
3016
3016
  t,
3017
3017
  e.nodeIds,
3018
3018
  e.delta,
@@ -3020,14 +3020,14 @@ class Ft {
3020
3020
  );
3021
3021
  }
3022
3022
  }
3023
- class nt {
3023
+ class rt {
3024
3024
  constructor(t, e, o, a) {
3025
3025
  this.canvas = t, this.nodeId = e, this.to = o, this.timestamp = a;
3026
3026
  }
3027
3027
  do() {
3028
3028
  var e, o, a;
3029
3029
  const t = this.canvas.model.nodes.get(this.nodeId, !0);
3030
- if (t && At(this.timestamp, t.geometryTimestamp)) {
3030
+ if (t && xt(this.timestamp, t.geometryTimestamp)) {
3031
3031
  t.setGeometry(this.to), (e = t.label) != null && e.fit && this.canvas.fitFieldRootInView(t.label.id, t.label.shrink);
3032
3032
  for (const l of t.sections)
3033
3033
  (o = l.label) != null && o.fit && this.canvas.fitFieldRootInView(
@@ -3046,7 +3046,7 @@ class nt {
3046
3046
  };
3047
3047
  }
3048
3048
  static deserialize(t, e) {
3049
- return new nt(
3049
+ return new rt(
3050
3050
  t,
3051
3051
  e.nodeId,
3052
3052
  e.to,
@@ -3054,14 +3054,14 @@ class nt {
3054
3054
  );
3055
3055
  }
3056
3056
  }
3057
- class Ut {
3057
+ class jt {
3058
3058
  constructor(t, e, o, a, l) {
3059
3059
  this.canvas = t, this.childId = e, this.parentId = o, this.childGeometry = a, this.timestamp = l;
3060
3060
  }
3061
3061
  do() {
3062
3062
  var o;
3063
3063
  const t = this.canvas.model.nodes.get(this.childId, !0), e = this.parentId !== void 0 ? this.canvas.model.nodes.get(this.parentId, !0) : void 0;
3064
- t && (this.parentId === void 0 || e) && At(this.timestamp, t.geometryTimestamp) && ((o = t.parent) == null || o.removeChild(t), t.setGeometry(this.childGeometry), e == null || e.addChild(t));
3064
+ t && (this.parentId === void 0 || e) && xt(this.timestamp, t.geometryTimestamp) && ((o = t.parent) == null || o.removeChild(t), t.setGeometry(this.childGeometry), e == null || e.addChild(t));
3065
3065
  }
3066
3066
  serialize() {
3067
3067
  return {
@@ -3073,7 +3073,7 @@ class Ut {
3073
3073
  };
3074
3074
  }
3075
3075
  static deserialize(t, e) {
3076
- return new Ut(
3076
+ return new jt(
3077
3077
  t,
3078
3078
  e.childId,
3079
3079
  e.parentId,
@@ -3082,7 +3082,7 @@ class Ut {
3082
3082
  );
3083
3083
  }
3084
3084
  }
3085
- class oe {
3085
+ class ne {
3086
3086
  constructor(t, e, o, a, l) {
3087
3087
  this.canvas = t, this.id = e, this.typeId = o, this.startId = a, this.endId = l;
3088
3088
  }
@@ -3100,7 +3100,7 @@ class oe {
3100
3100
  };
3101
3101
  }
3102
3102
  static deserialize(t, e) {
3103
- return new oe(
3103
+ return new ne(
3104
3104
  t,
3105
3105
  e.id,
3106
3106
  e.typeId,
@@ -3109,13 +3109,13 @@ class oe {
3109
3109
  );
3110
3110
  }
3111
3111
  }
3112
- class zt {
3112
+ class Rt {
3113
3113
  constructor(t, e, o, a) {
3114
3114
  this.canvas = t, this.fieldId = e, this.to = o, this.timestamp = a;
3115
3115
  }
3116
3116
  do() {
3117
3117
  const t = this.canvas.model.fields.get(this.fieldId, !0);
3118
- t && At(this.timestamp, t.textTimestamp) && (t.text = this.to, t.textTimestamp = this.timestamp);
3118
+ t && xt(this.timestamp, t.textTimestamp) && (t.text = this.to, t.textTimestamp = this.timestamp);
3119
3119
  }
3120
3120
  serialize() {
3121
3121
  return {
@@ -3126,7 +3126,7 @@ class zt {
3126
3126
  };
3127
3127
  }
3128
3128
  static deserialize(t, e) {
3129
- return new zt(
3129
+ return new Rt(
3130
3130
  t,
3131
3131
  e.fieldId,
3132
3132
  e.to,
@@ -3134,7 +3134,7 @@ class zt {
3134
3134
  );
3135
3135
  }
3136
3136
  }
3137
- class Rt {
3137
+ class Vt {
3138
3138
  constructor(t, e, o, a) {
3139
3139
  this.canvas = t, this.id = e, this.to = o, this.timestamp = a;
3140
3140
  }
@@ -3155,7 +3155,7 @@ class Rt {
3155
3155
  };
3156
3156
  }
3157
3157
  static deserialize(t, e) {
3158
- return new Rt(
3158
+ return new Vt(
3159
3159
  t,
3160
3160
  e.id,
3161
3161
  e.to,
@@ -3163,12 +3163,12 @@ class Rt {
3163
3163
  );
3164
3164
  }
3165
3165
  }
3166
- class dt {
3166
+ class ht {
3167
3167
  constructor(t, e, o, a, l, s, n, r) {
3168
3168
  this.canvas = t, this.nodeIds = e, this.sectionIds = o, this.portIds = a, this.connectionIds = l, this.fieldIds = s, this.selfRemoved = n, this.timestamp = r;
3169
3169
  }
3170
3170
  doOne(t) {
3171
- t && At(this.timestamp, t.selfRemovedTimestamp) && (t.selfRemoved = this.selfRemoved, t.selfRemovedTimestamp = this.timestamp);
3171
+ t && xt(this.timestamp, t.selfRemovedTimestamp) && (t.selfRemoved = this.selfRemoved, t.selfRemovedTimestamp = this.timestamp);
3172
3172
  }
3173
3173
  do() {
3174
3174
  for (const t of this.nodeIds)
@@ -3196,7 +3196,7 @@ class dt {
3196
3196
  };
3197
3197
  }
3198
3198
  static deserialize(t, e) {
3199
- return new dt(
3199
+ return new ht(
3200
3200
  t,
3201
3201
  e.nodeIds,
3202
3202
  e.sectionIds,
@@ -3208,12 +3208,12 @@ class dt {
3208
3208
  );
3209
3209
  }
3210
3210
  }
3211
- class se {
3211
+ class re {
3212
3212
  constructor(t, e, o) {
3213
3213
  this.canvas = t, this.nodes = e, this.connections = o;
3214
3214
  }
3215
3215
  do() {
3216
- const t = new Li();
3216
+ const t = new Pi();
3217
3217
  this.canvas.userSelection.clear();
3218
3218
  for (const e of this.nodes) {
3219
3219
  const o = t.importNode(this.canvas.model, e);
@@ -3235,16 +3235,16 @@ class se {
3235
3235
  };
3236
3236
  }
3237
3237
  static deserialize(t, e) {
3238
- return new se(
3238
+ return new re(
3239
3239
  t,
3240
3240
  e.nodes,
3241
3241
  e.connections
3242
3242
  );
3243
3243
  }
3244
3244
  }
3245
- class Io {
3245
+ class To {
3246
3246
  constructor(t) {
3247
- this.isInRoom = !1, this.canvas = t, this.replicaId = ri();
3247
+ this.isInRoom = !1, this.canvas = t, this.replicaId = ui();
3248
3248
  }
3249
3249
  /**
3250
3250
  * Returns a fresh timestamp, suitable for use by new CollabActions.
@@ -3256,7 +3256,7 @@ class Io {
3256
3256
  * Returns a fresh unique ID, suitable for use by new CollabActions.
3257
3257
  */
3258
3258
  freshId() {
3259
- return "id" + ri();
3259
+ return "id" + ui();
3260
3260
  }
3261
3261
  /**
3262
3262
  * Performs the action - immediately locally, and eventually for remote collaborators.
@@ -3279,62 +3279,62 @@ class Io {
3279
3279
  t.timestamp[0]
3280
3280
  )), t.type) {
3281
3281
  case "addNode": {
3282
- ie.deserialize(this.canvas, t).do();
3282
+ se.deserialize(this.canvas, t).do();
3283
3283
  break;
3284
3284
  }
3285
3285
  case "addSection": {
3286
- ke.deserialize(this.canvas, t).do();
3286
+ Ie.deserialize(this.canvas, t).do();
3287
3287
  break;
3288
3288
  }
3289
3289
  case "applyLayout": {
3290
- we.deserialize(
3290
+ Ae.deserialize(
3291
3291
  this.canvas,
3292
3292
  t
3293
3293
  ).do();
3294
3294
  break;
3295
3295
  }
3296
3296
  case "move": {
3297
- Ft.deserialize(this.canvas, t).do();
3297
+ Xt.deserialize(this.canvas, t).do();
3298
3298
  break;
3299
3299
  }
3300
3300
  case "setGeometry": {
3301
- nt.deserialize(
3301
+ rt.deserialize(
3302
3302
  this.canvas,
3303
3303
  t
3304
3304
  ).do();
3305
3305
  break;
3306
3306
  }
3307
3307
  case "setParent": {
3308
- Ut.deserialize(this.canvas, t).do();
3308
+ jt.deserialize(this.canvas, t).do();
3309
3309
  break;
3310
3310
  }
3311
3311
  case "addConnection": {
3312
- oe.deserialize(
3312
+ ne.deserialize(
3313
3313
  this.canvas,
3314
3314
  t
3315
3315
  ).do();
3316
3316
  break;
3317
3317
  }
3318
3318
  case "editField": {
3319
- zt.deserialize(this.canvas, t).do();
3319
+ Rt.deserialize(this.canvas, t).do();
3320
3320
  break;
3321
3321
  }
3322
3322
  case "updateValues": {
3323
- Rt.deserialize(
3323
+ Vt.deserialize(
3324
3324
  this.canvas,
3325
3325
  t
3326
3326
  ).do();
3327
3327
  break;
3328
3328
  }
3329
3329
  case "setSelfRemoved": {
3330
- dt.deserialize(
3330
+ ht.deserialize(
3331
3331
  this.canvas,
3332
3332
  t
3333
3333
  ).do();
3334
3334
  break;
3335
3335
  }
3336
3336
  case "paste": {
3337
- se.deserialize(this.canvas, t).do();
3337
+ re.deserialize(this.canvas, t).do();
3338
3338
  break;
3339
3339
  }
3340
3340
  default:
@@ -3345,7 +3345,7 @@ class Io {
3345
3345
  }
3346
3346
  }
3347
3347
  }
3348
- class Ao {
3348
+ class $o {
3349
3349
  constructor(t, e) {
3350
3350
  this.canvas = t, this.maximum = e, this.history = [], this.index = 0;
3351
3351
  }
@@ -3398,12 +3398,12 @@ class Ao {
3398
3398
  }
3399
3399
  }
3400
3400
  var S = /* @__PURE__ */ ((i) => (i.AddConnection = "add-connection", i.AddNode = "add-node", i.AddSectionAction = "add-section", i.ApplyLayout = "apply-layout", i.Clipboard = "clipboard", i.ContextMenu = "context-menu", i.EditField = "edit-field", i.MoveNode = "move-node", i.Paste = "paste", i.Remove = "remove", i.StretchNode = "stretch-node", i.StretchSection = "stretch-section", i.UpdateValues = "update-values", i.Zoom = "zoom", i))(S || {});
3401
- class xo {
3401
+ class Mo {
3402
3402
  constructor(t, e, o, a, l, s, n, r, c) {
3403
3403
  this.canvas = t, this.type = e, this.coords = o, this.parentId = a, this.ancestorId = l, this.fromAncestorGeometry = s, this.toAncestorGeometry = n, this.label = r, this.values = c, this.id = this.canvas.collabEngine.freshId();
3404
3404
  }
3405
3405
  do() {
3406
- const t = new ie(
3406
+ const t = new se(
3407
3407
  this.canvas,
3408
3408
  this.id,
3409
3409
  this.type.id,
@@ -3413,7 +3413,7 @@ class xo {
3413
3413
  this.values
3414
3414
  );
3415
3415
  if (this.canvas.collabEngine.doCollaboratively(t), this.ancestorId !== void 0 && this.toAncestorGeometry !== void 0) {
3416
- const e = new nt(
3416
+ const e = new rt(
3417
3417
  this.canvas,
3418
3418
  this.ancestorId,
3419
3419
  this.toAncestorGeometry,
@@ -3424,7 +3424,7 @@ class xo {
3424
3424
  return !0;
3425
3425
  }
3426
3426
  undo() {
3427
- const t = this.canvas.model.nodes.get(this.id), e = new dt(
3427
+ const t = this.canvas.model.nodes.get(this.id), e = new ht(
3428
3428
  this.canvas,
3429
3429
  [this.id],
3430
3430
  [],
@@ -3435,7 +3435,7 @@ class xo {
3435
3435
  this.canvas.collabEngine.freshTimestamp()
3436
3436
  );
3437
3437
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.fromAncestorGeometry !== void 0) {
3438
- const o = new nt(
3438
+ const o = new rt(
3439
3439
  this.canvas,
3440
3440
  this.ancestorId,
3441
3441
  this.fromAncestorGeometry,
@@ -3446,7 +3446,7 @@ class xo {
3446
3446
  return t !== void 0;
3447
3447
  }
3448
3448
  redo() {
3449
- const t = this.canvas.model.nodes.get(this.id), e = new dt(
3449
+ const t = this.canvas.model.nodes.get(this.id), e = new ht(
3450
3450
  this.canvas,
3451
3451
  [this.id],
3452
3452
  [],
@@ -3457,7 +3457,7 @@ class xo {
3457
3457
  this.canvas.collabEngine.freshTimestamp()
3458
3458
  );
3459
3459
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.toAncestorGeometry !== void 0) {
3460
- const o = new nt(
3460
+ const o = new rt(
3461
3461
  this.canvas,
3462
3462
  this.ancestorId,
3463
3463
  this.toAncestorGeometry,
@@ -3468,12 +3468,12 @@ class xo {
3468
3468
  return t === void 0;
3469
3469
  }
3470
3470
  }
3471
- class ce {
3471
+ class he {
3472
3472
  constructor(t, e, o) {
3473
3473
  this.canvas = t, this.nodeIds = e, this.delta = o;
3474
3474
  }
3475
3475
  do() {
3476
- const t = new Ft(
3476
+ const t = new Xt(
3477
3477
  this.canvas,
3478
3478
  this.nodeIds,
3479
3479
  this.delta,
@@ -3482,7 +3482,7 @@ class ce {
3482
3482
  return this.canvas.collabEngine.doCollaboratively(t), this.nodeIds.map((e) => this.canvas.model.nodes.get(e) !== void 0).includes(!0) && (this.delta[0] !== 0 || this.delta[1] !== 0);
3483
3483
  }
3484
3484
  undo() {
3485
- const t = new Ft(
3485
+ const t = new Xt(
3486
3486
  this.canvas,
3487
3487
  this.nodeIds,
3488
3488
  [-this.delta[0], -this.delta[1]],
@@ -3501,14 +3501,14 @@ class J {
3501
3501
  do() {
3502
3502
  const t = this.canvas.model.nodes.get(this.nodeId);
3503
3503
  if (t) {
3504
- const e = new nt(
3504
+ const e = new rt(
3505
3505
  this.canvas,
3506
3506
  this.nodeId,
3507
3507
  this.to,
3508
3508
  this.canvas.collabEngine.freshTimestamp()
3509
3509
  );
3510
3510
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.toAncestorGeometry !== void 0) {
3511
- const o = new nt(
3511
+ const o = new rt(
3512
3512
  this.canvas,
3513
3513
  this.ancestorId,
3514
3514
  this.toAncestorGeometry,
@@ -3523,14 +3523,14 @@ class J {
3523
3523
  const t = this.canvas.model.nodes.get(this.nodeId);
3524
3524
  if (t) {
3525
3525
  this.to = t.getGeometry();
3526
- const e = new nt(
3526
+ const e = new rt(
3527
3527
  this.canvas,
3528
3528
  this.nodeId,
3529
3529
  this.from,
3530
3530
  this.canvas.collabEngine.freshTimestamp()
3531
3531
  );
3532
3532
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.fromAncestorGeometry !== void 0) {
3533
- const o = new nt(
3533
+ const o = new rt(
3534
3534
  this.canvas,
3535
3535
  this.ancestorId,
3536
3536
  this.fromAncestorGeometry,
@@ -3545,7 +3545,7 @@ class J {
3545
3545
  const t = this.canvas.model.nodes.get(this.nodeId);
3546
3546
  if (t) {
3547
3547
  this.from = t.getGeometry();
3548
- const e = new nt(
3548
+ const e = new rt(
3549
3549
  this.canvas,
3550
3550
  this.nodeId,
3551
3551
  this.to,
@@ -3556,12 +3556,12 @@ class J {
3556
3556
  return t !== void 0;
3557
3557
  }
3558
3558
  }
3559
- class Lo {
3559
+ class No {
3560
3560
  constructor(t, e, o, a, l, s, n, r, c) {
3561
3561
  this.canvas = t, this.childId = e, this.fromParentId = o, this.toParentId = a, this.fromChildGeometry = l, this.toChildGeometry = s, this.ancestorId = n, this.fromAncestorGeometry = r, this.toAncestorGeometry = c;
3562
3562
  }
3563
3563
  do() {
3564
- const t = this.canvas.model.nodes.get(this.childId), e = new Ut(
3564
+ const t = this.canvas.model.nodes.get(this.childId), e = new jt(
3565
3565
  this.canvas,
3566
3566
  this.childId,
3567
3567
  this.toParentId,
@@ -3569,7 +3569,7 @@ class Lo {
3569
3569
  this.canvas.collabEngine.freshTimestamp()
3570
3570
  );
3571
3571
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.toAncestorGeometry !== void 0) {
3572
- const o = new nt(
3572
+ const o = new rt(
3573
3573
  this.canvas,
3574
3574
  this.ancestorId,
3575
3575
  this.toAncestorGeometry,
@@ -3580,7 +3580,7 @@ class Lo {
3580
3580
  return t !== void 0;
3581
3581
  }
3582
3582
  undo() {
3583
- const t = this.canvas.model.nodes.get(this.childId), e = new Ut(
3583
+ const t = this.canvas.model.nodes.get(this.childId), e = new jt(
3584
3584
  this.canvas,
3585
3585
  this.childId,
3586
3586
  this.fromParentId,
@@ -3588,7 +3588,7 @@ class Lo {
3588
3588
  this.canvas.collabEngine.freshTimestamp()
3589
3589
  );
3590
3590
  if (this.canvas.collabEngine.doCollaboratively(e), this.ancestorId !== void 0 && this.fromAncestorGeometry !== void 0) {
3591
- const o = new nt(
3591
+ const o = new rt(
3592
3592
  this.canvas,
3593
3593
  this.ancestorId,
3594
3594
  this.fromAncestorGeometry,
@@ -3602,12 +3602,12 @@ class Lo {
3602
3602
  return this.do();
3603
3603
  }
3604
3604
  }
3605
- class de {
3605
+ class ge {
3606
3606
  constructor(t, e, o, a) {
3607
3607
  this.canvas = t, this.type = e, this.startId = o, this.endId = a, this.id = this.canvas.collabEngine.freshId();
3608
3608
  }
3609
3609
  do() {
3610
- const t = new oe(
3610
+ const t = new ne(
3611
3611
  this.canvas,
3612
3612
  this.id,
3613
3613
  this.type.id,
@@ -3617,7 +3617,7 @@ class de {
3617
3617
  return this.canvas.collabEngine.doCollaboratively(t), !0;
3618
3618
  }
3619
3619
  undo() {
3620
- const t = this.canvas.model.connections.get(this.id), e = new dt(
3620
+ const t = this.canvas.model.connections.get(this.id), e = new ht(
3621
3621
  this.canvas,
3622
3622
  [],
3623
3623
  [],
@@ -3630,7 +3630,7 @@ class de {
3630
3630
  return this.canvas.collabEngine.doCollaboratively(e), t !== void 0;
3631
3631
  }
3632
3632
  redo() {
3633
- const t = this.canvas.model.connections.get(this.id), e = new dt(
3633
+ const t = this.canvas.model.connections.get(this.id), e = new ht(
3634
3634
  this.canvas,
3635
3635
  [],
3636
3636
  [],
@@ -3643,12 +3643,12 @@ class de {
3643
3643
  return this.canvas.collabEngine.doCollaboratively(e), t === void 0;
3644
3644
  }
3645
3645
  }
3646
- class di {
3646
+ class vi {
3647
3647
  constructor(t, e, o, a) {
3648
3648
  this.canvas = t, this.fieldId = e, this.from = o, this.to = a;
3649
3649
  }
3650
3650
  do() {
3651
- const t = this.canvas.model.fields.get(this.fieldId), e = new zt(
3651
+ const t = this.canvas.model.fields.get(this.fieldId), e = new Rt(
3652
3652
  this.canvas,
3653
3653
  this.fieldId,
3654
3654
  this.to,
@@ -3660,7 +3660,7 @@ class di {
3660
3660
  const t = this.canvas.model.fields.get(this.fieldId);
3661
3661
  if (t) {
3662
3662
  this.to = t.text;
3663
- const e = new zt(
3663
+ const e = new Rt(
3664
3664
  this.canvas,
3665
3665
  this.fieldId,
3666
3666
  this.from,
@@ -3674,7 +3674,7 @@ class di {
3674
3674
  const t = this.canvas.model.fields.get(this.fieldId);
3675
3675
  if (t) {
3676
3676
  this.from = t.text;
3677
- const e = new zt(
3677
+ const e = new Rt(
3678
3678
  this.canvas,
3679
3679
  this.fieldId,
3680
3680
  this.to,
@@ -3685,12 +3685,12 @@ class di {
3685
3685
  return t !== void 0;
3686
3686
  }
3687
3687
  }
3688
- class Eo {
3688
+ class Po {
3689
3689
  constructor(t, e, o, a) {
3690
3690
  this.canvas = t, this.id = e, this.from = o, this.to = a;
3691
3691
  }
3692
3692
  do() {
3693
- const t = new Rt(
3693
+ const t = new Vt(
3694
3694
  this.canvas,
3695
3695
  this.id,
3696
3696
  this.to,
@@ -3699,7 +3699,7 @@ class Eo {
3699
3699
  return this.canvas.collabEngine.doCollaboratively(t), !0;
3700
3700
  }
3701
3701
  undo() {
3702
- const t = new Rt(
3702
+ const t = new Vt(
3703
3703
  this.canvas,
3704
3704
  this.id,
3705
3705
  this.from,
@@ -3712,7 +3712,7 @@ class Eo {
3712
3712
  return !e.rootElement.removed;
3713
3713
  }
3714
3714
  redo() {
3715
- const t = new Rt(
3715
+ const t = new Vt(
3716
3716
  this.canvas,
3717
3717
  this.id,
3718
3718
  this.to,
@@ -3725,7 +3725,7 @@ class Eo {
3725
3725
  return !e.rootElement.removed;
3726
3726
  }
3727
3727
  }
3728
- class To {
3728
+ class zo {
3729
3729
  constructor(t, e, o, a, l, s) {
3730
3730
  this.canvas = t, this.nodeIds = e, this.sectionIds = o, this.portIds = a, this.connectionIds = l, this.fieldIds = s;
3731
3731
  }
@@ -3734,7 +3734,7 @@ class To {
3734
3734
  (o) => this.canvas.model.sections.get(o) !== void 0
3735
3735
  ).includes(!0) || this.portIds.map((o) => this.canvas.model.ports.get(o) !== void 0).includes(!0) || this.connectionIds.map(
3736
3736
  (o) => this.canvas.model.connections.get(o) !== void 0
3737
- ).includes(!0) || this.fieldIds.map((o) => this.canvas.model.fields.get(o) !== void 0).includes(!0), e = new dt(
3737
+ ).includes(!0) || this.fieldIds.map((o) => this.canvas.model.fields.get(o) !== void 0).includes(!0), e = new ht(
3738
3738
  this.canvas,
3739
3739
  this.nodeIds,
3740
3740
  this.sectionIds,
@@ -3751,7 +3751,7 @@ class To {
3751
3751
  (o) => this.canvas.model.sections.get(o) === void 0
3752
3752
  ).includes(!0) || this.portIds.map((o) => this.canvas.model.ports.get(o) === void 0).includes(!0) || this.connectionIds.map(
3753
3753
  (o) => this.canvas.model.connections.get(o) === void 0
3754
- ).includes(!0) || this.fieldIds.map((o) => this.canvas.model.fields.get(o) === void 0).includes(!0), e = new dt(
3754
+ ).includes(!0) || this.fieldIds.map((o) => this.canvas.model.fields.get(o) === void 0).includes(!0), e = new ht(
3755
3755
  this.canvas,
3756
3756
  this.nodeIds,
3757
3757
  this.sectionIds,
@@ -3767,7 +3767,7 @@ class To {
3767
3767
  return this.do();
3768
3768
  }
3769
3769
  }
3770
- class $o {
3770
+ class Ro {
3771
3771
  constructor(t, e, o, a) {
3772
3772
  this.canvas = t, this.nodes = e, this.connections = o, this.coords = a;
3773
3773
  }
@@ -3793,7 +3793,10 @@ class $o {
3793
3793
  d.id.includes(l.id) ? d.id = d.id.replace(l.id, n) : d.id = this.canvas.collabEngine.freshId(), o[h] = d.id, e && (d.coords = [
3794
3794
  d.coords[0] + e[0],
3795
3795
  d.coords[1] + e[1]
3796
- ]);
3796
+ ], d.connectionPoint && (d.connectionPoint = [
3797
+ d.connectionPoint[0] + e[0],
3798
+ d.connectionPoint[1] + e[1]
3799
+ ]));
3797
3800
  }
3798
3801
  }
3799
3802
  if (l.ports)
@@ -3802,7 +3805,10 @@ class $o {
3802
3805
  r.id.includes(l.id) ? r.id = r.id.replace(l.id, n) : r.id = this.canvas.collabEngine.freshId(), o[c] = r.id, e && (r.coords = [
3803
3806
  r.coords[0] + e[0],
3804
3807
  r.coords[1] + e[1]
3805
- ]);
3808
+ ], r.connectionPoint && (r.connectionPoint = [
3809
+ r.connectionPoint[0] + e[0],
3810
+ r.connectionPoint[1] + e[1]
3811
+ ]));
3806
3812
  }
3807
3813
  }
3808
3814
  for (const l of this.connections) {
@@ -3814,7 +3820,7 @@ class $o {
3814
3820
  l.points[n][1] + e[1]
3815
3821
  ];
3816
3822
  }
3817
- const a = new se(
3823
+ const a = new re(
3818
3824
  this.canvas,
3819
3825
  this.nodes,
3820
3826
  this.connections
@@ -3824,7 +3830,7 @@ class $o {
3824
3830
  undo() {
3825
3831
  const t = this.nodes.map((o) => this.canvas.model.nodes.get(o.id) !== void 0).includes(!0) || this.connections.map(
3826
3832
  (o) => this.canvas.model.connections.get(o.id) !== void 0
3827
- ).includes(!0), e = new dt(
3833
+ ).includes(!0), e = new ht(
3828
3834
  this.canvas,
3829
3835
  this.nodes.map((o) => o.id),
3830
3836
  [],
@@ -3839,7 +3845,7 @@ class $o {
3839
3845
  redo() {
3840
3846
  const t = this.nodes.map((o) => this.canvas.model.nodes.get(o.id) === void 0).includes(!0) || this.connections.map(
3841
3847
  (o) => this.canvas.model.connections.get(o.id) === void 0
3842
- ).includes(!0), e = new dt(
3848
+ ).includes(!0), e = new ht(
3843
3849
  this.canvas,
3844
3850
  this.nodes.map((o) => o.id),
3845
3851
  [],
@@ -3852,7 +3858,7 @@ class $o {
3852
3858
  return this.canvas.collabEngine.doCollaboratively(e), t;
3853
3859
  }
3854
3860
  }
3855
- class ne {
3861
+ class ae {
3856
3862
  constructor(t) {
3857
3863
  this.type = t, this.defaultPrevented = !1;
3858
3864
  }
@@ -3860,8 +3866,8 @@ class ne {
3860
3866
  this.defaultPrevented = !0;
3861
3867
  }
3862
3868
  }
3863
- var Ei = /* @__PURE__ */ ((i) => (i[i.DoubleClick = 0] = "DoubleClick", i[i.SecondaryClick = 1] = "SecondaryClick", i[i.Selection = 2] = "Selection", i[i.Highlight = 3] = "Highlight", i))(Ei || {});
3864
- class kt extends ne {
3869
+ var zi = /* @__PURE__ */ ((i) => (i[i.DoubleClick = 0] = "DoubleClick", i[i.SecondaryClick = 1] = "SecondaryClick", i[i.Selection = 2] = "Selection", i[i.Highlight = 3] = "Highlight", i))(zi || {});
3870
+ class wt extends ae {
3865
3871
  /**
3866
3872
  * Create a diagram double click event.
3867
3873
  *
@@ -3876,7 +3882,7 @@ class kt extends ne {
3876
3882
  ), this.cause = t, this.target = e, this.coords = o;
3877
3883
  }
3878
3884
  }
3879
- class wt extends ne {
3885
+ class Ct extends ae {
3880
3886
  /**
3881
3887
  * Create a diagram secondary click event.
3882
3888
  *
@@ -3891,7 +3897,7 @@ class wt extends ne {
3891
3897
  ), this.cause = t, this.target = e, this.coords = o;
3892
3898
  }
3893
3899
  }
3894
- class F extends ne {
3900
+ class B extends ae {
3895
3901
  /**
3896
3902
  * Create a diagram selection event.
3897
3903
  *
@@ -3905,7 +3911,7 @@ class F extends ne {
3905
3911
  ), this.targets = t, this.selected = e;
3906
3912
  }
3907
3913
  }
3908
- class ot extends ne {
3914
+ class ot extends ae {
3909
3915
  /**
3910
3916
  * Create a diagram highlight event.
3911
3917
  *
@@ -3918,7 +3924,7 @@ class ot extends ne {
3918
3924
  ), this.target = t;
3919
3925
  }
3920
3926
  }
3921
- class Ti extends $t {
3927
+ class Ri extends Mt {
3922
3928
  constructor(t, e, o, a, l, s, n, r, c = "floating", d = "floating") {
3923
3929
  if (t.objects.get(r) !== void 0)
3924
3930
  throw new Error(`DiagramDecorator with id "${r}" already exists`);
@@ -3949,7 +3955,7 @@ class Ti extends $t {
3949
3955
  return this.priority;
3950
3956
  }
3951
3957
  }
3952
- class Mo extends yt {
3958
+ class Vo extends bt {
3953
3959
  /**
3954
3960
  * Instance a set of decorators for the given model. This method is used internally.
3955
3961
  * @private
@@ -3969,7 +3975,7 @@ class Mo extends yt {
3969
3975
  * @returns The instanced decorator.
3970
3976
  */
3971
3977
  new(t, e, o, a, l, s, n, r = "floating", c = "floating") {
3972
- const d = new Ti(
3978
+ const d = new Ri(
3973
3979
  this.model,
3974
3980
  t,
3975
3981
  e,
@@ -3988,7 +3994,7 @@ class Mo extends yt {
3988
3994
  e && ((e.rootElement instanceof O || e.rootElement instanceof X) && K(e.rootElement.decorators, e), super.remove(t), e.updateInView());
3989
3995
  }
3990
3996
  }
3991
- class No extends $t {
3997
+ class _o extends Mt {
3992
3998
  constructor(t, e, o, a, l, s, n) {
3993
3999
  if (t.objects.get(n) !== void 0)
3994
4000
  throw new Error(`DiagramObject with id "${n}" already exists`);
@@ -4019,7 +4025,7 @@ class No extends $t {
4019
4025
  return this.priority;
4020
4026
  }
4021
4027
  }
4022
- class Po extends yt {
4028
+ class Oo extends bt {
4023
4029
  /**
4024
4030
  * Instance a set of objects for the given model. This method is used internally.
4025
4031
  * @private
@@ -4039,7 +4045,7 @@ class Po extends yt {
4039
4045
  * @returns The instanced object.
4040
4046
  */
4041
4047
  new(t, e, o, a, l, s) {
4042
- const n = new No(
4048
+ const n = new _o(
4043
4049
  this.model,
4044
4050
  t,
4045
4051
  e,
@@ -4055,9 +4061,9 @@ class Po extends yt {
4055
4061
  e && (super.remove(t), e.updateInView());
4056
4062
  }
4057
4063
  }
4058
- class $i {
4064
+ class Vi {
4059
4065
  constructor(t, e, o, a, l, s = []) {
4060
- this.nodes = new vo(this), this.sections = new po(this), this.ports = new So(this), this.connections = new co(this), this.fields = new ho(this), this.objects = new Po(this), this.decorators = new Mo(this), this.canvas = t, this.id = e, this.name = o, this.description = a, this.type = l, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new St(new ee(s), this);
4066
+ this.nodes = new Co(this), this.sections = new wo(this), this.ports = new Eo(this), this.connections = new fo(this), this.fields = new po(this), this.objects = new Oo(this), this.decorators = new Vo(this), this.canvas = t, this.id = e, this.name = o, this.description = a, this.type = l, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.valueSet = new It(new oe(s), this);
4061
4067
  }
4062
4068
  /**
4063
4069
  * Deletes everything in this diagram.
@@ -4068,7 +4074,7 @@ class $i {
4068
4074
  (t = this.canvas) == null || t.cancelAllUserActions(), this.id = void 0, this.name = "", this.description = void 0, this.createdAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.logicalClock = 0, this.nodes.clear(), this.sections.clear(), this.ports.clear(), this.connections.clear(), this.fields.clear(), this.objects.clear(), this.decorators.clear(), this.valueSet.resetValues(), (e = this.canvas) == null || e.updateModelInView();
4069
4075
  }
4070
4076
  }
4071
- const Ct = (i) => !!i.button, he = (i, t, e, o, a, l, s, n) => Xi(
4077
+ const St = (i) => !!i.button, ue = (i, t, e, o, a, l, s, n) => Ji(
4072
4078
  i,
4073
4079
  [t, e],
4074
4080
  o,
@@ -4081,13 +4087,39 @@ const Ct = (i) => !!i.button, he = (i, t, e, o, a, l, s, n) => Xi(
4081
4087
  ) * l
4082
4088
  ), x = (i) => {
4083
4089
  i ? N.select("body").style("cursor", i) : N.select("body").style("cursor", P.Auto);
4084
- }, ft = (i) => i instanceof O ? i : i instanceof X ? i.node || i : i.rootElement instanceof O || i.rootElement instanceof X || i.rootElement instanceof It ? ft(i.rootElement) : i, ge = (i) => {
4090
+ }, pt = (i) => i instanceof O ? i : i instanceof X ? i.node || i : i.rootElement instanceof O || i.rootElement instanceof X || i.rootElement instanceof At ? pt(i.rootElement) : i, me = (i) => {
4085
4091
  i.filter(".shaped-look").append("path"), i.filter(".image-look").append("image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "top-right-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "center-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "right-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-left-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-image").attr("preserveAspectRatio", "none"), i.filter(".stretchable-image-look").append("image").attr("class", "bottom-right-image").attr("preserveAspectRatio", "none");
4086
- }, ue = (i) => {
4092
+ }, Ft = {
4093
+ fillColor: "#FFFFFF",
4094
+ borderColor: "#000000",
4095
+ borderThickness: 1,
4096
+ borderStyle: Se.Solid
4097
+ }, fe = (i) => {
4087
4098
  i.filter(".shaped-look").select("path").attr(
4088
4099
  "d",
4089
- (t) => ve(t.look.shape, 0, 0, t.width, t.height)
4090
- ).attr("fill", (t) => t.look.fillColor).attr("stroke", (t) => t.look.borderColor).attr("stroke-width", (t) => `${t.look.borderThickness}px`), i.filter(".image-look").select("image").attr("x", 0).attr("y", 0).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("href", (t) => t.look.backgroundImage), i.filter(".stretchable-image-look").select("image.top-left-image").attr("x", 0).attr("y", 0).attr("width", (t) => t.look.leftMargin).attr("height", (t) => t.look.topMargin).attr(
4100
+ (t) => ke(
4101
+ t.look.shape || _t.Rectangle,
4102
+ 0,
4103
+ 0,
4104
+ t.width,
4105
+ t.height
4106
+ )
4107
+ ).attr(
4108
+ "fill",
4109
+ (t) => t.look.fillColor || Ft.fillColor
4110
+ ).attr(
4111
+ "stroke",
4112
+ (t) => t.look.borderColor || Ft.borderColor
4113
+ ).attr(
4114
+ "stroke-width",
4115
+ (t) => `${t.look.borderThickness || Ft.borderThickness}px`
4116
+ ).attr(
4117
+ "stroke-dasharray",
4118
+ (t) => be(
4119
+ t.look.borderStyle || Ft.borderStyle,
4120
+ t.look.borderThickness || Ft.borderThickness
4121
+ )
4122
+ ), i.filter(".image-look").select("image").attr("x", 0).attr("y", 0).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("href", (t) => t.look.backgroundImage), i.filter(".stretchable-image-look").select("image.top-left-image").attr("x", 0).attr("y", 0).attr("width", (t) => t.look.leftMargin).attr("height", (t) => t.look.topMargin).attr(
4091
4123
  "href",
4092
4124
  (t) => t.look.backgroundImageTopLeft
4093
4125
  ), i.filter(".stretchable-image-look").select("image.top-image").attr("x", (t) => t.look.leftMargin).attr("y", 0).attr(
@@ -4124,13 +4156,13 @@ const Ct = (i) => !!i.button, he = (i, t, e, o, a, l, s, n) => Xi(
4124
4156
  "href",
4125
4157
  (t) => t.look.backgroundImageBottomRight
4126
4158
  );
4127
- }, Ot = {
4159
+ }, Ht = {
4128
4160
  style: "dots",
4129
4161
  color: "rgba(0, 0, 0, 0.1)",
4130
4162
  snap: !1,
4131
4163
  spacing: 10,
4132
4164
  thickness: 0.05
4133
- }, zo = (i, t, e) => {
4165
+ }, Do = (i, t, e) => {
4134
4166
  const o = t.append("defs");
4135
4167
  if (i.gridSize > 0 && isFinite(i.gridSize)) {
4136
4168
  const a = o.append("pattern").attr("id", e).attr("x", -i.gridSize / 2).attr("y", -i.gridSize / 2).attr("width", i.gridSize).attr("height", i.gridSize).attr("patternUnits", "userSpaceOnUse");
@@ -4150,17 +4182,17 @@ const Ct = (i) => !!i.button, he = (i, t, e, o, a, l, s, n) => Xi(
4150
4182
  }
4151
4183
  t.select("rect").attr("fill", `url(#${e})`);
4152
4184
  }
4153
- }, ye = 96, Q = 32, Nt = ye + Q, Ro = Math.PI / 4, Vo = 100, hi = {
4185
+ }, we = 96, Q = 32, Pt = we + Q, Fo = Math.PI / 4, Ho = 100, yi = {
4154
4186
  customButtons: []
4155
4187
  };
4156
- class _o {
4188
+ class Go {
4157
4189
  /**
4158
4190
  * Constructs a context menu object.
4159
4191
  * @public
4160
4192
  * @param canvas A canvas.
4161
4193
  */
4162
4194
  constructor(t, e) {
4163
- this.canvas = t, this.config = e || hi;
4195
+ this.canvas = t, this.config = e || yi;
4164
4196
  }
4165
4197
  /**
4166
4198
  * Opens the context menu at the location determined by the given mouse event.
@@ -4169,7 +4201,7 @@ class _o {
4169
4201
  */
4170
4202
  open(t) {
4171
4203
  this.close();
4172
- const e = this.canvas.getPointerLocationRelativeToRoot(t), o = this.canvas.getPointerLocationRelativeToCanvas(t), a = this.canvas.selectSVGElement().append("foreignObject").attr("class", "daga-context-menu").attr("x", `${e[0] - Nt}px`).attr("y", `${e[1] - Nt}px`).attr("width", `${2 * Nt}px`).attr("height", `${2 * Nt}px`).style("pointer-events", "none").on(L.ContextMenu, (s) => {
4204
+ const e = this.canvas.getPointerLocationRelativeToRoot(t), o = this.canvas.getPointerLocationRelativeToCanvas(t), a = this.canvas.selectSVGElement().append("foreignObject").attr("class", "daga-context-menu").attr("x", `${e[0] - Pt}px`).attr("y", `${e[1] - Pt}px`).attr("width", `${2 * Pt}px`).attr("height", `${2 * Pt}px`).style("pointer-events", "none").on(L.ContextMenu, (s) => {
4173
4205
  this.canvas.canUserPerformAction(S.ContextMenu) && (t.preventDefault(), this.open(s));
4174
4206
  }).on(L.Click, (s) => {
4175
4207
  s.preventDefault(), this.close();
@@ -4203,7 +4235,7 @@ class _o {
4203
4235
  s.userSelection.removeFromModel(), s.cancelAllUserActions();
4204
4236
  }
4205
4237
  });
4206
- for (const s of this.config.customButtons || hi.customButtons)
4238
+ for (const s of this.config.customButtons || yi.customButtons)
4207
4239
  (s.condition === void 0 || s.condition(this.canvas)) && l.push(s);
4208
4240
  l.length === 0 && l.push({
4209
4241
  name: "NONE",
@@ -4211,7 +4243,7 @@ class _o {
4211
4243
  onPress: void 0
4212
4244
  });
4213
4245
  for (let s = 0; s < l.length; ++s) {
4214
- const n = l[s], r = n.onPress, c = (s + 0.5 - l.length / 2) * Ro, d = a.append("xhtml:div").attr(
4246
+ const n = l[s], r = n.onPress, c = (s + 0.5 - l.length / 2) * Fo, d = a.append("xhtml:div").attr(
4215
4247
  "class",
4216
4248
  `daga-context-menu-button ${n.onPress !== void 0 ? " daga-clickable" : ""}`
4217
4249
  ).attr("tabindex", 0).style("position", "absolute").style("box-sizing", "border-box").style("width", `${2 * Q}px`).style("height", `${2 * Q}px`).style("border-radius", `${Q}px`).style("pointer-events", "auto").on(L.Click, (h) => {
@@ -4219,14 +4251,14 @@ class _o {
4219
4251
  }).on(L.KeyDown, (h) => {
4220
4252
  r && h.key === it.Enter && (h.preventDefault(), r(this.canvas));
4221
4253
  });
4222
- n.imageClass !== void 0 ? d.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * Q}px`).style("top", `${0.5 * Q}px`).style("width", `${0.5 * Q}px`).style("height", `${0.5 * Q}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", n.imageClass) : n.image !== void 0 && d.append("xhtml:img").style("position", "absolute").style("left", `${0.75 * Q}px`).style("top", `${0.5 * Q}px`).style("width", `${0.5 * Q}px`).style("height", `${0.5 * Q}px`).attr("src", n.image), d.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * Q}px`).style("top", `${1.1 * Q}px`).style("text-align", "center").style("width", `${1.6 * Q}px`).style("height", `${0.35 * Q}px`).style("margin", "0").style("font-size", `${0.35 * Q}px`).style("font-weight", "700").style("user-select", "none").text(n.name), d.transition().ease(N.easeLinear).duration(Vo).tween("progress", () => (h) => {
4254
+ n.imageClass !== void 0 ? d.append("xhtml:div").style("position", "absolute").style("left", `${0.75 * Q}px`).style("top", `${0.5 * Q}px`).style("width", `${0.5 * Q}px`).style("height", `${0.5 * Q}px`).style("background-size", "contain").style("background-repeat", "no-repeat").attr("class", n.imageClass) : n.image !== void 0 && d.append("xhtml:img").style("position", "absolute").style("left", `${0.75 * Q}px`).style("top", `${0.5 * Q}px`).style("width", `${0.5 * Q}px`).style("height", `${0.5 * Q}px`).attr("src", n.image), d.append("xhtml:span").style("position", "absolute").style("left", `${0.2 * Q}px`).style("top", `${1.1 * Q}px`).style("text-align", "center").style("width", `${1.6 * Q}px`).style("height", `${0.35 * Q}px`).style("margin", "0").style("font-size", `${0.35 * Q}px`).style("font-weight", "700").style("user-select", "none").text(n.name), d.transition().ease(N.easeLinear).duration(Ho).tween("progress", () => (h) => {
4223
4255
  const u = c * h;
4224
4256
  return d.style(
4225
4257
  "left",
4226
- `${Math.sin(u) * ye - Q + Nt}px`
4258
+ `${Math.sin(u) * we - Q + Pt}px`
4227
4259
  ).style(
4228
4260
  "top",
4229
- `${-Math.cos(u) * ye - Q + Nt}px`
4261
+ `${-Math.cos(u) * we - Q + Pt}px`
4230
4262
  );
4231
4263
  });
4232
4264
  }
@@ -4240,7 +4272,7 @@ class _o {
4240
4272
  (t = this.contextMenuContainer) == null || t.remove(), this.contextMenuContainer = void 0;
4241
4273
  }
4242
4274
  }
4243
- class Oo extends yt {
4275
+ class Bo extends bt {
4244
4276
  /**
4245
4277
  * Constructs a user highlight object.
4246
4278
  * @public
@@ -4262,7 +4294,7 @@ class Oo extends yt {
4262
4294
  * @param element
4263
4295
  */
4264
4296
  focusOn(t) {
4265
- this.clear(), this.focus = t, (t instanceof pt || t instanceof Ti) && t.rootElement ? this.focusOn(t.rootElement) : this.add(t);
4297
+ this.clear(), this.focus = t, (t instanceof vt || t instanceof Ri) && t.rootElement ? this.focusOn(t.rootElement) : this.add(t);
4266
4298
  }
4267
4299
  add(t) {
4268
4300
  if (super.add(t), t instanceof O) {
@@ -4284,7 +4316,7 @@ class Oo extends yt {
4284
4316
  super.add(e), this.canvas.updatePortsInView(e.id);
4285
4317
  t.label && (super.add(t.label), this.canvas.updateFieldsInView(t.label.id)), this.canvas.updateSectionsInView(t.id);
4286
4318
  }
4287
- else t instanceof It ? (t.label && (super.add(t.label), this.canvas.updateFieldsInView(t.label.id)), this.canvas.updatePortsInView(t.id)) : t instanceof gt && this.canvas.updateConnectionsInView(t.id);
4319
+ else t instanceof At ? (t.label && (super.add(t.label), this.canvas.updateFieldsInView(t.label.id)), this.canvas.updatePortsInView(t.id)) : t instanceof ut && this.canvas.updateConnectionsInView(t.id);
4288
4320
  }
4289
4321
  clear() {
4290
4322
  for (; this.entities.length > 0; ) {
@@ -4294,13 +4326,13 @@ class Oo extends yt {
4294
4326
  this.focus = void 0;
4295
4327
  }
4296
4328
  }
4297
- const Do = 1;
4298
- class Mi {
4329
+ const Uo = 1;
4330
+ class _i {
4299
4331
  export(t, e = !1) {
4300
4332
  const o = {
4301
4333
  name: t.name,
4302
4334
  type: t.type,
4303
- typeVersion: Do,
4335
+ typeVersion: Uo,
4304
4336
  createdAt: t.createdAt,
4305
4337
  updatedAt: t.updatedAt,
4306
4338
  nodes: [],
@@ -4334,8 +4366,8 @@ class Mi {
4334
4366
  p.push({
4335
4367
  id: f.id,
4336
4368
  type: (s = f.type) == null ? void 0 : s.id,
4337
- coords: Mt(f.coords),
4338
- connectionPoint: Mt(f.connectionPoint),
4369
+ coords: Nt(f.coords),
4370
+ connectionPoint: Nt(f.connectionPoint || f.coords),
4339
4371
  direction: f.direction,
4340
4372
  label: ((n = f.label) == null ? void 0 : n.text) || "",
4341
4373
  ...e ? {
@@ -4353,7 +4385,7 @@ class Mi {
4353
4385
  label: ((r = u.label) == null ? void 0 : r.text) || "",
4354
4386
  indexXInNode: u.indexXInNode,
4355
4387
  indexYInNode: u.indexYInNode,
4356
- coords: Mt(u.coords),
4388
+ coords: Nt(u.coords),
4357
4389
  width: u.width,
4358
4390
  height: u.height,
4359
4391
  ...e ? {
@@ -4371,8 +4403,8 @@ class Mi {
4371
4403
  l.push({
4372
4404
  id: u.id,
4373
4405
  type: (c = u.type) == null ? void 0 : c.id,
4374
- coords: Mt(u.coords),
4375
- connectionPoint: Mt(u.connectionPoint),
4406
+ coords: Nt(u.coords),
4407
+ connectionPoint: Nt(u.connectionPoint || u.coords),
4376
4408
  direction: u.direction,
4377
4409
  label: ((d = u.label) == null ? void 0 : d.text) || "",
4378
4410
  ...e ? {
@@ -4391,7 +4423,7 @@ class Mi {
4391
4423
  sections: a,
4392
4424
  ports: l,
4393
4425
  label: ((h = t.label) == null ? void 0 : h.text) || "",
4394
- coords: Mt(t.coords),
4426
+ coords: Nt(t.coords),
4395
4427
  width: t.width,
4396
4428
  height: t.height,
4397
4429
  data: t.valueSet.getValues(),
@@ -4440,20 +4472,20 @@ class Mi {
4440
4472
  } : {};
4441
4473
  }
4442
4474
  }
4443
- const Ho = "Diagram properties";
4444
- class Go extends yt {
4475
+ const Yo = "Diagram properties";
4476
+ class Xo extends bt {
4445
4477
  /**
4446
4478
  * Constructs a user selection object.
4447
4479
  * @public
4448
4480
  * @param canvas A canvas.
4449
4481
  */
4450
4482
  constructor(t) {
4451
- super(), this.canvas = t, this.canvas.propertyEditorChanges$.pipe(Hi(2e3)).subscribe(() => {
4483
+ super(), this.canvas = t, this.canvas.propertyEditorChanges$.pipe(Xi(2e3)).subscribe(() => {
4452
4484
  this.makeUpdateValuesAction();
4453
4485
  });
4454
4486
  }
4455
4487
  add(t) {
4456
- if (!this.contains(t.id) && (this.length === 0 ? this.propertyEditorSelection === void 0 && (t instanceof O || t instanceof gt) ? this.openInPropertyEditor(t) : this.propertyEditorSelection === void 0 && t instanceof X ? this.openInPropertyEditor(t.node) : this.openInPropertyEditor(void 0) : this.openInPropertyEditor(void 0), super.add(t), t.updateInView(), t instanceof O && t.sections))
4488
+ if (!this.contains(t.id) && (this.length === 0 ? this.propertyEditorSelection === void 0 && (t instanceof O || t instanceof ut) ? this.openInPropertyEditor(t) : this.propertyEditorSelection === void 0 && t instanceof X ? this.openInPropertyEditor(t.node) : this.openInPropertyEditor(void 0) : this.openInPropertyEditor(void 0), super.add(t), t.updateInView(), t instanceof O && t.sections))
4457
4489
  for (const e of t.sections)
4458
4490
  super.add(e), e.updateInView();
4459
4491
  }
@@ -4498,8 +4530,8 @@ class Go extends yt {
4498
4530
  if (this.length > 0) {
4499
4531
  const t = [], e = [], o = [], a = [], l = [];
4500
4532
  for (const n of this.all())
4501
- n instanceof O ? t.push(n.id) : n instanceof X ? e.push(n.id) : n instanceof It ? o.push(n.id) : n instanceof gt ? a.push(n.id) : n instanceof pt && l.push(n.id);
4502
- const s = new To(
4533
+ n instanceof O ? t.push(n.id) : n instanceof X ? e.push(n.id) : n instanceof At ? o.push(n.id) : n instanceof ut ? a.push(n.id) : n instanceof vt && l.push(n.id);
4534
+ const s = new zo(
4503
4535
  this.canvas,
4504
4536
  t,
4505
4537
  e,
@@ -4515,9 +4547,9 @@ class Go extends yt {
4515
4547
  * @public
4516
4548
  */
4517
4549
  copyToClipboard() {
4518
- const t = { type: "daga-user-selection", nodes: [], connections: [] }, e = new Mi();
4550
+ const t = { type: "daga-user-selection", nodes: [], connections: [] }, e = new _i();
4519
4551
  for (const o of this.all())
4520
- o instanceof O && t.nodes.push(e.exportNode(o, !1)), o instanceof gt && t.connections.push(
4552
+ o instanceof O && t.nodes.push(e.exportNode(o, !1)), o instanceof ut && t.connections.push(
4521
4553
  e.exportConnection(o, !1)
4522
4554
  );
4523
4555
  navigator.clipboard.writeText(JSON.stringify(t));
@@ -4539,7 +4571,7 @@ class Go extends yt {
4539
4571
  const o = JSON.parse(e);
4540
4572
  if (o.type !== "daga-user-selection")
4541
4573
  return;
4542
- const a = new $o(
4574
+ const a = new Ro(
4543
4575
  this.canvas,
4544
4576
  o.nodes,
4545
4577
  o.connections,
@@ -4568,25 +4600,25 @@ class Go extends yt {
4568
4600
  const a = t == null ? void 0 : t.valueSet;
4569
4601
  a ? (this.propertyEditorSelection = t, e && (this.propertyEditorValues = structuredClone(
4570
4602
  a.getValues()
4571
- )), o && (t instanceof O || t instanceof gt ? (t instanceof O ? t.name ? o.title = `${t.type.name}: ${t.name}` : o.title = t.type.name : t instanceof gt && (o.title = t.type.name), o.valueSet = void 0, o.valueSet = a) : (o.title = Ho, o.valueSet = void 0, o.valueSet = a))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, o && (o.title = "", o.valueSet = void 0));
4603
+ )), o && (t instanceof O || t instanceof ut ? (t instanceof O ? t.name ? o.title = `${t.type.name}: ${t.name}` : o.title = t.type.name : t instanceof ut && (o.title = t.type.name), o.valueSet = void 0, o.valueSet = a) : (o.title = Yo, o.valueSet = void 0, o.valueSet = a))) : (this.propertyEditorSelection = void 0, this.propertyEditorValues = void 0, o && (o.title = "", o.valueSet = void 0));
4572
4604
  }
4573
4605
  makeUpdateValuesAction() {
4574
4606
  var n, r, c;
4575
4607
  if (this.propertyEditorSelection === void 0 || this.propertyEditorValues === void 0)
4576
4608
  return;
4577
- const t = this.propertyEditorSelection instanceof $i ? void 0 : this.propertyEditorSelection.id;
4578
- if (Lt(
4609
+ const t = this.propertyEditorSelection instanceof Vi ? void 0 : this.propertyEditorSelection.id;
4610
+ if (Et(
4579
4611
  this.propertyEditorValues,
4580
4612
  (n = this.propertyEditorSelection) == null ? void 0 : n.valueSet.getValues()
4581
4613
  ))
4582
4614
  return;
4583
4615
  const e = this.propertyEditorValues, o = structuredClone(
4584
4616
  (r = this.propertyEditorSelection) == null ? void 0 : r.valueSet.getValues()
4585
- ), [a, l] = ki(
4617
+ ), [a, l] = xi(
4586
4618
  e,
4587
4619
  o,
4588
4620
  (c = this.propertyEditorSelection) == null ? void 0 : c.valueSet
4589
- ), s = new Eo(
4621
+ ), s = new Po(
4590
4622
  this.canvas,
4591
4623
  t,
4592
4624
  a,
@@ -4595,10 +4627,10 @@ class Go extends yt {
4595
4627
  s.do(), this.canvas.actionStack.add(s), this.propertyEditorValues = o;
4596
4628
  }
4597
4629
  }
4598
- const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4599
- const o = Bo(e), a = Math.sin(o), l = Math.cos(o), s = (Math.abs(i * l) - Math.abs(t * a)) / (l * l - a * a), n = (Math.abs(i * a) - Math.abs(t * l)) / (a * a - l * l);
4630
+ const jo = (i) => i * Math.PI / 180, bi = (i, t, e) => {
4631
+ const o = jo(e), a = Math.sin(o), l = Math.cos(o), s = (Math.abs(i * l) - Math.abs(t * a)) / (l * l - a * a), n = (Math.abs(i * a) - Math.abs(t * l)) / (a * a - l * l);
4600
4632
  return [s, n];
4601
- }, Fo = 12, B = 6, Uo = 25, me = "diagram-connection-unfinished", Jt = class Jt {
4633
+ }, Wo = 12, G = 6, Zo = 25, pe = "diagram-connection-unfinished", ee = class ee {
4602
4634
  /**
4603
4635
  * Constructs a canvas object.
4604
4636
  * @public
@@ -4606,22 +4638,22 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4606
4638
  * @param config The configuration object used to set the parameters of this canvas.
4607
4639
  */
4608
4640
  constructor(t, e) {
4609
- var o, a, l, s, n, r, c, d, h, u, p, f, m, g, v, w, y, A, I, E, $, C, R, T, z, j, D, q, G;
4610
- if (this.backgroundPatternId = `daga-background-pattern-id-${Jt.canvasCount++}`, this.zoomTransform = N.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Xt(), this.diagramChange$ = new Xt(), this.diagramEvent$ = new Xt(), this.propertyEditorChanges$ = new Xt(), this.parentComponent = t, this.model = new $i(
4641
+ var o, a, l, s, n, r, c, d, h, u, p, f, m, g, v, w, y, A, I, E, $, C, R, T, z, j, D, q, H;
4642
+ if (this.backgroundPatternId = `daga-background-pattern-id-${ee.canvasCount++}`, this.zoomTransform = N.zoomIdentity, this.draggingFrom = [0, 0], this.dragging = !1, this.secondaryButton = !1, this.validatorChange$ = new Zt(), this.diagramChange$ = new Zt(), this.diagramEvent$ = new Zt(), this.propertyEditorChanges$ = new Zt(), this.parentComponent = t, this.model = new Vi(
4611
4643
  this,
4612
4644
  void 0,
4613
4645
  e.name || "unnamed",
4614
4646
  "",
4615
4647
  e.type || "",
4616
4648
  e.properties || []
4617
- ), this.userSelection = new Go(this), this.userHighlight = new Oo(
4649
+ ), this.userSelection = new Xo(this), this.userHighlight = new Bo(
4618
4650
  this,
4619
4651
  ((o = e.canvas) == null ? void 0 : o.highlightSections) !== !1
4620
- ), this.contextMenu = new _o(this, (a = e.canvas) == null ? void 0 : a.contextMenu), this.backgroundColor = ((l = e.canvas) == null ? void 0 : l.backgroundColor) || "#FFFFFF", this.gridStyle = ((n = (s = e.canvas) == null ? void 0 : s.grid) == null ? void 0 : n.style) ?? Ot.style, this.gridSize = ((c = (r = e.canvas) == null ? void 0 : r.grid) == null ? void 0 : c.enabled) === !1 || ((d = e.canvas) == null ? void 0 : d.grid) === void 0 ? 0 : Math.abs(((u = (h = e.canvas) == null ? void 0 : h.grid) == null ? void 0 : u.spacing) || Ot.spacing), this.gridThickness = Math.abs(
4621
- ((f = (p = e.canvas) == null ? void 0 : p.grid) == null ? void 0 : f.thickness) || Ot.thickness
4622
- ), this.gridColor = ((g = (m = e.canvas) == null ? void 0 : m.grid) == null ? void 0 : g.color) || Ot.color, this.snapToGrid = ((w = (v = e.canvas) == null ? void 0 : v.grid) == null ? void 0 : w.enabled) === !1 || ((y = e.canvas) == null ? void 0 : y.grid) === void 0 ? !1 : ((I = (A = e.canvas) == null ? void 0 : A.grid) == null ? void 0 : I.snap) || Ot.snap, this.zoomFactor = ((E = e.canvas) == null ? void 0 : E.zoomFactor) || 2, this.panRate = (($ = e.canvas) == null ? void 0 : $.panRate) || 100, this.inferConnectionType = ((C = e.connectionSettings) == null ? void 0 : C.inferConnectionType) || !1, this.autoTightenConnections = ((R = e.connectionSettings) == null ? void 0 : R.autoTighten) !== !1, this.allowConnectionLoops = ((T = e.connectionSettings) == null ? void 0 : T.allowLoops) || !1, this.allowSharingPorts = ((z = e.connectionSettings) == null ? void 0 : z.sharePorts) !== !1, this.allowSharingBothPorts = ((j = e.connectionSettings) == null ? void 0 : j.shareBothPorts) || !1, this.portHighlightRadius = ((D = e.connectionSettings) == null ? void 0 : D.portHighlightRadius) || 100, this.multipleSelectionOn = !1, this.priorityThresholds = ((q = e.canvas) == null ? void 0 : q.priorityThresholds) || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = e.layoutFormat, this.userActions = e.userActions || {}, this.validators = [], this.actionStack = new Ao(this, Uo), this.collabEngine = new Io(this), e.nodeTypes)
4652
+ ), this.contextMenu = new Go(this, (a = e.canvas) == null ? void 0 : a.contextMenu), this.backgroundColor = ((l = e.canvas) == null ? void 0 : l.backgroundColor) || "#FFFFFF", this.gridStyle = ((n = (s = e.canvas) == null ? void 0 : s.grid) == null ? void 0 : n.style) ?? Ht.style, this.gridSize = ((c = (r = e.canvas) == null ? void 0 : r.grid) == null ? void 0 : c.enabled) === !1 || ((d = e.canvas) == null ? void 0 : d.grid) === void 0 ? 0 : Math.abs(((u = (h = e.canvas) == null ? void 0 : h.grid) == null ? void 0 : u.spacing) || Ht.spacing), this.gridThickness = Math.abs(
4653
+ ((f = (p = e.canvas) == null ? void 0 : p.grid) == null ? void 0 : f.thickness) || Ht.thickness
4654
+ ), this.gridColor = ((g = (m = e.canvas) == null ? void 0 : m.grid) == null ? void 0 : g.color) || Ht.color, this.snapToGrid = ((w = (v = e.canvas) == null ? void 0 : v.grid) == null ? void 0 : w.enabled) === !1 || ((y = e.canvas) == null ? void 0 : y.grid) === void 0 ? !1 : ((I = (A = e.canvas) == null ? void 0 : A.grid) == null ? void 0 : I.snap) || Ht.snap, this.zoomFactor = ((E = e.canvas) == null ? void 0 : E.zoomFactor) || 2, this.panRate = (($ = e.canvas) == null ? void 0 : $.panRate) || 100, this.inferConnectionType = ((C = e.connectionSettings) == null ? void 0 : C.inferConnectionType) || !1, this.autoTightenConnections = ((R = e.connectionSettings) == null ? void 0 : R.autoTighten) !== !1, this.allowConnectionLoops = ((T = e.connectionSettings) == null ? void 0 : T.allowLoops) || !1, this.allowSharingPorts = ((z = e.connectionSettings) == null ? void 0 : z.sharePorts) !== !1, this.allowSharingBothPorts = ((j = e.connectionSettings) == null ? void 0 : j.shareBothPorts) || !1, this.portHighlightRadius = ((D = e.connectionSettings) == null ? void 0 : D.portHighlightRadius) || 100, this.multipleSelectionOn = !1, this.priorityThresholds = ((q = e.canvas) == null ? void 0 : q.priorityThresholds) || [], this.priorityThreshold = this.priorityThresholds ? this.priorityThresholds[0] : void 0, this.layoutFormat = e.layoutFormat, this.userActions = e.userActions || {}, this.validators = [], this.actionStack = new $o(this, Zo), this.collabEngine = new To(this), e.nodeTypes)
4623
4655
  for (const Y of e.nodeTypes) {
4624
- const W = new Si({
4656
+ const W = new Ti({
4625
4657
  ...e.nodeTypeDefaults,
4626
4658
  ...Y
4627
4659
  });
@@ -4629,7 +4661,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4629
4661
  }
4630
4662
  if (e.portTypes)
4631
4663
  for (const Y of e.portTypes) {
4632
- const W = new Co({
4664
+ const W = new Lo({
4633
4665
  ...e.portTypeDefaults,
4634
4666
  ...Y
4635
4667
  });
@@ -4637,13 +4669,13 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4637
4669
  }
4638
4670
  if (e.connectionTypes) {
4639
4671
  for (const Y of e.connectionTypes) {
4640
- const W = new wi({
4672
+ const W = new Li({
4641
4673
  ...e.connectionTypeDefaults,
4642
4674
  ...Y
4643
4675
  });
4644
4676
  this.model.connections.types.add(W);
4645
4677
  }
4646
- this._connectionType = ((G = e == null ? void 0 : e.connectionSettings) == null ? void 0 : G.defaultConnection) !== void 0 ? this.model.connections.types.get(
4678
+ this._connectionType = ((H = e == null ? void 0 : e.connectionSettings) == null ? void 0 : H.defaultConnection) !== void 0 ? this.model.connections.types.get(
4647
4679
  e.connectionSettings.defaultConnection
4648
4680
  ) : void 0;
4649
4681
  }
@@ -4685,10 +4717,10 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4685
4717
  a.preventDefault(), a.stopPropagation(), this.dragging = !1;
4686
4718
  return;
4687
4719
  }
4688
- const l = new wt(a, null);
4720
+ const l = new Ct(a, null);
4689
4721
  this.diagramEvent$.next(l), !l.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (a.preventDefault(), this.contextMenu.open(a));
4690
4722
  }).on(L.DoubleClick, (a) => {
4691
- const l = new kt(a, null);
4723
+ const l = new wt(a, null);
4692
4724
  this.diagramEvent$.next(l);
4693
4725
  }).on(L.KeyDown, (a) => {
4694
4726
  if (!a.ctrlKey && (a.key === it.Delete || a.key === it.Backspace) && this.canUserPerformAction(S.Remove) && (this.userSelection.removeFromModel(), this.cancelAllUserActions()), a.ctrlKey && a.key === "a") {
@@ -4698,7 +4730,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4698
4730
  for (const l of this.model.connections)
4699
4731
  this.userSelection.add(l);
4700
4732
  this.diagramEvent$.next(
4701
- new F(this.userSelection.all(), !0)
4733
+ new B(this.userSelection.all(), !0)
4702
4734
  );
4703
4735
  }
4704
4736
  if (a.ctrlKey && a.key === "i") {
@@ -4709,9 +4741,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4709
4741
  for (const n of this.model.connections)
4710
4742
  this.userSelection.toggle(n), n.selected ? l.push(n) : s.push(n);
4711
4743
  l.length > 0 && this.diagramEvent$.next(
4712
- new F(l, !0)
4744
+ new B(l, !0)
4713
4745
  ), s.length > 0 && this.diagramEvent$.next(
4714
- new F(s, !1)
4746
+ new B(s, !1)
4715
4747
  );
4716
4748
  }
4717
4749
  if (a.ctrlKey && a.key === "c" && this.canUserPerformAction(S.Clipboard) && (a.preventDefault(), this.userSelection.copyToClipboard(), this.cancelAllUserActions()), a.ctrlKey && a.key === "x" && this.canUserPerformAction(S.Clipboard) && this.canUserPerformAction(S.Remove) && (a.preventDefault(), this.userSelection.cutToClipboard(), this.cancelAllUserActions()), a.ctrlKey && a.key === "v" && this.canUserPerformAction(S.Paste)) {
@@ -4728,7 +4760,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4728
4760
  });
4729
4761
  const o = this.selectSVGElement().append("g").attr("class", "daga-canvas-view").attr("width", "100%").attr("height", "100%");
4730
4762
  o.call(
4731
- this.zoomBehavior = N.zoom().filter((a) => a.type !== L.DoubleClick).on(fe.Zoom, (a) => {
4763
+ this.zoomBehavior = N.zoom().filter((a) => a.type !== L.DoubleClick).on(ve.Zoom, (a) => {
4732
4764
  if (a.sourceEvent) {
4733
4765
  if (!this.canUserPerformAction(S.Zoom)) {
4734
4766
  x(P.NotAllowed);
@@ -4742,7 +4774,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4742
4774
  "patternTransform",
4743
4775
  l
4744
4776
  ), this.contextMenu.close();
4745
- }).on(fe.End, () => {
4777
+ }).on(ve.End, () => {
4746
4778
  x();
4747
4779
  })
4748
4780
  ), o.append("rect").attr("x", 0).attr("y", 0).attr("width", "100%").attr("height", "100%").attr("fill", this.backgroundColor).attr("stroke-width", "0").on(L.MouseMove, (a) => {
@@ -4756,18 +4788,21 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4756
4788
  if (this.userHighlight.size() > 0 && (this.userHighlight.clear(), this.diagramEvent$.next(new ot(null))), this.contextMenu.close(), this.userSelection.size() > 0) {
4757
4789
  const a = this.userSelection.all();
4758
4790
  this.userSelection.clear(), this.diagramEvent$.next(
4759
- new F(a, !1)
4791
+ new B(a, !1)
4760
4792
  ), this.userSelection.openInPropertyEditor(this.model);
4761
4793
  }
4762
4794
  }).call(
4763
- N.drag().filter((a) => this.multipleSelectionOn || Ct(a)).on(M.Start, (a) => {
4795
+ N.drag().filter((a) => this.multipleSelectionOn || St(a)).on(M.Start, (a) => {
4764
4796
  this.startMultipleSelection(a);
4765
4797
  }).on(M.Drag, (a) => {
4766
4798
  this.continueMultipleSelection(a);
4767
4799
  }).on(M.End, (a) => {
4768
4800
  this.finishMultipleSelection(a);
4769
4801
  })
4770
- ), zo(this, o, this.backgroundPatternId), o.append("g").attr("class", "daga-canvas-elements");
4802
+ ), Do(this, o, this.backgroundPatternId), o.append("g").attr("class", "daga-canvas-elements");
4803
+ }
4804
+ getZoomLevel() {
4805
+ return this.zoomTransform.k;
4771
4806
  }
4772
4807
  zoomBy(t) {
4773
4808
  isNaN(t) || this.zoomBehavior.scaleBy(this.selectCanvasView(), t);
@@ -4775,6 +4810,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4775
4810
  zoomTo(t) {
4776
4811
  isNaN(t) || this.zoomBehavior.scaleTo(this.selectCanvasView(), t);
4777
4812
  }
4813
+ getViewCoordinates() {
4814
+ return [this.zoomTransform.x, this.zoomTransform.y];
4815
+ }
4778
4816
  translateBy(t, e) {
4779
4817
  !isNaN(t) && !isNaN(e) && this.zoomBehavior.translateBy(this.selectCanvasView(), t, e);
4780
4818
  }
@@ -4875,31 +4913,31 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4875
4913
  if (!s.ctrlKey && !s.shiftKey) {
4876
4914
  const r = this.userSelection.all();
4877
4915
  this.userSelection.clear(), this.diagramEvent$.next(
4878
- new F(r, !1)
4916
+ new B(r, !1)
4879
4917
  );
4880
4918
  }
4881
- this.userSelection.toggle(n), this.diagramEvent$.next(new F([n], n.selected));
4919
+ this.userSelection.toggle(n), this.diagramEvent$.next(new B([n], n.selected));
4882
4920
  }).on(L.ContextMenu, (s, n) => {
4883
4921
  if (this.dragging) {
4884
4922
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
4885
4923
  return;
4886
4924
  }
4887
- const r = new wt(s, n);
4888
- this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (s.preventDefault(), this.userHighlight.focusOn(n), this.diagramEvent$.next(new ot(n)), this.userSelection.add(n), this.diagramEvent$.next(new F([n], !0)), this.contextMenu.open(s));
4925
+ const r = new Ct(s, n);
4926
+ this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (s.preventDefault(), this.userHighlight.focusOn(n), this.diagramEvent$.next(new ot(n)), this.userSelection.add(n), this.diagramEvent$.next(new B([n], !0)), this.contextMenu.open(s));
4889
4927
  }).on(L.DoubleClick, (s, n) => {
4890
- const r = new kt(s, n);
4928
+ const r = new wt(s, n);
4891
4929
  this.diagramEvent$.next(r);
4892
4930
  }).call(
4893
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s, n) => {
4931
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s, n) => {
4894
4932
  this.multipleSelectionOn || this.secondaryButton ? this.startMultipleSelection(s) : this.startMovingNode(s, n);
4895
4933
  }).on(M.Drag, (s, n) => {
4896
4934
  this.multipleSelectionOn || this.secondaryButton ? this.continueMultipleSelection(s) : this.continueMovingNode(s, n);
4897
4935
  }).on(M.End, (s, n) => {
4898
4936
  this.multipleSelectionOn || this.secondaryButton ? this.finishMultipleSelection(s) : this.finishMovingNode(s, n), this.secondaryButton = !1;
4899
4937
  })
4900
- ), ge(
4938
+ ), me(
4901
4939
  a
4902
- ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
4940
+ ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
4903
4941
  this.canUserPerformAction(S.StretchNode) && n.type.resizableX && !n.removed && x(P.EWResize);
4904
4942
  }).on(L.MouseOut, (s, n) => {
4905
4943
  this.canUserPerformAction(S.StretchNode) && n.type.resizableX && !n.removed && x();
@@ -4924,7 +4962,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4924
4962
  }
4925
4963
  x();
4926
4964
  })
4927
- ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
4965
+ ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
4928
4966
  this.canUserPerformAction(S.StretchNode) && n.type.resizableY && !n.removed && x(P.NSResize);
4929
4967
  }).on(L.MouseOut, (s, n) => {
4930
4968
  this.canUserPerformAction(S.StretchNode) && n.type.resizableY && !n.removed && x();
@@ -4949,7 +4987,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4949
4987
  }
4950
4988
  x();
4951
4989
  })
4952
- ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
4990
+ ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
4953
4991
  this.canUserPerformAction(S.StretchNode) && n.type.resizableX && !n.removed && x(P.EWResize);
4954
4992
  }).on(L.MouseOut, (s, n) => {
4955
4993
  this.canUserPerformAction(S.StretchNode) && n.type.resizableX && !n.removed && x();
@@ -4974,7 +5012,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
4974
5012
  }
4975
5013
  x();
4976
5014
  })
4977
- ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
5015
+ ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
4978
5016
  this.canUserPerformAction(S.StretchNode) && n.type.resizableY && !n.removed && x(P.NSResize);
4979
5017
  }).on(L.MouseOut, (s, n) => {
4980
5018
  this.canUserPerformAction(S.StretchNode) && n.type.resizableY && !n.removed && x();
@@ -5005,9 +5043,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5005
5043
  }
5006
5044
  x();
5007
5045
  })
5008
- ), l.attr("transform", (s) => `translate(${s.coords[0]},${s.coords[1]})`).attr("opacity", (s) => s.removed ? 0.5 : 1), ue(
5046
+ ), l.attr("transform", (s) => `translate(${s.coords[0]},${s.coords[1]})`).attr("opacity", (s) => s.removed ? 0.5 : 1), fe(
5009
5047
  l
5010
- ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", B / 2).attr("x2", B / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", B / 2).attr("y2", B / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (s) => s.width - B / 2).attr("x2", (s) => s.width - B / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", (s) => s.height - B / 2).attr("y2", (s) => s.height - B / 2);
5048
+ ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", G / 2).attr("x2", G / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", G / 2).attr("y2", G / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (s) => s.width - G / 2).attr("x2", (s) => s.width - G / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", (s) => s.height - G / 2).attr("y2", (s) => s.height - G / 2);
5011
5049
  }
5012
5050
  updateSectionsInView(...t) {
5013
5051
  let e = this.selectCanvasElements().selectAll("g.diagram-section").data(
@@ -5031,12 +5069,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5031
5069
  if (!s.ctrlKey && !s.shiftKey) {
5032
5070
  const c = this.userSelection.all();
5033
5071
  this.userSelection.clear(), this.diagramEvent$.next(
5034
- new F(c, !1)
5072
+ new B(c, !1)
5035
5073
  );
5036
5074
  }
5037
- const r = ft(n);
5075
+ const r = pt(n);
5038
5076
  this.userSelection.toggle(r), this.diagramEvent$.next(
5039
- new F(
5077
+ new B(
5040
5078
  [r],
5041
5079
  r.selected
5042
5080
  )
@@ -5046,19 +5084,19 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5046
5084
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
5047
5085
  return;
5048
5086
  }
5049
- const r = new wt(s, n);
5087
+ const r = new Ct(s, n);
5050
5088
  if (this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu)) {
5051
5089
  s.preventDefault();
5052
- const c = ft(n);
5090
+ const c = pt(n);
5053
5091
  this.userHighlight.focusOn(c), this.diagramEvent$.next(new ot(c)), this.userSelection.add(c), this.diagramEvent$.next(
5054
- new F([c], !0)
5092
+ new B([c], !0)
5055
5093
  ), this.contextMenu.open(s);
5056
5094
  }
5057
5095
  }).on(L.DoubleClick, (s, n) => {
5058
- const r = new kt(s, n);
5096
+ const r = new wt(s, n);
5059
5097
  this.diagramEvent$.next(r);
5060
5098
  }).call(
5061
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s, n) => {
5099
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s, n) => {
5062
5100
  if (this.multipleSelectionOn || this.secondaryButton)
5063
5101
  this.startMultipleSelection(s);
5064
5102
  else {
@@ -5081,9 +5119,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5081
5119
  }
5082
5120
  this.secondaryButton = !1;
5083
5121
  })
5084
- ), ge(
5122
+ ), me(
5085
5123
  a
5086
- ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
5124
+ ), a.filter(".resizable-x").append("line").attr("class", "left-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
5087
5125
  this.canUserPerformAction(S.StretchSection) && n.getResizableX() && !n.removed && x(P.EWResize);
5088
5126
  }).on(L.MouseOut, (s, n) => {
5089
5127
  this.canUserPerformAction(S.StretchSection) && n.getResizableX() && !n.removed && x();
@@ -5118,7 +5156,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5118
5156
  }
5119
5157
  x();
5120
5158
  })
5121
- ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
5159
+ ), a.filter(".resizable-y").append("line").attr("class", "top-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
5122
5160
  this.canUserPerformAction(S.StretchSection) && n.getResizableY() && !n.removed && x(P.NSResize);
5123
5161
  }).on(L.MouseOut, (s, n) => {
5124
5162
  this.canUserPerformAction(S.StretchSection) && n.getResizableY() && !n.removed && x();
@@ -5153,7 +5191,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5153
5191
  }
5154
5192
  x();
5155
5193
  })
5156
- ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
5194
+ ), a.filter(".resizable-x").append("line").attr("class", "right-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
5157
5195
  this.canUserPerformAction(S.StretchSection) && n.getResizableX() && !n.removed && x(P.EWResize);
5158
5196
  }).on(L.MouseOut, (s, n) => {
5159
5197
  this.canUserPerformAction(S.StretchSection) && n.getResizableX() && !n.removed && x();
@@ -5188,7 +5226,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5188
5226
  }
5189
5227
  x();
5190
5228
  })
5191
- ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${B}px`).on(L.MouseOver, (s, n) => {
5229
+ ), a.filter(".resizable-y").append("line").attr("class", "bottom-resizer").attr("stroke", "transparent").attr("stroke-width", `${G}px`).on(L.MouseOver, (s, n) => {
5192
5230
  this.canUserPerformAction(S.StretchSection) && n.getResizableY() && !n.removed && x(P.NSResize);
5193
5231
  }).on(L.MouseOut, (s, n) => {
5194
5232
  this.canUserPerformAction(S.StretchSection) && n.getResizableY() && !n.removed && x();
@@ -5223,9 +5261,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5223
5261
  }
5224
5262
  x();
5225
5263
  })
5226
- ), l.attr("transform", (s) => `translate(${s.coords[0]},${s.coords[1]})`).attr("opacity", (s) => s.removed ? 0.5 : 1), ue(
5264
+ ), l.attr("transform", (s) => `translate(${s.coords[0]},${s.coords[1]})`).attr("opacity", (s) => s.removed ? 0.5 : 1), fe(
5227
5265
  l
5228
- ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", B / 2).attr("x2", B / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", B / 2).attr("y2", B / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (s) => s.width - B / 2).attr("x2", (s) => s.width - B / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", (s) => s.height - B / 2).attr("y2", (s) => s.height - B / 2);
5266
+ ), l.filter(".resizable-x").select("line.left-resizer").attr("x1", G / 2).attr("x2", G / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.top-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", G / 2).attr("y2", G / 2), l.filter(".resizable-x").select("line.right-resizer").attr("x1", (s) => s.width - G / 2).attr("x2", (s) => s.width - G / 2).attr("y1", 0).attr("y2", (s) => s.height), l.filter(".resizable-y").select("line.bottom-resizer").attr("x1", 0).attr("x2", (s) => s.width).attr("y1", (s) => s.height - G / 2).attr("y2", (s) => s.height - G / 2);
5229
5267
  }
5230
5268
  updatePortsInView(...t) {
5231
5269
  let e = this.selectCanvasElements().selectAll("g.diagram-port").data(
@@ -5258,12 +5296,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5258
5296
  if (!s.ctrlKey && !s.shiftKey) {
5259
5297
  const c = this.userSelection.all();
5260
5298
  this.userSelection.clear(), this.diagramEvent$.next(
5261
- new F(c, !1)
5299
+ new B(c, !1)
5262
5300
  );
5263
5301
  }
5264
- const r = ft(n);
5302
+ const r = pt(n);
5265
5303
  this.userSelection.toggle(r), this.diagramEvent$.next(
5266
- new F(
5304
+ new B(
5267
5305
  [r],
5268
5306
  r.selected
5269
5307
  )
@@ -5273,19 +5311,19 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5273
5311
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
5274
5312
  return;
5275
5313
  }
5276
- const r = new wt(s, n);
5314
+ const r = new Ct(s, n);
5277
5315
  if (this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu)) {
5278
5316
  s.preventDefault();
5279
- const c = ft(n);
5317
+ const c = pt(n);
5280
5318
  this.userHighlight.focusOn(c), this.diagramEvent$.next(new ot(c)), this.userSelection.add(c), this.diagramEvent$.next(
5281
- new F([c], !0)
5319
+ new B([c], !0)
5282
5320
  ), this.contextMenu.open(s);
5283
5321
  }
5284
5322
  }).on(L.DoubleClick, (s, n) => {
5285
- const r = new kt(s, n);
5323
+ const r = new wt(s, n);
5286
5324
  this.diagramEvent$.next(r);
5287
5325
  }).call(
5288
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s, n) => {
5326
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s, n) => {
5289
5327
  this.multipleSelectionOn || this.secondaryButton ? this.startMultipleSelection(s) : this.canUserPerformAction(S.AddConnection) && (this.allowSharingPorts || n.incomingConnections.length === 0 && n.outgoingConnections.length === 0) && !n.removed ? (x(P.Grabbing), this.startConnection(n), this.unfinishedConnection && (this.unfinishedConnectionTracer = this.selectCanvasElements().append("path").attr("stroke", "none").attr("fill", "none"))) : x(P.NotAllowed);
5290
5328
  }).on(M.Drag, (s, n) => {
5291
5329
  var r, c, d, h;
@@ -5295,13 +5333,13 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5295
5333
  const u = [s.x, s.y];
5296
5334
  (d = this.unfinishedConnectionTracer) == null || d.attr(
5297
5335
  "d",
5298
- he(
5299
- this.unfinishedConnection.look.shape,
5336
+ ue(
5337
+ this.unfinishedConnection.look.shape || st.look.shape,
5300
5338
  this.unfinishedConnection.startCoords,
5301
5339
  u,
5302
5340
  this.unfinishedConnection.startDirection,
5303
5341
  this.unfinishedConnection.endDirection,
5304
- this.unfinishedConnection.look.thickness,
5342
+ this.unfinishedConnection.look.thickness || st.look.thickness,
5305
5343
  (r = this.unfinishedConnection.startMarkerLook) == null ? void 0 : r.width,
5306
5344
  (c = this.unfinishedConnection.endMarkerLook) == null ? void 0 : c.width
5307
5345
  )
@@ -5320,7 +5358,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5320
5358
  ];
5321
5359
  } else
5322
5360
  this.unfinishedConnection.endCoords = u;
5323
- if (this.updateConnectionsInView(me), this.model.ports.length > 0) {
5361
+ if (this.updateConnectionsInView(pe), this.model.ports.length > 0) {
5324
5362
  const f = this.getPointerLocationRelativeToCanvas(s);
5325
5363
  let m = Number.POSITIVE_INFINITY, g;
5326
5364
  for (const v of this.model.ports) {
@@ -5338,11 +5376,11 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5338
5376
  if (this.canUserPerformAction(S.AddConnection) && !n.removed) {
5339
5377
  (r = this.unfinishedConnectionTracer) == null || r.remove();
5340
5378
  const c = this.userHighlight.getFocus();
5341
- if (c instanceof It)
5379
+ if (c instanceof At)
5342
5380
  this.finishConnection(c);
5343
- else if (c instanceof pt && c.rootElement instanceof It)
5381
+ else if (c instanceof vt && c.rootElement instanceof At)
5344
5382
  this.finishConnection(c.rootElement);
5345
- else if (c instanceof O || c instanceof X || c instanceof pt) {
5383
+ else if (c instanceof O || c instanceof X || c instanceof vt) {
5346
5384
  let d;
5347
5385
  if (c instanceof O || c instanceof X)
5348
5386
  d = c;
@@ -5364,12 +5402,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5364
5402
  }
5365
5403
  this.secondaryButton = !1;
5366
5404
  })
5367
- ), a.filter(".image-look").append("image"), ge(
5405
+ ), a.filter(".image-look").append("image"), me(
5368
5406
  a
5369
5407
  ), l.attr(
5370
5408
  "transform",
5371
5409
  (s) => `translate(${s.coords[0] - s.width / 2},${s.coords[1] - s.width / 2})`
5372
- ).attr("opacity", (s) => s.removed ? 0.5 : 1), ue(
5410
+ ).attr("opacity", (s) => s.removed ? 0.5 : 1), fe(
5373
5411
  l
5374
5412
  );
5375
5413
  }
@@ -5388,22 +5426,22 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5388
5426
  if (!n.ctrlKey && !n.shiftKey) {
5389
5427
  const c = this.userSelection.all();
5390
5428
  this.userSelection.clear(), this.diagramEvent$.next(
5391
- new F(c, !1)
5429
+ new B(c, !1)
5392
5430
  );
5393
5431
  }
5394
- this.userSelection.toggle(r), this.diagramEvent$.next(new F([r], r.selected));
5432
+ this.userSelection.toggle(r), this.diagramEvent$.next(new B([r], r.selected));
5395
5433
  }).on(L.ContextMenu, (n, r) => {
5396
5434
  if (this.dragging) {
5397
5435
  n.preventDefault(), n.stopPropagation(), this.dragging = !1;
5398
5436
  return;
5399
5437
  }
5400
- const c = new wt(n, r);
5401
- this.diagramEvent$.next(c), !c.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (n.preventDefault(), this.userHighlight.focusOn(r), this.diagramEvent$.next(new ot(r)), this.userSelection.add(r), this.diagramEvent$.next(new F([r], !0)), this.contextMenu.open(n));
5438
+ const c = new Ct(n, r);
5439
+ this.diagramEvent$.next(c), !c.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (n.preventDefault(), this.userHighlight.focusOn(r), this.diagramEvent$.next(new ot(r)), this.userSelection.add(r), this.diagramEvent$.next(new B([r], !0)), this.contextMenu.open(n));
5402
5440
  }).on(L.DoubleClick, (n, r) => {
5403
- const c = new kt(n, r);
5441
+ const c = new wt(n, r);
5404
5442
  this.diagramEvent$.next(c);
5405
5443
  }).call(
5406
- N.drag().filter((n) => (this.secondaryButton = Ct(n), !0)).on(M.Start, (n) => {
5444
+ N.drag().filter((n) => (this.secondaryButton = St(n), !0)).on(M.Start, (n) => {
5407
5445
  this.startMultipleSelection(n);
5408
5446
  }).on(M.Drag, (n) => {
5409
5447
  this.continueMultipleSelection(n);
@@ -5414,41 +5452,50 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5414
5452
  "d",
5415
5453
  (n) => {
5416
5454
  var r, c;
5417
- return he(
5418
- n.look.shape,
5455
+ return ue(
5456
+ n.look.shape || st.look.shape,
5419
5457
  n.startCoords,
5420
5458
  n.endCoords,
5421
5459
  n.startDirection,
5422
5460
  n.endDirection,
5423
- n.look.thickness,
5461
+ n.look.thickness || st.look.thickness,
5424
5462
  (r = n.startMarkerLook) == null ? void 0 : r.width,
5425
5463
  (c = n.endMarkerLook) == null ? void 0 : c.width
5426
5464
  );
5427
5465
  }
5428
- ).attr("marker-start", (n) => `url(#${n.id}-start-marker)`).attr("marker-end", (n) => `url(#${n.id}-end-marker)`).attr("stroke", (n) => n.look.color).attr("stroke-width", (n) => `${n.look.thickness}px`).attr(
5466
+ ).attr("marker-start", (n) => `url(#${n.id}-start-marker)`).attr("marker-end", (n) => `url(#${n.id}-end-marker)`).attr(
5467
+ "stroke",
5468
+ (n) => n.look.color || st.look.color
5469
+ ).attr("stroke-width", (n) => `${n.look.thickness}px`).attr(
5429
5470
  "stroke-dasharray",
5430
- (n) => oi(n.look.style, n.look.thickness)
5471
+ (n) => be(
5472
+ n.look.style || st.look.style,
5473
+ n.look.thickness || st.look.thickness
5474
+ )
5431
5475
  ).attr("fill", "none"), s.select("path.diagram-connection-path-box").attr(
5432
5476
  "d",
5433
5477
  (n) => {
5434
5478
  var r, c;
5435
- return he(
5436
- n.look.shape,
5479
+ return ue(
5480
+ n.look.shape || st.look.shape,
5437
5481
  n.startCoords,
5438
5482
  n.endCoords,
5439
5483
  n.startDirection,
5440
5484
  n.endDirection,
5441
- n.look.thickness,
5485
+ n.look.thickness || st.look.thickness,
5442
5486
  (r = n.startMarkerLook) == null ? void 0 : r.width,
5443
5487
  (c = n.endMarkerLook) == null ? void 0 : c.width
5444
5488
  );
5445
5489
  }
5446
5490
  ).attr("stroke", "transparent").attr("pointer-events", "stroke").attr(
5447
5491
  "stroke-width",
5448
- (n) => `${n.look.thickness + Fo}px`
5492
+ (n) => `${(n.look.thickness || st.look.thickness) + Wo}px`
5449
5493
  ).attr(
5450
5494
  "stroke-dasharray",
5451
- (n) => oi(n.look.style, n.look.thickness)
5495
+ (n) => be(
5496
+ n.look.style || st.look.style,
5497
+ n.look.thickness || st.look.thickness
5498
+ )
5452
5499
  ).attr("fill", "none"), s.data().forEach((n) => {
5453
5500
  this.updateConnectionLabelsInView(n), this.updateConnectionMarkersInView(n);
5454
5501
  });
@@ -5471,12 +5518,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5471
5518
  if (!s.ctrlKey && !s.shiftKey) {
5472
5519
  const c = this.userSelection.all();
5473
5520
  this.userSelection.clear(), this.diagramEvent$.next(
5474
- new F(c, !1)
5521
+ new B(c, !1)
5475
5522
  );
5476
5523
  }
5477
- const r = ft(n);
5524
+ const r = pt(n);
5478
5525
  this.userSelection.toggle(r), this.diagramEvent$.next(
5479
- new F(
5526
+ new B(
5480
5527
  [r],
5481
5528
  r.selected
5482
5529
  )
@@ -5486,32 +5533,32 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5486
5533
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
5487
5534
  return;
5488
5535
  }
5489
- const r = new wt(s, n);
5536
+ const r = new Ct(s, n);
5490
5537
  if (this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu)) {
5491
5538
  s.preventDefault();
5492
- const c = ft(n);
5539
+ const c = pt(n);
5493
5540
  this.userHighlight.focusOn(c), this.diagramEvent$.next(new ot(c)), this.userSelection.add(c), this.diagramEvent$.next(
5494
- new F([c], !0)
5541
+ new B([c], !0)
5495
5542
  ), this.contextMenu.open(s);
5496
5543
  }
5497
5544
  }).on(L.DoubleClick, (s, n) => {
5498
- const r = new kt(s, n);
5499
- this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.EditField) && n.editable && !n.removed && (this.currentAction = new di(this, n.id, n.text, ""), this.createInputField(
5545
+ const r = new wt(s, n);
5546
+ this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.EditField) && n.editable && !n.removed && (this.currentAction = new vi(this, n.id, n.text, ""), this.createInputField(
5500
5547
  n.text,
5501
5548
  n.coords,
5502
5549
  n.width,
5503
5550
  n.height,
5504
5551
  n.fontSize,
5505
- n.fontFamily || H.fontFamily,
5552
+ n.fontFamily || F.fontFamily,
5506
5553
  n.orientation,
5507
5554
  (c) => {
5508
5555
  },
5509
5556
  (c) => {
5510
- n.text = c, this.currentAction instanceof di && (this.currentAction.to = c, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5557
+ n.text = c, this.currentAction instanceof vi && (this.currentAction.to = c, this.currentAction.do(), this.actionStack.add(this.currentAction), this.currentAction = void 0);
5511
5558
  }
5512
5559
  ));
5513
5560
  }).call(
5514
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s, n) => {
5561
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s, n) => {
5515
5562
  if (this.multipleSelectionOn || this.secondaryButton)
5516
5563
  this.startMultipleSelection(s);
5517
5564
  else {
@@ -5536,19 +5583,19 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5536
5583
  })
5537
5584
  ).append("xhtml:div").style("width", "100%").style("height", "100%").style("display", "flex").append("xhtml:p").style("box-sizing", "border-box").style("outline", 0).style("margin", 0).style("border", 0).style("padding", 0).style("user-select", "none").style("font-kerning", "none").style("white-space", "nowrap"), l.attr("x", 0).attr("y", 0).attr("width", (s) => `${s.width}px`).attr("height", (s) => `${s.height}px`).attr("transform", (s) => `translate(${s.coords[0]},${s.coords[1]})`).attr("opacity", (s) => s.removed ? 0.5 : 1).select("div").style(
5538
5585
  "justify-content",
5539
- (s) => s.horizontalAlign === Pt.Center ? "center" : s.horizontalAlign === Pt.Right ? "flex-end" : "flex-start"
5586
+ (s) => s.horizontalAlign === zt.Center ? "center" : s.horizontalAlign === zt.Right ? "flex-end" : "flex-start"
5540
5587
  ).style(
5541
5588
  "align-items",
5542
- (s) => s.verticalAlign === Kt.Center ? "center" : s.verticalAlign === Kt.Bottom ? "end" : "start"
5589
+ (s) => s.verticalAlign === Qt.Center ? "center" : s.verticalAlign === Qt.Bottom ? "end" : "start"
5543
5590
  ).select("p").style(
5544
5591
  "max-width",
5545
- (s) => s.fit ? "default" : `${gi(s.width, s.height, s.orientation)[0]}px`
5592
+ (s) => s.fit ? "default" : `${bi(s.width, s.height, s.orientation)[0]}px`
5546
5593
  ).style(
5547
5594
  "max-height",
5548
- (s) => s.fit ? "default" : `${gi(s.width, s.height, s.orientation)[1]}px`
5595
+ (s) => s.fit ? "default" : `${bi(s.width, s.height, s.orientation)[1]}px`
5549
5596
  ).style("overflow", (s) => s.fit ? "default" : "clip").style("text-overflow", (s) => s.fit ? "default" : "ellipsis").style(
5550
5597
  "text-align",
5551
- (s) => s.horizontalAlign === Pt.Center ? "center" : s.horizontalAlign === Pt.Right ? "end" : "start"
5598
+ (s) => s.horizontalAlign === zt.Center ? "center" : s.horizontalAlign === zt.Right ? "end" : "start"
5552
5599
  ).style("transform", (s) => `rotate(${s.orientation}deg)`).style("font-size", (s) => `${s.fontSize}px`).style(
5553
5600
  "font-family",
5554
5601
  (s) => s.fontFamily || "'Wonder Unit Sans', sans-serif"
@@ -5574,13 +5621,13 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5574
5621
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
5575
5622
  return;
5576
5623
  }
5577
- const r = new wt(s, n);
5624
+ const r = new Ct(s, n);
5578
5625
  this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && (s.preventDefault(), this.contextMenu.open(s));
5579
5626
  }).on(L.DoubleClick, (s, n) => {
5580
- const r = new kt(s, n);
5627
+ const r = new wt(s, n);
5581
5628
  this.diagramEvent$.next(r);
5582
5629
  }).call(
5583
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s) => {
5630
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s) => {
5584
5631
  (this.multipleSelectionOn || this.secondaryButton) && this.startMultipleSelection(s);
5585
5632
  }).on(M.Drag, (s) => {
5586
5633
  (this.multipleSelectionOn || this.secondaryButton) && this.continueMultipleSelection(s);
@@ -5605,13 +5652,13 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5605
5652
  if (!s.ctrlKey && !s.shiftKey) {
5606
5653
  const r = this.userSelection.all();
5607
5654
  this.userSelection.clear(), this.diagramEvent$.next(
5608
- new F(r, !1)
5655
+ new B(r, !1)
5609
5656
  );
5610
5657
  }
5611
5658
  if (n.rootElement) {
5612
- const r = ft(n.rootElement);
5659
+ const r = pt(n.rootElement);
5613
5660
  this.userSelection.toggle(r), this.diagramEvent$.next(
5614
- new F(
5661
+ new B(
5615
5662
  [r],
5616
5663
  r.selected
5617
5664
  )
@@ -5622,21 +5669,21 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5622
5669
  s.preventDefault(), s.stopPropagation(), this.dragging = !1;
5623
5670
  return;
5624
5671
  }
5625
- const r = new wt(s, n);
5672
+ const r = new Ct(s, n);
5626
5673
  if (this.diagramEvent$.next(r), !r.defaultPrevented && this.canUserPerformAction(S.ContextMenu) && n.rootElement) {
5627
5674
  s.preventDefault();
5628
- const c = ft(n.rootElement);
5675
+ const c = pt(n.rootElement);
5629
5676
  this.userHighlight.focusOn(c), this.diagramEvent$.next(
5630
5677
  new ot(c)
5631
5678
  ), this.userSelection.add(c), this.diagramEvent$.next(
5632
- new F([c], !0)
5679
+ new B([c], !0)
5633
5680
  ), this.contextMenu.open(s);
5634
5681
  }
5635
5682
  }).on(L.DoubleClick, (s, n) => {
5636
- const r = new kt(s, n);
5683
+ const r = new wt(s, n);
5637
5684
  this.diagramEvent$.next(r);
5638
5685
  }).call(
5639
- N.drag().filter((s) => (this.secondaryButton = Ct(s), !0)).on(M.Start, (s, n) => {
5686
+ N.drag().filter((s) => (this.secondaryButton = St(s), !0)).on(M.Start, (s, n) => {
5640
5687
  if (this.multipleSelectionOn || this.secondaryButton)
5641
5688
  this.startMultipleSelection(s);
5642
5689
  else {
@@ -5664,9 +5711,9 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5664
5711
  updateConnectionLabelsInView(t) {
5665
5712
  var s, n, r;
5666
5713
  const e = this.selectCanvasView().select(
5667
- `[id='${pe(t.id)}']`
5714
+ `[id='${ye(t.id)}']`
5668
5715
  ), a = e.select("path").node(), l = {
5669
- ...H,
5716
+ ...F,
5670
5717
  ...t.type.label
5671
5718
  };
5672
5719
  if (a) {
@@ -5713,17 +5760,17 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5713
5760
  ).style("font-kerning", "none").text(t.startLabel);
5714
5761
  const g = (s = e.select("g.diagram-connection-start-label text").node()) == null ? void 0 : s.getBoundingClientRect();
5715
5762
  if (g) {
5716
- const y = t.startLabel ? g.width / this.zoomTransform.k + Ht(l) + Gt(l) : 0, A = t.startLabel ? g.height / this.zoomTransform.k + Bt(l) + Dt(l) : 0, I = a.getPointAtLength(
5763
+ const y = t.startLabel ? g.width / this.zoomTransform.k + Bt(l) + Ut(l) : 0, A = t.startLabel ? g.height / this.zoomTransform.k + Yt(l) + Gt(l) : 0, I = a.getPointAtLength(
5717
5764
  Math.max(
5718
5765
  tt(l) + y / 2,
5719
- lt(l) + y / 2,
5766
+ ct(l) + y / 2,
5720
5767
  Z(l) + A / 2,
5721
- st(l) + A / 2
5768
+ nt(l) + A / 2
5722
5769
  )
5723
5770
  );
5724
5771
  e.select("g.diagram-connection-start-label path").attr(
5725
5772
  "d",
5726
- Zt(
5773
+ Jt(
5727
5774
  -y / 2,
5728
5775
  -A / 2,
5729
5776
  y,
@@ -5740,10 +5787,10 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5740
5787
  ).style("font-kerning", "none").text(t.middleLabel);
5741
5788
  const v = (n = e.select("g.diagram-connection-middle-label text").node()) == null ? void 0 : n.getBoundingClientRect();
5742
5789
  if (v) {
5743
- const y = t.middleLabel ? v.width / this.zoomTransform.k + Ht(l) + Gt(l) : 0, A = t.middleLabel ? v.height / this.zoomTransform.k + Bt(l) + Dt(l) : 0, I = a.getPointAtLength(c / 2);
5790
+ const y = t.middleLabel ? v.width / this.zoomTransform.k + Bt(l) + Ut(l) : 0, A = t.middleLabel ? v.height / this.zoomTransform.k + Yt(l) + Gt(l) : 0, I = a.getPointAtLength(c / 2);
5744
5791
  e.select("g.diagram-connection-middle-label path").attr(
5745
5792
  "d",
5746
- Zt(
5793
+ Jt(
5747
5794
  -y / 2,
5748
5795
  -A / 2,
5749
5796
  y,
@@ -5760,17 +5807,17 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5760
5807
  ).style("font-kerning", "none").text(t.endLabel);
5761
5808
  const w = (r = e.select("g.diagram-connection-end-label text").node()) == null ? void 0 : r.getBoundingClientRect();
5762
5809
  if (w) {
5763
- const y = t.endLabel ? w.width / this.zoomTransform.k + Ht(l) + Gt(l) : 0, A = t.endLabel ? w.height / this.zoomTransform.k + Bt(l) + Dt(l) : 0, I = a.getPointAtLength(
5810
+ const y = t.endLabel ? w.width / this.zoomTransform.k + Bt(l) + Ut(l) : 0, A = t.endLabel ? w.height / this.zoomTransform.k + Yt(l) + Gt(l) : 0, I = a.getPointAtLength(
5764
5811
  c - Math.max(
5765
5812
  tt(l) + y / 2,
5766
- lt(l) + y / 2,
5813
+ ct(l) + y / 2,
5767
5814
  Z(l) + A / 2,
5768
- st(l) + A / 2
5815
+ nt(l) + A / 2
5769
5816
  )
5770
5817
  );
5771
5818
  e.select("g.diagram-connection-end-label path").attr(
5772
5819
  "d",
5773
- Zt(
5820
+ Jt(
5774
5821
  -y / 2,
5775
5822
  -A / 2,
5776
5823
  y,
@@ -5785,7 +5832,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5785
5832
  }
5786
5833
  updateConnectionMarkersInView(t) {
5787
5834
  const e = this.selectCanvasView().select(
5788
- `[id='${pe(t.id)}']`
5835
+ `[id='${ye(t.id)}']`
5789
5836
  ), o = e.select("marker.diagram-connection-start-marker"), a = e.select("marker.diagram-connection-end-marker");
5790
5837
  t.startMarkerLook !== null ? o.attr("orient", "auto-start-reverse").attr("markerWidth", t.startMarkerLook.width).attr("markerHeight", t.startMarkerLook.height).attr("refX", t.startMarkerLook.refX).attr("refY", t.startMarkerLook.refY).select("image").attr("href", t.startMarkerLook.image).attr("width", t.startMarkerLook.width).attr("height", t.startMarkerLook.height) : o.attr("orient", "auto-start-reverse").attr("markerWidth", 0).attr("markerHeight", 0), t.endMarkerLook !== null ? a.attr("orient", "auto-start-reverse").attr("markerWidth", t.endMarkerLook.width).attr("markerHeight", t.endMarkerLook.height).attr("refX", t.endMarkerLook.refX).attr("refY", t.endMarkerLook.refY).select("image").attr("href", t.endMarkerLook.image).attr("width", t.endMarkerLook.width).attr("height", t.endMarkerLook.height) : a.attr("orient", "auto-start-reverse").attr("markerWidth", 0).attr("markerHeight", 0);
5791
5838
  }
@@ -5795,7 +5842,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5795
5842
  if (!e)
5796
5843
  return !1;
5797
5844
  if (e.rootElement instanceof O || e.rootElement instanceof X) {
5798
- const n = this.minimumSizeOfField(e), r = n[0] + tt((o = e.rootElement.type) == null ? void 0 : o.label) + lt((a = e.rootElement.type) == null ? void 0 : a.label) - e.rootElement.width, c = n[1] + Z((l = e.rootElement.type) == null ? void 0 : l.label) + st((s = e.rootElement.type) == null ? void 0 : s.label) - e.rootElement.height;
5845
+ const n = this.minimumSizeOfField(e), r = n[0] + tt((o = e.rootElement.type) == null ? void 0 : o.label) + ct((a = e.rootElement.type) == null ? void 0 : a.label) - e.rootElement.width, c = n[1] + Z((l = e.rootElement.type) == null ? void 0 : l.label) + nt((s = e.rootElement.type) == null ? void 0 : s.label) - e.rootElement.height;
5799
5846
  return r <= 0 && c <= 0;
5800
5847
  }
5801
5848
  return !0;
@@ -5806,7 +5853,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5806
5853
  if (o) {
5807
5854
  if (o.rootElement instanceof O) {
5808
5855
  const n = this.minimumSizeOfField(o);
5809
- let r = n[0] + tt(o.rootElement.type.label) + lt(o.rootElement.type.label) - o.rootElement.width, c = n[1] + Z(o.rootElement.type.label) + st(o.rootElement.type.label) - o.rootElement.height;
5856
+ let r = n[0] + tt(o.rootElement.type.label) + ct(o.rootElement.type.label) - o.rootElement.width, c = n[1] + Z(o.rootElement.type.label) + nt(o.rootElement.type.label) - o.rootElement.height;
5810
5857
  this.snapToGrid && (r = Math.ceil(r / this.gridSize) * this.gridSize, c = Math.ceil(c / this.gridSize) * this.gridSize), o.rootElement.width + r < o.rootElement.type.minWidth && (r = o.rootElement.type.minWidth - o.rootElement.width), o.rootElement.height + c < o.rootElement.type.minHeight && (c = o.rootElement.type.minHeight - o.rootElement.height), (e !== !1 || r > 0) && o.rootElement.stretch(b.Right, r), (e !== !1 || c > 0) && o.rootElement.stretch(b.Bottom, c);
5811
5858
  }
5812
5859
  if (o.rootElement instanceof X) {
@@ -5822,7 +5869,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5822
5869
  )));
5823
5870
  n[0] < r && (n[0] = r), n[1] < c && (n[1] = c);
5824
5871
  const d = o.rootElement.type;
5825
- let h = n[0] + tt(d == null ? void 0 : d.label) + lt(d == null ? void 0 : d.label) - o.rootElement.width, u = n[1] + Z(d == null ? void 0 : d.label) + st(d == null ? void 0 : d.label) - o.rootElement.height;
5872
+ let h = n[0] + tt(d == null ? void 0 : d.label) + ct(d == null ? void 0 : d.label) - o.rootElement.width, u = n[1] + Z(d == null ? void 0 : d.label) + nt(d == null ? void 0 : d.label) - o.rootElement.height;
5826
5873
  this.snapToGrid && (h = Math.ceil(h / this.gridSize) * this.gridSize, u = Math.ceil(u / this.gridSize) * this.gridSize), o.rootElement.width + h < (o.rootElement.getMinWidth() || 0) && (h = (o.rootElement.getMinWidth() || 0) - o.rootElement.width), o.rootElement.height + u < (o.rootElement.getMinHeight() || 0) && (u = (o.rootElement.getMinHeight() || 0) - o.rootElement.height), (e || h > 0) && ((l = o.rootElement.node) == null || l.stretchSections(
5827
5874
  b.Right,
5828
5875
  h,
@@ -5877,12 +5924,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5877
5924
  ) && t.allowsOutgoing || this.connectionType.canFinishOnType(
5878
5925
  ((l = (a = t.getNode()) == null ? void 0 : a.type) == null ? void 0 : l.id) || ""
5879
5926
  ) && t.allowsIncoming))
5880
- this.unfinishedConnection = new gt(
5927
+ this.unfinishedConnection = new ut(
5881
5928
  this.model,
5882
5929
  this.connectionType,
5883
5930
  t,
5884
5931
  void 0,
5885
- me
5932
+ pe
5886
5933
  );
5887
5934
  else if (this.inferConnectionType) {
5888
5935
  let s = this.model.connections.types.all().find(
@@ -5896,12 +5943,12 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5896
5943
  var r, c;
5897
5944
  return t.allowsIncoming && n.canFinishOnType(((c = (r = t.getNode()) == null ? void 0 : r.type) == null ? void 0 : c.id) || "");
5898
5945
  }
5899
- )), s !== void 0 && (this.unfinishedConnection = new gt(
5946
+ )), s !== void 0 && (this.unfinishedConnection = new ut(
5900
5947
  this.model,
5901
5948
  s,
5902
5949
  t,
5903
5950
  void 0,
5904
- me
5951
+ pe
5905
5952
  ));
5906
5953
  }
5907
5954
  }
@@ -5931,7 +5978,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5931
5978
  ) && ((n = (s = this.unfinishedConnection) == null ? void 0 : s.start) != null && n.allowsOutgoing) && this.unfinishedConnection.type.canFinishOnType(
5932
5979
  ((c = (r = t.getNode()) == null ? void 0 : r.type) == null ? void 0 : c.id) || ""
5933
5980
  ) && t.allowsIncoming) {
5934
- const E = new de(
5981
+ const E = new ge(
5935
5982
  this,
5936
5983
  this.unfinishedConnection.type,
5937
5984
  (d = this.unfinishedConnection.start) == null ? void 0 : d.id,
@@ -5943,7 +5990,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5943
5990
  ) && ((g = (m = this.unfinishedConnection) == null ? void 0 : m.start) != null && g.allowsIncoming) && this.unfinishedConnection.type.canStartFromType(
5944
5991
  ((w = (v = t.getNode()) == null ? void 0 : v.type) == null ? void 0 : w.id) || ""
5945
5992
  ) && t.allowsOutgoing) {
5946
- const E = new de(
5993
+ const E = new ge(
5947
5994
  this,
5948
5995
  this.unfinishedConnection.type,
5949
5996
  t.id,
@@ -5953,21 +6000,21 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
5953
6000
  } else if (this.inferConnectionType) {
5954
6001
  let E = this.model.connections.types.all().find(
5955
6002
  (C) => {
5956
- var R, T, z, j, D, q, G, Y;
6003
+ var R, T, z, j, D, q, H, Y;
5957
6004
  return C.canStartFromType(
5958
6005
  ((j = (z = (T = (R = this.unfinishedConnection) == null ? void 0 : R.start) == null ? void 0 : T.getNode()) == null ? void 0 : z.type) == null ? void 0 : j.id) || ""
5959
- ) && ((q = (D = this.unfinishedConnection) == null ? void 0 : D.start) == null ? void 0 : q.allowsOutgoing) && C.canFinishOnType(((Y = (G = t.getNode()) == null ? void 0 : G.type) == null ? void 0 : Y.id) || "") && t.allowsIncoming;
6006
+ ) && ((q = (D = this.unfinishedConnection) == null ? void 0 : D.start) == null ? void 0 : q.allowsOutgoing) && C.canFinishOnType(((Y = (H = t.getNode()) == null ? void 0 : H.type) == null ? void 0 : Y.id) || "") && t.allowsIncoming;
5960
6007
  }
5961
6008
  ), $ = !1;
5962
6009
  if (E === void 0 && (E = this.model.connections.types.all().find(
5963
6010
  (C) => {
5964
- var R, T, z, j, D, q, G, Y;
6011
+ var R, T, z, j, D, q, H, Y;
5965
6012
  return C.canFinishOnType(
5966
6013
  ((j = (z = (T = (R = this.unfinishedConnection) == null ? void 0 : R.start) == null ? void 0 : T.getNode()) == null ? void 0 : z.type) == null ? void 0 : j.id) || ""
5967
- ) && ((q = (D = this.unfinishedConnection) == null ? void 0 : D.start) == null ? void 0 : q.allowsIncoming) && C.canStartFromType(((Y = (G = t.getNode()) == null ? void 0 : G.type) == null ? void 0 : Y.id) || "") && t.allowsOutgoing;
6014
+ ) && ((q = (D = this.unfinishedConnection) == null ? void 0 : D.start) == null ? void 0 : q.allowsIncoming) && C.canStartFromType(((Y = (H = t.getNode()) == null ? void 0 : H.type) == null ? void 0 : Y.id) || "") && t.allowsOutgoing;
5968
6015
  }
5969
6016
  ), $ = !0), E !== void 0) {
5970
- const C = new de(
6017
+ const C = new ge(
5971
6018
  this,
5972
6019
  E,
5973
6020
  $ ? t.id : (A = this.unfinishedConnection.start) == null ? void 0 : A.id,
@@ -6005,7 +6052,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6005
6052
  }
6006
6053
  }).on(L.Input, () => {
6007
6054
  const m = h.property("value");
6008
- h.attr("cols", to(m) + 1), h.attr("rows", eo(m) + 1), h.style("width", ""), h.style("height", ""), u = h.property("scrollWidth") + 1, p = h.property("scrollHeight") + 1;
6055
+ h.attr("cols", ro(m) + 1), h.attr("rows", ao(m) + 1), h.style("width", ""), h.style("height", ""), u = h.property("scrollWidth") + 1, p = h.property("scrollHeight") + 1;
6009
6056
  const g = Math.max(u, o), v = Math.max(p, a);
6010
6057
  d == null || d.attr("width", `${g}px`), h.style("width", `${g}px`), d == null || d.attr("height", `${v}px`), h.style("height", `${v}px`), r && r(m);
6011
6058
  }).on(L.Click, (m) => {
@@ -6038,7 +6085,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6038
6085
  startMovingNode(t, e) {
6039
6086
  if (this.canUserPerformAction(S.MoveNode) && !e.removed)
6040
6087
  if (x(P.Grabbing), this.draggingFrom = [t.x, t.y], e.selected && this.userSelection.count((o) => o instanceof O) > 1)
6041
- this.currentAction = new ce(
6088
+ this.currentAction = new he(
6042
6089
  this,
6043
6090
  this.userSelection.filter((o) => o instanceof O).map((o) => o.id),
6044
6091
  e.coords
@@ -6063,7 +6110,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6063
6110
  * Method to call to continue the moving of a node triggered by a user drag event.
6064
6111
  */
6065
6112
  continueMovingNode(t, e) {
6066
- if (this.canUserPerformAction(S.MoveNode) && (this.currentAction instanceof ce || this.currentAction instanceof J) && !e.removed) {
6113
+ if (this.canUserPerformAction(S.MoveNode) && (this.currentAction instanceof he || this.currentAction instanceof J) && !e.removed) {
6067
6114
  const o = [
6068
6115
  t.x - e.width / 2,
6069
6116
  t.y - e.height / 2
@@ -6084,7 +6131,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6084
6131
  t.x - e.width / 2,
6085
6132
  t.y - e.height / 2
6086
6133
  ];
6087
- if (this.snapToGrid && (s = this.getClosestGridPoint(s)), this.currentAction instanceof ce) {
6134
+ if (this.snapToGrid && (s = this.getClosestGridPoint(s)), this.currentAction instanceof he) {
6088
6135
  const n = this.currentAction.delta;
6089
6136
  this.currentAction.delta = [
6090
6137
  s[0] - n[0],
@@ -6097,11 +6144,11 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6097
6144
  e.move(s);
6098
6145
  const r = this.model.nodes.getAtCoordinates(t.x, t.y).filter((h) => h.id !== e.id && !h.isDescendantOf(e)).filter(
6099
6146
  (h) => h.type.childrenTypes.includes(e.type.id)
6100
- ), c = Ii(
6147
+ ), c = $i(
6101
6148
  r
6102
6149
  ), d = c[c.length - 1];
6103
6150
  if (d !== e.parent && (e.type.canBeParentless || d !== void 0)) {
6104
- const h = d == null ? void 0 : d.getLastAncestor(), u = this.currentAction.from, p = new Lo(
6151
+ const h = d == null ? void 0 : d.getLastAncestor(), u = this.currentAction.from, p = new No(
6105
6152
  this,
6106
6153
  e.id,
6107
6154
  (o = e.parent) == null ? void 0 : o.id,
@@ -6149,7 +6196,7 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6149
6196
  const e = this.getPointerLocationRelativeToCanvas(t);
6150
6197
  (o = this.multipleSelectionContainer) == null || o.remove(), this.multipleSelectionContainer = void 0, this.userSelection.clear();
6151
6198
  for (const a of this.model.nodes)
6152
- Ui(
6199
+ Ki(
6153
6200
  [
6154
6201
  a.coords,
6155
6202
  [a.coords[0] + a.width, a.coords[1] + a.height]
@@ -6157,13 +6204,13 @@ const Bo = (i) => i * Math.PI / 180, gi = (i, t, e) => {
6157
6204
  [this.draggingFrom, e]
6158
6205
  ) && this.userSelection.add(a);
6159
6206
  this.multipleSelectionOn = !1, this.diagramEvent$.next(
6160
- new F(this.userSelection.all(), !0)
6207
+ new B(this.userSelection.all(), !0)
6161
6208
  ), x();
6162
6209
  }
6163
6210
  };
6164
- Jt.canvasCount = 0;
6165
- let be = Jt;
6166
- class Ni {
6211
+ ee.canvasCount = 0;
6212
+ let Ce = ee;
6213
+ class Oi {
6167
6214
  constructor() {
6168
6215
  this.grid = [[void 0]], this.offsetX = 0, this.offsetY = 0;
6169
6216
  }
@@ -6275,7 +6322,7 @@ class Ni {
6275
6322
  }
6276
6323
  }
6277
6324
  }
6278
- class Yo {
6325
+ class Ko {
6279
6326
  constructor(t) {
6280
6327
  this.gapSize = t;
6281
6328
  }
@@ -6283,9 +6330,9 @@ class Yo {
6283
6330
  var n;
6284
6331
  if (t.nodes.length === 0)
6285
6332
  return t;
6286
- const e = new Ni(), o = t.nodes.filter((r) => !r.parent);
6333
+ const e = new Oi(), o = t.nodes.filter((r) => !r.parent);
6287
6334
  for (; o.length > 0; )
6288
- Pi(
6335
+ Di(
6289
6336
  o[0],
6290
6337
  e,
6291
6338
  [0, 0],
@@ -6303,18 +6350,18 @@ class Yo {
6303
6350
  return t;
6304
6351
  }
6305
6352
  }
6306
- const Pi = (i, t, e, o) => {
6353
+ const Di = (i, t, e, o) => {
6307
6354
  const a = t.getClosestEmptyCoordinate(e);
6308
6355
  t.set(a, i), K(o, i);
6309
6356
  for (const l of i.getAdjacentNodes())
6310
- o.includes(l) && Pi(
6357
+ o.includes(l) && Di(
6311
6358
  l,
6312
6359
  t,
6313
6360
  a,
6314
6361
  o
6315
6362
  );
6316
6363
  };
6317
- class Xo {
6364
+ class qo {
6318
6365
  constructor(t) {
6319
6366
  this.gapSize = t;
6320
6367
  }
@@ -6322,7 +6369,7 @@ class Xo {
6322
6369
  var d;
6323
6370
  if (t.nodes.length === 0)
6324
6371
  return t;
6325
- const e = new Ni(), o = t.nodes.filter((h) => !h.parent), a = {}, l = o[0];
6372
+ const e = new Oi(), o = t.nodes.filter((h) => !h.parent), a = {}, l = o[0];
6326
6373
  let s = [l];
6327
6374
  for (a[l.id] = [0, 0]; o.length > 0; ) {
6328
6375
  const h = [];
@@ -6356,7 +6403,7 @@ class Xo {
6356
6403
  return t;
6357
6404
  }
6358
6405
  }
6359
- class re {
6406
+ class le {
6360
6407
  constructor(t) {
6361
6408
  this.gapSize = t;
6362
6409
  }
@@ -6391,7 +6438,7 @@ class re {
6391
6438
  return t;
6392
6439
  }
6393
6440
  }
6394
- class jo {
6441
+ class Jo {
6395
6442
  constructor(t) {
6396
6443
  this.gapSize = t;
6397
6444
  }
@@ -6399,7 +6446,7 @@ class jo {
6399
6446
  var h;
6400
6447
  if (t.nodes.length === 0)
6401
6448
  return t;
6402
- new re(this.gapSize).apply(t);
6449
+ new le(this.gapSize).apply(t);
6403
6450
  const e = this.gapSize !== void 0 ? this.gapSize : (((h = t.canvas) == null ? void 0 : h.gridSize) || 0) * 2, o = 0.99, a = 1, l = 0.1, s = 2e5, n = 0.5, r = 1, c = 2e-3;
6404
6451
  let d = 100;
6405
6452
  for (; d > a; ) {
@@ -6419,7 +6466,7 @@ class jo {
6419
6466
  ], v = [
6420
6467
  m.coords[0] + m.width / 2,
6421
6468
  m.coords[1] + m.height / 2
6422
- ], w = pi(
6469
+ ], w = Si(
6423
6470
  p.coords,
6424
6471
  m.coords
6425
6472
  ), y = [m.coords[0], m.coords[1]];
@@ -6442,7 +6489,7 @@ class jo {
6442
6489
  return t;
6443
6490
  }
6444
6491
  }
6445
- class Wo {
6492
+ class Qo {
6446
6493
  constructor(t) {
6447
6494
  this.gapSize = t;
6448
6495
  }
@@ -6458,7 +6505,7 @@ class Wo {
6458
6505
  return t;
6459
6506
  }
6460
6507
  }
6461
- class Zo {
6508
+ class ts {
6462
6509
  constructor(t) {
6463
6510
  this.gapSize = t;
6464
6511
  }
@@ -6472,7 +6519,7 @@ class Zo {
6472
6519
  ...t.nodes.map((h) => h.getPriority())
6473
6520
  );
6474
6521
  if (e === o)
6475
- return new re(this.gapSize).apply(t), t;
6522
+ return new le(this.gapSize).apply(t), t;
6476
6523
  const a = this.gapSize !== void 0 ? this.gapSize : (((d = t.canvas) == null ? void 0 : d.gridSize) || 0) * 2, l = t.nodes.filter((h) => !h.parent), s = [], n = t.nodes.filter((h) => !h.parent).filter((h) => h.getPriority() >= e), r = [];
6477
6524
  if (n.length > 1) {
6478
6525
  const h = n[0];
@@ -6526,7 +6573,7 @@ class Zo {
6526
6573
  return t;
6527
6574
  }
6528
6575
  }
6529
- class Ko {
6576
+ class es {
6530
6577
  constructor(t) {
6531
6578
  this.gapSize = t;
6532
6579
  }
@@ -6540,17 +6587,17 @@ class Ko {
6540
6587
  ...t.nodes.map((h) => h.getPriority())
6541
6588
  );
6542
6589
  if (e === o)
6543
- return new re(this.gapSize).apply(t), t;
6590
+ return new le(this.gapSize).apply(t), t;
6544
6591
  const a = this.gapSize !== void 0 ? this.gapSize : (((d = t.canvas) == null ? void 0 : d.gridSize) || 0) * 2, l = t.nodes.filter((h) => !h.parent).sort((h, u) => u.getPriority() - h.getPriority()), s = [];
6545
6592
  for (; l.length > 0; ) {
6546
6593
  const h = l[0];
6547
6594
  l.splice(0, 1);
6548
- const u = new Ce(void 0, h);
6549
- zi(u, l), s.push(u);
6595
+ const u = new xe(void 0, h);
6596
+ Fi(u, l), s.push(u);
6550
6597
  }
6551
6598
  const n = [];
6552
6599
  for (const h of s)
6553
- n.push([h]), Ri(h, n, n.length);
6600
+ n.push([h]), Hi(h, n, n.length);
6554
6601
  const r = Math.max(...t.nodes.map((h) => h.height));
6555
6602
  let c = 0;
6556
6603
  for (let h = 0; h < n.length; ++h) {
@@ -6569,29 +6616,29 @@ class Ko {
6569
6616
  return t;
6570
6617
  }
6571
6618
  }
6572
- const zi = (i, t) => {
6619
+ const Fi = (i, t) => {
6573
6620
  for (const e of i.node.getAdjacentNodes().sort((o, a) => a.getPriority() - o.getPriority())) {
6574
6621
  const o = t.indexOf(e);
6575
6622
  if (o >= 0) {
6576
6623
  t.splice(o, 1);
6577
6624
  const a = i.addBranch(e);
6578
- zi(a, t);
6625
+ Fi(a, t);
6579
6626
  }
6580
6627
  }
6581
- }, Ri = (i, t, e) => {
6628
+ }, Hi = (i, t, e) => {
6582
6629
  if (i.branches.length > 0) {
6583
6630
  for (; e >= t.length; )
6584
6631
  t.push([]);
6585
6632
  for (const o of i.branches)
6586
- t[e].push(o), Ri(o, t, e + 1);
6633
+ t[e].push(o), Hi(o, t, e + 1);
6587
6634
  }
6588
6635
  };
6589
- class Ce {
6636
+ class xe {
6590
6637
  constructor(t, e) {
6591
6638
  this.parent = t, this.branches = [], this.depth = 0, this.node = e;
6592
6639
  }
6593
6640
  addBranch(t) {
6594
- const e = new Ce(this, t);
6641
+ const e = new xe(this, t);
6595
6642
  return e.depth = this.depth + 1, this.branches.push(e), e;
6596
6643
  }
6597
6644
  countBranchHeight() {
@@ -6605,7 +6652,7 @@ class Ce {
6605
6652
  }
6606
6653
  }
6607
6654
  }
6608
- class qo {
6655
+ class is {
6609
6656
  constructor(t) {
6610
6657
  this.gapSize = t;
6611
6658
  }
@@ -6621,17 +6668,17 @@ class qo {
6621
6668
  return t;
6622
6669
  }
6623
6670
  }
6624
- const ui = {
6625
- adjacency: new Yo(),
6626
- breadth: new re(),
6627
- "breadth-adjacency": new Xo(),
6628
- force: new jo(),
6629
- horizontal: new Wo(),
6630
- priority: new Zo(),
6631
- tree: new Ko(),
6632
- vertical: new qo()
6633
- }, Jo = fi({}), Tt = fi({});
6634
- class Qo {
6671
+ const ki = {
6672
+ adjacency: new Ko(),
6673
+ breadth: new le(),
6674
+ "breadth-adjacency": new qo(),
6675
+ force: new Jo(),
6676
+ horizontal: new Qo(),
6677
+ priority: new ts(),
6678
+ tree: new es(),
6679
+ vertical: new is()
6680
+ }, os = Ci({}), $t = Ci({});
6681
+ class ss {
6635
6682
  constructor(t, e) {
6636
6683
  this.onTitleChange = t, this.onValueSetChange = e;
6637
6684
  }
@@ -6650,7 +6697,7 @@ class Qo {
6650
6697
  highlightProperty(...t) {
6651
6698
  }
6652
6699
  }
6653
- const Se = ({
6700
+ const Le = ({
6654
6701
  direction: i,
6655
6702
  collapsableSelector: t,
6656
6703
  collapsableAdditionalSelector: e,
@@ -6695,10 +6742,10 @@ const Se = ({
6695
6742
  children: /* @__PURE__ */ k("div", { className: u() })
6696
6743
  }
6697
6744
  ) });
6698
- }, ts = () => {
6699
- const i = Yt(Tt), t = ct(null), [e, o] = U([]);
6700
- Gi(i.validatorChange$, i.diagramChange$).pipe(
6701
- Bi(() => a())
6745
+ }, ns = () => {
6746
+ const i = Wt($t), t = dt(null), [e, o] = U([]);
6747
+ ji(i.validatorChange$, i.diagramChange$).pipe(
6748
+ Wi(() => a())
6702
6749
  ).subscribe();
6703
6750
  const a = () => {
6704
6751
  o([]);
@@ -6731,7 +6778,7 @@ const Se = ({
6731
6778
  " errors found"
6732
6779
  ] }),
6733
6780
  /* @__PURE__ */ k("div", { className: "daga-collapse-button-container", children: /* @__PURE__ */ k(
6734
- Se,
6781
+ Le,
6735
6782
  {
6736
6783
  collapsableSelector: t,
6737
6784
  collapsableAdditionalSelector: ".daga-error-panel",
@@ -6753,18 +6800,18 @@ const Se = ({
6753
6800
  n
6754
6801
  )) }) })
6755
6802
  ] }) });
6756
- }, es = 200, mi = (i) => (i || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Vi = ({
6803
+ }, rs = 200, wi = (i) => (i || "").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Gi = ({
6757
6804
  disabled: i,
6758
6805
  options: t,
6759
6806
  value: e,
6760
6807
  onChange: o
6761
6808
  }) => {
6762
- const a = ct(null), [l, s] = U("");
6809
+ const a = dt(null), [l, s] = U("");
6763
6810
  let n;
6764
6811
  const [r, c] = U([]), [d, h] = U([]), [u, p] = U([]), [f, m] = U([]), [g, v] = U(!1);
6765
- Et(() => {
6812
+ Tt(() => {
6766
6813
  var T;
6767
- s(((T = t.find((z) => Lt(z.key, e))) == null ? void 0 : T.label) || "");
6814
+ s(((T = t.find((z) => Et(z.key, e))) == null ? void 0 : T.label) || "");
6768
6815
  }, [e, t]);
6769
6816
  const w = (T) => {
6770
6817
  if (!i)
@@ -6792,12 +6839,12 @@ const Se = ({
6792
6839
  }
6793
6840
  }, y = () => {
6794
6841
  if (!i) {
6795
- const T = mi(l.trim());
6842
+ const T = wi(l.trim());
6796
6843
  c([]), h([]), p([]), m([]);
6797
6844
  for (const z of t) {
6798
- const D = mi(z.label).indexOf(T);
6845
+ const D = wi(z.label).indexOf(T);
6799
6846
  if (D >= 0) {
6800
- const q = z.label.substring(0, D), G = z.label.substring(
6847
+ const q = z.label.substring(0, D), H = z.label.substring(
6801
6848
  D,
6802
6849
  D + T.length
6803
6850
  ), Y = z.label.substring(
@@ -6808,7 +6855,7 @@ const Se = ({
6808
6855
  q
6809
6856
  ]), p((W) => [
6810
6857
  ...W,
6811
- G
6858
+ H
6812
6859
  ]), m((W) => [
6813
6860
  ...W,
6814
6861
  Y
@@ -6828,7 +6875,7 @@ const Se = ({
6828
6875
  }, E = () => {
6829
6876
  setTimeout(() => {
6830
6877
  A();
6831
- }, es);
6878
+ }, rs);
6832
6879
  }, $ = (T) => {
6833
6880
  var j;
6834
6881
  const z = (j = a.current) == null ? void 0 : j.querySelectorAll("li")[T];
@@ -6878,10 +6925,10 @@ const Se = ({
6878
6925
  ]
6879
6926
  }
6880
6927
  );
6881
- }, is = (i, t) => {
6928
+ }, as = (i, t) => {
6882
6929
  var e;
6883
6930
  return ((e = i.find((o) => o.key === t)) == null ? void 0 : e.label) || `${t}`;
6884
- }, os = ({
6931
+ }, ls = ({
6885
6932
  disabled: i,
6886
6933
  allowRepeats: t,
6887
6934
  options: e,
@@ -6889,8 +6936,8 @@ const Se = ({
6889
6936
  onChange: a
6890
6937
  }) => {
6891
6938
  const [l, s] = U(), [n, r] = U([]), [c, d] = U([]);
6892
- Et(() => {
6893
- const g = o.length === 0, v = o.map((w) => is(e, w));
6939
+ Tt(() => {
6940
+ const g = o.length === 0, v = o.map((w) => as(e, w));
6894
6941
  r(v), g && a(o), m();
6895
6942
  }, [o, e]);
6896
6943
  const h = (g) => {
@@ -6926,7 +6973,7 @@ const Se = ({
6926
6973
  ] }, v)),
6927
6974
  !i && /* @__PURE__ */ V("div", { className: "daga-value-item-input", children: [
6928
6975
  /* @__PURE__ */ k("div", { className: "daga-input daga-relatively-positioned", children: /* @__PURE__ */ k(
6929
- Vi,
6976
+ Gi,
6930
6977
  {
6931
6978
  disabled: i,
6932
6979
  options: t ? e || [] : c || [],
@@ -6937,7 +6984,7 @@ const Se = ({
6937
6984
  /* @__PURE__ */ k("button", { className: "daga-property-button", onClick: p, children: /* @__PURE__ */ k("div", { className: "daga-icon daga-add-icon" }) })
6938
6985
  ] })
6939
6986
  ] });
6940
- }, ss = ({
6987
+ }, cs = ({
6941
6988
  disabled: i,
6942
6989
  allowRepeats: t,
6943
6990
  value: e,
@@ -6963,7 +7010,7 @@ const Se = ({
6963
7010
  }, h = (u) => {
6964
7011
  u.key === "Enter" && c();
6965
7012
  };
6966
- return /* @__PURE__ */ V(Di, { children: [
7013
+ return /* @__PURE__ */ V(Yi, { children: [
6967
7014
  e.map((u, p) => /* @__PURE__ */ V("div", { className: "daga-value-item-element", children: [
6968
7015
  /* @__PURE__ */ k(
6969
7016
  "input",
@@ -7000,7 +7047,7 @@ const Se = ({
7000
7047
  /* @__PURE__ */ k("button", { className: "daga-property-button", onClick: c, children: /* @__PURE__ */ k("div", { className: "daga-icon daga-add-icon" }) })
7001
7048
  ] })
7002
7049
  ] });
7003
- }, ns = ({
7050
+ }, ds = ({
7004
7051
  disabled: i,
7005
7052
  value: t,
7006
7053
  onChange: e
@@ -7115,13 +7162,13 @@ const Se = ({
7115
7162
  /* @__PURE__ */ k("button", { className: "daga-property-button", onClick: u, children: /* @__PURE__ */ k("div", { className: "daga-icon daga-add-icon" }) })
7116
7163
  ] })
7117
7164
  ] });
7118
- }, _i = ({
7165
+ }, Bi = ({
7119
7166
  valueSet: i,
7120
7167
  onValueChange: t,
7121
7168
  depth: e
7122
7169
  }) => {
7123
7170
  var r;
7124
- const a = Yt(Tt).canUserPerformAction(S.UpdateValues) && ((r = i == null ? void 0 : i.rootElement) == null ? void 0 : r.removed) !== !0, l = (c) => "daga-property-name-" + c.replace(/\s/g, ""), s = (c) => {
7171
+ const a = Wt($t).canUserPerformAction(S.UpdateValues) && ((r = i == null ? void 0 : i.rootElement) == null ? void 0 : r.removed) !== !0, l = (c) => "daga-property-name-" + c.replace(/\s/g, ""), s = (c) => {
7125
7172
  if (typeof c == "string")
7126
7173
  return c;
7127
7174
  if (c == null || isNaN(c.valueOf()))
@@ -7134,12 +7181,12 @@ const Se = ({
7134
7181
  {
7135
7182
  className: `daga-property ${l(c.name)}`,
7136
7183
  children: [
7137
- /* @__PURE__ */ k("p", { className: "daga-property-name", children: c.name }),
7184
+ /* @__PURE__ */ k("p", { className: "daga-property-name", children: c.label || c.name }),
7138
7185
  c.type === _.Text && /* @__PURE__ */ k(
7139
7186
  "input",
7140
7187
  {
7141
7188
  type: "daga-text",
7142
- disabled: !c.editable || !a,
7189
+ disabled: c.editable === !1 || !a,
7143
7190
  value: i == null ? void 0 : i.getValue(c.name),
7144
7191
  onChange: (d) => t(i, c, d.target.value)
7145
7192
  }
@@ -7147,7 +7194,7 @@ const Se = ({
7147
7194
  c.type === _.TextArea && /* @__PURE__ */ k(
7148
7195
  "textarea",
7149
7196
  {
7150
- disabled: !c.editable || !a,
7197
+ disabled: c.editable === !1 || !a,
7151
7198
  value: i == null ? void 0 : i.getValue(c.name),
7152
7199
  onChange: (d) => t(i, c, d.target.value)
7153
7200
  }
@@ -7156,7 +7203,7 @@ const Se = ({
7156
7203
  "input",
7157
7204
  {
7158
7205
  type: "number",
7159
- disabled: !c.editable || !a,
7206
+ disabled: c.editable === !1 || !a,
7160
7207
  value: i == null ? void 0 : i.getValue(c.name),
7161
7208
  onChange: (d) => t(i, c, d.target.value)
7162
7209
  }
@@ -7166,7 +7213,7 @@ const Se = ({
7166
7213
  {
7167
7214
  type: "text",
7168
7215
  pattern: "#[0-9a-fA-F]{6}",
7169
- disabled: !c.editable || !a,
7216
+ disabled: c.editable === !1 || !a,
7170
7217
  value: i == null ? void 0 : i.getValue(c.name),
7171
7218
  onChange: (d) => t(i, c, d.target.value)
7172
7219
  }
@@ -7175,16 +7222,22 @@ const Se = ({
7175
7222
  "input",
7176
7223
  {
7177
7224
  type: "datetime-local",
7178
- disabled: !c.editable || !a,
7179
- value: s(i == null ? void 0 : i.getValue(c.name)),
7180
- onChange: (d) => t(i, c, n(d.target.value))
7225
+ disabled: c.editable === !1 || !a,
7226
+ value: s(
7227
+ i == null ? void 0 : i.getValue(c.name)
7228
+ ),
7229
+ onChange: (d) => t(
7230
+ i,
7231
+ c,
7232
+ n(d.target.value)
7233
+ )
7181
7234
  }
7182
7235
  ),
7183
7236
  c.type === _.Date && /* @__PURE__ */ k(
7184
7237
  "input",
7185
7238
  {
7186
7239
  type: "date",
7187
- disabled: !c.editable || !a,
7240
+ disabled: c.editable === !1 || !a,
7188
7241
  value: i == null ? void 0 : i.getValue(c.name),
7189
7242
  onChange: (d) => t(i, c, d.target.value)
7190
7243
  }
@@ -7193,7 +7246,7 @@ const Se = ({
7193
7246
  "input",
7194
7247
  {
7195
7248
  type: "time",
7196
- disabled: !c.editable || !a,
7249
+ disabled: c.editable === !1 || !a,
7197
7250
  value: i == null ? void 0 : i.getValue(c.name),
7198
7251
  onChange: (d) => t(i, c, d.target.value)
7199
7252
  }
@@ -7202,54 +7255,66 @@ const Se = ({
7202
7255
  "input",
7203
7256
  {
7204
7257
  type: "url",
7205
- disabled: !c.editable || !a,
7258
+ disabled: c.editable === !1 || !a,
7206
7259
  value: i == null ? void 0 : i.getValue(c.name),
7207
7260
  onChange: (d) => t(i, c, d.target.value)
7208
7261
  }
7209
7262
  ),
7210
7263
  c.type === _.Boolean && /* @__PURE__ */ V("div", { className: "daga-radio", children: [
7211
- /* @__PURE__ */ V("label", { className: "daga-radio-item daga-radio-start" + ((i == null ? void 0 : i.getValue(c.name)) === !1 ? " daga-checked" : ""), children: [
7212
- /* @__PURE__ */ k(
7213
- "input",
7214
- {
7215
- type: "radio",
7216
- disabled: !c.editable || !a,
7217
- name: c.name,
7218
- value: "false",
7219
- checked: (i == null ? void 0 : i.getValue(c.name)) === !1,
7220
- onChange: () => t(i, c, !1)
7221
- }
7222
- ),
7223
- "No"
7224
- ] }),
7225
- /* @__PURE__ */ V("label", { className: "daga-radio-item daga-radio-end" + ((i == null ? void 0 : i.getValue(c.name)) === !0 ? " daga-checked" : ""), children: [
7226
- /* @__PURE__ */ k(
7227
- "input",
7228
- {
7229
- type: "radio",
7230
- disabled: !c.editable || !a,
7231
- name: c.name,
7232
- value: "true",
7233
- checked: (i == null ? void 0 : i.getValue(c.name)) === !0,
7234
- onChange: () => t(i, c, !0)
7235
- }
7236
- ),
7237
- "Yes"
7238
- ] })
7264
+ /* @__PURE__ */ V(
7265
+ "label",
7266
+ {
7267
+ className: "daga-radio-item daga-radio-start" + ((i == null ? void 0 : i.getValue(c.name)) === !1 ? " daga-checked" : ""),
7268
+ children: [
7269
+ /* @__PURE__ */ k(
7270
+ "input",
7271
+ {
7272
+ type: "radio",
7273
+ disabled: c.editable === !1 || !a,
7274
+ name: c.name,
7275
+ value: "false",
7276
+ checked: (i == null ? void 0 : i.getValue(c.name)) === !1,
7277
+ onChange: () => t(i, c, !1)
7278
+ }
7279
+ ),
7280
+ "No"
7281
+ ]
7282
+ }
7283
+ ),
7284
+ /* @__PURE__ */ V(
7285
+ "label",
7286
+ {
7287
+ className: "daga-radio-item daga-radio-end" + ((i == null ? void 0 : i.getValue(c.name)) === !0 ? " daga-checked" : ""),
7288
+ children: [
7289
+ /* @__PURE__ */ k(
7290
+ "input",
7291
+ {
7292
+ type: "radio",
7293
+ disabled: c.editable === !1 || !a,
7294
+ name: c.name,
7295
+ value: "true",
7296
+ checked: (i == null ? void 0 : i.getValue(c.name)) === !0,
7297
+ onChange: () => t(i, c, !0)
7298
+ }
7299
+ ),
7300
+ "Yes"
7301
+ ]
7302
+ }
7303
+ )
7239
7304
  ] }),
7240
7305
  c.type === _.Option && /* @__PURE__ */ k("div", { className: "daga-relatively-positioned", children: /* @__PURE__ */ k(
7241
- Vi,
7306
+ Gi,
7242
7307
  {
7243
- disabled: !c.editable || !a,
7308
+ disabled: c.editable === !1 || !a,
7244
7309
  options: c.options || [],
7245
7310
  value: i == null ? void 0 : i.getValue(c.name),
7246
7311
  onChange: (d) => t(i, c, d)
7247
7312
  }
7248
7313
  ) }),
7249
7314
  (c.type === _.OptionList || c.type === _.OptionSet) && /* @__PURE__ */ k(
7250
- os,
7315
+ ls,
7251
7316
  {
7252
- disabled: !c.editable || !a,
7317
+ disabled: c.editable === !1 || !a,
7253
7318
  allowRepeats: c.type === _.OptionList,
7254
7319
  options: c.options || [],
7255
7320
  value: i == null ? void 0 : i.getValue(c.name),
@@ -7257,24 +7322,24 @@ const Se = ({
7257
7322
  }
7258
7323
  ),
7259
7324
  (c.type === _.TextList || c.type === _.TextSet) && /* @__PURE__ */ k(
7260
- ss,
7325
+ cs,
7261
7326
  {
7262
- disabled: !c.editable || !a,
7327
+ disabled: c.editable === !1 || !a,
7263
7328
  allowRepeats: c.type === _.TextList,
7264
7329
  value: i == null ? void 0 : i.getValue(c.name),
7265
7330
  onChange: (d) => t(i, c, d)
7266
7331
  }
7267
7332
  ),
7268
7333
  c.type === _.TextMap && /* @__PURE__ */ k(
7269
- ns,
7334
+ ds,
7270
7335
  {
7271
- disabled: !c.editable || !a,
7336
+ disabled: c.editable === !1 || !a,
7272
7337
  value: i == null ? void 0 : i.getValue(c.name),
7273
7338
  onChange: (d) => t(i, c, d)
7274
7339
  }
7275
7340
  ),
7276
7341
  c.type === _.Object && /* @__PURE__ */ k("div", { className: "daga-left-bar", children: /* @__PURE__ */ k(
7277
- _i,
7342
+ Bi,
7278
7343
  {
7279
7344
  valueSet: i.getSubValueSet(c.name),
7280
7345
  onValueChange: t,
@@ -7285,8 +7350,8 @@ const Se = ({
7285
7350
  },
7286
7351
  c.name
7287
7352
  )) });
7288
- }, Oi = ({ valueSet: i, depth: t }) => {
7289
- const e = Yt(Tt), o = ct(null), a = (r) => "daga-property-name-" + r.replace(/\s/g, ""), l = () => {
7353
+ }, Ui = ({ valueSet: i, depth: t }) => {
7354
+ const e = Wt($t), o = dt(null), a = (r) => "daga-property-name-" + r.replace(/\s/g, ""), l = () => {
7290
7355
  for (const r of (i == null ? void 0 : i.displayedProperties) || []) {
7291
7356
  let c = 0, d = 0, h = 0;
7292
7357
  const u = N.select(o.current).select(
@@ -7352,7 +7417,7 @@ const Se = ({
7352
7417
  if (i === void 0)
7353
7418
  return;
7354
7419
  let c;
7355
- r instanceof ro ? c = r : r instanceof Event ? c = i == null ? void 0 : i.propertySet.getProperty(
7420
+ r instanceof uo ? c = r : r instanceof Event ? c = i == null ? void 0 : i.propertySet.getProperty(
7356
7421
  ((d = r.target) == null ? void 0 : d.value) || ""
7357
7422
  ) : c = i == null ? void 0 : i.propertySet.getProperty(r || ""), c && (i == null || i.hideProperty(c)), l();
7358
7423
  };
@@ -7369,7 +7434,7 @@ const Se = ({
7369
7434
  className: `daga-property ${a(r.name)} daga-depth-${t}`,
7370
7435
  children: [
7371
7436
  /* @__PURE__ */ V("div", { className: "daga-property-name", children: [
7372
- /* @__PURE__ */ k("span", { children: r.name }),
7437
+ /* @__PURE__ */ k("span", { children: r.label || r.name }),
7373
7438
  /* @__PURE__ */ V("div", { className: "daga-buttons", children: [
7374
7439
  /* @__PURE__ */ k("button", { className: "daga-property-button daga-move-button", children: /* @__PURE__ */ k("div", { className: "daga-icon daga-move-icon" }) }),
7375
7440
  /* @__PURE__ */ k(
@@ -7382,9 +7447,9 @@ const Se = ({
7382
7447
  )
7383
7448
  ] })
7384
7449
  ] }),
7385
- r.type !== _.Object && /* @__PURE__ */ k("div", { className: "daga-property-value", children: rs(i == null ? void 0 : i.getValue(r.name)) }),
7450
+ r.type !== _.Object && /* @__PURE__ */ k("div", { className: "daga-property-value", children: hs(i == null ? void 0 : i.getValue(r.name)) }),
7386
7451
  r.type === _.Object && /* @__PURE__ */ k(
7387
- Oi,
7452
+ Ui,
7388
7453
  {
7389
7454
  valueSet: i == null ? void 0 : i.getSubValueSet(r.name),
7390
7455
  depth: t + 1
@@ -7404,76 +7469,76 @@ const Se = ({
7404
7469
  r.name
7405
7470
  ))
7406
7471
  ] });
7407
- }, rs = (i) => Array.isArray(i) ? i.join(", ") : ao(i) ? Object.entries(i).map((t) => t.map((e) => JSON.stringify(e)).join(": ")).join(", ") : i instanceof Date ? i.toLocaleString() : i == null ? "" : "" + i, as = ({ location: i, direction: t, width: e, title: o, valueSet: a, onValueChange: l }) => {
7408
- const s = ct(null), [n, r] = U(!1), [c, d] = U(!1), h = () => N.select(s.current);
7409
- return Et(() => {
7410
- if (s.current)
7472
+ }, hs = (i) => Array.isArray(i) ? i.join(", ") : mo(i) ? Object.entries(i).map((t) => t.map((e) => JSON.stringify(e)).join(": ")).join(", ") : i instanceof Date ? i.toLocaleString() : i == null ? "" : "" + i, gs = ({ location: i, direction: t, width: e, height: o, title: a, valueSet: l, onValueChange: s }) => {
7473
+ const n = dt(null), [r, c] = U(!1), [d, h] = U(!1), u = () => N.select(n.current);
7474
+ return Tt(() => {
7475
+ if (n.current)
7411
7476
  switch (t) {
7412
7477
  case b.Bottom:
7413
7478
  case b.Top:
7414
- h().style("width", e);
7479
+ u().style("width", e), o && u().select(".daga-panel-content").style("height", o);
7415
7480
  break;
7416
7481
  case b.Left:
7417
7482
  case b.Right:
7418
- h().style("height", e);
7483
+ u().style("height", e), o && u().select(".daga-panel-content").style("width", o);
7419
7484
  break;
7420
7485
  }
7421
7486
  }, [e, t]), /* @__PURE__ */ k("daga-property-editor", { children: /* @__PURE__ */ V(
7422
7487
  "div",
7423
7488
  {
7424
- ref: s,
7489
+ ref: n,
7425
7490
  className: `daga-panel daga-bottom daga-${i} daga-${t}`,
7426
7491
  children: [
7427
7492
  /* @__PURE__ */ k(
7428
- Se,
7493
+ Le,
7429
7494
  {
7430
- disabled: !a || !a.propertySet || !a.propertySet.hasProperties(),
7431
- collapsed: n,
7495
+ disabled: !l || !l.propertySet || !l.propertySet.hasProperties(),
7496
+ collapsed: r,
7432
7497
  direction: t,
7433
- collapsableSelector: s,
7498
+ collapsableSelector: n,
7434
7499
  collapsableAdditionalSelector: ".daga-panel-content",
7435
7500
  rule: "display",
7436
7501
  collapsedValue: "none",
7437
7502
  visibleValue: "block",
7438
- onCollapse: r
7503
+ onCollapse: c
7439
7504
  }
7440
7505
  ),
7441
- a && a.propertySet && a.propertySet.hasProperties() && !n && /* @__PURE__ */ V("div", { className: "daga-panel-content", children: [
7442
- o && /* @__PURE__ */ V("p", { className: "daga-title", children: [
7443
- o,
7506
+ /* @__PURE__ */ k("div", { className: "daga-panel-content", children: l && l.propertySet && l.propertySet.hasProperties() && !r && /* @__PURE__ */ V("div", { children: [
7507
+ a && /* @__PURE__ */ V("p", { className: "daga-title", children: [
7508
+ a,
7444
7509
  /* @__PURE__ */ k(
7445
7510
  "button",
7446
7511
  {
7447
7512
  className: "daga-property-button",
7448
- onClick: () => d(!c),
7513
+ onClick: () => h(!d),
7449
7514
  children: /* @__PURE__ */ k(
7450
7515
  "div",
7451
7516
  {
7452
- className: `daga-icon daga-settings-icon ${c ? "daga-unrotate" : "daga-rotate"}`
7517
+ className: `daga-icon daga-settings-icon ${d ? "daga-unrotate" : "daga-rotate"}`
7453
7518
  }
7454
7519
  )
7455
7520
  }
7456
7521
  )
7457
7522
  ] }),
7458
- !c && /* @__PURE__ */ k(
7459
- _i,
7523
+ !d && /* @__PURE__ */ k(
7524
+ Bi,
7460
7525
  {
7461
- valueSet: a,
7462
- onValueChange: l,
7526
+ valueSet: l,
7527
+ onValueChange: s,
7463
7528
  depth: 0
7464
7529
  }
7465
7530
  ),
7466
- c && /* @__PURE__ */ k(Oi, { valueSet: a, depth: 0 })
7467
- ] })
7531
+ d && /* @__PURE__ */ k(Ui, { valueSet: l, depth: 0 })
7532
+ ] }) })
7468
7533
  ]
7469
7534
  }
7470
7535
  ) });
7471
- }, ls = 6, cs = (i) => {
7472
- const t = Yt(Tt), [e, o] = U(
7536
+ }, us = 6, ms = (i) => {
7537
+ const t = Wt($t), [e, o] = U(
7473
7538
  i.currentPalette || i.palettes[0]
7474
7539
  ), [a, l] = U(0), [s, n] = U(
7475
7540
  void 0
7476
- ), r = ct(null), c = (m) => {
7541
+ ), r = dt(null), c = (m) => {
7477
7542
  if (o(m), d().selectAll("*").remove(), l(t.getPriorityThreshold() || 0), m.categories && h(m.categories), m.templates)
7478
7543
  for (const g of m.templates)
7479
7544
  u(g);
@@ -7503,7 +7568,7 @@ const Se = ({
7503
7568
  }, p = (m, g, v) => {
7504
7569
  if (a !== void 0 && m.priority < a)
7505
7570
  return;
7506
- const w = m.defaultLook.lookType === "shaped-look" ? m.defaultLook.borderThickness : 0, y = m.defaultHeight + w, A = m.defaultWidth + w, I = g.height || y, E = g.width || A, $ = d().append("div").attr(
7571
+ const w = m.defaultLook.lookType === "shaped-look" ? m.defaultLook.borderThickness || 1 : 0, y = m.defaultHeight + w, A = m.defaultWidth + w, I = g.height || y, E = g.width || A, $ = d().append("div").attr(
7507
7572
  "class",
7508
7573
  `daga-template-container ${v !== void 0 ? v : ""}`
7509
7574
  ).style("width", `${E}px`).style("height", `${I}px`).call(
@@ -7528,7 +7593,7 @@ const Se = ({
7528
7593
  var T;
7529
7594
  if (t.canUserPerformAction(S.AddNode)) {
7530
7595
  if (x(P.Auto), $.style("position", "relative").style("left", 0).style("top", 0).style("z-index", "auto"), m.isUnique && t.model.nodes.find(
7531
- (xt) => !xt.removed && xt.type.id === m.id
7596
+ (Lt) => !Lt.removed && Lt.type.id === m.id
7532
7597
  ) !== void 0)
7533
7598
  return;
7534
7599
  const z = t.getPointerLocationRelativeToScreen(R);
@@ -7552,24 +7617,24 @@ const Se = ({
7552
7617
  D[0],
7553
7618
  D[1]
7554
7619
  ).filter(
7555
- (xt) => xt.type.childrenTypes.includes(m.id)
7556
- ), W = Ii(
7620
+ (Lt) => Lt.type.childrenTypes.includes(m.id)
7621
+ ), W = $i(
7557
7622
  Y
7558
- ), at = W[W.length - 1];
7559
- if (!m.canBeParentless && at === void 0)
7623
+ ), lt = W[W.length - 1];
7624
+ if (!m.canBeParentless && lt === void 0)
7560
7625
  return;
7561
- const ut = at == null ? void 0 : at.getLastAncestor(), _t = new xo(
7626
+ const mt = lt == null ? void 0 : lt.getLastAncestor(), Dt = new Mo(
7562
7627
  t,
7563
7628
  m,
7564
7629
  q,
7565
- at == null ? void 0 : at.id,
7566
- ut == null ? void 0 : ut.id,
7567
- ut == null ? void 0 : ut.getGeometry(),
7630
+ lt == null ? void 0 : lt.id,
7631
+ mt == null ? void 0 : mt.id,
7632
+ mt == null ? void 0 : mt.getGeometry(),
7568
7633
  void 0,
7569
7634
  g.label,
7570
7635
  g.values
7571
7636
  );
7572
- _t.do(), t == null || t.actionStack.add(_t), x();
7637
+ Dt.do(), t == null || t.actionStack.add(Dt), x();
7573
7638
  }
7574
7639
  })
7575
7640
  ).append("svg").attr("class", `palette-node ${m.id}`).attr("viewBox", `0 0 ${A} ${y}`).attr("preserveAspectRatio", "none").style("position", "relative").style("left", 0).style("top", 0).style("width", `${E}px`).style("height", `${I}px`), C = g.look || m.defaultLook;
@@ -7577,14 +7642,14 @@ const Se = ({
7577
7642
  case "shaped-look":
7578
7643
  $.append("path").attr(
7579
7644
  "d",
7580
- ve(
7581
- C.shape,
7582
- C.borderThickness / 2,
7583
- C.borderThickness / 2,
7645
+ ke(
7646
+ C.shape || _t.Rectangle,
7647
+ (C.borderThickness || 1) / 2,
7648
+ (C.borderThickness || 1) / 2,
7584
7649
  m.defaultWidth,
7585
7650
  m.defaultHeight
7586
7651
  )
7587
- ).attr("fill", C.fillColor).attr("stroke", C.borderColor).attr("stroke-width", `${C.borderThickness}px`);
7652
+ ).attr("fill", C.fillColor || "#FFFFFF").attr("stroke", C.borderColor || "#000000").attr("stroke-width", `${C.borderThickness}px`);
7588
7653
  break;
7589
7654
  case "image-look":
7590
7655
  $.append("image").attr("x", 0).attr("y", 0).attr("width", m.defaultWidth).attr("height", m.defaultHeight).attr("href", C.backgroundImage).attr("preserveAspectRatio", "none");
@@ -7619,7 +7684,7 @@ const Se = ({
7619
7684
  ).html(R.html);
7620
7685
  if (g.label) {
7621
7686
  const R = {
7622
- ...H,
7687
+ ...F,
7623
7688
  ...m.label,
7624
7689
  ...g.labelLook
7625
7690
  };
@@ -7638,8 +7703,8 @@ const Se = ({
7638
7703
  });
7639
7704
  w.append("path").attr(
7640
7705
  "d",
7641
- ve(
7642
- Qt.Rectangle,
7706
+ ke(
7707
+ _t.Rectangle,
7643
7708
  0,
7644
7709
  0,
7645
7710
  g.width,
@@ -7647,19 +7712,19 @@ const Se = ({
7647
7712
  )
7648
7713
  ).attr("fill", g.backgroundColor).attr("stroke", "black").attr("stroke-width", "1px"), g.icon !== "" && w.append("image").attr("x", 0).attr("y", 0).attr("width", g.width).attr("height", g.height).attr("href", g.icon), g.label !== "" && w.append("text").attr(
7649
7714
  "transform",
7650
- `translate(${g.width / 2},${g.height / 2 + ls})`
7715
+ `translate(${g.width / 2},${g.height / 2 + us})`
7651
7716
  ).attr("x", 0).attr("y", 0).attr("font-size", "20px").attr("text-anchor", "middle").attr("font-family", "'Wonder Unit Sans', sans-serif").attr("font-weight", 400).attr("fill", "#000000").attr("stroke", "none").style("font-kerning", "none").style("user-select", "none").text(g.label);
7652
7717
  };
7653
- return Et(() => {
7718
+ return Tt(() => {
7654
7719
  if (c(i.palettes[0]), r.current)
7655
7720
  switch (i.direction) {
7656
7721
  case b.Bottom:
7657
7722
  case b.Top:
7658
- r.current.style.width = i.width;
7723
+ r.current.style.width = i.width, i.height && (r.current.style.height = i.height);
7659
7724
  break;
7660
7725
  case b.Left:
7661
7726
  case b.Right:
7662
- r.current.style.height = i.width;
7727
+ r.current.style.height = i.width, i.height && (r.current.style.width = i.height);
7663
7728
  break;
7664
7729
  }
7665
7730
  }, [e, i.palettes]), /* @__PURE__ */ k("daga-palette", { children: /* @__PURE__ */ V(
@@ -7669,7 +7734,7 @@ const Se = ({
7669
7734
  className: `daga-panel daga-${i.location} daga-${i.direction}`,
7670
7735
  children: [
7671
7736
  /* @__PURE__ */ k(
7672
- Se,
7737
+ Le,
7673
7738
  {
7674
7739
  direction: i.direction,
7675
7740
  collapsableSelector: r,
@@ -7695,7 +7760,7 @@ const Se = ({
7695
7760
  ]
7696
7761
  }
7697
7762
  ) });
7698
- }, ds = ({
7763
+ }, fs = ({
7699
7764
  location: i,
7700
7765
  direction: t,
7701
7766
  enableAction: e,
@@ -7719,42 +7784,42 @@ const Se = ({
7719
7784
  d = "width", h = "scaleX", u = "left", p = "right";
7720
7785
  break;
7721
7786
  }
7722
- const f = ct(null), m = ct(null), g = ct(null);
7723
- Et(() => {
7787
+ const f = dt(null), m = dt(null), g = dt(null);
7788
+ Tt(() => {
7724
7789
  N.select(
7725
7790
  f.current
7726
7791
  ).style(`margin-${p}`, "-1rem").style(d, "0rem").style("transform", `${h}(0)`).style("transform-origin", u);
7727
7792
  });
7728
7793
  const v = async () => {
7729
- const G = N.select(
7794
+ const H = N.select(
7730
7795
  f.current
7731
7796
  );
7732
7797
  if (!c)
7733
7798
  if (r) {
7734
7799
  r = !1;
7735
- const at = `${4 * G.selectChildren().size()}rem`;
7736
- G.transition().duration(500).ease(N.easeLinear).style(d, at).style("transform", `${h}(1)`), setTimeout(() => {
7800
+ const lt = `${4 * H.selectChildren().size()}rem`;
7801
+ H.transition().duration(500).ease(N.easeLinear).style(d, lt).style("transform", `${h}(1)`), setTimeout(() => {
7737
7802
  c = !1;
7738
7803
  }, 500);
7739
7804
  } else
7740
- r = !0, G.transition().duration(500).ease(N.easeLinear).style(d, "0rem").style("transform", `${h}(0)`), setTimeout(() => {
7805
+ r = !0, H.transition().duration(500).ease(N.easeLinear).style(d, "0rem").style("transform", `${h}(0)`), setTimeout(() => {
7741
7806
  c = !1;
7742
7807
  }, 500);
7743
- }, w = Yt(Tt), y = () => {
7808
+ }, w = Wt($t), y = () => {
7744
7809
  w.zoomBy(w.zoomFactor);
7745
7810
  }, A = () => {
7746
7811
  w.zoomBy(1 / w.zoomFactor);
7747
7812
  }, I = () => {
7748
7813
  w.center();
7749
7814
  }, E = () => {
7750
- w.layoutFormat && w.layoutFormat in ui && ui[w.layoutFormat].apply(w.model);
7815
+ w.layoutFormat && w.layoutFormat in ki && ki[w.layoutFormat].apply(w.model);
7751
7816
  }, $ = () => {
7752
7817
  n = !n, N.select(
7753
7818
  g.current
7754
7819
  ).classed("daga-on", n).classed("daga-off", !n);
7755
- const G = w.getPriorityThresholdOptions();
7756
- G && G.length >= 2 && w.setPriorityThreshold(
7757
- G[n ? 1 : 0]
7820
+ const H = w.getPriorityThresholdOptions();
7821
+ H && H.length >= 2 && w.setPriorityThreshold(
7822
+ H[n ? 1 : 0]
7758
7823
  );
7759
7824
  }, C = () => {
7760
7825
  w.actionStack.undo();
@@ -7772,10 +7837,10 @@ const Se = ({
7772
7837
  w.multipleSelectionOn = !0, N.select(
7773
7838
  m.current
7774
7839
  ).classed("daga-on", !0).classed("daga-off", !1);
7775
- const G = w.diagramEvent$.subscribe((Y) => {
7776
- Y.type === Ei.Selection && (N.select(
7840
+ const H = w.diagramEvent$.subscribe((Y) => {
7841
+ Y.type === zi.Selection && (N.select(
7777
7842
  m.current
7778
- ).classed("daga-on", !1).classed("daga-off", !0), G.unsubscribe());
7843
+ ).classed("daga-on", !1).classed("daga-off", !0), H.unsubscribe());
7779
7844
  });
7780
7845
  };
7781
7846
  return /* @__PURE__ */ k("daga-diagram-buttons", { children: /* @__PURE__ */ V(
@@ -7801,15 +7866,15 @@ const Se = ({
7801
7866
  ]
7802
7867
  }
7803
7868
  ) });
7804
- }, ms = ({
7869
+ }, bs = ({
7805
7870
  config: i,
7806
7871
  model: t,
7807
7872
  onCanvasCreated: e,
7808
7873
  onDiagramEvent: o,
7809
7874
  onModelChange: a
7810
7875
  }) => {
7811
- var $, C, R, T, z, j, D, q, G, Y, W, at, ut, _t, xt, Ie, Ae, xe, Le, Ee, Te, $e, Me, Ne, Pe, ze, Re, Ve, _e, Oe, De, He, Ge, Be, Fe, Ue, Ye, Xe, je, We, Ze, Ke, qe, Je, Qe;
7812
- const l = new Li(), s = new Mi(), n = ct(null), r = ct(void 0), c = ct(!1), d = [], [h, u] = U(void 0), [p, f] = U(void 0), m = {
7876
+ var $, C, R, T, z, j, D, q, H, Y, W, lt, mt, Dt, Lt, Ee, Te, $e, Me, Ne, Pe, ze, Re, Ve, _e, Oe, De, Fe, He, Ge, Be, Ue, Ye, Xe, je, We, Ze, Ke, qe, Je, Qe, ti, ei, ii, oi, si, ni, ri, ai;
7877
+ const l = new Pi(), s = new _i(), n = dt(null), r = dt(void 0), c = dt(!1), d = [], [h, u] = U(void 0), [p, f] = U(void 0), m = {
7813
7878
  zoomIn: () => {
7814
7879
  },
7815
7880
  zoomOut: () => {
@@ -7827,82 +7892,84 @@ const Se = ({
7827
7892
  }, g = {
7828
7893
  refreshPalette: () => {
7829
7894
  }
7830
- }, v = new Qo(
7831
- (ht) => u(ht),
7832
- (ht) => f(ht)
7895
+ }, v = new ss(
7896
+ (gt) => u(gt),
7897
+ (gt) => f(gt)
7833
7898
  ), w = {
7834
7899
  diagramButtons: m,
7835
7900
  palette: g,
7836
7901
  propertyEditor: v
7837
- }, y = (ht = !1) => ((!r.current || ht) && (d.forEach((mt) => mt.unsubscribe()), r.current = new be(w, i)), r.current), A = y(), I = (ht) => {
7838
- A.initView(ht), d.push(
7839
- A.diagramEvent$.subscribe((mt) => {
7840
- o == null || o(mt);
7902
+ }, y = (gt = !1) => ((!r.current || gt) && (d.forEach((ft) => ft.unsubscribe()), r.current = new Ce(w, i)), r.current), A = y(), I = (gt) => {
7903
+ A.initView(gt), d.push(
7904
+ A.diagramEvent$.subscribe((ft) => {
7905
+ o == null || o(ft);
7841
7906
  })
7842
7907
  ), d.push(
7843
7908
  A.diagramChange$.subscribe(() => {
7844
- const mt = s.export(A.model);
7845
- a == null || a(mt);
7909
+ const ft = s.export(A.model);
7910
+ a == null || a(ft);
7846
7911
  })
7847
7912
  );
7848
7913
  };
7849
- Et(() => {
7914
+ Tt(() => {
7850
7915
  n.current && (c.current || (I(n.current), c.current = !0, e == null || e(A)));
7851
- }, [n.current]), Fi(() => {
7916
+ }, [n.current]), Zi(() => {
7852
7917
  n.current && (y(!0), I(n.current), e == null || e(A));
7853
- }, [i]), Et(() => {
7918
+ }, [i]), Tt(() => {
7854
7919
  t && l.import(A.model, t);
7855
7920
  }, [t]);
7856
- const E = (ht, mt, ti) => {
7857
- var ei;
7858
- if (p !== void 0 && mt.editable && !Lt(ht.getValue(mt.name), ti)) {
7859
- ht.setValue(mt.name, ti);
7860
- const ae = new St(
7921
+ const E = (gt, ft, li) => {
7922
+ var ci;
7923
+ if (p !== void 0 && ft.editable !== !1 && !Et(gt.getValue(ft.name), li)) {
7924
+ gt.setValue(ft.name, li);
7925
+ const ce = new It(
7861
7926
  p.propertySet,
7862
7927
  p.rootElement
7863
7928
  );
7864
- ae.setValues(p.getValues()), v.valueSet = ae, p.rootElement.valueSet = ae, (ei = A.propertyEditorChanges$) == null || ei.next();
7929
+ ce.setValues(p.getValues()), v.valueSet = ce, p.rootElement.valueSet = ce, (ci = A.propertyEditorChanges$) == null || ci.next();
7865
7930
  }
7866
7931
  };
7867
- return /* @__PURE__ */ k("daga-diagram", { children: /* @__PURE__ */ k(Jo.Provider, { value: i, children: /* @__PURE__ */ k(Tt.Provider, { value: A, children: /* @__PURE__ */ V("daga-diagram-editor", { children: [
7932
+ return /* @__PURE__ */ k("daga-diagram", { children: /* @__PURE__ */ k(os.Provider, { value: i, children: /* @__PURE__ */ k($t.Provider, { value: A, children: /* @__PURE__ */ V("daga-diagram-editor", { children: [
7868
7933
  /* @__PURE__ */ k("div", { className: "daga-append-to", ref: n }),
7869
- /* @__PURE__ */ V(Tt.Provider, { value: A, children: [
7934
+ /* @__PURE__ */ V($t.Provider, { value: A, children: [
7870
7935
  (($ = i.components) == null ? void 0 : $.buttons) !== void 0 && ((R = (C = i.components) == null ? void 0 : C.buttons) == null ? void 0 : R.enabled) !== !1 && /* @__PURE__ */ k(
7871
- ds,
7936
+ fs,
7872
7937
  {
7873
- location: ((z = (T = i.components) == null ? void 0 : T.buttons) == null ? void 0 : z.location) || Wt.BottomRight,
7938
+ location: ((z = (T = i.components) == null ? void 0 : T.buttons) == null ? void 0 : z.location) || qt.BottomRight,
7874
7939
  direction: ((D = (j = i.components) == null ? void 0 : j.buttons) == null ? void 0 : D.direction) || b.Top,
7875
- enableAction: ((G = (q = i.components) == null ? void 0 : q.buttons) == null ? void 0 : G.enableAction) !== !1,
7940
+ enableAction: ((H = (q = i.components) == null ? void 0 : q.buttons) == null ? void 0 : H.enableAction) !== !1,
7876
7941
  enableFilter: ((W = (Y = i.components) == null ? void 0 : Y.buttons) == null ? void 0 : W.enableFilter) === !0,
7877
- enableLayout: ((ut = (at = i.components) == null ? void 0 : at.buttons) == null ? void 0 : ut.enableLayout) === !0,
7878
- enableSelection: ((xt = (_t = i.components) == null ? void 0 : _t.buttons) == null ? void 0 : xt.enableSelection) !== !1,
7879
- enableZoom: ((Ae = (Ie = i.components) == null ? void 0 : Ie.buttons) == null ? void 0 : Ae.enableZoom) !== !1
7942
+ enableLayout: ((mt = (lt = i.components) == null ? void 0 : lt.buttons) == null ? void 0 : mt.enableLayout) === !0,
7943
+ enableSelection: ((Lt = (Dt = i.components) == null ? void 0 : Dt.buttons) == null ? void 0 : Lt.enableSelection) !== !1,
7944
+ enableZoom: ((Te = (Ee = i.components) == null ? void 0 : Ee.buttons) == null ? void 0 : Te.enableZoom) !== !1
7880
7945
  }
7881
7946
  ),
7882
- ((xe = i.components) == null ? void 0 : xe.palette) !== void 0 && ((Ee = (Le = i.components) == null ? void 0 : Le.palette) == null ? void 0 : Ee.enabled) !== !1 && (($e = (Te = i.components) == null ? void 0 : Te.palette) == null ? void 0 : $e.sections) && (((Pe = (Ne = (Me = i.components) == null ? void 0 : Me.palette) == null ? void 0 : Ne.sections) == null ? void 0 : Pe.length) || 0) > 0 && /* @__PURE__ */ k(
7883
- cs,
7947
+ (($e = i.components) == null ? void 0 : $e.palette) !== void 0 && ((Ne = (Me = i.components) == null ? void 0 : Me.palette) == null ? void 0 : Ne.enabled) !== !1 && ((ze = (Pe = i.components) == null ? void 0 : Pe.palette) == null ? void 0 : ze.sections) && (((_e = (Ve = (Re = i.components) == null ? void 0 : Re.palette) == null ? void 0 : Ve.sections) == null ? void 0 : _e.length) || 0) > 0 && /* @__PURE__ */ k(
7948
+ ms,
7884
7949
  {
7885
- location: ((Re = (ze = i.components) == null ? void 0 : ze.palette) == null ? void 0 : Re.location) || Wt.TopLeft,
7886
- direction: ((_e = (Ve = i.components) == null ? void 0 : Ve.palette) == null ? void 0 : _e.direction) || b.Bottom,
7887
- width: ((De = (Oe = i.components) == null ? void 0 : Oe.palette) == null ? void 0 : De.width) || "12rem",
7888
- palettes: ((Ge = (He = i.components) == null ? void 0 : He.palette) == null ? void 0 : Ge.sections) || []
7950
+ location: ((De = (Oe = i.components) == null ? void 0 : Oe.palette) == null ? void 0 : De.location) || qt.TopLeft,
7951
+ direction: ((He = (Fe = i.components) == null ? void 0 : Fe.palette) == null ? void 0 : He.direction) || b.Bottom,
7952
+ width: ((Be = (Ge = i.components) == null ? void 0 : Ge.palette) == null ? void 0 : Be.width) || "12rem",
7953
+ height: (Ye = (Ue = i.components) == null ? void 0 : Ue.palette) == null ? void 0 : Ye.height,
7954
+ palettes: ((je = (Xe = i.components) == null ? void 0 : Xe.palette) == null ? void 0 : je.sections) || []
7889
7955
  }
7890
7956
  ),
7891
- ((Be = i.components) == null ? void 0 : Be.propertyEditor) !== void 0 && ((Ue = (Fe = i.components) == null ? void 0 : Fe.propertyEditor) == null ? void 0 : Ue.enabled) !== !1 && /* @__PURE__ */ k(
7892
- as,
7957
+ ((We = i.components) == null ? void 0 : We.propertyEditor) !== void 0 && ((Ke = (Ze = i.components) == null ? void 0 : Ze.propertyEditor) == null ? void 0 : Ke.enabled) !== !1 && /* @__PURE__ */ k(
7958
+ gs,
7893
7959
  {
7894
- location: ((Xe = (Ye = i.components) == null ? void 0 : Ye.propertyEditor) == null ? void 0 : Xe.location) || Wt.TopRight,
7895
- direction: ((We = (je = i.components) == null ? void 0 : je.propertyEditor) == null ? void 0 : We.direction) || b.Bottom,
7896
- width: ((Ke = (Ze = i.components) == null ? void 0 : Ze.propertyEditor) == null ? void 0 : Ke.width) || "24rem",
7960
+ location: ((Je = (qe = i.components) == null ? void 0 : qe.propertyEditor) == null ? void 0 : Je.location) || qt.TopRight,
7961
+ direction: ((ti = (Qe = i.components) == null ? void 0 : Qe.propertyEditor) == null ? void 0 : ti.direction) || b.Bottom,
7962
+ width: ((ii = (ei = i.components) == null ? void 0 : ei.propertyEditor) == null ? void 0 : ii.width) || "24rem",
7963
+ height: (si = (oi = i.components) == null ? void 0 : oi.propertyEditor) == null ? void 0 : si.height,
7897
7964
  title: h,
7898
7965
  valueSet: p,
7899
7966
  onValueChange: E
7900
7967
  }
7901
7968
  ),
7902
- ((qe = i.components) == null ? void 0 : qe.errors) !== void 0 && ((Qe = (Je = i.components) == null ? void 0 : Je.errors) == null ? void 0 : Qe.enabled) !== !1 && /* @__PURE__ */ k(ts, {})
7969
+ ((ni = i.components) == null ? void 0 : ni.errors) !== void 0 && ((ai = (ri = i.components) == null ? void 0 : ri.errors) == null ? void 0 : ai.enabled) !== !1 && /* @__PURE__ */ k(ns, {})
7903
7970
  ] })
7904
7971
  ] }) }) }) });
7905
7972
  };
7906
7973
  export {
7907
- ms as DagaDiagram
7974
+ bs as DagaDiagram
7908
7975
  };