react-docs-ui 0.6.17 → 0.6.18

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 (150) hide show
  1. package/dist/{AIChatDialog-W60DtiEW.js → AIChatDialog-BnAX3dRn.js} +2 -2
  2. package/dist/{AISelectionTrigger-MaBGhxTE.js → AISelectionTrigger-SLyb8Vep.js} +2 -2
  3. package/dist/{AISettingsPanel-aiMnncnQ.js → AISettingsPanel-Bsd_wLP4.js} +3 -3
  4. package/dist/{DocsApp-BN6Bo0YD.js → DocsApp-CNVM_Zcf.js} +3505 -3208
  5. package/dist/{GlobalContextMenu-DG6x5Y5w.js → GlobalContextMenu-BtVjQk0v.js} +1 -1
  6. package/dist/{MdxContent-CMB8ZbXo.js → MdxContent-D2l4Au7Z.js} +310 -306
  7. package/dist/{MdxContent.lazy-C4rcCv4v.js → MdxContent.lazy-BirC7wrH.js} +1 -1
  8. package/dist/{SearchDialog-tUSKKsxW.js → SearchDialog-DWVre6R9.js} +66 -56
  9. package/dist/{SearchRuntime-5fXpxDsi.js → SearchRuntime-D0rSMKV3.js} +6 -5
  10. package/dist/_basePickBy-3HEi44E5.js +166 -0
  11. package/dist/_baseUniq-CyOGXr0t.js +682 -0
  12. package/dist/arc-DULIiw5L.js +80 -0
  13. package/dist/architecture-PBZL5I3N-DT4oHaWT.js +3 -0
  14. package/dist/architectureDiagram-2XIMDMQ5-CqinFxzU.js +4045 -0
  15. package/dist/array-DHiPsILf.js +6 -0
  16. package/dist/blockDiagram-WCTKOSBZ-4JAhKeqm.js +3025 -0
  17. package/dist/c4Diagram-IC4MRINW-DtmtzsQQ.js +2964 -0
  18. package/dist/channel-BPONoOHQ.js +5 -0
  19. package/dist/chunk-4BX2VUAB-Bv5NGtUU.js +8 -0
  20. package/dist/chunk-55IACEB6-BXL-F-QI.js +8 -0
  21. package/dist/chunk-7E7YKBS2-CuTUVGrY.js +23 -0
  22. package/dist/chunk-7R4GIKGN-Qkaxl46X.js +2596 -0
  23. package/dist/chunk-C72U2L5F-42ScKBi2.js +23 -0
  24. package/dist/chunk-EGIJ26TM-D9jfybGA.js +23 -0
  25. package/dist/chunk-FMBD7UC4-DZXaweDk.js +5 -0
  26. package/dist/chunk-GEFDOKGD-OXBFFBXI.js +1121 -0
  27. package/dist/chunk-GLR3WWYH-BNwKwdNm.js +41 -0
  28. package/dist/chunk-HHEYEP7N-BQ3EJT5G.js +9 -0
  29. package/dist/chunk-JSJVCQXG-DNkHiMyV.js +60 -0
  30. package/dist/chunk-KX2RTZJC-DuTfSwwu.js +25 -0
  31. package/dist/chunk-KYZI473N-COpLSX52.js +3434 -0
  32. package/dist/chunk-L3YUKLVL-BdSnx12A.js +23 -0
  33. package/dist/chunk-MX3YWQON-CrwNXQjz.js +80 -0
  34. package/dist/chunk-NBPlniwU.js +23 -0
  35. package/dist/chunk-NQ4KR5QH-Y07nfCMJ.js +2002 -0
  36. package/dist/chunk-O4XLMI2P-CuexQiBs.js +511 -0
  37. package/dist/chunk-OZEHJAEY-D6vfkGpv.js +64 -0
  38. package/dist/chunk-PQ6SQG4A-6cI0SCcc.js +67 -0
  39. package/dist/chunk-PU5JKC2W-an2DzREj.js +1885 -0
  40. package/dist/chunk-QZHKN3VN-BKMQ36H3.js +15 -0
  41. package/dist/chunk-R5LLSJPH-DOyud7qN.js +35 -0
  42. package/dist/chunk-WL4C6EOR-y1gU9zpd.js +3194 -0
  43. package/dist/chunk-XIRO2GV7-BD1Cp5pB.js +30 -0
  44. package/dist/chunk-XPW4576I-DOBR2ORN.js +1146 -0
  45. package/dist/chunk-XZSTWKYB-BQ9uqNJe.js +15797 -0
  46. package/dist/chunk-YBOYWFTD-BT3l76Xm.js +32 -0
  47. package/dist/classDiagram-VBA2DB6C-AUxID939.js +29 -0
  48. package/dist/classDiagram-v2-RAHNMMFH-tupy2OPi.js +29 -0
  49. package/dist/clone-CRTZj7kp.js +8 -0
  50. package/dist/cose-bilkent-S5V4N54A-Bbd2d2j7.js +2250 -0
  51. package/dist/cytoscape.esm-CQKQOqRt.js +18100 -0
  52. package/dist/dagre-Cyr5_x2X.js +1483 -0
  53. package/dist/dagre-KLK3FWXG-Bjsq-TtB.js +294 -0
  54. package/dist/defaultLocale-P2nWjZJu.js +201 -0
  55. package/dist/diagram-E7M64L7V-CCTuI46e.js +527 -0
  56. package/dist/diagram-IFDJBPK2-DI_KTvRx.js +213 -0
  57. package/dist/diagram-P4PSJMXO-D3SeWDdU.js +133 -0
  58. package/dist/dist-CSS39H68.js +50 -0
  59. package/dist/docs-app.es.js +1 -1
  60. package/dist/erDiagram-INFDFZHY-Db_DAoTf.js +1666 -0
  61. package/dist/flowDiagram-PKNHOUZH-TqyNp9Dn.js +4161 -0
  62. package/dist/ganttDiagram-A5KZAMGK-DqNVbtHo.js +3072 -0
  63. package/dist/gitGraph-HDMCJU4V-DQudxfzL.js +3 -0
  64. package/dist/gitGraphDiagram-K3NZZRJ6-Cga9Wfgb.js +625 -0
  65. package/dist/graphlib-CexrUFs9.js +225 -0
  66. package/dist/info-3K5VOQVL-DiuN3kw6.js +3 -0
  67. package/dist/infoDiagram-LFFYTUFH-bvABxJph.js +19 -0
  68. package/dist/init-GWRygwCo.js +15 -0
  69. package/dist/isArrayLikeObject-CG2kGrxR.js +578 -0
  70. package/dist/isEmpty-C8iIdTg-.js +35 -0
  71. package/dist/ishikawaDiagram-PHBUUO56-DKGPu-hu.js +717 -0
  72. package/dist/journeyDiagram-4ABVD52K-DefcNau0.js +883 -0
  73. package/dist/kanban-definition-K7BYSVSG-BXvFQzdZ.js +971 -0
  74. package/dist/line-ChPoSgrf.js +34 -0
  75. package/dist/linear-BeQrMQNe.js +289 -0
  76. package/dist/math-CgS6d5p2.js +10 -0
  77. package/dist/{shiki-highlighter-BmQSSJpS.js → mdx-components-Bz45lgrV.js} +1387 -1288
  78. package/dist/mermaid-parser.core-CDTyVXPe.js +59 -0
  79. package/dist/mermaid.core-CHJrGTZ9.js +919 -0
  80. package/dist/mindmap-definition-YRQLILUH-CqsMcFhX.js +964 -0
  81. package/dist/ordinal-DUEC8Lr4.js +65 -0
  82. package/dist/packet-RMMSAZCW-ZLaHU0Ov.js +3 -0
  83. package/dist/path-CzRXOvk1.js +85 -0
  84. package/dist/pie-UPGHQEXC-COgIbE0j.js +3 -0
  85. package/dist/pieDiagram-SKSYHLDU-C8Y5Bc8d.js +165 -0
  86. package/dist/quadrantDiagram-337W2JSQ-DRWBX5cn.js +1974 -0
  87. package/dist/radar-KQ55EAFF-ABFVVcns.js +3 -0
  88. package/dist/react-docs-ui.css +1 -1
  89. package/dist/react-docs-ui.es.js +19 -19
  90. package/dist/requirementDiagram-Z7DCOOCP-EkyUnFq8.js +2201 -0
  91. package/dist/rough.esm-qTNNhHn7.js +1352 -0
  92. package/dist/sankeyDiagram-WA2Y5GQK-Cmas7IuZ.js +920 -0
  93. package/dist/sequenceDiagram-2WXFIKYE-B7TrFw3o.js +4109 -0
  94. package/dist/src-B8kKzJ6p.js +2146 -0
  95. package/dist/stateDiagram-RAJIS63D-DyqZyFdt.js +217 -0
  96. package/dist/stateDiagram-v2-FVOUBMTO-5UjWXgt6.js +27 -0
  97. package/dist/timeline-definition-YZTLITO2-qhoXPOhL.js +830 -0
  98. package/dist/treemap-KZPCXAKY-CRdRsoRo.js +3 -0
  99. package/dist/types/components/AnnouncementBar.d.ts +12 -0
  100. package/dist/types/components/AnnouncementBar.d.ts.map +1 -0
  101. package/dist/types/components/DocsLayout.d.ts +8 -2
  102. package/dist/types/components/DocsLayout.d.ts.map +1 -1
  103. package/dist/types/components/HeaderNav.d.ts +17 -1
  104. package/dist/types/components/HeaderNav.d.ts.map +1 -1
  105. package/dist/types/components/MdxContent.d.ts.map +1 -1
  106. package/dist/types/components/MobileSidebar.d.ts +2 -1
  107. package/dist/types/components/MobileSidebar.d.ts.map +1 -1
  108. package/dist/types/components/PageFeedback.d.ts +11 -0
  109. package/dist/types/components/PageFeedback.d.ts.map +1 -0
  110. package/dist/types/components/PageMetaActions.d.ts +15 -0
  111. package/dist/types/components/PageMetaActions.d.ts.map +1 -0
  112. package/dist/types/components/PageNavigation.d.ts +2 -1
  113. package/dist/types/components/PageNavigation.d.ts.map +1 -1
  114. package/dist/types/components/SearchLauncher.d.ts +2 -1
  115. package/dist/types/components/SearchLauncher.d.ts.map +1 -1
  116. package/dist/types/components/SidebarNav.d.ts +2 -1
  117. package/dist/types/components/SidebarNav.d.ts.map +1 -1
  118. package/dist/types/components/mdx-components/Mermaid.d.ts +6 -0
  119. package/dist/types/components/mdx-components/Mermaid.d.ts.map +1 -0
  120. package/dist/types/components/mdx-components/Tabs.d.ts +13 -0
  121. package/dist/types/components/mdx-components/Tabs.d.ts.map +1 -0
  122. package/dist/types/components/mdx-components/index.d.ts +2 -0
  123. package/dist/types/components/mdx-components/index.d.ts.map +1 -1
  124. package/dist/types/components/search/SearchProvider.d.ts +2 -1
  125. package/dist/types/components/search/SearchProvider.d.ts.map +1 -1
  126. package/dist/types/components/search/SearchRuntime.d.ts +2 -1
  127. package/dist/types/components/search/SearchRuntime.d.ts.map +1 -1
  128. package/dist/types/lib/component-scanner.d.ts.map +1 -1
  129. package/dist/types/lib/config.d.ts +42 -0
  130. package/dist/types/lib/config.d.ts.map +1 -1
  131. package/dist/types/lib/navigation.d.ts +1 -1
  132. package/dist/types/lib/navigation.d.ts.map +1 -1
  133. package/dist/types/lib/page-meta.d.ts +16 -0
  134. package/dist/types/lib/page-meta.d.ts.map +1 -0
  135. package/dist/types/lib/search/build/index-generator.d.ts.map +1 -1
  136. package/dist/types/lib/search/build/types.d.ts +1 -0
  137. package/dist/types/lib/search/build/types.d.ts.map +1 -1
  138. package/dist/types/lib/search/runtime/search-engine.d.ts.map +1 -1
  139. package/dist/types/lib/search/runtime/types.d.ts +1 -0
  140. package/dist/types/lib/search/runtime/types.d.ts.map +1 -1
  141. package/dist/types/lib/versioning.d.ts +6 -0
  142. package/dist/types/lib/versioning.d.ts.map +1 -0
  143. package/dist/vennDiagram-LZ73GAT5-DlUUn7LI.js +1858 -0
  144. package/dist/xychartDiagram-JWTSCODW-oT2IR7c0.js +2041 -0
  145. package/package.json +4 -1
  146. /package/dist/{AIProvider-C1_b1iKH.js → AIProvider-niZNPSGi.js} +0 -0
  147. /package/dist/{context-menu-CB7erSoV.js → context-menu-BIQsQup7.js} +0 -0
  148. /package/dist/{dialog-DQ6nkP0y.js → dialog-D8otbqQL.js} +0 -0
  149. /package/dist/{mdx-components-Dxpipc50.js → mdx-components-TEc3uhbY.js} +0 -0
  150. /package/dist/{use-toast-d9VPBjMn.js → use-toast-DK69oadB.js} +0 -0
@@ -0,0 +1,2002 @@
1
+ import { h as e, o as t } from "./chunk-GEFDOKGD-OXBFFBXI.js";
2
+ import { g as n, h as r } from "./src-B8kKzJ6p.js";
3
+ import { B as i, C as a, V as o, W as s, _ as c, a as l, b as u, s as d, v as f } from "./chunk-7R4GIKGN-Qkaxl46X.js";
4
+ import { t as p } from "./chunk-55IACEB6-BXL-F-QI.js";
5
+ import { t as m } from "./chunk-KX2RTZJC-DuTfSwwu.js";
6
+ import { r as h } from "./chunk-GLR3WWYH-BNwKwdNm.js";
7
+ //#region node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-NQ4KR5QH.mjs
8
+ var g = (function() {
9
+ var e = /* @__PURE__ */ r(function(e, t, n, r) {
10
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
+ return n;
12
+ }, "o"), t = [1, 2], n = [1, 3], i = [1, 4], a = [2, 4], o = [1, 9], s = [1, 11], c = [1, 16], l = [1, 17], u = [1, 18], d = [1, 19], f = [1, 33], p = [1, 20], m = [1, 21], h = [1, 22], g = [1, 23], _ = [1, 24], v = [1, 26], y = [1, 27], b = [1, 28], x = [1, 29], S = [1, 30], C = [1, 31], w = [1, 32], T = [1, 35], E = [1, 36], D = [1, 37], O = [1, 38], k = [1, 34], A = [
13
+ 1,
14
+ 4,
15
+ 5,
16
+ 16,
17
+ 17,
18
+ 19,
19
+ 21,
20
+ 22,
21
+ 24,
22
+ 25,
23
+ 26,
24
+ 27,
25
+ 28,
26
+ 29,
27
+ 33,
28
+ 35,
29
+ 37,
30
+ 38,
31
+ 41,
32
+ 45,
33
+ 48,
34
+ 51,
35
+ 52,
36
+ 53,
37
+ 54,
38
+ 57
39
+ ], j = [
40
+ 1,
41
+ 4,
42
+ 5,
43
+ 14,
44
+ 15,
45
+ 16,
46
+ 17,
47
+ 19,
48
+ 21,
49
+ 22,
50
+ 24,
51
+ 25,
52
+ 26,
53
+ 27,
54
+ 28,
55
+ 29,
56
+ 33,
57
+ 35,
58
+ 37,
59
+ 38,
60
+ 39,
61
+ 40,
62
+ 41,
63
+ 45,
64
+ 48,
65
+ 51,
66
+ 52,
67
+ 53,
68
+ 54,
69
+ 57
70
+ ], M = [
71
+ 4,
72
+ 5,
73
+ 16,
74
+ 17,
75
+ 19,
76
+ 21,
77
+ 22,
78
+ 24,
79
+ 25,
80
+ 26,
81
+ 27,
82
+ 28,
83
+ 29,
84
+ 33,
85
+ 35,
86
+ 37,
87
+ 38,
88
+ 41,
89
+ 45,
90
+ 48,
91
+ 51,
92
+ 52,
93
+ 53,
94
+ 54,
95
+ 57
96
+ ], N = {
97
+ trace: /* @__PURE__ */ r(function() {}, "trace"),
98
+ yy: {},
99
+ symbols_: {
100
+ error: 2,
101
+ start: 3,
102
+ SPACE: 4,
103
+ NL: 5,
104
+ SD: 6,
105
+ document: 7,
106
+ line: 8,
107
+ statement: 9,
108
+ classDefStatement: 10,
109
+ styleStatement: 11,
110
+ cssClassStatement: 12,
111
+ idStatement: 13,
112
+ DESCR: 14,
113
+ "-->": 15,
114
+ HIDE_EMPTY: 16,
115
+ scale: 17,
116
+ WIDTH: 18,
117
+ COMPOSIT_STATE: 19,
118
+ STRUCT_START: 20,
119
+ STRUCT_STOP: 21,
120
+ STATE_DESCR: 22,
121
+ AS: 23,
122
+ ID: 24,
123
+ FORK: 25,
124
+ JOIN: 26,
125
+ CHOICE: 27,
126
+ CONCURRENT: 28,
127
+ note: 29,
128
+ notePosition: 30,
129
+ NOTE_TEXT: 31,
130
+ direction: 32,
131
+ acc_title: 33,
132
+ acc_title_value: 34,
133
+ acc_descr: 35,
134
+ acc_descr_value: 36,
135
+ acc_descr_multiline_value: 37,
136
+ CLICK: 38,
137
+ STRING: 39,
138
+ HREF: 40,
139
+ classDef: 41,
140
+ CLASSDEF_ID: 42,
141
+ CLASSDEF_STYLEOPTS: 43,
142
+ DEFAULT: 44,
143
+ style: 45,
144
+ STYLE_IDS: 46,
145
+ STYLEDEF_STYLEOPTS: 47,
146
+ class: 48,
147
+ CLASSENTITY_IDS: 49,
148
+ STYLECLASS: 50,
149
+ direction_tb: 51,
150
+ direction_bt: 52,
151
+ direction_rl: 53,
152
+ direction_lr: 54,
153
+ eol: 55,
154
+ ";": 56,
155
+ EDGE_STATE: 57,
156
+ STYLE_SEPARATOR: 58,
157
+ left_of: 59,
158
+ right_of: 60,
159
+ $accept: 0,
160
+ $end: 1
161
+ },
162
+ terminals_: {
163
+ 2: "error",
164
+ 4: "SPACE",
165
+ 5: "NL",
166
+ 6: "SD",
167
+ 14: "DESCR",
168
+ 15: "-->",
169
+ 16: "HIDE_EMPTY",
170
+ 17: "scale",
171
+ 18: "WIDTH",
172
+ 19: "COMPOSIT_STATE",
173
+ 20: "STRUCT_START",
174
+ 21: "STRUCT_STOP",
175
+ 22: "STATE_DESCR",
176
+ 23: "AS",
177
+ 24: "ID",
178
+ 25: "FORK",
179
+ 26: "JOIN",
180
+ 27: "CHOICE",
181
+ 28: "CONCURRENT",
182
+ 29: "note",
183
+ 31: "NOTE_TEXT",
184
+ 33: "acc_title",
185
+ 34: "acc_title_value",
186
+ 35: "acc_descr",
187
+ 36: "acc_descr_value",
188
+ 37: "acc_descr_multiline_value",
189
+ 38: "CLICK",
190
+ 39: "STRING",
191
+ 40: "HREF",
192
+ 41: "classDef",
193
+ 42: "CLASSDEF_ID",
194
+ 43: "CLASSDEF_STYLEOPTS",
195
+ 44: "DEFAULT",
196
+ 45: "style",
197
+ 46: "STYLE_IDS",
198
+ 47: "STYLEDEF_STYLEOPTS",
199
+ 48: "class",
200
+ 49: "CLASSENTITY_IDS",
201
+ 50: "STYLECLASS",
202
+ 51: "direction_tb",
203
+ 52: "direction_bt",
204
+ 53: "direction_rl",
205
+ 54: "direction_lr",
206
+ 56: ";",
207
+ 57: "EDGE_STATE",
208
+ 58: "STYLE_SEPARATOR",
209
+ 59: "left_of",
210
+ 60: "right_of"
211
+ },
212
+ productions_: [
213
+ 0,
214
+ [3, 2],
215
+ [3, 2],
216
+ [3, 2],
217
+ [7, 0],
218
+ [7, 2],
219
+ [8, 2],
220
+ [8, 1],
221
+ [8, 1],
222
+ [9, 1],
223
+ [9, 1],
224
+ [9, 1],
225
+ [9, 1],
226
+ [9, 2],
227
+ [9, 3],
228
+ [9, 4],
229
+ [9, 1],
230
+ [9, 2],
231
+ [9, 1],
232
+ [9, 4],
233
+ [9, 3],
234
+ [9, 6],
235
+ [9, 1],
236
+ [9, 1],
237
+ [9, 1],
238
+ [9, 1],
239
+ [9, 4],
240
+ [9, 4],
241
+ [9, 1],
242
+ [9, 2],
243
+ [9, 2],
244
+ [9, 1],
245
+ [9, 5],
246
+ [9, 5],
247
+ [10, 3],
248
+ [10, 3],
249
+ [11, 3],
250
+ [12, 3],
251
+ [32, 1],
252
+ [32, 1],
253
+ [32, 1],
254
+ [32, 1],
255
+ [55, 1],
256
+ [55, 1],
257
+ [13, 1],
258
+ [13, 1],
259
+ [13, 3],
260
+ [13, 3],
261
+ [30, 1],
262
+ [30, 1]
263
+ ],
264
+ performAction: /* @__PURE__ */ r(function(e, t, n, r, i, a, o) {
265
+ var s = a.length - 1;
266
+ switch (i) {
267
+ case 3: return r.setRootDoc(a[s]), a[s];
268
+ case 4:
269
+ this.$ = [];
270
+ break;
271
+ case 5:
272
+ a[s] != "nl" && (a[s - 1].push(a[s]), this.$ = a[s - 1]);
273
+ break;
274
+ case 6:
275
+ case 7:
276
+ this.$ = a[s];
277
+ break;
278
+ case 8:
279
+ this.$ = "nl";
280
+ break;
281
+ case 12:
282
+ this.$ = a[s];
283
+ break;
284
+ case 13:
285
+ let e = a[s - 1];
286
+ e.description = r.trimColon(a[s]), this.$ = e;
287
+ break;
288
+ case 14:
289
+ this.$ = {
290
+ stmt: "relation",
291
+ state1: a[s - 2],
292
+ state2: a[s]
293
+ };
294
+ break;
295
+ case 15:
296
+ let t = r.trimColon(a[s]);
297
+ this.$ = {
298
+ stmt: "relation",
299
+ state1: a[s - 3],
300
+ state2: a[s - 1],
301
+ description: t
302
+ };
303
+ break;
304
+ case 19:
305
+ this.$ = {
306
+ stmt: "state",
307
+ id: a[s - 3],
308
+ type: "default",
309
+ description: "",
310
+ doc: a[s - 1]
311
+ };
312
+ break;
313
+ case 20:
314
+ var c = a[s], l = a[s - 2].trim();
315
+ if (a[s].match(":")) {
316
+ var u = a[s].split(":");
317
+ c = u[0], l = [l, u[1]];
318
+ }
319
+ this.$ = {
320
+ stmt: "state",
321
+ id: c,
322
+ type: "default",
323
+ description: l
324
+ };
325
+ break;
326
+ case 21:
327
+ this.$ = {
328
+ stmt: "state",
329
+ id: a[s - 3],
330
+ type: "default",
331
+ description: a[s - 5],
332
+ doc: a[s - 1]
333
+ };
334
+ break;
335
+ case 22:
336
+ this.$ = {
337
+ stmt: "state",
338
+ id: a[s],
339
+ type: "fork"
340
+ };
341
+ break;
342
+ case 23:
343
+ this.$ = {
344
+ stmt: "state",
345
+ id: a[s],
346
+ type: "join"
347
+ };
348
+ break;
349
+ case 24:
350
+ this.$ = {
351
+ stmt: "state",
352
+ id: a[s],
353
+ type: "choice"
354
+ };
355
+ break;
356
+ case 25:
357
+ this.$ = {
358
+ stmt: "state",
359
+ id: r.getDividerId(),
360
+ type: "divider"
361
+ };
362
+ break;
363
+ case 26:
364
+ this.$ = {
365
+ stmt: "state",
366
+ id: a[s - 1].trim(),
367
+ note: {
368
+ position: a[s - 2].trim(),
369
+ text: a[s].trim()
370
+ }
371
+ };
372
+ break;
373
+ case 29:
374
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
375
+ break;
376
+ case 30:
377
+ case 31:
378
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
379
+ break;
380
+ case 32:
381
+ this.$ = {
382
+ stmt: "click",
383
+ id: a[s - 3],
384
+ url: a[s - 2],
385
+ tooltip: a[s - 1]
386
+ };
387
+ break;
388
+ case 33:
389
+ this.$ = {
390
+ stmt: "click",
391
+ id: a[s - 3],
392
+ url: a[s - 1],
393
+ tooltip: ""
394
+ };
395
+ break;
396
+ case 34:
397
+ case 35:
398
+ this.$ = {
399
+ stmt: "classDef",
400
+ id: a[s - 1].trim(),
401
+ classes: a[s].trim()
402
+ };
403
+ break;
404
+ case 36:
405
+ this.$ = {
406
+ stmt: "style",
407
+ id: a[s - 1].trim(),
408
+ styleClass: a[s].trim()
409
+ };
410
+ break;
411
+ case 37:
412
+ this.$ = {
413
+ stmt: "applyClass",
414
+ id: a[s - 1].trim(),
415
+ styleClass: a[s].trim()
416
+ };
417
+ break;
418
+ case 38:
419
+ r.setDirection("TB"), this.$ = {
420
+ stmt: "dir",
421
+ value: "TB"
422
+ };
423
+ break;
424
+ case 39:
425
+ r.setDirection("BT"), this.$ = {
426
+ stmt: "dir",
427
+ value: "BT"
428
+ };
429
+ break;
430
+ case 40:
431
+ r.setDirection("RL"), this.$ = {
432
+ stmt: "dir",
433
+ value: "RL"
434
+ };
435
+ break;
436
+ case 41:
437
+ r.setDirection("LR"), this.$ = {
438
+ stmt: "dir",
439
+ value: "LR"
440
+ };
441
+ break;
442
+ case 44:
443
+ case 45:
444
+ this.$ = {
445
+ stmt: "state",
446
+ id: a[s].trim(),
447
+ type: "default",
448
+ description: ""
449
+ };
450
+ break;
451
+ case 46:
452
+ this.$ = {
453
+ stmt: "state",
454
+ id: a[s - 2].trim(),
455
+ classes: [a[s].trim()],
456
+ type: "default",
457
+ description: ""
458
+ };
459
+ break;
460
+ case 47:
461
+ this.$ = {
462
+ stmt: "state",
463
+ id: a[s - 2].trim(),
464
+ classes: [a[s].trim()],
465
+ type: "default",
466
+ description: ""
467
+ };
468
+ break;
469
+ }
470
+ }, "anonymous"),
471
+ table: [
472
+ {
473
+ 3: 1,
474
+ 4: t,
475
+ 5: n,
476
+ 6: i
477
+ },
478
+ { 1: [3] },
479
+ {
480
+ 3: 5,
481
+ 4: t,
482
+ 5: n,
483
+ 6: i
484
+ },
485
+ {
486
+ 3: 6,
487
+ 4: t,
488
+ 5: n,
489
+ 6: i
490
+ },
491
+ e([
492
+ 1,
493
+ 4,
494
+ 5,
495
+ 16,
496
+ 17,
497
+ 19,
498
+ 22,
499
+ 24,
500
+ 25,
501
+ 26,
502
+ 27,
503
+ 28,
504
+ 29,
505
+ 33,
506
+ 35,
507
+ 37,
508
+ 38,
509
+ 41,
510
+ 45,
511
+ 48,
512
+ 51,
513
+ 52,
514
+ 53,
515
+ 54,
516
+ 57
517
+ ], a, { 7: 7 }),
518
+ { 1: [2, 1] },
519
+ { 1: [2, 2] },
520
+ {
521
+ 1: [2, 3],
522
+ 4: o,
523
+ 5: s,
524
+ 8: 8,
525
+ 9: 10,
526
+ 10: 12,
527
+ 11: 13,
528
+ 12: 14,
529
+ 13: 15,
530
+ 16: c,
531
+ 17: l,
532
+ 19: u,
533
+ 22: d,
534
+ 24: f,
535
+ 25: p,
536
+ 26: m,
537
+ 27: h,
538
+ 28: g,
539
+ 29: _,
540
+ 32: 25,
541
+ 33: v,
542
+ 35: y,
543
+ 37: b,
544
+ 38: x,
545
+ 41: S,
546
+ 45: C,
547
+ 48: w,
548
+ 51: T,
549
+ 52: E,
550
+ 53: D,
551
+ 54: O,
552
+ 57: k
553
+ },
554
+ e(A, [2, 5]),
555
+ {
556
+ 9: 39,
557
+ 10: 12,
558
+ 11: 13,
559
+ 12: 14,
560
+ 13: 15,
561
+ 16: c,
562
+ 17: l,
563
+ 19: u,
564
+ 22: d,
565
+ 24: f,
566
+ 25: p,
567
+ 26: m,
568
+ 27: h,
569
+ 28: g,
570
+ 29: _,
571
+ 32: 25,
572
+ 33: v,
573
+ 35: y,
574
+ 37: b,
575
+ 38: x,
576
+ 41: S,
577
+ 45: C,
578
+ 48: w,
579
+ 51: T,
580
+ 52: E,
581
+ 53: D,
582
+ 54: O,
583
+ 57: k
584
+ },
585
+ e(A, [2, 7]),
586
+ e(A, [2, 8]),
587
+ e(A, [2, 9]),
588
+ e(A, [2, 10]),
589
+ e(A, [2, 11]),
590
+ e(A, [2, 12], {
591
+ 14: [1, 40],
592
+ 15: [1, 41]
593
+ }),
594
+ e(A, [2, 16]),
595
+ { 18: [1, 42] },
596
+ e(A, [2, 18], { 20: [1, 43] }),
597
+ { 23: [1, 44] },
598
+ e(A, [2, 22]),
599
+ e(A, [2, 23]),
600
+ e(A, [2, 24]),
601
+ e(A, [2, 25]),
602
+ {
603
+ 30: 45,
604
+ 31: [1, 46],
605
+ 59: [1, 47],
606
+ 60: [1, 48]
607
+ },
608
+ e(A, [2, 28]),
609
+ { 34: [1, 49] },
610
+ { 36: [1, 50] },
611
+ e(A, [2, 31]),
612
+ {
613
+ 13: 51,
614
+ 24: f,
615
+ 57: k
616
+ },
617
+ {
618
+ 42: [1, 52],
619
+ 44: [1, 53]
620
+ },
621
+ { 46: [1, 54] },
622
+ { 49: [1, 55] },
623
+ e(j, [2, 44], { 58: [1, 56] }),
624
+ e(j, [2, 45], { 58: [1, 57] }),
625
+ e(A, [2, 38]),
626
+ e(A, [2, 39]),
627
+ e(A, [2, 40]),
628
+ e(A, [2, 41]),
629
+ e(A, [2, 6]),
630
+ e(A, [2, 13]),
631
+ {
632
+ 13: 58,
633
+ 24: f,
634
+ 57: k
635
+ },
636
+ e(A, [2, 17]),
637
+ e(M, a, { 7: 59 }),
638
+ { 24: [1, 60] },
639
+ { 24: [1, 61] },
640
+ { 23: [1, 62] },
641
+ { 24: [2, 48] },
642
+ { 24: [2, 49] },
643
+ e(A, [2, 29]),
644
+ e(A, [2, 30]),
645
+ {
646
+ 39: [1, 63],
647
+ 40: [1, 64]
648
+ },
649
+ { 43: [1, 65] },
650
+ { 43: [1, 66] },
651
+ { 47: [1, 67] },
652
+ { 50: [1, 68] },
653
+ { 24: [1, 69] },
654
+ { 24: [1, 70] },
655
+ e(A, [2, 14], { 14: [1, 71] }),
656
+ {
657
+ 4: o,
658
+ 5: s,
659
+ 8: 8,
660
+ 9: 10,
661
+ 10: 12,
662
+ 11: 13,
663
+ 12: 14,
664
+ 13: 15,
665
+ 16: c,
666
+ 17: l,
667
+ 19: u,
668
+ 21: [1, 72],
669
+ 22: d,
670
+ 24: f,
671
+ 25: p,
672
+ 26: m,
673
+ 27: h,
674
+ 28: g,
675
+ 29: _,
676
+ 32: 25,
677
+ 33: v,
678
+ 35: y,
679
+ 37: b,
680
+ 38: x,
681
+ 41: S,
682
+ 45: C,
683
+ 48: w,
684
+ 51: T,
685
+ 52: E,
686
+ 53: D,
687
+ 54: O,
688
+ 57: k
689
+ },
690
+ e(A, [2, 20], { 20: [1, 73] }),
691
+ { 31: [1, 74] },
692
+ { 24: [1, 75] },
693
+ { 39: [1, 76] },
694
+ { 39: [1, 77] },
695
+ e(A, [2, 34]),
696
+ e(A, [2, 35]),
697
+ e(A, [2, 36]),
698
+ e(A, [2, 37]),
699
+ e(j, [2, 46]),
700
+ e(j, [2, 47]),
701
+ e(A, [2, 15]),
702
+ e(A, [2, 19]),
703
+ e(M, a, { 7: 78 }),
704
+ e(A, [2, 26]),
705
+ e(A, [2, 27]),
706
+ { 5: [1, 79] },
707
+ { 5: [1, 80] },
708
+ {
709
+ 4: o,
710
+ 5: s,
711
+ 8: 8,
712
+ 9: 10,
713
+ 10: 12,
714
+ 11: 13,
715
+ 12: 14,
716
+ 13: 15,
717
+ 16: c,
718
+ 17: l,
719
+ 19: u,
720
+ 21: [1, 81],
721
+ 22: d,
722
+ 24: f,
723
+ 25: p,
724
+ 26: m,
725
+ 27: h,
726
+ 28: g,
727
+ 29: _,
728
+ 32: 25,
729
+ 33: v,
730
+ 35: y,
731
+ 37: b,
732
+ 38: x,
733
+ 41: S,
734
+ 45: C,
735
+ 48: w,
736
+ 51: T,
737
+ 52: E,
738
+ 53: D,
739
+ 54: O,
740
+ 57: k
741
+ },
742
+ e(A, [2, 32]),
743
+ e(A, [2, 33]),
744
+ e(A, [2, 21])
745
+ ],
746
+ defaultActions: {
747
+ 5: [2, 1],
748
+ 6: [2, 2],
749
+ 47: [2, 48],
750
+ 48: [2, 49]
751
+ },
752
+ parseError: /* @__PURE__ */ r(function(e, t) {
753
+ if (t.recoverable) this.trace(e);
754
+ else {
755
+ var n = Error(e);
756
+ throw n.hash = t, n;
757
+ }
758
+ }, "parseError"),
759
+ parse: /* @__PURE__ */ r(function(e) {
760
+ var t = this, n = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
761
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
762
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
763
+ var v = h.yylloc;
764
+ o.push(v);
765
+ var y = h.options && h.options.ranges;
766
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
767
+ function b(e) {
768
+ n.length -= 2 * e, a.length -= e, o.length -= e;
769
+ }
770
+ r(b, "popStack");
771
+ function x() {
772
+ var e = i.pop() || h.lex() || p;
773
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
774
+ }
775
+ r(x, "lex");
776
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
777
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
778
+ var M = "";
779
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
780
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
781
+ text: h.match,
782
+ token: this.terminals_[S] || S,
783
+ line: h.yylineno,
784
+ loc: v,
785
+ expected: j
786
+ });
787
+ }
788
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
789
+ switch (T[0]) {
790
+ case 1:
791
+ n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
792
+ break;
793
+ case 2:
794
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
795
+ first_line: o[o.length - (k || 1)].first_line,
796
+ last_line: o[o.length - 1].last_line,
797
+ first_column: o[o.length - (k || 1)].first_column,
798
+ last_column: o[o.length - 1].last_column
799
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
800
+ c,
801
+ u,
802
+ l,
803
+ g.yy,
804
+ T[1],
805
+ a,
806
+ o
807
+ ].concat(m)), E !== void 0) return E;
808
+ k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[n[n.length - 2]][n[n.length - 1]], n.push(A);
809
+ break;
810
+ case 3: return !0;
811
+ }
812
+ }
813
+ return !0;
814
+ }, "parse")
815
+ };
816
+ N.lexer = /* @__PURE__ */ (function() {
817
+ return {
818
+ EOF: 1,
819
+ parseError: /* @__PURE__ */ r(function(e, t) {
820
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
821
+ else throw Error(e);
822
+ }, "parseError"),
823
+ setInput: /* @__PURE__ */ r(function(e, t) {
824
+ 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 = {
825
+ first_line: 1,
826
+ first_column: 0,
827
+ last_line: 1,
828
+ last_column: 0
829
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
830
+ }, "setInput"),
831
+ input: /* @__PURE__ */ r(function() {
832
+ var e = this._input[0];
833
+ 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;
834
+ }, "input"),
835
+ unput: /* @__PURE__ */ r(function(e) {
836
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
837
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
838
+ var r = this.match.split(/(?:\r\n?|\n)/g);
839
+ 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);
840
+ var i = this.yylloc.range;
841
+ return this.yylloc = {
842
+ first_line: this.yylloc.first_line,
843
+ last_line: this.yylineno + 1,
844
+ first_column: this.yylloc.first_column,
845
+ 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
846
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
847
+ }, "unput"),
848
+ more: /* @__PURE__ */ r(function() {
849
+ return this._more = !0, this;
850
+ }, "more"),
851
+ reject: /* @__PURE__ */ r(function() {
852
+ if (this.options.backtrack_lexer) this._backtrack = !0;
853
+ 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(), {
854
+ text: "",
855
+ token: null,
856
+ line: this.yylineno
857
+ });
858
+ return this;
859
+ }, "reject"),
860
+ less: /* @__PURE__ */ r(function(e) {
861
+ this.unput(this.match.slice(e));
862
+ }, "less"),
863
+ pastInput: /* @__PURE__ */ r(function() {
864
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
865
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
866
+ }, "pastInput"),
867
+ upcomingInput: /* @__PURE__ */ r(function() {
868
+ var e = this.match;
869
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
870
+ }, "upcomingInput"),
871
+ showPosition: /* @__PURE__ */ r(function() {
872
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
873
+ return e + this.upcomingInput() + "\n" + t + "^";
874
+ }, "showPosition"),
875
+ test_match: /* @__PURE__ */ r(function(e, t) {
876
+ var n, r, i;
877
+ if (this.options.backtrack_lexer && (i = {
878
+ yylineno: this.yylineno,
879
+ yylloc: {
880
+ first_line: this.yylloc.first_line,
881
+ last_line: this.last_line,
882
+ first_column: this.yylloc.first_column,
883
+ last_column: this.yylloc.last_column
884
+ },
885
+ yytext: this.yytext,
886
+ match: this.match,
887
+ matches: this.matches,
888
+ matched: this.matched,
889
+ yyleng: this.yyleng,
890
+ offset: this.offset,
891
+ _more: this._more,
892
+ _input: this._input,
893
+ yy: this.yy,
894
+ conditionStack: this.conditionStack.slice(0),
895
+ done: this.done
896
+ }, 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 = {
897
+ first_line: this.yylloc.last_line,
898
+ last_line: this.yylineno + 1,
899
+ first_column: this.yylloc.last_column,
900
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
901
+ }, 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;
902
+ if (this._backtrack) {
903
+ for (var a in i) this[a] = i[a];
904
+ return !1;
905
+ }
906
+ return !1;
907
+ }, "test_match"),
908
+ next: /* @__PURE__ */ r(function() {
909
+ if (this.done) return this.EOF;
910
+ this._input || (this.done = !0);
911
+ var e, t, n, r;
912
+ this._more || (this.yytext = "", this.match = "");
913
+ 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)) {
914
+ if (t = n, r = a, this.options.backtrack_lexer) {
915
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
916
+ if (this._backtrack) {
917
+ t = !1;
918
+ continue;
919
+ } else return !1;
920
+ } else if (!this.options.flex) break;
921
+ }
922
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
923
+ text: "",
924
+ token: null,
925
+ line: this.yylineno
926
+ });
927
+ }, "next"),
928
+ lex: /* @__PURE__ */ r(function() {
929
+ return this.next() || this.lex();
930
+ }, "lex"),
931
+ begin: /* @__PURE__ */ r(function(e) {
932
+ this.conditionStack.push(e);
933
+ }, "begin"),
934
+ popState: /* @__PURE__ */ r(function() {
935
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
936
+ }, "popState"),
937
+ _currentRules: /* @__PURE__ */ r(function() {
938
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
939
+ }, "_currentRules"),
940
+ topState: /* @__PURE__ */ r(function(e) {
941
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
942
+ }, "topState"),
943
+ pushState: /* @__PURE__ */ r(function(e) {
944
+ this.begin(e);
945
+ }, "pushState"),
946
+ stateStackSize: /* @__PURE__ */ r(function() {
947
+ return this.conditionStack.length;
948
+ }, "stateStackSize"),
949
+ options: { "case-insensitive": !0 },
950
+ performAction: /* @__PURE__ */ r(function(e, t, n, r) {
951
+ switch (n) {
952
+ case 0: return 38;
953
+ case 1: return 40;
954
+ case 2: return 39;
955
+ case 3: return 44;
956
+ case 4: return 51;
957
+ case 5: return 52;
958
+ case 6: return 53;
959
+ case 7: return 54;
960
+ case 8: break;
961
+ case 9: break;
962
+ case 10: return 5;
963
+ case 11: break;
964
+ case 12: break;
965
+ case 13: break;
966
+ case 14: break;
967
+ case 15: return this.pushState("SCALE"), 17;
968
+ case 16: return 18;
969
+ case 17:
970
+ this.popState();
971
+ break;
972
+ case 18: return this.begin("acc_title"), 33;
973
+ case 19: return this.popState(), "acc_title_value";
974
+ case 20: return this.begin("acc_descr"), 35;
975
+ case 21: return this.popState(), "acc_descr_value";
976
+ case 22:
977
+ this.begin("acc_descr_multiline");
978
+ break;
979
+ case 23:
980
+ this.popState();
981
+ break;
982
+ case 24: return "acc_descr_multiline_value";
983
+ case 25: return this.pushState("CLASSDEF"), 41;
984
+ case 26: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
985
+ case 27: return this.popState(), this.pushState("CLASSDEFID"), 42;
986
+ case 28: return this.popState(), 43;
987
+ case 29: return this.pushState("CLASS"), 48;
988
+ case 30: return this.popState(), this.pushState("CLASS_STYLE"), 49;
989
+ case 31: return this.popState(), 50;
990
+ case 32: return this.pushState("STYLE"), 45;
991
+ case 33: return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
992
+ case 34: return this.popState(), 47;
993
+ case 35: return this.pushState("SCALE"), 17;
994
+ case 36: return 18;
995
+ case 37:
996
+ this.popState();
997
+ break;
998
+ case 38:
999
+ this.pushState("STATE");
1000
+ break;
1001
+ case 39: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 25;
1002
+ case 40: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 26;
1003
+ case 41: return this.popState(), t.yytext = t.yytext.slice(0, -10).trim(), 27;
1004
+ case 42: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 25;
1005
+ case 43: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 26;
1006
+ case 44: return this.popState(), t.yytext = t.yytext.slice(0, -10).trim(), 27;
1007
+ case 45: return 51;
1008
+ case 46: return 52;
1009
+ case 47: return 53;
1010
+ case 48: return 54;
1011
+ case 49:
1012
+ this.pushState("STATE_STRING");
1013
+ break;
1014
+ case 50: return this.pushState("STATE_ID"), "AS";
1015
+ case 51: return this.popState(), "ID";
1016
+ case 52:
1017
+ this.popState();
1018
+ break;
1019
+ case 53: return "STATE_DESCR";
1020
+ case 54: return 19;
1021
+ case 55:
1022
+ this.popState();
1023
+ break;
1024
+ case 56: return this.popState(), this.pushState("struct"), 20;
1025
+ case 57: break;
1026
+ case 58: return this.popState(), 21;
1027
+ case 59: break;
1028
+ case 60: return this.begin("NOTE"), 29;
1029
+ case 61: return this.popState(), this.pushState("NOTE_ID"), 59;
1030
+ case 62: return this.popState(), this.pushState("NOTE_ID"), 60;
1031
+ case 63:
1032
+ this.popState(), this.pushState("FLOATING_NOTE");
1033
+ break;
1034
+ case 64: return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
1035
+ case 65: break;
1036
+ case 66: return "NOTE_TEXT";
1037
+ case 67: return this.popState(), "ID";
1038
+ case 68: return this.popState(), this.pushState("NOTE_TEXT"), 24;
1039
+ case 69: return this.popState(), t.yytext = t.yytext.substr(2).trim(), 31;
1040
+ case 70: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 31;
1041
+ case 71: return 6;
1042
+ case 72: return 6;
1043
+ case 73: return 16;
1044
+ case 74: return 57;
1045
+ case 75: return 24;
1046
+ case 76: return t.yytext = t.yytext.trim(), 14;
1047
+ case 77: return 15;
1048
+ case 78: return 28;
1049
+ case 79: return 58;
1050
+ case 80: return 5;
1051
+ case 81: return "INVALID";
1052
+ }
1053
+ }, "anonymous"),
1054
+ rules: [
1055
+ /^(?:click\b)/i,
1056
+ /^(?:href\b)/i,
1057
+ /^(?:"[^"]*")/i,
1058
+ /^(?:default\b)/i,
1059
+ /^(?:.*direction\s+TB[^\n]*)/i,
1060
+ /^(?:.*direction\s+BT[^\n]*)/i,
1061
+ /^(?:.*direction\s+RL[^\n]*)/i,
1062
+ /^(?:.*direction\s+LR[^\n]*)/i,
1063
+ /^(?:%%(?!\{)[^\n]*)/i,
1064
+ /^(?:[^\}]%%[^\n]*)/i,
1065
+ /^(?:[\n]+)/i,
1066
+ /^(?:[\s]+)/i,
1067
+ /^(?:((?!\n)\s)+)/i,
1068
+ /^(?:#[^\n]*)/i,
1069
+ /^(?:%[^\n]*)/i,
1070
+ /^(?:scale\s+)/i,
1071
+ /^(?:\d+)/i,
1072
+ /^(?:\s+width\b)/i,
1073
+ /^(?:accTitle\s*:\s*)/i,
1074
+ /^(?:(?!\n||)*[^\n]*)/i,
1075
+ /^(?:accDescr\s*:\s*)/i,
1076
+ /^(?:(?!\n||)*[^\n]*)/i,
1077
+ /^(?:accDescr\s*\{\s*)/i,
1078
+ /^(?:[\}])/i,
1079
+ /^(?:[^\}]*)/i,
1080
+ /^(?:classDef\s+)/i,
1081
+ /^(?:DEFAULT\s+)/i,
1082
+ /^(?:\w+\s+)/i,
1083
+ /^(?:[^\n]*)/i,
1084
+ /^(?:class\s+)/i,
1085
+ /^(?:(\w+)+((,\s*\w+)*))/i,
1086
+ /^(?:[^\n]*)/i,
1087
+ /^(?:style\s+)/i,
1088
+ /^(?:[\w,]+\s+)/i,
1089
+ /^(?:[^\n]*)/i,
1090
+ /^(?:scale\s+)/i,
1091
+ /^(?:\d+)/i,
1092
+ /^(?:\s+width\b)/i,
1093
+ /^(?:state\s+)/i,
1094
+ /^(?:.*<<fork>>)/i,
1095
+ /^(?:.*<<join>>)/i,
1096
+ /^(?:.*<<choice>>)/i,
1097
+ /^(?:.*\[\[fork\]\])/i,
1098
+ /^(?:.*\[\[join\]\])/i,
1099
+ /^(?:.*\[\[choice\]\])/i,
1100
+ /^(?:.*direction\s+TB[^\n]*)/i,
1101
+ /^(?:.*direction\s+BT[^\n]*)/i,
1102
+ /^(?:.*direction\s+RL[^\n]*)/i,
1103
+ /^(?:.*direction\s+LR[^\n]*)/i,
1104
+ /^(?:["])/i,
1105
+ /^(?:\s*as\s+)/i,
1106
+ /^(?:[^\n\{]*)/i,
1107
+ /^(?:["])/i,
1108
+ /^(?:[^"]*)/i,
1109
+ /^(?:[^\n\s\{]+)/i,
1110
+ /^(?:\n)/i,
1111
+ /^(?:\{)/i,
1112
+ /^(?:%%(?!\{)[^\n]*)/i,
1113
+ /^(?:\})/i,
1114
+ /^(?:[\n])/i,
1115
+ /^(?:note\s+)/i,
1116
+ /^(?:left of\b)/i,
1117
+ /^(?:right of\b)/i,
1118
+ /^(?:")/i,
1119
+ /^(?:\s*as\s*)/i,
1120
+ /^(?:["])/i,
1121
+ /^(?:[^"]*)/i,
1122
+ /^(?:[^\n]*)/i,
1123
+ /^(?:\s*[^:\n\s\-]+)/i,
1124
+ /^(?:\s*:[^:\n;]+)/i,
1125
+ /^(?:[\s\S]*?end note\b)/i,
1126
+ /^(?:stateDiagram\s+)/i,
1127
+ /^(?:stateDiagram-v2\s+)/i,
1128
+ /^(?:hide empty description\b)/i,
1129
+ /^(?:\[\*\])/i,
1130
+ /^(?:[^:\n\s\-\{]+)/i,
1131
+ /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,
1132
+ /^(?:-->)/i,
1133
+ /^(?:--)/i,
1134
+ /^(?::::)/i,
1135
+ /^(?:$)/i,
1136
+ /^(?:.)/i
1137
+ ],
1138
+ conditions: {
1139
+ LINE: {
1140
+ rules: [12, 13],
1141
+ inclusive: !1
1142
+ },
1143
+ struct: {
1144
+ rules: [
1145
+ 12,
1146
+ 13,
1147
+ 25,
1148
+ 29,
1149
+ 32,
1150
+ 38,
1151
+ 45,
1152
+ 46,
1153
+ 47,
1154
+ 48,
1155
+ 57,
1156
+ 58,
1157
+ 59,
1158
+ 60,
1159
+ 74,
1160
+ 75,
1161
+ 76,
1162
+ 77,
1163
+ 78
1164
+ ],
1165
+ inclusive: !1
1166
+ },
1167
+ FLOATING_NOTE_ID: {
1168
+ rules: [67],
1169
+ inclusive: !1
1170
+ },
1171
+ FLOATING_NOTE: {
1172
+ rules: [
1173
+ 64,
1174
+ 65,
1175
+ 66
1176
+ ],
1177
+ inclusive: !1
1178
+ },
1179
+ NOTE_TEXT: {
1180
+ rules: [69, 70],
1181
+ inclusive: !1
1182
+ },
1183
+ NOTE_ID: {
1184
+ rules: [68],
1185
+ inclusive: !1
1186
+ },
1187
+ NOTE: {
1188
+ rules: [
1189
+ 61,
1190
+ 62,
1191
+ 63
1192
+ ],
1193
+ inclusive: !1
1194
+ },
1195
+ STYLEDEF_STYLEOPTS: {
1196
+ rules: [],
1197
+ inclusive: !1
1198
+ },
1199
+ STYLEDEF_STYLES: {
1200
+ rules: [34],
1201
+ inclusive: !1
1202
+ },
1203
+ STYLE_IDS: {
1204
+ rules: [],
1205
+ inclusive: !1
1206
+ },
1207
+ STYLE: {
1208
+ rules: [33],
1209
+ inclusive: !1
1210
+ },
1211
+ CLASS_STYLE: {
1212
+ rules: [31],
1213
+ inclusive: !1
1214
+ },
1215
+ CLASS: {
1216
+ rules: [30],
1217
+ inclusive: !1
1218
+ },
1219
+ CLASSDEFID: {
1220
+ rules: [28],
1221
+ inclusive: !1
1222
+ },
1223
+ CLASSDEF: {
1224
+ rules: [26, 27],
1225
+ inclusive: !1
1226
+ },
1227
+ acc_descr_multiline: {
1228
+ rules: [23, 24],
1229
+ inclusive: !1
1230
+ },
1231
+ acc_descr: {
1232
+ rules: [21],
1233
+ inclusive: !1
1234
+ },
1235
+ acc_title: {
1236
+ rules: [19],
1237
+ inclusive: !1
1238
+ },
1239
+ SCALE: {
1240
+ rules: [
1241
+ 16,
1242
+ 17,
1243
+ 36,
1244
+ 37
1245
+ ],
1246
+ inclusive: !1
1247
+ },
1248
+ ALIAS: {
1249
+ rules: [],
1250
+ inclusive: !1
1251
+ },
1252
+ STATE_ID: {
1253
+ rules: [51],
1254
+ inclusive: !1
1255
+ },
1256
+ STATE_STRING: {
1257
+ rules: [52, 53],
1258
+ inclusive: !1
1259
+ },
1260
+ FORK_STATE: {
1261
+ rules: [],
1262
+ inclusive: !1
1263
+ },
1264
+ STATE: {
1265
+ rules: [
1266
+ 12,
1267
+ 13,
1268
+ 39,
1269
+ 40,
1270
+ 41,
1271
+ 42,
1272
+ 43,
1273
+ 44,
1274
+ 49,
1275
+ 50,
1276
+ 54,
1277
+ 55,
1278
+ 56
1279
+ ],
1280
+ inclusive: !1
1281
+ },
1282
+ ID: {
1283
+ rules: [12, 13],
1284
+ inclusive: !1
1285
+ },
1286
+ INITIAL: {
1287
+ rules: [
1288
+ 0,
1289
+ 1,
1290
+ 2,
1291
+ 3,
1292
+ 4,
1293
+ 5,
1294
+ 6,
1295
+ 7,
1296
+ 8,
1297
+ 9,
1298
+ 10,
1299
+ 11,
1300
+ 13,
1301
+ 14,
1302
+ 15,
1303
+ 18,
1304
+ 20,
1305
+ 22,
1306
+ 25,
1307
+ 29,
1308
+ 32,
1309
+ 35,
1310
+ 38,
1311
+ 56,
1312
+ 60,
1313
+ 71,
1314
+ 72,
1315
+ 73,
1316
+ 74,
1317
+ 75,
1318
+ 76,
1319
+ 77,
1320
+ 79,
1321
+ 80,
1322
+ 81
1323
+ ],
1324
+ inclusive: !0
1325
+ }
1326
+ }
1327
+ };
1328
+ })();
1329
+ function P() {
1330
+ this.yy = {};
1331
+ }
1332
+ return r(P, "Parser"), P.prototype = N, N.Parser = P, new P();
1333
+ })();
1334
+ g.parser = g;
1335
+ var _ = g, v = "TB", y = "TB", b = "dir", x = "state", S = "root", C = "relation", w = "classDef", T = "style", E = "applyClass", D = "default", O = "divider", k = "fill:none", A = "fill: #333", j = "c", M = "markdown", N = "normal", P = "rect", F = "rectWithTitle", ee = "stateStart", te = "stateEnd", I = "divider", L = "roundedWithTitle", ne = "note", re = "noteGroup", R = "statediagram", ie = `${R}-state`, ae = "transition", oe = "note", se = `${ae} note-edge`, ce = `${R}-${oe}`, le = `${R}-cluster`, ue = `${R}-cluster-alt`, z = "parent", B = "note", de = "state", V = "----", fe = `${V}${B}`, H = `${V}${z}`, U = /* @__PURE__ */ r((e, t = y) => {
1336
+ if (!e.doc) return t;
1337
+ let n = t;
1338
+ for (let t of e.doc) t.stmt === "dir" && (n = t.value);
1339
+ return n;
1340
+ }, "getDir"), pe = {
1341
+ getClasses: /* @__PURE__ */ r(function(e, t) {
1342
+ return t.db.getClasses();
1343
+ }, "getClasses"),
1344
+ draw: /* @__PURE__ */ r(async function(t, r, i, a) {
1345
+ n.info("REF0:"), n.info("Drawing state diagram (v2)", r);
1346
+ let { securityLevel: o, state: s, layout: c } = u();
1347
+ a.db.extract(a.db.getRootDocV2());
1348
+ let l = a.db.getData(), d = p(r, o);
1349
+ l.type = a.type, l.layoutAlgorithm = c, l.nodeSpacing = s?.nodeSpacing || 50, l.rankSpacing = s?.rankSpacing || 50, l.markers = ["barb"], l.diagramId = r, await h(l, d);
1350
+ try {
1351
+ (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((e, t) => {
1352
+ let r = typeof t == "string" ? t : typeof t?.id == "string" ? t.id : "";
1353
+ if (!r) {
1354
+ n.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(t));
1355
+ return;
1356
+ }
1357
+ let i = d.node()?.querySelectorAll("g"), a;
1358
+ if (i?.forEach((e) => {
1359
+ e.textContent?.trim() === r && (a = e);
1360
+ }), !a) {
1361
+ n.warn("⚠️ Could not find node matching text:", r);
1362
+ return;
1363
+ }
1364
+ let o = a.parentNode;
1365
+ if (!o) {
1366
+ n.warn("⚠️ Node has no parent, cannot wrap:", r);
1367
+ return;
1368
+ }
1369
+ let s = document.createElementNS("http://www.w3.org/2000/svg", "a"), c = e.url.replace(/^"+|"+$/g, "");
1370
+ if (s.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", c), s.setAttribute("target", "_blank"), e.tooltip) {
1371
+ let t = e.tooltip.replace(/^"+|"+$/g, "");
1372
+ s.setAttribute("title", t);
1373
+ }
1374
+ o.replaceChild(s, a), s.appendChild(a), n.info("🔗 Wrapped node in <a> tag for:", r, e.url);
1375
+ });
1376
+ } catch (e) {
1377
+ n.error("❌ Error injecting clickable links:", e);
1378
+ }
1379
+ e.insertTitle(d, "statediagramTitleText", s?.titleTopMargin ?? 25, a.db.getDiagramTitle()), m(d, 8, R, s?.useMaxWidth ?? !0);
1380
+ }, "draw"),
1381
+ getDir: U
1382
+ }, W = /* @__PURE__ */ new Map(), G = 0;
1383
+ function K(e = "", t = 0, n = "", r = V) {
1384
+ return `${de}-${e}${n !== null && n.length > 0 ? `${r}${n}` : ""}-${t}`;
1385
+ }
1386
+ r(K, "stateDomId");
1387
+ var me = /* @__PURE__ */ r((e, t, r, i, a, o, s, c) => {
1388
+ n.trace("items", t), t.forEach((t) => {
1389
+ switch (t.stmt) {
1390
+ case x:
1391
+ X(e, t, r, i, a, o, s, c);
1392
+ break;
1393
+ case D:
1394
+ X(e, t, r, i, a, o, s, c);
1395
+ break;
1396
+ case C:
1397
+ {
1398
+ X(e, t.state1, r, i, a, o, s, c), X(e, t.state2, r, i, a, o, s, c);
1399
+ let n = {
1400
+ id: "edge" + G,
1401
+ start: t.state1.id,
1402
+ end: t.state2.id,
1403
+ arrowhead: "normal",
1404
+ arrowTypeEnd: "arrow_barb",
1405
+ style: k,
1406
+ labelStyle: "",
1407
+ label: d.sanitizeText(t.description ?? "", u()),
1408
+ arrowheadStyle: A,
1409
+ labelpos: j,
1410
+ labelType: M,
1411
+ thickness: N,
1412
+ classes: ae,
1413
+ look: s
1414
+ };
1415
+ a.push(n), G++;
1416
+ }
1417
+ break;
1418
+ }
1419
+ });
1420
+ }, "setupDoc"), q = /* @__PURE__ */ r((e, t = y) => {
1421
+ let n = t;
1422
+ if (e.doc) for (let t of e.doc) t.stmt === "dir" && (n = t.value);
1423
+ return n;
1424
+ }, "getDir");
1425
+ function J(e, t, n) {
1426
+ if (!t.id || t.id === "</join></fork>" || t.id === "</choice>") return;
1427
+ t.cssClasses && (Array.isArray(t.cssCompiledStyles) || (t.cssCompiledStyles = []), t.cssClasses.split(" ").forEach((e) => {
1428
+ let r = n.get(e);
1429
+ r && (t.cssCompiledStyles = [...t.cssCompiledStyles ?? [], ...r.styles]);
1430
+ }));
1431
+ let r = e.find((e) => e.id === t.id);
1432
+ r ? Object.assign(r, t) : e.push(t);
1433
+ }
1434
+ r(J, "insertOrUpdateNode");
1435
+ function Y(e) {
1436
+ return e?.classes?.join(" ") ?? "";
1437
+ }
1438
+ r(Y, "getClassesFromDbInfo");
1439
+ function he(e) {
1440
+ return e?.styles ?? [];
1441
+ }
1442
+ r(he, "getStylesFromDbInfo");
1443
+ var X = /* @__PURE__ */ r((e, t, r, i, a, o, s, c) => {
1444
+ let l = t.id, f = r.get(l), p = Y(f), m = he(f), h = u();
1445
+ if (n.info("dataFetcher parsedItem", t, f, m), l !== "root") {
1446
+ let r = P;
1447
+ t.start === !0 ? r = ee : t.start === !1 && (r = te), t.type !== D && (r = t.type), W.get(l) || W.set(l, {
1448
+ id: l,
1449
+ shape: r,
1450
+ description: d.sanitizeText(l, h),
1451
+ cssClasses: `${p} ${ie}`,
1452
+ cssStyles: m
1453
+ });
1454
+ let u = W.get(l);
1455
+ t.description && (Array.isArray(u.description) ? (u.shape = F, u.description.push(t.description)) : u.description?.length && u.description.length > 0 ? (u.shape = F, u.description === l ? u.description = [t.description] : u.description = [u.description, t.description]) : (u.shape = P, u.description = t.description), u.description = d.sanitizeTextOrArray(u.description, h)), u.description?.length === 1 && u.shape === F && (u.type === "group" ? u.shape = L : u.shape = P), !u.type && t.doc && (n.info("Setting cluster for XCX", l, q(t)), u.type = "group", u.isGroup = !0, u.dir = q(t), u.shape = t.type === O ? I : L, u.cssClasses = `${u.cssClasses} ${le} ${o ? ue : ""}`);
1456
+ let f = {
1457
+ labelStyle: "",
1458
+ shape: u.shape,
1459
+ label: u.description,
1460
+ cssClasses: u.cssClasses,
1461
+ cssCompiledStyles: [],
1462
+ cssStyles: u.cssStyles,
1463
+ id: l,
1464
+ dir: u.dir,
1465
+ domId: K(l, G),
1466
+ type: u.type,
1467
+ isGroup: u.type === "group",
1468
+ padding: 8,
1469
+ rx: 10,
1470
+ ry: 10,
1471
+ look: s,
1472
+ labelType: "markdown"
1473
+ };
1474
+ if (f.shape === I && (f.label = ""), e && e.id !== "root" && (n.trace("Setting node ", l, " to be child of its parent ", e.id), f.parentId = e.id), f.centerLabel = !0, t.note) {
1475
+ let e = {
1476
+ labelStyle: "",
1477
+ shape: ne,
1478
+ label: t.note.text,
1479
+ labelType: "markdown",
1480
+ cssClasses: ce,
1481
+ cssStyles: [],
1482
+ cssCompiledStyles: [],
1483
+ id: l + fe + "-" + G,
1484
+ domId: K(l, G, B),
1485
+ type: u.type,
1486
+ isGroup: u.type === "group",
1487
+ padding: h.flowchart?.padding,
1488
+ look: s,
1489
+ position: t.note.position
1490
+ }, n = l + H, r = {
1491
+ labelStyle: "",
1492
+ shape: re,
1493
+ label: t.note.text,
1494
+ cssClasses: u.cssClasses,
1495
+ cssStyles: [],
1496
+ id: l + H,
1497
+ domId: K(l, G, z),
1498
+ type: "group",
1499
+ isGroup: !0,
1500
+ padding: 16,
1501
+ look: s,
1502
+ position: t.note.position
1503
+ };
1504
+ G++, r.id = n, e.parentId = n, J(i, r, c), J(i, e, c), J(i, f, c);
1505
+ let o = l, d = e.id;
1506
+ t.note.position === "left of" && (o = e.id, d = l), a.push({
1507
+ id: o + "-" + d,
1508
+ start: o,
1509
+ end: d,
1510
+ arrowhead: "none",
1511
+ arrowTypeEnd: "",
1512
+ style: k,
1513
+ labelStyle: "",
1514
+ classes: se,
1515
+ arrowheadStyle: A,
1516
+ labelpos: j,
1517
+ labelType: M,
1518
+ thickness: N,
1519
+ look: s
1520
+ });
1521
+ } else J(i, f, c);
1522
+ }
1523
+ t.doc && (n.trace("Adding nodes children "), me(t, t.doc, r, i, a, !o, s, c));
1524
+ }, "dataFetcher"), ge = /* @__PURE__ */ r(() => {
1525
+ W.clear(), G = 0;
1526
+ }, "reset"), Z = {
1527
+ START_NODE: "[*]",
1528
+ START_TYPE: "start",
1529
+ END_NODE: "[*]",
1530
+ END_TYPE: "end",
1531
+ COLOR_KEYWORD: "color",
1532
+ FILL_KEYWORD: "fill",
1533
+ BG_FILL: "bgFill",
1534
+ STYLECLASS_SEP: ","
1535
+ }, _e = /* @__PURE__ */ r(() => /* @__PURE__ */ new Map(), "newClassesList"), Q = /* @__PURE__ */ r(() => ({
1536
+ relations: [],
1537
+ states: /* @__PURE__ */ new Map(),
1538
+ documents: {}
1539
+ }), "newDoc"), $ = /* @__PURE__ */ r((e) => JSON.parse(JSON.stringify(e)), "clone"), ve = class {
1540
+ constructor(e) {
1541
+ this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = _e(), this.documents = { root: Q() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = f, this.setAccTitle = o, this.getAccDescription = c, this.setAccDescription = i, this.setDiagramTitle = s, this.getDiagramTitle = a, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
1542
+ }
1543
+ static {
1544
+ r(this, "StateDB");
1545
+ }
1546
+ static {
1547
+ this.relationType = {
1548
+ AGGREGATION: 0,
1549
+ EXTENSION: 1,
1550
+ COMPOSITION: 2,
1551
+ DEPENDENCY: 3
1552
+ };
1553
+ }
1554
+ extract(e) {
1555
+ this.clear(!0);
1556
+ for (let t of Array.isArray(e) ? e : e.doc) switch (t.stmt) {
1557
+ case x:
1558
+ this.addState(t.id.trim(), t.type, t.doc, t.description, t.note);
1559
+ break;
1560
+ case C:
1561
+ this.addRelation(t.state1, t.state2, t.description);
1562
+ break;
1563
+ case w:
1564
+ this.addStyleClass(t.id.trim(), t.classes);
1565
+ break;
1566
+ case T:
1567
+ this.handleStyleDef(t);
1568
+ break;
1569
+ case E:
1570
+ this.setCssClass(t.id.trim(), t.styleClass);
1571
+ break;
1572
+ case "click":
1573
+ this.addLink(t.id, t.url, t.tooltip);
1574
+ break;
1575
+ }
1576
+ let t = this.getStates(), n = u();
1577
+ ge(), X(void 0, this.getRootDocV2(), t, this.nodes, this.edges, !0, n.look, this.classes);
1578
+ for (let e of this.nodes) if (Array.isArray(e.label)) {
1579
+ if (e.description = e.label.slice(1), e.isGroup && e.description.length > 0) throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);
1580
+ e.label = e.label[0];
1581
+ }
1582
+ }
1583
+ handleStyleDef(e) {
1584
+ let t = e.id.trim().split(","), n = e.styleClass.split(",");
1585
+ for (let e of t) {
1586
+ let t = this.getState(e);
1587
+ if (!t) {
1588
+ let n = e.trim();
1589
+ this.addState(n), t = this.getState(n);
1590
+ }
1591
+ t && (t.styles = n.map((e) => e.replace(/;/g, "")?.trim()));
1592
+ }
1593
+ }
1594
+ setRootDoc(e) {
1595
+ n.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
1596
+ }
1597
+ docTranslator(e, n, r) {
1598
+ if (n.stmt === C) {
1599
+ this.docTranslator(e, n.state1, !0), this.docTranslator(e, n.state2, !1);
1600
+ return;
1601
+ }
1602
+ if (n.stmt === x && (n.id === Z.START_NODE ? (n.id = e.id + (r ? "_start" : "_end"), n.start = r) : n.id = n.id.trim()), n.stmt !== S && n.stmt !== x || !n.doc) return;
1603
+ let i = [], a = [];
1604
+ for (let e of n.doc) if (e.type === O) {
1605
+ let t = $(e);
1606
+ t.doc = $(a), i.push(t), a = [];
1607
+ } else a.push(e);
1608
+ if (i.length > 0 && a.length > 0) {
1609
+ let e = {
1610
+ stmt: x,
1611
+ id: t(),
1612
+ type: "divider",
1613
+ doc: $(a)
1614
+ };
1615
+ i.push($(e)), n.doc = i;
1616
+ }
1617
+ n.doc.forEach((e) => this.docTranslator(n, e, !0));
1618
+ }
1619
+ getRootDocV2() {
1620
+ return this.docTranslator({
1621
+ id: S,
1622
+ stmt: S
1623
+ }, {
1624
+ id: S,
1625
+ stmt: S,
1626
+ doc: this.rootDoc
1627
+ }, !0), {
1628
+ id: S,
1629
+ doc: this.rootDoc
1630
+ };
1631
+ }
1632
+ addState(e, t = D, r = void 0, i = void 0, a = void 0, o = void 0, s = void 0, c = void 0) {
1633
+ let l = e?.trim();
1634
+ if (!this.currentDocument.states.has(l)) n.info("Adding state ", l, i), this.currentDocument.states.set(l, {
1635
+ stmt: x,
1636
+ id: l,
1637
+ descriptions: [],
1638
+ type: t,
1639
+ doc: r,
1640
+ note: a,
1641
+ classes: [],
1642
+ styles: [],
1643
+ textStyles: []
1644
+ });
1645
+ else {
1646
+ let e = this.currentDocument.states.get(l);
1647
+ if (!e) throw Error(`State not found: ${l}`);
1648
+ e.doc ||= r, e.type ||= t;
1649
+ }
1650
+ if (i && (n.info("Setting state description", l, i), (Array.isArray(i) ? i : [i]).forEach((e) => this.addDescription(l, e.trim()))), a) {
1651
+ let e = this.currentDocument.states.get(l);
1652
+ if (!e) throw Error(`State not found: ${l}`);
1653
+ e.note = a, e.note.text = d.sanitizeText(e.note.text, u());
1654
+ }
1655
+ o && (n.info("Setting state classes", l, o), (Array.isArray(o) ? o : [o]).forEach((e) => this.setCssClass(l, e.trim()))), s && (n.info("Setting state styles", l, s), (Array.isArray(s) ? s : [s]).forEach((e) => this.setStyle(l, e.trim()))), c && (n.info("Setting state styles", l, s), (Array.isArray(c) ? c : [c]).forEach((e) => this.setTextStyle(l, e.trim())));
1656
+ }
1657
+ clear(e) {
1658
+ this.nodes = [], this.edges = [], this.documents = { root: Q() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = _e(), e || (this.links = /* @__PURE__ */ new Map(), l());
1659
+ }
1660
+ getState(e) {
1661
+ return this.currentDocument.states.get(e);
1662
+ }
1663
+ getStates() {
1664
+ return this.currentDocument.states;
1665
+ }
1666
+ logDocuments() {
1667
+ n.info("Documents = ", this.documents);
1668
+ }
1669
+ getRelations() {
1670
+ return this.currentDocument.relations;
1671
+ }
1672
+ addLink(e, t, r) {
1673
+ this.links.set(e, {
1674
+ url: t,
1675
+ tooltip: r
1676
+ }), n.warn("Adding link", e, t, r);
1677
+ }
1678
+ getLinks() {
1679
+ return this.links;
1680
+ }
1681
+ startIdIfNeeded(e = "") {
1682
+ return e === Z.START_NODE ? (this.startEndCount++, `${Z.START_TYPE}${this.startEndCount}`) : e;
1683
+ }
1684
+ startTypeIfNeeded(e = "", t = D) {
1685
+ return e === Z.START_NODE ? Z.START_TYPE : t;
1686
+ }
1687
+ endIdIfNeeded(e = "") {
1688
+ return e === Z.END_NODE ? (this.startEndCount++, `${Z.END_TYPE}${this.startEndCount}`) : e;
1689
+ }
1690
+ endTypeIfNeeded(e = "", t = D) {
1691
+ return e === Z.END_NODE ? Z.END_TYPE : t;
1692
+ }
1693
+ addRelationObjs(e, t, n = "") {
1694
+ let r = this.startIdIfNeeded(e.id.trim()), i = this.startTypeIfNeeded(e.id.trim(), e.type), a = this.startIdIfNeeded(t.id.trim()), o = this.startTypeIfNeeded(t.id.trim(), t.type);
1695
+ this.addState(r, i, e.doc, e.description, e.note, e.classes, e.styles, e.textStyles), this.addState(a, o, t.doc, t.description, t.note, t.classes, t.styles, t.textStyles), this.currentDocument.relations.push({
1696
+ id1: r,
1697
+ id2: a,
1698
+ relationTitle: d.sanitizeText(n, u())
1699
+ });
1700
+ }
1701
+ addRelation(e, t, n) {
1702
+ if (typeof e == "object" && typeof t == "object") this.addRelationObjs(e, t, n);
1703
+ else if (typeof e == "string" && typeof t == "string") {
1704
+ let r = this.startIdIfNeeded(e.trim()), i = this.startTypeIfNeeded(e), a = this.endIdIfNeeded(t.trim()), o = this.endTypeIfNeeded(t);
1705
+ this.addState(r, i), this.addState(a, o), this.currentDocument.relations.push({
1706
+ id1: r,
1707
+ id2: a,
1708
+ relationTitle: n ? d.sanitizeText(n, u()) : void 0
1709
+ });
1710
+ }
1711
+ }
1712
+ addDescription(e, t) {
1713
+ let n = this.currentDocument.states.get(e), r = t.startsWith(":") ? t.replace(":", "").trim() : t;
1714
+ n?.descriptions?.push(d.sanitizeText(r, u()));
1715
+ }
1716
+ cleanupLabel(e) {
1717
+ return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1718
+ }
1719
+ getDividerId() {
1720
+ return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1721
+ }
1722
+ addStyleClass(e, t = "") {
1723
+ this.classes.has(e) || this.classes.set(e, {
1724
+ id: e,
1725
+ styles: [],
1726
+ textStyles: []
1727
+ });
1728
+ let n = this.classes.get(e);
1729
+ t && n && t.split(Z.STYLECLASS_SEP).forEach((e) => {
1730
+ let t = e.replace(/([^;]*);/, "$1").trim();
1731
+ if (RegExp(Z.COLOR_KEYWORD).exec(e)) {
1732
+ let e = t.replace(Z.FILL_KEYWORD, Z.BG_FILL).replace(Z.COLOR_KEYWORD, Z.FILL_KEYWORD);
1733
+ n.textStyles.push(e);
1734
+ }
1735
+ n.styles.push(t);
1736
+ });
1737
+ }
1738
+ getClasses() {
1739
+ return this.classes;
1740
+ }
1741
+ setCssClass(e, t) {
1742
+ e.split(",").forEach((e) => {
1743
+ let n = this.getState(e);
1744
+ if (!n) {
1745
+ let t = e.trim();
1746
+ this.addState(t), n = this.getState(t);
1747
+ }
1748
+ n?.classes?.push(t);
1749
+ });
1750
+ }
1751
+ setStyle(e, t) {
1752
+ this.getState(e)?.styles?.push(t);
1753
+ }
1754
+ setTextStyle(e, t) {
1755
+ this.getState(e)?.textStyles?.push(t);
1756
+ }
1757
+ getDirectionStatement() {
1758
+ return this.rootDoc.find((e) => e.stmt === b);
1759
+ }
1760
+ getDirection() {
1761
+ return this.getDirectionStatement()?.value ?? v;
1762
+ }
1763
+ setDirection(e) {
1764
+ let t = this.getDirectionStatement();
1765
+ t ? t.value = e : this.rootDoc.unshift({
1766
+ stmt: b,
1767
+ value: e
1768
+ });
1769
+ }
1770
+ trimColon(e) {
1771
+ return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1772
+ }
1773
+ getData() {
1774
+ let e = u();
1775
+ return {
1776
+ nodes: this.nodes,
1777
+ edges: this.edges,
1778
+ other: {},
1779
+ config: e,
1780
+ direction: U(this.getRootDocV2())
1781
+ };
1782
+ }
1783
+ getConfig() {
1784
+ return u().state;
1785
+ }
1786
+ }, ye = /* @__PURE__ */ r((e) => `
1787
+ defs #statediagram-barbEnd {
1788
+ fill: ${e.transitionColor};
1789
+ stroke: ${e.transitionColor};
1790
+ }
1791
+ g.stateGroup text {
1792
+ fill: ${e.nodeBorder};
1793
+ stroke: none;
1794
+ font-size: 10px;
1795
+ }
1796
+ g.stateGroup text {
1797
+ fill: ${e.textColor};
1798
+ stroke: none;
1799
+ font-size: 10px;
1800
+
1801
+ }
1802
+ g.stateGroup .state-title {
1803
+ font-weight: bolder;
1804
+ fill: ${e.stateLabelColor};
1805
+ }
1806
+
1807
+ g.stateGroup rect {
1808
+ fill: ${e.mainBkg};
1809
+ stroke: ${e.nodeBorder};
1810
+ }
1811
+
1812
+ g.stateGroup line {
1813
+ stroke: ${e.lineColor};
1814
+ stroke-width: 1;
1815
+ }
1816
+
1817
+ .transition {
1818
+ stroke: ${e.transitionColor};
1819
+ stroke-width: 1;
1820
+ fill: none;
1821
+ }
1822
+
1823
+ .stateGroup .composit {
1824
+ fill: ${e.background};
1825
+ border-bottom: 1px
1826
+ }
1827
+
1828
+ .stateGroup .alt-composit {
1829
+ fill: #e0e0e0;
1830
+ border-bottom: 1px
1831
+ }
1832
+
1833
+ .state-note {
1834
+ stroke: ${e.noteBorderColor};
1835
+ fill: ${e.noteBkgColor};
1836
+
1837
+ text {
1838
+ fill: ${e.noteTextColor};
1839
+ stroke: none;
1840
+ font-size: 10px;
1841
+ }
1842
+ }
1843
+
1844
+ .stateLabel .box {
1845
+ stroke: none;
1846
+ stroke-width: 0;
1847
+ fill: ${e.mainBkg};
1848
+ opacity: 0.5;
1849
+ }
1850
+
1851
+ .edgeLabel .label rect {
1852
+ fill: ${e.labelBackgroundColor};
1853
+ opacity: 0.5;
1854
+ }
1855
+ .edgeLabel {
1856
+ background-color: ${e.edgeLabelBackground};
1857
+ p {
1858
+ background-color: ${e.edgeLabelBackground};
1859
+ }
1860
+ rect {
1861
+ opacity: 0.5;
1862
+ background-color: ${e.edgeLabelBackground};
1863
+ fill: ${e.edgeLabelBackground};
1864
+ }
1865
+ text-align: center;
1866
+ }
1867
+ .edgeLabel .label text {
1868
+ fill: ${e.transitionLabelColor || e.tertiaryTextColor};
1869
+ }
1870
+ .label div .edgeLabel {
1871
+ color: ${e.transitionLabelColor || e.tertiaryTextColor};
1872
+ }
1873
+
1874
+ .stateLabel text {
1875
+ fill: ${e.stateLabelColor};
1876
+ font-size: 10px;
1877
+ font-weight: bold;
1878
+ }
1879
+
1880
+ .node circle.state-start {
1881
+ fill: ${e.specialStateColor};
1882
+ stroke: ${e.specialStateColor};
1883
+ }
1884
+
1885
+ .node .fork-join {
1886
+ fill: ${e.specialStateColor};
1887
+ stroke: ${e.specialStateColor};
1888
+ }
1889
+
1890
+ .node circle.state-end {
1891
+ fill: ${e.innerEndBackground};
1892
+ stroke: ${e.background};
1893
+ stroke-width: 1.5
1894
+ }
1895
+ .end-state-inner {
1896
+ fill: ${e.compositeBackground || e.background};
1897
+ // stroke: ${e.background};
1898
+ stroke-width: 1.5
1899
+ }
1900
+
1901
+ .node rect {
1902
+ fill: ${e.stateBkg || e.mainBkg};
1903
+ stroke: ${e.stateBorder || e.nodeBorder};
1904
+ stroke-width: 1px;
1905
+ }
1906
+ .node polygon {
1907
+ fill: ${e.mainBkg};
1908
+ stroke: ${e.stateBorder || e.nodeBorder};;
1909
+ stroke-width: 1px;
1910
+ }
1911
+ #statediagram-barbEnd {
1912
+ fill: ${e.lineColor};
1913
+ }
1914
+
1915
+ .statediagram-cluster rect {
1916
+ fill: ${e.compositeTitleBackground};
1917
+ stroke: ${e.stateBorder || e.nodeBorder};
1918
+ stroke-width: 1px;
1919
+ }
1920
+
1921
+ .cluster-label, .nodeLabel {
1922
+ color: ${e.stateLabelColor};
1923
+ // line-height: 1;
1924
+ }
1925
+
1926
+ .statediagram-cluster rect.outer {
1927
+ rx: 5px;
1928
+ ry: 5px;
1929
+ }
1930
+ .statediagram-state .divider {
1931
+ stroke: ${e.stateBorder || e.nodeBorder};
1932
+ }
1933
+
1934
+ .statediagram-state .title-state {
1935
+ rx: 5px;
1936
+ ry: 5px;
1937
+ }
1938
+ .statediagram-cluster.statediagram-cluster .inner {
1939
+ fill: ${e.compositeBackground || e.background};
1940
+ }
1941
+ .statediagram-cluster.statediagram-cluster-alt .inner {
1942
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
1943
+ }
1944
+
1945
+ .statediagram-cluster .inner {
1946
+ rx:0;
1947
+ ry:0;
1948
+ }
1949
+
1950
+ .statediagram-state rect.basic {
1951
+ rx: 5px;
1952
+ ry: 5px;
1953
+ }
1954
+ .statediagram-state rect.divider {
1955
+ stroke-dasharray: 10,10;
1956
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
1957
+ }
1958
+
1959
+ .note-edge {
1960
+ stroke-dasharray: 5;
1961
+ }
1962
+
1963
+ .statediagram-note rect {
1964
+ fill: ${e.noteBkgColor};
1965
+ stroke: ${e.noteBorderColor};
1966
+ stroke-width: 1px;
1967
+ rx: 0;
1968
+ ry: 0;
1969
+ }
1970
+ .statediagram-note rect {
1971
+ fill: ${e.noteBkgColor};
1972
+ stroke: ${e.noteBorderColor};
1973
+ stroke-width: 1px;
1974
+ rx: 0;
1975
+ ry: 0;
1976
+ }
1977
+
1978
+ .statediagram-note text {
1979
+ fill: ${e.noteTextColor};
1980
+ }
1981
+
1982
+ .statediagram-note .nodeLabel {
1983
+ color: ${e.noteTextColor};
1984
+ }
1985
+ .statediagram .edgeLabel {
1986
+ color: red; // ${e.noteTextColor};
1987
+ }
1988
+
1989
+ #dependencyStart, #dependencyEnd {
1990
+ fill: ${e.lineColor};
1991
+ stroke: ${e.lineColor};
1992
+ stroke-width: 1;
1993
+ }
1994
+
1995
+ .statediagramTitleText {
1996
+ text-anchor: middle;
1997
+ font-size: 18px;
1998
+ fill: ${e.textColor};
1999
+ }
2000
+ `, "getStyles");
2001
+ //#endregion
2002
+ export { ye as i, _ as n, pe as r, ve as t };