@kong-ui-public/documentation 1.1.2 → 1.1.3

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 (50) hide show
  1. package/dist/{_basePickBy-zlkqRmFy-CQP0PMRw.js → _basePickBy-zlkqRmFy-Dq-PK6tA.js} +27 -27
  2. package/dist/_baseUniq-SAfYgIkf-DhYxnvgt.js +614 -0
  3. package/dist/{arc-CK9P6CkJ-B3oiAYoG.js → arc-CK9P6CkJ-lihx_wEv.js} +31 -31
  4. package/dist/{architecture-I3QFYML2-DJzmbE4M-BYAx4I-4.js → architecture-I3QFYML2-DJzmbE4M-B5s0Q1wg.js} +1 -1
  5. package/dist/{architectureDiagram-UYN6MBPD-DkZdgpXi-BC7nb0IZ.js → architectureDiagram-UYN6MBPD-DkZdgpXi-CC-fAW7y.js} +850 -850
  6. package/dist/{blockDiagram-ZHA2E4KO-DnCMGCMN-CU7ARVHN.js → blockDiagram-ZHA2E4KO-DnCMGCMN-B9tod6Dk.js} +477 -477
  7. package/dist/{c4Diagram-6F5ED5ID-D5yqWyf0-DEuKG0sN.js → c4Diagram-6F5ED5ID-D5yqWyf0-B1iuFSQ1.js} +203 -203
  8. package/dist/{channel-bVcNKbrJ-C4S-4qV3.js → channel-bVcNKbrJ-DEGmvXXN.js} +1 -1
  9. package/dist/{chunk-5HRBRIJM-BjQ8go1b-733bxiZ-.js → chunk-5HRBRIJM-BjQ8go1b-BszOhLz8.js} +4 -4
  10. package/dist/{chunk-7U56Z5CX-awhAxjZ0-DpUJ4fo1.js → chunk-7U56Z5CX-awhAxjZ0-CHd4qyz3.js} +120 -120
  11. package/dist/{chunk-ASOPGD6M-B5bA_saK-C3yF9T7p.js → chunk-ASOPGD6M-B5bA_saK-RaS3hIfR.js} +1 -1
  12. package/dist/{chunk-KFBOBJHC-nixdujtH-B4639Jmi.js → chunk-KFBOBJHC-nixdujtH-DCajFn7e.js} +1 -1
  13. package/dist/{chunk-T2TOU4HS-DqOVhIzl-piSN2Cjl.js → chunk-T2TOU4HS-DqOVhIzl-1waDvYDY.js} +229 -229
  14. package/dist/{chunk-TMUBEWPD-BRIzn5gH-SlHeKBx9.js → chunk-TMUBEWPD-BRIzn5gH-Ch1SRQ7H.js} +1 -1
  15. package/dist/{classDiagram-LNE6IOMH-fQzyXfo--C9LjXboP.js → classDiagram-LNE6IOMH-fQzyXfo--BpuwdnmV.js} +4 -4
  16. package/dist/{classDiagram-v2-MQ7JQ4JX-fQzyXfo--C9LjXboP.js → classDiagram-v2-MQ7JQ4JX-fQzyXfo--BpuwdnmV.js} +4 -4
  17. package/dist/{clone-_5SW34SG-DtUOH1l1.js → clone-_5SW34SG-BWxdvZXA.js} +1 -1
  18. package/dist/{cytoscape.esm-DAyNQ0qu-B7WxGuVh.js → cytoscape.esm-DAyNQ0qu-i5PnoWfE.js} +976 -976
  19. package/dist/{dagre-4EVJKHTY-CcAruc30-DaOjmyb6.js → dagre-4EVJKHTY-CcAruc30-H9W22Yky.js} +85 -85
  20. package/dist/{diagram-QW4FP2JN-DZT_0aFO-YCKYx1k-.js → diagram-QW4FP2JN-DZT_0aFO-AmG94tp5.js} +21 -21
  21. package/dist/documentation.es.js +1 -1
  22. package/dist/{erDiagram-6RL3IURR-BfgUC5jv-CS9Q9iKF.js → erDiagram-6RL3IURR-BfgUC5jv-BNzxBFoY.js} +201 -201
  23. package/dist/{flowDiagram-7ASYPVHJ-Bo9CnsE7-CkM-DJdr.js → flowDiagram-7ASYPVHJ-Bo9CnsE7-CSLq7kw9.js} +222 -222
  24. package/dist/{ganttDiagram-NTVNEXSI-8E9hjd6N-iN-VNXrV.js → ganttDiagram-NTVNEXSI-8E9hjd6N-CjQQCbaM.js} +16 -16
  25. package/dist/{gitGraph-YCYPL57B-BnErPIwo-DWobPBzL.js → gitGraph-YCYPL57B-BnErPIwo-DxQPpoWq.js} +1 -1
  26. package/dist/{gitGraphDiagram-NRZ2UAAF-B-t90-9e-Co4q5oQK.js → gitGraphDiagram-NRZ2UAAF-B-t90-9e-B6JY8bWo.js} +17 -17
  27. package/dist/{graph-BYZMvqpu-BpeF1PUA.js → graph-BYZMvqpu-CWGqkYZM.js} +43 -43
  28. package/dist/{index-ZM4BlVwk.js → index-BXOX6oou.js} +3487 -3487
  29. package/dist/{info-46DW6VJ7-DPpbx_vA-CnDg11wg.js → info-46DW6VJ7-DPpbx_vA-BmAPar7H.js} +1 -1
  30. package/dist/{infoDiagram-A4XQUW5V-Bo9uoOcA-WvvF1295.js → infoDiagram-A4XQUW5V-Bo9uoOcA-CtFRRRot.js} +2 -2
  31. package/dist/{journeyDiagram-G5WM74LC-BE7U42Ad-BFF_wJwi.js → journeyDiagram-G5WM74LC-BE7U42Ad-of9fN5Vr.js} +173 -173
  32. package/dist/{kanban-definition-QRCXZQQD-C-5-UNRm-LjA3yK5r.js → kanban-definition-QRCXZQQD-C-5-UNRm-DecJsseT.js} +168 -168
  33. package/dist/{katex-Qk2jHgyB-CF_fuFJb.js → katex-Qk2jHgyB-_qyJ_37x.js} +1054 -1054
  34. package/dist/{layout-BHI4imdk-DgoNZaqw.js → layout-BHI4imdk-BlkmyDbe.js} +19 -19
  35. package/dist/{linear-C2PheBya-wGRbEA3e.js → linear-C2PheBya-DijeUNjP.js} +2 -2
  36. package/dist/{mermaid-parser.core-Ce96PX3Q-DPc-bPXG.js → mermaid-parser.core-Ce96PX3Q-DtNzRUJ7.js} +32 -32
  37. package/dist/{mindmap-definition-GWI6TPTV-C98Syvj2-DOvfo2r8.js → mindmap-definition-GWI6TPTV-C98Syvj2-Btvji3Oh.js} +421 -421
  38. package/dist/{packet-W2GHVCYJ-BLiQbm7T-DbS7CM6G.js → packet-W2GHVCYJ-BLiQbm7T-E8ztaW67.js} +1 -1
  39. package/dist/{pie-BEWT4RHE-D3Mbo3mT-DB-aeuYE.js → pie-BEWT4RHE-D3Mbo3mT-BGVGE8TE.js} +1 -1
  40. package/dist/{pieDiagram-YF2LJOPJ-BJV27s9B-DS-nBsbY.js → pieDiagram-YF2LJOPJ-BJV27s9B-DVrzAwZP.js} +20 -20
  41. package/dist/{quadrantDiagram-OS5C2QUG-M57vVPSx-DMjI1wdt.js → quadrantDiagram-OS5C2QUG-M57vVPSx-DrN-qVPg.js} +131 -131
  42. package/dist/{requirementDiagram-MIRIMTAZ-D0KDg7rf-DeEsJ26T.js → requirementDiagram-MIRIMTAZ-D0KDg7rf-FCJNuddX.js} +77 -77
  43. package/dist/{sankeyDiagram-Y46BX6SQ-D6EdYPdp-BA6cRE1h.js → sankeyDiagram-Y46BX6SQ-D6EdYPdp-ClC_w0Hg.js} +108 -108
  44. package/dist/{sequenceDiagram-G6AWOVSC-B171TAb1-DMtStdxJ.js → sequenceDiagram-G6AWOVSC-B171TAb1-B6jBix6L.js} +181 -181
  45. package/dist/{stateDiagram-MAYHULR4-D7FUnT9_-Du3mnoL2.js → stateDiagram-MAYHULR4-D7FUnT9_-B7dSTUAT.js} +81 -81
  46. package/dist/{stateDiagram-v2-4JROLMXI-Cyc74STT-DR1h52WB.js → stateDiagram-v2-4JROLMXI-Cyc74STT-BhUBvhmS.js} +4 -4
  47. package/dist/{timeline-definition-U7ZMHBDA-Bw-dp1yf-BO9wUMSJ.js → timeline-definition-U7ZMHBDA-Bw-dp1yf-DAx9hgzp.js} +126 -126
  48. package/dist/{xychartDiagram-6QU3TZC5-CqbTSF5W-CwiL6udJ.js → xychartDiagram-6QU3TZC5-CqbTSF5W-Dy5Ia8cd.js} +70 -70
  49. package/package.json +2 -2
  50. package/dist/_baseUniq-SAfYgIkf-BO_CV6Oz.js +0 -614
@@ -1,12 +1,12 @@
1
- import { _ as g, g as B, l as L, af as O, br as ce, aD as at, bs as G, bq as Xt, e as he, aq as tt, bt as ge, ay as ue, ag as ye, ar as pe, av as be, az as xe, bu as fe, bv as bt, ab as me, ae as Tt } from "./index-ZM4BlVwk.js";
2
- import { a as we } from "./clone-_5SW34SG-DtUOH1l1.js";
3
- import { L as Le } from "./graph-BYZMvqpu-BpeF1PUA.js";
4
- import { t as Se } from "./channel-bVcNKbrJ-C4S-4qV3.js";
1
+ import { _ as g, aD as at, a9 as O, aa as ce, l as L, aq as he, av as ge, br as ue, ay as ye, az as pe, g as B, bs as G, bq as Xt, e as be, ao as tt, ag as xe, bt as fe, bu as bt, bv as me, ad as Tt } from "./index-BXOX6oou.js";
2
+ import { a as we } from "./clone-_5SW34SG-BWxdvZXA.js";
3
+ import { L as Le } from "./graph-BYZMvqpu-CWGqkYZM.js";
4
+ import { t as Se } from "./channel-bVcNKbrJ-DEGmvXXN.js";
5
5
  var xt = function() {
6
6
  var e = /* @__PURE__ */ g(function(D, c, p, f) {
7
7
  for (p = p || {}, f = D.length; f--; p[D[f]] = c) ;
8
8
  return p;
9
- }, "o"), t = [1, 7], a = [1, 13], n = [1, 14], s = [1, 15], r = [1, 19], i = [1, 16], o = [1, 17], l = [1, 18], y = [8, 30], u = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], b = [1, 23], x = [1, 24], S = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], w = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], v = [1, 49], k = {
9
+ }, "o"), t = [1, 7], a = [1, 13], n = [1, 14], i = [1, 15], r = [1, 19], s = [1, 16], l = [1, 17], o = [1, 18], y = [8, 30], u = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], b = [1, 23], x = [1, 24], S = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], w = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], v = [1, 49], k = {
10
10
  trace: /* @__PURE__ */ g(function() {
11
11
  }, "trace"),
12
12
  yy: {},
@@ -112,7 +112,7 @@ var xt = function() {
112
112
  break;
113
113
  }
114
114
  }, "anonymous"),
115
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: s, 32: r, 40: i, 44: o, 47: l }, { 8: [1, 20] }, e(y, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: a, 29: n, 31: s, 32: r, 40: i, 44: o, 47: l }), e(u, [2, 16], { 14: 22, 15: b, 16: x }), e(u, [2, 17]), e(u, [2, 18]), e(u, [2, 19]), e(u, [2, 20]), e(u, [2, 21]), e(u, [2, 22]), e(S, [2, 25], { 27: [1, 25] }), e(u, [2, 26]), { 19: 26, 26: 12, 32: r }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: s, 32: r, 40: i, 44: o, 47: l }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(w, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(y, [2, 13]), { 26: 35, 32: r }, { 32: [2, 14] }, { 17: [1, 36] }, e(S, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: b, 16: x, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: s, 32: r, 40: i, 44: o, 47: l }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(w, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(S, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(u, [2, 28]), e(u, [2, 35]), e(u, [2, 36]), e(u, [2, 37]), e(u, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: v }, { 15: [1, 50] }, e(u, [2, 27]), e(w, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: v, 39: [2, 31] }, { 32: [2, 15] }, e(w, [2, 34]), { 39: [2, 32] }],
115
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: i, 32: r, 40: s, 44: l, 47: o }, { 8: [1, 20] }, e(y, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: a, 29: n, 31: i, 32: r, 40: s, 44: l, 47: o }), e(u, [2, 16], { 14: 22, 15: b, 16: x }), e(u, [2, 17]), e(u, [2, 18]), e(u, [2, 19]), e(u, [2, 20]), e(u, [2, 21]), e(u, [2, 22]), e(S, [2, 25], { 27: [1, 25] }), e(u, [2, 26]), { 19: 26, 26: 12, 32: r }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: i, 32: r, 40: s, 44: l, 47: o }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(w, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(y, [2, 13]), { 26: 35, 32: r }, { 32: [2, 14] }, { 17: [1, 36] }, e(S, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: b, 16: x, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: a, 29: n, 31: i, 32: r, 40: s, 44: l, 47: o }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(w, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(S, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(u, [2, 28]), e(u, [2, 35]), e(u, [2, 36]), e(u, [2, 37]), e(u, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: v }, { 15: [1, 50] }, e(u, [2, 27]), e(w, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: v, 39: [2, 31] }, { 32: [2, 15] }, e(w, [2, 34]), { 39: [2, 32] }],
116
116
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
117
117
  parseError: /* @__PURE__ */ g(function(D, c) {
118
118
  if (c.recoverable)
@@ -129,7 +129,7 @@ var xt = function() {
129
129
  A.setInput(D, V.yy), V.yy.lexer = A, V.yy.parser = this, typeof A.yylloc > "u" && (A.yylloc = {});
130
130
  var ut = A.yylloc;
131
131
  d.push(ut);
132
- var le = A.options && A.options.ranges;
132
+ var oe = A.options && A.options.ranges;
133
133
  typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
134
134
  function de(Y) {
135
135
  p.length = p.length - 2 * Y, E.length = E.length - Y, d.length = d.length - Y;
@@ -140,20 +140,20 @@ var xt = function() {
140
140
  return Y = f.pop() || A.lex() || X, typeof Y != "number" && (Y instanceof Array && (f = Y, Y = f.pop()), Y = c.symbols_[Y] || Y), Y;
141
141
  }
142
142
  g(Dt, "lex");
143
- for (var W, q, H, yt, Q = {}, it, J, Nt, st; ; ) {
143
+ for (var W, q, H, yt, Q = {}, st, J, Nt, it; ; ) {
144
144
  if (q = p[p.length - 1], this.defaultActions[q] ? H = this.defaultActions[q] : ((W === null || typeof W > "u") && (W = Dt()), H = m[q] && m[q][W]), typeof H > "u" || !H.length || !H[0]) {
145
145
  var pt = "";
146
- st = [];
147
- for (it in m[q])
148
- this.terminals_[it] && it > z && st.push("'" + this.terminals_[it] + "'");
146
+ it = [];
147
+ for (st in m[q])
148
+ this.terminals_[st] && st > z && it.push("'" + this.terminals_[st] + "'");
149
149
  A.showPosition ? pt = "Parse error on line " + (I + 1) + `:
150
150
  ` + A.showPosition() + `
151
- Expecting ` + st.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : pt = "Parse error on line " + (I + 1) + ": Unexpected " + (W == X ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(pt, {
151
+ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : pt = "Parse error on line " + (I + 1) + ": Unexpected " + (W == X ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(pt, {
152
152
  text: A.match,
153
153
  token: this.terminals_[W] || W,
154
154
  line: A.yylineno,
155
155
  loc: ut,
156
- expected: st
156
+ expected: it
157
157
  });
158
158
  }
159
159
  if (H[0] instanceof Array && H.length > 1)
@@ -168,7 +168,7 @@ Expecting ` + st.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : pt =
168
168
  last_line: d[d.length - 1].last_line,
169
169
  first_column: d[d.length - (J || 1)].first_column,
170
170
  last_column: d[d.length - 1].last_column
171
- }, le && (Q._$.range = [
171
+ }, oe && (Q._$.range = [
172
172
  d[d.length - (J || 1)].range[0],
173
173
  d[d.length - 1].range[1]
174
174
  ]), yt = this.performAction.apply(Q, [
@@ -603,15 +603,15 @@ Expecting ` + st.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : pt =
603
603
  return g(_, "Parser"), _.prototype = k, k.Parser = _, new _();
604
604
  }();
605
605
  xt.parser = xt;
606
- var ke = xt, U = /* @__PURE__ */ new Map(), St = [], ft = /* @__PURE__ */ new Map(), $t = "color", Ct = "fill", _e = "bgFill", Ft = ",", ve = B(), lt = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ g((e) => me.sanitizeText(e, ve), "sanitizeText"), De = /* @__PURE__ */ g(function(e, t = "") {
607
- let a = lt.get(e);
608
- a || (a = { id: e, styles: [], textStyles: [] }, lt.set(e, a)), t != null && t.split(Ft).forEach((n) => {
609
- const s = n.replace(/([^;]*);/, "$1").trim();
606
+ var ke = xt, U = /* @__PURE__ */ new Map(), St = [], ft = /* @__PURE__ */ new Map(), $t = "color", Ct = "fill", _e = "bgFill", Ft = ",", ve = B(), ot = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ g((e) => xe.sanitizeText(e, ve), "sanitizeText"), De = /* @__PURE__ */ g(function(e, t = "") {
607
+ let a = ot.get(e);
608
+ a || (a = { id: e, styles: [], textStyles: [] }, ot.set(e, a)), t != null && t.split(Ft).forEach((n) => {
609
+ const i = n.replace(/([^;]*);/, "$1").trim();
610
610
  if (RegExp($t).exec(n)) {
611
- const r = s.replace(Ct, _e).replace($t, Ct);
611
+ const r = i.replace(Ct, _e).replace($t, Ct);
612
612
  a.textStyles.push(r);
613
613
  }
614
- a.styles.push(s);
614
+ a.styles.push(i);
615
615
  });
616
616
  }, "addStyleClass"), Ne = /* @__PURE__ */ g(function(e, t = "") {
617
617
  const a = U.get(e);
@@ -620,46 +620,46 @@ var ke = xt, U = /* @__PURE__ */ new Map(), St = [], ft = /* @__PURE__ */ new Ma
620
620
  e.split(",").forEach(function(a) {
621
621
  let n = U.get(a);
622
622
  if (n === void 0) {
623
- const s = a.trim();
624
- n = { id: s, type: "na", children: [] }, U.set(s, n);
623
+ const i = a.trim();
624
+ n = { id: i, type: "na", children: [] }, U.set(i, n);
625
625
  }
626
626
  n.classes || (n.classes = []), n.classes.push(t);
627
627
  });
628
628
  }, "setCssClass"), Yt = /* @__PURE__ */ g((e, t) => {
629
629
  const a = e.flat(), n = [];
630
- for (const s of a) {
631
- if (s.label && (s.label = Ee(s.label)), s.type === "classDef") {
632
- De(s.id, s.css);
630
+ for (const i of a) {
631
+ if (i.label && (i.label = Ee(i.label)), i.type === "classDef") {
632
+ De(i.id, i.css);
633
633
  continue;
634
634
  }
635
- if (s.type === "applyClass") {
636
- Te(s.id, (s == null ? void 0 : s.styleClass) ?? "");
635
+ if (i.type === "applyClass") {
636
+ Te(i.id, (i == null ? void 0 : i.styleClass) ?? "");
637
637
  continue;
638
638
  }
639
- if (s.type === "applyStyles") {
640
- s != null && s.stylesStr && Ne(s.id, s == null ? void 0 : s.stylesStr);
639
+ if (i.type === "applyStyles") {
640
+ i != null && i.stylesStr && Ne(i.id, i == null ? void 0 : i.stylesStr);
641
641
  continue;
642
642
  }
643
- if (s.type === "column-setting")
644
- t.columns = s.columns ?? -1;
645
- else if (s.type === "edge") {
646
- const r = (ft.get(s.id) ?? 0) + 1;
647
- ft.set(s.id, r), s.id = r + "-" + s.id, St.push(s);
643
+ if (i.type === "column-setting")
644
+ t.columns = i.columns ?? -1;
645
+ else if (i.type === "edge") {
646
+ const r = (ft.get(i.id) ?? 0) + 1;
647
+ ft.set(i.id, r), i.id = r + "-" + i.id, St.push(i);
648
648
  } else {
649
- s.label || (s.type === "composite" ? s.label = "" : s.label = s.id);
650
- const r = U.get(s.id);
651
- if (r === void 0 ? U.set(s.id, s) : (s.type !== "na" && (r.type = s.type), s.label !== s.id && (r.label = s.label)), s.children && Yt(s.children, s), s.type === "space") {
652
- const i = s.width ?? 1;
653
- for (let o = 0; o < i; o++) {
654
- const l = we(s);
655
- l.id = l.id + "-" + o, U.set(l.id, l), n.push(l);
649
+ i.label || (i.type === "composite" ? i.label = "" : i.label = i.id);
650
+ const r = U.get(i.id);
651
+ if (r === void 0 ? U.set(i.id, i) : (i.type !== "na" && (r.type = i.type), i.label !== i.id && (r.label = i.label)), i.children && Yt(i.children, i), i.type === "space") {
652
+ const s = i.width ?? 1;
653
+ for (let l = 0; l < s; l++) {
654
+ const o = we(i);
655
+ o.id = o.id + "-" + l, U.set(o.id, o), n.push(o);
656
656
  }
657
- } else r === void 0 && n.push(s);
657
+ } else r === void 0 && n.push(i);
658
658
  }
659
659
  }
660
660
  t.children = n;
661
661
  }, "populateBlockDatabase"), kt = [], rt = { id: "root", type: "composite", children: [], columns: -1 }, $e = /* @__PURE__ */ g(() => {
662
- L.debug("Clear called"), pe(), rt = { id: "root", type: "composite", children: [], columns: -1 }, U = /* @__PURE__ */ new Map([["root", rt]]), kt = [], lt = /* @__PURE__ */ new Map(), St = [], ft = /* @__PURE__ */ new Map();
662
+ L.debug("Clear called"), he(), rt = { id: "root", type: "composite", children: [], columns: -1 }, U = /* @__PURE__ */ new Map([["root", rt]]), kt = [], ot = /* @__PURE__ */ new Map(), St = [], ft = /* @__PURE__ */ new Map();
663
663
  }, "clear");
664
664
  function Kt(e) {
665
665
  switch (L.debug("typeStr2Type", e), e) {
@@ -726,7 +726,7 @@ var It = 0, Ce = /* @__PURE__ */ g(() => (It++, "id-" + Math.random().toString(3
726
726
  }, "getColumns"), Be = /* @__PURE__ */ g(() => [...U.values()], "getBlocksFlat"), ze = /* @__PURE__ */ g(() => kt || [], "getBlocks"), Ae = /* @__PURE__ */ g(() => St, "getEdges"), Re = /* @__PURE__ */ g((e) => U.get(e), "getBlock"), Me = /* @__PURE__ */ g((e) => {
727
727
  U.set(e.id, e);
728
728
  }, "setBlock"), Pe = /* @__PURE__ */ g(() => console, "getLogger"), We = /* @__PURE__ */ g(function() {
729
- return lt;
729
+ return ot;
730
730
  }, "getClasses"), Xe = {
731
731
  getConfig: /* @__PURE__ */ g(() => at().block, "getConfig"),
732
732
  typeStr2Type: Kt,
@@ -744,8 +744,8 @@ var It = 0, Ce = /* @__PURE__ */ g(() => (It++, "id-" + Math.random().toString(3
744
744
  clear: $e,
745
745
  generateId: Ce
746
746
  }, Fe = Xe, nt = /* @__PURE__ */ g((e, t) => {
747
- const a = Se, n = a(e, "r"), s = a(e, "g"), r = a(e, "b");
748
- return be(n, s, r, t);
747
+ const a = Se, n = a(e, "r"), i = a(e, "g"), r = a(e, "b");
748
+ return ge(n, i, r, t);
749
749
  }, "fade"), Ye = /* @__PURE__ */ g((e) => `.label {
750
750
  font-family: ${e.fontFamily};
751
751
  color: ${e.nodeTextColor || e.textColor};
@@ -859,8 +859,8 @@ var It = 0, Ce = /* @__PURE__ */ g(() => (It++, "id-" + Math.random().toString(3
859
859
  fill: ${e.textColor};
860
860
  }
861
861
  `, "getStyles"), Ke = Ye, He = /* @__PURE__ */ g((e, t, a, n) => {
862
- t.forEach((s) => {
863
- er[s](e, a, n);
862
+ t.forEach((i) => {
863
+ er[i](e, a, n);
864
864
  });
865
865
  }, "insertMarkers"), je = /* @__PURE__ */ g((e, t, a) => {
866
866
  L.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
@@ -907,29 +907,29 @@ g(Ut, "calculateBlockPosition");
907
907
  var ar = /* @__PURE__ */ g((e) => {
908
908
  let t = 0, a = 0;
909
909
  for (const n of e.children) {
910
- const { width: s, height: r, x: i, y: o } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
910
+ const { width: i, height: r, x: s, y: l } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
911
911
  L.debug(
912
912
  "getMaxChildSize abc95 child:",
913
913
  n.id,
914
914
  "width:",
915
- s,
915
+ i,
916
916
  "height:",
917
917
  r,
918
918
  "x:",
919
- i,
919
+ s,
920
920
  "y:",
921
- o,
921
+ l,
922
922
  n.type
923
- ), n.type !== "space" && (s > t && (t = s / (e.widthInColumns ?? 1)), r > a && (a = r));
923
+ ), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)), r > a && (a = r));
924
924
  }
925
925
  return { width: t, height: a };
926
926
  }, "getMaxChildSize");
927
927
  function dt(e, t, a = 0, n = 0) {
928
- var s, r, i, o, l, y, u, b, x, S, w;
928
+ var i, r, s, l, o, y, u, b, x, S, w;
929
929
  L.debug(
930
930
  "setBlockSizes abc95 (start)",
931
931
  e.id,
932
- (s = e == null ? void 0 : e.size) == null ? void 0 : s.x,
932
+ (i = e == null ? void 0 : e.size) == null ? void 0 : i.x,
933
933
  "block width =",
934
934
  e == null ? void 0 : e.size,
935
935
  "sieblingWidth",
@@ -941,7 +941,7 @@ function dt(e, t, a = 0, n = 0) {
941
941
  y: 0
942
942
  });
943
943
  let v = 0, k = 0;
944
- if (((i = e.children) == null ? void 0 : i.length) > 0) {
944
+ if (((s = e.children) == null ? void 0 : s.length) > 0) {
945
945
  for (const d of e.children)
946
946
  dt(d, t);
947
947
  const N = ar(e);
@@ -972,8 +972,8 @@ function dt(e, t, a = 0, n = 0) {
972
972
  h.size && (h.size.width = d, h.size.height = m, h.size.x = 0, h.size.y = 0);
973
973
  }
974
974
  if (L.debug(
975
- `abc95 (finale calc) ${e.id} xSize ${c} ySize ${p} columns ${_}${e.children.length} width=${Math.max(f, ((o = e.size) == null ? void 0 : o.width) || 0)}`
976
- ), f < (((l = e == null ? void 0 : e.size) == null ? void 0 : l.width) || 0)) {
975
+ `abc95 (finale calc) ${e.id} xSize ${c} ySize ${p} columns ${_}${e.children.length} width=${Math.max(f, ((l = e.size) == null ? void 0 : l.width) || 0)}`
976
+ ), f < (((o = e == null ? void 0 : e.size) == null ? void 0 : o.width) || 0)) {
977
977
  f = ((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) || 0;
978
978
  const d = _ > 0 ? Math.min(e.children.length, _) : e.children.length;
979
979
  if (d > 0) {
@@ -1001,18 +1001,18 @@ function dt(e, t, a = 0, n = 0) {
1001
1001
  }
1002
1002
  g(dt, "setBlockSizes");
1003
1003
  function _t(e, t) {
1004
- var a, n, s, r, i, o, l, y, u, b, x, S, w, v, k, N, _;
1004
+ var a, n, i, r, s, l, o, y, u, b, x, S, w, v, k, N, _;
1005
1005
  L.debug(
1006
- `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(a = e == null ? void 0 : e.size) == null ? void 0 : a.x} y: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.y} width: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.width}`
1006
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(a = e == null ? void 0 : e.size) == null ? void 0 : a.x} y: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.y} width: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.width}`
1007
1007
  );
1008
1008
  const D = e.columns ?? -1;
1009
1009
  if (L.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
1010
1010
  e.children.length > 0) {
1011
- const c = ((i = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : i.width) ?? 0, p = e.children.length * c + (e.children.length - 1) * C;
1011
+ const c = ((s = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : s.width) ?? 0, p = e.children.length * c + (e.children.length - 1) * C;
1012
1012
  L.debug("widthOfChildren 88", p, "posX");
1013
1013
  let f = 0;
1014
- L.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
1015
- let E = (l = e == null ? void 0 : e.size) != null && l.x ? ((y = e == null ? void 0 : e.size) == null ? void 0 : y.x) + (-((u = e == null ? void 0 : e.size) == null ? void 0 : u.width) / 2 || 0) : -C, d = 0;
1014
+ L.debug("abc91 block?.size?.x", e.id, (l = e == null ? void 0 : e.size) == null ? void 0 : l.x);
1015
+ let E = (o = e == null ? void 0 : e.size) != null && o.x ? ((y = e == null ? void 0 : e.size) == null ? void 0 : y.x) + (-((u = e == null ? void 0 : e.size) == null ? void 0 : u.width) / 2 || 0) : -C, d = 0;
1016
1016
  for (const m of e.children) {
1017
1017
  const h = e;
1018
1018
  if (!m.size)
@@ -1036,15 +1036,15 @@ function _t(e, t) {
1036
1036
  );
1037
1037
  }
1038
1038
  g(_t, "layoutBlocks");
1039
- function vt(e, { minX: t, minY: a, maxX: n, maxY: s } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1039
+ function vt(e, { minX: t, minY: a, maxX: n, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1040
1040
  if (e.size && e.id !== "root") {
1041
- const { x: r, y: i, width: o, height: l } = e.size;
1042
- r - o / 2 < t && (t = r - o / 2), i - l / 2 < a && (a = i - l / 2), r + o / 2 > n && (n = r + o / 2), i + l / 2 > s && (s = i + l / 2);
1041
+ const { x: r, y: s, width: l, height: o } = e.size;
1042
+ r - l / 2 < t && (t = r - l / 2), s - o / 2 < a && (a = s - o / 2), r + l / 2 > n && (n = r + l / 2), s + o / 2 > i && (i = s + o / 2);
1043
1043
  }
1044
1044
  if (e.children)
1045
1045
  for (const r of e.children)
1046
- ({ minX: t, minY: a, maxX: n, maxY: s } = vt(r, { minX: t, minY: a, maxX: n, maxY: s }));
1047
- return { minX: t, minY: a, maxX: n, maxY: s };
1046
+ ({ minX: t, minY: a, maxX: n, maxY: i } = vt(r, { minX: t, minY: a, maxX: n, maxY: i }));
1047
+ return { minX: t, minY: a, maxX: n, maxY: i };
1048
1048
  }
1049
1049
  g(vt, "findBounds");
1050
1050
  function Zt(e) {
@@ -1052,8 +1052,8 @@ function Zt(e) {
1052
1052
  if (!t)
1053
1053
  return;
1054
1054
  dt(t, e, 0, 0), _t(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1055
- const { minX: a, minY: n, maxX: s, maxY: r } = vt(t), i = r - n, o = s - a;
1056
- return { x: a, y: n, width: o, height: i };
1055
+ const { minX: a, minY: n, maxX: i, maxY: r } = vt(t), s = r - n, l = i - a;
1056
+ return { x: a, y: n, width: l, height: s };
1057
1057
  }
1058
1058
  g(Zt, "layout");
1059
1059
  function mt(e, t) {
@@ -1061,33 +1061,33 @@ function mt(e, t) {
1061
1061
  }
1062
1062
  g(mt, "applyStyle");
1063
1063
  function Gt(e) {
1064
- const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = t.append("xhtml:div"), n = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = a.append("span");
1065
- return r.html(n), mt(r, e.labelStyle), r.attr("class", s), mt(a, e.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
1064
+ const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel", r = a.append("span");
1065
+ return r.html(n), mt(r, e.labelStyle), r.attr("class", i), mt(a, e.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
1066
1066
  }
1067
1067
  g(Gt, "addHtmlLabel");
1068
- var ir = /* @__PURE__ */ g((e, t, a, n) => {
1069
- let s = e || "";
1070
- if (typeof s == "object" && (s = s[0]), G(B().flowchart.htmlLabels)) {
1071
- s = s.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + s);
1068
+ var sr = /* @__PURE__ */ g((e, t, a, n) => {
1069
+ let i = e || "";
1070
+ if (typeof i == "object" && (i = i[0]), G(B().flowchart.htmlLabels)) {
1071
+ i = i.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + i);
1072
1072
  const r = {
1073
1073
  isNode: n,
1074
- label: fe(bt(s)),
1074
+ label: fe(bt(i)),
1075
1075
  labelStyle: t.replace("fill:", "color:")
1076
1076
  };
1077
1077
  return Gt(r);
1078
1078
  } else {
1079
1079
  const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1080
1080
  r.setAttribute("style", t.replace("color:", "fill:"));
1081
- let i = [];
1082
- typeof s == "string" ? i = s.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(s) ? i = s : i = [];
1083
- for (const o of i) {
1084
- const l = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1085
- l.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), l.setAttribute("dy", "1em"), l.setAttribute("x", "0"), a ? l.setAttribute("class", "title-row") : l.setAttribute("class", "row"), l.textContent = o.trim(), r.appendChild(l);
1081
+ let s = [];
1082
+ typeof i == "string" ? s = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? s = i : s = [];
1083
+ for (const l of s) {
1084
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1085
+ o.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), o.setAttribute("dy", "1em"), o.setAttribute("x", "0"), a ? o.setAttribute("class", "title-row") : o.setAttribute("class", "row"), o.textContent = l.trim(), r.appendChild(o);
1086
1086
  }
1087
1087
  return r;
1088
1088
  }
1089
- }, "createLabel"), j = ir, sr = /* @__PURE__ */ g((e, t, a, n, s) => {
1090
- t.arrowTypeStart && zt(e, "start", t.arrowTypeStart, a, n, s), t.arrowTypeEnd && zt(e, "end", t.arrowTypeEnd, a, n, s);
1089
+ }, "createLabel"), j = sr, ir = /* @__PURE__ */ g((e, t, a, n, i) => {
1090
+ t.arrowTypeStart && zt(e, "start", t.arrowTypeStart, a, n, i), t.arrowTypeEnd && zt(e, "end", t.arrowTypeEnd, a, n, i);
1091
1091
  }, "addEdgeMarkers"), nr = {
1092
1092
  arrow_cross: "cross",
1093
1093
  arrow_point: "point",
@@ -1098,16 +1098,16 @@ var ir = /* @__PURE__ */ g((e, t, a, n) => {
1098
1098
  composition: "composition",
1099
1099
  dependency: "dependency",
1100
1100
  lollipop: "lollipop"
1101
- }, zt = /* @__PURE__ */ g((e, t, a, n, s, r) => {
1102
- const i = nr[a];
1103
- if (!i) {
1101
+ }, zt = /* @__PURE__ */ g((e, t, a, n, i, r) => {
1102
+ const s = nr[a];
1103
+ if (!s) {
1104
1104
  L.warn(`Unknown arrow type: ${a}`);
1105
1105
  return;
1106
1106
  }
1107
- const o = t === "start" ? "Start" : "End";
1108
- e.attr(`marker-${t}`, `url(${n}#${s}_${r}-${i}${o})`);
1109
- }, "addEdgeMarker"), wt = {}, P = {}, or = /* @__PURE__ */ g((e, t) => {
1110
- const a = B(), n = G(a.flowchart.htmlLabels), s = t.labelType === "markdown" ? Xt(
1107
+ const l = t === "start" ? "Start" : "End";
1108
+ e.attr(`marker-${t}`, `url(${n}#${i}_${r}-${s}${l})`);
1109
+ }, "addEdgeMarker"), wt = {}, P = {}, lr = /* @__PURE__ */ g((e, t) => {
1110
+ const a = B(), n = G(a.flowchart.htmlLabels), i = t.labelType === "markdown" ? Xt(
1111
1111
  e,
1112
1112
  t.label,
1113
1113
  {
@@ -1116,156 +1116,156 @@ var ir = /* @__PURE__ */ g((e, t, a, n) => {
1116
1116
  addSvgBackground: !0
1117
1117
  },
1118
1118
  a
1119
- ) : j(t.label, t.labelStyle), r = e.insert("g").attr("class", "edgeLabel"), i = r.insert("g").attr("class", "label");
1120
- i.node().appendChild(s);
1121
- let o = s.getBBox();
1119
+ ) : j(t.label, t.labelStyle), r = e.insert("g").attr("class", "edgeLabel"), s = r.insert("g").attr("class", "label");
1120
+ s.node().appendChild(i);
1121
+ let l = i.getBBox();
1122
1122
  if (n) {
1123
- const y = s.children[0], u = O(s);
1124
- o = y.getBoundingClientRect(), u.attr("width", o.width), u.attr("height", o.height);
1123
+ const y = i.children[0], u = O(i);
1124
+ l = y.getBoundingClientRect(), u.attr("width", l.width), u.attr("height", l.height);
1125
1125
  }
1126
- i.attr("transform", "translate(" + -o.width / 2 + ", " + -o.height / 2 + ")"), wt[t.id] = r, t.width = o.width, t.height = o.height;
1127
- let l;
1126
+ s.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), wt[t.id] = r, t.width = l.width, t.height = l.height;
1127
+ let o;
1128
1128
  if (t.startLabelLeft) {
1129
1129
  const y = j(t.startLabelLeft, t.labelStyle), u = e.insert("g").attr("class", "edgeTerminals"), b = u.insert("g").attr("class", "inner");
1130
- l = b.node().appendChild(y);
1130
+ o = b.node().appendChild(y);
1131
1131
  const x = y.getBBox();
1132
- b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = u, et(l, t.startLabelLeft);
1132
+ b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = u, et(o, t.startLabelLeft);
1133
1133
  }
1134
1134
  if (t.startLabelRight) {
1135
1135
  const y = j(t.startLabelRight, t.labelStyle), u = e.insert("g").attr("class", "edgeTerminals"), b = u.insert("g").attr("class", "inner");
1136
- l = u.node().appendChild(y), b.node().appendChild(y);
1136
+ o = u.node().appendChild(y), b.node().appendChild(y);
1137
1137
  const x = y.getBBox();
1138
- b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startRight = u, et(l, t.startLabelRight);
1138
+ b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startRight = u, et(o, t.startLabelRight);
1139
1139
  }
1140
1140
  if (t.endLabelLeft) {
1141
1141
  const y = j(t.endLabelLeft, t.labelStyle), u = e.insert("g").attr("class", "edgeTerminals"), b = u.insert("g").attr("class", "inner");
1142
- l = b.node().appendChild(y);
1142
+ o = b.node().appendChild(y);
1143
1143
  const x = y.getBBox();
1144
- b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), u.node().appendChild(y), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = u, et(l, t.endLabelLeft);
1144
+ b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), u.node().appendChild(y), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = u, et(o, t.endLabelLeft);
1145
1145
  }
1146
1146
  if (t.endLabelRight) {
1147
1147
  const y = j(t.endLabelRight, t.labelStyle), u = e.insert("g").attr("class", "edgeTerminals"), b = u.insert("g").attr("class", "inner");
1148
- l = b.node().appendChild(y);
1148
+ o = b.node().appendChild(y);
1149
1149
  const x = y.getBBox();
1150
- b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), u.node().appendChild(y), P[t.id] || (P[t.id] = {}), P[t.id].endRight = u, et(l, t.endLabelRight);
1150
+ b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), u.node().appendChild(y), P[t.id] || (P[t.id] = {}), P[t.id].endRight = u, et(o, t.endLabelRight);
1151
1151
  }
1152
- return s;
1152
+ return i;
1153
1153
  }, "insertEdgeLabel");
1154
1154
  function et(e, t) {
1155
1155
  B().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1156
1156
  }
1157
1157
  g(et, "setTerminalWidth");
1158
- var lr = /* @__PURE__ */ g((e, t) => {
1158
+ var or = /* @__PURE__ */ g((e, t) => {
1159
1159
  L.debug("Moving label abc88 ", e.id, e.label, wt[e.id], t);
1160
1160
  let a = t.updatedPath ? t.updatedPath : t.originalPath;
1161
- const n = B(), { subGraphTitleTotalMargin: s } = he(n);
1161
+ const n = B(), { subGraphTitleTotalMargin: i } = be(n);
1162
1162
  if (e.label) {
1163
1163
  const r = wt[e.id];
1164
- let i = e.x, o = e.y;
1164
+ let s = e.x, l = e.y;
1165
1165
  if (a) {
1166
- const l = tt.calcLabelPosition(a);
1166
+ const o = tt.calcLabelPosition(a);
1167
1167
  L.debug(
1168
1168
  "Moving label " + e.label + " from (",
1169
- i,
1169
+ s,
1170
1170
  ",",
1171
- o,
1171
+ l,
1172
1172
  ") to (",
1173
- l.x,
1173
+ o.x,
1174
1174
  ",",
1175
- l.y,
1175
+ o.y,
1176
1176
  ") abc88"
1177
- ), t.updatedPath && (i = l.x, o = l.y);
1177
+ ), t.updatedPath && (s = o.x, l = o.y);
1178
1178
  }
1179
- r.attr("transform", `translate(${i}, ${o + s / 2})`);
1179
+ r.attr("transform", `translate(${s}, ${l + i / 2})`);
1180
1180
  }
1181
1181
  if (e.startLabelLeft) {
1182
1182
  const r = P[e.id].startLeft;
1183
- let i = e.x, o = e.y;
1183
+ let s = e.x, l = e.y;
1184
1184
  if (a) {
1185
- const l = tt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1186
- i = l.x, o = l.y;
1185
+ const o = tt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1186
+ s = o.x, l = o.y;
1187
1187
  }
1188
- r.attr("transform", `translate(${i}, ${o})`);
1188
+ r.attr("transform", `translate(${s}, ${l})`);
1189
1189
  }
1190
1190
  if (e.startLabelRight) {
1191
1191
  const r = P[e.id].startRight;
1192
- let i = e.x, o = e.y;
1192
+ let s = e.x, l = e.y;
1193
1193
  if (a) {
1194
- const l = tt.calcTerminalLabelPosition(
1194
+ const o = tt.calcTerminalLabelPosition(
1195
1195
  e.arrowTypeStart ? 10 : 0,
1196
1196
  "start_right",
1197
1197
  a
1198
1198
  );
1199
- i = l.x, o = l.y;
1199
+ s = o.x, l = o.y;
1200
1200
  }
1201
- r.attr("transform", `translate(${i}, ${o})`);
1201
+ r.attr("transform", `translate(${s}, ${l})`);
1202
1202
  }
1203
1203
  if (e.endLabelLeft) {
1204
1204
  const r = P[e.id].endLeft;
1205
- let i = e.x, o = e.y;
1205
+ let s = e.x, l = e.y;
1206
1206
  if (a) {
1207
- const l = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1208
- i = l.x, o = l.y;
1207
+ const o = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1208
+ s = o.x, l = o.y;
1209
1209
  }
1210
- r.attr("transform", `translate(${i}, ${o})`);
1210
+ r.attr("transform", `translate(${s}, ${l})`);
1211
1211
  }
1212
1212
  if (e.endLabelRight) {
1213
1213
  const r = P[e.id].endRight;
1214
- let i = e.x, o = e.y;
1214
+ let s = e.x, l = e.y;
1215
1215
  if (a) {
1216
- const l = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1217
- i = l.x, o = l.y;
1216
+ const o = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1217
+ s = o.x, l = o.y;
1218
1218
  }
1219
- r.attr("transform", `translate(${i}, ${o})`);
1219
+ r.attr("transform", `translate(${s}, ${l})`);
1220
1220
  }
1221
1221
  }, "positionEdgeLabel"), dr = /* @__PURE__ */ g((e, t) => {
1222
- const a = e.x, n = e.y, s = Math.abs(t.x - a), r = Math.abs(t.y - n), i = e.width / 2, o = e.height / 2;
1223
- return s >= i || r >= o;
1222
+ const a = e.x, n = e.y, i = Math.abs(t.x - a), r = Math.abs(t.y - n), s = e.width / 2, l = e.height / 2;
1223
+ return i >= s || r >= l;
1224
1224
  }, "outsideNode"), cr = /* @__PURE__ */ g((e, t, a) => {
1225
1225
  L.debug(`intersection calc abc89:
1226
1226
  outsidePoint: ${JSON.stringify(t)}
1227
1227
  insidePoint : ${JSON.stringify(a)}
1228
1228
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1229
- const n = e.x, s = e.y, r = Math.abs(n - a.x), i = e.width / 2;
1230
- let o = a.x < t.x ? i - r : i + r;
1231
- const l = e.height / 2, y = Math.abs(t.y - a.y), u = Math.abs(t.x - a.x);
1232
- if (Math.abs(s - t.y) * i > Math.abs(n - t.x) * l) {
1233
- let b = a.y < t.y ? t.y - l - s : s - l - t.y;
1234
- o = u * b / y;
1229
+ const n = e.x, i = e.y, r = Math.abs(n - a.x), s = e.width / 2;
1230
+ let l = a.x < t.x ? s - r : s + r;
1231
+ const o = e.height / 2, y = Math.abs(t.y - a.y), u = Math.abs(t.x - a.x);
1232
+ if (Math.abs(i - t.y) * s > Math.abs(n - t.x) * o) {
1233
+ let b = a.y < t.y ? t.y - o - i : i - o - t.y;
1234
+ l = u * b / y;
1235
1235
  const x = {
1236
- x: a.x < t.x ? a.x + o : a.x - u + o,
1236
+ x: a.x < t.x ? a.x + l : a.x - u + l,
1237
1237
  y: a.y < t.y ? a.y + y - b : a.y - y + b
1238
1238
  };
1239
- return o === 0 && (x.x = t.x, x.y = t.y), u === 0 && (x.x = t.x), y === 0 && (x.y = t.y), L.debug(`abc89 topp/bott calc, Q ${y}, q ${b}, R ${u}, r ${o}`, x), x;
1239
+ return l === 0 && (x.x = t.x, x.y = t.y), u === 0 && (x.x = t.x), y === 0 && (x.y = t.y), L.debug(`abc89 topp/bott calc, Q ${y}, q ${b}, R ${u}, r ${l}`, x), x;
1240
1240
  } else {
1241
- a.x < t.x ? o = t.x - i - n : o = n - i - t.x;
1242
- let b = y * o / u, x = a.x < t.x ? a.x + u - o : a.x - u + o, S = a.y < t.y ? a.y + b : a.y - b;
1243
- return L.debug(`sides calc abc89, Q ${y}, q ${b}, R ${u}, r ${o}`, { _x: x, _y: S }), o === 0 && (x = t.x, S = t.y), u === 0 && (x = t.x), y === 0 && (S = t.y), { x, y: S };
1241
+ a.x < t.x ? l = t.x - s - n : l = n - s - t.x;
1242
+ let b = y * l / u, x = a.x < t.x ? a.x + u - l : a.x - u + l, S = a.y < t.y ? a.y + b : a.y - b;
1243
+ return L.debug(`sides calc abc89, Q ${y}, q ${b}, R ${u}, r ${l}`, { _x: x, _y: S }), l === 0 && (x = t.x, S = t.y), u === 0 && (x = t.x), y === 0 && (S = t.y), { x, y: S };
1244
1244
  }
1245
1245
  }, "intersection"), At = /* @__PURE__ */ g((e, t) => {
1246
1246
  L.debug("abc88 cutPathAtIntersect", e, t);
1247
- let a = [], n = e[0], s = !1;
1247
+ let a = [], n = e[0], i = !1;
1248
1248
  return e.forEach((r) => {
1249
- if (!dr(t, r) && !s) {
1250
- const i = cr(t, n, r);
1251
- let o = !1;
1252
- a.forEach((l) => {
1253
- o = o || l.x === i.x && l.y === i.y;
1254
- }), a.some((l) => l.x === i.x && l.y === i.y) || a.push(i), s = !0;
1249
+ if (!dr(t, r) && !i) {
1250
+ const s = cr(t, n, r);
1251
+ let l = !1;
1252
+ a.forEach((o) => {
1253
+ l = l || o.x === s.x && o.y === s.y;
1254
+ }), a.some((o) => o.x === s.x && o.y === s.y) || a.push(s), i = !0;
1255
1255
  } else
1256
- n = r, s || a.push(r);
1256
+ n = r, i || a.push(r);
1257
1257
  }), a;
1258
- }, "cutPathAtIntersect"), hr = /* @__PURE__ */ g(function(e, t, a, n, s, r, i) {
1259
- let o = a.points;
1258
+ }, "cutPathAtIntersect"), hr = /* @__PURE__ */ g(function(e, t, a, n, i, r, s) {
1259
+ let l = a.points;
1260
1260
  L.debug("abc88 InsertEdge: edge=", a, "e=", t);
1261
- let l = !1;
1261
+ let o = !1;
1262
1262
  const y = r.node(t.v);
1263
1263
  var u = r.node(t.w);
1264
- u != null && u.intersect && y != null && y.intersect && (o = o.slice(1, a.points.length - 1), o.unshift(y.intersect(o[0])), o.push(u.intersect(o[o.length - 1]))), a.toCluster && (L.debug("to cluster abc88", n[a.toCluster]), o = At(a.points, n[a.toCluster].node), l = !0), a.fromCluster && (L.debug("from cluster abc88", n[a.fromCluster]), o = At(o.reverse(), n[a.fromCluster].node).reverse(), l = !0);
1265
- const b = o.filter((c) => !Number.isNaN(c.y));
1266
- let x = xe;
1267
- a.curve && (s === "graph" || s === "flowchart") && (x = a.curve);
1268
- const { x: S, y: w } = ge(a), v = ue().x(S).y(w).curve(x);
1264
+ u != null && u.intersect && y != null && y.intersect && (l = l.slice(1, a.points.length - 1), l.unshift(y.intersect(l[0])), l.push(u.intersect(l[l.length - 1]))), a.toCluster && (L.debug("to cluster abc88", n[a.toCluster]), l = At(a.points, n[a.toCluster].node), o = !0), a.fromCluster && (L.debug("from cluster abc88", n[a.fromCluster]), l = At(l.reverse(), n[a.fromCluster].node).reverse(), o = !0);
1265
+ const b = l.filter((c) => !Number.isNaN(c.y));
1266
+ let x = pe;
1267
+ a.curve && (i === "graph" || i === "flowchart") && (x = a.curve);
1268
+ const { x: S, y: w } = ue(a), v = ye().x(S).y(w).curve(x);
1269
1269
  let k;
1270
1270
  switch (a.thickness) {
1271
1271
  case "normal":
@@ -1293,9 +1293,9 @@ var lr = /* @__PURE__ */ g((e, t) => {
1293
1293
  }
1294
1294
  const N = e.append("path").attr("d", v(b)).attr("id", a.id).attr("class", " " + k + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1295
1295
  let _ = "";
1296
- (B().flowchart.arrowMarkerAbsolute || B().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), sr(N, a, _, i, s);
1296
+ (B().flowchart.arrowMarkerAbsolute || B().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), ir(N, a, _, s, i);
1297
1297
  let D = {};
1298
- return l && (D.updatedPath = o), D.originalPath = a.points, D;
1298
+ return o && (D.updatedPath = l), D.originalPath = a.points, D;
1299
1299
  }, "insertEdge"), gr = /* @__PURE__ */ g((e) => {
1300
1300
  const t = /* @__PURE__ */ new Set();
1301
1301
  for (const a of e)
@@ -1312,136 +1312,136 @@ var lr = /* @__PURE__ */ g((e, t) => {
1312
1312
  }
1313
1313
  return t;
1314
1314
  }, "expandAndDeduplicateDirections"), ur = /* @__PURE__ */ g((e, t, a) => {
1315
- const n = gr(e), s = 2, r = t.height + 2 * a.padding, i = r / s, o = t.width + 2 * i + a.padding, l = a.padding / 2;
1315
+ const n = gr(e), i = 2, r = t.height + 2 * a.padding, s = r / i, l = t.width + 2 * s + a.padding, o = a.padding / 2;
1316
1316
  return n.has("right") && n.has("left") && n.has("up") && n.has("down") ? [
1317
1317
  // Bottom
1318
1318
  { x: 0, y: 0 },
1319
- { x: i, y: 0 },
1320
- { x: o / 2, y: 2 * l },
1321
- { x: o - i, y: 0 },
1322
- { x: o, y: 0 },
1319
+ { x: s, y: 0 },
1320
+ { x: l / 2, y: 2 * o },
1321
+ { x: l - s, y: 0 },
1322
+ { x: l, y: 0 },
1323
1323
  // Right
1324
- { x: o, y: -r / 3 },
1325
- { x: o + 2 * l, y: -r / 2 },
1326
- { x: o, y: -2 * r / 3 },
1327
- { x: o, y: -r },
1324
+ { x: l, y: -r / 3 },
1325
+ { x: l + 2 * o, y: -r / 2 },
1326
+ { x: l, y: -2 * r / 3 },
1327
+ { x: l, y: -r },
1328
1328
  // Top
1329
- { x: o - i, y: -r },
1330
- { x: o / 2, y: -r - 2 * l },
1331
- { x: i, y: -r },
1329
+ { x: l - s, y: -r },
1330
+ { x: l / 2, y: -r - 2 * o },
1331
+ { x: s, y: -r },
1332
1332
  // Left
1333
1333
  { x: 0, y: -r },
1334
1334
  { x: 0, y: -2 * r / 3 },
1335
- { x: -2 * l, y: -r / 2 },
1335
+ { x: -2 * o, y: -r / 2 },
1336
1336
  { x: 0, y: -r / 3 }
1337
1337
  ] : n.has("right") && n.has("left") && n.has("up") ? [
1338
- { x: i, y: 0 },
1339
- { x: o - i, y: 0 },
1340
- { x: o, y: -r / 2 },
1341
- { x: o - i, y: -r },
1342
- { x: i, y: -r },
1338
+ { x: s, y: 0 },
1339
+ { x: l - s, y: 0 },
1340
+ { x: l, y: -r / 2 },
1341
+ { x: l - s, y: -r },
1342
+ { x: s, y: -r },
1343
1343
  { x: 0, y: -r / 2 }
1344
1344
  ] : n.has("right") && n.has("left") && n.has("down") ? [
1345
1345
  { x: 0, y: 0 },
1346
- { x: i, y: -r },
1347
- { x: o - i, y: -r },
1348
- { x: o, y: 0 }
1346
+ { x: s, y: -r },
1347
+ { x: l - s, y: -r },
1348
+ { x: l, y: 0 }
1349
1349
  ] : n.has("right") && n.has("up") && n.has("down") ? [
1350
1350
  { x: 0, y: 0 },
1351
- { x: o, y: -i },
1352
- { x: o, y: -r + i },
1351
+ { x: l, y: -s },
1352
+ { x: l, y: -r + s },
1353
1353
  { x: 0, y: -r }
1354
1354
  ] : n.has("left") && n.has("up") && n.has("down") ? [
1355
- { x: o, y: 0 },
1356
- { x: 0, y: -i },
1357
- { x: 0, y: -r + i },
1358
- { x: o, y: -r }
1355
+ { x: l, y: 0 },
1356
+ { x: 0, y: -s },
1357
+ { x: 0, y: -r + s },
1358
+ { x: l, y: -r }
1359
1359
  ] : n.has("right") && n.has("left") ? [
1360
- { x: i, y: 0 },
1361
- { x: i, y: -l },
1362
- { x: o - i, y: -l },
1363
- { x: o - i, y: 0 },
1364
- { x: o, y: -r / 2 },
1365
- { x: o - i, y: -r },
1366
- { x: o - i, y: -r + l },
1367
- { x: i, y: -r + l },
1368
- { x: i, y: -r },
1360
+ { x: s, y: 0 },
1361
+ { x: s, y: -o },
1362
+ { x: l - s, y: -o },
1363
+ { x: l - s, y: 0 },
1364
+ { x: l, y: -r / 2 },
1365
+ { x: l - s, y: -r },
1366
+ { x: l - s, y: -r + o },
1367
+ { x: s, y: -r + o },
1368
+ { x: s, y: -r },
1369
1369
  { x: 0, y: -r / 2 }
1370
1370
  ] : n.has("up") && n.has("down") ? [
1371
1371
  // Bottom center
1372
- { x: o / 2, y: 0 },
1372
+ { x: l / 2, y: 0 },
1373
1373
  // Left pont of bottom arrow
1374
- { x: 0, y: -l },
1375
- { x: i, y: -l },
1374
+ { x: 0, y: -o },
1375
+ { x: s, y: -o },
1376
1376
  // Left top over vertical section
1377
- { x: i, y: -r + l },
1378
- { x: 0, y: -r + l },
1377
+ { x: s, y: -r + o },
1378
+ { x: 0, y: -r + o },
1379
1379
  // Top of arrow
1380
- { x: o / 2, y: -r },
1381
- { x: o, y: -r + l },
1380
+ { x: l / 2, y: -r },
1381
+ { x: l, y: -r + o },
1382
1382
  // Top of right vertical bar
1383
- { x: o - i, y: -r + l },
1384
- { x: o - i, y: -l },
1385
- { x: o, y: -l }
1383
+ { x: l - s, y: -r + o },
1384
+ { x: l - s, y: -o },
1385
+ { x: l, y: -o }
1386
1386
  ] : n.has("right") && n.has("up") ? [
1387
1387
  { x: 0, y: 0 },
1388
- { x: o, y: -i },
1388
+ { x: l, y: -s },
1389
1389
  { x: 0, y: -r }
1390
1390
  ] : n.has("right") && n.has("down") ? [
1391
1391
  { x: 0, y: 0 },
1392
- { x: o, y: 0 },
1392
+ { x: l, y: 0 },
1393
1393
  { x: 0, y: -r }
1394
1394
  ] : n.has("left") && n.has("up") ? [
1395
- { x: o, y: 0 },
1396
- { x: 0, y: -i },
1397
- { x: o, y: -r }
1395
+ { x: l, y: 0 },
1396
+ { x: 0, y: -s },
1397
+ { x: l, y: -r }
1398
1398
  ] : n.has("left") && n.has("down") ? [
1399
- { x: o, y: 0 },
1399
+ { x: l, y: 0 },
1400
1400
  { x: 0, y: 0 },
1401
- { x: o, y: -r }
1401
+ { x: l, y: -r }
1402
1402
  ] : n.has("right") ? [
1403
- { x: i, y: -l },
1404
- { x: i, y: -l },
1405
- { x: o - i, y: -l },
1406
- { x: o - i, y: 0 },
1407
- { x: o, y: -r / 2 },
1408
- { x: o - i, y: -r },
1409
- { x: o - i, y: -r + l },
1403
+ { x: s, y: -o },
1404
+ { x: s, y: -o },
1405
+ { x: l - s, y: -o },
1406
+ { x: l - s, y: 0 },
1407
+ { x: l, y: -r / 2 },
1408
+ { x: l - s, y: -r },
1409
+ { x: l - s, y: -r + o },
1410
1410
  // top left corner of arrow
1411
- { x: i, y: -r + l },
1412
- { x: i, y: -r + l }
1411
+ { x: s, y: -r + o },
1412
+ { x: s, y: -r + o }
1413
1413
  ] : n.has("left") ? [
1414
- { x: i, y: 0 },
1415
- { x: i, y: -l },
1414
+ { x: s, y: 0 },
1415
+ { x: s, y: -o },
1416
1416
  // Two points, the right corners
1417
- { x: o - i, y: -l },
1418
- { x: o - i, y: -r + l },
1419
- { x: i, y: -r + l },
1420
- { x: i, y: -r },
1417
+ { x: l - s, y: -o },
1418
+ { x: l - s, y: -r + o },
1419
+ { x: s, y: -r + o },
1420
+ { x: s, y: -r },
1421
1421
  { x: 0, y: -r / 2 }
1422
1422
  ] : n.has("up") ? [
1423
1423
  // Bottom center
1424
- { x: i, y: -l },
1424
+ { x: s, y: -o },
1425
1425
  // Left top over vertical section
1426
- { x: i, y: -r + l },
1427
- { x: 0, y: -r + l },
1426
+ { x: s, y: -r + o },
1427
+ { x: 0, y: -r + o },
1428
1428
  // Top of arrow
1429
- { x: o / 2, y: -r },
1430
- { x: o, y: -r + l },
1429
+ { x: l / 2, y: -r },
1430
+ { x: l, y: -r + o },
1431
1431
  // Top of right vertical bar
1432
- { x: o - i, y: -r + l },
1433
- { x: o - i, y: -l }
1432
+ { x: l - s, y: -r + o },
1433
+ { x: l - s, y: -o }
1434
1434
  ] : n.has("down") ? [
1435
1435
  // Bottom center
1436
- { x: o / 2, y: 0 },
1436
+ { x: l / 2, y: 0 },
1437
1437
  // Left pont of bottom arrow
1438
- { x: 0, y: -l },
1439
- { x: i, y: -l },
1438
+ { x: 0, y: -o },
1439
+ { x: s, y: -o },
1440
1440
  // Left top over vertical section
1441
- { x: i, y: -r + l },
1442
- { x: o - i, y: -r + l },
1443
- { x: o - i, y: -l },
1444
- { x: o, y: -l }
1441
+ { x: s, y: -r + o },
1442
+ { x: l - s, y: -r + o },
1443
+ { x: l - s, y: -o },
1444
+ { x: l, y: -o }
1445
1445
  ] : [{ x: 0, y: 0 }];
1446
1446
  }, "getArrowPoints");
1447
1447
  function Jt(e, t) {
@@ -1450,10 +1450,10 @@ function Jt(e, t) {
1450
1450
  g(Jt, "intersectNode");
1451
1451
  var yr = Jt;
1452
1452
  function Vt(e, t, a, n) {
1453
- var s = e.x, r = e.y, i = s - n.x, o = r - n.y, l = Math.sqrt(t * t * o * o + a * a * i * i), y = Math.abs(t * a * i / l);
1454
- n.x < s && (y = -y);
1455
- var u = Math.abs(t * a * o / l);
1456
- return n.y < r && (u = -u), { x: s + y, y: r + u };
1453
+ var i = e.x, r = e.y, s = i - n.x, l = r - n.y, o = Math.sqrt(t * t * l * l + a * a * s * s), y = Math.abs(t * a * s / o);
1454
+ n.x < i && (y = -y);
1455
+ var u = Math.abs(t * a * l / o);
1456
+ return n.y < r && (u = -u), { x: i + y, y: r + u };
1457
1457
  }
1458
1458
  g(Vt, "intersectEllipse");
1459
1459
  var qt = Vt;
@@ -1463,9 +1463,9 @@ function Qt(e, t, a) {
1463
1463
  g(Qt, "intersectCircle");
1464
1464
  var pr = Qt;
1465
1465
  function te(e, t, a, n) {
1466
- var s, r, i, o, l, y, u, b, x, S, w, v, k, N, _;
1467
- if (s = t.y - e.y, i = e.x - t.x, l = t.x * e.y - e.x * t.y, x = s * a.x + i * a.y + l, S = s * n.x + i * n.y + l, !(x !== 0 && S !== 0 && Lt(x, S)) && (r = n.y - a.y, o = a.x - n.x, y = n.x * a.y - a.x * n.y, u = r * e.x + o * e.y + y, b = r * t.x + o * t.y + y, !(u !== 0 && b !== 0 && Lt(u, b)) && (w = s * o - r * i, w !== 0)))
1468
- return v = Math.abs(w / 2), k = i * y - o * l, N = k < 0 ? (k - v) / w : (k + v) / w, k = r * l - s * y, _ = k < 0 ? (k - v) / w : (k + v) / w, { x: N, y: _ };
1466
+ var i, r, s, l, o, y, u, b, x, S, w, v, k, N, _;
1467
+ if (i = t.y - e.y, s = e.x - t.x, o = t.x * e.y - e.x * t.y, x = i * a.x + s * a.y + o, S = i * n.x + s * n.y + o, !(x !== 0 && S !== 0 && Lt(x, S)) && (r = n.y - a.y, l = a.x - n.x, y = n.x * a.y - a.x * n.y, u = r * e.x + l * e.y + y, b = r * t.x + l * t.y + y, !(u !== 0 && b !== 0 && Lt(u, b)) && (w = i * l - r * s, w !== 0)))
1468
+ return v = Math.abs(w / 2), k = s * y - l * o, N = k < 0 ? (k - v) / w : (k + v) / w, k = r * o - i * y, _ = k < 0 ? (k - v) / w : (k + v) / w, { x: N, y: _ };
1469
1469
  }
1470
1470
  g(te, "intersectLine");
1471
1471
  function Lt(e, t) {
@@ -1474,16 +1474,16 @@ function Lt(e, t) {
1474
1474
  g(Lt, "sameSign");
1475
1475
  var br = te, xr = ee;
1476
1476
  function ee(e, t, a) {
1477
- var n = e.x, s = e.y, r = [], i = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
1477
+ var n = e.x, i = e.y, r = [], s = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
1478
1478
  typeof t.forEach == "function" ? t.forEach(function(w) {
1479
- i = Math.min(i, w.x), o = Math.min(o, w.y);
1480
- }) : (i = Math.min(i, t.x), o = Math.min(o, t.y));
1481
- for (var l = n - e.width / 2 - i, y = s - e.height / 2 - o, u = 0; u < t.length; u++) {
1479
+ s = Math.min(s, w.x), l = Math.min(l, w.y);
1480
+ }) : (s = Math.min(s, t.x), l = Math.min(l, t.y));
1481
+ for (var o = n - e.width / 2 - s, y = i - e.height / 2 - l, u = 0; u < t.length; u++) {
1482
1482
  var b = t[u], x = t[u < t.length - 1 ? u + 1 : 0], S = br(
1483
1483
  e,
1484
1484
  a,
1485
- { x: l + b.x, y: y + b.y },
1486
- { x: l + x.x, y: y + x.y }
1485
+ { x: o + b.x, y: y + b.y },
1486
+ { x: o + x.x, y: y + x.y }
1487
1487
  );
1488
1488
  S && r.push(S);
1489
1489
  }
@@ -1494,8 +1494,8 @@ function ee(e, t, a) {
1494
1494
  }
1495
1495
  g(ee, "intersectPolygon");
1496
1496
  var fr = /* @__PURE__ */ g((e, t) => {
1497
- var a = e.x, n = e.y, s = t.x - a, r = t.y - n, i = e.width / 2, o = e.height / 2, l, y;
1498
- return Math.abs(r) * i > Math.abs(s) * o ? (r < 0 && (o = -o), l = r === 0 ? 0 : o * s / r, y = o) : (s < 0 && (i = -i), l = i, y = s === 0 ? 0 : i * r / s), { x: a + l, y: n + y };
1497
+ var a = e.x, n = e.y, i = t.x - a, r = t.y - n, s = e.width / 2, l = e.height / 2, o, y;
1498
+ return Math.abs(r) * s > Math.abs(i) * l ? (r < 0 && (l = -l), o = r === 0 ? 0 : l * i / r, y = l) : (i < 0 && (s = -s), o = s, y = i === 0 ? 0 : s * r / i), { x: a + o, y: n + y };
1499
1499
  }, "intersectRect"), mr = fr, T = {
1500
1500
  node: yr,
1501
1501
  circle: pr,
@@ -1503,30 +1503,30 @@ var fr = /* @__PURE__ */ g((e, t) => {
1503
1503
  polygon: xr,
1504
1504
  rect: mr
1505
1505
  }, R = /* @__PURE__ */ g(async (e, t, a, n) => {
1506
- const s = B();
1506
+ const i = B();
1507
1507
  let r;
1508
- const i = t.useHtmlLabels || G(s.flowchart.htmlLabels);
1508
+ const s = t.useHtmlLabels || G(i.flowchart.htmlLabels);
1509
1509
  a ? r = a : r = "node default";
1510
- const o = e.insert("g").attr("class", r).attr("id", t.domId || t.id), l = o.insert("g").attr("class", "label").attr("style", t.labelStyle);
1510
+ const l = e.insert("g").attr("class", r).attr("id", t.domId || t.id), o = l.insert("g").attr("class", "label").attr("style", t.labelStyle);
1511
1511
  let y;
1512
1512
  t.labelText === void 0 ? y = "" : y = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1513
- const u = l.node();
1513
+ const u = o.node();
1514
1514
  let b;
1515
1515
  t.labelType === "markdown" ? b = Xt(
1516
- l,
1517
- Tt(bt(y), s),
1516
+ o,
1517
+ Tt(bt(y), i),
1518
1518
  {
1519
- useHtmlLabels: i,
1520
- width: t.width || s.flowchart.wrappingWidth,
1519
+ useHtmlLabels: s,
1520
+ width: t.width || i.flowchart.wrappingWidth,
1521
1521
  classes: "markdown-node-label"
1522
1522
  },
1523
- s
1523
+ i
1524
1524
  ) : b = u.appendChild(
1525
- j(Tt(bt(y), s), t.labelStyle, !1, n)
1525
+ j(Tt(bt(y), i), t.labelStyle, !1, n)
1526
1526
  );
1527
1527
  let x = b.getBBox();
1528
1528
  const S = t.padding / 2;
1529
- if (G(s.flowchart.htmlLabels)) {
1529
+ if (G(i.flowchart.htmlLabels)) {
1530
1530
  const w = b.children[0], v = O(b), k = w.getElementsByTagName("img");
1531
1531
  if (k) {
1532
1532
  const N = y.replace(/<img[^>]*>/g, "").trim() === "";
@@ -1535,7 +1535,7 @@ var fr = /* @__PURE__ */ g((e, t) => {
1535
1535
  (_) => new Promise((D) => {
1536
1536
  function c() {
1537
1537
  if (_.style.display = "flex", _.style.flexDirection = "column", N) {
1538
- const p = s.fontSize ? s.fontSize : window.getComputedStyle(document.body).fontSize, f = parseInt(p, 10) * 5 + "px";
1538
+ const p = i.fontSize ? i.fontSize : window.getComputedStyle(document.body).fontSize, f = parseInt(p, 10) * 5 + "px";
1539
1539
  _.style.minWidth = f, _.style.maxWidth = f;
1540
1540
  } else
1541
1541
  _.style.width = "100%";
@@ -1550,7 +1550,7 @@ var fr = /* @__PURE__ */ g((e, t) => {
1550
1550
  }
1551
1551
  x = w.getBoundingClientRect(), v.attr("width", x.width), v.attr("height", x.height);
1552
1552
  }
1553
- return i ? l.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")") : l.attr("transform", "translate(0, " + -x.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: o, bbox: x, halfPadding: S, label: l };
1553
+ return s ? o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")") : o.attr("transform", "translate(0, " + -x.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: l, bbox: x, halfPadding: S, label: o };
1554
1554
  }, "labelHelper"), $ = /* @__PURE__ */ g((e, t) => {
1555
1555
  const a = t.node().getBBox();
1556
1556
  e.width = a.width, e.height = a.height;
@@ -1558,15 +1558,15 @@ var fr = /* @__PURE__ */ g((e, t) => {
1558
1558
  function Z(e, t, a, n) {
1559
1559
  return e.insert("polygon", ":first-child").attr(
1560
1560
  "points",
1561
- n.map(function(s) {
1562
- return s.x + "," + s.y;
1561
+ n.map(function(i) {
1562
+ return i.x + "," + i.y;
1563
1563
  }).join(" ")
1564
1564
  ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
1565
1565
  }
1566
1566
  g(Z, "insertPolygonShape");
1567
1567
  var wr = /* @__PURE__ */ g(async (e, t) => {
1568
1568
  t.useHtmlLabels || B().flowchart.htmlLabels || (t.centerLabel = !0);
1569
- const { shapeSvg: a, bbox: n, halfPadding: s } = await R(
1569
+ const { shapeSvg: a, bbox: n, halfPadding: i } = await R(
1570
1570
  e,
1571
1571
  t,
1572
1572
  "node " + t.classes,
@@ -1574,8 +1574,8 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1574
1574
  );
1575
1575
  L.info("Classes = ", t.classes);
1576
1576
  const r = a.insert("rect", ":first-child");
1577
- return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - s).attr("y", -n.height / 2 - s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), $(t, r), t.intersect = function(i) {
1578
- return T.rect(t, i);
1577
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), $(t, r), t.intersect = function(s) {
1578
+ return T.rect(t, s);
1579
1579
  }, a;
1580
1580
  }, "note"), Lr = wr, Rt = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), K = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Rt(e.classes)} ${Rt(
1581
1581
  e.class
@@ -1585,19 +1585,19 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1585
1585
  t,
1586
1586
  K(t, void 0),
1587
1587
  !0
1588
- ), s = n.width + t.padding, r = n.height + t.padding, i = s + r, o = [
1589
- { x: i / 2, y: 0 },
1590
- { x: i, y: -i / 2 },
1591
- { x: i / 2, y: -i },
1592
- { x: 0, y: -i / 2 }
1588
+ ), i = n.width + t.padding, r = n.height + t.padding, s = i + r, l = [
1589
+ { x: s / 2, y: 0 },
1590
+ { x: s, y: -s / 2 },
1591
+ { x: s / 2, y: -s },
1592
+ { x: 0, y: -s / 2 }
1593
1593
  ];
1594
1594
  L.info("Question main (Circle)");
1595
- const l = Z(a, i, i, o);
1596
- return l.attr("style", t.style), $(t, l), t.intersect = function(y) {
1597
- return L.warn("Intersect called"), T.polygon(t, o, y);
1595
+ const o = Z(a, s, s, l);
1596
+ return o.attr("style", t.style), $(t, o), t.intersect = function(y) {
1597
+ return L.warn("Intersect called"), T.polygon(t, l, y);
1598
1598
  }, a;
1599
1599
  }, "question"), Sr = /* @__PURE__ */ g((e, t) => {
1600
- const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, s = [
1600
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, i = [
1601
1601
  { x: 0, y: n / 2 },
1602
1602
  { x: n / 2, y: 0 },
1603
1603
  { x: 0, y: -28 / 2 },
@@ -1605,7 +1605,7 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1605
1605
  ];
1606
1606
  return a.insert("polygon", ":first-child").attr(
1607
1607
  "points",
1608
- s.map(function(r) {
1608
+ i.map(function(r) {
1609
1609
  return r.x + "," + r.y;
1610
1610
  }).join(" ")
1611
1611
  ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
@@ -1617,21 +1617,21 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1617
1617
  t,
1618
1618
  K(t, void 0),
1619
1619
  !0
1620
- ), s = 4, r = n.height + t.padding, i = r / s, o = n.width + 2 * i + t.padding, l = [
1621
- { x: i, y: 0 },
1622
- { x: o - i, y: 0 },
1623
- { x: o, y: -r / 2 },
1624
- { x: o - i, y: -r },
1625
- { x: i, y: -r },
1620
+ ), i = 4, r = n.height + t.padding, s = r / i, l = n.width + 2 * s + t.padding, o = [
1621
+ { x: s, y: 0 },
1622
+ { x: l - s, y: 0 },
1623
+ { x: l, y: -r / 2 },
1624
+ { x: l - s, y: -r },
1625
+ { x: s, y: -r },
1626
1626
  { x: 0, y: -r / 2 }
1627
- ], y = Z(a, o, r, l);
1627
+ ], y = Z(a, l, r, o);
1628
1628
  return y.attr("style", t.style), $(t, y), t.intersect = function(u) {
1629
- return T.polygon(t, l, u);
1629
+ return T.polygon(t, o, u);
1630
1630
  }, a;
1631
1631
  }, "hexagon"), _r = /* @__PURE__ */ g(async (e, t) => {
1632
- const { shapeSvg: a, bbox: n } = await R(e, t, void 0, !0), s = 2, r = n.height + 2 * t.padding, i = r / s, o = n.width + 2 * i + t.padding, l = ur(t.directions, n, t), y = Z(a, o, r, l);
1632
+ const { shapeSvg: a, bbox: n } = await R(e, t, void 0, !0), i = 2, r = n.height + 2 * t.padding, s = r / i, l = n.width + 2 * s + t.padding, o = ur(t.directions, n, t), y = Z(a, l, r, o);
1633
1633
  return y.attr("style", t.style), $(t, y), t.intersect = function(u) {
1634
- return T.polygon(t, l, u);
1634
+ return T.polygon(t, o, u);
1635
1635
  }, a;
1636
1636
  }, "block_arrow"), vr = /* @__PURE__ */ g(async (e, t) => {
1637
1637
  const { shapeSvg: a, bbox: n } = await R(
@@ -1639,25 +1639,25 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1639
1639
  t,
1640
1640
  K(t, void 0),
1641
1641
  !0
1642
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1642
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1643
1643
  { x: -r / 2, y: 0 },
1644
- { x: s, y: 0 },
1645
- { x: s, y: -r },
1644
+ { x: i, y: 0 },
1645
+ { x: i, y: -r },
1646
1646
  { x: -r / 2, y: -r },
1647
1647
  { x: 0, y: -r / 2 }
1648
1648
  ];
1649
- return Z(a, s, r, i).attr("style", t.style), t.width = s + r, t.height = r, t.intersect = function(o) {
1650
- return T.polygon(t, i, o);
1649
+ return Z(a, i, r, s).attr("style", t.style), t.width = i + r, t.height = r, t.intersect = function(l) {
1650
+ return T.polygon(t, s, l);
1651
1651
  }, a;
1652
1652
  }, "rect_left_inv_arrow"), Er = /* @__PURE__ */ g(async (e, t) => {
1653
- const { shapeSvg: a, bbox: n } = await R(e, t, K(t), !0), s = n.width + t.padding, r = n.height + t.padding, i = [
1653
+ const { shapeSvg: a, bbox: n } = await R(e, t, K(t), !0), i = n.width + t.padding, r = n.height + t.padding, s = [
1654
1654
  { x: -2 * r / 6, y: 0 },
1655
- { x: s - r / 6, y: 0 },
1656
- { x: s + 2 * r / 6, y: -r },
1655
+ { x: i - r / 6, y: 0 },
1656
+ { x: i + 2 * r / 6, y: -r },
1657
1657
  { x: r / 6, y: -r }
1658
- ], o = Z(a, s, r, i);
1659
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1660
- return T.polygon(t, i, l);
1658
+ ], l = Z(a, i, r, s);
1659
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1660
+ return T.polygon(t, s, o);
1661
1661
  }, a;
1662
1662
  }, "lean_right"), Dr = /* @__PURE__ */ g(async (e, t) => {
1663
1663
  const { shapeSvg: a, bbox: n } = await R(
@@ -1665,14 +1665,14 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1665
1665
  t,
1666
1666
  K(t, void 0),
1667
1667
  !0
1668
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1668
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1669
1669
  { x: 2 * r / 6, y: 0 },
1670
- { x: s + r / 6, y: 0 },
1671
- { x: s - 2 * r / 6, y: -r },
1670
+ { x: i + r / 6, y: 0 },
1671
+ { x: i - 2 * r / 6, y: -r },
1672
1672
  { x: -r / 6, y: -r }
1673
- ], o = Z(a, s, r, i);
1674
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1675
- return T.polygon(t, i, l);
1673
+ ], l = Z(a, i, r, s);
1674
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1675
+ return T.polygon(t, s, o);
1676
1676
  }, a;
1677
1677
  }, "lean_left"), Nr = /* @__PURE__ */ g(async (e, t) => {
1678
1678
  const { shapeSvg: a, bbox: n } = await R(
@@ -1680,14 +1680,14 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1680
1680
  t,
1681
1681
  K(t, void 0),
1682
1682
  !0
1683
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1683
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1684
1684
  { x: -2 * r / 6, y: 0 },
1685
- { x: s + 2 * r / 6, y: 0 },
1686
- { x: s - r / 6, y: -r },
1685
+ { x: i + 2 * r / 6, y: 0 },
1686
+ { x: i - r / 6, y: -r },
1687
1687
  { x: r / 6, y: -r }
1688
- ], o = Z(a, s, r, i);
1689
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1690
- return T.polygon(t, i, l);
1688
+ ], l = Z(a, i, r, s);
1689
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1690
+ return T.polygon(t, s, o);
1691
1691
  }, a;
1692
1692
  }, "trapezoid"), Tr = /* @__PURE__ */ g(async (e, t) => {
1693
1693
  const { shapeSvg: a, bbox: n } = await R(
@@ -1695,14 +1695,14 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1695
1695
  t,
1696
1696
  K(t, void 0),
1697
1697
  !0
1698
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1698
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1699
1699
  { x: r / 6, y: 0 },
1700
- { x: s - r / 6, y: 0 },
1701
- { x: s + 2 * r / 6, y: -r },
1700
+ { x: i - r / 6, y: 0 },
1701
+ { x: i + 2 * r / 6, y: -r },
1702
1702
  { x: -2 * r / 6, y: -r }
1703
- ], o = Z(a, s, r, i);
1704
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1705
- return T.polygon(t, i, l);
1703
+ ], l = Z(a, i, r, s);
1704
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1705
+ return T.polygon(t, s, o);
1706
1706
  }, a;
1707
1707
  }, "inv_trapezoid"), $r = /* @__PURE__ */ g(async (e, t) => {
1708
1708
  const { shapeSvg: a, bbox: n } = await R(
@@ -1710,15 +1710,15 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1710
1710
  t,
1711
1711
  K(t, void 0),
1712
1712
  !0
1713
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1713
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1714
1714
  { x: 0, y: 0 },
1715
- { x: s + r / 2, y: 0 },
1716
- { x: s, y: -r / 2 },
1717
- { x: s + r / 2, y: -r },
1715
+ { x: i + r / 2, y: 0 },
1716
+ { x: i, y: -r / 2 },
1717
+ { x: i + r / 2, y: -r },
1718
1718
  { x: 0, y: -r }
1719
- ], o = Z(a, s, r, i);
1720
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1721
- return T.polygon(t, i, l);
1719
+ ], l = Z(a, i, r, s);
1720
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1721
+ return T.polygon(t, s, o);
1722
1722
  }, a;
1723
1723
  }, "rect_right_inv_arrow"), Cr = /* @__PURE__ */ g(async (e, t) => {
1724
1724
  const { shapeSvg: a, bbox: n } = await R(
@@ -1726,25 +1726,25 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1726
1726
  t,
1727
1727
  K(t, void 0),
1728
1728
  !0
1729
- ), s = n.width + t.padding, r = s / 2, i = r / (2.5 + s / 50), o = n.height + i + t.padding, l = "M 0," + i + " a " + r + "," + i + " 0,0,0 " + s + " 0 a " + r + "," + i + " 0,0,0 " + -s + " 0 l 0," + o + " a " + r + "," + i + " 0,0,0 " + s + " 0 l 0," + -o, y = a.attr("label-offset-y", i).insert("path", ":first-child").attr("style", t.style).attr("d", l).attr("transform", "translate(" + -s / 2 + "," + -(o / 2 + i) + ")");
1729
+ ), i = n.width + t.padding, r = i / 2, s = r / (2.5 + i / 50), l = n.height + s + t.padding, o = "M 0," + s + " a " + r + "," + s + " 0,0,0 " + i + " 0 a " + r + "," + s + " 0,0,0 " + -i + " 0 l 0," + l + " a " + r + "," + s + " 0,0,0 " + i + " 0 l 0," + -l, y = a.attr("label-offset-y", s).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + s) + ")");
1730
1730
  return $(t, y), t.intersect = function(u) {
1731
1731
  const b = T.rect(t, u), x = b.x - t.x;
1732
- if (r != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(b.y - t.y) > t.height / 2 - i)) {
1733
- let S = i * i * (1 - x * x / (r * r));
1734
- S != 0 && (S = Math.sqrt(S)), S = i - S, u.y - t.y > 0 && (S = -S), b.y += S;
1732
+ if (r != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(b.y - t.y) > t.height / 2 - s)) {
1733
+ let S = s * s * (1 - x * x / (r * r));
1734
+ S != 0 && (S = Math.sqrt(S)), S = s - S, u.y - t.y > 0 && (S = -S), b.y += S;
1735
1735
  }
1736
1736
  return b;
1737
1737
  }, a;
1738
1738
  }, "cylinder"), Ir = /* @__PURE__ */ g(async (e, t) => {
1739
- const { shapeSvg: a, bbox: n, halfPadding: s } = await R(
1739
+ const { shapeSvg: a, bbox: n, halfPadding: i } = await R(
1740
1740
  e,
1741
1741
  t,
1742
1742
  "node " + t.classes + " " + t.class,
1743
1743
  !0
1744
- ), r = a.insert("rect", ":first-child"), i = t.positioned ? t.width : n.width + t.padding, o = t.positioned ? t.height : n.height + t.padding, l = t.positioned ? -i / 2 : -n.width / 2 - s, y = t.positioned ? -o / 2 : -n.height / 2 - s;
1745
- if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", y).attr("width", i).attr("height", o), t.props) {
1744
+ ), r = a.insert("rect", ":first-child"), s = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, o = t.positioned ? -s / 2 : -n.width / 2 - i, y = t.positioned ? -l / 2 : -n.height / 2 - i;
1745
+ if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", y).attr("width", s).attr("height", l), t.props) {
1746
1746
  const u = new Set(Object.keys(t.props));
1747
- t.props.borders && (ct(r, t.props.borders, i, o), u.delete("borders")), u.forEach((b) => {
1747
+ t.props.borders && (ct(r, t.props.borders, s, l), u.delete("borders")), u.forEach((b) => {
1748
1748
  L.warn(`Unknown node property ${b}`);
1749
1749
  });
1750
1750
  }
@@ -1752,15 +1752,15 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1752
1752
  return T.rect(t, u);
1753
1753
  }, a;
1754
1754
  }, "rect"), Or = /* @__PURE__ */ g(async (e, t) => {
1755
- const { shapeSvg: a, bbox: n, halfPadding: s } = await R(
1755
+ const { shapeSvg: a, bbox: n, halfPadding: i } = await R(
1756
1756
  e,
1757
1757
  t,
1758
1758
  "node " + t.classes,
1759
1759
  !0
1760
- ), r = a.insert("rect", ":first-child"), i = t.positioned ? t.width : n.width + t.padding, o = t.positioned ? t.height : n.height + t.padding, l = t.positioned ? -i / 2 : -n.width / 2 - s, y = t.positioned ? -o / 2 : -n.height / 2 - s;
1761
- if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", y).attr("width", i).attr("height", o), t.props) {
1760
+ ), r = a.insert("rect", ":first-child"), s = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, o = t.positioned ? -s / 2 : -n.width / 2 - i, y = t.positioned ? -l / 2 : -n.height / 2 - i;
1761
+ if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", y).attr("width", s).attr("height", l), t.props) {
1762
1762
  const u = new Set(Object.keys(t.props));
1763
- t.props.borders && (ct(r, t.props.borders, i, o), u.delete("borders")), u.forEach((b) => {
1763
+ t.props.borders && (ct(r, t.props.borders, s, l), u.delete("borders")), u.forEach((b) => {
1764
1764
  L.warn(`Unknown node property ${b}`);
1765
1765
  });
1766
1766
  }
@@ -1770,42 +1770,42 @@ var wr = /* @__PURE__ */ g(async (e, t) => {
1770
1770
  }, "composite"), Br = /* @__PURE__ */ g(async (e, t) => {
1771
1771
  const { shapeSvg: a } = await R(e, t, "label", !0);
1772
1772
  L.trace("Classes = ", t.class);
1773
- const n = a.insert("rect", ":first-child"), s = 0, r = 0;
1774
- if (n.attr("width", s).attr("height", r), a.attr("class", "label edgeLabel"), t.props) {
1775
- const i = new Set(Object.keys(t.props));
1776
- t.props.borders && (ct(n, t.props.borders, s, r), i.delete("borders")), i.forEach((o) => {
1777
- L.warn(`Unknown node property ${o}`);
1773
+ const n = a.insert("rect", ":first-child"), i = 0, r = 0;
1774
+ if (n.attr("width", i).attr("height", r), a.attr("class", "label edgeLabel"), t.props) {
1775
+ const s = new Set(Object.keys(t.props));
1776
+ t.props.borders && (ct(n, t.props.borders, i, r), s.delete("borders")), s.forEach((l) => {
1777
+ L.warn(`Unknown node property ${l}`);
1778
1778
  });
1779
1779
  }
1780
- return $(t, n), t.intersect = function(i) {
1781
- return T.rect(t, i);
1780
+ return $(t, n), t.intersect = function(s) {
1781
+ return T.rect(t, s);
1782
1782
  }, a;
1783
1783
  }, "labelRect");
1784
1784
  function ct(e, t, a, n) {
1785
- const s = [], r = /* @__PURE__ */ g((o) => {
1786
- s.push(o, 0);
1787
- }, "addBorder"), i = /* @__PURE__ */ g((o) => {
1788
- s.push(0, o);
1785
+ const i = [], r = /* @__PURE__ */ g((l) => {
1786
+ i.push(l, 0);
1787
+ }, "addBorder"), s = /* @__PURE__ */ g((l) => {
1788
+ i.push(0, l);
1789
1789
  }, "skipBorder");
1790
- t.includes("t") ? (L.debug("add top border"), r(a)) : i(a), t.includes("r") ? (L.debug("add right border"), r(n)) : i(n), t.includes("b") ? (L.debug("add bottom border"), r(a)) : i(a), t.includes("l") ? (L.debug("add left border"), r(n)) : i(n), e.attr("stroke-dasharray", s.join(" "));
1790
+ t.includes("t") ? (L.debug("add top border"), r(a)) : s(a), t.includes("r") ? (L.debug("add right border"), r(n)) : s(n), t.includes("b") ? (L.debug("add bottom border"), r(a)) : s(a), t.includes("l") ? (L.debug("add left border"), r(n)) : s(n), e.attr("stroke-dasharray", i.join(" "));
1791
1791
  }
1792
1792
  g(ct, "applyNodePropertyBorders");
1793
1793
  var zr = /* @__PURE__ */ g((e, t) => {
1794
1794
  let a;
1795
1795
  t.classes ? a = "node " + t.classes : a = "node default";
1796
- const n = e.insert("g").attr("class", a).attr("id", t.domId || t.id), s = n.insert("rect", ":first-child"), r = n.insert("line"), i = n.insert("g").attr("class", "label"), o = t.labelText.flat ? t.labelText.flat() : t.labelText;
1797
- let l = "";
1798
- typeof o == "object" ? l = o[0] : l = o, L.info("Label text abc79", l, o, typeof o == "object");
1799
- const y = i.node().appendChild(j(l, t.labelStyle, !0, !0));
1796
+ const n = e.insert("g").attr("class", a).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), r = n.insert("line"), s = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
1797
+ let o = "";
1798
+ typeof l == "object" ? o = l[0] : o = l, L.info("Label text abc79", o, l, typeof l == "object");
1799
+ const y = s.node().appendChild(j(o, t.labelStyle, !0, !0));
1800
1800
  let u = { width: 0, height: 0 };
1801
1801
  if (G(B().flowchart.htmlLabels)) {
1802
1802
  const v = y.children[0], k = O(y);
1803
1803
  u = v.getBoundingClientRect(), k.attr("width", u.width), k.attr("height", u.height);
1804
1804
  }
1805
- L.info("Text 2", o);
1806
- const b = o.slice(1, o.length);
1805
+ L.info("Text 2", l);
1806
+ const b = l.slice(1, l.length);
1807
1807
  let x = y.getBBox();
1808
- const S = i.node().appendChild(
1808
+ const S = s.node().appendChild(
1809
1809
  j(b.join ? b.join("<br/>") : b, t.labelStyle, !0, !0)
1810
1810
  );
1811
1811
  if (G(B().flowchart.htmlLabels)) {
@@ -1821,10 +1821,10 @@ var zr = /* @__PURE__ */ g((e, t) => {
1821
1821
  "transform",
1822
1822
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1823
1823
  (u.width < x.width ? 0 : -(x.width - u.width) / 2) + ", 0)"
1824
- ), u = i.node().getBBox(), i.attr(
1824
+ ), u = s.node().getBBox(), s.attr(
1825
1825
  "transform",
1826
1826
  "translate(" + -u.width / 2 + ", " + (-u.height / 2 - w + 3) + ")"
1827
- ), s.attr("class", "outer title-state").attr("x", -u.width / 2 - w).attr("y", -u.height / 2 - w).attr("width", u.width + t.padding).attr("height", u.height + t.padding), r.attr("class", "divider").attr("x1", -u.width / 2 - w).attr("x2", u.width / 2 + w).attr("y1", -u.height / 2 - w + x.height + w).attr("y2", -u.height / 2 - w + x.height + w), $(t, s), t.intersect = function(v) {
1827
+ ), i.attr("class", "outer title-state").attr("x", -u.width / 2 - w).attr("y", -u.height / 2 - w).attr("width", u.width + t.padding).attr("height", u.height + t.padding), r.attr("class", "divider").attr("x1", -u.width / 2 - w).attr("x2", u.width / 2 + w).attr("y1", -u.height / 2 - w + x.height + w).attr("y2", -u.height / 2 - w + x.height + w), $(t, i), t.intersect = function(v) {
1828
1828
  return T.rect(t, v);
1829
1829
  }, n;
1830
1830
  }, "rectWithTitle"), Ar = /* @__PURE__ */ g(async (e, t) => {
@@ -1833,29 +1833,29 @@ var zr = /* @__PURE__ */ g((e, t) => {
1833
1833
  t,
1834
1834
  K(t, void 0),
1835
1835
  !0
1836
- ), s = n.height + t.padding, r = n.width + s / 4 + t.padding, i = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", s / 2).attr("ry", s / 2).attr("x", -r / 2).attr("y", -s / 2).attr("width", r).attr("height", s);
1837
- return $(t, i), t.intersect = function(o) {
1838
- return T.rect(t, o);
1836
+ ), i = n.height + t.padding, r = n.width + i / 4 + t.padding, s = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -r / 2).attr("y", -i / 2).attr("width", r).attr("height", i);
1837
+ return $(t, s), t.intersect = function(l) {
1838
+ return T.rect(t, l);
1839
1839
  }, a;
1840
1840
  }, "stadium"), Rr = /* @__PURE__ */ g(async (e, t) => {
1841
- const { shapeSvg: a, bbox: n, halfPadding: s } = await R(
1841
+ const { shapeSvg: a, bbox: n, halfPadding: i } = await R(
1842
1842
  e,
1843
1843
  t,
1844
1844
  K(t, void 0),
1845
1845
  !0
1846
1846
  ), r = a.insert("circle", ":first-child");
1847
- return r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), $(t, r), t.intersect = function(i) {
1848
- return L.info("Circle intersect", t, n.width / 2 + s, i), T.circle(t, n.width / 2 + s, i);
1847
+ return r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), $(t, r), t.intersect = function(s) {
1848
+ return L.info("Circle intersect", t, n.width / 2 + i, s), T.circle(t, n.width / 2 + i, s);
1849
1849
  }, a;
1850
1850
  }, "circle"), Mr = /* @__PURE__ */ g(async (e, t) => {
1851
- const { shapeSvg: a, bbox: n, halfPadding: s } = await R(
1851
+ const { shapeSvg: a, bbox: n, halfPadding: i } = await R(
1852
1852
  e,
1853
1853
  t,
1854
1854
  K(t, void 0),
1855
1855
  !0
1856
- ), r = 5, i = a.insert("g", ":first-child"), o = i.insert("circle"), l = i.insert("circle");
1857
- return i.attr("class", t.class), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s + r).attr("width", n.width + t.padding + r * 2).attr("height", n.height + t.padding + r * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + s).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), $(t, o), t.intersect = function(y) {
1858
- return L.info("DoubleCircle intersect", t, n.width / 2 + s + r, y), T.circle(t, n.width / 2 + s + r, y);
1856
+ ), r = 5, s = a.insert("g", ":first-child"), l = s.insert("circle"), o = s.insert("circle");
1857
+ return s.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + r).attr("width", n.width + t.padding + r * 2).attr("height", n.height + t.padding + r * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), $(t, l), t.intersect = function(y) {
1858
+ return L.info("DoubleCircle intersect", t, n.width / 2 + i + r, y), T.circle(t, n.width / 2 + i + r, y);
1859
1859
  }, a;
1860
1860
  }, "doublecircle"), Pr = /* @__PURE__ */ g(async (e, t) => {
1861
1861
  const { shapeSvg: a, bbox: n } = await R(
@@ -1863,47 +1863,47 @@ var zr = /* @__PURE__ */ g((e, t) => {
1863
1863
  t,
1864
1864
  K(t, void 0),
1865
1865
  !0
1866
- ), s = n.width + t.padding, r = n.height + t.padding, i = [
1866
+ ), i = n.width + t.padding, r = n.height + t.padding, s = [
1867
1867
  { x: 0, y: 0 },
1868
- { x: s, y: 0 },
1869
- { x: s, y: -r },
1868
+ { x: i, y: 0 },
1869
+ { x: i, y: -r },
1870
1870
  { x: 0, y: -r },
1871
1871
  { x: 0, y: 0 },
1872
1872
  { x: -8, y: 0 },
1873
- { x: s + 8, y: 0 },
1874
- { x: s + 8, y: -r },
1873
+ { x: i + 8, y: 0 },
1874
+ { x: i + 8, y: -r },
1875
1875
  { x: -8, y: -r },
1876
1876
  { x: -8, y: 0 }
1877
- ], o = Z(a, s, r, i);
1878
- return o.attr("style", t.style), $(t, o), t.intersect = function(l) {
1879
- return T.polygon(t, i, l);
1877
+ ], l = Z(a, i, r, s);
1878
+ return l.attr("style", t.style), $(t, l), t.intersect = function(o) {
1879
+ return T.polygon(t, s, o);
1880
1880
  }, a;
1881
1881
  }, "subroutine"), Wr = /* @__PURE__ */ g((e, t) => {
1882
1882
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child");
1883
- return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), $(t, n), t.intersect = function(s) {
1884
- return T.circle(t, 7, s);
1883
+ return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), $(t, n), t.intersect = function(i) {
1884
+ return T.circle(t, 7, i);
1885
1885
  }, a;
1886
1886
  }, "start"), Pt = /* @__PURE__ */ g((e, t, a) => {
1887
1887
  const n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1888
- let s = 70, r = 10;
1889
- a === "LR" && (s = 10, r = 70);
1890
- const i = n.append("rect").attr("x", -1 * s / 2).attr("y", -1 * r / 2).attr("width", s).attr("height", r).attr("class", "fork-join");
1891
- return $(t, i), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(o) {
1892
- return T.rect(t, o);
1888
+ let i = 70, r = 10;
1889
+ a === "LR" && (i = 10, r = 70);
1890
+ const s = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * r / 2).attr("width", i).attr("height", r).attr("class", "fork-join");
1891
+ return $(t, s), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
1892
+ return T.rect(t, l);
1893
1893
  }, n;
1894
1894
  }, "forkJoin"), Xr = /* @__PURE__ */ g((e, t) => {
1895
- const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child"), s = a.insert("circle", ":first-child");
1896
- return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), $(t, s), t.intersect = function(r) {
1895
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child"), i = a.insert("circle", ":first-child");
1896
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), $(t, i), t.intersect = function(r) {
1897
1897
  return T.circle(t, 7, r);
1898
1898
  }, a;
1899
1899
  }, "end"), Fr = /* @__PURE__ */ g((e, t) => {
1900
1900
  var a;
1901
- const n = t.padding / 2, s = 4, r = 8;
1902
- let i;
1903
- t.classes ? i = "node " + t.classes : i = "node default";
1904
- const o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), l = o.insert("rect", ":first-child"), y = o.insert("line"), u = o.insert("line");
1905
- let b = 0, x = s;
1906
- const S = o.insert("g").attr("class", "label");
1901
+ const n = t.padding / 2, i = 4, r = 8;
1902
+ let s;
1903
+ t.classes ? s = "node " + t.classes : s = "node default";
1904
+ const l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), o = l.insert("rect", ":first-child"), y = l.insert("line"), u = l.insert("line");
1905
+ let b = 0, x = i;
1906
+ const S = l.insert("g").attr("class", "label");
1907
1907
  let w = 0;
1908
1908
  const v = (a = t.classData.annotations) == null ? void 0 : a[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", N = S.node().appendChild(j(k, t.labelStyle, !0, !0));
1909
1909
  let _ = N.getBBox();
@@ -1911,7 +1911,7 @@ var zr = /* @__PURE__ */ g((e, t) => {
1911
1911
  const m = N.children[0], h = O(N);
1912
1912
  _ = m.getBoundingClientRect(), h.attr("width", _.width), h.attr("height", _.height);
1913
1913
  }
1914
- t.classData.annotations[0] && (x += _.height + s, b += _.width);
1914
+ t.classData.annotations[0] && (x += _.height + i, b += _.width);
1915
1915
  let D = t.classData.label;
1916
1916
  t.classData.type !== void 0 && t.classData.type !== "" && (B().flowchart.htmlLabels ? D += "&lt;" + t.classData.type + "&gt;" : D += "<" + t.classData.type + ">");
1917
1917
  const c = S.node().appendChild(j(D, t.labelStyle, !0, !0));
@@ -1921,7 +1921,7 @@ var zr = /* @__PURE__ */ g((e, t) => {
1921
1921
  const m = c.children[0], h = O(c);
1922
1922
  p = m.getBoundingClientRect(), h.attr("width", p.width), h.attr("height", p.height);
1923
1923
  }
1924
- x += p.height + s, p.width > b && (b = p.width);
1924
+ x += p.height + i, p.width > b && (b = p.width);
1925
1925
  const f = [];
1926
1926
  t.classData.members.forEach((m) => {
1927
1927
  const h = m.getDisplayDetails();
@@ -1940,7 +1940,7 @@ var zr = /* @__PURE__ */ g((e, t) => {
1940
1940
  const X = M.children[0], F = O(M);
1941
1941
  z = X.getBoundingClientRect(), F.attr("width", z.width), F.attr("height", z.height);
1942
1942
  }
1943
- z.width > b && (b = z.width), x += z.height + s, f.push(M);
1943
+ z.width > b && (b = z.width), x += z.height + i, f.push(M);
1944
1944
  }), x += r;
1945
1945
  const E = [];
1946
1946
  if (t.classData.methods.forEach((m) => {
@@ -1960,35 +1960,35 @@ var zr = /* @__PURE__ */ g((e, t) => {
1960
1960
  const X = M.children[0], F = O(M);
1961
1961
  z = X.getBoundingClientRect(), F.attr("width", z.width), F.attr("height", z.height);
1962
1962
  }
1963
- z.width > b && (b = z.width), x += z.height + s, E.push(M);
1963
+ z.width > b && (b = z.width), x += z.height + i, E.push(M);
1964
1964
  }), x += r, v) {
1965
1965
  let m = (b - _.width) / 2;
1966
1966
  O(N).attr(
1967
1967
  "transform",
1968
1968
  "translate( " + (-1 * b / 2 + m) + ", " + -1 * x / 2 + ")"
1969
- ), w = _.height + s;
1969
+ ), w = _.height + i;
1970
1970
  }
1971
1971
  let d = (b - p.width) / 2;
1972
1972
  return O(c).attr(
1973
1973
  "transform",
1974
1974
  "translate( " + (-1 * b / 2 + d) + ", " + (-1 * x / 2 + w) + ")"
1975
- ), w += p.height + s, y.attr("class", "divider").attr("x1", -b / 2 - n).attr("x2", b / 2 + n).attr("y1", -x / 2 - n + r + w).attr("y2", -x / 2 - n + r + w), w += r, f.forEach((m) => {
1975
+ ), w += p.height + i, y.attr("class", "divider").attr("x1", -b / 2 - n).attr("x2", b / 2 + n).attr("y1", -x / 2 - n + r + w).attr("y2", -x / 2 - n + r + w), w += r, f.forEach((m) => {
1976
1976
  O(m).attr(
1977
1977
  "transform",
1978
1978
  "translate( " + -b / 2 + ", " + (-1 * x / 2 + w + r / 2) + ")"
1979
1979
  );
1980
1980
  const h = m == null ? void 0 : m.getBBox();
1981
- w += ((h == null ? void 0 : h.height) ?? 0) + s;
1981
+ w += ((h == null ? void 0 : h.height) ?? 0) + i;
1982
1982
  }), w += r, u.attr("class", "divider").attr("x1", -b / 2 - n).attr("x2", b / 2 + n).attr("y1", -x / 2 - n + r + w).attr("y2", -x / 2 - n + r + w), w += r, E.forEach((m) => {
1983
1983
  O(m).attr(
1984
1984
  "transform",
1985
1985
  "translate( " + -b / 2 + ", " + (-1 * x / 2 + w) + ")"
1986
1986
  );
1987
1987
  const h = m == null ? void 0 : m.getBBox();
1988
- w += ((h == null ? void 0 : h.height) ?? 0) + s;
1989
- }), l.attr("style", t.style).attr("class", "outer title-state").attr("x", -b / 2 - n).attr("y", -(x / 2) - n).attr("width", b + t.padding).attr("height", x + t.padding), $(t, l), t.intersect = function(m) {
1988
+ w += ((h == null ? void 0 : h.height) ?? 0) + i;
1989
+ }), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -b / 2 - n).attr("y", -(x / 2) - n).attr("width", b + t.padding).attr("height", x + t.padding), $(t, o), t.intersect = function(m) {
1990
1990
  return T.rect(t, m);
1991
- }, o;
1991
+ }, l;
1992
1992
  }, "class_box"), Wt = {
1993
1993
  rhombus: Mt,
1994
1994
  composite: Or,
@@ -2016,16 +2016,16 @@ var zr = /* @__PURE__ */ g((e, t) => {
2016
2016
  fork: Pt,
2017
2017
  join: Pt,
2018
2018
  class_box: Fr
2019
- }, ot = {}, re = /* @__PURE__ */ g(async (e, t, a) => {
2020
- let n, s;
2019
+ }, lt = {}, re = /* @__PURE__ */ g(async (e, t, a) => {
2020
+ let n, i;
2021
2021
  if (t.link) {
2022
2022
  let r;
2023
- B().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r), s = await Wt[t.shape](n, t, a);
2023
+ B().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r), i = await Wt[t.shape](n, t, a);
2024
2024
  } else
2025
- s = await Wt[t.shape](e, t, a), n = s;
2026
- return t.tooltip && s.attr("title", t.tooltip), t.class && s.attr("class", "node default " + t.class), ot[t.id] = n, t.haveCallback && ot[t.id].attr("class", ot[t.id].attr("class") + " clickable"), n;
2025
+ i = await Wt[t.shape](e, t, a), n = i;
2026
+ return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), lt[t.id] = n, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), n;
2027
2027
  }, "insertNode"), Yr = /* @__PURE__ */ g((e) => {
2028
- const t = ot[e.id];
2028
+ const t = lt[e.id];
2029
2029
  L.trace(
2030
2030
  "Transforming node",
2031
2031
  e.diff,
@@ -2039,17 +2039,17 @@ var zr = /* @__PURE__ */ g((e, t) => {
2039
2039
  ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
2040
2040
  }, "positionNode");
2041
2041
  function Et(e, t, a = !1) {
2042
- var n, s, r;
2043
- const i = e;
2044
- let o = "default";
2045
- (((n = i == null ? void 0 : i.classes) == null ? void 0 : n.length) || 0) > 0 && (o = ((i == null ? void 0 : i.classes) ?? []).join(" ")), o = o + " flowchart-label";
2046
- let l = 0, y = "", u;
2047
- switch (i.type) {
2042
+ var n, i, r;
2043
+ const s = e;
2044
+ let l = "default";
2045
+ (((n = s == null ? void 0 : s.classes) == null ? void 0 : n.length) || 0) > 0 && (l = ((s == null ? void 0 : s.classes) ?? []).join(" ")), l = l + " flowchart-label";
2046
+ let o = 0, y = "", u;
2047
+ switch (s.type) {
2048
2048
  case "round":
2049
- l = 5, y = "rect";
2049
+ o = 5, y = "rect";
2050
2050
  break;
2051
2051
  case "composite":
2052
- l = 0, y = "composite", u = 0;
2052
+ o = 0, y = "composite", u = 0;
2053
2053
  break;
2054
2054
  case "square":
2055
2055
  y = "rect";
@@ -2105,25 +2105,25 @@ function Et(e, t, a = !1) {
2105
2105
  default:
2106
2106
  y = "rect";
2107
2107
  }
2108
- const b = ce((i == null ? void 0 : i.styles) ?? []), x = i.label, S = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2108
+ const b = me((s == null ? void 0 : s.styles) ?? []), x = s.label, S = s.size ?? { width: 0, height: 0, x: 0, y: 0 };
2109
2109
  return {
2110
2110
  labelStyle: b.labelStyle,
2111
2111
  shape: y,
2112
2112
  labelText: x,
2113
- rx: l,
2114
- ry: l,
2115
- class: o,
2113
+ rx: o,
2114
+ ry: o,
2115
+ class: l,
2116
2116
  style: b.style,
2117
- id: i.id,
2118
- directions: i.directions,
2117
+ id: s.id,
2118
+ directions: s.directions,
2119
2119
  width: S.width,
2120
2120
  height: S.height,
2121
2121
  x: S.x,
2122
2122
  y: S.y,
2123
2123
  positioned: a,
2124
2124
  intersect: void 0,
2125
- type: i.type,
2126
- padding: u ?? ((r = (s = at()) == null ? void 0 : s.block) == null ? void 0 : r.padding) ?? 0
2125
+ type: s.type,
2126
+ padding: u ?? ((r = (i = at()) == null ? void 0 : i.block) == null ? void 0 : r.padding) ?? 0
2127
2127
  };
2128
2128
  }
2129
2129
  g(Et, "getNodeFromBlock");
@@ -2131,32 +2131,32 @@ async function ae(e, t, a) {
2131
2131
  const n = Et(t, a, !1);
2132
2132
  if (n.type === "group")
2133
2133
  return;
2134
- const s = at(), r = await re(e, n, { config: s }), i = r.node().getBBox(), o = a.getBlock(n.id);
2135
- o.size = { width: i.width, height: i.height, x: 0, y: 0, node: r }, a.setBlock(o), r.remove();
2134
+ const i = at(), r = await re(e, n, { config: i }), s = r.node().getBBox(), l = a.getBlock(n.id);
2135
+ l.size = { width: s.width, height: s.height, x: 0, y: 0, node: r }, a.setBlock(l), r.remove();
2136
2136
  }
2137
2137
  g(ae, "calculateBlockSize");
2138
- async function ie(e, t, a) {
2138
+ async function se(e, t, a) {
2139
2139
  const n = Et(t, a, !0);
2140
2140
  if (a.getBlock(n.id).type !== "space") {
2141
- const s = at();
2142
- await re(e, n, { config: s }), t.intersect = n == null ? void 0 : n.intersect, Yr(n);
2141
+ const i = at();
2142
+ await re(e, n, { config: i }), t.intersect = n == null ? void 0 : n.intersect, Yr(n);
2143
2143
  }
2144
2144
  }
2145
- g(ie, "insertBlockPositioned");
2145
+ g(se, "insertBlockPositioned");
2146
2146
  async function ht(e, t, a, n) {
2147
- for (const s of t)
2148
- await n(e, s, a), s.children && await ht(e, s.children, a, n);
2147
+ for (const i of t)
2148
+ await n(e, i, a), i.children && await ht(e, i.children, a, n);
2149
2149
  }
2150
2150
  g(ht, "performOperations");
2151
- async function se(e, t, a) {
2151
+ async function ie(e, t, a) {
2152
2152
  await ht(e, t, a, ae);
2153
2153
  }
2154
- g(se, "calculateBlockSizes");
2154
+ g(ie, "calculateBlockSizes");
2155
2155
  async function ne(e, t, a) {
2156
- await ht(e, t, a, ie);
2156
+ await ht(e, t, a, se);
2157
2157
  }
2158
2158
  g(ne, "insertBlocks");
2159
- async function oe(e, t, a, n, s) {
2159
+ async function le(e, t, a, n, i) {
2160
2160
  const r = new Le({
2161
2161
  multigraph: !0,
2162
2162
  compound: !0
@@ -2168,45 +2168,45 @@ async function oe(e, t, a, n, s) {
2168
2168
  marginx: 8,
2169
2169
  marginy: 8
2170
2170
  });
2171
- for (const i of a)
2172
- i.size && r.setNode(i.id, {
2173
- width: i.size.width,
2174
- height: i.size.height,
2175
- intersect: i.intersect
2171
+ for (const s of a)
2172
+ s.size && r.setNode(s.id, {
2173
+ width: s.size.width,
2174
+ height: s.size.height,
2175
+ intersect: s.intersect
2176
2176
  });
2177
- for (const i of t)
2178
- if (i.start && i.end) {
2179
- const o = n.getBlock(i.start), l = n.getBlock(i.end);
2180
- if (o != null && o.size && l != null && l.size) {
2181
- const y = o.size, u = l.size, b = [
2177
+ for (const s of t)
2178
+ if (s.start && s.end) {
2179
+ const l = n.getBlock(s.start), o = n.getBlock(s.end);
2180
+ if (l != null && l.size && o != null && o.size) {
2181
+ const y = l.size, u = o.size, b = [
2182
2182
  { x: y.x, y: y.y },
2183
2183
  { x: y.x + (u.x - y.x) / 2, y: y.y + (u.y - y.y) / 2 },
2184
2184
  { x: u.x, y: u.y }
2185
2185
  ];
2186
2186
  hr(
2187
2187
  e,
2188
- { v: i.start, w: i.end, name: i.id },
2188
+ { v: s.start, w: s.end, name: s.id },
2189
2189
  {
2190
- ...i,
2191
- arrowTypeEnd: i.arrowTypeEnd,
2192
- arrowTypeStart: i.arrowTypeStart,
2190
+ ...s,
2191
+ arrowTypeEnd: s.arrowTypeEnd,
2192
+ arrowTypeStart: s.arrowTypeStart,
2193
2193
  points: b,
2194
2194
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2195
2195
  },
2196
2196
  void 0,
2197
2197
  "block",
2198
2198
  r,
2199
- s
2200
- ), i.label && (await or(e, {
2201
- ...i,
2202
- label: i.label,
2199
+ i
2200
+ ), s.label && (await lr(e, {
2201
+ ...s,
2202
+ label: s.label,
2203
2203
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2204
- arrowTypeEnd: i.arrowTypeEnd,
2205
- arrowTypeStart: i.arrowTypeStart,
2204
+ arrowTypeEnd: s.arrowTypeEnd,
2205
+ arrowTypeStart: s.arrowTypeStart,
2206
2206
  points: b,
2207
2207
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2208
- }), lr(
2209
- { ...i, x: b[1].x, y: b[1].y },
2208
+ }), or(
2209
+ { ...s, x: b[1].x, y: b[1].y },
2210
2210
  {
2211
2211
  originalPath: b
2212
2212
  }
@@ -2214,21 +2214,21 @@ async function oe(e, t, a, n, s) {
2214
2214
  }
2215
2215
  }
2216
2216
  }
2217
- g(oe, "insertEdges");
2217
+ g(le, "insertEdges");
2218
2218
  var Kr = /* @__PURE__ */ g(function(e, t) {
2219
2219
  return t.db.getClasses();
2220
2220
  }, "getClasses"), Hr = /* @__PURE__ */ g(async function(e, t, a, n) {
2221
- const { securityLevel: s, block: r } = at(), i = n.db;
2222
- let o;
2223
- s === "sandbox" && (o = O("#i" + t));
2224
- const l = s === "sandbox" ? O(o.nodes()[0].contentDocument.body) : O("body"), y = s === "sandbox" ? l.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2221
+ const { securityLevel: i, block: r } = at(), s = n.db;
2222
+ let l;
2223
+ i === "sandbox" && (l = O("#i" + t));
2224
+ const o = i === "sandbox" ? O(l.nodes()[0].contentDocument.body) : O("body"), y = i === "sandbox" ? o.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2225
2225
  rr(y, ["point", "circle", "cross"], n.type, t);
2226
- const u = i.getBlocks(), b = i.getBlocksFlat(), x = i.getEdges(), S = y.insert("g").attr("class", "block");
2227
- await se(S, u, i);
2228
- const w = Zt(i);
2229
- if (await ne(S, u, i), await oe(S, x, b, i, t), w) {
2226
+ const u = s.getBlocks(), b = s.getBlocksFlat(), x = s.getEdges(), S = y.insert("g").attr("class", "block");
2227
+ await ie(S, u, s);
2228
+ const w = Zt(s);
2229
+ if (await ne(S, u, s), await le(S, x, b, s, t), w) {
2230
2230
  const v = w, k = Math.max(1, Math.round(0.125 * (v.width / v.height))), N = v.height + k + 10, _ = v.width + 10, { useMaxWidth: D } = r;
2231
- ye(y, N, _, !!D), L.debug("Here Bounds", w, v), y.attr(
2231
+ ce(y, N, _, !!D), L.debug("Here Bounds", w, v), y.attr(
2232
2232
  "viewBox",
2233
2233
  `${v.x - 5} ${v.y - 5} ${v.width + 10} ${v.height + 10}`
2234
2234
  );