@omg-dev/app 0.5.1 → 0.6.1

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 (113) hide show
  1. package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-Cjj_DiYL.js} +33 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
  7. package/dist-lib/{TermView-CWr-zJmM.js → TermView-B4V-DyD-.js} +521 -530
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CUiDTHFP.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
  29. package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-CLYU5z7h.js → embedded-PUsgcSTE.js} +10592 -10725
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  61. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  62. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  63. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  64. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  65. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  66. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  67. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  68. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  69. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  70. package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
  71. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  72. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  73. package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-DY4vFlfs.js} +82 -83
  74. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  75. package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-B-ruG8li.js} +233 -236
  76. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  77. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  78. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  79. package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-BQy3geXs.js} +290 -297
  80. package/dist-lib/styles.css +1 -1
  81. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  82. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  83. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  84. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  85. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  86. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  87. package/package.json +4 -3
  88. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  89. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  90. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  91. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  92. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  93. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  94. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  95. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  96. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  97. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  98. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  99. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  100. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  101. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  102. package/dist-lib/index-DcwavxA1.js +0 -5062
  103. package/dist-lib/index-JkCQXUYs.js +0 -16566
  104. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  105. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  106. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  107. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  108. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  109. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  110. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  111. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  112. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  113. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,13 +1,13 @@
1
- import { g as de } from "./chunk-5VM5RSS4-DO2g-xIj.js";
2
- import { aA as fe, aB as Ut, aC as pe, aD as ye, aE as xe, aF as be, aG as we, aH as me, aI as Se, aJ as Le, aK as ve, aL as Ee, aM as _e, aN as ke, aO as Te, aP as De, aQ as Ne, aR as Ie, aS as Ce, aT as Be, aU as Oe, aV as Re, aW as Ae, aX as ze, aY as Me, _ as u, z as nt, d as O, e as Pe, l as v, q as Fe, t as We, c as M, aZ as Ye, a7 as He, a8 as Ke, a3 as Ue, a_ as Y, a$ as Et, b0 as rt, as as Xe, y as at, k as Ve, b1 as je, i as Ot, b2 as Rt, b3 as Ge } from "./index-JkCQXUYs.js";
3
- import { G as Ze } from "./graph-B68L3K2T.js";
4
- import { c as qe } from "./channel-B5lJFbed.js";
1
+ import { g as de } from "./chunk-5VM5RSS4-xd6XuI9Q.js";
2
+ import { aA as fe, aB as Kt, aC as pe, aD as xe, aE as ye, aF as be, aG as we, aH as me, aI as Se, aJ as Le, aK as ke, aL as ve, aM as Ee, aN as _e, aO as Te, aP as De, aQ as Be, aR as Ne, aS as Ie, aT as Ce, aU as Oe, aV as Re, aW as Ae, aX as ze, aY as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, aZ as Ye, a7 as He, a8 as Ke, a3 as Ue, a_ as M, a$ as kt, b0 as Q, as as Xe, y as $, k as Ve, b1 as je, i as Ct, b2 as Ot, b3 as Ge } from "./index-B0neMIbR.js";
3
+ import { G as Ze } from "./graph-DAHC4kPm.js";
4
+ import { c as qe } from "./channel-D6YHMmF7.js";
5
5
  function Je(e) {
6
6
  return Array.isArray(e);
7
7
  }
8
8
  function Qe(e) {
9
9
  if (fe(e)) return e;
10
- const t = Ut(e);
10
+ const t = Kt(e);
11
11
  if (!$e(e)) return {};
12
12
  if (Je(e)) {
13
13
  const s = Array.from(e);
@@ -52,29 +52,29 @@ function Qe(e) {
52
52
  return rr(a, e), xt(a, e), tr(a, e), a;
53
53
  }
54
54
  function $e(e) {
55
- switch (Ut(e)) {
55
+ switch (Kt(e)) {
56
56
  case Me:
57
57
  case ze:
58
58
  case Ae:
59
59
  case Re:
60
60
  case Oe:
61
- case Be:
62
61
  case Ce:
63
62
  case Ie:
64
63
  case Ne:
64
+ case Be:
65
65
  case De:
66
66
  case Te:
67
- case ke:
68
67
  case _e:
69
68
  case Ee:
70
69
  case ve:
70
+ case ke:
71
71
  case Le:
72
72
  case Se:
73
73
  case me:
74
74
  case we:
75
75
  case be:
76
- case xe:
77
76
  case ye:
77
+ case xe:
78
78
  return !0;
79
79
  default:
80
80
  return !1;
@@ -98,186 +98,186 @@ function rr(e, t) {
98
98
  const a = Object.getPrototypeOf(t);
99
99
  a !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, a);
100
100
  }
101
- var wt = (function() {
102
- var e = /* @__PURE__ */ u(function(N, b, d, y) {
103
- for (d = d || {}, y = N.length; y--; d[N[y]] = b) ;
104
- return d;
105
- }, "o"), t = [1, 15], a = [1, 7], s = [1, 13], i = [1, 14], c = [1, 19], r = [1, 16], n = [1, 17], l = [1, 18], g = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], p = [1, 23], m = [1, 24], x = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], _ = [1, 49], L = {
106
- trace: /* @__PURE__ */ u(function() {
101
+ var bt = (function() {
102
+ var e = /* @__PURE__ */ g(function(T, m, f, x) {
103
+ for (f = f || {}, x = T.length; x--; f[T[x]] = m) ;
104
+ return f;
105
+ }, "o"), t = [1, 15], a = [1, 7], s = [1, 13], i = [1, 14], c = [1, 19], r = [1, 16], n = [1, 17], l = [1, 18], u = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], d = [1, 23], b = [1, 24], w = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], y = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], S = {
106
+ trace: /* @__PURE__ */ g(function() {
107
107
  }, "trace"),
108
108
  yy: {},
109
109
  symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
110
110
  terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
111
111
  productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
112
- performAction: /* @__PURE__ */ u(function(b, d, y, w, D, o, k) {
113
- var f = o.length - 1;
114
- switch (D) {
112
+ performAction: /* @__PURE__ */ g(function(m, f, x, L, E, o, F) {
113
+ var p = o.length - 1;
114
+ switch (E) {
115
115
  case 4:
116
- w.getLogger().debug("Rule: separator (NL) ");
116
+ L.getLogger().debug("Rule: separator (NL) ");
117
117
  break;
118
118
  case 5:
119
- w.getLogger().debug("Rule: separator (Space) ");
119
+ L.getLogger().debug("Rule: separator (Space) ");
120
120
  break;
121
121
  case 6:
122
- w.getLogger().debug("Rule: separator (EOF) ");
122
+ L.getLogger().debug("Rule: separator (EOF) ");
123
123
  break;
124
124
  case 7:
125
- w.getLogger().debug("Rule: hierarchy: ", o[f - 1]), w.setHierarchy(o[f - 1]);
125
+ L.getLogger().debug("Rule: hierarchy: ", o[p - 1]), L.setHierarchy(o[p - 1]);
126
126
  break;
127
127
  case 8:
128
- w.getLogger().debug("Stop NL ");
128
+ L.getLogger().debug("Stop NL ");
129
129
  break;
130
130
  case 9:
131
- w.getLogger().debug("Stop EOF ");
131
+ L.getLogger().debug("Stop EOF ");
132
132
  break;
133
133
  case 10:
134
- w.getLogger().debug("Stop NL2 ");
134
+ L.getLogger().debug("Stop NL2 ");
135
135
  break;
136
136
  case 11:
137
- w.getLogger().debug("Stop EOF2 ");
137
+ L.getLogger().debug("Stop EOF2 ");
138
138
  break;
139
139
  case 12:
140
- w.getLogger().debug("Rule: statement: ", o[f]), typeof o[f].length == "number" ? this.$ = o[f] : this.$ = [o[f]];
140
+ L.getLogger().debug("Rule: statement: ", o[p]), typeof o[p].length == "number" ? this.$ = o[p] : this.$ = [o[p]];
141
141
  break;
142
142
  case 13:
143
- w.getLogger().debug("Rule: statement #2: ", o[f - 1]), this.$ = [o[f - 1]].concat(o[f]);
143
+ L.getLogger().debug("Rule: statement #2: ", o[p - 1]), this.$ = [o[p - 1]].concat(o[p]);
144
144
  break;
145
145
  case 14:
146
- w.getLogger().debug("Rule: link: ", o[f], b), this.$ = { edgeTypeStr: o[f], label: "" };
146
+ L.getLogger().debug("Rule: link: ", o[p], m), this.$ = { edgeTypeStr: o[p], label: "" };
147
147
  break;
148
148
  case 15:
149
- w.getLogger().debug("Rule: LABEL link: ", o[f - 3], o[f - 1], o[f]), this.$ = { edgeTypeStr: o[f], label: o[f - 1] };
149
+ L.getLogger().debug("Rule: LABEL link: ", o[p - 3], o[p - 1], o[p]), this.$ = { edgeTypeStr: o[p], label: o[p - 1] };
150
150
  break;
151
151
  case 18:
152
- const E = parseInt(o[f]), T = w.generateId();
153
- this.$ = { id: T, type: "space", label: "", width: E, children: [] };
152
+ const C = parseInt(o[p]), Z = L.generateId();
153
+ this.$ = { id: Z, type: "space", label: "", width: C, children: [] };
154
154
  break;
155
155
  case 23:
156
- w.getLogger().debug("Rule: (nodeStatement link node) ", o[f - 2], o[f - 1], o[f], " typestr: ", o[f - 1].edgeTypeStr);
157
- const z = w.edgeStrToEdgeData(o[f - 1].edgeTypeStr), F = w.edgeStrToEdgeStartData(o[f - 1].edgeTypeStr), q = w.edgeStrToThickness(o[f - 1].edgeTypeStr), I = w.edgeStrToPattern(o[f - 1].edgeTypeStr);
156
+ L.getLogger().debug("Rule: (nodeStatement link node) ", o[p - 2], o[p - 1], o[p], " typestr: ", o[p - 1].edgeTypeStr);
157
+ const V = L.edgeStrToEdgeData(o[p - 1].edgeTypeStr), at = L.edgeStrToEdgeStartData(o[p - 1].edgeTypeStr), gt = L.edgeStrToThickness(o[p - 1].edgeTypeStr), O = L.edgeStrToPattern(o[p - 1].edgeTypeStr);
158
158
  this.$ = [
159
- { id: o[f - 2].id, label: o[f - 2].label, type: o[f - 2].type, directions: o[f - 2].directions },
160
- { id: o[f - 2].id + "-" + o[f].id, start: o[f - 2].id, end: o[f].id, label: o[f - 1].label, type: "edge", thickness: q, pattern: I, directions: o[f].directions, arrowTypeEnd: z, arrowTypeStart: F },
161
- { id: o[f].id, label: o[f].label, type: w.typeStr2Type(o[f].typeStr), directions: o[f].directions }
159
+ { id: o[p - 2].id, label: o[p - 2].label, type: o[p - 2].type, directions: o[p - 2].directions },
160
+ { id: o[p - 2].id + "-" + o[p].id, start: o[p - 2].id, end: o[p].id, label: o[p - 1].label, type: "edge", thickness: gt, pattern: O, directions: o[p].directions, arrowTypeEnd: V, arrowTypeStart: at },
161
+ { id: o[p].id, label: o[p].label, type: L.typeStr2Type(o[p].typeStr), directions: o[p].directions }
162
162
  ];
163
163
  break;
164
164
  case 24:
165
- w.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[f - 1], o[f]), this.$ = { id: o[f - 1].id, label: o[f - 1].label, type: w.typeStr2Type(o[f - 1].typeStr), directions: o[f - 1].directions, widthInColumns: parseInt(o[f], 10) };
165
+ L.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[p - 1], o[p]), this.$ = { id: o[p - 1].id, label: o[p - 1].label, type: L.typeStr2Type(o[p - 1].typeStr), directions: o[p - 1].directions, widthInColumns: parseInt(o[p], 10) };
166
166
  break;
167
167
  case 25:
168
- w.getLogger().debug("Rule: nodeStatement (node) ", o[f]), this.$ = { id: o[f].id, label: o[f].label, type: w.typeStr2Type(o[f].typeStr), directions: o[f].directions, widthInColumns: 1 };
168
+ L.getLogger().debug("Rule: nodeStatement (node) ", o[p]), this.$ = { id: o[p].id, label: o[p].label, type: L.typeStr2Type(o[p].typeStr), directions: o[p].directions, widthInColumns: 1 };
169
169
  break;
170
170
  case 26:
171
- w.getLogger().debug("APA123", this ? this : "na"), w.getLogger().debug("COLUMNS: ", o[f]), this.$ = { type: "column-setting", columns: o[f] === "auto" ? -1 : parseInt(o[f]) };
171
+ L.getLogger().debug("APA123", this ? this : "na"), L.getLogger().debug("COLUMNS: ", o[p]), this.$ = { type: "column-setting", columns: o[p] === "auto" ? -1 : parseInt(o[p]) };
172
172
  break;
173
173
  case 27:
174
- w.getLogger().debug("Rule: id-block statement : ", o[f - 2], o[f - 1]), w.generateId(), this.$ = { ...o[f - 2], type: "composite", children: o[f - 1] };
174
+ L.getLogger().debug("Rule: id-block statement : ", o[p - 2], o[p - 1]), L.generateId(), this.$ = { ...o[p - 2], type: "composite", children: o[p - 1] };
175
175
  break;
176
176
  case 28:
177
- w.getLogger().debug("Rule: blockStatement : ", o[f - 2], o[f - 1], o[f]);
178
- const K = w.generateId();
179
- this.$ = { id: K, type: "composite", label: "", children: o[f - 1] };
177
+ L.getLogger().debug("Rule: blockStatement : ", o[p - 2], o[p - 1], o[p]);
178
+ const j = L.generateId();
179
+ this.$ = { id: j, type: "composite", label: "", children: o[p - 1] };
180
180
  break;
181
181
  case 29:
182
- w.getLogger().debug("Rule: node (NODE_ID separator): ", o[f]), this.$ = { id: o[f] };
182
+ L.getLogger().debug("Rule: node (NODE_ID separator): ", o[p]), this.$ = { id: o[p] };
183
183
  break;
184
184
  case 30:
185
- w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[f - 1], o[f]), this.$ = { id: o[f - 1], label: o[f].label, typeStr: o[f].typeStr, directions: o[f].directions };
185
+ L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[p - 1], o[p]), this.$ = { id: o[p - 1], label: o[p].label, typeStr: o[p].typeStr, directions: o[p].directions };
186
186
  break;
187
187
  case 31:
188
- w.getLogger().debug("Rule: dirList: ", o[f]), this.$ = [o[f]];
188
+ L.getLogger().debug("Rule: dirList: ", o[p]), this.$ = [o[p]];
189
189
  break;
190
190
  case 32:
191
- w.getLogger().debug("Rule: dirList: ", o[f - 1], o[f]), this.$ = [o[f - 1]].concat(o[f]);
191
+ L.getLogger().debug("Rule: dirList: ", o[p - 1], o[p]), this.$ = [o[p - 1]].concat(o[p]);
192
192
  break;
193
193
  case 33:
194
- w.getLogger().debug("Rule: nodeShapeNLabel: ", o[f - 2], o[f - 1], o[f]), this.$ = { typeStr: o[f - 2] + o[f], label: o[f - 1] };
194
+ L.getLogger().debug("Rule: nodeShapeNLabel: ", o[p - 2], o[p - 1], o[p]), this.$ = { typeStr: o[p - 2] + o[p], label: o[p - 1] };
195
195
  break;
196
196
  case 34:
197
- w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[f - 3], o[f - 2], " #3:", o[f - 1], o[f]), this.$ = { typeStr: o[f - 3] + o[f], label: o[f - 2], directions: o[f - 1] };
197
+ L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[p - 3], o[p - 2], " #3:", o[p - 1], o[p]), this.$ = { typeStr: o[p - 3] + o[p], label: o[p - 2], directions: o[p - 1] };
198
198
  break;
199
199
  case 35:
200
200
  case 36:
201
- this.$ = { type: "classDef", id: o[f - 1].trim(), css: o[f].trim() };
201
+ this.$ = { type: "classDef", id: o[p - 1].trim(), css: o[p].trim() };
202
202
  break;
203
203
  case 37:
204
- this.$ = { type: "applyClass", id: o[f - 1].trim(), styleClass: o[f].trim() };
204
+ this.$ = { type: "applyClass", id: o[p - 1].trim(), styleClass: o[p].trim() };
205
205
  break;
206
206
  case 38:
207
- this.$ = { type: "applyStyles", id: o[f - 1].trim(), stylesStr: o[f].trim() };
207
+ this.$ = { type: "applyStyles", id: o[p - 1].trim(), stylesStr: o[p].trim() };
208
208
  break;
209
209
  }
210
210
  }, "anonymous"),
211
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 8: [1, 20] }, e(g, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }), e(h, [2, 16], { 14: 22, 15: p, 16: m }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(x, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: c }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(g, [2, 13]), { 26: 35, 31: c }, { 31: [2, 14] }, { 17: [1, 36] }, e(x, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: p, 16: m, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(x, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: _ }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: _, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
211
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }), e(h, [2, 16], { 14: 22, 15: d, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(w, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: c }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(y, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: c }, { 31: [2, 14] }, { 17: [1, 36] }, e(w, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: d, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(y, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(w, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(h, [2, 27]), e(y, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(y, [2, 34]), { 38: [2, 32] }],
212
212
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
213
- parseError: /* @__PURE__ */ u(function(b, d) {
214
- if (d.recoverable)
215
- this.trace(b);
213
+ parseError: /* @__PURE__ */ g(function(m, f) {
214
+ if (f.recoverable)
215
+ this.trace(m);
216
216
  else {
217
- var y = new Error(b);
218
- throw y.hash = d, y;
217
+ var x = new Error(m);
218
+ throw x.hash = f, x;
219
219
  }
220
220
  }, "parseError"),
221
- parse: /* @__PURE__ */ u(function(b) {
222
- var d = this, y = [0], w = [], D = [null], o = [], k = this.table, f = "", E = 0, T = 0, z = 2, F = 1, q = o.slice.call(arguments, 1), I = Object.create(this.lexer), K = { yy: {} };
223
- for (var J in this.yy)
224
- Object.prototype.hasOwnProperty.call(this.yy, J) && (K.yy[J] = this.yy[J]);
225
- I.setInput(b, K.yy), K.yy.lexer = I, K.yy.parser = this, typeof I.yylloc > "u" && (I.yylloc = {});
226
- var et = I.yylloc;
227
- o.push(et);
228
- var ft = I.options && I.options.ranges;
229
- typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
230
- function ue(U) {
231
- y.length = y.length - 2 * U, D.length = D.length - U, o.length = o.length - U;
221
+ parse: /* @__PURE__ */ g(function(m) {
222
+ var f = this, x = [0], L = [], E = [null], o = [], F = this.table, p = "", C = 0, Z = 0, V = 2, at = 1, gt = o.slice.call(arguments, 1), O = Object.create(this.lexer), j = { yy: {} };
223
+ for (var ut in this.yy)
224
+ Object.prototype.hasOwnProperty.call(this.yy, ut) && (j.yy[ut] = this.yy[ut]);
225
+ O.setInput(m, j.yy), j.yy.lexer = O, j.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
226
+ var dt = O.yylloc;
227
+ o.push(dt);
228
+ var ge = O.options && O.options.ranges;
229
+ typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
230
+ function ue(W) {
231
+ x.length = x.length - 2 * W, E.length = E.length - W, o.length = o.length - W;
232
232
  }
233
- u(ue, "popStack");
234
- function Ct() {
235
- var U;
236
- return U = w.pop() || I.lex() || F, typeof U != "number" && (U instanceof Array && (w = U, U = w.pop()), U = d.symbols_[U] || U), U;
233
+ g(ue, "popStack");
234
+ function Nt() {
235
+ var W;
236
+ return W = L.pop() || O.lex() || at, typeof W != "number" && (W instanceof Array && (L = W, W = L.pop()), W = f.symbols_[W] || W), W;
237
237
  }
238
- u(Ct, "lex");
239
- for (var H, $, V, pt, tt = {}, ct, Q, Bt, lt; ; ) {
240
- if ($ = y[y.length - 1], this.defaultActions[$] ? V = this.defaultActions[$] : ((H === null || typeof H > "u") && (H = Ct()), V = k[$] && k[$][H]), typeof V > "u" || !V.length || !V[0]) {
241
- var yt = "";
242
- lt = [];
243
- for (ct in k[$])
244
- this.terminals_[ct] && ct > z && lt.push("'" + this.terminals_[ct] + "'");
245
- I.showPosition ? yt = "Parse error on line " + (E + 1) + `:
246
- ` + I.showPosition() + `
247
- Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt = "Parse error on line " + (E + 1) + ": Unexpected " + (H == F ? "end of input" : "'" + (this.terminals_[H] || H) + "'"), this.parseError(yt, {
248
- text: I.match,
249
- token: this.terminals_[H] || H,
250
- line: I.yylineno,
251
- loc: et,
252
- expected: lt
238
+ g(Nt, "lex");
239
+ for (var P, q, H, ft, J = {}, st, G, It, it; ; ) {
240
+ if (q = x[x.length - 1], this.defaultActions[q] ? H = this.defaultActions[q] : ((P === null || typeof P > "u") && (P = Nt()), H = F[q] && F[q][P]), typeof H > "u" || !H.length || !H[0]) {
241
+ var pt = "";
242
+ it = [];
243
+ for (st in F[q])
244
+ this.terminals_[st] && st > V && it.push("'" + this.terminals_[st] + "'");
245
+ O.showPosition ? pt = "Parse error on line " + (C + 1) + `:
246
+ ` + O.showPosition() + `
247
+ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : pt = "Parse error on line " + (C + 1) + ": Unexpected " + (P == at ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(pt, {
248
+ text: O.match,
249
+ token: this.terminals_[P] || P,
250
+ line: O.yylineno,
251
+ loc: dt,
252
+ expected: it
253
253
  });
254
254
  }
255
- if (V[0] instanceof Array && V.length > 1)
256
- throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + H);
257
- switch (V[0]) {
255
+ if (H[0] instanceof Array && H.length > 1)
256
+ throw new Error("Parse Error: multiple actions possible at state: " + q + ", token: " + P);
257
+ switch (H[0]) {
258
258
  case 1:
259
- y.push(H), D.push(I.yytext), o.push(I.yylloc), y.push(V[1]), H = null, T = I.yyleng, f = I.yytext, E = I.yylineno, et = I.yylloc;
259
+ x.push(P), E.push(O.yytext), o.push(O.yylloc), x.push(H[1]), P = null, Z = O.yyleng, p = O.yytext, C = O.yylineno, dt = O.yylloc;
260
260
  break;
261
261
  case 2:
262
- if (Q = this.productions_[V[1]][1], tt.$ = D[D.length - Q], tt._$ = {
263
- first_line: o[o.length - (Q || 1)].first_line,
262
+ if (G = this.productions_[H[1]][1], J.$ = E[E.length - G], J._$ = {
263
+ first_line: o[o.length - (G || 1)].first_line,
264
264
  last_line: o[o.length - 1].last_line,
265
- first_column: o[o.length - (Q || 1)].first_column,
265
+ first_column: o[o.length - (G || 1)].first_column,
266
266
  last_column: o[o.length - 1].last_column
267
- }, ft && (tt._$.range = [
268
- o[o.length - (Q || 1)].range[0],
267
+ }, ge && (J._$.range = [
268
+ o[o.length - (G || 1)].range[0],
269
269
  o[o.length - 1].range[1]
270
- ]), pt = this.performAction.apply(tt, [
271
- f,
272
- T,
270
+ ]), ft = this.performAction.apply(J, [
271
+ p,
272
+ Z,
273
+ C,
274
+ j.yy,
275
+ H[1],
273
276
  E,
274
- K.yy,
275
- V[1],
276
- D,
277
277
  o
278
- ].concat(q)), typeof pt < "u")
279
- return pt;
280
- Q && (y = y.slice(0, -1 * Q * 2), D = D.slice(0, -1 * Q), o = o.slice(0, -1 * Q)), y.push(this.productions_[V[1]][0]), D.push(tt.$), o.push(tt._$), Bt = k[y[y.length - 2]][y[y.length - 1]], y.push(Bt);
278
+ ].concat(gt)), typeof ft < "u")
279
+ return ft;
280
+ G && (x = x.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), o = o.slice(0, -1 * G)), x.push(this.productions_[H[1]][0]), E.push(J.$), o.push(J._$), It = F[x[x.length - 2]][x[x.length - 1]], x.push(It);
281
281
  break;
282
282
  case 3:
283
283
  return !0;
@@ -285,18 +285,18 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
285
285
  }
286
286
  return !0;
287
287
  }, "parse")
288
- }, C = /* @__PURE__ */ (function() {
289
- var N = {
288
+ }, N = /* @__PURE__ */ (function() {
289
+ var T = {
290
290
  EOF: 1,
291
- parseError: /* @__PURE__ */ u(function(d, y) {
291
+ parseError: /* @__PURE__ */ g(function(f, x) {
292
292
  if (this.yy.parser)
293
- this.yy.parser.parseError(d, y);
293
+ this.yy.parser.parseError(f, x);
294
294
  else
295
- throw new Error(d);
295
+ throw new Error(f);
296
296
  }, "parseError"),
297
297
  // resets the lexer, sets new input
298
- setInput: /* @__PURE__ */ u(function(b, d) {
299
- return this.yy = d || this.yy || {}, this._input = b, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
298
+ setInput: /* @__PURE__ */ g(function(m, f) {
299
+ return this.yy = f || this.yy || {}, this._input = m, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
300
300
  first_line: 1,
301
301
  first_column: 0,
302
302
  last_line: 1,
@@ -304,32 +304,32 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
304
304
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
305
305
  }, "setInput"),
306
306
  // consumes and returns one char from the input
307
- input: /* @__PURE__ */ u(function() {
308
- var b = this._input[0];
309
- this.yytext += b, this.yyleng++, this.offset++, this.match += b, this.matched += b;
310
- var d = b.match(/(?:\r\n?|\n).*/g);
311
- return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), b;
307
+ input: /* @__PURE__ */ g(function() {
308
+ var m = this._input[0];
309
+ this.yytext += m, this.yyleng++, this.offset++, this.match += m, this.matched += m;
310
+ var f = m.match(/(?:\r\n?|\n).*/g);
311
+ return f ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), m;
312
312
  }, "input"),
313
313
  // unshifts one char (or a string) into the input
314
- unput: /* @__PURE__ */ u(function(b) {
315
- var d = b.length, y = b.split(/(?:\r\n?|\n)/g);
316
- this._input = b + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
317
- var w = this.match.split(/(?:\r\n?|\n)/g);
318
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1);
319
- var D = this.yylloc.range;
314
+ unput: /* @__PURE__ */ g(function(m) {
315
+ var f = m.length, x = m.split(/(?:\r\n?|\n)/g);
316
+ this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
317
+ var L = this.match.split(/(?:\r\n?|\n)/g);
318
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
319
+ var E = this.yylloc.range;
320
320
  return this.yylloc = {
321
321
  first_line: this.yylloc.first_line,
322
322
  last_line: this.yylineno + 1,
323
323
  first_column: this.yylloc.first_column,
324
- last_column: y ? (y.length === w.length ? this.yylloc.first_column : 0) + w[w.length - y.length].length - y[0].length : this.yylloc.first_column - d
325
- }, this.options.ranges && (this.yylloc.range = [D[0], D[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
324
+ last_column: x ? (x.length === L.length ? this.yylloc.first_column : 0) + L[L.length - x.length].length - x[0].length : this.yylloc.first_column - f
325
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
326
326
  }, "unput"),
327
327
  // When called from action, caches matched text and appends it on next action
328
- more: /* @__PURE__ */ u(function() {
328
+ more: /* @__PURE__ */ g(function() {
329
329
  return this._more = !0, this;
330
330
  }, "more"),
331
331
  // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
332
- reject: /* @__PURE__ */ u(function() {
332
+ reject: /* @__PURE__ */ g(function() {
333
333
  if (this.options.backtrack_lexer)
334
334
  this._backtrack = !0;
335
335
  else
@@ -342,29 +342,29 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
342
342
  return this;
343
343
  }, "reject"),
344
344
  // retain first n characters of the match
345
- less: /* @__PURE__ */ u(function(b) {
346
- this.unput(this.match.slice(b));
345
+ less: /* @__PURE__ */ g(function(m) {
346
+ this.unput(this.match.slice(m));
347
347
  }, "less"),
348
348
  // displays already matched input, i.e. for error messages
349
- pastInput: /* @__PURE__ */ u(function() {
350
- var b = this.matched.substr(0, this.matched.length - this.match.length);
351
- return (b.length > 20 ? "..." : "") + b.substr(-20).replace(/\n/g, "");
349
+ pastInput: /* @__PURE__ */ g(function() {
350
+ var m = this.matched.substr(0, this.matched.length - this.match.length);
351
+ return (m.length > 20 ? "..." : "") + m.substr(-20).replace(/\n/g, "");
352
352
  }, "pastInput"),
353
353
  // displays upcoming input, i.e. for error messages
354
- upcomingInput: /* @__PURE__ */ u(function() {
355
- var b = this.match;
356
- return b.length < 20 && (b += this._input.substr(0, 20 - b.length)), (b.substr(0, 20) + (b.length > 20 ? "..." : "")).replace(/\n/g, "");
354
+ upcomingInput: /* @__PURE__ */ g(function() {
355
+ var m = this.match;
356
+ return m.length < 20 && (m += this._input.substr(0, 20 - m.length)), (m.substr(0, 20) + (m.length > 20 ? "..." : "")).replace(/\n/g, "");
357
357
  }, "upcomingInput"),
358
358
  // displays the character position where the lexing error occurred, i.e. for error messages
359
- showPosition: /* @__PURE__ */ u(function() {
360
- var b = this.pastInput(), d = new Array(b.length + 1).join("-");
361
- return b + this.upcomingInput() + `
362
- ` + d + "^";
359
+ showPosition: /* @__PURE__ */ g(function() {
360
+ var m = this.pastInput(), f = new Array(m.length + 1).join("-");
361
+ return m + this.upcomingInput() + `
362
+ ` + f + "^";
363
363
  }, "showPosition"),
364
364
  // test the lexed token: return FALSE when not a match, otherwise return token
365
- test_match: /* @__PURE__ */ u(function(b, d) {
366
- var y, w, D;
367
- if (this.options.backtrack_lexer && (D = {
365
+ test_match: /* @__PURE__ */ g(function(m, f) {
366
+ var x, L, E;
367
+ if (this.options.backtrack_lexer && (E = {
368
368
  yylineno: this.yylineno,
369
369
  yylloc: {
370
370
  first_line: this.yylloc.first_line,
@@ -383,41 +383,41 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
383
383
  yy: this.yy,
384
384
  conditionStack: this.conditionStack.slice(0),
385
385
  done: this.done
386
- }, this.options.ranges && (D.yylloc.range = this.yylloc.range.slice(0))), w = b[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
386
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), L = m[0].match(/(?:\r\n?|\n).*/g), L && (this.yylineno += L.length), this.yylloc = {
387
387
  first_line: this.yylloc.last_line,
388
388
  last_line: this.yylineno + 1,
389
389
  first_column: this.yylloc.last_column,
390
- last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + b[0].length
391
- }, this.yytext += b[0], this.match += b[0], this.matches = b, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(b[0].length), this.matched += b[0], y = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y)
392
- return y;
390
+ last_column: L ? L[L.length - 1].length - L[L.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + m[0].length
391
+ }, this.yytext += m[0], this.match += m[0], this.matches = m, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(m[0].length), this.matched += m[0], x = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
392
+ return x;
393
393
  if (this._backtrack) {
394
- for (var o in D)
395
- this[o] = D[o];
394
+ for (var o in E)
395
+ this[o] = E[o];
396
396
  return !1;
397
397
  }
398
398
  return !1;
399
399
  }, "test_match"),
400
400
  // return next match in input
401
- next: /* @__PURE__ */ u(function() {
401
+ next: /* @__PURE__ */ g(function() {
402
402
  if (this.done)
403
403
  return this.EOF;
404
404
  this._input || (this.done = !0);
405
- var b, d, y, w;
405
+ var m, f, x, L;
406
406
  this._more || (this.yytext = "", this.match = "");
407
- for (var D = this._currentRules(), o = 0; o < D.length; o++)
408
- if (y = this._input.match(this.rules[D[o]]), y && (!d || y[0].length > d[0].length)) {
409
- if (d = y, w = o, this.options.backtrack_lexer) {
410
- if (b = this.test_match(y, D[o]), b !== !1)
411
- return b;
407
+ for (var E = this._currentRules(), o = 0; o < E.length; o++)
408
+ if (x = this._input.match(this.rules[E[o]]), x && (!f || x[0].length > f[0].length)) {
409
+ if (f = x, L = o, this.options.backtrack_lexer) {
410
+ if (m = this.test_match(x, E[o]), m !== !1)
411
+ return m;
412
412
  if (this._backtrack) {
413
- d = !1;
413
+ f = !1;
414
414
  continue;
415
415
  } else
416
416
  return !1;
417
417
  } else if (!this.options.flex)
418
418
  break;
419
419
  }
420
- return d ? (b = this.test_match(d, D[w]), b !== !1 ? b : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
420
+ return f ? (m = this.test_match(f, E[L]), m !== !1 ? m : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
421
421
  ` + this.showPosition(), {
422
422
  text: "",
423
423
  token: null,
@@ -425,56 +425,56 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
425
425
  });
426
426
  }, "next"),
427
427
  // return next match that has a token
428
- lex: /* @__PURE__ */ u(function() {
429
- var d = this.next();
430
- return d || this.lex();
428
+ lex: /* @__PURE__ */ g(function() {
429
+ var f = this.next();
430
+ return f || this.lex();
431
431
  }, "lex"),
432
432
  // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
433
- begin: /* @__PURE__ */ u(function(d) {
434
- this.conditionStack.push(d);
433
+ begin: /* @__PURE__ */ g(function(f) {
434
+ this.conditionStack.push(f);
435
435
  }, "begin"),
436
436
  // pop the previously active lexer condition state off the condition stack
437
- popState: /* @__PURE__ */ u(function() {
438
- var d = this.conditionStack.length - 1;
439
- return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
437
+ popState: /* @__PURE__ */ g(function() {
438
+ var f = this.conditionStack.length - 1;
439
+ return f > 0 ? this.conditionStack.pop() : this.conditionStack[0];
440
440
  }, "popState"),
441
441
  // produce the lexer rule set which is active for the currently active lexer condition state
442
- _currentRules: /* @__PURE__ */ u(function() {
442
+ _currentRules: /* @__PURE__ */ g(function() {
443
443
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
444
444
  }, "_currentRules"),
445
445
  // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
446
- topState: /* @__PURE__ */ u(function(d) {
447
- return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
446
+ topState: /* @__PURE__ */ g(function(f) {
447
+ return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
448
448
  }, "topState"),
449
449
  // alias for begin(condition)
450
- pushState: /* @__PURE__ */ u(function(d) {
451
- this.begin(d);
450
+ pushState: /* @__PURE__ */ g(function(f) {
451
+ this.begin(f);
452
452
  }, "pushState"),
453
453
  // return the number of states currently on the stack
454
- stateStackSize: /* @__PURE__ */ u(function() {
454
+ stateStackSize: /* @__PURE__ */ g(function() {
455
455
  return this.conditionStack.length;
456
456
  }, "stateStackSize"),
457
457
  options: {},
458
- performAction: /* @__PURE__ */ u(function(d, y, w, D) {
459
- switch (w) {
458
+ performAction: /* @__PURE__ */ g(function(f, x, L, E) {
459
+ switch (L) {
460
460
  case 0:
461
- return d.getLogger().debug("Found block-beta"), 10;
461
+ return f.getLogger().debug("Found block-beta"), 10;
462
462
  case 1:
463
- return d.getLogger().debug("Found id-block"), 29;
463
+ return f.getLogger().debug("Found id-block"), 29;
464
464
  case 2:
465
- return d.getLogger().debug("Found block"), 10;
465
+ return f.getLogger().debug("Found block"), 10;
466
466
  case 3:
467
- d.getLogger().debug(".", y.yytext);
467
+ f.getLogger().debug(".", x.yytext);
468
468
  break;
469
469
  case 4:
470
- d.getLogger().debug("_", y.yytext);
470
+ f.getLogger().debug("_", x.yytext);
471
471
  break;
472
472
  case 5:
473
473
  return 5;
474
474
  case 6:
475
- return y.yytext = -1, 28;
475
+ return x.yytext = -1, 28;
476
476
  case 7:
477
- return y.yytext = y.yytext.replace(/columns\s+/, ""), d.getLogger().debug("COLUMNS (LEX)", y.yytext), 28;
477
+ return x.yytext = x.yytext.replace(/columns\s+/, ""), f.getLogger().debug("COLUMNS (LEX)", x.yytext), 28;
478
478
  case 8:
479
479
  this.pushState("md_string");
480
480
  break;
@@ -487,14 +487,14 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
487
487
  this.pushState("string");
488
488
  break;
489
489
  case 12:
490
- d.getLogger().debug("LEX: POPPING STR:", y.yytext), this.popState();
490
+ f.getLogger().debug("LEX: POPPING STR:", x.yytext), this.popState();
491
491
  break;
492
492
  case 13:
493
- return d.getLogger().debug("LEX: STR end:", y.yytext), "STR";
493
+ return f.getLogger().debug("LEX: STR end:", x.yytext), "STR";
494
494
  case 14:
495
- return y.yytext = y.yytext.replace(/space\:/, ""), d.getLogger().debug("SPACE NUM (LEX)", y.yytext), 21;
495
+ return x.yytext = x.yytext.replace(/space\:/, ""), f.getLogger().debug("SPACE NUM (LEX)", x.yytext), 21;
496
496
  case 15:
497
- return y.yytext = "1", d.getLogger().debug("COLUMNS (LEX)", y.yytext), 21;
497
+ return x.yytext = "1", f.getLogger().debug("COLUMNS (LEX)", x.yytext), 21;
498
498
  case 16:
499
499
  return 42;
500
500
  case 17:
@@ -540,61 +540,61 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
540
540
  case 36:
541
541
  return 30;
542
542
  case 37:
543
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
543
+ return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
544
544
  case 38:
545
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
545
+ return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
546
546
  case 39:
547
- return this.popState(), d.getLogger().debug("Lex: ))"), "NODE_DEND";
547
+ return this.popState(), f.getLogger().debug("Lex: ))"), "NODE_DEND";
548
548
  case 40:
549
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
549
+ return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
550
550
  case 41:
551
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
551
+ return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
552
552
  case 42:
553
- return this.popState(), d.getLogger().debug("Lex: (-"), "NODE_DEND";
553
+ return this.popState(), f.getLogger().debug("Lex: (-"), "NODE_DEND";
554
554
  case 43:
555
- return this.popState(), d.getLogger().debug("Lex: -)"), "NODE_DEND";
555
+ return this.popState(), f.getLogger().debug("Lex: -)"), "NODE_DEND";
556
556
  case 44:
557
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
557
+ return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
558
558
  case 45:
559
- return this.popState(), d.getLogger().debug("Lex: ]]"), "NODE_DEND";
559
+ return this.popState(), f.getLogger().debug("Lex: ]]"), "NODE_DEND";
560
560
  case 46:
561
- return this.popState(), d.getLogger().debug("Lex: ("), "NODE_DEND";
561
+ return this.popState(), f.getLogger().debug("Lex: ("), "NODE_DEND";
562
562
  case 47:
563
- return this.popState(), d.getLogger().debug("Lex: ])"), "NODE_DEND";
563
+ return this.popState(), f.getLogger().debug("Lex: ])"), "NODE_DEND";
564
564
  case 48:
565
- return this.popState(), d.getLogger().debug("Lex: /]"), "NODE_DEND";
565
+ return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
566
566
  case 49:
567
- return this.popState(), d.getLogger().debug("Lex: /]"), "NODE_DEND";
567
+ return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
568
568
  case 50:
569
- return this.popState(), d.getLogger().debug("Lex: )]"), "NODE_DEND";
569
+ return this.popState(), f.getLogger().debug("Lex: )]"), "NODE_DEND";
570
570
  case 51:
571
- return this.popState(), d.getLogger().debug("Lex: )"), "NODE_DEND";
571
+ return this.popState(), f.getLogger().debug("Lex: )"), "NODE_DEND";
572
572
  case 52:
573
- return this.popState(), d.getLogger().debug("Lex: ]>"), "NODE_DEND";
573
+ return this.popState(), f.getLogger().debug("Lex: ]>"), "NODE_DEND";
574
574
  case 53:
575
- return this.popState(), d.getLogger().debug("Lex: ]"), "NODE_DEND";
575
+ return this.popState(), f.getLogger().debug("Lex: ]"), "NODE_DEND";
576
576
  case 54:
577
- return d.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
577
+ return f.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
578
578
  case 55:
579
- return d.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
579
+ return f.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
580
580
  case 56:
581
- return d.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
581
+ return f.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
582
582
  case 57:
583
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
583
+ return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
584
584
  case 58:
585
- return d.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
585
+ return f.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
586
586
  case 59:
587
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
587
+ return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
588
588
  case 60:
589
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
589
+ return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
590
590
  case 61:
591
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
591
+ return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
592
592
  case 62:
593
- return d.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
593
+ return f.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
594
594
  case 63:
595
- return d.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
595
+ return f.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
596
596
  case 64:
597
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
597
+ return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
598
598
  case 65:
599
599
  return this.pushState("NODE"), 35;
600
600
  case 66:
@@ -610,13 +610,13 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
610
610
  case 71:
611
611
  return this.pushState("NODE"), 35;
612
612
  case 72:
613
- return d.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
613
+ return f.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
614
614
  case 73:
615
- return this.pushState("BLOCK_ARROW"), d.getLogger().debug("LEX ARR START"), 37;
615
+ return this.pushState("BLOCK_ARROW"), f.getLogger().debug("LEX ARR START"), 37;
616
616
  case 74:
617
- return d.getLogger().debug("Lex: NODE_ID", y.yytext), 31;
617
+ return f.getLogger().debug("Lex: NODE_ID", x.yytext), 31;
618
618
  case 75:
619
- return d.getLogger().debug("Lex: EOF", y.yytext), 8;
619
+ return f.getLogger().debug("Lex: EOF", x.yytext), 8;
620
620
  case 76:
621
621
  this.pushState("md_string");
622
622
  break;
@@ -629,140 +629,140 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
629
629
  this.popState();
630
630
  break;
631
631
  case 80:
632
- d.getLogger().debug("Lex: Starting string"), this.pushState("string");
632
+ f.getLogger().debug("Lex: Starting string"), this.pushState("string");
633
633
  break;
634
634
  case 81:
635
- d.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
635
+ f.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
636
636
  break;
637
637
  case 82:
638
- return d.getLogger().debug("LEX: NODE_DESCR:", y.yytext), "NODE_DESCR";
638
+ return f.getLogger().debug("LEX: NODE_DESCR:", x.yytext), "NODE_DESCR";
639
639
  case 83:
640
- d.getLogger().debug("LEX POPPING"), this.popState();
640
+ f.getLogger().debug("LEX POPPING"), this.popState();
641
641
  break;
642
642
  case 84:
643
- d.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
643
+ f.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
644
644
  break;
645
645
  case 85:
646
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (right): dir:", y.yytext), "DIR";
646
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (right): dir:", x.yytext), "DIR";
647
647
  case 86:
648
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (left):", y.yytext), "DIR";
648
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (left):", x.yytext), "DIR";
649
649
  case 87:
650
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (x):", y.yytext), "DIR";
650
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (x):", x.yytext), "DIR";
651
651
  case 88:
652
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (y):", y.yytext), "DIR";
652
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (y):", x.yytext), "DIR";
653
653
  case 89:
654
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (up):", y.yytext), "DIR";
654
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (up):", x.yytext), "DIR";
655
655
  case 90:
656
- return y.yytext = y.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (down):", y.yytext), "DIR";
656
+ return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (down):", x.yytext), "DIR";
657
657
  case 91:
658
- return y.yytext = "]>", d.getLogger().debug("Lex (ARROW_DIR end):", y.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
658
+ return x.yytext = "]>", f.getLogger().debug("Lex (ARROW_DIR end):", x.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
659
659
  case 92:
660
- return d.getLogger().debug("Lex: LINK", "#" + y.yytext + "#"), 15;
660
+ return f.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
661
661
  case 93:
662
- return d.getLogger().debug("Lex: LINK", y.yytext), 15;
662
+ return f.getLogger().debug("Lex: LINK", x.yytext), 15;
663
663
  case 94:
664
- return d.getLogger().debug("Lex: LINK", y.yytext), 15;
664
+ return f.getLogger().debug("Lex: LINK", x.yytext), 15;
665
665
  case 95:
666
- return d.getLogger().debug("Lex: LINK", y.yytext), 15;
666
+ return f.getLogger().debug("Lex: LINK", x.yytext), 15;
667
667
  case 96:
668
- return d.getLogger().debug("Lex: START_LINK", y.yytext), this.pushState("LLABEL"), 16;
668
+ return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
669
669
  case 97:
670
- return d.getLogger().debug("Lex: START_LINK", y.yytext), this.pushState("LLABEL"), 16;
670
+ return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
671
671
  case 98:
672
- return d.getLogger().debug("Lex: START_LINK", y.yytext), this.pushState("LLABEL"), 16;
672
+ return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
673
673
  case 99:
674
674
  this.pushState("md_string");
675
675
  break;
676
676
  case 100:
677
- return d.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
677
+ return f.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
678
678
  case 101:
679
- return this.popState(), d.getLogger().debug("Lex: LINK", "#" + y.yytext + "#"), 15;
679
+ return this.popState(), f.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
680
680
  case 102:
681
- return this.popState(), d.getLogger().debug("Lex: LINK", y.yytext), 15;
681
+ return this.popState(), f.getLogger().debug("Lex: LINK", x.yytext), 15;
682
682
  case 103:
683
- return this.popState(), d.getLogger().debug("Lex: LINK", y.yytext), 15;
683
+ return this.popState(), f.getLogger().debug("Lex: LINK", x.yytext), 15;
684
684
  case 104:
685
- return d.getLogger().debug("Lex: COLON", y.yytext), y.yytext = y.yytext.slice(1), 27;
685
+ return f.getLogger().debug("Lex: COLON", x.yytext), x.yytext = x.yytext.slice(1), 27;
686
686
  }
687
687
  }, "anonymous"),
688
688
  rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
689
689
  conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
690
690
  };
691
- return N;
691
+ return T;
692
692
  })();
693
- L.lexer = C;
694
- function B() {
693
+ S.lexer = N;
694
+ function _() {
695
695
  this.yy = {};
696
696
  }
697
- return u(B, "Parser"), B.prototype = L, L.Parser = B, new B();
697
+ return g(_, "Parser"), _.prototype = S, S.Parser = _, new _();
698
698
  })();
699
- wt.parser = wt;
700
- var ar = wt, G = /* @__PURE__ */ new Map(), _t = [], mt = /* @__PURE__ */ new Map(), At = "color", zt = "fill", sr = "bgFill", Xt = ",", ht = /* @__PURE__ */ new Map(), kt = "", ir = /* @__PURE__ */ u((e) => Ve.sanitizeText(e, M()), "sanitizeText"), nr = /* @__PURE__ */ u(function(e, t = "") {
701
- let a = ht.get(e);
702
- a || (a = { id: e, styles: [], textStyles: [] }, ht.set(e, a)), t != null && t.split(Xt).forEach((s) => {
699
+ bt.parser = bt;
700
+ var ar = bt, U = /* @__PURE__ */ new Map(), vt = [], wt = /* @__PURE__ */ new Map(), Rt = "color", At = "fill", sr = "bgFill", Ut = ",", ct = /* @__PURE__ */ new Map(), Et = "", ir = /* @__PURE__ */ g((e) => Ve.sanitizeText(e, R()), "sanitizeText"), nr = /* @__PURE__ */ g(function(e, t = "") {
701
+ let a = ct.get(e);
702
+ a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t?.split(Ut).forEach((s) => {
703
703
  const i = s.replace(/([^;]*);/, "$1").trim();
704
- if (RegExp(At).exec(s)) {
705
- const r = i.replace(zt, sr).replace(At, zt);
704
+ if (RegExp(Rt).exec(s)) {
705
+ const r = i.replace(At, sr).replace(Rt, At);
706
706
  a.textStyles.push(r);
707
707
  }
708
708
  a.styles.push(i);
709
709
  });
710
- }, "addStyleClass"), cr = /* @__PURE__ */ u(function(e, t = "") {
711
- const a = G.get(e);
712
- t != null && (a.styles = t.split(Xt));
713
- }, "addStyle2Node"), lr = /* @__PURE__ */ u(function(e, t) {
710
+ }, "addStyleClass"), cr = /* @__PURE__ */ g(function(e, t = "") {
711
+ const a = U.get(e);
712
+ t != null && (a.styles = t.split(Ut));
713
+ }, "addStyle2Node"), lr = /* @__PURE__ */ g(function(e, t) {
714
714
  e.split(",").forEach(function(a) {
715
- let s = G.get(a);
715
+ let s = U.get(a);
716
716
  if (s === void 0) {
717
717
  const i = a.trim();
718
- s = { id: i, type: "na", children: [] }, G.set(i, s);
718
+ s = { id: i, type: "na", children: [] }, U.set(i, s);
719
719
  }
720
720
  s.classes || (s.classes = []), s.classes.push(t);
721
721
  });
722
- }, "setCssClass"), Vt = /* @__PURE__ */ u((e, t) => {
723
- const a = e.flat(), s = [], i = a.find((r) => (r == null ? void 0 : r.type) === "column-setting"), c = (i == null ? void 0 : i.columns) ?? -1;
722
+ }, "setCssClass"), Xt = /* @__PURE__ */ g((e, t) => {
723
+ const a = e.flat(), s = [], c = a.find((r) => r?.type === "column-setting")?.columns ?? -1;
724
724
  for (const r of a) {
725
- if (typeof c == "number" && c > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > c && v.warn(
725
+ if (typeof c == "number" && c > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > c && k.warn(
726
726
  `Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`
727
727
  ), r.label && (r.label = ir(r.label)), r.type === "classDef") {
728
728
  nr(r.id, r.css);
729
729
  continue;
730
730
  }
731
731
  if (r.type === "applyClass") {
732
- lr(r.id, (r == null ? void 0 : r.styleClass) ?? "");
732
+ lr(r.id, r?.styleClass ?? "");
733
733
  continue;
734
734
  }
735
735
  if (r.type === "applyStyles") {
736
- r != null && r.stylesStr && cr(r.id, r == null ? void 0 : r.stylesStr);
736
+ r?.stylesStr && cr(r.id, r?.stylesStr);
737
737
  continue;
738
738
  }
739
739
  if (r.type === "column-setting")
740
740
  t.columns = r.columns ?? -1;
741
741
  else if (r.type === "edge") {
742
- const n = (mt.get(r.id) ?? 0) + 1;
743
- mt.set(r.id, n), r.id = n + "-" + r.id, _t.push(r);
742
+ const n = (wt.get(r.id) ?? 0) + 1;
743
+ wt.set(r.id, n), r.id = n + "-" + r.id, vt.push(r);
744
744
  } else {
745
745
  r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
746
- const n = G.get(r.id);
747
- if (n === void 0 ? G.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Vt(r.children, r), r.type === "space") {
746
+ const n = U.get(r.id);
747
+ if (n === void 0 ? U.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Xt(r.children, r), r.type === "space") {
748
748
  const l = r.width ?? 1;
749
- for (let g = 0; g < l; g++) {
749
+ for (let u = 0; u < l; u++) {
750
750
  const h = Qe(r);
751
- h.id = h.id + "-" + g, G.set(h.id, h), s.push(h);
751
+ h.id = h.id + "-" + u, U.set(h.id, h), s.push(h);
752
752
  }
753
753
  } else n === void 0 && s.push(r);
754
754
  }
755
755
  }
756
756
  t.children = s;
757
- }, "populateBlockDatabase"), Tt = [], it = { id: "root", type: "composite", children: [], columns: -1 }, or = /* @__PURE__ */ u(() => {
758
- v.debug("Clear called"), Fe(), it = { id: "root", type: "composite", children: [], columns: -1 }, G = /* @__PURE__ */ new Map([["root", it]]), Tt = [], ht = /* @__PURE__ */ new Map(), _t = [], mt = /* @__PURE__ */ new Map(), kt = "";
757
+ }, "populateBlockDatabase"), _t = [], et = { id: "root", type: "composite", children: [], columns: -1 }, or = /* @__PURE__ */ g(() => {
758
+ k.debug("Clear called"), Fe(), et = { id: "root", type: "composite", children: [], columns: -1 }, U = /* @__PURE__ */ new Map([["root", et]]), _t = [], ct = /* @__PURE__ */ new Map(), vt = [], wt = /* @__PURE__ */ new Map(), Et = "";
759
759
  }, "clear");
760
- function jt(e) {
761
- switch (v.debug("typeStr2Type", e), e) {
760
+ function Vt(e) {
761
+ switch (k.debug("typeStr2Type", e), e) {
762
762
  case "[]":
763
763
  return "square";
764
764
  case "()":
765
- return v.debug("we have a round"), "round";
765
+ return k.debug("we have a round"), "round";
766
766
  case "(())":
767
767
  return "circle";
768
768
  case ">]":
@@ -793,17 +793,17 @@ function jt(e) {
793
793
  return "na";
794
794
  }
795
795
  }
796
- u(jt, "typeStr2Type");
797
- function Gt(e) {
798
- switch (v.debug("typeStr2Type", e), e) {
796
+ g(Vt, "typeStr2Type");
797
+ function jt(e) {
798
+ switch (k.debug("typeStr2Type", e), e) {
799
799
  case "==":
800
800
  return "thick";
801
801
  default:
802
802
  return "normal";
803
803
  }
804
804
  }
805
- u(Gt, "edgeTypeStr2Type");
806
- function Zt(e) {
805
+ g(jt, "edgeTypeStr2Type");
806
+ function Gt(e) {
807
807
  switch (e.trim().slice(-1)) {
808
808
  case "x":
809
809
  return "arrow_cross";
@@ -815,8 +815,8 @@ function Zt(e) {
815
815
  return "";
816
816
  }
817
817
  }
818
- u(Zt, "edgeStrToEdgeData");
819
- function qt(e) {
818
+ g(Gt, "edgeStrToEdgeData");
819
+ function Zt(e) {
820
820
  switch (e.trim().charAt(0)) {
821
821
  case "x":
822
822
  return "arrow_cross";
@@ -828,51 +828,51 @@ function qt(e) {
828
828
  return "arrow_open";
829
829
  }
830
830
  }
831
- u(qt, "edgeStrToEdgeStartData");
832
- function Jt(e) {
831
+ g(Zt, "edgeStrToEdgeStartData");
832
+ function qt(e) {
833
833
  return e.includes("==") ? "thick" : "normal";
834
834
  }
835
- u(Jt, "edgeStrToThickness");
836
- function Qt(e) {
835
+ g(qt, "edgeStrToThickness");
836
+ function Jt(e) {
837
837
  return e.includes(".-") ? "dotted" : "solid";
838
838
  }
839
- u(Qt, "edgeStrToPattern");
840
- var Mt = 0, hr = /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Mt), "generateId"), gr = /* @__PURE__ */ u((e) => {
841
- it.children = e, Vt(e, it), Tt = it.children;
842
- }, "setHierarchy"), ur = /* @__PURE__ */ u((e) => {
843
- const t = G.get(e);
839
+ g(Jt, "edgeStrToPattern");
840
+ var zt = 0, hr = /* @__PURE__ */ g(() => (zt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + zt), "generateId"), gr = /* @__PURE__ */ g((e) => {
841
+ et.children = e, Xt(e, et), _t = et.children;
842
+ }, "setHierarchy"), ur = /* @__PURE__ */ g((e) => {
843
+ const t = U.get(e);
844
844
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
845
- }, "getColumns"), dr = /* @__PURE__ */ u(() => [...G.values()], "getBlocksFlat"), fr = /* @__PURE__ */ u(() => Tt || [], "getBlocks"), pr = /* @__PURE__ */ u(() => _t, "getEdges"), yr = /* @__PURE__ */ u((e) => G.get(e), "getBlock"), xr = /* @__PURE__ */ u((e) => {
846
- G.set(e.id, e);
847
- }, "setBlock"), br = /* @__PURE__ */ u((e) => {
848
- kt = e;
849
- }, "setDiagramId"), wr = /* @__PURE__ */ u(() => kt, "getDiagramId"), mr = /* @__PURE__ */ u(() => v, "getLogger"), Sr = /* @__PURE__ */ u(function() {
850
- return ht;
845
+ }, "getColumns"), dr = /* @__PURE__ */ g(() => [...U.values()], "getBlocksFlat"), fr = /* @__PURE__ */ g(() => _t || [], "getBlocks"), pr = /* @__PURE__ */ g(() => vt, "getEdges"), xr = /* @__PURE__ */ g((e) => U.get(e), "getBlock"), yr = /* @__PURE__ */ g((e) => {
846
+ U.set(e.id, e);
847
+ }, "setBlock"), br = /* @__PURE__ */ g((e) => {
848
+ Et = e;
849
+ }, "setDiagramId"), wr = /* @__PURE__ */ g(() => Et, "getDiagramId"), mr = /* @__PURE__ */ g(() => k, "getLogger"), Sr = /* @__PURE__ */ g(function() {
850
+ return ct;
851
851
  }, "getClasses"), Lr = {
852
- getConfig: /* @__PURE__ */ u(() => nt().block, "getConfig"),
853
- typeStr2Type: jt,
854
- edgeTypeStr2Type: Gt,
855
- edgeStrToEdgeData: Zt,
856
- edgeStrToEdgeStartData: qt,
857
- edgeStrToThickness: Jt,
858
- edgeStrToPattern: Qt,
852
+ getConfig: /* @__PURE__ */ g(() => rt().block, "getConfig"),
853
+ typeStr2Type: Vt,
854
+ edgeTypeStr2Type: jt,
855
+ edgeStrToEdgeData: Gt,
856
+ edgeStrToEdgeStartData: Zt,
857
+ edgeStrToThickness: qt,
858
+ edgeStrToPattern: Jt,
859
859
  getLogger: mr,
860
860
  getBlocksFlat: dr,
861
861
  getBlocks: fr,
862
862
  getEdges: pr,
863
863
  setHierarchy: gr,
864
- getBlock: yr,
865
- setBlock: xr,
864
+ getBlock: xr,
865
+ setBlock: yr,
866
866
  getColumns: ur,
867
867
  getClasses: Sr,
868
868
  clear: or,
869
869
  generateId: hr,
870
870
  setDiagramId: br,
871
871
  getDiagramId: wr
872
- }, vr = Lr, bt = /* @__PURE__ */ u((e, t) => {
872
+ }, kr = Lr, yt = /* @__PURE__ */ g((e, t) => {
873
873
  const a = qe, s = a(e, "r"), i = a(e, "g"), c = a(e, "b");
874
874
  return We(s, i, c, t);
875
- }, "fade"), Er = /* @__PURE__ */ u((e) => `.label {
875
+ }, "fade"), vr = /* @__PURE__ */ g((e) => `.label {
876
876
  font-family: ${e.fontFamily};
877
877
  color: ${e.nodeTextColor || e.textColor};
878
878
  }
@@ -957,9 +957,9 @@ var Mt = 0, hr = /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(3
957
957
  }
958
958
 
959
959
  .node .cluster {
960
- // fill: ${bt(e.mainBkg, 0.5)};
961
- fill: ${bt(e.clusterBkg, 0.5)};
962
- stroke: ${bt(e.clusterBorder, 0.2)};
960
+ // fill: ${yt(e.mainBkg, 0.5)};
961
+ fill: ${yt(e.clusterBkg, 0.5)};
962
+ stroke: ${yt(e.clusterBorder, 0.2)};
963
963
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
964
964
  stroke-width: 1px;
965
965
  }
@@ -995,40 +995,40 @@ var Mt = 0, hr = /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(3
995
995
  fill: ${e.textColor};
996
996
  }
997
997
  ${de()}
998
- `, "getStyles"), _r = Er, kr = /* @__PURE__ */ u((e, t, a, s) => {
998
+ `, "getStyles"), Er = vr, _r = /* @__PURE__ */ g((e, t, a, s) => {
999
999
  t.forEach((i) => {
1000
1000
  zr[i](e, a, s);
1001
1001
  });
1002
- }, "insertMarkers"), Tr = /* @__PURE__ */ u((e, t, a) => {
1003
- v.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");
1004
- }, "extension"), Dr = /* @__PURE__ */ u((e, t, a) => {
1002
+ }, "insertMarkers"), Tr = /* @__PURE__ */ g((e, t, a) => {
1003
+ k.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");
1004
+ }, "extension"), Dr = /* @__PURE__ */ g((e, t, a) => {
1005
1005
  e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1006
- }, "composition"), Nr = /* @__PURE__ */ u((e, t, a) => {
1006
+ }, "composition"), Br = /* @__PURE__ */ g((e, t, a) => {
1007
1007
  e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1008
- }, "aggregation"), Ir = /* @__PURE__ */ u((e, t, a) => {
1008
+ }, "aggregation"), Nr = /* @__PURE__ */ g((e, t, a) => {
1009
1009
  e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1010
- }, "dependency"), Cr = /* @__PURE__ */ u((e, t, a) => {
1010
+ }, "dependency"), Ir = /* @__PURE__ */ g((e, t, a) => {
1011
1011
  e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
1012
- }, "lollipop"), Br = /* @__PURE__ */ u((e, t, a) => {
1012
+ }, "lollipop"), Cr = /* @__PURE__ */ g((e, t, a) => {
1013
1013
  e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1014
- }, "point"), Or = /* @__PURE__ */ u((e, t, a) => {
1014
+ }, "point"), Or = /* @__PURE__ */ g((e, t, a) => {
1015
1015
  e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1016
- }, "circle"), Rr = /* @__PURE__ */ u((e, t, a) => {
1016
+ }, "circle"), Rr = /* @__PURE__ */ g((e, t, a) => {
1017
1017
  e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
1018
- }, "cross"), Ar = /* @__PURE__ */ u((e, t, a) => {
1018
+ }, "cross"), Ar = /* @__PURE__ */ g((e, t, a) => {
1019
1019
  e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
1020
1020
  }, "barb"), zr = {
1021
1021
  extension: Tr,
1022
1022
  composition: Dr,
1023
- aggregation: Nr,
1024
- dependency: Ir,
1025
- lollipop: Cr,
1026
- point: Br,
1023
+ aggregation: Br,
1024
+ dependency: Nr,
1025
+ lollipop: Ir,
1026
+ point: Cr,
1027
1027
  circle: Or,
1028
1028
  cross: Rr,
1029
1029
  barb: Ar
1030
- }, Mr = kr;
1031
- function St(e, t) {
1030
+ }, Mr = _r;
1031
+ function mt(e, t) {
1032
1032
  if (e === 0 || !Number.isInteger(e))
1033
1033
  throw new Error("Columns must be an integer !== 0.");
1034
1034
  if (t < 0 || !Number.isInteger(t))
@@ -1040,12 +1040,12 @@ function St(e, t) {
1040
1040
  const a = t % e, s = Math.floor(t / e);
1041
1041
  return { px: a, py: s };
1042
1042
  }
1043
- u(St, "calculateBlockPosition");
1044
- var Pr = /* @__PURE__ */ u((e) => {
1043
+ g(mt, "calculateBlockPosition");
1044
+ var Pr = /* @__PURE__ */ g((e) => {
1045
1045
  let t = 0, a = 0;
1046
1046
  for (const s of e.children) {
1047
1047
  const { width: i, height: c, x: r, y: n } = s.size ?? { width: 0, height: 0, x: 0, y: 0 };
1048
- if (v.debug(
1048
+ if (k.debug(
1049
1049
  "getMaxChildSize abc95 child:",
1050
1050
  s.id,
1051
1051
  "width:",
@@ -1064,168 +1064,165 @@ var Pr = /* @__PURE__ */ u((e) => {
1064
1064
  }
1065
1065
  return { width: t, height: a };
1066
1066
  }, "getMaxChildSize");
1067
- function gt(e, t, a = 0, s = 0, i = 8) {
1068
- var n, l, g, h, p, m, x, S, _, L, C;
1069
- v.debug(
1067
+ function lt(e, t, a = 0, s = 0, i = 8) {
1068
+ k.debug(
1070
1069
  "setBlockSizes abc95 (start)",
1071
1070
  e.id,
1072
- (n = e == null ? void 0 : e.size) == null ? void 0 : n.x,
1071
+ e?.size?.x,
1073
1072
  "block width =",
1074
- e == null ? void 0 : e.size,
1073
+ e?.size,
1075
1074
  "siblingWidth",
1076
1075
  a
1077
- ), (l = e == null ? void 0 : e.size) != null && l.width || (e.size = {
1076
+ ), e?.size?.width || (e.size = {
1078
1077
  width: a,
1079
1078
  height: s,
1080
1079
  x: 0,
1081
1080
  y: 0
1082
1081
  });
1083
1082
  let c = 0, r = 0;
1084
- if (((g = e.children) == null ? void 0 : g.length) > 0) {
1085
- for (const o of e.children)
1086
- gt(o, t, 0, 0, i);
1087
- const B = Pr(e);
1088
- c = B.width, r = B.height, v.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", c, r);
1089
- for (const o of e.children)
1090
- o.size && (v.debug(
1091
- `abc95 Setting size of children of ${e.id} id=${o.id} ${c} ${r} ${JSON.stringify(o.size)}`
1092
- ), o.size.width = c * (o.widthInColumns ?? 1) + i * ((o.widthInColumns ?? 1) - 1), o.size.height = r, o.size.x = 0, o.size.y = 0, v.debug(
1093
- `abc95 updating size of ${e.id} children child:${o.id} maxWidth:${c} maxHeight:${r}`
1083
+ if (e.children?.length > 0) {
1084
+ for (const y of e.children)
1085
+ lt(y, t, 0, 0, i);
1086
+ const n = Pr(e);
1087
+ c = n.width, r = n.height, k.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", c, r);
1088
+ for (const y of e.children)
1089
+ y.size && (k.debug(
1090
+ `abc95 Setting size of children of ${e.id} id=${y.id} ${c} ${r} ${JSON.stringify(y.size)}`
1091
+ ), y.size.width = c * (y.widthInColumns ?? 1) + i * ((y.widthInColumns ?? 1) - 1), y.size.height = r, y.size.x = 0, y.size.y = 0, k.debug(
1092
+ `abc95 updating size of ${e.id} children child:${y.id} maxWidth:${c} maxHeight:${r}`
1094
1093
  ));
1095
- for (const o of e.children)
1096
- gt(o, t, c, r, i);
1097
- const N = e.columns ?? -1;
1098
- let b = 0;
1099
- for (const o of e.children)
1100
- b += o.widthInColumns ?? 1;
1101
- let d = e.children.length;
1102
- N > 0 && N < b && (d = N);
1103
- const y = Math.ceil(b / d);
1104
- let w = d * (c + i) + i, D = y * (r + i) + i;
1105
- if (w < a) {
1106
- v.debug(
1107
- `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${w}`
1108
- ), w = a, D = s;
1109
- const o = (a - d * i - i) / d, k = (s - y * i - i) / y;
1110
- v.debug("Size indata abc88", e.id, "childWidth", o, "maxWidth", c), v.debug("Size indata abc88", e.id, "childHeight", k, "maxHeight", r), v.debug("Size indata abc88 xSize", d, "padding", i);
1111
- for (const f of e.children)
1112
- f.size && (f.size.width = o, f.size.height = k, f.size.x = 0, f.size.y = 0);
1094
+ for (const y of e.children)
1095
+ lt(y, t, c, r, i);
1096
+ const l = e.columns ?? -1;
1097
+ let u = 0;
1098
+ for (const y of e.children)
1099
+ u += y.widthInColumns ?? 1;
1100
+ let h = e.children.length;
1101
+ l > 0 && l < u && (h = l);
1102
+ const d = Math.ceil(u / h);
1103
+ let b = h * (c + i) + i, w = d * (r + i) + i;
1104
+ if (b < a) {
1105
+ k.debug(
1106
+ `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${b}`
1107
+ ), b = a, w = s;
1108
+ const y = (a - h * i - i) / h, v = (s - d * i - i) / d;
1109
+ k.debug("Size indata abc88", e.id, "childWidth", y, "maxWidth", c), k.debug("Size indata abc88", e.id, "childHeight", v, "maxHeight", r), k.debug("Size indata abc88 xSize", h, "padding", i);
1110
+ for (const S of e.children)
1111
+ S.size && (S.size.width = y, S.size.height = v, S.size.x = 0, S.size.y = 0);
1113
1112
  }
1114
- if (v.debug(
1115
- `abc95 (finale calc) ${e.id} xSize ${d} ySize ${y} columns ${N}${e.children.length} width=${Math.max(w, ((h = e.size) == null ? void 0 : h.width) || 0)}`
1116
- ), w < (((p = e == null ? void 0 : e.size) == null ? void 0 : p.width) || 0)) {
1117
- w = ((m = e == null ? void 0 : e.size) == null ? void 0 : m.width) || 0;
1118
- const o = N > 0 ? Math.min(e.children.length, N) : e.children.length;
1119
- if (o > 0) {
1120
- const k = (w - o * i - i) / o;
1121
- v.debug("abc95 (growing to fit) width", e.id, w, (x = e.size) == null ? void 0 : x.width, k);
1122
- for (const f of e.children)
1123
- f.size && (f.size.width = k);
1113
+ if (k.debug(
1114
+ `abc95 (finale calc) ${e.id} xSize ${h} ySize ${d} columns ${l}${e.children.length} width=${Math.max(b, e.size?.width || 0)}`
1115
+ ), b < (e?.size?.width || 0)) {
1116
+ b = e?.size?.width || 0;
1117
+ const y = l > 0 ? Math.min(e.children.length, l) : e.children.length;
1118
+ if (y > 0) {
1119
+ const v = (b - y * i - i) / y;
1120
+ k.debug("abc95 (growing to fit) width", e.id, b, e.size?.width, v);
1121
+ for (const S of e.children)
1122
+ S.size && (S.size.width = v);
1124
1123
  }
1125
1124
  }
1126
1125
  e.size = {
1127
- width: w,
1128
- height: D,
1126
+ width: b,
1127
+ height: w,
1129
1128
  x: 0,
1130
1129
  y: 0
1131
1130
  };
1132
1131
  }
1133
- v.debug(
1132
+ k.debug(
1134
1133
  "setBlockSizes abc94 (done)",
1135
1134
  e.id,
1136
- (S = e == null ? void 0 : e.size) == null ? void 0 : S.x,
1137
- (_ = e == null ? void 0 : e.size) == null ? void 0 : _.width,
1138
- (L = e == null ? void 0 : e.size) == null ? void 0 : L.y,
1139
- (C = e == null ? void 0 : e.size) == null ? void 0 : C.height
1135
+ e?.size?.x,
1136
+ e?.size?.width,
1137
+ e?.size?.y,
1138
+ e?.size?.height
1140
1139
  );
1141
1140
  }
1142
- u(gt, "setBlockSizes");
1143
- function Dt(e, t, a = 8) {
1144
- var i, c, r, n, l, g, h, p, m, x, S, _, L, C, B, N, b;
1145
- v.debug(
1146
- `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(r = e == null ? void 0 : e.size) == null ? void 0 : r.width}`
1141
+ g(lt, "setBlockSizes");
1142
+ function Tt(e, t, a = 8) {
1143
+ k.debug(
1144
+ `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1147
1145
  );
1148
1146
  const s = e.columns ?? -1;
1149
- if (v.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
1147
+ if (k.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
1150
1148
  e.children.length > 0) {
1151
- const d = ((l = (n = e == null ? void 0 : e.children[0]) == null ? void 0 : n.size) == null ? void 0 : l.width) ?? 0, y = e.children.length * d + (e.children.length - 1) * a;
1152
- v.debug("widthOfChildren 88", y, "posX");
1153
- const w = /* @__PURE__ */ new Map();
1149
+ const i = e?.children[0]?.size?.width ?? 0, c = e.children.length * i + (e.children.length - 1) * a;
1150
+ k.debug("widthOfChildren 88", c, "posX");
1151
+ const r = /* @__PURE__ */ new Map();
1154
1152
  {
1155
- let E = 0;
1156
- for (const T of e.children) {
1157
- if (!T.size)
1153
+ let d = 0;
1154
+ for (const b of e.children) {
1155
+ if (!b.size)
1158
1156
  continue;
1159
- const { py: z } = St(s, E), F = w.get(z) ?? 0;
1160
- T.size.height > F && w.set(z, T.size.height);
1161
- let q = (T == null ? void 0 : T.widthInColumns) ?? 1;
1162
- s > 0 && (q = Math.min(q, s - E % s)), E += q;
1157
+ const { py: w } = mt(s, d), y = r.get(w) ?? 0;
1158
+ b.size.height > y && r.set(w, b.size.height);
1159
+ let v = b?.widthInColumns ?? 1;
1160
+ s > 0 && (v = Math.min(v, s - d % s)), d += v;
1163
1161
  }
1164
1162
  }
1165
- const D = /* @__PURE__ */ new Map();
1163
+ const n = /* @__PURE__ */ new Map();
1166
1164
  {
1167
- let E = 0;
1168
- const T = [...w.keys()].sort((z, F) => z - F);
1169
- for (const z of T)
1170
- D.set(z, E), E += (w.get(z) ?? 0) + a;
1165
+ let d = 0;
1166
+ const b = [...r.keys()].sort((w, y) => w - y);
1167
+ for (const w of b)
1168
+ n.set(w, d), d += (r.get(w) ?? 0) + a;
1171
1169
  }
1172
- let o = 0;
1173
- v.debug("abc91 block?.size?.x", e.id, (g = e == null ? void 0 : e.size) == null ? void 0 : g.x);
1174
- let k = (h = e == null ? void 0 : e.size) != null && h.x ? ((p = e == null ? void 0 : e.size) == null ? void 0 : p.x) + (-((m = e == null ? void 0 : e.size) == null ? void 0 : m.width) / 2 || 0) : -a, f = 0;
1175
- for (const E of e.children) {
1176
- const T = e;
1177
- if (!E.size)
1170
+ let l = 0;
1171
+ k.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1172
+ let u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -a, h = 0;
1173
+ for (const d of e.children) {
1174
+ const b = e;
1175
+ if (!d.size)
1178
1176
  continue;
1179
- const { width: z, height: F } = E.size, { px: q, py: I } = St(s, o);
1180
- if (I != f && (f = I, k = (x = e == null ? void 0 : e.size) != null && x.x ? ((S = e == null ? void 0 : e.size) == null ? void 0 : S.x) + (-((_ = e == null ? void 0 : e.size) == null ? void 0 : _.width) / 2 || 0) : -a, v.debug("New row in layout for block", e.id, " and child ", E.id, f)), v.debug(
1181
- `abc89 layout blocks (child) id: ${E.id} Pos: ${o} (px, py) ${q},${I} (${(L = T == null ? void 0 : T.size) == null ? void 0 : L.x},${(C = T == null ? void 0 : T.size) == null ? void 0 : C.y}) parent: ${T.id} width: ${z}${a}`
1182
- ), T.size) {
1183
- const J = z / 2;
1184
- E.size.x = k + a + J, v.debug(
1185
- `abc91 layout blocks (calc) px, pyid:${E.id} startingPos=X${k} new startingPosX${E.size.x} ${J} padding=${a} width=${z} halfWidth=${J} => x:${E.size.x} y:${E.size.y} ${E.widthInColumns} (width * (child?.w || 1)) / 2 ${z * ((E == null ? void 0 : E.widthInColumns) ?? 1) / 2}`
1186
- ), k = E.size.x + J;
1187
- const et = D.get(I) ?? 0, ft = w.get(I) ?? F;
1188
- E.size.y = T.size.y - T.size.height / 2 + et + ft / 2 + a, v.debug(
1189
- `abc88 layout blocks (calc) px, pyid:${E.id}startingPosX${k}${a}${J}=>x:${E.size.x}y:${E.size.y}${E.widthInColumns}(width * (child?.w || 1)) / 2${z * ((E == null ? void 0 : E.widthInColumns) ?? 1) / 2}`
1177
+ const { width: w, height: y } = d.size, { px: v, py: S } = mt(s, l);
1178
+ if (S != h && (h = S, u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -a, k.debug("New row in layout for block", e.id, " and child ", d.id, h)), k.debug(
1179
+ `abc89 layout blocks (child) id: ${d.id} Pos: ${l} (px, py) ${v},${S} (${b?.size?.x},${b?.size?.y}) parent: ${b.id} width: ${w}${a}`
1180
+ ), b.size) {
1181
+ const _ = w / 2;
1182
+ d.size.x = u + a + _, k.debug(
1183
+ `abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${u} new startingPosX${d.size.x} ${_} padding=${a} width=${w} halfWidth=${_} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${w * (d?.widthInColumns ?? 1) / 2}`
1184
+ ), u = d.size.x + _;
1185
+ const T = n.get(S) ?? 0, m = r.get(S) ?? y;
1186
+ d.size.y = b.size.y - b.size.height / 2 + T + m / 2 + a, k.debug(
1187
+ `abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${u}${a}${_}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${w * (d?.widthInColumns ?? 1) / 2}`
1190
1188
  );
1191
1189
  }
1192
- E.children && Dt(E, t, a);
1193
- let K = (E == null ? void 0 : E.widthInColumns) ?? 1;
1194
- s > 0 && (K = Math.min(K, s - o % s)), o += K, v.debug("abc88 columnsPos", E, o);
1190
+ d.children && Tt(d, t, a);
1191
+ let N = d?.widthInColumns ?? 1;
1192
+ s > 0 && (N = Math.min(N, s - l % s)), l += N, k.debug("abc88 columnsPos", d, l);
1195
1193
  }
1196
1194
  }
1197
- v.debug(
1198
- `layout blocks (<==layoutBlocks) ${e.id} x: ${(B = e == null ? void 0 : e.size) == null ? void 0 : B.x} y: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.y} width: ${(b = e == null ? void 0 : e.size) == null ? void 0 : b.width}`
1195
+ k.debug(
1196
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
1199
1197
  );
1200
1198
  }
1201
- u(Dt, "layoutBlocks");
1202
- function Nt(e, { minX: t, minY: a, maxX: s, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1199
+ g(Tt, "layoutBlocks");
1200
+ function Dt(e, { minX: t, minY: a, maxX: s, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1203
1201
  if (e.size && e.id !== "root") {
1204
1202
  const { x: c, y: r, width: n, height: l } = e.size;
1205
1203
  c - n / 2 < t && (t = c - n / 2), r - l / 2 < a && (a = r - l / 2), c + n / 2 > s && (s = c + n / 2), r + l / 2 > i && (i = r + l / 2);
1206
1204
  }
1207
1205
  if (e.children)
1208
1206
  for (const c of e.children)
1209
- ({ minX: t, minY: a, maxX: s, maxY: i } = Nt(c, { minX: t, minY: a, maxX: s, maxY: i }));
1207
+ ({ minX: t, minY: a, maxX: s, maxY: i } = Dt(c, { minX: t, minY: a, maxX: s, maxY: i }));
1210
1208
  return { minX: t, minY: a, maxX: s, maxY: i };
1211
1209
  }
1212
- u(Nt, "findBounds");
1213
- function $t(e) {
1214
- var g, h;
1210
+ g(Dt, "findBounds");
1211
+ function Qt(e) {
1215
1212
  const t = e.getBlock("root");
1216
1213
  if (!t)
1217
1214
  return;
1218
- const a = ((h = (g = M()) == null ? void 0 : g.block) == null ? void 0 : h.padding) ?? 8;
1219
- gt(t, e, 0, 0, a), Dt(t, e, a), v.debug("getBlocks", JSON.stringify(t, null, 2));
1220
- const { minX: s, minY: i, maxX: c, maxY: r } = Nt(t), n = r - i, l = c - s;
1215
+ const a = R()?.block?.padding ?? 8;
1216
+ lt(t, e, 0, 0, a), Tt(t, e, a), k.debug("getBlocks", JSON.stringify(t, null, 2));
1217
+ const { minX: s, minY: i, maxX: c, maxY: r } = Dt(t), n = r - i, l = c - s;
1221
1218
  return { x: s, y: i, width: l, height: n };
1222
1219
  }
1223
- u($t, "layout");
1224
- var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
1220
+ g(Qt, "layout");
1221
+ var Fr = /* @__PURE__ */ g(async (e, t, a, s = !1, i = !1) => {
1225
1222
  let c = t || "";
1226
1223
  typeof c == "object" && (c = c[0]);
1227
- const r = M(), n = Y(r);
1228
- return await Et(
1224
+ const r = R(), n = M(r);
1225
+ return await kt(
1229
1226
  e,
1230
1227
  c,
1231
1228
  {
@@ -1238,8 +1235,8 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
1238
1235
  },
1239
1236
  r
1240
1237
  );
1241
- }, "createLabel"), j = Fr, Wr = /* @__PURE__ */ u((e, t, a, s, i) => {
1242
- t.arrowTypeStart && Pt(e, "start", t.arrowTypeStart, a, s, i), t.arrowTypeEnd && Pt(e, "end", t.arrowTypeEnd, a, s, i);
1238
+ }, "createLabel"), K = Fr, Wr = /* @__PURE__ */ g((e, t, a, s, i) => {
1239
+ t.arrowTypeStart && Mt(e, "start", t.arrowTypeStart, a, s, i), t.arrowTypeEnd && Mt(e, "end", t.arrowTypeEnd, a, s, i);
1243
1240
  }, "addEdgeMarkers"), Yr = {
1244
1241
  arrow_cross: "cross",
1245
1242
  arrow_point: "point",
@@ -1250,16 +1247,16 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
1250
1247
  composition: "composition",
1251
1248
  dependency: "dependency",
1252
1249
  lollipop: "lollipop"
1253
- }, Pt = /* @__PURE__ */ u((e, t, a, s, i, c) => {
1250
+ }, Mt = /* @__PURE__ */ g((e, t, a, s, i, c) => {
1254
1251
  const r = Yr[a];
1255
1252
  if (!r) {
1256
- v.warn(`Unknown arrow type: ${a}`);
1253
+ k.warn(`Unknown arrow type: ${a}`);
1257
1254
  return;
1258
1255
  }
1259
1256
  const n = t === "start" ? "Start" : "End";
1260
1257
  e.attr(`marker-${t}`, `url(${s}#${i}_${c}-${r}${n})`);
1261
- }, "addEdgeMarker"), Lt = {}, W = {}, Hr = /* @__PURE__ */ u(async (e, t) => {
1262
- const a = M(), s = Y(a), i = e.insert("g").attr("class", "edgeLabel"), c = i.insert("g").attr("class", "label"), r = t.labelType === "markdown", n = await Et(
1258
+ }, "addEdgeMarker"), St = {}, z = {}, Hr = /* @__PURE__ */ g(async (e, t) => {
1259
+ const a = R(), s = M(a), i = e.insert("g").attr("class", "edgeLabel"), c = i.insert("g").attr("class", "label"), r = t.labelType === "markdown", n = await kt(
1263
1260
  e,
1264
1261
  t.label,
1265
1262
  {
@@ -1276,76 +1273,76 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
1276
1273
  a
1277
1274
  );
1278
1275
  c.node().appendChild(n);
1279
- let l = n.getBBox(), g = l;
1276
+ let l = n.getBBox(), u = l;
1280
1277
  if (s) {
1281
- const p = n.children[0], m = O(n);
1282
- l = p.getBoundingClientRect(), g = l, m.attr("width", l.width), m.attr("height", l.height);
1278
+ const d = n.children[0], b = D(n);
1279
+ l = d.getBoundingClientRect(), u = l, b.attr("width", l.width), b.attr("height", l.height);
1283
1280
  } else {
1284
- const p = O(n).select("text").node();
1285
- p && typeof p.getBBox == "function" && (g = p.getBBox());
1281
+ const d = D(n).select("text").node();
1282
+ d && typeof d.getBBox == "function" && (u = d.getBBox());
1286
1283
  }
1287
- c.attr("transform", rt(g, s)), Lt[t.id] = i, t.width = l.width, t.height = l.height;
1284
+ c.attr("transform", Q(u, s)), St[t.id] = i, t.width = l.width, t.height = l.height;
1288
1285
  let h;
1289
1286
  if (t.startLabelLeft) {
1290
- const p = e.insert("g").attr("class", "edgeTerminals"), m = p.insert("g").attr("class", "inner"), x = await j(m, t.startLabelLeft, t.labelStyle);
1291
- h = x;
1292
- let S = x.getBBox();
1287
+ const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelLeft, t.labelStyle);
1288
+ h = w;
1289
+ let y = w.getBBox();
1293
1290
  if (s) {
1294
- const _ = x.children[0], L = O(x);
1295
- S = _.getBoundingClientRect(), L.attr("width", S.width), L.attr("height", S.height);
1291
+ const v = w.children[0], S = D(w);
1292
+ y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
1296
1293
  }
1297
- m.attr("transform", rt(S, s)), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = p, st(h, t.startLabelLeft);
1294
+ b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startLeft = d, tt(h, t.startLabelLeft);
1298
1295
  }
1299
1296
  if (t.startLabelRight) {
1300
- const p = e.insert("g").attr("class", "edgeTerminals"), m = p.insert("g").attr("class", "inner"), x = await j(m, t.startLabelRight, t.labelStyle);
1301
- h = x;
1302
- let S = x.getBBox();
1297
+ const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelRight, t.labelStyle);
1298
+ h = w;
1299
+ let y = w.getBBox();
1303
1300
  if (s) {
1304
- const _ = x.children[0], L = O(x);
1305
- S = _.getBoundingClientRect(), L.attr("width", S.width), L.attr("height", S.height);
1301
+ const v = w.children[0], S = D(w);
1302
+ y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
1306
1303
  }
1307
- m.attr("transform", rt(S, s)), W[t.id] || (W[t.id] = {}), W[t.id].startRight = p, st(h, t.startLabelRight);
1304
+ b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startRight = d, tt(h, t.startLabelRight);
1308
1305
  }
1309
1306
  if (t.endLabelLeft) {
1310
- const p = e.insert("g").attr("class", "edgeTerminals"), m = p.insert("g").attr("class", "inner"), x = await j(p, t.endLabelLeft, t.labelStyle);
1311
- h = x;
1312
- let S = x.getBBox();
1307
+ const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(d, t.endLabelLeft, t.labelStyle);
1308
+ h = w;
1309
+ let y = w.getBBox();
1313
1310
  if (s) {
1314
- const _ = x.children[0], L = O(x);
1315
- S = _.getBoundingClientRect(), L.attr("width", S.width), L.attr("height", S.height);
1311
+ const v = w.children[0], S = D(w);
1312
+ y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
1316
1313
  }
1317
- m.attr("transform", rt(S, s)), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = p, st(h, t.endLabelLeft);
1314
+ b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endLeft = d, tt(h, t.endLabelLeft);
1318
1315
  }
1319
1316
  if (t.endLabelRight) {
1320
- const p = e.insert("g").attr("class", "edgeTerminals"), m = p.insert("g").attr("class", "inner"), x = await j(
1321
- p,
1317
+ const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(
1318
+ d,
1322
1319
  t.endLabelRight,
1323
1320
  t.labelStyle
1324
1321
  );
1325
- h = x;
1326
- let S = x.getBBox();
1322
+ h = w;
1323
+ let y = w.getBBox();
1327
1324
  if (s) {
1328
- const _ = x.children[0], L = O(x);
1329
- S = _.getBoundingClientRect(), L.attr("width", S.width), L.attr("height", S.height);
1325
+ const v = w.children[0], S = D(w);
1326
+ y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
1330
1327
  }
1331
- m.attr("transform", rt(S, s)), W[t.id] || (W[t.id] = {}), W[t.id].endRight = p, st(h, t.endLabelRight);
1328
+ b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endRight = d, tt(h, t.endLabelRight);
1332
1329
  }
1333
1330
  return n;
1334
1331
  }, "insertEdgeLabel");
1335
- function st(e, t) {
1336
- Y(M()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1332
+ function tt(e, t) {
1333
+ M(R()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1337
1334
  }
1338
- u(st, "setTerminalWidth");
1339
- var Kr = /* @__PURE__ */ u((e, t) => {
1340
- v.debug("Moving label abc88 ", e.id, e.label, Lt[e.id], t);
1335
+ g(tt, "setTerminalWidth");
1336
+ var Kr = /* @__PURE__ */ g((e, t) => {
1337
+ k.debug("Moving label abc88 ", e.id, e.label, St[e.id], t);
1341
1338
  let a = t.updatedPath ? t.updatedPath : t.originalPath;
1342
- const s = M(), { subGraphTitleTotalMargin: i } = Xe(s);
1339
+ const s = R(), { subGraphTitleTotalMargin: i } = Xe(s);
1343
1340
  if (e.label) {
1344
- const c = Lt[e.id];
1341
+ const c = St[e.id];
1345
1342
  let r = e.x, n = e.y;
1346
1343
  if (a) {
1347
- const l = at.calcLabelPosition(a);
1348
- v.debug(
1344
+ const l = $.calcLabelPosition(a);
1345
+ k.debug(
1349
1346
  "Moving label " + e.label + " from (",
1350
1347
  r,
1351
1348
  ",",
@@ -1360,19 +1357,19 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1360
1357
  c.attr("transform", `translate(${r}, ${n + i / 2})`);
1361
1358
  }
1362
1359
  if (e.startLabelLeft) {
1363
- const c = W[e.id].startLeft;
1360
+ const c = z[e.id].startLeft;
1364
1361
  let r = e.x, n = e.y;
1365
1362
  if (a) {
1366
- const l = at.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1363
+ const l = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1367
1364
  r = l.x, n = l.y;
1368
1365
  }
1369
1366
  c.attr("transform", `translate(${r}, ${n})`);
1370
1367
  }
1371
1368
  if (e.startLabelRight) {
1372
- const c = W[e.id].startRight;
1369
+ const c = z[e.id].startRight;
1373
1370
  let r = e.x, n = e.y;
1374
1371
  if (a) {
1375
- const l = at.calcTerminalLabelPosition(
1372
+ const l = $.calcTerminalLabelPosition(
1376
1373
  e.arrowTypeStart ? 10 : 0,
1377
1374
  "start_right",
1378
1375
  a
@@ -1382,49 +1379,49 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1382
1379
  c.attr("transform", `translate(${r}, ${n})`);
1383
1380
  }
1384
1381
  if (e.endLabelLeft) {
1385
- const c = W[e.id].endLeft;
1382
+ const c = z[e.id].endLeft;
1386
1383
  let r = e.x, n = e.y;
1387
1384
  if (a) {
1388
- const l = at.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1385
+ const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1389
1386
  r = l.x, n = l.y;
1390
1387
  }
1391
1388
  c.attr("transform", `translate(${r}, ${n})`);
1392
1389
  }
1393
1390
  if (e.endLabelRight) {
1394
- const c = W[e.id].endRight;
1391
+ const c = z[e.id].endRight;
1395
1392
  let r = e.x, n = e.y;
1396
1393
  if (a) {
1397
- const l = at.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1394
+ const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1398
1395
  r = l.x, n = l.y;
1399
1396
  }
1400
1397
  c.attr("transform", `translate(${r}, ${n})`);
1401
1398
  }
1402
- }, "positionEdgeLabel"), Ur = /* @__PURE__ */ u((e, t) => {
1399
+ }, "positionEdgeLabel"), Ur = /* @__PURE__ */ g((e, t) => {
1403
1400
  const a = e.x, s = e.y, i = Math.abs(t.x - a), c = Math.abs(t.y - s), r = e.width / 2, n = e.height / 2;
1404
1401
  return i >= r || c >= n;
1405
- }, "outsideNode"), Xr = /* @__PURE__ */ u((e, t, a) => {
1406
- v.debug(`intersection calc abc89:
1402
+ }, "outsideNode"), Xr = /* @__PURE__ */ g((e, t, a) => {
1403
+ k.debug(`intersection calc abc89:
1407
1404
  outsidePoint: ${JSON.stringify(t)}
1408
1405
  insidePoint : ${JSON.stringify(a)}
1409
1406
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1410
1407
  const s = e.x, i = e.y, c = Math.abs(s - a.x), r = e.width / 2;
1411
1408
  let n = a.x < t.x ? r - c : r + c;
1412
- const l = e.height / 2, g = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1409
+ const l = e.height / 2, u = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1413
1410
  if (Math.abs(i - t.y) * r > Math.abs(s - t.x) * l) {
1414
- let p = a.y < t.y ? t.y - l - i : i - l - t.y;
1415
- n = h * p / g;
1416
- const m = {
1411
+ let d = a.y < t.y ? t.y - l - i : i - l - t.y;
1412
+ n = h * d / u;
1413
+ const b = {
1417
1414
  x: a.x < t.x ? a.x + n : a.x - h + n,
1418
- y: a.y < t.y ? a.y + g - p : a.y - g + p
1415
+ y: a.y < t.y ? a.y + u - d : a.y - u + d
1419
1416
  };
1420
- return n === 0 && (m.x = t.x, m.y = t.y), h === 0 && (m.x = t.x), g === 0 && (m.y = t.y), v.debug(`abc89 topp/bott calc, Q ${g}, q ${p}, R ${h}, r ${n}`, m), m;
1417
+ return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), u === 0 && (b.y = t.y), k.debug(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${n}`, b), b;
1421
1418
  } else {
1422
1419
  a.x < t.x ? n = t.x - r - s : n = s - r - t.x;
1423
- let p = g * n / h, m = a.x < t.x ? a.x + h - n : a.x - h + n, x = a.y < t.y ? a.y + p : a.y - p;
1424
- return v.debug(`sides calc abc89, Q ${g}, q ${p}, R ${h}, r ${n}`, { _x: m, _y: x }), n === 0 && (m = t.x, x = t.y), h === 0 && (m = t.x), g === 0 && (x = t.y), { x: m, y: x };
1420
+ let d = u * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, w = a.y < t.y ? a.y + d : a.y - d;
1421
+ return k.debug(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${n}`, { _x: b, _y: w }), n === 0 && (b = t.x, w = t.y), h === 0 && (b = t.x), u === 0 && (w = t.y), { x: b, y: w };
1425
1422
  }
1426
- }, "intersection"), Ft = /* @__PURE__ */ u((e, t) => {
1427
- v.debug("abc88 cutPathAtIntersect", e, t);
1423
+ }, "intersection"), Pt = /* @__PURE__ */ g((e, t) => {
1424
+ k.debug("abc88 cutPathAtIntersect", e, t);
1428
1425
  let a = [], s = e[0], i = !1;
1429
1426
  return e.forEach((c) => {
1430
1427
  if (!Ur(t, c) && !i) {
@@ -1436,48 +1433,48 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1436
1433
  } else
1437
1434
  s = c, i || a.push(c);
1438
1435
  }), a;
1439
- }, "cutPathAtIntersect"), Vr = /* @__PURE__ */ u(function(e, t, a, s, i, c, r) {
1436
+ }, "cutPathAtIntersect"), Vr = /* @__PURE__ */ g(function(e, t, a, s, i, c, r) {
1440
1437
  let n = a.points;
1441
- v.debug("abc88 InsertEdge: edge=", a, "e=", t);
1438
+ k.debug("abc88 InsertEdge: edge=", a, "e=", t);
1442
1439
  let l = !1;
1443
- const g = c.node(t.v);
1440
+ const u = c.node(t.v);
1444
1441
  var h = c.node(t.w);
1445
- h != null && h.intersect && (g != null && g.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(g.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (v.debug("to cluster abc88", s[a.toCluster]), n = Ft(a.points, s[a.toCluster].node), l = !0), a.fromCluster && (v.debug("from cluster abc88", s[a.fromCluster]), n = Ft(n.reverse(), s[a.fromCluster].node).reverse(), l = !0);
1446
- const p = n.filter((b) => !Number.isNaN(b.y));
1447
- let m = Ke;
1448
- a.curve && (i === "graph" || i === "flowchart") && (m = a.curve);
1449
- const { x, y: S } = Ye(a), _ = He().x(x).y(S).curve(m);
1450
- let L;
1442
+ h?.intersect && u?.intersect && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (k.debug("to cluster abc88", s[a.toCluster]), n = Pt(a.points, s[a.toCluster].node), l = !0), a.fromCluster && (k.debug("from cluster abc88", s[a.fromCluster]), n = Pt(n.reverse(), s[a.fromCluster].node).reverse(), l = !0);
1443
+ const d = n.filter((m) => !Number.isNaN(m.y));
1444
+ let b = Ke;
1445
+ a.curve && (i === "graph" || i === "flowchart") && (b = a.curve);
1446
+ const { x: w, y } = Ye(a), v = He().x(w).y(y).curve(b);
1447
+ let S;
1451
1448
  switch (a.thickness) {
1452
1449
  case "normal":
1453
- L = "edge-thickness-normal";
1450
+ S = "edge-thickness-normal";
1454
1451
  break;
1455
1452
  case "thick":
1456
- L = "edge-thickness-thick";
1453
+ S = "edge-thickness-thick";
1457
1454
  break;
1458
1455
  case "invisible":
1459
- L = "edge-thickness-thick";
1456
+ S = "edge-thickness-thick";
1460
1457
  break;
1461
1458
  default:
1462
- L = "";
1459
+ S = "";
1463
1460
  }
1464
1461
  switch (a.pattern) {
1465
1462
  case "solid":
1466
- L += " edge-pattern-solid";
1463
+ S += " edge-pattern-solid";
1467
1464
  break;
1468
1465
  case "dotted":
1469
- L += " edge-pattern-dotted";
1466
+ S += " edge-pattern-dotted";
1470
1467
  break;
1471
1468
  case "dashed":
1472
- L += " edge-pattern-dashed";
1469
+ S += " edge-pattern-dashed";
1473
1470
  break;
1474
1471
  }
1475
- const C = e.append("path").attr("d", _(p)).attr("id", a.id).attr("class", " " + L + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1476
- let B = "";
1477
- (M().flowchart.arrowMarkerAbsolute || M().state.arrowMarkerAbsolute) && (B = Ue(!0)), Wr(C, a, B, r, i);
1478
- let N = {};
1479
- return l && (N.updatedPath = n), N.originalPath = a.points, N;
1480
- }, "insertEdge"), jr = /* @__PURE__ */ u((e) => {
1472
+ const N = e.append("path").attr("d", v(d)).attr("id", a.id).attr("class", " " + S + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1473
+ let _ = "";
1474
+ (R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = Ue(!0)), Wr(N, a, _, r, i);
1475
+ let T = {};
1476
+ return l && (T.updatedPath = n), T.originalPath = a.points, T;
1477
+ }, "insertEdge"), jr = /* @__PURE__ */ g((e) => {
1481
1478
  const t = /* @__PURE__ */ new Set();
1482
1479
  for (const a of e)
1483
1480
  switch (a) {
@@ -1492,28 +1489,28 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1492
1489
  break;
1493
1490
  }
1494
1491
  return t;
1495
- }, "expandAndDeduplicateDirections"), Gr = /* @__PURE__ */ u((e, t, a, s) => {
1496
- const i = jr(e), c = 2, r = t.height + 2 * a.padding, n = r / c, l = s ?? t.width + 2 * n + a.padding, g = a.padding / 2;
1492
+ }, "expandAndDeduplicateDirections"), Gr = /* @__PURE__ */ g((e, t, a, s) => {
1493
+ const i = jr(e), c = 2, r = t.height + 2 * a.padding, n = r / c, l = s ?? t.width + 2 * n + a.padding, u = a.padding / 2;
1497
1494
  return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1498
1495
  // Bottom
1499
1496
  { x: 0, y: 0 },
1500
1497
  { x: n, y: 0 },
1501
- { x: l / 2, y: 2 * g },
1498
+ { x: l / 2, y: 2 * u },
1502
1499
  { x: l - n, y: 0 },
1503
1500
  { x: l, y: 0 },
1504
1501
  // Right
1505
1502
  { x: l, y: -r / 3 },
1506
- { x: l + 2 * g, y: -r / 2 },
1503
+ { x: l + 2 * u, y: -r / 2 },
1507
1504
  { x: l, y: -2 * r / 3 },
1508
1505
  { x: l, y: -r },
1509
1506
  // Top
1510
1507
  { x: l - n, y: -r },
1511
- { x: l / 2, y: -r - 2 * g },
1508
+ { x: l / 2, y: -r - 2 * u },
1512
1509
  { x: n, y: -r },
1513
1510
  // Left
1514
1511
  { x: 0, y: -r },
1515
1512
  { x: 0, y: -2 * r / 3 },
1516
- { x: -2 * g, y: -r / 2 },
1513
+ { x: -2 * u, y: -r / 2 },
1517
1514
  { x: 0, y: -r / 3 }
1518
1515
  ] : i.has("right") && i.has("left") && i.has("up") ? [
1519
1516
  { x: n, y: 0 },
@@ -1539,31 +1536,31 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1539
1536
  { x: l, y: -r }
1540
1537
  ] : i.has("right") && i.has("left") ? [
1541
1538
  { x: n, y: 0 },
1542
- { x: n, y: -g },
1543
- { x: l - n, y: -g },
1539
+ { x: n, y: -u },
1540
+ { x: l - n, y: -u },
1544
1541
  { x: l - n, y: 0 },
1545
1542
  { x: l, y: -r / 2 },
1546
1543
  { x: l - n, y: -r },
1547
- { x: l - n, y: -r + g },
1548
- { x: n, y: -r + g },
1544
+ { x: l - n, y: -r + u },
1545
+ { x: n, y: -r + u },
1549
1546
  { x: n, y: -r },
1550
1547
  { x: 0, y: -r / 2 }
1551
1548
  ] : i.has("up") && i.has("down") ? [
1552
1549
  // Bottom center
1553
1550
  { x: l / 2, y: 0 },
1554
1551
  // Left point of bottom arrow
1555
- { x: 0, y: -g },
1556
- { x: n, y: -g },
1552
+ { x: 0, y: -u },
1553
+ { x: n, y: -u },
1557
1554
  // Left top over vertical section
1558
- { x: n, y: -r + g },
1559
- { x: 0, y: -r + g },
1555
+ { x: n, y: -r + u },
1556
+ { x: 0, y: -r + u },
1560
1557
  // Top of arrow
1561
1558
  { x: l / 2, y: -r },
1562
- { x: l, y: -r + g },
1559
+ { x: l, y: -r + u },
1563
1560
  // Top of right vertical bar
1564
- { x: l - n, y: -r + g },
1565
- { x: l - n, y: -g },
1566
- { x: l, y: -g }
1561
+ { x: l - n, y: -r + u },
1562
+ { x: l - n, y: -u },
1563
+ { x: l, y: -u }
1567
1564
  ] : i.has("right") && i.has("up") ? [
1568
1565
  { x: 0, y: 0 },
1569
1566
  { x: l, y: -n },
@@ -1581,145 +1578,145 @@ var Kr = /* @__PURE__ */ u((e, t) => {
1581
1578
  { x: 0, y: 0 },
1582
1579
  { x: l, y: -r }
1583
1580
  ] : i.has("right") ? [
1584
- { x: n, y: -g },
1585
- { x: n, y: -g },
1586
- { x: l - n, y: -g },
1581
+ { x: n, y: -u },
1582
+ { x: n, y: -u },
1583
+ { x: l - n, y: -u },
1587
1584
  { x: l - n, y: 0 },
1588
1585
  { x: l, y: -r / 2 },
1589
1586
  { x: l - n, y: -r },
1590
- { x: l - n, y: -r + g },
1587
+ { x: l - n, y: -r + u },
1591
1588
  // top left corner of arrow
1592
- { x: n, y: -r + g },
1593
- { x: n, y: -r + g }
1589
+ { x: n, y: -r + u },
1590
+ { x: n, y: -r + u }
1594
1591
  ] : i.has("left") ? [
1595
1592
  { x: n, y: 0 },
1596
- { x: n, y: -g },
1593
+ { x: n, y: -u },
1597
1594
  // Two points, the right corners
1598
- { x: l - n, y: -g },
1599
- { x: l - n, y: -r + g },
1600
- { x: n, y: -r + g },
1595
+ { x: l - n, y: -u },
1596
+ { x: l - n, y: -r + u },
1597
+ { x: n, y: -r + u },
1601
1598
  { x: n, y: -r },
1602
1599
  { x: 0, y: -r / 2 }
1603
1600
  ] : i.has("up") ? [
1604
1601
  // Bottom center
1605
- { x: n, y: -g },
1602
+ { x: n, y: -u },
1606
1603
  // Left top over vertical section
1607
- { x: n, y: -r + g },
1608
- { x: 0, y: -r + g },
1604
+ { x: n, y: -r + u },
1605
+ { x: 0, y: -r + u },
1609
1606
  // Top of arrow
1610
1607
  { x: l / 2, y: -r },
1611
- { x: l, y: -r + g },
1608
+ { x: l, y: -r + u },
1612
1609
  // Top of right vertical bar
1613
- { x: l - n, y: -r + g },
1614
- { x: l - n, y: -g }
1610
+ { x: l - n, y: -r + u },
1611
+ { x: l - n, y: -u }
1615
1612
  ] : i.has("down") ? [
1616
1613
  // Bottom center
1617
1614
  { x: l / 2, y: 0 },
1618
1615
  // Left point of bottom arrow
1619
- { x: 0, y: -g },
1620
- { x: n, y: -g },
1616
+ { x: 0, y: -u },
1617
+ { x: n, y: -u },
1621
1618
  // Left top over vertical section
1622
- { x: n, y: -r + g },
1623
- { x: l - n, y: -r + g },
1624
- { x: l - n, y: -g },
1625
- { x: l, y: -g }
1619
+ { x: n, y: -r + u },
1620
+ { x: l - n, y: -r + u },
1621
+ { x: l - n, y: -u },
1622
+ { x: l, y: -u }
1626
1623
  ] : [{ x: 0, y: 0 }];
1627
1624
  }, "getArrowPoints");
1628
- function te(e, t) {
1625
+ function $t(e, t) {
1629
1626
  return e.intersect(t);
1630
1627
  }
1631
- u(te, "intersectNode");
1632
- var Zr = te;
1633
- function ee(e, t, a, s) {
1634
- var i = e.x, c = e.y, r = i - s.x, n = c - s.y, l = Math.sqrt(t * t * n * n + a * a * r * r), g = Math.abs(t * a * r / l);
1635
- s.x < i && (g = -g);
1628
+ g($t, "intersectNode");
1629
+ var Zr = $t;
1630
+ function te(e, t, a, s) {
1631
+ var i = e.x, c = e.y, r = i - s.x, n = c - s.y, l = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / l);
1632
+ s.x < i && (u = -u);
1636
1633
  var h = Math.abs(t * a * n / l);
1637
- return s.y < c && (h = -h), { x: i + g, y: c + h };
1634
+ return s.y < c && (h = -h), { x: i + u, y: c + h };
1638
1635
  }
1639
- u(ee, "intersectEllipse");
1640
- var re = ee;
1641
- function ae(e, t, a) {
1642
- return re(e, t, t, a);
1636
+ g(te, "intersectEllipse");
1637
+ var ee = te;
1638
+ function re(e, t, a) {
1639
+ return ee(e, t, t, a);
1643
1640
  }
1644
- u(ae, "intersectCircle");
1645
- var qr = ae;
1646
- function se(e, t, a, s) {
1647
- var i, c, r, n, l, g, h, p, m, x, S, _, L, C, B;
1648
- if (i = t.y - e.y, r = e.x - t.x, l = t.x * e.y - e.x * t.y, m = i * a.x + r * a.y + l, x = i * s.x + r * s.y + l, !(m !== 0 && x !== 0 && vt(m, x)) && (c = s.y - a.y, n = a.x - s.x, g = s.x * a.y - a.x * s.y, h = c * e.x + n * e.y + g, p = c * t.x + n * t.y + g, !(h !== 0 && p !== 0 && vt(h, p)) && (S = i * n - c * r, S !== 0)))
1649
- return _ = Math.abs(S / 2), L = r * g - n * l, C = L < 0 ? (L - _) / S : (L + _) / S, L = c * l - i * g, B = L < 0 ? (L - _) / S : (L + _) / S, { x: C, y: B };
1641
+ g(re, "intersectCircle");
1642
+ var qr = re;
1643
+ function ae(e, t, a, s) {
1644
+ var i, c, r, n, l, u, h, d, b, w, y, v, S, N, _;
1645
+ if (i = t.y - e.y, r = e.x - t.x, l = t.x * e.y - e.x * t.y, b = i * a.x + r * a.y + l, w = i * s.x + r * s.y + l, !(b !== 0 && w !== 0 && Lt(b, w)) && (c = s.y - a.y, n = a.x - s.x, u = s.x * a.y - a.x * s.y, h = c * e.x + n * e.y + u, d = c * t.x + n * t.y + u, !(h !== 0 && d !== 0 && Lt(h, d)) && (y = i * n - c * r, y !== 0)))
1646
+ return v = Math.abs(y / 2), S = r * u - n * l, N = S < 0 ? (S - v) / y : (S + v) / y, S = c * l - i * u, _ = S < 0 ? (S - v) / y : (S + v) / y, { x: N, y: _ };
1650
1647
  }
1651
- u(se, "intersectLine");
1652
- function vt(e, t) {
1648
+ g(ae, "intersectLine");
1649
+ function Lt(e, t) {
1653
1650
  return e * t > 0;
1654
1651
  }
1655
- u(vt, "sameSign");
1656
- var Jr = se, Qr = ie;
1657
- function ie(e, t, a) {
1652
+ g(Lt, "sameSign");
1653
+ var Jr = ae, Qr = se;
1654
+ function se(e, t, a) {
1658
1655
  var s = e.x, i = e.y, c = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
1659
- typeof t.forEach == "function" ? t.forEach(function(S) {
1660
- r = Math.min(r, S.x), n = Math.min(n, S.y);
1656
+ typeof t.forEach == "function" ? t.forEach(function(y) {
1657
+ r = Math.min(r, y.x), n = Math.min(n, y.y);
1661
1658
  }) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
1662
- for (var l = s - e.width / 2 - r, g = i - e.height / 2 - n, h = 0; h < t.length; h++) {
1663
- var p = t[h], m = t[h < t.length - 1 ? h + 1 : 0], x = Jr(
1659
+ for (var l = s - e.width / 2 - r, u = i - e.height / 2 - n, h = 0; h < t.length; h++) {
1660
+ var d = t[h], b = t[h < t.length - 1 ? h + 1 : 0], w = Jr(
1664
1661
  e,
1665
1662
  a,
1666
- { x: l + p.x, y: g + p.y },
1667
- { x: l + m.x, y: g + m.y }
1663
+ { x: l + d.x, y: u + d.y },
1664
+ { x: l + b.x, y: u + b.y }
1668
1665
  );
1669
- x && c.push(x);
1666
+ w && c.push(w);
1670
1667
  }
1671
- return c.length ? (c.length > 1 && c.sort(function(S, _) {
1672
- var L = S.x - a.x, C = S.y - a.y, B = Math.sqrt(L * L + C * C), N = _.x - a.x, b = _.y - a.y, d = Math.sqrt(N * N + b * b);
1673
- return B < d ? -1 : B === d ? 0 : 1;
1668
+ return c.length ? (c.length > 1 && c.sort(function(y, v) {
1669
+ var S = y.x - a.x, N = y.y - a.y, _ = Math.sqrt(S * S + N * N), T = v.x - a.x, m = v.y - a.y, f = Math.sqrt(T * T + m * m);
1670
+ return _ < f ? -1 : _ === f ? 0 : 1;
1674
1671
  }), c[0]) : e;
1675
1672
  }
1676
- u(ie, "intersectPolygon");
1677
- var $r = /* @__PURE__ */ u((e, t) => {
1678
- var a = e.x, s = e.y, i = t.x - a, c = t.y - s, r = e.width / 2, n = e.height / 2, l, g;
1679
- return Math.abs(c) * r > Math.abs(i) * n ? (c < 0 && (n = -n), l = c === 0 ? 0 : n * i / c, g = n) : (i < 0 && (r = -r), l = r, g = i === 0 ? 0 : r * c / i), { x: a + l, y: s + g };
1680
- }, "intersectRect"), ta = $r, R = {
1673
+ g(se, "intersectPolygon");
1674
+ var $r = /* @__PURE__ */ g((e, t) => {
1675
+ var a = e.x, s = e.y, i = t.x - a, c = t.y - s, r = e.width / 2, n = e.height / 2, l, u;
1676
+ return Math.abs(c) * r > Math.abs(i) * n ? (c < 0 && (n = -n), l = c === 0 ? 0 : n * i / c, u = n) : (i < 0 && (r = -r), l = r, u = i === 0 ? 0 : r * c / i), { x: a + l, y: s + u };
1677
+ }, "intersectRect"), ta = $r, B = {
1681
1678
  node: Zr,
1682
1679
  circle: qr,
1683
- ellipse: re,
1680
+ ellipse: ee,
1684
1681
  polygon: Qr,
1685
1682
  rect: ta
1686
- }, P = /* @__PURE__ */ u(async (e, t, a, s) => {
1687
- const i = M();
1683
+ }, A = /* @__PURE__ */ g(async (e, t, a, s) => {
1684
+ const i = R();
1688
1685
  let c;
1689
- const r = t.useHtmlLabels || Y(i);
1686
+ const r = t.useHtmlLabels || M(i);
1690
1687
  a ? c = a : c = "node default";
1691
1688
  const n = e.insert("g").attr("class", c).attr("id", t.domId || t.id), l = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
1692
- let g;
1693
- t.labelText === void 0 ? g = "" : g = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1689
+ let u;
1690
+ t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1694
1691
  let h;
1695
- t.labelType === "markdown" ? h = Et(
1692
+ t.labelType === "markdown" ? h = kt(
1696
1693
  l,
1697
- Ot(Rt(g), i),
1694
+ Ct(Ot(u), i),
1698
1695
  {
1699
1696
  useHtmlLabels: r,
1700
1697
  width: t.width || i.flowchart.wrappingWidth,
1701
1698
  classes: "markdown-node-label"
1702
1699
  },
1703
1700
  i
1704
- ) : h = await j(
1701
+ ) : h = await K(
1705
1702
  l,
1706
- Ot(Rt(g), i),
1703
+ Ct(Ot(u), i),
1707
1704
  t.labelStyle,
1708
1705
  !1,
1709
1706
  s
1710
1707
  );
1711
- let p = h.getBBox();
1712
- const m = t.padding / 2;
1713
- if (Y(i)) {
1714
- const x = h.children[0], S = O(h);
1715
- await Ge(x, g), p = x.getBoundingClientRect(), S.attr("width", p.width), S.attr("height", p.height);
1716
- }
1717
- return r ? l.attr("transform", "translate(" + -p.width / 2 + ", " + -p.height / 2 + ")") : l.attr("transform", "translate(0, " + -p.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -p.width / 2 + ", " + -p.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: n, bbox: p, halfPadding: m, label: l };
1718
- }, "labelHelper"), A = /* @__PURE__ */ u((e, t) => {
1708
+ let d = h.getBBox();
1709
+ const b = t.padding / 2;
1710
+ if (M(i)) {
1711
+ const w = h.children[0], y = D(h);
1712
+ await Ge(w, u), d = w.getBoundingClientRect(), y.attr("width", d.width), y.attr("height", d.height);
1713
+ }
1714
+ return r ? l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")") : l.attr("transform", "translate(0, " + -d.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: n, bbox: d, halfPadding: b, label: l };
1715
+ }, "labelHelper"), I = /* @__PURE__ */ g((e, t) => {
1719
1716
  const a = t.node().getBBox();
1720
1717
  e.width = a.width, e.height = a.height;
1721
1718
  }, "updateNodeBounds");
1722
- function Z(e, t, a, s) {
1719
+ function X(e, t, a, s) {
1723
1720
  return e.insert("polygon", ":first-child").attr(
1724
1721
  "points",
1725
1722
  s.map(function(i) {
@@ -1727,27 +1724,27 @@ function Z(e, t, a, s) {
1727
1724
  }).join(" ")
1728
1725
  ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
1729
1726
  }
1730
- u(Z, "insertPolygonShape");
1731
- var ea = /* @__PURE__ */ u(async (e, t) => {
1732
- t.useHtmlLabels || Y(M()) || (t.centerLabel = !0);
1733
- const { shapeSvg: s, bbox: i, halfPadding: c } = await P(
1727
+ g(X, "insertPolygonShape");
1728
+ var ea = /* @__PURE__ */ g(async (e, t) => {
1729
+ t.useHtmlLabels || M(R()) || (t.centerLabel = !0);
1730
+ const { shapeSvg: s, bbox: i, halfPadding: c } = await A(
1734
1731
  e,
1735
1732
  t,
1736
1733
  "node " + t.classes,
1737
1734
  !0
1738
1735
  );
1739
- v.info("Classes = ", t.classes);
1736
+ k.info("Classes = ", t.classes);
1740
1737
  const r = s.insert("rect", ":first-child");
1741
- return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - c).attr("y", -i.height / 2 - c).attr("width", i.width + t.padding).attr("height", i.height + t.padding), A(t, r), t.intersect = function(n) {
1742
- return R.rect(t, n);
1738
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - c).attr("y", -i.height / 2 - c).attr("width", i.width + t.padding).attr("height", i.height + t.padding), I(t, r), t.intersect = function(n) {
1739
+ return B.rect(t, n);
1743
1740
  }, s;
1744
- }, "note"), ra = ea, Wt = /* @__PURE__ */ u((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ u((e, t) => `${t || "node default"}${Wt(e.classes)} ${Wt(
1741
+ }, "note"), ra = ea, Ft = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Ft(e.classes)} ${Ft(
1745
1742
  e.class
1746
- )}`, "getClassesFromNode"), Yt = /* @__PURE__ */ u(async (e, t) => {
1747
- const { shapeSvg: a, bbox: s } = await P(
1743
+ )}`, "getClassesFromNode"), Wt = /* @__PURE__ */ g(async (e, t) => {
1744
+ const { shapeSvg: a, bbox: s } = await A(
1748
1745
  e,
1749
1746
  t,
1750
- X(t, void 0),
1747
+ Y(t, void 0),
1751
1748
  !0
1752
1749
  ), i = s.width + t.padding, c = s.height + t.padding, r = i + c, n = [
1753
1750
  { x: r / 2, y: 0 },
@@ -1755,12 +1752,12 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
1755
1752
  { x: r / 2, y: -r },
1756
1753
  { x: 0, y: -r / 2 }
1757
1754
  ];
1758
- v.info("Question main (Circle)");
1759
- const l = Z(a, r, r, n);
1760
- return l.attr("style", t.style), A(t, l), t.intersect = function(g) {
1761
- return v.warn("Intersect called"), R.polygon(t, n, g);
1755
+ k.info("Question main (Circle)");
1756
+ const l = X(a, r, r, n);
1757
+ return l.attr("style", t.style), I(t, l), t.intersect = function(u) {
1758
+ return k.warn("Intersect called"), B.polygon(t, n, u);
1762
1759
  }, a;
1763
- }, "question"), aa = /* @__PURE__ */ u((e, t) => {
1760
+ }, "question"), aa = /* @__PURE__ */ g((e, t) => {
1764
1761
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = 28, i = [
1765
1762
  { x: 0, y: s / 2 },
1766
1763
  { x: s / 2, y: 0 },
@@ -1773,13 +1770,13 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
1773
1770
  return r.x + "," + r.y;
1774
1771
  }).join(" ")
1775
1772
  ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
1776
- return R.circle(t, 14, r);
1773
+ return B.circle(t, 14, r);
1777
1774
  }, a;
1778
- }, "choice"), sa = /* @__PURE__ */ u(async (e, t) => {
1779
- const { shapeSvg: a, bbox: s } = await P(
1775
+ }, "choice"), sa = /* @__PURE__ */ g(async (e, t) => {
1776
+ const { shapeSvg: a, bbox: s } = await A(
1780
1777
  e,
1781
1778
  t,
1782
- X(t, void 0),
1779
+ Y(t, void 0),
1783
1780
  !0
1784
1781
  ), i = 4, c = t.positioned ? t.height : s.height + t.padding, r = c / i, n = t.positioned ? t.width : s.width + 2 * r + t.padding, l = [
1785
1782
  { x: r, y: 0 },
@@ -1788,20 +1785,20 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
1788
1785
  { x: n - r, y: -c },
1789
1786
  { x: r, y: -c },
1790
1787
  { x: 0, y: -c / 2 }
1791
- ], g = Z(a, n, c, l);
1792
- return g.attr("style", t.style), A(t, g), t.intersect = function(h) {
1793
- return R.polygon(t, l, h);
1788
+ ], u = X(a, n, c, l);
1789
+ return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
1790
+ return B.polygon(t, l, h);
1794
1791
  }, a;
1795
- }, "hexagon"), ia = /* @__PURE__ */ u(async (e, t) => {
1796
- const { shapeSvg: a, bbox: s } = await P(e, t, void 0, !0), i = 2, c = s.height + 2 * t.padding, r = c / i, n = s.width + 2 * r + t.padding, g = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > n ? t.width : n, h = Gr(t.directions, s, t, g), p = Z(a, g, c, h);
1797
- return p.attr("style", t.style), A(t, p), t.intersect = function(m) {
1798
- return R.polygon(t, h, m);
1792
+ }, "hexagon"), ia = /* @__PURE__ */ g(async (e, t) => {
1793
+ const { shapeSvg: a, bbox: s } = await A(e, t, void 0, !0), i = 2, c = s.height + 2 * t.padding, r = c / i, n = s.width + 2 * r + t.padding, u = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > n ? t.width : n, h = Gr(t.directions, s, t, u), d = X(a, u, c, h);
1794
+ return d.attr("style", t.style), I(t, d), t.intersect = function(b) {
1795
+ return B.polygon(t, h, b);
1799
1796
  }, a;
1800
- }, "block_arrow"), na = /* @__PURE__ */ u(async (e, t) => {
1801
- const { shapeSvg: a, bbox: s } = await P(
1797
+ }, "block_arrow"), na = /* @__PURE__ */ g(async (e, t) => {
1798
+ const { shapeSvg: a, bbox: s } = await A(
1802
1799
  e,
1803
1800
  t,
1804
- X(t, void 0),
1801
+ Y(t, void 0),
1805
1802
  !0
1806
1803
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
1807
1804
  { x: -c / 2, y: 0 },
@@ -1810,69 +1807,69 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
1810
1807
  { x: -c / 2, y: -c },
1811
1808
  { x: 0, y: -c / 2 }
1812
1809
  ];
1813
- return Z(a, i, c, r).attr("style", t.style), t.width = i + c, t.height = c, t.intersect = function(l) {
1814
- return R.polygon(t, r, l);
1810
+ return X(a, i, c, r).attr("style", t.style), t.width = i + c, t.height = c, t.intersect = function(l) {
1811
+ return B.polygon(t, r, l);
1815
1812
  }, a;
1816
- }, "rect_left_inv_arrow"), ca = /* @__PURE__ */ u(async (e, t) => {
1817
- const { shapeSvg: a, bbox: s } = await P(e, t, X(t), !0), i = s.width + t.padding, c = s.height + t.padding, r = [
1813
+ }, "rect_left_inv_arrow"), ca = /* @__PURE__ */ g(async (e, t) => {
1814
+ const { shapeSvg: a, bbox: s } = await A(e, t, Y(t), !0), i = s.width + t.padding, c = s.height + t.padding, r = [
1818
1815
  { x: -2 * c / 6, y: 0 },
1819
1816
  { x: i - c / 6, y: 0 },
1820
1817
  { x: i + 2 * c / 6, y: -c },
1821
1818
  { x: c / 6, y: -c }
1822
- ], n = Z(a, i, c, r);
1823
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
1824
- return R.polygon(t, r, l);
1819
+ ], n = X(a, i, c, r);
1820
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
1821
+ return B.polygon(t, r, l);
1825
1822
  }, a;
1826
- }, "lean_right"), la = /* @__PURE__ */ u(async (e, t) => {
1827
- const { shapeSvg: a, bbox: s } = await P(
1823
+ }, "lean_right"), la = /* @__PURE__ */ g(async (e, t) => {
1824
+ const { shapeSvg: a, bbox: s } = await A(
1828
1825
  e,
1829
1826
  t,
1830
- X(t, void 0),
1827
+ Y(t, void 0),
1831
1828
  !0
1832
1829
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
1833
1830
  { x: 2 * c / 6, y: 0 },
1834
1831
  { x: i + c / 6, y: 0 },
1835
1832
  { x: i - 2 * c / 6, y: -c },
1836
1833
  { x: -c / 6, y: -c }
1837
- ], n = Z(a, i, c, r);
1838
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
1839
- return R.polygon(t, r, l);
1834
+ ], n = X(a, i, c, r);
1835
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
1836
+ return B.polygon(t, r, l);
1840
1837
  }, a;
1841
- }, "lean_left"), oa = /* @__PURE__ */ u(async (e, t) => {
1842
- const { shapeSvg: a, bbox: s } = await P(
1838
+ }, "lean_left"), oa = /* @__PURE__ */ g(async (e, t) => {
1839
+ const { shapeSvg: a, bbox: s } = await A(
1843
1840
  e,
1844
1841
  t,
1845
- X(t, void 0),
1842
+ Y(t, void 0),
1846
1843
  !0
1847
1844
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
1848
1845
  { x: -2 * c / 6, y: 0 },
1849
1846
  { x: i + 2 * c / 6, y: 0 },
1850
1847
  { x: i - c / 6, y: -c },
1851
1848
  { x: c / 6, y: -c }
1852
- ], n = Z(a, i, c, r);
1853
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
1854
- return R.polygon(t, r, l);
1849
+ ], n = X(a, i, c, r);
1850
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
1851
+ return B.polygon(t, r, l);
1855
1852
  }, a;
1856
- }, "trapezoid"), ha = /* @__PURE__ */ u(async (e, t) => {
1857
- const { shapeSvg: a, bbox: s } = await P(
1853
+ }, "trapezoid"), ha = /* @__PURE__ */ g(async (e, t) => {
1854
+ const { shapeSvg: a, bbox: s } = await A(
1858
1855
  e,
1859
1856
  t,
1860
- X(t, void 0),
1857
+ Y(t, void 0),
1861
1858
  !0
1862
1859
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
1863
1860
  { x: c / 6, y: 0 },
1864
1861
  { x: i - c / 6, y: 0 },
1865
1862
  { x: i + 2 * c / 6, y: -c },
1866
1863
  { x: -2 * c / 6, y: -c }
1867
- ], n = Z(a, i, c, r);
1868
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
1869
- return R.polygon(t, r, l);
1864
+ ], n = X(a, i, c, r);
1865
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
1866
+ return B.polygon(t, r, l);
1870
1867
  }, a;
1871
- }, "inv_trapezoid"), ga = /* @__PURE__ */ u(async (e, t) => {
1872
- const { shapeSvg: a, bbox: s } = await P(
1868
+ }, "inv_trapezoid"), ga = /* @__PURE__ */ g(async (e, t) => {
1869
+ const { shapeSvg: a, bbox: s } = await A(
1873
1870
  e,
1874
1871
  t,
1875
- X(t, void 0),
1872
+ Y(t, void 0),
1876
1873
  !0
1877
1874
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
1878
1875
  { x: 0, y: 0 },
@@ -1880,156 +1877,156 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
1880
1877
  { x: i, y: -c / 2 },
1881
1878
  { x: i + c / 2, y: -c },
1882
1879
  { x: 0, y: -c }
1883
- ], n = Z(a, i, c, r);
1884
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
1885
- return R.polygon(t, r, l);
1880
+ ], n = X(a, i, c, r);
1881
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
1882
+ return B.polygon(t, r, l);
1886
1883
  }, a;
1887
- }, "rect_right_inv_arrow"), ua = /* @__PURE__ */ u(async (e, t) => {
1888
- const { shapeSvg: a, bbox: s } = await P(
1884
+ }, "rect_right_inv_arrow"), ua = /* @__PURE__ */ g(async (e, t) => {
1885
+ const { shapeSvg: a, bbox: s } = await A(
1889
1886
  e,
1890
1887
  t,
1891
- X(t, void 0),
1888
+ Y(t, void 0),
1892
1889
  !0
1893
- ), i = s.width + t.padding, c = i / 2, r = c / (2.5 + i / 50), n = s.height + r + t.padding, l = "M 0," + r + " a " + c + "," + r + " 0,0,0 " + i + " 0 a " + c + "," + r + " 0,0,0 " + -i + " 0 l 0," + n + " a " + c + "," + r + " 0,0,0 " + i + " 0 l 0," + -n, g = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(n / 2 + r) + ")");
1894
- return A(t, g), t.intersect = function(h) {
1895
- const p = R.rect(t, h), m = p.x - t.x;
1896
- if (c != 0 && (Math.abs(m) < t.width / 2 || Math.abs(m) == t.width / 2 && Math.abs(p.y - t.y) > t.height / 2 - r)) {
1897
- let x = r * r * (1 - m * m / (c * c));
1898
- x != 0 && (x = Math.sqrt(x)), x = r - x, h.y - t.y > 0 && (x = -x), p.y += x;
1890
+ ), i = s.width + t.padding, c = i / 2, r = c / (2.5 + i / 50), n = s.height + r + t.padding, l = "M 0," + r + " a " + c + "," + r + " 0,0,0 " + i + " 0 a " + c + "," + r + " 0,0,0 " + -i + " 0 l 0," + n + " a " + c + "," + r + " 0,0,0 " + i + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(n / 2 + r) + ")");
1891
+ return I(t, u), t.intersect = function(h) {
1892
+ const d = B.rect(t, h), b = d.x - t.x;
1893
+ if (c != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(d.y - t.y) > t.height / 2 - r)) {
1894
+ let w = r * r * (1 - b * b / (c * c));
1895
+ w != 0 && (w = Math.sqrt(w)), w = r - w, h.y - t.y > 0 && (w = -w), d.y += w;
1899
1896
  }
1900
- return p;
1897
+ return d;
1901
1898
  }, a;
1902
- }, "cylinder"), da = /* @__PURE__ */ u(async (e, t) => {
1903
- const { shapeSvg: a, bbox: s, halfPadding: i } = await P(
1899
+ }, "cylinder"), da = /* @__PURE__ */ g(async (e, t) => {
1900
+ const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
1904
1901
  e,
1905
1902
  t,
1906
1903
  "node " + t.classes + " " + t.class,
1907
1904
  !0
1908
- ), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, g = t.positioned ? -n / 2 : -s.height / 2 - i;
1909
- if (c.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", g).attr("width", r).attr("height", n), t.props) {
1905
+ ), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, u = t.positioned ? -n / 2 : -s.height / 2 - i;
1906
+ if (c.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", r).attr("height", n), t.props) {
1910
1907
  const h = new Set(Object.keys(t.props));
1911
- t.props.borders && (ut(c, t.props.borders, r, n), h.delete("borders")), h.forEach((p) => {
1912
- v.warn(`Unknown node property ${p}`);
1908
+ t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
1909
+ k.warn(`Unknown node property ${d}`);
1913
1910
  });
1914
1911
  }
1915
- return A(t, c), t.intersect = function(h) {
1916
- return R.rect(t, h);
1912
+ return I(t, c), t.intersect = function(h) {
1913
+ return B.rect(t, h);
1917
1914
  }, a;
1918
- }, "rect"), fa = /* @__PURE__ */ u(async (e, t) => {
1919
- const { shapeSvg: a, bbox: s, halfPadding: i } = await P(
1915
+ }, "rect"), fa = /* @__PURE__ */ g(async (e, t) => {
1916
+ const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
1920
1917
  e,
1921
1918
  t,
1922
1919
  "node " + t.classes,
1923
1920
  !0
1924
- ), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, g = t.positioned ? -n / 2 : -s.height / 2 - i;
1925
- if (c.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", g).attr("width", r).attr("height", n), t.props) {
1921
+ ), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, u = t.positioned ? -n / 2 : -s.height / 2 - i;
1922
+ if (c.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", r).attr("height", n), t.props) {
1926
1923
  const h = new Set(Object.keys(t.props));
1927
- t.props.borders && (ut(c, t.props.borders, r, n), h.delete("borders")), h.forEach((p) => {
1928
- v.warn(`Unknown node property ${p}`);
1924
+ t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
1925
+ k.warn(`Unknown node property ${d}`);
1929
1926
  });
1930
1927
  }
1931
- return A(t, c), t.intersect = function(h) {
1932
- return R.rect(t, h);
1928
+ return I(t, c), t.intersect = function(h) {
1929
+ return B.rect(t, h);
1933
1930
  }, a;
1934
- }, "composite"), pa = /* @__PURE__ */ u(async (e, t) => {
1935
- const { shapeSvg: a } = await P(e, t, "label", !0);
1936
- v.trace("Classes = ", t.class);
1931
+ }, "composite"), pa = /* @__PURE__ */ g(async (e, t) => {
1932
+ const { shapeSvg: a } = await A(e, t, "label", !0);
1933
+ k.trace("Classes = ", t.class);
1937
1934
  const s = a.insert("rect", ":first-child"), i = 0, c = 0;
1938
1935
  if (s.attr("width", i).attr("height", c), a.attr("class", "label edgeLabel"), t.props) {
1939
1936
  const r = new Set(Object.keys(t.props));
1940
- t.props.borders && (ut(s, t.props.borders, i, c), r.delete("borders")), r.forEach((n) => {
1941
- v.warn(`Unknown node property ${n}`);
1937
+ t.props.borders && (ot(s, t.props.borders, i, c), r.delete("borders")), r.forEach((n) => {
1938
+ k.warn(`Unknown node property ${n}`);
1942
1939
  });
1943
1940
  }
1944
- return A(t, s), t.intersect = function(r) {
1945
- return R.rect(t, r);
1941
+ return I(t, s), t.intersect = function(r) {
1942
+ return B.rect(t, r);
1946
1943
  }, a;
1947
1944
  }, "labelRect");
1948
- function ut(e, t, a, s) {
1949
- const i = [], c = /* @__PURE__ */ u((n) => {
1945
+ function ot(e, t, a, s) {
1946
+ const i = [], c = /* @__PURE__ */ g((n) => {
1950
1947
  i.push(n, 0);
1951
- }, "addBorder"), r = /* @__PURE__ */ u((n) => {
1948
+ }, "addBorder"), r = /* @__PURE__ */ g((n) => {
1952
1949
  i.push(0, n);
1953
1950
  }, "skipBorder");
1954
- t.includes("t") ? (v.debug("add top border"), c(a)) : r(a), t.includes("r") ? (v.debug("add right border"), c(s)) : r(s), t.includes("b") ? (v.debug("add bottom border"), c(a)) : r(a), t.includes("l") ? (v.debug("add left border"), c(s)) : r(s), e.attr("stroke-dasharray", i.join(" "));
1951
+ t.includes("t") ? (k.debug("add top border"), c(a)) : r(a), t.includes("r") ? (k.debug("add right border"), c(s)) : r(s), t.includes("b") ? (k.debug("add bottom border"), c(a)) : r(a), t.includes("l") ? (k.debug("add left border"), c(s)) : r(s), e.attr("stroke-dasharray", i.join(" "));
1955
1952
  }
1956
- u(ut, "applyNodePropertyBorders");
1957
- var ya = /* @__PURE__ */ u(async (e, t) => {
1953
+ g(ot, "applyNodePropertyBorders");
1954
+ var xa = /* @__PURE__ */ g(async (e, t) => {
1958
1955
  let a;
1959
1956
  t.classes ? a = "node " + t.classes : a = "node default";
1960
1957
  const s = e.insert("g").attr("class", a).attr("id", t.domId || t.id), i = s.insert("rect", ":first-child"), c = s.insert("line"), r = s.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
1961
1958
  let l = "";
1962
- typeof n == "object" ? l = n[0] : l = n, v.info("Label text abc79", l, n, typeof n == "object");
1963
- const g = await j(r, l, t.labelStyle, !0, !0);
1959
+ typeof n == "object" ? l = n[0] : l = n, k.info("Label text abc79", l, n, typeof n == "object");
1960
+ const u = await K(r, l, t.labelStyle, !0, !0);
1964
1961
  let h = { width: 0, height: 0 };
1965
- if (Y(M())) {
1966
- const _ = g.children[0], L = O(g);
1967
- h = _.getBoundingClientRect(), L.attr("width", h.width), L.attr("height", h.height);
1968
- }
1969
- v.info("Text 2", n);
1970
- const p = n.slice(1, n.length);
1971
- let m = g.getBBox();
1972
- const x = await j(
1962
+ if (M(R())) {
1963
+ const v = u.children[0], S = D(u);
1964
+ h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
1965
+ }
1966
+ k.info("Text 2", n);
1967
+ const d = n.slice(1, n.length);
1968
+ let b = u.getBBox();
1969
+ const w = await K(
1973
1970
  r,
1974
- p.join ? p.join("<br/>") : p,
1971
+ d.join ? d.join("<br/>") : d,
1975
1972
  t.labelStyle,
1976
1973
  !0,
1977
1974
  !0
1978
1975
  );
1979
- if (Y(M())) {
1980
- const _ = x.children[0], L = O(x);
1981
- h = _.getBoundingClientRect(), L.attr("width", h.width), L.attr("height", h.height);
1976
+ if (M(R())) {
1977
+ const v = w.children[0], S = D(w);
1978
+ h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
1982
1979
  }
1983
- const S = t.padding / 2;
1984
- return O(x).attr(
1980
+ const y = t.padding / 2;
1981
+ return D(w).attr(
1985
1982
  "transform",
1986
1983
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1987
- (h.width > m.width ? 0 : (m.width - h.width) / 2) + ", " + (m.height + S + 5) + ")"
1988
- ), O(g).attr(
1984
+ (h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + y + 5) + ")"
1985
+ ), D(u).attr(
1989
1986
  "transform",
1990
1987
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1991
- (h.width < m.width ? 0 : -(m.width - h.width) / 2) + ", 0)"
1988
+ (h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
1992
1989
  ), h = r.node().getBBox(), r.attr(
1993
1990
  "transform",
1994
- "translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
1995
- ), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), c.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + m.height + S).attr("y2", -h.height / 2 - S + m.height + S), A(t, i), t.intersect = function(_) {
1996
- return R.rect(t, _);
1991
+ "translate(" + -h.width / 2 + ", " + (-h.height / 2 - y + 3) + ")"
1992
+ ), i.attr("class", "outer title-state").attr("x", -h.width / 2 - y).attr("y", -h.height / 2 - y).attr("width", h.width + t.padding).attr("height", h.height + t.padding), c.attr("class", "divider").attr("x1", -h.width / 2 - y).attr("x2", h.width / 2 + y).attr("y1", -h.height / 2 - y + b.height + y).attr("y2", -h.height / 2 - y + b.height + y), I(t, i), t.intersect = function(v) {
1993
+ return B.rect(t, v);
1997
1994
  }, s;
1998
- }, "rectWithTitle"), xa = /* @__PURE__ */ u(async (e, t) => {
1999
- const { shapeSvg: a, bbox: s } = await P(
1995
+ }, "rectWithTitle"), ya = /* @__PURE__ */ g(async (e, t) => {
1996
+ const { shapeSvg: a, bbox: s } = await A(
2000
1997
  e,
2001
1998
  t,
2002
- X(t, void 0),
1999
+ Y(t, void 0),
2003
2000
  !0
2004
2001
  ), i = s.height + t.padding, c = s.width + i / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -c / 2).attr("y", -i / 2).attr("width", c).attr("height", i);
2005
- return A(t, r), t.intersect = function(n) {
2006
- return R.rect(t, n);
2002
+ return I(t, r), t.intersect = function(n) {
2003
+ return B.rect(t, n);
2007
2004
  }, a;
2008
- }, "stadium"), ba = /* @__PURE__ */ u(async (e, t) => {
2009
- const { shapeSvg: a, bbox: s, halfPadding: i } = await P(
2005
+ }, "stadium"), ba = /* @__PURE__ */ g(async (e, t) => {
2006
+ const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
2010
2007
  e,
2011
2008
  t,
2012
- X(t, void 0),
2009
+ Y(t, void 0),
2013
2010
  !0
2014
2011
  ), c = a.insert("circle", ":first-child");
2015
- return c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), v.info("Circle main"), A(t, c), t.intersect = function(r) {
2016
- return v.info("Circle intersect", t, s.width / 2 + i, r), R.circle(t, s.width / 2 + i, r);
2012
+ return c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), k.info("Circle main"), I(t, c), t.intersect = function(r) {
2013
+ return k.info("Circle intersect", t, s.width / 2 + i, r), B.circle(t, s.width / 2 + i, r);
2017
2014
  }, a;
2018
- }, "circle"), wa = /* @__PURE__ */ u(async (e, t) => {
2019
- const { shapeSvg: a, bbox: s, halfPadding: i } = await P(
2015
+ }, "circle"), wa = /* @__PURE__ */ g(async (e, t) => {
2016
+ const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
2020
2017
  e,
2021
2018
  t,
2022
- X(t, void 0),
2019
+ Y(t, void 0),
2023
2020
  !0
2024
2021
  ), c = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), l = r.insert("circle");
2025
- return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i + c).attr("width", s.width + t.padding + c * 2).attr("height", s.height + t.padding + c * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), v.info("DoubleCircle main"), A(t, n), t.intersect = function(g) {
2026
- return v.info("DoubleCircle intersect", t, s.width / 2 + i + c, g), R.circle(t, s.width / 2 + i + c, g);
2022
+ return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i + c).attr("width", s.width + t.padding + c * 2).attr("height", s.height + t.padding + c * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), k.info("DoubleCircle main"), I(t, n), t.intersect = function(u) {
2023
+ return k.info("DoubleCircle intersect", t, s.width / 2 + i + c, u), B.circle(t, s.width / 2 + i + c, u);
2027
2024
  }, a;
2028
- }, "doublecircle"), ma = /* @__PURE__ */ u(async (e, t) => {
2029
- const { shapeSvg: a, bbox: s } = await P(
2025
+ }, "doublecircle"), ma = /* @__PURE__ */ g(async (e, t) => {
2026
+ const { shapeSvg: a, bbox: s } = await A(
2030
2027
  e,
2031
2028
  t,
2032
- X(t, void 0),
2029
+ Y(t, void 0),
2033
2030
  !0
2034
2031
  ), i = s.width + t.padding, c = s.height + t.padding, r = [
2035
2032
  { x: 0, y: 0 },
@@ -2042,142 +2039,141 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
2042
2039
  { x: i + 8, y: -c },
2043
2040
  { x: -8, y: -c },
2044
2041
  { x: -8, y: 0 }
2045
- ], n = Z(a, i, c, r);
2046
- return n.attr("style", t.style), A(t, n), t.intersect = function(l) {
2047
- return R.polygon(t, r, l);
2042
+ ], n = X(a, i, c, r);
2043
+ return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
2044
+ return B.polygon(t, r, l);
2048
2045
  }, a;
2049
- }, "subroutine"), Sa = /* @__PURE__ */ u((e, t) => {
2046
+ }, "subroutine"), Sa = /* @__PURE__ */ g((e, t) => {
2050
2047
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child");
2051
- return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), A(t, s), t.intersect = function(i) {
2052
- return R.circle(t, 7, i);
2048
+ return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, s), t.intersect = function(i) {
2049
+ return B.circle(t, 7, i);
2053
2050
  }, a;
2054
- }, "start"), Ht = /* @__PURE__ */ u((e, t, a) => {
2051
+ }, "start"), Yt = /* @__PURE__ */ g((e, t, a) => {
2055
2052
  const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2056
2053
  let i = 70, c = 10;
2057
2054
  a === "LR" && (i = 10, c = 70);
2058
2055
  const r = s.append("rect").attr("x", -1 * i / 2).attr("y", -1 * c / 2).attr("width", i).attr("height", c).attr("class", "fork-join");
2059
- return A(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
2060
- return R.rect(t, n);
2056
+ return I(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
2057
+ return B.rect(t, n);
2061
2058
  }, s;
2062
- }, "forkJoin"), La = /* @__PURE__ */ u((e, t) => {
2059
+ }, "forkJoin"), La = /* @__PURE__ */ g((e, t) => {
2063
2060
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child"), i = a.insert("circle", ":first-child");
2064
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), s.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), A(t, i), t.intersect = function(c) {
2065
- return R.circle(t, 7, c);
2061
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), s.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), I(t, i), t.intersect = function(c) {
2062
+ return B.circle(t, 7, c);
2066
2063
  }, a;
2067
- }, "end"), va = /* @__PURE__ */ u(async (e, t) => {
2068
- var D;
2064
+ }, "end"), ka = /* @__PURE__ */ g(async (e, t) => {
2069
2065
  const a = t.padding / 2, s = 4, i = 8;
2070
2066
  let c;
2071
2067
  t.classes ? c = "node " + t.classes : c = "node default";
2072
- const r = e.insert("g").attr("class", c).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), l = r.insert("line"), g = r.insert("line");
2073
- let h = 0, p = s;
2074
- const m = r.insert("g").attr("class", "label");
2075
- let x = 0;
2076
- const S = (D = t.classData.annotations) == null ? void 0 : D[0], _ = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", L = await j(
2077
- m,
2078
- _,
2068
+ const r = e.insert("g").attr("class", c).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), l = r.insert("line"), u = r.insert("line");
2069
+ let h = 0, d = s;
2070
+ const b = r.insert("g").attr("class", "label");
2071
+ let w = 0;
2072
+ const y = t.classData.annotations?.[0], v = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", S = await K(
2073
+ b,
2074
+ v,
2079
2075
  t.labelStyle,
2080
2076
  !0,
2081
2077
  !0
2082
2078
  );
2083
- let C = L.getBBox();
2084
- if (Y(M())) {
2085
- const o = L.children[0], k = O(L);
2086
- C = o.getBoundingClientRect(), k.attr("width", C.width), k.attr("height", C.height);
2087
- }
2088
- t.classData.annotations[0] && (p += C.height + s, h += C.width);
2089
- let B = t.classData.label;
2090
- t.classData.type !== void 0 && t.classData.type !== "" && (Y(M()) ? B += "&lt;" + t.classData.type + "&gt;" : B += "<" + t.classData.type + ">");
2091
- const N = await j(
2092
- m,
2093
- B,
2079
+ let N = S.getBBox();
2080
+ if (M(R())) {
2081
+ const E = S.children[0], o = D(S);
2082
+ N = E.getBoundingClientRect(), o.attr("width", N.width), o.attr("height", N.height);
2083
+ }
2084
+ t.classData.annotations[0] && (d += N.height + s, h += N.width);
2085
+ let _ = t.classData.label;
2086
+ t.classData.type !== void 0 && t.classData.type !== "" && (M(R()) ? _ += "&lt;" + t.classData.type + "&gt;" : _ += "<" + t.classData.type + ">");
2087
+ const T = await K(
2088
+ b,
2089
+ _,
2094
2090
  t.labelStyle,
2095
2091
  !0,
2096
2092
  !0
2097
2093
  );
2098
- O(N).attr("class", "classTitle");
2099
- let b = N.getBBox();
2100
- if (Y(M())) {
2101
- const o = N.children[0], k = O(N);
2102
- b = o.getBoundingClientRect(), k.attr("width", b.width), k.attr("height", b.height);
2103
- }
2104
- p += b.height + s, b.width > h && (h = b.width);
2105
- const d = [];
2106
- t.classData.members.forEach(async (o) => {
2107
- const k = o.getDisplayDetails();
2108
- let f = k.displayText;
2109
- Y(M()) && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2110
- const E = await j(
2111
- m,
2112
- f,
2113
- k.cssStyle ? k.cssStyle : t.labelStyle,
2094
+ D(T).attr("class", "classTitle");
2095
+ let m = T.getBBox();
2096
+ if (M(R())) {
2097
+ const E = T.children[0], o = D(T);
2098
+ m = E.getBoundingClientRect(), o.attr("width", m.width), o.attr("height", m.height);
2099
+ }
2100
+ d += m.height + s, m.width > h && (h = m.width);
2101
+ const f = [];
2102
+ t.classData.members.forEach(async (E) => {
2103
+ const o = E.getDisplayDetails();
2104
+ let F = o.displayText;
2105
+ M(R()) && (F = F.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2106
+ const p = await K(
2107
+ b,
2108
+ F,
2109
+ o.cssStyle ? o.cssStyle : t.labelStyle,
2114
2110
  !0,
2115
2111
  !0
2116
2112
  );
2117
- let T = E.getBBox();
2118
- if (Y(M())) {
2119
- const z = E.children[0], F = O(E);
2120
- T = z.getBoundingClientRect(), F.attr("width", T.width), F.attr("height", T.height);
2113
+ let C = p.getBBox();
2114
+ if (M(R())) {
2115
+ const Z = p.children[0], V = D(p);
2116
+ C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
2121
2117
  }
2122
- T.width > h && (h = T.width), p += T.height + s, d.push(E);
2123
- }), p += i;
2124
- const y = [];
2125
- if (t.classData.methods.forEach(async (o) => {
2126
- const k = o.getDisplayDetails();
2127
- let f = k.displayText;
2128
- Y(M()) && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2129
- const E = await j(
2130
- m,
2131
- f,
2132
- k.cssStyle ? k.cssStyle : t.labelStyle,
2118
+ C.width > h && (h = C.width), d += C.height + s, f.push(p);
2119
+ }), d += i;
2120
+ const x = [];
2121
+ if (t.classData.methods.forEach(async (E) => {
2122
+ const o = E.getDisplayDetails();
2123
+ let F = o.displayText;
2124
+ M(R()) && (F = F.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2125
+ const p = await K(
2126
+ b,
2127
+ F,
2128
+ o.cssStyle ? o.cssStyle : t.labelStyle,
2133
2129
  !0,
2134
2130
  !0
2135
2131
  );
2136
- let T = E.getBBox();
2137
- if (Y(M())) {
2138
- const z = E.children[0], F = O(E);
2139
- T = z.getBoundingClientRect(), F.attr("width", T.width), F.attr("height", T.height);
2132
+ let C = p.getBBox();
2133
+ if (M(R())) {
2134
+ const Z = p.children[0], V = D(p);
2135
+ C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
2140
2136
  }
2141
- T.width > h && (h = T.width), p += T.height + s, y.push(E);
2142
- }), p += i, S) {
2143
- let o = (h - C.width) / 2;
2144
- O(L).attr(
2137
+ C.width > h && (h = C.width), d += C.height + s, x.push(p);
2138
+ }), d += i, y) {
2139
+ let E = (h - N.width) / 2;
2140
+ D(S).attr(
2145
2141
  "transform",
2146
- "translate( " + (-1 * h / 2 + o) + ", " + -1 * p / 2 + ")"
2147
- ), x = C.height + s;
2142
+ "translate( " + (-1 * h / 2 + E) + ", " + -1 * d / 2 + ")"
2143
+ ), w = N.height + s;
2148
2144
  }
2149
- let w = (h - b.width) / 2;
2150
- return O(N).attr(
2145
+ let L = (h - m.width) / 2;
2146
+ return D(T).attr(
2151
2147
  "transform",
2152
- "translate( " + (-1 * h / 2 + w) + ", " + (-1 * p / 2 + x) + ")"
2153
- ), x += b.height + s, l.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -p / 2 - a + i + x).attr("y2", -p / 2 - a + i + x), x += i, d.forEach((o) => {
2154
- O(o).attr(
2148
+ "translate( " + (-1 * h / 2 + L) + ", " + (-1 * d / 2 + w) + ")"
2149
+ ), w += m.height + s, l.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -d / 2 - a + i + w).attr("y2", -d / 2 - a + i + w), w += i, f.forEach((E) => {
2150
+ D(E).attr(
2155
2151
  "transform",
2156
- "translate( " + -h / 2 + ", " + (-1 * p / 2 + x + i / 2) + ")"
2152
+ "translate( " + -h / 2 + ", " + (-1 * d / 2 + w + i / 2) + ")"
2157
2153
  );
2158
- const k = o == null ? void 0 : o.getBBox();
2159
- x += ((k == null ? void 0 : k.height) ?? 0) + s;
2160
- }), x += i, g.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -p / 2 - a + i + x).attr("y2", -p / 2 - a + i + x), x += i, y.forEach((o) => {
2161
- O(o).attr(
2154
+ const o = E?.getBBox();
2155
+ w += (o?.height ?? 0) + s;
2156
+ }), w += i, u.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -d / 2 - a + i + w).attr("y2", -d / 2 - a + i + w), w += i, x.forEach((E) => {
2157
+ D(E).attr(
2162
2158
  "transform",
2163
- "translate( " + -h / 2 + ", " + (-1 * p / 2 + x) + ")"
2159
+ "translate( " + -h / 2 + ", " + (-1 * d / 2 + w) + ")"
2164
2160
  );
2165
- const k = o == null ? void 0 : o.getBBox();
2166
- x += ((k == null ? void 0 : k.height) ?? 0) + s;
2167
- }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(p / 2) - a).attr("width", h + t.padding).attr("height", p + t.padding), A(t, n), t.intersect = function(o) {
2168
- return R.rect(t, o);
2161
+ const o = E?.getBBox();
2162
+ w += (o?.height ?? 0) + s;
2163
+ }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(d / 2) - a).attr("width", h + t.padding).attr("height", d + t.padding), I(t, n), t.intersect = function(E) {
2164
+ return B.rect(t, E);
2169
2165
  }, r;
2170
- }, "class_box"), Kt = {
2171
- rhombus: Yt,
2166
+ }, "class_box"), Ht = {
2167
+ rhombus: Wt,
2172
2168
  composite: fa,
2173
- question: Yt,
2169
+ question: Wt,
2174
2170
  rect: da,
2175
2171
  labelRect: pa,
2176
- rectWithTitle: ya,
2172
+ rectWithTitle: xa,
2177
2173
  choice: aa,
2178
2174
  circle: ba,
2179
2175
  doublecircle: wa,
2180
- stadium: xa,
2176
+ stadium: ya,
2181
2177
  hexagon: sa,
2182
2178
  block_arrow: ia,
2183
2179
  rect_left_inv_arrow: na,
@@ -2191,20 +2187,20 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
2191
2187
  end: La,
2192
2188
  note: ra,
2193
2189
  subroutine: ma,
2194
- fork: Ht,
2195
- join: Ht,
2196
- class_box: va
2197
- }, ot = {}, ne = /* @__PURE__ */ u(async (e, t, a) => {
2190
+ fork: Yt,
2191
+ join: Yt,
2192
+ class_box: ka
2193
+ }, nt = {}, ie = /* @__PURE__ */ g(async (e, t, a) => {
2198
2194
  let s, i;
2199
2195
  if (t.link) {
2200
2196
  let c;
2201
- M().securityLevel === "sandbox" ? c = "_top" : t.linkTarget && (c = t.linkTarget || "_blank"), s = e.insert("svg:a").attr("xlink:href", t.link).attr("target", c), i = await Kt[t.shape](s, t, a);
2197
+ R().securityLevel === "sandbox" ? c = "_top" : t.linkTarget && (c = t.linkTarget || "_blank"), s = e.insert("svg:a").attr("xlink:href", t.link).attr("target", c), i = await Ht[t.shape](s, t, a);
2202
2198
  } else
2203
- i = await Kt[t.shape](e, t, a), s = i;
2204
- return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), ot[t.id] = s, t.haveCallback && ot[t.id].attr("class", ot[t.id].attr("class") + " clickable"), s;
2205
- }, "insertNode"), Ea = /* @__PURE__ */ u((e) => {
2206
- const t = ot[e.id];
2207
- v.trace(
2199
+ i = await Ht[t.shape](e, t, a), s = i;
2200
+ return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), nt[t.id] = s, t.haveCallback && nt[t.id].attr("class", nt[t.id].attr("class") + " clickable"), s;
2201
+ }, "insertNode"), va = /* @__PURE__ */ g((e) => {
2202
+ const t = nt[e.id];
2203
+ k.trace(
2208
2204
  "Transforming node",
2209
2205
  e.diff,
2210
2206
  e,
@@ -2216,11 +2212,10 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
2216
2212
  "translate(" + (e.x + s - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
2217
2213
  ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), s;
2218
2214
  }, "positionNode");
2219
- function It(e, t, a = !1) {
2220
- var x, S, _;
2215
+ function Bt(e, t, a = !1) {
2221
2216
  const s = e;
2222
2217
  let i = "default";
2223
- (((x = s == null ? void 0 : s.classes) == null ? void 0 : x.length) || 0) > 0 && (i = ((s == null ? void 0 : s.classes) ?? []).join(" ")), i = i + " flowchart-label";
2218
+ (s?.classes?.length || 0) > 0 && (i = (s?.classes ?? []).join(" ")), i = i + " flowchart-label";
2224
2219
  let c = 0, r = "", n;
2225
2220
  switch (s.type) {
2226
2221
  case "round":
@@ -2283,17 +2278,17 @@ function It(e, t, a = !1) {
2283
2278
  default:
2284
2279
  r = "rect";
2285
2280
  }
2286
- const l = je((s == null ? void 0 : s.styles) ?? []), g = s.label, h = s.size ?? { width: 0, height: 0, x: 0, y: 0 }, p = t.getDiagramId();
2281
+ const l = je(s?.styles ?? []), u = s.label, h = s.size ?? { width: 0, height: 0, x: 0, y: 0 }, d = t.getDiagramId();
2287
2282
  return {
2288
2283
  labelStyle: l.labelStyle,
2289
2284
  shape: r,
2290
- labelText: g,
2285
+ labelText: u,
2291
2286
  rx: c,
2292
2287
  ry: c,
2293
2288
  class: i,
2294
2289
  style: l.style,
2295
2290
  id: s.id,
2296
- domId: p ? `${p}-${s.id}` : s.id,
2291
+ domId: d ? `${d}-${s.id}` : s.id,
2297
2292
  directions: s.directions,
2298
2293
  width: h.width,
2299
2294
  height: h.height,
@@ -2302,41 +2297,41 @@ function It(e, t, a = !1) {
2302
2297
  positioned: a,
2303
2298
  intersect: void 0,
2304
2299
  type: s.type,
2305
- padding: n ?? ((_ = (S = nt()) == null ? void 0 : S.block) == null ? void 0 : _.padding) ?? 0,
2300
+ padding: n ?? rt()?.block?.padding ?? 0,
2306
2301
  widthInColumns: s.widthInColumns ?? 1
2307
2302
  };
2308
2303
  }
2309
- u(It, "getNodeFromBlock");
2310
- async function ce(e, t, a) {
2311
- const s = It(t, a, !1);
2304
+ g(Bt, "getNodeFromBlock");
2305
+ async function ne(e, t, a) {
2306
+ const s = Bt(t, a, !1);
2312
2307
  if (s.type === "group")
2313
2308
  return;
2314
- const i = nt(), c = await ne(e, s, { config: i }), r = c.node().getBBox(), n = a.getBlock(s.id);
2309
+ const i = rt(), c = await ie(e, s, { config: i }), r = c.node().getBBox(), n = a.getBlock(s.id);
2315
2310
  n.size = { width: r.width, height: r.height, x: 0, y: 0, node: c }, a.setBlock(n), c.remove();
2316
2311
  }
2317
- u(ce, "calculateBlockSize");
2318
- async function le(e, t, a) {
2319
- const s = It(t, a, !0);
2312
+ g(ne, "calculateBlockSize");
2313
+ async function ce(e, t, a) {
2314
+ const s = Bt(t, a, !0);
2320
2315
  if (a.getBlock(s.id).type !== "space") {
2321
- const c = nt();
2322
- await ne(e, s, { config: c }), t.intersect = s == null ? void 0 : s.intersect, Ea(s);
2316
+ const c = rt();
2317
+ await ie(e, s, { config: c }), t.intersect = s?.intersect, va(s);
2323
2318
  }
2324
2319
  }
2325
- u(le, "insertBlockPositioned");
2326
- async function dt(e, t, a, s) {
2320
+ g(ce, "insertBlockPositioned");
2321
+ async function ht(e, t, a, s) {
2327
2322
  for (const i of t)
2328
- await s(e, i, a), i.children && await dt(e, i.children, a, s);
2323
+ await s(e, i, a), i.children && await ht(e, i.children, a, s);
2329
2324
  }
2330
- u(dt, "performOperations");
2331
- async function oe(e, t, a) {
2332
- await dt(e, t, a, ce);
2325
+ g(ht, "performOperations");
2326
+ async function le(e, t, a) {
2327
+ await ht(e, t, a, ne);
2333
2328
  }
2334
- u(oe, "calculateBlockSizes");
2335
- async function he(e, t, a) {
2336
- await dt(e, t, a, le);
2329
+ g(le, "calculateBlockSizes");
2330
+ async function oe(e, t, a) {
2331
+ await ht(e, t, a, ce);
2337
2332
  }
2338
- u(he, "insertBlocks");
2339
- async function ge(e, t, a, s, i) {
2333
+ g(oe, "insertBlocks");
2334
+ async function he(e, t, a, s, i) {
2340
2335
  const c = new Ze({
2341
2336
  multigraph: !0,
2342
2337
  compound: !0
@@ -2357,22 +2352,22 @@ async function ge(e, t, a, s, i) {
2357
2352
  for (const r of t)
2358
2353
  if (r.start && r.end) {
2359
2354
  const n = s.getBlock(r.start), l = s.getBlock(r.end);
2360
- if (n != null && n.size && (l != null && l.size)) {
2361
- const g = n.size, h = l.size, p = [
2362
- { x: g.x, y: g.y },
2363
- { x: g.x + (h.x - g.x) / 2, y: g.y + (h.y - g.y) / 2 },
2355
+ if (n?.size && l?.size) {
2356
+ const u = n.size, h = l.size, d = [
2357
+ { x: u.x, y: u.y },
2358
+ { x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
2364
2359
  { x: h.x, y: h.y }
2365
- ], m = i ? `${i}-${r.id}` : r.id, x = r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal", S = r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid", _ = `${x} ${S} flowchart-link LS-a1 LE-b1`;
2360
+ ], b = i ? `${i}-${r.id}` : r.id, w = r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal", y = r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid", v = `${w} ${y} flowchart-link LS-a1 LE-b1`;
2366
2361
  Vr(
2367
2362
  e,
2368
- { v: r.start, w: r.end, name: m },
2363
+ { v: r.start, w: r.end, name: b },
2369
2364
  {
2370
2365
  ...r,
2371
- id: m,
2366
+ id: b,
2372
2367
  arrowTypeEnd: r.arrowTypeEnd,
2373
2368
  arrowTypeStart: r.arrowTypeStart,
2374
- points: p,
2375
- classes: _
2369
+ points: d,
2370
+ classes: v
2376
2371
  },
2377
2372
  void 0,
2378
2373
  "block",
@@ -2384,46 +2379,46 @@ async function ge(e, t, a, s, i) {
2384
2379
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2385
2380
  arrowTypeEnd: r.arrowTypeEnd,
2386
2381
  arrowTypeStart: r.arrowTypeStart,
2387
- points: p,
2388
- classes: _
2382
+ points: d,
2383
+ classes: v
2389
2384
  }), Kr(
2390
- { ...r, x: p[1].x, y: p[1].y },
2385
+ { ...r, x: d[1].x, y: d[1].y },
2391
2386
  {
2392
- originalPath: p
2387
+ originalPath: d
2393
2388
  }
2394
2389
  ));
2395
2390
  }
2396
2391
  }
2397
2392
  }
2398
- u(ge, "insertEdges");
2399
- var _a = /* @__PURE__ */ u(function(e, t) {
2393
+ g(he, "insertEdges");
2394
+ var Ea = /* @__PURE__ */ g(function(e, t) {
2400
2395
  return t.db.getClasses();
2401
- }, "getClasses"), ka = /* @__PURE__ */ u(async function(e, t, a, s) {
2402
- const { securityLevel: i, block: c } = nt(), r = s.db;
2396
+ }, "getClasses"), _a = /* @__PURE__ */ g(async function(e, t, a, s) {
2397
+ const { securityLevel: i, block: c } = rt(), r = s.db;
2403
2398
  r.setDiagramId(t);
2404
2399
  let n;
2405
- i === "sandbox" && (n = O("#i" + t));
2406
- const l = i === "sandbox" ? O(n.nodes()[0].contentDocument.body) : O("body"), g = i === "sandbox" ? l.select(`[id="${t}"]`) : O(`[id="${t}"]`);
2407
- Mr(g, ["point", "circle", "cross"], s.type, t);
2408
- const p = r.getBlocks(), m = r.getBlocksFlat(), x = r.getEdges(), S = g.insert("g").attr("class", "block");
2409
- await oe(S, p, r);
2410
- const _ = $t(r);
2411
- if (await he(S, p, r), await ge(S, x, m, r, t), _) {
2412
- const L = _, C = Math.max(1, Math.round(0.125 * (L.width / L.height))), B = L.height + C + 10, N = L.width + 10, { useMaxWidth: b } = c;
2413
- Pe(g, B, N, !!b), v.debug("Here Bounds", _, L), g.attr(
2400
+ i === "sandbox" && (n = D("#i" + t));
2401
+ const l = i === "sandbox" ? D(n.nodes()[0].contentDocument.body) : D("body"), u = i === "sandbox" ? l.select(`[id="${t}"]`) : D(`[id="${t}"]`);
2402
+ Mr(u, ["point", "circle", "cross"], s.type, t);
2403
+ const d = r.getBlocks(), b = r.getBlocksFlat(), w = r.getEdges(), y = u.insert("g").attr("class", "block");
2404
+ await le(y, d, r);
2405
+ const v = Qt(r);
2406
+ if (await oe(y, d, r), await he(y, w, b, r, t), v) {
2407
+ const S = v, N = Math.max(1, Math.round(0.125 * (S.width / S.height))), _ = S.height + N + 10, T = S.width + 10, { useMaxWidth: m } = c;
2408
+ Pe(u, _, T, !!m), k.debug("Here Bounds", v, S), u.attr(
2414
2409
  "viewBox",
2415
- `${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
2410
+ `${S.x - 5} ${S.y - 5} ${S.width + 10} ${S.height + 10}`
2416
2411
  );
2417
2412
  }
2418
2413
  }, "draw"), Ta = {
2419
- draw: ka,
2420
- getClasses: _a
2421
- }, Ba = {
2414
+ draw: _a,
2415
+ getClasses: Ea
2416
+ }, Ca = {
2422
2417
  parser: ar,
2423
- db: vr,
2418
+ db: kr,
2424
2419
  renderer: Ta,
2425
- styles: _r
2420
+ styles: Er
2426
2421
  };
2427
2422
  export {
2428
- Ba as diagram
2423
+ Ca as diagram
2429
2424
  };