lowcoder-comps 2.4.13 → 2.4.15

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.
Files changed (51) hide show
  1. package/{0fa873f8.js → 0bb0c92e.js} +4 -4
  2. package/{1d0578cc.js → 0cc36377.js} +919 -969
  3. package/{4ee1107f.js → 0fa86771.js} +411 -451
  4. package/{7ceb1a86.js → 19a2ee87.js} +1067 -1085
  5. package/{62a4e802.js → 1b41afb7.js} +6 -6
  6. package/{140d1965.js → 1e5b4466.js} +1 -1
  7. package/21ce624b.js +433 -0
  8. package/247d363c.js +797 -0
  9. package/{66d40f47.js → 2dc10e5c.js} +96 -99
  10. package/{48262065.js → 3a91cb5c.js} +8 -8
  11. package/{bfff0c9e.js → 3ebe8123.js} +26 -27
  12. package/{e60eb1d6.js → 3f2bde45.js} +1 -1
  13. package/{08ce8965.js → 4046c39a.js} +247 -258
  14. package/{256b619e.js → 428ebac9.js} +14 -15
  15. package/{f85b9955.js → 4b8936b0.js} +68 -69
  16. package/{722d14f3.js → 4d48e6df.js} +6 -6
  17. package/{93e77b54.js → 558e8ee5.js} +4 -4
  18. package/{d2b89014.js → 56f6e990.js} +92 -92
  19. package/{6c5168e9.js → 5a31cef7.js} +2 -2
  20. package/{7873457c.js → 5d41cf38.js} +6 -6
  21. package/{5d259708.js → 5fd9a898.js} +4 -5
  22. package/{2c7a98c7.js → 63a771ab.js} +8 -8
  23. package/6a32f1c1.js +206 -0
  24. package/{e7717e30.js → 7035666f.js} +7 -7
  25. package/{c840f94c.js → 74ef17ae.js} +140 -141
  26. package/{eeeac330.js → 7cc252e4.js} +65540 -59868
  27. package/81d6ce63.js +817 -0
  28. package/{c8211b18.js → 832e744b.js} +1 -1
  29. package/{81a0d6f1.js → 8718dc59.js} +12 -12
  30. package/{7a22ada0.js → 88953f96.js} +18 -18
  31. package/a8d4a50e.js +373 -0
  32. package/aa88392e.js +190 -0
  33. package/b0862b2f.js +1083 -0
  34. package/{62c4dc6e.js → c1b710aa.js} +5 -5
  35. package/{4cf9b6b3.js → d72b57c8.js} +12713 -12735
  36. package/{629dfdca.js → e441921a.js} +4 -4
  37. package/{47848c42.js → e5b014a9.js} +5 -5
  38. package/{b7fefb34.js → eb3bf879.js} +2 -2
  39. package/{febae45b.js → eb5cf40c.js} +2 -2
  40. package/{ddee0e99.js → edc74d11.js} +3 -3
  41. package/f0f41787.js +1264 -0
  42. package/index.js +2 -2
  43. package/package.json +1 -1
  44. package/1de1a3c9.js +0 -1102
  45. package/2510669f.js +0 -237
  46. package/68ee7280.js +0 -1276
  47. package/89baa2e6.js +0 -391
  48. package/9dc6adcd.js +0 -819
  49. package/ab55adad.js +0 -818
  50. package/c459c043.js +0 -208
  51. package/e47dc9ca.js +0 -455
@@ -1,141 +1,113 @@
1
- var ve = Object.defineProperty, Ne = Object.defineProperties;
2
- var ke = Object.getOwnPropertyDescriptors;
3
- var ue = Object.getOwnPropertySymbols;
4
- var Ie = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
- var he = (e, a, l) => a in e ? ve(e, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[a] = l, V = (e, a) => {
6
- for (var l in a || (a = {}))
7
- Ie.call(a, l) && he(e, l, a[l]);
8
- if (ue)
9
- for (var l of ue(a))
10
- Oe.call(a, l) && he(e, l, a[l]);
11
- return e;
12
- }, U = (e, a) => Ne(e, ke(a));
13
- var K = (e, a, l) => new Promise((u, n) => {
14
- var p = (f) => {
15
- try {
16
- b(l.next(f));
17
- } catch (g) {
18
- n(g);
19
- }
20
- }, o = (f) => {
21
- try {
22
- b(l.throw(f));
23
- } catch (g) {
24
- n(g);
25
- }
26
- }, b = (f) => f.done ? u(f.value) : Promise.resolve(f.value).then(p, o);
27
- b((l = l.apply(e, a)).next());
28
- });
29
- import { e as Te, _ as ne, j as J, k as ze, l as S, H as Ce, D as Ae, q as Re } from "./eeeac330.js";
30
- import { c as Be } from "./c8211b18.js";
31
- import { i as Pe, c as Fe, b as Ke, d as Me, a as xe, p as Ye } from "./1de1a3c9.js";
32
- import { G as We } from "./b7fefb34.js";
33
- import { o as je } from "./92e85b65.js";
34
- import { s as Ve } from "./2ff7471d.js";
35
- import { c as Ue } from "./140d1965.js";
36
- import "./5d259708.js";
37
- import "./6c5168e9.js";
1
+ import { e as _e, _ as se, j as H, k as ye, l as S, H as Ee, D as we, q as De } from "./7cc252e4.js";
2
+ import { c as ve } from "./832e744b.js";
3
+ import { i as Ne, c as ke, b as Ie, d as Oe, a as he, p as Te } from "./b0862b2f.js";
4
+ import { G as ze } from "./eb3bf879.js";
5
+ import { o as Ce } from "./92e85b65.js";
6
+ import { s as Ae } from "./2ff7471d.js";
7
+ import { c as Re } from "./1e5b4466.js";
8
+ import "./5fd9a898.js";
9
+ import "./5a31cef7.js";
38
10
  import "./2ff2c7a6.js";
39
- import "./256b619e.js";
11
+ import "./428ebac9.js";
40
12
  import "./f9637058.js";
41
- var de, ge, ie = function() {
42
- var e = function(D, c, s, i) {
43
- for (s = s || {}, i = D.length; i--; s[D[i]] = c)
13
+ var le, oe, ee = function() {
14
+ var e = function(D, o, s, i) {
15
+ for (s = s || {}, i = D.length; i--; s[D[i]] = o)
44
16
  ;
45
17
  return s;
46
- }, a = [1, 7], l = [1, 13], u = [1, 14], n = [1, 15], p = [1, 19], o = [1, 16], b = [1, 17], f = [1, 18], g = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], y = [1, 23], T = [1, 24], v = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], N = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], L = {
18
+ }, a = [1, 7], d = [1, 13], c = [1, 14], n = [1, 15], g = [1, 19], l = [1, 16], f = [1, 17], b = [1, 18], p = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], y = [1, 23], T = [1, 24], v = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], N = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], L = {
47
19
  trace: function() {
48
20
  },
49
21
  yy: {},
50
22
  symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 34, DIR: 35, NODE_DSTART: 36, NODE_DEND: 37, BLOCK_ARROW_START: 38, BLOCK_ARROW_END: 39, classDef: 40, CLASSDEF_ID: 41, CLASSDEF_STYLEOPTS: 42, DEFAULT: 43, class: 44, CLASSENTITY_IDS: 45, STYLECLASS: 46, style: 47, STYLE_ENTITY_IDS: 48, STYLE_DEFINITION_DATA: 49, $accept: 0, $end: 1 },
51
23
  terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
52
24
  productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
53
- performAction: function(c, s, i, h, d, t, m) {
25
+ performAction: function(o, s, i, u, h, t, m) {
54
26
  var r = t.length - 1;
55
- switch (d) {
27
+ switch (h) {
56
28
  case 4:
57
- h.getLogger().debug("Rule: separator (NL) ");
29
+ u.getLogger().debug("Rule: separator (NL) ");
58
30
  break;
59
31
  case 5:
60
- h.getLogger().debug("Rule: separator (Space) ");
32
+ u.getLogger().debug("Rule: separator (Space) ");
61
33
  break;
62
34
  case 6:
63
- h.getLogger().debug("Rule: separator (EOF) ");
35
+ u.getLogger().debug("Rule: separator (EOF) ");
64
36
  break;
65
37
  case 7:
66
- h.getLogger().debug("Rule: hierarchy: ", t[r - 1]), h.setHierarchy(t[r - 1]);
38
+ u.getLogger().debug("Rule: hierarchy: ", t[r - 1]), u.setHierarchy(t[r - 1]);
67
39
  break;
68
40
  case 8:
69
- h.getLogger().debug("Stop NL ");
41
+ u.getLogger().debug("Stop NL ");
70
42
  break;
71
43
  case 9:
72
- h.getLogger().debug("Stop EOF ");
44
+ u.getLogger().debug("Stop EOF ");
73
45
  break;
74
46
  case 10:
75
- h.getLogger().debug("Stop NL2 ");
47
+ u.getLogger().debug("Stop NL2 ");
76
48
  break;
77
49
  case 11:
78
- h.getLogger().debug("Stop EOF2 ");
50
+ u.getLogger().debug("Stop EOF2 ");
79
51
  break;
80
52
  case 12:
81
- h.getLogger().debug("Rule: statement: ", t[r]), typeof t[r].length == "number" ? this.$ = t[r] : this.$ = [t[r]];
53
+ u.getLogger().debug("Rule: statement: ", t[r]), typeof t[r].length == "number" ? this.$ = t[r] : this.$ = [t[r]];
82
54
  break;
83
55
  case 13:
84
- h.getLogger().debug("Rule: statement #2: ", t[r - 1]), this.$ = [t[r - 1]].concat(t[r]);
56
+ u.getLogger().debug("Rule: statement #2: ", t[r - 1]), this.$ = [t[r - 1]].concat(t[r]);
85
57
  break;
86
58
  case 14:
87
- h.getLogger().debug("Rule: link: ", t[r], c), this.$ = { edgeTypeStr: t[r], label: "" };
59
+ u.getLogger().debug("Rule: link: ", t[r], o), this.$ = { edgeTypeStr: t[r], label: "" };
88
60
  break;
89
61
  case 15:
90
- h.getLogger().debug("Rule: LABEL link: ", t[r - 3], t[r - 1], t[r]), this.$ = { edgeTypeStr: t[r], label: t[r - 1] };
62
+ u.getLogger().debug("Rule: LABEL link: ", t[r - 3], t[r - 1], t[r]), this.$ = { edgeTypeStr: t[r], label: t[r - 1] };
91
63
  break;
92
64
  case 18:
93
- const R = parseInt(t[r]), W = h.generateId();
94
- this.$ = { id: W, type: "space", label: "", width: R, children: [] };
65
+ const R = parseInt(t[r]), Y = u.generateId();
66
+ this.$ = { id: Y, type: "space", label: "", width: R, children: [] };
95
67
  break;
96
68
  case 23:
97
- h.getLogger().debug("Rule: (nodeStatement link node) ", t[r - 2], t[r - 1], t[r], " typestr: ", t[r - 1].edgeTypeStr);
98
- const F = h.edgeStrToEdgeData(t[r - 1].edgeTypeStr);
69
+ u.getLogger().debug("Rule: (nodeStatement link node) ", t[r - 2], t[r - 1], t[r], " typestr: ", t[r - 1].edgeTypeStr);
70
+ const F = u.edgeStrToEdgeData(t[r - 1].edgeTypeStr);
99
71
  this.$ = [
100
72
  { id: t[r - 2].id, label: t[r - 2].label, type: t[r - 2].type, directions: t[r - 2].directions },
101
73
  { id: t[r - 2].id + "-" + t[r].id, start: t[r - 2].id, end: t[r].id, label: t[r - 1].label, type: "edge", directions: t[r].directions, arrowTypeEnd: F, arrowTypeStart: "arrow_open" },
102
- { id: t[r].id, label: t[r].label, type: h.typeStr2Type(t[r].typeStr), directions: t[r].directions }
74
+ { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions }
103
75
  ];
104
76
  break;
105
77
  case 24:
106
- h.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[r - 1], t[r]), this.$ = { id: t[r - 1].id, label: t[r - 1].label, type: h.typeStr2Type(t[r - 1].typeStr), directions: t[r - 1].directions, widthInColumns: parseInt(t[r], 10) };
78
+ u.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[r - 1], t[r]), this.$ = { id: t[r - 1].id, label: t[r - 1].label, type: u.typeStr2Type(t[r - 1].typeStr), directions: t[r - 1].directions, widthInColumns: parseInt(t[r], 10) };
107
79
  break;
108
80
  case 25:
109
- h.getLogger().debug("Rule: nodeStatement (node) ", t[r]), this.$ = { id: t[r].id, label: t[r].label, type: h.typeStr2Type(t[r].typeStr), directions: t[r].directions, widthInColumns: 1 };
81
+ u.getLogger().debug("Rule: nodeStatement (node) ", t[r]), this.$ = { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions, widthInColumns: 1 };
110
82
  break;
111
83
  case 26:
112
- h.getLogger().debug("APA123", this ? this : "na"), h.getLogger().debug("COLUMNS: ", t[r]), this.$ = { type: "column-setting", columns: t[r] === "auto" ? -1 : parseInt(t[r]) };
84
+ u.getLogger().debug("APA123", this ? this : "na"), u.getLogger().debug("COLUMNS: ", t[r]), this.$ = { type: "column-setting", columns: t[r] === "auto" ? -1 : parseInt(t[r]) };
113
85
  break;
114
86
  case 27:
115
- h.getLogger().debug("Rule: id-block statement : ", t[r - 2], t[r - 1]), h.generateId(), this.$ = U(V({}, t[r - 2]), { type: "composite", children: t[r - 1] });
87
+ u.getLogger().debug("Rule: id-block statement : ", t[r - 2], t[r - 1]), u.generateId(), this.$ = { ...t[r - 2], type: "composite", children: t[r - 1] };
116
88
  break;
117
89
  case 28:
118
- h.getLogger().debug("Rule: blockStatement : ", t[r - 2], t[r - 1], t[r]);
119
- const C = h.generateId();
90
+ u.getLogger().debug("Rule: blockStatement : ", t[r - 2], t[r - 1], t[r]);
91
+ const C = u.generateId();
120
92
  this.$ = { id: C, type: "composite", label: "", children: t[r - 1] };
121
93
  break;
122
94
  case 29:
123
- h.getLogger().debug("Rule: node (NODE_ID separator): ", t[r]), this.$ = { id: t[r] };
95
+ u.getLogger().debug("Rule: node (NODE_ID separator): ", t[r]), this.$ = { id: t[r] };
124
96
  break;
125
97
  case 30:
126
- h.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[r - 1], t[r]), this.$ = { id: t[r - 1], label: t[r].label, typeStr: t[r].typeStr, directions: t[r].directions };
98
+ u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[r - 1], t[r]), this.$ = { id: t[r - 1], label: t[r].label, typeStr: t[r].typeStr, directions: t[r].directions };
127
99
  break;
128
100
  case 31:
129
- h.getLogger().debug("Rule: dirList: ", t[r]), this.$ = [t[r]];
101
+ u.getLogger().debug("Rule: dirList: ", t[r]), this.$ = [t[r]];
130
102
  break;
131
103
  case 32:
132
- h.getLogger().debug("Rule: dirList: ", t[r - 1], t[r]), this.$ = [t[r - 1]].concat(t[r]);
104
+ u.getLogger().debug("Rule: dirList: ", t[r - 1], t[r]), this.$ = [t[r - 1]].concat(t[r]);
133
105
  break;
134
106
  case 33:
135
- h.getLogger().debug("Rule: nodeShapeNLabel: ", t[r - 2], t[r - 1], t[r]), this.$ = { typeStr: t[r - 2] + t[r], label: t[r - 1] };
107
+ u.getLogger().debug("Rule: nodeShapeNLabel: ", t[r - 2], t[r - 1], t[r]), this.$ = { typeStr: t[r - 2] + t[r], label: t[r - 1] };
136
108
  break;
137
109
  case 34:
138
- h.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[r - 3], t[r - 2], " #3:", t[r - 1], t[r]), this.$ = { typeStr: t[r - 3] + t[r], label: t[r - 2], directions: t[r - 1] };
110
+ u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[r - 3], t[r - 2], " #3:", t[r - 1], t[r]), this.$ = { typeStr: t[r - 3] + t[r], label: t[r - 2], directions: t[r - 1] };
139
111
  break;
140
112
  case 35:
141
113
  case 36:
@@ -149,71 +121,71 @@ var de, ge, ie = function() {
149
121
  break;
150
122
  }
151
123
  },
152
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: u, 31: n, 32: p, 40: o, 44: b, 47: f }, { 8: [1, 20] }, e(g, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: a, 28: l, 29: u, 31: n, 32: p, 40: o, 44: b, 47: f }), e(x, [2, 16], { 14: 22, 15: y, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(v, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: p }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: u, 31: n, 32: p, 40: o, 44: b, 47: f }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(N, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(g, [2, 13]), { 26: 35, 32: p }, { 32: [2, 14] }, { 17: [1, 36] }, e(v, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: y, 16: T, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: l, 29: u, 31: n, 32: p, 40: o, 44: b, 47: f }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(N, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(v, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(x, [2, 27]), e(N, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(N, [2, 34]), { 39: [2, 32] }],
124
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 8: [1, 20] }, e(p, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: a, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }), e(x, [2, 16], { 14: 22, 15: y, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(v, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(N, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(p, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(v, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: y, 16: T, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(N, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(v, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(x, [2, 27]), e(N, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(N, [2, 34]), { 39: [2, 32] }],
153
125
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
154
- parseError: function(c, s) {
126
+ parseError: function(o, s) {
155
127
  if (s.recoverable)
156
- this.trace(c);
128
+ this.trace(o);
157
129
  else {
158
- var i = new Error(c);
130
+ var i = new Error(o);
159
131
  throw i.hash = s, i;
160
132
  }
161
133
  },
162
- parse: function(c) {
163
- var s = this, i = [0], h = [], d = [null], t = [], m = this.table, r = "", R = 0, W = 0, F = 2, C = 1, Ee = t.slice.call(arguments, 1), w = Object.create(this.lexer), M = { yy: {} };
164
- for (var $ in this.yy)
165
- Object.prototype.hasOwnProperty.call(this.yy, $) && (M.yy[$] = this.yy[$]);
166
- w.setInput(c, M.yy), M.yy.lexer = w, M.yy.parser = this, typeof w.yylloc == "undefined" && (w.yylloc = {});
167
- var ee = w.yylloc;
168
- t.push(ee);
169
- var we = w.options && w.options.ranges;
170
- typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
171
- function De() {
134
+ parse: function(o) {
135
+ var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1, Se = t.slice.call(arguments, 1), w = Object.create(this.lexer), K = { yy: {} };
136
+ for (var Z in this.yy)
137
+ Object.prototype.hasOwnProperty.call(this.yy, Z) && (K.yy[Z] = this.yy[Z]);
138
+ w.setInput(o, K.yy), K.yy.lexer = w, K.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
139
+ var J = w.yylloc;
140
+ t.push(J);
141
+ var Le = w.options && w.options.ranges;
142
+ typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
143
+ function me() {
172
144
  var P;
173
- return P = h.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (h = P, P = h.pop()), P = s.symbols_[P] || P), P;
145
+ return P = u.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = s.symbols_[P] || P), P;
174
146
  }
175
- for (var I, Y, z, te, j = {}, q, B, ce, Z; ; ) {
176
- if (Y = i[i.length - 1], this.defaultActions[Y] ? z = this.defaultActions[Y] : ((I === null || typeof I == "undefined") && (I = De()), z = m[Y] && m[Y][I]), typeof z == "undefined" || !z.length || !z[0]) {
177
- var se = "";
178
- Z = [];
179
- for (q in m[Y])
180
- this.terminals_[q] && q > F && Z.push("'" + this.terminals_[q] + "'");
181
- w.showPosition ? se = "Parse error on line " + (R + 1) + `:
147
+ for (var I, M, z, Q, W = {}, X, B, ae, G; ; ) {
148
+ if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = me()), z = m[M] && m[M][I]), typeof z > "u" || !z.length || !z[0]) {
149
+ var $ = "";
150
+ G = [];
151
+ for (X in m[M])
152
+ this.terminals_[X] && X > F && G.push("'" + this.terminals_[X] + "'");
153
+ w.showPosition ? $ = "Parse error on line " + (R + 1) + `:
182
154
  ` + w.showPosition() + `
183
- Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se = "Parse error on line " + (R + 1) + ": Unexpected " + (I == C ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(se, {
155
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "Parse error on line " + (R + 1) + ": Unexpected " + (I == C ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError($, {
184
156
  text: w.match,
185
157
  token: this.terminals_[I] || I,
186
158
  line: w.yylineno,
187
- loc: ee,
188
- expected: Z
159
+ loc: J,
160
+ expected: G
189
161
  });
190
162
  }
191
163
  if (z[0] instanceof Array && z.length > 1)
192
- throw new Error("Parse Error: multiple actions possible at state: " + Y + ", token: " + I);
164
+ throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + I);
193
165
  switch (z[0]) {
194
166
  case 1:
195
- i.push(I), d.push(w.yytext), t.push(w.yylloc), i.push(z[1]), I = null, W = w.yyleng, r = w.yytext, R = w.yylineno, ee = w.yylloc;
167
+ i.push(I), h.push(w.yytext), t.push(w.yylloc), i.push(z[1]), I = null, Y = w.yyleng, r = w.yytext, R = w.yylineno, J = w.yylloc;
196
168
  break;
197
169
  case 2:
198
- if (B = this.productions_[z[1]][1], j.$ = d[d.length - B], j._$ = {
170
+ if (B = this.productions_[z[1]][1], W.$ = h[h.length - B], W._$ = {
199
171
  first_line: t[t.length - (B || 1)].first_line,
200
172
  last_line: t[t.length - 1].last_line,
201
173
  first_column: t[t.length - (B || 1)].first_column,
202
174
  last_column: t[t.length - 1].last_column
203
- }, we && (j._$.range = [
175
+ }, Le && (W._$.range = [
204
176
  t[t.length - (B || 1)].range[0],
205
177
  t[t.length - 1].range[1]
206
- ]), te = this.performAction.apply(j, [
178
+ ]), Q = this.performAction.apply(W, [
207
179
  r,
208
- W,
180
+ Y,
209
181
  R,
210
- M.yy,
182
+ K.yy,
211
183
  z[1],
212
- d,
184
+ h,
213
185
  t
214
- ].concat(Ee)), typeof te != "undefined")
215
- return te;
216
- B && (i = i.slice(0, -1 * B * 2), d = d.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), d.push(j.$), t.push(j._$), ce = m[i[i.length - 2]][i[i.length - 1]], i.push(ce);
186
+ ].concat(Se)), typeof Q < "u")
187
+ return Q;
188
+ B && (i = i.slice(0, -1 * B * 2), h = h.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ae = m[i[i.length - 2]][i[i.length - 1]], i.push(ae);
217
189
  break;
218
190
  case 3:
219
191
  return !0;
@@ -231,8 +203,8 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
231
203
  throw new Error(s);
232
204
  },
233
205
  // resets the lexer, sets new input
234
- setInput: function(c, s) {
235
- return this.yy = s || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
206
+ setInput: function(o, s) {
207
+ return this.yy = s || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
236
208
  first_line: 1,
237
209
  first_column: 0,
238
210
  last_line: 1,
@@ -241,24 +213,24 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
241
213
  },
242
214
  // consumes and returns one char from the input
243
215
  input: function() {
244
- var c = this._input[0];
245
- this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
246
- var s = c.match(/(?:\r\n?|\n).*/g);
247
- return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
216
+ var o = this._input[0];
217
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
218
+ var s = o.match(/(?:\r\n?|\n).*/g);
219
+ return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
248
220
  },
249
221
  // unshifts one char (or a string) into the input
250
- unput: function(c) {
251
- var s = c.length, i = c.split(/(?:\r\n?|\n)/g);
252
- this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
253
- var h = this.match.split(/(?:\r\n?|\n)/g);
222
+ unput: function(o) {
223
+ var s = o.length, i = o.split(/(?:\r\n?|\n)/g);
224
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
225
+ var u = this.match.split(/(?:\r\n?|\n)/g);
254
226
  this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1);
255
- var d = this.yylloc.range;
227
+ var h = this.yylloc.range;
256
228
  return this.yylloc = {
257
229
  first_line: this.yylloc.first_line,
258
230
  last_line: this.yylineno + 1,
259
231
  first_column: this.yylloc.first_column,
260
- last_column: i ? (i.length === h.length ? this.yylloc.first_column : 0) + h[h.length - i.length].length - i[0].length : this.yylloc.first_column - s
261
- }, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
232
+ last_column: i ? (i.length === u.length ? this.yylloc.first_column : 0) + u[u.length - i.length].length - i[0].length : this.yylloc.first_column - s
233
+ }, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
262
234
  },
263
235
  // When called from action, caches matched text and appends it on next action
264
236
  more: function() {
@@ -278,29 +250,29 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
278
250
  return this;
279
251
  },
280
252
  // retain first n characters of the match
281
- less: function(c) {
282
- this.unput(this.match.slice(c));
253
+ less: function(o) {
254
+ this.unput(this.match.slice(o));
283
255
  },
284
256
  // displays already matched input, i.e. for error messages
285
257
  pastInput: function() {
286
- var c = this.matched.substr(0, this.matched.length - this.match.length);
287
- return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
258
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
259
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
288
260
  },
289
261
  // displays upcoming input, i.e. for error messages
290
262
  upcomingInput: function() {
291
- var c = this.match;
292
- return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
263
+ var o = this.match;
264
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
293
265
  },
294
266
  // displays the character position where the lexing error occurred, i.e. for error messages
295
267
  showPosition: function() {
296
- var c = this.pastInput(), s = new Array(c.length + 1).join("-");
297
- return c + this.upcomingInput() + `
268
+ var o = this.pastInput(), s = new Array(o.length + 1).join("-");
269
+ return o + this.upcomingInput() + `
298
270
  ` + s + "^";
299
271
  },
300
272
  // test the lexed token: return FALSE when not a match, otherwise return token
301
- test_match: function(c, s) {
302
- var i, h, d;
303
- if (this.options.backtrack_lexer && (d = {
273
+ test_match: function(o, s) {
274
+ var i, u, h;
275
+ if (this.options.backtrack_lexer && (h = {
304
276
  yylineno: this.yylineno,
305
277
  yylloc: {
306
278
  first_line: this.yylloc.first_line,
@@ -319,16 +291,16 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
319
291
  yy: this.yy,
320
292
  conditionStack: this.conditionStack.slice(0),
321
293
  done: this.done
322
- }, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), h = c[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = {
294
+ }, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = o[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
323
295
  first_line: this.yylloc.last_line,
324
296
  last_line: this.yylineno + 1,
325
297
  first_column: this.yylloc.last_column,
326
- last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
327
- }, this.yytext += c[0], this.match += c[0], this.matches = c, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(c[0].length), this.matched += c[0], i = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
298
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
299
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], i = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
328
300
  return i;
329
301
  if (this._backtrack) {
330
- for (var t in d)
331
- this[t] = d[t];
302
+ for (var t in h)
303
+ this[t] = h[t];
332
304
  return !1;
333
305
  }
334
306
  return !1;
@@ -338,13 +310,13 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
338
310
  if (this.done)
339
311
  return this.EOF;
340
312
  this._input || (this.done = !0);
341
- var c, s, i, h;
313
+ var o, s, i, u;
342
314
  this._more || (this.yytext = "", this.match = "");
343
- for (var d = this._currentRules(), t = 0; t < d.length; t++)
344
- if (i = this._input.match(this.rules[d[t]]), i && (!s || i[0].length > s[0].length)) {
345
- if (s = i, h = t, this.options.backtrack_lexer) {
346
- if (c = this.test_match(i, d[t]), c !== !1)
347
- return c;
315
+ for (var h = this._currentRules(), t = 0; t < h.length; t++)
316
+ if (i = this._input.match(this.rules[h[t]]), i && (!s || i[0].length > s[0].length)) {
317
+ if (s = i, u = t, this.options.backtrack_lexer) {
318
+ if (o = this.test_match(i, h[t]), o !== !1)
319
+ return o;
348
320
  if (this._backtrack) {
349
321
  s = !1;
350
322
  continue;
@@ -353,7 +325,7 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
353
325
  } else if (!this.options.flex)
354
326
  break;
355
327
  }
356
- return s ? (c = this.test_match(s, d[h]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
328
+ return s ? (o = this.test_match(s, h[u]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
357
329
  ` + this.showPosition(), {
358
330
  text: "",
359
331
  token: null,
@@ -391,8 +363,8 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
391
363
  return this.conditionStack.length;
392
364
  },
393
365
  options: {},
394
- performAction: function(s, i, h, d) {
395
- switch (h) {
366
+ performAction: function(s, i, u, h) {
367
+ switch (u) {
396
368
  case 0:
397
369
  return 10;
398
370
  case 1:
@@ -634,73 +606,73 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
634
606
  }
635
607
  return k.prototype = L, L.Parser = k, new k();
636
608
  }();
637
- ie.parser = ie;
638
- const Xe = ie;
639
- let O = {}, ae = [], X = {};
640
- const pe = "color", fe = "fill", Ge = "bgFill", Se = ",";
641
- let G = {};
642
- const He = function(e, a = "") {
643
- G[e] === void 0 && (G[e] = { id: e, styles: [], textStyles: [] });
644
- const l = G[e];
645
- a != null && a.split(Se).forEach((u) => {
646
- const n = u.replace(/([^;]*);/, "$1").trim();
647
- if (u.match(pe)) {
648
- const o = n.replace(fe, Ge).replace(pe, fe);
649
- l.textStyles.push(o);
609
+ ee.parser = ee;
610
+ const Be = ee;
611
+ let O = {}, ie = [], j = {};
612
+ const ce = "color", ue = "fill", Pe = "bgFill", ge = ",";
613
+ let V = {};
614
+ const Fe = function(e, a = "") {
615
+ V[e] === void 0 && (V[e] = { id: e, styles: [], textStyles: [] });
616
+ const d = V[e];
617
+ a?.split(ge).forEach((c) => {
618
+ const n = c.replace(/([^;]*);/, "$1").trim();
619
+ if (c.match(ce)) {
620
+ const l = n.replace(ue, Pe).replace(ce, ue);
621
+ d.textStyles.push(l);
650
622
  }
651
- l.styles.push(n);
623
+ d.styles.push(n);
652
624
  });
653
- }, qe = function(e, a = "") {
654
- const l = O[e];
655
- a != null && (l.styles = a.split(Se));
656
- }, Ze = function(e, a) {
657
- e.split(",").forEach(function(l) {
658
- let u = O[l];
659
- if (u === void 0) {
660
- const n = l.trim();
661
- O[n] = { id: n, type: "na", children: [] }, u = O[n];
625
+ }, Ke = function(e, a = "") {
626
+ const d = O[e];
627
+ a != null && (d.styles = a.split(ge));
628
+ }, Me = function(e, a) {
629
+ e.split(",").forEach(function(d) {
630
+ let c = O[d];
631
+ if (c === void 0) {
632
+ const n = d.trim();
633
+ O[n] = { id: n, type: "na", children: [] }, c = O[n];
662
634
  }
663
- u.classes || (u.classes = []), u.classes.push(a);
635
+ c.classes || (c.classes = []), c.classes.push(a);
664
636
  });
665
- }, Le = (e, a) => {
666
- const l = e.flat(), u = [];
667
- for (const n of l) {
637
+ }, pe = (e, a) => {
638
+ const d = e.flat(), c = [];
639
+ for (const n of d) {
668
640
  if (n.type === "classDef") {
669
- He(n.id, n.css);
641
+ Fe(n.id, n.css);
670
642
  continue;
671
643
  }
672
644
  if (n.type === "applyClass") {
673
- Ze(n.id, (n == null ? void 0 : n.styleClass) || "");
645
+ Me(n.id, n?.styleClass || "");
674
646
  continue;
675
647
  }
676
648
  if (n.type === "applyStyles") {
677
- n != null && n.stylesStr && qe(n.id, n == null ? void 0 : n.stylesStr);
649
+ n?.stylesStr && Ke(n.id, n?.stylesStr);
678
650
  continue;
679
651
  }
680
652
  if (n.type === "column-setting")
681
653
  a.columns = n.columns || -1;
682
654
  else if (n.type === "edge")
683
- X[n.id] ? X[n.id]++ : X[n.id] = 1, n.id = X[n.id] + "-" + n.id, ae.push(n);
655
+ j[n.id] ? j[n.id]++ : j[n.id] = 1, n.id = j[n.id] + "-" + n.id, ie.push(n);
684
656
  else {
685
657
  n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
686
- const p = !O[n.id];
687
- if (p ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && Le(n.children, n), n.type === "space") {
688
- const o = n.width || 1;
689
- for (let b = 0; b < o; b++) {
690
- const f = Be(n);
691
- f.id = f.id + "-" + b, O[f.id] = f, u.push(f);
658
+ const g = !O[n.id];
659
+ if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && pe(n.children, n), n.type === "space") {
660
+ const l = n.width || 1;
661
+ for (let f = 0; f < l; f++) {
662
+ const b = ve(n);
663
+ b.id = b.id + "-" + f, O[b.id] = b, c.push(b);
692
664
  }
693
665
  } else
694
- p && u.push(n);
666
+ g && c.push(n);
695
667
  }
696
668
  }
697
- a.children = u;
669
+ a.children = c;
698
670
  };
699
- let le = [], H = { id: "root", type: "composite", children: [], columns: -1 };
700
- const Je = () => {
701
- S.debug("Clear called"), Ce(), H = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: H }, le = [], G = {}, ae = [], X = {};
671
+ let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
672
+ const Ye = () => {
673
+ S.debug("Clear called"), Ee(), U = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: U }, re = [], V = {}, ie = [], j = {};
702
674
  };
703
- function Qe(e) {
675
+ function We(e) {
704
676
  switch (S.debug("typeStr2Type", e), e) {
705
677
  case "[]":
706
678
  return "square";
@@ -736,7 +708,7 @@ function Qe(e) {
736
708
  return "na";
737
709
  }
738
710
  }
739
- function $e(e) {
711
+ function je(e) {
740
712
  switch (S.debug("typeStr2Type", e), e) {
741
713
  case "==":
742
714
  return "thick";
@@ -744,7 +716,7 @@ function $e(e) {
744
716
  return "normal";
745
717
  }
746
718
  }
747
- function et(e) {
719
+ function Ve(e) {
748
720
  switch (e.trim()) {
749
721
  case "--x":
750
722
  return "arrow_cross";
@@ -754,36 +726,36 @@ function et(e) {
754
726
  return "arrow_point";
755
727
  }
756
728
  }
757
- let be = 0;
758
- const tt = () => (be++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + be), st = (e) => {
759
- H.children = e, Le(e, H), le = H.children;
760
- }, it = (e) => {
729
+ let de = 0;
730
+ const Ue = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), Xe = (e) => {
731
+ U.children = e, pe(e, U), re = U.children;
732
+ }, Ge = (e) => {
761
733
  const a = O[e];
762
734
  return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
763
- }, rt = () => [...Object.values(O)], nt = () => le || [], at = () => ae, lt = (e) => O[e], ot = (e) => {
735
+ }, He = () => [...Object.values(O)], qe = () => re || [], Ze = () => ie, Je = (e) => O[e], Qe = (e) => {
764
736
  O[e.id] = e;
765
- }, ct = () => console, ut = function() {
766
- return G;
767
- }, ht = {
768
- getConfig: () => ne().block,
769
- typeStr2Type: Qe,
770
- edgeTypeStr2Type: $e,
771
- edgeStrToEdgeData: et,
772
- getLogger: ct,
773
- getBlocksFlat: rt,
774
- getBlocks: nt,
775
- getEdges: at,
776
- setHierarchy: st,
777
- getBlock: lt,
778
- setBlock: ot,
779
- getColumns: it,
780
- getClasses: ut,
781
- clear: Je,
782
- generateId: tt
783
- }, dt = ht, Q = (e, a) => {
784
- const l = Ue, u = l(e, "r"), n = l(e, "g"), p = l(e, "b");
785
- return Ae(u, n, p, a);
786
- }, gt = (e) => `.label {
737
+ }, $e = () => console, et = function() {
738
+ return V;
739
+ }, tt = {
740
+ getConfig: () => se().block,
741
+ typeStr2Type: We,
742
+ edgeTypeStr2Type: je,
743
+ edgeStrToEdgeData: Ve,
744
+ getLogger: $e,
745
+ getBlocksFlat: He,
746
+ getBlocks: qe,
747
+ getEdges: Ze,
748
+ setHierarchy: Xe,
749
+ getBlock: Je,
750
+ setBlock: Qe,
751
+ getColumns: Ge,
752
+ getClasses: et,
753
+ clear: Ye,
754
+ generateId: Ue
755
+ }, st = tt, q = (e, a) => {
756
+ const d = Re, c = d(e, "r"), n = d(e, "g"), g = d(e, "b");
757
+ return we(c, n, g, a);
758
+ }, it = (e) => `.label {
787
759
  font-family: ${e.fontFamily};
788
760
  color: ${e.nodeTextColor || e.textColor};
789
761
  }
@@ -853,14 +825,14 @@ const tt = () => (be++, "id-" + Math.random().toString(36).substr(2, 12) + "-" +
853
825
 
854
826
  /* For html labels only */
855
827
  .labelBkg {
856
- background-color: ${Q(e.edgeLabelBackground, 0.5)};
828
+ background-color: ${q(e.edgeLabelBackground, 0.5)};
857
829
  // background-color:
858
830
  }
859
831
 
860
832
  .node .cluster {
861
- // fill: ${Q(e.mainBkg, 0.5)};
862
- fill: ${Q(e.clusterBkg, 0.5)};
863
- stroke: ${Q(e.clusterBorder, 0.2)};
833
+ // fill: ${q(e.mainBkg, 0.5)};
834
+ fill: ${q(e.clusterBkg, 0.5)};
835
+ stroke: ${q(e.clusterBorder, 0.2)};
864
836
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
865
837
  stroke-width: 1px;
866
838
  }
@@ -895,186 +867,176 @@ const tt = () => (be++, "id-" + Math.random().toString(36).substr(2, 12) + "-" +
895
867
  font-size: 18px;
896
868
  fill: ${e.textColor};
897
869
  }
898
- `, pt = gt;
899
- function me(e, a, l = !1) {
900
- var u, n, p;
901
- const o = e;
902
- let b = "default";
903
- (((u = o == null ? void 0 : o.classes) == null ? void 0 : u.length) || 0) > 0 && (b = ((o == null ? void 0 : o.classes) || []).join(" ")), b = b + " flowchart-label";
904
- let f = 0, g = "", x;
905
- switch (o.type) {
870
+ `, rt = it;
871
+ function fe(e, a, d = !1) {
872
+ var c, n, g;
873
+ const l = e;
874
+ let f = "default";
875
+ (((c = l?.classes) == null ? void 0 : c.length) || 0) > 0 && (f = (l?.classes || []).join(" ")), f = f + " flowchart-label";
876
+ let b = 0, p = "", x;
877
+ switch (l.type) {
906
878
  case "round":
907
- f = 5, g = "rect";
879
+ b = 5, p = "rect";
908
880
  break;
909
881
  case "composite":
910
- f = 0, g = "composite", x = 0;
882
+ b = 0, p = "composite", x = 0;
911
883
  break;
912
884
  case "square":
913
- g = "rect";
885
+ p = "rect";
914
886
  break;
915
887
  case "diamond":
916
- g = "question";
888
+ p = "question";
917
889
  break;
918
890
  case "hexagon":
919
- g = "hexagon";
891
+ p = "hexagon";
920
892
  break;
921
893
  case "block_arrow":
922
- g = "block_arrow";
894
+ p = "block_arrow";
923
895
  break;
924
896
  case "odd":
925
- g = "rect_left_inv_arrow";
897
+ p = "rect_left_inv_arrow";
926
898
  break;
927
899
  case "lean_right":
928
- g = "lean_right";
900
+ p = "lean_right";
929
901
  break;
930
902
  case "lean_left":
931
- g = "lean_left";
903
+ p = "lean_left";
932
904
  break;
933
905
  case "trapezoid":
934
- g = "trapezoid";
906
+ p = "trapezoid";
935
907
  break;
936
908
  case "inv_trapezoid":
937
- g = "inv_trapezoid";
909
+ p = "inv_trapezoid";
938
910
  break;
939
911
  case "rect_left_inv_arrow":
940
- g = "rect_left_inv_arrow";
912
+ p = "rect_left_inv_arrow";
941
913
  break;
942
914
  case "circle":
943
- g = "circle";
915
+ p = "circle";
944
916
  break;
945
917
  case "ellipse":
946
- g = "ellipse";
918
+ p = "ellipse";
947
919
  break;
948
920
  case "stadium":
949
- g = "stadium";
921
+ p = "stadium";
950
922
  break;
951
923
  case "subroutine":
952
- g = "subroutine";
924
+ p = "subroutine";
953
925
  break;
954
926
  case "cylinder":
955
- g = "cylinder";
927
+ p = "cylinder";
956
928
  break;
957
929
  case "group":
958
- g = "rect";
930
+ p = "rect";
959
931
  break;
960
932
  case "doublecircle":
961
- g = "doublecircle";
933
+ p = "doublecircle";
962
934
  break;
963
935
  default:
964
- g = "rect";
936
+ p = "rect";
965
937
  }
966
- const y = Re((o == null ? void 0 : o.styles) || []), T = o.label, v = o.size || { width: 0, height: 0, x: 0, y: 0 };
938
+ const y = De(l?.styles || []), T = l.label, v = l.size || { width: 0, height: 0, x: 0, y: 0 };
967
939
  return {
968
940
  labelStyle: y.labelStyle,
969
- shape: g,
941
+ shape: p,
970
942
  labelText: T,
971
- rx: f,
972
- ry: f,
973
- class: b,
943
+ rx: b,
944
+ ry: b,
945
+ class: f,
974
946
  style: y.style,
975
- id: o.id,
976
- directions: o.directions,
947
+ id: l.id,
948
+ directions: l.directions,
977
949
  width: v.width,
978
950
  height: v.height,
979
951
  x: v.x,
980
952
  y: v.y,
981
- positioned: l,
953
+ positioned: d,
982
954
  intersect: void 0,
983
- type: o.type,
984
- padding: x != null ? x : ((p = (n = ne()) == null ? void 0 : n.block) == null ? void 0 : p.padding) || 0
955
+ type: l.type,
956
+ padding: x ?? (((g = (n = se()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
985
957
  };
986
958
  }
987
- function ft(e, a, l) {
988
- return K(this, null, function* () {
989
- const u = me(a, l, !1);
990
- if (u.type === "group")
991
- return;
992
- const n = yield xe(e, u), p = n.node().getBBox(), o = l.getBlock(u.id);
993
- o.size = { width: p.width, height: p.height, x: 0, y: 0, node: n }, l.setBlock(o), n.remove();
994
- });
959
+ async function nt(e, a, d) {
960
+ const c = fe(a, d, !1);
961
+ if (c.type === "group")
962
+ return;
963
+ const n = await he(e, c), g = n.node().getBBox(), l = d.getBlock(c.id);
964
+ l.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, d.setBlock(l), n.remove();
995
965
  }
996
- function bt(e, a, l) {
997
- return K(this, null, function* () {
998
- const u = me(a, l, !0);
999
- l.getBlock(u.id).type !== "space" && (yield xe(e, u), a.intersect = u == null ? void 0 : u.intersect, Ye(u));
1000
- });
966
+ async function at(e, a, d) {
967
+ const c = fe(a, d, !0);
968
+ d.getBlock(c.id).type !== "space" && (await he(e, c), a.intersect = c?.intersect, Te(c));
1001
969
  }
1002
- function oe(e, a, l, u) {
1003
- return K(this, null, function* () {
1004
- for (const n of a)
1005
- yield u(e, n, l), n.children && (yield oe(e, n.children, l, u));
1006
- });
970
+ async function ne(e, a, d, c) {
971
+ for (const n of a)
972
+ await c(e, n, d), n.children && await ne(e, n.children, d, c);
1007
973
  }
1008
- function xt(e, a, l) {
1009
- return K(this, null, function* () {
1010
- yield oe(e, a, l, ft);
1011
- });
974
+ async function lt(e, a, d) {
975
+ await ne(e, a, d, nt);
1012
976
  }
1013
- function St(e, a, l) {
1014
- return K(this, null, function* () {
1015
- yield oe(e, a, l, bt);
1016
- });
977
+ async function ot(e, a, d) {
978
+ await ne(e, a, d, at);
1017
979
  }
1018
- function Lt(e, a, l, u, n) {
1019
- return K(this, null, function* () {
1020
- const p = new We({
1021
- multigraph: !0,
1022
- compound: !0
1023
- });
1024
- p.setGraph({
1025
- rankdir: "TB",
1026
- nodesep: 10,
1027
- ranksep: 10,
1028
- marginx: 8,
1029
- marginy: 8
980
+ async function ct(e, a, d, c, n) {
981
+ const g = new ze({
982
+ multigraph: !0,
983
+ compound: !0
984
+ });
985
+ g.setGraph({
986
+ rankdir: "TB",
987
+ nodesep: 10,
988
+ ranksep: 10,
989
+ marginx: 8,
990
+ marginy: 8
991
+ });
992
+ for (const l of d)
993
+ l.size && g.setNode(l.id, {
994
+ width: l.size.width,
995
+ height: l.size.height,
996
+ intersect: l.intersect
1030
997
  });
1031
- for (const o of l)
1032
- o.size && p.setNode(o.id, {
1033
- width: o.size.width,
1034
- height: o.size.height,
1035
- intersect: o.intersect
1036
- });
1037
- for (const o of a)
1038
- if (o.start && o.end) {
1039
- const b = u.getBlock(o.start), f = u.getBlock(o.end);
1040
- if (b != null && b.size && (f != null && f.size)) {
1041
- const g = b.size, x = f.size, y = [
1042
- { x: g.x, y: g.y },
1043
- { x: g.x + (x.x - g.x) / 2, y: g.y + (x.y - g.y) / 2 },
1044
- { x: x.x, y: x.y }
1045
- ];
1046
- yield Fe(
1047
- e,
1048
- { v: o.start, w: o.end, name: o.id },
1049
- U(V({}, o), {
1050
- arrowTypeEnd: o.arrowTypeEnd,
1051
- arrowTypeStart: o.arrowTypeStart,
1052
- points: y,
1053
- classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1054
- }),
1055
- void 0,
1056
- "block",
1057
- p,
1058
- n
1059
- ), o.label && (yield Ke(e, U(V({}, o), {
1060
- label: o.label,
1061
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1062
- arrowTypeEnd: o.arrowTypeEnd,
1063
- arrowTypeStart: o.arrowTypeStart,
998
+ for (const l of a)
999
+ if (l.start && l.end) {
1000
+ const f = c.getBlock(l.start), b = c.getBlock(l.end);
1001
+ if (f?.size && b?.size) {
1002
+ const p = f.size, x = b.size, y = [
1003
+ { x: p.x, y: p.y },
1004
+ { x: p.x + (x.x - p.x) / 2, y: p.y + (x.y - p.y) / 2 },
1005
+ { x: x.x, y: x.y }
1006
+ ];
1007
+ await ke(
1008
+ e,
1009
+ { v: l.start, w: l.end, name: l.id },
1010
+ {
1011
+ ...l,
1012
+ arrowTypeEnd: l.arrowTypeEnd,
1013
+ arrowTypeStart: l.arrowTypeStart,
1064
1014
  points: y,
1065
1015
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1066
- })), yield Me(
1067
- U(V({}, o), { x: y[1].x, y: y[1].y }),
1068
- {
1069
- originalPath: y
1070
- }
1071
- ));
1072
- }
1016
+ },
1017
+ void 0,
1018
+ "block",
1019
+ g,
1020
+ n
1021
+ ), l.label && (await Ie(e, {
1022
+ ...l,
1023
+ label: l.label,
1024
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1025
+ arrowTypeEnd: l.arrowTypeEnd,
1026
+ arrowTypeStart: l.arrowTypeStart,
1027
+ points: y,
1028
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
1029
+ }), await Oe(
1030
+ { ...l, x: y[1].x, y: y[1].y },
1031
+ {
1032
+ originalPath: y
1033
+ }
1034
+ ));
1073
1035
  }
1074
- });
1036
+ }
1075
1037
  }
1076
- const _ = ((ge = (de = Te()) == null ? void 0 : de.block) == null ? void 0 : ge.padding) || 8;
1077
- function mt(e, a) {
1038
+ const _ = ((oe = (le = _e()) == null ? void 0 : le.block) == null ? void 0 : oe.padding) || 8;
1039
+ function ut(e, a) {
1078
1040
  if (e === 0 || !Number.isInteger(e))
1079
1041
  throw new Error("Columns must be an integer !== 0.");
1080
1042
  if (a < 0 || !Number.isInteger(a))
@@ -1083,83 +1045,83 @@ function mt(e, a) {
1083
1045
  return { px: a, py: 0 };
1084
1046
  if (e === 1)
1085
1047
  return { px: 0, py: a };
1086
- const l = a % e, u = Math.floor(a / e);
1087
- return { px: l, py: u };
1048
+ const d = a % e, c = Math.floor(a / e);
1049
+ return { px: d, py: c };
1088
1050
  }
1089
- const _t = (e) => {
1090
- let a = 0, l = 0;
1091
- for (const u of e.children) {
1092
- const { width: n, height: p, x: o, y: b } = u.size || { width: 0, height: 0, x: 0, y: 0 };
1051
+ const dt = (e) => {
1052
+ let a = 0, d = 0;
1053
+ for (const c of e.children) {
1054
+ const { width: n, height: g, x: l, y: f } = c.size || { width: 0, height: 0, x: 0, y: 0 };
1093
1055
  S.debug(
1094
1056
  "getMaxChildSize abc95 child:",
1095
- u.id,
1057
+ c.id,
1096
1058
  "width:",
1097
1059
  n,
1098
1060
  "height:",
1099
- p,
1061
+ g,
1100
1062
  "x:",
1101
- o,
1063
+ l,
1102
1064
  "y:",
1103
- b,
1104
- u.type
1105
- ), u.type !== "space" && (n > a && (a = n / (e.widthInColumns || 1)), p > l && (l = p));
1065
+ f,
1066
+ c.type
1067
+ ), c.type !== "space" && (n > a && (a = n / (e.widthInColumns || 1)), g > d && (d = g));
1106
1068
  }
1107
- return { width: a, height: l };
1069
+ return { width: a, height: d };
1108
1070
  };
1109
- function re(e, a, l = 0, u = 0) {
1110
- var n, p, o, b, f, g, x, y, T, v, N;
1071
+ function te(e, a, d = 0, c = 0) {
1072
+ var n, g, l, f, b, p, x, y, T, v, N;
1111
1073
  S.debug(
1112
1074
  "setBlockSizes abc95 (start)",
1113
1075
  e.id,
1114
- (n = e == null ? void 0 : e.size) == null ? void 0 : n.x,
1076
+ (n = e?.size) == null ? void 0 : n.x,
1115
1077
  "block width =",
1116
- e == null ? void 0 : e.size,
1078
+ e?.size,
1117
1079
  "sieblingWidth",
1118
- l
1119
- ), (p = e == null ? void 0 : e.size) != null && p.width || (e.size = {
1120
- width: l,
1121
- height: u,
1080
+ d
1081
+ ), (g = e?.size) != null && g.width || (e.size = {
1082
+ width: d,
1083
+ height: c,
1122
1084
  x: 0,
1123
1085
  y: 0
1124
1086
  });
1125
1087
  let E = 0, L = 0;
1126
- if (((o = e.children) == null ? void 0 : o.length) > 0) {
1127
- for (const d of e.children)
1128
- re(d, a);
1129
- const A = _t(e);
1088
+ if (((l = e.children) == null ? void 0 : l.length) > 0) {
1089
+ for (const h of e.children)
1090
+ te(h, a);
1091
+ const A = dt(e);
1130
1092
  E = A.width, L = A.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", E, L);
1131
- for (const d of e.children)
1132
- d.size && (S.debug(
1133
- `abc95 Setting size of children of ${e.id} id=${d.id} ${E} ${L} ${d.size}`
1134
- ), d.size.width = E * (d.widthInColumns || 1) + _ * ((d.widthInColumns || 1) - 1), d.size.height = L, d.size.x = 0, d.size.y = 0, S.debug(
1135
- `abc95 updating size of ${e.id} children child:${d.id} maxWidth:${E} maxHeight:${L}`
1093
+ for (const h of e.children)
1094
+ h.size && (S.debug(
1095
+ `abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`
1096
+ ), h.size.width = E * (h.widthInColumns || 1) + _ * ((h.widthInColumns || 1) - 1), h.size.height = L, h.size.x = 0, h.size.y = 0, S.debug(
1097
+ `abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`
1136
1098
  ));
1137
- for (const d of e.children)
1138
- re(d, a, E, L);
1099
+ for (const h of e.children)
1100
+ te(h, a, E, L);
1139
1101
  const k = e.columns || -1;
1140
1102
  let D = 0;
1141
- for (const d of e.children)
1142
- D += d.widthInColumns || 1;
1143
- let c = e.children.length;
1144
- k > 0 && k < D && (c = k), e.widthInColumns;
1145
- const s = Math.ceil(D / c);
1146
- let i = c * (E + _) + _, h = s * (L + _) + _;
1147
- if (i < l) {
1103
+ for (const h of e.children)
1104
+ D += h.widthInColumns || 1;
1105
+ let o = e.children.length;
1106
+ k > 0 && k < D && (o = k), e.widthInColumns;
1107
+ const s = Math.ceil(D / o);
1108
+ let i = o * (E + _) + _, u = s * (L + _) + _;
1109
+ if (i < d) {
1148
1110
  S.debug(
1149
- `Detected to small siebling: abc95 ${e.id} sieblingWidth ${l} sieblingHeight ${u} width ${i}`
1150
- ), i = l, h = u;
1151
- const d = (l - c * _ - _) / c, t = (u - s * _ - _) / s;
1152
- S.debug("Size indata abc88", e.id, "childWidth", d, "maxWidth", E), S.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", L), S.debug("Size indata abc88 xSize", c, "padding", _);
1111
+ `Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`
1112
+ ), i = d, u = c;
1113
+ const h = (d - o * _ - _) / o, t = (c - s * _ - _) / s;
1114
+ S.debug("Size indata abc88", e.id, "childWidth", h, "maxWidth", E), S.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", L), S.debug("Size indata abc88 xSize", o, "padding", _);
1153
1115
  for (const m of e.children)
1154
- m.size && (m.size.width = d, m.size.height = t, m.size.x = 0, m.size.y = 0);
1116
+ m.size && (m.size.width = h, m.size.height = t, m.size.x = 0, m.size.y = 0);
1155
1117
  }
1156
1118
  if (S.debug(
1157
- `abc95 (finale calc) ${e.id} xSize ${c} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i, ((b = e.size) == null ? void 0 : b.width) || 0)}`
1158
- ), i < (((f = e == null ? void 0 : e.size) == null ? void 0 : f.width) || 0)) {
1159
- i = ((g = e == null ? void 0 : e.size) == null ? void 0 : g.width) || 0;
1160
- const d = k > 0 ? Math.min(e.children.length, k) : e.children.length;
1161
- if (d > 0) {
1162
- const t = (i - d * _ - _) / d;
1119
+ `abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i, ((f = e.size) == null ? void 0 : f.width) || 0)}`
1120
+ ), i < (((b = e?.size) == null ? void 0 : b.width) || 0)) {
1121
+ i = ((p = e?.size) == null ? void 0 : p.width) || 0;
1122
+ const h = k > 0 ? Math.min(e.children.length, k) : e.children.length;
1123
+ if (h > 0) {
1124
+ const t = (i - h * _ - _) / h;
1163
1125
  S.debug("abc95 (growing to fit) width", e.id, i, (x = e.size) == null ? void 0 : x.width, t);
1164
1126
  for (const m of e.children)
1165
1127
  m.size && (m.size.width = t);
@@ -1167,7 +1129,7 @@ function re(e, a, l = 0, u = 0) {
1167
1129
  }
1168
1130
  e.size = {
1169
1131
  width: i,
1170
- height: h,
1132
+ height: u,
1171
1133
  x: 0,
1172
1134
  y: 0
1173
1135
  };
@@ -1175,95 +1137,93 @@ function re(e, a, l = 0, u = 0) {
1175
1137
  S.debug(
1176
1138
  "setBlockSizes abc94 (done)",
1177
1139
  e.id,
1178
- (y = e == null ? void 0 : e.size) == null ? void 0 : y.x,
1179
- (T = e == null ? void 0 : e.size) == null ? void 0 : T.width,
1180
- (v = e == null ? void 0 : e.size) == null ? void 0 : v.y,
1181
- (N = e == null ? void 0 : e.size) == null ? void 0 : N.height
1140
+ (y = e?.size) == null ? void 0 : y.x,
1141
+ (T = e?.size) == null ? void 0 : T.width,
1142
+ (v = e?.size) == null ? void 0 : v.y,
1143
+ (N = e?.size) == null ? void 0 : N.height
1182
1144
  );
1183
1145
  }
1184
- function _e(e, a) {
1185
- var l, u, n, p, o, b, f, g, x, y, T, v, N, E, L, A, k;
1146
+ function be(e, a) {
1147
+ var d, c, n, g, l, f, b, p, x, y, T, v, N, E, L, A, k;
1186
1148
  S.debug(
1187
- `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.x} y: ${(u = e == null ? void 0 : e.size) == null ? void 0 : u.y} width: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.width}`
1149
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d = e?.size) == null ? void 0 : d.x} y: ${(c = e?.size) == null ? void 0 : c.y} width: ${(n = e?.size) == null ? void 0 : n.width}`
1188
1150
  );
1189
1151
  const D = e.columns || -1;
1190
1152
  if (S.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
1191
1153
  e.children.length > 0) {
1192
- const c = ((o = (p = e == null ? void 0 : e.children[0]) == null ? void 0 : p.size) == null ? void 0 : o.width) || 0, s = e.children.length * c + (e.children.length - 1) * _;
1154
+ const o = ((l = (g = e?.children[0]) == null ? void 0 : g.size) == null ? void 0 : l.width) || 0, s = e.children.length * o + (e.children.length - 1) * _;
1193
1155
  S.debug("widthOfChildren 88", s, "posX");
1194
1156
  let i = 0;
1195
- S.debug("abc91 block?.size?.x", e.id, (b = e == null ? void 0 : e.size) == null ? void 0 : b.x);
1196
- let h = (f = e == null ? void 0 : e.size) != null && f.x ? ((g = e == null ? void 0 : e.size) == null ? void 0 : g.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -_, d = 0;
1157
+ S.debug("abc91 block?.size?.x", e.id, (f = e?.size) == null ? void 0 : f.x);
1158
+ let u = (b = e?.size) != null && b.x ? ((p = e?.size) == null ? void 0 : p.x) + (-((x = e?.size) == null ? void 0 : x.width) / 2 || 0) : -_, h = 0;
1197
1159
  for (const t of e.children) {
1198
1160
  const m = e;
1199
1161
  if (!t.size)
1200
1162
  continue;
1201
- const { width: r, height: R } = t.size, { px: W, py: F } = mt(D, i);
1202
- if (F != d && (d = F, h = (y = e == null ? void 0 : e.size) != null && y.x ? ((T = e == null ? void 0 : e.size) == null ? void 0 : T.x) + (-((v = e == null ? void 0 : e.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, d)), S.debug(
1203
- `abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${W},${F} (${(N = m == null ? void 0 : m.size) == null ? void 0 : N.x},${(E = m == null ? void 0 : m.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
1163
+ const { width: r, height: R } = t.size, { px: Y, py: F } = ut(D, i);
1164
+ if (F != h && (h = F, u = (y = e?.size) != null && y.x ? ((T = e?.size) == null ? void 0 : T.x) + (-((v = e?.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, h)), S.debug(
1165
+ `abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(N = m?.size) == null ? void 0 : N.x},${(E = m?.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
1204
1166
  ), m.size) {
1205
1167
  const C = r / 2;
1206
- t.size.x = h + _ + C, S.debug(
1207
- `abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${h} new startingPosX${t.size.x} ${C} padding=${_} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1208
- ), h = t.size.x + C, t.size.y = m.size.y - m.size.height / 2 + F * (R + _) + R / 2 + _, S.debug(
1209
- `abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${h}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * ((t == null ? void 0 : t.widthInColumns) || 1) / 2}`
1168
+ t.size.x = u + _ + C, S.debug(
1169
+ `abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${_} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r * (t?.widthInColumns || 1) / 2}`
1170
+ ), u = t.size.x + C, t.size.y = m.size.y - m.size.height / 2 + F * (R + _) + R / 2 + _, S.debug(
1171
+ `abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * (t?.widthInColumns || 1) / 2}`
1210
1172
  );
1211
1173
  }
1212
- t.children && _e(t), i += (t == null ? void 0 : t.widthInColumns) || 1, S.debug("abc88 columnsPos", t, i);
1174
+ t.children && be(t), i += t?.widthInColumns || 1, S.debug("abc88 columnsPos", t, i);
1213
1175
  }
1214
1176
  }
1215
1177
  S.debug(
1216
- `layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e == null ? void 0 : e.size) == null ? void 0 : L.x} y: ${(A = e == null ? void 0 : e.size) == null ? void 0 : A.y} width: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.width}`
1178
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e?.size) == null ? void 0 : L.x} y: ${(A = e?.size) == null ? void 0 : A.y} width: ${(k = e?.size) == null ? void 0 : k.width}`
1217
1179
  );
1218
1180
  }
1219
- function ye(e, { minX: a, minY: l, maxX: u, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1181
+ function xe(e, { minX: a, minY: d, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1220
1182
  if (e.size && e.id !== "root") {
1221
- const { x: p, y: o, width: b, height: f } = e.size;
1222
- p - b / 2 < a && (a = p - b / 2), o - f / 2 < l && (l = o - f / 2), p + b / 2 > u && (u = p + b / 2), o + f / 2 > n && (n = o + f / 2);
1183
+ const { x: g, y: l, width: f, height: b } = e.size;
1184
+ g - f / 2 < a && (a = g - f / 2), l - b / 2 < d && (d = l - b / 2), g + f / 2 > c && (c = g + f / 2), l + b / 2 > n && (n = l + b / 2);
1223
1185
  }
1224
1186
  if (e.children)
1225
- for (const p of e.children)
1226
- ({ minX: a, minY: l, maxX: u, maxY: n } = ye(p, { minX: a, minY: l, maxX: u, maxY: n }));
1227
- return { minX: a, minY: l, maxX: u, maxY: n };
1187
+ for (const g of e.children)
1188
+ ({ minX: a, minY: d, maxX: c, maxY: n } = xe(g, { minX: a, minY: d, maxX: c, maxY: n }));
1189
+ return { minX: a, minY: d, maxX: c, maxY: n };
1228
1190
  }
1229
- function yt(e) {
1191
+ function ht(e) {
1230
1192
  const a = e.getBlock("root");
1231
1193
  if (!a)
1232
1194
  return;
1233
- re(a, e, 0, 0), _e(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
1234
- const { minX: l, minY: u, maxX: n, maxY: p } = ye(a), o = p - u, b = n - l;
1235
- return { x: l, y: u, width: b, height: o };
1195
+ te(a, e, 0, 0), be(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
1196
+ const { minX: d, minY: c, maxX: n, maxY: g } = xe(a), l = g - c, f = n - d;
1197
+ return { x: d, y: c, width: f, height: l };
1236
1198
  }
1237
- const Et = function(e, a) {
1199
+ const gt = function(e, a) {
1238
1200
  return a.db.getClasses();
1239
- }, wt = function(e, a, l, u) {
1240
- return K(this, null, function* () {
1241
- const { securityLevel: n, block: p } = ne(), o = u.db;
1242
- let b;
1243
- n === "sandbox" && (b = J("#i" + a));
1244
- const f = n === "sandbox" ? J(b.nodes()[0].contentDocument.body) : J("body"), g = n === "sandbox" ? f.select(`[id="${a}"]`) : J(`[id="${a}"]`);
1245
- Pe(g, ["point", "circle", "cross"], u.type, a);
1246
- const y = o.getBlocks(), T = o.getBlocksFlat(), v = o.getEdges(), N = g.insert("g").attr("class", "block");
1247
- yield xt(N, y, o);
1248
- const E = yt(o);
1249
- if (yield St(N, y, o), yield Lt(N, v, T, o, a), E) {
1250
- const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: c } = p;
1251
- ze(g, k, D, !!c), S.debug("Here Bounds", E, L), g.attr(
1252
- "viewBox",
1253
- `${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
1254
- );
1255
- }
1256
- je(Ve);
1257
- });
1258
- }, Dt = {
1259
- draw: wt,
1260
- getClasses: Et
1261
- }, Kt = {
1262
- parser: Xe,
1263
- db: dt,
1264
- renderer: Dt,
1265
- styles: pt
1201
+ }, pt = async function(e, a, d, c) {
1202
+ const { securityLevel: n, block: g } = se(), l = c.db;
1203
+ let f;
1204
+ n === "sandbox" && (f = H("#i" + a));
1205
+ const b = n === "sandbox" ? H(f.nodes()[0].contentDocument.body) : H("body"), p = n === "sandbox" ? b.select(`[id="${a}"]`) : H(`[id="${a}"]`);
1206
+ Ne(p, ["point", "circle", "cross"], c.type, a);
1207
+ const y = l.getBlocks(), T = l.getBlocksFlat(), v = l.getEdges(), N = p.insert("g").attr("class", "block");
1208
+ await lt(N, y, l);
1209
+ const E = ht(l);
1210
+ if (await ot(N, y, l), await ct(N, v, T, l, a), E) {
1211
+ const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: o } = g;
1212
+ ye(p, k, D, !!o), S.debug("Here Bounds", E, L), p.attr(
1213
+ "viewBox",
1214
+ `${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
1215
+ );
1216
+ }
1217
+ Ce(Ae);
1218
+ }, ft = {
1219
+ draw: pt,
1220
+ getClasses: gt
1221
+ }, kt = {
1222
+ parser: Be,
1223
+ db: st,
1224
+ renderer: ft,
1225
+ styles: rt
1266
1226
  };
1267
1227
  export {
1268
- Kt as diagram
1228
+ kt as diagram
1269
1229
  };