@nxgt/material 1.12.3 → 1.16.0

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 (151) hide show
  1. package/README.md +5 -1
  2. package/dist/abnfDiagram-O67JEVCF-mm89LXw2.js +89 -0
  3. package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
  4. package/dist/architectureDiagram-NJMV4G6O-CGoA5SIv.js +4146 -0
  5. package/dist/array-CApNbSU9.js +6 -0
  6. package/dist/blockDiagram-BEXU5L5S-Dq8gitB4.js +1946 -0
  7. package/dist/c4Diagram-YGBWAQC7-DO_alqIu.js +2990 -0
  8. package/dist/channel-1fT-W0NS.js +5 -0
  9. package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
  10. package/dist/chunk-3FUC2YCW-C3yD2fMw.js +364 -0
  11. package/dist/chunk-5DYCD2WN-Dn2jrYde.js +37 -0
  12. package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
  13. package/dist/chunk-6AEJRKK7-JyfUnUEu.js +10 -0
  14. package/dist/chunk-742MDFTN-BbWkrtj2.js +275 -0
  15. package/dist/chunk-7INBJB4K-C3x7JNTG.js +4487 -0
  16. package/dist/chunk-7M6MHVWA-Cc7UTu4b.js +4256 -0
  17. package/dist/chunk-7PRAP22T-C8rsGRvH.js +67 -0
  18. package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
  19. package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
  20. package/dist/chunk-GNY47TPC-d-Bi8r0p.js +75 -0
  21. package/dist/chunk-GTNCS2PH-CTS015lZ.js +490 -0
  22. package/dist/chunk-GWA4HPMP-B4pgM-E1.js +61 -0
  23. package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
  24. package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
  25. package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
  26. package/dist/chunk-MBY4JIJT-Dg6AeftH.js +1847 -0
  27. package/dist/chunk-NETBCI7D-TXZM0vKz.js +236 -0
  28. package/dist/chunk-O7XYJQB3-md6vjVm4.js +3922 -0
  29. package/dist/chunk-UA2S7LBM-DQTYPe9y.js +363 -0
  30. package/dist/chunk-WEXAMYUT-DmKWJz6y.js +26 -0
  31. package/dist/chunk-XXDRQBXY-C9XIYQdM.js +9 -0
  32. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  33. package/dist/chunk-Z7XXMR3K-BoDf6lxl.js +677 -0
  34. package/dist/chunk-ZIGJFQKS-CP5430fN.js +663 -0
  35. package/dist/classDiagram-v2-NBCMYWYE-6KoTmufe.js +3397 -0
  36. package/dist/components.js +3 -3
  37. package/dist/cose-bilkent-JH36ORCC-CejnZl_t.js +2251 -0
  38. package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
  39. package/dist/cynefinDiagram-VND7K2PF-DZnc0dlm.js +349 -0
  40. package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
  41. package/dist/dagre-6A5THRUB-cuS57NO5.js +2192 -0
  42. package/dist/diagram-22UHCM2B-zQSFmH0t.js +5084 -0
  43. package/dist/diagram-3UASUU5V-D45Fgu1j.js +724 -0
  44. package/dist/diagram-ATOU4E4O-YMtQnlqd.js +432 -0
  45. package/dist/diagram-CDSNMT55-DP7UmEW1.js +301 -0
  46. package/dist/diagram-MLGK6HIB-WvSqrTRC.js +134 -0
  47. package/dist/diagram-MPIPVDR6-C2F3__mt.js +214 -0
  48. package/dist/dist-1DdJvBEt.js +50 -0
  49. package/dist/{dist-DGsPFADz.js → dist-DppLdkXt.js} +2 -2
  50. package/dist/dnd.js +2 -2
  51. package/dist/ebnfDiagram-ZINNZB2B-BZC6cSiy.js +100 -0
  52. package/dist/elk-276RUBZZ-7DJf1MEV.js +47598 -0
  53. package/dist/erDiagram-OPXOYQCR-YKlEVEF0.js +1970 -0
  54. package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
  55. package/dist/flowDiagram-KWPJA3E3-DyLvzIlg.js +17 -0
  56. package/dist/ganttDiagram-FUAMR5RP-KIaOrYOF.js +2928 -0
  57. package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
  58. package/dist/gitGraphDiagram-X574FWY7-DpFW-7JE.js +729 -0
  59. package/dist/graphlib-DFaO_iIU.js +372 -0
  60. package/dist/{hooks-BjSuqEof.js → hooks-C5xy0u03.js} +1 -1
  61. package/dist/hooks.js +1 -1
  62. package/dist/{i18n-DmVqVJXj.js → i18n-Cech9IAc.js} +328 -843
  63. package/dist/i18n.js +1 -1
  64. package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
  65. package/dist/infoDiagram-VRGFBTTK-H3F-BCnu.js +20 -0
  66. package/dist/init-Buj1GKRa.js +27 -0
  67. package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
  68. package/dist/ishikawaDiagram-OU5B5YK6-DgQDmcF3.js +719 -0
  69. package/dist/journeyDiagram-ZHPQQLJL-CanDOlfn.js +884 -0
  70. package/dist/kanban-definition-PNTS6WVX-DmnUgxgb.js +976 -0
  71. package/dist/katex-BMQ6LGsM.js +21962 -0
  72. package/dist/lib/components/index.d.ts +4 -0
  73. package/dist/lib/components/ui/action-card.d.ts +1 -1
  74. package/dist/lib/components/ui/chat/chat-composer-mentions.d.ts +8 -0
  75. package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
  76. package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
  77. package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
  78. package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
  79. package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
  80. package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
  81. package/dist/lib/components/ui/emoji/index.d.ts +4 -0
  82. package/dist/lib/components/ui/emoji/types.d.ts +6 -0
  83. package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
  84. package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
  85. package/dist/lib/components/ui/markdown/index.d.ts +3 -0
  86. package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
  87. package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
  88. package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
  89. package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
  90. package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
  91. package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
  92. package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
  93. package/dist/lib/components/ui/mentions/index.d.ts +3 -0
  94. package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
  95. package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
  96. package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
  97. package/dist/lib/components/ui/mentions/types.d.ts +7 -0
  98. package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
  99. package/dist/lib/components/ui/terminal/index.d.ts +2 -0
  100. package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
  101. package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
  102. package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
  103. package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
  104. package/dist/lib/i18n/resources/en/index.d.ts +13 -0
  105. package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
  106. package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
  107. package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
  108. package/dist/lib/i18n/resources/index.d.ts +26 -0
  109. package/dist/lib/i18n/translator.d.ts +1 -1
  110. package/dist/{lib-B1KXma-r.js → lib-Bbw5QPoj.js} +472 -471
  111. package/dist/lib.js +2 -2
  112. package/dist/{main-Cw-Yaqo9.js → main-BjDU9FDM.js} +58614 -29566
  113. package/dist/main.js +6 -6
  114. package/dist/material.css +1 -1
  115. package/dist/math-C5EhTgJw.js +10 -0
  116. package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
  117. package/dist/mermaid.core-BI1sunfX.js +1096 -0
  118. package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
  119. package/dist/ordinal-DuP05kVQ.js +65 -0
  120. package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
  121. package/dist/path-Cjou0lUh.js +85 -0
  122. package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
  123. package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
  124. package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
  125. package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
  126. package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
  127. package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
  128. package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
  129. package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
  130. package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
  131. package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
  132. package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
  133. package/dist/rough.esm-rcMoXTJj.js +1352 -0
  134. package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
  135. package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
  136. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  137. package/dist/src-B4npqWNl.js +1775 -0
  138. package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
  139. package/dist/step-B6KjpKgN.js +706 -0
  140. package/dist/string-B-ZWXCs2.js +392 -0
  141. package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
  142. package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
  143. package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
  144. package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
  145. package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
  146. package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
  147. package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
  148. package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
  149. package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
  150. package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
  151. package/package.json +7 -1
@@ -0,0 +1,1946 @@
1
+ import { t as e } from "./graphlib-DFaO_iIU.js";
2
+ import { n as t, t as n } from "./src-B4npqWNl.js";
3
+ import { A as r, B as i, C as a, D as o, E as s, F as c, G as l, H as u, I as d, L as f, M as p, N as m, O as h, P as g, R as _, T as v, U as ee, V as y, W as b, b as x, j as S, k as C, l as w, v as T, w as E, z as D } from "./chunk-ZIGJFQKS-CP5430fN.js";
4
+ import { n as O } from "./chunk-Y2CYZVJY-i11wjrBe.js";
5
+ import { a as k, at as A, b as j, c as te, s as ne, x as re } from "./chunk-O7XYJQB3-md6vjVm4.js";
6
+ import { t as ie } from "./channel-1fT-W0NS.js";
7
+ import "./chunk-742MDFTN-BbWkrtj2.js";
8
+ import "./chunk-MBY4JIJT-Dg6AeftH.js";
9
+ import { t as ae } from "./chunk-5VM5RSS4-Cr17nBXp.js";
10
+ import { t as oe } from "./chunk-DUW6YSOI-BdOla2G8.js";
11
+ import "./chunk-7PRAP22T-C8rsGRvH.js";
12
+ import { i as se, n as ce, o as le, r as ue, s as de } from "./chunk-J5ZVWO5B-CYzz6Pq8.js";
13
+ import "./chunk-7INBJB4K-C3x7JNTG.js";
14
+ import { i as fe, r as pe } from "./chunk-5DYCD2WN-Dn2jrYde.js";
15
+ import { a as me, c as he, i as ge, l as _e } from "./chunk-Z7XXMR3K-BoDf6lxl.js";
16
+ //#region node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
17
+ function ve(e) {
18
+ return Array.isArray(e);
19
+ }
20
+ //#endregion
21
+ //#region node_modules/es-toolkit/dist/compat/object/clone.mjs
22
+ function ye(e) {
23
+ if (x(e)) return e;
24
+ let t = l(e);
25
+ if (!be(e)) return {};
26
+ if (ve(e)) {
27
+ let t = Array.from(e);
28
+ return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
29
+ }
30
+ if (T(e)) {
31
+ let t = e, n = t.constructor;
32
+ return new n(t.buffer, t.byteOffset, t.length);
33
+ }
34
+ if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
35
+ if (t === "[object DataView]") {
36
+ let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
37
+ return new Uint8Array(a).set(o), new DataView(a);
38
+ }
39
+ if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
40
+ let n = e.constructor, r = new n(e.valueOf());
41
+ return t === "[object String]" ? Se(r, e) : M(r, e), r;
42
+ }
43
+ if (t === "[object Date]") return new Date(Number(e));
44
+ if (t === "[object RegExp]") {
45
+ let t = e, n = new RegExp(t.source, t.flags);
46
+ return n.lastIndex = t.lastIndex, n;
47
+ }
48
+ if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
49
+ if (t === "[object Map]") {
50
+ let t = e, n = /* @__PURE__ */ new Map();
51
+ return t.forEach((e, t) => {
52
+ n.set(t, e);
53
+ }), n;
54
+ }
55
+ if (t === "[object Set]") {
56
+ let t = e, n = /* @__PURE__ */ new Set();
57
+ return t.forEach((e) => {
58
+ n.add(e);
59
+ }), n;
60
+ }
61
+ if (t === "[object Arguments]") {
62
+ let t = e, n = {};
63
+ return M(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
64
+ }
65
+ let n = {};
66
+ return Ce(n, e), M(n, e), xe(n, e), n;
67
+ }
68
+ function be(e) {
69
+ switch (l(e)) {
70
+ case a:
71
+ case v:
72
+ case E:
73
+ case o:
74
+ case s:
75
+ case h:
76
+ case C:
77
+ case r:
78
+ case m:
79
+ case S:
80
+ case p:
81
+ case g:
82
+ case c:
83
+ case d:
84
+ case f:
85
+ case _:
86
+ case D:
87
+ case i:
88
+ case ee:
89
+ case b:
90
+ case y:
91
+ case u: return !0;
92
+ default: return !1;
93
+ }
94
+ }
95
+ function M(e, t) {
96
+ for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
97
+ }
98
+ function xe(e, t) {
99
+ let n = Object.getOwnPropertySymbols(t);
100
+ for (let r = 0; r < n.length; r++) {
101
+ let i = n[r];
102
+ Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
103
+ }
104
+ }
105
+ function Se(e, t) {
106
+ let n = t.valueOf().length;
107
+ for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
108
+ }
109
+ function Ce(e, t) {
110
+ let n = Object.getPrototypeOf(t);
111
+ n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
112
+ }
113
+ //#endregion
114
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-BEXU5L5S.mjs
115
+ var N = (function() {
116
+ var e = /* @__PURE__ */ O(function(e, t, n, r) {
117
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
118
+ return n;
119
+ }, "o"), t = [1, 15], n = [1, 7], r = [1, 13], i = [1, 14], a = [1, 19], o = [1, 16], s = [1, 17], c = [1, 18], l = [8, 30], u = [
120
+ 8,
121
+ 10,
122
+ 21,
123
+ 28,
124
+ 29,
125
+ 30,
126
+ 31,
127
+ 39,
128
+ 43,
129
+ 46
130
+ ], d = [1, 23], f = [1, 24], p = [
131
+ 8,
132
+ 10,
133
+ 15,
134
+ 16,
135
+ 21,
136
+ 28,
137
+ 29,
138
+ 30,
139
+ 31,
140
+ 39,
141
+ 43,
142
+ 46
143
+ ], m = [
144
+ 8,
145
+ 10,
146
+ 15,
147
+ 16,
148
+ 21,
149
+ 27,
150
+ 28,
151
+ 29,
152
+ 30,
153
+ 31,
154
+ 39,
155
+ 43,
156
+ 46
157
+ ], h = [1, 49], g = {
158
+ trace: /* @__PURE__ */ O(function() {}, "trace"),
159
+ yy: {},
160
+ symbols_: {
161
+ error: 2,
162
+ spaceLines: 3,
163
+ SPACELINE: 4,
164
+ NL: 5,
165
+ separator: 6,
166
+ SPACE: 7,
167
+ EOF: 8,
168
+ start: 9,
169
+ BLOCK_DIAGRAM_KEY: 10,
170
+ document: 11,
171
+ stop: 12,
172
+ statement: 13,
173
+ link: 14,
174
+ LINK: 15,
175
+ START_LINK: 16,
176
+ LINK_LABEL: 17,
177
+ STR: 18,
178
+ nodeStatement: 19,
179
+ columnsStatement: 20,
180
+ SPACE_BLOCK: 21,
181
+ blockStatement: 22,
182
+ classDefStatement: 23,
183
+ cssClassStatement: 24,
184
+ styleStatement: 25,
185
+ node: 26,
186
+ SIZE: 27,
187
+ COLUMNS: 28,
188
+ "id-block": 29,
189
+ end: 30,
190
+ NODE_ID: 31,
191
+ nodeShapeNLabel: 32,
192
+ dirList: 33,
193
+ DIR: 34,
194
+ NODE_DSTART: 35,
195
+ NODE_DEND: 36,
196
+ BLOCK_ARROW_START: 37,
197
+ BLOCK_ARROW_END: 38,
198
+ classDef: 39,
199
+ CLASSDEF_ID: 40,
200
+ CLASSDEF_STYLEOPTS: 41,
201
+ DEFAULT: 42,
202
+ class: 43,
203
+ CLASSENTITY_IDS: 44,
204
+ STYLECLASS: 45,
205
+ style: 46,
206
+ STYLE_ENTITY_IDS: 47,
207
+ STYLE_DEFINITION_DATA: 48,
208
+ $accept: 0,
209
+ $end: 1
210
+ },
211
+ terminals_: {
212
+ 2: "error",
213
+ 4: "SPACELINE",
214
+ 5: "NL",
215
+ 7: "SPACE",
216
+ 8: "EOF",
217
+ 10: "BLOCK_DIAGRAM_KEY",
218
+ 15: "LINK",
219
+ 16: "START_LINK",
220
+ 17: "LINK_LABEL",
221
+ 18: "STR",
222
+ 21: "SPACE_BLOCK",
223
+ 27: "SIZE",
224
+ 28: "COLUMNS",
225
+ 29: "id-block",
226
+ 30: "end",
227
+ 31: "NODE_ID",
228
+ 34: "DIR",
229
+ 35: "NODE_DSTART",
230
+ 36: "NODE_DEND",
231
+ 37: "BLOCK_ARROW_START",
232
+ 38: "BLOCK_ARROW_END",
233
+ 39: "classDef",
234
+ 40: "CLASSDEF_ID",
235
+ 41: "CLASSDEF_STYLEOPTS",
236
+ 42: "DEFAULT",
237
+ 43: "class",
238
+ 44: "CLASSENTITY_IDS",
239
+ 45: "STYLECLASS",
240
+ 46: "style",
241
+ 47: "STYLE_ENTITY_IDS",
242
+ 48: "STYLE_DEFINITION_DATA"
243
+ },
244
+ productions_: [
245
+ 0,
246
+ [3, 1],
247
+ [3, 2],
248
+ [3, 2],
249
+ [6, 1],
250
+ [6, 1],
251
+ [6, 1],
252
+ [9, 3],
253
+ [12, 1],
254
+ [12, 1],
255
+ [12, 2],
256
+ [12, 2],
257
+ [11, 1],
258
+ [11, 2],
259
+ [14, 1],
260
+ [14, 4],
261
+ [13, 1],
262
+ [13, 1],
263
+ [13, 1],
264
+ [13, 1],
265
+ [13, 1],
266
+ [13, 1],
267
+ [13, 1],
268
+ [19, 3],
269
+ [19, 2],
270
+ [19, 1],
271
+ [20, 1],
272
+ [22, 4],
273
+ [22, 3],
274
+ [26, 1],
275
+ [26, 2],
276
+ [33, 1],
277
+ [33, 2],
278
+ [32, 3],
279
+ [32, 4],
280
+ [23, 3],
281
+ [23, 3],
282
+ [24, 3],
283
+ [25, 3]
284
+ ],
285
+ performAction: /* @__PURE__ */ O(function(e, t, n, r, i, a, o) {
286
+ var s = a.length - 1;
287
+ switch (i) {
288
+ case 4:
289
+ r.getLogger().debug("Rule: separator (NL) ");
290
+ break;
291
+ case 5:
292
+ r.getLogger().debug("Rule: separator (Space) ");
293
+ break;
294
+ case 6:
295
+ r.getLogger().debug("Rule: separator (EOF) ");
296
+ break;
297
+ case 7:
298
+ r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
299
+ break;
300
+ case 8:
301
+ r.getLogger().debug("Stop NL ");
302
+ break;
303
+ case 9:
304
+ r.getLogger().debug("Stop EOF ");
305
+ break;
306
+ case 10:
307
+ r.getLogger().debug("Stop NL2 ");
308
+ break;
309
+ case 11:
310
+ r.getLogger().debug("Stop EOF2 ");
311
+ break;
312
+ case 12:
313
+ r.getLogger().debug("Rule: statement: ", a[s]), typeof a[s].length == "number" ? this.$ = a[s] : this.$ = [a[s]];
314
+ break;
315
+ case 13:
316
+ r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
317
+ break;
318
+ case 14:
319
+ r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
320
+ edgeTypeStr: a[s],
321
+ label: ""
322
+ };
323
+ break;
324
+ case 15:
325
+ r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
326
+ edgeTypeStr: a[s],
327
+ label: a[s - 1]
328
+ };
329
+ break;
330
+ case 18:
331
+ let t = parseInt(a[s]), n = r.generateId();
332
+ this.$ = {
333
+ id: n,
334
+ type: "space",
335
+ label: "",
336
+ width: t,
337
+ children: []
338
+ };
339
+ break;
340
+ case 23:
341
+ r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
342
+ let i = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr), o = r.edgeStrToEdgeStartData(a[s - 1].edgeTypeStr), c = r.edgeStrToThickness(a[s - 1].edgeTypeStr), l = r.edgeStrToPattern(a[s - 1].edgeTypeStr);
343
+ this.$ = [
344
+ {
345
+ id: a[s - 2].id,
346
+ label: a[s - 2].label,
347
+ type: a[s - 2].type,
348
+ directions: a[s - 2].directions
349
+ },
350
+ {
351
+ id: a[s - 2].id + "-" + a[s].id,
352
+ start: a[s - 2].id,
353
+ end: a[s].id,
354
+ label: a[s - 1].label,
355
+ type: "edge",
356
+ thickness: c,
357
+ pattern: l,
358
+ directions: a[s].directions,
359
+ arrowTypeEnd: i,
360
+ arrowTypeStart: o
361
+ },
362
+ {
363
+ id: a[s].id,
364
+ label: a[s].label,
365
+ type: r.typeStr2Type(a[s].typeStr),
366
+ directions: a[s].directions
367
+ }
368
+ ];
369
+ break;
370
+ case 24:
371
+ r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
372
+ id: a[s - 1].id,
373
+ label: a[s - 1].label,
374
+ type: r.typeStr2Type(a[s - 1].typeStr),
375
+ directions: a[s - 1].directions,
376
+ widthInColumns: parseInt(a[s], 10)
377
+ };
378
+ break;
379
+ case 25:
380
+ r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
381
+ id: a[s].id,
382
+ label: a[s].label,
383
+ type: r.typeStr2Type(a[s].typeStr),
384
+ directions: a[s].directions,
385
+ widthInColumns: 1
386
+ };
387
+ break;
388
+ case 26:
389
+ r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
390
+ type: "column-setting",
391
+ columns: a[s] === "auto" ? -1 : parseInt(a[s])
392
+ };
393
+ break;
394
+ case 27:
395
+ r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
396
+ ...a[s - 2],
397
+ type: "composite",
398
+ children: a[s - 1]
399
+ };
400
+ break;
401
+ case 28:
402
+ r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]);
403
+ let u = r.generateId();
404
+ this.$ = {
405
+ id: u,
406
+ type: "composite",
407
+ label: "",
408
+ children: a[s - 1]
409
+ };
410
+ break;
411
+ case 29:
412
+ r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
413
+ break;
414
+ case 30:
415
+ r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
416
+ id: a[s - 1],
417
+ label: a[s].label,
418
+ typeStr: a[s].typeStr,
419
+ directions: a[s].directions
420
+ };
421
+ break;
422
+ case 31:
423
+ r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
424
+ break;
425
+ case 32:
426
+ r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
427
+ break;
428
+ case 33:
429
+ r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
430
+ typeStr: a[s - 2] + a[s],
431
+ label: a[s - 1]
432
+ };
433
+ break;
434
+ case 34:
435
+ r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
436
+ typeStr: a[s - 3] + a[s],
437
+ label: a[s - 2],
438
+ directions: a[s - 1]
439
+ };
440
+ break;
441
+ case 35:
442
+ case 36:
443
+ this.$ = {
444
+ type: "classDef",
445
+ id: a[s - 1].trim(),
446
+ css: a[s].trim()
447
+ };
448
+ break;
449
+ case 37:
450
+ this.$ = {
451
+ type: "applyClass",
452
+ id: a[s - 1].trim(),
453
+ styleClass: a[s].trim()
454
+ };
455
+ break;
456
+ case 38:
457
+ this.$ = {
458
+ type: "applyStyles",
459
+ id: a[s - 1].trim(),
460
+ stylesStr: a[s].trim()
461
+ };
462
+ break;
463
+ }
464
+ }, "anonymous"),
465
+ table: [
466
+ {
467
+ 9: 1,
468
+ 10: [1, 2]
469
+ },
470
+ { 1: [3] },
471
+ {
472
+ 10: t,
473
+ 11: 3,
474
+ 13: 4,
475
+ 19: 5,
476
+ 20: 6,
477
+ 21: n,
478
+ 22: 8,
479
+ 23: 9,
480
+ 24: 10,
481
+ 25: 11,
482
+ 26: 12,
483
+ 28: r,
484
+ 29: i,
485
+ 31: a,
486
+ 39: o,
487
+ 43: s,
488
+ 46: c
489
+ },
490
+ { 8: [1, 20] },
491
+ e(l, [2, 12], {
492
+ 13: 4,
493
+ 19: 5,
494
+ 20: 6,
495
+ 22: 8,
496
+ 23: 9,
497
+ 24: 10,
498
+ 25: 11,
499
+ 26: 12,
500
+ 11: 21,
501
+ 10: t,
502
+ 21: n,
503
+ 28: r,
504
+ 29: i,
505
+ 31: a,
506
+ 39: o,
507
+ 43: s,
508
+ 46: c
509
+ }),
510
+ e(u, [2, 16], {
511
+ 14: 22,
512
+ 15: d,
513
+ 16: f
514
+ }),
515
+ e(u, [2, 17]),
516
+ e(u, [2, 18]),
517
+ e(u, [2, 19]),
518
+ e(u, [2, 20]),
519
+ e(u, [2, 21]),
520
+ e(u, [2, 22]),
521
+ e(p, [2, 25], { 27: [1, 25] }),
522
+ e(u, [2, 26]),
523
+ {
524
+ 19: 26,
525
+ 26: 12,
526
+ 31: a
527
+ },
528
+ {
529
+ 10: t,
530
+ 11: 27,
531
+ 13: 4,
532
+ 19: 5,
533
+ 20: 6,
534
+ 21: n,
535
+ 22: 8,
536
+ 23: 9,
537
+ 24: 10,
538
+ 25: 11,
539
+ 26: 12,
540
+ 28: r,
541
+ 29: i,
542
+ 31: a,
543
+ 39: o,
544
+ 43: s,
545
+ 46: c
546
+ },
547
+ {
548
+ 40: [1, 28],
549
+ 42: [1, 29]
550
+ },
551
+ { 44: [1, 30] },
552
+ { 47: [1, 31] },
553
+ e(m, [2, 29], {
554
+ 32: 32,
555
+ 35: [1, 33],
556
+ 37: [1, 34]
557
+ }),
558
+ { 1: [2, 7] },
559
+ e(l, [2, 13]),
560
+ {
561
+ 26: 35,
562
+ 31: a
563
+ },
564
+ { 31: [2, 14] },
565
+ { 17: [1, 36] },
566
+ e(p, [2, 24]),
567
+ {
568
+ 10: t,
569
+ 11: 37,
570
+ 13: 4,
571
+ 14: 22,
572
+ 15: d,
573
+ 16: f,
574
+ 19: 5,
575
+ 20: 6,
576
+ 21: n,
577
+ 22: 8,
578
+ 23: 9,
579
+ 24: 10,
580
+ 25: 11,
581
+ 26: 12,
582
+ 28: r,
583
+ 29: i,
584
+ 31: a,
585
+ 39: o,
586
+ 43: s,
587
+ 46: c
588
+ },
589
+ { 30: [1, 38] },
590
+ { 41: [1, 39] },
591
+ { 41: [1, 40] },
592
+ { 45: [1, 41] },
593
+ { 48: [1, 42] },
594
+ e(m, [2, 30]),
595
+ { 18: [1, 43] },
596
+ { 18: [1, 44] },
597
+ e(p, [2, 23]),
598
+ { 18: [1, 45] },
599
+ { 30: [1, 46] },
600
+ e(u, [2, 28]),
601
+ e(u, [2, 35]),
602
+ e(u, [2, 36]),
603
+ e(u, [2, 37]),
604
+ e(u, [2, 38]),
605
+ { 36: [1, 47] },
606
+ {
607
+ 33: 48,
608
+ 34: h
609
+ },
610
+ { 15: [1, 50] },
611
+ e(u, [2, 27]),
612
+ e(m, [2, 33]),
613
+ { 38: [1, 51] },
614
+ {
615
+ 33: 52,
616
+ 34: h,
617
+ 38: [2, 31]
618
+ },
619
+ { 31: [2, 15] },
620
+ e(m, [2, 34]),
621
+ { 38: [2, 32] }
622
+ ],
623
+ defaultActions: {
624
+ 20: [2, 7],
625
+ 23: [2, 14],
626
+ 50: [2, 15],
627
+ 52: [2, 32]
628
+ },
629
+ parseError: /* @__PURE__ */ O(function(e, t) {
630
+ if (t.recoverable) this.trace(e);
631
+ else {
632
+ var n = Error(e);
633
+ throw n.hash = t, n;
634
+ }
635
+ }, "parseError"),
636
+ parse: /* @__PURE__ */ O(function(e) {
637
+ var t = this, n = [0], r = [], i = [null], a = [], o = this.table, s = "", c = 0, l = 0, u = 0, d = 2, f = 1, p = a.slice.call(arguments, 1), m = Object.create(this.lexer), h = { yy: {} };
638
+ for (var g in this.yy) Object.prototype.hasOwnProperty.call(this.yy, g) && (h.yy[g] = this.yy[g]);
639
+ m.setInput(e, h.yy), h.yy.lexer = m, h.yy.parser = this, m.yylloc === void 0 && (m.yylloc = {});
640
+ var _ = m.yylloc;
641
+ a.push(_);
642
+ var v = m.options && m.options.ranges;
643
+ typeof h.yy.parseError == "function" ? this.parseError = h.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
644
+ function ee(e) {
645
+ n.length -= 2 * e, i.length -= e, a.length -= e;
646
+ }
647
+ O(ee, "popStack");
648
+ function y() {
649
+ var e = r.pop() || m.lex() || f;
650
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
651
+ }
652
+ O(y, "lex");
653
+ for (var b, x, S, C, w, T = {}, E, D, k, A;;) {
654
+ if (S = n[n.length - 1], this.defaultActions[S] ? C = this.defaultActions[S] : (b ??= y(), C = o[S] && o[S][b]), C === void 0 || !C.length || !C[0]) {
655
+ var j = "";
656
+ for (E in A = [], o[S]) this.terminals_[E] && E > d && A.push("'" + this.terminals_[E] + "'");
657
+ j = m.showPosition ? "Parse error on line " + (c + 1) + ":\n" + m.showPosition() + "\nExpecting " + A.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : "Parse error on line " + (c + 1) + ": Unexpected " + (b == f ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(j, {
658
+ text: m.match,
659
+ token: this.terminals_[b] || b,
660
+ line: m.yylineno,
661
+ loc: _,
662
+ expected: A
663
+ });
664
+ }
665
+ if (C[0] instanceof Array && C.length > 1) throw Error("Parse Error: multiple actions possible at state: " + S + ", token: " + b);
666
+ switch (C[0]) {
667
+ case 1:
668
+ n.push(b), i.push(m.yytext), a.push(m.yylloc), n.push(C[1]), b = null, x ? (b = x, x = null) : (l = m.yyleng, s = m.yytext, c = m.yylineno, _ = m.yylloc, u > 0 && u--);
669
+ break;
670
+ case 2:
671
+ if (D = this.productions_[C[1]][1], T.$ = i[i.length - D], T._$ = {
672
+ first_line: a[a.length - (D || 1)].first_line,
673
+ last_line: a[a.length - 1].last_line,
674
+ first_column: a[a.length - (D || 1)].first_column,
675
+ last_column: a[a.length - 1].last_column
676
+ }, v && (T._$.range = [a[a.length - (D || 1)].range[0], a[a.length - 1].range[1]]), w = this.performAction.apply(T, [
677
+ s,
678
+ l,
679
+ c,
680
+ h.yy,
681
+ C[1],
682
+ i,
683
+ a
684
+ ].concat(p)), w !== void 0) return w;
685
+ D && (n = n.slice(0, -1 * D * 2), i = i.slice(0, -1 * D), a = a.slice(0, -1 * D)), n.push(this.productions_[C[1]][0]), i.push(T.$), a.push(T._$), k = o[n[n.length - 2]][n[n.length - 1]], n.push(k);
686
+ break;
687
+ case 3: return !0;
688
+ }
689
+ }
690
+ return !0;
691
+ }, "parse")
692
+ };
693
+ g.lexer = /* @__PURE__ */ (function() {
694
+ return {
695
+ EOF: 1,
696
+ parseError: /* @__PURE__ */ O(function(e, t) {
697
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
698
+ else throw Error(e);
699
+ }, "parseError"),
700
+ setInput: /* @__PURE__ */ O(function(e, t) {
701
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
702
+ first_line: 1,
703
+ first_column: 0,
704
+ last_line: 1,
705
+ last_column: 0
706
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
707
+ }, "setInput"),
708
+ input: /* @__PURE__ */ O(function() {
709
+ var e = this._input[0];
710
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
711
+ }, "input"),
712
+ unput: /* @__PURE__ */ O(function(e) {
713
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
714
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
715
+ var r = this.match.split(/(?:\r\n?|\n)/g);
716
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
717
+ var i = this.yylloc.range;
718
+ return this.yylloc = {
719
+ first_line: this.yylloc.first_line,
720
+ last_line: this.yylineno + 1,
721
+ first_column: this.yylloc.first_column,
722
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
723
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
724
+ }, "unput"),
725
+ more: /* @__PURE__ */ O(function() {
726
+ return this._more = !0, this;
727
+ }, "more"),
728
+ reject: /* @__PURE__ */ O(function() {
729
+ if (this.options.backtrack_lexer) this._backtrack = !0;
730
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
731
+ text: "",
732
+ token: null,
733
+ line: this.yylineno
734
+ });
735
+ return this;
736
+ }, "reject"),
737
+ less: /* @__PURE__ */ O(function(e) {
738
+ this.unput(this.match.slice(e));
739
+ }, "less"),
740
+ pastInput: /* @__PURE__ */ O(function() {
741
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
742
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
743
+ }, "pastInput"),
744
+ upcomingInput: /* @__PURE__ */ O(function() {
745
+ var e = this.match;
746
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
747
+ }, "upcomingInput"),
748
+ showPosition: /* @__PURE__ */ O(function() {
749
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
750
+ return e + this.upcomingInput() + "\n" + t + "^";
751
+ }, "showPosition"),
752
+ test_match: /* @__PURE__ */ O(function(e, t) {
753
+ var n, r, i;
754
+ if (this.options.backtrack_lexer && (i = {
755
+ yylineno: this.yylineno,
756
+ yylloc: {
757
+ first_line: this.yylloc.first_line,
758
+ last_line: this.last_line,
759
+ first_column: this.yylloc.first_column,
760
+ last_column: this.yylloc.last_column
761
+ },
762
+ yytext: this.yytext,
763
+ match: this.match,
764
+ matches: this.matches,
765
+ matched: this.matched,
766
+ yyleng: this.yyleng,
767
+ offset: this.offset,
768
+ _more: this._more,
769
+ _input: this._input,
770
+ yy: this.yy,
771
+ conditionStack: this.conditionStack.slice(0),
772
+ done: this.done
773
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
774
+ first_line: this.yylloc.last_line,
775
+ last_line: this.yylineno + 1,
776
+ first_column: this.yylloc.last_column,
777
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
778
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
779
+ if (this._backtrack) {
780
+ for (var a in i) this[a] = i[a];
781
+ return !1;
782
+ }
783
+ return !1;
784
+ }, "test_match"),
785
+ next: /* @__PURE__ */ O(function() {
786
+ if (this.done) return this.EOF;
787
+ this._input || (this.done = !0);
788
+ var e, t, n, r;
789
+ this._more || (this.yytext = "", this.match = "");
790
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
791
+ if (t = n, r = a, this.options.backtrack_lexer) {
792
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
793
+ if (this._backtrack) {
794
+ t = !1;
795
+ continue;
796
+ } else return !1;
797
+ } else if (!this.options.flex) break;
798
+ }
799
+ return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
800
+ text: "",
801
+ token: null,
802
+ line: this.yylineno
803
+ });
804
+ }, "next"),
805
+ lex: /* @__PURE__ */ O(function() {
806
+ return this.next() || this.lex();
807
+ }, "lex"),
808
+ begin: /* @__PURE__ */ O(function(e) {
809
+ this.conditionStack.push(e);
810
+ }, "begin"),
811
+ popState: /* @__PURE__ */ O(function() {
812
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
813
+ }, "popState"),
814
+ _currentRules: /* @__PURE__ */ O(function() {
815
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
816
+ }, "_currentRules"),
817
+ topState: /* @__PURE__ */ O(function(e) {
818
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
819
+ }, "topState"),
820
+ pushState: /* @__PURE__ */ O(function(e) {
821
+ this.begin(e);
822
+ }, "pushState"),
823
+ stateStackSize: /* @__PURE__ */ O(function() {
824
+ return this.conditionStack.length;
825
+ }, "stateStackSize"),
826
+ options: {},
827
+ performAction: /* @__PURE__ */ O(function(e, t, n, r) {
828
+ switch (n) {
829
+ case 0: return e.getLogger().debug("Found block-beta"), 10;
830
+ case 1: return e.getLogger().debug("Found id-block"), 29;
831
+ case 2: return e.getLogger().debug("Found block"), 10;
832
+ case 3:
833
+ e.getLogger().debug(".", t.yytext);
834
+ break;
835
+ case 4:
836
+ e.getLogger().debug("_", t.yytext);
837
+ break;
838
+ case 5: return 5;
839
+ case 6: return t.yytext = -1, 28;
840
+ case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
841
+ case 8:
842
+ this.pushState("md_string");
843
+ break;
844
+ case 9: return "MD_STR";
845
+ case 10:
846
+ this.popState();
847
+ break;
848
+ case 11:
849
+ this.pushState("string");
850
+ break;
851
+ case 12:
852
+ e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
853
+ break;
854
+ case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
855
+ case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
856
+ case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
857
+ case 16: return 42;
858
+ case 17: return "LINKSTYLE";
859
+ case 18: return "INTERPOLATE";
860
+ case 19: return this.pushState("CLASSDEF"), 39;
861
+ case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
862
+ case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
863
+ case 22: return this.popState(), 41;
864
+ case 23: return this.pushState("CLASS"), 43;
865
+ case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
866
+ case 25: return this.popState(), 45;
867
+ case 26: return this.pushState("STYLE_STMNT"), 46;
868
+ case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
869
+ case 28: return this.popState(), 48;
870
+ case 29: return this.pushState("acc_title"), "acc_title";
871
+ case 30: return this.popState(), "acc_title_value";
872
+ case 31: return this.pushState("acc_descr"), "acc_descr";
873
+ case 32: return this.popState(), "acc_descr_value";
874
+ case 33:
875
+ this.pushState("acc_descr_multiline");
876
+ break;
877
+ case 34:
878
+ this.popState();
879
+ break;
880
+ case 35: return "acc_descr_multiline_value";
881
+ case 36: return 30;
882
+ case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
883
+ case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
884
+ case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
885
+ case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
886
+ case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
887
+ case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
888
+ case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
889
+ case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
890
+ case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
891
+ case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
892
+ case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
893
+ case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
894
+ case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
895
+ case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
896
+ case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
897
+ case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
898
+ case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
899
+ case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
900
+ case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
901
+ case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
902
+ case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
903
+ case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
904
+ case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
905
+ case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
906
+ case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
907
+ case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
908
+ case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
909
+ case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
910
+ case 65: return this.pushState("NODE"), 35;
911
+ case 66: return this.pushState("NODE"), 35;
912
+ case 67: return this.pushState("NODE"), 35;
913
+ case 68: return this.pushState("NODE"), 35;
914
+ case 69: return this.pushState("NODE"), 35;
915
+ case 70: return this.pushState("NODE"), 35;
916
+ case 71: return this.pushState("NODE"), 35;
917
+ case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
918
+ case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
919
+ case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
920
+ case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
921
+ case 76:
922
+ this.pushState("md_string");
923
+ break;
924
+ case 77:
925
+ this.pushState("md_string");
926
+ break;
927
+ case 78: return "NODE_DESCR";
928
+ case 79:
929
+ this.popState();
930
+ break;
931
+ case 80:
932
+ e.getLogger().debug("Lex: Starting string"), this.pushState("string");
933
+ break;
934
+ case 81:
935
+ e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
936
+ break;
937
+ case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
938
+ case 83:
939
+ e.getLogger().debug("LEX POPPING"), this.popState();
940
+ break;
941
+ case 84:
942
+ e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
943
+ break;
944
+ case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
945
+ case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
946
+ case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
947
+ case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
948
+ case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
949
+ case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
950
+ case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
951
+ case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
952
+ case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
953
+ case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
954
+ case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
955
+ case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
956
+ case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
957
+ case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
958
+ case 99:
959
+ this.pushState("md_string");
960
+ break;
961
+ case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
962
+ case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
963
+ case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
964
+ case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
965
+ case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
966
+ }
967
+ }, "anonymous"),
968
+ rules: [
969
+ /^(?:block-beta\b)/,
970
+ /^(?:block:)/,
971
+ /^(?:block\b)/,
972
+ /^(?:[\s]+)/,
973
+ /^(?:[\n]+)/,
974
+ /^(?:((\u000D\u000A)|(\u000A)))/,
975
+ /^(?:columns\s+auto\b)/,
976
+ /^(?:columns\s+[\d]+)/,
977
+ /^(?:["][`])/,
978
+ /^(?:[^`"]+)/,
979
+ /^(?:[`]["])/,
980
+ /^(?:["])/,
981
+ /^(?:["])/,
982
+ /^(?:[^"]*)/,
983
+ /^(?:space[:]\d+)/,
984
+ /^(?:space\b)/,
985
+ /^(?:default\b)/,
986
+ /^(?:linkStyle\b)/,
987
+ /^(?:interpolate\b)/,
988
+ /^(?:classDef\s+)/,
989
+ /^(?:DEFAULT\s+)/,
990
+ /^(?:\w+\s+)/,
991
+ /^(?:[^\n]*)/,
992
+ /^(?:class\s+)/,
993
+ /^(?:(\w+)+((,\s*\w+)*))/,
994
+ /^(?:[^\n]*)/,
995
+ /^(?:style\s+)/,
996
+ /^(?:(\w+)+((,\s*\w+)*))/,
997
+ /^(?:[^\n]*)/,
998
+ /^(?:accTitle\s*:\s*)/,
999
+ /^(?:(?!\n||)*[^\n]*)/,
1000
+ /^(?:accDescr\s*:\s*)/,
1001
+ /^(?:(?!\n||)*[^\n]*)/,
1002
+ /^(?:accDescr\s*\{\s*)/,
1003
+ /^(?:[\}])/,
1004
+ /^(?:[^\}]*)/,
1005
+ /^(?:end\b\s*)/,
1006
+ /^(?:\(\(\()/,
1007
+ /^(?:\)\)\))/,
1008
+ /^(?:[\)]\))/,
1009
+ /^(?:\}\})/,
1010
+ /^(?:\})/,
1011
+ /^(?:\(-)/,
1012
+ /^(?:-\))/,
1013
+ /^(?:\(\()/,
1014
+ /^(?:\]\])/,
1015
+ /^(?:\()/,
1016
+ /^(?:\]\))/,
1017
+ /^(?:\\\])/,
1018
+ /^(?:\/\])/,
1019
+ /^(?:\)\])/,
1020
+ /^(?:[\)])/,
1021
+ /^(?:\]>)/,
1022
+ /^(?:[\]])/,
1023
+ /^(?:-\))/,
1024
+ /^(?:\(-)/,
1025
+ /^(?:\)\))/,
1026
+ /^(?:\))/,
1027
+ /^(?:\(\(\()/,
1028
+ /^(?:\(\()/,
1029
+ /^(?:\{\{)/,
1030
+ /^(?:\{)/,
1031
+ /^(?:>)/,
1032
+ /^(?:\(\[)/,
1033
+ /^(?:\()/,
1034
+ /^(?:\[\[)/,
1035
+ /^(?:\[\|)/,
1036
+ /^(?:\[\()/,
1037
+ /^(?:\)\)\))/,
1038
+ /^(?:\[\\)/,
1039
+ /^(?:\[\/)/,
1040
+ /^(?:\[\\)/,
1041
+ /^(?:\[)/,
1042
+ /^(?:<\[)/,
1043
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1044
+ /^(?:$)/,
1045
+ /^(?:["][`])/,
1046
+ /^(?:["][`])/,
1047
+ /^(?:[^`"]+)/,
1048
+ /^(?:[`]["])/,
1049
+ /^(?:["])/,
1050
+ /^(?:["])/,
1051
+ /^(?:[^"]+)/,
1052
+ /^(?:["])/,
1053
+ /^(?:\]>\s*\()/,
1054
+ /^(?:,?\s*right\s*)/,
1055
+ /^(?:,?\s*left\s*)/,
1056
+ /^(?:,?\s*x\s*)/,
1057
+ /^(?:,?\s*y\s*)/,
1058
+ /^(?:,?\s*up\s*)/,
1059
+ /^(?:,?\s*down\s*)/,
1060
+ /^(?:\)\s*)/,
1061
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1062
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1063
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1064
+ /^(?:\s*~~[\~]+\s*)/,
1065
+ /^(?:\s*[xo<]?--\s*)/,
1066
+ /^(?:\s*[xo<]?==\s*)/,
1067
+ /^(?:\s*[xo<]?-\.\s*)/,
1068
+ /^(?:["][`])/,
1069
+ /^(?:["])/,
1070
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1071
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1072
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1073
+ /^(?::\d+)/
1074
+ ],
1075
+ conditions: {
1076
+ STYLE_DEFINITION: {
1077
+ rules: [28],
1078
+ inclusive: !1
1079
+ },
1080
+ STYLE_STMNT: {
1081
+ rules: [27],
1082
+ inclusive: !1
1083
+ },
1084
+ CLASSDEFID: {
1085
+ rules: [22],
1086
+ inclusive: !1
1087
+ },
1088
+ CLASSDEF: {
1089
+ rules: [20, 21],
1090
+ inclusive: !1
1091
+ },
1092
+ CLASS_STYLE: {
1093
+ rules: [25],
1094
+ inclusive: !1
1095
+ },
1096
+ CLASS: {
1097
+ rules: [24],
1098
+ inclusive: !1
1099
+ },
1100
+ LLABEL: {
1101
+ rules: [
1102
+ 99,
1103
+ 100,
1104
+ 101,
1105
+ 102,
1106
+ 103
1107
+ ],
1108
+ inclusive: !1
1109
+ },
1110
+ ARROW_DIR: {
1111
+ rules: [
1112
+ 85,
1113
+ 86,
1114
+ 87,
1115
+ 88,
1116
+ 89,
1117
+ 90,
1118
+ 91
1119
+ ],
1120
+ inclusive: !1
1121
+ },
1122
+ BLOCK_ARROW: {
1123
+ rules: [
1124
+ 76,
1125
+ 81,
1126
+ 84
1127
+ ],
1128
+ inclusive: !1
1129
+ },
1130
+ NODE: {
1131
+ rules: [
1132
+ 37,
1133
+ 38,
1134
+ 39,
1135
+ 40,
1136
+ 41,
1137
+ 42,
1138
+ 43,
1139
+ 44,
1140
+ 45,
1141
+ 46,
1142
+ 47,
1143
+ 48,
1144
+ 49,
1145
+ 50,
1146
+ 51,
1147
+ 52,
1148
+ 53,
1149
+ 77,
1150
+ 80
1151
+ ],
1152
+ inclusive: !1
1153
+ },
1154
+ md_string: {
1155
+ rules: [
1156
+ 9,
1157
+ 10,
1158
+ 78,
1159
+ 79
1160
+ ],
1161
+ inclusive: !1
1162
+ },
1163
+ space: {
1164
+ rules: [],
1165
+ inclusive: !1
1166
+ },
1167
+ string: {
1168
+ rules: [
1169
+ 12,
1170
+ 13,
1171
+ 82,
1172
+ 83
1173
+ ],
1174
+ inclusive: !1
1175
+ },
1176
+ acc_descr_multiline: {
1177
+ rules: [34, 35],
1178
+ inclusive: !1
1179
+ },
1180
+ acc_descr: {
1181
+ rules: [32],
1182
+ inclusive: !1
1183
+ },
1184
+ acc_title: {
1185
+ rules: [30],
1186
+ inclusive: !1
1187
+ },
1188
+ INITIAL: {
1189
+ rules: [
1190
+ 0,
1191
+ 1,
1192
+ 2,
1193
+ 3,
1194
+ 4,
1195
+ 5,
1196
+ 6,
1197
+ 7,
1198
+ 8,
1199
+ 11,
1200
+ 14,
1201
+ 15,
1202
+ 16,
1203
+ 17,
1204
+ 18,
1205
+ 19,
1206
+ 23,
1207
+ 26,
1208
+ 29,
1209
+ 31,
1210
+ 33,
1211
+ 36,
1212
+ 54,
1213
+ 55,
1214
+ 56,
1215
+ 57,
1216
+ 58,
1217
+ 59,
1218
+ 60,
1219
+ 61,
1220
+ 62,
1221
+ 63,
1222
+ 64,
1223
+ 65,
1224
+ 66,
1225
+ 67,
1226
+ 68,
1227
+ 69,
1228
+ 70,
1229
+ 71,
1230
+ 72,
1231
+ 73,
1232
+ 74,
1233
+ 75,
1234
+ 92,
1235
+ 93,
1236
+ 94,
1237
+ 95,
1238
+ 96,
1239
+ 97,
1240
+ 98,
1241
+ 104
1242
+ ],
1243
+ inclusive: !0
1244
+ }
1245
+ }
1246
+ };
1247
+ })();
1248
+ function _() {
1249
+ this.yy = {};
1250
+ }
1251
+ return O(_, "Parser"), _.prototype = g, g.Parser = _, new _();
1252
+ })();
1253
+ N.parser = N;
1254
+ var we = N, P = /* @__PURE__ */ new Map(), F = [], I = /* @__PURE__ */ new Map(), L = "color", R = "fill", Te = "bgFill", z = ",", B = /* @__PURE__ */ new Map(), V = "", Ee = /* @__PURE__ */ O((e) => ne.sanitizeText(e, re()), "sanitizeText"), De = /* @__PURE__ */ O(function(e, t = "") {
1255
+ let n = B.get(e);
1256
+ n || (n = {
1257
+ id: e,
1258
+ styles: [],
1259
+ textStyles: []
1260
+ }, B.set(e, n)), t?.split(z).forEach((e) => {
1261
+ let t = e.replace(/([^;]*);/, "$1").trim();
1262
+ if (RegExp(L).exec(e)) {
1263
+ let e = t.replace(R, Te).replace(L, R);
1264
+ n.textStyles.push(e);
1265
+ }
1266
+ n.styles.push(t);
1267
+ });
1268
+ }, "addStyleClass"), Oe = /* @__PURE__ */ O(function(e, t = "") {
1269
+ let n = P.get(e);
1270
+ t != null && (n.styles = t.split(z));
1271
+ }, "addStyle2Node"), ke = /* @__PURE__ */ O(function(e, t) {
1272
+ e.split(",").forEach(function(e) {
1273
+ let n = P.get(e);
1274
+ if (n === void 0) {
1275
+ let t = e.trim();
1276
+ n = {
1277
+ id: t,
1278
+ type: "na",
1279
+ children: []
1280
+ }, P.set(t, n);
1281
+ }
1282
+ n.classes ||= [], n.classes.push(t);
1283
+ });
1284
+ }, "setCssClass"), H = 0, U = /* @__PURE__ */ O((e, n) => {
1285
+ let r = e.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1286
+ for (let e of r) {
1287
+ if (typeof a == "number" && a > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > a && t.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`), e.label &&= Ee(e.label), e.type === "classDef") {
1288
+ De(e.id, e.css);
1289
+ continue;
1290
+ }
1291
+ if (e.type === "applyClass") {
1292
+ ke(e.id, e?.styleClass ?? "");
1293
+ continue;
1294
+ }
1295
+ if (e.type === "applyStyles") {
1296
+ e?.stylesStr && Oe(e.id, e?.stylesStr);
1297
+ continue;
1298
+ }
1299
+ if (e.type === "column-setting") n.columns = e.columns ?? -1;
1300
+ else if (e.type === "edge") {
1301
+ let t = (I.get(e.id) ?? 0) + 1;
1302
+ I.set(e.id, t), e.id = t + "-" + e.id, F.push(e);
1303
+ } else {
1304
+ e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1305
+ let t = P.get(e.id);
1306
+ if (t === void 0 ? (e.type === "composite" && (e.colorIndex = H++), P.set(e.id, e)) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && U(e.children, e), e.type === "space") {
1307
+ let t = e.width ?? 1;
1308
+ for (let n = 0; n < t; n++) {
1309
+ let t = ye(e);
1310
+ t.id = t.id + "-" + n, P.set(t.id, t), i.push(t);
1311
+ }
1312
+ } else t === void 0 && i.push(e);
1313
+ }
1314
+ }
1315
+ n.children = i;
1316
+ }, "populateBlockDatabase"), W = [], G = {
1317
+ id: "root",
1318
+ type: "composite",
1319
+ children: [],
1320
+ columns: -1
1321
+ }, Ae = /* @__PURE__ */ O(() => {
1322
+ t.debug("Clear called"), k(), G = {
1323
+ id: "root",
1324
+ type: "composite",
1325
+ children: [],
1326
+ columns: -1
1327
+ }, P = /* @__PURE__ */ new Map([["root", G]]), W = [], B = /* @__PURE__ */ new Map(), F = [], I = /* @__PURE__ */ new Map(), V = "", H = 0;
1328
+ }, "clear");
1329
+ function je(e) {
1330
+ switch (t.debug("typeStr2Type", e), e) {
1331
+ case "[]": return "square";
1332
+ case "()": return t.debug("we have a round"), "round";
1333
+ case "(())": return "circle";
1334
+ case ">]": return "rect_left_inv_arrow";
1335
+ case "{}": return "diamond";
1336
+ case "{{}}": return "hexagon";
1337
+ case "([])": return "stadium";
1338
+ case "[[]]": return "subroutine";
1339
+ case "[()]": return "cylinder";
1340
+ case "((()))": return "doublecircle";
1341
+ case "[//]": return "lean_right";
1342
+ case "[\\\\]": return "lean_left";
1343
+ case "[/\\]": return "trapezoid";
1344
+ case "[\\/]": return "inv_trapezoid";
1345
+ case "<[]>": return "block_arrow";
1346
+ default: return "na";
1347
+ }
1348
+ }
1349
+ O(je, "typeStr2Type");
1350
+ function Me(e) {
1351
+ switch (t.debug("typeStr2Type", e), e) {
1352
+ case "==": return "thick";
1353
+ default: return "normal";
1354
+ }
1355
+ }
1356
+ O(Me, "edgeTypeStr2Type");
1357
+ function Ne(e) {
1358
+ switch (e.trim().slice(-1)) {
1359
+ case "x": return "arrow_cross";
1360
+ case "o": return "arrow_circle";
1361
+ case ">": return "arrow_point";
1362
+ default: return "";
1363
+ }
1364
+ }
1365
+ O(Ne, "edgeStrToEdgeData");
1366
+ function Pe(e) {
1367
+ switch (e.trim().charAt(0)) {
1368
+ case "x": return "arrow_cross";
1369
+ case "o": return "arrow_circle";
1370
+ case "<": return "arrow_point";
1371
+ default: return "arrow_open";
1372
+ }
1373
+ }
1374
+ O(Pe, "edgeStrToEdgeStartData");
1375
+ function Fe(e) {
1376
+ return e.includes("==") ? "thick" : "normal";
1377
+ }
1378
+ O(Fe, "edgeStrToThickness");
1379
+ function Ie(e) {
1380
+ return e.includes(".-") ? "dotted" : "solid";
1381
+ }
1382
+ O(Ie, "edgeStrToPattern");
1383
+ var Le = 0, Re = {
1384
+ getConfig: /* @__PURE__ */ O(() => j().block, "getConfig"),
1385
+ typeStr2Type: je,
1386
+ edgeTypeStr2Type: Me,
1387
+ edgeStrToEdgeData: Ne,
1388
+ edgeStrToEdgeStartData: Pe,
1389
+ edgeStrToThickness: Fe,
1390
+ edgeStrToPattern: Ie,
1391
+ getLogger: /* @__PURE__ */ O(() => t, "getLogger"),
1392
+ getBlocksFlat: /* @__PURE__ */ O(() => [...P.values()], "getBlocksFlat"),
1393
+ getBlocks: /* @__PURE__ */ O(() => W || [], "getBlocks"),
1394
+ getEdges: /* @__PURE__ */ O(() => F, "getEdges"),
1395
+ setHierarchy: /* @__PURE__ */ O((e) => {
1396
+ G.children = e, U(e, G), W = G.children;
1397
+ }, "setHierarchy"),
1398
+ getBlock: /* @__PURE__ */ O((e) => P.get(e), "getBlock"),
1399
+ setBlock: /* @__PURE__ */ O((e) => {
1400
+ P.set(e.id, e);
1401
+ }, "setBlock"),
1402
+ getColumns: /* @__PURE__ */ O((e) => {
1403
+ let t = P.get(e);
1404
+ return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1405
+ }, "getColumns"),
1406
+ getClasses: /* @__PURE__ */ O(function() {
1407
+ return B;
1408
+ }, "getClasses"),
1409
+ clear: Ae,
1410
+ generateId: /* @__PURE__ */ O(() => (Le++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Le), "generateId"),
1411
+ setDiagramId: /* @__PURE__ */ O((e) => {
1412
+ V = e;
1413
+ }, "setDiagramId"),
1414
+ getDiagramId: /* @__PURE__ */ O(() => V, "getDiagramId")
1415
+ }, ze = /* @__PURE__ */ O((e) => {
1416
+ let { theme: t, bkgColorArray: n, borderColorArray: r } = e;
1417
+ if (!se(t, r)) return "";
1418
+ let i = le(e.look), a = ue(n), o = "";
1419
+ for (let t = 0; t < ce(e.THEME_COLOR_LIMIT, r); t++) {
1420
+ let e = r[t % r.length], s = a ? `fill: ${n[t % n.length]};` : "", c = `[data-look="${i}"][data-color-id="color-${t}"]`;
1421
+ o += `
1422
+
1423
+ ${c}.node rect.composite {
1424
+ stroke: ${e};
1425
+ ${s}
1426
+ }
1427
+ `;
1428
+ }
1429
+ return o;
1430
+ }, "genColor"), K = /* @__PURE__ */ O((e, t) => {
1431
+ let n = ie;
1432
+ return A(n(e, "r"), n(e, "g"), n(e, "b"), t);
1433
+ }, "fade"), Be = /* @__PURE__ */ O((e) => `${ze(e)}
1434
+ .label {
1435
+ font-family: ${e.fontFamily};
1436
+ color: ${e.nodeTextColor || e.textColor};
1437
+ }
1438
+ .cluster-label text {
1439
+ fill: ${e.titleColor};
1440
+ }
1441
+ .cluster-label span {
1442
+ color: ${e.titleColor};
1443
+ }
1444
+
1445
+
1446
+
1447
+ .label text,span {
1448
+ fill: ${e.nodeTextColor || e.textColor};
1449
+ color: ${e.nodeTextColor || e.textColor};
1450
+ }
1451
+
1452
+ .node rect,
1453
+ .node circle,
1454
+ .node ellipse,
1455
+ .node polygon,
1456
+ .node path {
1457
+ fill: ${e.mainBkg};
1458
+ stroke: ${e.nodeBorder};
1459
+ /* From the theme, as every other diagram does. Pinned at 1px here, so block drew a
1460
+ thinner border than an identical flowchart node under any theme asking for more --
1461
+ the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke
1462
+ and filter, never stroke-width. */
1463
+ stroke-width: ${e.strokeWidth ?? 1}px;
1464
+ }
1465
+ .flowchart-label text {
1466
+ text-anchor: middle;
1467
+ }
1468
+ // .flowchart-label .text-outer-tspan {
1469
+ // text-anchor: middle;
1470
+ // }
1471
+ // .flowchart-label .text-inner-tspan {
1472
+ // text-anchor: start;
1473
+ // }
1474
+
1475
+ .node .label {
1476
+ text-align: center;
1477
+ }
1478
+ .node.clickable {
1479
+ cursor: pointer;
1480
+ }
1481
+
1482
+ .arrowheadPath {
1483
+ fill: ${e.arrowheadColor};
1484
+ }
1485
+
1486
+ .edgePaths .path {
1487
+ stroke: ${e.lineColor};
1488
+ stroke-width: 2.0px;
1489
+ }
1490
+
1491
+ .flowchart-link {
1492
+ stroke: ${e.lineColor};
1493
+ fill: none;
1494
+ }
1495
+
1496
+ .edgeLabel {
1497
+ background-color: ${e.edgeLabelBackground};
1498
+ /*
1499
+ * This is for backward compatibility with existing code that didn't
1500
+ * add a \`<p>\` around edge labels.
1501
+ *
1502
+ * TODO: We should probably remove this in a future release.
1503
+ */
1504
+ p {
1505
+ margin: 0;
1506
+ padding: 0;
1507
+ display: inline;
1508
+ }
1509
+ rect {
1510
+ opacity: 0.5;
1511
+ background-color: ${e.edgeLabelBackground};
1512
+ fill: ${e.edgeLabelBackground};
1513
+ }
1514
+ text-align: center;
1515
+ }
1516
+
1517
+ /* For html labels only */
1518
+ .labelBkg {
1519
+ background-color: ${e.edgeLabelBackground};
1520
+ }
1521
+
1522
+ .node .cluster {
1523
+ // fill: ${K(e.mainBkg, .5)};
1524
+ fill: ${K(e.clusterBkg, .5)};
1525
+ stroke: ${K(e.clusterBorder, .2)};
1526
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1527
+ stroke-width: 1px;
1528
+ }
1529
+
1530
+ .cluster text {
1531
+ fill: ${e.titleColor};
1532
+ }
1533
+
1534
+ .cluster span {
1535
+ color: ${e.titleColor};
1536
+ }
1537
+ /* .cluster div {
1538
+ color: ${e.titleColor};
1539
+ } */
1540
+
1541
+ div.mermaidTooltip {
1542
+ position: absolute;
1543
+ text-align: center;
1544
+ max-width: 200px;
1545
+ padding: 2px;
1546
+ font-family: ${e.fontFamily};
1547
+ font-size: 12px;
1548
+ background: ${e.tertiaryColor};
1549
+ border: 1px solid ${e.border2};
1550
+ border-radius: 2px;
1551
+ pointer-events: none;
1552
+ z-index: 100;
1553
+ }
1554
+
1555
+ .flowchartTitleText {
1556
+ text-anchor: middle;
1557
+ font-size: 18px;
1558
+ fill: ${e.textColor};
1559
+ }
1560
+ ${ae()}
1561
+ `, "getStyles");
1562
+ function q(e, t) {
1563
+ if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1564
+ if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1565
+ return e < 0 ? {
1566
+ px: t,
1567
+ py: 0
1568
+ } : e === 1 ? {
1569
+ px: 0,
1570
+ py: t
1571
+ } : {
1572
+ px: t % e,
1573
+ py: Math.floor(t / e)
1574
+ };
1575
+ }
1576
+ O(q, "calculateBlockPosition");
1577
+ var Ve = /* @__PURE__ */ O((e) => {
1578
+ let n = 0, r = 0;
1579
+ for (let i of e.children) {
1580
+ let { width: e, height: a, x: o, y: s } = i.size ?? {
1581
+ width: 0,
1582
+ height: 0,
1583
+ x: 0,
1584
+ y: 0
1585
+ };
1586
+ if (t.debug("getMaxChildSize abc95 child:", i.id, "width:", e, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
1587
+ let c = e / (i.widthInColumns ?? 1);
1588
+ c > n && (n = c), a > r && (r = a);
1589
+ }
1590
+ return {
1591
+ width: n,
1592
+ height: r
1593
+ };
1594
+ }, "getMaxChildSize");
1595
+ function J(e, n, r = 0, i = 0, a = 8) {
1596
+ t.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", r), e?.size?.width || (e.size = {
1597
+ width: r,
1598
+ height: i,
1599
+ x: 0,
1600
+ y: 0
1601
+ });
1602
+ let o = 0, s = 0;
1603
+ if (e.children?.length > 0) {
1604
+ for (let t of e.children) J(t, n, 0, 0, a);
1605
+ let c = Ve(e);
1606
+ o = c.width, s = c.height, t.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", o, s);
1607
+ for (let n of e.children) n.size && (t.debug(`abc95 Setting size of children of ${e.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`), n.size.width = o * (n.widthInColumns ?? 1) + a * ((n.widthInColumns ?? 1) - 1), n.size.height = s, n.size.x = 0, n.size.y = 0, t.debug(`abc95 updating size of ${e.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));
1608
+ for (let t of e.children) J(t, n, o, s, a);
1609
+ let l = e.columns ?? -1, u = 0;
1610
+ for (let t of e.children) u += t.widthInColumns ?? 1;
1611
+ let d = e.children.length;
1612
+ l > 0 && l < u && (d = l);
1613
+ let f = Math.ceil(u / d), p = d * (o + a) + a, m = f * (s + a) + a;
1614
+ if (p < r) {
1615
+ t.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${i} width ${p}`), p = r, m = i;
1616
+ let n = (r - d * a - a) / d, c = (i - f * a - a) / f;
1617
+ t.debug("Size indata abc88", e.id, "childWidth", n, "maxWidth", o), t.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), t.debug("Size indata abc88 xSize", d, "padding", a);
1618
+ for (let t of e.children) t.size && (t.size.width = n, t.size.height = c, t.size.x = 0, t.size.y = 0);
1619
+ }
1620
+ if (t.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${f} columns ${l}${e.children.length} width=${Math.max(p, e.size?.width || 0)}`), p < (e?.size?.width || 0)) {
1621
+ p = e?.size?.width || 0;
1622
+ let n = l > 0 ? Math.min(e.children.length, l) : e.children.length;
1623
+ if (n > 0) {
1624
+ let r = (p - n * a - a) / n;
1625
+ t.debug("abc95 (growing to fit) width", e.id, p, e.size?.width, r);
1626
+ for (let t of e.children) t.size && (t.size.width = r);
1627
+ }
1628
+ }
1629
+ e.size = {
1630
+ width: p,
1631
+ height: m,
1632
+ x: 0,
1633
+ y: 0
1634
+ };
1635
+ }
1636
+ t.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1637
+ }
1638
+ O(J, "setBlockSizes");
1639
+ function Y(e, n, r = 8) {
1640
+ t.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1641
+ let i = e.columns ?? -1;
1642
+ if (t.debug("layoutBlocks columns abc95", e.id, "=>", i, e), e.children && e.children.length > 0) {
1643
+ let a = e?.children[0]?.size?.width ?? 0, o = e.children.length * a + (e.children.length - 1) * r;
1644
+ t.debug("widthOfChildren 88", o, "posX");
1645
+ let s = /* @__PURE__ */ new Map();
1646
+ {
1647
+ let t = 0;
1648
+ for (let n of e.children) {
1649
+ if (!n.size) continue;
1650
+ let { py: e } = q(i, t), r = s.get(e) ?? 0;
1651
+ n.size.height > r && s.set(e, n.size.height);
1652
+ let a = n?.widthInColumns ?? 1;
1653
+ i > 0 && (a = Math.min(a, i - t % i)), t += a;
1654
+ }
1655
+ }
1656
+ let c = /* @__PURE__ */ new Map();
1657
+ {
1658
+ let e = 0, t = [...s.keys()].sort((e, t) => e - t);
1659
+ for (let n of t) c.set(n, e), e += (s.get(n) ?? 0) + r;
1660
+ }
1661
+ let l = 0;
1662
+ t.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1663
+ let u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, d = 0;
1664
+ for (let a of e.children) {
1665
+ let o = e;
1666
+ if (!a.size) continue;
1667
+ let { width: f, height: p } = a.size, { px: m, py: h } = q(i, l);
1668
+ if (h != d && (d = h, u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -r, t.debug("New row in layout for block", e.id, " and child ", a.id, d)), t.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`), o.size) {
1669
+ let e = f / 2;
1670
+ a.size.x = u + r + e, t.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f * (a?.widthInColumns ?? 1) / 2}`), u = a.size.x + e;
1671
+ let n = c.get(h) ?? 0, i = s.get(h) ?? p;
1672
+ a.size.y = o.size.y - o.size.height / 2 + n + i / 2 + r, t.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f * (a?.widthInColumns ?? 1) / 2}`);
1673
+ }
1674
+ a.children && Y(a, n, r);
1675
+ let g = a?.widthInColumns ?? 1;
1676
+ i > 0 && (g = Math.min(g, i - l % i)), l += g, t.debug("abc88 columnsPos", a, l);
1677
+ }
1678
+ }
1679
+ t.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1680
+ }
1681
+ O(Y, "layoutBlocks");
1682
+ function X(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1683
+ minX: 0,
1684
+ minY: 0,
1685
+ maxX: 0,
1686
+ maxY: 0
1687
+ }) {
1688
+ if (e.size && e.id !== "root") {
1689
+ let { x: a, y: o, width: s, height: c } = e.size;
1690
+ a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
1691
+ }
1692
+ if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = X(a, {
1693
+ minX: t,
1694
+ minY: n,
1695
+ maxX: r,
1696
+ maxY: i
1697
+ }));
1698
+ return {
1699
+ minX: t,
1700
+ minY: n,
1701
+ maxX: r,
1702
+ maxY: i
1703
+ };
1704
+ }
1705
+ O(X, "findBounds");
1706
+ function He(e) {
1707
+ let n = e.getBlock("root");
1708
+ if (!n) return;
1709
+ let r = re()?.block?.padding ?? 8;
1710
+ J(n, e, 0, 0, r), Y(n, e, r), t.debug("getBlocks", JSON.stringify(n, null, 2));
1711
+ let { minX: i, minY: a, maxX: o, maxY: s } = X(n), c = s - a;
1712
+ return {
1713
+ x: i,
1714
+ y: a,
1715
+ width: o - i,
1716
+ height: c
1717
+ };
1718
+ }
1719
+ O(He, "layout");
1720
+ function Z(e, t, n = !1) {
1721
+ let r = e, i = "default";
1722
+ (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
1723
+ let a = (r?.classes ?? []).flatMap((e) => t.getClasses().get(e)?.styles ?? []), o = 0, s = "rect", c;
1724
+ switch (r.type) {
1725
+ case "round":
1726
+ o = 5, s = "rect";
1727
+ break;
1728
+ case "composite":
1729
+ o = 0, s = "composite", c = 0;
1730
+ break;
1731
+ case "square":
1732
+ s = "rect";
1733
+ break;
1734
+ case "diamond":
1735
+ s = "question";
1736
+ break;
1737
+ case "hexagon":
1738
+ s = "hexagon";
1739
+ break;
1740
+ case "block_arrow":
1741
+ s = "block_arrow";
1742
+ break;
1743
+ case "odd":
1744
+ s = "rect_left_inv_arrow";
1745
+ break;
1746
+ case "lean_right":
1747
+ s = "lean_right";
1748
+ break;
1749
+ case "lean_left":
1750
+ s = "lean_left";
1751
+ break;
1752
+ case "trapezoid":
1753
+ s = "trapezoid";
1754
+ break;
1755
+ case "inv_trapezoid":
1756
+ s = "inv_trapezoid";
1757
+ break;
1758
+ case "rect_left_inv_arrow":
1759
+ s = "rect_left_inv_arrow";
1760
+ break;
1761
+ case "circle":
1762
+ s = "circle";
1763
+ break;
1764
+ case "ellipse":
1765
+ s = "ellipse";
1766
+ break;
1767
+ case "stadium":
1768
+ s = "stadium";
1769
+ break;
1770
+ case "subroutine":
1771
+ s = "subroutine";
1772
+ break;
1773
+ case "cylinder":
1774
+ s = "cylinder";
1775
+ break;
1776
+ case "group":
1777
+ s = "rect";
1778
+ break;
1779
+ case "doublecircle":
1780
+ s = "doublecircle";
1781
+ break;
1782
+ default: s = "rect";
1783
+ }
1784
+ let l = w(r?.styles ?? []), u = r.label, d = r.size ?? {
1785
+ width: 0,
1786
+ height: 0,
1787
+ x: 0,
1788
+ y: 0
1789
+ }, f = t.getDiagramId();
1790
+ return {
1791
+ labelStyle: l.labelStyle,
1792
+ shape: s,
1793
+ label: u,
1794
+ labelText: u,
1795
+ rx: o,
1796
+ ry: o,
1797
+ class: i,
1798
+ cssClasses: i,
1799
+ cssStyles: r?.styles ?? [],
1800
+ cssCompiledStyles: a,
1801
+ style: l.style,
1802
+ id: r.id,
1803
+ domId: f ? `${f}-${r.id}` : r.id,
1804
+ isGroup: !1,
1805
+ directions: r.directions,
1806
+ width: d.width || void 0,
1807
+ height: d.height || void 0,
1808
+ wrappingWidth: d.width || Infinity,
1809
+ x: d.x,
1810
+ y: d.y,
1811
+ positioned: n,
1812
+ intersect: void 0,
1813
+ padding: c ?? j()?.block?.padding ?? 0,
1814
+ widthInColumns: r.widthInColumns ?? 1,
1815
+ colorIndex: r.colorIndex,
1816
+ look: j().look
1817
+ };
1818
+ }
1819
+ O(Z, "getNodeFromBlock");
1820
+ async function Ue(e, t, n) {
1821
+ let r = Z(t, n, !1);
1822
+ if (t.type === "group") return;
1823
+ let i = await pe(e, r, { config: j() }), a = i.node()?.getBBox() ?? {
1824
+ width: 0,
1825
+ height: 0
1826
+ }, o = n.getBlock(r.id);
1827
+ o.size = {
1828
+ width: a.width,
1829
+ height: a.height,
1830
+ x: 0,
1831
+ y: 0,
1832
+ node: i
1833
+ }, n.setBlock(o), i.remove();
1834
+ }
1835
+ O(Ue, "calculateBlockSize");
1836
+ async function We(e, t, n) {
1837
+ let r = Z(t, n, !0);
1838
+ if (n.getBlock(r.id).type !== "space") {
1839
+ let n = j(), i = await pe(e, r, { config: n });
1840
+ r.colorIndex !== void 0 && de(i, r.colorIndex, n.theme, n.themeVariables?.borderColorArray), t.intersect = r?.intersect, fe(r);
1841
+ }
1842
+ }
1843
+ O(We, "insertBlockPositioned");
1844
+ async function Q(e, t, n, r) {
1845
+ for (let i of t) await r(e, i, n), i.children && await Q(e, i.children, n, r);
1846
+ }
1847
+ O(Q, "performOperations");
1848
+ async function Ge(e, t, n) {
1849
+ await Q(e, t, n, Ue);
1850
+ }
1851
+ O(Ge, "calculateBlockSizes");
1852
+ async function Ke(e, t, n) {
1853
+ await Q(e, t, n, We);
1854
+ }
1855
+ O(Ke, "insertBlocks");
1856
+ async function $(t, n, r, i, a) {
1857
+ let o = new e({
1858
+ multigraph: !0,
1859
+ compound: !0
1860
+ });
1861
+ o.setGraph({
1862
+ rankdir: "TB",
1863
+ nodesep: 10,
1864
+ ranksep: 10,
1865
+ marginx: 8,
1866
+ marginy: 8
1867
+ });
1868
+ for (let e of r) e.size && o.setNode(e.id, {
1869
+ width: e.size.width,
1870
+ height: e.size.height,
1871
+ intersect: e.intersect
1872
+ });
1873
+ for (let e of n) if (e.start && e.end) {
1874
+ let n = i.getBlock(e.start), r = i.getBlock(e.end);
1875
+ if (n?.size && r?.size) {
1876
+ let i = n.size, s = r.size, c = [
1877
+ {
1878
+ x: i.x,
1879
+ y: i.y
1880
+ },
1881
+ {
1882
+ x: i.x + (s.x - i.x) / 2,
1883
+ y: i.y + (s.y - i.y) / 2
1884
+ },
1885
+ {
1886
+ x: s.x,
1887
+ y: s.y
1888
+ }
1889
+ ], l = a ? `${a}-${e.id}` : e.id, u = `${e.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${e.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
1890
+ ge(t, {
1891
+ ...e,
1892
+ id: l,
1893
+ arrowTypeEnd: e.arrowTypeEnd,
1894
+ arrowTypeStart: e.arrowTypeStart,
1895
+ points: c,
1896
+ classes: u
1897
+ }, {}, "block", o.node(e.start), o.node(e.end), a), e.label && (await me(t, {
1898
+ ...e,
1899
+ label: e.label,
1900
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1901
+ arrowTypeEnd: e.arrowTypeEnd,
1902
+ arrowTypeStart: e.arrowTypeStart,
1903
+ points: c,
1904
+ classes: u
1905
+ }), _e({
1906
+ ...e,
1907
+ x: c[1].x,
1908
+ y: c[1].y
1909
+ }, { originalPath: c }));
1910
+ }
1911
+ }
1912
+ }
1913
+ O($, "insertEdges");
1914
+ var qe = {
1915
+ parser: we,
1916
+ db: Re,
1917
+ renderer: {
1918
+ draw: /* @__PURE__ */ O(async function(e, r, i, a) {
1919
+ let { securityLevel: o, block: s } = j(), c = a.db;
1920
+ c.setDiagramId(r);
1921
+ let l;
1922
+ o === "sandbox" && (l = n("#i" + r));
1923
+ let u = n(o === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), d = o === "sandbox" ? u.select(`[id="${r}"]`) : n(`[id="${r}"]`);
1924
+ oe(d, j()), he(d, [
1925
+ "point",
1926
+ "circle",
1927
+ "cross"
1928
+ ], a.type, r);
1929
+ let f = c.getBlocks(), p = c.getBlocksFlat(), m = c.getEdges(), h = d.insert("g").attr("class", "block");
1930
+ await Ge(h, f, c);
1931
+ let g = He(c);
1932
+ await Ke(h, f, c), await $(h, m, p, c, r);
1933
+ let _ = h.node()?.getBBox(), v = _ && Number.isFinite(_.width) && Number.isFinite(_.height) ? _ : g;
1934
+ if (v) {
1935
+ let e = Math.max(1, Math.round(.125 * (v.width / v.height))), n = v.height + e + 10, r = v.width + 10, { useMaxWidth: i } = s;
1936
+ te(d, n, r, !!i), t.debug("Here Bounds", g, v), d.attr("viewBox", `${v.x - 5} ${v.y - 5} ${v.width + 10} ${v.height + 10}`);
1937
+ }
1938
+ }, "draw"),
1939
+ getClasses: /* @__PURE__ */ O(function(e, t) {
1940
+ return t.db.getClasses();
1941
+ }, "getClasses")
1942
+ },
1943
+ styles: Be
1944
+ };
1945
+ //#endregion
1946
+ export { qe as diagram };